summaryrefslogtreecommitdiffstats
path: root/src/devices/bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/a1bus/a1bus.cpp6
-rw-r--r--src/devices/bus/a1bus/a1bus.h21
-rw-r--r--src/devices/bus/a1bus/a1cassette.cpp11
-rw-r--r--src/devices/bus/a2bus/a2alfam2.cpp44
-rw-r--r--src/devices/bus/a2bus/a2arcadebd.cpp6
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp28
-rw-r--r--src/devices/bus/a2bus/a2bus.h49
-rw-r--r--src/devices/bus/a2bus/a2cffa.cpp2
-rw-r--r--src/devices/bus/a2bus/a2corvus.cpp19
-rw-r--r--src/devices/bus/a2bus/a2diskii.cpp22
-rw-r--r--src/devices/bus/a2bus/a2diskiing.cpp29
-rw-r--r--src/devices/bus/a2bus/a2diskiing.h5
-rw-r--r--src/devices/bus/a2bus/a2dx1.cpp14
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.cpp37
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.h59
-rw-r--r--src/devices/bus/a2bus/a2eext80col.cpp1
-rw-r--r--src/devices/bus/a2bus/a2eramworks3.cpp3
-rw-r--r--src/devices/bus/a2bus/a2eramworks3.h2
-rw-r--r--src/devices/bus/a2bus/a2estd80col.cpp1
-rw-r--r--src/devices/bus/a2bus/a2hsscsi.cpp39
-rw-r--r--src/devices/bus/a2bus/a2hsscsi.h2
-rw-r--r--src/devices/bus/a2bus/a2mcms.cpp18
-rw-r--r--src/devices/bus/a2bus/a2mcms.h2
-rw-r--r--src/devices/bus/a2bus/a2memexp.cpp5
-rw-r--r--src/devices/bus/a2bus/a2midi.cpp22
-rw-r--r--src/devices/bus/a2bus/a2mockingboard.cpp50
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp8
-rw-r--r--src/devices/bus/a2bus/a2sam.cpp12
-rw-r--r--src/devices/bus/a2bus/a2scsi.cpp39
-rw-r--r--src/devices/bus/a2bus/a2scsi.h2
-rw-r--r--src/devices/bus/a2bus/a2softcard.cpp28
-rw-r--r--src/devices/bus/a2bus/a2ssc.cpp4
-rw-r--r--src/devices/bus/a2bus/a2themill.cpp28
-rw-r--r--src/devices/bus/a2bus/a2ultraterm.cpp17
-rw-r--r--src/devices/bus/a2bus/a2videoterm.cpp17
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.cpp107
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.h18
-rw-r--r--src/devices/bus/a2bus/agat7ports.cpp12
-rw-r--r--src/devices/bus/a2bus/agat840k_hle.cpp15
-rw-r--r--src/devices/bus/a2bus/corvfdc02.cpp6
-rw-r--r--src/devices/bus/a2bus/ezcgi.cpp34
-rw-r--r--src/devices/bus/a2bus/laser128.cpp5
-rw-r--r--src/devices/bus/a2bus/mouse.cpp4
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp45
-rw-r--r--src/devices/bus/a2bus/pc_xporter.h1
-rw-r--r--src/devices/bus/a2bus/ssbapple.cpp9
-rw-r--r--src/devices/bus/a2bus/ssprite.cpp6
-rw-r--r--src/devices/bus/a2bus/timemasterho.cpp4
-rw-r--r--src/devices/bus/a2bus/transwarp.cpp37
-rw-r--r--src/devices/bus/a2bus/transwarp.h1
-rw-r--r--src/devices/bus/a7800/cpuwiz.cpp8
-rw-r--r--src/devices/bus/a7800/cpuwiz.h4
-rw-r--r--src/devices/bus/a7800/rom.cpp59
-rw-r--r--src/devices/bus/a7800/rom.h16
-rw-r--r--src/devices/bus/a7800/xboard.cpp12
-rw-r--r--src/devices/bus/a800/cassette.cpp13
-rw-r--r--src/devices/bus/abcbus/abc890.cpp112
-rw-r--r--src/devices/bus/abcbus/abcbus.h72
-rw-r--r--src/devices/bus/abcbus/cadmouse.cpp11
-rw-r--r--src/devices/bus/abcbus/db411223.cpp11
-rw-r--r--src/devices/bus/abcbus/unidisk.cpp5
-rw-r--r--src/devices/bus/abckb/abc77.cpp8
-rw-r--r--src/devices/bus/abckb/abc99.cpp2
-rw-r--r--src/devices/bus/abckb/abckb.h41
-rw-r--r--src/devices/bus/acorn/atom/discpack.cpp2
-rw-r--r--src/devices/bus/acorn/atom/econet.cpp2
-rw-r--r--src/devices/bus/acorn/atom/sid.cpp2
-rw-r--r--src/devices/bus/acorn/bus.cpp2
-rw-r--r--src/devices/bus/acorn/bus.h6
-rw-r--r--src/devices/bus/acorn/cms/4080term.cpp22
-rw-r--r--src/devices/bus/acorn/cms/hires.cpp15
-rw-r--r--src/devices/bus/acorn/system/cass.cpp9
-rw-r--r--src/devices/bus/acorn/system/econet.cpp2
-rw-r--r--src/devices/bus/acorn/system/fdc.cpp2
-rw-r--r--src/devices/bus/acorn/system/vdu40.cpp15
-rw-r--r--src/devices/bus/acorn/system/vdu80.cpp19
-rw-r--r--src/devices/bus/acorn/system/vib.cpp10
-rw-r--r--src/devices/bus/adam/adamlink.cpp4
-rw-r--r--src/devices/bus/adam/adamlink.h4
-rw-r--r--src/devices/bus/adam/exp.cpp8
-rw-r--r--src/devices/bus/adam/exp.h8
-rw-r--r--src/devices/bus/adam/ide.cpp4
-rw-r--r--src/devices/bus/adam/ide.h4
-rw-r--r--src/devices/bus/adam/ram.cpp4
-rw-r--r--src/devices/bus/adam/ram.h4
-rw-r--r--src/devices/bus/adamnet/adamnet.h11
-rw-r--r--src/devices/bus/adamnet/ddp.cpp27
-rw-r--r--src/devices/bus/adamnet/spi.cpp8
-rw-r--r--src/devices/bus/amiga/zorro/a2052.cpp6
-rw-r--r--src/devices/bus/amiga/zorro/a2058.cpp6
-rw-r--r--src/devices/bus/amiga/zorro/a2065.cpp10
-rw-r--r--src/devices/bus/amiga/zorro/a2232.cpp22
-rw-r--r--src/devices/bus/amiga/zorro/a590.cpp52
-rw-r--r--src/devices/bus/amiga/zorro/a590.h8
-rw-r--r--src/devices/bus/amiga/zorro/buddha.cpp18
-rw-r--r--src/devices/bus/amiga/zorro/zorro.cpp46
-rw-r--r--src/devices/bus/amiga/zorro/zorro.h112
-rw-r--r--src/devices/bus/apf/slot.h16
-rw-r--r--src/devices/bus/apricot/expansion/cards.cpp2
-rw-r--r--src/devices/bus/apricot/expansion/expansion.cpp25
-rw-r--r--src/devices/bus/apricot/expansion/expansion.h33
-rw-r--r--src/devices/bus/apricot/expansion/winchester.cpp254
-rw-r--r--src/devices/bus/apricot/expansion/winchester.h66
-rw-r--r--src/devices/bus/apricot/keyboard/hle.cpp85
-rw-r--r--src/devices/bus/apricot/keyboard/hle.h12
-rw-r--r--src/devices/bus/astrocde/accessory.cpp112
-rw-r--r--src/devices/bus/astrocde/accessory.h99
-rw-r--r--src/devices/bus/astrocde/cassette.cpp130
-rw-r--r--src/devices/bus/astrocde/cassette.h61
-rw-r--r--src/devices/bus/astrocde/ctrl.cpp120
-rw-r--r--src/devices/bus/astrocde/ctrl.h98
-rw-r--r--src/devices/bus/astrocde/exp.cpp14
-rw-r--r--src/devices/bus/astrocde/exp.h4
-rw-r--r--src/devices/bus/astrocde/joy.cpp56
-rw-r--r--src/devices/bus/astrocde/joy.h45
-rw-r--r--src/devices/bus/astrocde/lightpen.cpp87
-rw-r--r--src/devices/bus/astrocde/lightpen.h51
-rw-r--r--src/devices/bus/astrocde/ram.cpp61
-rw-r--r--src/devices/bus/astrocde/ram.h12
-rw-r--r--src/devices/bus/astrocde/rom.cpp41
-rw-r--r--src/devices/bus/astrocde/rom.h21
-rw-r--r--src/devices/bus/astrocde/slot.cpp3
-rw-r--r--src/devices/bus/astrocde/slot.h3
-rw-r--r--src/devices/bus/bbc/1mhzbus/1mhzbus.cpp19
-rw-r--r--src/devices/bus/bbc/1mhzbus/1mhzbus.h16
-rw-r--r--src/devices/bus/bbc/1mhzbus/beebsid.cpp20
-rw-r--r--src/devices/bus/bbc/1mhzbus/beebsid.h8
-rw-r--r--src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp2
-rw-r--r--src/devices/bus/bbc/1mhzbus/cfa3000opt.h2
-rw-r--r--src/devices/bus/bbc/1mhzbus/emrmidi.cpp8
-rw-r--r--src/devices/bus/bbc/1mhzbus/emrmidi.h4
-rw-r--r--src/devices/bus/bbc/1mhzbus/ieee488.cpp113
-rw-r--r--src/devices/bus/bbc/1mhzbus/ieee488.h16
-rw-r--r--src/devices/bus/bbc/1mhzbus/m2000.cpp28
-rw-r--r--src/devices/bus/bbc/1mhzbus/m2000.h8
-rw-r--r--src/devices/bus/bbc/1mhzbus/opus3.cpp8
-rw-r--r--src/devices/bus/bbc/1mhzbus/opus3.h8
-rw-r--r--src/devices/bus/bbc/1mhzbus/sprite.cpp99
-rw-r--r--src/devices/bus/bbc/1mhzbus/sprite.h49
-rw-r--r--src/devices/bus/bbc/exp/exp.cpp32
-rw-r--r--src/devices/bus/bbc/exp/exp.h34
-rw-r--r--src/devices/bus/bbc/exp/mertec.cpp34
-rw-r--r--src/devices/bus/bbc/exp/mertec.h18
-rw-r--r--src/devices/bus/bbc/fdc/acorn.cpp16
-rw-r--r--src/devices/bus/bbc/fdc/acorn.h8
-rw-r--r--src/devices/bus/bbc/fdc/ams.cpp12
-rw-r--r--src/devices/bus/bbc/fdc/ams.h4
-rw-r--r--src/devices/bus/bbc/fdc/cumana.cpp4
-rw-r--r--src/devices/bus/bbc/fdc/cumana.h4
-rw-r--r--src/devices/bus/bbc/fdc/cv1797.cpp4
-rw-r--r--src/devices/bus/bbc/fdc/cv1797.h4
-rw-r--r--src/devices/bus/bbc/fdc/fdc.cpp8
-rw-r--r--src/devices/bus/bbc/fdc/fdc.h8
-rw-r--r--src/devices/bus/bbc/fdc/microware.cpp4
-rw-r--r--src/devices/bus/bbc/fdc/microware.h4
-rw-r--r--src/devices/bus/bbc/fdc/opus.cpp14
-rw-r--r--src/devices/bus/bbc/fdc/opus.h8
-rw-r--r--src/devices/bus/bbc/fdc/watford.cpp8
-rw-r--r--src/devices/bus/bbc/fdc/watford.h8
-rw-r--r--src/devices/bus/bbc/joyport/joyport.cpp8
-rw-r--r--src/devices/bus/bbc/joyport/joyport.h8
-rw-r--r--src/devices/bus/bbc/joyport/joystick.cpp2
-rw-r--r--src/devices/bus/bbc/joyport/joystick.h2
-rw-r--r--src/devices/bus/bbc/rom/dfs.cpp63
-rw-r--r--src/devices/bus/bbc/rom/dfs.h42
-rw-r--r--src/devices/bus/bbc/rom/pal.cpp312
-rw-r--r--src/devices/bus/bbc/rom/pal.h167
-rw-r--r--src/devices/bus/bbc/rom/ram.cpp57
-rw-r--r--src/devices/bus/bbc/rom/ram.h42
-rw-r--r--src/devices/bus/bbc/rom/rom.cpp50
-rw-r--r--src/devices/bus/bbc/rom/rom.h41
-rw-r--r--src/devices/bus/bbc/rom/rtc.cpp124
-rw-r--r--src/devices/bus/bbc/rom/rtc.h72
-rw-r--r--src/devices/bus/bbc/rom/slot.cpp234
-rw-r--r--src/devices/bus/bbc/rom/slot.h155
-rw-r--r--src/devices/bus/bbc/tube/tube.cpp20
-rw-r--r--src/devices/bus/bbc/tube/tube.h8
-rw-r--r--src/devices/bus/bbc/tube/tube_32016.cpp210
-rw-r--r--src/devices/bus/bbc/tube/tube_32016.h71
-rw-r--r--src/devices/bus/bbc/tube/tube_6502.cpp16
-rw-r--r--src/devices/bus/bbc/tube/tube_6502.h8
-rw-r--r--src/devices/bus/bbc/tube/tube_80186.cpp8
-rw-r--r--src/devices/bus/bbc/tube/tube_80186.h4
-rw-r--r--src/devices/bus/bbc/tube/tube_80286.cpp15
-rw-r--r--src/devices/bus/bbc/tube/tube_80286.h8
-rw-r--r--src/devices/bus/bbc/tube/tube_arm.cpp12
-rw-r--r--src/devices/bus/bbc/tube/tube_arm.h8
-rw-r--r--src/devices/bus/bbc/tube/tube_casper.cpp4
-rw-r--r--src/devices/bus/bbc/tube/tube_casper.h4
-rw-r--r--src/devices/bus/bbc/tube/tube_rc6502.cpp12
-rw-r--r--src/devices/bus/bbc/tube/tube_rc6502.h8
-rw-r--r--src/devices/bus/bbc/tube/tube_z80.cpp14
-rw-r--r--src/devices/bus/bbc/tube/tube_z80.h10
-rw-r--r--src/devices/bus/bbc/tube/tube_zep100.cpp18
-rw-r--r--src/devices/bus/bbc/tube/tube_zep100.h18
-rw-r--r--src/devices/bus/bbc/userport/beebspch.cpp2
-rw-r--r--src/devices/bus/bbc/userport/beebspch.h2
-rw-r--r--src/devices/bus/bbc/userport/cfa3000kbd.cpp2
-rw-r--r--src/devices/bus/bbc/userport/cfa3000kbd.h2
-rw-r--r--src/devices/bus/bbc/userport/pointer.cpp6
-rw-r--r--src/devices/bus/bbc/userport/pointer.h6
-rw-r--r--src/devices/bus/bbc/userport/userport.cpp8
-rw-r--r--src/devices/bus/bbc/userport/userport.h8
-rw-r--r--src/devices/bus/bml3/bml3bus.cpp6
-rw-r--r--src/devices/bus/bml3/bml3bus.h53
-rw-r--r--src/devices/bus/bw2/exp.cpp24
-rw-r--r--src/devices/bus/bw2/exp.h45
-rw-r--r--src/devices/bus/bw2/ramcard.cpp6
-rw-r--r--src/devices/bus/bw2/ramcard.h6
-rw-r--r--src/devices/bus/c64/16kb.cpp17
-rw-r--r--src/devices/bus/c64/16kb.h2
-rw-r--r--src/devices/bus/c64/c128_comal80.cpp4
-rw-r--r--src/devices/bus/c64/c128_comal80.h4
-rw-r--r--src/devices/bus/c64/c128_partner.cpp4
-rw-r--r--src/devices/bus/c64/c128_partner.h4
-rw-r--r--src/devices/bus/c64/comal80.cpp4
-rw-r--r--src/devices/bus/c64/comal80.h4
-rw-r--r--src/devices/bus/c64/cpm.cpp6
-rw-r--r--src/devices/bus/c64/cpm.h2
-rw-r--r--src/devices/bus/c64/currah_speech.cpp4
-rw-r--r--src/devices/bus/c64/currah_speech.h4
-rw-r--r--src/devices/bus/c64/dela_ep256.cpp35
-rw-r--r--src/devices/bus/c64/dela_ep256.h4
-rw-r--r--src/devices/bus/c64/dela_ep64.cpp19
-rw-r--r--src/devices/bus/c64/dela_ep64.h4
-rw-r--r--src/devices/bus/c64/dela_ep7x8.cpp52
-rw-r--r--src/devices/bus/c64/dela_ep7x8.h12
-rw-r--r--src/devices/bus/c64/dinamic.cpp2
-rw-r--r--src/devices/bus/c64/dinamic.h2
-rw-r--r--src/devices/bus/c64/dqbb.cpp4
-rw-r--r--src/devices/bus/c64/dqbb.h4
-rw-r--r--src/devices/bus/c64/easy_calc_result.cpp4
-rw-r--r--src/devices/bus/c64/easy_calc_result.h4
-rw-r--r--src/devices/bus/c64/easyflash.cpp12
-rw-r--r--src/devices/bus/c64/easyflash.h4
-rw-r--r--src/devices/bus/c64/epyx_fast_load.cpp4
-rw-r--r--src/devices/bus/c64/epyx_fast_load.h4
-rw-r--r--src/devices/bus/c64/exos.cpp2
-rw-r--r--src/devices/bus/c64/exos.h2
-rw-r--r--src/devices/bus/c64/exp.cpp8
-rw-r--r--src/devices/bus/c64/exp.h12
-rw-r--r--src/devices/bus/c64/fcc.cpp13
-rw-r--r--src/devices/bus/c64/fcc.h4
-rw-r--r--src/devices/bus/c64/final.cpp4
-rw-r--r--src/devices/bus/c64/final.h4
-rw-r--r--src/devices/bus/c64/final3.cpp4
-rw-r--r--src/devices/bus/c64/final3.h4
-rw-r--r--src/devices/bus/c64/fun_play.cpp4
-rw-r--r--src/devices/bus/c64/fun_play.h4
-rw-r--r--src/devices/bus/c64/geocable.cpp9
-rw-r--r--src/devices/bus/c64/georam.cpp4
-rw-r--r--src/devices/bus/c64/georam.h4
-rw-r--r--src/devices/bus/c64/ide64.cpp8
-rw-r--r--src/devices/bus/c64/ide64.h4
-rw-r--r--src/devices/bus/c64/ieee488.cpp12
-rw-r--r--src/devices/bus/c64/ieee488.h4
-rw-r--r--src/devices/bus/c64/kingsoft.cpp4
-rw-r--r--src/devices/bus/c64/kingsoft.h4
-rw-r--r--src/devices/bus/c64/mach5.cpp4
-rw-r--r--src/devices/bus/c64/mach5.h4
-rw-r--r--src/devices/bus/c64/magic_desk.cpp4
-rw-r--r--src/devices/bus/c64/magic_desk.h4
-rw-r--r--src/devices/bus/c64/magic_formel.cpp6
-rw-r--r--src/devices/bus/c64/magic_formel.h4
-rw-r--r--src/devices/bus/c64/magic_voice.cpp14
-rw-r--r--src/devices/bus/c64/magic_voice.h4
-rw-r--r--src/devices/bus/c64/midi_maplin.cpp22
-rw-r--r--src/devices/bus/c64/midi_maplin.h4
-rw-r--r--src/devices/bus/c64/midi_namesoft.cpp22
-rw-r--r--src/devices/bus/c64/midi_namesoft.h4
-rw-r--r--src/devices/bus/c64/midi_passport.cpp26
-rw-r--r--src/devices/bus/c64/midi_passport.h4
-rw-r--r--src/devices/bus/c64/midi_sci.cpp22
-rw-r--r--src/devices/bus/c64/midi_sci.h4
-rw-r--r--src/devices/bus/c64/midi_siel.cpp22
-rw-r--r--src/devices/bus/c64/midi_siel.h4
-rw-r--r--src/devices/bus/c64/mikro_assembler.cpp2
-rw-r--r--src/devices/bus/c64/mikro_assembler.h2
-rw-r--r--src/devices/bus/c64/multiscreen.cpp17
-rw-r--r--src/devices/bus/c64/multiscreen.h4
-rw-r--r--src/devices/bus/c64/music64.cpp8
-rw-r--r--src/devices/bus/c64/music64.h4
-rw-r--r--src/devices/bus/c64/neoram.cpp4
-rw-r--r--src/devices/bus/c64/neoram.h4
-rw-r--r--src/devices/bus/c64/ocean.cpp4
-rw-r--r--src/devices/bus/c64/ocean.h4
-rw-r--r--src/devices/bus/c64/pagefox.cpp4
-rw-r--r--src/devices/bus/c64/pagefox.h4
-rw-r--r--src/devices/bus/c64/partner.cpp4
-rw-r--r--src/devices/bus/c64/partner.h4
-rw-r--r--src/devices/bus/c64/prophet64.cpp4
-rw-r--r--src/devices/bus/c64/prophet64.h4
-rw-r--r--src/devices/bus/c64/ps64.cpp25
-rw-r--r--src/devices/bus/c64/ps64.h4
-rw-r--r--src/devices/bus/c64/reu.cpp20
-rw-r--r--src/devices/bus/c64/reu.h4
-rw-r--r--src/devices/bus/c64/rex.cpp2
-rw-r--r--src/devices/bus/c64/rex.h2
-rw-r--r--src/devices/bus/c64/rex_ep256.cpp35
-rw-r--r--src/devices/bus/c64/rex_ep256.h4
-rw-r--r--src/devices/bus/c64/ross.cpp4
-rw-r--r--src/devices/bus/c64/ross.h4
-rw-r--r--src/devices/bus/c64/sfx_sound_expander.cpp12
-rw-r--r--src/devices/bus/c64/sfx_sound_expander.h4
-rw-r--r--src/devices/bus/c64/silverrock.cpp4
-rw-r--r--src/devices/bus/c64/silverrock.h4
-rw-r--r--src/devices/bus/c64/simons_basic.cpp4
-rw-r--r--src/devices/bus/c64/simons_basic.h4
-rw-r--r--src/devices/bus/c64/speakeasy.cpp16
-rw-r--r--src/devices/bus/c64/speakeasy.h4
-rw-r--r--src/devices/bus/c64/stardos.cpp4
-rw-r--r--src/devices/bus/c64/stardos.h4
-rw-r--r--src/devices/bus/c64/std.cpp2
-rw-r--r--src/devices/bus/c64/std.h2
-rw-r--r--src/devices/bus/c64/structured_basic.cpp4
-rw-r--r--src/devices/bus/c64/structured_basic.h4
-rw-r--r--src/devices/bus/c64/super_explode.cpp4
-rw-r--r--src/devices/bus/c64/super_explode.h4
-rw-r--r--src/devices/bus/c64/super_games.cpp4
-rw-r--r--src/devices/bus/c64/super_games.h4
-rw-r--r--src/devices/bus/c64/supercpu.cpp8
-rw-r--r--src/devices/bus/c64/supercpu.h4
-rw-r--r--src/devices/bus/c64/sw8k.cpp2
-rw-r--r--src/devices/bus/c64/sw8k.h2
-rw-r--r--src/devices/bus/c64/swiftlink.cpp8
-rw-r--r--src/devices/bus/c64/swiftlink.h4
-rw-r--r--src/devices/bus/c64/system3.cpp4
-rw-r--r--src/devices/bus/c64/system3.h4
-rw-r--r--src/devices/bus/c64/tdos.cpp12
-rw-r--r--src/devices/bus/c64/tdos.h4
-rw-r--r--src/devices/bus/c64/turbo232.cpp10
-rw-r--r--src/devices/bus/c64/turbo232.h4
-rw-r--r--src/devices/bus/c64/vizastar.cpp2
-rw-r--r--src/devices/bus/c64/vizastar.h2
-rw-r--r--src/devices/bus/c64/vw64.cpp2
-rw-r--r--src/devices/bus/c64/vw64.h2
-rw-r--r--src/devices/bus/c64/warp_speed.cpp4
-rw-r--r--src/devices/bus/c64/warp_speed.h4
-rw-r--r--src/devices/bus/c64/westermann.cpp2
-rw-r--r--src/devices/bus/c64/westermann.h2
-rw-r--r--src/devices/bus/c64/xl80.cpp29
-rw-r--r--src/devices/bus/c64/xl80.h4
-rw-r--r--src/devices/bus/c64/zaxxon.cpp2
-rw-r--r--src/devices/bus/c64/zaxxon.h2
-rw-r--r--src/devices/bus/cbm2/24k.cpp4
-rw-r--r--src/devices/bus/cbm2/24k.h4
-rw-r--r--src/devices/bus/cbm2/exp.cpp8
-rw-r--r--src/devices/bus/cbm2/exp.h19
-rw-r--r--src/devices/bus/cbm2/hrg.cpp64
-rw-r--r--src/devices/bus/cbm2/hrg.h7
-rw-r--r--src/devices/bus/cbm2/std.cpp2
-rw-r--r--src/devices/bus/cbm2/std.h2
-rw-r--r--src/devices/bus/cbm2/user.h26
-rw-r--r--src/devices/bus/cbmiec/c1526.cpp22
-rw-r--r--src/devices/bus/cbmiec/c1541.cpp18
-rw-r--r--src/devices/bus/cbmiec/c1571.cpp11
-rw-r--r--src/devices/bus/cbmiec/c1581.cpp31
-rw-r--r--src/devices/bus/cbmiec/cbmiec.h45
-rw-r--r--src/devices/bus/cbmiec/interpod.cpp17
-rw-r--r--src/devices/bus/cbmiec/interpod.h10
-rw-r--r--src/devices/bus/cbmiec/serialbox.cpp9
-rw-r--r--src/devices/bus/cbmiec/vic1515.cpp11
-rw-r--r--src/devices/bus/cbmiec/vic1520.cpp9
-rw-r--r--src/devices/bus/cbus/pc9801_118.cpp4
-rw-r--r--src/devices/bus/cbus/pc9801_26.cpp4
-rw-r--r--src/devices/bus/cbus/pc9801_86.cpp30
-rw-r--r--src/devices/bus/cbus/pc9801_amd98.cpp16
-rw-r--r--src/devices/bus/cbus/pc9801_cbus.cpp11
-rw-r--r--src/devices/bus/cbus/pc9801_cbus.h106
-rw-r--r--src/devices/bus/centronics/comxpl80.cpp11
-rw-r--r--src/devices/bus/centronics/covox.cpp29
-rw-r--r--src/devices/bus/centronics/ctronics.h80
-rw-r--r--src/devices/bus/centronics/digiblst.cpp12
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp1
-rw-r--r--src/devices/bus/centronics/nec_p72.cpp10
-rw-r--r--src/devices/bus/centronics/printer.cpp9
-rw-r--r--src/devices/bus/cgenie/expansion/expansion.cpp22
-rw-r--r--src/devices/bus/cgenie/expansion/expansion.h45
-rw-r--r--src/devices/bus/cgenie/expansion/floppy.cpp16
-rw-r--r--src/devices/bus/cgenie/parallel/parallel.h23
-rw-r--r--src/devices/bus/cgenie/parallel/printer.cpp19
-rw-r--r--src/devices/bus/chanf/slot.h16
-rw-r--r--src/devices/bus/coco/coco_dcmodem.cpp9
-rw-r--r--src/devices/bus/coco/coco_fdc.cpp15
-rw-r--r--src/devices/bus/coco/coco_fdc.h1
-rw-r--r--src/devices/bus/coco/coco_gmc.cpp8
-rw-r--r--src/devices/bus/coco/coco_multi.cpp82
-rw-r--r--src/devices/bus/coco/coco_orch90.cpp20
-rw-r--r--src/devices/bus/coco/coco_rs232.cpp9
-rw-r--r--src/devices/bus/coco/coco_ssc.cpp15
-rw-r--r--src/devices/bus/coco/coco_t4426.cpp14
-rw-r--r--src/devices/bus/coco/cococart.cpp40
-rw-r--r--src/devices/bus/coco/cococart.h46
-rw-r--r--src/devices/bus/coco/dragon_jcbsnd.cpp15
-rw-r--r--src/devices/bus/coco/dragon_jcbsnd.h1
-rw-r--r--src/devices/bus/coleco/ctrl.cpp (renamed from src/devices/bus/coleco/controller/ctrl.cpp)0
-rw-r--r--src/devices/bus/coleco/ctrl.h (renamed from src/devices/bus/coleco/controller/ctrl.h)0
-rw-r--r--src/devices/bus/coleco/exp.cpp (renamed from src/devices/bus/coleco/cartridge/exp.cpp)4
-rw-r--r--src/devices/bus/coleco/exp.h (renamed from src/devices/bus/coleco/cartridge/exp.h)4
-rw-r--r--src/devices/bus/coleco/hand.cpp (renamed from src/devices/bus/coleco/controller/hand.cpp)0
-rw-r--r--src/devices/bus/coleco/hand.h (renamed from src/devices/bus/coleco/controller/hand.h)0
-rw-r--r--src/devices/bus/coleco/sac.cpp (renamed from src/devices/bus/coleco/controller/sac.cpp)0
-rw-r--r--src/devices/bus/coleco/sac.h (renamed from src/devices/bus/coleco/controller/sac.h)0
-rw-r--r--src/devices/bus/coleco/std.cpp (renamed from src/devices/bus/coleco/cartridge/std.cpp)2
-rw-r--r--src/devices/bus/coleco/std.h (renamed from src/devices/bus/coleco/cartridge/std.h)2
-rw-r--r--src/devices/bus/coleco/xin1.cpp (renamed from src/devices/bus/coleco/cartridge/xin1.cpp)2
-rw-r--r--src/devices/bus/coleco/xin1.h (renamed from src/devices/bus/coleco/cartridge/xin1.h)2
-rw-r--r--src/devices/bus/compis/graphics.h40
-rw-r--r--src/devices/bus/compis/hrg.cpp50
-rw-r--r--src/devices/bus/compis/hrg.h4
-rw-r--r--src/devices/bus/compucolor/floppy.cpp33
-rw-r--r--src/devices/bus/compucolor/floppy.h2
-rw-r--r--src/devices/bus/comx35/clm.cpp31
-rw-r--r--src/devices/bus/comx35/clm.h4
-rw-r--r--src/devices/bus/comx35/eprom.cpp4
-rw-r--r--src/devices/bus/comx35/eprom.h4
-rw-r--r--src/devices/bus/comx35/exp.cpp16
-rw-r--r--src/devices/bus/comx35/exp.h16
-rw-r--r--src/devices/bus/comx35/expbox.cpp16
-rw-r--r--src/devices/bus/comx35/expbox.h8
-rw-r--r--src/devices/bus/comx35/fdc.cpp6
-rw-r--r--src/devices/bus/comx35/fdc.h6
-rw-r--r--src/devices/bus/comx35/joycard.cpp2
-rw-r--r--src/devices/bus/comx35/joycard.h2
-rw-r--r--src/devices/bus/comx35/printer.cpp27
-rw-r--r--src/devices/bus/comx35/printer.h6
-rw-r--r--src/devices/bus/comx35/ram.cpp6
-rw-r--r--src/devices/bus/comx35/ram.h6
-rw-r--r--src/devices/bus/comx35/thermal.cpp6
-rw-r--r--src/devices/bus/comx35/thermal.h6
-rw-r--r--src/devices/bus/cpc/amdrum.cpp12
-rw-r--r--src/devices/bus/cpc/cpc_rom.cpp21
-rw-r--r--src/devices/bus/cpc/cpc_rom.h3
-rw-r--r--src/devices/bus/cpc/cpcexp.cpp2
-rw-r--r--src/devices/bus/cpc/ddi1.cpp6
-rw-r--r--src/devices/bus/cpc/doubler.cpp13
-rw-r--r--src/devices/bus/cpc/hd20.cpp11
-rw-r--r--src/devices/bus/cpc/magicsound.cpp16
-rw-r--r--src/devices/bus/cpc/playcity.cpp12
-rw-r--r--src/devices/bus/cpc/smartwatch.cpp13
-rw-r--r--src/devices/bus/cpc/symbfac2.cpp19
-rw-r--r--src/devices/bus/dmv/dmvbus.cpp13
-rw-r--r--src/devices/bus/dmv/dmvbus.h51
-rw-r--r--src/devices/bus/dmv/k210.cpp13
-rw-r--r--src/devices/bus/dmv/k210.h4
-rw-r--r--src/devices/bus/dmv/k220.cpp3
-rw-r--r--src/devices/bus/dmv/k220.h1
-rw-r--r--src/devices/bus/dmv/k230.cpp13
-rw-r--r--src/devices/bus/dmv/k230.h3
-rw-r--r--src/devices/bus/dmv/k233.cpp2
-rw-r--r--src/devices/bus/dmv/k233.h2
-rw-r--r--src/devices/bus/dmv/k801.cpp8
-rw-r--r--src/devices/bus/dmv/k801.h8
-rw-r--r--src/devices/bus/dmv/k803.cpp17
-rw-r--r--src/devices/bus/dmv/k803.h4
-rw-r--r--src/devices/bus/dmv/k806.cpp8
-rw-r--r--src/devices/bus/dmv/k806.h4
-rw-r--r--src/devices/bus/ecbbus/ecbbus.h38
-rw-r--r--src/devices/bus/econet/e01.cpp8
-rw-r--r--src/devices/bus/econet/econet.h24
-rw-r--r--src/devices/bus/einstein/pipe/pipe.cpp44
-rw-r--r--src/devices/bus/einstein/pipe/pipe.h9
-rw-r--r--src/devices/bus/einstein/pipe/speculator.cpp13
-rw-r--r--src/devices/bus/einstein/pipe/tk02.cpp3
-rw-r--r--src/devices/bus/einstein/userport/userport.h29
-rw-r--r--src/devices/bus/ekara/rom.cpp121
-rw-r--r--src/devices/bus/ekara/rom.h46
-rw-r--r--src/devices/bus/ekara/slot.cpp38
-rw-r--r--src/devices/bus/ekara/slot.h21
-rw-r--r--src/devices/bus/electron/cart/abr.cpp16
-rw-r--r--src/devices/bus/electron/cart/abr.h4
-rw-r--r--src/devices/bus/electron/cart/ap34.cpp28
-rw-r--r--src/devices/bus/electron/cart/ap34.h6
-rw-r--r--src/devices/bus/electron/cart/ap5.cpp171
-rw-r--r--src/devices/bus/electron/cart/ap5.h60
-rw-r--r--src/devices/bus/electron/cart/aqr.cpp19
-rw-r--r--src/devices/bus/electron/cart/aqr.h4
-rw-r--r--src/devices/bus/electron/cart/click.cpp21
-rw-r--r--src/devices/bus/electron/cart/click.h6
-rw-r--r--src/devices/bus/electron/cart/cumana.cpp22
-rw-r--r--src/devices/bus/electron/cart/cumana.h6
-rw-r--r--src/devices/bus/electron/cart/mgc.cpp23
-rw-r--r--src/devices/bus/electron/cart/mgc.h4
-rw-r--r--src/devices/bus/electron/cart/peg400.cpp20
-rw-r--r--src/devices/bus/electron/cart/peg400.h6
-rw-r--r--src/devices/bus/electron/cart/romp144.cpp162
-rw-r--r--src/devices/bus/electron/cart/romp144.h60
-rw-r--r--src/devices/bus/electron/cart/slot.cpp26
-rw-r--r--src/devices/bus/electron/cart/slot.h33
-rw-r--r--src/devices/bus/electron/cart/sndexp.cpp19
-rw-r--r--src/devices/bus/electron/cart/sndexp.h4
-rw-r--r--src/devices/bus/electron/cart/sndexp3.cpp18
-rw-r--r--src/devices/bus/electron/cart/sndexp3.h4
-rw-r--r--src/devices/bus/electron/cart/sp64.cpp14
-rw-r--r--src/devices/bus/electron/cart/sp64.h4
-rw-r--r--src/devices/bus/electron/cart/std.cpp6
-rw-r--r--src/devices/bus/electron/cart/std.h2
-rw-r--r--src/devices/bus/electron/cart/stlefs.cpp32
-rw-r--r--src/devices/bus/electron/cart/stlefs.h8
-rw-r--r--src/devices/bus/electron/cart/tube.cpp91
-rw-r--r--src/devices/bus/electron/cart/tube.h47
-rw-r--r--src/devices/bus/electron/exp.cpp30
-rw-r--r--src/devices/bus/electron/exp.h52
-rw-r--r--src/devices/bus/electron/fbjoy.cpp4
-rw-r--r--src/devices/bus/electron/fbjoy.h2
-rw-r--r--src/devices/bus/electron/m2105.cpp154
-rw-r--r--src/devices/bus/electron/m2105.h9
-rw-r--r--src/devices/bus/electron/plus1.cpp79
-rw-r--r--src/devices/bus/electron/plus1.h8
-rw-r--r--src/devices/bus/electron/plus2.cpp236
-rw-r--r--src/devices/bus/electron/plus2.h62
-rw-r--r--src/devices/bus/electron/plus3.cpp31
-rw-r--r--src/devices/bus/electron/plus3.h6
-rw-r--r--src/devices/bus/electron/pwrjoy.cpp6
-rw-r--r--src/devices/bus/electron/pwrjoy.h4
-rw-r--r--src/devices/bus/electron/rombox.cpp65
-rw-r--r--src/devices/bus/electron/rombox.h4
-rw-r--r--src/devices/bus/electron/romboxp.cpp95
-rw-r--r--src/devices/bus/electron/romboxp.h8
-rw-r--r--src/devices/bus/ep64/exp.cpp3
-rw-r--r--src/devices/bus/ep64/exp.h40
-rw-r--r--src/devices/bus/epson_sio/epson_sio.h38
-rw-r--r--src/devices/bus/epson_sio/pf10.cpp22
-rw-r--r--src/devices/bus/epson_sio/pf10.h3
-rw-r--r--src/devices/bus/epson_sio/tf20.cpp36
-rw-r--r--src/devices/bus/epson_sio/tf20.h5
-rw-r--r--src/devices/bus/gamate/rom.cpp7
-rw-r--r--src/devices/bus/gamate/slot.h16
-rw-r--r--src/devices/bus/gameboy/gb_slot.cpp16
-rw-r--r--src/devices/bus/gameboy/gb_slot.h16
-rw-r--r--src/devices/bus/gameboy/mbc.cpp132
-rw-r--r--src/devices/bus/gameboy/mbc.h132
-rw-r--r--src/devices/bus/gameboy/rom.cpp34
-rw-r--r--src/devices/bus/gameboy/rom.h34
-rw-r--r--src/devices/bus/gamegear/ggext.h38
-rw-r--r--src/devices/bus/gamegear/smsctrladp.cpp11
-rw-r--r--src/devices/bus/gba/gba_slot.h17
-rw-r--r--src/devices/bus/gba/rom.cpp32
-rw-r--r--src/devices/bus/generic/ram.cpp8
-rw-r--r--src/devices/bus/generic/ram.h8
-rw-r--r--src/devices/bus/generic/rom.cpp16
-rw-r--r--src/devices/bus/generic/rom.h16
-rw-r--r--src/devices/bus/generic/slot.cpp20
-rw-r--r--src/devices/bus/generic/slot.h20
-rw-r--r--src/devices/bus/hexbus/hx5102.cpp11
-rw-r--r--src/devices/bus/hp80_io/hp80_io.h27
-rw-r--r--src/devices/bus/hp80_optroms/hp80_optrom.h13
-rw-r--r--src/devices/bus/hp9845_io/98032.cpp7
-rw-r--r--src/devices/bus/hp9845_io/98034.cpp19
-rw-r--r--src/devices/bus/hp9845_io/hp9885.cpp974
-rw-r--r--src/devices/bus/hp9845_io/hp9885.h136
-rw-r--r--src/devices/bus/hp_dio/hp98265a.cpp4
-rw-r--r--src/devices/bus/hp_dio/hp98603a.cpp5
-rw-r--r--src/devices/bus/hp_dio/hp98603b.cpp5
-rw-r--r--src/devices/bus/hp_dio/hp98620.cpp6
-rw-r--r--src/devices/bus/hp_dio/hp98643.cpp2
-rw-r--r--src/devices/bus/hp_dio/hp_dio.cpp6
-rw-r--r--src/devices/bus/hp_dio/hp_dio.h9
-rw-r--r--src/devices/bus/hp_dio/human_interface.cpp12
-rw-r--r--src/devices/bus/ieee488/c2040fdc.h19
-rw-r--r--src/devices/bus/ieee488/c8280.cpp31
-rw-r--r--src/devices/bus/ieee488/hardbox.cpp25
-rw-r--r--src/devices/bus/ieee488/hp9122c.cpp19
-rw-r--r--src/devices/bus/ieee488/ieee488.h116
-rw-r--r--src/devices/bus/ieee488/remote488.cpp7
-rw-r--r--src/devices/bus/ieee488/softbox.cpp31
-rw-r--r--src/devices/bus/imi7000/imi7000.h51
-rw-r--r--src/devices/bus/intellec4/intellec4.cpp29
-rw-r--r--src/devices/bus/intellec4/intellec4.h27
-rw-r--r--src/devices/bus/interpro/keyboard/hle.cpp8
-rw-r--r--src/devices/bus/interpro/sr/edge.cpp4
-rw-r--r--src/devices/bus/interpro/sr/sr.cpp3
-rw-r--r--src/devices/bus/interpro/sr/sr.h26
-rw-r--r--src/devices/bus/intv/ecs.cpp55
-rw-r--r--src/devices/bus/intv/ecs.h54
-rw-r--r--src/devices/bus/intv/rom.h38
-rw-r--r--src/devices/bus/intv/slot.cpp16
-rw-r--r--src/devices/bus/intv/slot.h128
-rw-r--r--src/devices/bus/intv/voice.cpp31
-rw-r--r--src/devices/bus/intv/voice.h42
-rw-r--r--src/devices/bus/intv_ctrl/ctrl.h23
-rw-r--r--src/devices/bus/intv_ctrl/ecs_ctrl.cpp9
-rw-r--r--src/devices/bus/intv_ctrl/ecs_ctrl.h22
-rw-r--r--src/devices/bus/iq151/disc2.cpp11
-rw-r--r--src/devices/bus/iq151/iq151.h52
-rw-r--r--src/devices/bus/isa/3c503.cpp13
-rw-r--r--src/devices/bus/isa/3c505.cpp4
-rw-r--r--src/devices/bus/isa/adlib.cpp14
-rw-r--r--src/devices/bus/isa/aga.cpp25
-rw-r--r--src/devices/bus/isa/aha1542.cpp200
-rw-r--r--src/devices/bus/isa/aha1542.h54
-rw-r--r--src/devices/bus/isa/aha1542b.cpp126
-rw-r--r--src/devices/bus/isa/aha1542b.h57
-rw-r--r--src/devices/bus/isa/aha1542c.cpp323
-rw-r--r--src/devices/bus/isa/aha1542c.h95
-rw-r--r--src/devices/bus/isa/aha174x.cpp160
-rw-r--r--src/devices/bus/isa/aha174x.h61
-rw-r--r--src/devices/bus/isa/bt54x.cpp201
-rw-r--r--src/devices/bus/isa/bt54x.h74
-rw-r--r--src/devices/bus/isa/cga.cpp43
-rw-r--r--src/devices/bus/isa/cl_sh260.cpp93
-rw-r--r--src/devices/bus/isa/cl_sh260.h64
-rw-r--r--src/devices/bus/isa/dcb.cpp70
-rw-r--r--src/devices/bus/isa/dcb.h43
-rw-r--r--src/devices/bus/isa/dectalk.cpp1
-rw-r--r--src/devices/bus/isa/ega.cpp45
-rw-r--r--src/devices/bus/isa/ega.h2
-rw-r--r--src/devices/bus/isa/eis_sad8852.cpp11
-rw-r--r--src/devices/bus/isa/fdc.cpp5
-rw-r--r--src/devices/bus/isa/fdc.h1
-rw-r--r--src/devices/bus/isa/finalchs.cpp9
-rw-r--r--src/devices/bus/isa/gus.cpp22
-rw-r--r--src/devices/bus/isa/gus.h43
-rw-r--r--src/devices/bus/isa/hdc.cpp32
-rw-r--r--src/devices/bus/isa/hdc.h9
-rw-r--r--src/devices/bus/isa/ibm_mfc.cpp17
-rw-r--r--src/devices/bus/isa/isa.cpp92
-rw-r--r--src/devices/bus/isa/isa.h26
-rw-r--r--src/devices/bus/isa/isa_cards.cpp23
-rw-r--r--src/devices/bus/isa/lbaenhancer.cpp7
-rw-r--r--src/devices/bus/isa/mc1502_fdc.cpp12
-rw-r--r--src/devices/bus/isa/mda.cpp57
-rw-r--r--src/devices/bus/isa/mufdc.cpp5
-rw-r--r--src/devices/bus/isa/mufdc.h1
-rw-r--r--src/devices/bus/isa/ne1000.cpp13
-rw-r--r--src/devices/bus/isa/ne2000.cpp13
-rw-r--r--src/devices/bus/isa/np600.cpp76
-rw-r--r--src/devices/bus/isa/np600.h39
-rw-r--r--src/devices/bus/isa/num9rev.cpp21
-rw-r--r--src/devices/bus/isa/omti8621.cpp5
-rw-r--r--src/devices/bus/isa/omti8621.h1
-rw-r--r--src/devices/bus/isa/p1_fdc.cpp15
-rw-r--r--src/devices/bus/isa/p1_hdc.cpp26
-rw-r--r--src/devices/bus/isa/p1_sound.cpp20
-rw-r--r--src/devices/bus/isa/pc1640_iga.cpp4
-rw-r--r--src/devices/bus/isa/pds.cpp7
-rw-r--r--src/devices/bus/isa/pgc.cpp33
-rw-r--r--src/devices/bus/isa/sb16.cpp6
-rw-r--r--src/devices/bus/isa/sblaster.cpp37
-rw-r--r--src/devices/bus/isa/sc499.cpp7
-rw-r--r--src/devices/bus/isa/ssi2001.cpp2
-rw-r--r--src/devices/bus/isa/stereo_fx.cpp5
-rw-r--r--src/devices/bus/isa/svga_cirrus.cpp28
-rw-r--r--src/devices/bus/isa/svga_s3.cpp56
-rw-r--r--src/devices/bus/isa/svga_trident.cpp16
-rw-r--r--src/devices/bus/isa/svga_tseng.cpp16
-rw-r--r--src/devices/bus/isa/vga.cpp16
-rw-r--r--src/devices/bus/isa/vga_ati.cpp53
-rw-r--r--src/devices/bus/isa/wd1007a.cpp7
-rw-r--r--src/devices/bus/isa/wdxt_gen.cpp10
-rw-r--r--src/devices/bus/isa/wdxt_gen.h1
-rw-r--r--src/devices/bus/isbx/compis_fdc.cpp14
-rw-r--r--src/devices/bus/isbx/compis_fdc.h8
-rw-r--r--src/devices/bus/isbx/isbc_218a.cpp18
-rw-r--r--src/devices/bus/isbx/isbc_218a.h12
-rw-r--r--src/devices/bus/isbx/isbx.h24
-rw-r--r--src/devices/bus/jakks_gamekey/rom.cpp111
-rw-r--r--src/devices/bus/jakks_gamekey/rom.h77
-rw-r--r--src/devices/bus/jakks_gamekey/slot.cpp237
-rw-r--r--src/devices/bus/jakks_gamekey/slot.h119
-rw-r--r--src/devices/bus/kc/d002.cpp60
-rw-r--r--src/devices/bus/kc/d004.cpp4
-rw-r--r--src/devices/bus/kc/kc.h62
-rw-r--r--src/devices/bus/lpci/mpc105.cpp4
-rw-r--r--src/devices/bus/lpci/mpc105.h10
-rw-r--r--src/devices/bus/lpci/pci.h16
-rw-r--r--src/devices/bus/lpci/southbridge.cpp55
-rw-r--r--src/devices/bus/lpci/southbridge.h1
-rw-r--r--src/devices/bus/m5/slot.h17
-rw-r--r--src/devices/bus/macpds/macpds.h16
-rw-r--r--src/devices/bus/macpds/pds_tpdfpd.cpp13
-rw-r--r--src/devices/bus/megadrive/eeprom.cpp49
-rw-r--r--src/devices/bus/megadrive/ggenie.cpp9
-rw-r--r--src/devices/bus/megadrive/jcart.cpp14
-rw-r--r--src/devices/bus/megadrive/md_slot.h18
-rw-r--r--src/devices/bus/megadrive/sk.cpp9
-rw-r--r--src/devices/bus/megadrive/svp.cpp11
-rw-r--r--src/devices/bus/midi/midi.h8
-rw-r--r--src/devices/bus/midi/midiinport.cpp9
-rw-r--r--src/devices/bus/midi/midioutport.cpp7
-rw-r--r--src/devices/bus/msx_cart/arc.cpp11
-rw-r--r--src/devices/bus/msx_cart/arc.h8
-rw-r--r--src/devices/bus/msx_cart/ascii.cpp50
-rw-r--r--src/devices/bus/msx_cart/ascii.h25
-rw-r--r--src/devices/bus/msx_cart/bm_012.cpp17
-rw-r--r--src/devices/bus/msx_cart/cartridge.cpp19
-rw-r--r--src/devices/bus/msx_cart/cartridge.h21
-rw-r--r--src/devices/bus/msx_cart/crossblaim.cpp10
-rw-r--r--src/devices/bus/msx_cart/crossblaim.h5
-rw-r--r--src/devices/bus/msx_cart/disk.cpp74
-rw-r--r--src/devices/bus/msx_cart/disk.h18
-rw-r--r--src/devices/bus/msx_cart/dooly.cpp4
-rw-r--r--src/devices/bus/msx_cart/dooly.h4
-rw-r--r--src/devices/bus/msx_cart/fmpac.cpp29
-rw-r--r--src/devices/bus/msx_cart/fmpac.h9
-rw-r--r--src/devices/bus/msx_cart/fs_sr022.cpp4
-rw-r--r--src/devices/bus/msx_cart/fs_sr022.h4
-rw-r--r--src/devices/bus/msx_cart/halnote.cpp10
-rw-r--r--src/devices/bus/msx_cart/halnote.h5
-rw-r--r--src/devices/bus/msx_cart/hfox.cpp10
-rw-r--r--src/devices/bus/msx_cart/hfox.h5
-rw-r--r--src/devices/bus/msx_cart/holy_quran.cpp10
-rw-r--r--src/devices/bus/msx_cart/holy_quran.h5
-rw-r--r--src/devices/bus/msx_cart/konami.cpp142
-rw-r--r--src/devices/bus/msx_cart/konami.h32
-rw-r--r--src/devices/bus/msx_cart/korean.cpp35
-rw-r--r--src/devices/bus/msx_cart/korean.h17
-rw-r--r--src/devices/bus/msx_cart/majutsushi.cpp22
-rw-r--r--src/devices/bus/msx_cart/majutsushi.h5
-rw-r--r--src/devices/bus/msx_cart/moonsound.cpp29
-rw-r--r--src/devices/bus/msx_cart/moonsound.h10
-rw-r--r--src/devices/bus/msx_cart/msx_audio.cpp43
-rw-r--r--src/devices/bus/msx_cart/msx_audio.h18
-rw-r--r--src/devices/bus/msx_cart/msx_audio_kb.cpp16
-rw-r--r--src/devices/bus/msx_cart/msx_audio_kb.h9
-rw-r--r--src/devices/bus/msx_cart/msxdos2.cpp10
-rw-r--r--src/devices/bus/msx_cart/msxdos2.h5
-rw-r--r--src/devices/bus/msx_cart/nomapper.cpp2
-rw-r--r--src/devices/bus/msx_cart/nomapper.h2
-rw-r--r--src/devices/bus/msx_cart/rtype.cpp10
-rw-r--r--src/devices/bus/msx_cart/rtype.h5
-rw-r--r--src/devices/bus/msx_cart/super_swangi.cpp10
-rw-r--r--src/devices/bus/msx_cart/super_swangi.h5
-rw-r--r--src/devices/bus/msx_cart/superloderunner.cpp15
-rw-r--r--src/devices/bus/msx_cart/superloderunner.h7
-rw-r--r--src/devices/bus/msx_cart/yamaha.cpp18
-rw-r--r--src/devices/bus/msx_cart/yamaha.h5
-rw-r--r--src/devices/bus/msx_slot/bunsetsu.cpp6
-rw-r--r--src/devices/bus/msx_slot/bunsetsu.h9
-rw-r--r--src/devices/bus/msx_slot/cartridge.cpp25
-rw-r--r--src/devices/bus/msx_slot/cartridge.h21
-rw-r--r--src/devices/bus/msx_slot/disk.cpp75
-rw-r--r--src/devices/bus/msx_slot/disk.h98
-rw-r--r--src/devices/bus/msx_slot/fs4600.cpp12
-rw-r--r--src/devices/bus/msx_slot/fs4600.h9
-rw-r--r--src/devices/bus/msx_slot/music.cpp11
-rw-r--r--src/devices/bus/msx_slot/music.h11
-rw-r--r--src/devices/bus/msx_slot/panasonic08.cpp12
-rw-r--r--src/devices/bus/msx_slot/panasonic08.h9
-rw-r--r--src/devices/bus/msx_slot/ram.cpp6
-rw-r--r--src/devices/bus/msx_slot/ram.h12
-rw-r--r--src/devices/bus/msx_slot/ram_mm.cpp22
-rw-r--r--src/devices/bus/msx_slot/ram_mm.h22
-rw-r--r--src/devices/bus/msx_slot/rom.cpp4
-rw-r--r--src/devices/bus/msx_slot/rom.h6
-rw-r--r--src/devices/bus/msx_slot/slot.cpp7
-rw-r--r--src/devices/bus/msx_slot/slot.h20
-rw-r--r--src/devices/bus/msx_slot/sony08.cpp12
-rw-r--r--src/devices/bus/msx_slot/sony08.h9
-rw-r--r--src/devices/bus/mtx/exp.cpp109
-rw-r--r--src/devices/bus/mtx/exp.h93
-rw-r--r--src/devices/bus/mtx/sdx.cpp425
-rw-r--r--src/devices/bus/mtx/sdx.h105
-rw-r--r--src/devices/bus/nasbus/avc.cpp15
-rw-r--r--src/devices/bus/nasbus/nasbus.cpp35
-rw-r--r--src/devices/bus/nasbus/nasbus.h42
-rw-r--r--src/devices/bus/neogeo/boot_cthd.cpp18
-rw-r--r--src/devices/bus/neogeo/boot_kof10th.cpp7
-rw-r--r--src/devices/bus/neogeo/boot_kof2k2.cpp39
-rw-r--r--src/devices/bus/neogeo/boot_kof2k3.cpp43
-rw-r--r--src/devices/bus/neogeo/boot_misc.cpp27
-rw-r--r--src/devices/bus/neogeo/boot_svc.cpp18
-rw-r--r--src/devices/bus/neogeo/cmc.cpp19
-rw-r--r--src/devices/bus/neogeo/cmc.h8
-rw-r--r--src/devices/bus/neogeo/fatfury2.cpp7
-rw-r--r--src/devices/bus/neogeo/kof2k2.cpp13
-rw-r--r--src/devices/bus/neogeo/kof98.cpp7
-rw-r--r--src/devices/bus/neogeo/mslugx.cpp7
-rw-r--r--src/devices/bus/neogeo/pcm2.cpp9
-rw-r--r--src/devices/bus/neogeo/prot_cmc.h5
-rw-r--r--src/devices/bus/neogeo/prot_cthd.h6
-rw-r--r--src/devices/bus/neogeo/prot_fatfury2.h5
-rw-r--r--src/devices/bus/neogeo/prot_kof2k2.h5
-rw-r--r--src/devices/bus/neogeo/prot_kof2k3bl.h5
-rw-r--r--src/devices/bus/neogeo/prot_kof98.h5
-rw-r--r--src/devices/bus/neogeo/prot_misc.h5
-rw-r--r--src/devices/bus/neogeo/prot_mslugx.h5
-rw-r--r--src/devices/bus/neogeo/prot_pcm2.h5
-rw-r--r--src/devices/bus/neogeo/prot_pvc.h5
-rw-r--r--src/devices/bus/neogeo/prot_sma.h5
-rw-r--r--src/devices/bus/neogeo/pvc.cpp11
-rw-r--r--src/devices/bus/neogeo/rom.cpp12
-rw-r--r--src/devices/bus/neogeo/rom.h8
-rw-r--r--src/devices/bus/neogeo/slot.h20
-rw-r--r--src/devices/bus/neogeo/sma.cpp9
-rw-r--r--src/devices/bus/neogeo_ctrl/ctrl.h32
-rw-r--r--src/devices/bus/nes/2a03pur.cpp4
-rw-r--r--src/devices/bus/nes/2a03pur.h4
-rw-r--r--src/devices/bus/nes/act53.cpp4
-rw-r--r--src/devices/bus/nes/act53.h4
-rw-r--r--src/devices/bus/nes/aladdin.cpp21
-rw-r--r--src/devices/bus/nes/aladdin.h23
-rw-r--r--src/devices/bus/nes/ave.cpp6
-rw-r--r--src/devices/bus/nes/ave.h6
-rw-r--r--src/devices/bus/nes/bandai.cpp40
-rw-r--r--src/devices/bus/nes/bandai.h22
-rw-r--r--src/devices/bus/nes/benshieng.cpp2
-rw-r--r--src/devices/bus/nes/benshieng.h2
-rw-r--r--src/devices/bus/nes/bootleg.cpp98
-rw-r--r--src/devices/bus/nes/bootleg.h98
-rw-r--r--src/devices/bus/nes/camerica.cpp6
-rw-r--r--src/devices/bus/nes/camerica.h8
-rw-r--r--src/devices/bus/nes/cne.cpp8
-rw-r--r--src/devices/bus/nes/cne.h8
-rw-r--r--src/devices/bus/nes/cony.cpp12
-rw-r--r--src/devices/bus/nes/cony.h12
-rw-r--r--src/devices/bus/nes/datach.cpp36
-rw-r--r--src/devices/bus/nes/datach.h24
-rw-r--r--src/devices/bus/nes/discrete.cpp8
-rw-r--r--src/devices/bus/nes/discrete.h8
-rw-r--r--src/devices/bus/nes/disksys.cpp19
-rw-r--r--src/devices/bus/nes/disksys.h12
-rw-r--r--src/devices/bus/nes/ggenie.cpp38
-rw-r--r--src/devices/bus/nes/ggenie.h22
-rw-r--r--src/devices/bus/nes/henggedianzi.cpp8
-rw-r--r--src/devices/bus/nes/henggedianzi.h8
-rw-r--r--src/devices/bus/nes/hes.cpp2
-rw-r--r--src/devices/bus/nes/hes.h2
-rw-r--r--src/devices/bus/nes/hosenkan.cpp2
-rw-r--r--src/devices/bus/nes/hosenkan.h2
-rw-r--r--src/devices/bus/nes/irem.cpp10
-rw-r--r--src/devices/bus/nes/irem.h10
-rw-r--r--src/devices/bus/nes/jaleco.cpp22
-rw-r--r--src/devices/bus/nes/jaleco.h28
-rw-r--r--src/devices/bus/nes/jy.cpp20
-rw-r--r--src/devices/bus/nes/jy.h14
-rw-r--r--src/devices/bus/nes/kaiser.cpp48
-rw-r--r--src/devices/bus/nes/kaiser.h46
-rw-r--r--src/devices/bus/nes/karastudio.cpp23
-rw-r--r--src/devices/bus/nes/karastudio.h25
-rw-r--r--src/devices/bus/nes/konami.cpp50
-rw-r--r--src/devices/bus/nes/konami.h18
-rw-r--r--src/devices/bus/nes/legacy.cpp12
-rw-r--r--src/devices/bus/nes/legacy.h14
-rw-r--r--src/devices/bus/nes/mmc1.cpp24
-rw-r--r--src/devices/bus/nes/mmc1.h18
-rw-r--r--src/devices/bus/nes/mmc2.cpp6
-rw-r--r--src/devices/bus/nes/mmc2.h6
-rw-r--r--src/devices/bus/nes/mmc3.cpp28
-rw-r--r--src/devices/bus/nes/mmc3.h20
-rw-r--r--src/devices/bus/nes/mmc3_clones.cpp202
-rw-r--r--src/devices/bus/nes/mmc3_clones.h112
-rw-r--r--src/devices/bus/nes/mmc5.cpp24
-rw-r--r--src/devices/bus/nes/mmc5.h20
-rw-r--r--src/devices/bus/nes/multigame.cpp128
-rw-r--r--src/devices/bus/nes/multigame.h122
-rw-r--r--src/devices/bus/nes/namcot.cpp44
-rw-r--r--src/devices/bus/nes/namcot.h40
-rw-r--r--src/devices/bus/nes/nanjing.cpp4
-rw-r--r--src/devices/bus/nes/nanjing.h4
-rw-r--r--src/devices/bus/nes/nes_slot.cpp63
-rw-r--r--src/devices/bus/nes/nes_slot.h51
-rw-r--r--src/devices/bus/nes/ntdec.cpp4
-rw-r--r--src/devices/bus/nes/ntdec.h4
-rw-r--r--src/devices/bus/nes/nxrom.cpp35
-rw-r--r--src/devices/bus/nes/nxrom.h28
-rw-r--r--src/devices/bus/nes/pirate.cpp48
-rw-r--r--src/devices/bus/nes/pirate.h46
-rw-r--r--src/devices/bus/nes/pt554.cpp2
-rw-r--r--src/devices/bus/nes/pt554.h2
-rw-r--r--src/devices/bus/nes/racermate.cpp2
-rw-r--r--src/devices/bus/nes/racermate.h2
-rw-r--r--src/devices/bus/nes/rcm.cpp12
-rw-r--r--src/devices/bus/nes/rcm.h14
-rw-r--r--src/devices/bus/nes/rexsoft.cpp8
-rw-r--r--src/devices/bus/nes/rexsoft.h10
-rw-r--r--src/devices/bus/nes/sachen.cpp26
-rw-r--r--src/devices/bus/nes/sachen.h34
-rw-r--r--src/devices/bus/nes/somari.cpp16
-rw-r--r--src/devices/bus/nes/somari.h12
-rw-r--r--src/devices/bus/nes/subor.cpp12
-rw-r--r--src/devices/bus/nes/subor.h10
-rw-r--r--src/devices/bus/nes/sunsoft.cpp30
-rw-r--r--src/devices/bus/nes/sunsoft.h24
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.cpp27
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.h27
-rw-r--r--src/devices/bus/nes/taito.cpp18
-rw-r--r--src/devices/bus/nes/taito.h14
-rw-r--r--src/devices/bus/nes/tengen.cpp8
-rw-r--r--src/devices/bus/nes/tengen.h8
-rw-r--r--src/devices/bus/nes/txc.cpp16
-rw-r--r--src/devices/bus/nes/txc.h16
-rw-r--r--src/devices/bus/nes/waixing.cpp46
-rw-r--r--src/devices/bus/nes/waixing.h36
-rw-r--r--src/devices/bus/nes/zemina.cpp2
-rw-r--r--src/devices/bus/nes/zemina.h2
-rw-r--r--src/devices/bus/nes_ctrl/fckeybrd.cpp11
-rw-r--r--src/devices/bus/nes_ctrl/miracle.cpp10
-rw-r--r--src/devices/bus/newbrain/eim.cpp25
-rw-r--r--src/devices/bus/newbrain/eim.h8
-rw-r--r--src/devices/bus/newbrain/exp.cpp16
-rw-r--r--src/devices/bus/newbrain/exp.h37
-rw-r--r--src/devices/bus/newbrain/fdc.cpp45
-rw-r--r--src/devices/bus/newbrain/fdc.h14
-rw-r--r--src/devices/bus/nubus/nubus.cpp56
-rw-r--r--src/devices/bus/nubus/nubus.h51
-rw-r--r--src/devices/bus/nubus/nubus_48gc.cpp19
-rw-r--r--src/devices/bus/nubus/nubus_asntmc3b.cpp13
-rw-r--r--src/devices/bus/nubus/nubus_cb264.cpp15
-rw-r--r--src/devices/bus/nubus/nubus_image.cpp7
-rw-r--r--src/devices/bus/nubus/nubus_m2hires.cpp15
-rw-r--r--src/devices/bus/nubus/nubus_m2video.cpp15
-rw-r--r--src/devices/bus/nubus/nubus_radiustpd.cpp13
-rw-r--r--src/devices/bus/nubus/nubus_spec8.cpp15
-rw-r--r--src/devices/bus/nubus/nubus_specpdq.cpp99
-rw-r--r--src/devices/bus/nubus/nubus_vikbw.cpp15
-rw-r--r--src/devices/bus/nubus/nubus_wsportrait.cpp15
-rw-r--r--src/devices/bus/nubus/pds30_30hr.cpp15
-rw-r--r--src/devices/bus/nubus/pds30_cb264.cpp15
-rw-r--r--src/devices/bus/nubus/pds30_mc30.cpp15
-rw-r--r--src/devices/bus/nubus/pds30_procolor816.cpp15
-rw-r--r--src/devices/bus/nubus/pds30_sigmalview.cpp15
-rw-r--r--src/devices/bus/odyssey2/chess.cpp11
-rw-r--r--src/devices/bus/odyssey2/slot.h16
-rw-r--r--src/devices/bus/odyssey2/voice.cpp7
-rw-r--r--src/devices/bus/pc1512/mouse.h37
-rw-r--r--src/devices/bus/pc_kbd/ec1841.cpp33
-rw-r--r--src/devices/bus/pc_kbd/iskr1030.cpp39
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.cpp24
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.h17
-rw-r--r--src/devices/bus/pce/pce_slot.h22
-rw-r--r--src/devices/bus/pet/2joysnd.cpp11
-rw-r--r--src/devices/bus/pet/64k.cpp6
-rw-r--r--src/devices/bus/pet/64k.h6
-rw-r--r--src/devices/bus/pet/c2n.cpp13
-rw-r--r--src/devices/bus/pet/cass.h13
-rw-r--r--src/devices/bus/pet/cb2snd.cpp11
-rw-r--r--src/devices/bus/pet/exp.cpp12
-rw-r--r--src/devices/bus/pet/exp.h32
-rw-r--r--src/devices/bus/pet/hsg.cpp66
-rw-r--r--src/devices/bus/pet/hsg.h9
-rw-r--r--src/devices/bus/pet/superpet.cpp16
-rw-r--r--src/devices/bus/pet/superpet.h6
-rw-r--r--src/devices/bus/plus4/c1551.cpp38
-rw-r--r--src/devices/bus/plus4/c1551.h26
-rw-r--r--src/devices/bus/plus4/exp.cpp8
-rw-r--r--src/devices/bus/plus4/exp.h43
-rw-r--r--src/devices/bus/plus4/sid.cpp20
-rw-r--r--src/devices/bus/plus4/sid.h4
-rw-r--r--src/devices/bus/plus4/std.cpp2
-rw-r--r--src/devices/bus/plus4/std.h2
-rw-r--r--src/devices/bus/pofo/ccm.h31
-rw-r--r--src/devices/bus/pofo/exp.h44
-rw-r--r--src/devices/bus/pofo/hpc101.cpp37
-rw-r--r--src/devices/bus/pofo/hpc101.h4
-rw-r--r--src/devices/bus/pofo/hpc102.cpp8
-rw-r--r--src/devices/bus/pofo/hpc102.h4
-rw-r--r--src/devices/bus/pofo/hpc104.cpp27
-rw-r--r--src/devices/bus/pofo/hpc104.h4
-rw-r--r--src/devices/bus/pofo/ram.cpp4
-rw-r--r--src/devices/bus/pofo/ram.h4
-rw-r--r--src/devices/bus/pofo/rom.cpp2
-rw-r--r--src/devices/bus/pofo/rom.h2
-rw-r--r--src/devices/bus/psi_kbd/ergoline.cpp11
-rw-r--r--src/devices/bus/psi_kbd/psi_kbd.h34
-rw-r--r--src/devices/bus/psx/ctlrport.cpp7
-rw-r--r--src/devices/bus/psx/ctlrport.h5
-rw-r--r--src/devices/bus/psx/gamebooster.cpp8
-rw-r--r--src/devices/bus/psx/memcard.h2
-rw-r--r--src/devices/bus/ql/cst_q_plus4.cpp43
-rw-r--r--src/devices/bus/ql/cst_q_plus4.h4
-rw-r--r--src/devices/bus/ql/cst_qdisc.cpp4
-rw-r--r--src/devices/bus/ql/cst_qdisc.h4
-rw-r--r--src/devices/bus/ql/cumana_fdi.cpp4
-rw-r--r--src/devices/bus/ql/cumana_fdi.h4
-rw-r--r--src/devices/bus/ql/exp.h34
-rw-r--r--src/devices/bus/ql/kempston_di.cpp4
-rw-r--r--src/devices/bus/ql/kempston_di.h4
-rw-r--r--src/devices/bus/ql/miracle_gold_card.cpp4
-rw-r--r--src/devices/bus/ql/miracle_gold_card.h4
-rw-r--r--src/devices/bus/ql/miracle_hd.cpp4
-rw-r--r--src/devices/bus/ql/miracle_hd.h4
-rw-r--r--src/devices/bus/ql/mp_fdi.cpp4
-rw-r--r--src/devices/bus/ql/mp_fdi.h4
-rw-r--r--src/devices/bus/ql/opd_basic_master.cpp4
-rw-r--r--src/devices/bus/ql/opd_basic_master.h4
-rw-r--r--src/devices/bus/ql/pcml_qdisk.cpp4
-rw-r--r--src/devices/bus/ql/pcml_qdisk.h4
-rw-r--r--src/devices/bus/ql/qubide.cpp4
-rw-r--r--src/devices/bus/ql/qubide.h4
-rw-r--r--src/devices/bus/ql/rom.h8
-rw-r--r--src/devices/bus/ql/sandy_superdisk.cpp4
-rw-r--r--src/devices/bus/ql/sandy_superdisk.h4
-rw-r--r--src/devices/bus/ql/sandy_superqboard.cpp4
-rw-r--r--src/devices/bus/ql/sandy_superqboard.h4
-rw-r--r--src/devices/bus/ql/std.cpp2
-rw-r--r--src/devices/bus/ql/std.h2
-rw-r--r--src/devices/bus/ql/trumpcard.cpp4
-rw-r--r--src/devices/bus/ql/trumpcard.h4
-rw-r--r--src/devices/bus/rs232/null_modem.cpp7
-rw-r--r--src/devices/bus/rs232/printer.cpp9
-rw-r--r--src/devices/bus/rs232/xvd701.cpp5
-rw-r--r--src/devices/bus/s100/dj2db.cpp8
-rw-r--r--src/devices/bus/s100/dj2db.h8
-rw-r--r--src/devices/bus/s100/djdma.cpp2
-rw-r--r--src/devices/bus/s100/djdma.h2
-rw-r--r--src/devices/bus/s100/mm65k16s.cpp4
-rw-r--r--src/devices/bus/s100/mm65k16s.h4
-rw-r--r--src/devices/bus/s100/nsmdsa.cpp14
-rw-r--r--src/devices/bus/s100/nsmdsa.h5
-rw-r--r--src/devices/bus/s100/nsmdsad.cpp14
-rw-r--r--src/devices/bus/s100/nsmdsad.h5
-rw-r--r--src/devices/bus/s100/s100.cpp16
-rw-r--r--src/devices/bus/s100/s100.h121
-rw-r--r--src/devices/bus/s100/seals8k.cpp8
-rw-r--r--src/devices/bus/s100/wunderbus.cpp16
-rw-r--r--src/devices/bus/s100/wunderbus.h4
-rw-r--r--src/devices/bus/saturn/sat_slot.h16
-rw-r--r--src/devices/bus/sbus/cgthree.cpp4
-rw-r--r--src/devices/bus/scsi/omti5100.cpp9
-rw-r--r--src/devices/bus/scsi/s1410.cpp17
-rw-r--r--src/devices/bus/scsi/sa1403d.cpp7
-rw-r--r--src/devices/bus/scsi/scsi.h88
-rw-r--r--src/devices/bus/scsi/scsicd.cpp10
-rw-r--r--src/devices/bus/scsi/scsihd.cpp8
-rw-r--r--src/devices/bus/scsi/scsihle.h6
-rw-r--r--src/devices/bus/scv/slot.h16
-rw-r--r--src/devices/bus/sega8/ccatch.cpp7
-rw-r--r--src/devices/bus/sega8/mgear.cpp9
-rw-r--r--src/devices/bus/sega8/rom.cpp112
-rw-r--r--src/devices/bus/sega8/rom.h56
-rw-r--r--src/devices/bus/sega8/sega8_slot.cpp91
-rw-r--r--src/devices/bus/sega8/sega8_slot.h262
-rw-r--r--src/devices/bus/sg1000_exp/fm_unit.cpp13
-rw-r--r--src/devices/bus/sg1000_exp/kblink.cpp179
-rw-r--r--src/devices/bus/sg1000_exp/kblink.h82
-rw-r--r--src/devices/bus/sg1000_exp/sg1000exp.h26
-rw-r--r--src/devices/bus/sg1000_exp/sk1100.cpp45
-rw-r--r--src/devices/bus/sg1000_exp/sk1100.h3
-rw-r--r--src/devices/bus/sg1000_exp/sk1100prn.cpp125
-rw-r--r--src/devices/bus/sg1000_exp/sk1100prn.h88
-rw-r--r--src/devices/bus/sms_ctrl/multitap.cpp21
-rw-r--r--src/devices/bus/sms_ctrl/rfu.cpp11
-rw-r--r--src/devices/bus/sms_ctrl/smsctrl.h34
-rw-r--r--src/devices/bus/sms_exp/gender.cpp7
-rw-r--r--src/devices/bus/sms_exp/smsexp.h23
-rw-r--r--src/devices/bus/snes/bsx.cpp38
-rw-r--r--src/devices/bus/snes/bsx.h32
-rw-r--r--src/devices/bus/snes/event.cpp23
-rw-r--r--src/devices/bus/snes/event.h12
-rw-r--r--src/devices/bus/snes/rom.cpp54
-rw-r--r--src/devices/bus/snes/rom.h54
-rw-r--r--src/devices/bus/snes/rom21.cpp8
-rw-r--r--src/devices/bus/snes/rom21.h8
-rw-r--r--src/devices/bus/snes/sa1.cpp87
-rw-r--r--src/devices/bus/snes/sa1.h32
-rw-r--r--src/devices/bus/snes/sdd1.cpp14
-rw-r--r--src/devices/bus/snes/sdd1.h12
-rw-r--r--src/devices/bus/snes/sfx.cpp26
-rw-r--r--src/devices/bus/snes/sfx.h26
-rw-r--r--src/devices/bus/snes/sgb.cpp44
-rw-r--r--src/devices/bus/snes/sgb.h33
-rw-r--r--src/devices/bus/snes/snes_slot.cpp51
-rw-r--r--src/devices/bus/snes/snes_slot.h36
-rw-r--r--src/devices/bus/snes/spc7110.cpp12
-rw-r--r--src/devices/bus/snes/spc7110.h20
-rw-r--r--src/devices/bus/snes/sufami.cpp26
-rw-r--r--src/devices/bus/snes/sufami.h10
-rw-r--r--src/devices/bus/snes/upd.cpp170
-rw-r--r--src/devices/bus/snes/upd.h30
-rw-r--r--src/devices/bus/snes_ctrl/ctrl.h22
-rw-r--r--src/devices/bus/snes_ctrl/miracle.cpp10
-rw-r--r--src/devices/bus/snes_ctrl/multitap.cpp13
-rw-r--r--src/devices/bus/spc1000/exp.h9
-rw-r--r--src/devices/bus/spectrum/beta.cpp256
-rw-r--r--src/devices/bus/spectrum/beta.h64
-rw-r--r--src/devices/bus/spectrum/exp.cpp63
-rw-r--r--src/devices/bus/spectrum/exp.h22
-rw-r--r--src/devices/bus/spectrum/fuller.cpp65
-rw-r--r--src/devices/bus/spectrum/fuller.h11
-rw-r--r--src/devices/bus/spectrum/intf1.cpp47
-rw-r--r--src/devices/bus/spectrum/intf1.h8
-rw-r--r--src/devices/bus/spectrum/intf2.cpp19
-rw-r--r--src/devices/bus/spectrum/intf2.h4
-rw-r--r--src/devices/bus/spectrum/kempjoy.cpp20
-rw-r--r--src/devices/bus/spectrum/kempjoy.h5
-rw-r--r--src/devices/bus/spectrum/melodik.cpp55
-rw-r--r--src/devices/bus/spectrum/melodik.h9
-rw-r--r--src/devices/bus/spectrum/mface.cpp321
-rw-r--r--src/devices/bus/spectrum/mface.h100
-rw-r--r--src/devices/bus/spectrum/mikroplus.cpp22
-rw-r--r--src/devices/bus/spectrum/mikroplus.h6
-rw-r--r--src/devices/bus/spectrum/opus.cpp289
-rw-r--r--src/devices/bus/spectrum/opus.h75
-rw-r--r--src/devices/bus/spectrum/plus2test.cpp2
-rw-r--r--src/devices/bus/spectrum/plus2test.h2
-rw-r--r--src/devices/bus/spectrum/protek.cpp17
-rw-r--r--src/devices/bus/spectrum/protek.h2
-rw-r--r--src/devices/bus/spectrum/specdrum.cpp73
-rw-r--r--src/devices/bus/spectrum/specdrum.h51
-rw-r--r--src/devices/bus/spectrum/uslot.cpp38
-rw-r--r--src/devices/bus/spectrum/uslot.h8
-rw-r--r--src/devices/bus/spectrum/usource.cpp13
-rw-r--r--src/devices/bus/spectrum/usource.h3
-rw-r--r--src/devices/bus/spectrum/uspeech.cpp40
-rw-r--r--src/devices/bus/spectrum/uspeech.h6
-rw-r--r--src/devices/bus/ss50/interface.cpp10
-rw-r--r--src/devices/bus/ss50/interface.h37
-rw-r--r--src/devices/bus/ss50/mpc.cpp23
-rw-r--r--src/devices/bus/ss50/mps.cpp12
-rw-r--r--src/devices/bus/sunkbd/hlekbd.cpp8
-rw-r--r--src/devices/bus/svi3x8/expander/expander.cpp16
-rw-r--r--src/devices/bus/svi3x8/expander/expander.h74
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.cpp35
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.h8
-rw-r--r--src/devices/bus/svi3x8/expander/sv602.cpp23
-rw-r--r--src/devices/bus/svi3x8/expander/sv602.h8
-rw-r--r--src/devices/bus/svi3x8/expander/sv603.cpp119
-rw-r--r--src/devices/bus/svi3x8/expander/sv603.h17
-rw-r--r--src/devices/bus/svi3x8/slot/slot.cpp35
-rw-r--r--src/devices/bus/svi3x8/slot/slot.h55
-rw-r--r--src/devices/bus/svi3x8/slot/sv801.cpp8
-rw-r--r--src/devices/bus/svi3x8/slot/sv801.h6
-rw-r--r--src/devices/bus/svi3x8/slot/sv802.cpp16
-rw-r--r--src/devices/bus/svi3x8/slot/sv802.h4
-rw-r--r--src/devices/bus/svi3x8/slot/sv803.cpp4
-rw-r--r--src/devices/bus/svi3x8/slot/sv803.h4
-rw-r--r--src/devices/bus/svi3x8/slot/sv805.cpp8
-rw-r--r--src/devices/bus/svi3x8/slot/sv805.h4
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.cpp14
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.h8
-rw-r--r--src/devices/bus/svi3x8/slot/sv807.cpp4
-rw-r--r--src/devices/bus/svi3x8/slot/sv807.h4
-rw-r--r--src/devices/bus/ti8x/bitsocket.cpp7
-rw-r--r--src/devices/bus/ti8x/teeconn.cpp19
-rw-r--r--src/devices/bus/ti8x/ti8x.h11
-rw-r--r--src/devices/bus/ti8x/tispeaker.cpp19
-rw-r--r--src/devices/bus/ti99/gromport/cartridges.cpp56
-rw-r--r--src/devices/bus/ti99/gromport/cartridges.h36
-rw-r--r--src/devices/bus/ti99/gromport/gkracker.cpp12
-rw-r--r--src/devices/bus/ti99/gromport/gkracker.h4
-rw-r--r--src/devices/bus/ti99/gromport/gromport.cpp12
-rw-r--r--src/devices/bus/ti99/gromport/gromport.h9
-rw-r--r--src/devices/bus/ti99/gromport/multiconn.cpp16
-rw-r--r--src/devices/bus/ti99/gromport/multiconn.h4
-rw-r--r--src/devices/bus/ti99/gromport/singleconn.cpp12
-rw-r--r--src/devices/bus/ti99/gromport/singleconn.h4
-rw-r--r--src/devices/bus/ti99/internal/992board.cpp10
-rw-r--r--src/devices/bus/ti99/internal/992board.h4
-rw-r--r--src/devices/bus/ti99/internal/998board.cpp78
-rw-r--r--src/devices/bus/ti99/internal/998board.h29
-rw-r--r--src/devices/bus/ti99/internal/datamux.cpp75
-rw-r--r--src/devices/bus/ti99/internal/datamux.h19
-rw-r--r--src/devices/bus/ti99/internal/genboard.cpp48
-rw-r--r--src/devices/bus/ti99/internal/genboard.h14
-rw-r--r--src/devices/bus/ti99/internal/ioport.cpp14
-rw-r--r--src/devices/bus/ti99/internal/ioport.h20
-rw-r--r--src/devices/bus/ti99/joyport/handset.cpp1
-rw-r--r--src/devices/bus/ti99/peb/bwg.cpp12
-rw-r--r--src/devices/bus/ti99/peb/bwg.h4
-rw-r--r--src/devices/bus/ti99/peb/evpc.cpp11
-rw-r--r--src/devices/bus/ti99/peb/evpc.h4
-rw-r--r--src/devices/bus/ti99/peb/hfdc.cpp22
-rw-r--r--src/devices/bus/ti99/peb/hfdc.h10
-rw-r--r--src/devices/bus/ti99/peb/horizon.cpp4
-rw-r--r--src/devices/bus/ti99/peb/horizon.h4
-rw-r--r--src/devices/bus/ti99/peb/hsgpl.cpp44
-rw-r--r--src/devices/bus/ti99/peb/hsgpl.h14
-rw-r--r--src/devices/bus/ti99/peb/memex.cpp7
-rw-r--r--src/devices/bus/ti99/peb/memex.h4
-rw-r--r--src/devices/bus/ti99/peb/myarcmem.cpp4
-rw-r--r--src/devices/bus/ti99/peb/myarcmem.h4
-rw-r--r--src/devices/bus/ti99/peb/pcode.cpp8
-rw-r--r--src/devices/bus/ti99/peb/pcode.h6
-rw-r--r--src/devices/bus/ti99/peb/peribox.cpp28
-rw-r--r--src/devices/bus/ti99/peb/peribox.h12
-rw-r--r--src/devices/bus/ti99/peb/samsmem.cpp4
-rw-r--r--src/devices/bus/ti99/peb/samsmem.h4
-rw-r--r--src/devices/bus/ti99/peb/spchsyn.cpp13
-rw-r--r--src/devices/bus/ti99/peb/spchsyn.h5
-rw-r--r--src/devices/bus/ti99/peb/ti_32kmem.cpp7
-rw-r--r--src/devices/bus/ti99/peb/ti_32kmem.h4
-rw-r--r--src/devices/bus/ti99/peb/ti_fdc.cpp8
-rw-r--r--src/devices/bus/ti99/peb/ti_fdc.h4
-rw-r--r--src/devices/bus/ti99/peb/ti_rs232.cpp27
-rw-r--r--src/devices/bus/ti99/peb/ti_rs232.h12
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.cpp26
-rw-r--r--src/devices/bus/ti99/peb/tn_ide.h4
-rw-r--r--src/devices/bus/ti99/peb/tn_usbsm.cpp18
-rw-r--r--src/devices/bus/ti99/peb/tn_usbsm.h4
-rw-r--r--src/devices/bus/ti99/ti99defs.h8
-rw-r--r--src/devices/bus/ti99x/990_dk.cpp17
-rw-r--r--src/devices/bus/ti99x/990_hd.cpp12
-rw-r--r--src/devices/bus/ti99x/990_hd.h3
-rw-r--r--src/devices/bus/ti99x/990_tap.cpp22
-rw-r--r--src/devices/bus/ti99x/990_tap.h3
-rw-r--r--src/devices/bus/tiki100/8088.cpp17
-rw-r--r--src/devices/bus/tiki100/8088.h4
-rw-r--r--src/devices/bus/tiki100/exp.cpp16
-rw-r--r--src/devices/bus/tiki100/exp.h72
-rw-r--r--src/devices/bus/tiki100/hdc.cpp8
-rw-r--r--src/devices/bus/tiki100/hdc.h4
-rw-r--r--src/devices/bus/tmc600/euro.h23
-rw-r--r--src/devices/bus/tvc/tvc.h26
-rw-r--r--src/devices/bus/uts_kbd/400kbd.cpp275
-rw-r--r--src/devices/bus/uts_kbd/400kbd.h44
-rw-r--r--src/devices/bus/uts_kbd/extw.cpp290
-rw-r--r--src/devices/bus/uts_kbd/extw.h47
-rw-r--r--src/devices/bus/uts_kbd/uts_kbd.cpp89
-rw-r--r--src/devices/bus/uts_kbd/uts_kbd.h101
-rw-r--r--src/devices/bus/vboy/slot.h15
-rw-r--r--src/devices/bus/vc4000/rom.cpp12
-rw-r--r--src/devices/bus/vc4000/rom.h12
-rw-r--r--src/devices/bus/vc4000/slot.cpp16
-rw-r--r--src/devices/bus/vc4000/slot.h16
-rw-r--r--src/devices/bus/vcs/dpc.cpp7
-rw-r--r--src/devices/bus/vcs/harmony_melody.cpp9
-rw-r--r--src/devices/bus/vcs/scharger.cpp18
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h17
-rw-r--r--src/devices/bus/vectrex/slot.h4
-rw-r--r--src/devices/bus/vic10/exp.cpp8
-rw-r--r--src/devices/bus/vic10/exp.h8
-rw-r--r--src/devices/bus/vic10/multimax.cpp4
-rw-r--r--src/devices/bus/vic10/multimax.h4
-rw-r--r--src/devices/bus/vic10/std.cpp4
-rw-r--r--src/devices/bus/vic10/std.h4
-rw-r--r--src/devices/bus/vic20/exp.cpp8
-rw-r--r--src/devices/bus/vic20/exp.h8
-rw-r--r--src/devices/bus/vic20/fe3.cpp38
-rw-r--r--src/devices/bus/vic20/fe3.h4
-rw-r--r--src/devices/bus/vic20/megacart.cpp11
-rw-r--r--src/devices/bus/vic20/megacart.h4
-rw-r--r--src/devices/bus/vic20/speakeasy.cpp16
-rw-r--r--src/devices/bus/vic20/speakeasy.h4
-rw-r--r--src/devices/bus/vic20/std.cpp2
-rw-r--r--src/devices/bus/vic20/std.h2
-rw-r--r--src/devices/bus/vic20/vic1010.cpp8
-rw-r--r--src/devices/bus/vic20/vic1010.h4
-rw-r--r--src/devices/bus/vic20/vic1110.cpp4
-rw-r--r--src/devices/bus/vic20/vic1110.h4
-rw-r--r--src/devices/bus/vic20/vic1111.cpp4
-rw-r--r--src/devices/bus/vic20/vic1111.h4
-rw-r--r--src/devices/bus/vic20/vic1112.cpp4
-rw-r--r--src/devices/bus/vic20/vic1112.h4
-rw-r--r--src/devices/bus/vic20/vic1210.cpp4
-rw-r--r--src/devices/bus/vic20/vic1210.h4
-rw-r--r--src/devices/bus/vic20/videopak.cpp29
-rw-r--r--src/devices/bus/vic20/videopak.h4
-rw-r--r--src/devices/bus/vidbrain/exp.cpp8
-rw-r--r--src/devices/bus/vidbrain/exp.h52
-rw-r--r--src/devices/bus/vidbrain/money_minder.cpp4
-rw-r--r--src/devices/bus/vidbrain/money_minder.h4
-rw-r--r--src/devices/bus/vidbrain/std.cpp2
-rw-r--r--src/devices/bus/vidbrain/std.h2
-rw-r--r--src/devices/bus/vidbrain/timeshare.cpp4
-rw-r--r--src/devices/bus/vidbrain/timeshare.h4
-rw-r--r--src/devices/bus/vip/byteio.h28
-rw-r--r--src/devices/bus/vip/exp.cpp26
-rw-r--r--src/devices/bus/vip/exp.h62
-rw-r--r--src/devices/bus/vip/vp550.cpp20
-rw-r--r--src/devices/bus/vip/vp550.h10
-rw-r--r--src/devices/bus/vip/vp570.cpp4
-rw-r--r--src/devices/bus/vip/vp570.h4
-rw-r--r--src/devices/bus/vip/vp575.cpp82
-rw-r--r--src/devices/bus/vip/vp575.h12
-rw-r--r--src/devices/bus/vip/vp585.cpp2
-rw-r--r--src/devices/bus/vip/vp585.h2
-rw-r--r--src/devices/bus/vip/vp590.cpp15
-rw-r--r--src/devices/bus/vip/vp590.h6
-rw-r--r--src/devices/bus/vip/vp595.cpp4
-rw-r--r--src/devices/bus/vip/vp595.h2
-rw-r--r--src/devices/bus/vip/vp620.cpp2
-rw-r--r--src/devices/bus/vip/vp700.cpp2
-rw-r--r--src/devices/bus/vip/vp700.h2
-rw-r--r--src/devices/bus/vme/vme.cpp30
-rw-r--r--src/devices/bus/vme/vme.h43
-rw-r--r--src/devices/bus/vme/vme_fccpu20.cpp64
-rw-r--r--src/devices/bus/vme/vme_fccpu20.h3
-rw-r--r--src/devices/bus/vme/vme_hcpu30.h2
-rw-r--r--src/devices/bus/vme/vme_mvme350.cpp11
-rw-r--r--src/devices/bus/vme/vme_mzr8105.cpp12
-rw-r--r--src/devices/bus/vme/vme_mzr8300.cpp4
-rw-r--r--src/devices/bus/vsmile/pad.cpp275
-rw-r--r--src/devices/bus/vsmile/pad.h78
-rw-r--r--src/devices/bus/vsmile/rom.cpp86
-rw-r--r--src/devices/bus/vsmile/rom.h59
-rw-r--r--src/devices/bus/vsmile/vsmile_ctrl.cpp315
-rw-r--r--src/devices/bus/vsmile/vsmile_ctrl.h153
-rw-r--r--src/devices/bus/vsmile/vsmile_slot.cpp254
-rw-r--r--src/devices/bus/vsmile/vsmile_slot.h128
-rw-r--r--src/devices/bus/vtech/ioexp/ioexp.cpp11
-rw-r--r--src/devices/bus/vtech/ioexp/ioexp.h4
-rw-r--r--src/devices/bus/vtech/ioexp/printer.cpp13
-rw-r--r--src/devices/bus/vtech/memexp/floppy.cpp3
-rw-r--r--src/devices/bus/vtech/memexp/memexp.cpp44
-rw-r--r--src/devices/bus/vtech/memexp/memexp.h9
-rw-r--r--src/devices/bus/wangpc/emb.cpp8
-rw-r--r--src/devices/bus/wangpc/emb.h8
-rw-r--r--src/devices/bus/wangpc/lic.cpp14
-rw-r--r--src/devices/bus/wangpc/lic.h8
-rw-r--r--src/devices/bus/wangpc/lvc.cpp33
-rw-r--r--src/devices/bus/wangpc/lvc.h8
-rw-r--r--src/devices/bus/wangpc/mcc.cpp14
-rw-r--r--src/devices/bus/wangpc/mcc.h4
-rw-r--r--src/devices/bus/wangpc/mvc.cpp31
-rw-r--r--src/devices/bus/wangpc/mvc.h8
-rw-r--r--src/devices/bus/wangpc/rtc.cpp8
-rw-r--r--src/devices/bus/wangpc/rtc.h8
-rw-r--r--src/devices/bus/wangpc/tig.cpp47
-rw-r--r--src/devices/bus/wangpc/tig.h8
-rw-r--r--src/devices/bus/wangpc/wangpc.cpp24
-rw-r--r--src/devices/bus/wangpc/wangpc.h117
-rw-r--r--src/devices/bus/wangpc/wdc.cpp30
-rw-r--r--src/devices/bus/wangpc/wdc.h12
-rw-r--r--src/devices/bus/wswan/rom.cpp26
-rw-r--r--src/devices/bus/wswan/rom.h20
-rw-r--r--src/devices/bus/wswan/slot.cpp28
-rw-r--r--src/devices/bus/wswan/slot.h28
-rw-r--r--src/devices/bus/x68k/x68k_midi.cpp18
-rw-r--r--src/devices/bus/x68k/x68k_neptunex.cpp17
-rw-r--r--src/devices/bus/x68k/x68k_scsiext.cpp20
-rw-r--r--src/devices/bus/x68k/x68kexp.cpp1
-rw-r--r--src/devices/bus/x68k/x68kexp.h40
-rw-r--r--src/devices/bus/z88/flash.cpp4
-rw-r--r--src/devices/bus/z88/z88.h19
1315 files changed, 10947 insertions, 22457 deletions
diff --git a/src/devices/bus/a1bus/a1bus.cpp b/src/devices/bus/a1bus/a1bus.cpp
index 1dee51c40b2..b9370c084d6 100644
--- a/src/devices/bus/a1bus/a1bus.cpp
+++ b/src/devices/bus/a1bus/a1bus.cpp
@@ -82,7 +82,7 @@ a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, devic
a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_space(*this, finder_base::DUMMY_TAG, -1)
+ , m_maincpu(*this, finder_base::DUMMY_TAG)
, m_out_irq_cb(*this)
, m_out_nmi_cb(*this)
, m_device(nullptr)
@@ -136,13 +136,13 @@ void a1bus_device::set_nmi_line(int state)
void a1bus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
{
- m_space->install_readwrite_handler(start, end, rhandler, whandler);
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler);
}
void a1bus_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
{
// printf("install_bank: %s @ %x->%x\n", tag, start, end);
- m_space->install_readwrite_bank(start, end, tag);
+ m_maincpu->space(AS_PROGRAM).install_readwrite_bank(start, end, tag);
machine().root_device().membank(siblingtag(tag).c_str())->set_base(data);
}
diff --git a/src/devices/bus/a1bus/a1bus.h b/src/devices/bus/a1bus/a1bus.h
index 7970f150719..484cba5b70f 100644
--- a/src/devices/bus/a1bus/a1bus.h
+++ b/src/devices/bus/a1bus/a1bus.h
@@ -13,6 +13,19 @@
//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_A1BUS_CPU(_cputag) \
+ downcast<a1bus_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_A1BUS_OUT_IRQ_CB(_devcb) \
+ downcast<a1bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+
+#define MCFG_A1BUS_OUT_NMI_CB(_devcb) \
+ downcast<a1bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -59,9 +72,9 @@ public:
a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward<T>(tag), spacenum); }
- auto out_irq_callback() { return m_out_irq_cb.bind(); }
- auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
+ template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
+ template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
void add_a1bus_card(device_a1bus_card_interface *card);
device_a1bus_card_interface *get_a1bus_card();
@@ -84,7 +97,7 @@ protected:
virtual void device_reset() override;
// internal state
- required_address_space m_space;
+ required_device<cpu_device> m_maincpu;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp
index 13140382f48..5605e156304 100644
--- a/src/devices/bus/a1bus/a1cassette.cpp
+++ b/src/devices/bus/a1bus/a1cassette.cpp
@@ -36,12 +36,11 @@ ROM_END
/* sound output */
-void a1bus_cassette_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_cassette);
- m_cassette->set_default_state(CASSETTE_STOPPED);
- m_cassette->set_interface("apple1_cass");
-}
+MACHINE_CONFIG_START(a1bus_cassette_device::device_add_mconfig)
+ MCFG_CASSETTE_ADD("cassette")
+ MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
+ MCFG_CASSETTE_INTERFACE("apple1_cass")
+MACHINE_CONFIG_END
const tiny_rom_entry *a1bus_cassette_device::device_rom_region() const
{
diff --git a/src/devices/bus/a2bus/a2alfam2.cpp b/src/devices/bus/a2bus/a2alfam2.cpp
index e97722708da..6817176c202 100644
--- a/src/devices/bus/a2bus/a2alfam2.cpp
+++ b/src/devices/bus/a2bus/a2alfam2.cpp
@@ -39,39 +39,37 @@ DEFINE_DEVICE_TYPE(A2BUS_AESMS, a2bus_aesms_device, "a2aesms", "Applied Engin
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_sn76489_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_sn76489_device::device_add_mconfig)
SPEAKER(config, "alf_l").front_left();
SPEAKER(config, "alf_r").front_right();
- SN76489(config, m_sn1, 1020484);
- m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- SN76489(config, m_sn2, 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);
- m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50);
-}
+ MCFG_DEVICE_ADD(SN1_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_DEVICE_ADD(SN2_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+ MCFG_DEVICE_ADD(SN3_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+MACHINE_CONFIG_END
-void a2bus_aesms_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_aesms_device::device_add_mconfig)
SPEAKER(config, "alf_l").front_left();
SPEAKER(config, "alf_r").front_right();
- SN76489(config, m_sn1, 1020484);
- m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50);
+ MCFG_DEVICE_ADD(SN1_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
- SN76489(config, m_sn2, 1020484);
- m_sn2->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- m_sn2->add_route(ALL_OUTPUTS, "alf_r", 0.50);
+ MCFG_DEVICE_ADD(SN2_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
- SN76489(config, m_sn3, 1020484);
- m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50);
+ MCFG_DEVICE_ADD(SN3_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
- SN76489(config, m_sn4, 1020484);
- m_sn4->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- m_sn4->add_route(ALL_OUTPUTS, "alf_r", 0.50);
-}
+ MCFG_DEVICE_ADD(SN4_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2arcadebd.cpp b/src/devices/bus/a2bus/a2arcadebd.cpp
index 169971ea3e5..4bdd0a6911b 100644
--- a/src/devices/bus/a2bus/a2arcadebd.cpp
+++ b/src/devices/bus/a2bus/a2arcadebd.cpp
@@ -97,7 +97,7 @@ uint8_t a2bus_arcboard_device::read_c0nx(uint8_t offset)
return m_tms->register_read();
case 6:
- return m_ay->data_r();
+ return m_ay->read_data();
}
return 0xff;
@@ -118,11 +118,11 @@ void a2bus_arcboard_device::write_c0nx(uint8_t offset, uint8_t data)
break;
case 5:
- m_ay->address_w(data);
+ m_ay->write_address(data);
break;
case 6:
- m_ay->data_w(data);
+ m_ay->write_data(data);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index 7adcaf368a7..84df6f73b35 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -145,11 +145,8 @@ a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, devic
a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_maincpu_space(*this, finder_base::DUMMY_TAG, -1)
- , m_out_irq_cb(*this)
- , m_out_nmi_cb(*this)
- , m_out_inh_cb(*this)
- , m_out_dma_cb(*this)
+ , m_maincpu(*this, finder_base::DUMMY_TAG), m_maincpu_space(nullptr)
+ , m_out_irq_cb(*this) , m_out_nmi_cb(*this), m_out_inh_cb(*this)
, m_slot_irq_mask(0), m_slot_nmi_mask(0)
{
}
@@ -160,11 +157,12 @@ a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, cons
void a2bus_device::device_resolve_objects()
{
+ m_maincpu_space = &m_maincpu->space(AS_PROGRAM);
+
// resolve callbacks
m_out_irq_cb.resolve_safe();
m_out_nmi_cb.resolve_safe();
m_out_inh_cb.resolve_safe();
- m_out_dma_cb.resolve_safe();
}
void a2bus_device::device_start()
@@ -241,17 +239,27 @@ void a2bus_device::set_nmi_line(int state, int slot)
}
}
-void a2bus_device::set_dma_line(int state)
+void a2bus_device::set_maincpu_halt(int state)
{
- m_out_dma_cb(state);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state);
+}
+
+uint8_t a2bus_device::dma_r(address_space &space, uint16_t offset)
+{
+ return m_maincpu_space->read_byte(offset);
+}
+
+void a2bus_device::dma_w(address_space &space, uint16_t offset, uint8_t data)
+{
+ m_maincpu_space->write_byte(offset, data);
}
-uint8_t a2bus_device::dma_r(uint16_t offset)
+uint8_t a2bus_device::dma_nospace_r(uint16_t offset)
{
return m_maincpu_space->read_byte(offset);
}
-void a2bus_device::dma_w(uint16_t offset, uint8_t data)
+void a2bus_device::dma_nospace_w(uint16_t offset, uint8_t data)
{
m_maincpu_space->write_byte(offset, data);
}
diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h
index 502ff72e854..862aeca3803 100644
--- a/src/devices/bus/a2bus/a2bus.h
+++ b/src/devices/bus/a2bus/a2bus.h
@@ -25,6 +25,22 @@
#define INH_READ 0x01
#define INH_WRITE 0x02
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_A2BUS_CPU(_cputag) \
+ downcast<a2bus_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_A2BUS_OUT_IRQ_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+
+#define MCFG_A2BUS_OUT_NMI_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+
+#define MCFG_A2BUS_OUT_INH_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_inh_callback(DEVCB_##_devcb);
+
// 7M = XTAL(14'318'181) / 2 or XTAL(28'636'363) / 4 (for IIgs)
static constexpr uint32_t A2BUS_7M_CLOCK = 7159090;
@@ -83,11 +99,15 @@ public:
a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_maincpu_space.set_tag(std::forward<T>(tag), spacenum); }
+ template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
+ template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_inh_callback(Object &&cb) { return m_out_inh_cb.set_callback(std::forward<Object>(cb)); }
+
+ // devcb3
auto irq_w() { return m_out_irq_cb.bind(); }
auto nmi_w() { return m_out_nmi_cb.bind(); }
auto inh_w() { return m_out_inh_cb.bind(); }
- auto dma_w() { return m_out_dma_cb.bind(); }
void add_a2bus_card(int slot, device_a2bus_card_interface *card);
device_a2bus_card_interface *get_a2bus_card(int slot);
@@ -96,10 +116,12 @@ public:
void set_irq_line(int state, int slot);
void set_nmi_line(int state, int slot);
- void set_dma_line(int state);
+ void set_maincpu_halt(int state);
void recalc_inh(int slot);
- uint8_t dma_r(uint16_t offset);
- void dma_w(uint16_t offset, uint8_t data);
+ uint8_t dma_r(address_space &space, uint16_t offset);
+ void dma_w(address_space &space, uint16_t offset, uint8_t data);
+ uint8_t dma_nospace_r(uint16_t offset);
+ void dma_nospace_w(uint16_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( irq_w );
DECLARE_WRITE_LINE_MEMBER( nmi_w );
@@ -113,12 +135,12 @@ protected:
virtual void device_reset() override;
// internal state
- required_address_space m_maincpu_space;
+ required_device<cpu_device> m_maincpu;
+ address_space *m_maincpu_space;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
devcb_write8 m_out_inh_cb;
- devcb_write_line m_out_dma_cb;
device_a2bus_card_interface *m_device_list[8];
@@ -159,8 +181,14 @@ public:
void set_a2bus(a2bus_device *a2bus, const char *slottag) { m_a2bus = a2bus; m_a2bus_slottag = slottag; }
template <typename T> void set_onboard(T &&a2bus) { m_a2bus_finder.set_tag(std::forward<T>(a2bus)); m_a2bus_slottag = device().tag(); }
- uint8_t slot_dma_read(uint16_t offset) { return m_a2bus->dma_r(offset); }
- void slot_dma_write(uint16_t offset, uint8_t data) { m_a2bus->dma_w(offset, data); }
+ // pass through the original address space if any for debugger protection
+ // when debugging e.g. coprocessor cards (Z80 SoftCard etc).
+ uint8_t slot_dma_read(address_space &space, uint16_t offset) { return m_a2bus->dma_r(space, offset); }
+ void slot_dma_write(address_space &space, uint16_t offset, uint8_t data) { m_a2bus->dma_w(space, offset, data); }
+
+ // these versions forego that protection for when the DMA isn't coming from a debuggable CPU device
+ uint8_t slot_dma_read_no_space(uint16_t offset) { return m_a2bus->dma_nospace_r(offset); }
+ void slot_dma_write_no_space(uint16_t offset, uint8_t data) { m_a2bus->dma_nospace_w(offset, data); }
protected:
uint32_t get_slotromspace() { return 0xc000 | (m_slot<<8); } // return Cn00 address for this slot
@@ -171,8 +199,7 @@ protected:
void raise_slot_nmi() { m_a2bus->set_nmi_line(ASSERT_LINE, m_slot); }
void lower_slot_nmi() { m_a2bus->set_nmi_line(CLEAR_LINE, m_slot); }
void recalc_slot_inh() { m_a2bus->recalc_inh(m_slot); }
- void raise_slot_dma() { m_a2bus->set_dma_line(ASSERT_LINE); }
- void lower_slot_dma() { m_a2bus->set_dma_line(CLEAR_LINE); }
+ void set_maincpu_halt(int state) { m_a2bus->set_maincpu_halt(state); }
device_a2bus_card_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp
index 41c5a1603f6..4eb5c7d2d98 100644
--- a/src/devices/bus/a2bus/a2cffa.cpp
+++ b/src/devices/bus/a2bus/a2cffa.cpp
@@ -56,7 +56,7 @@ void a2bus_cffa2000_device::device_add_mconfig(machine_config &config)
ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, false);
// not yet, the core explodes
-// SOFTWARE_LIST(config, "hdd_list").set_original("apple2gs_hdd");
+// MCFG_SOFTWARE_LIST_ADD("hdd_list", "apple2gs_hdd")
}
//-------------------------------------------------
diff --git a/src/devices/bus/a2bus/a2corvus.cpp b/src/devices/bus/a2bus/a2corvus.cpp
index 3b0af093659..251485d3f28 100644
--- a/src/devices/bus/a2bus/a2corvus.cpp
+++ b/src/devices/bus/a2bus/a2corvus.cpp
@@ -71,14 +71,17 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_corvus_device::device_add_mconfig(machine_config &config)
-{
- CORVUS_HDC(config, m_corvushd, 0);
- HARDDISK(config, "harddisk1", "corvus_hdd");
- HARDDISK(config, "harddisk2", "corvus_hdd");
- HARDDISK(config, "harddisk3", "corvus_hdd");
- HARDDISK(config, "harddisk4", "corvus_hdd");
-}
+MACHINE_CONFIG_START(a2bus_corvus_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(CORVUS_HD_TAG, CORVUS_HDC, 0)
+ MCFG_HARDDISK_ADD("harddisk1")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk2")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk3")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk4")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2diskii.cpp b/src/devices/bus/a2bus/a2diskii.cpp
index 20aff173549..9673abbb1da 100644
--- a/src/devices/bus/a2bus/a2diskii.cpp
+++ b/src/devices/bus/a2bus/a2diskii.cpp
@@ -61,19 +61,15 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_floppy_device::device_add_mconfig(machine_config &config)
-{
- APPLEFDC(config, m_fdc, &fdc_interface);
- FLOPPY_APPLE(config, FLOPPY_0, &floppy_interface, 15, 16);
- FLOPPY_APPLE(config, FLOPPY_1, &floppy_interface, 15, 16);
-}
-
-void a2bus_iwmflop_device::device_add_mconfig(machine_config &config)
-{
- IWM(config, m_fdc, &fdc_interface);
- FLOPPY_APPLE(config, FLOPPY_0, &floppy_interface, 15, 16);
- FLOPPY_APPLE(config, FLOPPY_1, &floppy_interface, 15, 16);
-}
+MACHINE_CONFIG_START(a2bus_floppy_device::device_add_mconfig)
+ MCFG_APPLEFDC_ADD(FDC_TAG, fdc_interface)
+ MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(a2bus_iwmflop_device::device_add_mconfig)
+ MCFG_IWM_ADD(FDC_TAG, fdc_interface)
+ MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2diskiing.cpp b/src/devices/bus/a2bus/a2diskiing.cpp
index 1846b447a04..28194db0421 100644
--- a/src/devices/bus/a2bus/a2diskiing.cpp
+++ b/src/devices/bus/a2bus/a2diskiing.cpp
@@ -54,19 +54,17 @@ FLOPPY_FORMATS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void diskiing_device::device_add_mconfig(machine_config &config)
-{
- DISKII_FDC(config, m_wozfdc, 1021800*2);
- for (auto &floppy : m_floppy)
- FLOPPY_CONNECTOR(config, floppy, a2_floppies, "525", diskiing_device::floppy_formats);
-}
-
-void a2bus_diskiing13_device::device_add_mconfig(machine_config &config)
-{
- DISKII_FDC(config, m_wozfdc, 1021800*2);
- for (auto &floppy : m_floppy)
- FLOPPY_CONNECTOR(config, floppy, a2_floppies, "525", a2bus_diskiing13_device::floppy_formats);
-}
+MACHINE_CONFIG_START(diskiing_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(WOZFDC_TAG, DISKII_FDC, 1021800*2)
+ MCFG_FLOPPY_DRIVE_ADD("0", a2_floppies, "525", diskiing_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("1", a2_floppies, "525", diskiing_device::floppy_formats)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(a2bus_diskiing13_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(WOZFDC_TAG, DISKII_FDC, 1021800*2)
+ MCFG_FLOPPY_DRIVE_ADD("0", a2_floppies, "525", a2bus_diskiing13_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("1", a2_floppies, "525", a2bus_diskiing13_device::floppy_formats)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -90,7 +88,8 @@ diskiing_device::diskiing_device(const machine_config &mconfig, device_type type
device_t(mconfig, type, tag, owner, clock),
device_a2bus_card_interface(mconfig, *this),
m_wozfdc(*this, WOZFDC_TAG),
- m_floppy(*this, "%u", 0U),
+ floppy0(*this, "0"),
+ floppy1(*this, "1"),
m_rom(nullptr)
{
}
@@ -116,7 +115,7 @@ void diskiing_device::device_start()
void diskiing_device::device_reset()
{
- m_wozfdc->set_floppies(m_floppy[0], m_floppy[1]);
+ m_wozfdc->set_floppies(floppy0, floppy1);
}
/*-------------------------------------------------
diff --git a/src/devices/bus/a2bus/a2diskiing.h b/src/devices/bus/a2bus/a2diskiing.h
index c30d49ebf0d..e6476cb29a7 100644
--- a/src/devices/bus/a2bus/a2diskiing.h
+++ b/src/devices/bus/a2bus/a2diskiing.h
@@ -42,10 +42,11 @@ protected:
virtual void write_c0nx(uint8_t offset, uint8_t data) override;
virtual uint8_t read_cnxx(uint8_t offset) override;
+private:
required_device<diskii_fdc_device> m_wozfdc;
- required_device_array<floppy_connector, 2> m_floppy;
+ required_device<floppy_connector> floppy0;
+ required_device<floppy_connector> floppy1;
-private:
const uint8_t *m_rom;
DECLARE_FLOPPY_FORMATS( floppy_formats );
diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp
index 9c1a0733405..5efd112a779 100644
--- a/src/devices/bus/a2bus/a2dx1.cpp
+++ b/src/devices/bus/a2bus/a2dx1.cpp
@@ -31,14 +31,14 @@ DEFINE_DEVICE_TYPE(A2BUS_DX1, a2bus_dx1_device, "a2dx1", "Decillonix DX-1")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_dx1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_dx1_device::device_add_mconfig)
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).add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
- voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
- vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
-}
+ MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
+ MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp
index 5fab40ba9ae..6885d528128 100644
--- a/src/devices/bus/a2bus/a2eauxslot.cpp
+++ b/src/devices/bus/a2bus/a2eauxslot.cpp
@@ -33,16 +33,20 @@ a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, co
a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, device_slot_interface(mconfig, *this)
- , m_a2eauxslot(*this, finder_base::DUMMY_TAG)
+ , m_a2eauxslot_tag(nullptr)
+ , m_a2eauxslot_slottag(nullptr)
{
}
-void a2eauxslot_slot_device::device_resolve_objects()
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void a2eauxslot_slot_device::device_start()
{
device_a2eauxslot_card_interface *dev = dynamic_cast<device_a2eauxslot_card_interface *>(get_card_device());
- if (dev)
- dev->set_a2eauxslot_device(m_a2eauxslot.target());
+ if (dev) dev->set_a2eauxslot_tag(m_a2eauxslot_tag, m_a2eauxslot_slottag);
}
//**************************************************************************
@@ -66,31 +70,34 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *
a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_space(*this, finder_base::DUMMY_TAG, -1)
+ , m_maincpu(nullptr)
, m_out_irq_cb(*this)
, m_out_nmi_cb(*this)
, m_device(nullptr)
+ , m_cputag(nullptr)
{
}
-
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
+// device_start - device-specific startup
//-------------------------------------------------
-void a2eauxslot_device::device_resolve_objects()
+void a2eauxslot_device::device_start()
{
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+
// resolve callbacks
m_out_irq_cb.resolve_safe();
m_out_nmi_cb.resolve_safe();
+
+ // clear slot
+ m_device = nullptr;
}
//-------------------------------------------------
-// device_start - device-specific startup
+// device_reset - device-specific reset
//-------------------------------------------------
-void a2eauxslot_device::device_start()
+void a2eauxslot_device::device_reset()
{
}
@@ -134,7 +141,7 @@ WRITE_LINE_MEMBER( a2eauxslot_device::nmi_w ) { m_out_nmi_cb(state); }
device_a2eauxslot_card_interface::device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
m_a2eauxslot(nullptr),
- m_slot(0), m_next(nullptr)
+ m_a2eauxslot_tag(nullptr), m_a2eauxslot_slottag(nullptr), m_slot(0), m_next(nullptr)
{
}
@@ -147,8 +154,8 @@ device_a2eauxslot_card_interface::~device_a2eauxslot_card_interface()
{
}
-void device_a2eauxslot_card_interface::set_a2eauxslot_device(a2eauxslot_device *a2eauxslot)
+void device_a2eauxslot_card_interface::set_a2eauxslot_device()
{
- m_a2eauxslot = a2eauxslot;
+ m_a2eauxslot = dynamic_cast<a2eauxslot_device *>(device().machine().device(m_a2eauxslot_tag));
m_a2eauxslot->add_a2eauxslot_card(this);
}
diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h
index 4351bc6112a..1da89b18d7a 100644
--- a/src/devices/bus/a2bus/a2eauxslot.h
+++ b/src/devices/bus/a2bus/a2eauxslot.h
@@ -15,6 +15,25 @@
#include "a2bus.h"
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_A2EAUXSLOT_CPU(_cputag) \
+ downcast<a2eauxslot_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_A2EAUXSLOT_OUT_IRQ_CB(_devcb) \
+ downcast<a2eauxslot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+
+#define MCFG_A2EAUXSLOT_OUT_NMI_CB(_devcb) \
+ downcast<a2eauxslot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+
+#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
+ downcast<a2eauxslot_slot_device &>(*device).set_a2eauxslot_slot(_nbtag, _tag);
+#define MCFG_A2EAUXSLOT_SLOT_REMOVE(_tag) \
+ MCFG_DEVICE_REMOVE(_tag)
//**************************************************************************
// TYPE DEFINITIONS
@@ -27,28 +46,19 @@ class a2eauxslot_slot_device : public device_t,
{
public:
// construction/destruction
- template <typename T, typename U>
- a2eauxslot_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slottag, U &&opts, char const *dflt)
- : a2eauxslot_slot_device(mconfig, tag, owner, 0)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- m_a2eauxslot.set_tag(std::forward<T>(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, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
- virtual void device_start() override { }
+ virtual void device_start() override;
+
+ // inline configuration
+ void set_a2eauxslot_slot(const char *tag, const char *slottag) { m_a2eauxslot_tag = tag; m_a2eauxslot_slottag = slottag; }
protected:
a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// configuration
- required_device<a2eauxslot_device> m_a2eauxslot;
+ const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
};
// device type definition
@@ -65,9 +75,9 @@ public:
a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward<T>(tag), spacenum); }
- auto out_irq_callback() { return m_out_irq_cb.bind(); }
- auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
+ void set_cputag(const char *tag) { m_cputag = tag; }
+ template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
void add_a2eauxslot_card(device_a2eauxslot_card_interface *card);
device_a2eauxslot_card_interface *get_a2eauxslot_card();
@@ -82,16 +92,17 @@ protected:
a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
virtual void device_start() override;
+ virtual void device_reset() override;
// internal state
- required_address_space m_space;
+ cpu_device *m_maincpu;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
device_a2eauxslot_card_interface *m_device;
+ const char *m_cputag;
};
@@ -110,24 +121,28 @@ public:
virtual uint8_t read_auxram(uint16_t offset) { printf("a2eauxslot: unhandled auxram read @ %04x\n", offset); return 0xff; }
virtual void write_auxram(uint16_t offset, uint8_t data) { printf("a2eauxslot: unhandled auxram write %02x @ %04x\n", data, offset); }
- virtual void write_c07x(uint8_t offset, uint8_t data) {}
+ virtual void write_c07x(address_space &space, uint8_t offset, uint8_t data) {}
virtual uint8_t *get_vram_ptr() = 0;
virtual uint8_t *get_auxbank_ptr() = 0;
virtual bool allow_dhr() { return true; }
device_a2eauxslot_card_interface *next() const { return m_next; }
- void set_a2eauxslot_device(a2eauxslot_device *a2eauxslot);
+ void set_a2eauxslot_device();
void raise_slot_irq() { m_a2eauxslot->set_irq_line(ASSERT_LINE); }
void lower_slot_irq() { m_a2eauxslot->set_irq_line(CLEAR_LINE); }
void raise_slot_nmi() { m_a2eauxslot->set_nmi_line(ASSERT_LINE); }
void lower_slot_nmi() { m_a2eauxslot->set_nmi_line(CLEAR_LINE); }
+ // inline configuration
+ void set_a2eauxslot_tag(const char *tag, const char *slottag) { m_a2eauxslot_tag = tag; m_a2eauxslot_slottag = slottag; }
+
protected:
device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device);
a2eauxslot_device *m_a2eauxslot;
+ const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
int m_slot;
device_a2eauxslot_card_interface *m_next;
};
diff --git a/src/devices/bus/a2bus/a2eext80col.cpp b/src/devices/bus/a2bus/a2eext80col.cpp
index 2ddb4a0b476..b98d31c0d5c 100644
--- a/src/devices/bus/a2bus/a2eext80col.cpp
+++ b/src/devices/bus/a2bus/a2eext80col.cpp
@@ -43,6 +43,7 @@ a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, de
void a2eaux_ext80col_device::device_start()
{
+ set_a2eauxslot_device();
memset(m_ram, 0, sizeof(m_ram));
save_item(NAME(m_ram));
}
diff --git a/src/devices/bus/a2bus/a2eramworks3.cpp b/src/devices/bus/a2bus/a2eramworks3.cpp
index 46ada4066a1..e82225cbd27 100644
--- a/src/devices/bus/a2bus/a2eramworks3.cpp
+++ b/src/devices/bus/a2bus/a2eramworks3.cpp
@@ -45,6 +45,7 @@ a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig,
void a2eaux_ramworks3_device::device_start()
{
+ set_a2eauxslot_device();
save_item(NAME(m_ram));
save_item(NAME(m_bank));
}
@@ -87,7 +88,7 @@ uint8_t *a2eaux_ramworks3_device::get_auxbank_ptr()
However, the software will recognize and correctly use a configuration in which
all of banks 00-7F are populated for a total of 8 megabytes. So that's what we do.
*/
-void a2eaux_ramworks3_device::write_c07x(uint8_t offset, uint8_t data)
+void a2eaux_ramworks3_device::write_c07x(address_space &space, uint8_t offset, uint8_t data)
{
// write to C073?
if (offset == 3)
diff --git a/src/devices/bus/a2bus/a2eramworks3.h b/src/devices/bus/a2bus/a2eramworks3.h
index d47d88c37d9..f2b327ebfab 100644
--- a/src/devices/bus/a2bus/a2eramworks3.h
+++ b/src/devices/bus/a2bus/a2eramworks3.h
@@ -36,7 +36,7 @@ protected:
virtual uint8_t *get_vram_ptr() override;
virtual uint8_t *get_auxbank_ptr() override;
virtual bool allow_dhr() override { return true; }
- virtual void write_c07x(uint8_t offset, uint8_t data) override;
+ virtual void write_c07x(address_space &space, uint8_t offset, uint8_t data) override;
private:
uint8_t m_ram[8*1024*1024];
diff --git a/src/devices/bus/a2bus/a2estd80col.cpp b/src/devices/bus/a2bus/a2estd80col.cpp
index 8eecf223c48..e5a9741e7a0 100644
--- a/src/devices/bus/a2bus/a2estd80col.cpp
+++ b/src/devices/bus/a2bus/a2estd80col.cpp
@@ -43,6 +43,7 @@ a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, de
void a2eaux_std80col_device::device_start()
{
+ set_a2eauxslot_device();
save_item(NAME(m_ram));
}
diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp
index ec4eea8080a..6be63715d88 100644
--- a/src/devices/bus/a2bus/a2hsscsi.cpp
+++ b/src/devices/bus/a2bus/a2hsscsi.cpp
@@ -57,6 +57,14 @@ DEFINE_DEVICE_TYPE(A2BUS_HSSCSI, a2bus_hsscsi_device, "a2hsscsi", "Apple II High
#define SCSI_BUS_TAG "scsibus"
#define SCSI_5380_TAG "scsibus:7:ncr5380"
+void a2bus_hsscsi_device::ncr5380(device_t *device)
+{
+ devcb_base *devcb;
+ (void)devcb;
+ MCFG_DEVICE_CLOCK(10000000)
+ MCFG_NCR5380N_DRQ_HANDLER(WRITELINE("^^", a2bus_hsscsi_device, drq_w))
+}
+
static void hsscsi_devices(device_slot_interface &device)
{
device.option_add("cdrom", NSCSI_CDROM);
@@ -77,21 +85,18 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_hsscsi_device::device_add_mconfig(machine_config &config)
-{
- NSCSI_BUS(config, m_scsibus);
- NSCSI_CONNECTOR(config, "scsibus:0", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:1", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:2", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:3", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:4", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:5", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:6", hsscsi_devices, "harddisk", false);
- NSCSI_CONNECTOR(config, "scsibus:7", hsscsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) {
- device->set_clock(10000000);
- downcast<ncr5380n_device &>(*device).drq_handler().set(*this, FUNC(a2bus_hsscsi_device::drq_w));
- });
-}
+MACHINE_CONFIG_START(a2bus_hsscsi_device::device_add_mconfig)
+ MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
+ MCFG_NSCSI_ADD("scsibus:0", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:6", hsscsi_devices, "harddisk", false)
+ MCFG_NSCSI_ADD("scsibus:7", hsscsi_devices, "ncr5380", true)
+ MCFG_SLOT_OPTION_MACHINE_CONFIG("ncr5380", ncr5380)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -163,7 +168,7 @@ uint8_t a2bus_hsscsi_device::read_c0nx(uint8_t offset)
case 6:
case 7:
// logerror("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(offset);
+ return m_ncr5380->read(machine().dummy_space(), offset);
case 0xc:
return 0x00; // indicate watchdog?
@@ -200,7 +205,7 @@ void a2bus_hsscsi_device::write_c0nx(uint8_t offset, uint8_t data)
case 6:
case 7:
// logerror("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(offset, data);
+ m_ncr5380->write(machine().dummy_space(), offset, data);
break;
#if 0
case 8: // DMA address low
diff --git a/src/devices/bus/a2bus/a2hsscsi.h b/src/devices/bus/a2bus/a2hsscsi.h
index da96b3e8776..c3534ede770 100644
--- a/src/devices/bus/a2bus/a2hsscsi.h
+++ b/src/devices/bus/a2bus/a2hsscsi.h
@@ -30,6 +30,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( drq_w );
+ static void ncr5380(device_t *device);
+
protected:
a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp
index 7e2cab57b6b..1442d7d68bc 100644
--- a/src/devices/bus/a2bus/a2mcms.cpp
+++ b/src/devices/bus/a2bus/a2mcms.cpp
@@ -38,6 +38,8 @@ DEFINE_DEVICE_TYPE(A2BUS_MCMS2, a2bus_mcms2_device, "a2mcms2", "Mountain Compute
#define ENGINE_TAG "engine"
+#define MCFG_MCMS_IRQ_CALLBACK(_cb) \
+ downcast<mcms_device &>(*device).set_irq_cb(DEVCB_##_cb);
/***************************************************************************
FUNCTION PROTOTYPES
@@ -47,16 +49,16 @@ DEFINE_DEVICE_TYPE(A2BUS_MCMS2, a2bus_mcms2_device, "a2mcms2", "Mountain Compute
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_mcms1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_mcms1_device::device_add_mconfig)
SPEAKER(config, "mcms_l").front_left();
SPEAKER(config, "mcms_r").front_right();
- MCMS(config, m_mcms, 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);
-}
+ MCFG_DEVICE_ADD(ENGINE_TAG, MCMS, 1000000)
+ MCFG_MCMS_IRQ_CALLBACK(WRITELINE(*this, a2bus_mcms1_device, irq_w))
+
+ MCFG_SOUND_ROUTE(0, "mcms_l", 1.0)
+ MCFG_SOUND_ROUTE(1, "mcms_r", 1.0)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE - Card 1
@@ -275,7 +277,7 @@ void mcms_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
wptr = (m_table[v]<<8) | (m_acc[v]>>8);
m_rand = (m_acc[v]>>8) & 0x1f;
- sample = (m_pBusDevice->slot_dma_read(wptr) ^ 0x80);
+ sample = (m_pBusDevice->slot_dma_read_no_space(wptr) ^ 0x80);
if (v & 1)
{
mixL += sample * m_vols[v];
diff --git a/src/devices/bus/a2bus/a2mcms.h b/src/devices/bus/a2bus/a2mcms.h
index 9a183a9313d..f1026d97afd 100644
--- a/src/devices/bus/a2bus/a2mcms.h
+++ b/src/devices/bus/a2bus/a2mcms.h
@@ -33,7 +33,7 @@ public:
void set_bus_device(a2bus_mcms1_device *pDev) { m_pBusDevice = pDev; }
- auto irq_cb() { return m_write_irq.bind(); }
+ template<class Object> devcb_base &set_irq_cb(Object &&wr) { return m_write_irq.set_callback(std::forward<Object>(wr)); }
devcb_write_line m_write_irq;
protected:
diff --git a/src/devices/bus/a2bus/a2memexp.cpp b/src/devices/bus/a2bus/a2memexp.cpp
index 6b088a1ea12..a544713abb7 100644
--- a/src/devices/bus/a2bus/a2memexp.cpp
+++ b/src/devices/bus/a2bus/a2memexp.cpp
@@ -46,9 +46,8 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_memexp_device::device_add_mconfig(machine_config &config)
-{
-}
+MACHINE_CONFIG_START(a2bus_memexp_device::device_add_mconfig)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2midi.cpp b/src/devices/bus/a2bus/a2midi.cpp
index dfd6ce71694..d73aaf82bbc 100644
--- a/src/devices/bus/a2bus/a2midi.cpp
+++ b/src/devices/bus/a2bus/a2midi.cpp
@@ -32,8 +32,7 @@ DEFINE_DEVICE_TYPE(A2BUS_MIDI, a2bus_midi_device, "a2midi", "6850 MIDI card")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_midi_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_midi_device::device_add_mconfig)
PTM6840(config, m_ptm, 1021800);
m_ptm->set_external_clocks(1021800.0f, 1021800.0f, 1021800.0f);
m_ptm->irq_callback().set(FUNC(a2bus_midi_device::ptm_irq_w));
@@ -42,13 +41,14 @@ void a2bus_midi_device::device_add_mconfig(machine_config &config)
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(a2bus_midi_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MIDI_ACIA_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(a2bus_midi_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, a2bus_midi_device, write_acia_clock))
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -91,11 +91,11 @@ uint8_t a2bus_midi_device::read_c0nx(uint8_t offset)
if (offset < 8)
{
- return m_ptm->read(offset & 7);
+ return m_ptm->read(machine().dummy_space(), offset & 7);
}
else if (offset == 8 || offset == 9)
{
- return m_acia->read(offset & 1);
+ return m_acia->read(machine().dummy_space(), offset & 1);
}
return 0;
@@ -109,11 +109,11 @@ void a2bus_midi_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset < 8)
{
- m_ptm->write(offset & 7, data);
+ m_ptm->write(machine().dummy_space(), offset & 7, data);
}
else if (offset == 8 || offset == 9)
{
- m_acia->write(offset & 1, data);
+ m_acia->write(machine().dummy_space(), offset & 1, data);
}
}
diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp
index c4c45b6975b..c1d67bfa7d3 100644
--- a/src/devices/bus/a2bus/a2mockingboard.cpp
+++ b/src/devices/bus/a2bus/a2mockingboard.cpp
@@ -238,7 +238,7 @@ WRITE8_MEMBER( a2bus_ayboard_device::via1_out_b )
{
if (!BIT(data, 2))
{
- m_ay1->reset_w();
+ m_ay1->reset_w(space, 0, 0);
}
else
{
@@ -248,15 +248,15 @@ WRITE8_MEMBER( a2bus_ayboard_device::via1_out_b )
break;
case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta1 = m_ay1->data_r();
+ m_porta1 = m_ay1->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay1->data_w(m_porta1);
+ m_ay1->write_data(m_porta1);
break;
case 3: // BDIR=1, BC1=1 (latch)
- m_ay1->address_w(m_porta1);
+ m_ay1->write_address(m_porta1);
break;
}
}
@@ -266,10 +266,10 @@ WRITE8_MEMBER( a2bus_phasor_device::via1_out_b )
{
if (!(data & 4))
{
- m_ay1->reset_w();
+ m_ay1->reset_w(space, 0, 0);
if (m_native)
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
}
else
@@ -289,23 +289,23 @@ WRITE8_MEMBER( a2bus_phasor_device::via1_out_b )
case 1: // BDIR=0, BC1=1 (read PSG)
if (BIT(chip_sel, 0))
- m_porta1 = m_ay1->data_r();
+ m_porta1 = m_ay1->read_data();
if (BIT(chip_sel, 1))
- m_porta1 = m_ay2->data_r();
+ m_porta1 = m_ay2->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
if (BIT(chip_sel, 0))
- m_ay1->data_w(m_porta1);
+ m_ay1->write_data(m_porta1);
if (BIT(chip_sel, 1))
- m_ay2->data_w(m_porta1);
+ m_ay2->write_data(m_porta1);
break;
case 3: // BDIR=1, BC1=1 (latch)
if (BIT(chip_sel, 0))
- m_ay1->address_w(m_porta1);
+ m_ay1->write_address(m_porta1);
if (BIT(chip_sel, 1))
- m_ay2->address_w(m_porta1);
+ m_ay2->write_address(m_porta1);
break;
}
}
@@ -320,7 +320,7 @@ WRITE8_MEMBER( a2bus_ayboard_device::via2_out_b )
{
if (!BIT(data, 2))
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
else
{
@@ -330,15 +330,15 @@ WRITE8_MEMBER( a2bus_ayboard_device::via2_out_b )
break;
case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta2 = m_ay2->data_r();
+ m_porta2 = m_ay2->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay2->data_w(m_porta2);
+ m_ay2->write_data(m_porta2);
break;
case 3: // BDIR=1, BC1=1 (latch)
- m_ay2->data_w(m_porta2);
+ m_ay2->write_data(m_porta2);
break;
}
}
@@ -350,12 +350,12 @@ WRITE8_MEMBER( a2bus_phasor_device::via2_out_b )
{
if (m_native)
{
- m_ay3->reset_w();
- m_ay4->reset_w();
+ m_ay3->reset_w(space, 0, 0);
+ m_ay4->reset_w(space, 0, 0);
}
else
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
}
else
@@ -375,23 +375,23 @@ WRITE8_MEMBER( a2bus_phasor_device::via2_out_b )
case 1: // BDIR=0, BC1=1 (read PSG)
if (BIT(chip_sel, 0))
- m_porta2 = m_ay3->data_r();
+ m_porta2 = m_ay3->read_data();
if (BIT(chip_sel, 1))
- m_porta2 = m_ay4->data_r();
+ m_porta2 = m_ay4->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
if (BIT(chip_sel, 0))
- m_ay3->data_w(m_porta2);
+ m_ay3->write_data(m_porta2);
if (BIT(chip_sel, 1))
- m_ay4->data_w(m_porta2);
+ m_ay4->write_data(m_porta2);
break;
case 3: // BDIR=1, BC1=1 (latch)
if (BIT(chip_sel, 0))
- m_ay3->address_w(m_porta2);
+ m_ay3->write_address(m_porta2);
if (BIT(chip_sel, 1))
- m_ay4->address_w(m_porta2);
+ m_ay4->write_address(m_porta2);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index 21c749eb50c..218d3ac6892 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -71,16 +71,14 @@ ioport_constructor a2bus_pic_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_pic_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_pic_device::device_add_mconfig)
CENTRONICS(config, m_ctx, centronics_devices, "printer");
m_ctx->set_data_input_buffer(m_ctx_data_in);
m_ctx->ack_handler().set(FUNC(a2bus_pic_device::ack_w));
INPUT_BUFFER(config, m_ctx_data_in);
- OUTPUT_LATCH(config, m_ctx_data_out);
- m_ctx->set_output_latch(*m_ctx_data_out);
-}
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("ctx_data_out", PIC_CENTRONICS_TAG)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2sam.cpp b/src/devices/bus/a2bus/a2sam.cpp
index 16b8b5affe8..21ea8d1fdca 100644
--- a/src/devices/bus/a2bus/a2sam.cpp
+++ b/src/devices/bus/a2bus/a2sam.cpp
@@ -31,14 +31,12 @@ DEFINE_DEVICE_TYPE(A2BUS_SAM, a2bus_sam_device, "a2sam", "Don't Ask Software S.A
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_sam_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_sam_device::device_add_mconfig)
SPEAKER(config, "speaker").front_center();
- DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
- voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
- vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
- vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-}
+ MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp
index 014414e7e98..ef3422e9783 100644
--- a/src/devices/bus/a2bus/a2scsi.cpp
+++ b/src/devices/bus/a2bus/a2scsi.cpp
@@ -50,6 +50,14 @@ DEFINE_DEVICE_TYPE(A2BUS_SCSI, a2bus_scsi_device, "a2scsi", "Apple II SCSI Card"
#define SCSI_BUS_TAG "scsibus"
#define SCSI_5380_TAG "scsibus:7:ncr5380"
+void a2bus_scsi_device::ncr5380(device_t *device)
+{
+ devcb_base *devcb;
+ (void)devcb;
+ MCFG_DEVICE_CLOCK(10000000)
+ MCFG_NCR5380N_DRQ_HANDLER(WRITELINE("^^", a2bus_scsi_device, drq_w))
+}
+
static void scsi_devices(device_slot_interface &device)
{
device.option_add("cdrom", NSCSI_CDROM);
@@ -70,21 +78,18 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_scsi_device::device_add_mconfig(machine_config &config)
-{
- NSCSI_BUS(config, m_scsibus);
- NSCSI_CONNECTOR(config, "scsibus:0", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:1", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:2", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:3", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:4", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:5", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:6", scsi_devices, "harddisk", false);
- NSCSI_CONNECTOR(config, "scsibus:7", scsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) {
- device->set_clock(10000000);
- downcast<ncr5380n_device &>(*device).drq_handler().set(*this, FUNC(a2bus_scsi_device::drq_w));
- });
-}
+MACHINE_CONFIG_START(a2bus_scsi_device::device_add_mconfig)
+ MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
+ MCFG_NSCSI_ADD("scsibus:0", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:6", scsi_devices, "harddisk", false)
+ MCFG_NSCSI_ADD("scsibus:7", scsi_devices, "ncr5380", true)
+ MCFG_SLOT_OPTION_MACHINE_CONFIG("ncr5380", ncr5380)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -154,7 +159,7 @@ uint8_t a2bus_scsi_device::read_c0nx(uint8_t offset)
case 6:
case 7:
// logerror("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(offset);
+ return m_ncr5380->read(machine().dummy_space(), offset);
case 8: // read and DACK
return m_ncr5380->dma_r();
@@ -194,7 +199,7 @@ void a2bus_scsi_device::write_c0nx(uint8_t offset, uint8_t data)
case 6:
case 7:
// logerror("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(offset, data);
+ m_ncr5380->write(machine().dummy_space(), offset, data);
break;
case 8: // write and DACK
diff --git a/src/devices/bus/a2bus/a2scsi.h b/src/devices/bus/a2bus/a2scsi.h
index f1a556eeab7..d9d143da6e9 100644
--- a/src/devices/bus/a2bus/a2scsi.h
+++ b/src/devices/bus/a2bus/a2scsi.h
@@ -30,6 +30,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( drq_w );
+ static void ncr5380(device_t *device);
+
protected:
a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/a2bus/a2softcard.cpp b/src/devices/bus/a2bus/a2softcard.cpp
index d41c84b9425..b8c71153e7b 100644
--- a/src/devices/bus/a2bus/a2softcard.cpp
+++ b/src/devices/bus/a2bus/a2softcard.cpp
@@ -82,7 +82,7 @@ void a2bus_softcard_device::write_cnxx(uint8_t offset, uint8_t data)
if (!m_bEnabled)
{
m_z80->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
- raise_slot_dma();
+ set_maincpu_halt(ASSERT_LINE);
if (m_FirstZ80Boot)
{
@@ -95,7 +95,7 @@ void a2bus_softcard_device::write_cnxx(uint8_t offset, uint8_t data)
else
{
m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- lower_slot_dma();
+ set_maincpu_halt(CLEAR_LINE);
m_bEnabled = false;
}
}
@@ -106,27 +106,27 @@ READ8_MEMBER( a2bus_softcard_device::dma_r )
{
if (offset <= 0xafff)
{
- return slot_dma_read(offset+0x1000);
+ return slot_dma_read(space, offset+0x1000);
}
else if (offset <= 0xbfff) // LC bank 2 d000-dfff
{
- return slot_dma_read((offset&0xfff) + 0xd000);
+ return slot_dma_read(space, (offset&0xfff) + 0xd000);
}
else if (offset <= 0xcfff) // LC e000-efff
{
- return slot_dma_read((offset&0xfff) + 0xe000);
+ return slot_dma_read(space, (offset&0xfff) + 0xe000);
}
else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
{
- return slot_dma_read((offset&0xfff) + 0xf000);
+ return slot_dma_read(space, (offset&0xfff) + 0xf000);
}
else if (offset <= 0xefff) // I/O space c000-cfff
{
- return slot_dma_read((offset&0xfff) + 0xc000);
+ return slot_dma_read(space, (offset&0xfff) + 0xc000);
}
else // zero page
{
- return slot_dma_read(offset&0xfff);
+ return slot_dma_read(space, offset&0xfff);
}
}
@@ -144,27 +144,27 @@ WRITE8_MEMBER( a2bus_softcard_device::dma_w )
{
if (offset <= 0xafff)
{
- slot_dma_write(offset+0x1000, data);
+ slot_dma_write(space, offset+0x1000, data);
}
else if (offset <= 0xbfff) // LC bank 2 d000-dfff
{
- slot_dma_write((offset&0xfff) + 0xd000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xd000, data);
}
else if (offset <= 0xcfff) // LC e000-efff
{
- slot_dma_write((offset&0xfff) + 0xe000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xe000, data);
}
else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
{
- slot_dma_write((offset&0xfff) + 0xf000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xf000, data);
}
else if (offset <= 0xefff) // I/O space c000-cfff
{
- slot_dma_write((offset&0xfff) + 0xc000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xc000, data);
}
else // zero page
{
- slot_dma_write(offset&0xfff, data);
+ slot_dma_write(space, offset&0xfff, data);
}
}
}
diff --git a/src/devices/bus/a2bus/a2ssc.cpp b/src/devices/bus/a2bus/a2ssc.cpp
index 773f4db246f..0261835e1d7 100644
--- a/src/devices/bus/a2bus/a2ssc.cpp
+++ b/src/devices/bus/a2bus/a2ssc.cpp
@@ -189,7 +189,7 @@ uint8_t a2bus_ssc_device::read_c0nx(uint8_t offset)
case 9:
case 0xa:
case 0xb:
- return m_acia->read(offset-8);
+ return m_acia->read(machine().dummy_space(), offset-8);
}
@@ -208,7 +208,7 @@ void a2bus_ssc_device::write_c0nx(uint8_t offset, uint8_t data)
case 9:
case 0xa:
case 0xb:
- m_acia->write(offset-8, data);
+ m_acia->write(machine().dummy_space(), offset-8, data);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2themill.cpp b/src/devices/bus/a2bus/a2themill.cpp
index 14474662ef8..effa5ac9cfb 100644
--- a/src/devices/bus/a2bus/a2themill.cpp
+++ b/src/devices/bus/a2bus/a2themill.cpp
@@ -238,34 +238,34 @@ READ8_MEMBER( a2bus_themill_device::dma_r )
{
if (offset <= 0x7fff)
{
- return slot_dma_read(offset+0x1000);
+ return slot_dma_read(space, offset+0x1000);
}
else if (offset <= 0xafff)
{
- return slot_dma_read((offset&0x3fff) + 0xd000);
+ return slot_dma_read(space, (offset&0x3fff) + 0xd000);
}
else if (offset <= 0xbfff)
{
- return slot_dma_read((offset&0xfff) + 0xc000);
+ return slot_dma_read(space, (offset&0xfff) + 0xc000);
}
else if (offset <= 0xcfff) // 6809 Cxxx -> 6502 ZP
{
- return slot_dma_read((offset&0xfff));
+ return slot_dma_read(space, (offset&0xfff));
}
else // 6809 Dxxx -> 6502 9000
{
- return slot_dma_read((offset-0xd000)+0x9000);
+ return slot_dma_read(space, (offset-0xd000)+0x9000);
}
}
else
{
if (m_flipAddrSpace)
{
- return slot_dma_read(offset^0x8000);
+ return slot_dma_read(space, offset^0x8000);
}
else
{
- return slot_dma_read(offset);
+ return slot_dma_read(space, offset);
}
}
@@ -283,34 +283,34 @@ WRITE8_MEMBER( a2bus_themill_device::dma_w )
{
if (offset <= 0x7fff)
{
- slot_dma_write(offset+0x1000, data);
+ slot_dma_write(space, offset+0x1000, data);
}
else if (offset <= 0xafff)
{
- slot_dma_write((offset&0x3fff) + 0xd000, data);
+ slot_dma_write(space, (offset&0x3fff) + 0xd000, data);
}
else if (offset <= 0xbfff)
{
- slot_dma_write((offset&0xfff) + 0xc000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xc000, data);
}
else if (offset <= 0xcfff)
{
- slot_dma_write((offset&0xfff), data);
+ slot_dma_write(space, (offset&0xfff), data);
}
else // 6809 Dxxx -> 6502 9000
{
- slot_dma_write((offset-0xd000)+0x9000, data);
+ slot_dma_write(space, (offset-0xd000)+0x9000, data);
}
}
else
{
if (m_flipAddrSpace)
{
- slot_dma_write(offset^0x8000, data);
+ slot_dma_write(space, offset^0x8000, data);
}
else
{
- slot_dma_write(offset, data);
+ slot_dma_write(space, offset, data);
}
}
}
diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp
index fd8fb2a895a..9ea36ea2496 100644
--- a/src/devices/bus/a2bus/a2ultraterm.cpp
+++ b/src/devices/bus/a2bus/a2ultraterm.cpp
@@ -104,11 +104,10 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_videx160_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, ULTRATERM_SCREEN_NAME, SCREEN_TYPE_RASTER));
- screen.set_raw(CLOCK_LOW, 882, 0, 720, 370, 0, 350);
- screen.set_screen_update(ULTRATERM_MC6845_NAME, FUNC(mc6845_device::screen_update));
+MACHINE_CONFIG_START(a2bus_videx160_device::device_add_mconfig)
+ MCFG_SCREEN_ADD( ULTRATERM_SCREEN_NAME, RASTER)
+ MCFG_SCREEN_RAW_PARAMS(CLOCK_LOW, 882, 0, 720, 370, 0, 350 )
+ MCFG_SCREEN_UPDATE_DEVICE( ULTRATERM_MC6845_NAME, mc6845_device, screen_update )
MC6845(config, m_crtc, CLOCK_LOW/9);
m_crtc->set_screen(ULTRATERM_SCREEN_NAME);
@@ -116,7 +115,7 @@ void a2bus_videx160_device::device_add_mconfig(machine_config &config)
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(a2bus_videx160_device::crtc_update_row), this);
m_crtc->out_vsync_callback().set(FUNC(a2bus_videx160_device::vsync_changed));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -195,7 +194,7 @@ uint8_t a2bus_videx160_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 1:
- return m_crtc->register_r(); // status_r?
+ return m_crtc->read_register(); // status_r?
case 2:
return m_ctrl1;
@@ -219,11 +218,11 @@ void a2bus_videx160_device::write_c0nx(uint8_t offset, uint8_t data)
switch (offset)
{
case 0:
- m_crtc->address_w(data);
+ m_crtc->write_address(data);
break;
case 1:
- m_crtc->register_w(data);
+ m_crtc->write_register(data);
break;
case 2:
diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp
index 35cb657afd9..519496b1b1b 100644
--- a/src/devices/bus/a2bus/a2videoterm.cpp
+++ b/src/devices/bus/a2bus/a2videoterm.cpp
@@ -117,11 +117,10 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_videx80_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, VIDEOTERM_SCREEN_NAME, SCREEN_TYPE_RASTER)); // 560x216? (80x24 7x9 characters)
- screen.set_raw(MDA_CLOCK, 882, 0, 720, 370, 0, 350);
- screen.set_screen_update(VIDEOTERM_MC6845_NAME, FUNC(mc6845_device::screen_update));
+MACHINE_CONFIG_START(a2bus_videx80_device::device_add_mconfig)
+ MCFG_SCREEN_ADD( VIDEOTERM_SCREEN_NAME, RASTER) // 560x216? (80x24 7x9 characters)
+ MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
+ MCFG_SCREEN_UPDATE_DEVICE( VIDEOTERM_MC6845_NAME, mc6845_device, screen_update )
MC6845(config, m_crtc, MDA_CLOCK/9);
m_crtc->set_screen(VIDEOTERM_SCREEN_NAME);
@@ -129,7 +128,7 @@ void a2bus_videx80_device::device_add_mconfig(machine_config &config)
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(a2bus_videx80_device::crtc_update_row), this);
m_crtc->out_vsync_callback().set(FUNC(a2bus_videx80_device::vsync_changed));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -241,7 +240,7 @@ uint8_t a2bus_videx80_device::read_c0nx(uint8_t offset)
if (offset == 1)
{
- return m_crtc->register_r(); // status_r?
+ return m_crtc->read_register(); // status_r?
}
return 0xff;
@@ -256,11 +255,11 @@ void a2bus_videx80_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset == 0)
{
- m_crtc->address_w(data);
+ m_crtc->write_address(data);
}
else if (offset == 1)
{
- m_crtc->register_w(data);
+ m_crtc->write_register(data);
}
m_rambank = ((offset>>2) & 3) * 512;
diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp
index 41034fab231..aaeb6ed6219 100644
--- a/src/devices/bus/a2bus/a2zipdrive.cpp
+++ b/src/devices/bus/a2bus/a2zipdrive.cpp
@@ -2,19 +2,16 @@
// copyright-holders:R. Belmont
/*********************************************************************
- a2zipdrive.cpp
+ a2zipdrive.c
ZIP Technologies ZipDrive IDE card
- Parsons Engineering Focus Drive IDE card
- These cards are very, very similar. Maybe Parsons designed both?
-
- NOTE: No known dump exists of the Zip formatter utility and the
+ NOTE: No known dump exists of the formatter utility and the
format of the custom partition record (block 0) that the card
expects has not yet been determined, so this is largely untested
and will work only with a drive dump from real h/w.
- PLEASE use it only on a backup copy of said dump and contact MAMEdev
+ PLEASE use it only on a backup copy of said dump and contact MESSdev
if you have one!
Partition block format:
@@ -32,7 +29,6 @@
//**************************************************************************
DEFINE_DEVICE_TYPE(A2BUS_ZIPDRIVE, a2bus_zipdrive_device, "a2zipdrv", "Zip Technologies ZipDrive")
-DEFINE_DEVICE_TYPE(A2BUS_FOCUSDRIVE, a2bus_focusdrive_device, "a2focdrv", "Parsons Engineering Focus Drive")
#define ZIPDRIVE_ROM_REGION "zipdrive_rom"
#define ZIPDRIVE_ATA_TAG "zipdrive_ata"
@@ -42,11 +38,6 @@ ROM_START( zipdrive )
ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) )
ROM_END
-ROM_START( focusdrive )
- ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0)
- ROM_LOAD( "focusrom.bin", 0x001000, 0x001000, CRC(0fd0ba25) SHA1(acf414aa145fcfa1c12aca0269f1f7ada82f1c04) )
-ROM_END
-
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
@@ -69,11 +60,6 @@ const tiny_rom_entry *a2bus_zipdrivebase_device::device_rom_region() const
return ROM_NAME( zipdrive );
}
-const tiny_rom_entry *a2bus_focusdrive_device::device_rom_region() const
-{
- return ROM_NAME( focusdrive );
-}
-
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
@@ -90,11 +76,6 @@ a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, cons
{
}
-a2bus_focusdrive_device::a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- a2bus_zipdrivebase_device(mconfig, A2BUS_FOCUSDRIVE, tag, owner, clock)
-{
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -108,12 +89,9 @@ void a2bus_zipdrivebase_device::device_start()
void a2bus_zipdrivebase_device::device_reset()
{
+ popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
}
-void a2bus_focusdrive_device::device_reset()
-{
- m_rom[0x1c6c] = 0x03; // eat 3 IDE words here instead of 1, fixes a bug? in the original ROM
-}
/*-------------------------------------------------
read_c0nx - called for reads from this card's c0nx space
@@ -134,7 +112,7 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return m_ata->read_cs0(offset, 0xff);
case 8: // data port
- m_lastdata = m_ata->read_cs0(offset, 0xffff);
+ m_lastdata = m_ata->read_cs0(offset);
// printf("%04x @ IDE data\n", m_lastdata);
return m_lastdata&0xff;
@@ -142,42 +120,13 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return (m_lastdata>>8) & 0xff;
default:
- logerror("unhandled read @ C0n%x\n", offset);
+ logerror("a2zipdrive: unhandled read @ C0n%x\n", offset);
break;
}
return 0xff;
}
-uint8_t a2bus_focusdrive_device::read_c0nx(uint8_t offset)
-{
- switch (offset)
- {
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- return m_ata->read_cs0(offset&7, 0xff);
-
- case 0: // data port
- m_lastdata = m_ata->read_cs0(offset, 0xffff);
- //printf("%04x @ IDE data\n", m_lastdata);
- return m_lastdata&0xff;
-
- case 1:
- return (m_lastdata>>8) & 0xff;
-
- default:
- logerror("unhandled read @ C0n%x\n", offset);
- break;
- }
-
- return 0xff;
-}
/*-------------------------------------------------
write_c0nx - called for writes to this card's c0nx space
@@ -208,7 +157,7 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
// printf("%02x to IDE data hi\n", data);
m_lastdata &= 0x00ff;
m_lastdata |= (data << 8);
- m_ata->write_cs0(0, m_lastdata, 0xffff);
+ m_ata->write_cs0(0, m_lastdata);
break;
default:
@@ -217,48 +166,6 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
}
}
-void a2bus_focusdrive_device::write_c0nx(uint8_t offset, uint8_t data)
-{
- switch (offset)
- {
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- // due to a bug in the 6502 firmware, eat data if DRQ is set
- #if 0
- while (m_ata->read_cs0(7, 0xff) & 0x08)
- {
- m_ata->read_cs0(0, 0xffff);
- printf("eating 2 bytes to clear DRQ\n");
- }
- #endif
-// printf("%02x to IDE controller @ %x\n", data, offset);
- m_ata->write_cs0(offset & 7, data, 0xff);
- break;
-
- case 0:
-// printf("%02x to IDE data lo\n", data);
- m_lastdata = data;
- break;
-
- case 1:
-// printf("%02x to IDE data hi\n", data);
- m_lastdata &= 0x00ff;
- m_lastdata |= (data << 8);
- m_ata->write_cs0(0, m_lastdata, 0xffff);
- break;
-
- default:
- printf("focus: write %02x @ unhandled C0n%x\n", data, offset);
- break;
- }
-}
-
/*-------------------------------------------------
read_cnxx - called for reads from this card's cnxx space
-------------------------------------------------*/
diff --git a/src/devices/bus/a2bus/a2zipdrive.h b/src/devices/bus/a2bus/a2zipdrive.h
index 9e3e68e79f2..8187e04cdd2 100644
--- a/src/devices/bus/a2bus/a2zipdrive.h
+++ b/src/devices/bus/a2bus/a2zipdrive.h
@@ -5,9 +5,8 @@
a2zipdrive.h
ZIP Technologies ZipDrive IDE card
- Parsons Engineering Focus Drive IDE card
- See important NOTE at the top of a2zipdrive.cpp!
+ See important NOTE at the top of a2zipdrive.c!
*********************************************************************/
@@ -45,6 +44,8 @@ protected:
required_device<ata_interface_device> m_ata;
uint8_t *m_rom;
+
+private:
uint16_t m_lastdata;
};
@@ -54,20 +55,7 @@ public:
a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t 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);
-
-protected:
- virtual void device_reset() override;
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read_c0nx(uint8_t offset) override;
- virtual void write_c0nx(uint8_t offset, uint8_t data) override;
-};
-
// device type definition
DECLARE_DEVICE_TYPE(A2BUS_ZIPDRIVE, a2bus_zipdrive_device)
-DECLARE_DEVICE_TYPE(A2BUS_FOCUSDRIVE, a2bus_focusdrive_device)
#endif // MAME_BUS_A2BUS_ZIPDRIVE_H
diff --git a/src/devices/bus/a2bus/agat7ports.cpp b/src/devices/bus/a2bus/agat7ports.cpp
index 5c24d8fac8f..d7c12ad81d9 100644
--- a/src/devices/bus/a2bus/agat7ports.cpp
+++ b/src/devices/bus/a2bus/agat7ports.cpp
@@ -51,20 +51,18 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_agat7_ports_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_agat7_ports_device::device_add_mconfig)
I8255(config, m_d9);
m_d9->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
m_d9->out_pb_callback().set(FUNC(a2bus_agat7_ports_device::write_portb));
m_d9->in_pc_callback().set(FUNC(a2bus_agat7_ports_device::read_portc));
- CENTRONICS(config, m_centronics, centronics_devices, "printer");
- m_centronics->busy_handler().set(FUNC(a2bus_agat7_ports_device::write_centronics_busy));
- output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
- m_centronics->set_output_latch(cent_data_out);
+ MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, a2bus_agat7_ports_device, write_centronics_busy))
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
I8251(config, m_d10, 0);
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/devices/bus/a2bus/agat840k_hle.cpp b/src/devices/bus/a2bus/agat840k_hle.cpp
index c95d66a09e9..3571513b7d5 100644
--- a/src/devices/bus/a2bus/agat840k_hle.cpp
+++ b/src/devices/bus/a2bus/agat840k_hle.cpp
@@ -51,12 +51,13 @@ static const floppy_interface agat840k_hle_floppy_interface =
"floppy_5_25"
};
-void a2bus_agat840k_hle_device::device_add_mconfig(machine_config &config)
-{
- legacy_floppy_image_device &floppy0(LEGACY_FLOPPY(config, FLOPPY_0, 0, &agat840k_hle_floppy_interface));
- floppy0.out_idx_cb().set(FUNC(a2bus_agat840k_hle_device::index_0_w));
- legacy_floppy_image_device &floppy1(LEGACY_FLOPPY(config, FLOPPY_1, 0, &agat840k_hle_floppy_interface));
- floppy1.out_idx_cb().set(FUNC(a2bus_agat840k_hle_device::index_1_w));
+MACHINE_CONFIG_START(a2bus_agat840k_hle_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(FLOPPY_0, LEGACY_FLOPPY, 0)
+ MCFG_LEGACY_FLOPPY_CONFIG(agat840k_hle_floppy_interface)
+ MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(*this, a2bus_agat840k_hle_device, index_0_w))
+ MCFG_DEVICE_ADD(FLOPPY_1, LEGACY_FLOPPY, 0)
+ MCFG_LEGACY_FLOPPY_CONFIG(agat840k_hle_floppy_interface)
+ MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(*this, a2bus_agat840k_hle_device, index_1_w))
I8255(config, m_d14);
// PA not connected
@@ -68,7 +69,7 @@ void a2bus_agat840k_hle_device::device_add_mconfig(machine_config &config)
// m_d15->out_pb_callback().set(FUNC(a2bus_agat840k_hle_device::d15_o_b)); // write data
m_d15->in_pc_callback().set(FUNC(a2bus_agat840k_hle_device::d15_i_c));
m_d15->out_pc_callback().set(FUNC(a2bus_agat840k_hle_device::d15_o_c));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/corvfdc02.cpp b/src/devices/bus/a2bus/corvfdc02.cpp
index 36f5dbbd09c..7d4bc6ed785 100644
--- a/src/devices/bus/a2bus/corvfdc02.cpp
+++ b/src/devices/bus/a2bus/corvfdc02.cpp
@@ -132,10 +132,10 @@ uint8_t a2bus_corvfdc02_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 0: // 765 FIFO
- return m_fdc->fifo_r();
+ return m_fdc->read_fifo();
case 1: // 765 MSR
- return m_fdc->msr_r();
+ return m_fdc->read_msr();
case 2: // buffer address
return (m_bufptr>>1) & 0xff;
@@ -170,7 +170,7 @@ void a2bus_corvfdc02_device::write_c0nx(uint8_t offset, uint8_t data)
switch (offset)
{
case 0: // FDC FIFO write
- m_fdc->fifo_w(data);
+ m_fdc->write_fifo(data);
break;
case 1: // FDC ???
diff --git a/src/devices/bus/a2bus/ezcgi.cpp b/src/devices/bus/a2bus/ezcgi.cpp
index a9bc648f08e..ec9dce1cad4 100644
--- a/src/devices/bus/a2bus/ezcgi.cpp
+++ b/src/devices/bus/a2bus/ezcgi.cpp
@@ -48,35 +48,33 @@ void a2bus_ezcgi_device::device_add_mconfig(machine_config &config)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
}
-void a2bus_ezcgi_9938_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ezcgi_9938_device::device_add_mconfig)
V9938(config, m_tms, XTAL(21'477'272)); // typical 9938 clock, not verified
m_tms->set_vram_size(0x30000); // 192K of VRAM
m_tms->set_screen(SCREEN_TAG);
m_tms->int_cb().set(FUNC(a2bus_ezcgi_9938_device::tms_irq_w));
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(MSX2_TOTAL_XRES_PIXELS, 262*2);
- screen.set_visarea(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1);
-}
+ MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
+ MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
+ MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
+MACHINE_CONFIG_END
-void a2bus_ezcgi_9958_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ezcgi_9958_device::device_add_mconfig)
V9958(config, m_tms, XTAL(21'477'272)); // typical 9938/9958 clock, not verified
m_tms->set_vram_size(0x30000); // 192K of VRAM
m_tms->set_screen(SCREEN_TAG);
m_tms->int_cb().set(FUNC(a2bus_ezcgi_9958_device::tms_irq_w));
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(MSX2_TOTAL_XRES_PIXELS, 262*2);
- screen.set_visarea(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1);
-}
+ MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
+ MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
+ MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/laser128.cpp b/src/devices/bus/a2bus/laser128.cpp
index e0c7626aa93..dc7ae4fea21 100644
--- a/src/devices/bus/a2bus/laser128.cpp
+++ b/src/devices/bus/a2bus/laser128.cpp
@@ -32,9 +32,8 @@ DEFINE_DEVICE_TYPE(A2BUS_LASER128, a2bus_laser128_device, "a2laser128", "VTech L
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_laser128_device::device_add_mconfig(machine_config &config)
-{
-}
+MACHINE_CONFIG_START(a2bus_laser128_device::device_add_mconfig)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index a960c74e52c..e95bb6f019a 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -203,7 +203,7 @@ void a2bus_mouse_device::device_reset()
uint8_t a2bus_mouse_device::read_c0nx(uint8_t offset)
{
- return m_pia->read(offset & 3);
+ return m_pia->reg_r(offset & 3);
}
/*-------------------------------------------------
@@ -212,7 +212,7 @@ uint8_t a2bus_mouse_device::read_c0nx(uint8_t offset)
void a2bus_mouse_device::write_c0nx(uint8_t offset, uint8_t data)
{
- m_pia->write(offset & 3, data);
+ m_pia->reg_w(offset & 3, data);
}
/*-------------------------------------------------
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 305da9aa868..6334463533b 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -115,15 +115,14 @@ void a2bus_pcxporter_device::pc_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
-{
- V30(config, m_v30, A2BUS_7M_CLOCK); // 7.16 MHz as per manual
- m_v30->set_addrmap(AS_PROGRAM, &a2bus_pcxporter_device::pc_map);
- m_v30->set_addrmap(AS_IO, &a2bus_pcxporter_device::pc_io);
- m_v30->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
- m_v30->set_disable();
-
- PIT8253(config, m_pit8253);
+MACHINE_CONFIG_START(a2bus_pcxporter_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(m_v30, V30, A2BUS_7M_CLOCK) // 7.16 MHz as per manual
+ MCFG_DEVICE_PROGRAM_MAP(pc_map)
+ MCFG_DEVICE_IO_MAP(pc_io)
+ MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
+ MCFG_DEVICE_DISABLE()
+
+ PIT8253(config, m_pit8253, 0);
m_pit8253->set_clk<0>(A2BUS_7M_CLOCK / 6.0); // heartbeat IRQ
m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w));
m_pit8253->set_clk<1>(A2BUS_7M_CLOCK / 6.0); // DRAM refresh
@@ -148,12 +147,11 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
m_dma8237->out_dack_callback<2>().set(FUNC(a2bus_pcxporter_device::pc_dack2_w));
m_dma8237->out_dack_callback<3>().set(FUNC(a2bus_pcxporter_device::pc_dack3_w));
- PIC8259(config, m_pic8259);
+ PIC8259(config, m_pic8259, 0);
m_pic8259->out_int_callback().set_inputline(m_v30, 0);
ISA8(config, m_isabus, 0);
- m_isabus->set_memspace(m_v30, AS_PROGRAM);
- m_isabus->set_iospace(m_v30, AS_IO);
+ m_isabus->set_cputag(m_v30);
m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w));
m_isabus->irq3_callback().set(m_pic8259, FUNC(pic8259_device::ir3_w));
m_isabus->irq4_callback().set(m_pic8259, FUNC(pic8259_device::ir4_w));
@@ -164,18 +162,18 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
m_isabus->drq2_callback().set(m_dma8237, FUNC(am9517a_device::dreq2_w));
m_isabus->drq3_callback().set(m_dma8237, FUNC(am9517a_device::dreq3_w));
- PC_KBDC(config, m_pc_kbdc, 0);
- m_pc_kbdc->out_clock_cb().set(FUNC(a2bus_pcxporter_device::keyboard_clock_w));
- m_pc_kbdc->out_data_cb().set(FUNC(a2bus_pcxporter_device::keyboard_data_w));
- PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(m_pc_kbdc);
+ MCFG_DEVICE_ADD(m_pc_kbdc, PC_KBDC, 0)
+ MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_clock_w))
+ MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_data_w))
+ MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
/* sound hardware */
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);
-}
+ MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "cga", true) // FIXME: determine ISA bus clock
+ MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "fdc_xt", true)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -633,12 +631,5 @@ WRITE_LINE_MEMBER( a2bus_pcxporter_device::keyboard_data_w )
WRITE8_MEMBER( a2bus_pcxporter_device::nmi_enable_w )
{
m_nmi_enabled = BIT(data,7);
- if (!m_nmi_enabled)
- m_v30->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
-}
-
-WRITE_LINE_MEMBER( a2bus_pcxporter_device::iochck_w )
-{
- if (m_nmi_enabled && !state)
- m_v30->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+ m_isabus->set_nmi_state(m_nmi_enabled);
}
diff --git a/src/devices/bus/a2bus/pc_xporter.h b/src/devices/bus/a2bus/pc_xporter.h
index 2a449ed4019..da9aecc6c6c 100644
--- a/src/devices/bus/a2bus/pc_xporter.h
+++ b/src/devices/bus/a2bus/pc_xporter.h
@@ -113,7 +113,6 @@ private:
DECLARE_WRITE8_MEMBER(pc_page_w);
DECLARE_WRITE8_MEMBER(nmi_enable_w);
- DECLARE_WRITE_LINE_MEMBER(iochck_w);
void pc_select_dma_channel(int channel, bool state);
diff --git a/src/devices/bus/a2bus/ssbapple.cpp b/src/devices/bus/a2bus/ssbapple.cpp
index 89165617867..bde53973c13 100644
--- a/src/devices/bus/a2bus/ssbapple.cpp
+++ b/src/devices/bus/a2bus/ssbapple.cpp
@@ -34,12 +34,11 @@ DEFINE_DEVICE_TYPE(A2BUS_SSBAPPLE, a2bus_ssb_device, "a2ssbapl", "Multitech Indu
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_ssb_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ssb_device::device_add_mconfig)
SPEAKER(config, "ssbapple").front_center();
- TMS5220(config, m_tms, 640000); // guess - this gives 8 kHz output according to the datasheet
- m_tms->add_route(ALL_OUTPUTS, "ssbapple", 1.0);
-}
+ MCFG_DEVICE_ADD(TMS_TAG, TMS5220, 640000) // guess - this gives 8 kHz output according to the datasheet
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ssbapple", 1.0)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/ssprite.cpp b/src/devices/bus/a2bus/ssprite.cpp
index 69e12dc98dd..818bde14b89 100644
--- a/src/devices/bus/a2bus/ssprite.cpp
+++ b/src/devices/bus/a2bus/ssprite.cpp
@@ -104,7 +104,7 @@ uint8_t a2bus_ssprite_device::read_c0nx(uint8_t offset)
return 0x1f | m_tms5220->status_r();
case 14:
case 15:
- return m_ay->data_r();
+ return m_ay->read_data();
}
return 0xff;
@@ -125,11 +125,11 @@ void a2bus_ssprite_device::write_c0nx(uint8_t offset, uint8_t data)
break;
case 12:
case 13:
- m_ay->data_w(data);
+ m_ay->write_data(data);
break;
case 14:
case 15:
- m_ay->address_w(data);
+ m_ay->write_address(data);
break;
}
}
diff --git a/src/devices/bus/a2bus/timemasterho.cpp b/src/devices/bus/a2bus/timemasterho.cpp
index 6b7f0b1f5eb..ad0e96f2ab3 100644
--- a/src/devices/bus/a2bus/timemasterho.cpp
+++ b/src/devices/bus/a2bus/timemasterho.cpp
@@ -157,7 +157,7 @@ uint8_t a2bus_timemasterho_device::read_c0nx(uint8_t offset)
{
if (offset <= 3)
{
- return m_pia->read(offset);
+ return m_pia->reg_r(offset);
}
return 0xff;
@@ -172,7 +172,7 @@ void a2bus_timemasterho_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset <= 3)
{
- m_pia->write(offset, data);
+ m_pia->reg_w(offset, data);
}
}
diff --git a/src/devices/bus/a2bus/transwarp.cpp b/src/devices/bus/a2bus/transwarp.cpp
index 97e02eb8b4e..06557e28cb0 100644
--- a/src/devices/bus/a2bus/transwarp.cpp
+++ b/src/devices/bus/a2bus/transwarp.cpp
@@ -121,11 +121,10 @@ ioport_constructor a2bus_transwarp_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_transwarp_device::device_add_mconfig(machine_config &config)
-{
- M65C02(config, m_ourcpu, A2BUS_7M_CLOCK / 2);
- m_ourcpu->set_addrmap(AS_PROGRAM, &a2bus_transwarp_device::m65c02_mem);
-}
+MACHINE_CONFIG_START(a2bus_transwarp_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(CPU_TAG, M65C02, A2BUS_7M_CLOCK / 2)
+ MCFG_DEVICE_PROGRAM_MAP(m65c02_mem)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -162,7 +161,7 @@ void a2bus_transwarp_device::device_reset()
{
m_bEnabled = true;
m_bReadA2ROM = false;
- raise_slot_dma();
+ set_maincpu_halt(ASSERT_LINE);
if (!(m_dsw2->read() & 0x80))
{
if (m_dsw1->read() & 0x80)
@@ -190,11 +189,6 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
READ8_MEMBER( a2bus_transwarp_device::dma_r )
{
- if (offset == 0xc070)
- {
- hit_slot_joy();
- }
-
if ((offset >= 0xc090) && (offset <= 0xc0ff))
{
hit_slot(((offset >> 4) & 0xf) - 8);
@@ -205,7 +199,7 @@ READ8_MEMBER( a2bus_transwarp_device::dma_r )
return m_rom[offset & 0xfff];
}
- return slot_dma_read(offset);
+ return slot_dma_read(space, offset);
}
@@ -217,11 +211,6 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
{
//if ((offset >= 0xc070) && (offset <= 0xc07f)) printf("%02x to %04x\n", data, offset);
- if (offset == 0xc070)
- {
- hit_slot_joy();
- }
-
if (offset == 0xc072)
{
m_bReadA2ROM = true;
@@ -232,7 +221,7 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
hit_slot(((offset >> 4) & 0xf) - 8);
}
- slot_dma_write(offset, data);
+ slot_dma_write(space, offset, data);
}
bool a2bus_transwarp_device::take_c800()
@@ -254,15 +243,3 @@ void a2bus_transwarp_device::hit_slot(int slot)
}
}
}
-
-void a2bus_transwarp_device::hit_slot_joy()
-{
- // only do slot slowdown if acceleration is enabled
- if (!(m_dsw2->read() & 0x80))
- {
- // accleration's on
- m_ourcpu->set_unscaled_clock(1021800);
- // PREAD main loop counts up to 11*256 uSec, add 1 to cover the setup
- m_timer->adjust(attotime::from_usec(11*257));
- }
-}
diff --git a/src/devices/bus/a2bus/transwarp.h b/src/devices/bus/a2bus/transwarp.h
index e687ae6d350..8b42aefa7e5 100644
--- a/src/devices/bus/a2bus/transwarp.h
+++ b/src/devices/bus/a2bus/transwarp.h
@@ -54,7 +54,6 @@ private:
void m65c02_mem(address_map &map);
void hit_slot(int slot);
- void hit_slot_joy();
};
// device type definition
diff --git a/src/devices/bus/a7800/cpuwiz.cpp b/src/devices/bus/a7800/cpuwiz.cpp
index 0b76f7b2233..8c39f5bf001 100644
--- a/src/devices/bus/a7800/cpuwiz.cpp
+++ b/src/devices/bus/a7800/cpuwiz.cpp
@@ -120,9 +120,9 @@ WRITE8_MEMBER(a78_megacart_device::write_40xx)
// VersaBoard + POKEY @ 0x0450
-void a78_rom_p450_vb_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_p450_vb_device::device_add_mconfig)
SPEAKER(config, "addon").front_center();
- POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00)
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/a7800/cpuwiz.h b/src/devices/bus/a7800/cpuwiz.h
index e9f52a24d4f..1d9b33693d9 100644
--- a/src/devices/bus/a7800/cpuwiz.h
+++ b/src/devices/bus/a7800/cpuwiz.h
@@ -56,8 +56,8 @@ public:
a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); }
+ virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); }
protected:
virtual void device_add_mconfig(machine_config &config) override;
diff --git a/src/devices/bus/a7800/rom.cpp b/src/devices/bus/a7800/rom.cpp
index 362902dbe51..b40eea850c4 100644
--- a/src/devices/bus/a7800/rom.cpp
+++ b/src/devices/bus/a7800/rom.cpp
@@ -229,7 +229,7 @@ READ8_MEMBER(a78_rom_device::read_40xx)
READ8_MEMBER(a78_rom_pokey_device::read_40xx)
{
if (offset < 0x4000)
- return m_pokey->read(offset & 0x0f);
+ return m_pokey->read(space, offset & 0x0f);
if (offset + 0x4000 < m_base_rom)
return 0xff;
@@ -240,16 +240,16 @@ READ8_MEMBER(a78_rom_pokey_device::read_40xx)
WRITE8_MEMBER(a78_rom_pokey_device::write_40xx)
{
if (offset < 0x4000)
- m_pokey->write(offset & 0x0f, data);
+ m_pokey->write(space, offset & 0x0f, data);
}
// TO DO: do we need a PAL variant?!?
-void a78_rom_pokey_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_pokey_device::device_add_mconfig)
SPEAKER(config, "addon").front_center();
- POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00)
+MACHINE_CONFIG_END
/*-------------------------------------------------
@@ -327,7 +327,7 @@ WRITE8_MEMBER(a78_rom_sg_device::write_40xx)
READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx)
{
if (offset < 0x4000)
- return m_pokey->read(offset & 0x0f);
+ return m_pokey->read(space, offset & 0x0f);
else if (offset < 0x8000)
return m_rom[(offset & 0x3fff) + (m_bank * 0x4000)];
else
@@ -337,17 +337,17 @@ READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx)
WRITE8_MEMBER(a78_rom_sg_pokey_device::write_40xx)
{
if (offset < 0x4000)
- m_pokey->write(offset & 0x0f, data);
+ m_pokey->write(space, offset & 0x0f, data);
else if (offset < 0x8000)
m_bank = data & m_bank_mask;
}
-void a78_rom_sg_pokey_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_sg_pokey_device::device_add_mconfig)
SPEAKER(config, "addon").front_center();
- POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00)
+MACHINE_CONFIG_END
/*-------------------------------------------------
@@ -497,33 +497,34 @@ WRITE8_MEMBER(a78_rom_act_device::write_40xx)
// Machine configs for PCB variants with a POKEY at $0450
-void a78_rom_p450_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_p450_device::device_add_mconfig)
SPEAKER(config, "pokey_450").front_center();
- POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00)
+MACHINE_CONFIG_END
-void a78_rom_p450_pokey_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_p450_pokey_device::device_add_mconfig)
SPEAKER(config, "addon").front_center();
- POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00);
+ MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00)
- POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00)
+MACHINE_CONFIG_END
-void a78_rom_p450_sg_ram_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_p450_sg_ram_device::device_add_mconfig)
SPEAKER(config, "pokey_450").front_center();
- POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00)
+MACHINE_CONFIG_END
-void a78_rom_p450_sg9_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a78_rom_p450_sg9_device::device_add_mconfig)
SPEAKER(config, "pokey_450").front_center();
- POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00);
-}
+ MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00)
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/a7800/rom.h b/src/devices/bus/a7800/rom.h
index 1ad27663b6f..406746c4e93 100644
--- a/src/devices/bus/a7800/rom.h
+++ b/src/devices/bus/a7800/rom.h
@@ -197,8 +197,8 @@ public:
a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); }
+ virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); }
protected:
virtual void device_add_mconfig(machine_config &config) override;
@@ -216,8 +216,8 @@ public:
a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); }
+ virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); }
protected:
virtual void device_add_mconfig(machine_config &config) override;
@@ -235,8 +235,8 @@ public:
a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); }
+ virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); }
protected:
virtual void device_add_mconfig(machine_config &config) override;
@@ -254,8 +254,8 @@ public:
a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
- virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); }
+ virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); }
protected:
virtual void device_add_mconfig(machine_config &config) override;
diff --git a/src/devices/bus/a7800/xboard.cpp b/src/devices/bus/a7800/xboard.cpp
index 0005e595a88..d2e610f666e 100644
--- a/src/devices/bus/a7800/xboard.cpp
+++ b/src/devices/bus/a7800/xboard.cpp
@@ -158,7 +158,7 @@ WRITE8_MEMBER(a78_xboard_device::write_40xx)
READ8_MEMBER(a78_xboard_device::read_04xx)
{
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
- return m_pokey->read(offset & 0x0f);
+ return m_pokey->read(space, offset & 0x0f);
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
return m_xbslot->read_04xx(space, offset - 0x10); // access second POKEY
else
@@ -168,7 +168,7 @@ READ8_MEMBER(a78_xboard_device::read_04xx)
WRITE8_MEMBER(a78_xboard_device::write_04xx)
{
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
- m_pokey->write(offset & 0x0f, data);
+ m_pokey->write(space, offset & 0x0f, data);
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
m_xbslot->write_04xx(space, offset - 0x10, data); // access second POKEY
else if (offset >= 0x70 && offset < 0x80)
@@ -203,9 +203,9 @@ READ8_MEMBER(a78_xm_device::read_30xx)
READ8_MEMBER(a78_xm_device::read_04xx)
{
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
- return m_pokey->read(offset & 0x0f);
+ return m_pokey->read(space, offset & 0x0f);
else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
- return m_ym->read(offset & 1);
+ return m_ym->read(space, offset & 1);
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
return m_xbslot->read_04xx(space, offset - 0x10); // access second POKEY
else
@@ -215,9 +215,9 @@ READ8_MEMBER(a78_xm_device::read_04xx)
WRITE8_MEMBER(a78_xm_device::write_04xx)
{
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
- m_pokey->write(offset & 0x0f, data);
+ m_pokey->write(space, offset & 0x0f, data);
else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
- m_ym->write(offset & 1, data);
+ m_ym->write(space, offset & 1, data);
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
m_xbslot->write_04xx(space, offset - 0x10, data); // access second POKEY
else if (offset >= 0x70 && offset < 0x80)
diff --git a/src/devices/bus/a800/cassette.cpp b/src/devices/bus/a800/cassette.cpp
index fb08819e5ae..1545cf434c7 100644
--- a/src/devices/bus/a800/cassette.cpp
+++ b/src/devices/bus/a800/cassette.cpp
@@ -28,13 +28,12 @@ TODO:
DEFINE_DEVICE_TYPE(A8SIO_CASSETTE, a8sio_cassette_device, "a8sio_cass", "Atari 8 bit cassette")
const device_timer_id TIMER_CASSETTE_READ = 1;
-void a8sio_cassette_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_cassette);
- //m_cassette->set_default_state(CASSETTE_STOPPED);
- m_cassette->set_default_state(CASSETTE_PLAY);
- m_cassette->set_interface("atari8bit_cass");
-}
+MACHINE_CONFIG_START(a8sio_cassette_device::device_add_mconfig)
+ MCFG_CASSETTE_ADD("cassette")
+ //MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
+ MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY)
+ MCFG_CASSETTE_INTERFACE("atari8bit_cass")
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/abcbus/abc890.cpp b/src/devices/bus/abcbus/abc890.cpp
index 27530439929..4807a09a9f5 100644
--- a/src/devices/bus/abcbus/abc890.cpp
+++ b/src/devices/bus/abcbus/abc890.cpp
@@ -27,95 +27,89 @@ DEFINE_DEVICE_TYPE(ABC856, abc856_device, "abc856", "ABC
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc890_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io4", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "mem1", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "mem2", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "mem3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc890_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem3", abcbus_cards, nullptr)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc_expansion_unit_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abc80_cards, "abc830");
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abc80_cards, nullptr);
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abc80_cards, nullptr);
- ABCBUS_SLOT(config, "io4", DERIVED_CLOCK(1, 1), abc80_cards, nullptr);
- ABCBUS_SLOT(config, "mem1", DERIVED_CLOCK(1, 1), abc80_cards, "memcard");
- ABCBUS_SLOT(config, "mem2", DERIVED_CLOCK(1, 1), abc80_cards, "16k");
- ABCBUS_SLOT(config, "mem3", DERIVED_CLOCK(1, 1), abc80_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc_expansion_unit_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abc80_cards, "abc830")
+ MCFG_ABCBUS_SLOT_ADD("io2", abc80_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abc80_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abc80_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem1", abc80_cards, "memcard")
+ MCFG_ABCBUS_SLOT_ADD("mem2", abc80_cards, "16k")
+ MCFG_ABCBUS_SLOT_ADD("mem3", abc80_cards, nullptr)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc894_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc894_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc850_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abcbus_cards, "abc850fdd");
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abcbus_cards, "xebec")
- .set_option_default_bios("xebec", "ro202");
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io4", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io5", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io6", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io7", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc850_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
+ MCFG_SLOT_OPTION_DEFAULT_BIOS("xebec", "ro202")
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc852_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abcbus_cards, "abc850fdd");
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abcbus_cards, "xebec")
- .set_option_default_bios("xebec", "basf6185");
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io4", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io5", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io6", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io7", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc852_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
+ MCFG_SLOT_OPTION_DEFAULT_BIOS("xebec", "basf6185")
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
+MACHINE_CONFIG_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc856_device::device_add_mconfig(machine_config &config)
-{
- ABCBUS_SLOT(config, "io1", DERIVED_CLOCK(1, 1), abcbus_cards, "abc850fdd");
- ABCBUS_SLOT(config, "io2", DERIVED_CLOCK(1, 1), abcbus_cards, "xebec")
- .set_option_default_bios("xebec", "micr1325");
- ABCBUS_SLOT(config, "io3", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io4", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io5", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io6", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
- ABCBUS_SLOT(config, "io7", DERIVED_CLOCK(1, 1), abcbus_cards, nullptr);
-}
+MACHINE_CONFIG_START(abc856_device::device_add_mconfig)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
+ MCFG_SLOT_OPTION_DEFAULT_BIOS("xebec", "micr1325")
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/abcbus/abcbus.h b/src/devices/bus/abcbus/abcbus.h
index 2388fbc73cf..5bd338b05d7 100644
--- a/src/devices/bus/abcbus/abcbus.h
+++ b/src/devices/bus/abcbus/abcbus.h
@@ -111,6 +111,47 @@
//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ABCBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, ABCBUS_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+#define MCFG_ABCBUS_SLOT_IRQ_CALLBACK(_irq) \
+ downcast<abcbus_slot_device *>(device)->set_irq_callback(DEVCB_##_irq);
+
+#define MCFG_ABCBUS_SLOT_NMI_CALLBACK(_nmi) \
+ downcast<abcbus_slot_device *>(device)->set_nmi_callback(DEVCB_##_nmi);
+
+#define MCFG_ABCBUS_SLOT_RDY_CALLBACK(_rdy) \
+ downcast<abcbus_slot_device *>(device)->set_rdy_callback(DEVCB_##_rdy);
+
+#define MCFG_ABCBUS_SLOT_RESIN_CALLBACK(_resin) \
+ downcast<abcbus_slot_device *>(device)->set_resin_callback(DEVCB_##_resin);
+
+#define MCFG_ABCBUS_SLOT_PREN_CALLBACK(_pren) \
+ downcast<abcbus_slot_device *>(device)->set_pren_callback(DEVCB_##_pren);
+
+#define MCFG_ABCBUS_SLOT_TRRQ_CALLBACK(_trrq) \
+ downcast<abcbus_slot_device *>(device)->set_trrq_callback(DEVCB_##_trrq);
+
+#define MCFG_ABCBUS_SLOT_XINT2_CALLBACK(_xint2) \
+ downcast<abcbus_slot_device *>(device)->set_xint2_callback(DEVCB_##_xint2);
+
+#define MCFG_ABCBUS_SLOT_XINT3_CALLBACK(_xint3) \
+ downcast<abcbus_slot_device *>(device)->set_xint3_callback(DEVCB_##_xint3);
+
+#define MCFG_ABCBUS_SLOT_XINT4_CALLBACK(_xint4) \
+ downcast<abcbus_slot_device *>(device)->set_xint4_callback(DEVCB_##_xint4);
+
+#define MCFG_ABCBUS_SLOT_XINT5_CALLBACK(_xint5) \
+ downcast<abcbus_slot_device *>(device)->set_xint5_callback(DEVCB_##_xint5);
+
+
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -166,26 +207,17 @@ 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);
- template <typename T>
- abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
- : abcbus_slot_device(mconfig, tag, owner, clock)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- }
-
- auto irq_callback() { return m_write_irq.bind(); }
- auto nmi_callback() { return m_write_nmi.bind(); }
- auto rdy_callback() { return m_write_rdy.bind(); }
- auto resin_callback() { return m_write_resin.bind(); }
- auto pren_callback() { return m_write_pren.bind(); }
- auto trrq_callback() { return m_write_trrq.bind(); }
- auto xint2_callback() { return m_write_xint2.bind(); }
- auto xint3_callback() { return m_write_xint3.bind(); }
- auto xint4_callback() { return m_write_xint4.bind(); }
- auto xint5_callback() { return m_write_xint5.bind(); }
+
+ template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_nmi_callback(Object &&cb) { return m_write_nmi.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_rdy_callback(Object &&cb) { return m_write_rdy.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_resin_callback(Object &&cb) { return m_write_resin.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_pren_callback(Object &&cb) { return m_write_pren.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_trrq_callback(Object &&cb) { return m_write_trrq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint2_callback(Object &&cb) { return m_write_xint2.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint3_callback(Object &&cb) { return m_write_xint3.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint4_callback(Object &&cb) { return m_write_xint4.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint5_callback(Object &&cb) { return m_write_xint5.set_callback(std::forward<Object>(cb)); }
// computer interface
void write_cs(uint8_t data) { if (m_card) m_card->abcbus_cs(data); }
diff --git a/src/devices/bus/abcbus/cadmouse.cpp b/src/devices/bus/abcbus/cadmouse.cpp
index 7a4d90916f9..9cee7326cf4 100644
--- a/src/devices/bus/abcbus/cadmouse.cpp
+++ b/src/devices/bus/abcbus/cadmouse.cpp
@@ -125,12 +125,11 @@ void abc_cadmouse_device::abc_cadmouse_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc_cadmouse_device::device_add_mconfig(machine_config &config)
-{
- Z80(config, m_maincpu, XTAL(8'000'000)/2);
- m_maincpu->set_addrmap(AS_PROGRAM, &abc_cadmouse_device::abc_cadmouse_mem);
- m_maincpu->set_addrmap(AS_IO, &abc_cadmouse_device::abc_cadmouse_io);
-}
+MACHINE_CONFIG_START(abc_cadmouse_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(8'000'000)/2)
+ MCFG_DEVICE_PROGRAM_MAP(abc_cadmouse_mem)
+ MCFG_DEVICE_IO_MAP(abc_cadmouse_io)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/abcbus/db411223.cpp b/src/devices/bus/abcbus/db411223.cpp
index 86ba1f22ee9..d9d2906f6d6 100644
--- a/src/devices/bus/abcbus/db411223.cpp
+++ b/src/devices/bus/abcbus/db411223.cpp
@@ -68,12 +68,11 @@ void databoard_4112_23_t::databoard_4112_23_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void databoard_4112_23_t::device_add_mconfig(machine_config &config)
-{
- Z80(config, m_maincpu, 4000000);
- m_maincpu->set_addrmap(AS_PROGRAM, &databoard_4112_23_t::databoard_4112_23_mem);
- m_maincpu->set_addrmap(AS_IO, &databoard_4112_23_t::databoard_4112_23_io);
-}
+MACHINE_CONFIG_START(databoard_4112_23_t::device_add_mconfig)
+ MCFG_DEVICE_ADD(Z80_TAG, Z80, 4000000)
+ MCFG_DEVICE_PROGRAM_MAP(databoard_4112_23_mem)
+ MCFG_DEVICE_IO_MAP(databoard_4112_23_io)
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/devices/bus/abcbus/unidisk.cpp b/src/devices/bus/abcbus/unidisk.cpp
index 0b068000193..0d5968aa71b 100644
--- a/src/devices/bus/abcbus/unidisk.cpp
+++ b/src/devices/bus/abcbus/unidisk.cpp
@@ -73,12 +73,11 @@ void unidisk_t::unidisk_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void unidisk_t::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(unidisk_t::device_add_mconfig)
TMS9995(config, m_maincpu, 12000000);
m_maincpu->set_addrmap(AS_PROGRAM, &unidisk_t::unidisk_mem);
m_maincpu->set_addrmap(AS_IO, &unidisk_t::unidisk_io);
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp
index 996a5af23c9..87acedf4fb8 100644
--- a/src/devices/bus/abckb/abc77.cpp
+++ b/src/devices/bus/abckb/abc77.cpp
@@ -129,8 +129,7 @@ DISCRETE_SOUND_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void abc77_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(abc77_device::device_add_mconfig)
// keyboard cpu
I8035(config, m_maincpu, XTAL(4'608'000));
m_maincpu->set_addrmap(AS_PROGRAM, &abc77_device::abc77_map);
@@ -145,8 +144,9 @@ void abc77_device::device_add_mconfig(machine_config &config)
// discrete sound
SPEAKER(config, "mono").front_center();
- DISCRETE(config, m_discrete, abc77_discrete).add_route(ALL_OUTPUTS, "mono", 0.80);
-}
+ MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, abc77_discrete)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp
index 4b49e73548e..6782fbd8a59 100644
--- a/src/devices/bus/abckb/abc99.cpp
+++ b/src/devices/bus/abckb/abc99.cpp
@@ -169,7 +169,7 @@ void abc99_device::device_add_mconfig(machine_config &config)
m_mousecpu->set_addrmap(AS_PROGRAM, &abc99_device::abc99_z5_mem);
//m_mousecpu->p1_in_cb().set(FUNC(abc99_device::z5_p1_r));
//m_mousecpu->p2_out_cb().set(FUNC(abc99_device::z5_p2_w));
- //m_mousecpu->set_t0_clk_cb(); // Z2 CLK
+ //MCFG_MCS48_PORT_T0_CLK_CUSTOM() // Z2 CLK
//m_mousecpu->t1_in_cb().set(FUNC(abc99_device::z5_t1_r));
m_mousecpu->set_disable(); // HACK fix for broken serial I/O
diff --git a/src/devices/bus/abckb/abckb.h b/src/devices/bus/abckb/abckb.h
index d7ab8b6162a..7ec223fc942 100644
--- a/src/devices/bus/abckb/abckb.h
+++ b/src/devices/bus/abckb/abckb.h
@@ -12,6 +12,27 @@
#pragma once
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ABC_KEYBOARD_PORT_ADD(_tag, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, ABC_KEYBOARD_PORT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(abc_keyboard_devices, _def_slot, false)
+
+#define MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(_devcb) \
+ downcast<abc_keyboard_port_device &>(*device).set_out_rx_handler(DEVCB_##_devcb);
+
+#define MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(_devcb) \
+ downcast<abc_keyboard_port_device &>(*device).set_out_trxc_handler(DEVCB_##_devcb);
+
+#define MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(_devcb) \
+ downcast<abc_keyboard_port_device &>(*device).set_out_keydown_handler(DEVCB_##_devcb);
+
+
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -22,21 +43,11 @@ class abc_keyboard_port_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
- template <typename T>
- 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)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- }
-
- abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
-
- auto out_rx_handler() { return m_out_rx_handler.bind(); }
- auto out_trxc_handler() { return m_out_trxc_handler.bind(); }
- auto out_keydown_handler() { return m_out_keydown_handler.bind(); }
+ abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ template <class Object> devcb_base &set_out_rx_handler(Object &&cb) { return m_out_rx_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_trxc_handler(Object &&cb) { return m_out_trxc_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_keydown_handler(Object &&cb) { return m_out_keydown_handler.set_callback(std::forward<Object>(cb)); }
// computer interface
DECLARE_WRITE_LINE_MEMBER( txd_w );
diff --git a/src/devices/bus/acorn/atom/discpack.cpp b/src/devices/bus/acorn/atom/discpack.cpp
index fd33ec293a6..63a29d403f1 100644
--- a/src/devices/bus/acorn/atom/discpack.cpp
+++ b/src/devices/bus/acorn/atom/discpack.cpp
@@ -84,7 +84,7 @@ void atom_discpack_device::device_start()
address_space &space = m_bus->memspace();
space.install_device(0x0a00, 0x0a03, *m_fdc, &i8271_device::map);
- space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8smo_delegate(FUNC(i8271_device::data_w), m_fdc.target()));
+ space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8_delegate(FUNC(i8271_device::data_w), m_fdc.target()));
space.install_ram(0x2000, 0x23ff);
space.install_ram(0x2400, 0x27ff);
space.install_ram(0x3c00, 0x3fff);
diff --git a/src/devices/bus/acorn/atom/econet.cpp b/src/devices/bus/acorn/atom/econet.cpp
index 5051fd0e8e7..210ca895445 100644
--- a/src/devices/bus/acorn/atom/econet.cpp
+++ b/src/devices/bus/acorn/atom/econet.cpp
@@ -63,7 +63,7 @@ void atom_econet_device::device_start()
{
address_space &space = m_bus->memspace();
- space.install_readwrite_handler(0xb400, 0xb403, read8sm_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8sm_delegate(FUNC(mc6854_device::write), m_adlc.target()));
+ space.install_readwrite_handler(0xb400, 0xb403, read8_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8_delegate(FUNC(mc6854_device::write), m_adlc.target()));
space.install_read_handler(0xb404, 0xb404, read8_delegate(FUNC(atom_econet_device::statid_r), this));
}
diff --git a/src/devices/bus/acorn/atom/sid.cpp b/src/devices/bus/acorn/atom/sid.cpp
index 8b5cd738cfe..950f4de2c58 100644
--- a/src/devices/bus/acorn/atom/sid.cpp
+++ b/src/devices/bus/acorn/atom/sid.cpp
@@ -55,5 +55,5 @@ void atom_sid_device::device_start()
{
address_space &space = m_bus->memspace();
- space.install_readwrite_handler(0xbdc0, 0xbddf, read8sm_delegate(FUNC(mos6581_device::read), m_sid.target()), write8sm_delegate(FUNC(mos6581_device::write), m_sid.target()));
+ space.install_readwrite_handler(0xbdc0, 0xbddf, read8_delegate(FUNC(mos6581_device::read), m_sid.target()), write8_delegate(FUNC(mos6581_device::write), m_sid.target()));
}
diff --git a/src/devices/bus/acorn/bus.cpp b/src/devices/bus/acorn/bus.cpp
index 2ecb509c30f..ed759be82af 100644
--- a/src/devices/bus/acorn/bus.cpp
+++ b/src/devices/bus/acorn/bus.cpp
@@ -80,7 +80,7 @@ DEFINE_DEVICE_TYPE(ACORN_BUS, acorn_bus_device, "acorn_bus", "Acorn Bus")
acorn_bus_device::acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ACORN_BUS, tag, owner, clock)
- , m_space(*this, finder_base::DUMMY_TAG, -1)
+ , m_maincpu(*this, finder_base::DUMMY_TAG)
, m_out_irq_cb(*this)
, m_out_nmi_cb(*this)
{
diff --git a/src/devices/bus/acorn/bus.h b/src/devices/bus/acorn/bus.h
index 149da10d447..9ebcafdad73 100644
--- a/src/devices/bus/acorn/bus.h
+++ b/src/devices/bus/acorn/bus.h
@@ -64,11 +64,11 @@ public:
acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward<T>(tag), spacenum); }
+ template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
auto out_irq_callback() { return m_out_irq_cb.bind(); }
auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
- address_space &memspace() const { return *m_space; }
+ address_space &memspace() const { return m_maincpu->space(AS_PROGRAM); }
DECLARE_WRITE_LINE_MEMBER(irq_w);
DECLARE_WRITE_LINE_MEMBER(nmi_w);
@@ -81,7 +81,7 @@ protected:
virtual void device_reset() override;
// internal state
- required_address_space m_space;
+ required_device<cpu_device> m_maincpu;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
diff --git a/src/devices/bus/acorn/cms/4080term.cpp b/src/devices/bus/acorn/cms/4080term.cpp
index 7bb64493481..0bf9cf5a7ea 100644
--- a/src/devices/bus/acorn/cms/4080term.cpp
+++ b/src/devices/bus/acorn/cms/4080term.cpp
@@ -68,23 +68,22 @@ DEVICE_INPUT_DEFAULTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void cms_4080term_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(cms_4080term_device::device_add_mconfig)
/* video hardware */
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ device = &SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(50);
m_screen->set_size(768, 312);
m_screen->set_visarea(0, 492 - 1, 0, 270 - 1);
- m_screen->set_screen_update("ef9345", FUNC(ef9345_device::screen_update));
+ MCFG_SCREEN_UPDATE_DEVICE("ef9345", ef9345_device, screen_update)
- GFXDECODE(config, "gfxdecode", "palette", gfx_cms_4080term);
- PALETTE(config, "palette").set_entries(8);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cms_4080term)
+ MCFG_PALETTE_ADD("palette", 8)
EF9345(config, m_ef9345, 0);
m_ef9345->set_screen("screen");
m_ef9345->set_palette_tag("palette");
- TIMER(config, "scantimer").configure_scanline(FUNC(cms_4080term_device::update_scanline), "screen", 0, 10);
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cms_4080term_device, update_scanline, "screen", 0, 10)
VIA6522(config, m_via, 1_MHz_XTAL);
m_via->writepa_handler().set("cent_data_out", FUNC(output_latch_device::bus_w));
@@ -108,9 +107,8 @@ void cms_4080term_device::device_add_mconfig(machine_config &config)
/* printer */
CENTRONICS(config, m_centronics, centronics_devices, "printer");
m_centronics->ack_handler().set(m_via, FUNC(via6522_device::write_ca1));
- output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
- m_centronics->set_output_latch(cent_data_out);
-}
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+MACHINE_CONFIG_END
const tiny_rom_entry *cms_4080term_device::device_rom_region() const
@@ -147,9 +145,9 @@ void cms_4080term_device::device_start()
{
address_space &space = m_bus->memspace();
- space.install_readwrite_handler(0xfd20, 0xfd2f, read8sm_delegate(FUNC(ef9345_device::data_r), m_ef9345.target()), write8sm_delegate(FUNC(ef9345_device::data_w), m_ef9345.target()));
+ space.install_readwrite_handler(0xfd20, 0xfd2f, read8_delegate(FUNC(ef9345_device::data_r), m_ef9345.target()), write8_delegate(FUNC(ef9345_device::data_w), m_ef9345.target()));
space.install_readwrite_handler(0xfd30, 0xfd3f, read8sm_delegate(FUNC(via6522_device::read), m_via.target()), write8sm_delegate(FUNC(via6522_device::write), m_via.target()));
- space.install_readwrite_handler(0xfd40, 0xfd4f, read8sm_delegate(FUNC(mos6551_device::read), m_acia.target()), write8sm_delegate(FUNC(mos6551_device::write), m_acia.target()));
+ space.install_readwrite_handler(0xfd40, 0xfd4f, read8_delegate(FUNC(mos6551_device::read), m_acia.target()), write8_delegate(FUNC(mos6551_device::write), m_acia.target()));
uint8_t *FNT = memregion("ef9345")->base();
uint16_t dest = 0x2000;
diff --git a/src/devices/bus/acorn/cms/hires.cpp b/src/devices/bus/acorn/cms/hires.cpp
index 9e6e169737b..d15032bd30c 100644
--- a/src/devices/bus/acorn/cms/hires.cpp
+++ b/src/devices/bus/acorn/cms/hires.cpp
@@ -25,24 +25,23 @@ DEFINE_DEVICE_TYPE(CMS_HIRES, cms_hires_device, "cms_hires", "CMS High Resolutio
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void cms_hires_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(cms_hires_device::device_add_mconfig)
/* video hardware */
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ device = &SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_size(512, 312);
m_screen->set_visarea(0, 512 - 1, 0, 256 - 1);
m_screen->set_refresh_hz(50);
- m_screen->set_screen_update("ef9366", FUNC(ef9365_device::screen_update));
- PALETTE(config, "palette").set_entries(16);
+ MCFG_SCREEN_UPDATE_DEVICE("ef9366", ef9365_device, screen_update)
+ MCFG_PALETTE_ADD("palette", 16)
- TIMER(config, "flash_rate").configure_periodic(FUNC(cms_hires_device::flash_rate), attotime::from_hz(3)); // from 555 timer (4.7uF, 100K, 470R)
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("flash_rate", cms_hires_device, flash_rate, attotime::from_hz(3)) // from 555 timer (4.7uF, 100K, 470R)
EF9365(config, m_gdp, 14_MHz_XTAL / 8);
m_gdp->set_screen("screen");
m_gdp->set_palette_tag("palette");
m_gdp->set_nb_bitplanes(4);
m_gdp->set_display_mode(ef9365_device::DISPLAY_MODE_512x256);
-}
+MACHINE_CONFIG_END
//**************************************************************************
@@ -71,7 +70,7 @@ void cms_hires_device::device_start()
{
address_space &space = m_bus->memspace();
- space.install_readwrite_handler(0xfc10, 0xfc1f, read8sm_delegate(FUNC(ef9365_device::data_r), m_gdp.target()), write8sm_delegate(FUNC(ef9365_device::data_w), m_gdp.target()));
+ space.install_readwrite_handler(0xfc10, 0xfc1f, read8_delegate(FUNC(ef9365_device::data_r), m_gdp.target()), write8_delegate(FUNC(ef9365_device::data_w), m_gdp.target()));
space.install_write_handler(0xfc20, 0xfc2f, write8_delegate(FUNC(cms_hires_device::colour_reg_w), this));
save_item(NAME(m_flash_state));
diff --git a/src/devices/bus/acorn/system/cass.cpp b/src/devices/bus/acorn/system/cass.cpp
index 6e5b8faf40c..092a72f40a3 100644
--- a/src/devices/bus/acorn/system/cass.cpp
+++ b/src/devices/bus/acorn/system/cass.cpp
@@ -24,16 +24,15 @@ DEFINE_DEVICE_TYPE(ACORN_CASS, acorn_cass_device, "acorn_cass", "Acorn Cassette
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void acorn_cass_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(acorn_cass_device::device_add_mconfig)
/* sound hardware */
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
CASSETTE(config, "cassette", 0);
- 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));
-}
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("cass_c", acorn_cass_device, cass_c, attotime::from_hz(4800))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("cass_p", acorn_cass_device, cass_p, attotime::from_hz(40000))
+MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/devices/bus/acorn/system/econet.cpp b/src/devices/bus/acorn/system/econet.cpp
index f8e2c6f0ce4..d6613f35bf7 100644
--- a/src/devices/bus/acorn/system/econet.cpp
+++ b/src/devices/bus/acorn/system/econet.cpp
@@ -72,7 +72,7 @@ void acorn_econet_device::device_reset()
{
address_space &space = m_bus->memspace();
- space.install_readwrite_handler(0x1940, 0x1943, read8sm_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8sm_delegate(FUNC(mc6854_device::write), m_adlc.target()));
+ space.install_readwrite_handler(0x1940, 0x1943, read8_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8_delegate(FUNC(mc6854_device::write), m_adlc.target()));
space.install_read_handler(0x1944, 0x1944, read8_delegate(FUNC(acorn_econet_device::statid_r), this));
}
diff --git a/src/devices/bus/acorn/system/fdc.cpp b/src/devices/bus/acorn/system/fdc.cpp
index 179b914d3cf..398736eab9e 100644
--- a/src/devices/bus/acorn/system/fdc.cpp
+++ b/src/devices/bus/acorn/system/fdc.cpp
@@ -85,7 +85,7 @@ void acorn_fdc_device::device_reset()
address_space &space = m_bus->memspace();
space.install_device(0x0a00, 0x0a03, *m_fdc, &i8271_device::map);
- space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8smo_delegate(FUNC(i8271_device::data_w), m_fdc.target()));
+ space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8_delegate(FUNC(i8271_device::data_w), m_fdc.target()));
}
diff --git a/src/devices/bus/acorn/system/vdu40.cpp b/src/devices/bus/acorn/system/vdu40.cpp
index 4f97b778a5b..93d54819fa5 100644
--- a/src/devices/bus/acorn/system/vdu40.cpp
+++ b/src/devices/bus/acorn/system/vdu40.cpp
@@ -25,13 +25,12 @@ DEFINE_DEVICE_TYPE(ACORN_VDU40, acorn_vdu40_device, "acorn_vdu40", "Acorn 40 Col
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void acorn_vdu40_device::device_add_mconfig(machine_config &config)
-{
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+MACHINE_CONFIG_START(acorn_vdu40_device::device_add_mconfig)
+ device = &SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(12_MHz_XTAL, 768, 132, 612, 311, 20, 270);
- m_screen->set_screen_update("mc6845", FUNC(mc6845_device::screen_update));
+ MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
- PALETTE(config, "palette").set_entries(8);
+ MCFG_PALETTE_ADD("palette", 8)
HD6845(config, m_crtc, 12_MHz_XTAL / 6);
m_crtc->set_screen("screen");
@@ -42,7 +41,7 @@ void acorn_vdu40_device::device_add_mconfig(machine_config &config)
SAA5050(config, m_trom, 12_MHz_XTAL / 2);
m_trom->set_screen_size(40, 25, 40);
-}
+MACHINE_CONFIG_END
//**************************************************************************
@@ -82,8 +81,8 @@ void acorn_vdu40_device::device_reset()
address_space &space = m_bus->memspace();
space.install_ram(0x0400, 0x07ff, m_videoram.get());
- space.install_readwrite_handler(0x0800, 0x0800, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
- space.install_readwrite_handler(0x0801, 0x0801, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
+ space.install_readwrite_handler(0x0800, 0x0800, read8_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
+ space.install_readwrite_handler(0x0801, 0x0801, read8_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
}
diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp
index ef6cd463baa..65e22414e94 100644
--- a/src/devices/bus/acorn/system/vdu80.cpp
+++ b/src/devices/bus/acorn/system/vdu80.cpp
@@ -87,14 +87,13 @@ GFXDECODE_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void acorn_vdu80_device::device_add_mconfig(machine_config &config)
-{
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+MACHINE_CONFIG_START(acorn_vdu80_device::device_add_mconfig)
+ device = &SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_color(rgb_t::white());
m_screen->set_raw(12_MHz_XTAL, 768, 132, 612, 312, 20, 270);
- m_screen->set_screen_update("mc6845", FUNC(mc6845_device::screen_update));
+ MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
- GFXDECODE(config, "gfxdecode", m_palette, gfx_acorn_vdu80);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acorn_vdu80)
PALETTE(config, m_palette, palette_device::MONOCHROME);
H46505(config, m_crtc, 2_MHz_XTAL);
@@ -102,7 +101,7 @@ void acorn_vdu80_device::device_add_mconfig(machine_config &config)
m_crtc->set_show_border_area(false);
m_crtc->set_char_width(6);
m_crtc->set_update_row_callback(FUNC(acorn_vdu80_device::crtc_update_row), this);
-}
+MACHINE_CONFIG_END
const tiny_rom_entry *acorn_vdu80_device::device_rom_region() const
@@ -152,15 +151,15 @@ void acorn_vdu80_device::device_reset()
{
space.install_ram(0xf000, 0x0f7ff, m_videoram.get());
- space.install_readwrite_handler(0xe840, 0xe840, 0, 0x3f, 0, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
- space.install_readwrite_handler(0xe841, 0xe841, 0, 0x3e, 0, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
+ space.install_readwrite_handler(0xe840, 0xe840, 0, 0x3f, 0, read8_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
+ space.install_readwrite_handler(0xe841, 0xe841, 0, 0x3e, 0, read8_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
}
else
{
space.install_ram(0x1000, 0x017ff, m_videoram.get());
- space.install_readwrite_handler(0x1840, 0x1840, 0, 0x3f, 0, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
- space.install_readwrite_handler(0x1841, 0x1841, 0, 0x3e, 0, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
+ space.install_readwrite_handler(0x1840, 0x1840, 0, 0x3f, 0, read8_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));
+ space.install_readwrite_handler(0x1841, 0x1841, 0, 0x3e, 0, read8_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));
}
}
diff --git a/src/devices/bus/acorn/system/vib.cpp b/src/devices/bus/acorn/system/vib.cpp
index e392225f1e0..69a5d2189a4 100644
--- a/src/devices/bus/acorn/system/vib.cpp
+++ b/src/devices/bus/acorn/system/vib.cpp
@@ -26,8 +26,7 @@ DEFINE_DEVICE_TYPE(ACORN_VIB, acorn_vib_device, "acorn_vib", "Acorn Versatile In
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void acorn_vib_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(acorn_vib_device::device_add_mconfig)
INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set(FUNC(acorn_vib_device::irq_w));
VIA6522(config, m_via6522, XTAL(1'000'000));
@@ -38,8 +37,7 @@ void acorn_vib_device::device_add_mconfig(machine_config &config)
CENTRONICS(config, m_centronics, centronics_devices, "printer");
m_centronics->ack_handler().set(m_via6522, FUNC(via6522_device::write_ca1));
m_centronics->busy_handler().set(m_via6522, FUNC(via6522_device::write_pa7));
- output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
- m_centronics->set_output_latch(cent_data_out);
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
I8255(config, m_ppi8255, 0);
@@ -55,7 +53,7 @@ void acorn_vib_device::device_add_mconfig(machine_config &config)
CLOCK(config, m_acia_clock, 1.8432_MHz_XTAL);
m_acia_clock->signal_handler().set(FUNC(acorn_vib_device::write_acia_clock));
-}
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -96,7 +94,7 @@ void acorn_vib_device::device_reset()
address_space &space = m_bus->memspace();
space.install_readwrite_handler(0x0c00, 0x0c0f, 0, 0x10, 0, read8sm_delegate(FUNC(via6522_device::read), m_via6522.target()), write8sm_delegate(FUNC(via6522_device::write), m_via6522.target()));
- space.install_readwrite_handler(0x0c20, 0x0c21, 0, 0x1e, 0, read8sm_delegate(FUNC(acia6850_device::read), m_acia.target()), write8sm_delegate(FUNC(acia6850_device::write), m_acia.target()));
+ space.install_readwrite_handler(0x0c20, 0x0c21, 0, 0x1e, 0, read8_delegate(FUNC(acia6850_device::read), m_acia.target()), write8_delegate(FUNC(acia6850_device::write), m_acia.target()));
space.install_readwrite_handler(0x0c40, 0x0c43, 0, 0x1c, 0, read8sm_delegate(FUNC(i8255_device::read), m_ppi8255.target()), write8sm_delegate(FUNC(i8255_device::write), m_ppi8255.target()));
}
diff --git a/src/devices/bus/adam/adamlink.cpp b/src/devices/bus/adam/adamlink.cpp
index 4dc2d44b3d7..f4227273421 100644
--- a/src/devices/bus/adam/adamlink.cpp
+++ b/src/devices/bus/adam/adamlink.cpp
@@ -47,7 +47,7 @@ void adamlink_device::device_start()
// adam_bd_r - buffered data read
//-------------------------------------------------
-uint8_t adamlink_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+uint8_t adamlink_device::adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!biorq)
{
@@ -69,7 +69,7 @@ uint8_t adamlink_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, int b
// adam_bd_w - buffered data write
//-------------------------------------------------
-void adamlink_device::adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+void adamlink_device::adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!biorq)
{
diff --git a/src/devices/bus/adam/adamlink.h b/src/devices/bus/adam/adamlink.h
index 6fb07f81c6f..42fd06490f9 100644
--- a/src/devices/bus/adam/adamlink.h
+++ b/src/devices/bus/adam/adamlink.h
@@ -33,8 +33,8 @@ protected:
virtual void device_start() override;
// device_adam_expansion_slot_card_interface overrides
- virtual uint8_t adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
- virtual void adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual uint8_t adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual void adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
};
diff --git a/src/devices/bus/adam/exp.cpp b/src/devices/bus/adam/exp.cpp
index 4555ed961eb..c9d529a68ab 100644
--- a/src/devices/bus/adam/exp.cpp
+++ b/src/devices/bus/adam/exp.cpp
@@ -123,11 +123,11 @@ std::string adam_expansion_slot_device::get_default_card_software(get_default_ca
// bd_r - buffered data read
//-------------------------------------------------
-uint8_t adam_expansion_slot_device::bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+uint8_t adam_expansion_slot_device::bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (m_card != nullptr)
{
- data = m_card->adam_bd_r(offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
+ data = m_card->adam_bd_r(space, offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
}
return data;
@@ -138,11 +138,11 @@ uint8_t adam_expansion_slot_device::bd_r(offs_t offset, uint8_t data, int bmreq,
// cd_w - cartridge data write
//-------------------------------------------------
-void adam_expansion_slot_device::bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+void adam_expansion_slot_device::bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (m_card != nullptr)
{
- m_card->adam_bd_w(offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
+ m_card->adam_bd_w(space, offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
}
}
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index 618bc3d365a..063d28b4271 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -51,8 +51,8 @@ public:
auto irq() { return m_write_irq.bind(); }
// computer interface
- uint8_t bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2);
- void bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2);
+ uint8_t bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2);
+ void bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2);
// cartridge interface
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
@@ -96,8 +96,8 @@ protected:
device_adam_expansion_slot_card_interface(const machine_config &mconfig, device_t &device);
// runtime
- virtual uint8_t adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) { return data; }
- virtual void adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) { }
+ virtual uint8_t adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) { return data; }
+ virtual void adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) { }
adam_expansion_slot_device *m_slot;
diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp
index 98078003f4b..fe97b7be512 100644
--- a/src/devices/bus/adam/ide.cpp
+++ b/src/devices/bus/adam/ide.cpp
@@ -103,7 +103,7 @@ void powermate_ide_device::device_start()
// adam_bd_r - buffered data read
//-------------------------------------------------
-uint8_t powermate_ide_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+uint8_t powermate_ide_device::adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!biorq)
{
@@ -164,7 +164,7 @@ uint8_t powermate_ide_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq,
// adam_bd_w - buffered data write
//-------------------------------------------------
-void powermate_ide_device::adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+void powermate_ide_device::adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!biorq)
{
diff --git a/src/devices/bus/adam/ide.h b/src/devices/bus/adam/ide.h
index bfce0f9851f..992b66aee3d 100644
--- a/src/devices/bus/adam/ide.h
+++ b/src/devices/bus/adam/ide.h
@@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_adam_expansion_slot_card_interface overrides
- virtual uint8_t adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
- virtual void adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual uint8_t adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual void adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
private:
required_device<ata_interface_device> m_ata;
diff --git a/src/devices/bus/adam/ram.cpp b/src/devices/bus/adam/ram.cpp
index a7e79719867..2a756000dc2 100644
--- a/src/devices/bus/adam/ram.cpp
+++ b/src/devices/bus/adam/ram.cpp
@@ -49,7 +49,7 @@ void adam_ram_expansion_device::device_start()
// adam_bd_r - buffered data read
//-------------------------------------------------
-uint8_t adam_ram_expansion_device::adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+uint8_t adam_ram_expansion_device::adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!cas2)
{
@@ -64,7 +64,7 @@ uint8_t adam_ram_expansion_device::adam_bd_r(offs_t offset, uint8_t data, int bm
// adam_bd_w - buffered data write
//-------------------------------------------------
-void adam_ram_expansion_device::adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
+void adam_ram_expansion_device::adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
if (!cas2)
{
diff --git a/src/devices/bus/adam/ram.h b/src/devices/bus/adam/ram.h
index 780d51be726..80ec417f3cc 100644
--- a/src/devices/bus/adam/ram.h
+++ b/src/devices/bus/adam/ram.h
@@ -33,8 +33,8 @@ protected:
virtual void device_start() override;
// device_adam_expansion_slot_card_interface overrides
- virtual uint8_t adam_bd_r(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
- virtual void adam_bd_w(offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual uint8_t adam_bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
+ virtual void adam_bd_w(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2) override;
private:
optional_shared_ptr<uint8_t> m_ram;
diff --git a/src/devices/bus/adamnet/adamnet.h b/src/devices/bus/adamnet/adamnet.h
index 51fc46a38dd..c9090bf5482 100644
--- a/src/devices/bus/adamnet/adamnet.h
+++ b/src/devices/bus/adamnet/adamnet.h
@@ -21,6 +21,17 @@
#define ADAMNET_TAG "adamnet"
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ADAMNET_SLOT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, ADAMNET_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/adamnet/ddp.cpp b/src/devices/bus/adamnet/ddp.cpp
index ede3719c910..cf267e95a36 100644
--- a/src/devices/bus/adamnet/ddp.cpp
+++ b/src/devices/bus/adamnet/ddp.cpp
@@ -70,8 +70,7 @@ static const struct CassetteOptions adam_cassette_options =
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void adam_digital_data_pack_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(adam_digital_data_pack_device::device_add_mconfig)
M6801(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &adam_digital_data_pack_device::adam_ddp_mem);
m_maincpu->out_p1_cb().set(FUNC(adam_digital_data_pack_device::p1_w));
@@ -80,18 +79,18 @@ void adam_digital_data_pack_device::device_add_mconfig(machine_config &config)
// Port 3 = Multiplexed Address/Data
m_maincpu->in_p4_cb().set(FUNC(adam_digital_data_pack_device::p4_r));
- CASSETTE(config, m_ddp0);
- m_ddp0->set_formats(coleco_adam_cassette_formats);
- m_ddp0->set_create_opts(&adam_cassette_options);
- m_ddp0->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
- m_ddp0->set_interface("adam_cass");
-
- CASSETTE(config, m_ddp1);
- m_ddp1->set_formats(coleco_adam_cassette_formats);
- m_ddp1->set_create_opts(&adam_cassette_options);
- m_ddp1->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
- m_ddp1->set_interface("adam_cass");
-}
+ MCFG_CASSETTE_ADD("cassette")
+ MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats)
+ MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options)
+ MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ MCFG_CASSETTE_INTERFACE("adam_cass")
+
+ MCFG_CASSETTE_ADD("cassette2")
+ MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats)
+ MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options)
+ MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
+ MCFG_CASSETTE_INTERFACE("adam_cass")
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp
index 6ad84bbed7c..612bb11c547 100644
--- a/src/devices/bus/adamnet/spi.cpp
+++ b/src/devices/bus/adamnet/spi.cpp
@@ -64,8 +64,7 @@ void adam_spi_device::adam_spi_mem(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void adam_spi_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(adam_spi_device::device_add_mconfig)
M6801(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &adam_spi_device::adam_spi_mem);
m_maincpu->in_p2_cb().set(FUNC(adam_spi_device::p2_r));
@@ -79,9 +78,8 @@ void adam_spi_device::device_add_mconfig(machine_config &config)
centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
centronics.set_data_input_buffer("cent_data_in");
INPUT_BUFFER(config, "cent_data_in");
- output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
- centronics.set_output_latch(cent_data_out);
-}
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+MACHINE_CONFIG_END
diff --git a/src/devices/bus/amiga/zorro/a2052.cpp b/src/devices/bus/amiga/zorro/a2052.cpp
index 515c568c019..f2cef15b32e 100644
--- a/src/devices/bus/amiga/zorro/a2052.cpp
+++ b/src/devices/bus/amiga/zorro/a2052.cpp
@@ -81,10 +81,10 @@ void a2052_device::autoconfig_base_address(offs_t address)
logerror("-> installing a2052\n");
// stop responding to default autoconfig
- m_slot->space().unmap_readwrite(0xe80000, 0xe8007f);
+ m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);
// install access to the rom space
- m_slot->space().install_ram(address, address + m_ram.size()*2 - 1, &m_ram[0]);
+ m_slot->m_space->install_ram(address, address + m_ram.size()*2 - 1, &m_ram[0]);
// we're done
m_slot->cfgout_w(0);
@@ -128,7 +128,7 @@ WRITE_LINE_MEMBER( a2052_device::cfgin_w )
autoconfig_can_shutup(true); // ?
// install autoconfig handler
- m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f,
+ m_slot->m_space->install_readwrite_handler(0xe80000, 0xe8007f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
}
diff --git a/src/devices/bus/amiga/zorro/a2058.cpp b/src/devices/bus/amiga/zorro/a2058.cpp
index e8d6e8c28fb..8fc58669d14 100644
--- a/src/devices/bus/amiga/zorro/a2058.cpp
+++ b/src/devices/bus/amiga/zorro/a2058.cpp
@@ -89,10 +89,10 @@ void a2058_device::autoconfig_base_address(offs_t address)
logerror("-> installing a2058\n");
// stop responding to default autoconfig
- m_slot->space().unmap_readwrite(0xe80000, 0xe8007f);
+ m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);
// install access to the rom space
- m_slot->space().install_ram(address, address + (m_ram_size << 20) - 1, m_ram.get());
+ m_slot->m_space->install_ram(address, address + (m_ram_size << 20) - 1, m_ram.get());
// we're done
m_slot->cfgout_w(0);
@@ -140,7 +140,7 @@ WRITE_LINE_MEMBER( a2058_device::cfgin_w )
autoconfig_can_shutup(true); // ?
// install autoconfig handler
- m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f,
+ m_slot->m_space->install_readwrite_handler(0xe80000, 0xe8007f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
}
diff --git a/src/devices/bus/amiga/zorro/a2065.cpp b/src/devices/bus/amiga/zorro/a2065.cpp
index b1b747594cc..9eb0d835db2 100644
--- a/src/devices/bus/amiga/zorro/a2065.cpp
+++ b/src/devices/bus/amiga/zorro/a2065.cpp
@@ -81,20 +81,20 @@ void a2065_device::autoconfig_base_address(offs_t address)
LOG("-> installing a2065\n");
// stop responding to default autoconfig
- m_slot->space().unmap_readwrite(0xe80000, 0xe8007f);
+ m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);
// install autoconfig handler to new location
- m_slot->space().install_readwrite_handler(address, address + 0x7f,
+ m_slot->m_space->install_readwrite_handler(address, address + 0x7f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
// install access to lance registers
- m_slot->space().install_readwrite_handler(address + 0x4000, address + 0x4003,
+ m_slot->m_space->install_readwrite_handler(address + 0x4000, address + 0x4003,
read16_delegate(FUNC(am7990_device::regs_r), &(*m_lance)),
write16_delegate(FUNC(am7990_device::regs_w), &(*m_lance)), 0xffff);
// install access to onboard ram (32k)
- m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8000 + 0x7fff,
+ m_slot->m_space->install_readwrite_handler(address + 0x8000, address + 0x8000 + 0x7fff,
read16_delegate(FUNC(a2065_device::host_ram_r), this),
write16_delegate(FUNC(a2065_device::host_ram_w), this), 0xffff);
@@ -123,7 +123,7 @@ WRITE_LINE_MEMBER( a2065_device::cfgin_w )
autoconfig_can_shutup(true); // ?
// install autoconfig handler
- m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f,
+ m_slot->m_space->install_readwrite_handler(0xe80000, 0xe8007f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
}
diff --git a/src/devices/bus/amiga/zorro/a2232.cpp b/src/devices/bus/amiga/zorro/a2232.cpp
index 24020d7a25d..41334067412 100644
--- a/src/devices/bus/amiga/zorro/a2232.cpp
+++ b/src/devices/bus/amiga/zorro/a2232.cpp
@@ -188,25 +188,25 @@ void a2232_device::autoconfig_base_address(offs_t address)
logerror("-> installing a2232\n");
// stop responding to default autoconfig
- m_slot->space().unmap_readwrite(0xe80000, 0xe8007f);
+ m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);
- m_slot->space().install_readwrite_handler(address, address + 0x3fff,
+ m_slot->m_space->install_readwrite_handler(address, address + 0x3fff,
read16_delegate(FUNC(a2232_device::shared_ram_r), this),
write16_delegate(FUNC(a2232_device::shared_ram_w), this), 0xffff);
- m_slot->space().install_readwrite_handler(address + 0x4000, address + 0x4001,
+ m_slot->m_space->install_readwrite_handler(address + 0x4000, address + 0x4001,
read16_delegate(FUNC(a2232_device::irq_ack_r), this),
write16_delegate(FUNC(a2232_device::irq_ack_w), this), 0xffff);
- m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8001,
+ m_slot->m_space->install_readwrite_handler(address + 0x8000, address + 0x8001,
read16_delegate(FUNC(a2232_device::reset_low_r), this),
write16_delegate(FUNC(a2232_device::reset_low_w), this), 0xffff);
- m_slot->space().install_readwrite_handler(address + 0xa000, address + 0xa001,
+ m_slot->m_space->install_readwrite_handler(address + 0xa000, address + 0xa001,
read16_delegate(FUNC(a2232_device::irq_r), this),
write16_delegate(FUNC(a2232_device::irq_w), this), 0xffff);
- m_slot->space().install_readwrite_handler(address + 0xc000, address + 0xc001,
+ m_slot->m_space->install_readwrite_handler(address + 0xc000, address + 0xc001,
read16_delegate(FUNC(a2232_device::reset_high_r), this),
write16_delegate(FUNC(a2232_device::reset_high_w), this), 0xffff);
@@ -236,7 +236,7 @@ WRITE_LINE_MEMBER( a2232_device::cfgin_w )
autoconfig_can_shutup(true); // ?
// install autoconfig handler
- m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f,
+ m_slot->m_space->install_readwrite_handler(0xe80000, 0xe8007f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
}
@@ -344,13 +344,13 @@ WRITE16_MEMBER( a2232_device::reset_high_w )
template<int N>
READ8_MEMBER( a2232_device::acia_r )
{
- return m_acia[N]->read(offset >> 1);
+ return m_acia[N]->read(space, offset >> 1);
}
template<int N>
WRITE8_MEMBER( a2232_device::acia_w )
{
- m_acia[N]->write(offset >> 1, data);
+ m_acia[N]->write(space, offset >> 1, data);
}
@@ -360,12 +360,12 @@ WRITE8_MEMBER( a2232_device::acia_w )
READ8_MEMBER( a2232_device::cia_r )
{
- return m_cia->read(offset >> 1);
+ return m_cia->read(space, offset >> 1);
}
WRITE8_MEMBER( a2232_device::cia_w )
{
- m_cia->write(offset >> 1, data);
+ m_cia->write(space, offset >> 1, data);
}
READ8_MEMBER( a2232_device::cia_port_a_r )
diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp
index 045a0eab7c8..32328b2f944 100644
--- a/src/devices/bus/amiga/zorro/a590.cpp
+++ b/src/devices/bus/amiga/zorro/a590.cpp
@@ -10,9 +10,8 @@
#include "emu.h"
#include "a590.h"
-#include "machine/nscsi_bus.h"
-#include "machine/nscsi_cd.h"
-#include "machine/nscsi_hd.h"
+#include "bus/scsi/scsi.h"
+#include "bus/scsi/scsihd.h"
//**************************************************************************
@@ -115,19 +114,6 @@ ioport_constructor a2091_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void dmac_hdc_device::scsi_devices(device_slot_interface &device)
-{
- device.option_add("cdrom", NSCSI_CDROM);
- device.option_add("harddisk", NSCSI_HARDDISK);
-}
-
-void dmac_hdc_device::wd33c93(device_t *device)
-{
- device->set_clock(10000000);
- downcast<wd33c93a_device *>(device)->irq_cb().set(*this, FUNC(dmac_hdc_device::scsi_irq_w));
- downcast<wd33c93a_device *>(device)->drq_cb().set(*this, FUNC(dmac_hdc_device::scsi_drq_w));
-}
-
void dmac_hdc_device::device_add_mconfig(machine_config &config)
{
amiga_dmac_device &dmac(AMIGA_DMAC(config, "dmac", 0));
@@ -136,15 +122,12 @@ void dmac_hdc_device::device_add_mconfig(machine_config &config)
dmac.int_handler().set(FUNC(dmac_hdc_device::dmac_int_w));
dmac.cfgout_handler().set(FUNC(dmac_hdc_device::dmac_cfgout_w));
- NSCSI_BUS(config, "scsi", 0);
- 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);
- NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93", WD33C93A)
- .machine_config([this](device_t *device) { wd33c93(device); });
+ scsi_port_device &scsi(SCSI_PORT(config, "scsi"));
+ scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1));
+
+ wd33c93_device &scsi_ctrl(WD33C93(config, "wd33c93"));
+ scsi_ctrl.set_scsi_port("scsi");
+ scsi_ctrl.irq_cb().set(FUNC(dmac_hdc_device::scsi_irq_w));
}
@@ -222,7 +205,7 @@ dmac_hdc_device::dmac_hdc_device(const machine_config &mconfig, device_type type
device_t(mconfig, type, tag, owner, clock),
m_int6(false),
m_dmac(*this, "dmac"),
- m_wdc(*this, "scsi:7:wd33c93")
+ m_wdc(*this, "wd33c93")
{
}
@@ -260,7 +243,7 @@ void a590_device::device_start()
set_zorro_device();
// setup DMAC
- m_dmac->set_address_space(&m_slot->space());
+ m_dmac->set_address_space(m_slot->m_space);
m_dmac->set_rom(memregion("bootrom")->base());
}
@@ -269,7 +252,7 @@ void a2091_device::device_start()
set_zorro_device();
// setup DMAC
- m_dmac->set_address_space(&m_slot->space());
+ m_dmac->set_address_space(m_slot->m_space);
m_dmac->set_rom(memregion("bootrom")->base());
}
@@ -344,8 +327,8 @@ READ8_MEMBER( dmac_hdc_device::dmac_scsi_r )
{
switch (offset)
{
- case 0x48: return m_wdc->indir_addr_r();
- case 0x49: return m_wdc->indir_reg_r();
+ case 0x48: return m_wdc->read(space, 0);
+ case 0x49: return m_wdc->read(space, 1);
}
return 0xff;
@@ -355,8 +338,8 @@ WRITE8_MEMBER( dmac_hdc_device::dmac_scsi_w )
{
switch (offset)
{
- case 0x48: m_wdc->indir_addr_w(data); break;
- case 0x49: m_wdc->indir_reg_w(data); break;
+ case 0x48: m_wdc->write(space, 0, data); break;
+ case 0x49: m_wdc->write(space, 1, data); break;
}
}
@@ -373,8 +356,3 @@ WRITE_LINE_MEMBER( dmac_hdc_device::scsi_irq_w )
// should be or'ed with xt-ide IRQ
m_dmac->intx_w(state);
}
-
-WRITE_LINE_MEMBER( dmac_hdc_device::scsi_drq_w )
-{
- m_dmac->xdreq_w(state);
-}
diff --git a/src/devices/bus/amiga/zorro/a590.h b/src/devices/bus/amiga/zorro/a590.h
index 62ea3bd189f..cf051fd30dc 100644
--- a/src/devices/bus/amiga/zorro/a590.h
+++ b/src/devices/bus/amiga/zorro/a590.h
@@ -15,7 +15,7 @@
#include "zorro.h"
#include "machine/dmac.h"
-#include "machine/wd33c9x.h"
+#include "machine/wd33c93.h"
//**************************************************************************
@@ -51,7 +51,7 @@ protected:
// sub-devices
required_device<amiga_dmac_device> m_dmac;
- required_device<wd33c93a_device> m_wdc;
+ required_device<wd33c93_device> m_wdc;
std::vector<uint8_t> m_ram;
@@ -61,10 +61,6 @@ private:
DECLARE_WRITE_LINE_MEMBER( dmac_int_w );
DECLARE_WRITE_LINE_MEMBER( dmac_cfgout_w ) { cfgout_w(state); }
DECLARE_WRITE_LINE_MEMBER( scsi_irq_w );
- DECLARE_WRITE_LINE_MEMBER( scsi_drq_w );
-
- static void scsi_devices(device_slot_interface &device);
- void wd33c93(device_t *device);
};
// ======================> a590_device
diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp
index 376e2824660..b82f2d8818b 100644
--- a/src/devices/bus/amiga/zorro/buddha.cpp
+++ b/src/devices/bus/amiga/zorro/buddha.cpp
@@ -143,18 +143,18 @@ void buddha_device::autoconfig_base_address(offs_t address)
logerror("-> installing buddha\n");
// stop responding to default autoconfig
- m_slot->space().unmap_readwrite(0xe80000, 0xe8007f);
+ m_slot->m_space->unmap_readwrite(0xe80000, 0xe8007f);
// buddha registers
- m_slot->space().install_device(address, address + 0xfff, *this, &buddha_device::mmio_map);
+ m_slot->m_space->install_device(address, address + 0xfff, *this, &buddha_device::mmio_map);
// install autoconfig handler to new location
- m_slot->space().install_readwrite_handler(address, address + 0x7f,
+ m_slot->m_space->install_readwrite_handler(address, address + 0x7f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
// install access to the rom space
- m_slot->space().install_rom(address + 0x1000, address + 0xffff, memregion("bootrom")->base() + 0x1000);
+ m_slot->m_space->install_rom(address + 0x1000, address + 0xffff, memregion("bootrom")->base() + 0x1000);
// we're done
m_slot->cfgout_w(0);
@@ -181,7 +181,7 @@ WRITE_LINE_MEMBER( buddha_device::cfgin_w )
autoconfig_rom_vector(0x1000);
// install autoconfig handler
- m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f,
+ m_slot->m_space->install_readwrite_handler(0xe80000, 0xe8007f,
read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)),
write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff);
}
@@ -231,8 +231,8 @@ READ16_MEMBER( buddha_device::ide_0_interrupt_r )
data = m_ide_0_interrupt << 15;
-// if (VERBOSE)
-// logerror("ide_0_interrupt_r %04x [mask = %04x]\n", data, mem_mask);
+ if (VERBOSE && 0)
+ logerror("ide_0_interrupt_r %04x [mask = %04x]\n", data, mem_mask);
return data;
}
@@ -243,8 +243,8 @@ READ16_MEMBER( buddha_device::ide_1_interrupt_r )
data = m_ide_1_interrupt << 15;
-// if (VERBOSE)
-// logerror("ide_1_interrupt_r %04x [mask = %04x]\n", data, mem_mask);
+ if (VERBOSE && 0)
+ logerror("ide_1_interrupt_r %04x [mask = %04x]\n", data, mem_mask);
return data;
}
diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp
index b4f06507d55..fec5d745015 100644
--- a/src/devices/bus/amiga/zorro/zorro.cpp
+++ b/src/devices/bus/amiga/zorro/zorro.cpp
@@ -30,7 +30,7 @@ zorro_slot_device::zorro_slot_device(const machine_config &mconfig, const char *
zorro_slot_device::zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
device_slot_interface(mconfig, *this),
- m_zorro_bus(*this, finder_base::DUMMY_TAG)
+ m_zorro_tag(nullptr)
{
}
@@ -43,7 +43,10 @@ void zorro_slot_device::device_start()
device_zorro_card_interface *dev = dynamic_cast<device_zorro_card_interface *>(get_card_device());
if (dev)
+ {
+ zorro_device *m_zorro_bus = downcast<zorro_device *>(m_owner->subdevice(m_zorro_tag));
m_zorro_bus->add_card(dev);
+ }
}
@@ -57,7 +60,8 @@ void zorro_slot_device::device_start()
zorro_device::zorro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
- m_space(*this, finder_base::DUMMY_TAG, -1),
+ m_space(nullptr),
+ m_cputag(nullptr),
m_ovr_handler(*this),
m_int2_handler(*this),
m_int6_handler(*this)
@@ -65,27 +69,21 @@ zorro_device::zorro_device(const machine_config &mconfig, device_type type, cons
}
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
+// device_start - device-specific startup
//-------------------------------------------------
-void zorro_device::device_resolve_objects()
+void zorro_device::device_start()
{
+ // get address space
+ device_t *cpu = machine().device(m_cputag);
+ m_space = &cpu->memory().space(AS_PROGRAM);
+
// resolve callbacks
m_ovr_handler.resolve_safe();
m_int2_handler.resolve_safe();
m_int6_handler.resolve_safe();
}
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void zorro_device::device_start()
-{
-}
-
// from slot device
WRITE_LINE_MEMBER( zorro_device::ovr_w ) { m_ovr_handler(state); }
WRITE_LINE_MEMBER( zorro_device::int2_w ) { m_int2_handler(state); }
@@ -117,18 +115,16 @@ exp_slot_device::exp_slot_device(const machine_config &mconfig, device_type type
}
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
+// device_start - device-specific startup
//-------------------------------------------------
-void exp_slot_device::device_resolve_objects()
+void exp_slot_device::device_start()
{
// resolve callbacks
m_ipl_handler.resolve_safe();
- // call base device
- zorro_device::device_resolve_objects();
+ // call base device start
+ zorro_device::device_start();
}
//-------------------------------------------------
@@ -194,12 +190,10 @@ zorro2_device::~zorro2_device()
}
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
+// device_start - device-specific startup
//-------------------------------------------------
-void zorro2_device::device_resolve_objects()
+void zorro2_device::device_start()
{
// resolve callbacks
m_eint1_handler.resolve_safe();
@@ -207,8 +201,8 @@ void zorro2_device::device_resolve_objects()
m_eint5_handler.resolve_safe();
m_eint7_handler.resolve_safe();
- // call base device
- zorro_device::device_resolve_objects();
+ // call base device start
+ zorro_device::device_start();
}
//-------------------------------------------------
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h
index 4ad72da638b..3686f050002 100644
--- a/src/devices/bus/amiga/zorro/zorro.h
+++ b/src/devices/bus/amiga/zorro/zorro.h
@@ -145,6 +145,76 @@
//**************************************************************************
+// CONSTANTS / MACROS
+//**************************************************************************
+
+#define EXP_SLOT_TAG "exp"
+#define ZORROBUS_TAG "zorrobus"
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ZORRO_SLOT_ADD(_zorrotag, _tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, ZORRO_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
+ downcast<zorro_slot_device &>(*device).set_zorro_slot(this, _zorrotag);
+
+// ======================> expansion slot
+
+#define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \
+ device_t *temp = device; \
+ downcast<zorro_device &>(*device).set_cputag(_cputag); \
+ MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) \
+ device = temp;
+
+// callbacks
+#define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
+
+#define MCFG_EXPANSION_SLOT_INT2_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
+
+#define MCFG_EXPANSION_SLOT_INT6_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
+
+#define MCFG_EXPANSION_SLOT_IPL_HANDLER(_devcb) \
+ downcast<exp_slot_device &>(*device).set_ipl_handler(DEVCB_##_devcb);
+
+// ======================> zorro 2 bus
+
+#define MCFG_ZORRO2_ADD(_cputag) \
+ MCFG_DEVICE_ADD(ZORROBUS_TAG, ZORRO2, 0) \
+ downcast<zorro_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_ZORRO2_SLOT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_ZORRO_SLOT_ADD(ZORROBUS_TAG, _tag, _slot_intf, _def_slot)
+
+#define MCFG_ZORRO2_OVR_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_ovr_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_INT2_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_int2_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_INT6_HANDLER(_devcb) \
+ downcast<zorro_device &>(*device).set_int6_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_EINT1_HANDLER(_devcb) \
+ downcast<zorro2_device &>(*device).set_eint1_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_EINT4_HANDLER(_devcb) \
+ downcast<zorro2_device &>(*device).set_eint4_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_EINT5_HANDLER(_devcb) \
+ downcast<zorro2_device &>(*device).set_eint5_handler(DEVCB_##_devcb);
+
+#define MCFG_ZORRO2_EINT7_HANDLER(_devcb) \
+ downcast<zorro2_device &>(*device).set_eint7_handler(DEVCB_##_devcb);
+
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -152,7 +222,6 @@
class device_zorro_card_interface;
class device_exp_card_interface;
class device_zorro2_card_interface;
-class zorro_device;
// ======================> zorro slot device
@@ -161,28 +230,18 @@ 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);
- template <typename T, typename O>
- 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)
- {
- set_zorro_slot(std::forward<T>(zorrotag));
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- }
// device-level overrides
virtual void device_start() override;
// inline configuration
- template <class T> void set_zorro_slot(T &&zorro_tag) { m_zorro_bus.set_tag(zorro_tag); }
+ void set_zorro_slot(device_t *owner, const char *zorro_tag) { m_owner = owner; m_zorro_tag = zorro_tag; }
protected:
zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// configuration
- required_device<zorro_device> m_zorro_bus;
+ const char *m_zorro_tag;
};
// device type definition
@@ -194,11 +253,11 @@ class zorro_device : public device_t
{
public:
// configuration helpers
- template <class T> void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward<T>(tag), spacenum); }
+ void set_cputag(const char *tag) { m_cputag = tag; }
- auto int2_handler() { return m_int2_handler.bind(); }
- auto int6_handler() { return m_int6_handler.bind(); }
- auto ovr_handler() { return m_ovr_handler.bind(); }
+ template <class Object> devcb_base &set_int2_handler(Object &&cb) { return m_int2_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_int6_handler(Object &&cb) { return m_int6_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_ovr_handler(Object &&cb) { return m_ovr_handler.set_callback(std::forward<Object>(cb)); }
virtual void add_card(device_zorro_card_interface *card) = 0;
@@ -213,18 +272,17 @@ public:
virtual void fc_w(int code) = 0;
// access to the host space
- address_space &space() const { return *m_space; }
+ address_space *m_space;
protected:
// construction/destruction
zorro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
virtual void device_start() override;
private:
- required_address_space m_space;
+ const char *m_cputag;
devcb_write_line m_ovr_handler;
devcb_write_line m_int2_handler;
@@ -239,7 +297,7 @@ public:
// construction/destruction
exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- auto ipl_handler() { return m_ipl_handler.bind(); }
+ template <class Object> devcb_base &set_ipl_handler(Object &&cb) { return m_ipl_handler.set_callback(std::forward<Object>(cb)); }
// the expansion slot can only have a single card
virtual void add_card(device_zorro_card_interface *card) override;
@@ -254,7 +312,7 @@ protected:
exp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
+ virtual void device_start() override;
virtual void device_reset() override;
private:
@@ -275,10 +333,10 @@ public:
zorro2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~zorro2_device();
- auto eint1_handler() { return m_eint1_handler.bind(); }
- auto eint4_handler() { return m_eint4_handler.bind(); }
- auto eint5_handler() { return m_eint5_handler.bind(); }
- auto eint7_handler() { return m_eint7_handler.bind(); }
+ template <class Object> devcb_base &set_eint1_handler(Object &&cb) { return m_eint1_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_eint4_handler(Object &&cb) { return m_eint4_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_eint5_handler(Object &&cb) { return m_eint5_handler.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_eint7_handler(Object &&cb) { return m_eint7_handler.set_callback(std::forward<Object>(cb)); }
// the zorro2 bus supports multiple cards
virtual void add_card(device_zorro_card_interface *card) override;
@@ -298,7 +356,7 @@ protected:
zorro2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
+ virtual void device_start() override;
virtual void device_reset() override;
private:
diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h
index 3678124c3e9..92ebbe4ad43 100644
--- a/src/devices/bus/apf/slot.h
+++ b/src/devices/bus/apf/slot.h
@@ -59,17 +59,7 @@ class apf_cart_slot_device : public device_t,
{
public:
// construction/destruction
- template <typename T>
- 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)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- 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, uint32_t clock);
virtual ~apf_cart_slot_device();
// device-level overrides
@@ -120,4 +110,8 @@ DECLARE_DEVICE_TYPE(APF_CART_SLOT, apf_cart_slot_device)
#define APFSLOT_ROM_REGION_TAG ":cart:rom"
+#define MCFG_APF_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
+ MCFG_DEVICE_ADD(_tag, APF_CART_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
#endif // MAME_BUS_APF_SLOT_H
diff --git a/src/devices/bus/apricot/expansion/cards.cpp b/src/devices/bus/apricot/expansion/cards.cpp
index ef0243bf412..d2c35366e42 100644
--- a/src/devices/bus/apricot/expansion/cards.cpp
+++ b/src/devices/bus/apricot/expansion/cards.cpp
@@ -9,12 +9,10 @@
#include "emu.h"
#include "cards.h"
#include "ram.h"
-#include "winchester.h"
void apricot_expansion_cards(device_slot_interface &device)
{
device.option_add("128k", APRICOT_128K_RAM);
device.option_add("256k", APRICOT_256K_RAM);
device.option_add("512k", APRICOT_512K_RAM);
- device.option_add("winchester", APRICOT_WINCHESTER);
}
diff --git a/src/devices/bus/apricot/expansion/expansion.cpp b/src/devices/bus/apricot/expansion/expansion.cpp
index 5a89c9a8868..98141860782 100644
--- a/src/devices/bus/apricot/expansion/expansion.cpp
+++ b/src/devices/bus/apricot/expansion/expansion.cpp
@@ -59,16 +59,18 @@ DEFINE_DEVICE_TYPE(APRICOT_EXPANSION_BUS, apricot_expansion_bus_device, "apricot
apricot_expansion_bus_device::apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t 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),
- m_program_iop(*this, finder_base::DUMMY_TAG, -1),
- m_io_iop(*this, finder_base::DUMMY_TAG, -1),
+ m_program(nullptr),
+ m_io(nullptr),
+ m_program_iop(nullptr),
+ m_io_iop(nullptr),
m_dma1_handler(*this),
m_dma2_handler(*this),
m_ext1_handler(*this),
m_ext2_handler(*this),
m_int2_handler(*this),
- m_int3_handler(*this)
+ m_int3_handler(*this),
+ m_cpu(*this, finder_base::DUMMY_TAG),
+ m_iop(*this, finder_base::DUMMY_TAG)
{
}
@@ -97,6 +99,19 @@ void apricot_expansion_bus_device::device_start()
}
//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void apricot_expansion_bus_device::device_reset()
+{
+ m_program = &m_cpu->space(AS_PROGRAM);
+ m_io = &m_cpu->space(AS_IO);
+
+ m_program_iop = &m_iop->space(AS_PROGRAM);
+ m_io_iop = &m_iop->space(AS_IO);
+}
+
+//-------------------------------------------------
// add_card - add new card to our bus
//-------------------------------------------------
diff --git a/src/devices/bus/apricot/expansion/expansion.h b/src/devices/bus/apricot/expansion/expansion.h
index 93c529f24e3..85b0e47dc5e 100644
--- a/src/devices/bus/apricot/expansion/expansion.h
+++ b/src/devices/bus/apricot/expansion/expansion.h
@@ -89,14 +89,16 @@ class apricot_expansion_bus_device : public device_t
{
public:
// construction/destruction
+ template <typename T, typename U>
+ apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&iop_tag)
+ : apricot_expansion_bus_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ m_cpu.set_tag(std::forward<T>(cpu_tag));
+ m_iop.set_tag(std::forward<U>(iop_tag));
+ }
apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~apricot_expansion_bus_device();
- template <typename T> void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward<T>(tag), spacenum); }
- template <typename T> void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward<T>(tag), spacenum); }
- template <typename T> void set_program_iop_space(T &&tag, int spacenum) { m_program_iop.set_tag(std::forward<T>(tag), spacenum); }
- template <typename T> void set_io_iop_space(T &&tag, int spacenum) { m_io_iop.set_tag(std::forward<T>(tag), spacenum); }
-
auto dma1() { return m_dma1_handler.bind(); }
auto dma2() { return m_dma2_handler.bind(); }
auto ext1() { return m_ext1_handler.bind(); }
@@ -116,26 +118,19 @@ public:
void install_ram(offs_t addrstart, offs_t addrend, void *baseptr);
- template<typename T> void install_io_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), uint64_t unitmask = ~u64(0))
- {
- m_io->install_device(addrstart, addrend, device, map, unitmask);
-
- if (m_io_iop)
- m_io_iop->install_device(addrstart, addrend, device, map, unitmask);
- }
-
protected:
// device-level overrides
virtual void device_start() override;
+ virtual void device_reset() override;
private:
simple_list<device_apricot_expansion_card_interface> m_dev;
// address spaces we have access to
- required_address_space m_program;
- required_address_space m_io;
- optional_address_space m_program_iop;
- optional_address_space m_io_iop;
+ address_space *m_program;
+ address_space *m_io;
+ address_space *m_program_iop;
+ address_space *m_io_iop;
devcb_write_line m_dma1_handler;
devcb_write_line m_dma2_handler;
@@ -143,6 +138,10 @@ private:
devcb_write_line m_ext2_handler;
devcb_write_line m_int2_handler;
devcb_write_line m_int3_handler;
+
+ // configuration
+ required_device<cpu_device> m_cpu;
+ required_device<cpu_device> m_iop;
};
// device type definition
diff --git a/src/devices/bus/apricot/expansion/winchester.cpp b/src/devices/bus/apricot/expansion/winchester.cpp
deleted file mode 100644
index f16752b3ede..00000000000
--- a/src/devices/bus/apricot/expansion/winchester.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// license:GPL-2.0+
-// copyright-holders:Dirk Best
-/***************************************************************************
-
- ACT Apricot Winchester Controller
-
- Version Rev 9
-
-***************************************************************************/
-
-#include "emu.h"
-#include "winchester.h"
-#include "imagedev/harddriv.h"
-
-//#define LOG_GENERAL (1U << 0)
-#define LOG_REGS (1U << 1)
-#define LOG_DATA (1U << 2)
-
-//#define VERBOSE (LOG_REGS)
-//#define LOG_OUTPUT_STREAM std::cout
-
-#include "logmacro.h"
-
-#define LOGREGS(...) LOGMASKED(LOG_REGS, __VA_ARGS__)
-#define LOGDATA(...) LOGMASKED(LOG_DATA, __VA_ARGS__)
-
-
-//**************************************************************************
-// DEVICE DEFINITIONS
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(APRICOT_WINCHESTER, apricot_winchester_device, "apricot_winchester", "Apricot Winchester Controller Board")
-
-//-------------------------------------------------
-// regs - controller register i/o map
-//-------------------------------------------------
-
-void apricot_winchester_device::regs(address_map &map)
-{
- map(0x0e0, 0x0ef).rw(m_hdc, FUNC(wd1010_device::read), FUNC(wd1010_device::write)).umask16(0x00ff);
- map(0x1e0, 0x1e0).rw(FUNC(apricot_winchester_device::int_r), FUNC(apricot_winchester_device::head_w<0>)).umask16(0x00ff);
- map(0x1e2, 0x1e2).w(FUNC(apricot_winchester_device::head_w<1>)).umask16(0x00ff);
- map(0x1e4, 0x1e4).w(FUNC(apricot_winchester_device::head_w<2>)).umask16(0x00ff);
- map(0x1e6, 0x1e6).w(FUNC(apricot_winchester_device::drive_w<0>)).umask16(0x00ff);
- map(0x1e8, 0x1e8).w(FUNC(apricot_winchester_device::xferd_w)).umask16(0x00ff); // transferred
- map(0x1ea, 0x1ea).w(FUNC(apricot_winchester_device::hbcr_w)).umask16(0x00ff); // host buffer clear register
- map(0x1ec, 0x1ec).w(FUNC(apricot_winchester_device::clksel_w)).umask16(0x00ff); // buffer chip read/write clock select (host or wdc)
- map(0x1ee, 0x1ee).w(FUNC(apricot_winchester_device::drive_w<1>)).umask16(0x00ff);
- map(0x1f0, 0x1f0).rw(FUNC(apricot_winchester_device::data_r), FUNC(apricot_winchester_device::data_w)).umask16(0x00ff);
-}
-
-//-------------------------------------------------
-// device_add_mconfig - add device configuration
-//-------------------------------------------------
-
-void apricot_winchester_device::device_add_mconfig(machine_config &config)
-{
- WD1010(config, m_hdc, 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));
-
- HARDDISK(config, "hdc:0", 0);
- HARDDISK(config, "hdc:1", 0);
-}
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// apricot_winchester_device - constructor
-//-------------------------------------------------
-
-apricot_winchester_device::apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, APRICOT_WINCHESTER, tag, owner, clock),
- device_apricot_expansion_card_interface(mconfig, *this),
- m_hdc(*this, "hdc"),
- m_ram_ptr(0),
- m_int(0),
- m_drive(0),
- m_head(0),
- m_hbcr(0),
- m_clksel(0)
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void apricot_winchester_device::device_start()
-{
- // allocate 8-bit buffer ram (8k)
- m_ram = std::make_unique<uint8_t[]>(0x2000);
-
- // register for save states
- save_pointer(NAME(m_ram), 0x2000);
- save_item(NAME(m_ram_ptr));
- save_item(NAME(m_int));
- save_item(NAME(m_drive));
- save_item(NAME(m_head));
- save_item(NAME(m_hbcr));
- save_item(NAME(m_clksel));
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void apricot_winchester_device::device_reset()
-{
- m_bus->install_io_device(0x000, 0xfff, *this, &apricot_winchester_device::regs);
-}
-
-
-//**************************************************************************
-// IMPLEMENTATION
-//**************************************************************************
-
-WRITE_LINE_MEMBER( apricot_winchester_device::hdc_intrq_w )
-{
- LOGREGS("hdc_intrq_w: %d\n", state);
-
- m_int = state;
- m_bus->int2_w(state);
-}
-
-READ8_MEMBER( apricot_winchester_device::hdc_data_r )
-{
- uint8_t data = 0xff;
-
- if (m_clksel == 1)
- {
- LOGDATA("hdc_data_r[%04x]\n", m_ram_ptr);
-
- data = m_ram[m_ram_ptr];
- if (m_ram_ptr < 0x1fff)
- m_ram_ptr++;
- }
-
- return data;
-}
-
-WRITE8_MEMBER( apricot_winchester_device::hdc_data_w )
-{
- if (m_clksel == 1)
- {
- LOGDATA("hdc_data_w[%04x] = %02x\n", m_ram_ptr, data);
-
- m_ram[m_ram_ptr] = data;
- if (m_ram_ptr < 0x1fff)
- m_ram_ptr++;
- }
-}
-
-READ8_MEMBER( apricot_winchester_device::int_r )
-{
- return m_int;
-}
-
-template<int N>
-WRITE8_MEMBER( apricot_winchester_device::head_w )
-{
- m_head = (m_head & ~(1 << N)) | (BIT(data, 0) << N);
- LOGREGS("Select head: %d\n", m_head);
-}
-
-template<int N>
-WRITE8_MEMBER( apricot_winchester_device::drive_w )
-{
- m_drive = (m_drive & ~(1 << N)) | (BIT(data, 0) << N);
- LOGREGS("Select drive: %d\n", m_drive);
-
- // forward drive status to the hdc
- harddisk_image_device *drive = nullptr;
-
- switch (m_drive)
- {
- case 0:
- drive = nullptr;
- break;
- case 1:
- drive = m_hdc->subdevice<harddisk_image_device>("0");
- break;
- case 2:
- drive = m_hdc->subdevice<harddisk_image_device>("1");
- break;
- case 3:
- // both (invalid?)
- drive = nullptr;
- break;
- }
-
- m_hdc->drdy_w(drive != nullptr && drive->exists());
-}
-
-WRITE8_MEMBER( apricot_winchester_device::xferd_w )
-{
- LOGREGS("xferd_w: %02x\n", data);
-
- m_hdc->brdy_w(BIT(data, 0));
-}
-
-WRITE8_MEMBER( apricot_winchester_device::hbcr_w )
-{
- LOGREGS("hbcr_w: %02x\n", data);
-
- // reset ram pointer on high->low transition
- if (m_hbcr == 1 && data == 0)
- m_ram_ptr = 0;
-
- m_hbcr = BIT(data, 0);
-}
-
-WRITE8_MEMBER( apricot_winchester_device::clksel_w )
-{
- LOGREGS("clksel_w: %02x\n", data);
-
- m_clksel = BIT(data, 0);
-}
-
-READ8_MEMBER( apricot_winchester_device::data_r )
-{
- uint8_t data = 0xff;
-
- if (m_clksel == 0)
- {
- LOGDATA("data_r[%04x]\n", m_ram_ptr);
-
- data = m_ram[m_ram_ptr];
-
- // wrap or stop at end?
- if (m_ram_ptr < 0x1fff)
- m_ram_ptr++;
- }
-
- return data;
-}
-
-WRITE8_MEMBER( apricot_winchester_device::data_w )
-{
- if (m_clksel == 0)
- {
- LOGDATA("data_w[%04x] = %02x\n", m_ram_ptr, data);
-
- m_ram[m_ram_ptr] = data;
-
- // wrap or stop at end?
- if (m_ram_ptr < 0x1fff)
- m_ram_ptr++;
- }
-}
diff --git a/src/devices/bus/apricot/expansion/winchester.h b/src/devices/bus/apricot/expansion/winchester.h
deleted file mode 100644
index c4c82ab0585..00000000000
--- a/src/devices/bus/apricot/expansion/winchester.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// license:GPL-2.0+
-// copyright-holders:Dirk Best
-/***************************************************************************
-
- ACT Apricot Winchester Controller
-
-***************************************************************************/
-
-#ifndef MAME_BUS_APRICOT_WINCHESTER_H
-#define MAME_BUS_APRICOT_WINCHESTER_H
-
-#pragma once
-
-#include "expansion.h"
-#include "machine/wd1010.h"
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-// ======================> apricot_winchester_device
-
-class apricot_winchester_device : public device_t, public device_apricot_expansion_card_interface
-{
-public:
- // construction/destruction
- apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
-protected:
- // device-level overrides
- virtual void device_add_mconfig(machine_config &config) override;
- virtual void device_start() override;
- virtual void device_reset() override;
-
-private:
- DECLARE_WRITE_LINE_MEMBER(hdc_intrq_w);
- DECLARE_READ8_MEMBER(hdc_data_r);
- DECLARE_WRITE8_MEMBER(hdc_data_w);
- DECLARE_READ8_MEMBER(int_r);
- template<int N> DECLARE_WRITE8_MEMBER(head_w);
- template<int N> DECLARE_WRITE8_MEMBER(drive_w);
- DECLARE_WRITE8_MEMBER(xferd_w);
- DECLARE_WRITE8_MEMBER(hbcr_w);
- DECLARE_WRITE8_MEMBER(clksel_w);
- DECLARE_WRITE8_MEMBER(drvsel2_w);
- DECLARE_READ8_MEMBER(data_r);
- DECLARE_WRITE8_MEMBER(data_w);
-
- void regs(address_map &map);
-
- required_device<wd1010_device> m_hdc;
-
- std::unique_ptr<uint8_t[]> m_ram;
- unsigned m_ram_ptr;
- int m_int;
- int m_drive;
- int m_head;
- int m_hbcr;
- int m_clksel;
-};
-
-// device type definition
-DECLARE_DEVICE_TYPE(APRICOT_WINCHESTER, apricot_winchester_device)
-
-#endif // MAME_BUS_APRICOT_WINCHESTER_H
diff --git a/src/devices/bus/apricot/keyboard/hle.cpp b/src/devices/bus/apricot/keyboard/hle.cpp
index 28e98b9fb50..c8df35cd0cb 100644
--- a/src/devices/bus/apricot/keyboard/hle.cpp
+++ b/src/devices/bus/apricot/keyboard/hle.cpp
@@ -6,6 +6,7 @@
TODO:
- MicroScreen emulation
+ - Mouse emulation
- LEDs
Keyboard to System:
@@ -187,17 +188,6 @@ static INPUT_PORTS_START( keyboard )
PORT_START("row_c")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
-
- PORT_START("mouse_b")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Right Button")
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Left Button")
- PORT_BIT(0x0c, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("mouse_x")
- PORT_BIT(0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(75) PORT_KEYDELTA(5)
-
- PORT_START("mouse_y")
- PORT_BIT(0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
INPUT_PORTS_END
ioport_constructor apricot_keyboard_hle_device::device_input_ports() const
@@ -205,12 +195,9 @@ ioport_constructor apricot_keyboard_hle_device::device_input_ports() const
return INPUT_PORTS_NAME( keyboard );
}
-void apricot_keyboard_hle_device::device_add_mconfig(machine_config &config)
-{
- MSM5832(config, m_rtc, 32.768_kHz_XTAL);
-
- TIMER(config, "timer").configure_periodic(FUNC(apricot_keyboard_hle_device::mouse_callback), attotime::from_hz(60));
-}
+MACHINE_CONFIG_START(apricot_keyboard_hle_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("rtc", MSM5832, 32.768_kHz_XTAL)
+MACHINE_CONFIG_END
//**************************************************************************
@@ -227,12 +214,7 @@ apricot_keyboard_hle_device::apricot_keyboard_hle_device(const machine_config &m
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", "row_8", "row_9", "row_a", "row_b", "row_c"),
m_rtc(*this, "rtc"),
- m_mouse_b(*this, "mouse_b"),
- m_mouse_x(*this, "mouse_x"),
- m_mouse_y(*this, "mouse_y"),
- m_rtc_index(0),
- m_mouse_enabled(false),
- m_mouse_last_b(0), m_mouse_last_x(0), m_mouse_last_y(0)
+ m_rtc_index(0)
{
}
@@ -242,12 +224,6 @@ apricot_keyboard_hle_device::apricot_keyboard_hle_device(const machine_config &m
void apricot_keyboard_hle_device::device_start()
{
- // register for save states
- save_item(NAME(m_rtc_index));
- save_item(NAME(m_mouse_enabled));
- save_item(NAME(m_mouse_last_b));
- save_item(NAME(m_mouse_last_x));
- save_item(NAME(m_mouse_last_y));
}
//-------------------------------------------------
@@ -332,16 +308,6 @@ void apricot_keyboard_hle_device::received_byte(uint8_t byte)
break;
- case CMD_ENABLE_MOUSE:
- logerror("System enables mouse\n");
- m_mouse_enabled = true;
- break;
-
- case CMD_DISABLE_MOUSE:
- logerror("System disables mouse\n");
- m_mouse_enabled = false;
- break;
-
case CMD_KEYBOARD_RESET:
logerror("System requests keyboard reset\n");
transmit_byte(ACK_DIAGNOSTICS);
@@ -381,44 +347,3 @@ void apricot_keyboard_hle_device::out_w(int state)
{
device_buffered_serial_interface::rx_w(state);
}
-
-//-------------------------------------------------
-// mouse_callback - check for new mouse events
-//-------------------------------------------------
-
-TIMER_DEVICE_CALLBACK_MEMBER( apricot_keyboard_hle_device::mouse_callback )
-{
- if (m_mouse_enabled)
- {
- // get mouse state
- uint8_t buttons = m_mouse_b->read();
- uint8_t x = m_mouse_x->read();
- uint8_t y = m_mouse_y->read();
-
- // anything changed since last time?
- if (buttons != m_mouse_last_b || x != m_mouse_last_x || y != m_mouse_last_y)
- {
- // mouse header
- transmit_byte(0xef);
-
- // button state
- transmit_byte(0x70 | buttons);
-
- int8_t dx = x - m_mouse_last_x;
- int8_t dy = y - m_mouse_last_y;
-
- // y direction change
- transmit_byte(0x70 | ((dy >> 4) & 0x0f));
- transmit_byte(0x70 | ((dy >> 0) & 0x0f));
-
- // x direction change
- transmit_byte(0x70 | ((dx >> 4) & 0x0f));
- transmit_byte(0x70 | ((dx >> 0) & 0x0f));
-
- // save mouse state for next run
- m_mouse_last_b = buttons;
- m_mouse_last_x = x;
- m_mouse_last_y = y;
- }
- }
-}
diff --git a/src/devices/bus/apricot/keyboard/hle.h b/src/devices/bus/apricot/keyboard/hle.h
index c9738598a57..5565ff6026a 100644
--- a/src/devices/bus/apricot/keyboard/hle.h
+++ b/src/devices/bus/apricot/keyboard/hle.h
@@ -14,7 +14,6 @@
#include "keyboard.h"
#include "machine/keyboard.h"
#include "machine/msm5832.h"
-#include "machine/timer.h"
#include "diserial.h"
@@ -52,13 +51,9 @@ protected:
virtual void key_break(uint8_t row, uint8_t column) override;
private:
- TIMER_DEVICE_CALLBACK_MEMBER(mouse_callback);
-
enum {
CMD_REQ_TIME_AND_DATE = 0xe1,
CMD_SET_TIME_AND_DATE = 0xe4,
- CMD_ENABLE_MOUSE = 0xe5,
- CMD_DISABLE_MOUSE = 0xe6,
CMD_KEYBOARD_RESET = 0xe8
};
@@ -67,15 +62,8 @@ private:
};
required_device<msm5832_device> m_rtc;
- required_ioport m_mouse_b;
- required_ioport m_mouse_x;
- required_ioport m_mouse_y;
int m_rtc_index;
- bool m_mouse_enabled;
- uint8_t m_mouse_last_b;
- uint8_t m_mouse_last_x;
- uint8_t m_mouse_last_y;
};
diff --git a/src/devices/bus/astrocde/accessory.cpp b/src/devices/bus/astrocde/accessory.cpp
deleted file mode 100644
index fe7727b855d..00000000000
--- a/src/devices/bus/astrocde/accessory.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-
-#include "emu.h"
-#include "accessory.h"
-
-#include <cassert>
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(ASTROCADE_ACCESSORY_PORT, astrocade_accessory_port_device, "astrocade_accessory_port", "Bally Astrocade Accessory Port")
-
-
-//**************************************************************************
-// Bally Astrocade accessory interface
-//**************************************************************************
-
-device_astrocade_accessory_interface::device_astrocade_accessory_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
- , m_port(dynamic_cast<astrocade_accessory_port_device *>(device.owner()))
-{
-}
-
-device_astrocade_accessory_interface::~device_astrocade_accessory_interface()
-{
-}
-
-void device_astrocade_accessory_interface::interface_validity_check(validity_checker &valid) const
-{
- device_slot_card_interface::interface_validity_check(valid);
-
- if (device().owner() && !m_port)
- {
- osd_printf_error("Owner device %s (%s) is not an astrocade_accessory_port_device\n", device().owner()->tag(), device().owner()->name());
- }
-}
-
-void device_astrocade_accessory_interface::interface_pre_start()
-{
- device_slot_card_interface::interface_pre_start();
-
- if (m_port && !m_port->started())
- throw device_missing_dependencies();
-}
-
-
-//**************************************************************************
-// 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)
- : device_t(mconfig, ASTROCADE_ACCESSORY_PORT, tag, owner, clock)
- , device_slot_interface(mconfig, *this)
- , m_ltpen(0)
- , m_ltpen_handler(*this)
- , m_screen(*this, finder_base::DUMMY_TAG)
- , m_device(nullptr)
-{
-}
-
-astrocade_accessory_port_device::~astrocade_accessory_port_device()
-{
-}
-
-void astrocade_accessory_port_device::device_validity_check(validity_checker &valid) const
-{
- device_t *const card(get_card_device());
- if (card && !dynamic_cast<device_astrocade_accessory_interface *>(card))
- {
- osd_printf_error("Card device %s (%s) does not implement device_astrocade_accessory_interface\n", card->tag(), card->name());
- }
-}
-
-void astrocade_accessory_port_device::device_resolve_objects()
-{
- device_astrocade_accessory_interface *const card(dynamic_cast<device_astrocade_accessory_interface *>(get_card_device()));
- if (card)
- {
- m_device = card;
- m_device->set_screen(m_screen);
- }
-
- m_ltpen_handler.resolve_safe();
-}
-
-void astrocade_accessory_port_device::device_start()
-{
- device_t *const card(get_card_device());
- if (card)
- {
- if (!m_device)
- {
- throw emu_fatalerror("astrocade_accessory_port_device: card device %s (%s) does not implement device_astrocade_accessory_interface\n", card->tag(), card->name());
- }
- }
-
- save_item(NAME(m_ltpen));
-
- m_ltpen = 0;
-
- m_ltpen_handler(0);
-}
-
-#include "lightpen.h"
-
-void astrocade_accessories(device_slot_interface &device)
-{
- device.option_add("lightpen", ASTROCADE_LIGHTPEN);
-}
diff --git a/src/devices/bus/astrocde/accessory.h b/src/devices/bus/astrocde/accessory.h
deleted file mode 100644
index d745e464cd2..00000000000
--- a/src/devices/bus/astrocde/accessory.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-#ifndef MAME_BUS_ASTROCDE_ACCESSORY_H
-#define MAME_BUS_ASTROCDE_ACCESSORY_H
-
-#pragma once
-
-#include "screen.h"
-
-
-/***************************************************************************
- FORWARD DECLARATIONS
- ***************************************************************************/
-
-class device_astrocade_accessory_interface;
-
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-// ======================> astrocade_accessory_port_device
-
-class astrocade_accessory_port_device : public device_t, public device_slot_interface
-{
-public:
- // construction/destruction
- template <typename T, typename U>
- 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)
- {
- m_screen.set_tag(std::forward<T>(screen_tag));
- option_reset();
- opts(*this);
- 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);
- virtual ~astrocade_accessory_port_device();
-
- auto ltpen_handler() { return m_ltpen_handler.bind(); }
-
-protected:
- // device_t implementation
- virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD;
- virtual void device_resolve_objects() override;
- virtual void device_start() override;
-
- int m_ltpen;
- devcb_write_line m_ltpen_handler;
- required_device<screen_device> m_screen;
-
-private:
- device_astrocade_accessory_interface *m_device;
-
- friend class device_astrocade_accessory_interface;
-};
-
-
-// ======================> device_astrocade_accessory_interface
-
-class device_astrocade_accessory_interface : public device_slot_card_interface
-{
-public:
- virtual ~device_astrocade_accessory_interface();
-
- DECLARE_WRITE_LINE_MEMBER( write_ltpen ) { m_port->m_ltpen = state; m_port->m_ltpen_handler(state); }
-
-protected:
- device_astrocade_accessory_interface(machine_config const &mconfig, device_t &device);
-
- // device_interface implementation
- virtual void interface_validity_check(validity_checker &valid) const override ATTR_COLD;
- virtual void interface_pre_start() override;
-
- void set_screen(screen_device *screen) { m_screen = screen; }
- screen_device *m_screen;
-
-private:
- astrocade_accessory_port_device *const m_port;
-
- friend class astrocade_accessory_port_device;
-};
-
-
-/***************************************************************************
- FUNCTIONS
- ***************************************************************************/
-
-void astrocade_accessories(device_slot_interface &device);
-
-
-/***************************************************************************
- DEVICE TYPES
- ***************************************************************************/
-
-DECLARE_DEVICE_TYPE(ASTROCADE_ACCESSORY_PORT, astrocade_accessory_port_device)
-
-#endif // MAME_BUS_ASTROCDE_ACCESSORY_H
diff --git a/src/devices/bus/astrocde/cassette.cpp b/src/devices/bus/astrocde/cassette.cpp
deleted file mode 100644
index 3e4cc80deb8..00000000000
--- a/src/devices/bus/astrocde/cassette.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-//
-// Decoding is done in hardware by an external box, and decoded bits are fed to bit 0 of the controller port,
-// with sync bits being fed to bit 1. The current HLE is not remotely accurate to hardware, but works.
-
-#include "emu.h"
-#include "cassette.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(ASTROCADE_CASSETTE, astrocade_cassette_device, "astrocade_cass", "Bally Astrocade Cassette")
-
-
-//**************************************************************************
-// Bally Astrocade cassette input
-//**************************************************************************
-
-astrocade_cassette_device::astrocade_cassette_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, ASTROCADE_CASSETTE, tag, owner, clock)
- , device_astrocade_ctrl_interface(mconfig, *this)
- , m_cassette(*this, "cassette")
-{
-}
-
-astrocade_cassette_device::~astrocade_cassette_device()
-{
-}
-
-void astrocade_cassette_device::device_start()
-{
- save_item(NAME(m_cass_wave));
- save_item(NAME(m_cass_delta));
- save_item(NAME(m_cass_wave_ticks));
- save_item(NAME(m_cass_cycles));
- save_item(NAME(m_cass_mark));
-}
-
-void astrocade_cassette_device::device_reset()
-{
- m_cass_wave = 0.0;
- m_cass_delta = 0.0;
- m_cass_wave_ticks = 0;
- m_cass_cycles = 0;
- m_cass_mark = false;
-}
-
-uint8_t astrocade_cassette_device::read_handle()
-{
- if (m_cass_data.size())
- {
- const uint8_t data = m_cass_data.front();
- m_cass_data.pop();
- return data;
- }
- return 0;
-}
-
-uint8_t astrocade_cassette_device::read_knob()
-{
- return 0;
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(astrocade_cassette_device::check_cassette_wave)
-{
- if (m_cassette->get_state() & CASSETTE_MOTOR_DISABLED)
- return;
-
- double old_cass_wave = m_cass_wave;
- m_cass_wave = m_cassette->input();
-
- bool cycled = false;
- if (old_cass_wave != m_cass_wave)
- {
- double old_delta = m_cass_delta;
- m_cass_delta = m_cass_wave - old_cass_wave;
- if (old_delta < 0.0 && m_cass_delta > 0.0)
- {
- cycled = true;
- }
- }
-
- if (cycled)
- {
- m_cass_mark = m_cass_wave_ticks <= 30;
-
- m_cass_wave_ticks = 0;
-
- m_cass_cycles++;
- if (m_cass_mark)
- {
- if (m_cass_cycles >= 8)
- {
- m_cass_data.push(1);
- m_cass_cycles = 0;
- }
- }
- else
- {
- if (m_cass_cycles >= 4)
- {
- m_cass_data.push(0);
- m_cass_cycles = 0;
- }
- }
- }
-
- m_cass_wave_ticks++;
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(astrocade_cassette_device::pulse_cassette_clock)
-{
- if (m_cass_data.size())
- {
- write_ltpen(1);
- write_ltpen(0);
- }
-}
-
-void astrocade_cassette_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_cassette);
- m_cassette->set_default_state(CASSETTE_STOPPED);
- m_cassette->set_interface("astrocade_cass");
-
- TIMER(config, "kcs_hle").configure_periodic(FUNC(astrocade_cassette_device::check_cassette_wave), attotime::from_hz(48000));
- TIMER(config, "kcs_clk").configure_periodic(FUNC(astrocade_cassette_device::pulse_cassette_clock), attotime::from_hz(300));
-}
diff --git a/src/devices/bus/astrocde/cassette.h b/src/devices/bus/astrocde/cassette.h
deleted file mode 100644
index d36e8a1bfd7..00000000000
--- a/src/devices/bus/astrocde/cassette.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-#ifndef MAME_BUS_ASTROCDE_CASSETTE_H
-#define MAME_BUS_ASTROCDE_CASSETTE_H
-
-#pragma once
-
-#include "ctrl.h"
-#include "imagedev/cassette.h"
-#include "machine/timer.h"
-
-#include <queue>
-
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-// ======================> astrocade_cassette_device
-
-class astrocade_cassette_device : public device_t,
- public device_astrocade_ctrl_interface
-{
-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);
- virtual ~astrocade_cassette_device();
-
- // device_astrocade_ctrl_interface implementation
- virtual uint8_t read_handle() override;
- virtual uint8_t read_knob() override;
-
-protected:
- // device_t implementation
- virtual void device_start() override;
- virtual void device_reset() override;
- virtual void device_add_mconfig(machine_config &config) override;
-
- TIMER_DEVICE_CALLBACK_MEMBER(check_cassette_wave);
- TIMER_DEVICE_CALLBACK_MEMBER(pulse_cassette_clock);
-
-private:
- required_device<cassette_image_device> m_cassette;
- double m_cass_wave;
- double m_cass_delta;
- uint32_t m_cass_wave_ticks;
- uint32_t m_cass_cycles;
- bool m_cass_mark;
- std::queue<uint8_t> m_cass_data;
-};
-
-
-/***************************************************************************
- DEVICE TYPES
- ***************************************************************************/
-
-DECLARE_DEVICE_TYPE(ASTROCADE_CASSETTE, astrocade_cassette_device)
-
-#endif // MAME_BUS_ASTROCDE_CASSETTE_H
diff --git a/src/devices/bus/astrocde/ctrl.cpp b/src/devices/bus/astrocde/ctrl.cpp
deleted file mode 100644
index 89cd60ca6a5..00000000000
--- a/src/devices/bus/astrocde/ctrl.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-
-#include "emu.h"
-#include "ctrl.h"
-
-#include <cassert>
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(ASTROCADE_CTRL_PORT, astrocade_ctrl_port_device, "astrocade_ctrl_port", "Bally Astrocade Control Port")
-
-
-//**************************************************************************
-// Bally Astrocade controller interface
-//**************************************************************************
-
-device_astrocade_ctrl_interface::device_astrocade_ctrl_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
- , m_port(dynamic_cast<astrocade_ctrl_port_device *>(device.owner()))
-{
-}
-
-device_astrocade_ctrl_interface::~device_astrocade_ctrl_interface()
-{
-}
-
-void device_astrocade_ctrl_interface::interface_validity_check(validity_checker &valid) const
-{
- device_slot_card_interface::interface_validity_check(valid);
-
- if (device().owner() && !m_port)
- {
- osd_printf_error("Owner device %s (%s) is not an astrocade_ctrl_port_device\n", device().owner()->tag(), device().owner()->name());
- }
-}
-
-void device_astrocade_ctrl_interface::interface_pre_start()
-{
- device_slot_card_interface::interface_pre_start();
-
- if (m_port && !m_port->started())
- throw device_missing_dependencies();
-}
-
-
-//**************************************************************************
-// 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)
- : device_t(mconfig, ASTROCADE_CTRL_PORT, tag, owner, clock)
- , device_slot_interface(mconfig, *this)
- , m_ltpen(0)
- , m_ltpen_handler(*this)
- , m_device(nullptr)
-{
-}
-
-astrocade_ctrl_port_device::~astrocade_ctrl_port_device()
-{
-}
-
-void astrocade_ctrl_port_device::device_validity_check(validity_checker &valid) const
-{
- device_t *const card(get_card_device());
- if (card && !dynamic_cast<device_astrocade_ctrl_interface *>(card))
- {
- osd_printf_error("Card device %s (%s) does not implement device_astrocade_ctrl_interface\n", card->tag(), card->name());
- }
-}
-
-void astrocade_ctrl_port_device::device_resolve_objects()
-{
- device_astrocade_ctrl_interface *const card(dynamic_cast<device_astrocade_ctrl_interface *>(get_card_device()));
- if (card)
- m_device = card;
-
- m_ltpen_handler.resolve_safe();
-}
-
-void astrocade_ctrl_port_device::device_start()
-{
- device_t *const card(get_card_device());
- if (card)
- {
- if (!m_device)
- {
- throw emu_fatalerror("astrocade_ctrl_port_device: card device %s (%s) does not implement device_astrocade_ctrl_interface\n", card->tag(), card->name());
- }
- }
-
- save_item(NAME(m_ltpen));
-
- m_ltpen = 0;
-
- m_ltpen_handler(0);
-}
-
-uint8_t astrocade_ctrl_port_device::read_handle()
-{
- return m_device ? m_device->read_handle() : 0;
-}
-
-uint8_t astrocade_ctrl_port_device::read_knob()
-{
- return m_device ? m_device->read_knob() : 0;
-}
-
-#include "joy.h"
-#include "cassette.h"
-
-void astrocade_controllers(device_slot_interface &device)
-{
- device.option_add("joy", ASTROCADE_JOY);
- device.option_add("cassette", ASTROCADE_CASSETTE);
-}
diff --git a/src/devices/bus/astrocde/ctrl.h b/src/devices/bus/astrocde/ctrl.h
deleted file mode 100644
index 0cc34ea4dcc..00000000000
--- a/src/devices/bus/astrocde/ctrl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-#ifndef MAME_BUS_ASTROCDE_CTRL_H
-#define MAME_BUS_ASTROCDE_CTRL_H
-
-#pragma once
-
-
-/***************************************************************************
- FORWARD DECLARATIONS
- ***************************************************************************/
-
-class device_astrocade_ctrl_interface;
-
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-// ======================> astrocade_ctrl_port_device
-
-class astrocade_ctrl_port_device : public device_t, public device_slot_interface
-{
-public:
- // construction/destruction
- template <typename T>
- 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)
- {
- 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);
- virtual ~astrocade_ctrl_port_device();
-
- auto ltpen_handler() { return m_ltpen_handler.bind(); }
-
- uint8_t read_handle();
- uint8_t read_knob();
-
-protected:
- // device_t implementation
- virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD;
- virtual void device_resolve_objects() override;
- virtual void device_start() override;
-
- int m_ltpen;
- devcb_write_line m_ltpen_handler;
-
-private:
- device_astrocade_ctrl_interface *m_device;
-
- friend class device_astrocade_ctrl_interface;
-};
-
-
-// ======================> device_astrocade_ctrl_interface
-
-class device_astrocade_ctrl_interface : public device_slot_card_interface
-{
-public:
- virtual ~device_astrocade_ctrl_interface();
-
- virtual uint8_t read_handle() { return 0; }
- virtual uint8_t read_knob() { return 0; }
-
- DECLARE_WRITE_LINE_MEMBER( write_ltpen ) { m_port->m_ltpen = state; m_port->m_ltpen_handler(state); }
-
-protected:
- device_astrocade_ctrl_interface(machine_config const &mconfig, device_t &device);
-
- // device_interface implementation
- virtual void interface_validity_check(validity_checker &valid) const override ATTR_COLD;
- virtual void interface_pre_start() override;
-
-private:
- astrocade_ctrl_port_device *const m_port;
-
- friend class astrocade_ctrl_port_device;
-};
-
-
-/***************************************************************************
- FUNCTIONS
- ***************************************************************************/
-
-void astrocade_controllers(device_slot_interface &device);
-
-
-/***************************************************************************
- DEVICE TYPES
- ***************************************************************************/
-
-DECLARE_DEVICE_TYPE(ASTROCADE_CTRL_PORT, astrocade_ctrl_port_device)
-
-#endif // MAME_BUS_ASTROCDE_CTRL_H
diff --git a/src/devices/bus/astrocde/exp.cpp b/src/devices/bus/astrocde/exp.cpp
index 9fe3c9f3fda..40b6fbecbc4 100644
--- a/src/devices/bus/astrocde/exp.cpp
+++ b/src/devices/bus/astrocde/exp.cpp
@@ -74,14 +74,6 @@ READ8_MEMBER(astrocade_exp_device::read)
return 0xff;
}
-READ8_MEMBER(astrocade_exp_device::read_io)
-{
- if (m_card)
- return m_card->read_io(space, offset);
- else
- return 0xff;
-}
-
/*-------------------------------------------------
write
-------------------------------------------------*/
@@ -91,9 +83,3 @@ WRITE8_MEMBER(astrocade_exp_device::write)
if (m_card)
m_card->write(space, offset, data);
}
-
-WRITE8_MEMBER(astrocade_exp_device::write_io)
-{
- if (m_card)
- m_card->write_io(space, offset, data);
-}
diff --git a/src/devices/bus/astrocde/exp.h b/src/devices/bus/astrocde/exp.h
index a01db130974..e6c97862224 100644
--- a/src/devices/bus/astrocde/exp.h
+++ b/src/devices/bus/astrocde/exp.h
@@ -14,8 +14,6 @@ public:
// reading and writing
virtual DECLARE_READ8_MEMBER(read) { return 0xff; }
virtual DECLARE_WRITE8_MEMBER(write) { }
- virtual DECLARE_READ8_MEMBER(read_io) { return 0xff; }
- virtual DECLARE_WRITE8_MEMBER(write_io) { }
protected:
device_astrocade_card_interface(const machine_config &mconfig, device_t &device);
@@ -48,8 +46,6 @@ public:
// reading and writing
virtual DECLARE_READ8_MEMBER(read);
virtual DECLARE_WRITE8_MEMBER(write);
- virtual DECLARE_READ8_MEMBER(read_io);
- virtual DECLARE_WRITE8_MEMBER(write_io);
protected:
bool m_card_mounted;
diff --git a/src/devices/bus/astrocde/joy.cpp b/src/devices/bus/astrocde/joy.cpp
deleted file mode 100644
index cbf75da0c5c..00000000000
--- a/src/devices/bus/astrocde/joy.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-
-#include "emu.h"
-#include "joy.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(ASTROCADE_JOY, astrocade_joy_device, "astrocade_joy", "Bally Astrocade Joystick")
-
-
-//**************************************************************************
-// Bally Astrocade joystick control
-//**************************************************************************
-
-astrocade_joy_device::astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, ASTROCADE_JOY, tag, owner, clock)
- , device_astrocade_ctrl_interface(mconfig, *this)
- , m_handle(*this, "HANDLE")
- , m_knob(*this, "KNOB")
-{
-}
-
-astrocade_joy_device::~astrocade_joy_device()
-{
-}
-
-uint8_t astrocade_joy_device::read_handle()
-{
- return m_handle->read();
-}
-
-uint8_t astrocade_joy_device::read_knob()
-{
- return m_knob->read();
-}
-
-static INPUT_PORTS_START( astrocade_joy )
- PORT_START("HANDLE")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_8WAY
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_8WAY
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_8WAY
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_8WAY
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1)
- PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("KNOB")
- PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X)
-INPUT_PORTS_END
-
-ioport_constructor astrocade_joy_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME( astrocade_joy );
-}
diff --git a/src/devices/bus/astrocde/joy.h b/src/devices/bus/astrocde/joy.h
deleted file mode 100644
index bb8f755c845..00000000000
--- a/src/devices/bus/astrocde/joy.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-#ifndef MAME_BUS_ASTROCDE_JOY_H
-#define MAME_BUS_ASTROCDE_JOY_H
-
-#pragma once
-
-#include "ctrl.h"
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-// ======================> astrocade_joy_device
-
-class astrocade_joy_device : public device_t,
- public device_astrocade_ctrl_interface
-{
-public:
- // construction/destruction
- astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
- virtual ~astrocade_joy_device();
-
- // device_astrocade_ctrl_interface implementation
- virtual uint8_t read_handle() override;
- virtual uint8_t read_knob() override;
-
-protected:
- // device_t implementation
- virtual ioport_constructor device_input_ports() const override;
- virtual void device_start() override { }
-
-private:
- required_ioport m_handle;
- required_ioport m_knob;
-};
-
-
-/***************************************************************************
- DEVICE TYPES
- ***************************************************************************/
-
-DECLARE_DEVICE_TYPE(ASTROCADE_JOY, astrocade_joy_device)
-
-#endif // MAME_BUS_ASTROCDE_JOY_H
diff --git a/src/devices/bus/astrocde/lightpen.cpp b/src/devices/bus/astrocde/lightpen.cpp
deleted file mode 100644
index e31eed122be..00000000000
--- a/src/devices/bus/astrocde/lightpen.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-
-#include "emu.h"
-#include "lightpen.h"
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(ASTROCADE_LIGHTPEN, astrocade_lightpen_device, "astrocade_lightpen", "Bally Astrocade Light Pen")
-
-
-//**************************************************************************
-// Bally Astrocade light pen input
-//**************************************************************************
-
-astrocade_lightpen_device::astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, ASTROCADE_LIGHTPEN, tag, owner, clock)
- , device_astrocade_accessory_interface(mconfig, *this)
- , m_trigger(*this, "TRIGGER")
- , m_lightx(*this, "LIGHTX")
- , m_lighty(*this, "LIGHTY")
- , m_pen_timer(nullptr)
-{
-}
-
-astrocade_lightpen_device::~astrocade_lightpen_device()
-{
-}
-
-void astrocade_lightpen_device::device_start()
-{
- m_pen_timer = timer_alloc(TIMER_TRIGGER);
-
- save_item(NAME(m_retrigger));
-}
-
-void astrocade_lightpen_device::device_reset()
-{
- m_pen_timer->adjust(attotime::never);
- m_retrigger = false;
-}
-
-void astrocade_lightpen_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- if (id == TIMER_TRIGGER)
- {
- write_ltpen(1);
- write_ltpen(0);
- if (m_retrigger)
- m_pen_timer->adjust(m_screen->time_until_pos(m_lighty->read(), m_lightx->read()));
- else
- m_pen_timer->adjust(attotime::never);
- }
-}
-
-INPUT_CHANGED_MEMBER( astrocade_lightpen_device::trigger )
-{
- if (newval)
- {
- m_retrigger = true;
- m_pen_timer->adjust(m_screen->time_until_pos(m_lighty->read(), m_lightx->read()));
- }
- else
- {
- m_retrigger = false;
- m_pen_timer->adjust(attotime::never);
- }
-}
-
-static INPUT_PORTS_START( astrocade_lightpen )
- PORT_START("TRIGGER")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrocade_lightpen_device, trigger, nullptr)
- PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
-
- PORT_START("LIGHTX")
- PORT_BIT(0x1ff, 0x000, IPT_LIGHTGUN_X) PORT_MINMAX(0x000, 0x15f) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15)
-
- PORT_START("LIGHTY")
- PORT_BIT(0x0ff, 0x000, IPT_LIGHTGUN_Y) PORT_MINMAX(0x000, 0x0f0) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15)
-INPUT_PORTS_END
-
-ioport_constructor astrocade_lightpen_device::device_input_ports() const
-{
- return INPUT_PORTS_NAME( astrocade_lightpen );
-}
diff --git a/src/devices/bus/astrocde/lightpen.h b/src/devices/bus/astrocde/lightpen.h
deleted file mode 100644
index a0863d5d3e8..00000000000
--- a/src/devices/bus/astrocde/lightpen.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-#ifndef MAME_BUS_ASTROCDE_LIGHTPEN_H
-#define MAME_BUS_ASTROCDE_LIGHTPEN_H
-
-#pragma once
-
-#include "accessory.h"
-
-
-/***************************************************************************
- TYPE DEFINITIONS
- ***************************************************************************/
-
-// ======================> astrocade_lightpen_device
-
-class astrocade_lightpen_device : public device_t,
- public device_astrocade_accessory_interface
-{
-public:
- // construction/destruction
- astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U);
- virtual ~astrocade_lightpen_device();
-
- DECLARE_INPUT_CHANGED_MEMBER( trigger );
-
-protected:
- // device_t implementation
- virtual void device_start() override;
- virtual void device_reset() override;
- virtual ioport_constructor device_input_ports() const override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
- static const device_timer_id TIMER_TRIGGER = 0;
-
-private:
- required_ioport m_trigger;
- required_ioport m_lightx;
- required_ioport m_lighty;
- emu_timer *m_pen_timer;
- bool m_retrigger;
-};
-
-
-/***************************************************************************
- DEVICE TYPES
- ***************************************************************************/
-
-DECLARE_DEVICE_TYPE(ASTROCADE_LIGHTPEN, astrocade_lightpen_device)
-
-#endif // MAME_BUS_ASTROCDE_LIGHTPEN_H
diff --git a/src/devices/bus/astrocde/ram.cpp b/src/devices/bus/astrocde/ram.cpp
index 8f20b0256fa..36d1ed9ab77 100644
--- a/src/devices/bus/astrocde/ram.cpp
+++ b/src/devices/bus/astrocde/ram.cpp
@@ -21,10 +21,10 @@
switch and run it as a cartridge. This is useful for cartridge development.
Blue RAM -- available in 4K, 16K, and 32K. These also use an INS8154 chip,
- which has an additional $80 bytes of RAM mapped immediately after the end of
- the expansion address space (not yet implemented). This memory can't be write
- protected. The INS8154 has I/O features needed for loading tape programs into
- Blue RAM BASIC, as well as running the Blue RAM Utility cart.
+ (not yet implemented) which has an additional $80 bytes of RAM mapped
+ immediately after the end of the expansion address space. This memory
+ can't be write protected. The INS8154 has I/O features needed for loading
+ tape programs into Blue RAM BASIC, as well as running the Blue RAM Utility cart.
4K: $6000 to $6FFF (can't run VIPERSoft BASIC, because this program needs memory
past this range)
16K: $6000 to $9FFF
@@ -69,11 +69,9 @@ DEFINE_DEVICE_TYPE(ASTROCADE_RL64RAM, astrocade_rl64ram_device, "astroca
astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, type, tag, owner, clock)
- , device_astrocade_card_interface(mconfig, *this)
- , m_write_prot(*this, "RAM_PROTECT")
- , m_ramio(*this, "ramio")
- , m_cassette(*this, "cassette")
+ : device_t(mconfig, type, tag, owner, clock),
+ device_astrocade_card_interface(mconfig, *this),
+ m_write_prot(*this, "RAM_PROTECT")
{
}
@@ -165,35 +163,7 @@ WRITE8_MEMBER(astrocade_blueram_4k_device::write)
m_ram[offset - 0x1000] = data;
}
-READ8_MEMBER(astrocade_blueram_4k_device::read_io)
-{
- return m_ramio->read_io(offset & 0x7f);
-}
-
-WRITE8_MEMBER(astrocade_blueram_4k_device::write_io)
-{
- logerror("write_io: %04x = %02x\n", offset, data);
- m_ramio->write_io(offset & 0x7f, data);
-}
-
-uint8_t astrocade_blueram_4k_device::porta_r()
-{
- return 0;
-}
-
-uint8_t astrocade_blueram_4k_device::portb_r()
-{
- return m_cassette->input() > 0.0 ? 1 : 0;
-}
-
-void astrocade_blueram_4k_device::porta_w(uint8_t data)
-{
-}
-void astrocade_blueram_4k_device::portb_w(uint8_t data)
-{
- m_cassette->output(BIT(data, 0) ? +1 : -1);
-}
// Viper System 1 expansion has RAM in 0x6000-0x9fff
READ8_MEMBER(astrocade_viper_sys1_device::read)
@@ -237,20 +207,3 @@ WRITE8_MEMBER(astrocade_rl64ram_device::write)
if (!m_write_prot->read())
m_ram[offset] = data;
}
-
-/*-------------------------------------------------
- machine configuration
- -------------------------------------------------*/
-
-void astrocade_blueram_4k_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_cassette);
- m_cassette->set_default_state(CASSETTE_STOPPED);
- m_cassette->set_interface("astrocade_cass");
-
- INS8154(config, m_ramio);
- m_ramio->out_a().set(FUNC(astrocade_blueram_4k_device::porta_w));
- m_ramio->out_b().set(FUNC(astrocade_blueram_4k_device::portb_w));
- m_ramio->in_a().set(FUNC(astrocade_blueram_4k_device::porta_r));
- m_ramio->in_b().set(FUNC(astrocade_blueram_4k_device::portb_r));
-}
diff --git a/src/devices/bus/astrocde/ram.h b/src/devices/bus/astrocde/ram.h
index ee5ed884ef4..83f9483d2e8 100644
--- a/src/devices/bus/astrocde/ram.h
+++ b/src/devices/bus/astrocde/ram.h
@@ -6,8 +6,6 @@
#pragma once
#include "exp.h"
-#include "imagedev/cassette.h"
-#include "machine/ins8154.h"
// ======================> astrocade_blueram_4k_device
@@ -24,25 +22,15 @@ public:
// reading and writing
virtual DECLARE_READ8_MEMBER(read) override;
virtual DECLARE_WRITE8_MEMBER(write) override;
- virtual DECLARE_READ8_MEMBER(read_io) override;
- virtual DECLARE_WRITE8_MEMBER(write_io) override;
-
- uint8_t porta_r();
- uint8_t portb_r();
- void porta_w(uint8_t data);
- 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);
virtual void device_start() override { m_ram.resize(0x1000); save_item(NAME(m_ram)); }
virtual void device_reset() override { }
- virtual void device_add_mconfig(machine_config &config) override;
std::vector<uint8_t> m_ram;
required_ioport m_write_prot;
- required_device<ins8154_device> m_ramio;
- required_device<cassette_image_device> m_cassette;
};
// ======================> astrocade_blueram_16k_device
diff --git a/src/devices/bus/astrocde/rom.cpp b/src/devices/bus/astrocde/rom.cpp
index bb5d6912fc2..fcebedfc81d 100644
--- a/src/devices/bus/astrocde/rom.cpp
+++ b/src/devices/bus/astrocde/rom.cpp
@@ -17,10 +17,9 @@
// astrocade_rom_device - constructor
//-------------------------------------------------
-DEFINE_DEVICE_TYPE(ASTROCADE_ROM_STD, astrocade_rom_device, "astrocade_rom", "Bally Astrocade Standard Carts")
-DEFINE_DEVICE_TYPE(ASTROCADE_ROM_256K, astrocade_rom_256k_device, "astrocade_rom_256k", "Bally Astrocade 256K Carts")
-DEFINE_DEVICE_TYPE(ASTROCADE_ROM_512K, astrocade_rom_512k_device, "astrocade_rom_512k", "Bally Astrocade 512K Carts")
-DEFINE_DEVICE_TYPE(ASTROCADE_ROM_CASS, astrocade_rom_cass_device, "astrocade_rom_cass", "Bally Astrocade AstroBASIC Cart")
+DEFINE_DEVICE_TYPE(ASTROCADE_ROM_STD, astrocade_rom_device, "astrocade_rom", "Bally Astrocade Standard Carts")
+DEFINE_DEVICE_TYPE(ASTROCADE_ROM_256K, astrocade_rom_256k_device, "astrocade_256k", "Bally Astrocade 256K Carts")
+DEFINE_DEVICE_TYPE(ASTROCADE_ROM_512K, astrocade_rom_512k_device, "astrocade_512k", "Bally Astrocade 512K Carts")
astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
@@ -43,12 +42,6 @@ astrocade_rom_512k_device::astrocade_rom_512k_device(const machine_config &mconf
{
}
-astrocade_rom_cass_device::astrocade_rom_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : astrocade_rom_device(mconfig, ASTROCADE_ROM_CASS, tag, owner, clock)
- , m_cassette(*this, "cassette")
-{
-}
-
void astrocade_rom_256k_device::device_start()
{
@@ -102,31 +95,3 @@ READ8_MEMBER(astrocade_rom_512k_device::read_rom)
else // 0x3fc0-0x3fff
return m_base_bank = offset & 0x7f;
}
-
-READ8_MEMBER(astrocade_rom_cass_device::read_rom)
-{
- if (offset < m_rom_size)
- return m_rom[offset];
- else if ((offset & 0x1c00) == 0x1800)
- {
- m_cassette->output(+1);
- return 0xff;
- }
- else if ((offset & 0x1c00) == 0x1c00)
- {
- m_cassette->output(-1);
- return m_cassette->input() > 0.0 ? 0 : 1;
- }
- return 0xff;
-}
-
-/*-------------------------------------------------
- mapper specific device configuration
- -------------------------------------------------*/
-
-void astrocade_rom_cass_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_cassette);
- m_cassette->set_default_state(CASSETTE_STOPPED);
- m_cassette->set_interface("astrocade_cass");
-}
diff --git a/src/devices/bus/astrocde/rom.h b/src/devices/bus/astrocde/rom.h
index efd17b16ded..0471ada8dd1 100644
--- a/src/devices/bus/astrocde/rom.h
+++ b/src/devices/bus/astrocde/rom.h
@@ -6,7 +6,6 @@
#pragma once
#include "slot.h"
-#include "imagedev/cassette.h"
// ======================> astrocade_rom_device
@@ -65,30 +64,10 @@ private:
uint8_t m_base_bank;
};
-// ======================> astrocade_rom_cass_device
-
-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);
-
- // reading and writing
- virtual DECLARE_READ8_MEMBER(read_rom) override;
-
-private:
- virtual void device_start() override { }
- virtual void device_reset() override { }
- virtual void device_add_mconfig(machine_config &config) override;
-
- required_device<cassette_image_device> m_cassette;
-};
-
// device type definition
DECLARE_DEVICE_TYPE(ASTROCADE_ROM_STD, astrocade_rom_device)
DECLARE_DEVICE_TYPE(ASTROCADE_ROM_256K, astrocade_rom_256k_device)
DECLARE_DEVICE_TYPE(ASTROCADE_ROM_512K, astrocade_rom_512k_device)
-DECLARE_DEVICE_TYPE(ASTROCADE_ROM_CASS, astrocade_rom_cass_device)
#endif // MAME_BUS_ASTROCADE_ROM_H
diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp
index 2aa78be98d9..b83b8e576ad 100644
--- a/src/devices/bus/astrocde/slot.cpp
+++ b/src/devices/bus/astrocde/slot.cpp
@@ -104,8 +104,7 @@ static const astrocade_slot slot_list[] =
{
{ ASTROCADE_STD, "rom" },
{ ASTROCADE_256K, "rom_256k" },
- { ASTROCADE_512K, "rom_512k" },
- { ASTROCADE_CASS, "rom_cass" }
+ { ASTROCADE_512K, "rom_512k" }
};
static int astrocade_get_pcb_id(const char *slot)
diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h
index 419f4672985..88c34fa0d8e 100644
--- a/src/devices/bus/astrocde/slot.h
+++ b/src/devices/bus/astrocde/slot.h
@@ -19,8 +19,7 @@ enum
{
ASTROCADE_STD = 0,
ASTROCADE_256K,
- ASTROCADE_512K,
- ASTROCADE_CASS
+ ASTROCADE_512K
};
diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp
index 41e9bc0e8cb..43cabfdfec3 100644
--- a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp
+++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp
@@ -92,18 +92,18 @@ void bbc_1mhzbus_slot_device::device_reset()
// read
//-------------------------------------------------
-uint8_t bbc_1mhzbus_slot_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_1mhzbus_slot_device::fred_r)
{
if (m_card)
- return m_card->fred_r(offset);
+ return m_card->fred_r(space, offset);
else
return 0xff;
}
-uint8_t bbc_1mhzbus_slot_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_1mhzbus_slot_device::jim_r)
{
if (m_card)
- return m_card->jim_r(offset);
+ return m_card->jim_r(space, offset);
else
return 0xff;
}
@@ -112,16 +112,16 @@ uint8_t bbc_1mhzbus_slot_device::jim_r(offs_t offset)
// write
//-------------------------------------------------
-void bbc_1mhzbus_slot_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_1mhzbus_slot_device::fred_w)
{
if (m_card)
- m_card->fred_w(offset, data);
+ m_card->fred_w(space, offset, data);
}
-void bbc_1mhzbus_slot_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_1mhzbus_slot_device::jim_w)
{
if (m_card)
- m_card->jim_w(offset, data);
+ m_card->jim_w(space, offset, data);
}
//-------------------------------------------------
@@ -142,7 +142,6 @@ void bbc_1mhzbus_slot_device::jim_w(offs_t offset, uint8_t data)
//#include "graduate.h"
#include "beebsid.h"
//#include "prisma3.h"
-#include "sprite.h"
#include "cfa3000opt.h"
@@ -162,7 +161,6 @@ void bbc_1mhzbus_devices(device_slot_interface &device)
//device.option_add("graduate", BBC_GRADUATE); /* The Torch Graduate G400/G800 */
device.option_add("beebsid", BBC_BEEBSID); /* BeebSID */
//device.option_add("prisma3", BBC_PRISMA3); /* PRISMA-3 - Millipede 1989 */
- device.option_add("sprite", BBC_SPRITE); /* Logotron Sprite Board */
}
void bbcm_1mhzbus_devices(device_slot_interface &device)
@@ -185,6 +183,5 @@ void bbcm_1mhzbus_devices(device_slot_interface &device)
//device.option_add("graduate", BBC_GRADUATE); /* The Torch Graduate G400/G800 */
device.option_add("beebsid", BBC_BEEBSID); /* BeebSID */
//device.option_add("prisma3", BBC_PRISMA3); /* PRISMA-3 - Millipede 1989 */
- device.option_add("sprite", BBC_SPRITE); /* Logotron Sprite Board */
device.option_add("cfa3000opt", CFA3000_OPT); /* Henson CFA 3000 Option Board */
}
diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.h b/src/devices/bus/bbc/1mhzbus/1mhzbus.h
index 80e48425973..ad435876bf0 100644
--- a/src/devices/bus/bbc/1mhzbus/1mhzbus.h
+++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.h
@@ -107,10 +107,10 @@ public:
auto irq_handler() { return m_irq_handler.bind(); }
auto nmi_handler() { return m_nmi_handler.bind(); }
- virtual uint8_t fred_r(offs_t offset);
- virtual void fred_w(offs_t offset, uint8_t data);
- virtual uint8_t jim_r(offs_t offset);
- virtual void jim_w(offs_t offset, uint8_t data);
+ virtual DECLARE_READ8_MEMBER(fred_r);
+ virtual DECLARE_WRITE8_MEMBER(fred_w);
+ virtual DECLARE_READ8_MEMBER(jim_r);
+ virtual DECLARE_WRITE8_MEMBER(jim_w);
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_irq_handler(state); }
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); }
@@ -134,10 +134,10 @@ private:
class device_bbc_1mhzbus_interface : public device_slot_card_interface
{
public:
- virtual uint8_t fred_r(offs_t offset) { return 0xff; }
- virtual void fred_w(offs_t offset, uint8_t data) { }
- virtual uint8_t jim_r(offs_t offset) { return 0xff; }
- virtual void jim_w(offs_t offset, uint8_t data) { }
+ virtual DECLARE_READ8_MEMBER(fred_r) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(fred_w) { }
+ virtual DECLARE_READ8_MEMBER(jim_r) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(jim_w) { }
protected:
device_bbc_1mhzbus_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/bbc/1mhzbus/beebsid.cpp b/src/devices/bus/bbc/1mhzbus/beebsid.cpp
index d50449ede99..c0e6ea62c46 100644
--- a/src/devices/bus/bbc/1mhzbus/beebsid.cpp
+++ b/src/devices/bus/bbc/1mhzbus/beebsid.cpp
@@ -65,40 +65,40 @@ void bbc_beebsid_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_beebsid_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_beebsid_device::fred_r)
{
uint8_t data = 0xff;
if (offset >= 0x20 && offset < 0x40)
{
- data = m_sid->read(offset);
+ data = m_sid->read(space, offset);
}
- data &= m_1mhzbus->fred_r(offset);
+ data &= m_1mhzbus->fred_r(space, offset);
return data;
}
-void bbc_beebsid_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_beebsid_device::fred_w)
{
if (offset >= 0x20 && offset < 0x40)
{
- m_sid->write(offset, data);
+ m_sid->write(space, offset, data);
}
- m_1mhzbus->fred_w(offset, data);
+ m_1mhzbus->fred_w(space, offset, data);
}
-uint8_t bbc_beebsid_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_beebsid_device::jim_r)
{
uint8_t data = 0xff;
- data &= m_1mhzbus->jim_r(offset);
+ data &= m_1mhzbus->jim_r(space, offset);
return data;
}
-void bbc_beebsid_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_beebsid_device::jim_w)
{
- m_1mhzbus->jim_w(offset, data);
+ m_1mhzbus->jim_w(space, offset, data);
}
diff --git a/src/devices/bus/bbc/1mhzbus/beebsid.h b/src/devices/bus/bbc/1mhzbus/beebsid.h
index 107e875abde..d78d5486c10 100644
--- a/src/devices/bus/bbc/1mhzbus/beebsid.h
+++ b/src/devices/bus/bbc/1mhzbus/beebsid.h
@@ -34,10 +34,10 @@ protected:
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
- virtual uint8_t jim_r(offs_t offset) override;
- virtual void jim_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
+ virtual DECLARE_READ8_MEMBER(jim_r) override;
+ virtual DECLARE_WRITE8_MEMBER(jim_w) override;
private:
required_device<bbc_1mhzbus_slot_device> m_1mhzbus;
diff --git a/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp b/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp
index e5ac755e006..0946d9cdf82 100644
--- a/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp
+++ b/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp
@@ -98,7 +98,7 @@ void cfa3000_opt_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t cfa3000_opt_device::fred_r(offs_t offset)
+READ8_MEMBER(cfa3000_opt_device::fred_r)
{
uint8_t data = 0xff;
diff --git a/src/devices/bus/bbc/1mhzbus/cfa3000opt.h b/src/devices/bus/bbc/1mhzbus/cfa3000opt.h
index 64913e95604..5a4e413754b 100644
--- a/src/devices/bus/bbc/1mhzbus/cfa3000opt.h
+++ b/src/devices/bus/bbc/1mhzbus/cfa3000opt.h
@@ -35,7 +35,7 @@ protected:
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
- virtual uint8_t fred_r(offs_t offset) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
private:
required_ioport m_opt;
diff --git a/src/devices/bus/bbc/1mhzbus/emrmidi.cpp b/src/devices/bus/bbc/1mhzbus/emrmidi.cpp
index 6cfbacf23da..9c7c036f44c 100644
--- a/src/devices/bus/bbc/1mhzbus/emrmidi.cpp
+++ b/src/devices/bus/bbc/1mhzbus/emrmidi.cpp
@@ -81,23 +81,23 @@ void bbc_emrmidi_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_emrmidi_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_emrmidi_device::fred_r)
{
uint8_t data = 0xff;
if (offset >= 0xf0 && offset < 0xf2)
{
- data = m_acia->read(offset & 1);
+ data = m_acia->read(space, offset & 1);
}
return data;
}
-void bbc_emrmidi_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_emrmidi_device::fred_w)
{
if (offset >= 0xf0 && offset < 0xf2)
{
- m_acia->write(offset & 1, data);
+ m_acia->write(space, offset & 1, data);
}
}
diff --git a/src/devices/bus/bbc/1mhzbus/emrmidi.h b/src/devices/bus/bbc/1mhzbus/emrmidi.h
index 341e487ce24..bbc41992948 100644
--- a/src/devices/bus/bbc/1mhzbus/emrmidi.h
+++ b/src/devices/bus/bbc/1mhzbus/emrmidi.h
@@ -36,8 +36,8 @@ protected:
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
private:
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.cpp b/src/devices/bus/bbc/1mhzbus/ieee488.cpp
index 3aae6fe2f54..383ceef537b 100644
--- a/src/devices/bus/bbc/1mhzbus/ieee488.cpp
+++ b/src/devices/bus/bbc/1mhzbus/ieee488.cpp
@@ -54,8 +54,7 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void bbc_ieee488_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(bbc_ieee488_device::device_add_mconfig)
TMS9914(config, m_tms9914, 5_MHz_XTAL);
m_tms9914->int_write_cb().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_tms9914->dio_read_cb().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
@@ -68,25 +67,23 @@ void bbc_ieee488_device::device_add_mconfig(machine_config &config)
m_tms9914->srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
m_tms9914->atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
m_tms9914->ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
-
- IEEE488(config, m_ieee);
- m_ieee->eoi_callback().set(m_tms9914, FUNC(tms9914_device::eoi_w));
- m_ieee->dav_callback().set(m_tms9914, FUNC(tms9914_device::dav_w));
- m_ieee->nrfd_callback().set(m_tms9914, FUNC(tms9914_device::nrfd_w));
- m_ieee->ndac_callback().set(m_tms9914, FUNC(tms9914_device::ndac_w));
- m_ieee->ifc_callback().set(m_tms9914, FUNC(tms9914_device::ifc_w));
- m_ieee->srq_callback().set(m_tms9914, FUNC(tms9914_device::srq_w));
- m_ieee->atn_callback().set(m_tms9914, FUNC(tms9914_device::atn_w));
- m_ieee->ren_callback().set(m_tms9914, FUNC(tms9914_device::ren_w));
- IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
+ MCFG_IEEE488_BUS_ADD()
+ MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_tms9914, tms9914_device, eoi_w))
+ MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_tms9914, tms9914_device, dav_w))
+ MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_tms9914, tms9914_device, nrfd_w))
+ MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ndac_w))
+ MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ifc_w))
+ MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_tms9914, tms9914_device, srq_w))
+ MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, atn_w))
+ MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ren_w))
+ MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
BBC_1MHZBUS_SLOT(config, m_1mhzbus, DERIVED_CLOCK(1, 1), bbc_1mhzbus_devices, nullptr);
m_1mhzbus->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_1mhzbus->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::nmi_w));
-}
+MACHINE_CONFIG_END
-void bbc_b488_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(bbc_b488_device::device_add_mconfig)
TMS9914(config, m_tms9914, 5_MHz_XTAL); // TODO: verify clock
m_tms9914->int_write_cb().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
m_tms9914->dio_read_cb().set(IEEE488_TAG, FUNC(ieee488_device::dio_r));
@@ -99,37 +96,35 @@ void bbc_b488_device::device_add_mconfig(machine_config &config)
m_tms9914->srq_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w));
m_tms9914->atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w));
m_tms9914->ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w));
-
- IEEE488(config, m_ieee);
- m_ieee->eoi_callback().set(m_tms9914, FUNC(tms9914_device::eoi_w));
- m_ieee->dav_callback().set(m_tms9914, FUNC(tms9914_device::dav_w));
- m_ieee->nrfd_callback().set(m_tms9914, FUNC(tms9914_device::nrfd_w));
- m_ieee->ndac_callback().set(m_tms9914, FUNC(tms9914_device::ndac_w));
- m_ieee->ifc_callback().set(m_tms9914, FUNC(tms9914_device::ifc_w));
- m_ieee->srq_callback().set(m_tms9914, FUNC(tms9914_device::srq_w));
- m_ieee->atn_callback().set(m_tms9914, FUNC(tms9914_device::atn_w));
- m_ieee->ren_callback().set(m_tms9914, FUNC(tms9914_device::ren_w));
- IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
+ MCFG_IEEE488_BUS_ADD()
+ MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_tms9914, tms9914_device, eoi_w))
+ MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_tms9914, tms9914_device, dav_w))
+ MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_tms9914, tms9914_device, nrfd_w))
+ MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ndac_w))
+ MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ifc_w))
+ MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_tms9914, tms9914_device, srq_w))
+ MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, atn_w))
+ MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_tms9914, tms9914_device, ren_w))
+ MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
// TODO: LED's for ATN, TALK, and DATA
-}
+MACHINE_CONFIG_END
-//void bbc_procyon_device::device_add_mconfig(machine_config &config)
-//{
+//MACHINE_CONFIG_START(bbc_procyon_device::device_add_mconfig)
// TODO: Implement MC68488
- //IEEE488(config, m_ieee);
- //m_ieee->eoi_callback(m_mc68488, FUNC(mc68488_device::eoi_w));
- //m_ieee->dav_callback(m_mc68488, FUNC(mc68488_device::dav_w));
- //m_ieee->nrfd_callback(m_mc68488, FUNC(mc68488_device::nrfd_w));
- //m_ieee->ndac_callback(m_mc68488, FUNC(mc68488_device::ndac_w));
- //m_ieee->ifc_callback(m_mc68488, FUNC(mc68488_device::ifc_w));
- //m_ieee->srq_callback(m_mc68488, FUNC(mc68488_device::srq_w));
- //m_ieee->atn_callback(m_mc68488, FUNC(mc68488_device::atn_w));
- //m_ieee->ren_callback(m_mc68488, FUNC(mc68488_device::ren_w));
- //IEEE488_SLOT(config, "ieee_dev", 0, cbm_ieee488_devices, nullptr);
+ //MCFG_IEEE488_BUS_ADD()
+ //MCFG_IEEE488_EOI_CALLBACK(WRITELINE(m_mc68488, mc68488_device, eoi_w))
+ //MCFG_IEEE488_DAV_CALLBACK(WRITELINE(m_mc68488, mc68488_device, dav_w))
+ //MCFG_IEEE488_NRFD_CALLBACK(WRITELINE(m_mc68488, mc68488_device, nrfd_w))
+ //MCFG_IEEE488_NDAC_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ndac_w))
+ //MCFG_IEEE488_IFC_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ifc_w))
+ //MCFG_IEEE488_SRQ_CALLBACK(WRITELINE(m_mc68488, mc68488_device, srq_w))
+ //MCFG_IEEE488_ATN_CALLBACK(WRITELINE(m_mc68488, mc68488_device, atn_w))
+ //MCFG_IEEE488_REN_CALLBACK(WRITELINE(m_mc68488, mc68488_device, ren_w))
+ //MCFG_IEEE488_SLOT_ADD("ieee_dev", 0, cbm_ieee488_devices, nullptr)
// TODO: LED's for Bus Active, Byte Out, and Byte In
-//}
+//MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -197,82 +192,82 @@ void bbc_b488_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_ieee488_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_ieee488_device::fred_r)
{
uint8_t data = 0xff;
if (offset >= 0x20 && offset < 0x28)
{
- data = m_tms9914->read(offset & 0x07);
+ data = m_tms9914->reg8_r(space, offset & 0x07);
}
- data &= m_1mhzbus->fred_r(offset);
+ data &= m_1mhzbus->fred_r(space, offset);
return data;
}
-void bbc_ieee488_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_ieee488_device::fred_w)
{
if (offset >= 0x20 && offset < 0x28)
{
- m_tms9914->write(offset & 0x07, data);
+ m_tms9914->reg8_w(space, offset & 0x07, data);
}
- m_1mhzbus->fred_w(offset, data);
+ m_1mhzbus->fred_w(space, offset, data);
}
-uint8_t bbc_ieee488_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_ieee488_device::jim_r)
{
uint8_t data = 0xff;
- data &= m_1mhzbus->jim_r(offset);
+ data &= m_1mhzbus->jim_r(space, offset);
return data;
}
-void bbc_ieee488_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_ieee488_device::jim_w)
{
- m_1mhzbus->jim_w(offset, data);
+ m_1mhzbus->jim_w(space, offset, data);
}
-uint8_t bbc_b488_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_b488_device::fred_r)
{
uint8_t data = 0xff;
if (offset >= 0x20 && offset < 0x28)
{
- data = m_tms9914->read(offset & 0x07);
+ data = m_tms9914->reg8_r(space, offset & 0x07);
}
return data;
}
-void bbc_b488_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_b488_device::fred_w)
{
if (offset >= 0x20 && offset < 0x28)
{
- m_tms9914->write(offset & 0x07, data);
+ m_tms9914->reg8_w(space, offset & 0x07, data);
}
}
-//uint8_t bbc_procyon_device::fred_r(offs_t offset)
+//READ8_MEMBER(bbc_procyon_device::fred_r)
//{
//uint8_t data = 0xff;
//if (offset >= 0x20 && offset < 0x28)
//{
- // data = mc68488_device->read(offset & 0x07);
+ // data = mc68488_device->reg8_r(space, offset & 0x07);
//}
//return data;
//}
-//void bbc_procyon_device::fred_w(offs_t offset, uint8_t data)
+//WRITE8_MEMBER(bbc_procyon_device::fred_w)
//{
//if (offset >= 0x20 && offset < 0x28)
//{
- // mc68488_device->write(offset & 0x07, data);
+ // mc68488_device->reg8_w(space, offset & 0x07, data);
//}
//}
diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.h b/src/devices/bus/bbc/1mhzbus/ieee488.h
index 9b810b4bf8d..05a9e60c928 100644
--- a/src/devices/bus/bbc/1mhzbus/ieee488.h
+++ b/src/devices/bus/bbc/1mhzbus/ieee488.h
@@ -42,10 +42,10 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
- virtual uint8_t jim_r(offs_t offset) override;
- virtual void jim_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
+ virtual DECLARE_READ8_MEMBER(jim_r) override;
+ virtual DECLARE_WRITE8_MEMBER(jim_w) override;
private:
required_device<ieee488_device> m_ieee;
@@ -69,8 +69,8 @@ protected:
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
private:
required_device<ieee488_device> m_ieee;
@@ -94,8 +94,8 @@ private:
// virtual void device_add_mconfig(machine_config &config) override;
// virtual const tiny_rom_entry *device_rom_region() const override;
//
-// virtual uint8_t fred_r(offs_t offset) override;
-// virtual void fred_w(offs_t offset, uint8_t data) override;
+// virtual DECLARE_READ8_MEMBER(fred_r) override;
+// virtual DECLARE_WRITE8_MEMBER(fred_w) override;
//
//private:
// required_device<ieee488_device> m_ieee;
diff --git a/src/devices/bus/bbc/1mhzbus/m2000.cpp b/src/devices/bus/bbc/1mhzbus/m2000.cpp
index 8203cada22e..88a713d1ff8 100644
--- a/src/devices/bus/bbc/1mhzbus/m2000.cpp
+++ b/src/devices/bus/bbc/1mhzbus/m2000.cpp
@@ -91,7 +91,7 @@ void bbc_m2000_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_m2000_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_m2000_device::fred_r)
{
uint8_t data = 0xff;
@@ -100,59 +100,59 @@ uint8_t bbc_m2000_device::fred_r(offs_t offset)
switch (offset & 0x06)
{
case 0x00:
- data = m_acia1->read(offset & 1);
+ data = m_acia1->read(space, offset & 1);
break;
case 0x02:
- data = m_acia2->read(offset & 1);
+ data = m_acia2->read(space, offset & 1);
break;
case 0x04:
- data = m_acia3->read(offset & 1);
+ data = m_acia3->read(space, offset & 1);
break;
case 0x06:
break;
}
}
- data &= m_1mhzbus->fred_r(offset);
+ data &= m_1mhzbus->fred_r(space, offset);
return data;
}
-void bbc_m2000_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_m2000_device::fred_w)
{
if (offset >= 0x08 && offset < 0x10)
{
switch (offset & 0x06)
{
case 0x00:
- m_acia1->write(offset & 1, data);
+ m_acia1->write(space, offset & 1, data);
break;
case 0x02:
- m_acia2->write(offset & 1, data);
+ m_acia2->write(space, offset & 1, data);
break;
case 0x04:
- m_acia3->write(offset & 1, data);
+ m_acia3->write(space, offset & 1, data);
break;
case 0x06:
break;
}
}
- m_1mhzbus->fred_w(offset, data);
+ m_1mhzbus->fred_w(space, offset, data);
}
-uint8_t bbc_m2000_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_m2000_device::jim_r)
{
uint8_t data = 0xff;
- data &= m_1mhzbus->jim_r(offset);
+ data &= m_1mhzbus->jim_r(space, offset);
return data;
}
-void bbc_m2000_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_m2000_device::jim_w)
{
- m_1mhzbus->jim_w(offset, data);
+ m_1mhzbus->jim_w(space, offset, data);
}
WRITE_LINE_MEMBER(bbc_m2000_device::write_acia_clock)
diff --git a/src/devices/bus/bbc/1mhzbus/m2000.h b/src/devices/bus/bbc/1mhzbus/m2000.h
index eeee1034a4e..f476c92dac5 100644
--- a/src/devices/bus/bbc/1mhzbus/m2000.h
+++ b/src/devices/bus/bbc/1mhzbus/m2000.h
@@ -38,10 +38,10 @@ protected:
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
- virtual uint8_t jim_r(offs_t offset) override;
- virtual void jim_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
+ virtual DECLARE_READ8_MEMBER(jim_r) override;
+ virtual DECLARE_WRITE8_MEMBER(jim_w) override;
private:
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
diff --git a/src/devices/bus/bbc/1mhzbus/opus3.cpp b/src/devices/bus/bbc/1mhzbus/opus3.cpp
index 77f21ac199a..65a8a3134ec 100644
--- a/src/devices/bus/bbc/1mhzbus/opus3.cpp
+++ b/src/devices/bus/bbc/1mhzbus/opus3.cpp
@@ -159,7 +159,7 @@ void bbc_opusa_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_opus3_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_opus3_device::fred_r)
{
uint8_t data = 0xff;
@@ -175,7 +175,7 @@ uint8_t bbc_opus3_device::fred_r(offs_t offset)
return data;
}
-void bbc_opus3_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_opus3_device::fred_w)
{
floppy_image_device *floppy = nullptr;
@@ -219,7 +219,7 @@ WRITE_LINE_MEMBER(bbc_opus3_device::fdc_drq_w)
m_slot->nmi_w((m_fdc_drq && m_fdc_ie) ? ASSERT_LINE : CLEAR_LINE);
}
-uint8_t bbc_opus3_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_opus3_device::jim_r)
{
if ((m_ramdisk_page << 8) < m_ramdisk->size())
return m_ramdisk->read((m_ramdisk_page << 8) + offset);
@@ -227,7 +227,7 @@ uint8_t bbc_opus3_device::jim_r(offs_t offset)
return 0xff;
}
-void bbc_opus3_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_opus3_device::jim_w)
{
if ((m_ramdisk_page << 8) < m_ramdisk->size())
m_ramdisk->write((m_ramdisk_page << 8) + offset, data);
diff --git a/src/devices/bus/bbc/1mhzbus/opus3.h b/src/devices/bus/bbc/1mhzbus/opus3.h
index 7d287f1622c..ef7a2174f5c 100644
--- a/src/devices/bus/bbc/1mhzbus/opus3.h
+++ b/src/devices/bus/bbc/1mhzbus/opus3.h
@@ -39,10 +39,10 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
- virtual uint8_t jim_r(offs_t offset) override;
- virtual void jim_w(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
+ virtual DECLARE_READ8_MEMBER(jim_r) override;
+ virtual DECLARE_WRITE8_MEMBER(jim_w) override;
private:
DECLARE_FLOPPY_FORMATS(floppy_formats);
diff --git a/src/devices/bus/bbc/1mhzbus/sprite.cpp b/src/devices/bus/bbc/1mhzbus/sprite.cpp
deleted file mode 100644
index ee7f5f292e7..00000000000
--- a/src/devices/bus/bbc/1mhzbus/sprite.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nigel Barnes
-/**********************************************************************
-
- Logotron Sprite Board
-
-**********************************************************************/
-
-
-#include "emu.h"
-#include "sprite.h"
-#include "screen.h"
-
-
-//**************************************************************************
-// DEVICE DEFINITIONS
-//**************************************************************************
-
-DEFINE_DEVICE_TYPE(BBC_SPRITE, bbc_sprite_device, "bbc_sprite", "Logotron Sprite Board");
-
-
-//-------------------------------------------------
-// device_add_mconfig - add device configuration
-//-------------------------------------------------
-
-void bbc_sprite_device::device_add_mconfig(machine_config &config)
-{
- TMS9129(config, m_vdp, 10.738635_MHz_XTAL);
- m_vdp->int_callback().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w));
- m_vdp->set_screen("screen");
- m_vdp->set_vram_size(0x4000);
-
- SCREEN(config, "screen", SCREEN_TYPE_RASTER);
-}
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// bbc_sprite_device - constructor
-//-------------------------------------------------
-
-bbc_sprite_device::bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, BBC_SPRITE, tag, owner, clock)
- , device_bbc_1mhzbus_interface(mconfig, *this)
- , m_vdp(*this, "vdp")
-{
-}
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void bbc_sprite_device::device_start()
-{
-}
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void bbc_sprite_device::device_reset()
-{
-}
-
-
-//**************************************************************************
-// IMPLEMENTATION
-//**************************************************************************
-
-uint8_t bbc_sprite_device::fred_r(offs_t offset)
-{
- uint8_t data = 0xff;
-
- switch (offset)
- {
- case 0xa0:
- data = m_vdp->vram_read();
- break;
- case 0xa2:
- data = m_vdp->register_read();
- break;
- }
- return data;
-}
-
-void bbc_sprite_device::fred_w(offs_t offset, uint8_t data)
-{
- switch (offset)
- {
- case 0xa1:
- m_vdp->vram_write(data);
- break;
- case 0xa3:
- m_vdp->register_write(data);
- break;
- }
-}
diff --git a/src/devices/bus/bbc/1mhzbus/sprite.h b/src/devices/bus/bbc/1mhzbus/sprite.h
deleted file mode 100644
index 02b0cff5dc2..00000000000
--- a/src/devices/bus/bbc/1mhzbus/sprite.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Nigel Barnes
-/**********************************************************************
-
- Logotron Sprite Board
-
-**********************************************************************/
-
-
-#ifndef MAME_BUS_BBC_1MHZBUS_SPRITE_H
-#define MAME_BUS_BBC_1MHZBUS_SPRITE_H
-
-#include "1mhzbus.h"
-#include "video/tms9928a.h"
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-class bbc_sprite_device:
- public device_t,
- public device_bbc_1mhzbus_interface
-{
-public:
- // construction/destruction
- bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
-
- // optional information overrides
- virtual void device_add_mconfig(machine_config &config) override;
-
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
-
-private:
- required_device<tms9129_device> m_vdp;
-};
-
-
-// device type definition
-DECLARE_DEVICE_TYPE(BBC_SPRITE, bbc_sprite_device);
-
-
-#endif /* MAME_BUS_BBC_1MHZBUS_SPRITE_H */
diff --git a/src/devices/bus/bbc/exp/exp.cpp b/src/devices/bus/bbc/exp/exp.cpp
index 25f19746b72..d2a5cca3611 100644
--- a/src/devices/bus/bbc/exp/exp.cpp
+++ b/src/devices/bus/bbc/exp/exp.cpp
@@ -97,26 +97,26 @@ void bbc_exp_slot_device::device_reset()
// read
//-------------------------------------------------
-uint8_t bbc_exp_slot_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_exp_slot_device::fred_r)
{
if (m_card)
- return m_card->fred_r(offset);
+ return m_card->fred_r(space, offset);
else
return 0xff;
}
-uint8_t bbc_exp_slot_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_exp_slot_device::jim_r)
{
if (m_card)
- return m_card->jim_r(offset);
+ return m_card->jim_r(space, offset);
else
return 0xff;
}
-uint8_t bbc_exp_slot_device::sheila_r(offs_t offset)
+READ8_MEMBER(bbc_exp_slot_device::sheila_r)
{
if (m_card)
- return m_card->sheila_r(offset);
+ return m_card->sheila_r(space, offset);
else
return 0xfe;
}
@@ -125,32 +125,32 @@ uint8_t bbc_exp_slot_device::sheila_r(offs_t offset)
// write
//-------------------------------------------------
-void bbc_exp_slot_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_exp_slot_device::fred_w)
{
if (m_card)
- m_card->fred_w(offset, data);
+ m_card->fred_w(space, offset, data);
}
-void bbc_exp_slot_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_exp_slot_device::jim_w)
{
if (m_card)
- m_card->jim_w(offset, data);
+ m_card->jim_w(space, offset, data);
}
-void bbc_exp_slot_device::sheila_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_exp_slot_device::sheila_w)
{
if (m_card)
- m_card->sheila_w(offset, data);
+ m_card->sheila_w(space, offset, data);
}
//-------------------------------------------------
// pb_r
//-------------------------------------------------
-uint8_t bbc_exp_slot_device::pb_r()
+READ8_MEMBER(bbc_exp_slot_device::pb_r)
{
if (m_card)
- return 0x1f | m_card->pb_r();
+ return 0x1f | m_card->pb_r(space, 0);
else
return 0xff;
}
@@ -160,10 +160,10 @@ uint8_t bbc_exp_slot_device::pb_r()
// pb_w
//-------------------------------------------------
-void bbc_exp_slot_device::pb_w(uint8_t data)
+WRITE8_MEMBER(bbc_exp_slot_device::pb_w)
{
if (m_card)
- m_card->pb_w(data);
+ m_card->pb_w(space, 0, data);
}
//-------------------------------------------------
diff --git a/src/devices/bus/bbc/exp/exp.h b/src/devices/bus/bbc/exp/exp.h
index ef1a0174b1a..5269deb3900 100644
--- a/src/devices/bus/bbc/exp/exp.h
+++ b/src/devices/bus/bbc/exp/exp.h
@@ -75,12 +75,12 @@ public:
auto cb1_handler() { return m_cb1_handler.bind(); }
auto cb2_handler() { return m_cb2_handler.bind(); }
- uint8_t fred_r(offs_t offset);
- void fred_w(offs_t offset, uint8_t data);
- uint8_t jim_r(offs_t offset);
- void jim_w(offs_t offset, uint8_t data);
- uint8_t sheila_r(offs_t offset);
- void sheila_w(offs_t offset, uint8_t data);
+ virtual DECLARE_READ8_MEMBER(fred_r);
+ virtual DECLARE_WRITE8_MEMBER(fred_w);
+ virtual DECLARE_READ8_MEMBER(jim_r);
+ virtual DECLARE_WRITE8_MEMBER(jim_w);
+ virtual DECLARE_READ8_MEMBER(sheila_r);
+ virtual DECLARE_WRITE8_MEMBER(sheila_w);
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_irq_handler(state); }
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); }
@@ -89,8 +89,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(cb1_w) { m_cb1_handler(state); }
DECLARE_WRITE_LINE_MEMBER(cb2_w) { m_cb2_handler(state); }
- uint8_t pb_r();
- void pb_w(uint8_t data);
+ DECLARE_READ8_MEMBER(pb_r);
+ DECLARE_WRITE8_MEMBER(pb_w);
protected:
// device-level overrides
@@ -114,15 +114,15 @@ private:
class device_bbc_exp_interface : public device_slot_card_interface
{
public:
- virtual uint8_t fred_r(offs_t offset) { return 0xff; }
- virtual void fred_w(offs_t offset, uint8_t data) { }
- virtual uint8_t jim_r(offs_t offset) { return 0xff; }
- virtual void jim_w(offs_t offset, uint8_t data) { }
- virtual uint8_t sheila_r(offs_t offset) { return 0xfe; }
- virtual void sheila_w(offs_t offset, uint8_t data) { }
-
- virtual uint8_t pb_r() { return 0xff; }
- virtual void pb_w(uint8_t data) { }
+ virtual DECLARE_READ8_MEMBER(fred_r) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(fred_w) { }
+ virtual DECLARE_READ8_MEMBER(jim_r) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(jim_w) { }
+ virtual DECLARE_READ8_MEMBER(sheila_r) { return 0xfe; }
+ virtual DECLARE_WRITE8_MEMBER(sheila_w) { }
+
+ virtual DECLARE_READ8_MEMBER(pb_r) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(pb_w) { }
protected:
device_bbc_exp_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/bbc/exp/mertec.cpp b/src/devices/bus/bbc/exp/mertec.cpp
index ab9dc3c2f6e..8f896da0359 100644
--- a/src/devices/bus/bbc/exp/mertec.cpp
+++ b/src/devices/bus/bbc/exp/mertec.cpp
@@ -52,7 +52,7 @@ void bbc_mertec_device::device_add_mconfig(machine_config &config)
//m_pia->irq_handler().set("irqs", FUNC(input_merger_device::in_w<0>));
/* adc */
- UPD7002(config, m_upd7002, DERIVED_CLOCK(1, 8));
+ UPD7002(config, m_upd7002, 0);
m_upd7002->set_get_analogue_callback(FUNC(bbc_mertec_device::get_analogue_input), this);
m_upd7002->set_eoc_callback(FUNC(bbc_mertec_device::upd7002_eoc), this);
@@ -114,52 +114,52 @@ void bbc_mertec_device::upd7002_eoc(int data)
//m_via6522_0->write_cb1(data);
}
-uint8_t bbc_mertec_device::fred_r(offs_t offset)
+READ8_MEMBER(bbc_mertec_device::fred_r)
{
- return m_2mhzbus->fred_r(offset);
+ return m_2mhzbus->fred_r(space, offset);
}
-void bbc_mertec_device::fred_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_mertec_device::fred_w)
{
- m_2mhzbus->fred_w(offset, data);
+ m_2mhzbus->fred_w(space, offset, data);
}
-uint8_t bbc_mertec_device::jim_r(offs_t offset)
+READ8_MEMBER(bbc_mertec_device::jim_r)
{
- return m_2mhzbus->jim_r(offset);
+ return m_2mhzbus->jim_r(space, offset);
}
-void bbc_mertec_device::jim_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_mertec_device::jim_w)
{
- m_2mhzbus->jim_w(offset, data);
+ m_2mhzbus->jim_w(space, offset, data);
}
-uint8_t bbc_mertec_device::sheila_r(offs_t offset)
+READ8_MEMBER(bbc_mertec_device::sheila_r)
{
uint8_t data = 0xfe;
if (offset >= 0x18 && offset < 0x20)
{
- data = m_upd7002->read(offset & 0x03);
+ data = m_upd7002->read(space, offset & 0x03);
}
return data;
}
-void bbc_mertec_device::sheila_w(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_mertec_device::sheila_w)
{
if (offset >= 0x18 && offset < 0x20)
{
- m_upd7002->write(offset & 0x03, data);
+ m_upd7002->write(space, offset & 0x03, data);
}
}
-uint8_t bbc_mertec_device::pb_r()
+READ8_MEMBER(bbc_mertec_device::pb_r)
{
- return m_userport->pb_r();
+ return m_userport->pb_r(space, 0);
}
-void bbc_mertec_device::pb_w(uint8_t data)
+WRITE8_MEMBER(bbc_mertec_device::pb_w)
{
- m_userport->pb_w(data);
+ m_userport->pb_w(space, 0, data);
}
diff --git a/src/devices/bus/bbc/exp/mertec.h b/src/devices/bus/bbc/exp/mertec.h
index 33d71ab2ce9..bd87c0d5398 100644
--- a/src/devices/bus/bbc/exp/mertec.h
+++ b/src/devices/bus/bbc/exp/mertec.h
@@ -40,15 +40,15 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t fred_r(offs_t offset) override;
- virtual void fred_w(offs_t offset, uint8_t data) override;
- virtual uint8_t jim_r(offs_t offset) override;
- virtual void jim_w(offs_t offset, uint8_t data) override;
- virtual uint8_t sheila_r(offs_t offset) override;
- virtual void sheila_w(offs_t offset, uint8_t data) override;
-
- virtual uint8_t pb_r() override;
- virtual void pb_w(uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(fred_r) override;
+ virtual DECLARE_WRITE8_MEMBER(fred_w) override;
+ virtual DECLARE_READ8_MEMBER(jim_r) override;
+ virtual DECLARE_WRITE8_MEMBER(jim_w) override;
+ virtual DECLARE_READ8_MEMBER(sheila_r) override;
+ virtual DECLARE_WRITE8_MEMBER(sheila_w) override;
+
+ virtual DECLARE_READ8_MEMBER(pb_r) override;
+ virtual DECLARE_WRITE8_MEMBER(pb_w) override;
private:
int get_analogue_input(int channel_number);
diff --git a/src/devices/bus/bbc/fdc/acorn.cpp b/src/devices/bus/bbc/fdc/acorn.cpp
index 0df7b38b076..dd5d8f28559 100644
--- a/src/devices/bus/bbc/fdc/acorn.cpp
+++ b/src/devices/bus/bbc/fdc/acorn.cpp
@@ -166,30 +166,30 @@ void bbc_acorn1770_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_acorn8271_device::read(offs_t offset)
+READ8_MEMBER(bbc_acorn8271_device::read)
{
uint8_t data;
if (offset & 0x04)
{
- data = m_fdc->data_r();
+ data = m_fdc->data_r(space , 0);
}
else
{
- data = m_fdc->read(offset & 0x03);
+ data = m_fdc->read(space, offset & 0x03);
}
return data;
}
-void bbc_acorn8271_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_acorn8271_device::write)
{
if (offset & 0x04)
{
- m_fdc->data_w(data);
+ m_fdc->data_w(space, 0, data);
}
else
{
- m_fdc->write(offset & 0x03, data);
+ m_fdc->write(space, offset & 0x03, data);
}
}
@@ -207,7 +207,7 @@ WRITE_LINE_MEMBER(bbc_acorn8271_device::side_w)
}
-uint8_t bbc_acorn1770_device::read(offs_t offset)
+READ8_MEMBER(bbc_acorn1770_device::read)
{
uint8_t data = 0xff;
@@ -222,7 +222,7 @@ uint8_t bbc_acorn1770_device::read(offs_t offset)
return data;
}
-void bbc_acorn1770_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_acorn1770_device::write)
{
if (offset & 0x04)
{
diff --git a/src/devices/bus/bbc/fdc/acorn.h b/src/devices/bus/bbc/fdc/acorn.h
index 13b434b156b..951b7e33e1d 100644
--- a/src/devices/bus/bbc/fdc/acorn.h
+++ b/src/devices/bus/bbc/fdc/acorn.h
@@ -42,8 +42,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
DECLARE_WRITE_LINE_MEMBER(motor_w);
@@ -70,8 +70,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
diff --git a/src/devices/bus/bbc/fdc/ams.cpp b/src/devices/bus/bbc/fdc/ams.cpp
index db9eb7e3012..02af01be5c5 100644
--- a/src/devices/bus/bbc/fdc/ams.cpp
+++ b/src/devices/bus/bbc/fdc/ams.cpp
@@ -89,30 +89,30 @@ void bbc_ams3_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_ams3_device::read(offs_t offset)
+READ8_MEMBER(bbc_ams3_device::read)
{
uint8_t data;
if (offset & 0x04)
{
- data = m_fdc->data_r();
+ data = m_fdc->data_r(space , 0);
}
else
{
- data = m_fdc->read(offset & 0x03);
+ data = m_fdc->read(space, offset & 0x03);
}
return data;
}
-void bbc_ams3_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_ams3_device::write)
{
if (offset & 0x04)
{
- m_fdc->data_w(data);
+ m_fdc->data_w(space, 0, data);
}
else
{
- m_fdc->write(offset & 0x03, data);
+ m_fdc->write(space, offset & 0x03, data);
}
}
diff --git a/src/devices/bus/bbc/fdc/ams.h b/src/devices/bus/bbc/fdc/ams.h
index 304666b5392..a97a6b762c5 100644
--- a/src/devices/bus/bbc/fdc/ams.h
+++ b/src/devices/bus/bbc/fdc/ams.h
@@ -39,8 +39,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
diff --git a/src/devices/bus/bbc/fdc/cumana.cpp b/src/devices/bus/bbc/fdc/cumana.cpp
index f4490b1922d..23cecd3ebcf 100644
--- a/src/devices/bus/bbc/fdc/cumana.cpp
+++ b/src/devices/bus/bbc/fdc/cumana.cpp
@@ -137,7 +137,7 @@ void bbc_cumanafdc_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_cumanafdc_device::read(offs_t offset)
+READ8_MEMBER(bbc_cumanafdc_device::read)
{
uint8_t data;
@@ -152,7 +152,7 @@ uint8_t bbc_cumanafdc_device::read(offs_t offset)
return data;
}
-void bbc_cumanafdc_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_cumanafdc_device::write)
{
if (offset & 0x04)
{
diff --git a/src/devices/bus/bbc/fdc/cumana.h b/src/devices/bus/bbc/fdc/cumana.h
index 6e1a4f25011..5b2439000ec 100644
--- a/src/devices/bus/bbc/fdc/cumana.h
+++ b/src/devices/bus/bbc/fdc/cumana.h
@@ -39,8 +39,8 @@ protected:
// device-level overrides
virtual void device_start() override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
required_device<mb8877_device> m_fdc;
required_device<floppy_connector> m_floppy0;
diff --git a/src/devices/bus/bbc/fdc/cv1797.cpp b/src/devices/bus/bbc/fdc/cv1797.cpp
index d14098a3fa3..98f54718c42 100644
--- a/src/devices/bus/bbc/fdc/cv1797.cpp
+++ b/src/devices/bus/bbc/fdc/cv1797.cpp
@@ -100,7 +100,7 @@ void bbc_cv1797_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_cv1797_device::read(offs_t offset)
+READ8_MEMBER(bbc_cv1797_device::read)
{
uint8_t data;
@@ -115,7 +115,7 @@ uint8_t bbc_cv1797_device::read(offs_t offset)
return data;
}
-void bbc_cv1797_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_cv1797_device::write)
{
if (offset & 0x04)
{
diff --git a/src/devices/bus/bbc/fdc/cv1797.h b/src/devices/bus/bbc/fdc/cv1797.h
index 86207c8fcd0..a887a1b18a4 100644
--- a/src/devices/bus/bbc/fdc/cv1797.h
+++ b/src/devices/bus/bbc/fdc/cv1797.h
@@ -40,8 +40,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
DECLARE_FLOPPY_FORMATS(floppy_formats);
diff --git a/src/devices/bus/bbc/fdc/fdc.cpp b/src/devices/bus/bbc/fdc/fdc.cpp
index 2269bb3370a..10f9131351f 100644
--- a/src/devices/bus/bbc/fdc/fdc.cpp
+++ b/src/devices/bus/bbc/fdc/fdc.cpp
@@ -89,10 +89,10 @@ void bbc_fdc_slot_device::device_reset()
// read
//-------------------------------------------------
-uint8_t bbc_fdc_slot_device::read(offs_t offset)
+READ8_MEMBER(bbc_fdc_slot_device::read)
{
if (m_card)
- return m_card->read(offset);
+ return m_card->read(space, offset);
else
return 0xff;
}
@@ -101,10 +101,10 @@ uint8_t bbc_fdc_slot_device::read(offs_t offset)
// write
//-------------------------------------------------
-void bbc_fdc_slot_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_fdc_slot_device::write)
{
if (m_card)
- m_card->write(offset, data);
+ m_card->write(space, offset, data);
}
//-------------------------------------------------
diff --git a/src/devices/bus/bbc/fdc/fdc.h b/src/devices/bus/bbc/fdc/fdc.h
index 3264172a25d..0cc256961ee 100644
--- a/src/devices/bus/bbc/fdc/fdc.h
+++ b/src/devices/bus/bbc/fdc/fdc.h
@@ -41,8 +41,8 @@ public:
auto intrq_wr_callback() { return m_intrq_cb.bind(); }
auto drq_wr_callback() { return m_drq_cb.bind(); }
- uint8_t read(offs_t offset);
- void write(offs_t offset, uint8_t data);
+ virtual DECLARE_READ8_MEMBER(read);
+ virtual DECLARE_WRITE8_MEMBER(write);
DECLARE_WRITE_LINE_MEMBER( intrq_w ) { m_intrq_cb(state); }
DECLARE_WRITE_LINE_MEMBER( drq_w) { m_drq_cb(state); }
@@ -66,8 +66,8 @@ private:
class device_bbc_fdc_interface : public device_slot_card_interface
{
public:
- virtual uint8_t read(offs_t offset) { return 0xff; }
- virtual void write(offs_t offset, uint8_t data) { }
+ virtual DECLARE_READ8_MEMBER(read) { return 0xff; }
+ virtual DECLARE_WRITE8_MEMBER(write) { }
protected:
device_bbc_fdc_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/bbc/fdc/microware.cpp b/src/devices/bus/bbc/fdc/microware.cpp
index 477ac0f3f9e..29489af382c 100644
--- a/src/devices/bus/bbc/fdc/microware.cpp
+++ b/src/devices/bus/bbc/fdc/microware.cpp
@@ -101,7 +101,7 @@ void bbc_microware_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_microware_device::read(offs_t offset)
+READ8_MEMBER(bbc_microware_device::read)
{
uint8_t data;
@@ -116,7 +116,7 @@ uint8_t bbc_microware_device::read(offs_t offset)
return data;
}
-void bbc_microware_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_microware_device::write)
{
if (offset & 0x04)
{
diff --git a/src/devices/bus/bbc/fdc/microware.h b/src/devices/bus/bbc/fdc/microware.h
index 61c0cb358cf..117159b407d 100644
--- a/src/devices/bus/bbc/fdc/microware.h
+++ b/src/devices/bus/bbc/fdc/microware.h
@@ -42,8 +42,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
DECLARE_FLOPPY_FORMATS(floppy_formats);
diff --git a/src/devices/bus/bbc/fdc/opus.cpp b/src/devices/bus/bbc/fdc/opus.cpp
index f6b07df6bcb..f25de315c58 100644
--- a/src/devices/bus/bbc/fdc/opus.cpp
+++ b/src/devices/bus/bbc/fdc/opus.cpp
@@ -212,7 +212,7 @@ void bbc_opusfdc_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-uint8_t bbc_opus8272_device::read(offs_t offset)
+READ8_MEMBER(bbc_opus8272_device::read)
{
uint8_t data = 0xff;
@@ -227,20 +227,20 @@ uint8_t bbc_opus8272_device::read(offs_t offset)
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(1);
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(1);
case 0x04:
- data = m_fdc->msr_r();
+ data = m_fdc->msr_r(space, 0);
break;
case 0x05:
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(0);
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(0);
case 0x07:
- data = m_fdc->fifo_r();
+ data = m_fdc->fifo_r(space, 0);
break;
}
return data;
}
-void bbc_opus8272_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_opus8272_device::write)
{
floppy_image_device *floppy = nullptr;
@@ -259,13 +259,13 @@ void bbc_opus8272_device::write(offs_t offset, uint8_t data)
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(0);
if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(0);
case 0x07:
- m_fdc->fifo_w(data);
+ m_fdc->fifo_w(space, 0, data);
break;
}
}
-uint8_t bbc_opusfdc_device::read(offs_t offset)
+READ8_MEMBER(bbc_opusfdc_device::read)
{
uint8_t data;
@@ -280,7 +280,7 @@ uint8_t bbc_opusfdc_device::read(offs_t offset)
return data;
}
-void bbc_opusfdc_device::write(offs_t offset, uint8_t data)
+WRITE8_MEMBER(bbc_opusfdc_device::write)
{
if (offset & 0x04)
{
diff --git a/src/devices/bus/bbc/fdc/opus.h b/src/devices/bus/bbc/fdc/opus.h
index 033fccc02c4..721f3ebab5c 100644
--- a/src/devices/bus/bbc/fdc/opus.h
+++ b/src/devices/bus/bbc/fdc/opus.h
@@ -36,8 +36,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
private:
required_device<i8272a_device> m_fdc;
@@ -62,8 +62,8 @@ protected:
// device-level overrides
virtual void device_start() override;
- virtual uint8_t read(offs_t offset) override;
- virtual void write(offs_t offset, uint8_t data) override;
+ virtual DECLARE_READ8_MEMBER(read) override;
+ virtual DECLARE_WRITE8_MEMBER(write) override;
required_device<wd_fdc_