summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--hash/apple2.xml36
-rw-r--r--hash/apple2gs.xml53
-rw-r--r--hash/gameboy.xml15
-rw-r--r--hash/hp9845b_rom.xml35
-rw-r--r--hash/octopus.xml90
-rw-r--r--hash/segacd.xml5672
-rw-r--r--hash/x68k_flop.xml282
-rw-r--r--plugins/hiscore/hiscore.dat128
-rw-r--r--scripts/src/bus.lua12
-rw-r--r--scripts/src/machine.lua24
-rw-r--r--scripts/src/mame/frontend.lua4
-rw-r--r--scripts/src/sound.lua25
-rw-r--r--scripts/target/mame/arcade.lua4
-rw-r--r--scripts/target/mame/mess.lua35
-rw-r--r--scripts/target/mame/nl.lua1
-rw-r--r--scripts/target/mame/tiny.lua1
-rw-r--r--src/devices/bus/a2bus/a2dx1.cpp37
-rw-r--r--src/devices/bus/a2bus/a2dx1.h7
-rw-r--r--src/devices/bus/a2bus/a2sam.cpp24
-rw-r--r--src/devices/bus/a2bus/a2sam.h3
-rw-r--r--src/devices/bus/a7800/a78_slot.cpp2
-rw-r--r--src/devices/bus/a7800/a78_slot.h4
-rw-r--r--src/devices/bus/a800/a800_slot.cpp6
-rw-r--r--src/devices/bus/a800/a800_slot.h4
-rw-r--r--src/devices/bus/amiga/zorro/a590.h2
-rw-r--r--src/devices/bus/apf/slot.h2
-rw-r--r--src/devices/bus/astrocde/ram.h8
-rw-r--r--src/devices/bus/centronics/covox.cpp35
-rw-r--r--src/devices/bus/centronics/covox.h6
-rw-r--r--src/devices/bus/centronics/digiblst.cpp12
-rw-r--r--src/devices/bus/centronics/digiblst.h2
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp19
-rw-r--r--src/devices/bus/centronics/epson_lx810l.h2
-rw-r--r--src/devices/bus/chanf/slot.h2
-rw-r--r--src/devices/bus/coco/coco_orch90.cpp25
-rw-r--r--src/devices/bus/coco/coco_orch90.h4
-rw-r--r--src/devices/bus/cpc/amdrum.cpp12
-rw-r--r--src/devices/bus/cpc/amdrum.h2
-rw-r--r--src/devices/bus/cpc/magicsound.cpp14
-rw-r--r--src/devices/bus/cpc/magicsound.h2
-rw-r--r--src/devices/bus/cpc/symbfac2.h2
-rw-r--r--src/devices/bus/gameboy/gb_slot.cpp2
-rw-r--r--src/devices/bus/gameboy/gb_slot.h2
-rw-r--r--src/devices/bus/gba/gba_slot.cpp2
-rw-r--r--src/devices/bus/generic/slot.h2
-rw-r--r--src/devices/bus/hp9845_io/98035.cpp777
-rw-r--r--src/devices/bus/hp9845_io/98035.h109
-rw-r--r--src/devices/bus/hp9845_io/hp9845_io.cpp86
-rw-r--r--src/devices/bus/hp9845_io/hp9845_io.h81
-rw-r--r--src/devices/bus/hp_optroms/hp_optrom.h2
-rw-r--r--src/devices/bus/intv/slot.cpp2
-rw-r--r--src/devices/bus/intv/slot.h2
-rw-r--r--src/devices/bus/isa/3c505.h2
-rw-r--r--src/devices/bus/isa/cga.h2
-rw-r--r--src/devices/bus/isa/dectalk.cpp8
-rw-r--r--src/devices/bus/isa/dectalk.h2
-rw-r--r--src/devices/bus/isa/gus.h2
-rw-r--r--src/devices/bus/isa/hdc.h2
-rw-r--r--src/devices/bus/isa/mcd.cpp40
-rw-r--r--src/devices/bus/isa/mcd.h6
-rw-r--r--src/devices/bus/isa/mda.h2
-rw-r--r--src/devices/bus/isa/num9rev.h4
-rw-r--r--src/devices/bus/isa/omti8621.h2
-rw-r--r--src/devices/bus/isa/p1_sound.cpp12
-rw-r--r--src/devices/bus/isa/p1_sound.h2
-rw-r--r--src/devices/bus/isa/sb16.cpp50
-rw-r--r--src/devices/bus/isa/sb16.h4
-rw-r--r--src/devices/bus/isa/sblaster.cpp94
-rw-r--r--src/devices/bus/isa/sblaster.h4
-rw-r--r--src/devices/bus/isa/sc499.h4
-rw-r--r--src/devices/bus/isa/stereo_fx.cpp17
-rw-r--r--src/devices/bus/isa/stereo_fx.h3
-rw-r--r--src/devices/bus/lpci/southbridge.h1
-rw-r--r--src/devices/bus/m5/slot.h2
-rw-r--r--src/devices/bus/megadrive/md_slot.cpp4
-rw-r--r--src/devices/bus/msx_cart/cartridge.h8
-rw-r--r--src/devices/bus/msx_cart/konami.cpp10
-rw-r--r--src/devices/bus/msx_cart/konami.h2
-rw-r--r--src/devices/bus/msx_cart/majutsushi.cpp10
-rw-r--r--src/devices/bus/msx_cart/majutsushi.h2
-rw-r--r--src/devices/bus/msx_slot/cartridge.cpp2
-rw-r--r--src/devices/bus/msx_slot/panasonic08.h2
-rw-r--r--src/devices/bus/neogeo/prot_cmc.cpp4
-rw-r--r--src/devices/bus/neogeo/prot_cthd.cpp12
-rw-r--r--src/devices/bus/neogeo/prot_kof2k2.cpp8
-rw-r--r--src/devices/bus/neogeo/prot_kof2k3bl.cpp2
-rw-r--r--src/devices/bus/neogeo/prot_kof98.cpp2
-rw-r--r--src/devices/bus/neogeo/prot_misc.cpp28
-rw-r--r--src/devices/bus/neogeo/prot_pcm2.cpp2
-rw-r--r--src/devices/bus/neogeo/prot_pvc.cpp10
-rw-r--r--src/devices/bus/nes/aladdin.cpp2
-rw-r--r--src/devices/bus/nes/nes_ines.hxx2
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx4
-rw-r--r--src/devices/bus/nes/nes_slot.cpp4
-rw-r--r--src/devices/bus/nes/nes_slot.h8
-rw-r--r--src/devices/bus/nes/nes_unif.hxx6
-rw-r--r--src/devices/bus/nubus/nubus.h2
-rw-r--r--src/devices/bus/nubus/nubus_48gc.h2
-rw-r--r--src/devices/bus/nubus/nubus_cb264.h2
-rw-r--r--src/devices/bus/nubus/nubus_m2hires.h2
-rw-r--r--src/devices/bus/nubus/nubus_m2video.h2
-rw-r--r--src/devices/bus/nubus/nubus_radiustpd.h2
-rw-r--r--src/devices/bus/nubus/nubus_spec8.h2
-rw-r--r--src/devices/bus/nubus/nubus_specpdq.h2
-rw-r--r--src/devices/bus/nubus/nubus_vikbw.h2
-rw-r--r--src/devices/bus/nubus/nubus_wsportrait.h2
-rw-r--r--src/devices/bus/nubus/pds30_30hr.h2
-rw-r--r--src/devices/bus/nubus/pds30_cb264.h2
-rw-r--r--src/devices/bus/nubus/pds30_mc30.h2
-rw-r--r--src/devices/bus/nubus/pds30_procolor816.h2
-rw-r--r--src/devices/bus/nubus/pds30_sigmalview.h2
-rw-r--r--src/devices/bus/odyssey2/slot.h2
-rw-r--r--src/devices/bus/pc_kbd/iskr1030.h2
-rw-r--r--src/devices/bus/pce/pce_slot.cpp2
-rw-r--r--src/devices/bus/pce/pce_slot.h2
-rw-r--r--src/devices/bus/pet/2joysnd.cpp14
-rw-r--r--src/devices/bus/pet/2joysnd.h2
-rw-r--r--src/devices/bus/pet/cb2snd.cpp14
-rw-r--r--src/devices/bus/pet/cb2snd.h2
-rw-r--r--src/devices/bus/plus4/sid.cpp6
-rw-r--r--src/devices/bus/plus4/sid.h1
-rw-r--r--src/devices/bus/pofo/hpc104.cpp6
-rw-r--r--src/devices/bus/sat_ctrl/keybd.cpp2
-rw-r--r--src/devices/bus/saturn/sat_slot.h2
-rw-r--r--src/devices/bus/scsi/omti5100.cpp2
-rw-r--r--src/devices/bus/scsi/s1410.cpp2
-rw-r--r--src/devices/bus/scv/slot.cpp2
-rw-r--r--src/devices/bus/scv/slot.h2
-rw-r--r--src/devices/bus/sega8/sega8_slot.cpp2
-rw-r--r--src/devices/bus/sega8/sega8_slot.h2
-rw-r--r--src/devices/bus/sg1000_exp/fm_unit.cpp8
-rw-r--r--src/devices/bus/snes/snes_slot.cpp8
-rw-r--r--src/devices/bus/snes/snes_slot.h6
-rw-r--r--src/devices/bus/ti99x/gromport.h4
-rw-r--r--src/devices/bus/vc4000/slot.h2
-rw-r--r--src/devices/bus/vcs/vcs_slot.cpp2
-rwxr-xr-xsrc/devices/bus/vcs/vcs_slot.h2
-rw-r--r--src/devices/bus/vectrex/slot.cpp2
-rw-r--r--src/devices/bus/vidbrain/exp.h4
-rw-r--r--src/devices/bus/wswan/slot.cpp2
-rw-r--r--src/devices/bus/wswan/slot.h2
-rw-r--r--src/devices/cpu/8x300/8x300.cpp10
-rw-r--r--src/devices/cpu/8x300/8x300.h3
-rw-r--r--src/devices/cpu/alph8201/8201dasm.cpp5
-rw-r--r--src/devices/cpu/alph8201/alph8201.cpp31
-rw-r--r--src/devices/cpu/alph8201/alph8201.h13
-rw-r--r--src/devices/cpu/apexc/apexc.cpp1
-rw-r--r--src/devices/cpu/arm7/arm7.cpp435
-rw-r--r--src/devices/cpu/arm7/arm7.h22
-rw-r--r--src/devices/cpu/arm7/arm7core.h24
-rw-r--r--src/devices/cpu/arm7/arm7core.hxx94
-rw-r--r--src/devices/cpu/arm7/arm7drc.hxx44
-rw-r--r--src/devices/cpu/arm7/arm7help.h18
-rw-r--r--src/devices/cpu/arm7/arm7ops.cpp377
-rw-r--r--src/devices/cpu/arm7/arm7thmb.cpp408
-rw-r--r--src/devices/cpu/drcbec.cpp2
-rw-r--r--src/devices/cpu/drcbeut.cpp4
-rw-r--r--src/devices/cpu/drcbex64.cpp34
-rw-r--r--src/devices/cpu/drcbex86.cpp86
-rw-r--r--src/devices/cpu/drccache.cpp4
-rw-r--r--src/devices/cpu/drcuml.cpp10
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.cpp44
-rw-r--r--src/devices/cpu/i86/i186.cpp2
-rw-r--r--src/devices/cpu/m68000/m68kmake.cpp10
-rw-r--r--src/devices/cpu/m6809/m6809.cpp26
-rw-r--r--src/devices/cpu/m6809/m6809.h3
-rw-r--r--src/devices/cpu/mc68hc11/mc68hc11.h2
-rw-r--r--src/devices/cpu/mips/mips3.cpp6
-rw-r--r--src/devices/cpu/mips/mips3.h4
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp8
-rw-r--r--src/devices/cpu/pdp8/pdp8.cpp2
-rw-r--r--src/devices/cpu/powerpc/ppcdrc.cpp8
-rw-r--r--src/devices/cpu/sharc/sharc.cpp2
-rw-r--r--src/devices/cpu/uml.cpp4
-rw-r--r--src/devices/cpu/x86emit.h6
-rw-r--r--src/devices/cpu/x86log.cpp2
-rw-r--r--src/devices/machine/8042kbdc.cpp72
-rw-r--r--src/devices/machine/8042kbdc.h1
-rw-r--r--src/devices/machine/8530scc.cpp2
-rw-r--r--src/devices/machine/at28c16.cpp4
-rw-r--r--src/devices/machine/at45dbxx.h6
-rw-r--r--src/devices/machine/atahle.h2
-rw-r--r--src/devices/machine/dp8390.cpp2
-rw-r--r--src/devices/machine/ds1302.h1
-rw-r--r--src/devices/machine/ds1386.cpp594
-rw-r--r--src/devices/machine/ds1386.h210
-rw-r--r--src/devices/machine/hd64610.h1
-rw-r--r--src/devices/machine/i2cmem.h2
-rw-r--r--src/devices/machine/laserdsc.h2
-rw-r--r--src/devices/machine/matsucd.cpp757
-rw-r--r--src/devices/machine/matsucd.h31
-rw-r--r--src/devices/machine/mc146818.h2
-rw-r--r--src/devices/machine/mc6846.cpp4
-rw-r--r--src/devices/machine/mc6846.h6
-rw-r--r--src/devices/machine/mccs1850.h1
-rw-r--r--src/devices/machine/mm58167.cpp22
-rw-r--r--src/devices/machine/mm58167.h1
-rw-r--r--src/devices/machine/msm5832.cpp20
-rw-r--r--src/devices/machine/msm5832.h1
-rw-r--r--src/devices/machine/msm58321.h1
-rw-r--r--src/devices/machine/msm6242.h1
-rw-r--r--src/devices/machine/nscsi_s1410.cpp2
-rw-r--r--src/devices/machine/pcf8593.h1
-rw-r--r--src/devices/machine/pckeybrd.cpp6
-rw-r--r--src/devices/machine/pckeybrd.h6
-rw-r--r--src/devices/machine/pit8253.cpp28
-rw-r--r--src/devices/machine/ram.h2
-rw-r--r--src/devices/machine/roc10937.cpp28
-rw-r--r--src/devices/machine/roc10937.h16
-rw-r--r--src/devices/machine/rp5c01.cpp20
-rw-r--r--src/devices/machine/rp5c01.h2
-rw-r--r--src/devices/machine/rp5c15.h1
-rw-r--r--src/devices/machine/rtc4543.h1
-rw-r--r--src/devices/machine/s3c2400.cpp1
-rw-r--r--src/devices/machine/s3c2410.cpp1
-rw-r--r--src/devices/machine/s3c2440.cpp1
-rw-r--r--src/devices/machine/s3c44b0.cpp1
-rw-r--r--src/devices/machine/serflash.h2
-rw-r--r--src/devices/machine/stvcd.cpp4
-rw-r--r--src/devices/machine/timehelp.h51
-rw-r--r--src/devices/machine/timekpr.cpp71
-rw-r--r--src/devices/machine/timekpr.h2
-rw-r--r--src/devices/machine/upd1990a.h1
-rw-r--r--src/devices/machine/z80scc.cpp706
-rw-r--r--src/devices/machine/z80scc.h45
-rw-r--r--src/devices/sound/ad1848.cpp30
-rw-r--r--src/devices/sound/ad1848.h4
-rw-r--r--src/devices/sound/dac.cpp92
-rw-r--r--src/devices/sound/dac.h323
-rw-r--r--src/devices/sound/es5506.cpp16
-rw-r--r--src/devices/sound/fmopl.cpp33
-rw-r--r--src/devices/sound/mea8000.cpp (renamed from src/mame/audio/mea8000.cpp)50
-rw-r--r--src/devices/sound/mea8000.h (renamed from src/mame/audio/mea8000.h)12
-rw-r--r--src/devices/sound/spu.cpp2
-rw-r--r--src/devices/sound/tms3615.h3
-rw-r--r--src/devices/sound/volt_reg.cpp33
-rw-r--r--src/devices/sound/volt_reg.h44
-rw-r--r--src/devices/sound/ymf262.cpp38
-rw-r--r--src/devices/video/mc6845.cpp6
-rw-r--r--src/devices/video/mc6845.h1
-rw-r--r--src/devices/video/pc_vga.h2
-rw-r--r--src/devices/video/ramdac.cpp7
-rw-r--r--src/devices/video/ramdac.h5
-rw-r--r--src/emu/debug/debugcmd.cpp24
-rw-r--r--src/emu/debug/debugcpu.cpp6
-rw-r--r--src/emu/debug/debugcpu.h4
-rw-r--r--src/emu/devfind.h6
-rw-r--r--src/emu/diexec.h1
-rw-r--r--src/emu/diimage.cpp28
-rw-r--r--src/emu/diserial.cpp4
-rw-r--r--src/emu/diserial.h2
-rw-r--r--src/emu/disound.h2
-rw-r--r--src/emu/distate.h2
-rw-r--r--src/emu/drawgfx.h4
-rw-r--r--src/emu/drivenum.cpp8
-rw-r--r--src/emu/drivenum.h4
-rw-r--r--src/emu/emualloc.cpp6
-rw-r--r--src/emu/emucore.h4
-rw-r--r--src/emu/emumem.cpp2
-rw-r--r--src/emu/emumem.h4
-rw-r--r--src/emu/emuopts.cpp1
-rw-r--r--src/emu/emuopts.h2
-rw-r--r--src/emu/fileio.h2
-rw-r--r--src/emu/ioport.cpp27
-rw-r--r--src/emu/ioport.h19
-rw-r--r--src/emu/natkeyboard.cpp69
-rw-r--r--src/emu/natkeyboard.h27
-rw-r--r--src/emu/render.cpp18
-rw-r--r--src/emu/rendfont.cpp18
-rw-r--r--src/emu/rendfont.h10
-rw-r--r--src/emu/rendlay.cpp6
-rw-r--r--src/emu/rendutil.cpp22
-rw-r--r--src/emu/rendutil.h4
-rw-r--r--src/emu/romentry.cpp2
-rw-r--r--src/emu/romload.cpp2
-rw-r--r--src/emu/screen.cpp6
-rw-r--r--src/emu/sound.cpp2
-rw-r--r--src/emu/ui/cmdrender.h2
-rw-r--r--src/emu/ui/uimain.h5
-rw-r--r--src/emu/uiinput.cpp4
-rw-r--r--src/emu/uiinput.h4
-rw-r--r--src/emu/validity.cpp2
-rw-r--r--src/emu/validity.h2
-rw-r--r--src/emu/video.cpp26
-rw-r--r--src/emu/video.h2
-rw-r--r--src/frontend/mame/clifront.cpp388
-rw-r--r--src/frontend/mame/clifront.h1
-rw-r--r--src/frontend/mame/console.cpp185
-rw-r--r--src/frontend/mame/console.h44
-rw-r--r--src/frontend/mame/info.cpp2
-rw-r--r--src/frontend/mame/luaengine.cpp22
-rw-r--r--src/frontend/mame/mameopts.cpp8
-rw-r--r--src/frontend/mame/media_ident.cpp273
-rw-r--r--src/frontend/mame/media_ident.h42
-rw-r--r--src/frontend/mame/ui/auditmenu.cpp2
-rw-r--r--src/frontend/mame/ui/custmenu.cpp70
-rw-r--r--src/frontend/mame/ui/custui.cpp90
-rw-r--r--src/frontend/mame/ui/datmenu.cpp4
-rw-r--r--src/frontend/mame/ui/devopt.cpp2
-rw-r--r--src/frontend/mame/ui/dirmenu.cpp13
-rw-r--r--src/frontend/mame/ui/filecreate.cpp4
-rw-r--r--src/frontend/mame/ui/filemngr.cpp2
-rw-r--r--src/frontend/mame/ui/filesel.cpp4
-rw-r--r--src/frontend/mame/ui/info.cpp2
-rw-r--r--src/frontend/mame/ui/inputmap.cpp12
-rw-r--r--src/frontend/mame/ui/inputmap.h1
-rw-r--r--src/frontend/mame/ui/menu.h2
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp33
-rw-r--r--src/frontend/mame/ui/optsmenu.cpp32
-rw-r--r--src/frontend/mame/ui/pluginopt.cpp6
-rw-r--r--src/frontend/mame/ui/selgame.cpp38
-rw-r--r--src/frontend/mame/ui/selgame.h2
-rw-r--r--src/frontend/mame/ui/selsoft.cpp2
-rw-r--r--src/frontend/mame/ui/simpleselgame.cpp4
-rw-r--r--src/frontend/mame/ui/slotopt.cpp2
-rw-r--r--src/frontend/mame/ui/sndmenu.cpp8
-rw-r--r--src/frontend/mame/ui/swlist.cpp6
-rw-r--r--src/frontend/mame/ui/text.cpp14
-rw-r--r--src/frontend/mame/ui/text.h6
-rw-r--r--src/frontend/mame/ui/ui.cpp24
-rw-r--r--src/frontend/mame/ui/ui.h3
-rw-r--r--src/frontend/mame/ui/utils.h4
-rw-r--r--src/frontend/mame/ui/videoopt.cpp8
-rw-r--r--src/lib/formats/cassimg.cpp4
-rw-r--r--src/lib/formats/ccvf_dsk.cpp4
-rw-r--r--src/lib/formats/cqm_dsk.cpp4
-rw-r--r--src/lib/formats/csw_cas.cpp4
-rw-r--r--src/lib/formats/d64_dsk.cpp2
-rw-r--r--src/lib/formats/dfi_dsk.cpp2
-rw-r--r--src/lib/formats/flopimg.cpp2
-rw-r--r--src/lib/formats/fsd_dsk.cpp2
-rw-r--r--src/lib/formats/g64_dsk.cpp4
-rw-r--r--src/lib/formats/hxchfe_dsk.cpp4
-rw-r--r--src/lib/formats/hxcmfm_dsk.cpp2
-rw-r--r--src/lib/formats/imd_dsk.cpp2
-rw-r--r--src/lib/formats/ipf_dsk.cpp8
-rw-r--r--src/lib/formats/ipf_dsk.h6
-rw-r--r--src/lib/formats/kc_cas.cpp2
-rw-r--r--src/lib/formats/mfi_dsk.cpp2
-rw-r--r--src/lib/formats/pasti_dsk.cpp2
-rw-r--r--src/lib/formats/td0_dsk.cpp2
-rw-r--r--src/lib/formats/victor9k_dsk.cpp2
-rw-r--r--src/lib/util/avhuff.cpp4
-rw-r--r--src/lib/util/avhuff.h4
-rw-r--r--src/lib/util/cdrom.cpp2
-rw-r--r--src/lib/util/chd.cpp18
-rw-r--r--src/lib/util/chd.h16
-rw-r--r--src/lib/util/chdcodec.cpp8
-rw-r--r--src/lib/util/chdcodec.h4
-rw-r--r--src/lib/util/corefile.cpp6
-rw-r--r--src/lib/util/corefile.h2
-rw-r--r--src/lib/util/coretmpl.h4
-rw-r--r--src/lib/util/flac.cpp2
-rw-r--r--src/lib/util/huffman.cpp2
-rw-r--r--src/lib/util/options.h2
-rw-r--r--src/lib/util/un7z.cpp4
-rw-r--r--src/lib/util/unicode.cpp30
-rw-r--r--src/lib/util/unicode.h30
-rw-r--r--src/lib/util/unzip.cpp18
-rw-r--r--src/lib/util/vecstream.h4
-rw-r--r--src/mame/arcade.flt1
-rw-r--r--src/mame/audio/alesis.cpp12
-rw-r--r--src/mame/audio/cchasm.cpp12
-rw-r--r--src/mame/audio/cclimber.cpp4
-rw-r--r--src/mame/audio/cyberbal.cpp11
-rw-r--r--src/mame/audio/galaxian.cpp8
-rw-r--r--src/mame/audio/gottlieb.cpp54
-rw-r--r--src/mame/audio/gottlieb.h19
-rw-r--r--src/mame/audio/harddriv.cpp20
-rw-r--r--src/mame/audio/hyprolyb.cpp2
-rw-r--r--src/mame/audio/jaguar.cpp4
-rw-r--r--src/mame/audio/leland.cpp389
-rw-r--r--src/mame/audio/m72.cpp4
-rw-r--r--src/mame/audio/m72.h2
-rw-r--r--src/mame/audio/meadows.cpp24
-rw-r--r--src/mame/audio/midway.cpp42
-rw-r--r--src/mame/audio/midway.h22
-rw-r--r--src/mame/audio/n8080.cpp41
-rw-r--r--src/mame/audio/s11c_bg.cpp33
-rw-r--r--src/mame/audio/s11c_bg.h15
-rw-r--r--src/mame/audio/segag80r.cpp20
-rw-r--r--src/mame/audio/segasnd.cpp2
-rw-r--r--src/mame/audio/segasnd.h4
-rw-r--r--src/mame/audio/senjyo.cpp2
-rw-r--r--src/mame/audio/spacefb.cpp13
-rw-r--r--src/mame/audio/targ.cpp23
-rw-r--r--src/mame/audio/williams.cpp33
-rw-r--r--src/mame/audio/williams.h13
-rw-r--r--src/mame/audio/wpcsnd.cpp34
-rw-r--r--src/mame/audio/wpcsnd.h15
-rw-r--r--src/mame/audio/zaccaria.cpp9
-rw-r--r--src/mame/audio/zaccaria.h6
-rw-r--r--src/mame/audio/zaxxon.cpp4
-rw-r--r--src/mame/drivers/20pacgal.cpp16
-rw-r--r--src/mame/drivers/4004clk.cpp18
-rw-r--r--src/mame/drivers/40love.cpp57
-rw-r--r--src/mame/drivers/8080bw.cpp4
-rw-r--r--src/mame/drivers/a310.cpp56
-rw-r--r--src/mame/drivers/abc80.cpp2
-rw-r--r--src/mame/drivers/aceex.cpp94
-rw-r--r--src/mame/drivers/acefruit.cpp6
-rw-r--r--src/mame/drivers/advision.cpp10
-rw-r--r--src/mame/drivers/alg.cpp6
-rw-r--r--src/mame/drivers/alpha68k.cpp97
-rw-r--r--src/mame/drivers/amaticmg.cpp18
-rw-r--r--src/mame/drivers/amiga.cpp2
-rw-r--r--src/mame/drivers/amusco.cpp138
-rw-r--r--src/mame/drivers/anzterm.cpp480
-rw-r--r--src/mame/drivers/apc.cpp2
-rw-r--r--src/mame/drivers/apple3.cpp15
-rw-r--r--src/mame/drivers/applix.cpp27
-rw-r--r--src/mame/drivers/aristmk5.cpp93
-rw-r--r--src/mame/drivers/arkanoid.cpp2
-rw-r--r--src/mame/drivers/armedf.cpp122
-rw-r--r--src/mame/drivers/arsystems.cpp4
-rw-r--r--src/mame/drivers/atari400.cpp23
-rw-r--r--src/mame/drivers/atari_s1.cpp14
-rw-r--r--src/mame/drivers/atari_s2.cpp26
-rw-r--r--src/mame/drivers/backfire.cpp2
-rw-r--r--src/mame/drivers/balsente.cpp2
-rw-r--r--src/mame/drivers/barata.cpp11
-rw-r--r--src/mame/drivers/barni.cpp1
-rw-r--r--src/mame/drivers/beezer.cpp7
-rw-r--r--src/mame/drivers/beta.cpp2
-rw-r--r--src/mame/drivers/bfcobra.cpp2
-rw-r--r--src/mame/drivers/binbug.cpp2
-rw-r--r--src/mame/drivers/bking.cpp18
-rw-r--r--src/mame/drivers/blitz68k.cpp29
-rw-r--r--src/mame/drivers/blktiger.cpp2
-rw-r--r--src/mame/drivers/bnstars.cpp2
-rw-r--r--src/mame/drivers/bw12.cpp13
-rw-r--r--src/mame/drivers/bwing.cpp18
-rw-r--r--src/mame/drivers/by17.cpp12
-rw-r--r--src/mame/drivers/by35.cpp12
-rw-r--r--src/mame/drivers/by6803.cpp6
-rw-r--r--src/mame/drivers/byvid.cpp13
-rw-r--r--src/mame/drivers/c128.cpp13
-rw-r--r--src/mame/drivers/calchase.cpp49
-rw-r--r--src/mame/drivers/camplynx.cpp16
-rw-r--r--src/mame/drivers/capbowl.cpp20
-rw-r--r--src/mame/drivers/casloopy.cpp2
-rw-r--r--src/mame/drivers/cave.cpp6
-rw-r--r--src/mame/drivers/cbm2.cpp1
-rw-r--r--src/mame/drivers/cc40.cpp30
-rw-r--r--src/mame/drivers/cchasm.cpp22
-rw-r--r--src/mame/drivers/cclimber.cpp14
-rw-r--r--src/mame/drivers/cd2650.cpp2
-rw-r--r--src/mame/drivers/cdi.cpp4
-rw-r--r--src/mame/drivers/champbas.cpp62
-rw-r--r--src/mame/drivers/cheekyms.cpp27
-rw-r--r--src/mame/drivers/chessmst.cpp2
-rw-r--r--src/mame/drivers/chihiro.cpp7
-rw-r--r--src/mame/drivers/chsuper.cpp12
-rw-r--r--src/mame/drivers/circusc.cpp13
-rw-r--r--src/mame/drivers/cischeat.cpp2
-rw-r--r--src/mame/drivers/cntsteer.cpp25
-rw-r--r--src/mame/drivers/coco12.cpp14
-rw-r--r--src/mame/drivers/coinmstr.cpp2
-rw-r--r--src/mame/drivers/coolpool.cpp34
-rw-r--r--src/mame/drivers/cop01.cpp2
-rw-r--r--src/mame/drivers/cosmic.cpp101
-rw-r--r--src/mame/drivers/craft.cpp12
-rw-r--r--src/mame/drivers/crystal.cpp123
-rw-r--r--src/mame/drivers/csplayh5.cpp56
-rw-r--r--src/mame/drivers/cubeqst.cpp98
-rw-r--r--src/mame/drivers/cubo.cpp2
-rw-r--r--src/mame/drivers/cvs.cpp33
-rw-r--r--src/mame/drivers/cyberbal.cpp13
-rw-r--r--src/mame/drivers/d6800.cpp2
-rw-r--r--src/mame/drivers/dacholer.cpp1
-rw-r--r--src/mame/drivers/dambustr.cpp2
-rw-r--r--src/mame/drivers/darkmist.cpp6
-rw-r--r--src/mame/drivers/dassault.cpp4
-rw-r--r--src/mame/drivers/ddayjlc.cpp2
-rw-r--r--src/mame/drivers/deco156.cpp2
-rw-r--r--src/mame/drivers/deco32.cpp4
-rw-r--r--src/mame/drivers/deco_mlc.cpp2
-rw-r--r--src/mame/drivers/decocass.cpp293
-rw-r--r--src/mame/drivers/dectalk.cpp12
-rw-r--r--src/mame/drivers/deshoros.cpp2
-rw-r--r--src/mame/drivers/digel804.cpp2
-rw-r--r--src/mame/drivers/dragon.cpp2
-rw-r--r--src/mame/drivers/dynax.cpp191
-rw-r--r--src/mame/drivers/elecbowl.cpp220
-rw-r--r--src/mame/drivers/equites.cpp211
-rw-r--r--src/mame/drivers/ertictac.cpp51
-rw-r--r--src/mame/drivers/esq1.cpp8
-rw-r--r--src/mame/drivers/esq5505.cpp40
-rw-r--r--src/mame/drivers/esripsys.cpp34
-rw-r--r--src/mame/drivers/eti660.cpp2
-rw-r--r--src/mame/drivers/exerion.cpp2
-rw-r--r--src/mame/drivers/exterm.cpp30
-rw-r--r--src/mame/drivers/famibox.cpp1
-rw-r--r--src/mame/drivers/fantland.cpp44
-rw-r--r--src/mame/drivers/fcombat.cpp2
-rw-r--r--src/mame/drivers/fidel6502.cpp141
-rw-r--r--src/mame/drivers/fidel68k.cpp13
-rw-r--r--src/mame/drivers/fidelz80.cpp31
-rw-r--r--src/mame/drivers/finalizr.cpp20
-rw-r--r--src/mame/drivers/firetrap.cpp2
-rw-r--r--src/mame/drivers/firetrk.cpp12
-rw-r--r--src/mame/drivers/flstory.cpp105
-rw-r--r--src/mame/drivers/flyball.cpp2
-rw-r--r--src/mame/drivers/forte2.cpp2
-rw-r--r--src/mame/drivers/fruitpc.cpp1
-rw-r--r--src/mame/drivers/funworld.cpp14
-rw-r--r--src/mame/drivers/gaelco3d.cpp2
-rw-r--r--src/mame/drivers/gaiden.cpp8
-rw-r--r--src/mame/drivers/galaxian.cpp65
-rw-r--r--src/mame/drivers/galaxold.cpp25
-rw-r--r--src/mame/drivers/galeb.cpp53
-rw-r--r--src/mame/drivers/galivan.cpp37
-rw-r--r--src/mame/drivers/gamecom.cpp19
-rw-r--r--src/mame/drivers/gauntlet.cpp2
-rw-r--r--src/mame/drivers/gba.cpp66
-rw-r--r--src/mame/drivers/gei.cpp17
-rw-r--r--src/mame/drivers/geniusiq.cpp2
-rw-r--r--src/mame/drivers/go2000.cpp12
-rw-r--r--src/mame/drivers/goldstar.cpp2
-rw-r--r--src/mame/drivers/gottlieb.cpp27
-rw-r--r--src/mame/drivers/gp32.cpp40
-rw-r--r--src/mame/drivers/gts80.cpp16
-rw-r--r--src/mame/drivers/gts80a.cpp12
-rw-r--r--src/mame/drivers/gts80b.cpp12
-rw-r--r--src/mame/drivers/guab.cpp2
-rw-r--r--src/mame/drivers/hankin.cpp15
-rw-r--r--src/mame/drivers/harddriv.cpp84
-rw-r--r--src/mame/drivers/hh_amis2k.cpp (renamed from src/mame/drivers/wildfire.cpp)2
-rw-r--r--src/mame/drivers/hh_cop400.cpp147
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp2
-rw-r--r--src/mame/drivers/hh_tms1k.cpp669
-rw-r--r--src/mame/drivers/hh_ucom4.cpp157
-rw-r--r--src/mame/drivers/hng64.cpp2
-rw-r--r--src/mame/drivers/homedata.cpp84
-rw-r--r--src/mame/drivers/homelab.cpp59
-rw-r--r--src/mame/drivers/hp48.cpp12
-rw-r--r--src/mame/drivers/hp49gp.cpp2
-rw-r--r--src/mame/drivers/hp9845.cpp335
-rw-r--r--src/mame/drivers/hyhoo.cpp17
-rw-r--r--src/mame/drivers/hyperspt.cpp32
-rw-r--r--src/mame/drivers/igs011.cpp4
-rw-r--r--src/mame/drivers/igs017.cpp142
-rw-r--r--src/mame/drivers/igs_m027.cpp2
-rw-r--r--src/mame/drivers/igspoker.cpp2
-rw-r--r--src/mame/drivers/indy_indigo2.cpp1405
-rw-r--r--src/mame/drivers/instruct.cpp2
-rw-r--r--src/mame/drivers/iris3130.cpp6
-rw-r--r--src/mame/drivers/istrebiteli.cpp32
-rw-r--r--src/mame/drivers/jaguar.cpp33
-rw-r--r--src/mame/drivers/jalmah.cpp14
-rw-r--r--src/mame/drivers/jankenmn.cpp12
-rw-r--r--src/mame/drivers/jclub2.cpp2
-rw-r--r--src/mame/drivers/joctronic.cpp1
-rw-r--r--src/mame/drivers/juicebox.cpp22
-rw-r--r--src/mame/drivers/junofrst.cpp22
-rw-r--r--src/mame/drivers/kas89.cpp2
-rw-r--r--src/mame/drivers/kchamp.cpp29
-rw-r--r--src/mame/drivers/kim1.cpp5
-rw-r--r--src/mame/drivers/kingobox.cpp25
-rw-r--r--src/mame/drivers/ksayakyu.cpp16
-rw-r--r--src/mame/drivers/laserbat.cpp12
-rw-r--r--src/mame/drivers/lasso.cpp22
-rw-r--r--src/mame/drivers/lazercmd.cpp60
-rw-r--r--src/mame/drivers/legionna.cpp2
-rw-r--r--src/mame/drivers/leland.cpp58
-rw-r--r--src/mame/drivers/littlerb.cpp32
-rw-r--r--src/mame/drivers/looping.cpp18
-rw-r--r--src/mame/drivers/lynx.cpp2
-rw-r--r--src/mame/drivers/m72.cpp24
-rw-r--r--src/mame/drivers/m90.cpp20
-rw-r--r--src/mame/drivers/mac.cpp38
-rw-r--r--src/mame/drivers/magicfly.cpp17
-rw-r--r--src/mame/drivers/mappy.cpp28
-rw-r--r--src/mame/drivers/matmania.cpp30
-rw-r--r--src/mame/drivers/mbdtower.cpp282
-rw-r--r--src/mame/drivers/mc10.cpp29
-rw-r--r--src/mame/drivers/mcr.cpp18
-rw-r--r--src/mame/drivers/mcr3.cpp8
-rw-r--r--src/mame/drivers/mcr68.cpp36
-rw-r--r--src/mame/drivers/meadows.cpp26
-rw-r--r--src/mame/drivers/megadriv.cpp4
-rw-r--r--src/mame/drivers/megadrvb.cpp2
-rw-r--r--src/mame/drivers/megasys1.cpp6
-rw-r--r--src/mame/drivers/megazone.cpp22
-rw-r--r--src/mame/drivers/meyc8080.cpp20
-rw-r--r--src/mame/drivers/meyc8088.cpp19
-rw-r--r--src/mame/drivers/microtan.cpp11
-rw-r--r--src/mame/drivers/microvsn.cpp31
-rw-r--r--src/mame/drivers/midtunit.cpp6
-rw-r--r--src/mame/drivers/midyunit.cpp26
-rw-r--r--src/mame/drivers/mikro80.cpp17
-rw-r--r--src/mame/drivers/mini2440.cpp26
-rw-r--r--src/mame/drivers/mitchell.cpp2
-rw-r--r--src/mame/drivers/mjsenpu.cpp62
-rw-r--r--src/mame/drivers/mjsister.cpp16
-rw-r--r--src/mame/drivers/mk14.cpp20
-rw-r--r--src/mame/drivers/model2.cpp34
-rw-r--r--src/mame/drivers/mogura.cpp28
-rw-r--r--src/mame/drivers/mrgame.cpp25
-rw-r--r--src/mame/drivers/ms32.cpp4
-rw-r--r--src/mame/drivers/msx.cpp39
-rw-r--r--src/mame/drivers/multfish.cpp6
-rw-r--r--src/mame/drivers/multi8.cpp2
-rw-r--r--src/mame/drivers/multigam.cpp3
-rw-r--r--src/mame/drivers/murogem.cpp12
-rw-r--r--src/mame/drivers/murogmbl.cpp10
-rw-r--r--src/mame/drivers/mustache.cpp2
-rw-r--r--src/mame/drivers/mz2000.cpp312
-rw-r--r--src/mame/drivers/mz80.cpp11
-rw-r--r--src/mame/drivers/namcona1.cpp11
-rw-r--r--src/mame/drivers/namcos1.cpp58
-rw-r--r--src/mame/drivers/namcos22.cpp2
-rw-r--r--src/mame/drivers/namcos86.cpp4
-rw-r--r--src/mame/drivers/naomi.cpp72
-rw-r--r--src/mame/drivers/nbmj8688.cpp682
-rw-r--r--src/mame/drivers/nbmj8891.cpp77
-rw-r--r--src/mame/drivers/nbmj8900.cpp17
-rw-r--r--src/mame/drivers/nbmj8991.cpp40
-rw-r--r--src/mame/drivers/nbmj9195.cpp151
-rw-r--r--src/mame/drivers/neopcb.cpp4
-rw-r--r--src/mame/drivers/ngp.cpp27
-rw-r--r--src/mame/drivers/ninjakd2.cpp12
-rw-r--r--src/mame/drivers/niyanpai.cpp27
-rw-r--r--src/mame/drivers/nmk16.cpp34
-rw-r--r--src/mame/drivers/notetaker.cpp22
-rw-r--r--src/mame/drivers/nova2001.cpp2
-rw-r--r--src/mame/drivers/nycaptor.cpp84
-rw-r--r--src/mame/drivers/nyny.cpp28
-rw-r--r--src/mame/drivers/octopus.cpp97
-rw-r--r--src/mame/drivers/othello.cpp16
-rw-r--r--src/mame/drivers/palm.cpp31
-rw-r--r--src/mame/drivers/palmz22.cpp4
-rw-r--r--src/mame/drivers/pandoras.cpp18
-rw-r--r--src/mame/drivers/panicr.cpp2
-rw-r--r--src/mame/drivers/pastelg.cpp35
-rw-r--r--src/mame/drivers/pecom.cpp2
-rw-r--r--src/mame/drivers/pegasus.cpp2
-rw-r--r--src/mame/drivers/pengadvb.cpp2
-rw-r--r--src/mame/drivers/peoplepc.cpp2
-rw-r--r--src/mame/drivers/peyper.cpp2
-rw-r--r--src/mame/drivers/phunsy.cpp2
-rw-r--r--src/mame/drivers/pipbug.cpp2
-rw-r--r--src/mame/drivers/pirates.cpp6
-rw-r--r--src/mame/drivers/playch10.cpp1
-rw-r--r--src/mame/drivers/pntnpuzl.cpp2
-rw-r--r--src/mame/drivers/pocketc.cpp3
-rw-r--r--src/mame/drivers/pockstat.cpp23
-rw-r--r--src/mame/drivers/pong.cpp32
-rw-r--r--src/mame/drivers/popeye.cpp4
-rw-r--r--src/mame/drivers/ppmast93.cpp34
-rw-r--r--src/mame/drivers/psikyo4.cpp2
-rw-r--r--src/mame/drivers/px4.cpp2
-rw-r--r--src/mame/drivers/quasar.cpp14
-rw-r--r--src/mame/drivers/quizshow.cpp13
-rw-r--r--src/mame/drivers/qx10.cpp2
-rw-r--r--src/mame/drivers/r2dx_v33.cpp2
-rw-r--r--src/mame/drivers/rainbow.cpp69
-rw-r--r--src/mame/drivers/rastersp.cpp28
-rw-r--r--src/mame/drivers/ravens.cpp2
-rw-r--r--src/mame/drivers/rc702.cpp8
-rw-r--r--src/mame/drivers/replicator.cpp27
-rw-r--r--src/mame/drivers/rex6000.cpp8
-rw-r--r--src/mame/drivers/rltennis.cpp19
-rw-r--r--src/mame/drivers/route16.cpp18
-rw-r--r--src/mame/drivers/rowamet.cpp13
-rw-r--r--src/mame/drivers/royalmah.cpp14
-rw-r--r--src/mame/drivers/s11.cpp43
-rw-r--r--src/mame/drivers/s11a.cpp29
-rw-r--r--src/mame/drivers/s11b.cpp29
-rw-r--r--src/mame/drivers/s11c.cpp39
-rw-r--r--src/mame/drivers/s3.cpp32
-rw-r--r--src/mame/drivers/s4.cpp22
-rw-r--r--src/mame/drivers/s6.cpp26
-rw-r--r--src/mame/drivers/s6a.cpp26
-rw-r--r--src/mame/drivers/s7.cpp27
-rw-r--r--src/mame/drivers/s8.cpp26
-rw-r--r--src/mame/drivers/s8a.cpp26
-rw-r--r--src/mame/drivers/s9.cpp27
-rw-r--r--src/mame/drivers/sbasketb.cpp25
-rw-r--r--src/mame/drivers/sbrkout.cpp14
-rw-r--r--src/mame/drivers/scobra.cpp26
-rw-r--r--src/mame/drivers/scramble.cpp3
-rw-r--r--src/mame/drivers/seattle.cpp5
-rw-r--r--src/mame/drivers/segag80r.cpp9
-rw-r--r--src/mame/drivers/segag80v.cpp10
-rw-r--r--src/mame/drivers/segas16a.cpp32
-rw-r--r--src/mame/drivers/segas24.cpp19
-rw-r--r--src/mame/drivers/seibuspi.cpp12
-rw-r--r--src/mame/drivers/seicross.cpp24
-rw-r--r--src/mame/drivers/senjyo.cpp18
-rw-r--r--src/mame/drivers/seta.cpp2
-rw-r--r--src/mame/drivers/shangkid.cpp18
-rw-r--r--src/mame/drivers/shisen.cpp10
-rw-r--r--src/mame/drivers/simpl156.cpp2
-rw-r--r--src/mame/drivers/skylncr.cpp116
-rw-r--r--src/mame/drivers/snk.cpp4
-rw-r--r--src/mame/drivers/snowbros.cpp6
-rw-r--r--src/mame/drivers/socrates.cpp2
-rw-r--r--src/mame/drivers/spacefb.cpp2
-rw-r--r--src/mame/drivers/spaceg.cpp130
-rw-r--r--src/mame/drivers/special.cpp24
-rw-r--r--src/mame/drivers/speedbal.cpp2
-rw-r--r--src/mame/drivers/sprint4.cpp6
-rw-r--r--src/mame/drivers/srmp6.cpp26
-rw-r--r--src/mame/drivers/ssem.cpp2
-rw-r--r--src/mame/drivers/ssozumo.cpp16
-rw-r--r--src/mame/drivers/ssystem3.cpp6
-rw-r--r--src/mame/drivers/stv.cpp77
-rw-r--r--src/mame/drivers/suna16.cpp113
-rw-r--r--src/mame/drivers/suna8.cpp79
-rw-r--r--src/mame/drivers/super80.cpp12
-rw-r--r--src/mame/drivers/supracan.cpp2
-rw-r--r--src/mame/drivers/tagteam.cpp17
-rw-r--r--src/mame/drivers/taito.cpp25
-rw-r--r--src/mame/drivers/taito_f3.cpp4
-rw-r--r--src/mame/drivers/taitosj.cpp68
-rw-r--r--src/mame/drivers/tamag1.cpp2
-rw-r--r--src/mame/drivers/tceptor.cpp20
-rw-r--r--src/mame/drivers/tcl.cpp2
-rw-r--r--src/mame/drivers/terracre.cpp37
-rw-r--r--src/mame/drivers/thomson.cpp46
-rw-r--r--src/mame/drivers/ticalc1x.cpp165
-rw-r--r--src/mame/drivers/timex.cpp2
-rw-r--r--src/mame/drivers/tispeak.cpp2
-rw-r--r--src/mame/drivers/tispellb.cpp2
-rw-r--r--src/mame/drivers/tnzs.cpp62
-rw-r--r--src/mame/drivers/toaplan1.cpp38
-rw-r--r--src/mame/drivers/toki.cpp6
-rw-r--r--src/mame/drivers/trackfld.cpp39
-rw-r--r--src/mame/drivers/tranz330.cpp184
-rw-r--r--src/mame/drivers/travrusa.cpp2
-rw-r--r--src/mame/drivers/truco.cpp23
-rw-r--r--src/mame/drivers/trucocl.cpp13
-rw-r--r--src/mame/drivers/tsamurai.cpp50
-rw-r--r--src/mame/drivers/tsispch.cpp11
-rw-r--r--src/mame/drivers/turrett.cpp2
-rw-r--r--src/mame/drivers/ultratnk.cpp2
-rw-r--r--src/mame/drivers/ut88.cpp15
-rw-r--r--src/mame/drivers/uzebox.cpp2
-rw-r--r--src/mame/drivers/v1050.cpp14
-rw-r--r--src/mame/drivers/vc4000.cpp2
-rw-r--r--src/mame/drivers/vcombat.cpp30
-rw-r--r--src/mame/drivers/vectrex.cpp18
-rw-r--r--src/mame/drivers/vg5k.cpp22
-rw-r--r--src/mame/drivers/vic10.cpp1
-rw-r--r--src/mame/drivers/vic20.cpp1
-rw-r--r--src/mame/drivers/vicdual.cpp8
-rw-r--r--src/mame/drivers/vidbrain.cpp50
-rw-r--r--src/mame/drivers/videopkr.cpp16
-rw-r--r--src/mame/drivers/vigilant.cpp24
-rw-r--r--src/mame/drivers/vis.cpp44
-rw-r--r--src/mame/drivers/wecleman.cpp4
-rw-r--r--src/mame/drivers/wheelfir.cpp212
-rw-r--r--src/mame/drivers/wildpkr.cpp4
-rw-r--r--src/mame/drivers/williams.cpp49
-rw-r--r--src/mame/drivers/wink.cpp2
-rw-r--r--src/mame/drivers/wmg.cpp11
-rw-r--r--src/mame/drivers/wolfpack.cpp2
-rw-r--r--src/mame/drivers/wpc_an.cpp12
-rw-r--r--src/mame/drivers/wpc_dot.cpp5
-rw-r--r--src/mame/drivers/wpc_flip1.cpp5
-rw-r--r--src/mame/drivers/wpc_flip2.cpp5
-rw-r--r--src/mame/drivers/x07.cpp4
-rw-r--r--src/mame/drivers/x68k.cpp14
-rw-r--r--src/mame/drivers/xtheball.cpp13
-rw-r--r--src/mame/drivers/xxmissio.cpp2
-rw-r--r--src/mame/drivers/z100.cpp2
-rw-r--r--src/mame/drivers/zaccaria.cpp6
-rw-r--r--src/mame/drivers/zaxxon.cpp18
-rw-r--r--src/mame/includes/advision.h6
-rw-r--r--src/mame/includes/alesis.h2
-rw-r--r--src/mame/includes/apple2.h1
-rw-r--r--src/mame/includes/apple3.h14
-rw-r--r--src/mame/includes/archimds.h6
-rw-r--r--src/mame/includes/bw12.h2
-rw-r--r--src/mame/includes/cchasm.h5
-rw-r--r--src/mame/includes/champbas.h8
-rw-r--r--src/mame/includes/cheekyms.h19
-rw-r--r--src/mame/includes/circusc.h2
-rw-r--r--src/mame/includes/coco.h9
-rw-r--r--src/mame/includes/coolpool.h8
-rw-r--r--src/mame/includes/cosmic.h5
-rw-r--r--src/mame/includes/cvs.h4
-rw-r--r--src/mame/includes/cyberbal.h8
-rw-r--r--src/mame/includes/decocass.h1
-rw-r--r--src/mame/includes/equites.h4
-rw-r--r--src/mame/includes/esripsys.h4
-rw-r--r--src/mame/includes/exidy.h2
-rw-r--r--src/mame/includes/exterm.h6
-rw-r--r--src/mame/includes/fidelz80.h6
-rw-r--r--src/mame/includes/galaxian.h2
-rw-r--r--src/mame/includes/galeb.h22
-rw-r--r--src/mame/includes/gamecom.h6
-rw-r--r--src/mame/includes/gba.h16
-rw-r--r--src/mame/includes/gp32.h8
-rw-r--r--src/mame/includes/harddriv.h7
-rw-r--r--src/mame/includes/hh_ucom4.h4
-rw-r--r--src/mame/includes/homedata.h4
-rw-r--r--src/mame/includes/hp48.h2
-rw-r--r--src/mame/includes/hp9845.h145
-rw-r--r--src/mame/includes/jaguar.h8
-rw-r--r--src/mame/includes/kchamp.h3
-rw-r--r--src/mame/includes/kim1.h1
-rw-r--r--src/mame/includes/lazercmd.h11
-rw-r--r--src/mame/includes/leland.h37
-rw-r--r--src/mame/includes/m72.h2
-rw-r--r--src/mame/includes/mac.h9
-rw-r--r--src/mame/includes/mappy.h3
-rw-r--r--src/mame/includes/meadows.h5
-rw-r--r--src/mame/includes/mikro80.h4
-rw-r--r--src/mame/includes/msx.h2
-rw-r--r--src/mame/includes/n8080.h7
-rw-r--r--src/mame/includes/namcos1.h14
-rw-r--r--src/mame/includes/nbmj9195.h5
-rw-r--r--src/mame/includes/niyanpai.h5
-rw-r--r--src/mame/includes/rltennis.h8
-rw-r--r--src/mame/includes/s11.h15
-rw-r--r--src/mame/includes/segas24.h2
-rw-r--r--src/mame/includes/seicross.h5
-rw-r--r--src/mame/includes/senjyo.h2
-rw-r--r--src/mame/includes/sorcerer.h1
-rw-r--r--src/mame/includes/special.h2
-rw-r--r--src/mame/includes/suna16.h13
-rw-r--r--src/mame/includes/suna8.h1
-rw-r--r--src/mame/includes/taitosj.h12
-rw-r--r--src/mame/includes/tceptor.h4
-rw-r--r--src/mame/includes/thomson.h14
-rw-r--r--src/mame/includes/tnzs.h3
-rw-r--r--src/mame/includes/tranz330.h73
-rw-r--r--src/mame/includes/truco.h2
-rw-r--r--src/mame/includes/trucocl.h2
-rw-r--r--src/mame/includes/ut88.h2
-rw-r--r--src/mame/includes/v1050.h3
-rw-r--r--src/mame/includes/vectrex.h2
-rw-r--r--src/mame/includes/vidbrain.h9
-rw-r--r--src/mame/includes/williams.h1
-rw-r--r--src/mame/layout/cmulti8.lay76
-rw-r--r--src/mame/layout/fidel_chesster.lay5
-rw-r--r--src/mame/layout/fidel_csc.lay11
-rw-r--r--src/mame/layout/fidel_des2000.lay456
-rw-r--r--src/mame/layout/fidel_eag.lay5
-rw-r--r--src/mame/layout/fidel_eag_68k.lay5
-rw-r--r--src/mame/layout/fidel_eas.lay5
-rw-r--r--src/mame/layout/fidel_ex.lay6
-rw-r--r--src/mame/layout/fidel_exd.lay6
-rw-r--r--src/mame/layout/fidel_playmatic.lay7
-rw-r--r--src/mame/layout/fidel_rsc_v2.lay5
-rw-r--r--src/mame/layout/fidel_sc12.lay7
-rw-r--r--src/mame/layout/fidel_sc9.lay5
-rw-r--r--src/mame/layout/fidel_su9.lay5
-rw-r--r--src/mame/layout/fidel_vsc.lay5
-rw-r--r--src/mame/layout/grobot9.lay314
-rw-r--r--src/mame/layout/sfrush.lay195
-rw-r--r--src/mame/layout/tranz330.lay227
-rw-r--r--src/mame/machine/advision.cpp9
-rw-r--r--src/mame/machine/amiga.cpp2
-rw-r--r--src/mame/machine/amstrad.cpp4
-rw-r--r--src/mame/machine/apple3.cpp20
-rw-r--r--src/mame/machine/archimds.cpp11
-rw-r--r--src/mame/machine/at.cpp1
-rw-r--r--src/mame/machine/atarigen.h2
-rw-r--r--src/mame/machine/bfm_comn.cpp2
-rw-r--r--src/mame/machine/cbm_snqk.cpp2
-rw-r--r--src/mame/machine/coco.cpp29
-rw-r--r--src/mame/machine/cybiko.cpp2
-rw-r--r--src/mame/machine/decocass.cpp32
-rw-r--r--src/mame/machine/dgn_beta.cpp2
-rw-r--r--src/mame/machine/gaelco2.cpp2
-rw-r--r--src/mame/machine/galaxold.cpp2
-rw-r--r--src/mame/machine/gamecom.cpp10
-rw-r--r--src/mame/machine/harddriv.cpp13
-rw-r--r--src/mame/machine/hp48.cpp3
-rw-r--r--src/mame/machine/inder_sb.cpp95
-rw-r--r--src/mame/machine/inder_sb.h15
-rw-r--r--src/mame/machine/jalcrpt.cpp6
-rw-r--r--src/mame/machine/kaneko_calc3.cpp2
-rw-r--r--src/mame/machine/kc.cpp2
-rw-r--r--src/mame/machine/leland.cpp13
-rw-r--r--src/mame/machine/lviv.cpp2
-rw-r--r--src/mame/machine/mac.cpp28
-rw-r--r--src/mame/machine/mega32x.cpp33
-rw-r--r--src/mame/machine/mega32x.h4
-rw-r--r--src/mame/machine/megadriv.cpp2
-rw-r--r--src/mame/machine/microtan.cpp2
-rw-r--r--src/mame/machine/midwayic.cpp46
-rw-r--r--src/mame/machine/midwayic.h1
-rw-r--r--src/mame/machine/mikro80.cpp5
-rw-r--r--src/mame/machine/msx.cpp2
-rw-r--r--src/mame/machine/msx_matsushita.h2
-rw-r--r--src/mame/machine/namcos1.cpp5
-rw-r--r--src/mame/machine/nextkbd.cpp2
-rw-r--r--src/mame/machine/orao.cpp1
-rw-r--r--src/mame/machine/pc9801_86.cpp30
-rw-r--r--src/mame/machine/pc9801_86.h6
-rw-r--r--src/mame/machine/pc9801_kbd.cpp4
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.cpp2
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.cpp4
-rw-r--r--src/mame/machine/primo.cpp4
-rw-r--r--src/mame/machine/scramble.cpp4
-rw-r--r--src/mame/machine/segas32.cpp2
-rw-r--r--src/mame/machine/sms.cpp8
-rw-r--r--src/mame/machine/spec_snqk.cpp4
-rw-r--r--src/mame/machine/special.cpp2
-rw-r--r--src/mame/machine/thomson.cpp38
-rw-r--r--src/mame/machine/ti85.cpp2
-rw-r--r--src/mame/machine/ut88.cpp3
-rw-r--r--src/mame/mame.lst58
-rw-r--r--src/mame/mess.flt7
-rw-r--r--src/mame/video/aeroboto.cpp2
-rw-r--r--src/mame/video/bfm_adr2.cpp2
-rw-r--r--src/mame/video/cheekyms.cpp12
-rw-r--r--src/mame/video/exterm.cpp1
-rw-r--r--src/mame/video/k053250.h2
-rw-r--r--src/mame/video/leland.cpp4
-rw-r--r--src/mame/video/pcd.h6
-rw-r--r--src/mame/video/rungun.cpp8
-rw-r--r--src/mame/video/tceptor.cpp2
-rw-r--r--src/mame/video/vectrex.cpp2
-rw-r--r--src/mame/video/wswan.h2
-rw-r--r--src/osd/modules/debugger/win/debugviewinfo.cpp2
-rw-r--r--src/osd/modules/debugger/win/debugwininfo.cpp2
-rw-r--r--src/osd/modules/debugger/win/editwininfo.cpp4
-rw-r--r--src/osd/modules/diagnostics/diagnostics_win32.cpp92
-rw-r--r--src/osd/modules/file/posixfile.cpp4
-rw-r--r--src/osd/modules/file/stdfile.cpp2
-rw-r--r--src/osd/modules/file/winfile.cpp4
-rw-r--r--src/osd/modules/font/font_dwrite.cpp2
-rw-r--r--src/osd/modules/font/font_none.cpp2
-rw-r--r--src/osd/modules/font/font_osx.cpp4
-rw-r--r--src/osd/modules/font/font_sdl.cpp4
-rw-r--r--src/osd/modules/font/font_windows.cpp6
-rw-r--r--src/osd/modules/input/input_dinput.cpp16
-rw-r--r--src/osd/modules/input/input_sdl.cpp2
-rw-r--r--src/osd/modules/lib/osdlib_win32.cpp4
-rw-r--r--src/osd/modules/opengl/gl_shader_tool.cpp22
-rw-r--r--src/osd/modules/output/win32_output.cpp2
-rw-r--r--src/osd/modules/render/blit13.h4
-rw-r--r--src/osd/modules/render/drawd3d.cpp2
-rw-r--r--src/osd/osdcomm.h17
-rw-r--r--src/osd/osdcore.h6
-rw-r--r--src/osd/osdepend.h2
-rw-r--r--src/osd/strconv.cpp4
-rw-r--r--src/osd/windows/window.cpp2
-rw-r--r--src/tools/chdman.cpp24
-rw-r--r--src/tools/imgtool/filtbas.cpp98
-rw-r--r--src/tools/imgtool/filteoln.cpp40
-rw-r--r--src/tools/imgtool/iflopimg.cpp95
-rw-r--r--src/tools/imgtool/iflopimg.h8
-rw-r--r--src/tools/imgtool/imghd.cpp27
-rw-r--r--src/tools/imgtool/imghd.h6
-rw-r--r--src/tools/imgtool/imgtool.cpp177
-rw-r--r--src/tools/imgtool/imgtool.h50
-rw-r--r--src/tools/imgtool/library.cpp20
-rw-r--r--src/tools/imgtool/library.h109
-rw-r--r--src/tools/imgtool/main.cpp27
-rw-r--r--src/tools/imgtool/modules/amiga.cpp278
-rw-r--r--src/tools/imgtool/modules/bml3.cpp95
-rw-r--r--src/tools/imgtool/modules/concept.cpp116
-rw-r--r--src/tools/imgtool/modules/cybiko.cpp137
-rw-r--r--src/tools/imgtool/modules/cybikoxt.cpp149
-rw-r--r--src/tools/imgtool/modules/fat.cpp154
-rw-r--r--src/tools/imgtool/modules/hp48.cpp220
-rw-r--r--src/tools/imgtool/modules/hp9845_tape.cpp175
-rw-r--r--src/tools/imgtool/modules/mac.cpp167
-rw-r--r--src/tools/imgtool/modules/macbin.cpp54
-rw-r--r--src/tools/imgtool/modules/os9.cpp93
-rw-r--r--src/tools/imgtool/modules/pc_flop.cpp24
-rw-r--r--src/tools/imgtool/modules/pc_hard.cpp74
-rw-r--r--src/tools/imgtool/modules/prodos.cpp242
-rw-r--r--src/tools/imgtool/modules/psion.cpp310
-rw-r--r--src/tools/imgtool/modules/rsdos.cpp75
-rw-r--r--src/tools/imgtool/modules/thomson.cpp607
-rw-r--r--src/tools/imgtool/modules/ti99.cpp325
-rw-r--r--src/tools/imgtool/modules/ti990hd.cpp170
-rw-r--r--src/tools/imgtool/modules/vzdos.cpp96
-rw-r--r--src/tools/imgtool/stream.cpp354
-rw-r--r--src/tools/imgtool/stream.h96
-rw-r--r--src/tools/ldresample.cpp2
-rw-r--r--src/tools/srcclean.cpp260
979 files changed, 21898 insertions, 15958 deletions
diff --git a/hash/apple2.xml b/hash/apple2.xml
index 97c1830e7ea..f067f59f5be 100644
--- a/hash/apple2.xml
+++ b/hash/apple2.xml
@@ -5290,6 +5290,18 @@
</part>
</software>
+ <software name="masterlamp">
+ <description>Master of the Lamps (clean crack)</description>
+ <year>1985</year>
+ <publisher>Activision</publisher>
+
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="143360">
+ <rom name="master of the lamps (1985)(activision)(trex crack).dsk" size="143360" crc="59c4b8d3" sha1="f48b13d0c8d7129983ad4d78e0f50458fe124b91" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="midi8pl1">
<description>MIDI/8 Plus</description>
<year>1984</year>
@@ -5585,6 +5597,18 @@
</part>
</software>
+ <software name="papermodels">
+ <description>Paper Models - The Christmas Kit (clean crack)</description>
+ <year>1986</year>
+ <publisher>Activision</publisher>
+
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="143360">
+ <rom name="paper models - the christmas kit (1986)(activision)(trex crack).dsk" size="143360" crc="22dd3174" sha1="01653481820b5a14374e21af182c766ee87b7861" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="pigpen">
<description>Pigpen (clean crack)</description>
<year>1982</year>
@@ -5937,6 +5961,18 @@
</part>
</software>
+ <software name="shanghai">
+ <description>Shanghai (clean crack)</description>
+ <year>1986</year>
+ <publisher>Activision</publisher>
+
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="143360">
+ <rom name="shanghai (1986)(activision)(trex crack).dsk" size="143360" crc="19ea813b" sha1="f0cafa24a30b7fdf2ee24d8a39485d71779e7aab" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="shogun">
<description>James Clavell's Shogun</description>
<year>1989</year>
diff --git a/hash/apple2gs.xml b/hash/apple2gs.xml
index be92fb12247..4b1d2071b3e 100644
--- a/hash/apple2gs.xml
+++ b/hash/apple2gs.xml
@@ -47,8 +47,8 @@
<software name="4thinchs">
<description>4th &amp; Inches (clean crack)</description>
- <!--The Team Construction Set was sold seperatly, but only works with 4th & Inches so it's included as "Disk 2" -->
- <!--The Team Construction Set disk doesn't check itself for being an original, but runs a nibble count on the 4th & Inches disk -->
+ <!-- The Team Construction Set was sold seperatly, but only works with 4th & Inches so it's included as "Disk 2" -->
+ <!-- The Team Construction Set disk doesn't check itself for being an original, but runs a nibble count on the 4th & Inches disk -->
<year>1987</year>
<publisher>Accolade</publisher>
@@ -781,18 +781,19 @@
</software>
<software name="chsm2100">
- <description>The Chessmaster 2100</description>
+ <description>The Chessmaster 2100 v1.1 (clean crack)</description>
+ <!-- Version 1.01 known to exist, currently not archived -->
<year>1988</year>
<publisher>The Software Toolworks</publisher>
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size="819264">
- <rom name="fidelity - chessmaster 2100, the (1988)(the software toolworks)(disk 1 of 2).2mg" size="819264" crc="4dfaeaf7" sha1="d2b68d4d1bb3adef2ce0fef546fdf807f332a3ad" offset="0x0000" />
+ <rom name="fidelity - the chessmaster 2100 v1.1 disk 1 of 2 (1988)(the software toolworks)(trex crack).2mg" size="819264" crc="8aaa178d" sha1="73b7962ca9ebf7361b1736277c131a4a11cdfaee" offset="0x0000" />
</dataarea>
</part>
<part name="flop2" interface="floppy_3_5">
<dataarea name="flop" size="819264">
- <rom name="fidelity - chessmaster 2100, the (1988)(the software toolworks)(disk 2 of 2).2mg" size="819264" crc="6a25ea51" sha1="0855102a363af5fc00298a23c28b381419ac6503" offset="0x0000" />
+ <rom name="fidelity - the chessmaster 2100 v1.1 disk 2 of 2 (1988)(the software toolworks)(trex crack).2mg" size="819264" crc="d1f47c57" sha1="49f8910fc9acf0c49d7db379bfa9fe8446a0d99e" offset="0x0000" />
</dataarea>
</part>
</software>
@@ -951,6 +952,19 @@
</part>
</software>
+ <software name="cribgin">
+ <description>Cribbage King / Gin king v1.01 (no OS, not self booting) (clean crack)</description>
+ <!-- Original release - Did NOT come with OS and was NOT self bootable. You must launch from ProDOS 16 or GS/OS -->
+ <year>1989</year>
+ <publisher>The Software Toolworks</publisher>
+
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819264">
+ <rom name="cribbage king - gin king (1989)(the software toolworks)(trex crack).2mg" size="819264" crc="740f8636" sha1="e74d5758f9708ef99e51902012ddb8f5c51a72a8" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="crstlqst">
<description>Crystal Quest</description>
<year>1989</year>
@@ -5368,13 +5382,13 @@
</software>
<software name="sshockey">
- <description>Superstar Ice Hockey [cr Digital Gang]</description>
+ <description>Superstar Ice Hockey (clean crack)</description>
<year>1988</year>
<publisher>Mindscape</publisher>
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size="819264">
- <rom name="superstar ice hockey (1988)(mindscape)[cr].2mg" size="819264" crc="1236d5d9" sha1="ca78ef889957bf6b53d5ed4dbe25dd78d0b0849b" offset="0x0000" />
+ <rom name="superstar ice hockey (1988)(mindscape)(trex crack).2mg" size="819264" crc="0b15cb9d" sha1="055a121ac1d588558e00a2442110e2c1afd0cc46" offset="0x0000" />
</dataarea>
</part>
</software>
@@ -6357,7 +6371,7 @@
</part>
</software>
- <software name="themgr12">
+ <software name="themgr12" cloneof="themgr15">
<description>The Manager v1.2</description>
<year>1990</year>
<publisher>Seven Hills Software</publisher>
@@ -6382,13 +6396,28 @@
</software>
<software name="thexder">
- <description>Thexder</description>
+ <description>Thexder v2.7 (clean crack)</description>
+ <!-- Self bootable and had Joystick control set as default -->
<year>1987</year>
<publisher>Sierra</publisher>
<part name="flop1" interface="floppy_3_5">
- <dataarea name="flop" size="819271">
- <rom name="thexder (1987)(sierra).2mg" size="819271" crc="8d763708" sha1="5be96ee3322aa90cda523a087cae2b158e7578d5" offset="0x0000" />
+ <dataarea name="flop" size="819264">
+ <rom name="thexder v2.7 (1987)(sierra on-line in)(trex crack).2mg" size="819264" crc="15862391" sha1="9588be8429081de1ce7b0df88c273b0fedfcdbf3" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="thexdero" cloneof="thexder">
+ <description>Thexder v1 (no OS, not self booting) (clean crack)</description>
+ <!-- Original release by Sierra On-Line - Did NOT come with OS and was NOT self bootable -->
+ <!-- The file "othexder" had been undeleted (and cracked) and is closer to v2.7 in how it's demo sounds fade -->
+ <year>1987</year>
+ <publisher>Sierra</publisher>
+
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819264">
+ <rom name="thexder v1 (1987)(sierra on-line in)(trex crack).2mg" size="819264" crc="5a105720" sha1="31061b4561c967d824936c94ce882f2efcb017da" offset="0x0000" />
</dataarea>
</part>
</software>
@@ -6531,7 +6560,7 @@
</software>
<software name="triango">
- <description>Triango</description>
+ <description>TrianGO</description>
<year>1988</year>
<publisher>California Dreams</publisher>
diff --git a/hash/gameboy.xml b/hash/gameboy.xml
index 74f874aa729..e46daef051a 100644
--- a/hash/gameboy.xml
+++ b/hash/gameboy.xml
@@ -16821,6 +16821,21 @@
</part>
</software>
+ <software name="pokecock" cloneof="pokered">
+ <!-- Notes: SGB enhanced -->
+ <description>Pokémon - Cock Version (Bootleg)</description>
+ <year>20??</year>
+ <publisher>bootleg</publisher>
+ <part name="cart" interface="gameboy_cart">
+ <feature name="slot" value="rom_mbc3" />
+ <dataarea name="rom" size = "1048576">
+ <rom name="Pokemon - Cock Version (Bootleg).gb" size="1048576" crc="5716d623" sha1="cfe7ba33ae527d057c631ea27ad1b77b551ec480" offset="0"/>
+ </dataarea>
+ <dataarea name="nvram" size="32768">
+ </dataarea>
+ </part>
+ </software>
+
<software name="pokeyell">
<!-- Notes: SGB enhanced -->
<description>Pokémon - Yellow Version (Euro, Aus, USA)</description>
diff --git a/hash/hp9845b_rom.xml b/hash/hp9845b_rom.xml
index 371a50b2eb4..bffb08599a8 100644
--- a/hash/hp9845b_rom.xml
+++ b/hash/hp9845b_rom.xml
@@ -110,6 +110,29 @@
</part>
</software>
+ <software name="iob">
+ <description>I/O (Rev B)</description>
+ <year>198?</year>
+ <publisher>Hewlett-Packard</publisher>
+
+ <part name="ppu_rom" interface="hp9845b_rom">
+ <feature name="base" value="0x094000" />
+ <dataarea name="rom" size="0x4000" width="16" endianness="big">
+ <rom name="09845-65519-09_40-revb-io_ppu.bin" size="0x2000" crc="fb49c7d8" sha1="f2e4f196a4fb3859081495e1be7062afc7769544" offset="0x0000" />
+ <rom name="09845-65519-09_50-revb-io_ppu.bin" size="0x2000" crc="861a77c6" sha1="6f419275d2cf13daa9345ea55e03d5ad15e438a7" offset="0x2000" />
+ </dataarea>
+ </part>
+
+ <part name="lpu_rom" interface="hp9845b_rom">
+ <feature name="base" value="0x0b5000" />
+ <dataarea name="rom" size="0x4000" width="16" endianness="big">
+ <rom name="09845-65518-13_50-revb-io_lpu.bin" size="0x2000" crc="3d642769" sha1="18e41b9d6c39c26f42d197ef455b4085b936b3da" offset="0x0000" />
+ <rom name="09845-65518-13_60-revb-io_lpu.bin" size="0x2000" crc="4fc249f8" sha1="cb80e382eb456d6bead110077536564c1a170071" offset="0x2000" />
+ </dataarea>
+ </part>
+ </software>
+
+
<software name="ioppuc" cloneof="ioppu">
<description>I/O PPU (Rev C)</description>
<year>198?</year>
@@ -346,4 +369,16 @@
</part>
</software>
+ <software name="sssmass">
+ <description>Mass storage (rev A)</description>
+ <year>1983</year>
+ <publisher>Structured Software Systems</publisher>
+
+ <part name="rom" interface="hp9845b_rom">
+ <feature name="base" value="0x0d1000" />
+ <dataarea name="rom" size="0x2000" width="16" endianness="big">
+ <rom name="831010-15_10-RevA-Structured_Software_Systems_Mass_Storage.bin" size="0x2000" crc="bc875ee0" sha1="e82dd5c1b826eb80cd323cefe1d8a19fa4733952" offset="0x0000" />
+ </dataarea>
+ </part>
+ </software>
</softwarelist>
diff --git a/hash/octopus.xml b/hash/octopus.xml
new file mode 100644
index 00000000000..eb01cd7306e
--- /dev/null
+++ b/hash/octopus.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+<softwarelist name="octopus" description="LSI Octopus floppy disk images">
+
+ <software name="diag">
+ <description>Octopus Diagnostic Disk</description>
+ <year>198?</year>
+ <publisher>LSI</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="217527">
+ <rom name="octdiag.imd" size="217527" crc="8366eb38" sha1="50689555508351e268a7f5ab5569a298768d7573" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="msdos211">
+ <description>MS-DOS v2.11</description>
+ <year>1983</year>
+ <publisher>LSI / Microsoft</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="203952">
+ <rom name="octmsdos.imd" size="203952" crc="20921e6d" sha1="28ac96c7f8b0855309f9d8bbff29974b1e74bfa6" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="cdos41">
+ <description>Concurrent DOS v4.1</description>
+ <year>198?</year>
+ <publisher>LSI / Digital Research</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="292255">
+ <rom name="octcd411.imd" size="292255" crc="6099fb99" sha1="84f8174a9f23215af9cc33aa16781e96e9a5b836" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_5_25">
+ <dataarea name="flop" size="362833">
+ <rom name="octcd412.imd" size="362833" crc="e3fbde01" sha1="0d47bd2d570ce0495d59eab0bf97981438a13e44" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop3" interface="floppy_5_25">
+ <dataarea name="flop" size="322953">
+ <rom name="octcd413.imd" size="322953" crc="8fbeac42" sha1="5cfbe41d874b528d45378697cf850f16fb6bdc14" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop4" interface="floppy_5_25">
+ <dataarea name="flop" size="158250">
+ <rom name="octcd414.imd" size="158250" crc="3a44bfd9" sha1="7daa294df18029f09040879c2697fafd54e615ee" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop5" interface="floppy_5_25">
+ <dataarea name="flop" size="310680">
+ <rom name="octcd415.imd" size="310680" crc="ce13d027" sha1="ccd888b22db4e5f051707192af38d4aa25672ac3" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop6" interface="floppy_5_25">
+ <dataarea name="flop" size="164406">
+ <rom name="octcd416.imd" size="164406" crc="dda2eb61" sha1="f9fad795f3830454df609701624e0b852f19c5fd" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop7" interface="floppy_5_25">
+ <dataarea name="flop" size="163383">
+ <rom name="octcd417.imd" size="163383" crc="62f1707c" sha1="5837acbfcd6b5545d432cdaa6d6d023844bd944c" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="cdos52">
+ <description>Concurrent DOS v5.2</description>
+ <year>1987</year>
+ <publisher>LSI / Digital Research</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="267678">
+ <rom name="octcd521.imd" size="267678" crc="8f7d6f1d" sha1="491f1bcb99cec3d95de9c5ee6e5c95fab19b534c" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_5_25">
+ <dataarea name="flop" size="325980">
+ <rom name="octcd522.imd" size="325980" crc="be76fb95" sha1="6d260edc67441f6446e137fcc0e2d8b88b19f254" offset="0" />
+ </dataarea>
+ </part>
+ <part name="flop3" interface="floppy_5_25">
+ <dataarea name="flop" size="330072">
+ <rom name="octcd523.imd" size="330072" crc="b91c30f9" sha1="fb5a38c7d8ce4ad20126644d6a85d70f55f81703" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
+</softwarelist>
+
diff --git a/hash/segacd.xml b/hash/segacd.xml
index fff30f0b75d..7a9b5971879 100644
--- a/hash/segacd.xml
+++ b/hash/segacd.xml
@@ -3,82 +3,288 @@
<softwarelist name="segacd" description="Sega CD CD-ROMs">
<!--
- Compatibility 18/02/11
-
- advbatr - too slow, heavy corruption
- ah3ts - corruption on select operation, too slow ingame
- ax101 - reboots over and over
- batmanrn - hits ram expander?
- bcracers - too slow
- billwlsh - doesn't boot (mode set 0?)
- bouncers - bad tiles
- brutal - PCM DMA
- btlcorps - too slow, bad zooming
- changer - zoom problem in menu
- cliffh - duplicate?
- combracom - doesn't boot (mode set 0)
- corpse - hits ram expander (but looks fine, then goes wrong? - illegal writes)
- dungexpl - never boots
- dracula - doesn't boot (but md version is broke too)
-
-
- dracunl - 2cds
- dune - doesn't boot
- espnnfl - corrupt gfx in intro - too slow
- f1btl - bad gfx, too slow
- fifa - doesn't boot (mode set 0)
- flashbk - comms word write - PCM DMA
- frankn - doesn't boot
- hota - misisng some screens
- jagxj220 hangs loading
-
- jeopardy - dmna bit it mode 1, hangs after logos
- joemonfl - too slow , heavy corruption
- le2 - mode set 0?
- links - hangs going ingame
- lunar- gfx corruption
- stellarf - interesting stuff
- swra - doesn't boot
- wheelfor - same as jeopardy
- term - doesn't boot
- wingcomm - zooming glitches
- risedrg - hangs mode 0
+This is a software list for the Sega CD attachment for the Sega Genesis.
+Outside of the US, the Sega CD was known as the Mega CD, and software for
+both the Japanese and the European version of the hardware can be found in
+their respective softlists, not in this one. A merge of the three would
+probably be a good idea, though.
+Much of the information in this softlist has been gathered from Sega Retro:
+http://segaretro.org/
-->
-<!-- Missing from this list
- Rock Paintings - a CD+G disc, it's in A120% format... needs subdata etc.
+<!--
+Currently undumped discs that are known to still exist:
++=============================================================+===================================================================+
+| Title | Notes |
++=============================================================+===================================================================+
+| AH3 - ThunderStrike (Prototype) | |
+| Android Assault (Prototype 19940308) | |
+| Black Hole Assault (Prototype 19921006) | |
+| Burning Fists (Prototype 19xx0108) | |
+| Color Mechanica | |
+| Compton's Interactive Encyclopedia 2.00S | Version 2.00S is undumped. |
+| Eternal Champions (Prototype) | |
+| Fahrenheit (Prototype, 32X) | |
+| Fatal Fury Special (Prototype) | |
+| Force Striker (Prototype - Alpha) | |
+| Johnny Mnemonic (Prototype, Good Deal Games) | Good Deal Games version might be different from the current proto.|
+| Lethal Enforcers (Prototype 19930408) | |
+| Loadstar: The Legend of Tully Bodine (Prototype 19940916) | |
+| Music from the Sega CD Games: Jurassic Park, Batman Returns | |
+| Shadow of the Beast II (Prototype 19940611) | |
+| SoulStar (Prototype 19940905) | |
+| Surgical Strike (32X) | 32X version was only released in Brazil. |
+| The Secret of Monkey Island (Prototype 19930319) | |
+| The Smurfs (Prototype) | US / Good Deal Games version. |
+| The Terminator (Prototype) | |
+| Vay (Prototype 19941006) | |
+| What is X'Eye Multi Entertainment System | |
++=============================================================+===================================================================+
+
+Announced but never relased games. Probably lost forever:
++=============================================================+===================================================================+
+| Title | Notes |
++=============================================================+===================================================================+
+| Akira | |
+| Alexandria | |
+| Alien | |
+| Annet Again | |
+| AV-8B Harrier Assault | |
+| Backroad Racers | |
+| Captain Commando | |
+| Chakan | |
+| Channel X | |
+| Cool Spot | |
+| Cool World | |
+| Dark Ride | |
+| Dark Seed | |
+| DynoBlaze | |
+| European Racers | Probably some copies were made. |
+| Flashback 2 | |
+| Flying Nightmare | Copies were made and sent to press. |
+| Forgotten Worlds Deluxe | |
+| Gallagher's Shooting Gallery | |
+| Grandia | |
+| Harrier | |
+| Hammer vs. Evil D. in Soulfire | |
+| Hardcore | Copies most likely exist as DICE still wants to see it published. |
+| Hyper Attax | |
+| Indiana Jones and the Fate of Atlantis | Copies were made and sent to press. |
+| Instruments of Chaos Starring Young Indiana Jones | |
+| Ivan Stewart's Super Off Road Baja 1000 | |
+| Journey to the Center of the Earth | |
+| King's Quest V | |
+| Kamikaze Comics | |
+| Kung Fu: The Legend Continues | |
+| Last Action Hero | |
+| Leisure Suit Larry in the Land of the Lounge Lizards | |
+| Loadstar II: Showdown on Phobos | |
+| March of Time | |
+| Merrygoround: The 4th Unit Series | |
+| Metal Fang | |
+| Mixed Up Mother Goose | |
+| Monkey Island 2: LeChuck's Revenge | |
+| Myst | |
+| No Escape | |
+| Ookami Hei | |
+| Phantasy Star IV: The Return of Alis | |
+| Pit-Fighter II | |
+| Police Quest III: The Kindred | |
+| Polygon Golf | |
+| Pop'n Land | |
+| Power Drift | |
+| Power Modeling | |
+| Prime Evil | |
+| Prince and the N.P.G. - Diamonds and Pearls | |
+| RBI Baseball 4 | |
+| Real Fighters | |
+| Return to Zork | |
+| Rise of the Robots | |
+| RoboCop Versus The Terminator | |
+| Rocket Boy | |
+| Shadow of Atlantis | |
+| Sid and Al's Incredible Tennis | |
+| Space Pirates | |
+| Space Quest IV: Roger Wilco and the Time Rippers | |
+| Spectre VR | |
+| Star Trek: The Next Generation | |
+| Stellar 7 | |
+| Street Fighter II | |
+| Super Battletank II | |
+| Super Star Wars | |
+| Super Strike | |
+| The Humans | |
+| The Strangers | Production of the game probably never began. |
+| Total Carnage | |
+| Ultima Underworld | |
+| Wirehead | 32X version cancelled. |
+| World Championship Rally | |
+| World Series Baseball | |
+| Ys IV: Mask of the Sun | |
++=============================================================+===================================================================+
+
+Dumps that are known to exist, but are lost in the aether:
++=============================================================+===================================================================+
+| Title | Notes |
++=============================================================+===================================================================+
+| Batman Returns (Prototype) | |
+| Cobra Command (Prototype) | |
+| Final Fight (Prototype) | |
+| Hot Hits - Adventurous New Music Sampler | Redump.org dump. http://redump.org/disc/23530/ |
+| Hot Hits - Adventurous New Music Sampler | TruRip has two dumps. One is probably an alt to the redump dump. | |
+| Loadstar (Prototype) | |
+| INXS (Prototype) | |
+| Kris Kross (Prototype) | |
+| Marky Mark and The Funky Bunch (Prototype) | |
+| Mortal Kombat (Prototype - Beta) | |
+| Night Trap (Prototype) | |
+| The Adventures of Batman and Robin CD (Prototype) | |
+| The Amazing Spider-Man vs. The Kingpin (Prototype) | |
+| Tomcat Alley (Prototype) | |
+| Virtual VCR - Colors of Modern Rock (Prototype) | |
++=============================================================+===================================================================+
+
+Unlisted dumps:
++=============================================================+===================================================================+
+| Title | Notes |
++=============================================================+===================================================================+
+| Sonic the Hedgehog Megamix v4.0b | Homebrew hack of Sonic the Hedgehog. It's not listed here due to |
+| | the fact that it's a hack of an existing game with no apparent |
+| | releases outside ISOs on the Internet. |
++=============================================================+===================================================================+
+| Sonic the Hedgehog CD (Prototype 409) | This is a hoax prototype made and released by Nemesis. It wasn't |
+| | ever dumped off a disc, but a hack made from existing dumps. As |
+| | such it's not listed here. |
++=============================================================+===================================================================+
-->
+<!-- TODO:
-<!--- Images below are from the REDUMP set (unless otherwise noted, see Ground Zero Texas) -->
+Many US-released games were also released in Brazil by Tec Toy. Though
+they're still NTSC Sega CD discs, there is a possibility that these are
+different in their CD structure compared to the US discs. This is a point
+for further investigation.
- <software name="advbatr">
- <!-- source redump.org
- <rom name="Adventures of Batman and Robin, The (USA).cue" size="927" crc="28438349" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 1).bin" size="161845824" crc="0edec85f" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 2).bin" size="30646560" crc="296867f7" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 3).bin" size="26873952" crc="2c208097" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 4).bin" size="27000960" crc="cf5dfa2c" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 5).bin" size="28320432" crc="8705a027" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 6).bin" size="27678336" crc="14c633e4" />
- <rom name="Adventures of Batman and Robin, The (USA) (Track 7).bin" size="10541664" crc="53495b40" />
+Some discs are stamped with RE on them. Probably this indicates that
+they're either revisions or re-releases of previously released games.
+Investigate this further.
+-->
+
+<!--
+Due to the divided field of CD dumps available, the softlist is divided in
+three parts.
+
+The first part will be what is currently considered the most proper dumps
+available for the system. Currently, this is held by redump.org dumps.
+While still lacking information stored on the discs, most notably the sub-
+data, its properly documented dumps combined with the offset corrected
+nature of the dumps make them one of the best options available. At least
+until the CHD format has been upgraded with some way of appropriating the
+additional data found in other types of dumps.
+See: http://redump.org/
+
+One step down the ladder we list the old TOSEC-ISO dumps. Note that this
+is not TruRip dumps, which are currently not handled well by the CHD
+format due to them being CCDs, which are directly unsupported by it.
+The TOSEC-ISO dumps are not offset-corrected and appear to not be updated
+any more, however, at least they used a consistent dumping method and
+documented their dumps.
+See: http://www.tosecdev.org/
+
+The rest are from various other sources and of very varying quality. These
+should preferably always be replaced with a more documented dumping method
+whenever possible.
+
+Preferably, all of these should be replaced with a scrambled, offset-
+corrected set of dumps with sub-channels intact, but first the CHD parsers
+needs to be updated to support it. Contenders for this field at the time
+of writing include RawDump and TruRip dumps.
+See: http://rawdump.net/
+ http://www.trurip.org/
+-->
+
+<!-- The following images are from the redump.org set of dumps. -->
+
+ <!-- This game was only found bundled in a so called "Double Deal"-pack together with Hook. They did not share discs. -->
+ <software name="3ninja">
+ <!-- Source: redump.org - http://redump.org/disc/22251/
+ <rom name="3 Ninjas Kick Back (USA).cue" size="1433" crc="9d4d85ae" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 01).bin" size="78657936" crc="4843082a" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 02).bin" size="28172256" crc="7febf7d6" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 03).bin" size="12886608" crc="bd8980b8" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 04).bin" size="22106448" crc="31c965c0" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 05).bin" size="29559936" crc="a85b5d2b" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 06).bin" size="14612976" crc="9f922055" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 07).bin" size="34983648" crc="0d985800" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 08).bin" size="13806240" crc="7512aeb2" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 09).bin" size="21610176" crc="72fbbc92" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 10).bin" size="30968784" crc="5134fd16" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 11).bin" size="39320736" crc="3e8689e6" />
+ <rom name="3 Ninjas Kick Back (USA) (Track 12).bin" size="25486272" crc="d8fc0699" />
-->
- <description>The Adventures of Batman and Robin (USA)</description>
- <year>1995</year>
+ <description>3 Ninjas Kick Back (USA)</description>
+ <year>1994</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-93175"/>
+ <info name="ring_code" value="CDAC-078200 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="3 ninjas kick back (usa)" sha1="7dfca4e3bfad7b8e6f98b24651970409fd0d7d6f"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="ax101">
+ <!-- Source: redump.org - http://redump.org/disc/22471/
+ <rom name="A-X-101 (USA) (RE).cue" size="229" crc="5dd5c2a1" md5="f63325683f0f7b7275c15ae5c1c243ee" sha1="7cb650ee451960270fcd5d975f05bf5f623fda5c"/>
+ <rom name="A-X-101 (USA) (RE) (Track 1).bin" size="623183568" crc="79b56a2b" md5="99ba20207299eef713900a60aea08243" sha1="6c354622c69d9494c216129e0a8fb12fbc24c165"/>
+ <rom name="A-X-101 (USA) (RE) (Track 2).bin" size="7596960" crc="188dd454" md5="81296eadbe6edc9e02530832be07db3f" sha1="69793487a0a9c6948385e55a7f1df95fbe5e0925"/>
+ -->
+ <description>A/X-101 (USA)</description>
+ <year>1994</year>
+ <publisher>Absolute Entertainment</publisher>
+ <info name="serial" value="T-86015"/>
+ <info name="ring_code" value="SEGAT86015RE R1J MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="ax-101 (usa)" sha1="4a0200c4b1d6b7f486d1946b6ce886d35872aae7"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="aburner3">
+ <!-- Source: redump.org - http://redump.org/disc/21042/
+ <rom name="After Burner III (USA).cue" size="1386" crc="c5c57986" md5="a8a8015513c4fa64d7cdd0d9535926c5" sha1="e054d58ac8ecfc28eb66134d16b23ca53ff13542"/>
+ <rom name="After Burner III (USA) (Track 01).bin" size="5367264" crc="b2327ab5" md5="276a8b47a223ff7f118d22675e13686f" sha1="0a917485769f304599897a7e60ee50c5311765c2"/>
+ <rom name="After Burner III (USA) (Track 02).bin" size="12392688" crc="724a725e" md5="3096edf0b4667e385b2a7d0aefced9b8" sha1="58a12475c5f50486be8371b18fed342d5d279777"/>
+ <rom name="After Burner III (USA) (Track 03).bin" size="19603920" crc="ce59148a" md5="0f47d6896aef6e8b7cd98c7c161d47a8" sha1="8fc68021b719675267da82bcf9671c1f650046a5"/>
+ <rom name="After Burner III (USA) (Track 04).bin" size="12432672" crc="24a52f76" md5="ba336067ffea47ceebcf4f4211185f6a" sha1="9160425fd45447f60edabc824b048b9ad65d1f63"/>
+ <rom name="After Burner III (USA) (Track 05).bin" size="5769456" crc="7ab93a26" md5="30d4876d31698c23f4ec320f07284654" sha1="2a56dcc5a6ce7f93ab85e4fc795d4690346ebfa2"/>
+ <rom name="After Burner III (USA) (Track 06).bin" size="14558880" crc="027f899d" md5="1902881975e6861451d4193dca027087" sha1="07af00e9cb92dc08590e7e50c009258e2e0def0a"/>
+ <rom name="After Burner III (USA) (Track 07).bin" size="56189280" crc="1bcb11b7" md5="6e2c56a997a17077715f982cd376dbfc" sha1="7de6c4d345e1f56d0fc154b0e98fbaf2c7dd9654"/>
+ <rom name="After Burner III (USA) (Track 08).bin" size="15652560" crc="f04329d7" md5="6f2bfacd7caa630679f37b2ceaeb53d4" sha1="e05678920da965f5ec9752c6d54221a14c56b0e6"/>
+ <rom name="After Burner III (USA) (Track 09).bin" size="58371936" crc="294b5f8a" md5="02aa5099ba4e7d408b4449a3196db524" sha1="f99a9bb13d8cdf8f558bc5b995c9a12f7e2f5cd8"/>
+ <rom name="After Burner III (USA) (Track 10).bin" size="35621040" crc="dd3945c8" md5="bf9a9402c538b1b0b21aef404105f77f" sha1="909f4d965c3a19f01bc79ff6577cf4830f24cdd4"/>
+ <rom name="After Burner III (USA) (Track 11).bin" size="52059168" crc="f2b56e9f" md5="02c3da1fc21c15ac4854fd7e71795cfb" sha1="ac91b051ff97a600f13b7ba05b5d7ee1f889d575"/>
+ <rom name="After Burner III (USA) (Track 12).bin" size="35108304" crc="0e5b12e3" md5="fbb5d9b9585e2986dc281293ae4189d8" sha1="4d8618aedef0e2d0f7485d0eb23e704e23c78236"/>
+ -->
+ <description>After Burner III (USA)</description>
+ <year>1993</year>
<publisher>Sega</publisher>
- <info name="serial" value="4432"/>
- <info name="ring_code" value="1008604432 7/95 1RA2"/>
+ <info name="serial" value="4415"/>
+ <info name="release" value="199303xx" />
+ <info name="ring_code" value="CDAC-040200 3"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="adventures of batman and robin, the (usa)" sha1="80e65ec95ea9440e59d64ea067b48921686006e8"/>
+ <disk name="after burner iii (usa)" sha1="5387cce37990836db962ce82ec217edbe2c1fd0d"/>
</diskarea>
</part>
</software>
<software name="ah3ts">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3280/
<rom name="AH3 - ThunderStrike (USA).cue" size="1422" crc="d83f8b35" />
<rom name="AH3 - ThunderStrike (USA) (Track 01).bin" size="147500976" crc="6ea8ee5b" />
<rom name="AH3 - ThunderStrike (USA) (Track 02).bin" size="38704512" crc="3574a538" />
@@ -96,6 +302,7 @@
<description>AH3 - ThunderStrike (USA)</description>
<year>1993</year>
<publisher>JVC</publisher>
+ <info name="release" value="199310xx" />
<info name="serial" value="T-60055"/>
<info name="ring_code" value="SEGAT60055RE R2D MFD BY JVC, SEGAT60055 R1D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
@@ -105,8 +312,46 @@
</part>
</software>
+ <software name="batmanrn">
+ <!-- Source: redump.org - http://redump.org/disc/21447/
+ <rom name="Batman Returns (USA).cue" size="2420" crc="5c5d239a" md5="c2acb5a8054c65a1874f0bb8d64b6627" sha1="03f590d80c03e79ce86a55b786855aebf14fe138"/>
+ <rom name="Batman Returns (USA) (Track 01).bin" size="20363616" crc="2130f186" md5="41717d4e849f86eced7eb79200468507" sha1="018ed3b942f09e813131ca6c755834e58696f0d3"/>
+ <rom name="Batman Returns (USA) (Track 02).bin" size="1164240" crc="c5a8bb58" md5="280456694d18b3272bf64175c579a035" sha1="106ed878bc7545aaa11d93da4f0c0e69556ca5db"/>
+ <rom name="Batman Returns (USA) (Track 03).bin" size="31109904" crc="40cd643d" md5="f8a9b32cc72759587327c01a75f05f64" sha1="a496d1a1482882b9db75500a83ff18d8ea451bc2"/>
+ <rom name="Batman Returns (USA) (Track 04).bin" size="26554080" crc="796f47b0" md5="cf7460b6d6007bbd1972434efd3f3591" sha1="177d395a9a426f913bae64667fab720b537548f9"/>
+ <rom name="Batman Returns (USA) (Track 05).bin" size="26819856" crc="641977e2" md5="ab1cff8fc000aa3223042aa7ff87c469" sha1="70779724f9be9346720193bab1dd80da9256f70a"/>
+ <rom name="Batman Returns (USA) (Track 06).bin" size="15386784" crc="98eee1bb" md5="d1f287baf4ff4a9e818654692719be80" sha1="88aaaf29bfd2988f76a215ea2f96883b85f6a2e0"/>
+ <rom name="Batman Returns (USA) (Track 07).bin" size="30681840" crc="b03d518f" md5="e0fa353aace6681fd0b0ed967837025c" sha1="3194cf3b1c460e7acb4fee9f28acfea39e959162"/>
+ <rom name="Batman Returns (USA) (Track 08).bin" size="18091584" crc="ea5c2286" md5="6880b44de9f0ae57c8ecdf6a4e2b7a14" sha1="2ae620eb1bf312dbc5f00432ab3305997d2e3832"/>
+ <rom name="Batman Returns (USA) (Track 09).bin" size="30877056" crc="a53f72a0" md5="e3c9aa4b4ef11618fab1d2f718be36b9" sha1="c64ffa895fce00bd10317e712bd2eed56cd6e38e"/>
+ <rom name="Batman Returns (USA) (Track 10).bin" size="27572496" crc="a01a3c32" md5="dfde1115fb37f15aae91e9a2fb79431e" sha1="fdf0765cc765183355c96d0ed86530c418b0b8e7"/>
+ <rom name="Batman Returns (USA) (Track 11).bin" size="21600768" crc="014f0590" md5="fbb2144f9787c61d7338ae022b93e5f4" sha1="f6bd7cd4b3768995c0e515826f964937ae51647f"/>
+ <rom name="Batman Returns (USA) (Track 12).bin" size="35402304" crc="de77d6fa" md5="9525e5a1bcacd0231f0e63a0998aa217" sha1="d64b6131abb02f37ce3a7e16e8db552e5a872bfd"/>
+ <rom name="Batman Returns (USA) (Track 13).bin" size="30921744" crc="8967d069" md5="597837ac0f30c27a3b72d9b5b0012d6b" sha1="351a18febc0c182b9cd39073062d665fb5fa17bc"/>
+ <rom name="Batman Returns (USA) (Track 14).bin" size="19495728" crc="0c8182c2" md5="e1d84fffe2d25929cff18c82ebed6d5a" sha1="a3b23d66aab8bf23fecd99b00d81bdca631d7d70"/>
+ <rom name="Batman Returns (USA) (Track 15).bin" size="22271088" crc="59f080df" md5="6fc535f1ac41133abf23fbf589149682" sha1="51c6dc430b34999b3912d5aceaeeaf033437d569"/>
+ <rom name="Batman Returns (USA) (Track 16).bin" size="24848880" crc="48b601c5" md5="1dcb60b87021ffe9dc3e4154a60416b2" sha1="2feda2a1111ab9962164cad7192e77b6622e48ae"/>
+ <rom name="Batman Returns (USA) (Track 17).bin" size="33598320" crc="9a91b259" md5="704389769c84e50bf4fc38bbc49b960d" sha1="8daa906449adee6bc5887f6e6f2910447ad7546e"/>
+ <rom name="Batman Returns (USA) (Track 18).bin" size="13439328" crc="38e2e469" md5="958577c935299ce05eb96dfecafd8792" sha1="7010d7ceebe3eea6b1c0fe268a7261ff8376f6cd"/>
+ <rom name="Batman Returns (USA) (Track 19).bin" size="29828064" crc="32b50b76" md5="7387826983f53c47a2dbfa582293ad8b" sha1="6767912b3e1c27fd741b0841c709d528f6e3df14"/>
+ <rom name="Batman Returns (USA) (Track 20).bin" size="35665728" crc="89b4fa80" md5="f66e8b98da887b4b90b273af81b5c2bd" sha1="043e33c65e57f71a874778041142476d3e680043"/>
+ <rom name="Batman Returns (USA) (Track 21).bin" size="31443888" crc="014b6d21" md5="4c7d7b905ae744c205bba86bf2d39d31" sha1="154654cad1b4b8e04301d5ec576bec3d4aadeae0"/>
+ -->
+ <description>Batman Returns (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="199303xx" />
+ <info name="serial" value="4401"/>
+ <info name="ring_code" value="CDAC-040500 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="batman returns (usa)" sha1="fcef5b725f01b928a29a60a5e3d4c493908b209f"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="btlcorps">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/5659/
<rom name="Battlecorps (USA).cue" size="5582" crc="cd568957" />
<rom name="Battlecorps (USA) (Track 01).bin" size="85114176" crc="2053ce31" />
<rom name="Battlecorps (USA) (Track 02).bin" size="1709904" crc="dd996179" />
@@ -162,6 +407,7 @@
<description>Battlecorps (USA)</description>
<year>1994</year>
<publisher>Core Design</publisher>
+ <info name="release" value="199404xx" />
<info name="serial" value="T-115045"/>
<info name="ring_code" value="SEGAT115045 R1H MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
@@ -172,7 +418,7 @@
</software>
<software name="billwlsh">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/5974/
<rom name="Bill Walsh College Football (USA).cue" size="1708" crc="8999068f" />
<rom name="Bill Walsh College Football (USA) (Track 01).bin" size="103480944" crc="b976c0a1" />
<rom name="Bill Walsh College Football (USA) (Track 02).bin" size="21137424" crc="4e10e010" />
@@ -203,8 +449,74 @@
</part>
</software>
- <software name="dracula">
- <!-- source redump.org
+ <software name="blackh">
+ <!-- Source: redump.org - http://redump.org/disc/21449/
+ <rom name="Blackhole Assault (USA).cue" size="2259" crc="c3d6a886" md5="e79d9728b736bbd2a0fc0614d1eb9e93" sha1="b5e11b0fddf9d6d98496cb3f0426a1ada72c4f69"/>
+ <rom name="Blackhole Assault (USA) (Track 01).bin" size="13857984" crc="e311d117" md5="2b3d92c12c7c4dee8155a4ee0c020fa4" sha1="6adad838067910c31d7f2b8a6bcc88285cbf194d"/>
+ <rom name="Blackhole Assault (USA) (Track 02).bin" size="15440880" crc="186016f0" md5="1dbca6d2a1781f09f28b12e7ad756f64" sha1="a136a50b25a41f7935bda491a7fd211bce522331"/>
+ <rom name="Blackhole Assault (USA) (Track 03).bin" size="30820608" crc="98219d48" md5="1ed7ddb82557ea06df1f4a76e061be40" sha1="0d5edc18fd2ef2e5fe456156fe1bacb2dd90ed4e"/>
+ <rom name="Blackhole Assault (USA) (Track 04).bin" size="16268784" crc="7793d428" md5="1211ed08587a3807581755aeb859f1fe" sha1="b747fea35b21f63589460f4d5ab26bd9cb709227"/>
+ <rom name="Blackhole Assault (USA) (Track 05).bin" size="17522400" crc="dd187576" md5="6ba7c7b08a865a4ba0af011f6ce24111" sha1="709351b96c14c85d9bb859cb4f2a936c0fcd138c"/>
+ <rom name="Blackhole Assault (USA) (Track 06).bin" size="20819904" crc="c29eb3a3" md5="797d91af144437b2d43c53eae3beef35" sha1="1fd1080f1dfddeea6655dea766df48fb50365e3c"/>
+ <rom name="Blackhole Assault (USA) (Track 07).bin" size="29900976" crc="2315941f" md5="3707f977de73847afc1bd6234e352946" sha1="1450ad8bdbd6bea2497e1f4c000092b189980611"/>
+ <rom name="Blackhole Assault (USA) (Track 08).bin" size="20958672" crc="82d2299f" md5="be20435d9a638418c20d10079b5b7fd1" sha1="4d096d5a6ab77713931fe3fe365222f97d245da4"/>
+ <rom name="Blackhole Assault (USA) (Track 09).bin" size="23536464" crc="3daf1596" md5="b9ce505e4af3aeecb0d62463c6d0ff29" sha1="d5a100fbafc8b6f74cef248331501bc9c26307a8"/>
+ <rom name="Blackhole Assault (USA) (Track 10).bin" size="26050752" crc="7f5b3a46" md5="66fc59baf01e1dea956d81074d0af08d" sha1="7aa66b16ba55d58c57498be6011cdb2b6a17cf73"/>
+ <rom name="Blackhole Assault (USA) (Track 11).bin" size="18957120" crc="6c32f8e3" md5="6aac64b32af97dd3cbc5225904f495dd" sha1="e9e3e3aa5b12a8f06c5e7a7cab68b0c15814551c"/>
+ <rom name="Blackhole Assault (USA) (Track 12).bin" size="13596912" crc="9326368f" md5="2cd24aa6d571bac5480b02715748bddc" sha1="b14b7f8721cb5a9f43a26c07f97e449b228181a5"/>
+ <rom name="Blackhole Assault (USA) (Track 13).bin" size="15817200" crc="267796c5" md5="ad72c50a88ab90cffdb3fb82185b2119" sha1="10fd2a6ce0d2c952aae226d1f9a19043f9d20984"/>
+ <rom name="Blackhole Assault (USA) (Track 14).bin" size="23750496" crc="6f39ff34" md5="ef154ab1c9a2a27f075fb8d66956a970" sha1="f1c7e4d36e6aa06908aba9f8b0deb22a439e0db8"/>
+ <rom name="Blackhole Assault (USA) (Track 15).bin" size="10997952" crc="9eb977fa" md5="fd20001dff3d53c709b5934c58940f05" sha1="0fa80117a024fd689126f783ebb1893595084033"/>
+ <rom name="Blackhole Assault (USA) (Track 16).bin" size="48190128" crc="791c9763" md5="be1756f5f0a753d760d2230dc94e73af" sha1="580dc9cf321ba5e438cb7c18ac885133b8cf58c6"/>
+ <rom name="Blackhole Assault (USA) (Track 17).bin" size="5981136" crc="f68a32f1" md5="38c9cc76b9bdc04e6a13e0fbbbdd2a9f" sha1="36410f0233f4762479c5773fc51623502377e8f0"/>
+ <rom name="Blackhole Assault (USA) (Track 18).bin" size="19733280" crc="96a7cf42" md5="2ae749fb1ce48365401a80862c60438a" sha1="44b76c286189f38d4780cad143f59f8a5b6f2d7a"/>
+ <rom name="Blackhole Assault (USA) (Track 19).bin" size="42867552" crc="129a2a58" md5="882688ce244cc2c0c535cfe10edd0a0a" sha1="69bbf5ef0a28a4ef89c0659e577089c0be33a113"/>
+ <rom name="Blackhole Assault (USA) (Track 20).bin" size="35312928" crc="3d9c671f" md5="178f2a03ce620783701bb12a88e2c31e" sha1="51f1f85484e0f98839b8e9dc80993a3d7626e231"/>
+ <rom name="Blackhole Assault (USA) (Track 21).bin" size="14608272" crc="83bd59af" md5="cc764e95215195ef0ea43379e9deaeae" sha1="f31bff517cd0b71dcfff909b9ec52af8a2793769"/>
+ <rom name="Blackhole Assault (USA) (Track 22).bin" size="35143584" crc="37eb34f2" md5="46549941403c51ed98b8c2ed1faad2ac" sha1="e3005fec46b714ea410c163ea9e532eb5ea11c20"/>
+ <rom name="Blackhole Assault (USA) (Track 23).bin" size="33946416" crc="78a93630" md5="d4eeca95d170bd4433d2223902f989df" sha1="e2c37e519e7caf9352adef7546a15c2405d81a4a"/>
+ -->
+ <description>Black Hole Assault (USA)</description>
+ <year>1993</year>
+ <publisher>Bignet</publisher>
+ <info name="alt_title" value="Blackhole Assault (Box)" />
+ <info name="serial" value="PN-6400"/>
+ <info name="ring_code" value="CDAC-031700 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="black hole assault (usa)" sha1="e7533c9de5cea95b3d3ddbcc19d0002aa4fabb2b"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="bouncers">
+ <!-- Source: redump.org - http://redump.org/disc/28028/
+ <rom name="Bouncers (USA).cue" size="954" crc="bca37abb" md5="1cb86ee3ddcc8999d32bb181d0981098" sha1="5292fcb4cfb13cca0111c7c6c95e2a2e5e8affce"/>
+ <rom name="Bouncers (USA) (Track 1).bin" size="238344624" crc="c89a9298" md5="c0ec4fd23f12188cafef26f6158d7937" sha1="f4bca7e9a8e3383f5e2cf69bfb379867a521750c"/>
+ <rom name="Bouncers (USA) (Track 2).bin" size="27113856" crc="c07e3bf5" md5="810349ffe4fd11d62f2f68de27e5303d" sha1="fdde5952c844dcd1b571912a9fc318baadb818ed"/>
+ <rom name="Bouncers (USA) (Track 3).bin" size="25213440" crc="548431e0" md5="64809932ffa13873c2b738ecb022eba5" sha1="db2678de8a2db8a3c57613fdbfdb0a24bcf93ae7"/>
+ <rom name="Bouncers (USA) (Track 4).bin" size="25996656" crc="a25083fb" md5="df90c3520cd9b5852ac4ef9089ee94ce" sha1="6163c0a91a40430de7952d11b28ba0a2785b58e8"/>
+ <rom name="Bouncers (USA) (Track 5).bin" size="27008016" crc="566ee289" md5="45410ab57ce6b68067e0ee19e032fb14" sha1="907a5d38205d498734fa25ee1aae4aaad7ccdeb2"/>
+ <rom name="Bouncers (USA) (Track 6).bin" size="23353008" crc="6d484b64" md5="8e7b15693e56f3e571724d29fdf53994" sha1="4aedc7bb826ddfc569821bd313778c648618911c"/>
+ <rom name="Bouncers (USA) (Track 7).bin" size="28033488" crc="f40046c5" md5="0790f266d9c5ab079c3feff117947aa1" sha1="26d18eec96070f8b97322e5d0b26f6f7e13fcf92"/>
+ <rom name="Bouncers (USA) (Track 8).bin" size="32262384" crc="a1457d7c" md5="6273a31fff0c8c38881eb264c1b80dda" sha1="dc4ba78d1019e9dca19319cdef8eb61549887786"/>
+ <rom name="Bouncers (USA) (Track 9).bin" size="11656512" crc="716f3307" md5="b14b1668143485f18f10ab8c150fa184" sha1="adb4a9c46a72733e88d1f2aec465a62d4cfc0286"/>
+ -->
+ <description>Bouncers (USA)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="199412xx" />
+ <info name="serial" value="4908"/>
+ <info name="ring_code" value="CDAC 082400 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="bouncers (usa)" sha1="ec21e095b7670989495095f6a6cb9a94ba24a405"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="draculaa" cloneof="dracula">
+ <!-- Source: redump.org - http://redump.org/disc/3882/
<rom name="Bram Stoker's Dracula (USA).cue" size="829" crc="dc1f4075" />
<rom name="Bram Stoker's Dracula (USA) (Track 1).bin" size="275525040" crc="9fae63c4" />
<rom name="Bram Stoker's Dracula (USA) (Track 2).bin" size="41886768" crc="d1220cb9" />
@@ -217,8 +529,9 @@
<description>Bram Stoker's Dracula (USA)</description>
<year>1992</year>
<publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199311xx" />
<info name="serial" value="T-93065"/>
- <info name="ring_code" value="CDAC-020100 4"/> <!-- maybe CDAC-050100 4? -->
+ <info name="ring_code" value="CDAC-020100 4"/> <!-- Possibly CDAC-050100 4 -->
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="bram stoker's dracula (usa)" sha1="35a46f2a7c32d18ec22e3e8a7c03518f915fb4b2"/>
@@ -226,8 +539,8 @@
</part>
</software>
- <software name="draculaa" cloneof="dracula">
- <!-- source redump.org
+ <software name="draculab" cloneof="dracula">
+ <!-- Source: redump.org - http://redump.org/disc/17156/
<rom name="Bram Stoker's Dracula (USA) (Alt).cue" size="871" crc="55aea57f" />
<rom name="Bram Stoker's Dracula (USA) (Alt) (Track 1).bin" size="275525040" crc="9fae63c4" />
<rom name="Bram Stoker's Dracula (USA) (Alt) (Track 2).bin" size="41884416" crc="fa4b8424" />
@@ -240,17 +553,42 @@
<description>Bram Stoker's Dracula (USA, Alt)</description>
<year>1992</year>
<publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93065"/>
+ <info name="release" value="199311xx" />
+ <info name="serial" value="T-60064"/>
<info name="ring_code" value="CDAC-050100 1"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="bram stoker's dracula (usa) (alt)" sha1="98ef333e37ed4968c3421966f36ea158a5a3e203"/>
+ <disk name="bram stoker's dracula (usa, alt)" sha1="98ef333e37ed4968c3421966f36ea158a5a3e203"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="dracula">
+ <!-- Source: redump.org - http://redump.org/disc/29309/
+ <rom name="Bram Stoker's Dracula (USA) (Rev A).cue" size="975" crc="219c0525" md5="3dae6cc30ccf1d728dba4d5f8bb8d34c" sha1="7d1e1e09394c01629a7f0a04da4cef735ed280ed"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 1).bin" size="275525040" crc="60ce4ef0" md5="9bf11502375d74e17f5b835278d99256" sha1="fed388b738f273b56b7f4f2569d5e951079be2bd"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 2).bin" size="42627648" crc="0c71c862" md5="a32bd9d6b087384ee90daf7b5ba599f2" sha1="cb718a048eec0d38e092a2b23c5327f7fb64c0bc"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 3).bin" size="50897280" crc="730c7fa1" md5="213f400d4726551baaf92807e955e745" sha1="ac9a05b06901c1fd63c9ae4c44149a1a5ff32ab5"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 4).bin" size="10701600" crc="c54e3705" md5="d75538c64af314bad38dfb86efeebf5e" sha1="882d4b945d59f17d1495d0d95f4500297ef0c45a"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 5).bin" size="16779168" crc="c148b352" md5="be11c53a785424e361ecded65bbb462b" sha1="184b922842990c217c12f9640f0a112bfdfa87fa"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 6).bin" size="4019568" crc="8be25c31" md5="8cd2e0d97bb0471dd1f8193438873221" sha1="190ad2fd0ac9e1255dbad8ebc6191aff65ea7a16"/>
+ <rom name="Bram Stoker's Dracula (USA) (Rev A) (Track 7).bin" size="46778928" crc="d9599d60" md5="cc2083ef2ddf06cf7819af7f800fdeb6" sha1="1f079234d51d1fd01288d9c2f6a5cbaea62e1232"/>
+ -->
+ <description>Bram Stoker's Dracula (USA, Rev. A)</description>
+ <year>1992</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199311xx" />
+ <info name="serial" value="T-93155"/>
+ <info name="ring_code" value="CDAC-068700 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="bram stoker's dracula (usa, rev. a)" sha1="ff8b30072085ed157c94859371e6a8f087ebd132"/>
</diskarea>
</part>
</software>
<software name="brutal">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17252/
<rom name="Brutal - Paws of Fury (USA).cue" size="1812" crc="0af87d0c" />
<rom name="Brutal - Paws of Fury (USA) (Track 01).bin" size="91318752" crc="3861b809" />
<rom name="Brutal - Paws of Fury (USA) (Track 02).bin" size="24319680" crc="a6c937ca" />
@@ -271,6 +609,7 @@
<description>Brutal - Paws of Fury (USA)</description>
<year>1994</year>
<publisher>GameTek</publisher>
+ <info name="release" value="199403xx" />
<info name="serial" value="T-83015"/>
<info name="ring_code" value="SEGAT830155 R1D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
@@ -280,8 +619,65 @@
</part>
</software>
+ <software name="chuckrck">
+ <!-- Source: redump.org - http://redump.org/disc/35935/
+ <rom name="Chuck Rock (USA).cue" size="1226" crc="f11658ee" md5="6e52c090a24ab08cedb102e245a472e4" sha1="ad0ec7226674c3fd858bcf65565d94a5367faeff"/>
+ <rom name="Chuck Rock (USA) (Track 01).bin" size="12625536" crc="a2d666a8" md5="cd8aaeff0b7cb1de361c4c39d425763f" sha1="f0fc8bba5f404d0984f52a652dc9d541e0f20afa"/>
+ <rom name="Chuck Rock (USA) (Track 02).bin" size="42394800" crc="fd3e065d" md5="07cc7748add810f84e603345e8b1f56c" sha1="8390d77d5efe0f59f10fd7beabe32aa6b5c77326"/>
+ <rom name="Chuck Rock (USA) (Track 03).bin" size="42582960" crc="83b86646" md5="342db1070df38d4385f8f85b6a56d01d" sha1="125fddf6b335f1b72f6c41f7f848c0631583beae"/>
+ <rom name="Chuck Rock (USA) (Track 04).bin" size="41463408" crc="0d349191" md5="f02a9a3691ab92ace03fa281952e9cfb" sha1="cd57e5c6974cb07d9fd9aa1836e111105735daae"/>
+ <rom name="Chuck Rock (USA) (Track 05).bin" size="44977296" crc="02388c27" md5="9485cb17bf759035a0f4902e511d7518" sha1="4bc57643621acce16ca294f7dd71906244ee9c32"/>
+ <rom name="Chuck Rock (USA) (Track 06).bin" size="42190176" crc="97dc9ea2" md5="378f3b00221d75056b691acb9bfb568e" sha1="7faac5a8f2a6ec1dc4732ea624316a3c227ce7ae"/>
+ <rom name="Chuck Rock (USA) (Track 07).bin" size="19206432" crc="1b0111db" md5="d6d7b800ee715af9bdf7be1c7f57ee87" sha1="bac44756a5f0d1d77ac43108ba0ceadb7fdbb3bd"/>
+ <rom name="Chuck Rock (USA) (Track 08).bin" size="40132176" crc="0f8a5764" md5="b045b37fc4d6b487f45edf6a7ca59011" sha1="eae39fdd2e9688ff1ad6af208856741aeb250579"/>
+ <rom name="Chuck Rock (USA) (Track 09).bin" size="18413808" crc="bd002115" md5="0c154be0f5264d55f274c3c2c7b36f5a" sha1="55b66d4f2ddf6b32c6b1f3f51eb3046ddce38120"/>
+ <rom name="Chuck Rock (USA) (Track 10).bin" size="1434720" crc="7d8e8ef3" md5="646ba08f5af4fe256f1322a3521f33ee" sha1="baab80434cd74f499effef01460e6a73e27950d7"/>
+ <rom name="Chuck Rock (USA) (Track 11).bin" size="20718768" crc="cbe311c0" md5="9c3b1481589bf832a52ea932904d2920" sha1="66e0823a20c951e83a5077368396c1ef99e66c7e"/>
+ -->
+ <description>Chuck Rock (USA)</description>
+ <year>1992</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199301xx" />
+ <info name="serial" value="T-6204"/>
+ <info name="ring_code" value="CDAC-032500 5"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="chuck rock (usa)" sha1="2a0ca620f253992e92af5655c7ed4203a1537b0e"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="chukrck2">
+ <!-- Source: redump.org - http://redump.org/disc/28625/
+ <rom name="Chuck Rock II - Son of Chuck (USA).cue" size="1682" crc="40f47b1f" md5="1da9d4b222d32a144928a735bb5c5a22" sha1="84bc3e091ea44a14d9cd4c07f3b9fbfed6f355f3"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 01).bin" size="75997824" crc="fad79bda" md5="f212456d0c005ebf9c590538102dc7cc" sha1="96ef30802fb3feafa9d03c5f7e513cbd7b98f639"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 02).bin" size="42091392" crc="e7760973" md5="f41c4128f9ca879d05d0bbe95e97f0c3" sha1="7fe9addcf000a3aaa238470c4df6f7f1ccda9f6d"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 03).bin" size="39181968" crc="c36ed807" md5="01320740c0b41b0a39dcfa914e12b746" sha1="80b2c9eaa1caebfac99bb61a4834cf2a420d91e2"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 04).bin" size="37267440" crc="b1391839" md5="68b0b2dbb039e340ca94431b1e799b0a" sha1="dec6841a9b9b73efd83082f09b004fe3c6fccff4"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 05).bin" size="38299968" crc="cad6a8dc" md5="b10a5a17bbd242df50958f36145091e5" sha1="3f8f9a45ecb791f8900ffcbcea9a3327176d9057"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 06).bin" size="37185120" crc="61e74e0a" md5="8736a8295b963ea43bf22601b24062f2" sha1="fb201670baed2744c540703b3aade46b9b31ee93"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 07).bin" size="41748000" crc="378e2dde" md5="1c60b1db408bf17e4fb184de79716143" sha1="158087c82a4fba0eb5535cb7cf3ff5e02ea4cae6"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 08).bin" size="30545424" crc="99d295f5" md5="03904ea6d69ad9ef4fe9f3b8b01b4086" sha1="92f449e7d5667daf0d93b2791f1cd65bd1792937"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 09).bin" size="25890816" crc="602db379" md5="ac5d52e11e70e989f99dba9167c666ba" sha1="5ec22c3d8a515c0ac238a31442ec32ce793067e3"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 10).bin" size="21932400" crc="9206b2ba" md5="f950328f9742c7bc5597117b41157da5" sha1="8d7ca6ade647775c91af92c0e7f4e73f8027ea75"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 11).bin" size="41750352" crc="72f10970" md5="629787bdefed24316ae92b690e295f67" sha1="269519528ecff530ebfeb86f2d8e69aeb2414827"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 12).bin" size="38476368" crc="bc1d325b" md5="d907914e8514d9d62e93e452cd149e2a" sha1="99ec7ba4a48669962078f78e39c9d0002ebc9885"/>
+ <rom name="Chuck Rock II - Son of Chuck (USA) (Track 13).bin" size="2742432" crc="2e49337c" md5="2d9cb6db90bb9a86b4860908ba105270" sha1="eb26cd012e7a7703393b424baccd2462a8dee4f2"/>
+ -->
+ <description>Chuck Rock II - Son of Chuck (USA)</description>
+ <year>1993</year>
+ <publisher>Virgin Interactive</publisher>
+ <info name="serial" value="T-70045"/>
+ <info name="ring_code" value="SEGACD86006 R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="chuck rock ii - son of chuck (usa)" sha1="d47e53ee53653ee9b5623f276060e7a5f4f28c9e"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="cliffh">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/543/
<rom name="Cliffhanger (USA).cue" size="759" crc="9f971071" />
<rom name="Cliffhanger (USA) (Track 1).bin" size="187101600" crc="2926e7e8" />
<rom name="Cliffhanger (USA) (Track 2).bin" size="41329344" crc="d8e4d584" />
@@ -294,6 +690,7 @@
<description>Cliffhanger (USA)</description>
<year>1993</year>
<publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199311xx" />
<info name="serial" value="T-93075"/>
<info name="ring_code" value="CDAC-053600 1"/>
<part name="cdrom" interface="scd_cdrom">
@@ -304,7 +701,7 @@
</software>
<software name="cobracom">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3883/
<rom name="Cobra Command (USA).cue" size="208" crc="2ffd0c2c" />
<rom name="Cobra Command (USA) (Track 1).bin" size="256344480" crc="a2093c3c" />
<rom name="Cobra Command (USA) (Track 2).bin" size="2003904" crc="17d0d5ec" />
@@ -313,6 +710,7 @@
<year>1992</year>
<publisher>Sega</publisher>
<info name="serial" value="4402"/>
+ <info name="release" value="199211xx" />
<info name="ring_code" value="CDAC-031400 5"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -321,26 +719,46 @@
</part>
</software>
- <software name="corpse32" cloneof="corpse"> <!-- Requires 32x add-on! -->
- <!-- source redump.org
+ <software name="comptons201r" cloneof="comptons">
+ <!-- Source: redump.org - http://redump.org/disc/20214/
+ <rom name="Compton's Interactive Encyclopedia (USA) (2.01R).cue" size="289" crc="6fc690d9" md5="97a41ab3899c5911900d2bb6d1c95bf0" sha1="679e29f743ab4b02181f5adcfc5d9abf0b432e3d"/>
+ <rom name="Compton's Interactive Encyclopedia (USA) (2.01R) (Track 1).bin" size="380264304" crc="1d9b11c8" md5="1e181c4677a7dd9160f4559c5037a698" sha1="e7e839dbdaf68cf043dc322b4024dcd684218e85"/>
+ <rom name="Compton's Interactive Encyclopedia (USA) (2.01R) (Track 2).bin" size="2763600" crc="105280f9" md5="894dcb8c77145d9a8bf81c35bc87a35b" sha1="5276761377b221fa19aad1536dc26600649ab2db"/>
+ -->
+ <description>Compton's Interactive Encyclopedia v2.01R (USA)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-118025"/>
+ <info name="ring_code" value="SEGAT118025 R1F MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="compton's interactive encyclopedia v2.01r (usa)" sha1="2df62d0e0a8f37e7b52c549ce7605d8c55fadf00"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- Requires 32x add-on! -->
+ <software name="corpse32" cloneof="corpse">
+ <!-- Source: redump.org - http://redump.org/disc/2965/
<rom name="Corpse Killer (USA) (32X).cue" size="220" crc="5d439045" />
<rom name="Corpse Killer (USA) (32X) (Track 1).bin" size="624898176" crc="acd1f057" />
<rom name="Corpse Killer (USA) (32X) (Track 2).bin" size="1848672" crc="d6a1b2d3" />
-->
<description>Corpse Killer (USA, 32X)</description>
- <year>1994</year>
+ <year>1995</year>
<publisher>Digital Pictures</publisher>
- <info name="serial" value="T-162055"/>
+ <info name="serial" value="T-16201F"/>
<info name="ring_code" value="GW 02361 RE-1 SRCR##03"/>
+ <sharedfeat name="requirement" value="32x"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="corpse killer (usa) (32x)" sha1="68a6c75bc730025e90fa413c107090e7f4e377e0"/>
+ <disk name="corpse killer (usa, 32x)" sha1="68a6c75bc730025e90fa413c107090e7f4e377e0"/>
</diskarea>
</part>
</software>
<software name="darkwiz">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/6136/
<rom name="Dark Wizard (USA).cue" size="1326" crc="558ec74e" />
<rom name="Dark Wizard (USA) (Track 01).bin" size="415882992" crc="b0c3c6ba" />
<rom name="Dark Wizard (USA) (Track 02).bin" size="15443232" crc="0c8671c8" />
@@ -368,7 +786,7 @@
</software>
<software name="dblswtch">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/5571/
<rom name="Double Switch (USA).cue" size="208" crc="fcbaefb5" />
<rom name="Double Switch (USA) (Track 1).bin" size="632944368" crc="c9011b75" />
<rom name="Double Switch (USA) (Track 2).bin" size="1881600" crc="59e2ce56" />
@@ -385,8 +803,116 @@
</part>
</software>
+ <software name="dracunl">
+ <!-- Source: redump.org - http://redump.org/disc/21040/ http://redump.org/disc/21041/
+ <rom name="Dracula Unleashed (USA) (Disc 1).cue" size="257" crc="93ade26e" md5="fa725eb12ee7eb683144986261c33bf1" sha1="fdb6ad28c7fc21f99e35684502bcd32dfc1abb1b"/>
+ <rom name="Dracula Unleashed (USA) (Disc 1) (Track 1).bin" size="544372752" crc="0e728a6c" md5="282a9be8157a6167a389c7fff475ed3a" sha1="927b6d0525010265059ab1ee4d23c6a0598b7fb8"/>
+ <rom name="Dracula Unleashed (USA) (Disc 1) (Track 2).bin" size="10936800" crc="d786ed68" md5="67e2198ef6dc4c6c234ef791ee13bc8a" sha1="ea3b156235b3554b5d522054f83c811a3fc3188e"/>
+
+ <rom name="Dracula Unleashed (USA) (Disc 2).cue" size="234" crc="c464d858" md5="dc484097b4c2f2f0536f8f22f3a54c2b" sha1="b9d2dbf101195dcaacacd3049e3aebe397cdd5be"/>
+ <rom name="Dracula Unleashed (USA) (Disc 2) (Track 1).bin" size="599428368" crc="2fc70577" md5="b5e16ae813c649f8dbaa4e5a97d293e4" sha1="f6a8c90a517285d7763c72b881a5d2ace99d4403"/>
+ <rom name="Dracula Unleashed (USA) (Disc 2) (Track 2).bin" size="10936800" crc="d786ed68" md5="67e2198ef6dc4c6c234ef791ee13bc8a" sha1="ea3b156235b3554b5d522054f83c811a3fc3188e"/>
+ -->
+ <description>Dracula Unleashed (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4420"/>
+ <info name="ring_code" value="CDAC-053000 14 (Disc 1) / CDAC-053100 4 (Disc 2)"/>
+ <part name="cdrom1" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 1" />
+ <diskarea name="cdrom">
+ <disk name="dracula unleashed (usa) (disc 1)" sha1="307c0779dace5d95f3e7a0ccee18c00356ca2362"/>
+ </diskarea>
+ </part>
+ <part name="cdrom2" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 2" />
+ <diskarea name="cdrom">
+ <disk name="dracula unleashed (usa) (disc 2)" sha1="e3adeebe60f32a3487e7d5afc86675b73057fba6"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="dlair">
+ <!-- Source: redump.org - http://redump.org/disc/21036/
+ <rom name="Dragon's Lair (USA).cue" size="231" crc="345db17e" md5="fc6912bc8cf6467d73954340d0b6a637" sha1="213486ddcac93e45c1dbd8c38d28ffef980215c7"/>
+ <rom name="Dragon's Lair (USA) (Track 1).bin" size="210654528" crc="bf94a570" md5="fded2eb7509bd5e725fa49e71941ddef" sha1="acb107707824dbf4df93976bc3fb8fe915ec914b"/>
+ <rom name="Dragon's Lair (USA) (Track 2).bin" size="1524096" crc="d86d92d0" md5="ced8575ec23b7771e38b519dd87ea165" sha1="6088202d33d94614ca277bec0726a0a86d0ae030"/>
+ -->
+ <description>Dragon's Lair (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-121015"/>
+ <info name="ring_code" value="SEGAT121015 R3D MFD BY JVC 13"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="dragon's lair (usa)" sha1="724bc872d111ed67df10e95b134f8bf7fe2fcfe3"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="dungexpl">
+ <!-- Source: redump.org - http://redump.org/disc/31817/
+ <rom name="Dungeon Explorer (USA).cue" size="1503" crc="7a681bba" md5="93b8fbc288447e4be4b93dcbb2ed1b4a" sha1="9cc6e6ee394496295eb111ca3118a5d24e18ba8a"/>
+ <rom name="Dungeon Explorer (USA) (Track 01).bin" size="5040336" crc="a6ad97e9" md5="340cb44b351a60f904d387c34af085cc" sha1="6254f8f20f82071c712d616d99bacdf9ccc8ff18"/>
+ <rom name="Dungeon Explorer (USA) (Track 02).bin" size="54020736" crc="a46c0f46" md5="028009274d66ba3b951c3c09504161af" sha1="df66426b63de46be9740e472610daf67e194d2eb"/>
+ <rom name="Dungeon Explorer (USA) (Track 03).bin" size="38601024" crc="d7077a8d" md5="1eb6be3d43bb6d9b332cd769f9f7856e" sha1="214307c815efe15d55cd8991640f5ea81b096ac7"/>
+ <rom name="Dungeon Explorer (USA) (Track 04).bin" size="58717680" crc="9e342460" md5="fc1b2c186bd3dba3d1a2b74c08286e74" sha1="c5c5eb9ae743c4b10f73375bd6fe41c85c6f7941"/>
+ <rom name="Dungeon Explorer (USA) (Track 05).bin" size="32789232" crc="9afe90e0" md5="ef5a649bc92e0cbb8c3e86df2edbe11b" sha1="4e4f1b3b08b1d93cb27479bc84dd58710bcacc00"/>
+ <rom name="Dungeon Explorer (USA) (Track 06).bin" size="46927104" crc="5b29fb07" md5="32d7bd6e98b3bfc9cf617c4b58db1810" sha1="24164daf487331ab8ec12eb007a31f5f2617b011"/>
+ <rom name="Dungeon Explorer (USA) (Track 07).bin" size="32506992" crc="41103f28" md5="3d25ca3f4bbd1796e2da6b15e4a646f4" sha1="d18cb2c88a0864c3cb675147b47609302840d8ef"/>
+ <rom name="Dungeon Explorer (USA) (Track 08).bin" size="36281952" crc="b73715c1" md5="8c9ff5ac032401c97c7866b1f1f382a0" sha1="d10342387de8d8260f9ad761f2babae6c60e0ac2"/>
+ <rom name="Dungeon Explorer (USA) (Track 09).bin" size="40985952" crc="2b6fa132" md5="cd9291c87f794c442fc326a45d5a5d96" sha1="ce04add437792e104925de2d1de42a6973700a24"/>
+ <rom name="Dungeon Explorer (USA) (Track 10).bin" size="40235664" crc="2f3807c9" md5="5d32497728e2cc6bea1f2402a1718f2c" sha1="b07f49dc36f439f0db897b3c7dc48f98baf095be"/>
+ <rom name="Dungeon Explorer (USA) (Track 11).bin" size="7639296" crc="64fe1b1f" md5="3d2080dc9b4678181fc6fbc92f8a69f1" sha1="93b89ba3124a1f1291c39d940c4eef42ab56cb0f"/>
+ <rom name="Dungeon Explorer (USA) (Track 12).bin" size="16134720" crc="2fa823c9" md5="e642de4b449852b929b6fd1ef2939013" sha1="334d9ca29b180b1b3fb03bc57257297d11b9e0f8"/>
+ <rom name="Dungeon Explorer (USA) (Track 13).bin" size="59571456" crc="eab5d21b" md5="98e906e33fa7a6304666a25f0f9e1c96" sha1="d53f58190e2055386c311985885b9c786ec8480d"/>
+ -->
+ <description>Dungeon Explorer (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4657"/>
+ <info name="ring_code" value="JVC SEGA4657 R2E 0 0"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="dungeon explorer (usa)" sha1="432897f1f19e8a053c8f7d783e2331e7fd0f0b1f"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="ecco">
+ <!-- Source: redump.org - http://redump.org/disc/4104/
+ <rom name="Ecco the Dolphin (USA).cue" size="1854" crc="3a04c752" />
+ <rom name="Ecco the Dolphin (USA) (Track 01).bin" size="59616144" crc="4caaa8f5" />
+ <rom name="Ecco the Dolphin (USA) (Track 02).bin" size="48432384" crc="68097032" />
+ <rom name="Ecco the Dolphin (USA) (Track 03).bin" size="42952224" crc="f4edc2ed" />
+ <rom name="Ecco the Dolphin (USA) (Track 04).bin" size="37312128" crc="5aa84eb0" />
+ <rom name="Ecco the Dolphin (USA) (Track 05).bin" size="65359728" crc="d5c31237" />
+ <rom name="Ecco the Dolphin (USA) (Track 06).bin" size="57278256" crc="13bcc5c8" />
+ <rom name="Ecco the Dolphin (USA) (Track 07).bin" size="59569104" crc="3307d862" />
+ <rom name="Ecco the Dolphin (USA) (Track 08).bin" size="36992256" crc="c517dfcf" />
+ <rom name="Ecco the Dolphin (USA) (Track 09).bin" size="10461696" crc="428cb06d" />
+ <rom name="Ecco the Dolphin (USA) (Track 10).bin" size="20391840" crc="6d7c4bad" />
+ <rom name="Ecco the Dolphin (USA) (Track 11).bin" size="36129072" crc="36a5a1c4" />
+ <rom name="Ecco the Dolphin (USA) (Track 12).bin" size="10426416" crc="a21f8e71" />
+ <rom name="Ecco the Dolphin (USA) (Track 13).bin" size="37203936" crc="52b0222f" />
+ <rom name="Ecco the Dolphin (USA) (Track 14).bin" size="37138080" crc="6cdc4d3a" />
+ <rom name="Ecco the Dolphin (USA) (Track 15).bin" size="58633008" crc="5cd444ea" />
+ <rom name="Ecco the Dolphin (USA) (Track 16).bin" size="40369728" crc="994d97e5" />
+ -->
+ <description>Ecco the Dolphin (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4408"/>
+ <info name="ring_code" value="CDAC-042000 1, CDAC-042000 3"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="ecco the dolphin (usa)" sha1="7fb88d4f0fe34ee40991d724b9e90f7586081fd2"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="ecco2">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/11782/
<rom name="Ecco - The Tides of Time (USA).cue" size="2107" crc="e0ba4c3d" />
<rom name="Ecco - The Tides of Time (USA) (Track 01).bin" size="150469200" crc="4720cff7" />
<rom name="Ecco - The Tides of Time (USA) (Track 02).bin" size="50005872" crc="67abb8de" />
@@ -418,46 +944,47 @@
</part>
</software>
- <software name="ecco">
- <!-- source redump.org
- <rom name="Ecco the Dolphin (USA).cue" size="1854" crc="3a04c752" />
- <rom name="Ecco the Dolphin (USA) (Track 01).bin" size="59616144" crc="4caaa8f5" />
- <rom name="Ecco the Dolphin (USA) (Track 02).bin" size="48432384" crc="68097032" />
- <rom name="Ecco the Dolphin (USA) (Track 03).bin" size="42952224" crc="f4edc2ed" />
- <rom name="Ecco the Dolphin (USA) (Track 04).bin" size="37312128" crc="5aa84eb0" />
- <rom name="Ecco the Dolphin (USA) (Track 05).bin" size="65359728" crc="d5c31237" />
- <rom name="Ecco the Dolphin (USA) (Track 06).bin" size="57278256" crc="13bcc5c8" />
- <rom name="Ecco the Dolphin (USA) (Track 07).bin" size="59569104" crc="3307d862" />
- <rom name="Ecco the Dolphin (USA) (Track 08).bin" size="36992256" crc="c517dfcf" />
- <rom name="Ecco the Dolphin (USA) (Track 09).bin" size="10461696" crc="428cb06d" />
- <rom name="Ecco the Dolphin (USA) (Track 10).bin" size="20391840" crc="6d7c4bad" />
- <rom name="Ecco the Dolphin (USA) (Track 11).bin" size="36129072" crc="36a5a1c4" />
- <rom name="Ecco the Dolphin (USA) (Track 12).bin" size="10426416" crc="a21f8e71" />
- <rom name="Ecco the Dolphin (USA) (Track 13).bin" size="37203936" crc="52b0222f" />
- <rom name="Ecco the Dolphin (USA) (Track 14).bin" size="37138080" crc="6cdc4d3a" />
- <rom name="Ecco the Dolphin (USA) (Track 15).bin" size="58633008" crc="5cd444ea" />
- <rom name="Ecco the Dolphin (USA) (Track 16).bin" size="40369728" crc="994d97e5" />
- -->
- <description>Ecco the Dolphin (USA)</description>
- <year>1996?</year>
+ <software name="ecco2a" cloneof="ecco2">
+ <!-- Source: redump.org - http://redump.org/disc/29311/
+ <rom name="Ecco - The Tides of Time (USA).cue" size="2130" crc="280bf750" md5="a988766b2d4d78e3ee8d80d3c0f9a7fe" sha1="d7448766bfe751aa52d39c03237ead1e72696e5d"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 01).bin" size="150640896" crc="eac03fe1" md5="7c43cb79f3c2553a198bec7fb2ee341a" sha1="bab86c4a7b3373b720d8e722b145b31622925f74"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 02).bin" size="49827120" crc="aa9241c6" md5="75c2134d58e15ab7677860f4fa4a9047" sha1="da3149f37a428475a43a5b5f581a5ad4f54720d9"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 03).bin" size="48091344" crc="567b5823" md5="caa7ae994b8acd25b5375569539ec6a3" sha1="482cc69f146cf281f73ef010d34844a2df3a7604"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 04).bin" size="39861696" crc="62a589e6" md5="8993c7280b86360bded7de143afff15e" sha1="066260680c08a226cd60cf149601e6a20975103c"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 05).bin" size="39214896" crc="874cd7ad" md5="897d673d2d842f9ea11f79b326f3be9c" sha1="84cb82568794a6b5fc0aa271c75af68eccd84382"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 06).bin" size="36881712" crc="1f1c707d" md5="24752c98f14695bd8908cb7b50e1982c" sha1="f06c6826ca94fdb57f30e91da1baa11802bffb51"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 07).bin" size="36717072" crc="b880fe28" md5="b2216d07b52493a85af7403ef073869f" sha1="18a70c68b6c76e31e1b94540f6a1f1c859a2ab11"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 08).bin" size="35223552" crc="dc47bcd7" md5="f4b32e32f374ec1a19d4f324f3017de7" sha1="756d6509e442f935829c9bb7b73bd5e4cc2e39ec"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 09).bin" size="34454448" crc="fd9fe729" md5="7f10910fff8e7fb09eb46f6f1d711ac9" sha1="94df91ae337f0af5991b10ec79402f98cb3c915e"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 10).bin" size="29722224" crc="ccd23933" md5="0f9c0408856dff5d67a0b342ca3db973" sha1="bddaced3c506da0d49b1a3e94a540d6b66c1b300"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 11).bin" size="29063664" crc="cb47fb6c" md5="3689a6f7a63c359c9a44a127fdbf75d4" sha1="a8a4095964ccc2bf179a9ca86be79db468035166"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 12).bin" size="28381584" crc="4a0dd16c" md5="7405d95f6752e9e564e72edfb4fa534c" sha1="9e38a2a6e21ba829355ac042442956c7c88f012d"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 13).bin" size="23378880" crc="af63d4d7" md5="536fc37a90895b23d6029e69a0901a56" sha1="812df8424ade583f8f8fc5af8ee4ae7bf4751ef8"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 14).bin" size="15064560" crc="94087830" md5="a9067bdcbd2f348d33ec37c3d76decf5" sha1="bbe01b360e8dcc9302fe2083cba8fcd489aebe58"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 15).bin" size="3906672" crc="230b129b" md5="e597f7c369d2eb839f1d7c64c7f553f3" sha1="1cfd49755cc77cbbc1671aaa253f9ef94c1fc1f9"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 16).bin" size="48597024" crc="8c8b6c37" md5="5244482ce6d7ad3ef977bd4e9c288db4" sha1="fbb32ced119dc47e097c7abc679cec9fc54d31bf"/>
+ <rom name="Ecco - The Tides of Time (USA) (Track 17).bin" size="10814496" crc="1475c942" md5="2f7ef97ed5b8c74272e3f78ffefade1a" sha1="a16a6dd2011d973172322e6f63e3be37a7b06b3d"/>
+ -->
+ <description>Ecco - The Tides of Time (USA, Alt)</description>
+ <year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4408"/>
- <info name="ring_code" value="CDAC-042000 3, CDAC-042000 1"/>
+ <info name="serial" value="4441"/>
+ <info name="ring_code" value="SEGA4441 R2H"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="ecco the dolphin (usa)" sha1="7fb88d4f0fe34ee40991d724b9e90f7586081fd2"/>
+ <disk name="ecco - the tides of time (usa, alt)" sha1="9fb665727fdc629df195ef315eef17eae9661f4d"/>
</diskarea>
</part>
</software>
<software name="espnbb">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/5973/
<rom name="ESPN Baseball Tonight (USA).cue" size="224" crc="7897b2c8" />
<rom name="ESPN Baseball Tonight (USA) (Track 1).bin" size="205571856" crc="fdaf514a" />
<rom name="ESPN Baseball Tonight (USA) (Track 2).bin" size="11952864" crc="61b42231" />
-->
<description>ESPN Baseball Tonight (USA)</description>
- <year>1993</year>
+ <year>1994</year>
<publisher>Sony Imagesoft</publisher>
<info name="serial" value="T-93115"/>
<part name="cdrom" interface="scd_cdrom">
@@ -467,8 +994,27 @@
</part>
</software>
- <software name="eternalc">
- <!-- source redump.org
+ <software name="espnnfl">
+ <!-- Source: redump.org - http://redump.org/disc/20253/
+ <rom name="ESPN Sunday Night NFL (USA).cue" size="224" crc="d1fe54ab" md5="6115bf958437e3a1e9828878b6532308" sha1="4fe91657c85b8104f430a1469a54bc69280b0949"/>
+ <rom name="ESPN Sunday Night NFL (USA) (Track 1).bin" size="286939296" crc="f24d3a1a" md5="04522508b694182c8e69e936656f02c0" sha1="8c672457556f2fdb2b0fead23b2f703f136f0d18"/>
+ <rom name="ESPN Sunday Night NFL (USA) (Track 2).bin" size="15974784" crc="e0cd3cf6" md5="38b53420387a24e9ba00f2a9373fc0fa" sha1="11ba1f36e1a961471bd841b4099a6274ff1928c6"/>
+ -->
+ <description>ESPN Sunday Night NFL (USA)</description>
+ <year>1994</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199411xx" />
+ <info name="serial" value="T-93105"/>
+ <info name="ring_code" value="CDAC-077600 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="espn sunday night nfl (usa)" sha1="11504fbfcecc6ffdaa69960ba9e57d6cd343bd78"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="eternalca" cloneof="eternalc">
+ <!-- Source: redump.org - http://redump.org/disc/2263/
<rom name="Eternal Champions - Challenge from the Dark Side (USA).cue" size="2813" crc="c12d13d7" />
<rom name="Eternal Champions - Challenge from the Dark Side (USA) (Track 01).bin" size="155641248" crc="5fd53235" />
<rom name="Eternal Champions - Challenge from the Dark Side (USA) (Track 02).bin" size="19796784" crc="ecf0da0d" />
@@ -491,9 +1037,9 @@
<rom name="Eternal Champions - Challenge from the Dark Side (USA) (Track 19).bin" size="19436928" crc="cd3c364a" />
-->
<description>Eternal Champions - Challenge from the Dark Side (USA)</description>
- <year>1994</year>
+ <year>1995</year>
<publisher>Sega</publisher>
- <info name="serial" value="4427"/>
+ <info name="serial" value="MK-4427"/>
<info name="ring_code" value="SEGA4427 R1J 11"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -502,8 +1048,209 @@
</part>
</software>
+ <software name="eternalc">
+ <!-- Source: redump.org - http://redump.org/disc/19031/
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE).cue" size="2931" crc="c9279545" md5="bad0ff27158810a9b22d5ddeef28b172" sha1="58140771e4544b19bd29e8c979640272593df22f"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 01).bin" size="155641248" crc="4a5ecc21" md5="44a65c6270861647d8711a8006209c02" sha1="06ccf19a9d84ed0efc4e8a0a40c22252411f6fe6"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 02).bin" size="19796784" crc="246148ed" md5="4efee02c0cdf002682b32258218f5860" sha1="e1222a065bc0fd2db2c6cd1ad789b1f1d9b9f264"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 03).bin" size="15796032" crc="811b12f9" md5="c7490e89f7f19b851153cfe56ecbb7b4" sha1="e1480be92a4c9da87c3a0d50a2a9094f6582f204"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 04).bin" size="18982992" crc="207a3e70" md5="98a11550be2b491c8ebf8fda71a46acd" sha1="ede0b9536fa8a4bdf8ebf704f7e9291ac14681b3"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 05).bin" size="19312272" crc="2822e4d2" md5="6d85c598c87574917b90585fc19352f2" sha1="05fbc06c21f3c6b4fc5e4a0b2a8ee9d79561a5c9"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 06).bin" size="19406352" crc="bf1b7b9c" md5="1926330ad249fca3081fc0d612337ea0" sha1="68cc7b16445abb66ee28fc7f47cea6be1e19f1bd"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 07).bin" size="19396944" crc="7abd5924" md5="44e54c6a3e8bfe5f7b1f677edf63e5ad" sha1="0270bf70f418e5f6502a452050fe3a39d5b7906e"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 08).bin" size="19392240" crc="d8b65914" md5="ffc6f08c98c08d0214bbc08d8863d6b2" sha1="fb55c9b724bc9b39be67c23193777dc1e7f49e7b"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 09).bin" size="19361664" crc="e5885954" md5="9d22af24fcb4b28e0802b7dbd19b4eb3" sha1="66778cc56f8a7488d36b2597b0bf3222c40e12f6"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 10).bin" size="19180560" crc="04a28f92" md5="78f1cb9340ffeb1580d9bf0723c789a2" sha1="ae853878843e8a16111c9adb31bc5367471b7041"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 11).bin" size="18752496" crc="045f62e1" md5="7040c1aff6cad0a24bcc3190df812d45" sha1="0ddd8443eefee0e4f9c32bf7fbe048efe45e562e"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 12).bin" size="20166048" crc="493acd33" md5="11e44984f9311ec5f006a1bb0b911d6d" sha1="8f27a4b0c268b09e904305b4227e47af44212932"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 13).bin" size="19627440" crc="69dbb633" md5="82441c25bd264448105b1d0c69e160cc" sha1="677645fe4c1e203e84653adc3911de0fb89c0655"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 14).bin" size="18082176" crc="4f1c9939" md5="5b5dd2df45e1a974e932ad6969e21f0c" sha1="3b0216dcd6045f4e57b9e39e65799b05d708e247"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 15).bin" size="21078624" crc="75c7939e" md5="d8074b9ccdef16ac70f45c7d3c74d1f3" sha1="26bbd7127d7dec6016d0b9d060f09fb1a073be2c"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 16).bin" size="19474560" crc="5b9e9594" md5="9a8964e099e59a2334d22e610ffee49a" sha1="63d439e3b2f0015fb127ec9a082607e5885c99dc"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 17).bin" size="19086480" crc="f9dea4cb" md5="b64a8e1a80ea25d38a611470a508e009" sha1="62f862bd0a7148f57d8c48a1152fba26921226aa"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 18).bin" size="24159744" crc="9cd9cd92" md5="5a90a744954763bc8e4151deb0f55bbc" sha1="c2899fad72ff6b788053a3421d23baef26df521f"/>
+ <rom name="Eternal Champions - Challenge from the Dark Side (USA) (RE) (Track 19).bin" size="19436928" crc="56b8e348" md5="db2ee275ab481b3010ec6ffe874d584e" sha1="6b4ca877e581257f1b871d270d8fdee258c529f1"/>
+ -->
+ <description>Eternal Champions - Challenge from the Dark Side (USA, Alt)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4427"/>
+ <info name="ring_code" value="SEGA4427RE R1J"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="eternal champions - challenge from the dark side (usa, alt)" sha1="9fb665727fdc629df195ef315eef17eae9661f4d"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="eyebehol">
+ <!-- Source: redump.org - http://redump.org/disc/22369/
+ <rom name="Eye of the Beholder (USA).cue" size="6702" crc="4c545624" md5="f5d15d77b39cdef246063c21eaf9a23f" sha1="ed3ae15a3ca73bf4ff996414c92e8e201cb1ba85"/>
+ <rom name="Eye of the Beholder (USA) (Track 01).bin" size="26594064" crc="8d298aab" md5="8a2b792d3d8793b736983cdaf8c44b2c" sha1="41dc4540f4337119e74c205940f56cf796e77946"/>
+ <rom name="Eye of the Beholder (USA) (Track 02).bin" size="52494288" crc="2a05a26c" md5="4e96727df08f8e4d40c97795a825fe4b" sha1="eb8876a0cbdb51fc3a91856b74ca403babd1f886"/>
+ <rom name="Eye of the Beholder (USA) (Track 03).bin" size="32638704" crc="ae6b265b" md5="3b8d4d70bef395f1030e354f1eda26c6" sha1="f41c89902072fbc484ce7cb837a9f7927833013e"/>
+ <rom name="Eye of the Beholder (USA) (Track 04).bin" size="27132672" crc="426ce505" md5="92b27c37c65db5ed841a2acbc78b50dd" sha1="28c383d68862b784b12ee9a5c2acede111aade79"/>
+ <rom name="Eye of the Beholder (USA) (Track 05).bin" size="30437232" crc="6e052ce5" md5="b09b25504bb87849fe11d6f633f1db0f" sha1="4320c6d0910b98d2a92b51ecfb30ec769768fcfa"/>
+ <rom name="Eye of the Beholder (USA) (Track 06).bin" size="33203184" crc="4909e17e" md5="1382b4411417c2600985e113fddd7fea" sha1="f4875378617082a4c628f3c130ab5003dd268c23"/>
+ <rom name="Eye of the Beholder (USA) (Track 07).bin" size="35298816" crc="b930a8d3" md5="e2dffbb48e3e712eb35cc9ee5156953b" sha1="d1e9164ca292ab539ddb51d7c8434175a49ee18f"/>
+ <rom name="Eye of the Beholder (USA) (Track 08).bin" size="29510544" crc="827986a6" md5="621dacd93738de6033a18cbace4be6f4" sha1="739df7e8067fb7276d4f9091270ee04f66c0fdcb"/>
+ <rom name="Eye of the Beholder (USA) (Track 09).bin" size="22247568" crc="fd45de14" md5="adf494c925db739995a12fb1fccaf97c" sha1="bf6774781406923c0936ca3e710cdf705c5749e5"/>
+ <rom name="Eye of the Beholder (USA) (Track 10).bin" size="30839424" crc="d3c65af9" md5="816993449c1e44727fd595bf1bff25c5" sha1="0a022fc5fb1f88a2d65504535ddf7f3d91d1a62a"/>
+ <rom name="Eye of the Beholder (USA) (Track 11).bin" size="10000704" crc="021af201" md5="ea79e08fc3a600735f6b1cd0c12ff373" sha1="a5e03ba0e8af3d390ec695cf6e9e1dde8e66b4c9"/>
+ <rom name="Eye of the Beholder (USA) (Track 12).bin" size="20744640" crc="5f2e7769" md5="da1e4ebe523f242adc99b27029c18bbf" sha1="b6dfe6f58af43f00cad4e0829e5ee7ece6b23ee8"/>
+ <rom name="Eye of the Beholder (USA) (Track 13).bin" size="1542912" crc="688b42ee" md5="51fc512ec2a367ff2d07529279fd1bba" sha1="d236e4fc7c13ae09b97f3bb3e88d7aa7342b1b2e"/>
+ <rom name="Eye of the Beholder (USA) (Track 14).bin" size="5567184" crc="e33f10bb" md5="a428cb478037240bf284909db9a0ef98" sha1="fd89897a2986ef31a5d25e6638a47a0aa7bc1a99"/>
+ <rom name="Eye of the Beholder (USA) (Track 15).bin" size="3779664" crc="abf9f8d3" md5="92483bcc0481fde6f9547df712d8cf60" sha1="16526e4ee15b9437cee684475a0bb58755cf4b0d"/>
+ <rom name="Eye of the Beholder (USA) (Track 16).bin" size="1759296" crc="0dbf91b4" md5="d551d092aaf8c5c9462960f03195bc45" sha1="3b02ca30a7f6c78e7f0eb7a6d548a2fc8ef9e631"/>
+ <rom name="Eye of the Beholder (USA) (Track 17).bin" size="3469200" crc="a0cd4f1e" md5="2448e57781b1a4f1678141eed048727a" sha1="f2ea5dcc548ca6a47afc37f82f0a124e430a2aca"/>
+ <rom name="Eye of the Beholder (USA) (Track 18).bin" size="23449440" crc="028eb551" md5="27065080e73100d30f745ee56d23406a" sha1="07c0f3d48d042d808cbb7042f53b2c712805d4ff"/>
+ <rom name="Eye of the Beholder (USA) (Track 19).bin" size="1756944" crc="8c0c140b" md5="5ba3cb447cc8a26f5c9aa6b6ac590e41" sha1="3333690400bcac61a863e20d5a150b1fa9d5fa30"/>
+ <rom name="Eye of the Beholder (USA) (Track 20).bin" size="11825856" crc="b8673b4b" md5="6f1a43fdfdfefd53e1223c9d9a948122" sha1="26b14faa418c1dd1308ed1e945dcdc426c6d0a2a"/>
+ <rom name="Eye of the Beholder (USA) (Track 21).bin" size="2048592" crc="1a2ea9f0" md5="75c86762f776e3b80d7fa5acd4b30316" sha1="819fbd3b796b4521b7801605d43741f1970ba5af"/>
+ <rom name="Eye of the Beholder (USA) (Track 22).bin" size="1733424" crc="16b9ccc6" md5="619e235f80968f5c74bd63405a43b1de" sha1="dd1f295ceab8e529b9a93f9a4e5231c3f154a273"/>
+ <rom name="Eye of the Beholder (USA) (Track 23).bin" size="4638144" crc="11f207fa" md5="4cd36909672693f4a5f8d60451353280" sha1="6365eb731447cbbe6b02f29a68e8c00c92a13c6c"/>
+ <rom name="Eye of the Beholder (USA) (Track 24).bin" size="1907472" crc="0551a25d" md5="87f2f6f6167fb07af68582d03c042495" sha1="eaa9eef7a852c8c780a968d1a0992223548e7961"/>
+ <rom name="Eye of the Beholder (USA) (Track 25).bin" size="1430016" crc="06d656cc" md5="b620699b2e93d4ad9eb99a23f8965d4e" sha1="29c2ce41d8cd243ed8f2d66f939039f1437f5ee7"/>
+ <rom name="Eye of the Beholder (USA) (Track 26).bin" size="2410800" crc="795a9039" md5="aedb6d00048cad7e4a27204c02ee1dc8" sha1="1f8b5167b4449e1412e27604039a20525dbff29f"/>
+ <rom name="Eye of the Beholder (USA) (Track 27).bin" size="8817648" crc="6fbbb918" md5="924bdd296b4a3946da8ad3623a38dc76" sha1="a83ae9ec4566534c7d5c02bbc6bfc33e666d23f4"/>
+ <rom name="Eye of the Beholder (USA) (Track 28).bin" size="25606224" crc="6469c61d" md5="707b683ca11c26af0c6a5adf76101743" sha1="5f4c2c1d11a13979c5baa26a4d6c1d292b18365e"/>
+ <rom name="Eye of the Beholder (USA) (Track 29).bin" size="1401792" crc="c2010f5c" md5="b3ebc390302368ee74e73e32d1492fdd" sha1="2d41247f86154bb4a4109fd47de748b880aeb812"/>
+ <rom name="Eye of the Beholder (USA) (Track 30).bin" size="1404144" crc="894e293f" md5="d4f3e2b00b5c3be3505671543f5d46b5" sha1="8b7db4c4c5262db3af34c837f908bcdd40d5ece8"/>
+ <rom name="Eye of the Beholder (USA) (Track 31).bin" size="2227344" crc="670a8c86" md5="1ece8e39430074e8b44bfc5c55cae4f4" sha1="d10486eb055a79aa8ebb1196b9c2b220d47b06ec"/>
+ <rom name="Eye of the Beholder (USA) (Track 32).bin" size="1382976" crc="abbf62c7" md5="683be1384b01384df55a7b57f99b6081" sha1="bdb83d18c708c636d2b7929ab868713f54ae7196"/>
+ <rom name="Eye of the Beholder (USA) (Track 33).bin" size="2702448" crc="bc4cc788" md5="1f75903c6498ed38d89623b4c15e7626" sha1="a745af1d3789d5de6053f1f9dade0022480cd7c7"/>
+ <rom name="Eye of the Beholder (USA) (Track 34).bin" size="10974432" crc="c2cb8c7c" md5="387093fff1a1ac2f636dff40e2154c4a" sha1="8c458b976f25b1aab0e38f587d531118fa222dfb"/>
+ <rom name="Eye of the Beholder (USA) (Track 35).bin" size="1665216" crc="aa83dfee" md5="0491fdb9e34ca6457683a84d45df186c" sha1="b463ba2be1f158f9ac6de06fecaddd45b0372515"/>
+ <rom name="Eye of the Beholder (USA) (Track 36).bin" size="4254768" crc="cbc8a39b" md5="990ef62138497f63a6bc619ef01f7a13" sha1="16c71fc6374e00bb08f82d534f43b4d35d68e9c7"/>
+ <rom name="Eye of the Beholder (USA) (Track 37).bin" size="1618176" crc="6e8a3743" md5="488b4d1d52a2bb562c92f6f0922b4e10" sha1="2af4bfd382e754b93926ab7ae913f570a0a6c992"/>
+ <rom name="Eye of the Beholder (USA) (Track 38).bin" size="3419808" crc="0773e326" md5="d8c6a8e8fdd8378246845e43c2437a91" sha1="23d491118955cd1ce3f1676d6adbab22c95b0851"/>
+ <rom name="Eye of the Beholder (USA) (Track 39).bin" size="2754192" crc="4a90a681" md5="d1561e2ede75ba87c3ef4fb63e874ff7" sha1="267d403b83f07791f6176b11cbec04ed73776438"/>
+ <rom name="Eye of the Beholder (USA) (Track 40).bin" size="6293952" crc="0fbf2d1f" md5="98eecdbce9a6e9e90f896b1a896f7884" sha1="1b71aa70c07fa8ab77e1e77f93b256c3af7b4cad"/>
+ <rom name="Eye of the Beholder (USA) (Track 41).bin" size="1681680" crc="76e52b7c" md5="8623d4f71a7ac3521601c8ee7d5fa493" sha1="cf485638dd1757c97e1bf4c42a888f4211e721f7"/>
+ <rom name="Eye of the Beholder (USA) (Track 42).bin" size="4014864" crc="2755511c" md5="43933a869ffbbb88372f661d4582bada" sha1="b807336a895cebe2e0c99731f37465cfae7ebc47"/>
+ <rom name="Eye of the Beholder (USA) (Track 43).bin" size="1411200" crc="376f5fde" md5="8bee92cf0e24d92212eff0f03036717b" sha1="c32ec088a93cc0f44a3cebc4407c7383d6afd78e"/>
+ <rom name="Eye of the Beholder (USA) (Track 44).bin" size="4901568" crc="dd2cbac7" md5="8cc5a576d6453e0a59cf77b2d842ba75" sha1="37e18dc44fcff75fcccd34e85b2775cf0f45166d"/>
+ <rom name="Eye of the Beholder (USA) (Track 45).bin" size="6070512" crc="20ae93ca" md5="d499986618cb0d11380848894045c58c" sha1="2a4c23f6ba07a5f6be179942a795a5f579e8f60e"/>
+ <rom name="Eye of the Beholder (USA) (Track 46).bin" size="3803184" crc="ea055b0c" md5="98fdc05bbc5f626b9afd74784836f350" sha1="344715f781b36ced08bc2acb6ee73da14598bc72"/>
+ <rom name="Eye of the Beholder (USA) (Track 47).bin" size="5553072" crc="08e8918a" md5="27e1fcbfec95644066ac70c01a9bbe39" sha1="fa4cb3fbaf796b7bfe3aee9dc898dc20d19f3d8d"/>
+ <rom name="Eye of the Beholder (USA) (Track 48).bin" size="4179504" crc="eb35a534" md5="ede65b8584354f5ec43e8eec39f4757b" sha1="e90f54e9e3d359e57741ecf3d4c16d0b9ff88cb2"/>
+ <rom name="Eye of the Beholder (USA) (Track 49).bin" size="2013312" crc="8ac229d3" md5="0df0c0133b6e28f85532f9e9337b299e" sha1="a5b4ffee672d3b7234eac9386ee0a7964015039b"/>
+ <rom name="Eye of the Beholder (USA) (Track 50).bin" size="5433120" crc="dcf15770" md5="ffe508690bcab9570e57b6eef581b971" sha1="3abf91156a69ad88ac777a4aa767c2c045a56132"/>
+ <rom name="Eye of the Beholder (USA) (Track 51).bin" size="5393136" crc="1b178986" md5="5af4c7ed81a79e1a8c02230a04a3a89b" sha1="0295a38dabc7847de302921aaed8e0af9fcfa066"/>
+ <rom name="Eye of the Beholder (USA) (Track 52).bin" size="2493120" crc="f733a8fe" md5="15e77b53163d03b8f3c57f009f2dfb21" sha1="78f0b3d327e44e5c573cf9cda124557deeca7d5e"/>
+ <rom name="Eye of the Beholder (USA) (Track 53).bin" size="5176752" crc="29dd6cfa" md5="34b67bf33c2de2018012f985c0cb9d8e" sha1="45d08e2b3ca10d838c85f84b4185978291621279"/>
+ <rom name="Eye of the Beholder (USA) (Track 54).bin" size="1582896" crc="a2f3fc8f" md5="baf18f740bf1b7de7b50d7f28824dcdb" sha1="766c4155db1b3b013316ce28feb7452db6ad3e3a"/>
+ <rom name="Eye of the Beholder (USA) (Track 55).bin" size="3069360" crc="541c162a" md5="bb7beb8580e02dd765f266042e545789" sha1="b5475270594903386974caa39545636feada7585"/>
+ <rom name="Eye of the Beholder (USA) (Track 56).bin" size="3981936" crc="612dbb21" md5="c6eba00a2b1da773d5ab6c3c94497829" sha1="a0dfce2a6cafda5a3f76ded7e1f5bb88350f235a"/>
+ -->
+ <description>Eye of the Beholder (USA)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="alt_title" value="Advanced Dungeons &amp; Dragons - Eye of the Beholder (Box)"/>
+ <info name="serial" value="4655"/>
+ <info name="ring_code" value="CDAC-070100 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="eye of the beholder (usa)" sha1="8901e20ec6cb1cc8b8771b7bdac01d3220a067f5"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This game came in a bundle with both a Sega CD compatible disc and one which takes advantage of the 32X expansion. -->
+ <software name="fahrenhe">
+ <!-- Source: redump.org - http://redump.org/disc/29440/ http://redump.org/disc/29441/
+ <rom name="Fahrenheit (USA) (Disc 1) (Key Disc) (Sega CD).cue" size="262" crc="8982108b" md5="0b0a464fd029c7df830ad19ed1bfe099" sha1="825a83edb4966e0d9beaafc2d94233a2a0bc30f0"/>
+ <rom name="Fahrenheit (USA) (Disc 1) (Key Disc) (Sega CD) (Track 1).bin" size="593710656" crc="e22ff784" md5="f96fdb4fc2f8a6308c46d8af793d5c21" sha1="436141455a4726ce065d37db8e39f540c303de0a"/>
+ <rom name="Fahrenheit (USA) (Disc 1) (Key Disc) (Sega CD) (Track 2).bin" size="2227344" crc="2e31f14c" md5="a49444c570f9695bea3164d9c1005298" sha1="edfec8a88ae4dee5dc160cd6dfa3a00918f6800a"/>
+
+ <rom name="Fahrenheit (USA) (Disc 2) (Insert Key Disc 1 First) (32X CD).cue" size="290" crc="544debe8" md5="eee26c821c392a079d188951ef6a2ca5" sha1="76e2e5d3b1e78ba4c2e9d663655ff4a1455e5bd2"/>
+ <rom name="Fahrenheit (USA) (Disc 2) (Insert Key Disc 1 First) (32X CD) (Track 1).bin" size="593710656" crc="a307b12e" md5="48d606ad370b245f9ba58226ad286f9c" sha1="ac5ec9bea68f307dd3426a296ae54340c62808cb"/>
+ <rom name="Fahrenheit (USA) (Disc 2) (Insert Key Disc 1 First) (32X CD) (Track 2).bin" size="2227344" crc="2e31f14c" md5="a49444c570f9695bea3164d9c1005298" sha1="edfec8a88ae4dee5dc160cd6dfa3a00918f6800a"/>
+ -->
+ <description>Fahrenheit (USA, Sega CD &amp; 32X CD)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="199503xx" />
+ <info name="serial" value="4438"/>
+ <info name="ring_code" value="CDAC-088300 1 (Disc 1) / CDAC-088400 1 (Disc 2)"/>
+ <part name="cdrom1" interface="scd_cdrom">
+ <feature name="part_id" value="Sega CD / Disc 1 - Key Disc" />
+ <diskarea name="cdrom">
+ <disk name="fahrenheit (usa) (sega cd)" sha1="c53080012578fe291323197e6319842beb84ee9b"/>
+ </diskarea>
+ </part>
+ <part name="cdrom2" interface="scd_cdrom">
+ <feature name="part_id" value="32X CD / Disc 2 - Insert Key Disc 1 First" />
+ <diskarea name="cdrom">
+ <disk name="fahrenheit (usa) (32x cd)" sha1="f94ea9821ca030c3cc61eccc29eb9c692198415e"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="fifa">
+ <!-- Source: redump.org - http://redump.org/disc/19818/
+ <rom name="FIFA International Soccer (USA).cue" size="5755" crc="bf8a281e" md5="7859520ce8ae3116c0826f644dd39ea8" sha1="d31d832f1c8aaa65701688384409d7d0616eece6"/>
+ <rom name="FIFA International Soccer (USA) (Track 01).bin" size="262838352" crc="15819d3d" md5="b05d1c1160fa46f305f2b07959c631c8" sha1="6da4751d5370494a6e4574e6978c7c438fc2aa97"/>
+ <rom name="FIFA International Soccer (USA) (Track 02).bin" size="23804592" crc="e16818d1" md5="2c7339ed3923b023610fc5e4382b0032" sha1="430b188029f5f57300ff8d9c44c60ded9178005d"/>
+ <rom name="FIFA International Soccer (USA) (Track 03).bin" size="24801840" crc="5cb75f4e" md5="0f5d36f08a4cd57c7b666017b7149f61" sha1="f9bac760e56f55e8810df10af0bd1b392f695504"/>
+ <rom name="FIFA International Soccer (USA) (Track 04).bin" size="24481968" crc="f8789cef" md5="84e9e470ff067b1e27c6e9fdaabbe148" sha1="e65ed00c8c83828cc9cadbe5d024cf2ecd4c9db4"/>
+ <rom name="FIFA International Soccer (USA) (Track 05).bin" size="16607472" crc="c039642e" md5="f3c394028040a89a772690c2b003d273" sha1="e2ff110f2908b2d8da64a1729bb95661261ce9dc"/>
+ <rom name="FIFA International Soccer (USA) (Track 06).bin" size="10943856" crc="219d16d2" md5="01738554039597eaace255d1e6735d27" sha1="f25317c71ea8756bcf7246ca37741b768fadd20e"/>
+ <rom name="FIFA International Soccer (USA) (Track 07).bin" size="10941504" crc="35497a15" md5="068c513be9d24537ecf5215495e32e0e" sha1="4af88a0f91c4a8c0b55cd2d17dc7d5141ba4390f"/>
+ <rom name="FIFA International Soccer (USA) (Track 08).bin" size="10941504" crc="6a60ff3e" md5="107f63ab45595e692f599c1c3229f7c0" sha1="15778ba1bfd5bb05e17219b3b36a83d1c8a848e5"/>
+ <rom name="FIFA International Soccer (USA) (Track 09).bin" size="10943856" crc="1930cb21" md5="5ab2f2f1659003f6b71955b06ab53f47" sha1="16159d81f2ec77ef67df9b46d534e7e4e86ef94b"/>
+ <rom name="FIFA International Soccer (USA) (Track 10).bin" size="10941504" crc="4f73b392" md5="a09867d052f0dd5a577f3761360f388f" sha1="43c6e07b100444e5ddee6287006e4226cd7a30f7"/>
+ <rom name="FIFA International Soccer (USA) (Track 11).bin" size="10941504" crc="b522fff5" md5="e19251af0104b11e3349e7569daa0e62" sha1="4d5f89713ee8b8a5d7f0bd39b75cee0b90cc73c9"/>
+ <rom name="FIFA International Soccer (USA) (Track 12).bin" size="4334736" crc="8f7c1427" md5="664796c37bd8a49b15935e80d1aed16d" sha1="59f482af9f8476ef7ca9cf7fb394028267989b27"/>
+ <rom name="FIFA International Soccer (USA) (Track 13).bin" size="2455488" crc="cd4897c3" md5="cdbafb2acd658f3b8de5a177cae64256" sha1="ee77d20aa38c851ce44788c032f053528a6ea33e"/>
+ <rom name="FIFA International Soccer (USA) (Track 14).bin" size="2022720" crc="c7f1021b" md5="8ab5719ff1e3574abab906ed20c0f733" sha1="eb8fe17efb6a9fef04afd107ef5aeadbaad2aa96"/>
+ <rom name="FIFA International Soccer (USA) (Track 15).bin" size="4769856" crc="bedd997c" md5="cbce0f97eafd458e33e4a0e3241d8c8b" sha1="9a9a2a928f56fe36328f51494f975d72ef202ed8"/>
+ <rom name="FIFA International Soccer (USA) (Track 16).bin" size="4769856" crc="12424d07" md5="37d9af48de1a79063a6fe7e7dcf80050" sha1="ede96ed2126cfe3cac9f16391009545568bc7b14"/>
+ <rom name="FIFA International Soccer (USA) (Track 17).bin" size="4769856" crc="b2615adc" md5="a6a967c328360c203bc4f5f8262f472b" sha1="d5448ae1f5a30679cfb8379094b11558b01dc2c2"/>
+ <rom name="FIFA International Soccer (USA) (Track 18).bin" size="4769856" crc="522999ce" md5="24c3d375c651b29168131d734ae02526" sha1="642e1f784b6fd3136d2b6a8d28f406c4fe17c95a"/>
+ <rom name="FIFA International Soccer (USA) (Track 19).bin" size="4769856" crc="06088173" md5="43e5b3726943952e890e0339186227f8" sha1="6f63e4f7bc96cb83ee67c82f31b04d53b202db0a"/>
+ <rom name="FIFA International Soccer (USA) (Track 20).bin" size="4769856" crc="106489bb" md5="69bea799f947adf4180474f0d9705293" sha1="5047d2697e536af9c539c6e752af8a3eafa57576"/>
+ <rom name="FIFA International Soccer (USA) (Track 21).bin" size="4769856" crc="c96c8962" md5="f99f36ad795ab9a7becd28c64f0b3be6" sha1="85915b0554d0be7d19aa90f6c5b487f05c02b009"/>
+ <rom name="FIFA International Soccer (USA) (Track 22).bin" size="4769856" crc="59fa2790" md5="96727c19ae8029180b5c2b94a9052f1b" sha1="6f611597f2f725684a27b554ea5fc06713986907"/>
+ <rom name="FIFA International Soccer (USA) (Track 23).bin" size="4769856" crc="d03ea5be" md5="f0726c578d86f1248e6723b83382c58f" sha1="46f9ec34e7a2e00456c2b5f252a97cd94b9eb237"/>
+ <rom name="FIFA International Soccer (USA) (Track 24).bin" size="4769856" crc="4d4cd778" md5="83895a84312db99a7584ff8fbb24269b" sha1="770510e90be90fc91d0d22ad4509299611a0e241"/>
+ <rom name="FIFA International Soccer (USA) (Track 25).bin" size="4769856" crc="9c9f9e8c" md5="b97c9189032c725ba2f3b1101bd60c77" sha1="392ea1bbf1aedcde7cec9bf1339f59a46d8daf84"/>
+ <rom name="FIFA International Soccer (USA) (Track 26).bin" size="4769856" crc="bf416b49" md5="ea9622fc7d59c09fe823337b2d1a9a83" sha1="cc4ab2db256fb34e0544f2ffcaf2ab2859f81c69"/>
+ <rom name="FIFA International Soccer (USA) (Track 27).bin" size="4769856" crc="4647f802" md5="ba75088dc9918b9d8e35c0baa582cd2e" sha1="870ba6b916f713a2f8c4a1f411533a5d1f1cd690"/>
+ <rom name="FIFA International Soccer (USA) (Track 28).bin" size="4769856" crc="8724fa9e" md5="1c2782e2818ccdbf74bd961d1ed6cc72" sha1="ece446f030176282f9e48cbca696a49d1ba49e47"/>
+ <rom name="FIFA International Soccer (USA) (Track 29).bin" size="4769856" crc="a279bd59" md5="4c39f9d6c6b8f342c36fe9c751b5df7c" sha1="ba109f86addf533c26a09fe4120d2abb90d4b414"/>
+ <rom name="FIFA International Soccer (USA) (Track 30).bin" size="4769856" crc="04b10214" md5="54c3f9d6495b23109208903fdbfb8b30" sha1="ed5696ebe5a3824040a89eb23532a55a73210598"/>
+ <rom name="FIFA International Soccer (USA) (Track 31).bin" size="5122656" crc="29fa4a49" md5="083e08d55a84c7281ac0f28dd35878be" sha1="606b918fc178663f6b94d22cebe4b55ca2850af1"/>
+ <rom name="FIFA International Soccer (USA) (Track 32).bin" size="4417056" crc="5b9776b1" md5="28e9b725b0386b5c8b594a8d6814f967" sha1="d3543c1740ff09cbc94b9fad05b0663274003be4"/>
+ <rom name="FIFA International Soccer (USA) (Track 33).bin" size="4769856" crc="3438f1f5" md5="947a302237e54069bb26b74a0142b567" sha1="1418b506b4491a33d80eb1e261e601fe4ccbfc20"/>
+ <rom name="FIFA International Soccer (USA) (Track 34).bin" size="4769856" crc="032b9d69" md5="1ba0e909360eba696da50045b0feb425" sha1="3aa14a2e472a9e1a25cbc69875f431e2432f7d5e"/>
+ <rom name="FIFA International Soccer (USA) (Track 35).bin" size="4769856" crc="9a4da640" md5="483c9911841fdbc6405e4f2c3e11e07a" sha1="62a8907a73d26febd0b271c6d635772337457ba1"/>
+ <rom name="FIFA International Soccer (USA) (Track 36).bin" size="4769856" crc="10bf9646" md5="bc2225789af5f42415d184849ec16bc5" sha1="e201f929de06b587482fe95d0e696d4dc8230de1"/>
+ <rom name="FIFA International Soccer (USA) (Track 37).bin" size="4769856" crc="5a1f7a9f" md5="7ddbf72f433c7f4f29f87c504ef3d5b5" sha1="83932e1e320da34517032caac9b608beac78f749"/>
+ <rom name="FIFA International Soccer (USA) (Track 38).bin" size="4769856" crc="e3171a0b" md5="dcbe0c9433b24ef0cfdd048d9e04e48c" sha1="b2d2fd3869b298469c348e6f37579daecbc09ff7"/>
+ <rom name="FIFA International Soccer (USA) (Track 39).bin" size="4769856" crc="192b8380" md5="d9e25b0c6f9f538ee9413e234f1495de" sha1="bc1aa787bbd9d37e27868f33d345e8b9ac28383c"/>
+ <rom name="FIFA International Soccer (USA) (Track 40).bin" size="4769856" crc="2257b94f" md5="03f113c350e8035c7b0aefcc3fddca35" sha1="165ce51468109b88661e491358b3b6e04ee0b68d"/>
+ <rom name="FIFA International Soccer (USA) (Track 41).bin" size="4769856" crc="72445c0f" md5="e8b50aa92014cf2e40311d13c753685b" sha1="56fc4967afa78a0b16eb22edb3ad838903ebded1"/>
+ <rom name="FIFA International Soccer (USA) (Track 42).bin" size="4769856" crc="e8d47a1a" md5="40c863fcbc5f90623dee2a91cac67f14" sha1="142d7b47d613ded1ef021d08261e285b4ad1191b"/>
+ <rom name="FIFA International Soccer (USA) (Track 43).bin" size="4769856" crc="efc78d44" md5="b6bc11176603d45529e52b1f77c7be81" sha1="8ae94897d9eb9c3f5ef7e21bf43e4f68d80981f1"/>
+ <rom name="FIFA International Soccer (USA) (Track 44).bin" size="4588752" crc="8cc70f6d" md5="1a04a988b822b0ef95aec7eb718bc26d" sha1="677249be762bc625e452813198e1a94c93bd8a1a"/>
+ <rom name="FIFA International Soccer (USA) (Track 45).bin" size="4769856" crc="3f0e48fd" md5="0b4781d7b5703b454ac35ca9c8c230c1" sha1="232a0faddcdaa76132971dd2277428e447206012"/>
+ <rom name="FIFA International Soccer (USA) (Track 46).bin" size="2152080" crc="7e62387b" md5="378055c8508e5b748b79fd3a1e503ddd" sha1="6b64d33822db444d88912d3a1e38f0f4397a85cc"/>
+ -->
+ <description>FIFA International Soccer (USA)</description>
+ <year>1994</year>
+ <publisher>Electronic Arts</publisher>
+ <info name="serial" value="T-50055"/>
+ <info name="ring_code" value="CDAC-064000(9)1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="fifa international soccer (usa)" sha1="3e32c3d5e99f5df103277aed209a59f888c06bec"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="ffightcd">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/1939/
<rom name="Final Fight CD (USA).cue" size="2972" crc="733dfce2" />
<rom name="Final Fight CD (USA) (Track 01).bin" size="28209888" crc="9c4fda3e" />
<rom name="Final Fight CD (USA) (Track 02).bin" size="22913184" crc="20952172" />
@@ -536,6 +1283,7 @@
<year>1993</year>
<publisher>Sega</publisher>
<info name="serial" value="4410"/>
+ <info name="release" value="199305xx" />
<info name="ring_code" value="CDAC-041400 6, CDAC-041400 4"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -544,40 +1292,91 @@
</part>
</software>
+ <software name="f1btl">
+ <!-- Source: redump.org - http://redump.org/disc/28602/
+ <rom name="Formula One World Championship - Beyond the Limit (USA).cue" size="5532" crc="6d432c22" md5="b2d646317424a3565d0c4885e537bbef" sha1="f95e57462255586077cac8af8a2a5b5002f9542c"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 01).bin" size="202721232" crc="78015fa5" md5="a4b377d4057b97b568c67d7f84b0218c" sha1="2b994690658927b962bcafba9732abc246175a93"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 02).bin" size="16155888" crc="01285dec" md5="4d16f2bdd793144d9d2284b46c2449f1" sha1="3fe9df75adb55092ef111e1404085ae8ce27cf54"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 03).bin" size="19707408" crc="f297470a" md5="d7266aef09433f5d7bec4c2e515bee38" sha1="59e05f1b0cd95d8924f0134aa1e250b058ed8a8f"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 04).bin" size="16753296" crc="a8d3186b" md5="0165871f057627a3bbe54297d0aa9750" sha1="ba99e9414242611faf3b4d3056f1ca41702dc94c"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 05).bin" size="11658864" crc="294ef571" md5="35fc2749bd884863128d13fac93a719e" sha1="921cb70a7f929307bd075a183eafd8961a08126c"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 06).bin" size="11228448" crc="e8f8872f" md5="34abc12e4cb958630615a7aa253c73f0" sha1="67808fd5a6eefa6b995106ccddc4433498b386b6"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 07).bin" size="17433024" crc="076c7f8f" md5="d30114f7ccaacaca38f896222fa0c346" sha1="f45e580eb1cc9ff89f922705d90a044d53e21695"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 08).bin" size="12324480" crc="a17a7bce" md5="e78a40a80f70f66f263f2d27949d0535" sha1="f6d150a2fc9cd45c7cb7d430b8d17b6f5626ead3"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 09).bin" size="15462048" crc="5eaf40c9" md5="5767368a370fcc92ce515abbf44f8391" sha1="60a32155a57868430f64afb3b519a5be73814ab3"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 10).bin" size="26107200" crc="855a3ee3" md5="252fa2d5f4aab25a7a885f28b86dd83a" sha1="7f2d125d66d2f9e5970a768d70f9e245a7924769"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 11).bin" size="11529504" crc="a71547b1" md5="16b360e9bffedbb216ce68f67113ecb4" sha1="ad11dcaccbbef2f86f6e05d8df9b414896a6e8bc"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 12).bin" size="15377376" crc="fd5a7e84" md5="48b53ef6336b3ebd10373feb8a5dfbfa" sha1="83c27f30ea15b0c3860467dcf8a483022618d350"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 13).bin" size="21337344" crc="1bbaa3e2" md5="c117ddcef81e6ad69fb600fbbe3d4525" sha1="440622219f5f1db371f77be58c6ae08e70eaf41a"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 14).bin" size="2996448" crc="93cb1e7d" md5="a09351c3b94d7dbca764bb3d2fd1526a" sha1="4f7125f5b396cf8e34d58e3016189bd992345826"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 15).bin" size="2493120" crc="dac3583d" md5="ecf45cb4dec6a1d03990cdc7d3e3b0b2" sha1="27a4a4a62e056dd8a43ccda650144feb5fc81f95"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 16).bin" size="7168896" crc="c1c9c78a" md5="ca712aa457d4817144223f31c133d28b" sha1="440ba22fd667db3fc200db73561386832cf64998"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 17).bin" size="3706752" crc="1c56ab5b" md5="df46280dbdf86c8a8b07482888b99fcd" sha1="7626636b16f965913e00acb84650e78092509ab5"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 18).bin" size="2911776" crc="7e18f939" md5="7985f2b4ead23345021cd05667c2e979" sha1="e6c1b73eeb47d8c4a03e6705eb663aee68e41a84"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 19).bin" size="1117200" crc="f6fa8bc2" md5="281c0cbb8a12181186ab92dd445099b6" sha1="805ded69736c93ca830eb013eb0ed0be766b5817"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 20).bin" size="13117104" crc="d87ac8de" md5="4a7af20a35f0f4dabb25e05b28528c58" sha1="af5c5860cbe8dcf1cd146d4daaba200dd14eb2b2"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 21).bin" size="11894064" crc="83f49130" md5="4a6f350143a51db5cd4f77bce2581b81" sha1="03957a57a9fcc81a7aeffbcc9a6f4ae003a1430f"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 22).bin" size="11529504" crc="2eedebdb" md5="443cfa519a55f5cb1f1d323f05f270ad" sha1="2f5e9b8363268bbeb6345d091453f219a8133e3e"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 23).bin" size="11828208" crc="6c12ae01" md5="acaa80696d7385fb24e87dcf124491b4" sha1="4a577ae10dfe2adeeec862bb3f66bd7d4d4dc831"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 24).bin" size="12766656" crc="65707ebf" md5="cf5e0a726d9d3b55d9769fa135c101ec" sha1="43e1ceae468e37d0be377f111dd93838a5153de3"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 25).bin" size="15803088" crc="470517da" md5="1d4a48764b18a81908ef8754e29aa154" sha1="0972b245e6f3552f16b9192455cb31987cf5f11e"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 26).bin" size="10826256" crc="6f517e85" md5="c230f97ed8bf6c91969d9e91f9961c5b" sha1="c9ec6f02c1c1390f20f6f0033b3ad58bb7fd090b"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 27).bin" size="9840768" crc="cd8ea939" md5="bab12794a9bcb45fcb86c702968d6c81" sha1="64f0f2474fcea84b3a5e311e1b9f2d8cd51cdcad"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 28).bin" size="10466400" crc="53c75d53" md5="9a4dba1efd6e9a5a619e65a970c95c9d" sha1="1bb5f1360e79420c92d587e1dd463726d18861ac"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 29).bin" size="11625936" crc="d35e971f" md5="fd8a8141215f169b3a799bf6a2f19afb" sha1="7c3653966fde367ef7a5c8292e284fb31afee77d"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 30).bin" size="11668272" crc="667c45e5" md5="7b65695152d793690f4f56cb9f056bfb" sha1="30294d9d98974786b20317ff73ccfc0387d85a95"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 31).bin" size="14119056" crc="0250e3bf" md5="add56aa5ba27c449a3302c809ba64336" sha1="a019184569ebddaeaa2745d84d9aa97f455f584e"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 32).bin" size="14062608" crc="688663a2" md5="86c6ad19bbef248e7682a98b9c9fbdf1" sha1="3c1a0802a8b4939e7cd940dac1ef28dfb8e68887"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 33).bin" size="12470304" crc="abc75745" md5="6f6f9bba78cf73818ee940e9af14caa5" sha1="08d9dbea5fd675d3210b80557d34d25bd22701e4"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 34).bin" size="11614176" crc="2ae1d92c" md5="a7fe6201c1649a3cf382bd052856c7c5" sha1="1c0cee2e1c8fdefb5dc0a1c1b924a08ecbf9f6cc"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 35).bin" size="16207632" crc="30177df0" md5="f7a4a0c005200d221b3b27bb12182ce0" sha1="f7707aa70f02e7d4037e593233b2626d387e84bc"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 36).bin" size="15271536" crc="41e6545b" md5="35aaddea9531c0d8babc9962f3523ba6" sha1="81b3c1aaf5a71596bec360fda33d33f4f236add4"/>
+ <rom name="Formula One World Championship - Beyond the Limit (USA) (Track 37).bin" size="43269744" crc="004c2d09" md5="44ba3b056ca15cbf0daf424754c3cfcf" sha1="db96d8487f58a4943762e69e0bab4987bbc168fb"/>
+ -->
+ <description>Formula One World Championship - Beyond the Limit (USA)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4608"/>
+ <info name="ring_code" value="CDAC-063600 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="formula one world championship - beyond the limit (usa)" sha1="da0c0fd84af458744d6b045c3fb44b5ac5f89152"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="gztexas">
- <!-- source toseciso (disc 1) + redump.org (disc 2)
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)[!].cue" size="329" crc="b82ac042" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="548009984" crc="e397fe2d" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="2587244" crc="fa7da217" />
+ <!-- Source: redump.org - http://redump.org/disc/19472/ http://redump.org/disc/19473/
+ <rom name="Ground Zero Texas (USA) (Disc 1).cue" size="257" crc="d0c584c7" md5="113dd7490af1f86d08f70448d443ed93" sha1="2041c4c954bb0b19ede6dbef1190836c9f2c72b7"/>
+ <rom name="Ground Zero Texas (USA) (Disc 1) (Track 1).bin" size="629355216" crc="20b937a8" md5="27eac38ea6f5deee11367f0062f55608" sha1="d151430da0d6e25af45ecd0a9133dea9a1d1d285"/>
+ <rom name="Ground Zero Texas (USA) (Disc 1) (Track 2).bin" size="2940000" crc="75562ed6" md5="06c826b8fd0391297b5e73f40d22bd8f" sha1="32007bb0f5eec3dfcd9d56f70f3e0dc78570f5e3"/>
- <rom name="Ground Zero Texas (USA) (Disc 2).cue" size="234" crc="870cbef1" />
- <rom name="Ground Zero Texas (USA) (Disc 2) (Track 1).bin" size="599743536" crc="455bacbf" />
- <rom name="Ground Zero Texas (USA) (Disc 2) (Track 2).bin" size="2587200" crc="4135fb4a" />
+ <rom name="Ground Zero Texas (USA) (Disc 2).cue" size="257" crc="67c4ee28" md5="cd2402ce5cf06aed8bebd05837185fe2" sha1="055ff36efb360b9189542402e06da4181640d687"/>
+ <rom name="Ground Zero Texas (USA) (Disc 2) (Track 1).bin" size="599743536" crc="455bacbf" md5="f59e2dbadd6ff65c67344d598ae71dc2" sha1="2bb503b604403528f7971bc23cb48ca790e80c3e"/>
+ <rom name="Ground Zero Texas (USA) (Disc 2) (Track 2).bin" size="2587200" crc="859de48a" md5="9ede10575e108115d7979b48261a1e59" sha1="04b8169c0e2afe39d237fbe39b65ac95d6190b96"/>
-->
<description>Ground Zero Texas (USA)</description>
<year>1993</year>
<publisher>Sony Imagesoft</publisher>
- <info name="ring_code" value="005320-CDAC (Disc 2)"/>
+ <info name="ring_code" value="CDAC-053200 2, CDAC-053200 4 (Disc 1) / CDAC-053300 1 (Disc 2)"/>
<info name="serial" value="T-93145"/>
-
- <!-- Note, this is the TOSEC dump, the Redump set had no Disc 1-->
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom">
- <disk name="ground zero texas (1993)(sony imagesoft)(ntsc)(us)(disc 1 of 2)[!]" sha1="cb019a26b3edec7a8f0119d74a0991aa5b258313"/>
+ <disk name="ground zero texas (usa) (disc 1)" sha1="226bef5c19446c6be18674941707b3baebc11223"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom">
- <disk name="ground zero texas (usa) (disc 2)" sha1="84d79bb8cfc7f30809f7b31e794227b449a40037"/>
+ <disk name="ground zero texas (usa) (disc 2)" sha1="13c7cc77f2659155dec4deb4700d8ac8af95fb42"/>
</diskarea>
</part>
</software>
<software name="hota">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17253/
<rom name="Heart of the Alien - Out of this World Parts I and II (USA) (RE).cue" size="6660" crc="66491c3a" />
<rom name="Heart of the Alien - Out of this World Parts I and II (USA) (RE) (Track 01).bin" size="12070464" crc="c524515e" />
<rom name="Heart of the Alien - Out of this World Parts I and II (USA) (RE) (Track 02).bin" size="2817696" crc="6dd9c780" />
@@ -622,20 +1421,97 @@
<rom name="Heart of the Alien - Out of this World Parts I and II (USA) (RE) (Track 41).bin" size="4438224" crc="0be1dc4e" />
<rom name="Heart of the Alien - Out of this World Parts I and II (USA) (RE) (Track 42).bin" size="1088976" crc="8e5ef7ce" />
-->
- <description>Heart of the Alien - Out of this World Parts I and II (USA, RE)</description>
+ <description>Heart of the Alien - Out of this World Parts I and II (USA)</description>
<year>1994</year>
<publisher>Virgin Interactive</publisher>
<info name="serial" value="T-70025"/>
+ <info name="release" value="199406xx" />
<info name="ring_code" value="HOTALIENRE R1H MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="heart of the alien - out of this world parts i and ii (usa) (re)" sha1="a2784fa95bb3b29067b5d8148dd95877456577e7"/>
+ <disk name="heart of the alien - out of this world parts i and ii (usa)" sha1="a2784fa95bb3b29067b5d8148dd95877456577e7"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="heimdall">
+ <!-- Source: redump.org - http://redump.org/disc/21039/
+ <rom name="Heimdall (USA).cue" size="2294" crc="d9024819" md5="efe0f4d6da5b56c260bf6af3b1ccf174" sha1="66e858090085673dbfdea26d06dd354504b2296d"/>
+ <rom name="Heimdall (USA) (Track 01).bin" size="25888464" crc="38d5dd04" md5="9c9d9dae336002fc2f74c8424c7f3ee6" sha1="2f858db859baf28d8b38db72bcc0b84b04ab8fe3"/>
+ <rom name="Heimdall (USA) (Track 02).bin" size="15520848" crc="a3a15a84" md5="7c54669ba048df09a6e1b824e400a74d" sha1="856869cb3d8f0744a8d4971b6452407cfef4ca42"/>
+ <rom name="Heimdall (USA) (Track 03).bin" size="31159296" crc="91eceeb1" md5="1efa2791b25990d28f5b464d4520802c" sha1="16728f0f128dcd2c68a9b34d9da1afd1db58fb5e"/>
+ <rom name="Heimdall (USA) (Track 04).bin" size="43352064" crc="752b5199" md5="6d392ca101ee4df661d151abb62ddc01" sha1="1acc75f25c41a8e647714314913fadd7b2e57ea9"/>
+ <rom name="Heimdall (USA) (Track 05).bin" size="19375776" crc="021827ac" md5="c62fc9ce440d9098f71979d3dc7d441e" sha1="408983bde3e5881e84b5307f740595cbe80432ea"/>
+ <rom name="Heimdall (USA) (Track 06).bin" size="38902080" crc="339974f4" md5="b06bf965a4e452b68e7b9df820a12f8b" sha1="811104706979757528e4a60a82a2fb90520a15f4"/>
+ <rom name="Heimdall (USA) (Track 07).bin" size="21584304" crc="005a5abb" md5="12ec4f7dd39069e03ae265231d874f41" sha1="3a6582ca7fd800c82c95c9611237a2324e6d7445"/>
+ <rom name="Heimdall (USA) (Track 08).bin" size="2653056" crc="cfc95e5f" md5="7940bc8636315c831bd405a9aa996c0f" sha1="4c56550c6c2c7a82cc606d6158ca2db826d77f4a"/>
+ <rom name="Heimdall (USA) (Track 09).bin" size="2476656" crc="2d7c1907" md5="468e95d39c1495502b4e68597af8d2d4" sha1="903347ba6205e3d45dfda67525bc727458c28def"/>
+ <rom name="Heimdall (USA) (Track 10).bin" size="1891008" crc="7cf2e5d8" md5="fa052385f047081c6c755beadb1c44b8" sha1="5981f62cf321ca08f8f141450a29884273ab1535"/>
+ <rom name="Heimdall (USA) (Track 11).bin" size="2542512" crc="0d620010" md5="799e562f32b58ebc14d1edbaf2efaba7" sha1="1c3095f541b9852ac63f7af77bf0ef6667fba6c6"/>
+ <rom name="Heimdall (USA) (Track 12).bin" size="3184608" crc="224f1aec" md5="a4023ba560b6dc293ae34f4f183202bb" sha1="499574f996a099d96540db66af6fef3a815e101d"/>
+ <rom name="Heimdall (USA) (Track 13).bin" size="3123456" crc="60fe7308" md5="566b11094d9023aca6bc1e9de15e15a9" sha1="bbb3484dde9626c2554eb78cb6f32739142d052a"/>
+ <rom name="Heimdall (USA) (Track 14).bin" size="2603664" crc="72a6106f" md5="44574a408ac9a6becef0fb74ab0ca37e" sha1="5266ffbcea1879e86e99da42269f3de08acfb35a"/>
+ <rom name="Heimdall (USA) (Track 15).bin" size="2389632" crc="f3ca06e7" md5="976f4ed5792275328e42e967fe508677" sha1="358bf4ea67074b1d778e5832fc89ab54d5e10284"/>
+ <rom name="Heimdall (USA) (Track 16).bin" size="2490768" crc="b7f15a1f" md5="ce6d98a93b803b86998a6f292f2edad9" sha1="e3510af62fb9816311b1d217bb0df65b204b58b9"/>
+ <rom name="Heimdall (USA) (Track 17).bin" size="2523696" crc="52812cc4" md5="d49af85c1167918110d34630dd7d31f6" sha1="46243baad7b91581bedfee2f322729b40144749f"/>
+ <rom name="Heimdall (USA) (Track 18).bin" size="2415504" crc="2678984e" md5="b4cc209d5773ba130eeeb6c1cf8e01f5" sha1="647c51b2776779c8954d28c42bbe9f431650d5b9"/>
+ <rom name="Heimdall (USA) (Track 19).bin" size="2994096" crc="853fe6f3" md5="10f31ca3c35777d13f973ab88e6cd4e9" sha1="908073f40a8588c3fc6f9b4a04538de35099e9db"/>
+ <rom name="Heimdall (USA) (Track 20).bin" size="2556624" crc="3168badf" md5="3ac1e3652e6dd14fe322c447a8ac086e" sha1="586855c28db1d94df743fbeb41a55efad028eaf6"/>
+ <rom name="Heimdall (USA) (Track 21).bin" size="2293200" crc="acc45bcd" md5="a8c01ea1c4dbd18e2a66f18c5d98e51d" sha1="224088ad76196027587197fd889295e675789b5e"/>
+ -->
+ <description>Heimdall (USA)</description>
+ <year>1994</year>
+ <publisher>JVC</publisher>
+ <info name="serial" value="T-60145"/>
+ <info name="release" value="199404xx" />
+ <info name="ring_code" value="SEGAT60105 R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="heimdall (usa)" sha1="986813f0d66eff9c163c19ccdbe6e055bf75043d"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="hook">
+ <!-- Source: redump.org - http://redump.org/disc/28626/
+ <rom name="Hook (USA).cue" size="2315" crc="ba07f18d" md5="04df168eace6dcf1753b049f6e0d2a47" sha1="a56f37f5255523b507f4b183bdb5371cbd194cd8"/>
+ <rom name="Hook (USA) (Track 01).bin" size="19930848" crc="f1dfc54a" md5="ed61d203f81e53229e03d50378c5923f" sha1="a30dfcfc405b536061a11f2b9f34c379bdac846b"/>
+ <rom name="Hook (USA) (Track 02).bin" size="10318224" crc="31a8c955" md5="c4049e4e9ad4c0ec8b76f368ba0bcc08" sha1="5308cf33ba20fcf2403c83398a364a2ea4840660"/>
+ <rom name="Hook (USA) (Track 03).bin" size="17816400" crc="15a58244" md5="3fdcbd5c526e62e56a4839d6468a420d" sha1="6256b9f9e5d1fba0be273bcc42b7a87a40f16590"/>
+ <rom name="Hook (USA) (Track 04).bin" size="12270384" crc="9bf02b75" md5="60d6e86b09b4ac549adcf7cf1d87f25b" sha1="1b4adbf9db67dc40ea384534844417fcc4296413"/>
+ <rom name="Hook (USA) (Track 05).bin" size="7314720" crc="c1a9e859" md5="b87026f786e0b35bccd6c741f86a697e" sha1="4a8a053c4a03592b43861e51d3331ac7b5d750a7"/>
+ <rom name="Hook (USA) (Track 06).bin" size="7792176" crc="f89b53de" md5="39307cd497e0ccc441dc1376d13c2629" sha1="0da4bb668c2a1bec77f5e43b86d1a5a619c8678a"/>
+ <rom name="Hook (USA) (Track 07).bin" size="7072464" crc="f6fe1490" md5="f84ed236d6c34bd98dd12d9c7656dd60" sha1="7a162ecfb9d60562466cc0a6ae666ffcd2a1bf32"/>
+ <rom name="Hook (USA) (Track 08).bin" size="8321376" crc="4adc8cd2" md5="0dded106944530566d0b11e3c396340b" sha1="9bdc17396eb4e95da2a5387e4c962bd6fd939e0c"/>
+ <rom name="Hook (USA) (Track 09).bin" size="6225744" crc="4eba52b0" md5="e085fe343b127fbed9923ae5f39d0cb0" sha1="d08ba418e69eb023b9925a4b0af5cbf67fcecbdf"/>
+ <rom name="Hook (USA) (Track 10).bin" size="10468752" crc="7884bc56" md5="0b8c362530ed3a47710eaab8970ce835" sha1="346739132697c0fcb0e423bd3fd1eb80c7903a63"/>
+ <rom name="Hook (USA) (Track 11).bin" size="2500176" crc="f7375b9f" md5="147391712fec8d7b5029f014270e7770" sha1="bc14c2003b5b44f83e47e7534cfa235d6386fc80"/>
+ <rom name="Hook (USA) (Track 12).bin" size="29663424" crc="29e120b2" md5="fa357aaad746b24d116d43bbfdfbc6ac" sha1="a9eb94a6bbe6ebc88f74632b4ae45a5c7703ff16"/>
+ <rom name="Hook (USA) (Track 13).bin" size="37389744" crc="f3c2f224" md5="066bb38dd9177b113c116dcad3afd70a" sha1="c4710c6acd96a84fe865cf381d5222e5f310a93f"/>
+ <rom name="Hook (USA) (Track 14).bin" size="14862288" crc="6a3c4132" md5="95ee308fcf35e5b3b266d2552ad11616" sha1="f1230b09b7e6528fcf062bfdfca5d8ba1a8b5732"/>
+ <rom name="Hook (USA) (Track 15).bin" size="16489872" crc="44a43f83" md5="fe6beef912c7cfb6dad3d9c80de2982a" sha1="09f49f7ba16ef9b7b4e13f63afdfb7c88a50c501"/>
+ <rom name="Hook (USA) (Track 16).bin" size="18317376" crc="32acb34f" md5="3de02ada5567c8319eac06f7e29a7187" sha1="42cb4e38408264ee15e4d12854dbc155f9a56b23"/>
+ <rom name="Hook (USA) (Track 17).bin" size="13415808" crc="d3334e5f" md5="6b807bd9b8c30929e72193bdd7760ee7" sha1="d89f236b385edac24749d8d35252721428052e61"/>
+ <rom name="Hook (USA) (Track 18).bin" size="31521504" crc="8382c5ef" md5="58b5b983d2243a352b45cfddaba40438" sha1="656fb1df67b0e948a9370cfd684afb20260f5c41"/>
+ <rom name="Hook (USA) (Track 19).bin" size="41613936" crc="64ee9d29" md5="6397eb6877d9a3983a9cde3294b00ccc" sha1="909feec46ca26a1deac56fb9cb5177ea469b7a34"/>
+ <rom name="Hook (USA) (Track 20).bin" size="11202576" crc="f2b726ad" md5="c166d520dfdf75d8b197dd8923c37bb6" sha1="7faf66c9950ee9e4fb7e4713e35f6e66f7d60664"/>
+ <rom name="Hook (USA) (Track 21).bin" size="54636960" crc="3dbc8322" md5="b93a1720b28aed028169fae3721e4594" sha1="83efa76dc5da46bdf03688a3191fc7a762c79747"/>
+ <rom name="Hook (USA) (Track 22).bin" size="8079120" crc="243eede7" md5="5c2c3f83ef38d50ba153056008c9cbf0" sha1="52c0058e42cfeb9634fb1f464a2c1ed46f0fb56a"/>
+ -->
+ <description>Hook (USA)</description>
+ <year>1992</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-6205"/>
+ <info name="ring_code" value="CDAC-032400 4"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="hook (usa)" sha1="310b67fc0163da2dbae236b1276624b2170425b0"/>
</diskarea>
</part>
</software>
<software name="ironhlx">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/16922/
<rom name="Iron Helix (USA).cue" size="202" crc="92afb016" />
<rom name="Iron Helix (USA) (Track 1).bin" size="454556928" crc="4be42079" />
<rom name="Iron Helix (USA) (Track 2).bin" size="20949264" crc="fbaac5fe" />
@@ -652,8 +1528,51 @@
</part>
</software>
+ <software name="jeopardy">
+ <!-- Source: redump.org - http://redump.org/disc/28627/
+ <rom name="Jeopardy! (USA).cue" size="309" crc="6c28da39" md5="43ccd1f797fb9d76824fcec13693f90d" sha1="d6cac996cac2f558349818e901dfbd38731d6156"/>
+ <rom name="Jeopardy! (USA) (Track 1).bin" size="95540592" crc="ea4c7949" md5="679d176e4f96fd7413beb7fc8986a0e7" sha1="e2efaf03f631e5e623db94ff66a44c33642fcd0f"/>
+ <rom name="Jeopardy! (USA) (Track 2).bin" size="11910528" crc="ea25a559" md5="73fbac09804bfa718a1aa6a5b897fbfa" sha1="89262e648df632ef11ee7e56c2db3ed63cf870d7"/>
+ <rom name="Jeopardy! (USA) (Track 3).bin" size="16736832" crc="bc937242" md5="b034169c83fdc58b84a827dc7fb98fb9" sha1="20307556db57e323abe3613bd7e517d43afdd8f9"/>
+ -->
+ <description>Jeopardy! (USA)</description>
+ <year>1993</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-93095"/>
+ <info name="release" value="199311xx" />
+ <info name="ring_code" value="CDAC-075900 3"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="jeopardy! (usa)" sha1="6f159f64d3ea62bb8eff70e9a2f84d02bfb54688"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="joemont">
+ <!-- Source: redump.org - http://redump.org/disc/20227/
+ <rom name="Joe Montana's NFL Football (USA).cue" size="761" crc="981e4777" md5="2bc3110fe8d93c90d4b1d4b9e40e222e" sha1="d9d0a8b6315ffc543cf59b0449010f66d19b6be0"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 1).bin" size="181819008" crc="989d8600" md5="e363615aa4a7c10c8fae378f15563ee3" sha1="24ecd405cd234a1ded9f9a39230d63fbfb566132"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 2).bin" size="33849984" crc="289c546d" md5="8f8fec8b075fb20f67ade2d498857eb5" sha1="94fbc04542b6973d12617d338e7cb6d6b8e49dd9"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 3).bin" size="31587360" crc="92d35133" md5="b5d06ae9dda7e80b3e85058f6152ba8d" sha1="72df1e8286f196cc76662df674cd6fd83140cddb"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 4).bin" size="13655712" crc="e3d7c258" md5="8b18c6fd41b2e253ba380f1013d5d94a" sha1="7558bd5a2c8a9a75fa320ec0bf2dd92cf9f566ad"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 5).bin" size="8782368" crc="68aac7c3" md5="64035b7188b90c81f49d4c68073bb247" sha1="69788e7af30d064ad7a1894b6db309c85329ce7c"/>
+ <rom name="Joe Montana's NFL Football (USA) (Track 6).bin" size="12397392" crc="e3cf05b8" md5="511e560d59472940c5813cf0700c1279" sha1="897413ad5aad2dd0d59bf60d1f8211184550ee60"/>
+ -->
+ <description>Joe Montana's NFL Football (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-4201"/>
+ <info name="release" value="199310xx" />
+ <info name="ring_code" value="SEGA4201 R1C MFD BY JVC, SEGA4201RE R2C MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="joe montana's nfl football (usa)" sha1="a6c4dccb249c27d38846e204313446e5928c2b4d"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="jpark">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3884/
<rom name="Jurassic Park (USA).cue" size="3630" crc="3b5e205a" />
<rom name="Jurassic Park (USA) (Track 01).bin" size="190462608" crc="2094023a" />
<rom name="Jurassic Park (USA) (Track 02).bin" size="11378976" crc="b8bf14e9" />
@@ -691,8 +1610,8 @@
<description>Jurassic Park (USA)</description>
<year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4410"/>
- <info name="ring_code" value="SEGA4411RE R4C MFD BY JVC, SEGA4411RE R3C MFD BY JVC"/>
+ <info name="serial" value="4411"/>
+ <info name="ring_code" value="SEGA4411RE R3C MFD BY JVC, SEGA4411RE R4C MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="jurassic park (usa)" sha1="8ab39eda898277571127b9ac03dce64546602caf"/>
@@ -700,8 +1619,26 @@
</part>
</software>
+ <software name="kidssite">
+ <!-- Source: redump.org - http://redump.org/disc/28029/
+ <rom name="Kids on Site (USA).cue" size="229" crc="9d823eca" md5="724647094a1d79ed14e3a74585194169" sha1="07902cd2dc2b021484d69e3c8235825818bfeaef"/>
+ <rom name="Kids on Site (USA) (Track 1).bin" size="516012336" crc="ef445a91" md5="6593d5f992966425166702ddd0db9bb7" sha1="aa3ad66dbf085c7c5d9d11454877f07e287e37df"/>
+ <rom name="Kids on Site (USA) (Track 2).bin" size="2469600" crc="3a48744a" md5="b37ce726f331e9aedf9529db5262af46" sha1="2a9eb0c64bd21a81cc8e692eb6e5b41ba228876c"/>
+ -->
+ <description>Kids on Site (USA)</description>
+ <year>1994</year>
+ <publisher>Digital Pictures</publisher>
+ <info name="serial" value="T162015"/>
+ <info name="ring_code" value="GW 03611 SRCR##02"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="kids on site (usa)" sha1="9a97c7c151cbe77121bb626954b50bd2223a9292"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="lethalen">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/21495/
<rom name="Lethal Enforcers (USA).cue" size="2673" crc="944dadcd" />
<rom name="Lethal Enforcers (USA) (Track 01).bin" size="10097136" crc="964be602" />
<rom name="Lethal Enforcers (USA) (Track 02).bin" size="2116800" crc="95ebb62d" />
@@ -728,9 +1665,11 @@
<rom name="Lethal Enforcers (USA) (Track 23).bin" size="37516752" crc="9f00ce25" />
-->
<description>Lethal Enforcers (USA)</description>
- <year>1994</year>
+ <year>1993</year>
<publisher>Konami</publisher>
<info name="serial" value="T-95015"/>
+ <info name="release" value="199311xx" />
+ <info name="ring_code" value="T95015-U11 2A7 C 39, T95015-U11 2B3 C 39, T95015-U11 2C2 C 39, T95015-U11 2C3 C 39"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="lethal enforcers (usa)" sha1="2a9bb24ed2a7db353e035311269180b368230069"/>
@@ -738,8 +1677,144 @@
</part>
</software>
+ <!-- This version was bundled with the Justifier light-gun. -->
+ <software name="lethalena" cloneof="lethalen">
+ <!-- Source: redump.org - http://redump.org/disc/24562/
+ <rom name="Lethal Enforcers (USA) (U12).cue" size="2811" crc="dcc52475" md5="c492454ec35d0cbf0fa50f84e25aad8e" sha1="f87d1195088fd80df3058e6300a1f0ca57b14f88"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 01).bin" size="10097136" crc="964be602" md5="f247062b06390e39d0a7e01998bc5d22" sha1="91c34f86a1607ddd4088f7b1e36dbd383ef3e0cf"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 02).bin" size="2116800" crc="85ee15d4" md5="ec549e0b92e878b542542d57b5f99472" sha1="54993d91b0f150155a3071f35346937a3ef77ec6"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 03).bin" size="52520160" crc="f064f78f" md5="ff4692a03e31ad0bc69635f8298164b7" sha1="c9e119f8e946aabdd0934105f2d103366798d1fc"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 04).bin" size="38222352" crc="499add28" md5="04caf2abe9e45f2e160dc18b46769eac" sha1="7c12b6a0fda235a49d5a0da3222370646aa28ed6"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 05).bin" size="62506752" crc="8b38b770" md5="a42cc6bb8d6873446d1740c5896031f9" sha1="f818c175599d90cf609c7da2a0edd3466b31af2b"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 06).bin" size="31232208" crc="9bdceca8" md5="04fc9d87a4c7aba59f848bfb27a46469" sha1="eceedb9051f25df772394905a985ae85fb688fd2"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 07).bin" size="57875664" crc="0a7a4215" md5="f6378524fd02c6c847dca0734b6102cc" sha1="71390b56a7347d8c5b3af9c298e430b9e0751769"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 08).bin" size="60354672" crc="6a86f979" md5="232779e45bc4b6829ecdaba9d0aa9762" sha1="4aa6cfd3da58b5ff1eb224b073e9bfc4b1fdcb7b"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 09).bin" size="6348048" crc="deeb9f34" md5="3ffc431707fb3a551f91d273bb083c6e" sha1="e2ae9f0967746e935b4fef9bc6bfc7677efeec84"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 10).bin" size="1444128" crc="e4a41800" md5="0097b8a849ec3d9c09945363fa0838a6" sha1="f5844b62044a4e9256b85bf854989517b4605812"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 11).bin" size="58484832" crc="c6c3209b" md5="89f3a827f13a7d0fb56d7d92ea73472b" sha1="b26734b3c29dd600a9ae96f4fd3d4e1c6cc69b20"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 12).bin" size="25253424" crc="238b057e" md5="566ebf341e054e097b2c712100dc1e55" sha1="2762f98e977bf1cbe0f61f388e2b3499c2211a80"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 13).bin" size="93045120" crc="a2f8e841" md5="8419484f22f285fb82d5b27cb13ec856" sha1="392396eeb3cd3b6ab4363fea2cd039d7e31f6429"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 14).bin" size="1721664" crc="acbcee7e" md5="4bc02d523d88a51ed48a69f6a5d51205" sha1="385f745e6559ee19975d09915c3d78f8e897ac56"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 15).bin" size="32532864" crc="60969844" md5="016de479e191b35c76545dd0b0e97e2d" sha1="e947d34fcb6fcc018f90b476a0cfcc1020f6673b"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 16).bin" size="1832208" crc="0a66d3cc" md5="5864af3f0add00d3459b1ae4d581873d" sha1="a95f4d99931589ac5d7fcf209fc0bdfdd0ac45d7"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 17).bin" size="1808688" crc="c71b28d6" md5="42d832ab404f78fc0bb2e8e9de942ab9" sha1="6221d3a809e182441a2be6ed60d8f6689386e525"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 18).bin" size="1808688" crc="7c8f4c7e" md5="3a52698208803e8194c4f827c1d3b202" sha1="944cbe99e74e1389c2cf658a7a6ae6feaf74c0f0"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 19).bin" size="1808688" crc="3cfd8a79" md5="5fc835729f962eb8ad714d82bc29a93d" sha1="f3576952b11a9547f27cbbaeef5ee2d792a9edb3"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 20).bin" size="1808688" crc="f1f54b4d" md5="524ebdb01d2d92b13b835279d0c7aa26" sha1="dc873a9274a214137343bbaf5e768527344bd3f3"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 21).bin" size="1279488" crc="555471ef" md5="1261324040733ccd232239eae938fe8c" sha1="66a07cf0ebc129ac0a794bf22beac1c85a7c87b0"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 22).bin" size="22666224" crc="025d7467" md5="0928be28ff5d1cef3fd92d505dc1af21" sha1="376c19913de5dc4fdbe74225e0b538b84af7bc92"/>
+ <rom name="Lethal Enforcers (USA) (U12) (Track 23).bin" size="37516752" crc="c2d48f9c" md5="37771c3a002d859d0c5de4c5b4d0f863" sha1="c8c37b52f54168aa6fb968837d74d756f77a2feb"/>
+ -->
+ <description>Lethal Enforcers (USA, Alt)</description>
+ <year>1993</year>
+ <publisher>Konami</publisher>
+ <info name="serial" value="T-95015"/>
+ <info name="release" value="199311xx" />
+ <info name="ring_code" value="T95015-U12 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="lethal enforcers (usa, alt)" sha1="924fd382c6d23099200ef33eee358f768a0503b8"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="le2">
+ <!-- Source: redump.org - http://redump.org/disc/21451/
+ <rom name="Lethal Enforcers II - Gun Fighters (USA).cue" size="3087" crc="9b8fce6d" md5="d89875f4fc90228b467b5dda0fbf8418" sha1="e3905d6ff2c3e14bf565f79b76b5d08aa1278dfb"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 01).bin" size="14845824" crc="a84c7a5d" md5="a0a816b6efccb7a04d413230429272ca" sha1="06b1f47f29b9c441c9a046b728f7f1b6b809c6fe"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 02).bin" size="43697808" crc="b93c5d38" md5="c4e1e9ec5b903e0e78de978d35996a20" sha1="bbb852eb4d7438367dda8d94dcfc7ae1262448ed"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 03).bin" size="36042048" crc="5a5f097a" md5="c5b01cb993cfe5587bb4b76270f8b1fc" sha1="cfb3f4da2397f507315a63522311641710a62805"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 04).bin" size="24474912" crc="0c36241b" md5="16a4095986605ead8a5e9a82373c3abe" sha1="a13c8daa4e92e9478ee8dd9f4270579295730aa1"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 05).bin" size="37991856" crc="85d840db" md5="17538b0061aae0792093a27af42bce19" sha1="a3ece35342393b5e7fdc3cb3d587d74329d3814b"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 06).bin" size="28837872" crc="da4a7324" md5="c7623d22eb36af19b8cec5c20af66a5e" sha1="4f9837ca6c883ecea94224e5081016c89271220f"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 07).bin" size="27017424" crc="cc03c878" md5="722e8bef70a3d77e3d8ede5e8e2fcbb5" sha1="d6887a7a6e1c1130f3d4be9dfcfa3705732649f3"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 08).bin" size="51675792" crc="2f8877dc" md5="5d9cfd8845c8c0fda92c566e95f3bd2b" sha1="851c161d77db141809c0ac800927f140af392831"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 09).bin" size="25606224" crc="f71bda56" md5="e2a5295e4a326a67268454e7b64f0052" sha1="6e7d485b2fe9b3c0fef74f0f6cc25f3295bf8519"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 10).bin" size="27885312" crc="f81ec1bd" md5="3e806f26859411f29067f943818ea708" sha1="446f41fa3774a71c3813a87d024a67e707243ca7"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 11).bin" size="62257440" crc="94a04309" md5="a2671819ea089bd18145cbe83c670f9d" sha1="37521f378e069c898fe7c08cce3305bccf9365f0"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 12).bin" size="28922544" crc="58d90f1d" md5="e224c90fcdff7bb77a6d80e9ff74189e" sha1="bac69d469f9f324b72ba78e39fe6574bb9d6ffa9"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 13).bin" size="55655376" crc="335fc5e1" md5="0686557c60bb6a34b2cb5e8764f0f1b8" sha1="658a7efe9d8134a98037736ea1507199ac6c432d"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 14).bin" size="1331232" crc="cad9d5a1" md5="026deab9bb7e76a06d60d2a7c3e056b5" sha1="eedcbd0910c1f60e518f8c5d55debbf60492d0ad"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 15).bin" size="1166592" crc="5c525831" md5="7e01360a78feebfe30f0c47ee11213f9" sha1="1d2465aa16c46e23b4b22fae6bb33f7242904522"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 16).bin" size="1164240" crc="ebc20c1c" md5="4a01ea53074d67cb6e7d2b9fda76e359" sha1="0aa866b6458ebba08d41735bb0948c76fd5048cf"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 17).bin" size="32335296" crc="a07d7cec" md5="6ac4cfff754c68c380274ee4cc1054f6" sha1="828fccfb6b6a133a36a957ff2e25becbf2dff53d"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 18).bin" size="44612736" crc="d0ef571b" md5="a58c2953104ef8abd42eb1ce205329a5" sha1="3a6bdaa30280ba7931bd8f84df632f00695689dd"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 19).bin" size="1437072" crc="6d65ec2d" md5="8180638a5058adfa35e6af3d18756be4" sha1="bea4d66e940c927aaae5b2926c9f51b816fbdff2"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 20).bin" size="18552576" crc="2cf83dfb" md5="749fb00631fdaf829ae531e0fdb3f9df" sha1="edf0fe55d7d880640346182ba11cb3d4778b9c18"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 21).bin" size="5957616" crc="15f7e470" md5="e4804341367ae858663282dc45b9b006" sha1="cf538d98e461557bf199242a7f7ee28b82ffc684"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 22).bin" size="5569536" crc="231dae7f" md5="5d1b5225e07ce1fbe83bdd4a88a2699d" sha1="1497d0df025d819557f624eb1a9f16123ad300dc"/>
+ <rom name="Lethal Enforcers II - Gun Fighters (USA) (Track 23).bin" size="6507984" crc="3bf0c6dd" md5="35e70423720b4ab77e178bdad48375fd" sha1="ac77b2867bf35e4190fac087c8952f73b1c91abf"/>
+ -->
+ <description>Lethal Enforcers II - Gun Fighters (USA)</description>
+ <year>1994</year>
+ <publisher>Konami</publisher>
+ <info name="serial" value="T-95025"/>
+ <info name="release" value="19941124" />
+ <info name="ring_code" value="T95025-U12 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="lethal enforcers ii - gun fighters (usa)" sha1="7d63da6fa26441e31bd614474936d8c7adacd239"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="loadstar">
+ <!-- Source: redump.org - http://redump.org/disc/20226/
+ <rom name="Loadstar - The Legend of Tully Bodine (USA).cue" size="279" crc="0799fdc0" md5="85efd60a9defe291a6d0546e6a76b772" sha1="16527805b0a853f542765632d5a387c20dd8e894"/>
+ <rom name="Loadstar - The Legend of Tully Bodine (USA) (Track 1).bin" size="656419680" crc="96b5157a" md5="f6666523c7cd0f455cf5fc8467fc1fb3" sha1="3e4a0e916f54b2b4e836ed0cafba09f4460d4812"/>
+ <rom name="Loadstar - The Legend of Tully Bodine (USA) (Track 2).bin" size="1258320" crc="9a35811b" md5="b69bfc0275fe00cd55ec8aaa1575f70c" sha1="247a1429c4c51aa8069d1662df70136652f1519d"/>
+ -->
+ <description>Loadstar - The Legend of Tully Bodine (USA)</description>
+ <year>1994</year>
+ <publisher>Rocket Science Games</publisher>
+ <info name="serial" value="T-153015"/>
+ <info name="ring_code" value="SEGAT153015 R3J MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="loadstar - the legend of tully bodine (usa)" sha1="a9b4df4c8b3ed81d14cfa5506961c3815387194e"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="lordthun">
+ <!-- Source: redump.org - http://redump.org/disc/31683/
+ <rom name="Lords of Thunder (USA).cue" size="2462" crc="fa2e14b7" md5="b671665459694ea092d0300f27060952" sha1="e5dc85ec465196a5c430fd764366781c2b27c9a6"/>
+ <rom name="Lords of Thunder (USA) (Track 01).bin" size="8311968" crc="3eb3c77c" md5="315ee58885b83a9a3d4d0969f048a609" sha1="be3933bb3b4522223c9662909aa77e98095dcd04"/>
+ <rom name="Lords of Thunder (USA) (Track 02).bin" size="5814144" crc="5c1c92e0" md5="36814fdec67cb1a7f66527f793d6b22f" sha1="aa7cc21097cab6c8f1601174772a2177b5317016"/>
+ <rom name="Lords of Thunder (USA) (Track 03).bin" size="10936800" crc="5cc3d8c5" md5="2b22e6a8b14509d734bc4185a70b5aa1" sha1="89b1439961f81d2294d39d6422872305362426f7"/>
+ <rom name="Lords of Thunder (USA) (Track 04).bin" size="10936800" crc="58a2bfbd" md5="283027eeda08c668e7171eff5a1b5de1" sha1="1308ed13a19cf9868f38c04b8e980de31b534be2"/>
+ <rom name="Lords of Thunder (USA) (Track 05).bin" size="21523152" crc="cd84e5ba" md5="bd0eb9e8e62f6d0e16aaf910310f4f1f" sha1="76f5c7d779cd361fa020388697cc6f3708eda20c"/>
+ <rom name="Lords of Thunder (USA) (Track 06).bin" size="3022320" crc="2656aef5" md5="66ee31ae550375f917e6bfe62155bce7" sha1="dc2082801bd38ff6f8ec6e9cca151798134c0607"/>
+ <rom name="Lords of Thunder (USA) (Track 07).bin" size="47983152" crc="9bd1dc04" md5="c86fc9544fafa5d426c8fe17e112cbd9" sha1="629662874e99df2ca82c787270875fa5d672c4c2"/>
+ <rom name="Lords of Thunder (USA) (Track 08).bin" size="47994912" crc="243fb9ef" md5="4b2631c6896263a6ed08e237ce0d2598" sha1="1de45c7b29ab169fbbdb8bf49b75120193bf9792"/>
+ <rom name="Lords of Thunder (USA) (Track 09).bin" size="47985504" crc="28bcbbb9" md5="ae42f467c0f6532182fb5f858811f1c7" sha1="b2a448785c37d09ecfc6a7688709258946469082"/>
+ <rom name="Lords of Thunder (USA) (Track 10).bin" size="47980800" crc="34df2a32" md5="2021d53251ca37f1e146f825a2012d6d" sha1="88fee8fb2871e410d52337218c5fa3132e35d95a"/>
+ <rom name="Lords of Thunder (USA) (Track 11).bin" size="47922000" crc="41be6ed1" md5="ea3eac90af366bdb15f6c476db10fc59" sha1="d984aaadcd278094bf4667d7b17a8a22f7f28825"/>
+ <rom name="Lords of Thunder (USA) (Track 12).bin" size="47983152" crc="4c46972a" md5="0226e5f95e2255d9471528025cce713c" sha1="21efdbb6cf25f6e573cc42811dc2f59e841ae76a"/>
+ <rom name="Lords of Thunder (USA) (Track 13).bin" size="47983152" crc="1472b66a" md5="9e9790d281641978761a8cd1163839a4" sha1="c2c1d95b3aca5dc546a7a529676cd6d759fce063"/>
+ <rom name="Lords of Thunder (USA) (Track 14).bin" size="32107152" crc="5383f70e" md5="27311cb1dd7cc4e4fd8afec1267d1f52" sha1="6f724adef13aabccfd82d49f6a79930f03823b50"/>
+ <rom name="Lords of Thunder (USA) (Track 15).bin" size="32107152" crc="3873677d" md5="6575222fdff67050ecc961e0640f9ae0" sha1="74bae690750b5ef495935580d41f3aaebfb228c0"/>
+ <rom name="Lords of Thunder (USA) (Track 16).bin" size="32107152" crc="d3d77f54" md5="930ed16e4512c32db5f80f5a22b6553a" sha1="10e10959e722c3d957de278b5d33ac25a089bde1"/>
+ <rom name="Lords of Thunder (USA) (Track 17).bin" size="16327584" crc="c735bf64" md5="03f98c8726183c6ade628fc7b8533fd8" sha1="fa6827b0584f7b7c7f23aa26b0c1825f2e684ba6"/>
+ <rom name="Lords of Thunder (USA) (Track 18).bin" size="16447536" crc="a11550fb" md5="51468375809ce385578ff39b8487f029" sha1="fc35232bb8060b94e803f45c278d9eaf235635c0"/>
+ <rom name="Lords of Thunder (USA) (Track 19).bin" size="10939152" crc="f9eeec27" md5="0af2ed4c2c1c22787c4634c3d621d966" sha1="c184cca237159cac2c78639a50a87572404cb597"/>
+ <rom name="Lords of Thunder (USA) (Track 20).bin" size="11049696" crc="048893bc" md5="ed945c20212e6f2449003df59367d445" sha1="25683f59cbf6e0338bba64c1b0cb32348c01bd6f"/>
+ <rom name="Lords of Thunder (USA) (Track 21).bin" size="32514048" crc="8a00f472" md5="9eff5b8a3bd776be626dfab740d5c374" sha1="22ccf900e71dd44ac74b30dcd2dc1dfc53cfe366"/>
+ -->
+ <description>Lords of Thunder (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4450"/>
+ <info name="ring_code" value="SEGA4450 R1F"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="lords of thunder (usa)" sha1="c4be0138ac50ee190fb8df9839a2efb97e9f30c2"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="lunar">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/29312/
<rom name="Lunar - The Silver Star (USA).cue" size="6430" crc="b8f7f6cb" />
<rom name="Lunar - The Silver Star (USA) (Track 01).bin" size="12752544" crc="079e5831" />
<rom name="Lunar - The Silver Star (USA) (Track 02).bin" size="2486064" crc="8a960eec" />
@@ -796,8 +1871,8 @@
-->
<description>Lunar - The Silver Star (USA)</description>
<year>1993</year>
- <publisher>Working Designs</publisher>
- <info name="serial" value="T-95015"/>
+ <publisher>Game Arts</publisher>
+ <info name="serial" value="T-127015"/>
<info name="ring_code" value="SEGAT127015RE R1C MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -806,8 +1881,50 @@
</part>
</software>
+ <software name="lunar2">
+ <!-- Source: redump.org - http://redump.org/disc/21035/
+ <rom name="Lunar - Eternal Blue (USA).cue" size="365" crc="bea3dfdd" md5="b55c0aeb6952b9895b5da8c3c31cb8c0" sha1="85c8e51c788d0c4686ab36248c928c7cf1091277"/>
+ <rom name="Lunar - Eternal Blue (USA) (Track 1).bin" size="469555632" crc="430af523" md5="951e0f07f310276a5151eba189ad53e8" sha1="5db76e9307269827ed64ec06838800a241cd7c79"/>
+ <rom name="Lunar - Eternal Blue (USA) (Track 2).bin" size="51120720" crc="b8825042" md5="62b9fce031f086a610836853ce89b6aa" sha1="3e3f7090254d7645e577e009fda460cb17110c9f"/>
+ <rom name="Lunar - Eternal Blue (USA) (Track 3).bin" size="63812112" crc="0a0f06d3" md5="6ccda3bfadc9d0aafb3d0d3b3d9d261e" sha1="d952940d6f5c7556ddd54e366c63d8c6637d76e9"/>
+ -->
+ <description>Lunar - Eternal Blue (USA)</description>
+ <year>1995</year>
+ <publisher>Game Arts</publisher>
+ <info name="serial" value="T-127045"/>
+ <info name="ring_code" value="SEGAT127045RE R1H"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="lunar - eternal blue (usa)" sha1="1cc95c2b91d6c52d561a4f70e96c52ddc3c10313"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="maddog">
+ <!-- Source: redump.org - http://redump.org/disc/28030/
+ <rom name="Mad Dog McCree (USA).cue" size="803" crc="4251b074" md5="e51a141b968be4d4cd6e7a4f19142826" sha1="c7c3b770b43b05c28758165a47514bef1daf0da0"/>
+ <rom name="Mad Dog McCree (USA) (Track 1).bin" size="242677008" crc="662784f2" md5="5cd92d667e9d71251441950f505c1414" sha1="add89b1c071c9ba60d75f1a864e54b7da542fb81"/>
+ <rom name="Mad Dog McCree (USA) (Track 2).bin" size="2227344" crc="2e31f14c" md5="a49444c570f9695bea3164d9c1005298" sha1="edfec8a88ae4dee5dc160cd6dfa3a00918f6800a"/>
+ <rom name="Mad Dog McCree (USA) (Track 3).bin" size="2222640" crc="0724c5cf" md5="a7ce5874d9c25046b8c4f56b5c05f87d" sha1="7fc59712a9792872c3dfccba9523936ce0b55007"/>
+ <rom name="Mad Dog McCree (USA) (Track 4).bin" size="2227344" crc="070d0d84" md5="961e1f7a2272a917c5a9aeb57060da14" sha1="1277b31e6fae022e382ffa946a4e74179d71ad57"/>
+ <rom name="Mad Dog McCree (USA) (Track 5).bin" size="2232048" crc="9e6faf42" md5="0f86049e3cf0267b67b25880bb14f621" sha1="9d5b13db643dd8cedb31b789559779fda0029491"/>
+ <rom name="Mad Dog McCree (USA) (Track 6).bin" size="2227344" crc="2e31f14c" md5="a49444c570f9695bea3164d9c1005298" sha1="edfec8a88ae4dee5dc160cd6dfa3a00918f6800a"/>
+ <rom name="Mad Dog McCree (USA) (Track 7).bin" size="2229696" crc="f1bb6acc" md5="7503c07c0b874cfd25708623b21f8a15" sha1="f8bb079a3acd4860f2325e5e14525c6be7667fb9"/>
+ -->
+ <description>Mad Dog McCree (USA)</description>
+ <year>1993</year>
+ <publisher>American Laser Games</publisher>
+ <info name="serial" value="T-111015"/>
+ <info name="ring_code" value="SEGAT111015 R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="mad dog mccree (usa)" sha1="244713e8c7c1d1ef38f5f9ba2232cb1a2b23a1f7"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="mansion">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17254/
<rom name="Mansion of Hidden Souls (USA).cue" size="228" crc="0811c359" />
<rom name="Mansion of Hidden Souls (USA) (Track 1).bin" size="605141376" crc="6576ae2c" />
<rom name="Mansion of Hidden Souls (USA) (Track 2).bin" size="7192416" crc="aaded020" />
@@ -816,16 +1933,130 @@
<year>1994</year>
<publisher>Vic Tokai</publisher>
<info name="serial" value="T-23015"/>
+ <info name="release" value="199402xx" />
<info name="ring_code" value="SEGAT23015 R1D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
+ <feature name="peripheral" value="mouse" />
<diskarea name="cdrom">
<disk name="mansion of hidden souls (usa)" sha1="1d1dba770de6d5969d23d2e86ad4028445d514c4"/>
</diskarea>
</part>
</software>
+ <!-- This game was only found bundled in a so called "Double Deal"-pack together with Bram Stoker's Dracula. They did not share discs. -->
+ <software name="franken">
+ <!-- Source: redump.org - http://redump.org/disc/29310/
+ <rom name="Mary Shelly's Frankenstein (USA).cue" size="864" crc="2ae072d4" md5="6216258ed40c3e715a0c527917ca11fd" sha1="36056af8bde3373be357af806235d75b4212b696"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 1).bin" size="107023056" crc="9b13990d" md5="4efa6263bd572ac2ac709d0dc74f5692" sha1="aebc3b15f006341969e4bc0170368bb4a57a5896"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 2).bin" size="30620688" crc="4346b17d" md5="209f82c59e4f5c51dd15a60365d23c20" sha1="d3f379e75a05d58dd2b0dce9dc87c2eb16f94f09"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 3).bin" size="24420816" crc="6aeada00" md5="fabc29d17016bd567b74eadd351562d6" sha1="6bd786091470d5a6de2e0d1906177f5092f21354"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 4).bin" size="20998656" crc="d88a92ed" md5="e95266f6335cef717c0493108155d4ff" sha1="483cac00f32caaac895000f74b8ff922f82511f7"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 5).bin" size="29679888" crc="8ddafd20" md5="3ae7d90fb78d48f0749bd9b9e8b938f6" sha1="7367c0df0d730e143dea895049d130e49a2926cb"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 6).bin" size="19307568" crc="7016a9b1" md5="c1d8397ad2cf23f57783c975abcfc3da" sha1="6b85a4497435dbfc0a2d563c00be256bb54ee29a"/>
+ <rom name="Mary Shelly's Frankenstein (USA) (Track 7).bin" size="22301664" crc="f3860f32" md5="caa7158b1d1e913dd8bc1c5a4c85122a" sha1="f8b3cb786ff8509e483dc3dc91a14a45de5050bf"/>
+ -->
+ <description>Mary Shelley's Frankenstein (USA)</description>
+ <year>1994</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-93155"/>
+ <info name="ring_code" value="CDAC-077800 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="mary shelley's frankenstein (usa)" sha1="4d0d40a70d2a585e371d23d122ec98a6dce7b299"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="mmania">
+ <!-- Source: redump.org - http://redump.org/disc/20251/
+ <rom name="Mickey Mania (Europe).cue" size="3230" crc="27e28c06" md5="d3c9ae0c7c0ae8c5853ae09ea77fb586" sha1="d5ace84de82a38edc09e0b9ca50a4e10c324d555"/>
+ <rom name="Mickey Mania (Europe) (Track 01).bin" size="15676080" crc="024d38a9" md5="60d7c286360420498de4d4fc7fccdfe2" sha1="116015aec553967475538c71b4425feef9636983"/>
+ <rom name="Mickey Mania (Europe) (Track 02).bin" size="22595664" crc="551213d7" md5="af8ca7603a9a70c2d9e431ff8fff5059" sha1="e710e38a1efc8f6e2a02688166e9723e0121de8f"/>
+ <rom name="Mickey Mania (Europe) (Track 03).bin" size="22405152" crc="358954a4" md5="a9c801d5848e8fca86d57e31fdcd05a8" sha1="8b3720cfca16e906e552e8abbc2b93ff7a5fc9ef"/>
+ <rom name="Mickey Mania (Europe) (Track 04).bin" size="21741888" crc="3b692a2f" md5="23f67beacc36fb19781dc2a8e317fe58" sha1="3f769c7f116caa19532f39c018895a95be381149"/>
+ <rom name="Mickey Mania (Europe) (Track 05).bin" size="22835568" crc="c2339eb3" md5="47ab4f50f33eeadc447f6eb89fffbd75" sha1="dc5147a56565dab521562bd100530232e61ef3a2"/>
+ <rom name="Mickey Mania (Europe) (Track 06).bin" size="21558432" crc="16617662" md5="7b8f3ff097d62d5044584ffb749fa9a7" sha1="f1763cd7aa90a130efc275115edbce23ab46b847"/>
+ <rom name="Mickey Mania (Europe) (Track 07).bin" size="15473808" crc="2419f084" md5="49bf16aee8bef2628c4bd3159b2b768a" sha1="ec12cf1cb2d87325017c50217bfc4dd5ee7a28a3"/>
+ <rom name="Mickey Mania (Europe) (Track 08).bin" size="22943760" crc="241b56f3" md5="68bef85a7d90ef9649cd5fd77143f965" sha1="6fdfdcaed03b634a2ba3649b0d070f239bd8937e"/>
+ <rom name="Mickey Mania (Europe) (Track 09).bin" size="22884960" crc="d868d818" md5="e5b97ec5c27fb3ba7fe2b5be7b97176e" sha1="3562a1c5b6819e4bfb7da8907d9662024de952d7"/>
+ <rom name="Mickey Mania (Europe) (Track 10).bin" size="22292256" crc="66204ffe" md5="6e39aeb2497dfb4563a1249f6e4b81b8" sha1="19276c3b81b17f7af22828b356343d3453b81402"/>
+ <rom name="Mickey Mania (Europe) (Track 11).bin" size="22769712" crc="258a0ac4" md5="10766490e6789197e3b5b489acbc7bdf" sha1="ac9abc5e5707d43b73a22c2b8001ba1856769327"/>
+ <rom name="Mickey Mania (Europe) (Track 12).bin" size="22974336" crc="a86b8263" md5="220e5aabc21bef4b50da406c4a6ad52d" sha1="d855c780791b11d536725dc9e974ae8bd651c451"/>
+ <rom name="Mickey Mania (Europe) (Track 13).bin" size="22567440" crc="f67dfbc1" md5="4e30dddd5a0b01a38c841ffa2d335cb8" sha1="a606aef222ceb2920d13e146ece9cf679fcb335d"/>
+ <rom name="Mickey Mania (Europe) (Track 14).bin" size="26471760" crc="994e05ac" md5="259709d9de9deeb674cdb4f810bf87ca" sha1="4a9ef66a1317bf244d4ca71c40e30a64b63b7bd5"/>
+ <rom name="Mickey Mania (Europe) (Track 15).bin" size="32478768" crc="db190862" md5="d6b20d0738f3767afd102f655d715e41" sha1="ce395626d90bd8df05d25fdebe5345bc74d6e955"/>
+ <rom name="Mickey Mania (Europe) (Track 16).bin" size="32217696" crc="ec6efe12" md5="f80a165d566b33b3d53586382cf0fc56" sha1="39857a6b413f81f9872146610262b973426c14a2"/>
+ <rom name="Mickey Mania (Europe) (Track 17).bin" size="22075872" crc="04b657b8" md5="d254dbcec08a23151370ced5ac8500fc" sha1="360d20a11a7a7ad37c41908177528cc48b799998"/>
+ <rom name="Mickey Mania (Europe) (Track 18).bin" size="21892416" crc="4e65e7f9" md5="70aab6bd01818e5b9c8b6651dc431f17" sha1="640d1692f973191cbb5cd1246f03245b621e73c6"/>
+ <rom name="Mickey Mania (Europe) (Track 19).bin" size="21894768" crc="5ced4803" md5="2bb2524996c3ef003191c84caad1b6e1" sha1="922b9b573cdd68ff9e7643bdc7d9971034d000cf"/>
+ <rom name="Mickey Mania (Europe) (Track 20).bin" size="22442784" crc="614d5df0" md5="d27abcd92e4e877a5dec7cba33b3fba7" sha1="5ee4950bcf031aa64c189dec723b0f0ab802dcbb"/>
+ <rom name="Mickey Mania (Europe) (Track 21).bin" size="2657760" crc="ac61d79a" md5="3ac6b914dee92eebc3f615713930791c" sha1="ace4cd847e15ab88a8a22b82e628a67509abb44b"/>
+ <rom name="Mickey Mania (Europe) (Track 22).bin" size="5734176" crc="3fcfb9b5" md5="56ff0355bc27a415656ce8eb613b9c04" sha1="5eee40b3b1bad99a1ab85809a4a4db43acf2da21"/>
+ <rom name="Mickey Mania (Europe) (Track 23).bin" size="22080576" crc="a05888b8" md5="46578ff27481e2926fed2e2e06099c75" sha1="bd4ccbf8df269159cc938c6df99683c03aad96e3"/>
+ <rom name="Mickey Mania (Europe) (Track 24).bin" size="3906672" crc="89cd22ae" md5="5bc4978c4af2a554004dd36a55405842" sha1="5c36f4dccecdad14baff14c3a069f1b5fb4e0b42"/>
+ <rom name="Mickey Mania (Europe) (Track 25).bin" size="2210880" crc="0a180657" md5="130f4da891f5de29adf823678a70ac98" sha1="05d757a5be377dfa839a6247b6c22c616f15be17"/>
+ <rom name="Mickey Mania (Europe) (Track 26).bin" size="1811040" crc="090523c0" md5="a2fcda3f32758223d9fbb8bb4c301458" sha1="57010a31d96526f2a61963f11fe041f1353a0619"/>
+ <rom name="Mickey Mania (Europe) (Track 27).bin" size="2514288" crc="0bf78fcf" md5="710b894d89677d56776649150a99906e" sha1="8a9d94acf2bcd03fa96877e7f9845fa1ad56453a"/>
+ <rom name="Mickey Mania (Europe) (Track 28).bin" size="1764000" crc="e7887563" md5="3078714f29b09408fbf800f7a2ce03d0" sha1="923937048d6b3fe908cbe4115a099a3b7a195d0b"/>
+ -->
+ <description>Mickey Mania - Timeless Adventures of Mickey Mouse (USA)</description>
+ <year>1994</year>
+ <publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-93265"/>
+ <info name="release" value="199411xx" />
+ <info name="ring_code" value="CDAC-073600 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="mickey mania - timeless adventures of mickey mouse (usa)" sha1="c98e204f92845b6e90ee0afce16d10501ded7ea2"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="microcos">
+ <!-- Source: redump.org - http://redump.org/disc/19452/
+ <rom name="Microcosm (USA).cue" size="963" crc="c644650c" md5="2764d48ed61ff4eee8b53c5447ce8625" sha1="5f0e537a31d7dc8aa67eaba0c72bb81ecf24e5d8"/>
+ <rom name="Microcosm (USA) (Track 1).bin" size="274203216" crc="9146e163" md5="ae633a666129abbf275009a220c2dec7" sha1="6a6c320138f0ec73a7d73d2ba1e4315b37c1932e"/>
+ <rom name="Microcosm (USA) (Track 2).bin" size="20991600" crc="587a2bea" md5="55ce538fe0217954e7d4505d5e4f3f85" sha1="de0f9a464d1269bb96e5fa0004c359c67357e5ef"/>
+ <rom name="Microcosm (USA) (Track 3).bin" size="22755600" crc="bd66cd9c" md5="764c3aa864a491aa497a206b9b8cad2f" sha1="db613a93860249ddf06e1dc8a0117d55ba046f8b"/>
+ <rom name="Microcosm (USA) (Track 4).bin" size="21873600" crc="c29da303" md5="36b18ee8c460c37ee7297b7da4037caa" sha1="d2909e82dce03534a70bd093a77613d432d73ced"/>
+ <rom name="Microcosm (USA) (Track 5).bin" size="35985600" crc="a7c5787b" md5="e469c777b2b9723e90442c7014b43ced" sha1="d6dcd027a7366483e090890bac47c9650d12ab15"/>
+ <rom name="Microcosm (USA) (Track 6).bin" size="24519600" crc="a7acf40e" md5="81ec880d1d10f085a211ee8a34fbe26c" sha1="292d427d3f0b1b93e398e5e3e356023a0005bd96"/>
+ <rom name="Microcosm (USA) (Track 7).bin" size="22755600" crc="c5f19afd" md5="7a964c0fd13863a71739dfc3e9db2209" sha1="e2e3e1f6e2addf30b477d24ca9d4d92c79557808"/>
+ <rom name="Microcosm (USA) (Track 8).bin" size="21873600" crc="60d63a1d" md5="7945b1c1fe9994a65a19455abb6f566d" sha1="f695bd7730167f915de89c980c697c5e90b8df5e"/>
+ <rom name="Microcosm (USA) (Track 9).bin" size="23990400" crc="8a134785" md5="fd1be591794e52460a93a9f383a8f9c1" sha1="706176e2b034e59941eccbe4a955b3ccaab45c15"/>
+ -->
+ <description>Microcosm (USA)</description>
+ <year>1993</year>
+ <publisher>Psygnosis</publisher>
+ <info name="serial" value="T-113015"/>
+ <info name="ring_code" value="CDAC-055200 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="microcosm (usa)" sha1="bca8a59c2aa47d1207b0c2df1d2ff40cb5d11fb4"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="midnight">
+ <!-- Source: redump.org - http://redump.org/disc/19474/
+ <rom name="Midnight Raiders (USA).cue" size="237" crc="3f58e4bc" md5="d58b5a21c07b8d50e901a2ea110fa922" sha1="d54075fbee45dcf9f6330eecee99d766b5a0177f"/>
+ <rom name="Midnight Raiders (USA) (Track 1).bin" size="499454256" crc="7cf624a3" md5="28492819efa402b0906e09933861a0e5" sha1="1b81e261f674b56b5154941208a9e245f16e7694"/>
+ <rom name="Midnight Raiders (USA) (Track 2).bin" size="37074576" crc="a594b44f" md5="8ffbe10a3ad8b7120d229023f3b1c226" sha1="2fbb983b390f44697841415054a2da53f7942722"/>
+ -->
+ <description>Midnight Raiders (USA)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4439"/>
+ <info name="ring_code" value="SEGA4439 R1J MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="midnight raiders (usa)" sha1="83db51aee2ef658fa9d29e67acdc7d5774e69d3a"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="mk">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/2173/
<rom name="Mortal Kombat (USA).cue" size="2376" crc="4e47aa2c" />
<rom name="Mortal Kombat (USA) (Track 01).bin" size="37516752" crc="a14a402f" />
<rom name="Mortal Kombat (USA) (Track 02).bin" size="7208880" crc="9e0eb9cb" />
@@ -850,10 +2081,11 @@
<rom name="Mortal Kombat (USA) (Track 21).bin" size="51974496" crc="c3a1b987" />
-->
<description>Mortal Kombat (USA)</description>
- <year>1993</year>
+ <year>1994</year>
<publisher>Arena</publisher>
<info name="serial" value="T-81025"/>
- <info name="ring_code" value="CDCA-061500 2, CDCA-060900 3"/>
+ <info name="release" value="199404xx" />
+ <info name="ring_code" value="CDCA-060900 3, CDCA-061500 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="mortal kombat (usa)" sha1="454e23c8922380f813a3a5b9d94902a691109332"/>
@@ -861,8 +2093,53 @@
</part>
</software>
+ <software name="nbajam">
+ <!-- Source: redump.org - http://redump.org/disc/28628/
+ <rom name="NBA Jam (USA).cue" size="945" crc="cdf4a699" md5="1fa5a7e3006f864b36486c1d07b6f1bf" sha1="fbfd6e5bf180965155e37a85d099378210a6a4a4"/>
+ <rom name="NBA Jam (USA) (Track 1).bin" size="51240672" crc="55fe001d" md5="3017c771d419f2d1ba798214c9c25401" sha1="1d214e0cd0c137d1aa67aeaff6f5a6452429a102"/>
+ <rom name="NBA Jam (USA) (Track 2).bin" size="52350816" crc="9184b102" md5="60c02b62e5447636fcdfc0572b7ac5b4" sha1="5fd5a1aad42b6894dcf5316575388a461433cef0"/>
+ <rom name="NBA Jam (USA) (Track 3).bin" size="47197584" crc="f4a22785" md5="c43394b4ca0f25e9b50b957f3dfbe171" sha1="cd8dfed6d94331ee54503264e004965cae305068"/>
+ <rom name="NBA Jam (USA) (Track 4).bin" size="45998064" crc="ba58f6e0" md5="2e9b99d6b8f19cd84008ac127236947c" sha1="c192e39aed32f518185b6608087790ef688d6f43"/>
+ <rom name="NBA Jam (USA) (Track 5).bin" size="56036400" crc="a90bd1a1" md5="c910528583fd102ea1b07209690d0796" sha1="ecae6b11c147f174df1f558a91108b69b0034d70"/>
+ <rom name="NBA Jam (USA) (Track 6).bin" size="54811008" crc="a269245d" md5="f95718efbd2814a7827697b63683aab5" sha1="b33b5f0a726e049afc85191f1a09ea3fd702db69"/>
+ <rom name="NBA Jam (USA) (Track 7).bin" size="60679248" crc="79ac4fbd" md5="b60f2449ef968643bf0428d7b98c3d03" sha1="d4e4e0e63e091a4fdb839f65337c58ea86063676"/>
+ <rom name="NBA Jam (USA) (Track 8).bin" size="59430336" crc="b79f290c" md5="5f1507f268ea9467a05383a0b5387bb0" sha1="90caba972ec7d46f8cce7e303f2d78c9f68cf4c5"/>
+ <rom name="NBA Jam (USA) (Track 9).bin" size="1905120" crc="5e289678" md5="7a764d69414aa668330c9d99a7dba729" sha1="37591b1b409a9fdca23a93a4a0f7bce7a3cdc7ea"/>
+ -->
+ <description>NBA Jam (USA)</description>
+ <year>1994</year>
+ <publisher>Arena</publisher>
+ <info name="serial" value="T-81035"/>
+ <info name="release" value="199412xx" />
+ <info name="ring_code" value="CDAC-074200 4"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="nba jam (usa)" sha1="48b0fdb2476ac795b303bfdc11b40abb8609511b"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="nflgreat">
+ <!-- Source: redump.org - http://redump.org/disc/24558/
+ <rom name="NFL's Greatest - San Francisco vs. Dallas 1978-1993 (USA).cue" size="284" crc="82157b37" md5="4c28fa7316b818fbd24364ad31fec18e" sha1="754f14d3c7261f7f09f0bdf0f91ba4ca1bf70004"/>
+ <rom name="NFL's Greatest - San Francisco vs. Dallas 1978-1993 (USA) (Track 1).bin" size="627755856" crc="7bdc5233" md5="9743d7b9585de738475615bcd34b90fc" sha1="f41908f1a2db5979e8c74d428718a7d4e580b2f0"/>
+ <rom name="NFL's Greatest - San Francisco vs. Dallas 1978-1993 (USA) (Track 2).bin" size="4821600" crc="82671365" md5="7dcc79e89a3afced38831ba69c2f2107" sha1="89a4ead11574121d5d21cda0ddbf39915488da12"/>
+ -->
+ <description>NFL's Greatest - San Francisco VS Dallas 1978-1993 (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4202"/>
+ <info name="release" value="199310xx" />
+ <info name="ring_code" value="CDAC-054500 4"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="nfl's greatest - san francisco vs dallas 1978-1993 (usa)" sha1="20fc574d1912b92dd9d6c248734a8e897501b3ea"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="nhl94">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17157/
<rom name="NHL '94 (USA).cue" size="8514" crc="0bce920a" />
<rom name="NHL '94 (USA) (Track 01).bin" size="209363280" crc="bb13c98d" />
<rom name="NHL '94 (USA) (Track 02).bin" size="18084528" crc="f5a1d100" />
@@ -948,6 +2225,7 @@
<year>1993</year>
<publisher>Electronic Arts</publisher>
<info name="serial" value="T-50015"/>
+ <info name="release" value="199309xx" />
<info name="ring_code" value="CDAC-056700 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -956,8 +2234,9 @@
</part>
</software>
+ <!-- Requires 32x add-on! -->
<software name="ntrap32" cloneof="ntrap">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17550/ http://redump.org/disc/17551/
<rom name="Night Trap (USA) (Disc 1) (32X).cue" size="232" crc="40b701ce" />
<rom name="Night Trap (USA) (Disc 1) (32X) (Track 1).bin" size="617061312" crc="fc9d7f2e" />
<rom name="Night Trap (USA) (Disc 1) (32X) (Track 2).bin" size="2551920" crc="43a2e918" />
@@ -970,24 +2249,26 @@
<year>1994</year>
<publisher>Digital Pictures</publisher>
<info name="serial" value="T-16202F"/>
- <info name="ring_code" value="GW 00161.1 RE-1 SRCR##02 (Disc 1), GW 00161.2 RE-1 SRCR##02 (Disc 2)"/>
+ <info name="ring_code" value="GW 00161.1 RE-1 SRCR##02 (Disc 1) / GW 00161.2 RE-1 SRCR##02 (Disc 2)"/>
+ <sharedfeat name="requirement" value="32x"/>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom">
- <disk name="night trap (usa) (disc 1) (32x)" sha1="a4407b3264ef29d343f7d4b984194bc4636009d3"/>
+ <disk name="night trap (usa, 32x) (disc 1)" sha1="a4407b3264ef29d343f7d4b984194bc4636009d3"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom">
- <disk name="night trap (usa) (disc 2) (32x)" sha1="18b2a72bf91589ef43986b3f3add9b70c609f346"/>
+ <disk name="night trap (usa, 32x) (disc 2)" sha1="18b2a72bf91589ef43986b3f3add9b70c609f346"/>
</diskarea>
</part>
</software>
- <software name="ntrap">
- <!-- source redump.org
+ <!-- This is a dump from the original edition. Investigate if the re-release is different. -->
+ <software name="ntrapa" cloneof="ntrap">
+ <!-- Source: redump.org - http://redump.org/disc/17158/ http://redump.org/disc/17159/
<rom name="Night Trap (USA) (Disc 1).cue" size="91" crc="b5fae72b" />
<rom name="Night Trap (USA) (Disc 1).bin" size="616997808" crc="900cf0aa" />
@@ -995,10 +2276,11 @@
<rom name="Night Trap (USA) (Disc 2).bin" size="515351424" crc="7c560ae9" />
-->
<description>Night Trap (USA)</description>
- <year>1994</year>
+ <year>1992</year>
<publisher>Sega</publisher>
<info name="serial" value="4903"/>
- <info name="ring_code" value="CDRM-1027400 5 (Disc 1), CDRM-1027410 2, CDRM-1027410 1 (Disc 2)"/>
+ <info name="release" value="199211xx" />
+ <info name="ring_code" value="CDRM-1027400 5 (Disc 1) / CDRM-1027410 2, CDRM-1027410 1 (Disc 2)"/>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom">
@@ -1014,8 +2296,66 @@
</part>
</software>
+ <!-- Only the first disk is different from the parent. -->
+ <software name="ntrapb" cloneof="ntrap">
+ <!-- Source: redump.org - http://redump.org/disc/20867/ http://redump.org/disc/17159/
+ <rom name="Night Trap (USA) (Disc 1) (Alt).cue" size="97" crc="f2950016" md5="c9261a74b06972b2e1fbf7addc5fb5a0" sha1="2456d059254e74ebaf8b8f17fc665222fa47c323"/>
+ <rom name="Night Trap (USA) (Disc 1) (Alt).bin" size="616645008" crc="133b76ce" md5="6bfe493a225713115096d730edf77afe" sha1="9cd08d3718e17134a013cae92a52a2ac0b226b77"/>
+
+ <rom name="Night Trap (USA) (Disc 2).cue" size="91" crc="b4a7c1fa" />
+ <rom name="Night Trap (USA) (Disc 2).bin" size="515351424" crc="7c560ae9" />
+ -->
+ <description>Night Trap (USA, Alt)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4903"/>
+ <info name="release" value="199211xx" />
+ <info name="ring_code" value="CDRM-1027400 3 (Disc 1) / CDRM-1027410 2, CDRM-1027410 1 (Disc 2)"/>
+ <part name="cdrom1" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 1" />
+ <diskarea name="cdrom">
+ <disk name="night trap (usa, alt) (disc 1)" sha1="d5d21d92798661d67ab7247acc41ea6602721a0b"/>
+ </diskarea>
+ </part>
+
+ <part name="cdrom2" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 2" />
+ <diskarea name="cdrom">
+ <disk name="night trap (usa) (disc 2)" sha1="41c44780c325403d9c4522fc3d010912fc3dad5a"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!--
+ This is a special disc for the game Pier Solar and the Great Architects. If
+ the user have a Mega-/Sega-CD device with this CD in it connected to their
+ Mega Drive/Genesis while playing the game, the music and sound effects will
+ be improved. As such, this disc is not really a game in it's own right.
+ -->
+ <software name="psgaesd">
+ <!-- Source: redump.org - http://redump.org/disc/19787/
+ <rom name="Pier Solar and the Great Architects Enhanced Soundtrack Disc (USA).cue" size="622" crc="6d317fa8" md5="f0e03431664704058746f511e21c0958" sha1="ef30161fe9b6737346530bd74644996b3dc58041"/>
+ <rom name="Pier Solar and the Great Architects Enhanced Soundtrack Disc (USA) (Track 1).bin" size="511769328" crc="59200094" md5="5861f8067b1a3b8f1f6567e844a58dd3" sha1="649ca22c941afb50613167a942fd82b0c0b93384"/>
+ <rom name="Pier Solar and the Great Architects Enhanced Soundtrack Disc (USA) (Track 2).bin" size="14533008" crc="f4efb8ba" md5="504e6fec737c03b6a79192a742ee128b" sha1="33d55d40a6572b03189bc0b3a739ccdfc20db7e5"/>
+ <rom name="Pier Solar and the Great Architects Enhanced Soundtrack Disc (USA) (Track 3).bin" size="46536672" crc="a7bac29f" md5="c16859746dfef981abcc7fd45e405e49" sha1="88e601aca24d16909223672ab57fef5a8680e93b"/>
+ <rom name="Pier Solar and the Great Architects Enhanced Soundtrack Disc (USA) (Track 4).bin" size="21944160" crc="6b500b49" md5="25f2f79048fd60f72aa516995764a1e3" sha1="18d561ca6e0e890fbd88d415a8b2126efb0273b1"/>
+ -->
+ <description>Pier Solar and the Great Architects Enhanced Soundtrack Disc (World)</description>
+ <year>2010</year>
+ <publisher>WaterMelon</publisher>
+ <info name="serial" value="T-574013, T-574016, T-574016-50"/>
+ <info name="release" value="20101214" />
+ <info name="ring_code" value="Enhanced Soundtrack Disc WM WM 2234612235072235144* Enhanced Soundtrack Disc WM B"/>
+ <sharedfeat name="requirement" value="megadriv -psolar"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="pier solar and the great architects enhanced soundtrack disc (world)" sha1="1f26cce723ef044f449d87cdb624a2937f40f5d9"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="pitfall">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/11781/
<rom name="Pitfall - The Mayan Adventure (USA).cue" size="2949" crc="fc3ad28a" />
<rom name="Pitfall - The Mayan Adventure (USA) (Track 01).bin" size="26104848" crc="85a8926a" />
<rom name="Pitfall - The Mayan Adventure (USA) (Track 02).bin" size="4798080" crc="79ae94fa" />
@@ -1042,7 +2382,7 @@
<rom name="Pitfall - The Mayan Adventure (USA) (Track 23).bin" size="24032736" crc="593eb13a" />
-->
<description>Pitfall - The Mayan Adventure (USA)</description>
- <year>1994</year>
+ <year>1995</year>
<publisher>Activision</publisher>
<info name="serial" value="T-130025"/>
<info name="ring_code" value="SEGAT130025 R1H MFD BY JVC"/>
@@ -1053,8 +2393,29 @@
</part>
</software>
+ <software name="popmail">
+ <!-- redump.org - http://redump.org/disc/20699/
+ <rom name="Popful Mail (USA).cue" size="449" crc="2414276b" md5="f324f3bf93e3ff4b0dba22d22ec262ab" sha1="26a42b82895a203bbb79dff6567492e05e0d18a7"/>
+ <rom name="Popful Mail (USA) (Track 1).bin" size="421130304" crc="f17b5750" md5="1d583f4bbcdfc73f5686a6824c782494" sha1="00c67d62649bdc936da87e3218f7fd7c081df549"/>
+ <rom name="Popful Mail (USA) (Track 2).bin" size="25119360" crc="6329c847" md5="51b6f6ad0f9437345dca11bbaec9dd47" sha1="ca3c7af222e657016963d1e66a8136cae9c20f56"/>
+ <rom name="Popful Mail (USA) (Track 3).bin" size="25688544" crc="dcec1f28" md5="6af4033d4796461712f4ca26cf050dd8" sha1="2c4988a9463ca0ef918211fca9d0ce3271c5205d"/>
+ <rom name="Popful Mail (USA) (Track 4).bin" size="41973792" crc="85dc3246" md5="910cee4712abbddd9086806587328438" sha1="2a3f51f12d18d4d1336c4db152deedd2db12e63f"/>
+ -->
+ <description>Popful Mail (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-127035"/>
+ <info name="release" value="19950223" />
+ <info name="ring_code" value="SEGAT127035RE R1J MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="popful mail (usa)" sha1="459853983b1e01fe297ffd6287502eab1678e8e4"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="ppersia">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/4105/
<rom name="Prince of Persia (USA).cue" size="2907" crc="8ee6022d" />
<rom name="Prince of Persia (USA) (Track 01).bin" size="2641296" crc="e085f060" />
<rom name="Prince of Persia (USA) (Track 02).bin" size="33706512" crc="d90aea57" />
@@ -1083,9 +2444,10 @@
<rom name="Prince of Persia (USA) (Track 25).bin" size="2015664" crc="b26f995e" />
-->
<description>Prince of Persia (USA)</description>
- <year>1993</year>
+ <year>1992</year>
<publisher>Sega</publisher>
<info name="serial" value="4652"/>
+ <info name="release" value="199212xx" />
<info name="ring_code" value="CDAC-032200 6"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1095,7 +2457,7 @@
</software>
<software name="puggsy">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/4106/
<rom name="Puggsy (USA).cue" size="2336" crc="890dbfbb" />
<rom name="Puggsy (USA) (Track 01).bin" size="104388816" crc="88336725" />
<rom name="Puggsy (USA) (Track 02).bin" size="33539520" crc="763a36ef" />
@@ -1121,9 +2483,10 @@
<rom name="Puggsy (USA) (Track 22).bin" size="2457840" crc="9d207a7c" />
-->
<description>Puggsy (USA)</description>
- <year>1993</year>
+ <year>1994</year>
<publisher>Psygnosis</publisher>
<info name="serial" value="T-113035"/>
+ <info name="release" value="19940106" />
<info name="ring_code" value="CDAC-053800 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1132,8 +2495,58 @@
</part>
</software>
+ <software name="racinace">
+ <!-- Source: redump.org - http://redump.org/disc/24556/
+ <rom name="Racing Aces (USA).cue" size="1214" crc="84e9bb9b" md5="293ece452f4a2585f5dd28ece1607d37" sha1="cbdc9e1e27d8965b905e1de79b0f14790fba9b99"/>
+ <rom name="Racing Aces (USA) (Track 01).bin" size="14939904" crc="d33ff98a" md5="3796ee3952260af8fe9c0e278a588f73" sha1="9dad2c6fa3538e5fe4cd224c5bcc98f936ab2b73"/>
+ <rom name="Racing Aces (USA) (Track 02).bin" size="39513600" crc="222d5d07" md5="edcb22a6cec19af1c053fd996d6c891f" sha1="f9298af478aa3e0d30305c2e4913e16b63c91814"/>
+ <rom name="Racing Aces (USA) (Track 03).bin" size="35211792" crc="e0286531" md5="88cbec3cb418346162dd5b7e8e435c84" sha1="47b758b49d16e93e8fe52f755e528e5ee1634c04"/>
+ <rom name="Racing Aces (USA) (Track 04).bin" size="39913440" crc="361ebe02" md5="d0dcec33324879d683dd85bdc51d6501" sha1="1c06a23c51799b6e22a5fc59640185ad3fcfc57c"/>
+ <rom name="Racing Aces (USA) (Track 05).bin" size="43025136" crc="80d8565d" md5="d0396530831e9bf5d0bbe82acc83a157" sha1="3221a5f73fea623f77a85b23e880932f856555ab"/>
+ <rom name="Racing Aces (USA) (Track 06).bin" size="54161856" crc="e55af165" md5="2cda7c85d484f59f6bddd9f93729993f" sha1="5a8694a8667b4e32f20ba53e6af647a4848627c9"/>
+ <rom name="Racing Aces (USA) (Track 07).bin" size="22205232" crc="f80bd48d" md5="acfa538f2c24137990d8d755f6340711" sha1="0a9397a410f64d70fabb40606ba823abe90ea1fb"/>
+ <rom name="Racing Aces (USA) (Track 08).bin" size="22696800" crc="5daa9a86" md5="f3f036527fc8337c2f3dd9d29e96daf3" sha1="c90e7bcfe8d649bb45a3d5cc0070be766813a023"/>
+ <rom name="Racing Aces (USA) (Track 09).bin" size="19495728" crc="7e460cce" md5="4a7121ceb74dbc525d4ea7c1df008909" sha1="88acd7276c3f1e0be76f3ba03f8d9c94ca122c74"/>
+ <rom name="Racing Aces (USA) (Track 10).bin" size="11682384" crc="48ca92f2" md5="2cb9e07e5184267b917c96d92392d48e" sha1="e44908e8cd75cd18b0c2516af8ce9e35e42cce3e"/>
+ <rom name="Racing Aces (USA) (Track 11).bin" size="2227344" crc="2e31f14c" md5="a49444c570f9695bea3164d9c1005298" sha1="edfec8a88ae4dee5dc160cd6dfa3a00918f6800a"/>
+ -->
+ <description>Racing Aces (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4607"/>
+ <info name="ring_code" value="CDAC-055000 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="racing aces (usa)" sha1="a2038d4de56b75d61db6ad757919cca00cc91c95"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="rdf">
+ <!-- Source: redump.org - http://redump.org/disc/21450/
+ <rom name="RDF - Global Conflict (USA).cue" size="852" crc="29c93c89" md5="66072c384f42e3a2d08458dfa51d0f13" sha1="0ff3b55ddaf143adf19b72e007481bec8b555dd8"/>
+ <rom name="RDF - Global Conflict (USA) (Track 1).bin" size="256711392" crc="dcfb7926" md5="e7081e9e9d13cd14103ece2c6e665b08" sha1="f262c98ffa79ebb3e7e9155de467c87d45e55f81"/>
+ <rom name="RDF - Global Conflict (USA) (Track 2).bin" size="21607824" crc="7161c764" md5="c33f5809ca9b0c78c5f352500c7d586d" sha1="ac5f4fbde44e6c49c4875c5303ec66159eb9edcb"/>
+ <rom name="RDF - Global Conflict (USA) (Track 3).bin" size="18578448" crc="3df44cb6" md5="6cdeb88e7b3615da089b95579814b072" sha1="50220ca80360f02b7d5e6c6e288e6f1459c8d292"/>
+ <rom name="RDF - Global Conflict (USA) (Track 4).bin" size="11981088" crc="26300549" md5="41121988ba761f710087f9a052dce560" sha1="64ea38f0aa6b745dccc55a6d26e96c91a5ec04dd"/>
+ <rom name="RDF - Global Conflict (USA) (Track 5).bin" size="17952816" crc="eadd1cc3" md5="3c296585569962dd6c716ace054889d8" sha1="f6ce1f474d3195bd434b1bab4a426dea5cc932ff"/>
+ <rom name="RDF - Global Conflict (USA) (Track 6).bin" size="26038992" crc="9ddbd6a1" md5="6d601364efa4ac2c06991ee3d2680a4b" sha1="03aad35a3e1c8d8f690807d0dd44d4553c126728"/>
+ <rom name="RDF - Global Conflict (USA) (Track 7).bin" size="1524096" crc="d86d92d0" md5="ced8575ec23b7771e38b519dd87ea165" sha1="6088202d33d94614ca277bec0726a0a86d0ae030"/>
+ -->
+ <description>RDF - Global Conflict (USA)</description>
+ <year>1994</year>
+ <publisher>Absolute Entertainment</publisher>
+ <info name="serial" value="T-86025"/>
+ <info name="ring_code" value="SEGAT86025 R1F MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="rdf - global conflict (usa)" sha1="32cf1e068598e385962db8de493eb191aab7716b"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="revninja">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17202/
<rom name="Revenge of the Ninja (USA).cue" size="582" crc="fd8526de" />
<rom name="Revenge of the Ninja (USA) (Track 1).bin" size="325801392" crc="33c4b555" />
<rom name="Revenge of the Ninja (USA) (Track 2).bin" size="3544464" crc="59fa6f1b" />
@@ -1154,7 +2567,7 @@
</software>
<software name="risedrg">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/11784/
<rom name="Rise of the Dragon (USA).cue" size="572" crc="0c8cddf9" />
<rom name="Rise of the Dragon (USA) (Track 1).bin" size="129028368" crc="e2d7b047" />
<rom name="Rise of the Dragon (USA) (Track 2).bin" size="15864240" crc="3115d3ca" />
@@ -1162,20 +2575,20 @@
<rom name="Rise of the Dragon (USA) (Track 4).bin" size="21530208" crc="7552ef3d" />
<rom name="Rise of the Dragon (USA) (Track 5).bin" size="29244768" crc="e5463515" />
-->
- <description>Rise of the Dragon (USA)</description>
+ <description>Rise of the Dragon (USA, Rev. A)</description>
<year>1994</year>
<publisher>Dynamix</publisher>
<info name="serial" value="T-110035"/>
<info name="ring_code" value="S604430RE R1D MFD BY JVC, S604430RE R2D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="rise of the dragon (usa)" sha1="412d819633740c597b67591cf12fdac7c7081194"/>
+ <disk name="rise of the dragon (usa, rev. a)" sha1="412d819633740c597b67591cf12fdac7c7081194"/>
</diskarea>
</part>
</software>
<software name="risedrga" cloneof="risedrg">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17160/
<rom name="Rise of the Dragon (USA) (Alt).cue" size="602" crc="99d5038d" />
<rom name="Rise of the Dragon (USA) (Alt) (Track 1).bin" size="128993088" crc="4d6ba481" />
<rom name="Rise of the Dragon (USA) (Alt) (Track 2).bin" size="15866592" crc="e01f55ca" />
@@ -1183,73 +2596,232 @@
<rom name="Rise of the Dragon (USA) (Alt) (Track 4).bin" size="21546672" crc="fe40c7a8" />
<rom name="Rise of the Dragon (USA) (Alt) (Track 5).bin" size="29242416" crc="0d9fec14" />
-->
- <description>Rise of the Dragon (USA, Alt)</description>
- <year>1994</year>
+ <description>Rise of the Dragon (USA)</description>
+ <year>1993</year>
<publisher>Dynamix</publisher>
- <info name="serial" value="T-110035"/>
+ <info name="serial" value="4301"/>
+ <info name="release" value="199303xx" />
<info name="ring_code" value="CDAC-040300 1"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="rise of the dragon (usa) (alt)" sha1="e84d20447bec4c5bed1bfe27372c5a927d5fbdb2"/>
+ <disk name="rise of the dragon (usa)" sha1="e84d20447bec4c5bed1bfe27372c5a927d5fbdb2"/>
</diskarea>
</part>
</software>
- <software name="sshark">
- <!-- source redump.org
+ <software name="roadaven">
+ <!-- Source: redump.org - http://redump.org/disc/29313/
+ <rom name="Road Avenger (USA).cue" size="453" crc="9e7d5e08" md5="840ebb398cce8d27cf3a5d253d8b575d" sha1="cd2b55540b911786886f43aae99e228d9f85efc5"/>
+ <rom name="Road Avenger (USA) (Track 1).bin" size="317816352" crc="cf3bd177" md5="71e1578e091e0d5df4b07f4f26e4d2c9" sha1="9cf7095ab8f7a5aa5df046d0b665263f4f506f19"/>
+ <rom name="Road Avenger (USA) (Track 2).bin" size="2664816" crc="5ef6a4c1" md5="3c3aab85aca0bf19bf2dd24d98f4e0e2" sha1="13ff4a9ceaf86c8eaa2e9545debf93795f83178e"/>
+ <rom name="Road Avenger (USA) (Track 3).bin" size="2065056" crc="3234951b" md5="403fb20b63be8f4ca9e94efdc6ed5a20" sha1="cfbf3ec5d558150cea39be7ad4644da7b7e47680"/>
+ <rom name="Road Avenger (USA) (Track 4).bin" size="13707456" crc="60656878" md5="1fb43c548570fbd61016ed3d7730e8c4" sha1="e350748a37d80e93ad74132b78ec9cd96e44acb4"/>
+ -->
+ <description>Road Avenger (USA)</description>
+ <year>1993</year>
+ <publisher>Renovation</publisher>
+ <info name="serial" value="T-6207"/>
+ <info name="release" value="199303xx" />
+ <info name="ring_code" value="SEGA6207 R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="road avenger (usa)" sha1="05fa6ae67687aacdf99fe939b0f04ce13b6d527b"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="mmpr">
+ <!-- Source: redump.org - http://redump.org/disc/19474/
+ <rom name="Mighty Morphin Power Rangers (USA).cue" size="261" crc="bd9ee789" md5="99b64ed4df709f6c01076333c506bc6b" sha1="87262cbc791ef6018748ac2b654c5f56b50f59e6"/>
+ <rom name="Mighty Morphin Power Rangers (USA) (Track 1).bin" size="465155040" crc="a7cf6c1b" md5="8ce1c15622e66652b85efdd7732f16bc" sha1="a93a3d0e8d065909dbe5b657796642b88dfc0d3b"/>
+ <rom name="Mighty Morphin Power Rangers (USA) (Track 2).bin" size="7596960" crc="da3cf811" md5="712144d1835d67abe6ae3b23d16514f3" sha1="d94341b152360c43ec8660a5cfbd4251ec3f4c62"/>
+ -->
+ <description>Saban's Mighty Morphin Power Rangers (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4442"/>
+ <info name="release" value="19950502" />
+ <info name="ring_code" value="SEGA4442 R1J"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="saban's mighty morphin power rangers (usa)" sha1="fffd902d4ab06d946c47b7eaa40cc5ddd9963299"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This was bundled together with a Sega-CD device, along with Sherlock Holmes: Consulting Detective Vol. I. -->
+ <software name="segaac4a" cloneof="segaac4">
+ <!-- Source: redump.org - http://redump.org/disc/24519/
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1).cue" size="1757" crc="e8f8a601" md5="ad2f339bd1053b415d2aa77977523926" sha1="f2df03f67c2a6af397ca1856f2f472509a2ac5d8"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 01).bin" size="25149936" crc="54797302" md5="c263f1dbad75b50acbf0a8a92bb9a8bb" sha1="49edf796c8a5bf5da1aae61b78b548a622a3f9c1"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 02).bin" size="16313472" crc="71366051" md5="7690c1abaafd229284a54411c75501cd" sha1="d8323c5e37fb4fc90a8963d48a6beeba4be46dba"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 03).bin" size="3826704" crc="fdd993ae" md5="94fcd04749515eec207b9adbf0990e6f" sha1="6b55d87143dd6acb5150e489941d83a734713613"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 04).bin" size="8996400" crc="37fd9a9b" md5="93da6fbece106ab728ac355da7de137c" sha1="20ae722784d894e955b8834c1a28fb7c85605b3d"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 05).bin" size="28929600" crc="e7e39cbd" md5="304a272c9d7266d4e0b87537d3086624" sha1="395f63ac8544bd7230d58916c1d5ab0fac9f3ac2"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 06).bin" size="23912784" crc="52bf2c45" md5="0d087e09958b4786d2e77f0c19ea3c65" sha1="e85e41bb80a6734976a90a934603181017f55249"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 07).bin" size="15810144" crc="b7799e46" md5="9b63d7ccad4127622cfe14993df53755" sha1="9b04dde1a7cee4e9a1d3454623bc19a30a3261b1"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 08).bin" size="21791280" crc="ad9ea7b3" md5="2109e2c3acc33e21fcf900562d0de703" sha1="709d6773832b8fb0813183f23e5620be14333259"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 09).bin" size="25646208" crc="90ebae79" md5="6e14ada83497fc081096b988ae85553a" sha1="1440cb31a6f34f901ca072db981dbb123e8bfa9a"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 10).bin" size="23696400" crc="3e80df16" md5="04df1163c2858227187c736c02fe01ef" sha1="05990b48f2b26bd1b523baa684b414516330c2a8"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 11).bin" size="3709104" crc="e6b94a35" md5="307821e989681d84156deae0fde99aa6" sha1="8ddf9194867c8e484c536fbcd3200d3c89fba929"/>
+ <rom name="Sega Classics Arcade Collection (USA) (RE) (4-in-1) (Track 12).bin" size="12173952" crc="99653684" md5="a4dae7ac971f906ec16b2f7494ac4272" sha1="d0bb6b3e99fd29a53759acc211b0215bff37ca25"/>
+ -->
+ <description>Sega Classics Arcade Collection (USA, 4 in 1, Alt)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="19921015" />
+ <info name="ring_code" value="SEGA4126RE R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sega classics arcade collection (usa, 4 in 1, alt)" sha1="c587085ec1b3a2cea0575a5bf90abfd3789c3779"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This was bundled together with a Sega-CD device, along with Ecco the Dolphin. -->
+ <software name="segaac5">
+ <!-- Source: redump.org - http://redump.org/disc/21496/
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1).cue" size="1674" crc="cddb46f5" md5="354f5361fd5125cc2a194698d66e1aad" sha1="16e4b4129038ae845da9c10a98edbe0668cd5266"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 01).bin" size="25893168" crc="641e1b23" md5="03d1d2c51d6c1df30a94c7367118318a" sha1="370dec46d11410f98037232c37908d5c9e9637b1"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 02).bin" size="16313472" crc="71366051" md5="7690c1abaafd229284a54411c75501cd" sha1="d8323c5e37fb4fc90a8963d48a6beeba4be46dba"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 03).bin" size="3826704" crc="ca9de737" md5="f04ec717f2c8d86bd6ca1673e2c0df3e" sha1="d6b19d3eb6f636d1b3b22ed5df6617f40a333d83"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 04).bin" size="8996400" crc="0a0d4490" md5="9cd7e242001872b385630e8226d05068" sha1="5477bbdf347c0390de7386edc4ca5a65b16a9721"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 05).bin" size="27450192" crc="6e931585" md5="f3d34517a37f97bd3e4e377a34cacd7a" sha1="95edc891075c551f54db4a4d1de5fb6c99f26ef0"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 06).bin" size="23912784" crc="4e97d977" md5="d5cff93280541dc5b898ffae1c3115f3" sha1="74f2718b0ebcdfdd92d542af0d364f28520aab9b"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 07).bin" size="15810144" crc="ce04e6d4" md5="3df3d142e99a903be1b1c2bad557e6a2" sha1="86fc28d4456b6b75bf4be1d867df83eae5956853"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 08).bin" size="21791280" crc="7c7a0b77" md5="ef40614d1f3d858f89498555f31e1518" sha1="ca033ae541f5b274e50b3f910527cb6a308dd214"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 09).bin" size="25646208" crc="8a504a4a" md5="67fe73406dba47eaf9f085a9cbb683d4" sha1="bfa8ed9eca874c331415f135affa10feecafd21f"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 10).bin" size="23696400" crc="9d8b841a" md5="295f4cc267afe27acd22e5a48fa76e56" sha1="e659caf79b1a7f87f1e2b1b7de2ebd7dc0613e32"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 11).bin" size="3709104" crc="0a361f9b" md5="25326e8df4b73084ff324b676467eee6" sha1="a3a9d0f6fe8e1418ffcf4fadd78c3f89f2b2388a"/>
+ <rom name="Sega Classics Arcade Collection (USA) (5-in-1) (Track 12).bin" size="12171600" crc="4725f43a" md5="7d0389871542228ccd63188cfe373225" sha1="5f231c6f98dd6572c7bc33ff8185302dc4a7b917"/>
+ -->
+ <description>Sega Classics Arcade Collection (USA, 5 in 1)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="ring_code" value="CDAC-056800 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sega classics arcade collection (usa, 5 in 1)" sha1="9f4bdadabba7d8998b701a3becd2520d4d2a037d"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="ssharka" cloneof="sshark">
+ <!-- Source: redump.org - http://redump.org/disc/20215/
+ <rom name="Sewer Shark (USA).cue" size="83" crc="1db0c2a0" md5="d952dfe13456fd6800109e173b4b8657" sha1="e306c648550a6903078abb9a8da66cc8764cde60"/>
+ <rom name="Sewer Shark (USA).bin" size="488418672" crc="9868681b" md5="02f292b31c5cd336b4e18c861518bee2" sha1="94ca329bbe4eb70cf820fe502c37091787f5a551"/>
+ -->
+ <description>Sewer Shark (USA)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-6201"/>
+ <info name="release" value="199212xx" />
+ <info name="ring_code" value="CDRM-1033200 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sewer shark (usa)" sha1="65eb30fa88be9de6a7ceb980b4016241c5aafe0f"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="ssharkb" cloneof="sshark">
+ <!-- Source: redump.org - http://redump.org/disc/6135/
<rom name="Sewer Shark (USA).cue" size="83" crc="1db0c2a0" />
<rom name="Sewer Shark (USA).bin" size="488418672" crc="19f2fe42" />
-->
- <description>Sewer Shark (USA)</description>
+ <description>Sewer Shark (USA, Rev. A)</description>
<year>1992</year>
<publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93015"/>
+ <info name="serial" value="T-6201"/>
+ <info name="release" value="199212xx" />
<info name="ring_code" value="CDRM-1033200 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sewer shark (usa)" sha1="0f339806d73c473c20906935836d49457339430f"/>
+ <disk name="sewer shark (usa, rev. a)" sha1="0f339806d73c473c20906935836d49457339430f"/>
</diskarea>
</part>
</software>
- <software name="ssharkb" cloneof="sshark">
- <!-- source redump.org
+ <!-- This disc was bundled together with a Sega-CD device. -->
+ <software name="sshark">
+ <!-- Source: redump.org - http://redump.org/disc/17161/
+ <rom name="Sewer Shark (USA) (Bundle) (Alt).cue" size="234" crc="ff1908ab" />
+ <rom name="Sewer Shark (USA) (Bundle) (Alt) (Track 1).bin" size="487360272" crc="57b21ebe" />
+ <rom name="Sewer Shark (USA) (Bundle) (Alt) (Track 2).bin" size="2234400" crc="9705cbfe" />
+ -->
+ <description>Sewer Shark (USA, Rev. B)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4101"/>
+ <info name="release" value="199212xx" />
+ <info name="ring_code" value="610-5574P-00086 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sewer shark (usa, rev. b)" sha1="0353015285afb2fa5119b3e700725d6b8e46d680"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This disc was bundled together with a Sega-CD device. -->
+ <software name="ssharkc" cloneof="sshark">
+ <!-- Source: redump.org - http://redump.org/disc/24552/
+ <rom name="Sewer Shark (USA) (Rev B) (Alt 1).cue" size="259" crc="2e7eb382" md5="b48b4d62a9654af9f2a7881147cc0c68" sha1="e4f116197617758c52d8cb74deae1d82c9ba13c0"/>
+ <rom name="Sewer Shark (USA) (Rev B) (Alt 1) (Track 1).bin" size="487360272" crc="57b21ebe" md5="b05ca93f4b221bee8b206b6e368bc699" sha1="a14d881c0956434ccd04b0b86f8afe6b214f1f8a"/>
+ <rom name="Sewer Shark (USA) (Rev B) (Alt 1) (Track 2).bin" size="2234400" crc="ff2f7adc" md5="af34f10417653d93e6ed0ad3cda9f9a8" sha1="d8ee48d98af0fc667ed5d999b1a32365d7ea892b"/>
+ -->
+ <description>Sewer Shark (USA, Rev. B, Alt)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="199212xx" />
+ <info name="ring_code" value="CDRM-1095270 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sewer shark (usa, rev. b, alt)" sha1="9229f299de538d02ebf6d8e8a44c0066bc879077"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This disc was bundled together with a Sega-CD device. -->
+ <software name="ssharkd" cloneof="sshark">
+ <!-- Source: redump.org - http://redump.org/disc/29654/
<rom name="Sewer Shark (USA) (Bundle).cue" size="222" crc="bef879f8" />
<rom name="Sewer Shark (USA) (Bundle) (Track 1).bin" size="487360272" crc="57b21ebe" />
<rom name="Sewer Shark (USA) (Bundle) (Track 2).bin" size="2234400" crc="75573804" />
-->
- <description>Sewer Shark (USA, Bundle)</description>
+ <description>Sewer Shark (USA, Rev. B, Alt 2)</description>
<year>1992</year>
<publisher>Sega</publisher>
- <info name="serial" value="4101"/>
+ <info name="release" value="199212xx" />
<info name="ring_code" value="CDRM-1095270 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sewer shark (usa) (bundle)" sha1="b5cd7913425b5f14c7fd6a5df9dc66a40022edc6"/>
+ <disk name="sewer shark (usa, rev. b, alt 2)" sha1="b5cd7913425b5f14c7fd6a5df9dc66a40022edc6"/>
</diskarea>
</part>
</software>
- <software name="ssharkba" cloneof="sshark">
- <!-- source redump.org
- <rom name="Sewer Shark (USA) (Bundle) (Alt).cue" size="234" crc="ff1908ab" />
- <rom name="Sewer Shark (USA) (Bundle) (Alt) (Track 1).bin" size="487360272" crc="57b21ebe" />
- <rom name="Sewer Shark (USA) (Bundle) (Alt) (Track 2).bin" size="2234400" crc="9705cbfe" />
+ <!-- This game was only ever bundled together with a Sega-CD device and Sega Classics Arcade Collection. -->
+ <software name="holmes">
+ <!-- Source: redump.org - http://redump.org/disc/24517/
+ <rom name="Sherlock Holmes - Consulting Detective (USA).cue" size="281" crc="5c2bcbff" md5="9504970bad61ba73e2b27b99a2965cff" sha1="34ceaafb35b61e4b1b7ca7db60fec5ccaf76569e"/>
+ <rom name="Sherlock Holmes - Consulting Detective (USA) (Track 1).bin" size="750673728" crc="1fbc2139" md5="989bba8d4f51d2d311686582a387d4f0" sha1="1930786b3936bcd6f8063897683ac30499477c38"/>
+ <rom name="Sherlock Holmes - Consulting Detective (USA) (Track 2).bin" size="11094384" crc="e23049e3" md5="99111d538eb50cfff63ce5c0eb73f9e6" sha1="6ae64a75a067f1a0929466b49db6549c45150303"/>
-->
- <description>Sewer Shark (USA, Bundle, Alt)</description>
+ <description>Sherlock Holmes - Consulting Detective Vol. I (USA)</description>
<year>1992</year>
<publisher>Sega</publisher>
- <info name="serial" value="4101"/>
- <info name="ring_code" value="610-5574P-00086 1"/>
+ <info name="alt_title" value="Sherlock Holmes - Consulting Detective (Box)" />
+ <info name="release" value="19921015" />
+ <info name="ring_code" value="CDAC-031300 1, CDAC-031300 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sewer shark (usa) (bundle) (alt)" sha1="0353015285afb2fa5119b3e700725d6b8e46d680"/>
+ <disk name="sherlock holmes - consulting detective vol. i (usa)" sha1="32d2f47f459927cd162376e46d6a02430572a82a"/>
</diskarea>
</part>
</software>
<software name="holmes2">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17162/ http://redump.org/disc/17163/
<rom name="Sherlock Holmes - Consulting Detective Vol. II (USA) (Disc 1).cue" size="292" crc="a33aa103" />
<rom name="Sherlock Holmes - Consulting Detective Vol. II (USA) (Disc 1) (Track 1).bin" size="529374048" crc="94a913b7" />
<rom name="Sherlock Holmes - Consulting Detective Vol. II (USA) (Disc 1) (Track 2).bin" size="10936800" crc="cd4a8412" />
@@ -1259,9 +2831,10 @@
<rom name="Sherlock Holmes - Consulting Detective Vol. II (USA) (Disc 2) (Track 2).bin" size="10936800" crc="38994f15" />
-->
<description>Sherlock Holmes - Consulting Detective Vol. II (USA)</description>
- <year>1994</year>
+ <year>1993</year>
<publisher>Sega</publisher>
<info name="serial" value="4653"/>
+ <info name="release" value="199305xx" />
<info name="ring_code" value="CDAC-041000 1 (Disc 1), CDAC-041100 2 (Disc 2)"/>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
@@ -1279,7 +2852,7 @@
</software>
<software name="shinfrce">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/2702/
<rom name="Shining Force CD (USA).cue" size="4054" crc="ede67263" />
<rom name="Shining Force CD (USA) (Track 01).bin" size="68666640" crc="a85fa1a0" />
<rom name="Shining Force CD (USA) (Track 02).bin" size="1764000" crc="cf2919d5" />
@@ -1320,7 +2893,7 @@
<description>Shining Force CD (USA)</description>
<year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4656"/>
+ <info name="serial" value="MK-4656"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="shining force cd (usa)" sha1="ddd94e30ba53faf04336b5854dd4e0d9980067b5"/>
@@ -1329,7 +2902,7 @@
</software>
<software name="shinfrcea" cloneof="shinfrce">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3875/
<rom name="Shining Force CD (USA) (Alt).cue" size="4264" crc="d7af633d" />
<rom name="Shining Force CD (USA) (Alt) (Track 01).bin" size="68666640" crc="a85fa1a0" />
<rom name="Shining Force CD (USA) (Alt) (Track 02).bin" size="1764000" crc="3ba2537d" />
@@ -1370,17 +2943,17 @@
<description>Shining Force CD (USA, Alt)</description>
<year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4656"/>
+ <info name="serial" value="MK-4656"/>
<info name="ring_code" value="3/95 6RA3 1008604656, 3/95 5RA1 1008604656"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="shining force cd (usa) (alt)" sha1="ddb304849d01df44251d69b890df47c8db1d8642"/>
+ <disk name="shining force cd (usa, alt)" sha1="ddb304849d01df44251d69b890df47c8db1d8642"/>
</diskarea>
</part>
</software>
<software name="silpheed">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/17203/
<rom name="Silpheed (USA).cue" size="846" crc="ec090dec" />
<rom name="Silpheed (USA) (Track 1).bin" size="369233424" crc="bddb8612" />
<rom name="Silpheed (USA) (Track 2).bin" size="16097088" crc="3f9c5a60" />
@@ -1395,6 +2968,7 @@
<year>1993</year>
<publisher>Sega</publisher>
<info name="serial" value="4423"/>
+ <info name="release" value="199310xx" />
<info name="ring_code" value="SEGA4423 R2D MFD BY JVC, SEGA4423RE R2D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1403,8 +2977,131 @@
</part>
</software>
+ <software name="slamcity" >
+ <!-- Source: redump.org - http://redump.org/disc/28031/ http://redump.org/disc/28032/ http://redump.org/disc/28033/ http://redump.org/disc/28034/
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 1) (Fingers).cue" size="301" crc="3f50c8bc" md5="35ca36913af0a3df72cf8c3492eceec1" sha1="e3511c717bb78966f75e0dd4a2190b5d390faefe"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 1) (Fingers) (Track 1).bin" size="587070960" crc="becd1484" md5="99a012c46ec31fec5f9538eaa510bd5a" sha1="f32cf26f6fa4acf12807e7f1064e9e202d11cff3"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 1) (Fingers) (Track 2).bin" size="17122560" crc="e5008538" md5="6591a3d2fc756fb0f9f128d21af5e182" sha1="ba88dd54677ea1f1618761a50e4ab88da8c0e264"/>
+
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 2) (Juice).cue" size="297" crc="75d2a63d" md5="6d0113ae09701a38d2ec399652594514" sha1="b5c6f12707a969292565fcf80e01ed615ef800ed"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 2) (Juice) (Track 1).bin" size="567038976" crc="a73564e1" md5="f5bed8b1d3de6a80320b430594b4d772" sha1="dd4f6a8a7f6a9b296e25b8db8871ab3fd9e7443e"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 2) (Juice) (Track 2).bin" size="17477712" crc="83bf5f2d" md5="319ce92f1253b2533eb926415e6916a4" sha1="9fb885f1a5bdd7fae6bcdc737b1b268dc90d2016"/>
+
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 3) (Mad Dog).cue" size="301" crc="c701cd59" md5="883fb65ee2ecf7ac26861ff93cbf0ce1" sha1="de1d961f1bbdaf46f197d6ffa9fc1de245453327"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 3) (Mad Dog) (Track 1).bin" size="573643392" crc="53f0dc45" md5="7f5e4a68b9435a010c1dae06e42c5713" sha1="e3f4af7082ccce7410a4413631e2064ced1b3f1f"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 3) (Mad Dog) (Track 2).bin" size="17122560" crc="0e803193" md5="a0c6134727d0c972f5fb76d4cd2ccabb" sha1="88492bc31461c193cda951ffbeaeedd022f7ab47"/>
+
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 4) (Smash).cue" size="297" crc="7c9f6cc5" md5="bdfe12aec4a8ddcbb3d98f0c2d11f8cc" sha1="3eb3d1f45cd765957c564e75726a16af6e98c272"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 4) (Smash) (Track 1).bin" size="541714992" crc="d1bc5a00" md5="7b0ef7c4df8f2ac1868689e5d0f5725c" sha1="5f9cdffe15d4f577b2777ed27ade62174e1be36b"/>
+ <rom name="Slam City with Scottie Pippen (USA) (Disc 4) (Smash) (Track 2).bin" size="17122560" crc="a47ac691" md5="2f2fa2e38081e85dcfb5e64e6e5aae53" sha1="d2247274b9e36c085565490311652751aa3d3168"/>
+ -->
+ <description>Slam City with Scottie Pippen (USA, Rev. A)</description>
+ <year>1994</year>
+ <publisher>Digital Pictures</publisher>
+ <info name="serial" value="T-162035"/>
+ <info name="release" value="199411xx" />
+ <info name="ring_code" value="GW 02711.1 RE-1 SRCR##01 (Disc 1) / GW 02711.2 RE-1 SRCR**01 (Disc 2) / GW 02711.3 RE-1 SRCR##01 (Disc 3) / GW 02711.4 RE-1 SRCR##01 (Disc 4)"/>
+ <part name="cdrom1" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 1 - Fingers" />
+ <diskarea name="cdrom1">
+ <disk name="slam city with scottie pippen (usa, alt) (disc 1)" sha1="637ceb49d6e9ff89009b26d848b6097a54969d65"/>
+ </diskarea>
+ </part>
+ <part name="cdrom2" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 2 - Juice" />
+ <diskarea name="cdrom2">
+ <disk name="slam city with scottie pippen (usa, alt) (disc 2)" sha1="e5cc52a7686824b14ee471682f30b0b4a09dbe97"/>
+ </diskarea>
+ </part>
+ <part name="cdrom3" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 3 - Mad Dog" />
+ <diskarea name="cdrom3">
+ <disk name="slam city with scottie pippen (usa, alt) (disc 3)" sha1="6d144435110bc0fcd97313c75dbb56f472e4e123"/>
+ </diskarea>
+ </part>
+ <part name="cdrom4" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 4 - Smash" />
+ <diskarea name="cdrom4">
+ <disk name="slam city with scottie pippen (usa, alt) (disc 4)" sha1="ddffdf4dd92fcb3f93f285ff24384815ba401cab"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="snatcher">
+ <!-- Source: redump.org - http://redump.org/disc/20559/
+ <rom name="Snatcher (USA).cue" size="2271" crc="13845fdf" md5="fe305d5467811e10fee501bc9135efb5" sha1="c6bdafb2bdb8b2558c8104549cbfdd9ef9a1817f"/>
+ <rom name="Snatcher (USA) (Track 01).bin" size="131744928" crc="13ad0387" md5="8a4f5185fa0754e073e331bebd91bbb4" sha1="1f4164205ed736a0d9a03eb7972868e9aa737d35"/>
+ <rom name="Snatcher (USA) (Track 02).bin" size="1164240" crc="d00f54c4" md5="cc325c2484ff41e7d4b0e9060894146b" sha1="ac73d5629875586db0a5d776a13beef377d9a854"/>
+ <rom name="Snatcher (USA) (Track 03).bin" size="23802240" crc="40a49fba" md5="786b30a8b252a61fc91bbabcf4685edb" sha1="43f02ad9d970492426732bfede4c76a0cbf202a2"/>
+ <rom name="Snatcher (USA) (Track 04).bin" size="48345360" crc="e6043e39" md5="6230808a2c1f340f8415cdc49326e155" sha1="ce50b9dad31f960905c5c8d105051b65d45bcada"/>
+ <rom name="Snatcher (USA) (Track 05).bin" size="3716160" crc="c32e9ebe" md5="80ef48d3a8cd6d6d8cf7db175656571a" sha1="9e1374fc524759ba8ceccebad4047e136852fcd4"/>
+ <rom name="Snatcher (USA) (Track 06).bin" size="12740784" crc="a7705e57" md5="03be927bbc866c3158a5a7af03634505" sha1="0310fe11504dc05388a5e025ae1ca0af4fe0e0d6"/>
+ <rom name="Snatcher (USA) (Track 07).bin" size="29404704" crc="fccd71c5" md5="e4d03194b32eca0edb65b92f1f5299a7" sha1="8a124916025294432adee4dd75baf9082d5d7f7b"/>
+ <rom name="Snatcher (USA) (Track 08).bin" size="37843680" crc="2b5cf3d5" md5="749bea144eb88ee76cd19fc93a89adbb" sha1="4d7411ec40205baf5c294f7e16813de8eb493f4b"/>
+ <rom name="Snatcher (USA) (Track 09).bin" size="15412656" crc="afe3dcbf" md5="091c2fe24eee2cc5969a5fd0a4775c10" sha1="697295e985cefec143a2981734d3f93066f16dc7"/>
+ <rom name="Snatcher (USA) (Track 10).bin" size="22769712" crc="9832f63e" md5="f275214198e76b425f76b825fb870dc5" sha1="a27713205d8fac230e54c51cfd773762eb4b5d23"/>
+ <rom name="Snatcher (USA) (Track 11).bin" size="19164096" crc="4150d5c5" md5="7cac1aca396c2b7891d4f86652c1b51e" sha1="00e8f43bf89470b7cbd596c93ef57dcb198d6223"/>
+ <rom name="Snatcher (USA) (Track 12).bin" size="47576256" crc="d6bb6cba" md5="533669bf6b1b22bce349e31d1328be18" sha1="17664b3ab873cb71c158f9df4d28b77fc6620138"/>
+ <rom name="Snatcher (USA) (Track 13).bin" size="20278944" crc="477d9244" md5="f30b732535691c71494c4ab54c375cd3" sha1="a8d0eb4929d5560e631500734e0b309dbc2d5bd9"/>
+ <rom name="Snatcher (USA) (Track 14).bin" size="14445984" crc="749b2596" md5="1af1918aa779911eca30a92ca28bdc05" sha1="ee02d2d226d1a668b11f9b73daaf713212e0492b"/>
+ <rom name="Snatcher (USA) (Track 15).bin" size="13778016" crc="a8562533" md5="48c5cfedac8956afde3e5fb4965deeb2" sha1="644ec8b9ed2e35f00fc40bda24f39f442f72a4e2"/>
+ <rom name="Snatcher (USA) (Track 16).bin" size="3027024" crc="71af88c7" md5="774de00f0effe67e1d2079efbdfc13b5" sha1="1bc854049cbd19f5c5c91eff71731c8a5f844f29"/>
+ <rom name="Snatcher (USA) (Track 17).bin" size="17461248" crc="562edc62" md5="44e8f8cf01786be03858961bdb103c73" sha1="49802ef9c3a3e18dd8e9853e45c8b13069f0a538"/>
+ <rom name="Snatcher (USA) (Track 18).bin" size="8314320" crc="f0a265b6" md5="6a83142465025eb01057686d903893ad" sha1="f0c798e93f582e18209d47631f2e84da2bf008cf"/>
+ <rom name="Snatcher (USA) (Track 19).bin" size="74551344" crc="98f7b916" md5="620a6469612aba56a592ea147c90a915" sha1="07d34b1a8d942d2e4e0309c1682a5a76d72276a4"/>
+ <rom name="Snatcher (USA) (Track 20).bin" size="5844720" crc="b5341397" md5="006364d3667b62b2371a85a2dca67ed5" sha1="5d9fa0f6b1f5e3611df29159cb9d7ce132ae6fb1"/>
+ <rom name="Snatcher (USA) (Track 21).bin" size="73805760" crc="cde0a9e4" md5="f22950f393f8d0829a556ff5685a4ce9" sha1="6144d301e257da0709dddaf7df9ad510006a015e"/>
+ -->
+ <description>Snatcher (USA)</description>
+ <year>1994</year>
+ <publisher>Konami</publisher>
+ <info name="serial" value="T-95035"/>
+ <info name="release" value="19941130" />
+ <info name="ring_code" value="T95035-U12 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="snatcher (usa)" sha1="815edc5df272e4b10edd5919b29c3a996a1799c2"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This game was only ever bundled together with a Sega-CD device. -->
+ <software name="solfeace">
+ <!-- Source: redump.org - http://redump.org/disc/24480/
+ <rom name="Sol-Feace (USA) (RE2).cue" size="2093" crc="c5a409c6" md5="ffdcd949f1487eab3d8f4c8ce67da61e" sha1="db492dbb3499a4d617cc1c706d6c9c4400d51565"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 01).bin" size="6326880" crc="12d07dc0" md5="81b8e0b7d4ae4bf1c89c1c8afdef9a90" sha1="76425f2e2f8812da76beba73837a8f5f7a9b759e"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 02).bin" size="1996848" crc="9103f7fc" md5="6b0f10b1c55dd007917e00df10149ded" sha1="719ca5a54c8b92bd9f451ffa5381356c5e06f83c"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 03).bin" size="2885904" crc="1981df59" md5="2323b16ba98bbf128374bd2ca431122b" sha1="2aca00ce09808ef38911a0699b69b494a2471764"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 04).bin" size="2904720" crc="66e85f9e" md5="62f6dcc48b709ddfead8a2acb22e2ab8" sha1="8f13aca601efac664610cd85dd449088d2840ed8"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 05).bin" size="28496832" crc="cd136e80" md5="621fad0d8dda0df8529d2b594dfd80ec" sha1="fbf962cd09c87c327943c1463c6d22a2dd66abfa"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 06).bin" size="31272192" crc="70fbbeb3" md5="c58f7cbba6e93988553fc0554b0d21ea" sha1="ee72c14fb2d98af4f6e3d7a2181368618893dc26"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 07).bin" size="21509040" crc="ae21a3b1" md5="ef4ae40ee65ed91af39b87abb8c98f42" sha1="537e6d245f59238acfaaca06ab2923d18602fa23"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 08).bin" size="60498144" crc="7e3f3ca6" md5="d7539f45baec6e5d56820105a005c25b" sha1="3df7f74177256eeafa5ca9577ef4da767ca3662e"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 09).bin" size="27965280" crc="2d843bc9" md5="522ce01cc1e63a647c2ea1438f518ce9" sha1="1920ca3b86c5a9928c9f2a2017975081e02e2edb"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 10).bin" size="48225408" crc="a47b24bb" md5="11270f2a19ba1999fe24073468fb9724" sha1="927eac59569f1e2c3d97574e7a7ec6ac6a8d34d1"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 11).bin" size="19698000" crc="7488baa6" md5="037736913e75e0a8b8fb14d311cf05c4" sha1="90e2393e914699f0c6fec83d513a2ef157c8e663"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 12).bin" size="33163200" crc="31ed165f" md5="799e3bec3f066e8a7ac83eab7f764b50" sha1="b238c6f9d03f6e1bf220aef0d976350aebc65a35"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 13).bin" size="57687504" crc="b4f79af3" md5="2d6b244db2e5f546358e2ae969e37457" sha1="24e599084949fcc6bdc55303901c4f3f1dbbf912"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 14).bin" size="27257328" crc="5234ccf5" md5="c0503776f27400986efbdef83e030837" sha1="d8f8560e6b224df19c3a7853b96d9efb89b04696"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 15).bin" size="30385488" crc="4db4a147" md5="53d296a666207a552eb50142d1459427" sha1="67611ef11aaea617fa264d682596841e89e0ef52"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 16).bin" size="39196080" crc="9f824f72" md5="5f37fa838beae0feeee2d681000022b4" sha1="c8592e8ea11c5b2c5a465d74638a494d7944bddd"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 17).bin" size="17148432" crc="6a45d032" md5="941361d31fe737631b36f071c934498e" sha1="c5d5118875b3cfdb1ef16e7b2d335a7f11a22d5c"/>
+ <rom name="Sol-Feace (USA) (RE2) (Track 18).bin" size="23696400" crc="6bac6608" md5="5e74d5843f7ae7cef2710a13639f9d23" sha1="3c88f83c059cdba1bb21ca0d7da52be9b96d2700"/>
+ -->
+ <description>Sol-Feace (USA)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="release" value="19921015" />
+ <info name="ring_code" value="SEGA4130RE2 R3C MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sol-feace (usa)" sha1="498ebd9c1fe4bd2f84cf6c32829b68e471eb3b07"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="soniccd">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/29188/
<rom name="Sonic CD (USA).cue" size="3797" crc="086e1953" />
<rom name="Sonic CD (USA) (Track 01).bin" size="139381872" crc="a6184e05" />
<rom name="Sonic CD (USA) (Track 02).bin" size="1086624" crc="15012c2f" />
@@ -1442,10 +3139,13 @@
<rom name="Sonic CD (USA) (Track 34).bin" size="16233504" crc="b9f018f8" />
<rom name="Sonic CD (USA) (Track 35).bin" size="32111856" crc="4194928d" />
-->
- <description>Sonic CD (USA)</description>
+ <description>Sonic the Hedgehog CD (USA)</description>
<year>1993</year>
<publisher>Sega</publisher>
<info name="serial" value="4407"/>
+ <info name="alt_title" value="Sonic CD (Box)" />
+ <info name="release" value="19931119" />
+ <info name="ring_code" value="SEGA4407 R1C MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="sonic cd (usa)" sha1="ae08e06cc13b49b75c45e69334b2bdea4974454f"/>
@@ -1453,8 +3153,166 @@
</part>
</software>
+ <software name="soniccda" cloneof="soniccd">
+ <!-- Source: redump.org - http://redump.org/disc/24557/
+ <rom name="Sonic CD (USA) (RE125).cue" size="4100" crc="e8a15187" md5="92d0c52b29c25b21e8d0bef3e3086115" sha1="ff275b2a8bf5c301fed311addca55aee8a1a13ab"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 01).bin" size="139381872" crc="a6184e05" md5="ed96420538f989e94480f810d5f90685" sha1="3c316af52cc9ee8c30976a1cdb66339545dda3bd"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 02).bin" size="1086624" crc="15012c2f" md5="db67c23a4edadb89bf1c527c230f1fb9" sha1="4aa8d5356ca9208d12a1e52a1b161a5d9a5ba354"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 03).bin" size="19618032" crc="38ca5b03" md5="9c4f328f0ea9ade89b463a6c4e521bd7" sha1="e3e6fddaa2e6bd83b425fc26c6c71742b5fb8e9f"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 04).bin" size="14471856" crc="9596c858" md5="36488d42bd88651d030a3726ae8438f0" sha1="351c357c64c6154aecb294ab10a682129d3ae4cc"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 05).bin" size="15193920" crc="dd5b4a12" md5="b4ce562be53929d0ca5a312f63224b52" sha1="bc17b3525feec2aa4182ca47aa9b33d6e123d5e9"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 06).bin" size="17828160" crc="84cdcb09" md5="ebf995c5795f3b4fcc39eebf48eed8e2" sha1="c52af58f0fba84ae14043a70ed780e3a139bbea9"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 07).bin" size="14300160" crc="da492afe" md5="7dc11ada8a0cb09b2468ee0e3a0ba4e6" sha1="cf61e1285a46c32741e863e1bb7fca3ba82a4d97"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 08).bin" size="14638848" crc="df5f4c71" md5="edcf5aba504576c78bbe4b6f7d01b8ff" sha1="f578e3607ef043bd4c42b206e7225c6cb03729da"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 09).bin" size="20490624" crc="3cb45cc3" md5="3446c43b7c5b149cd48c4ef88340d789" sha1="b6912c3d97f52d5b239e04d89bde5aca3e862749"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 10).bin" size="14297808" crc="6493039b" md5="9bf6515ee47eafbf3d3b52c4cd6c916b" sha1="485571c87178c1dc8f730f9a8958b4daba8ce3b7"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 11).bin" size="13945008" crc="8331bffb" md5="42ad3a9bbbfd16cd5c425df525ddd7b1" sha1="233d9149e3d5eab4a1788f02036a4dd26cf4b662"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 12).bin" size="18350304" crc="b1fc067e" md5="6d494c48ef460e87bf759ce32312b0af" sha1="acf6116d3223f690351e4dfec3e686aee7d602c2"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 13).bin" size="14013216" crc="282d4f23" md5="88107ee77b536248c0b9149ac1c71ea4" sha1="5797d380e8df06f7d83a37ac55b3072f8a3dff57"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 14).bin" size="11670624" crc="e3010652" md5="57f445fb464017e263e94b2c026bb074" sha1="e3d5be3bf65d2cb9ca962e6cc1b59a2f154cb35a"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 15).bin" size="16412256" crc="8c72e30c" md5="fd94adef4eec0364820d6679c566d4dc" sha1="ddde7a71d5167ac691905db051ae50fb0067edf9"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 16).bin" size="11136720" crc="d86a29bf" md5="2208836a9535d566cdc3d5833805c0c2" sha1="1ecf5dc836236379aa04b5a65d57c20ebdbd2d7b"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 17).bin" size="14307216" crc="f6ad9d89" md5="b909869e98fb083f5fdca2cb07b18781" sha1="503fedd4729e134e8ec3933efd1acea8ba3d2e29"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 18).bin" size="20485920" crc="3bda218e" md5="f7ecd93d5d2421e4f861d92893f3c4a0" sha1="778abcb3b2d18f025d9a2005f86c52d63f6b838b"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 19).bin" size="13077120" crc="a2880ca8" md5="ff09f9f05338616da58cf827606b5fef" sha1="3399cac7294d7d228740a5b82dc7f6070a1759a8"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 20).bin" size="12004608" crc="4afee7cc" md5="ba9f5f384f070ffb5d86639f78a39dfb" sha1="227505a70368f426dc89b8ca6cf03b9d428c70cd"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 21).bin" size="15191568" crc="e197a84f" md5="4a42c02bb02ae07305fbe3298d858c6c" sha1="1dccb491151e6e140eae2e46d532fa8bbcb1e990"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 22).bin" size="11835264" crc="b2b7a147" md5="d30d92ba1870aa254101274aecde4bf3" sha1="7b1d1891513d1734c353ff5d2b1f66e1f7b69335"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 23).bin" size="13063008" crc="837ebc3d" md5="79aee8e5f27c5c8ff9f8ee2326740871" sha1="953641db3fa2444cddd008bb71aa07ca29dd8abf"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 24).bin" size="14302512" crc="cdeeb57b" md5="0b870bd8daa4af884be9e09528a81f1b" sha1="385b09d98e716db3995de1deee735e713eeefc18"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 25).bin" size="14991648" crc="9b67a0a9" md5="6b6bc3af605b7ae3bc279bafbb1b757d" sha1="7c4923dab1c55efb533ee0e21c6e4f073acd18e3"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 26).bin" size="5475456" crc="f1548317" md5="e0e0490753c1836b531955415b6a263e" sha1="aa8409b6f3f6b7fa78caff67df4a4ed46874f0d5"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 27).bin" size="5470752" crc="ff0f89ff" md5="7f69419b70260956761403730dc81d70" sha1="a701571355dfea136b09782de2e18b1b4458319a"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 28).bin" size="1846320" crc="26c43f90" md5="e1377f9cbcd3c2cc75731fec69fe0665" sha1="e039d42fd374285bce4c972e7f3c484bfc604b24"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 29).bin" size="4231248" crc="3e973838" md5="404b198c1d0b75fbd3e28fdf292da6f6" sha1="91e087a9a3928a23cb8a06599c47f83bf52ff75b"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 30).bin" size="4151280" crc="edd38cac" md5="7c9dcc225186c240ba6c07024b1b912f" sha1="17467bfd1755abceb6e4107877619e18bc902bbb"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 31).bin" size="2295552" crc="5c6cabb7" md5="94f8d5b1d5179b5f9b011817023e7896" sha1="8aab036e35e904b2c0041fa75ac96726348db70b"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 32).bin" size="21720720" crc="ea02fb52" md5="cce356cf67f14bd702c7c25dce4296be" sha1="021e6d22476ccf1ae112e3bfb83851d341538d31"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 33).bin" size="22071168" crc="a2288429" md5="f278a27c3c762d5591a97f0acf7909f2" sha1="91b2a0f494af86caa05d3b8412aa7547decb62e4"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 34).bin" size="16405200" crc="393386fd" md5="d798e31b863cf5e31ef6e1b242aabe86" sha1="b52aa2b587cd4682e95a56e087cd15e215afa316"/>
+ <rom name="Sonic CD (USA) (RE125) (Track 35).bin" size="31940160" crc="9cebd39d" md5="dcfce720b4e4cb2236cc54537eb551c5" sha1="f3113ef9547a9242fc93bd6654adeb860f22dc27"/>
+ -->
+ <description>Sonic the Hedgehog CD (USA, Alt)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4407"/>
+ <info name="alt_title" value="Sonic CD (Box)" />
+ <info name="release" value="19931119" />
+ <info name="ring_code" value="SEGA4407RE125 R7D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sonic cd (usa, alt)" sha1="a8a968a6239da07c6143dd420a6a3093f4dddcd2"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- This disc was bundled together with a Sega-CD device. -->
+ <software name="soniccdb" cloneof="soniccd">
+ <!-- Source: redump.org - http://redump.org/disc/29653/
+ <rom name="Sonic CD (USA) (RE125) (Alt).cue" size="4310" crc="53948c76" md5="ac75d9b8331ba59da608c49e5cc03cb7" sha1="4d190b6a7cc7e2284f7c16f6afaf94ff625dfb8c"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 01).bin" size="139381872" crc="a6184e05" md5="ed96420538f989e94480f810d5f90685" sha1="3c316af52cc9ee8c30976a1cdb66339545dda3bd"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 02).bin" size="1086624" crc="15012c2f" md5="db67c23a4edadb89bf1c527c230f1fb9" sha1="4aa8d5356ca9208d12a1e52a1b161a5d9a5ba354"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 03).bin" size="19618032" crc="38ca5b03" md5="9c4f328f0ea9ade89b463a6c4e521bd7" sha1="e3e6fddaa2e6bd83b425fc26c6c71742b5fb8e9f"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 04).bin" size="14471856" crc="9596c858" md5="36488d42bd88651d030a3726ae8438f0" sha1="351c357c64c6154aecb294ab10a682129d3ae4cc"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 05).bin" size="15193920" crc="dd5b4a12" md5="b4ce562be53929d0ca5a312f63224b52" sha1="bc17b3525feec2aa4182ca47aa9b33d6e123d5e9"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 06).bin" size="17828160" crc="84cdcb09" md5="ebf995c5795f3b4fcc39eebf48eed8e2" sha1="c52af58f0fba84ae14043a70ed780e3a139bbea9"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 07).bin" size="14300160" crc="da492afe" md5="7dc11ada8a0cb09b2468ee0e3a0ba4e6" sha1="cf61e1285a46c32741e863e1bb7fca3ba82a4d97"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 08).bin" size="14638848" crc="df5f4c71" md5="edcf5aba504576c78bbe4b6f7d01b8ff" sha1="f578e3607ef043bd4c42b206e7225c6cb03729da"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 09).bin" size="20490624" crc="3cb45cc3" md5="3446c43b7c5b149cd48c4ef88340d789" sha1="b6912c3d97f52d5b239e04d89bde5aca3e862749"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 10).bin" size="14297808" crc="6493039b" md5="9bf6515ee47eafbf3d3b52c4cd6c916b" sha1="485571c87178c1dc8f730f9a8958b4daba8ce3b7"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 11).bin" size="13945008" crc="8331bffb" md5="42ad3a9bbbfd16cd5c425df525ddd7b1" sha1="233d9149e3d5eab4a1788f02036a4dd26cf4b662"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 12).bin" size="18350304" crc="b1fc067e" md5="6d494c48ef460e87bf759ce32312b0af" sha1="acf6116d3223f690351e4dfec3e686aee7d602c2"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 13).bin" size="14013216" crc="8e9aaeaf" md5="c02b110395c9cb8a6a1066eb5c36835c" sha1="6cfbd4139d60eb7762874aa0308a01f40e0e17fc"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 14).bin" size="11670624" crc="e3010652" md5="57f445fb464017e263e94b2c026bb074" sha1="e3d5be3bf65d2cb9ca962e6cc1b59a2f154cb35a"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 15).bin" size="16412256" crc="8c72e30c" md5="fd94adef4eec0364820d6679c566d4dc" sha1="ddde7a71d5167ac691905db051ae50fb0067edf9"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 16).bin" size="11136720" crc="d86a29bf" md5="2208836a9535d566cdc3d5833805c0c2" sha1="1ecf5dc836236379aa04b5a65d57c20ebdbd2d7b"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 17).bin" size="14307216" crc="f6ad9d89" md5="b909869e98fb083f5fdca2cb07b18781" sha1="503fedd4729e134e8ec3933efd1acea8ba3d2e29"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 18).bin" size="20485920" crc="3bda218e" md5="f7ecd93d5d2421e4f861d92893f3c4a0" sha1="778abcb3b2d18f025d9a2005f86c52d63f6b838b"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 19).bin" size="13077120" crc="a2880ca8" md5="ff09f9f05338616da58cf827606b5fef" sha1="3399cac7294d7d228740a5b82dc7f6070a1759a8"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 20).bin" size="12004608" crc="4afee7cc" md5="ba9f5f384f070ffb5d86639f78a39dfb" sha1="227505a70368f426dc89b8ca6cf03b9d428c70cd"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 21).bin" size="15191568" crc="e197a84f" md5="4a42c02bb02ae07305fbe3298d858c6c" sha1="1dccb491151e6e140eae2e46d532fa8bbcb1e990"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 22).bin" size="11835264" crc="b2b7a147" md5="d30d92ba1870aa254101274aecde4bf3" sha1="7b1d1891513d1734c353ff5d2b1f66e1f7b69335"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 23).bin" size="13063008" crc="837ebc3d" md5="79aee8e5f27c5c8ff9f8ee2326740871" sha1="953641db3fa2444cddd008bb71aa07ca29dd8abf"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 24).bin" size="14302512" crc="cdeeb57b" md5="0b870bd8daa4af884be9e09528a81f1b" sha1="385b09d98e716db3995de1deee735e713eeefc18"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 25).bin" size="14991648" crc="9b67a0a9" md5="6b6bc3af605b7ae3bc279bafbb1b757d" sha1="7c4923dab1c55efb533ee0e21c6e4f073acd18e3"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 26).bin" size="5475456" crc="f1548317" md5="e0e0490753c1836b531955415b6a263e" sha1="aa8409b6f3f6b7fa78caff67df4a4ed46874f0d5"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 27).bin" size="5470752" crc="ff0f89ff" md5="7f69419b70260956761403730dc81d70" sha1="a701571355dfea136b09782de2e18b1b4458319a"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 28).bin" size="1846320" crc="26c43f90" md5="e1377f9cbcd3c2cc75731fec69fe0665" sha1="e039d42fd374285bce4c972e7f3c484bfc604b24"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 29).bin" size="4231248" crc="3e973838" md5="404b198c1d0b75fbd3e28fdf292da6f6" sha1="91e087a9a3928a23cb8a06599c47f83bf52ff75b"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 30).bin" size="4151280" crc="edd38cac" md5="7c9dcc225186c240ba6c07024b1b912f" sha1="17467bfd1755abceb6e4107877619e18bc902bbb"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 31).bin" size="2295552" crc="5c6cabb7" md5="94f8d5b1d5179b5f9b011817023e7896" sha1="8aab036e35e904b2c0041fa75ac96726348db70b"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 32).bin" size="21720720" crc="ea02fb52" md5="cce356cf67f14bd702c7c25dce4296be" sha1="021e6d22476ccf1ae112e3bfb83851d341538d31"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 33).bin" size="22071168" crc="a2288429" md5="f278a27c3c762d5591a97f0acf7909f2" sha1="91b2a0f494af86caa05d3b8412aa7547decb62e4"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 34).bin" size="16405200" crc="393386fd" md5="d798e31b863cf5e31ef6e1b242aabe86" sha1="b52aa2b587cd4682e95a56e087cd15e215afa316"/>
+ <rom name="Sonic CD (USA) (RE125) (Alt) (Track 35).bin" size="31940160" crc="9cebd39d" md5="dcfce720b4e4cb2236cc54537eb551c5" sha1="f3113ef9547a9242fc93bd6654adeb860f22dc27"/>
+ -->
+ <description>Sonic the Hedgehog CD (USA, Alt 2)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="alt_title" value="Sonic CD (Box)" />
+ <info name="release" value="19931119" />
+ <info name="ring_code" value="SEGA4407RE125 R8C MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="sonic cd (usa, alt 2)" sha1="824b78678ce7aa0b845d14de3e7df737105329f4"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="soulstar">
+ <!-- Source: redump.org - http://redump.org/disc/29655/
+ <rom name="SoulStar (USA).cue" size="1858" crc="abd6f11a" md5="60a9cd1064fe684a48237b0e7d82db33" sha1="7a48145bf6bb4196decb79afaef4898e4d730397"/>
+ <rom name="SoulStar (USA) (Track 01).bin" size="145885152" crc="d647bf71" md5="5fe5f9a7f0d958fe586beca9d6caede6" sha1="48e11204d1119cc064ba0706710323e763bfefd5"/>
+ <rom name="SoulStar (USA) (Track 02).bin" size="16873248" crc="30d5ad9a" md5="00df4182fe88ad02c08b824661010eab" sha1="7fb61ca54d8d01345cb99324fd68025c0a9abbea"/>
+ <rom name="SoulStar (USA) (Track 03).bin" size="43173312" crc="ebd95aad" md5="abffb93c7dd8f3ecf4b854a64e2fbb63" sha1="6d58efdd8c0f943552776a96a690592c0e026730"/>
+ <rom name="SoulStar (USA) (Track 04).bin" size="55302576" crc="980737d4" md5="f1a623e1d121bc2f491e7a062438b02a" sha1="c1d1d44984a75ad307bf4d2e60a6bad6ef73ccc2"/>
+ <rom name="SoulStar (USA) (Track 05).bin" size="19404000" crc="fb980435" md5="deb99a956e30a10061c9f6acc0541f08" sha1="4999d58f704d5e86d03720f8ebbcbbe49f8194af"/>
+ <rom name="SoulStar (USA) (Track 06).bin" size="37975392" crc="b71b7752" md5="2d051fb605f7f5505500b951429bffe6" sha1="891dd26d8a3783ab35576ae140a551226a64eefc"/>
+ <rom name="SoulStar (USA) (Track 07).bin" size="39179616" crc="4433adcc" md5="3503cd34c78174e5af4ce88c53b53de5" sha1="1189ffd4040163f5ee15b0fcab1f9a712332e2ed"/>
+ <rom name="SoulStar (USA) (Track 08).bin" size="41247024" crc="f03b536c" md5="d551fcfdce703d0de13b74183693a54e" sha1="7b0e702e804e6ce3342f0c8c01090a66211ab1d7"/>
+ <rom name="SoulStar (USA) (Track 09).bin" size="43900080" crc="ce338224" md5="e8af4555a27fafda2c825b6624b6ce86" sha1="f5b2b15bb7940f19bb37a79994cdb85a10549ea1"/>
+ <rom name="SoulStar (USA) (Track 10).bin" size="41602176" crc="02194665" md5="38441c5e34c44cf64ccd10050ee0f190" sha1="70ddcdb563d93e86a9d5e048b63b6c54dd86253c"/>
+ <rom name="SoulStar (USA) (Track 11).bin" size="21962976" crc="d516490f" md5="25e6a23f57954fb7147206a2b2c3d30a" sha1="cb92dd7e930cdf2ef7ff14b4a3d8dd2c5938a6b4"/>
+ <rom name="SoulStar (USA) (Track 12).bin" size="30625392" crc="6fa1b7fb" md5="2630ba72fc0778d3e4a1cbc6fee4cfc6" sha1="84f740c150b4e15dd8e30fe7f1de0c3024fa7fe5"/>
+ <rom name="SoulStar (USA) (Track 13).bin" size="36034992" crc="9b062a1d" md5="9d931fc81f6822a714e4fe5b9d5278b0" sha1="3b262e5d6b04a5879a5a11a0172ec5231107bda4"/>
+ <rom name="SoulStar (USA) (Track 14).bin" size="7265328" crc="4522f047" md5="5d5f1f4a19e88a3d3820bee1a938dd25" sha1="2afef489c21636bb846838b7783d1ddf3398937f"/>
+ <rom name="SoulStar (USA) (Track 15).bin" size="20177808" crc="ed2ee929" md5="3022cfd3f828066ad201f4fce46ff06e" sha1="da126caed999deced8fba11b040db4630ff45456"/>
+ <rom name="SoulStar (USA) (Track 16).bin" size="39080832" crc="b9f12444" md5="58d1b13d21520e0681e1b5a9a1b4a3ad" sha1="74a77a937c355afc01a103a5fd2f084f3d1e795e"/>
+ <rom name="SoulStar (USA) (Track 17).bin" size="2116800" crc="5f94801f" md5="0a9970a5df95362c07c685e41389f312" sha1="dba7e5eae9aa1e9f080b7e3e986cfc9c4bc1accd"/>
+ -->
+ <description>Soul Star (USA)</description>
+ <year>1994</year>
+ <publisher>Core Design</publisher>
+ <info name="serial" value="T-115035"/>
+ <info name="release" value="199409xx" />
+ <info name="ring_code" value="SEGAT115035 R1J MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="soulstar (usa)" sha1="4e2ab5b51dca2a4c23700b4d3587a9a08ac6d29f"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="spaceace">
+ <!-- Source: redump.org - http://redump.org/disc/21037/
+ <rom name="Space Ace (USA).cue" size="200" crc="2d1fa0f5" md5="ae880100bad12052e2f241802e522a11" sha1="675ef3486253a90e1c61f593c212f61947b05774"/>
+ <rom name="Space Ace (USA) (Track 1).bin" size="306263328" crc="7a029b47" md5="e272da5ae4526d9e88ac08f78109d483" sha1="d5c1dacbeba1f4e28d23690ae889a9540a27df94"/>
+ <rom name="Space Ace (USA) (Track 2).bin" size="1521744" crc="60eade1a" md5="219338306d836e503200995f9b6cdfbf" sha1="3e7034584cf93dbb4fe059d08f3c909cca4891aa"/>
+ -->
+ <description>Space Ace (USA)</description>
+ <year>1994</year>
+ <publisher>ReadySoft</publisher>
+ <info name="serial" value="T-121025"/>
+ <info name="ring_code" value="CDAC-080300 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="space ace (usa)" sha1="d5f5125af3e9e59a59f775576ddc99b4aadaf505"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="swra">
- <!-- source redump.org
+ <!-- Source: redump.org
<rom name="Star Wars - Rebel Assault (USA).cue" size="232" crc="6eafe8d6" />
<rom name="Star Wars - Rebel Assault (USA) (Track 1).bin" size="395255952" crc="310bc2e8" />
<rom name="Star Wars - Rebel Assault (USA) (Track 2).bin" size="57798048" crc="4af56d2c" />
@@ -1463,6 +3321,7 @@
<year>1994</year>
<publisher>JVC</publisher>
<info name="serial" value="T-60075"/>
+ <info name="release" value="199403xx" />
<info name="ring_code" value="SEGAT60075 R1D MFD BY JVC, SEGAT60075 R2C MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1471,8 +3330,26 @@
</part>
</software>
+ <software name="starblad">
+ <!-- Source: redump.org - http://redump.org/disc/21038/
+ <rom name="Starblade (USA).cue" size="200" crc="ae85834b" md5="6e22cb519a92dc0289585f54232eac12" sha1="0c9d7e4f642284204db77a345f928e41b0531065"/>
+ <rom name="Starblade (USA) (Track 1).bin" size="466669728" crc="1bc4b93f" md5="243ca56356fa83632a80b9e5d9f5ad74" sha1="3ea7411b78dce9c03beff78a450480d53b7127e3"/>
+ <rom name="Starblade (USA) (Track 2).bin" size="1528800" crc="9265e140" md5="745b11da19fa5137a007a990eec3515e" sha1="e6251cae47325e237b59a849b3513516a5b1f4ea"/>
+ -->
+ <description>StarBlade (USA)</description>
+ <year>1994</year>
+ <publisher>Namco</publisher>
+ <info name="serial" value="T-14025"/>
+ <info name="ring_code" value="CDAC-073400 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="starblade (usa)" sha1="6233ca426d0797a5bccf98261b5164c44feb5203"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="stellarf">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3903/
<rom name="Stellar-Fire (USA).cue" size="2355" crc="a95a065f" />
<rom name="Stellar-Fire (USA) (Track 01).bin" size="99252048" crc="2e3ef2e4" />
<rom name="Stellar-Fire (USA) (Track 02).bin" size="10040688" crc="4f169953" />
@@ -1500,6 +3377,7 @@
<year>1993</year>
<publisher>Dynamix</publisher>
<info name="serial" value="T-110025"/>
+ <info name="release" value="199312xx" />
<info name="ring_code" value="SEGAT11025 R1D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1508,8 +3386,200 @@
</part>
</software>
+ <software name="surgical">
+ <!-- Source: redump.org - http://redump.org/disc/20252/
+ <rom name="Surgical Strike (USA).cue" size="327" crc="5e7052c3" md5="63920b1c6a7b3917286e7a241312aa8e" sha1="015f1b4b5ae51d66fc1560d9dfd20000af2f2215"/>
+ <rom name="Surgical Strike (USA) (Track 1).bin" size="445005456" crc="eb94db26" md5="7624e55d7c85825036a21a9e13e7dd52" sha1="d4204796ac98245a7ad9ed9ff5792c5a58d0d7cd"/>
+ <rom name="Surgical Strike (USA) (Track 2).bin" size="43210944" crc="87b19436" md5="743818576ccae4b33af1a9b313edf9a7" sha1="fd9cbc2109cbffadd752e6b3d74ae8eef22ef8b3"/>
+ <rom name="Surgical Strike (USA) (Track 3).bin" size="1985088" crc="d00d9864" md5="7f4fe8fd637190ec145efc96f1db7198" sha1="3b7555ccacad8994deb0fe00edef83551d607344"/>
+ -->
+ <description>Surgical Strike (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4435"/>
+ <info name="ring_code" value="CDAC-088700 1"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="surgical strike (usa)" sha1="37ba598fdc774b805f89d43962591a176c2215d4"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="advbatr">
+ <!-- Source: redump.org - http://redump.org/disc/16136/
+ <rom name="Adventures of Batman and Robin, The (USA).cue" size="927" crc="28438349" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 1).bin" size="161845824" crc="0edec85f" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 2).bin" size="30646560" crc="296867f7" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 3).bin" size="26873952" crc="2c208097" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 4).bin" size="27000960" crc="cf5dfa2c" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 5).bin" size="28320432" crc="8705a027" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 6).bin" size="27678336" crc="14c633e4" />
+ <rom name="Adventures of Batman and Robin, The (USA) (Track 7).bin" size="10541664" crc="53495b40" />
+ -->
+ <description>The Adventures of Batman and Robin (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4432"/>
+ <info name="ring_code" value="1008604432 7/95 1RA2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the adventures of batman and robin (usa)" sha1="80e65ec95ea9440e59d64ea067b48921686006e8"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="wilybeam">
+ <!-- Source: redump.org - http://redump.org/disc/20250/
+ <rom name="Adventures of Willy Beamish, The (USA).cue" size="2000" crc="7e070f1f" md5="1c01a036318fae087eaca07502699c3e" sha1="ad68b3e076259b7f34ae99622472c5dd115857fd"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 01).bin" size="233269008" crc="abe534e3" md5="c5caa37328f05e17d9401c48cf08de99" sha1="14639e1596ac00f4b3d9aa141e2f4ea78ebb2575"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 02).bin" size="1764000" crc="e7887563" md5="3078714f29b09408fbf800f7a2ce03d0" sha1="923937048d6b3fe908cbe4115a099a3b7a195d0b"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 03).bin" size="3525648" crc="89c1b24e" md5="28d09da2d02ffc134877a62d44f12251" sha1="c62d2081c51eab5273bed80beccd5c1897e1accd"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 04).bin" size="1178352" crc="8cc669ea" md5="890e81863b292f8fec020071ac16e317" sha1="fec43656ee2f4445b2719d8a6c260b311b06b694"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 05).bin" size="25895520" crc="6239414c" md5="57d2a217599378d2f618313476a32d6b" sha1="d063e8eb4b5d4e1172710037bd76eeb7eeb55a80"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 06).bin" size="4734576" crc="009c79f9" md5="645a0f6fd73b0210d100288db28b93ad" sha1="3e5adaaa60e85ca959d6ded40df6fe5d52b245ea"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 07).bin" size="12637296" crc="e6ba68a6" md5="22b7de0c696d7f5c482e8bc085117d78" sha1="6656b360e1f7dc7f58e2e89c03b96c11efcf51da"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 08).bin" size="9151632" crc="815b208a" md5="e4f0c92cde64db81c3d224ccd1388d78" sha1="9cf429b6c06dacb81515582f20765d32d018d6a3"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 09).bin" size="13074768" crc="5c1846c7" md5="d90bc45a11d85ea409eb6b7eb5a867a0" sha1="f96cf1dd606847b2fdeae85487023e8daaaa266f"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 10).bin" size="4696944" crc="63500d67" md5="14265ea8db00a7d90a2aa64aa69c6591" sha1="95c8b31da28b8efb168b876645df3cec8875345b"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 11).bin" size="1065456" crc="70bdaff7" md5="d99ef6eb3900de3a959d9325d4cea0bf" sha1="66fd82a78b4ab15d224a073bdf6c8e51e46777af"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 12).bin" size="1274784" crc="d44584d6" md5="9f2418210e8a18d4e384efbb81b8cd1f" sha1="63dec4154a654053f9f21d12adc398107d451698"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 13).bin" size="1265376" crc="951b2939" md5="7cac7b933bdb3e4f4cbb4b6a3138e06c" sha1="db43fb123a94a201b56a211e9292564f1713715a"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 14).bin" size="11614176" crc="06d871f2" md5="a85444037eda6208a916a930d2cd8680" sha1="c8b0951d68b8c02a219bb305d06673aadd66c559"/>
+ <rom name="Adventures of Willy Beamish, The (USA) (Track 15).bin" size="1879248" crc="0cac283b" md5="9ff4338c38f8771002c12c4b83288754" sha1="f93767b77c005d0ddf2c7e3c282f46a1947a18cd"/>
+ -->
+ <description>The Adventures of Willy Beamish (USA)</description>
+ <year>1993</year>
+ <publisher>Dynamix</publisher>
+ <info name="serial" value="T-6300"/>
+ <info name="ring_code" value="SEGAT110015 R1J"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the adventures of willy beamish (usa)" sha1="694476e5e82d7317ec6943d5d749764592045f37"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="spidking">
+ <!-- Source: redump.org - http://redump.org/disc/21446/
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA).cue" size="1825" crc="e9bdce95" md5="cda12eceedc7c6acbcf1499ead3eeeb5" sha1="646a13adf0ece1416399e2809d6442fac23b25cd"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 01).bin" size="155330784" crc="781b2d3f" md5="3b7b7435b70d24aabcf97fa82b4e74cc" sha1="15b4fe55e5cdd45b16c9f4c6fa2c145d4f919a87"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 02).bin" size="44125872" crc="a6e4359b" md5="bacf87188b2528d179fe0362431d8978" sha1="1ddafdb182ddacd1cb2466d8a5ac81392c8d5451"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 03).bin" size="35091840" crc="2f1de818" md5="17228b2115e92ad96397fe66812ac0e8" sha1="cf16eabdde9d0e1b6a0edd1ccced989b7ee94442"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 04).bin" size="32906832" crc="2a6214f5" md5="a88f177119411197bfa2bc57590c67f5" sha1="3724832dc0766a76c96effba9e1ec3c6c235e219"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 05).bin" size="40993008" crc="82390d31" md5="b0c6127b6016bbd541d60466905e641b" sha1="097dc8202e5299ae29b11b2b17f22e61d4dad5e0"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 06).bin" size="32156544" crc="b1e0747e" md5="73881a95a95c17dc944712d427dd89ef" sha1="046d2f2d46d507bc4bb3bac1835d820c09eb9a14"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 07).bin" size="33678288" crc="b77bda5f" md5="e845f82cbcbf160d982d688d4873702a" sha1="b097cfe9f3c896beb644455789b4e0c343b00ca8"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 08).bin" size="32535216" crc="fa44b54c" md5="fe69f40c58786d12dc58646239601ffb" sha1="5dcf8e884272470adfb4cea438ddef2f16dd4222"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 09).bin" size="31483872" crc="8a46c717" md5="bf1be95863c29ccc65b0a3732978b2c3" sha1="db6ca8795257e5905c6c502d3c43c8d83900db7f"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 10).bin" size="51656976" crc="5c264984" md5="8c7cc4d0ef8b926646ee957a3e6a090d" sha1="2d94c3451af82a6cbe5c6a3d01c38bacec0900e6"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 11).bin" size="29891568" crc="7f4da5de" md5="003cf633d4873a3b2a0243b623b964ad" sha1="9eae0fb23458c598242549d3927019bf8a902d43"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 12).bin" size="28383936" crc="851287bc" md5="c0d6c824ac031fcefd1b0188e5e7429d" sha1="70e13a59fe35e82ec507b2764d05870b31b841c5"/>
+ <rom name="Amazing Spider-Man vs. The Kingpin, The (USA) (Track 13).bin" size="7933296" crc="e30c89ab" md5="b791d5a2d3b2107423d043cc09d5e832" sha1="21be62996b7197ac685e1dc15a3ba08991194d5e"/>
+ -->
+ <description>The Amazing Spider-Man vs. The Kingpin (USA)</description>
+ <year>1993</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4412"/>
+ <info name="release" value="199306xx" />
+ <info name="ring_code" value="CDAC-047100 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the amazing spider-man vs. the kingpin (usa)" sha1="4102f007184635832ca13ab770ccadcde32242da"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="monkey">
+ <!-- Source: redump.org - http://redump.org/disc/36040/
+ <rom name="Secret of Monkey Island, The (USA).cue" size="3488" crc="04a1e02f" md5="027ccf6397d96b6d9a5b7b33adcaa9fc" sha1="2c14e74a3fca8214008621434a530d861268307c"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 01).bin" size="13063008" crc="8a9c032d" md5="9efbaf7fa3ebe088db4deb78f93f05e4" sha1="a63fc8aad1001064f16fda2f57c4c59eb7994908"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 02).bin" size="21525504" crc="2482c4ef" md5="c1d50fb26e4b5cf8d2c05a7082f3ba9a" sha1="65546e87bc9af111574aaf822a57e41771871fcc"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 03).bin" size="22191120" crc="da8b6224" md5="d059d6380fa77302a0d0fdeabbe06a10" sha1="bc2abcf39cc6456a55c4830f109b8d58bfa530af"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 04).bin" size="22028832" crc="495e93eb" md5="2c3dea8e3b24b8bd2bcc5b4b4a356196" sha1="a73300d83ea9ec409c75abe2c43291cd66ef4f19"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 05).bin" size="20664672" crc="05270610" md5="75c10fe3bcec589ebd50b91ca4fe2d83" sha1="b091da229f4b02661f29fce6beba66a43b7096da"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 06).bin" size="22640352" crc="d7b6273c" md5="7144f45d4d8582b4254a758b5d59de6b" sha1="a29f3629be7c30ce0e4fd55455038bd7c542c050"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 07).bin" size="2232048" crc="328d0de3" md5="a1fecf996e3757cdfea45e58c2224ef0" sha1="94c1d27f9d10654ef793bac346c57f3302cf003d"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 08).bin" size="12825456" crc="b8e130e5" md5="f4c3dc04f4f089dc2c8229ff24a9f672" sha1="4e03112a6927e5d7f193441d4b1caf35c4a2f522"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 09).bin" size="24660720" crc="f401c2f6" md5="c79f71393f89addf09fd0d1f5777c2cc" sha1="8e9f68caa759aa24d709749cdf1395df1a697182"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 10).bin" size="22108800" crc="a458dbc4" md5="769c81ef036f86f89f85ab3d492967e8" sha1="e27f4fdc0786e0de0bb5274cd5600dd578810488"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 11).bin" size="16689792" crc="06ffb55e" md5="5c2e9bd143d7e86a80b69cbed6217f2f" sha1="1dc75204d1de20d253d0f90a0b2f2b4a5fe33e6b"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 12).bin" size="24681888" crc="d6352466" md5="880a7e12daffb1c246e7fc14b8450386" sha1="ed86ad7b8c48ec3c5a5823d40aa7426e9559d5d8"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 13).bin" size="21864192" crc="d42b7633" md5="4befad6c1bf3b5edbe4e02cfe4e308b1" sha1="9b18004634b54dbb1bf436afe8adbffbfa135d35"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 14).bin" size="3473904" crc="238b259d" md5="0f00ddbf5a05e9725ef021212f426cf9" sha1="b2dc0cb90a7d8c68caf9852301fb8b6d9f1a73ae"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 15).bin" size="27906480" crc="04f0c8fa" md5="ee41f892a62ad037b37a9f20c4cc4f97" sha1="cbe71e2d195b90274498a70cbf4ab46f5b573347"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 16).bin" size="26570544" crc="7a18b50b" md5="645746b8bbbe67a422d3b83a13570ffb" sha1="dca486d85f1989d4da9c02247ed881d87e288881"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 17).bin" size="39290160" crc="6549b6a0" md5="6ba208d8b179b19453ac7c3e587e24a1" sha1="4ecb03aa1ceda93443372050338a68b825f69cf5"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 18).bin" size="28252224" crc="fa730181" md5="bb88a8a9f068f59700c2343ff8d4a3c7" sha1="4076250e427a7ed64ea00c99b3da6aeb0a6a4de9"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 19).bin" size="28129920" crc="dc424e70" md5="fcbc1ebc536f7927418c5c5770273dc8" sha1="03cecdb076be6e8fcf5122a4b764a37b88810c7f"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 20).bin" size="3259872" crc="b2316a26" md5="ff9e29f85d1dfb4c4e8b576e81f54a90" sha1="5e7ca2dff6a50df67e49d9479806161e6c4f7654"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 21).bin" size="3582096" crc="55d45007" md5="1c41ab06d5be1af87d925b33a785acab" sha1="096b4c2c2c8db86cbd53659a612ac2325cad6870"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 22).bin" size="23849280" crc="7a976e2b" md5="9e318fc9e0b65894e749a802c0d819f1" sha1="fa5dc2d515a6cf1e640b85b9b8027d0dc254de4a"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 23).bin" size="18028080" crc="8fabb577" md5="36229c07217a6279cb0c202d6968c96f" sha1="37e3c14140228d8e03cd22897aa15dbeff660d3e"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 24).bin" size="1773408" crc="9631ea37" md5="d1a1e85a65ba10015071e16b720aeffa" sha1="71f184bc537b192311288706dbdc6dbeecf9ab47"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 25).bin" size="2222640" crc="c3a65f1a" md5="114e66fee7874436612dd9f44235f880" sha1="e2757ec7964b2af6c918dd3c54fcd1291f3caa77"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 26).bin" size="11176704" crc="8c96311a" md5="8909aa0e697bdf42d985df2f2797bf90" sha1="eb849d37fd8c13e0c012440721cceeebd6c2f400"/>
+ <rom name="Secret of Monkey Island, The (USA) (Track 27).bin" size="10252368" crc="490d3101" md5="f06a4ae585d3b0ff91b6d877e9115145" sha1="dbf7032596f941ef29980580eaf96c52811ec08b"/>
+ -->
+ <description>The Secret of Monkey Island (USA)</description>
+ <year>1992</year>
+ <publisher>JVC</publisher>
+ <info name="serial" value="T-60035"/>
+ <info name="release" value="199212xx" />
+ <info name="ring_code" value="SEGAT60035RE R1C MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the secret of monkey island (usa)" sha1="a894a9e6ba908f742d686fb85b7ae3c700fb1d36"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="swchess">
+ <!-- Source: redump.org - http://redump.org/disc/21448/
+ <rom name="Software Toolworks' Star Wars Chess, The (USA).cue" size="262" crc="eddd396f" md5="2c12f949441867e21c6dccb35b89358b" sha1="035cdc6ea08fa0a16cb356faea54951c8bcc6131"/>
+ <rom name="Software Toolworks' Star Wars Chess, The (USA) (Track 1).bin" size="261163728" crc="bea83946" md5="0f93cd21e33e1cd30a98bd6d7d080639" sha1="d8f5c2f22cb27b00efd5679a1a1c8cad799dc97d"/>
+ <rom name="Software Toolworks' Star Wars Chess, The (USA) (Track 2).bin" size="1521744" crc="a408bb52" md5="04a26d0c4b82d757ceb424e2d827adf7" sha1="f14b874390ba045c0a1368bfae5753089415b188"/>
+ -->
+ <description>The Software Toolworks' Star Wars Chess (USA)</description>
+ <year>1994</year>
+ <publisher>The Software Toolworks</publisher>
+ <info name="serial" value="T-87035"/>
+ <info name="release" value="199405xx" />
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="star wars chess (usa)" sha1="fe03505a7c2f1ebdef4d2c32c8b73677288d635b"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="termintr">
+ <!-- Source: redump.org - http://redump.org/disc/21510/
+ <rom name="Terminator, The (USA).cue" size="1165" crc="5f9f4e4b" md5="68a66526821f2ca794cc1f8a4e489dcc" sha1="0523868e28061d3d02ec488ed1b37b8bc0c4ff92"/>
+ <rom name="Terminator, The (USA) (Track 01).bin" size="123449424" crc="ae8dbaab" md5="6b52ac74ebbe7593901caf2d5bfae219" sha1="049a79e3ba42aaa4f42747442272ab269ae91b40"/>
+ <rom name="Terminator, The (USA) (Track 02).bin" size="27779472" crc="23bef086" md5="480d91726c3b9537c8000a9017f8d359" sha1="a08e7f7e247900ff6644ee5ca33d2d06afbfe3fc"/>
+ <rom name="Terminator, The (USA) (Track 03).bin" size="36514800" crc="52a5ae94" md5="56389641bd94b9c8515d63ccaf655671" sha1="ddc9593e129c5576448126e513b2ad46caaecab2"/>
+ <rom name="Terminator, The (USA) (Track 04).bin" size="43307376" crc="1ff9aefb" md5="40ed6ed239d2686916908d35c38f4e19" sha1="ac21e908cbce48c474ca821531d37cf77ff15c0a"/>
+ <rom name="Terminator, The (USA) (Track 05).bin" size="55036800" crc="9bbfc8e6" md5="4d7ba1fb82244f4bbb2a670a2ee8e602" sha1="04fe0877b3f96518d8b4fbd9ee9d432d92ca85e8"/>
+ <rom name="Terminator, The (USA) (Track 06).bin" size="44276400" crc="d9ee0053" md5="c2614e95473471ebe096adee1da53934" sha1="65debe841e671b1c75485a04250f231ad420ea15"/>
+ <rom name="Terminator, The (USA) (Track 07).bin" size="45687600" crc="74255f7a" md5="3b49294b78f9c2c5977eb59e455eb999" sha1="d25d72e483e8d115a8ca1ede9ff951f1c27010d5"/>
+ <rom name="Terminator, The (USA) (Track 08).bin" size="36961680" crc="6ee705d6" md5="fd06c678c402e39b865247306b50c037" sha1="0a2ba8111d2b9607873b03edade3030f423439c4"/>
+ <rom name="Terminator, The (USA) (Track 09).bin" size="17110800" crc="ad45dccf" md5="a90ac0280f2c4b427b3211e9cf9fc17e" sha1="3c7f4fadf83908524bac58d5192eb853a8bbdd2b"/>
+ <rom name="Terminator, The (USA) (Track 10).bin" size="38812704" crc="3214230a" md5="9bad72cce0ee085eae0a859533cae980" sha1="2bf62db6b7ec9496bedf3b1f49d9b4c13e8bd104"/>
+ -->
+ <description>The Terminator (USA)</description>
+ <year>1993</year>
+ <publisher>Virgin Games</publisher>
+ <info name="serial" value="T-70015"/>
+ <info name="release" value="199306xx" />
+ <info name="ring_code" value="SEGACD86003 R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the terminator (usa)" sha1="43bf02bf06fc5d1bd32bc61b11acd1745d2d7a1d"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="timegal">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/625/
<rom name="Time Gal (USA).cue" size="198" crc="27b9ee28" />
<rom name="Time Gal (USA) (Track 1).bin" size="298936848" crc="2941c00f" />
<rom name="Time Gal (USA) (Track 2).bin" size="1653456" crc="bf577267" />
@@ -1518,6 +3588,7 @@
<year>1993</year>
<publisher>Renovation</publisher>
<info name="serial" value="T-6214"/>
+ <info name="release" value="199305xx" />
<info name="ring_code" value="SEGAT49025 R2C MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1527,7 +3598,7 @@
</software>
<software name="tcataly">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3485/
<rom name="Tomcat Alley (USA).cue" size="206" crc="3106e238" />
<rom name="Tomcat Alley (USA) (Track 1).bin" size="567408240" crc="8110d2ef" />
<rom name="Tomcat Alley (USA) (Track 2).bin" size="2335536" crc="77561509" />
@@ -1536,6 +3607,7 @@
<year>1994</year>
<publisher>Sega</publisher>
<info name="serial" value="4429"/>
+ <info name="release" value="199403xx" />
<info name="ring_code" value="1008604429 9/95 1RA1"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
@@ -1544,8 +3616,64 @@
</part>
</software>
+ <software name="tcatalya" cloneof="tcataly">
+ <!-- Source: redump.org - http://redump.org/disc/24405/
+ <rom name="Tomcat Alley (USA).cue" size="229" crc="472a189e" md5="779b6e95b27983fce151ddbc350d1651" sha1="84aca06cfb9bfb2cb881eddfe2251a4aabc4891c"/>
+ <rom name="Tomcat Alley (USA) (Track 1).bin" size="567756336" crc="e064fd12" md5="147bfb944524cbcdd78671348205853c" sha1="49b8fdc6d399bc2bf4c1c5c48922abf1ef5accc8"/>
+ <rom name="Tomcat Alley (USA) (Track 2).bin" size="2337888" crc="aa74f12a" md5="157a4fb5cc0fddde1a5d7ec4b2bd848d" sha1="cbb5362ca92cc0d8ff050c92af3ed5ecf934b045"/>
+ -->
+ <description>Tomcat Alley (USA, Alt)</description>
+ <year>1994</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4429"/>
+ <info name="ring_code" value="CDAC-058500 1, CDAC-058500 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="tomcat alley (usa, alt)" sha1="0d2ab8e7934c162ef16d233c62f02b9c0268aca4"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="vay">
+ <!-- Source: redump.org - http://redump.org/disc/21511/
+ <rom name="Vay (USA).cue" size="2293" crc="47a228e8" md5="b3a9694fcfa531bbcabeb4a5c2d372d2" sha1="0ac359d68e4f54a8279ef9a1a2209744dcaab364"/>
+ <rom name="Vay (USA) (Track 01).bin" size="137883648" crc="1d9be2b9" md5="71ffefc6efc3760ab205bab471462f00" sha1="e2c9d8438cef364d31d7ffee2df5894e09168572"/>
+ <rom name="Vay (USA) (Track 02).bin" size="1368864" crc="a3b616c3" md5="072263a2a1e2eab5d65086c46de4e13e" sha1="74d152c0d431266320728b166bbf03b06204f472"/>
+ <rom name="Vay (USA) (Track 03).bin" size="21414960" crc="d1785886" md5="889584498680112b6b60fd45ba29fd88" sha1="135fc05ef83f05675c788e4e2cbfc39aec0b4e23"/>
+ <rom name="Vay (USA) (Track 04).bin" size="21231504" crc="2e0b0967" md5="4d19a17b4ad51afa7758a0ddd02a1670" sha1="e39bed8b8085f77558ae03d32e82db3292d3f643"/>
+ <rom name="Vay (USA) (Track 05).bin" size="21873600" crc="4a200adc" md5="99024d9d7d1e5495fc834d99bd970ccb" sha1="cf88de58f96d866738d79f69aad8db5aba33b738"/>
+ <rom name="Vay (USA) (Track 06).bin" size="22151136" crc="a518f89c" md5="a53edd88dfed77ba823564c5d650be8e" sha1="a4b742d1acd1deb8f79c675e8dbc59aa56465224"/>
+ <rom name="Vay (USA) (Track 07).bin" size="20528256" crc="5098e8b0" md5="31555006d27bde167b2ff19f2f6a580d" sha1="d56d9a0db6216f5ef7e023bf968b57e3d8f1fca1"/>
+ <rom name="Vay (USA) (Track 08).bin" size="16746240" crc="17c9b301" md5="e96fade0a674936063beef2b1d5ef246" sha1="b966a582156db84e682270331870a90b773830f4"/>
+ <rom name="Vay (USA) (Track 09).bin" size="21937104" crc="4e95f508" md5="12737bad5d4eaaef232682bceaf18a96" sha1="2ff773ec9aea95631c15c8da0ee3a209ccaa59d0"/>
+ <rom name="Vay (USA) (Track 10).bin" size="7658112" crc="55452c6e" md5="eb790dac5787089f5597cba6cc3d4539" sha1="5b4ce649e8a01ccfce93972f91475ef5b1e91b84"/>
+ <rom name="Vay (USA) (Track 11).bin" size="11952864" crc="e619746c" md5="fba2a6173e4c381e3ea07d71b838fa5a" sha1="1732a5a5c342ba0edd5e6a9839c3db10edb5a033"/>
+ <rom name="Vay (USA) (Track 12).bin" size="10259424" crc="b8ed2901" md5="3a9025327ecf9e6e729d5ba5dc789b57" sha1="b6c36d7e07552b9e57287479f1a9df801695a70e"/>
+ <rom name="Vay (USA) (Track 13).bin" size="16595712" crc="e5e91ecc" md5="61d1a257f105207f35e9ccea535deaf2" sha1="43c4998fe0814e5c6bcc2b305300b307fa2af198"/>
+ <rom name="Vay (USA) (Track 14).bin" size="1164240" crc="fd5652f0" md5="f735a42681dda8be327cd48452207c73" sha1="6bd72ddf690e383b266f4417aa0d595aa402cacc"/>
+ <rom name="Vay (USA) (Track 15).bin" size="32163600" crc="5483007c" md5="887a4ee192dddbc98cfaf8674aa808f4" sha1="d8a96cd0e2eef1504378e40ab4b650708e92eaa6"/>
+ <rom name="Vay (USA) (Track 16).bin" size="19201728" crc="1bd84314" md5="c32fee2e833cd01be788f7449840e1d0" sha1="6599601132f7116b7e99b538f172283efbe04575"/>
+ <rom name="Vay (USA) (Track 17).bin" size="21944160" crc="8b1f98e0" md5="6bfc5af660fb8c0f3a82ea47c28ea4f4" sha1="c50768f337b384f72ad243b0b2e89916a2ce4823"/>
+ <rom name="Vay (USA) (Track 18).bin" size="8351952" crc="3008ccc9" md5="034d18ebf6d9e0336f7e6d100020f0df" sha1="0bd9c790ef8707d4299f6cbcca0d379b59c434ef"/>
+ <rom name="Vay (USA) (Track 19).bin" size="27005664" crc="61de2874" md5="193976ced7bca7dbf148ba0c5e39b472" sha1="bb36a4457d808294bae3043440ad48a92e3ce2f9"/>
+ <rom name="Vay (USA) (Track 20).bin" size="8194368" crc="22ab7074" md5="97a2347fe13b895236d1d827bee1fe24" sha1="0dd88407fa72f4b794d1ceb6d1a9bfd02527f5ff"/>
+ <rom name="Vay (USA) (Track 21).bin" size="8692992" crc="f0466d6c" md5="e8eac7419084082f8bcf7e666348e022" sha1="b06fdb32039c30f6067b34ff04c2ed736b8b38a4"/>
+ <rom name="Vay (USA) (Track 22).bin" size="17221344" crc="963057f2" md5="fc4f73bcb0adda7190c6fb3fe1886217" sha1="01c8ba9f9ef8cd7593855d53ea0e3c6f95db2059"/>
+ -->
+ <description>Vay (USA)</description>
+ <year>1994</year>
+ <publisher>Working Designs</publisher>
+ <info name="serial" value="T-127025"/>
+ <info name="ring_code" value="SEGAT127025ARE R1D MFD BY JVC"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="vay (usa)" sha1="099e4c43d8ca5eb57854db25cbcbfc3139e41a9e"/>
+ </diskarea>
+ </part>
+ </software>
+
<software name="wheelfor">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/8273/
<rom name="Wheel of Fortune (USA).cue" size="910" crc="a383dffe" />
<rom name="Wheel of Fortune (USA) (Track 1).bin" size="58670640" crc="54163db9" />
<rom name="Wheel of Fortune (USA) (Track 2).bin" size="19086480" crc="0ce7b26d" />
@@ -1569,7 +3697,7 @@
</software>
<software name="whoshot">
- <!-- source redump.org
+ <!-- Source: redump.org - http://redump.org/disc/3303/
<rom name="Who Shot Johnny Rock (USA).cue" size="222" crc="b288f6df" />
<rom name="Who Shot Johnny Rock (USA) (Track 1).bin" size="248963904" crc="704bb4ba" />
<rom name="Who Shot Johnny Rock (USA) (Track 2).bin" size="1874544" crc="f65cb7d6" />
@@ -1586,145 +3714,198 @@
</part>
</software>
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
+ <software name="wingcomm">
+ <!-- Source: redump.org - http://redump.org/disc/19466/
+ <rom name="Wing Commander (USA).cue" size="804" crc="47b303b2" md5="e284ba5630e5fe637c75a23dcae937ef" sha1="0384cbd28a94e93e4a26561329e7c86e61f45721"/>
+ <rom name="Wing Commander (USA) (Track 1).bin" size="385394016" crc="df21b6e3" md5="1677878b98ccd075792c6b2906879010" sha1="89863d46871fd6a0f46c98b2bd5a9a8a8ff041f2"/>
+ <rom name="Wing Commander (USA) (Track 2).bin" size="20761104" crc="cd279afb" md5="2b1ff3dafaf1184a6d90ac15e70398a8" sha1="24525be27a75677c20689a35df916a065049e672"/>
+ <rom name="Wing Commander (USA) (Track 3).bin" size="6465648" crc="e64b2cfd" md5="4bbec78de59871afbeb0ddcd17006338" sha1="39135a721412e6b37d2c9d7bd424d0e0f93bce54"/>
+ <rom name="Wing Commander (USA) (Track 4).bin" size="5103840" crc="10d7fde8" md5="501dea862b26ee9da9eab842e77a60fd" sha1="32f39ccd1842e7276605d1dd3bd73ec1f02376ff"/>
+ <rom name="Wing Commander (USA) (Track 5).bin" size="6211632" crc="451e2b4e" md5="a2778b999e4478de827f20d357aae545" sha1="a10c3c5d19e6db35c11ecdeb2f130d8b66a8050a"/>
+ <rom name="Wing Commander (USA) (Track 6).bin" size="30406656" crc="e34dca24" md5="9411cd4d1cb7f103e7e1909db2d0622d" sha1="6e4d06f6f4eadac0092c59c77f6262def18ce767"/>
+ -->
+ <description>Wing Commander (USA)</description>
+ <year>1993</year>
+ <publisher>Electronic Arts</publisher>
+ <info name="serial" value="T-50045"/>
+ <info name="release" value="199302xx" />
+ <info name="ring_code" value="CDAC-059000 2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="wing commander (usa)" sha1="d36f61f84a87518691438a3c4f9862b2ce23e483"/>
+ </diskarea>
+ </part>
+ </software>
+ <software name="wirehead">
+ <!-- Source: redump.org - http://redump.org/disc/28035/
+ <rom name="WireHead (USA).cue" size="221" crc="2ec162e1" md5="cdc78b8d197a76ace26295a2ef1179ec" sha1="323d827469093030548ed52722ab37312f9ce71b"/>
+ <rom name="WireHead (USA) (Track 1).bin" size="626641008" crc="e896b306" md5="f8fd756c5692f74e5a2ea97c8a302bcc" sha1="c0812455aa6b81aea5f0a20e15901bfba3e01d47"/>
+ <rom name="WireHead (USA) (Track 2).bin" size="1982736" crc="d5a007ad" md5="2e00d8aa85fe90f039e7c0156b3e63b1" sha1="1b2ecedb429924e3f009ce355649d2ec9781aa3e"/>
+ -->
+ <description>WireHead (USA)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4437"/>
+ <info name="ring_code" value="1008604437 8/95 1RA2"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="wirehead (usa)" sha1="762bb917b936f1a781a2fbe66bbe3a9bf5dd5d43"/>
+ </diskarea>
+ </part>
+ </software>
- <!--- Images below are from the TOSEC set -->
- <software name="3ninja">
- <!-- source toseciso
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="1829" crc="d03273c9" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 01 of 12)[!].iso" size="68491264" crc="9755f862" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 02 of 12)[!].wav" size="27821852" crc="080de915" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 03 of 12)[!].wav" size="12886652" crc="1cabf10e" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 04 of 12)[!].wav" size="22106492" crc="65ab0bad" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 05 of 12)[!].wav" size="29559980" crc="ef943ec7" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 06 of 12)[!].wav" size="14613020" crc="c09ab4a6" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 07 of 12)[!].wav" size="34983692" crc="c4ae607e" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 08 of 12)[!].wav" size="13806284" crc="683ef6d0" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 09 of 12)[!].wav" size="21610220" crc="19b8c5c2" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 10 of 12)[!].wav" size="30968828" crc="0714c5a6" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 11 of 12)[!].wav" size="39320780" crc="d0495030" />
- <rom name="3 Ninjas Kick Back (1994)(Sony Imagesoft)(NTSC)(US)(Track 12 of 12)[!].wav" size="25486316" crc="1e384775" />
+ <software name="wcup94">
+ <!-- Source: redump.org - http://redump.org/disc/24402/
+ <rom name="World Cup USA '94 (USA).cue" size="2129" crc="4de8096f" md5="d4ad9c5d6d551ef8036f57bd40c95e09" sha1="d0e67e85e3778a2cc408af14a2b6db475e0bda54"/>
+ <rom name="World Cup USA '94 (USA) (Track 01).bin" size="129268272" crc="364850ab" md5="657d57f82b9d85006a22513fa2846d2d" sha1="ccde562c9396af4761c17f72cfa19b65b1762a58"/>
+ <rom name="World Cup USA '94 (USA) (Track 02).bin" size="24192672" crc="5a991853" md5="4db26fab6659f7da3260d46bbd58a440" sha1="ab3af947968a3b4edec2598024bb5552343e7657"/>
+ <rom name="World Cup USA '94 (USA) (Track 03).bin" size="33765312" crc="ee245b8f" md5="8a53cc8149df69466ee276fee437f7c1" sha1="5d9cc206fe40172cb45cb03673d030043d271ff1"/>
+ <rom name="World Cup USA '94 (USA) (Track 04).bin" size="32530512" crc="e7bf4e49" md5="30fdbb61b42b3160e6a3bacbb43bc2e8" sha1="32a55a070300f867198c5939c1332ed04509e340"/>
+ <rom name="World Cup USA '94 (USA) (Track 05).bin" size="33586560" crc="79c14c60" md5="634b55bba32bbfcbae3f01294a084662" sha1="3746241906bee50663cfe8d47fe547245a5837fb"/>
+ <rom name="World Cup USA '94 (USA) (Track 06).bin" size="40659024" crc="c27c2b82" md5="0fd69ed0cdb922570f54c8e4cd3c9ea0" sha1="6e19f7a66c8121c680015b55f8b5653c5ef969ef"/>
+ <rom name="World Cup USA '94 (USA) (Track 07).bin" size="33934656" crc="ec2839b2" md5="eb8da4d970a73564bfe9ccc0b929902a" sha1="645c7fd5017f5b8f3693277c6b2078492946d194"/>
+ <rom name="World Cup USA '94 (USA) (Track 08).bin" size="32528160" crc="682d92d0" md5="7d870affca1840c9b360aef546b80f5c" sha1="66bb5dad6086afb50e4d5d755eebbee8fcd1b7ed"/>
+ <rom name="World Cup USA '94 (USA) (Track 09).bin" size="25749696" crc="0f2d8dd5" md5="9d091a72b1918ddde1055acf2705e1bc" sha1="00464883b7f5f79f032f27ec4b792439c5f95b4d"/>
+ <rom name="World Cup USA '94 (USA) (Track 10).bin" size="35232960" crc="11500d7b" md5="d2c467b0b5e3ba6d0280750d87da6f7f" sha1="bdb2deeadcf00da59b80587a79ea2143a3240f77"/>
+ <rom name="World Cup USA '94 (USA) (Track 11).bin" size="23030784" crc="207fd82c" md5="f6e892cdc762ca03e26c41a8c2859a99" sha1="655b8e282876ef4c4b2cb642b359ccfeabf36fcd"/>
+ <rom name="World Cup USA '94 (USA) (Track 12).bin" size="19201728" crc="95a80cd2" md5="9a004279bd1564075770cecee7c4222e" sha1="f85d1fde9825556134f3fc9d9b981773d5ad9c08"/>
+ <rom name="World Cup USA '94 (USA) (Track 13).bin" size="33120864" crc="bfc4a09b" md5="0bc02ac474a59c960e3a360321ea82e8" sha1="0c68f1e5f1674db916853c15883c1093851ce972"/>
+ <rom name="World Cup USA '94 (USA) (Track 14).bin" size="16979088" crc="7ad31098" md5="98b01e3b6afbdd3e9a11a7275056dc53" sha1="16597e96a6392ffc5057d36f4850a131f832eb8a"/>
+ <rom name="World Cup USA '94 (USA) (Track 15).bin" size="27299664" crc="66a51f36" md5="4a08e903037369832a69ba964ae1e7de" sha1="ca32d0311fe6bb95e94b690417b304a1d5d7b410"/>
+ <rom name="World Cup USA '94 (USA) (Track 16).bin" size="33967584" crc="0e97f89d" md5="75188e4eeb84917947f3e27e3ad141c8" sha1="cf2ecfb9f1bae86a8debbe0e22659e334576f15b"/>
+ <rom name="World Cup USA '94 (USA) (Track 17).bin" size="36674736" crc="2041e45f" md5="200be17aa2ccf78d49a895ea4cd9c609" sha1="99c1079fdb523da457c86ac987b140f574aa82e4"/>
+ <rom name="World Cup USA '94 (USA) (Track 18).bin" size="29853936" crc="60975fce" md5="353a677002e2db4af5962ddadf9405e4" sha1="52066e825880b1005205728aa8d35a88fd628092"/>
-->
- <description>3 Ninjas Kick Back (USA)</description>
+ <description>World Cup USA 94 (USA)</description>
<year>1994</year>
- <publisher>Sony Imagesoft</publisher>
+ <publisher>U.S. Gold</publisher>
+ <info name="serial" value="T-79025"/>
+ <info name="ring_code" value="SEGAT79025 R2D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="3 ninjas kick back (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="772ab6cba658e9851d6ead099e0100a21860228f"/>
+ <disk name="world cup usa 94 (usa)" sha1="cb17c8ea42ec3a7d9562a0e188610a687f6b8829"/>
</diskarea>
</part>
</software>
- <software name="wilybeam">
- <!-- source toseciso
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)[!][CDAC-036400 1].cue" size="2525" crc="1e49f272" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 01 of 15)[!][CDAC-036400 1].iso" size="203118592" crc="4b375d21" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 02 of 15)[!][CDAC-036400 1].wav" size="1411244" crc="d0926701" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 03 of 15)[!][CDAC-036400 1].wav" size="3525692" crc="eee428e0" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 04 of 15)[!][CDAC-036400 1].wav" size="1178396" crc="f9773927" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 05 of 15)[!][CDAC-036400 1].wav" size="25895564" crc="38d2cb9e" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 06 of 15)[!][CDAC-036400 1].wav" size="4734620" crc="9109e2c3" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 07 of 15)[!][CDAC-036400 1].wav" size="12637340" crc="0f0fdce2" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 08 of 15)[!][CDAC-036400 1].wav" size="9151676" crc="a0d27b45" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 09 of 15)[!][CDAC-036400 1].wav" size="13074812" crc="eca067a4" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 10 of 15)[!][CDAC-036400 1].wav" size="4696988" crc="a6d7296d" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 11 of 15)[!][CDAC-036400 1].wav" size="1065500" crc="e6131f3c" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 12 of 15)[!][CDAC-036400 1].wav" size="1274828" crc="3e7d7d2f" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 13 of 15)[!][CDAC-036400 1].wav" size="1265420" crc="796609d2" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 14 of 15)[!][CDAC-036400 1].wav" size="11614220" crc="ad135307" />
- <rom name="Adventures of Willy Beamish, The (1993)(Dynamix)(US)(Track 15 of 15)[!][CDAC-036400 1].wav" size="1879292" crc="e4b7c273" />
+ <software name="ragecage">
+ <!-- Source: redump.org - http://redump.org/disc/24400/
+ <rom name="WWF - Rage in the Cage (USA).cue" size="249" crc="441f81ae" md5="ac6e90c5f1a67e8979469a12fc920205" sha1="884fc60aa3c55b030436fa8708fe84873a455a8b"/>
+ <rom name="WWF - Rage in the Cage (USA) (Track 1).bin" size="244071744" crc="d8108020" md5="0b343e4747c88cd1a5a53c4a0a3ff231" sha1="bd00621b669deae9cd88f2d773bd9bbe65f14146"/>
+ <rom name="WWF - Rage in the Cage (USA) (Track 2).bin" size="3885504" crc="375c89e2" md5="47a21e6123c5224f676090e6e17e60c0" sha1="95d76698d0196deef72e0ffff8540a9f9303a113"/>
-->
- <description>The Adventures of Willy Beamish (USA)</description>
+ <description>WWF Rage in the Cage (USA)</description>
<year>1993</year>
- <publisher>Dynamix</publisher>
- <info name="serial" value="T-6300"/>
- <info name="ring_code" value="CDAC-036400 1"/>
+ <publisher>Arena</publisher>
+ <info name="serial" value="T-81015"/>
+ <info name="release" value="199311xx" />
+ <info name="ring_code" value="SEGAT81015 R3D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="adventures of willy beamish, the (1993)(dynamix)(us)[!][cdac-036400 1]" sha1="6a74c3bc80d53ab427eee8dc19b9b66b017fd9f1"/>
+ <disk name="wwf rage in the cage (usa)" sha1="960a6ffa31b52e7ca8e7759f3d385940c8f2eb56"/>
</diskarea>
</part>
</software>
- <software name="spidking">
- <!-- source toseciso
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)[!][CDAC-047100 6].cue" size="2319" crc="a0f598b2" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 01 of 13)[!][CDAC-047100 6].iso" size="135254016" crc="4fb4340f" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 02 of 13)[!][CDAC-047100 6].wav" size="43751948" crc="4b8083e4" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 03 of 13)[!][CDAC-047100 6].wav" size="35096588" crc="cf3871e3" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 04 of 13)[!][CDAC-047100 6].wav" size="32916284" crc="ccfa3795" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 05 of 13)[!][CDAC-047100 6].wav" size="40978940" crc="262b7916" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 06 of 13)[!][CDAC-047100 6].wav" size="32191868" crc="c511a28a" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 07 of 13)[!][CDAC-047100 6].wav" size="33631292" crc="2626bc4d" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 08 of 13)[!][CDAC-047100 6].wav" size="32551724" crc="682fdebc" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 09 of 13)[!][CDAC-047100 6].wav" size="31493324" crc="4bfc55c6" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 10 of 13)[!][CDAC-047100 6].wav" size="51668780" crc="cb98247e" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 11 of 13)[!][CDAC-047100 6].wav" size="29889260" crc="b5a6f896" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 12 of 13)[!][CDAC-047100 6].wav" size="28358108" crc="66fb061a" />
- <rom name="Amazing Spider-Man vs. The Kingpin, The (1993)(Sega)(NTSC)(US)(Track 13 of 13)[!][CDAC-047100 6].wav" size="7956860" crc="490df446" />
+ <!-- The following images are from the TOSEC-ISO set. -->
+
+ <software name="bariarm">
+ <!-- Source: TOSEC-ISO
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 01 of 19)[!].iso" size="14649344" crc="720dbf7b" md5="434a1fa9ee14c237dd7ca723d9494c02" sha1="fd8bdc313f16a30b3db2e3a036603fc0161c3d91"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 02 of 19)[!].wav" size="21687836" crc="a0ecfeae" md5="73cb75d2fbfee904fe7340992f533ba4" sha1="4fc1c2c439c560759e00a30575bdd4e048166166"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 03 of 19)[!].wav" size="21422060" crc="e368120f" md5="ff13cca568399bec331fa3bf7ed63248" sha1="55b06b18958ddbc3cadb7d06aa16e7413bec8775"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 04 of 19)[!].wav" size="8342588" crc="5b786d65" md5="f6baf1112b7f1c0a9a14c2c6215ceb07" sha1="f40b83fcf707ee1e491234281a98bb3509791abf"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 05 of 19)[!].wav" size="32937452" crc="c1f79f7f" md5="2f92c18f49cdcf505e002cdef96ad175" sha1="f1c4bb90190c23ce5de9dd500db7a82dd0060cbf"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 06 of 19)[!].wav" size="7909820" crc="bc186c1f" md5="f1ed2167bb5c5b68e5cd75680c11432c" sha1="c7ea91405308b52c49de06470b845cc5cb00690c"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 07 of 19)[!].wav" size="32189516" crc="45c52ee3" md5="e92f745daac31f1ec52783ab2ac7b70f" sha1="75098851f427d6efb5c5a28af0f124397ada5e9c"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 08 of 19)[!].wav" size="2225036" crc="c1b7aeeb" md5="176a8c7fad42b23ebcf7d67da9602e8d" sha1="e8e8c589a3d9bcc8a2eaedbacda0191bbf7e84a9"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 09 of 19)[!].wav" size="29976284" crc="fa4bcc5c" md5="23af90a0ffa47168a25348764ad68354" sha1="3e06b95bfd99967d6c77373d3435414a05970b66"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 10 of 19)[!].wav" size="19453436" crc="1db985cd" md5="c263f0bd57ca3b5585425b72ca54a2a9" sha1="f2a17f32e0c641eccad011c3e11fbb2fbb693827"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 11 of 19)[!].wav" size="20855228" crc="3ccaf5f0" md5="63eb334112393eaaf606d4eb85557669" sha1="79483bec31271739b4088e392508f8c775223fce"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 12 of 19)[!].wav" size="32516444" crc="654c4b7d" md5="9c6c1b7982c5bf663228c43b8c7357f7" sha1="785a82d1d61768ee116e58bc2d313cd29245bba3"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 13 of 19)[!].wav" size="5214428" crc="96716d21" md5="6f1ff8fa91a909cf5ff1f9bf6ecdccd8" sha1="103eb51b8d08633666121ea2a22057e561cff33f"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 14 of 19)[!].wav" size="32238908" crc="668673d4" md5="e9293cf2e2599bbf72f324fd72cb388d" sha1="cbae14150e67ac58d7642af31bd6f0b6efc239bd"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 15 of 19)[!].wav" size="21798380" crc="100bd98f" md5="9ee7545006ef12b5258efcf8cae316f9" sha1="277a4acf5230bd0a9a474380f4c5665a53828520"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 16 of 19)[!].wav" size="21024572" crc="961fa432" md5="ccea65b66d12d8afd93ed9ce3f845bd5" sha1="5e79a19ec766964894918b5d54076aea2ae7e311"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 17 of 19)[!].wav" size="22285244" crc="b4f6f80c" md5="681f18c072d8098f9ae644b51bb11b43" sha1="74cd0c2338c8621bc952c8a5644b68068beb5faf"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 18 of 19)[!].wav" size="11802380" crc="34ee3fa2" md5="b1c4f59ddb43d04f25c06690819c9c1d" sha1="0ed389f3a007b46b77e42b930d0066171640cc6a"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)(Track 19 of 19)[!].wav" size="1507676" crc="9e5212ba" md5="c41a3c9297f2f3fce3755b165a777750" sha1="af09cb4412e1c98595aee95b34bc45bd1ac611ee"/>
+ <rom name="Android Assault - The Revenge of Bari-Arm (1994)(Sega)(NTSC)(US)[!].cue" size="3140" crc="a3ff4a42" md5="e5f8e9642b5917922e7350e97ff80954" sha1="ffbc424e46ea1603d2c95653661902b2aee82153"/>
-->
- <description>The Amazing Spider-Man vs. The Kingpin (USA)</description>
- <year>1993</year>
+ <description>Bari-Arm (USA)</description>
+ <year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4412"/>
- <info name="ring_code" value="CDAC-047100 6"/>
+ <info name="alt_title" value="Android Assault - The Revenge of Bari-Arm (Box)" />
+ <info name="release" value="199410xx" />
+ <info name="serial" value="4445"/>
+ <info name="ring_code" value="T-163015-00"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="bari-arm (usa)" sha1="99419bf60689cf563a26236f7db116b72ad6ab8b"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!--
+ This game was developed for the Sega Mega-CD system by Domark and was released in Europe as Bloodshot.
+ A stateside release never happened, but in 2003 Good Deal Games released a set of reproduction disc
+ made from a prototype build of the US version of the game, titled Battle Frenzy. This is a dump from
+ one of those reproduction discs.
+ -->
+ <software name="batlfrnz">
+ <!-- Source: TOSEC-ISO
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 01 of 17)[!].iso" size="6565888" crc="5121222b" md5="8700acac579f4eb87253ac242d311b36" sha1="9375c009ac79fc9e7458824b72abae326f9772ff"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 02 of 17)[!].wav" size="45727628" crc="5956bd4d" md5="287941c635736ff97090386bddd261bb" sha1="6cf437ae6a1e3719affbef02bc793d1cc5214e2b"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 03 of 17)[!].wav" size="32918636" crc="575b63c6" md5="8f0cc4984d85ec094ee10657b5d65b72" sha1="45f943f588310b3c2780fd08ecd54f137ed9d90c"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 04 of 17)[!].wav" size="2208572" crc="ea41644c" md5="3cf25a5f3358e29229522781201b3f29" sha1="33f617e7175319ded29da8562008ec7483a4acc9"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 05 of 17)[!].wav" size="15304508" crc="5d9ff909" md5="8f4e90579747b276511380ea4c6f7dfa" sha1="98422ff5be5b3eedb14c5af844ff5e31358e1c6c"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 06 of 17)[!].wav" size="18079868" crc="21a4a036" md5="9155592458c2adef561b044c5a547cd2" sha1="9a14b2e26ae1cceb01052bb7709b65d8d7ef649b"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 07 of 17)[!].wav" size="31977836" crc="edff90df" md5="fe8305e2804d09ea8dfe0197d099896b" sha1="4a28de05f7f785bdd09673211b9594b841ff6907"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 08 of 17)[!].wav" size="59517404" crc="bb90c5f2" md5="ccffdcb1cbe85af90dd4e9cff71f12c9" sha1="6e52fe7b30471eb3f539d66a256a23240cbc510b"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 09 of 17)[!].wav" size="50346956" crc="290e7d08" md5="741fa78585329045698c8bf7430b24e7" sha1="b08ca368aa354ebb4bd7b172c34eb5e95dae39e5"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 10 of 17)[!].wav" size="45675884" crc="c6a1679e" md5="b3c9ee13ea33e9a9ea6071a4c79a90a5" sha1="2bb4762c3259df7ca136a562a6c4dd12d9c67556"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 11 of 17)[!].wav" size="60100700" crc="d26fcf52" md5="e4ee1b6ae82d375ba0b5565bf7644195" sha1="95b187a3ad0d79af8d739764936d9c2922a6a65b"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 12 of 17)[!].wav" size="39033836" crc="d5478e0f" md5="85e0207a36f91ee7c8a24a8c313603ac" sha1="a067829a058684a3fa7cfab1d8b36394077a9155"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 13 of 17)[!].wav" size="47818556" crc="fa9e90b6" md5="31e38583c769b059e47479451f885d50" sha1="ee5f01fce04e5e62b913d61c25ef4698cf9cb93f"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 14 of 17)[!].wav" size="3278732" crc="1e155ed1" md5="f66418303d0de01b6c6495d810c9e78e" sha1="7862ff88491cb604ca4640c9ed2ee1a3d8468dc8"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 15 of 17)[!].wav" size="5753036" crc="ff4b4545" md5="f2d70a2ce50e131030141c82ea2a7393" sha1="b70d4845922d23988085fa9b87cac254e7fd16b2"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 16 of 17)[!].wav" size="59896076" crc="0934d8f0" md5="d9131f2722cceee313a9060640f9a884" sha1="a22bc88ea678022c7a5f6905d99dfeb857543651"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)(Track 17 of 17)[!].wav" size="64651820" crc="b0b20d52" md5="03c5360790de73e4be476745680c3cdc" sha1="2fed7d760ff7c687c553a03ed6920d4093d88c62"/>
+ <rom name="Battle Frenzy (2003)(Good Deal Games - Oldergames)(NTSC)(US)(M4)[!].cue" size="2465" crc="f04bb8a2" md5="91f5ef49402455bb7c8e791417c68b7a" sha1="6b81c198a7d3309276b935fee96fc8b8799efab6"/>
+ -->
+ <description>Battle Frenzy (USA, Prototype)</description>
+ <year>2003</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="amazing spider-man vs. the kingpin, the (1993)(sega)(ntsc)(us)[!][cdac-047100 6]" sha1="050812db19ca35a1db549c18445d580c627c1e82"/>
+ <disk name="battle frenzy (usa, prototype)" sha1="5c60726206f1eb789358500c634924c9e7d8e798"/>
</diskarea>
</part>
</software>
- <software name="batmanrn">
- <!-- source toseciso
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)[!][CDAC-040500 1].cue" size="3218" crc="611f5059" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 01 of 21)[!][CDAC-040500 1].iso" size="17731584" crc="fc5a302f" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 02 of 21)[!][CDAC-040500 1].wav" size="811484" crc="fe2143b4" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 03 of 21)[!][CDAC-040500 1].wav" size="31109948" crc="e9d99888" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 04 of 21)[!][CDAC-040500 1].wav" size="26554124" crc="d4dc213e" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 05 of 21)[!][CDAC-040500 1].wav" size="26819900" crc="71c23c2e" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 06 of 21)[!][CDAC-040500 1].wav" size="15386828" crc="c2204a98" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 07 of 21)[!][CDAC-040500 1].wav" size="30681884" crc="508e3827" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 08 of 21)[!][CDAC-040500 1].wav" size="18091628" crc="5ccc8952" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 09 of 21)[!][CDAC-040500 1].wav" size="30877100" crc="801d58d6" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 10 of 21)[!][CDAC-040500 1].wav" size="27572540" crc="83fca8f9" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 11 of 21)[!][CDAC-040500 1].wav" size="21600812" crc="9159e4cb" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 12 of 21)[!][CDAC-040500 1].wav" size="35402348" crc="3cc7e69f" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 13 of 21)[!][CDAC-040500 1].wav" size="30921788" crc="2711d047" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 14 of 21)[!][CDAC-040500 1].wav" size="19495772" crc="f9875e93" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 15 of 21)[!][CDAC-040500 1].wav" size="22271132" crc="01436b12" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 16 of 21)[!][CDAC-040500 1].wav" size="24848924" crc="f751e46c" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 17 of 21)[!][CDAC-040500 1].wav" size="33598364" crc="de6466cc" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 18 of 21)[!][CDAC-040500 1].wav" size="13439372" crc="e6212d19" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 19 of 21)[!][CDAC-040500 1].wav" size="29828108" crc="d3792307" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 20 of 21)[!][CDAC-040500 1].wav" size="35665772" crc="54f7fe7d" />
- <rom name="Batman Returns (1993)(Sega)(NTSC)(US)(Track 21 of 21)[!][CDAC-040500 1].wav" size="31443932" crc="7ad6bd75" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Imagineering and was set for release in March 1995.
+ It was however scrapped before it was published. During the 2000s, Good Deal Games released a set of
+ reproduction discs based off a beta prototype build. This is a dump from one of those reproduction discs.
+ -->
+ <software name="graydeth">
+ <!-- Source: TOSEC-ISO
+ <rom name="Battletech - Gray Death Legion (2007)(Good Deal Games)(NTSC)(US)[!][unreleased beta].cue" size="173" crc="14ae9d68" md5="340a8d067cea412924cec94f015c665f" sha1="746cc88be999098afd138a485933d8999bb4948f"/>
+ <rom name="Battletech - Gray Death Legion (2007)(Good Deal Games)(NTSC)(US)[!][unreleased beta].iso" size="119787520" crc="107be434" md5="a7aad507e31d0aa79efedfab58c5d0ff" sha1="badbff8119a59546e9bc1efcda9700112a3cb183"/>
-->
- <description>Batman Returns (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4401"/>
- <info name="ring_code" value="CDAC-040500 1"/>
+ <description>Battletech - Gray Death Legion (USA, Prototype)</description>
+ <year>200?</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="batman returns (1993)(sega)(ntsc)(us)[!][cdac-040500 1]" sha1="15006b43f116d4e4d85ae335bddb4f6c70288c47"/>
+ <disk name="battletech - gray death legion (usa, prototype)" sha1="c27d1f4447a3ba431ee283266ba26ecd93e67916"/>
</diskarea>
</part>
</software>
- <software name="blackh">
+ <!-- This disc uses an internal serial number of T-6401 unlike the redump.org dump which has T-6400. Investigate why. -->
+ <software name="blackha" cloneof="blackh">
<!-- source toseciso
<rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)[!][CDAC-031700 2].cue" size="3639" crc="3595fca2" />
<rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 01 of 23)[!][CDAC-031700 2].iso" size="12064768" crc="b75afe61" />
@@ -1751,105 +3932,84 @@
<rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 22 of 23)[!][CDAC-031700 2].wav" size="35141276" crc="9b0b72d2" />
<rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 23 of 23)[!][CDAC-031700 2].wav" size="34301612" crc="0dd98031" />
-->
- <description>Blackhole Assault (USA)</description>
+ <description>Black Hole Assault (USA, Alt)</description>
<year>1993</year>
<publisher>Bignet</publisher>
- <info name="serial" value="T-6400"/>
+ <info name="alt_title" value="Blackhole Assault (Box)" />
+ <info name="serial" value="T-6401"/>
<info name="ring_code" value="CDAC-031700 2"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="blackhole assault (1993)(bignet)(ntsc)(us)[!][cdac-031700 2]" sha1="7b3e4027715b8752579ad862ac19daae50eb34ea"/>
+ <disk name="blackhole assault (usa, alt)" sha1="7b3e4027715b8752579ad862ac19daae50eb34ea"/>
</diskarea>
</part>
</software>
- <software name="blackha" cloneof="blackh">
- <!-- source toseciso
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)[!][CDAC-031700 1].cue" size="3156" crc="1da06ff9" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 01 of 23)[!][CDAC-031700 1].iso" size="12066816" crc="a7d096c2" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 02 of 23)[!][CDAC-031700 1].wav" size="15088124" crc="7ce3906b" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 03 of 23)[!][CDAC-031700 1].wav" size="30820652" crc="85574817" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 04 of 23)[!][CDAC-031700 1].wav" size="16268828" crc="13f81386" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 05 of 23)[!][CDAC-031700 1].wav" size="17522444" crc="bf20b127" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 06 of 23)[!][CDAC-031700 1].wav" size="20819948" crc="1badfcb1" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 07 of 23)[!][CDAC-031700 1].wav" size="29901020" crc="dfdd33a0" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 08 of 23)[!][CDAC-031700 1].wav" size="20958716" crc="2f4d64cb" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 09 of 23)[!][CDAC-031700 1].wav" size="23536508" crc="5a4ec8a1" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 10 of 23)[!][CDAC-031700 1].wav" size="26050796" crc="561cd2e1" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 11 of 23)[!][CDAC-031700 1].wav" size="18957164" crc="fcf674da" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 12 of 23)[!][CDAC-031700 1].wav" size="13596956" crc="d5667e05" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 13 of 23)[!][CDAC-031700 1].wav" size="15817244" crc="73dc5304" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 14 of 23)[!][CDAC-031700 1].wav" size="23750540" crc="213e2645" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 15 of 23)[!][CDAC-031700 1].wav" size="10997996" crc="6170f0d1" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 16 of 23)[!][CDAC-031700 1].wav" size="48190172" crc="a9115e1e" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 17 of 23)[!][CDAC-031700 1].wav" size="5981180" crc="9e1b61ff" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 18 of 23)[!][CDAC-031700 1].wav" size="19733324" crc="bb979eef" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 19 of 23)[!][CDAC-031700 1].wav" size="42867596" crc="e2e78572" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 20 of 23)[!][CDAC-031700 1].wav" size="35312972" crc="7c2f2bf4" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 21 of 23)[!][CDAC-031700 1].wav" size="14608316" crc="159c5dcb" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 22 of 23)[!][CDAC-031700 1].wav" size="35143628" crc="cb39f809" />
- <rom name="Blackhole Assault (1993)(Bignet)(NTSC)(US)(Track 23 of 23)[!][CDAC-031700 1].wav" size="33946460" crc="eea2e2b9" />
- -->
- <description>Blackhole Assault (USA, Alt)</description>
- <year>1993</year>
- <publisher>Bignet</publisher>
- <info name="serial" value="T-6400"/>
- <info name="ring_code" value="CDAC-031700 1"/>
+ <!--
+ This game was developed for the Sega Mega-CD system by Digital Pictures and was set for release in 1995.
+ It was however scrapped before it was published, probably in an entirely finished state. In 2001,
+ Good Deal Games released a set of reproduction discs based off a (final) prototype build. This is a dump
+ from one of those reproduction discs.
+ -->
+ <software name="bugblast" cloneof="bugblastse">
+ <!-- source TOSEC-ISO
+ <rom name="Bug Blasters - The Exterminators (2000)(Good Deal Games)(NTSC)(US)(Track 1 of 2).iso" size="492976128" crc="e46108f1" md5="12938bc2a8060529dde71513ec157965" sha1="7f8e7d7f172bfb60a7c53ccce8c1bc934d6bb0bd"/>
+ <rom name="Bug Blasters - The Exterminators (2000)(Good Deal Games)(NTSC)(US)(Track 2 of 2).wav" size="39036188" crc="2514f737" md5="17abb3aba0581b8a3824133dcc7fbbb8" sha1="1fc932cb99a91c4b7b46d8cd7a5b6b558eaf632a"/>
+ <rom name="Bug Blasters - The Exterminators (2000)(Good Deal Games)(NTSC)(US).cue" size="329" crc="edd2cc36" md5="10bdedc766be4cbbd7c3549b59513624" sha1="375bd4383edb0cd3c5b0eb4c2450b626d1faff82"/>
+ -->
+ <description>The Exterminators (USA, Prototype)</description>
+ <year>2001</year>
+ <publisher>Good Deal Games</publisher>
+ <info name="alt_title" value="Bug Blasters - The Exterminators (Box)" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="blackhole assault (1993)(bignet)(ntsc)(us)[!][cdac-031700 1]" sha1="584c78a01a136368d7f20b43a6eddb81674dd932"/>
+ <disk name="the exterminators (usa, prototype)" sha1="9c1e73e31c90d2cfdff50dce0e2c95c562934d96"/>
</diskarea>
</part>
</software>
- <software name="bouncers">
- <!-- source toseciso
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)[!].cue" size="1175" crc="1e416d71" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 1 of 9)[!].iso" size="207538176" crc="395c1132" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 2 of 9)[!].wav" size="26761100" crc="634bc2a6" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 3 of 9)[!].wav" size="25213484" crc="6104ec02" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 4 of 9)[!].wav" size="25996700" crc="c441b80d" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 5 of 9)[!].wav" size="27008060" crc="8048971c" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 6 of 9)[!].wav" size="23353052" crc="0385ef6c" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 7 of 9)[!].wav" size="28033532" crc="9e2cfa69" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 8 of 9)[!].wav" size="32262428" crc="51bc3031" />
- <rom name="Bouncers (1994)(Sega)(NTSC)(US)(Track 9 of 9)[!].wav" size="11656556" crc="ace00506" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Digital Pictures and was set for release in 1995.
+ It was however scrapped before it was published, probably in an entirely finished state. In 2001,
+ Good Deal Games released a set of reproduction discs based off a (final) prototype build. A later
+ production run, called Special Edition, is the basis for this dump.
+ -->
+ <software name="bugblastse">
+ <!-- source TOSEC-ISO
+ <rom name="Bug Blasters - The Exterminators (2003)(Good Deal Games)(US)(Track 1 of 2)[!][Special Edition].iso" size="492976128" crc="b075d182" md5="6355c5edff71253657a2fea615e4c1d9" sha1="3309530e9a8365a62b7644a066397907c392f7df"/>
+ <rom name="Bug Blasters - The Exterminators (2003)(Good Deal Games)(US)(Track 2 of 2)[!][Special Edition].wav" size="39036188" crc="ac3f1d80" md5="6037ed6379d9cdc1aee4c6906832bfeb" sha1="f97c6d45c2e25da8c6a9cf386eec7f911ebd8c6a"/>
+ <rom name="Bug Blasters - The Exterminators (2003)(Good Deal Games)(US)[!][Special Edition].cue" size="357" crc="87732831" md5="e0ff2d0320675ce21e10b60b6a79eb87" sha1="12ea928038d19dedf574922024246851a2b95c90"/>
-->
- <description>Bouncers (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4908"/>
+ <description>The Exterminators - Special Edition (USA, Prototype)</description>
+ <year>2003</year>
+ <publisher>Good Deal Games</publisher>
+ <info name="alt_title" value="Bug Blasters - The Exterminators (Box)" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="bouncers (1994)(sega)(ntsc)(us)[!]" sha1="0e7e23e6b31eaf8e70ae88ce0f5324ce89f12717"/>
+ <disk name="the exterminators - special edition (usa, prototype)" sha1="cb14ae1bf6825ac804a5508142759ff64d1d5b70"/>
</diskarea>
</part>
</software>
- <software name="draculab" cloneof="dracula">
- <!-- source toseciso
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)[!].cue" size="1111" crc="01c6d315" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 1 of 7)[!].iso" size="239912960" crc="38533298" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 2 of 7)[!].wav" size="42274892" crc="1941297b" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 3 of 7)[!].wav" size="50897324" crc="dbc85e69" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 4 of 7)[!].wav" size="10701644" crc="9b42be35" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 5 of 7)[!].wav" size="16779212" crc="45a909c9" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 6 of 7)[!].wav" size="4019612" crc="69973157" />
- <rom name="Bram Stoker's Dracula v2.0 (1993)(Sony Imagesoft)(NTSC)(US)(Track 7 of 7)[!].wav" size="46778972" crc="7b9b1dfc" />
- -->
- <description>Bram Stoker's Dracula (USA, v2.0)</description>
+ <software name="ccmusic">
+ <!-- Source: TOSEC-ISO
+ <rom name="Power Factory featuring C+C Music Factory (1993)(Sony Imagesoft)(NTSC)(US)[!].cue" size="166" crc="3eaf3f54" />
+ <rom name="Power Factory featuring C+C Music Factory (1993)(Sony Imagesoft)(NTSC)(US)[!].iso" size="374863872" crc="3cd44c0a" />
+ -->
+ <description>C+C Music Factory (USA)</description>
<year>1993</year>
<publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93065"/>
+ <info name="alt_title" value="Power Factory featuring C+C Music Factory (Box)" />
+ <info name="serial" value="T-93035"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="bram stoker's dracula v2.0 (1993)(sony imagesoft)(ntsc)(us)[!]" sha1="b358e43e94ddd1eea7244f8288c8ad33c083f5a1"/>
+ <disk name="c+c music factory (usa)" sha1="2fbb157ab695769d9dc11a9f56605934ad684a4c"/>
</diskarea>
</part>
</software>
<software name="dino2">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Rocket Science Games)(NTSC)(US)[!].cue" size="373" crc="2f49d7f0" />
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Rocket Science Games)(NTSC)(US)(Track 1 of 2)[!].iso" size="567900160" crc="0def7fd1" />
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Rocket Science Games)(NTSC)(US)(Track 2 of 2)[!].wav" size="877340" crc="e3d92fae" />
@@ -1860,13 +4020,13 @@
<info name="serial" value="T-153035"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="cadillacs and dinosaurs - the second cataclysm (1994)(rocket science games)(ntsc)(us)[!]" sha1="e39951f55e2b2792bcfcdb97c0b7d65522f829ef"/>
+ <disk name="cadillacs and dinosaurs - the second cataclysm (usa)" sha1="e39951f55e2b2792bcfcdb97c0b7d65522f829ef"/>
</diskarea>
</part>
</software>
- <software name="dino2b" cloneof="dino2">
- <!-- source toseciso
+ <software name="dino2br" cloneof="dino2">
+ <!-- Source: TOSEC-ISO
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Sega - Tec Toy)(NTSC)(Br)(en)[!].cue" size="369" crc="250e2bf0" />
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Sega - Tec Toy)(NTSC)(Br)(en)(Track 1 of 2)[!].iso" size="567900160" crc="0def7fd1" />
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Sega - Tec Toy)(NTSC)(Br)(en)(Track 2 of 2)[!].wav" size="877340" crc="4e0b4ee8" />
@@ -1874,69 +4034,54 @@
<description>Cadillacs and Dinosaurs - The Second Cataclysm (Bra)</description>
<year>1994</year>
<publisher>Tec Toy</publisher>
+ <info name="serial" value="063496"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="cadillacs and dinosaurs - the second cataclysm (1994)(sega - tec toy)(ntsc)(br)(en)[!]" sha1="04d8959520952c15c670e8b507d55c4eb0903d62"/>
+ <disk name="cadillacs and dinosaurs - the second cataclysm (bra)" sha1="04d8959520952c15c670e8b507d55c4eb0903d62"/>
</diskarea>
</part>
</software>
- <software name="chuckrck">
- <!-- source toseciso
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)[!].cue" size="1589" crc="c973e637" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 01 of 11)[!].iso" size="10993664" crc="13bf84c7" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 02 of 11)[!].wav" size="42042044" crc="1db85e94" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 03 of 11)[!].wav" size="42583004" crc="e7bbe0dd" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 04 of 11)[!].wav" size="41463452" crc="28f01278" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 05 of 11)[!].wav" size="44977340" crc="e002c18d" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 06 of 11)[!].wav" size="42190220" crc="a39f2f3a" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 07 of 11)[!].wav" size="19206476" crc="2008b521" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 08 of 11)[!].wav" size="40132220" crc="81821b0d" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 09 of 11)[!].wav" size="18413852" crc="d54b51e6" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 10 of 11)[!].wav" size="1434764" crc="57c4c652" />
- <rom name="Chuck Rock (1992)(Sony Imagesoft)(NTSC)(US)(Track 11 of 11)[!].wav" size="20718812" crc="47dba4f8" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Digital Pictures and was set for release in 1993.
+ It was however scrapped before it was published. In 2002, Good Deal Games released a set of reproduction
+ discs based off a beta prototype build. This is a dump from one of those reproduction discs.
+ -->
+ <software name="citizenx">
+ <!-- Source: TOSEC-ISO
+ <rom name="Citizen X Beta (2002)(Good Deal Games - Oldergames)(NTSC)(US)[!][unreleased beta].cue" size="170" crc="71c85c20" />
+ <rom name="Citizen X Beta (2002)(Good Deal Games - Oldergames)(NTSC)(US)[!][unreleased beta].iso" size="329457664" crc="36c21367" />
-->
- <description>Chuck Rock (USA)</description>
- <year>1992</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-6204"/>
+ <description>Citizen X (USA, Prototype)</description>
+ <year>2002</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="chuck rock (1992)(sony imagesoft)(ntsc)(us)[!]" sha1="1f8ee7fc8d95b751258e3fa571a33e683c9d8b20"/>
+ <disk name="citizen x" sha1="8264c6175e61475cdd8bab342251c36162d37c0a"/>
</diskarea>
</part>
</software>
- <software name="chukrck2">
- <!-- source toseciso
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)[!].cue" size="2007" crc="869470e8" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 01 of 13)[!].iso" size="66021376" crc="66dda4df" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 02 of 13)[!].wav" size="41738636" crc="dc30715f" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 03 of 13)[!].wav" size="39182012" crc="07bcc42e" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 04 of 13)[!].wav" size="37267484" crc="ba30cf5b" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 05 of 13)[!].wav" size="38300012" crc="15a7b533" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 06 of 13)[!].wav" size="37185164" crc="f4fcc112" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 07 of 13)[!].wav" size="41748044" crc="4e2d24f6" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 08 of 13)[!].wav" size="30545468" crc="760dd841" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 09 of 13)[!].wav" size="25890860" crc="d347d7de" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 10 of 13)[!].wav" size="21932444" crc="fc896758" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 11 of 13)[!].wav" size="41750396" crc="9db685bd" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 12 of 13)[!].wav" size="38476412" crc="ad7bf895" />
- <rom name="Chuck Rock II - Son of Chuck (1993)(Virgin)(NTSC)(US)(Track 13 of 13)[!].wav" size="2742476" crc="83c0f8fc" />
+ <!-- This was exclusively bundled with the JVC X'Eye console -->
+ <software name="comptons">
+ <!-- Source: TOSEC-ISO
+ <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)[!][JVC X'Eye].cue" size="379" crc="989f6666" />
+ <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)(Track 1 of 2)[!][JVC X'Eye].iso" size="331114496" crc="2dfc3acf" />
+ <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)(Track 2 of 2)[!][JVC X'Eye].wav" size="2410844" crc="a5a98467" />
-->
- <description>Chuck Rock II - Son of Chuck (USA)</description>
- <year>1993</year>
- <publisher>Virgin Interactive</publisher>
- <info name="serial" value="T-70045"/>
+ <description>Compton's Interactive Encyclopedia v2.10 (USA)</description>
+ <year>1994</year>
+ <publisher>Compton's NewMedia</publisher>
+ <info name="serial" value="T-118025"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="chuck rock ii - son of chuck (1993)(virgin)(ntsc)(us)[!]" sha1="4c6234fa38c158b38bddaf66f99b92f537f466f8"/>
+ <disk name="compton's interactive encyclopedia v2.10 (usa)" sha1="07568afaf31544942d9304fe1d0e6b70684de0d1"/>
</diskarea>
</part>
</software>
<software name="corpse">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Corpse Killer (1994)(Digital Pictures)(NTSC)(US)[!].cue" size="299" crc="fbd181bc" />
<rom name="Corpse Killer (1994)(Digital Pictures)(NTSC)(US)(Track 1 of 2)[!].iso" size="545292288" crc="f74e6863" />
<rom name="Corpse Killer (1994)(Digital Pictures)(NTSC)(US)(Track 2 of 2)[!].wav" size="1495916" crc="601d4225" />
@@ -1944,62 +4089,32 @@
<description>Corpse Killer (USA)</description>
<year>1994</year>
<publisher>Digital Pictures</publisher>
+ <info name="release" value="199411xx" />
<info name="serial" value="T-162055"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="corpse killer (1994)(digital pictures)(ntsc)(us)[!]" sha1="fc73eb3211b4ba941423f5b2adb95e3f7f9a948d"/>
- </diskarea>
- </part>
- </software>
-
- <software name="dracunl">
- <!-- source toseciso
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 1 of 2)[!].cue" size="309" crc="9e9b2831" />
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="474011648" crc="9cfea44f" />
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="10584044" crc="f26d1974" />
-
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 2 of 2)[!].cue" size="309" crc="2b06ce0f" />
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!].iso" size="521951232" crc="91ad6e4a" />
- <rom name="Dracula Unleashed (1993)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!].wav" size="10584044" crc="f26d1974" />
- -->
- <description>Dracula Unleashed (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4420"/>
- <part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Disc 1" />
- <diskarea name="cdrom">
- <disk name="dracula unleashed (1993)(sega)(ntsc)(us)(disc 1 of 2)[!]" sha1="c42811933f74975620ff253c905f6c9071a3f732"/>
- </diskarea>
- </part>
- <part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Disc 2" />
- <diskarea name="cdrom">
- <disk name="dracula unleashed (1993)(sega)(ntsc)(us)(disc 2 of 2)[!]" sha1="8fb7b60e4c080687c545942fcdf7a78eb49f7f90"/>
+ <disk name="corpse killer (usa)" sha1="fc73eb3211b4ba941423f5b2adb95e3f7f9a948d"/>
</diskarea>
</part>
</software>
- <software name="dlair">
- <!-- source toseciso
- <rom name="Dragon's Lair (1993)(ReadySoft)(NTSC)(US)[!][CDAC-068600 1].cue" size="315" crc="7fbecfa4" />
- <rom name="Dragon's Lair (1993)(ReadySoft)(NTSC)(US)(Track 1 of 2)[!][CDAC-068600 1].iso" size="183427072" crc="c13e4375" />
- <rom name="Dragon's Lair (1993)(ReadySoft)(NTSC)(US)(Track 2 of 2)[!][CDAC-068600 1].wav" size="1171340" crc="3ed73d6d" />
+ <software name="dlairdemo" cloneof="dlair">
+ <!-- Source: TOSEC-ISO
+ <rom name="Dragon's Lair - Demo CD (1993)(ReadySoft)(NTSC)(US).cue" size="140" crc="186a5613" />
+ <rom name="Dragon's Lair - Demo CD (1993)(ReadySoft)(NTSC)(US).iso" size="12802048" crc="22189e3c" />
-->
- <description>Dragon's Lair (USA)</description>
+ <description>Dragon's Lair (USA, Demo)</description>
<year>1993</year>
<publisher>ReadySoft</publisher>
- <info name="serial" value="T-121015"/>
- <info name="ring_code" value="CDAC-068600 1"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="dragon's lair (1993)(readysoft)(ntsc)(us)[!][cdac-068600 1]" sha1="368f33cce8cf14768425c2cad8b45e5683aea9b8"/>
+ <disk name="dragon's lair (usa, demo)" sha1="d96e5388a727dcb7fa948b38d275e1a42c752a36"/>
</diskarea>
</part>
</software>
<software name="dune">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Dune (1994)(Virgin)(NTSC)(US)(M6)[!].cue" size="269" crc="616c240a" />
<rom name="Dune (1994)(Virgin)(NTSC)(US)(M6)(Track 1 of 2)[!].iso" size="471396352" crc="e66d831d" />
<rom name="Dune (1994)(Virgin)(NTSC)(US)(M6)(Track 2 of 2)[!].wav" size="705644" crc="8b1b2fe1" />
@@ -2007,16 +4122,18 @@
<description>Dune (USA)</description>
<year>1994</year>
<publisher>Virgin Interactive</publisher>
+ <info name="release" value="199312xx" />
<info name="serial" value="T-70065"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="dune (1994)(virgin)(ntsc)(us)(m6)[!]" sha1="c96ba231930d4749abe864868ac9253d31527a34"/>
+ <disk name="dune (usa)" sha1="c96ba231930d4749abe864868ac9253d31527a34"/>
</diskarea>
</part>
</software>
+ <!-- TOSEC marks this as v1.0. Is there any indication that there is another version? -->
<software name="dmaster2">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Dungeon Master II - Skullkeep v1.0 (1994)(JVC)(NTSC)(US)[!].cue" size="1090" crc="8a1bb2f8" />
<rom name="Dungeon Master II - Skullkeep v1.0 (1994)(JVC)(NTSC)(US)(Track 1 of 7)[!].iso" size="26404864" crc="62679809" />
<rom name="Dungeon Master II - Skullkeep v1.0 (1994)(JVC)(NTSC)(US)(Track 2 of 7)[!].wav" size="32234204" crc="ce04a20f" />
@@ -2026,19 +4143,19 @@
<rom name="Dungeon Master II - Skullkeep v1.0 (1994)(JVC)(NTSC)(US)(Track 6 of 7)[!].wav" size="51689948" crc="2c083214" />
<rom name="Dungeon Master II - Skullkeep v1.0 (1994)(JVC)(NTSC)(US)(Track 7 of 7)[!].wav" size="2942396" crc="2850e487" />
-->
- <description>Dungeon Master II - Skullkeep (USA, v1.0)</description>
+ <description>Dungeon Master II - Skullkeep (USA)</description>
<year>1994</year>
<publisher>JVC</publisher>
<info name="serial" value="T-60085"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="dungeon master ii - skullkeep v1.0 (1994)(jvc)(ntsc)(us)[!]" sha1="7564538fa48345f408aa3e1ab7b1da1f34b54d2a"/>
+ <disk name="dungeon master ii - skullkeep (usa)" sha1="7564538fa48345f408aa3e1ab7b1da1f34b54d2a"/>
</diskarea>
</part>
</software>
<software name="espnhn">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="ESPN National Hockey Night (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="1111" crc="5eebe885" />
<rom name="ESPN National Hockey Night (1994)(Sony Imagesoft)(NTSC)(US)(Track 1 of 7)[!].iso" size="158013440" crc="e3c5c26e" />
<rom name="ESPN National Hockey Night (1994)(Sony Imagesoft)(NTSC)(US)(Track 2 of 7)[!].wav" size="136159676" crc="607dfc6a" />
@@ -2051,267 +4168,17 @@
<description>ESPN National Hockey Night (USA)</description>
<year>1994</year>
<publisher>Sony Imagesoft</publisher>
+ <info name="release" value="199411xx" />
<info name="serial" value="T-93215"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="espn national hockey night (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="fcf0a2f3dbcf292047dd03b2c5d6b49c41af9585"/>
- </diskarea>
- </part>
- </software>
-
- <software name="espnnfl">
- <!-- source toseciso
- <rom name="ESPN Sunday Night NFL (1993)(Sony Imagesoft)(NTSC)(US)[!].cue" size="311" crc="d462e6bf" />
- <rom name="ESPN Sunday Night NFL (1993)(Sony Imagesoft)(NTSC)(US)(Track 1 of 2)[!].iso" size="249851904" crc="d40fe731" />
- <rom name="ESPN Sunday Night NFL (1993)(Sony Imagesoft)(NTSC)(US)(Track 2 of 2)[!].wav" size="15622028" crc="81d6e095" />
- -->
- <description>ESPN Sunday Night NFL (USA)</description>
- <year>1993</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93105"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="espn sunday night nfl (1993)(sony imagesoft)(ntsc)(us)[!]" sha1="1c637fcd4188c8d922ab109aace0b523437d12c6"/>
- </diskarea>
- </part>
- </software>
-
- <!-- one of these probably matches the redump set -->
- <software name="eternalca" cloneof="eternalc">
- <!-- source toseciso
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)[!][SEGA4427 R1J].cue" size="3539" crc="1dc6780d" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 01 of 19)[!][SEGA4427 R1J].iso" size="135524352" crc="4455489c" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 02 of 19)[!][SEGA4427 R1J].wav" size="19444028" crc="9ac069ad" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 03 of 19)[!][SEGA4427 R1J].wav" size="15796076" crc="0d02d9be" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 04 of 19)[!][SEGA4427 R1J].wav" size="18983036" crc="af131f31" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 05 of 19)[!][SEGA4427 R1J].wav" size="19312316" crc="9f0f9e65" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 06 of 19)[!][SEGA4427 R1J].wav" size="19406396" crc="3b9521ed" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 07 of 19)[!][SEGA4427 R1J].wav" size="19396988" crc="75421abf" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 08 of 19)[!][SEGA4427 R1J].wav" size="19392284" crc="8c61ede9" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 09 of 19)[!][SEGA4427 R1J].wav" size="19361708" crc="dd8b0f1c" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 10 of 19)[!][SEGA4427 R1J].wav" size="19180604" crc="f8f09da8" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 11 of 19)[!][SEGA4427 R1J].wav" size="18752540" crc="b1af3456" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 12 of 19)[!][SEGA4427 R1J].wav" size="20166092" crc="94035d8a" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 13 of 19)[!][SEGA4427 R1J].wav" size="19627484" crc="f702787f" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 14 of 19)[!][SEGA4427 R1J].wav" size="18082220" crc="8ca1b9c6" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 15 of 19)[!][SEGA4427 R1J].wav" size="21078668" crc="3324daee" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 16 of 19)[!][SEGA4427 R1J].wav" size="19474604" crc="1dee2416" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 17 of 19)[!][SEGA4427 R1J].wav" size="19086524" crc="e417d393" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 18 of 19)[!][SEGA4427 R1J].wav" size="24159788" crc="ebaa31d0" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 19 of 19)[!][SEGA4427 R1J].wav" size="19436972" crc="3567adb3" />
- -->
- <description>Eternal Champions - Challenge from the Dark Side (USA, SEGA4427 R1J)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="T-4427"/>
- <info name="ring_code" value="SEGA4427 R1J"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="eternal champions - challenge from the dark side (1995)(sega)(ntsc)(us)[!][sega4427 r1j]" sha1="44e84bf8b45615d5ee553df9dd1b2bb79d218b3e"/>
- </diskarea>
- </part>
- </software>
-
- <software name="eternalcb" cloneof="eternalc">
- <!-- source toseciso
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)[!][SEGA4427RE R1J].cue" size="3577" crc="1d1ceb3d" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 01 of 19)[!][SEGA4427RE R1J].iso" size="135524352" crc="842e6fb5" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 02 of 19)[!][SEGA4427RE R1J].wav" size="19444028" crc="5251fb4d" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 03 of 19)[!][SEGA4427RE R1J].wav" size="15796076" crc="b3bd45ce" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 04 of 19)[!][SEGA4427RE R1J].wav" size="18983036" crc="026aebdb" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 05 of 19)[!][SEGA4427RE R1J].wav" size="19312316" crc="d496e096" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 06 of 19)[!][SEGA4427RE R1J].wav" size="19406396" crc="11374684" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 07 of 19)[!][SEGA4427RE R1J].wav" size="19396988" crc="06cf89ff" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 08 of 19)[!][SEGA4427RE R1J].wav" size="19392284" crc="0afe8be4" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 09 of 19)[!][SEGA4427RE R1J].wav" size="19361708" crc="8c1fd11f" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 10 of 19)[!][SEGA4427RE R1J].wav" size="19180604" crc="464626ee" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 11 of 19)[!][SEGA4427RE R1J].wav" size="18752540" crc="a7719bce" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 12 of 19)[!][SEGA4427RE R1J].wav" size="20166092" crc="a0839219" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 13 of 19)[!][SEGA4427RE R1J].wav" size="19627484" crc="c7aa6723" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 14 of 19)[!][SEGA4427RE R1J].wav" size="18082220" crc="661e08f7" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 15 of 19)[!][SEGA4427RE R1J].wav" size="21078668" crc="d9887e8e" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 16 of 19)[!][SEGA4427RE R1J].wav" size="19474604" crc="48f84a79" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 17 of 19)[!][SEGA4427RE R1J].wav" size="19086524" crc="dbe70b4d" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 18 of 19)[!][SEGA4427RE R1J].wav" size="24159788" crc="5c60fdb5" />
- <rom name="Eternal Champions - Challenge from the Dark Side (1995)(Sega)(NTSC)(US)(Track 19 of 19)[!][SEGA4427RE R1J].wav" size="19436972" crc="aee378b1" />
- -->
- <description>Eternal Champions - Challenge from the Dark Side (USA, SEGA4427RE R1J)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4427"/>
- <info name="ring_code" value="SEGA4427RE R1J"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="eternal champions - challenge from the dark side (1995)(sega)(ntsc)(us)[!][sega4427re r1j]" sha1="af417e29f0d551b3746d0e55d741a246d4914971"/>
- </diskarea>
- </part>
- </software>
-
- <software name="eyebehol">
- <!-- source toseciso
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)[!].cue" size="8013" crc="37369a16" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 01 of 56)[!].iso" size="23156736" crc="be90257b" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 02 of 56)[!].wav" size="52141532" crc="03ff11ba" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 03 of 56)[!].wav" size="32638748" crc="344ec80d" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 04 of 56)[!].wav" size="27132716" crc="6c70ae1c" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 05 of 56)[!].wav" size="30437276" crc="444572f4" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 06 of 56)[!].wav" size="33203228" crc="e70d7f8d" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 07 of 56)[!].wav" size="35298860" crc="9ab71866" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 08 of 56)[!].wav" size="29510588" crc="bebe6223" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 09 of 56)[!].wav" size="22247612" crc="c9dee0d5" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 10 of 56)[!].wav" size="30839468" crc="e52fdb30" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 11 of 56)[!].wav" size="10000748" crc="b889d1bc" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 12 of 56)[!].wav" size="20744684" crc="4854eefc" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 13 of 56)[!].wav" size="1542956" crc="39a26435" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 14 of 56)[!].wav" size="5567228" crc="d4643669" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 15 of 56)[!].wav" size="3779708" crc="7b8f9801" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 16 of 56)[!].wav" size="1759340" crc="52a4a137" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 17 of 56)[!].wav" size="3469244" crc="3ee6f49d" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 18 of 56)[!].wav" size="23449484" crc="04344e04" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 19 of 56)[!].wav" size="1756988" crc="630b6511" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 20 of 56)[!].wav" size="11825900" crc="1bd4aee3" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 21 of 56)[!].wav" size="2048636" crc="85538fbc" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 22 of 56)[!].wav" size="1733468" crc="d3a98c16" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 23 of 56)[!].wav" size="4638188" crc="b4630653" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 24 of 56)[!].wav" size="1907516" crc="26e1e9e4" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 25 of 56)[!].wav" size="1430060" crc="462695c2" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 26 of 56)[!].wav" size="2410844" crc="269ad927" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 27 of 56)[!].wav" size="8817692" crc="83cd5813" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 28 of 56)[!].wav" size="25606268" crc="d7b5e798" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 29 of 56)[!].wav" size="1401836" crc="e3dc567c" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 30 of 56)[!].wav" size="1404188" crc="aba28e64" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 31 of 56)[!].wav" size="2227388" crc="3fc28241" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 32 of 56)[!].wav" size="1383020" crc="8631b9b4" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 33 of 56)[!].wav" size="2702492" crc="6e8ab035" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 34 of 56)[!].wav" size="10974476" crc="40634938" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 35 of 56)[!].wav" size="1665260" crc="c20394db" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 36 of 56)[!].wav" size="4254812" crc="f5ed84b4" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 37 of 56)[!].wav" size="1618220" crc="ba855bc8" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 38 of 56)[!].wav" size="3419852" crc="3578992d" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 39 of 56)[!].wav" size="2754236" crc="8b5819cd" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 40 of 56)[!].wav" size="6293996" crc="17f0ba3d" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 41 of 56)[!].wav" size="1681724" crc="ea3d5b3e" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 42 of 56)[!].wav" size="4014908" crc="79422078" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 43 of 56)[!].wav" size="1411244" crc="3a42e786" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 44 of 56)[!].wav" size="4901612" crc="26ad97c0" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 45 of 56)[!].wav" size="6070556" crc="55fb4ad1" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 46 of 56)[!].wav" size="3803228" crc="67479398" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 47 of 56)[!].wav" size="5553116" crc="14261587" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 48 of 56)[!].wav" size="4179548" crc="c00a43e9" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 49 of 56)[!].wav" size="2013356" crc="55e14385" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 50 of 56)[!].wav" size="5433164" crc="e9e864e4" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 51 of 56)[!].wav" size="5393180" crc="e5d374c9" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 52 of 56)[!].wav" size="2493164" crc="cac21216" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 53 of 56)[!].wav" size="5176796" crc="c751ee01" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 54 of 56)[!].wav" size="1582940" crc="ac41be51" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 55 of 56)[!].wav" size="3069404" crc="5c840a45" />
- <rom name="Eye of the Beholder (1994)(Sega)(NTSC)(US)(Track 56 of 56)[!].wav" size="3981980" crc="aeac6cbb" />
- -->
- <description>Eye of the Beholder (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="alt_title" value="Advanced Dungeons &amp; Dragons - Eye of the Beholder (Box)"/>
- <info name="serial" value="4655"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="eye of the beholder (1994)(sega)(ntsc)(us)[!]" sha1="825b6cd66dcc081e1ec44dfda6d26b9d15637cd8"/>
- </diskarea>
- </part>
- </software>
-
- <software name="fahrenhe">
- <!-- source toseciso
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 1 of 2)[!][SCD & 32X Key Disc].cue" size="335" crc="f1de5781" />
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!][SCD & 32X Key Disc].iso" size="516972544" crc="41b33fdd" />
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!][SCD & 32X Key Disc].wav" size="1874588" crc="ad809074" />
-
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 2 of 2)[!][32X, req. Key Disc].cue" size="335" crc="692d2b5e" />
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!][32X, req. Key Disc].iso" size="516972544" crc="5220e10d" />
- <rom name="Fahrenheit (1995)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!][32X, req. Key Disc].wav" size="1874588" crc="ad809074" />
- -->
- <description>Fahrenheit (USA, SCD &amp; 32X)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4438"/>
- <info name="ring_code" value="CDAC-088300 1 (Disc 1)"/>
- <part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="SCD Boot or 32X Key" />
- <diskarea name="cdrom">
- <disk name="fahrenheit (1995)(sega)(ntsc)(us)(disc 1 of 2)[!][scd and 32x key disc][cdac-088300 1]" sha1="925939dc3dd18c95f6dd2485279c0ba2459e0b7f"/>
- </diskarea>
- </part>
- <!-- use this disc for 32x!-->
- <part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="32X Boot" />
- <diskarea name="cdrom">
- <disk name="fahrenheit (1995)(sega)(ntsc)(us)(disc 2 of 2)[!][32x, req. key disc]" sha1="537890db94845bb6661eb6f6a3dddd4b4a99926a"/>
- </diskarea>
- </part>
- </software>
-
- <software name="fifa">
- <!-- source toseciso
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)[!].cue" size="7273" crc="845d16cc" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 01 of 46)[!].iso" size="228866048" crc="3c6b2475" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 02 of 46)[!].wav" size="23454188" crc="43c7f105" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 03 of 46)[!].wav" size="24801884" crc="f0ce6f5f" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 04 of 46)[!].wav" size="24482012" crc="b0226857" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 05 of 46)[!].wav" size="16607516" crc="96322635" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 06 of 46)[!].wav" size="10943900" crc="ac8ff7d2" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 07 of 46)[!].wav" size="10941548" crc="f3fb036d" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 08 of 46)[!].wav" size="10941548" crc="acd28646" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 09 of 46)[!].wav" size="10943900" crc="94222a21" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 10 of 46)[!].wav" size="10941548" crc="89c1caea" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 11 of 46)[!].wav" size="10941548" crc="7390868d" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 12 of 46)[!].wav" size="4334780" crc="1566d049" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 13 of 46)[!].wav" size="2455532" crc="7c23209f" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 14 of 46)[!].wav" size="2022764" crc="ee722f94" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 15 of 46)[!].wav" size="4769900" crc="86450541" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 16 of 46)[!].wav" size="4769900" crc="2adad13a" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 17 of 46)[!].wav" size="4769900" crc="8af9c6e1" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 18 of 46)[!].wav" size="4769900" crc="6ab105f3" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 19 of 46)[!].wav" size="4769900" crc="3e901d4e" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 20 of 46)[!].wav" size="4769900" crc="28fc1586" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 21 of 46)[!].wav" size="4769900" crc="f1f4155f" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 22 of 46)[!].wav" size="4769900" crc="6162bbad" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 23 of 46)[!].wav" size="4769900" crc="e8a63983" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 24 of 46)[!].wav" size="4769900" crc="75d44b45" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 25 of 46)[!].wav" size="4769900" crc="a40702b1" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 26 of 46)[!].wav" size="4769900" crc="87d9f774" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 27 of 46)[!].wav" size="4769900" crc="7edf643f" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 28 of 46)[!].wav" size="4769900" crc="bfbc66a3" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 29 of 46)[!].wav" size="4769900" crc="9ae12164" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 30 of 46)[!].wav" size="4769900" crc="3c299e29" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 31 of 46)[!].wav" size="4767548" crc="4cfe34ae" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 32 of 46)[!].wav" size="4772252" crc="f08bdc56" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 33 of 46)[!].wav" size="4769900" crc="0ca06dc8" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 34 of 46)[!].wav" size="4769900" crc="3bb30154" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 35 of 46)[!].wav" size="4769900" crc="a2d53a7d" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 36 of 46)[!].wav" size="4769900" crc="28270a7b" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 37 of 46)[!].wav" size="4769900" crc="6287e6a2" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 38 of 46)[!].wav" size="4769900" crc="db8f8636" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 39 of 46)[!].wav" size="4769900" crc="21b31fbd" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 40 of 46)[!].wav" size="4769900" crc="1acf2572" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 41 of 46)[!].wav" size="4769900" crc="4adcc032" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 42 of 46)[!].wav" size="4769900" crc="d04ce627" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 43 of 46)[!].wav" size="4769900" crc="d75f1179" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 44 of 46)[!].wav" size="4588796" crc="f54d2847" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 45 of 46)[!].wav" size="4769900" crc="0796d4c0" />
- <rom name="FIFA International Soccer (1994)(EA Sports)(NTSC)(US)(M4)(Track 46 of 46)[!].wav" size="2152124" crc="af3ca53b" />
- -->
- <description>FIFA International Soccer (USA)</description>
- <year>1994</year>
- <publisher>Electronic Arts</publisher>
- <info name="serial" value="T-50055"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="fifa international soccer (1994)(ea sports)(ntsc)(us)(m4)[!]" sha1="f262bb0741b7ecf393dffa30b5c65a3ca5651254"/>
+ <disk name="espn national hockey night (usa)" sha1="fcf0a2f3dbcf292047dd03b2c5d6b49c41af9585"/>
</diskarea>
</part>
</software>
<software name="flashb">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Flashback - The Quest for Identity (1994)(Sega)(NTSC)(US)[!].cue" size="1409" crc="9002b722" />
<rom name="Flashback - The Quest for Identity (1994)(Sega)(NTSC)(US)(Track 1 of 9)[!].iso" size="233951232" crc="912b9a7a" />
<rom name="Flashback - The Quest for Identity (1994)(Sega)(NTSC)(US)(Track 2 of 9)[!].wav" size="35672828" crc="aa9cf2c3" />
@@ -2329,67 +4196,64 @@
<info name="serial" value="4448"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="flashback - the quest for identity (1994)(sega)(ntsc)(us)[!]" sha1="865fb3fb8f5824656f756ab96bd16435857bb098"/>
+ <disk name="flashback - the quest for identity (usa)" sha1="865fb3fb8f5824656f756ab96bd16435857bb098"/>
</diskarea>
</part>
</software>
- <software name="f1btl">
- <!-- source toseciso
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)[!].cue" size="6665" crc="c08637f6" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 01 of 37)[!].iso" size="176519168" crc="9e5dab61" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 02 of 37)[!].wav" size="15803132" crc="ac282fe4" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 03 of 37)[!].wav" size="19707452" crc="8d738324" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 04 of 37)[!].wav" size="16753340" crc="28ac1ce7" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 05 of 37)[!].wav" size="11658908" crc="5b23a0fa" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 06 of 37)[!].wav" size="11228492" crc="c5b0b8cb" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 07 of 37)[!].wav" size="17433068" crc="98ab4775" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 08 of 37)[!].wav" size="12324524" crc="c6c12e9f" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 09 of 37)[!].wav" size="15462092" crc="7f7d116a" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 10 of 37)[!].wav" size="26107244" crc="ba93514f" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 11 of 37)[!].wav" size="11529548" crc="0b7f1799" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 12 of 37)[!].wav" size="15377420" crc="e205f7f8" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 13 of 37)[!].wav" size="21337388" crc="c603a953" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 14 of 37)[!].wav" size="2996492" crc="24b62a9e" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 15 of 37)[!].wav" size="2493164" crc="0c0dd640" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 16 of 37)[!].wav" size="7168940" crc="348ff18b" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 17 of 37)[!].wav" size="3706796" crc="1ebc46a5" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 18 of 37)[!].wav" size="2911820" crc="4e5786a1" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 19 of 37)[!].wav" size="1117244" crc="97e489b1" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 20 of 37)[!].wav" size="13117148" crc="4819efaf" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 21 of 37)[!].wav" size="11894108" crc="52190a9d" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 22 of 37)[!].wav" size="11529548" crc="beec01c4" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 23 of 37)[!].wav" size="11828252" crc="e67d4219" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 24 of 37)[!].wav" size="12766700" crc="a939bc81" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 25 of 37)[!].wav" size="15803132" crc="f8403849" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 26 of 37)[!].wav" size="10826300" crc="61bad1f1" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 27 of 37)[!].wav" size="9840812" crc="c828b970" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 28 of 37)[!].wav" size="10466444" crc="27ea751d" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 29 of 37)[!].wav" size="11625980" crc="806e2b53" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 30 of 37)[!].wav" size="11668316" crc="623446c8" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 31 of 37)[!].wav" size="14119100" crc="bba35bcb" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 32 of 37)[!].wav" size="14062652" crc="3706a4b3" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 33 of 37)[!].wav" size="12470348" crc="db55d666" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 34 of 37)[!].wav" size="11614220" crc="290d1de4" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 35 of 37)[!].wav" size="16207676" crc="c7e49445" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 36 of 37)[!].wav" size="15271580" crc="45c88ad1" />
- <rom name="Formula One World Championship - Beyond the Limit (1994)(Sega Sports)(NTSC)(US)(Track 37 of 37)[!].wav" size="43269788" crc="a40719c2" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Sega and was set for release in 1994. It was
+ however scrapped before it was published. In 2006, Good Deal Games released a set of reproduction
+ discs based off a prototype build. This is a dump from one of those reproduction discs.
+ -->
+ <software name="frcestrk">
+ <!-- Source: TOSEC-ISO
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 01 of 13)[!].iso" size="211103744" crc="ab4ea835" md5="47014882e581a02c66378845ba8020e5" sha1="1c5ff1be8ca5336331b319bebfc91ee7ca91017d"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 02 of 13)[!].wav" size="1218380" crc="86b56f51" md5="91a84f7f3862a638888c43ed4bc82129" sha1="9ddf3de34499980ac430b073d033637bb6165f64"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 03 of 13)[!].wav" size="1698188" crc="2559ffb9" md5="00977719867d9d224810413a2a00c9eb" sha1="a126b823279eb22c8bd3db766ed7d848a38fe390"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 04 of 13)[!].wav" size="11350796" crc="79520068" md5="6754086320bfb858a89de8861bda0c97" sha1="e87f1527f54dfabc5ad5c439f041b5f7f3cc2047"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 05 of 13)[!].wav" size="26053148" crc="fbfa92e4" md5="d70ff91f3c23b62ef99d4822815b7112" sha1="a0c1e1dd44a693e5af69ec5bf91fcf02c79f0b24"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 06 of 13)[!].wav" size="35117756" crc="2679654c" md5="ddc2a69c516c20497149c97fa9f4be6f" sha1="03b7dfa22e5cb6f9a7f5aa930335afe35ac13113"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 07 of 13)[!].wav" size="14638892" crc="f5520cf1" md5="cb3a4aa41111fae842a82d3ea91714ce" sha1="58811ca49f4f3af7f23a7bc9a5f972ff57f6f54e"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 08 of 13)[!].wav" size="33142076" crc="1443ebc5" md5="9c261f147c5713cbea508c2ba740735b" sha1="37f99583926fb52c505061cae7457c43a37a3b17"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 09 of 13)[!].wav" size="15734924" crc="84090469" md5="d90de27f12a8129d60b4407813baf328" sha1="7dd135a07983e2bdfc8bd3ce32374ec96fda7fd0"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 10 of 13)[!].wav" size="25848524" crc="cd5611e0" md5="22b93e6a17a73fb6f8f5c20a65915c94" sha1="a77314fa5d82486990d4a70888c0999df53e8480"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 11 of 13)[!].wav" size="38278844" crc="565fc304" md5="a954e400d74d4b07aedb72f0dc5acb28" sha1="dfaefc992684f5079f1bbe5a34657d4e7759e1f5"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 12 of 13)[!].wav" size="13164188" crc="f8b6f5c0" md5="a944c2969efa7ff773438eeb7ead594b" sha1="9655226adf4f1a8c6acff2065781d0f41e74ab09"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)(Track 13 of 13)[!].wav" size="17308412" crc="f34cdb68" md5="b4b94c40d55956aeb729fbcac52d9e73" sha1="20db6f89d6c3d67def2c512d9be26f70322ab660"/>
+ <rom name="Burning Fists - Force Striker (2006)(Good Deal Games)(NTSC)(US)[!].cue" size="1884" crc="fcdd6569" md5="fc32f66714b4e60f6358e57201f3fd60" sha1="2493d17b99a8fc6374eb25d05f7f608e6257c434"/>
+ -->
+ <description>Force Striker (USA, Prototype)</description>
+ <year>2006</year>
+ <publisher>Good Deal Games</publisher>
+ <info name="alt_title" value="Burning Fists - Force Striker (Box)" />
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="force striker (usa, prototype)" sha1="593892565e8ba7df9204128bd7bc36e72f92b803"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="frog">
+ <!-- Source: TOSEC-ISO
+ <rom name="Frog Feast (2005)(Oldergames)(NTSC)(US)(Track 1 of 4).iso" size="802816" crc="713eba97" md5="c2b51937dac25c1737906388b18e9d26" sha1="6cd95b07fc1cf94b47ff5f311ac11d38240e85d7"/>
+ <rom name="Frog Feast (2005)(Oldergames)(NTSC)(US)(Track 2 of 4).wav" size="7947452" crc="59a0f77c" md5="b2e812ce0c1e7af890500eed634b6504" sha1="1bf11097a306332c48285921cb12a4969f8a3d3b"/>
+ <rom name="Frog Feast (2005)(Oldergames)(NTSC)(US)(Track 3 of 4).wav" size="24418508" crc="c0190ec3" md5="d8ace6c91f13c331127f79da6d7ed3b6" sha1="f291b9407262cca5b106d3892ab187372b8b6b45"/>
+ <rom name="Frog Feast (2005)(Oldergames)(NTSC)(US)(Track 4 of 4).wav" size="23360108" crc="48f3fbd7" md5="c3c48ed77ee540e5f042fc1a55c46062" sha1="e97f4e1afaf147857805202d69c5ea744a22a2ce"/>
+ <rom name="Frog Feast (2005)(Oldergames)(NTSC)(US).cue" size="545" crc="a9b2ec54" md5="203e6c6740b0b4c107c3a1597796bcfd" sha1="b06fd482bd87295c637bfaa88b9d2e0833d4aa99"/>
-->
- <description>Formula One World Championship - Beyond the Limit (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4608"/>
+ <description>Frog Feast (USA)</description>
+ <year>2007</year>
+ <publisher>RasterSoft</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="formula one world championship - beyond the limit (1994)(sega sports)(ntsc)(us)[!]" sha1="4efa74bbcc1f6df012b561342169713c54a0f9bb"/>
+ <disk name="frog feast (usa)" sha1="4dcd26df32f6463d5e9417558bbbf22c910ac65a"/>
</diskarea>
</part>
</software>
- <!-- disc 1 is common to these sets and the REDUMP set.. but is taken from here -->
- <!-- the redump disc 2 might match one of these -->
<software name="gztexasa" cloneof="gztexas">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)[!].cue" size="329" crc="b82ac042" />
<rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="548009984" crc="e397fe2d" />
<rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="2587244" crc="fa7da217" />
@@ -2398,7 +4262,7 @@
<rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!][CDAC-053300 2].iso" size="522225664" crc="36720a8d" />
<rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!][CDAC-053300 2].wav" size="2234444" crc="b08c0b8f" />
-->
- <description>Ground Zero Texas (USA, CDAC-053300 2)</description>
+ <description>Ground Zero Texas (USA, Alt)</description>
<year>1993</year>
<publisher>Sony Imagesoft</publisher>
<info name="serial" value="T-93145"/>
@@ -2406,122 +4270,19 @@
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom1">
- <disk name="ground zero texas (1993)(sony imagesoft)(ntsc)(us)(disc 1 of 2)[!]" sha1="cb019a26b3edec7a8f0119d74a0991aa5b258313"/>
+ <disk name="ground zero texas (usa, alt) (disc 1)" sha1="cb019a26b3edec7a8f0119d74a0991aa5b258313"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom2">
- <disk name="ground zero texas (1993)(sony imagesoft)(ntsc)(us)(disc 2 of 2)[!][cdac-053300 2]" sha1="4b3ebe516e2047d4df38590e0badf372262fa435"/>
- </diskarea>
- </part>
- </software>
-
- <software name="gztexasb" cloneof="gztexas" >
- <!-- source toseciso
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)[!].cue" size="329" crc="b82ac042" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="548009984" crc="e397fe2d" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="2587244" crc="fa7da217" />
-
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 2 of 2)[!][CDAC-053300 1].cue" size="359" crc="d322b646" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!][CDAC-053300 1].iso" size="522225664" crc="36720a8d" />
- <rom name="Ground Zero Texas (1993)(Sony Imagesoft)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!][CDAC-053300 1].wav" size="2234444" crc="7424144f" />
- -->
- <description>Ground Zero Texas (USA, CDAC-053300 1)</description>
- <year>1993</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93145"/>
- <info name="ring_code" value="CDAC-053300 1 (Disc 2)"/>
- <part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Disc 1" />
- <diskarea name="cdrom1">
- <disk name="ground zero texas (1993)(sony imagesoft)(ntsc)(us)(disc 1 of 2)[!]" sha1="cb019a26b3edec7a8f0119d74a0991aa5b258313"/>
- </diskarea>
- </part>
- <part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Disc 2" />
- <diskarea name="cdrom">
- <disk name="ground zero texas (1993)(sony imagesoft)(ntsc)(us)(disc 2 of 2)[!][cdac-053300 1]" sha1="90931215bc2ecc49bd3987b5dbc424ae695ef849"/>
- </diskarea>
- </part>
- </software>
-
- <software name="heimdall">
- <!-- source toseciso
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)[!].cue" size="2756" crc="3a04a051" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 01 of 21)[!].iso" size="22542336" crc="e0b239ab" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 02 of 21)[!].wav" size="15168092" crc="081406f4" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 03 of 21)[!].wav" size="31159340" crc="35942eee" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 04 of 21)[!].wav" size="43352108" crc="40042be7" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 05 of 21)[!].wav" size="19375820" crc="0150add5" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 06 of 21)[!].wav" size="38902124" crc="f36d7a77" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 07 of 21)[!].wav" size="21584348" crc="ea5f738b" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 08 of 21)[!].wav" size="2653100" crc="1dffcdea" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 09 of 21)[!].wav" size="2476700" crc="5ceb087a" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 10 of 21)[!].wav" size="1891052" crc="b3bd7385" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 11 of 21)[!].wav" size="2542556" crc="2aa94e62" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 12 of 21)[!].wav" size="3184652" crc="aa17c161" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 13 of 21)[!].wav" size="3123500" crc="72468b67" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 14 of 21)[!].wav" size="2603708" crc="4bd9b96d" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 15 of 21)[!].wav" size="2389676" crc="e3a93dca" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 16 of 21)[!].wav" size="2490812" crc="60dbe943" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 17 of 21)[!].wav" size="2523740" crc="6a0352a8" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 18 of 21)[!].wav" size="2415548" crc="10a994b4" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 19 of 21)[!].wav" size="2994140" crc="432207be" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 20 of 21)[!].wav" size="2556668" crc="ee46cc1b" />
- <rom name="Heimdall (1994)(JVC)(NTSC)(US)(Track 21 of 21)[!].wav" size="2293244" crc="af844823" />
- -->
- <description>Heimdall (USA)</description>
- <year>1994</year>
- <publisher>JVC</publisher>
- <info name="serial" value="T-60145"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="heimdall (1994)(jvc)(ntsc)(us)[!]" sha1="b7e94babbb254bc92d9ca82f5ee47e10da479d86"/>
- </diskarea>
- </part>
- </software>
-
- <software name="hook">
- <!-- source toseciso
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)[!][CDAC-032400 4].cue" size="3371" crc="65c20617" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 01 of 22)[!][CDAC-032400 4].iso" size="17354752" crc="59f47b73" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 02 of 22)[!][CDAC-032400 4].wav" size="9965468" crc="cd016b31" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 03 of 22)[!][CDAC-032400 4].wav" size="17816444" crc="8a5cd2e6" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 04 of 22)[!][CDAC-032400 4].wav" size="12270428" crc="9117c5d9" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 05 of 22)[!][CDAC-032400 4].wav" size="7314764" crc="ef298d81" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 06 of 22)[!][CDAC-032400 4].wav" size="7792220" crc="5a67a0e8" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 07 of 22)[!][CDAC-032400 4].wav" size="7072508" crc="23627422" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 08 of 22)[!][CDAC-032400 4].wav" size="8321420" crc="e0d5edcf" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 09 of 22)[!][CDAC-032400 4].wav" size="6225788" crc="dc59b6f4" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 10 of 22)[!][CDAC-032400 4].wav" size="10468796" crc="8576dbd1" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 11 of 22)[!][CDAC-032400 4].wav" size="2500220" crc="d8f1cbd9" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 12 of 22)[!][CDAC-032400 4].wav" size="29663468" crc="62b77811" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 13 of 22)[!][CDAC-032400 4].wav" size="37389788" crc="dc062e40" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 14 of 22)[!][CDAC-032400 4].wav" size="14862332" crc="adc9b5be" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 15 of 22)[!][CDAC-032400 4].wav" size="16489916" crc="0425678e" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 16 of 22)[!][CDAC-032400 4].wav" size="18317420" crc="c07f4398" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 17 of 22)[!][CDAC-032400 4].wav" size="13415852" crc="47e27bd4" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 18 of 22)[!][CDAC-032400 4].wav" size="31521548" crc="6fd028bc" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 19 of 22)[!][CDAC-032400 4].wav" size="41611628" crc="fd8a22f6" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 20 of 22)[!][CDAC-032400 4].wav" size="11204972" crc="b9984146" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 21 of 22)[!][CDAC-032400 4].wav" size="54637004" crc="09f3df50" />
- <rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 22 of 22)[!][CDAC-032400 4].wav" size="8079164" crc="0288321d" />
- -->
- <description>Hook (USA, CDAC-032400 4)</description>
- <year>1992</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-6205"/>
- <info name="ring_code" value="CDAC-032400 4"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="hook (1992)(sony imagesoft)(ntsc)(us)[!][cdac-032400 4]" sha1="3479e0c6936d0ec4b203171cf499f67113b21a45"/>
+ <disk name="ground zero texas (usa, alt) (disc 2)" sha1="4b3ebe516e2047d4df38590e0badf372262fa435"/>
</diskarea>
</part>
</software>
<software name="hooka" cloneof="hook">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)[!][CDAC-032400 6, CDAC-032400 7].cue" size="3701" crc="157ec104" />
<rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 01 of 22)[!][CDAC-032400 6, CDAC-032400 7].iso" size="17244160" crc="a5caeb38" />
<rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 02 of 22)[!][CDAC-032400 6, CDAC-032400 7].wav" size="9965468" crc="ac3839ea" />
@@ -2546,20 +4307,55 @@
<rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 21 of 22)[!][CDAC-032400 6, CDAC-032400 7].wav" size="54637004" crc="b8b74872" />
<rom name="Hook (1992)(Sony Imagesoft)(NTSC)(US)(Track 22 of 22)[!][CDAC-032400 6, CDAC-032400 7].wav" size="8079164" crc="763e831a" />
-->
- <description>Hook (USA, CDAC-032400 6, CDAC-032400 7)</description>
+ <description>Hook (USA, Alt)</description>
<year>1992</year>
<publisher>Sony Imagesoft</publisher>
<info name="serial" value="T-6205"/>
<info name="ring_code" value="CDAC-032400 6, CDAC-032400 7"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="hook (1992)(sony imagesoft)(ntsc)(us)[!][cdac-032400 6, cdac-032400 7]" sha1="4f01088a4ac4a059dbf8f8e4f2d94acc96757f05"/>
+ <disk name="hook (usa, alt)" sha1="4f01088a4ac4a059dbf8f8e4f2d94acc96757f05"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!--
+ This is strictly not a Sega CD, but an Audio CD bundled together with the Sega CD hardware.
+ It's listed here until it can be properly sorted.
+ -->
+ <software name="hothits">
+ <!-- Source: TOSEC-ISO -->
+ <description>Hot Hits - Adventurous New Music Sampler (USA)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="MK-4129 / OPCD-1630"/>
+ <info name="release" value="19921015" />
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="hot hits - adventurous new music sampler (usa)" sha1="0a83a39a37faf3f7338d7926ac3e22471319a433"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="inxs">
+ <!-- Source: TOSEC-ISO
+ <rom name="INXS (1992)(Sega)(NTSC)(US)[!].cue" size="257" crc="800b4eb4" />
+ <rom name="INXS (1992)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="439228416" crc="dee3c121" />
+ <rom name="INXS (1992)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="1528844" crc="c72f6465" />
+ -->
+ <description>INXS (USA)</description>
+ <year>1992</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="4902"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="inxs (usa)" sha1="2370215eabf6fa7190c39f74f3365d7af6fe2a48"/>
</diskarea>
</part>
</software>
<software name="jagxj220">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Jaguar XJ220 (1993)(JVC)(NTSC)(US)[!].cue" size="1760" crc="58a6b2df" />
<rom name="Jaguar XJ220 (1993)(JVC)(NTSC)(US)(Track 01 of 13)[!].iso" size="10485760" crc="c7b67d60" />
<rom name="Jaguar XJ220 (1993)(JVC)(NTSC)(US)(Track 02 of 13)[!].wav" size="63616940" crc="aa67fbb3" />
@@ -2578,459 +4374,172 @@
<description>Jaguar XJ220 (USA)</description>
<year>1993</year>
<publisher>JVC</publisher>
+ <info name="release" value="199303xx" />
<info name="serial" value="T-6406"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="jaguar xj220 (1993)(jvc)(ntsc)(us)[!]" sha1="5f643ee293ecca6013464d0f48f15121edcaf876"/>
+ <disk name="jaguar xj220 (usa)" sha1="5f643ee293ecca6013464d0f48f15121edcaf876"/>
</diskarea>
</part>
</software>
- <software name="jeopardy">
- <!-- source toseciso
- <rom name="Jeopardy! (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="428" crc="354ef0ef" />
- <rom name="Jeopardy! (1994)(Sony Imagesoft)(NTSC)(US)(Track 1 of 3)[!].iso" size="83191808" crc="aef105cd" />
- <rom name="Jeopardy! (1994)(Sony Imagesoft)(NTSC)(US)(Track 2 of 3)[!].wav" size="11557772" crc="edbb30f8" />
- <rom name="Jeopardy! (1994)(Sony Imagesoft)(NTSC)(US)(Track 3 of 3)[!].wav" size="16736876" crc="3cb0e47e" />
+ <software name="kriskros">
+ <!-- Source: TOSEC-ISO
+ <rom name="Kris Kross (1992)(Sony Imagesoft)(NTSC)(US)[!].cue" size="135" crc="c958c6ce" />
+ <rom name="Kris Kross (1992)(Sony Imagesoft)(NTSC)(US)[!].iso" size="335626240" crc="af0beabc" />
-->
- <description>Jeopardy! (USA)</description>
- <year>1994</year>
+ <description>Kris Kross (USA)</description>
+ <year>1992</year>
<publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93095"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="jeopardy! (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="d6b38865ba2b2aa13a5f95dc362e75c55fa67c9d"/>
- </diskarea>
- </part>
- </software>
-
- <software name="joemont">
- <!-- source toseciso
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)[!][SEGA4201RE R2C].cue" size="1031" crc="5b2cf2fe" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 1 of 6)[!][SEGA4201RE R2C].iso" size="158318592" crc="945dea8d" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 2 of 6)[!][SEGA4201RE R2C].wav" size="33497228" crc="2b4156b0" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 3 of 6)[!][SEGA4201RE R2C].wav" size="31587404" crc="bb33c5b4" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 4 of 6)[!][SEGA4201RE R2C].wav" size="13655756" crc="717d40fb" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 5 of 6)[!][SEGA4201RE R2C].wav" size="8782412" crc="58558157" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 6 of 6)[!][SEGA4201RE R2C].wav" size="12397436" crc="f5444b1c" />
- -->
- <description>Joe Montana's NFL Football (USA, R2C)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4201"/>
- <info name="ring_code" value="SEGA4201RE R2C"/>
+ <info name="serial" value="T-6202"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="joe montana's nfl football (1993)(sega sports)(ntsc)(us)[!][sega4201re r2c]" sha1="07a76f922c88406b6a01ef502f80403eadceaf2a"/>
- </diskarea>
- </part>
- </software>
-
- <software name="joemonta" cloneof="joemont">
- <!-- source toseciso
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)[!][SEGA4201 R1C].cue" size="1019" crc="39a75f37" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 1 of 6)[!][SEGA4201 R1C].iso" size="158318592" crc="945dea8d" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 2 of 6)[!][SEGA4201 R1C].wav" size="33497228" crc="54661aa2" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 3 of 6)[!][SEGA4201 R1C].wav" size="31587404" crc="b03b6521" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 4 of 6)[!][SEGA4201 R1C].wav" size="13655756" crc="78a0793f" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 5 of 6)[!][SEGA4201 R1C].wav" size="8782412" crc="125396ab" />
- <rom name="Joe Montana's NFL Football (1993)(Sega Sports)(NTSC)(US)(Track 6 of 6)[!][SEGA4201 R1C].wav" size="12397436" crc="475ff463" />
- -->
- <description>Joe Montana's NFL Football (USA, R1C)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4201"/>
- <info name="ring_code" value="SEGA4201 R1C"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="joe montana's nfl football (1993)(sega sports)(ntsc)(us)[!][sega4201 r1c]" sha1="d840e17e67abca9815d9148b2af1e3b9153a8156"/>
- </diskarea>
- </part>
- </software>
-
- <!-- Huh - marked as NTSC but EU -->
- <software name="lawnmowr">
- <!-- source toseciso
- <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)[!].cue" size="323" crc="cd07b830" />
- <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)(Track 1 of 2)[!].iso" size="529391616" crc="d7d857a9" />
- <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)(Track 2 of 2)[!].wav" size="7949804" crc="c5fbfc8e" />
- -->
- <description>The Lawnmower Man (USA)</description>
- <year>1994</year>
- <publisher>Time Warner Interactive</publisher>
- <info name="serial" value="T-160015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="lawnmower man, the (1994)(time warner interactive)(ntsc)(eu)[!]" sha1="0fbfa11d36a770450c8f34d74dc2b44196484ad6"/>
- </diskarea>
- </part>
- </software>
-
- <software name="le2">
- <!-- source toseciso
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)[!].cue" size="3685" crc="9882bc13" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 01 of 23)[!].iso" size="12926976" crc="e89a7df6" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 02 of 23)[!].wav" size="43345052" crc="fc6645c6" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 03 of 23)[!].wav" size="36042092" crc="6ea84fd8" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 04 of 23)[!].wav" size="24474956" crc="dd0624a1" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 05 of 23)[!].wav" size="37991900" crc="1ac74ebc" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 06 of 23)[!].wav" size="28837916" crc="e5115d52" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 07 of 23)[!].wav" size="27017468" crc="8bb66852" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 08 of 23)[!].wav" size="51675836" crc="af7c7369" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 09 of 23)[!].wav" size="25606268" crc="fd9c5775" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 10 of 23)[!].wav" size="27885356" crc="4a935715" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 11 of 23)[!].wav" size="62257484" crc="e92e3673" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 12 of 23)[!].wav" size="28922588" crc="57ac4fd3" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 13 of 23)[!].wav" size="55655420" crc="2c4f7ab2" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 14 of 23)[!].wav" size="1331276" crc="9ed88329" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 15 of 23)[!].wav" size="1166636" crc="70d5c296" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 16 of 23)[!].wav" size="1164284" crc="6ab0c7fa" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 17 of 23)[!].wav" size="32335340" crc="694a9b85" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 18 of 23)[!].wav" size="44612780" crc="0ea4010a" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 19 of 23)[!].wav" size="1437116" crc="31e67094" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 20 of 23)[!].wav" size="18552620" crc="dd9389db" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 21 of 23)[!].wav" size="5957660" crc="e6371eaf" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 22 of 23)[!].wav" size="5569580" crc="69ae91a0" />
- <rom name="Lethal Enforcers II - Gun Fighters (1994)(Konami)(NTSC)(US)(Track 23 of 23)[!].wav" size="6508028" crc="f6cd9ab2" />
- -->
- <description>Lethal Enforcers II - Gun Fighters (USA)</description>
- <year>1994</year>
- <publisher>Konami</publisher>
- <info name="serial" value="T-95025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="lethal enforcers ii - gun fighters (1994)(konami)(ntsc)(us)[!]" sha1="c84e51989139daea709f2bda91abf55c24165f39"/>
- </diskarea>
- </part>
- </software>
-
- <software name="links">
- <!-- source toseciso
- <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)[!][SEGAT70095RE R1J].cue" size="347" crc="9ea82c18" />
- <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 1 of 2)[!][SEGAT70095RE R1J].iso" size="497592320" crc="b05bc99a" />
- <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 2 of 2)[!][SEGAT70095RE R1J].wav" size="705644" crc="dfb596bb" />
- -->
- <description>Links - The Challenge of Golf (USA, RE)</description>
- <year>1994</year>
- <publisher>Virgin Interactive</publisher>
- <info name="ring_code" value="SEGAT70095RE R1J"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="links - the challenge of golf (1994)(virgin)(ntsc)(us)[!][segat70095re r1j]" sha1="4fd31dafd2c565d1fdf94cb7e483b13f17da7ae7"/>
+ <disk name="kris kross (usa)" sha1="1bfbe435dcb3c4b7e892f6fdcf19d08015a01933"/>
</diskarea>
</part>
</software>
<software name="linksa" cloneof="links">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)[!][SEGAT70095 R1J].cue" size="343" crc="ae53684e" />
<rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 1 of 2)[!][SEGAT70095 R1J].iso" size="530802688" crc="4139c33c" />
<rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 2 of 2)[!][SEGAT70095 R1J].wav" size="705644" crc="6eddd6e8" />
-->
- <description>Links - The Challenge of Golf (USA)</description>
+ <description>Links - The Challenge of Golf (USA, Alt)</description>
<year>1994</year>
<publisher>Virgin Interactive</publisher>
<info name="serial" value="T-70095"/>
<info name="ring_code" value="SEGAT70095 R1J"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="links - the challenge of golf (1994)(virgin)(ntsc)(us)[!][segat70095 r1j]" sha1="a663bd03db7815b017f7fac039e76f22b4993452"/>
+ <disk name="links - the challenge of golf (usa)" sha1="a663bd03db7815b017f7fac039e76f22b4993452"/>
</diskarea>
</part>
</software>
- <software name="loadstar">
- <!-- source toseciso
- <rom name="Loadstar - The Legend of Tully Bodine (1994)(Rocket Science Games)(NTSC)(US)[!].cue" size="355" crc="73e3a55d" />
- <rom name="Loadstar - The Legend of Tully Bodine (1994)(Rocket Science Games)(NTSC)(US)(Track 1 of 2)[!].iso" size="571576320" crc="012009cc" />
- <rom name="Loadstar - The Legend of Tully Bodine (1994)(Rocket Science Games)(NTSC)(US)(Track 2 of 2)[!].wav" size="905564" crc="a88597f7" />
+ <software name="links">
+ <!-- Source: TOSEC-ISO
+ <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)[!][SEGAT70095RE R1J].cue" size="347" crc="9ea82c18" />
+ <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 1 of 2)[!][SEGAT70095RE R1J].iso" size="497592320" crc="b05bc99a" />
+ <rom name="Links - The Challenge of Golf (1994)(Virgin)(NTSC)(US)(Track 2 of 2)[!][SEGAT70095RE R1J].wav" size="705644" crc="dfb596bb" />
-->
- <description>Loadstar - The Legend of Tully Bodine (USA)</description>
+ <description>Links - The Challenge of Golf (USA)</description>
<year>1994</year>
- <publisher>Rocket Science Games</publisher>
- <info name="serial" value="T-153015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="loadstar - the legend of tully bodine (1994)(rocket science games)(ntsc)(us)[!]" sha1="831daaab7ec1fb1e616d0bcea553bca488763d9e"/>
- </diskarea>
- </part>
- </software>
-
- <software name="lordthun">
- <!-- source toseciso
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)[!].cue" size="2945" crc="9b7a31e7" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 01 of 21)[!].iso" size="7237632" crc="401dfe49" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 02 of 21)[!].wav" size="5461388" crc="69c0e7a3" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 03 of 21)[!].wav" size="10936844" crc="121060d6" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 04 of 21)[!].wav" size="10936844" crc="e697facd" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 05 of 21)[!].wav" size="21523196" crc="83c69b35" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 06 of 21)[!].wav" size="3022364" crc="0a6d8e13" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 07 of 21)[!].wav" size="47983196" crc="db65c419" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 08 of 21)[!].wav" size="47994956" crc="727c8726" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 09 of 21)[!].wav" size="47985548" crc="93801f4b" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 10 of 21)[!].wav" size="47980844" crc="5aa25011" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 11 of 21)[!].wav" size="47922044" crc="26d26892" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 12 of 21)[!].wav" size="47983196" crc="d2b8aa1c" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 13 of 21)[!].wav" size="47983196" crc="63136bf4" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 14 of 21)[!].wav" size="32107196" crc="b5744692" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 15 of 21)[!].wav" size="32107196" crc="30852f61" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 16 of 21)[!].wav" size="32107196" crc="a29aa533" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 17 of 21)[!].wav" size="16327628" crc="ddd226aa" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 18 of 21)[!].wav" size="16447580" crc="27392d4e" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 19 of 21)[!].wav" size="10939196" crc="294b5392" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 20 of 21)[!].wav" size="11049740" crc="78be88fe" />
- <rom name="Lords of Thunder (1995)(Sega)(NTSC)(US)(Track 21 of 21)[!].wav" size="32514092" crc="4620055b" />
- -->
- <description>Lords of Thunder (USA)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4450"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="lords of thunder (1995)(sega)(ntsc)(us)[!]" sha1="148c53f163bc01ad2f57e405e989797d00ccef85"/>
- </diskarea>
- </part>
- </software>
-
-<!-- Ringcode: SEGAT127015 R1D -->
-<!--
- <software name="lunar">
- <description>Lunar - The Silver Star (USA)</description>
- <year>1993</year>
- <publisher>Working Designs</publisher>
- <info name="serial" value="T-127015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="lunar - the silver star (1993)(working designs)(ntsc)(us)[!][segat127015 r1d]" sha1="c82e36f5d59a3932530157a00dc07cdc973b1b15"/>
- </diskarea>
- </part>
- </software>
--->
-
- <software name="maddog">
- <!-- source toseciso
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)[!].cue" size="1069" crc="f3cd9795" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 1 of 7)[!].iso" size="211310592" crc="c37ca605" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 2 of 7)[!].wav" size="1874588" crc="ef0e2ab2" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 3 of 7)[!].wav" size="2222684" crc="288ad7a1" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 4 of 7)[!].wav" size="2227388" crc="8f6670e8" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 5 of 7)[!].wav" size="2232092" crc="3e4606a3" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 6 of 7)[!].wav" size="2227388" crc="37f00d66" />
- <rom name="Mad Dog McCree (1993)(American Laser Games)(NTSC)(US)(Track 7 of 7)[!].wav" size="2229740" crc="59c9aa55" />
- -->
- <description>Mad Dog McCree (USA)</description>
- <year>1993</year>
- <publisher>American Laser Games</publisher>
- <info name="serial" value="T-111015"/>
+ <publisher>Virgin Interactive</publisher>
+ <info name="serial" value="T-70095"/>
+ <info name="ring_code" value="SEGAT70095RE R1J"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="mad dog mccree (1993)(american laser games)(ntsc)(us)[!]" sha1="112d95f0262200486b8bfddbfba708fd263e3e55"/>
- </diskarea>
- </part>
- </software>
-
- <software name="franken">
- <!-- source toseciso
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="1118" crc="f08911c8" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 1 of 7)[!].iso" size="93190144" crc="f438d723" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 2 of 7)[!].wav" size="30267932" crc="d8d57f68" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 3 of 7)[!].wav" size="24420860" crc="76df40f5" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 4 of 7)[!].wav" size="20998700" crc="6df20c3c" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 5 of 7)[!].wav" size="29679932" crc="1a522d88" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 6 of 7)[!].wav" size="19307612" crc="9cc86daa" />
- <rom name="Mary Shelley's Frankenstein (1994)(Sony Imagesoft)(NTSC)(US)(Track 7 of 7)[!].wav" size="22301708" crc="5d4cc862" />
- -->
- <description>Mary Shelley's Frankenstein (USA)</description>
- <year>1994</year>
- <publisher>Sony Imagesoft</publisher>
+ <disk name="links - the challenge of golf (usa, alt)" sha1="4fd31dafd2c565d1fdf94cb7e483b13f17da7ae7"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!--
+ This game was developed for the Sega Mega-CD system by Domark and was set for release in USA
+ as well as Europe. It was however never released in the States. In the 2000s, Good Deal Games
+ released a set of reproduction discs based off a prototype US build. This is a dump from one
+ of those reproduction discs.
+ -->
+ <software name="marko">
+ <!-- Source: TOSEC-ISO
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 01 of 17)[!].iso" size="14084096" crc="a09067a7" md5="65b2486ba4d411469354a7b826e156a9" sha1="a82a886682fce1fba4fcb7e24b92a9f605270ae8"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 02 of 17)[!].wav" size="47602172" crc="78a76448" md5="b08a10599931c1c5654d25398191d37e" sha1="7d8f1b17e54c7ba61e8e9d2132ee73fd6dae294c"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 03 of 17)[!].wav" size="34398044" crc="abc19d90" md5="c29e03140bbcba0ab279ac80ebe01ef5" sha1="97aeb4012a1be0b22db3c9478c04d1ca711166c6"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 04 of 17)[!].wav" size="19312316" crc="ddbc17f3" md5="c51abd22cacb4a97241bffedc327a9f5" sha1="8fa36177325c4f5e442bee21c2f492c5202906c5"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 05 of 17)[!].wav" size="1328924" crc="6c5db1f1" md5="39ad7e48feb6177dba386589ec604521" sha1="cf3969742860b36999c32452644de5f60fddb62a"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 06 of 17)[!].wav" size="1307756" crc="f5d491c4" md5="029b77c0ede1fbe99a09f788475f89ef" sha1="799dc24da99d7e71c40c3f672cb1e36fb9b2697e"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 07 of 17)[!].wav" size="11226140" crc="9a7aa4d6" md5="efb56d6099ad849df27a2fa2def4e2d9" sha1="7bbb4a4ff58275612486fdd9c06350bc39a7a952"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 08 of 17)[!].wav" size="27995900" crc="ae3913d0" md5="c8153c92d20134635001e7efd24d5300" sha1="0722578cb1d0308b9ca3c7e6c82aec6dca34142e"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 09 of 17)[!].wav" size="20128460" crc="9b73299a" md5="e9881fe5733e5349a4916be9d23fb135" sha1="c9f6794f4902de081bd513d06ef4490bab1e7bc1"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 10 of 17)[!].wav" size="37998956" crc="38bf26c1" md5="6826233befb1ef983b71dfec2b16271e" sha1="e64a0750e525b2153fe10dbeef8f4405cce5f5d1"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 11 of 17)[!].wav" size="11244956" crc="9262d6af" md5="df4d3845d985c5b09d267ef25042d6ab" sha1="7217c3fce6620cc1bc23cb1c853496a2e6b8b569"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 12 of 17)[!].wav" size="1401836" crc="dc119265" md5="5a0452b7a4c9306ddca8fa08c392436b" sha1="f69f9cce686802e0086984a94b686dcc9f84da36"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 13 of 17)[!].wav" size="24837164" crc="658ba31f" md5="29708a8a5c1eac7e33f0ae2189ca4767" sha1="179bca238c2b190319356876169a85c69ee5ec2c"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 14 of 17)[!].wav" size="32779868" crc="21ecb7ce" md5="28eb721f3f51e7e1eb8840d51144d727" sha1="ccbf4cbd537cc3d0137240e35f88930251560fd2"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 15 of 17)[!].wav" size="46828364" crc="e55ba915" md5="2f8206d67bbc5a5d4be5a7e4248452c8" sha1="0ce646bcc40f2b4c9871eca00e4e1695d7eb70cb"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 16 of 17)[!].wav" size="44276444" crc="72b6dc78" md5="6e73ccf87ed6fba4c986fb961f7e8170" sha1="798909a34ae79a10fd3dd166bd83be421f10224a"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)(Track 17 of 17)[!].wav" size="35983292" crc="04a87920" md5="715610e50d8faf39260ebad88d48fbfe" sha1="ca5f8454dc60763d9884da94531e9a7fcb0d44a3"/>
+ <rom name="Marko (2003)(Good Deal Games - Oldergames)(NTSC)(US)[!].cue" size="2261" crc="330fbfd8" md5="7bef009a6bef65308bb40ccdea8dd28d" sha1="df7323fbd221ced1aa560375b5ae5ed641b1faca"/>
+ -->
+ <description>Marko (USA, Prototype)</description>
+ <year>200?</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="mary shelley's frankenstein (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="6439508dac1bbab4adea1e6f767fdb9baf6c676b"/>
+ <disk name="marko (usa, prototype)" sha1="c4e51740ca8ff7c9574519bc849082220efe69f5"/>
</diskarea>
</part>
</software>
- <software name="kamenrzo">
- <!-- source toseciso
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)[!].cue" size="785" crc="3feca100" />
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 1 of 5)[!].iso" size="384094208" crc="350ac4fd" />
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 2 of 5)[!].wav" size="2551964" crc="81b9234d" />
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 3 of 5)[!].wav" size="2709548" crc="747d1326" />
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 4 of 5)[!].wav" size="11449580" crc="c81b272c" />
- <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 5 of 5)[!].wav" size="2634284" crc="af952d84" />
+ <software name="marky">
+ <!-- Source: TOSEC-ISO
+ <rom name="Marky Mark and The Funky Bunch (1992)(Sega)(NTSC)(US)[!].cue" size="145" crc="649b6eb3" />
+ <rom name="Marky Mark and The Funky Bunch (1992)(Sega)(NTSC)(US)[!].iso" size="482007040" crc="1ff62043" />
-->
- <description>The Masked Rider - Kamen Rider ZO (USA)</description>
- <year>1994</year>
+ <description>Marky Mark and The Funky Bunch (USA)</description>
+ <year>1992</year>
<publisher>Sega</publisher>
- <info name="serial" value="4444"/>
+ <info name="serial" value="4901"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="masked rider, the - kamen rider zo (1994)(sega)(ntsc)(us)[!]" sha1="a5906a3c5702f7ab0ba0f37a66d7b0f136488d85"/>
+ <disk name="marky mark and the funky bunch (usa)" sha1="43371912dc0bf83158ec383bbc4cf2b4b9e60274"/>
</diskarea>
</part>
</software>
<software name="megarace">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="MegaRace (1993)(Software Toolworks)(NTSC)(US)[!].cue" size="293" crc="a06f1f73" />
<rom name="MegaRace (1993)(Software Toolworks)(NTSC)(US)(Track 1 of 2)[!].iso" size="512356352" crc="90dbacef" />
<rom name="MegaRace (1993)(Software Toolworks)(NTSC)(US)(Track 2 of 2)[!].wav" size="1874588" crc="edad0742" />
-->
<description>MegaRace (USA)</description>
<year>1993</year>
- <publisher>Software Toolworks</publisher>
+ <publisher>The Software Toolworks</publisher>
<info name="serial" value="T-87025"/>
+ <info name="release" value="199312xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="megarace (1993)(software toolworks)(ntsc)(us)[!]" sha1="d60afc89afa7de225f42deb3fac894f9202061b5"/>
- </diskarea>
- </part>
- </software>
-
- <software name="mmania">
- <!-- source toseciso
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="5157" crc="4410b315" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 01 of 28)[!].iso" size="13649920" crc="5b2898ac" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 02 of 28)[!].wav" size="22242908" crc="9395cf7d" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 03 of 28)[!].wav" size="22402844" crc="cde8bdf7" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 04 of 28)[!].wav" size="21730172" crc="8e9385fa" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 05 of 28)[!].wav" size="22849724" crc="79136032" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 06 of 28)[!].wav" size="21539660" crc="8c66d382" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 07 of 28)[!].wav" size="15490316" crc="d16c98a4" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 08 of 28)[!].wav" size="22946156" crc="044b9f2d" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 09 of 28)[!].wav" size="22885004" crc="89391554" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 10 of 28)[!].wav" size="22275836" crc="6a38349b" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 11 of 28)[!].wav" size="22786220" crc="f6d03962" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 12 of 28)[!].wav" size="22946156" crc="b29075a8" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 13 of 28)[!].wav" size="22595708" crc="313d754b" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 14 of 28)[!].wav" size="26467100" crc="35908462" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 15 of 28)[!].wav" size="32483516" crc="ad63c92e" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 16 of 28)[!].wav" size="32194220" crc="41e39854" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 17 of 28)[!].wav" size="22082972" crc="1b92d321" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 18 of 28)[!].wav" size="21890108" crc="77ff44c2" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 19 of 28)[!].wav" size="21890108" crc="44cdd61a" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 20 of 28)[!].wav" size="22466348" crc="134b78ab" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 21 of 28)[!].wav" size="2657804" crc="fe8f95b1" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 22 of 28)[!].wav" size="5731868" crc="51ff9005" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 23 of 28)[!].wav" size="22082972" crc="4d459d66" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 24 of 28)[!].wav" size="3906716" crc="40d83bb0" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 25 of 28)[!].wav" size="2210924" crc="c9e9a905" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 26 of 28)[!].wav" size="1794620" crc="18159b01" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 27 of 28)[!].wav" size="2530796" crc="ffe329f8" />
- <rom name="Mickey Mania - Timeless Adventures of Mickey Mouse (1994)(Sony Imagesoft)(NTSC)(US)(Track 28 of 28)[!].wav" size="1764044" crc="97072686" />
- -->
- <description>Mickey Mania - Timeless Adventures of Mickey Mouse (USA)</description>
- <year>1994</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93265"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="mickey mania - timeless adventures of mickey mouse (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="5709c080bbf6aad416c7d5ca1b9568fef9714648"/>
- </diskarea>
- </part>
- </software>
-
- <software name="microcos">
- <!-- source toseciso
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)[!].cue" size="1229" crc="3aee4573" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 1 of 9)[!].iso" size="238761984" crc="b724477f" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 2 of 9)[!].wav" size="20638844" crc="235aa8d3" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 3 of 9)[!].wav" size="22755644" crc="cfe2e31b" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 4 of 9)[!].wav" size="21873644" crc="4e9fec3c" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 5 of 9)[!].wav" size="35985644" crc="320c9849" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 6 of 9)[!].wav" size="24519644" crc="4f37600c" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 7 of 9)[!].wav" size="22755644" crc="8d3ebafc" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 8 of 9)[!].wav" size="21873644" crc="6edc5959" />
- <rom name="Microcosm (1993)(Psygnosis)(NTSC)(US)(Track 9 of 9)[!].wav" size="23990444" crc="6333b6a7" />
- -->
- <description>Microcosm (USA)</description>
- <year>1993</year>
- <publisher>Psygnosis</publisher>
- <info name="serial" value="T-113015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="microcosm (1993)(psygnosis)(ntsc)(us)[!]" sha1="293e021c7755392ad0594db3058be4b95f72033c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="midnight">
- <!-- source toseciso
- <rom name="Midnight Raiders (1994)(Sega)(NTSC)(US)[!].cue" size="281" crc="cf28ecd8" />
- <rom name="Midnight Raiders (1994)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="434898944" crc="da355e0d" />
- <rom name="Midnight Raiders (1994)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="36721820" crc="6591b91c" />
- -->
- <description>Midnight Raiders (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4439"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="midnight raiders (1994)(sega)(ntsc)(us)[!]" sha1="1bd910782364c6610c00bfd5c8195b74f539efef"/>
- </diskarea>
- </part>
- </software>
-
- <software name="mmpr">
- <!-- source toseciso
- <rom name="Mighty Morphin Power Rangers (1994)(Sega)(NTSC)(US)[!].cue" size="305" crc="c8b9e178" />
- <rom name="Mighty Morphin Power Rangers (1994)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="405032960" crc="b99afe66" />
- <rom name="Mighty Morphin Power Rangers (1994)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="7244204" crc="9a5d6173" />
- -->
- <description>Mighty Morphin Power Rangers (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4442"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="mighty morphin power rangers (1994)(sega)(ntsc)(us)[!]" sha1="0648bbf7a0c66c28bf8b8c8cde6bb99dcf840545"/>
- </diskarea>
- </part>
- </software>
-
- <software name="nbajam">
- <!-- source toseciso
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)[!].cue" size="1193" crc="156e7466" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 1 of 9)[!].iso" size="44617728" crc="50c2015e" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 2 of 9)[!].wav" size="51998060" crc="91c912a1" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 3 of 9)[!].wav" size="47197628" crc="7f4407a5" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 4 of 9)[!].wav" size="45998108" crc="c5da40a0" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 5 of 9)[!].wav" size="56036444" crc="69b3762f" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 6 of 9)[!].wav" size="54811052" crc="b1ad5308" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 7 of 9)[!].wav" size="60679292" crc="bd899bae" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 8 of 9)[!].wav" size="59430380" crc="8c2ae27d" />
- <rom name="NBA Jam (1994)(Acclaim)(NTSC)(US)(Track 9 of 9)[!].wav" size="1905164" crc="34a6ed57" />
- -->
- <description>NBA Jam (USA)</description>
- <year>1994</year>
- <publisher>Acclaim</publisher>
- <info name="serial" value="T-81035"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="nba jam (1994)(acclaim)(ntsc)(us)[!]" sha1="1a09cccb2c0ab81ecfc4fb2bee6b68947b7e6970"/>
+ <disk name="megarace (usa)" sha1="d60afc89afa7de225f42deb3fac894f9202061b5"/>
</diskarea>
</part>
</software>
- <software name="nflgreat">
- <!-- source toseciso
- <rom name="NFL's Greatest - San Francisco VS Dallas 1978-1993 (1993)(Sega)(NTSC)(US)[!].cue" size="349" crc="fcb14ea0" />
- <rom name="NFL's Greatest - San Francisco VS Dallas 1978-1993 (1993)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="546617344" crc="c8a4ec7d" />
- <rom name="NFL's Greatest - San Francisco VS Dallas 1978-1993 (1993)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="4468844" crc="f951feac" />
- -->
- <description>NFL's Greatest - San Francisco VS Dallas 1978-1993 (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4202"/>
+ <software name="mmm">
+ <!-- Source: TOSEC-ISO
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 01 of 18)[!].iso" size="21673984" crc="f1f49f3e" md5="2d77ddc33e548c1951fada0c99478967" sha1="7723aacd1f398d93d07208958120060a84ae1b9a"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 02 of 18)[!].wav" size="18646700" crc="f5ec966f" md5="a3c74729dd40d86425d4e855125f4111" sha1="ef46de446c4a23a46a5a09a0068b169b7e04da6e"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 03 of 18)[!].wav" size="58506044" crc="802a1e7e" md5="a4e83827f678870910c6507e51c6fe20" sha1="7fd236fcf4a6c999c051ea3fd3dda80a84a1b301"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 04 of 18)[!].wav" size="31269884" crc="6c57be06" md5="39564d4c0078636a18202b368dfe25f6" sha1="9b8d210a5f1d55578e49f379910a0e5141cfbb4c"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 05 of 18)[!].wav" size="6357500" crc="62dbd4bc" md5="49dea4bcfc5f1fdde37533cda02a0548" sha1="06a856f16a5f796bf3dfdd1345e7f57037955747"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 06 of 18)[!].wav" size="13975628" crc="cd28f887" md5="06e5bf9bd5791711e5c885eb02c47f07" sha1="979ed5bb41f208e96092a0e5426282f55b2104e5"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 07 of 18)[!].wav" size="16941500" crc="fb76fad7" md5="28c29d9b66b0bca6405da15208d3b01d" sha1="d571eba4c08427c999261cbf135b90e45401e803"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 08 of 18)[!].wav" size="4522940" crc="b5ef1c70" md5="4a31116f7a31d39e4c9b904a756fdaf0" sha1="50dfc4068ae01948d77be12ae253781467270c51"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 09 of 18)[!].wav" size="8676572" crc="05bd3998" md5="6e34e9852f93eee2545777959bde2eb2" sha1="cd624dc1d7577c689ddb884a1fa7b3c6bfb40f83"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 10 of 18)[!].wav" size="21457340" crc="bfb23b96" md5="b64970b27e41b07c3a1b165581e98a50" sha1="91ae998e940a1c553f8bf4f5a7f85ac212ca0998"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 11 of 18)[!].wav" size="4781660" crc="58d61d55" md5="0295a5ea4b332eae7c416a93f7ef8e29" sha1="5b8a7362d66cbd0ebadb77941618d71d0928ffe2"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 12 of 18)[!].wav" size="57362972" crc="b7c111ae" md5="053f6568afd909b8bb087f2ddd477d1b" sha1="f11a63c4925d11a397d2e891ddc0d668db2a72a5"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 13 of 18)[!].wav" size="65293916" crc="0ee54829" md5="515430857d9fe056119943d5e52fd647" sha1="9a850a4801e3b6610b06fd7c77185de0467a10d3"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 14 of 18)[!].wav" size="17522444" crc="8cefc608" md5="be522ea929c32c66cc467801635e1a34" sha1="23770e6d805864ed99c9d0eccb0cf58f4c35156c"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 15 of 18)[!].wav" size="21828956" crc="ddf510db" md5="05275eb15b7b1736249095d4149646aa" sha1="ec16324186cf504d7377a51e051d7e17fac32e69"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 16 of 18)[!].wav" size="30884156" crc="b2af333a" md5="96b709ca19170b8bdbd1e12b0f9caf34" sha1="d43ab703ee317208d4f2422c8deb28f347af8dcf"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 17 of 18)[!].wav" size="6418652" crc="e1acadaf" md5="ca53d0d5a16199e5a433209ed0653f2d" sha1="58bc6eb9454c9341edf6828e737d181eff268cc5"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)(Track 18 of 18)[!].wav" size="39499532" crc="a3bc7990" md5="54da521fb9cfa0b78776a8a152d643cb" sha1="490e30eaf595e30599b1ab3325e57714f92392df"/>
+ <rom name="Mighty Mighty Missile! (2004)(Good Deal Games)(NTSC)(US)[!].cue" size="2463" crc="46dacc69" md5="3d2e4ec4d4afa9676267c981db5558f0" sha1="32749bada0030e6566febba717ec96c79fc3e87e"/>
+ -->
+ <description>Mighty Mighty Missile! (USA)</description>
+ <year>2005</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="nfl's greatest - san francisco vs dallas 1978-1993 (1993)(sega sports)(ntsc)(us)[!]" sha1="26fcf4af5a11915e3087abf019cf249ddbe35434"/>
+ <disk name="mighty mighty missile! (usa)" sha1="561a66d7ed2df029ad07b49c4f0bca11f8ae0eb4"/>
</diskarea>
</part>
</software>
<software name="novastm">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Novastorm (1994)(Psygnosis)(NTSC)(US)[!].cue" size="277" crc="56e1b308" />
<rom name="Novastorm (1994)(Psygnosis)(NTSC)(US)(Track 1 of 2)[!].iso" size="364460032" crc="bdabc2d0" />
<rom name="Novastorm (1994)(Psygnosis)(NTSC)(US)(Track 2 of 2)[!].wav" size="32462348" crc="c3889d63" />
@@ -3038,16 +4547,16 @@
<description>Novastorm (USA)</description>
<year>1994</year>
<publisher>Psygnosis</publisher>
- <info name="serial" value="T-113065"/>
+ <info name="serial" value="T-113025"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="novastorm (1994)(psygnosis)(ntsc)(us)[!]" sha1="d5160362468ffa82ef858d8f9d46e26cf9a4a91f"/>
+ <disk name="novastorm (usa)" sha1="d5160362468ffa82ef858d8f9d46e26cf9a4a91f"/>
</diskarea>
</part>
</software>
<software name="pmonger">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="PowerMonger (1994)(Electronic Arts)(NTSC)(US)[!].cue" size="1465" crc="a6b69948" />
<rom name="PowerMonger (1994)(Electronic Arts)(NTSC)(US)(Track 01 of 10)[!].iso" size="337651712" crc="0bf6b492" />
<rom name="PowerMonger (1994)(Electronic Arts)(NTSC)(US)(Track 02 of 10)[!].wav" size="4388876" crc="2fd968ce" />
@@ -3064,70 +4573,47 @@
<year>1994</year>
<publisher>Electronic Arts</publisher>
<info name="serial" value="T-50035"/>
+ <info name="release" value="199401xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="powermonger (1994)(electronic arts)(ntsc)(us)[!]" sha1="0e281e66912a9d38edfd06bdee836ce8dba06244"/>
+ <disk name="powermonger (usa)" sha1="0e281e66912a9d38edfd06bdee836ce8dba06244"/>
</diskarea>
</part>
</software>
+ <!-- Only the first disc is dumped to redump.org standard. The second disc is a TOSEC-ISO dump. -->
<software name="prizefig">
- <!-- source toseciso
- <rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 1 of 2)[!].cue" size="301" crc="0d22af6a" />
- <rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!].iso" size="357466112" crc="efe51544" />
- <rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!].wav" size="1528844" crc="409d75fa" />
+ <!-- Source: TOSEC-ISO & redump.org - http://redump.org/disc/28629/
+ <rom name="Prize Fighter (USA) (Disc 1).cue" size="226" crc="008693c6" md5="5d9afab480f10aff98863b7bb6e35eb2" sha1="88788d86717177eca87075169ee40d0fdc683286"/>
+ <rom name="Prize Fighter (USA) (Disc 1) (Track 1).bin" size="410527488" crc="7d3f2a3c" md5="f8c2e9f9adc690908bd753c5c5ad1511" sha1="a310fc47ee68ba2f6c860b24b11be76ac4f08d86"/>
+ <rom name="Prize Fighter (USA) (Disc 1) (Track 2).bin" size="1881600" crc="59e2ce56" md5="3e98c47c9f75e731393a6516568a00bf" sha1="590fe2a3cefdf1dcfe77a911c972775b26059ee1"/>
<rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 2 of 2)[!].cue" size="301" crc="395c5c73" />
<rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!].iso" size="410372096" crc="3999c880" />
<rom name="Prize Fighter (1993)(Sega)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!].wav" size="1528844" crc="35bfab16" />
-->
<description>Prize Fighter (USA)</description>
- <year>1993</year>
+ <year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4206"/>
+ <info name="serial" value="MK-4206"/>
+ <info name="ring_code" value="CDAC-052700 2 (Disc 1)"/>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom">
- <disk name="prize fighter (1993)(sega)(ntsc)(us)(disc 1 of 2)[!]" sha1="d87caca431393968825b8913d10e254bd888fd8f"/>
+ <disk name="prize fighter (usa) (disc 1)" sha1="37742af63ba540380b8285a1e82be8d1898914e6"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom">
- <disk name="prize fighter (1993)(sega)(ntsc)(us)(disc 2 of 2)[!]" sha1="46f731d613d08eba5534331ce85fb5bab1e1b387"/>
- </diskarea>
- </part>
- </software>
-
- <software name="racinace">
- <!-- source toseciso
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)[!].cue" size="1490" crc="88bd0e56" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 01 of 11)[!].iso" size="13008896" crc="028903c0" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 02 of 11)[!].wav" size="39160844" crc="c8afbb62" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 03 of 11)[!].wav" size="35211836" crc="5d30f268" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 04 of 11)[!].wav" size="39913484" crc="4f976187" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 05 of 11)[!].wav" size="43025180" crc="f33d9e70" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 06 of 11)[!].wav" size="54161900" crc="8982d464" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 07 of 11)[!].wav" size="22205276" crc="64804b6b" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 08 of 11)[!].wav" size="22696844" crc="0db43f11" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 09 of 11)[!].wav" size="19495772" crc="1f5d4903" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 10 of 11)[!].wav" size="11682428" crc="4e5a634e" />
- <rom name="Racing Aces (1993)(Sega)(NTSC)(US)(Track 11 of 11)[!].wav" size="2227388" crc="23040c66" />
- -->
- <description>Racing Aces (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4607"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="racing aces (1993)(sega)(ntsc)(us)[!]" sha1="09751518da8b812347be858ada2234e295cfe8a9"/>
+ <disk name="prize fighter (usa) (disc 2)" sha1="46f731d613d08eba5534331ce85fb5bab1e1b387"/>
</diskarea>
</part>
</software>
<software name="radrex">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Radical Rex (1994)(Activision)(NTSC)(US)[!].cue" size="1556" crc="ab6dd03e" />
<rom name="Radical Rex (1994)(Activision)(NTSC)(US)(Track 01 of 11)[!].iso" size="9512960" crc="f217c891" />
<rom name="Radical Rex (1994)(Activision)(NTSC)(US)(Track 02 of 11)[!].wav" size="818540" crc="c98ab0f8" />
@@ -3144,38 +4630,16 @@
<description>Radical Rex (USA)</description>
<year>1994</year>
<publisher>Activision</publisher>
- <info name="serial" value="T-130035"/>
+ <info name="serial" value="T-130026"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="radical rex (1994)(activision)(ntsc)(us)[!]" sha1="4cdbbc72aa7b1fc191a2e45f9cf1eb1f16e8300c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="rdf">
- <!-- source toseciso
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)[!].cue" size="1034" crc="94aa7e69" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 1 of 7)[!].iso" size="223531008" crc="163b9cb7" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 2 of 7)[!].wav" size="21255068" crc="310449f4" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 3 of 7)[!].wav" size="18578492" crc="ea826883" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 4 of 7)[!].wav" size="11981132" crc="e99c74b6" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 5 of 7)[!].wav" size="17952860" crc="acab260e" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 6 of 7)[!].wav" size="26039036" crc="38107a4d" />
- <rom name="RDF - Global Conflict (1994)(Absolute)(NTSC)(US)(Track 7 of 7)[!].wav" size="1524140" crc="4da6c1bf" />
- -->
- <description>RDF - Global Conflict (USA)</description>
- <year>1994</year>
- <publisher>Absolute Entertainment</publisher>
- <info name="serial" value="T-86025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="rdf - global conflict (1994)(absolute)(ntsc)(us)[!]" sha1="bf562ca92c3410cee99d2ca9221b58193ac8d40a"/>
+ <disk name="radical rex (usa)" sha1="4cdbbc72aa7b1fc191a2e45f9cf1eb1f16e8300c"/>
</diskarea>
</part>
</software>
<software name="roadrash">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Road Rash (1995)(Electronic Arts)(NTSC)(US)[!].cue" size="289" crc="19c681fa" />
<rom name="Road Rash (1995)(Electronic Arts)(NTSC)(US)(Track 1 of 2)[!].iso" size="544043008" crc="f5f42f02" />
<rom name="Road Rash (1995)(Electronic Arts)(NTSC)(US)(Track 2 of 2)[!].wav" size="705644" crc="2d317ae5" />
@@ -3186,13 +4650,13 @@
<info name="serial" value="T-50085"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="road rash (1995)(electronic arts)(ntsc)(us)[!]" sha1="d6639e82e767177e5fa255cef2a5993451e10c09"/>
+ <disk name="road rash (usa)" sha1="d6639e82e767177e5fa255cef2a5993451e10c09"/>
</diskarea>
</part>
</software>
<software name="samsho">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Samurai Shodown (1995)(JVC)(NTSC)(US)[!].cue" size="4145" crc="42eaa5c5" />
<rom name="Samurai Shodown (1995)(JVC)(NTSC)(US)(Track 01 of 30)[!].iso" size="13520896" crc="c6f63035" />
<rom name="Samurai Shodown (1995)(JVC)(NTSC)(US)(Track 02 of 30)[!].wav" size="6712652" crc="ffc5c9c7" />
@@ -3229,15 +4693,17 @@
<year>1995</year>
<publisher>JVC</publisher>
<info name="serial" value="T-60175"/>
+ <info name="release" value="199501xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="samurai shodown (1995)(jvc)(ntsc)(us)[!]" sha1="5b12e3cea8f93635f25e98b184c68f6921e395d8"/>
+ <disk name="samurai shodown (usa)" sha1="5b12e3cea8f93635f25e98b184c68f6921e395d8"/>
</diskarea>
</part>
</software>
+ <!-- This was bundled together with a Sega-CD device, along with Sherlock Holmes: Consulting Detective Vol. I. -->
<software name="segaac4">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)[!][compilation - 4 games][SEGA-4126RE2 R1C].cue" size="2357" crc="359fcaf7" />
<rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 01 of 12)[!][compilation - 4 games][SEGA-4126RE2 R1C].iso" size="22546432" crc="b033b97d" />
<rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 02 of 12)[!][compilation - 4 games][SEGA-4126RE2 R1C].wav" size="15956012" crc="87b10747" />
@@ -3255,153 +4721,17 @@
<description>Sega Classics Arcade Collection (USA, 4 in 1)</description>
<year>1992</year>
<publisher>Sega</publisher>
+ <info name="release" value="19921015" />
<info name="ring_code" value="SEGA-4126RE2 R1C"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sega classics arcade collection (1992)(sega)(ntsc)(us)[!][compilation - 4 games][sega-4126re2 r1c]" sha1="cfea01b2bdf3e6eb02209d962e57fc41f0a29bc8"/>
- </diskarea>
- </part>
- </software>
-
- <software name="segaac4a" cloneof="segaac4">
- <!-- source toseciso
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)[!][compilation - 4 games][SEGA4126RE R1D].cue" size="2333" crc="5fee2e3b" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 01 of 12)[!][compilation - 4 games][SEGA4126RE R1D].iso" size="21899264" crc="e6c68e83" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 02 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="15960716" crc="5256a279" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 03 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="3826748" crc="77099ef9" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 04 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="8996444" crc="46265168" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 05 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="28929644" crc="569e4589" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 06 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="23912828" crc="9f3484fe" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 07 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="15810188" crc="0c9714d7" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 08 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="21791324" crc="1a666b82" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 09 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="25646252" crc="c1c3725c" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 10 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="23696444" crc="cf15a9e5" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 11 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="3709148" crc="a5bfc3e5" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 12 of 12)[!][compilation - 4 games][SEGA4126RE R1D].wav" size="12173996" crc="9fa04d94" />
- -->
- <description>Sega Classics Arcade Collection (USA, 4 in 1, Alt)</description>
- <year>1992</year>
- <publisher>Sega</publisher>
- <info name="ring_code" value="SEGA4126RE R1D"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sega classics arcade collection (1992)(sega)(ntsc)(us)[!][compilation - 4 games][sega4126re r1d]" sha1="41b58f84139c92d89a2662362e6d8d47eac111e1"/>
- </diskarea>
- </part>
- </software>
-
- <software name="segaac5">
- <!-- source toseciso
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)[!][compilation - 5 games][CDAC-056800 2].cue" size="2321" crc="889eba76" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 01 of 12)[!][compilation - 5 games][CDAC-056800 2].iso" size="22546432" crc="0946f895" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 02 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="15960716" crc="a8a1f529" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 03 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="3826748" crc="7be8f427" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 04 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="8996444" crc="385f2418" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 05 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="27450236" crc="f8b29893" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 06 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="23912828" crc="96f5ee56" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 07 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="15810188" crc="95e5cc5d" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 08 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="21791324" crc="88a968c9" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 09 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="25646252" crc="39237eca" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 10 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="23696444" crc="fd733871" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 11 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="3709148" crc="5592f428" />
- <rom name="Sega Classics Arcade Collection (1992)(Sega)(NTSC)(US)(Track 12 of 12)[!][compilation - 5 games][CDAC-056800 2].wav" size="12171644" crc="a95cb68e" />
- -->
- <description>Sega Classics Arcade Collection (USA, 5 in 1)</description>
- <year>1992</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4127"/>
- <info name="ring_code" value="CDAC-056800 2"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sega classics arcade collection (1992)(sega)(ntsc)(us)[!][compilation - 5 games][cdac-056800 2]" sha1="bcae68685c7a7ab4e96c85eed7fbcda07b73cf0a"/>
- </diskarea>
- </part>
- </software>
-
- <!-- probably duplicates -->
-
-<!-- Ringcode: CDRM-1095270 1 -->
-<!--
- <software name="sshrkd" cloneof="sshrk">
- <description>Sewer Shark (USA, Alt 2)</description>
- <year>1992</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sewer shark (1992)(sony imagesoft)(ntsc)(us)[!][cdrm-1095270 1]" sha1="1bd1b5660aec7e876748c88b962895c3f48bbbeb"/>
- </diskarea>
- </part>
- </software>
--->
-
- <software name="holmes">
- <!-- source toseciso
- <rom name="Sherlock Holmes - Consulting Detective (1992)(Sega)(NTSC)(US)[!].cue" size="325" crc="b41f73f5" />
- <rom name="Sherlock Holmes - Consulting Detective (1992)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="653647872" crc="48c404a8" />
- <rom name="Sherlock Holmes - Consulting Detective (1992)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="10741628" crc="d03289ed" />
- -->
- <description>Sherlock Holmes - Consulting Detective (USA)</description>
- <year>1992</year>
- <publisher>Sega</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sherlock holmes - consulting detective (1992)(sega)(ntsc)(us)[!]" sha1="b78ae01d052e03104ab38e77ede6fd059cf0b889"/>
- </diskarea>
- </part>
- </software>
-
- <software name="slamcity" >
- <!-- source toseciso
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)[!][Fingers][GW 02711.1 RE-1].cue" size="409" crc="b7bf2d52" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 1 of 2)[!][Fingers][GW 02711.1 RE-1].iso" size="511191040" crc="6747b14f" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 2 of 2)[!][Fingers][GW 02711.1 RE-1].wav" size="16772156" crc="fda8ad2b" />
-
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 2 of 4)[!][Juice][GW 02711.2 RE-1].cue" size="405" crc="05e414e4" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 2 of 4)(Track 1 of 2)[!][Juice][GW 02711.2 RE-1].iso" size="493748224" crc="d8d60400" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 2 of 4)(Track 2 of 2)[!][Juice][GW 02711.2 RE-1].wav" size="17124956" crc="77a232c8" />
-
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 3 of 4)[!][Mad Dog][GW 02711.3 RE-1].cue" size="409" crc="52767a92" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 3 of 4)(Track 1 of 2)[!][Mad Dog][GW 02711.3 RE-1].iso" size="499499008" crc="c4f9f324" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 3 of 4)(Track 2 of 2)[!][Mad Dog][GW 02711.3 RE-1].wav" size="16772156" crc="16281980" />
-
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 4 of 4)[!][Smash][GW 02711.4 RE-1].cue" size="405" crc="0146e3e9" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 4 of 4)(Track 1 of 2)[!][Smash][GW 02711.4 RE-1].iso" size="471697408" crc="076fe5f1" />
- <rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 4 of 4)(Track 2 of 2)[!][Smash][GW 02711.4 RE-1].wav" size="16772156" crc="bcd2ee82" />
- -->
- <description>Slam City with Scottie Pippen (USA, RE-1)</description>
- <year>1994</year>
- <publisher>Digital Pictures</publisher>
- <info name="serial" value="T-162035"/>
- <info name="ring_code" value="GW 02711.1 RE-1 (Disc 1), GW 02711.2 RE-1 (Disc 2), GW 02711.3 RE-1 (Disc 3), GW 02711.4 RE-1 (Disc 4)"/>
- <part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Fingers" />
- <diskarea name="cdrom1">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 1 of 4)[fingers][gw 02711_1 re-1]" sha1="c910a0eedb31e4ff184b3623562978ec94a441b6"/>
- </diskarea>
- </part>
- <part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Juice" />
- <diskarea name="cdrom2">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 2 of 4)[juice][gw 02711_2 re-1]" sha1="e880cb1bac24155d0b0c1db4c5a4d8a228b417d0"/>
- </diskarea>
- </part>
- <part name="cdrom3" interface="scd_cdrom">
- <feature name="part_id" value="Mad Dog" />
- <diskarea name="cdrom3">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 3 of 4)[mad dog][gw 02711_3 re-1]" sha1="e6308b8b29487b2730dc2f3960a8c5f6568b9fd0"/>
- </diskarea>
- </part>
- <part name="cdrom4" interface="scd_cdrom">
- <feature name="part_id" value="Smash" />
- <diskarea name="cdrom4">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 4 of 4)[smash][gw 02711_4 re-1]" sha1="058cdba65f16b764bcb877a91be89d97fe6c2d35"/>
+ <disk name="sega classics arcade collection (usa, 4 in 1)" sha1="cfea01b2bdf3e6eb02209d962e57fc41f0a29bc8"/>
</diskarea>
</part>
</software>
<software name="slamcitya" cloneof="slamcity">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)[!][Fingers][GW 02711.1].cue" size="399" crc="59d841d8" />
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 1 of 2)[!][Fingers][GW 02711.1].iso" size="511191040" crc="6747b14f" />
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 2 of 2)[!][Fingers][GW 02711.1].wav" size="16772156" crc="e07fb5ee" />
@@ -3422,38 +4752,40 @@
<year>1994</year>
<publisher>Digital Pictures</publisher>
<info name="serial" value="T-162035"/>
- <info name="ring_code" value="GW 02711.1 (Disc 1), GW 02711.2 (Disc 2), GW 02711.3 (Disc 3), GW 02711.4 (Disc 4)"/>
+ <info name="release" value="199411xx" />
+ <info name="ring_code" value="GW 02711.1 (Disc 1) / GW 02711.2 (Disc 2) / GW 02711.3 (Disc 3) / GW 02711.4 (Disc 4)"/>
<part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Fingers" />
+ <feature name="part_id" value="Disc 1 - Fingers" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 1 of 4)[fingers][gw 02711_1]" sha1="e458f2e459cb097ed32ea27ffaa7ab5cc47c9a18"/>
+ <disk name="slam city with scottie pippen (usa) (disc 1)" sha1="e458f2e459cb097ed32ea27ffaa7ab5cc47c9a18"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Juice" />
+ <feature name="part_id" value="Disc 2 - Juice" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 2 of 4)[juice][gw 02711_2]" sha1="d900b5e5dcb904530edc089ce376d53ce404d6ec"/>
+ <disk name="slam city with scottie pippen (usa) (disc 2)" sha1="d900b5e5dcb904530edc089ce376d53ce404d6ec"/>
</diskarea>
</part>
<part name="cdrom3" interface="scd_cdrom">
- <feature name="part_id" value="Mad Dog" />
+ <feature name="part_id" value="Disc 3 - Mad Dog" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 3 of 4)[mad dog][gw 02711_3]" sha1="11bfe9ce5081785bb8e9cbc0e9bd65c7605e817e"/>
+ <disk name="slam city with scottie pippen (usa) (disc 3)" sha1="11bfe9ce5081785bb8e9cbc0e9bd65c7605e817e"/>
</diskarea>
</part>
<part name="cdrom4" interface="scd_cdrom">
- <feature name="part_id" value="Smash" />
+ <feature name="part_id" value="Disc 4 - Smash" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 4 of 4)[smash][gw 02711_4]" sha1="010bc11b7d8a078bbdd869ae7c7bf7ebfe04c916"/>
+ <disk name="slam city with scottie pippen (usa) (disc 4)" sha1="010bc11b7d8a078bbdd869ae7c7bf7ebfe04c916"/>
</diskarea>
</part>
</software>
+ <!-- Requires 32x add-on! -->
<software name="slamcity32" cloneof="slamcity">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)[!][Fingers][32X].cue" size="385" crc="55a0b768" />
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 1 of 2)[!][Fingers][32X].iso" size="529147904" crc="1c6665b1" />
<rom name="Slam City with Scottie Pippen (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 4)(Track 2 of 2)[!][Fingers][32X].wav" size="16772156" crc="e54f820f" />
@@ -3473,189 +4805,76 @@
<description>Slam City with Scottie Pippen (USA, 32X)</description>
<year>1994</year>
<publisher>Digital Pictures</publisher>
- <info name="serial" value="T-16204F"/>
+ <info name="serial" value="T16204F"/>
+ <sharedfeat name="requirement" value="32x"/>
<part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Fingers" />
+ <feature name="part_id" value="Disc 1 - Fingers" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 1 of 4)[fingers][32x]" sha1="c0563dec08e2e89e42705d324b39f78b0056dcd5"/>
+ <disk name="slam city with scottie pippen (usa, 32x) (disc 1)" sha1="c0563dec08e2e89e42705d324b39f78b0056dcd5"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Juice" />
+ <feature name="part_id" value="Disc 2 - Juice" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 2 of 4)[juice][32x]" sha1="21044739e37a7faf11dd21e633d64c0f817f991b"/>
+ <disk name="slam city with scottie pippen (usa, 32x) (disc 2)" sha1="21044739e37a7faf11dd21e633d64c0f817f991b"/>
</diskarea>
</part>
<part name="cdrom3" interface="scd_cdrom">
- <feature name="part_id" value="Mad Dog" />
+ <feature name="part_id" value="Disc 3 - Mad Dog" />
<diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 3 of 4)[mad dog][32x]" sha1="cc4a4c7c64c16a0f8ce3d8a4d82e94d11466a769"/>
+ <disk name="slam city with scottie pippen (usa, 32x) (disc 3)" sha1="cc4a4c7c64c16a0f8ce3d8a4d82e94d11466a769"/>
</diskarea>
</part>
<part name="cdrom4" interface="scd_cdrom">
- <feature name="part_id" value="Smash" />
- <diskarea name="cdrom">
- <disk name="slam city with scottie pippen (1994)(ntsc)(us)(disc 4 of 4)[smash][32x]" sha1="6432d3447cb2be5e39fb79b69833dd80e4587c6c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="solfeace">
- <!-- source toseciso
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)[!].cue" size="2399" crc="845121a6" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 01 of 18)[!].iso" size="5502976" crc="9bf2791f" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 02 of 18)[!].wav" size="1651148" crc="216258ba" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 03 of 18)[!].wav" size="2885948" crc="7e7196c8" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 04 of 18)[!].wav" size="2904764" crc="044cebf2" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 05 of 18)[!].wav" size="28496876" crc="33aeb6ed" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 06 of 18)[!].wav" size="31272236" crc="90f43c78" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 07 of 18)[!].wav" size="21509084" crc="77fec27e" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 08 of 18)[!].wav" size="60498188" crc="247b0af5" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 09 of 18)[!].wav" size="27965324" crc="3d890811" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 10 of 18)[!].wav" size="48225452" crc="4ac3acbf" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 11 of 18)[!].wav" size="19698044" crc="09924516" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 12 of 18)[!].wav" size="33163244" crc="4da368c0" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 13 of 18)[!].wav" size="57687548" crc="89df502c" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 14 of 18)[!].wav" size="27257372" crc="c0dd3805" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 15 of 18)[!].wav" size="30385532" crc="96e72ead" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 16 of 18)[!].wav" size="39196124" crc="938a0767" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 17 of 18)[!].wav" size="17148476" crc="d7742165" />
- <rom name="Sol-Feace (1992)(Sega)(NTSC)(US)(Track 18 of 18)[!].wav" size="23696444" crc="1bce332d" />
- -->
- <description>Sol-Feace (USA)</description>
- <year>1992</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4404"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sol-feace (1992)(sega)(ntsc)(us)[!]" sha1="6b145b53306758756e668d59556f54adf676c56e"/>
- </diskarea>
- </part>
- </software>
-
-<!-- Ringcode: SEGA4407RE152 R7D -->
-<!--
- <software name="soniccd">
- <description>Sonic CD (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4407"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="sonic cd (1993)(sega)(ntsc)(us)[!][sega4407re152 r7d]" sha1="4e39d1a2b3acb359c8dd66061b8fa7308fa35c23"/>
- </diskarea>
- </part>
- </software>
--->
-
- <software name="soulstar">
- <!-- source toseciso
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)[!].cue" size="2691" crc="43dae471" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 01 of 17)[!].iso" size="127029248" crc="5347d3bf" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 02 of 17)[!].wav" size="16520492" crc="7e7ccc45" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 03 of 17)[!].wav" size="43173356" crc="a3afad0d" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 04 of 17)[!].wav" size="55302620" crc="136bbc59" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 05 of 17)[!].wav" size="19401692" crc="8d118e39" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 06 of 17)[!].wav" size="37977788" crc="8a43a5c4" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 07 of 17)[!].wav" size="39179660" crc="e71a19a1" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 08 of 17)[!].wav" size="41247068" crc="a07b8d8b" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 09 of 17)[!].wav" size="43900124" crc="9394605f" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 10 of 17)[!].wav" size="41602220" crc="b92f45a3" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 11 of 17)[!].wav" size="21963020" crc="e4efeabc" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 12 of 17)[!].wav" size="30625436" crc="77aea535" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 13 of 17)[!].wav" size="36035036" crc="8d195826" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 14 of 17)[!].wav" size="7265372" crc="deccfe75" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 15 of 17)[!].wav" size="20177852" crc="820b7ea1" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 16 of 17)[!].wav" size="39080876" crc="ec1c4a34" />
- <rom name="SoulStar (1994)(Core - Time Warner Interactive)(NTSC)(US)(Track 17 of 17)[!].wav" size="2116844" crc="476a6cc8" />
- -->
- <description>SoulStar (USA)</description>
- <year>1994</year>
- <publisher>Core ~ Time Warner Interactive</publisher>
- <info name="serial" value="T-115035"/>
- <part name="cdrom" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 4 - Smash" />
<diskarea name="cdrom">
- <disk name="soulstar (1994)(core - time warner interactive)(ntsc)(us)[!]" sha1="92fca6e1b79788e9ddbbee4b17801a5c5875b142"/>
+ <disk name="slam city with scottie pippen (usa, 32x) (disc 4)" sha1="6432d3447cb2be5e39fb79b69833dd80e4587c6c"/>
</diskarea>
</part>
</software>
- <software name="spaceace">
- <!-- source toseciso
- <rom name="Space Ace (1994)(ReadySoft)(NTSC)(US)[!].cue" size="277" crc="bddb978a" />
- <rom name="Space Ace (1994)(ReadySoft)(NTSC)(US)(Track 1 of 2)[!].iso" size="266678272" crc="883b82c4" />
- <rom name="Space Ace (1994)(ReadySoft)(NTSC)(US)(Track 2 of 2)[!].wav" size="1168988" crc="54b7a169" />
+ <software name="spaceacedemo" cloneof="spaceace">
+ <!-- Source: TOSEC-ISO
+ <rom name="Space Ace - Demo Disc (1994)(ReadySoft)(NTSC)(US).cue" size="138" crc="b931b4d1" />
+ <rom name="Space Ace - Demo Disc (1994)(ReadySoft)(NTSC)(US).iso" size="8802304" crc="884f4f1f" />
-->
- <description>Space Ace (USA)</description>
+ <description>Space Ace (USA, Demo)</description>
<year>1994</year>
<publisher>ReadySoft</publisher>
- <info name="serial" value="T-121025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="space ace (1994)(readysoft)(ntsc)(us)[!]" sha1="0a4bc35dacbd44300adb4bc9e260bb70f095604d"/>
- </diskarea>
- </part>
- </software>
-
- <!-- one of these probably matches the REDUMP set-->
- <software name="swraa" cloneof="swra">
- <!-- source toseciso
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)[!][SEGAT60075 R1D].cue" size="329" crc="f3030bd0" />
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)(Track 1 of 2)[!][SEGAT60075 R1D].iso" size="344168448" crc="7f07cbc1" />
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)(Track 2 of 2)[!][SEGAT60075 R1D].wav" size="57445292" crc="fb7affe5" />
- -->
- <description>Star Wars - Rebel Assault (USA, R1D)</description>
- <year>1994</year>
- <publisher>JVC</publisher>
- <info name="serial" value="T-60075"/>
- <info name="ring_code" value="SEGAT60075 R1D"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="star wars - rebel assault (1994)(jvc)(ntsc)(us)[!][segat60075 r1d]" sha1="5913b429d4089ccb5062709c0f8fb2eedd381015"/>
+ <disk name="space ace (usa, demo)" sha1="a2c36f02bab608baca10bf8d4e6b450cab49715c"/>
</diskarea>
</part>
</software>
- <software name="swrab" cloneof="swra">
- <!-- source toseciso
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)[!][SEGAT60075 R2C].cue" size="329" crc="09ef5dc7" />
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)(Track 1 of 2)[!][SEGAT60075 R2C].iso" size="344168448" crc="7f07cbc1" />
- <rom name="Star Wars - Rebel Assault (1994)(JVC)(NTSC)(US)(Track 2 of 2)[!][SEGAT60075 R2C].wav" size="57445292" crc="aece0399" />
- -->
- <description>Star Wars - Rebel Assault (USA, R2C)</description>
- <year>1994</year>
- <publisher>JVC</publisher>
- <info name="serial" value="T-60075"/>
- <info name="ring_code" value="SEGAT60075 R2C"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="star wars - rebel assault (1994)(jvc)(ntsc)(us)[!][segat60075 r2c]" sha1="8fe2d9c60c3ae79301a951dc3b66ddbcad632808"/>
- </diskarea>
- </part>
- </software>
-
- <software name="starblad">
- <!-- source toseciso
- <rom name="StarBlade (1994)(Namco)(NTSC)(US)[!].cue" size="269" crc="398c4147" />
- <rom name="StarBlade (1994)(Namco)(NTSC)(US)(Track 1 of 2)[!].iso" size="406351872" crc="0c2b03d7" />
- <rom name="StarBlade (1994)(Namco)(NTSC)(US)(Track 2 of 2)[!].wav" size="1176044" crc="08d8be00" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Sony Imagesoft and was set for release in
+ January 1996. It was however scrapped before it was published. In 2001, Good Deal Games released
+ a set of reproduction discs based off a prototype build. This is a dump from one of those
+ reproduction discs.
+ -->
+ <software name="starstrk">
+ <!-- Source: TOSEC-ISO
+ <rom name="Star Strike (2000)(Good Deal Games)(NTSC)(US)(Track 1 of 2)[!].iso" size="554246144" crc="652981cb" md5="aecd76cc15c09c642d1d7fef8ca6e87b" sha1="9f331514566c34ba2774700f453a8707e5ae80ae"/>
+ <rom name="Star Strike (2000)(Good Deal Games)(NTSC)(US)(Track 2 of 2)[!].wav" size="1244252" crc="11acc95b" md5="ae1e4adf83c26c7934321f3c62c7e4b2" sha1="34dc4f6d52da38a9da4488cba5a6763b0d1bf432"/>
+ <rom name="Star Strike (2000)(Good Deal Games)(NTSC)(US)[!].cue" size="293" crc="4bcf74d3" md5="724764b925749718f1b8e8c09a6a65ed" sha1="09b6d016757d5f5352695a9d40da3277d7569221"/>
-->
- <description>StarBlade (USA)</description>
- <year>1994</year>
- <publisher>Namco</publisher>
- <info name="serial" value="T-14025"/>
+ <description>Star Strike (USA, Prototype)</description>
+ <year>2001</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="starblade (1994)(namco)(ntsc)(us)[!]" sha1="de3f9bd4433a99b2e81d03716d3e7d260fb48524"/>
+ <disk name="star strike (usa, prototype)" sha1="65552aa20d2b799083fc4d27efc590fe91aa77af" />
</diskarea>
</part>
</software>
<software name="supremew">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 2)[!][Fire & Earth][GW 02411.1 RE-1].cue" size="417" crc="503b570d" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 2)(Track 1 of 2)[!][Fire & Earth][GW 02411.1 RE-1].iso" size="427319296" crc="c12c22aa" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(Disc 1 of 2)(Track 2 of 2)[!][Fire & Earth][GW 02411.1 RE-1].wav" size="1848716" crc="0145b1c5" />
@@ -3664,27 +4883,29 @@
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(Disc 2 of 2)(Track 1 of 2)[!][Wind & Fang Tu][GW 02411.2 RE-1].iso" size="423421952" crc="0df59b66" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(Disc 2 of 2)(Track 2 of 2)[!][Wind & Fang Tu][GW 02411.2 RE-1].wav" size="1848716" crc="1ff0cef5" />
-->
- <description>Supreme Warrior - Ying Heung (USA)</description>
+ <description>Supreme Warrior (USA)</description>
<year>1994</year>
<publisher>Digital Pictures</publisher>
<info name="serial" value="T-162045"/>
+ <info name="alt_title" value="Supreme Warrior - Ying Heung (Box)" />
<info name="ring_code" value="GW 02411.1 RE-1 (Disc 1), GW 02411.2 RE-1 (Disc 2)"/>
<part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Fire and Earth" />
+ <feature name="part_id" value="Disc 1 - Fire and Earth" />
<diskarea name="cdrom">
- <disk name="supreme warrior - ying heung (1994)(digital pictures)(ntsc)(us)(disc 1 of 2)[!][fire and earth]" sha1="dbdc3fcdee8c590401a815662878476632f42cf0"/>
+ <disk name="supreme warrior (usa) (disc 1)" sha1="dbdc3fcdee8c590401a815662878476632f42cf0"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Wind and Tang Fu" />
+ <feature name="part_id" value="Disc 2 - Wind and Tang Fu" />
<diskarea name="cdrom">
- <disk name="supreme warrior - ying heung (1994)(digital pictures)(ntsc)(us)(disc 2 of 2)[!][wind and fang tu]" sha1="00344d23da869e465c322e154c9babf219271e49"/>
+ <disk name="supreme warrior (usa) (disc 2)" sha1="00344d23da869e465c322e154c9babf219271e49"/>
</diskarea>
</part>
</software>
+ <!-- Requires 32x add-on! -->
<software name="supremew32" cloneof="supremew">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(en-zh)(Disc 1 of 2)[!][Fire & Earth][32X].cue" size="407" crc="6c4630fc" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(en-zh)(Disc 1 of 2)(Track 1 of 2)[!][Fire & Earth][32X].iso" size="459593728" crc="a65565f4" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(en-zh)(Disc 1 of 2)(Track 2 of 2)[!][Fire & Earth][32X].wav" size="1848716" crc="3f54ecad" />
@@ -3693,70 +4914,86 @@
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(en-zh)(Disc 2 of 2)(Track 1 of 2)[!][Wind & Tang Fu][32X].iso" size="460056576" crc="1ce0ad3d" />
<rom name="Supreme Warrior - Ying Heung (1994)(Digital Pictures)(NTSC)(US)(en-zh)(Disc 2 of 2)(Track 2 of 2)[!][Wind & Tang Fu][32X].wav" size="1848716" crc="558b77ce" />
-->
- <description>Supreme Warrior - Ying Heung (USA, 32X)</description>
+ <description>Supreme Warrior (USA, 32X)</description>
<year>1994</year>
<publisher>Digital Pictures</publisher>
<info name="serial" value="T-16203F"/>
+ <info name="alt_title" value="Supreme Warrior - Ying Heung (Box)" />
+ <sharedfeat name="requirement" value="32x"/>
<part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Fire and Earth" />
+ <feature name="part_id" value="Disc 1 - Fire and Earth" />
<diskarea name="cdrom">
- <disk name="supreme warrior - ying heung (1994)(digital pictures)(ntsc)(us)(en-zh)(disc 1 of 2)[!][fire and earth][32x]" sha1="a9afa96f2300e19777724404909d4f204199f342"/>
+ <disk name="supreme warrior (usa, 32x) (disc 1)" sha1="a9afa96f2300e19777724404909d4f204199f342"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Wind and Tang Fu" />
+ <feature name="part_id" value="Disc 2 - Wind and Tang Fu" />
<diskarea name="cdrom">
- <disk name="supreme warrior - ying heung (1994)(digital pictures)(ntsc)(us)(en-zh)(disc 2 of 2)[!][wind and tang fu][32x]" sha1="e99f121209bac853d9e0d88a1a395354b264ebd5"/>
+ <disk name="supreme warrior (usa, 32x) (disc 2)" sha1="e99f121209bac853d9e0d88a1a395354b264ebd5"/>
</diskarea>
</part>
</software>
- <software name="surgical">
- <!-- source toseciso
- <rom name="Surgical Strike (1995)(Sega)(NTSC)(US)[!][1008604435].cue" size="452" crc="17216055" />
- <rom name="Surgical Strike (1995)(Sega)(NTSC)(US)(Track 1 of 3)[!][1008604435].iso" size="387790848" crc="a54d1213" />
- <rom name="Surgical Strike (1995)(Sega)(NTSC)(US)(Track 2 of 3)[!][1008604435].wav" size="43213340" crc="b815cd3e" />
- <rom name="Surgical Strike (1995)(Sega)(NTSC)(US)(Track 3 of 3)[!][1008604435].wav" size="1987484" crc="0ed0eaed" />
+ <!--
+ This dump is marked as both NTSC and Europe. Most signs point to it being a USA disc.
+ It's assumed it's a USA dump until proof of otherwise.
+ -->
+ <software name="lawnmowr">
+ <!-- Source: TOSEC-ISO
+ <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)[!].cue" size="323" crc="cd07b830" />
+ <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)(Track 1 of 2)[!].iso" size="529391616" crc="d7d857a9" />
+ <rom name="Lawnmower Man, The (1994)(Time Warner Interactive)(NTSC)(Eu)(Track 2 of 2)[!].wav" size="7949804" crc="c5fbfc8e" />
-->
- <description>Surgical Strike (USA)</description>
- <year>1995</year>
+ <description>The Lawnmower Man (USA)</description>
+ <year>1994</year>
+ <publisher>Sales Curve Interactive</publisher>
+ <info name="serial" value="T-160015"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="the lawnmower man (usa)" sha1="0fbfa11d36a770450c8f34d74dc2b44196484ad6"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="kamenrzo">
+ <!-- Source: TOSEC-ISO
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)[!].cue" size="785" crc="3feca100" />
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 1 of 5)[!].iso" size="384094208" crc="350ac4fd" />
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 2 of 5)[!].wav" size="2551964" crc="81b9234d" />
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 3 of 5)[!].wav" size="2709548" crc="747d1326" />
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 4 of 5)[!].wav" size="11449580" crc="c81b272c" />
+ <rom name="Masked Rider, The - Kamen Rider ZO (1994)(Sega)(NTSC)(US)(Track 5 of 5)[!].wav" size="2634284" crc="af952d84" />
+ -->
+ <description>The Masked Rider - Kamen Rider ZO (USA)</description>
+ <year>1994</year>
<publisher>Sega</publisher>
- <info name="serial" value="4435"/>
- <info name="ring_code" value="1008604435"/>
+ <info name="serial" value="4444"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="surgical strike (1995)(sega)(ntsc)(us)[!][1008604435]" sha1="d308b46c908549c36cff4809cd5b195abc58acbf"/>
+ <disk name="the masked rider - kamen rider zo (usa)" sha1="a5906a3c5702f7ab0ba0f37a66d7b0f136488d85"/>
</diskarea>
</part>
</software>
- <software name="termintr">
- <!-- source toseciso
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)[!].cue" size="1415" crc="3b173055" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 01 of 10)[!].iso" size="107493376" crc="5b4d5771" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 02 of 10)[!].wav" size="27426716" crc="6355c497" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 03 of 10)[!].wav" size="36514844" crc="bd1ff5ab" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 04 of 10)[!].wav" size="43307420" crc="5e74e943" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 05 of 10)[!].wav" size="55036844" crc="2d48de71" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 06 of 10)[!].wav" size="44276444" crc="d5578688" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 07 of 10)[!].wav" size="45687644" crc="1d64abcf" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 08 of 10)[!].wav" size="36961724" crc="c89d2727" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 09 of 10)[!].wav" size="17110844" crc="a390a298" />
- <rom name="Terminator, The (1993)(Virgin)(NTSC)(US)(Track 10 of 10)[!].wav" size="38812748" crc="199f9832" />
+ <software name="animals">
+ <!-- Source: TOSEC-ISO
+ <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)[!].cue" size="425" crc="a45c87f3" />
+ <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)(Track 1 of 2)[!].iso" size="605767680" crc="c5dc6cff" />
+ <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)(Track 2 of 2)[!].wav" size="1168988" crc="37bbe730" />
-->
- <description>The Terminator (USA)</description>
- <year>1993</year>
- <publisher>Virgin Interactive</publisher>
- <info name="serial" value="T-70015"/>
+ <description>The San Diego Zoo Presents... The Animals! (USA)</description>
+ <year>1994</year>
+ <publisher>The Software Toolworks</publisher>
+ <info name="serial" value="T-87015"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="terminator, the (1993)(virgin)(ntsc)(us)[!]" sha1="086efb5f0f5827fd29e36f4a438689dcace631ea"/>
+ <disk name="the san diego zoo presents... the animals! (usa)" sha1="88f7be68f35e5dd7776b3ff580ae40ce7087151b"/>
</diskarea>
</part>
</software>
<software name="3rdww">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Third World War (1994)(Extreme)(NTSC)(US)[!][AE01941 R1C].cue" size="8685" crc="a64b1111" />
<rom name="Third World War (1994)(Extreme)(NTSC)(US)(Track 01 of 56)[!][AE01941 R1C].iso" size="14411776" crc="f4f0ff51" />
<rom name="Third World War (1994)(Extreme)(NTSC)(US)(Track 02 of 56)[!][AE01941 R1C].wav" size="11546012" crc="f58a2011" />
@@ -3815,74 +5052,62 @@
<rom name="Third World War (1994)(Extreme)(NTSC)(US)(Track 55 of 56)[!][AE01941 R1C].wav" size="10861580" crc="f9db41c8" />
<rom name="Third World War (1994)(Extreme)(NTSC)(US)(Track 56 of 56)[!][AE01941 R1C].wav" size="21828956" crc="ce5e60c1" />
-->
- <description>Third World War (USA)</description>
+ <description>The Third World War (USA)</description>
<year>1994</year>
- <publisher>Extreme</publisher>
+ <publisher>Extreme Entertainment Group</publisher>
<info name="serial" value="T-22025"/>
+ <info name="alt_title" value="Third World War (Box)" />
<info name="ring_code" value="AE01941 R1C"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="third world war (1994)(extreme)(ntsc)(us)[!][ae01941 r1c]" sha1="cd1644735ac3b600167f0680f2210811b90b9bd4"/>
- </diskarea>
- </part>
- </software>
-
- <!-- one of these is probably a duplicate of the redump set -->
- <software name="tcatalya" cloneof="tcataly">
- <!-- source toseciso
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)[!][1008604429].cue" size="297" crc="500e811e" />
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)(Track 1 of 2)[!][1008604429].iso" size="494069760" crc="918806f8" />
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)(Track 2 of 2)[!][1008604429].wav" size="1982780" crc="4e3b0a61" />
- -->
- <description>Tomcat Alley (USA, 1008604429)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4429"/>
- <info name="ring_code" value="1008604429"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="tomcat alley (1994)(sega)(ntsc)(us)[!][1008604429]" sha1="d21fb69f0bd9afd221fbad39af419397e14a281f"/>
+ <disk name="the third world war (usa)" sha1="cd1644735ac3b600167f0680f2210811b90b9bd4"/>
</diskarea>
</part>
</software>
- <software name="tcatalyb" cloneof="tcataly">
- <!-- source toseciso
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)[!][CDAC-058500 2].cue" size="303" crc="c4f7a35c" />
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)(Track 1 of 2)[!][CDAC-058500 2].iso" size="494372864" crc="f7690975" />
- <rom name="Tomcat Alley (1994)(Sega)(NTSC)(US)(Track 2 of 2)[!][CDAC-058500 2].wav" size="1985132" crc="3d2414bc" />
+ <!--
+ This game was developed for the Sega Mega-CD system by Cryo and was set for release in March 1995.
+ It was however scrapped before it was published. In the 2000s, Good Deal Games released a set of
+ reproduction discs based off a prototype build. This is a dump from one of those reproduction
+ discs.
+ -->
+ <software name="timecop">
+ <!-- Source: TOSEC-ISO
+ <rom name="Timecop (2007)(Good Deal Games)(NTSC)(US)(Track 1 of 2)[!][unreleased beta].iso" size="4456448" crc="f8e33f6e" md5="864e2e7a753e537f0e5af3f541a9190a" sha1="4aa77d396ba03ea713d2919d849be86ebe90f080"/>
+ <rom name="Timecop (2007)(Good Deal Games)(NTSC)(US)(Track 2 of 2)[!][unreleased beta].wav" size="13088924" crc="6ca3b180" md5="0b5d13d7a30ac7455fe740a47b6d36bf" sha1="63279a793dae15ec41f06d17b60386eb6b36c21e"/>
+ <rom name="Timecop (2007)(Good Deal Games)(NTSC)(US)[!][unreleased beta].cue" size="319" crc="586ff418" md5="ae38e45bbb2e631ea9165feee5562bde" sha1="622be6b138e1723e20910ddc911165ad3eab93eb"/>
-->
- <description>Tomcat Alley (USA, CDAC-058500 2)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4429"/>
- <info name="ring_code" value="CDAC-058500 2"/>
+ <description>Timecop (USA, Prototype)</description>
+ <year>200?</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="tomcat alley (1994)(sega)(ntsc)(us)[!][cdac-058500 2]" sha1="3ad60a7632efd690f4e9f4773409bde849c1cb3b"/>
+ <disk name="timecop (usa, prototype)" sha1="8b002f1767595cbc2a753114574ba3487d5a0011"/>
</diskarea>
</part>
</software>
<software name="trivial">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Trivial Pursuit - Interactive Multimedia Game (1995)(Virgin)(NTSC)(US)[!].cue" size="343" crc="7ba95ac3" />
<rom name="Trivial Pursuit - Interactive Multimedia Game (1995)(Virgin)(NTSC)(US)(Track 1 of 2)[!].iso" size="416874496" crc="1d91ab9d" />
<rom name="Trivial Pursuit - Interactive Multimedia Game (1995)(Virgin)(NTSC)(US)(Track 2 of 2)[!].wav" size="5237948" crc="51e62648" />
-->
- <description>Trivial Pursuit - Interactive Multimedia Game (USA)</description>
- <year>1995</year>
- <publisher>Virgin Interactive</publisher>
+ <description>Trivial Pursuit (USA)</description>
+ <year>1993</year>
+ <publisher>Parker Brothers</publisher>
<info name="serial" value="T-89015"/>
+ <info name="alt_title" value="Trivial Pursuit - Interactive Multimedia Game (Box)" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="trivial pursuit - interactive multimedia game (1995)(virgin)(ntsc)(us)[!]" sha1="2e23b0b05b67fe4f30286448f030a391b9da9e9b"/>
+ <disk name="trivial pursuit (usa)" sha1="2e23b0b05b67fe4f30286448f030a391b9da9e9b"/>
</diskarea>
</part>
</software>
+ <!-- This game was only found bundled in a so called "Double Deal"-pack together with Microcosm. They did not share discs. -->
<software name="prime">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Ultraverse Prime (1994)(Sony Imagesoft)(NTSC)(US)[!].cue" size="2405" crc="77e4ce3a" />
<rom name="Ultraverse Prime (1994)(Sony Imagesoft)(NTSC)(US)(Track 01 of 16)[!].iso" size="51888128" crc="704e3f06" />
<rom name="Ultraverse Prime (1994)(Sony Imagesoft)(NTSC)(US)(Track 02 of 16)[!].wav" size="75743852" crc="af322acc" />
@@ -3904,15 +5129,33 @@
<description>Ultraverse Prime (USA)</description>
<year>1994</year>
<publisher>Sony Imagesoft</publisher>
+ <info name="serial" value="T-93325"/>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="ultraverse prime (usa)" sha1="7da5a30679f6ba40a46cd1c5fceb86d6c5541859"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="virtvcr">
+ <!-- Source: TOSEC-ISO
+ <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)[!].cue" size="371" crc="8220807b" />
+ <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)(Track 1 of 2)[!].iso" size="142809088" crc="4cb16b03" />
+ <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)(Track 2 of 2)[!].wav" size="1874588" crc="b2357e36" />
+ -->
+ <description>Virtual VCR - The Colors of Modern Rock (USA)</description>
+ <year>1993</year>
+ <publisher>Sega / Warner Custom Music</publisher>
+ <info name="serial" value="WCM-9302-00"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="ultraverse prime (1994)(sony imagesoft)(ntsc)(us)[!]" sha1="7da5a30679f6ba40a46cd1c5fceb86d6c5541859"/>
+ <disk name="virtual vcr - the colors of modern rock (usa)" sha1="1f45476a265c3c1e60c523930d51dd0beff6f282"/>
</diskarea>
</part>
</software>
<software name="wildwood">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Wild Woody (1995)(Sega)(NTSC)(US)[!].cue" size="2551" crc="e9366478" />
<rom name="Wild Woody (1995)(Sega)(NTSC)(US)(Track 01 of 19)[!].iso" size="141881344" crc="fadb0a81" />
<rom name="Wild Woody (1995)(Sega)(NTSC)(US)(Track 02 of 19)[!].wav" size="21930092" crc="0de954e8" />
@@ -3940,51 +5183,13 @@
<info name="serial" value="4440"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="wild woody (1995)(sega)(ntsc)(us)[!]" sha1="b19502ae521af64339377d78a8e1d44c9dee7217"/>
- </diskarea>
- </part>
- </software>
-
- <software name="wingcomm">
- <!-- source toseciso
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)[!].cue" size="887" crc="3192f6b4" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 1 of 6)[!].iso" size="335581184" crc="34c63c00" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 2 of 6)[!].wav" size="20408348" crc="897c293d" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 3 of 6)[!].wav" size="6465692" crc="92621e13" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 4 of 6)[!].wav" size="5103884" crc="3cf8e38c" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 5 of 6)[!].wav" size="6211676" crc="5fe264ff" />
- <rom name="Wing Commander (1994)(Electronic Arts)(NTSC)(US)(Track 6 of 6)[!].wav" size="30406700" crc="8900f4e0" />
- -->
- <description>Wing Commander (USA)</description>
- <year>1994</year>
- <publisher>Electronic Arts</publisher>
- <info name="serial" value="T-50045"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="wing commander (1994)(electronic arts)(ntsc)(us)[!]" sha1="2aabdcbeac806b230b803b478be7c2a833d81c8a"/>
- </diskarea>
- </part>
- </software>
-
- <software name="wirehead">
- <!-- source toseciso
- <rom name="Wirehead (1995)(Sega)(NTSC)(US)[!].cue" size="265" crc="3f879bc4" />
- <rom name="Wirehead (1995)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="545646592" crc="3661cd0e" />
- <rom name="Wirehead (1995)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="1632332" crc="a6663b7b" />
- -->
- <description>Wirehead (USA)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4437"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="wirehead (1995)(sega)(ntsc)(us)[!]" sha1="61d69a595036c6832e3b58cf53170e2141989234"/>
+ <disk name="wild woody (usa)" sha1="b19502ae521af64339377d78a8e1d44c9dee7217"/>
</diskarea>
</part>
</software>
<software name="wonderdg">
- <!-- source toseciso
+ <!-- Source: TOSEC-ISO
<rom name="Wonder Dog (1992)(JVC)(NTSC)(US)[!].cue" size="2798" crc="d0a927aa" />
<rom name="Wonder Dog (1992)(JVC)(NTSC)(US)(Track 01 of 21)[!].iso" size="28514304" crc="ffcd86c8" />
<rom name="Wonder Dog (1992)(JVC)(NTSC)(US)(Track 02 of 21)[!].wav" size="42966380" crc="f7905bfe" />
@@ -4011,408 +5216,152 @@
<description>Wonder Dog (USA)</description>
<year>1992</year>
<publisher>JVC</publisher>
- <info name="serial" value="T-60074"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="wonder dog (1992)(jvc)(ntsc)(us)[!]" sha1="dbb8d538de584c38f0d0217777d091b593e27999"/>
- </diskarea>
- </part>
- </software>
-
- <software name="wcup94">
- <!-- source toseciso
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)[!].cue" size="2687" crc="1153ac94" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 01 of 18)[!].iso" size="112560128" crc="58b5862a" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 02 of 18)[!].wav" size="23839916" crc="2ab158e7" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 03 of 18)[!].wav" size="33765356" crc="dc507348" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 04 of 18)[!].wav" size="32530556" crc="3440541e" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 05 of 18)[!].wav" size="33586604" crc="10eb56cd" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 06 of 18)[!].wav" size="40659068" crc="6e99988a" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 07 of 18)[!].wav" size="33934700" crc="f5537929" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 08 of 18)[!].wav" size="32528204" crc="7e20c30f" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 09 of 18)[!].wav" size="25749740" crc="ab4db0bb" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 10 of 18)[!].wav" size="35233004" crc="37bc793b" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 11 of 18)[!].wav" size="23030828" crc="f80c949d" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 12 of 18)[!].wav" size="19201772" crc="e455a562" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 13 of 18)[!].wav" size="33120908" crc="c0c34f99" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 14 of 18)[!].wav" size="16979132" crc="47ca18cd" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 15 of 18)[!].wav" size="27299708" crc="e69c00a0" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 16 of 18)[!].wav" size="33967628" crc="8e1cd5a7" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 17 of 18)[!].wav" size="36674780" crc="51cbe26e" />
- <rom name="World Cup USA 94 (1993)(U.S. Gold)(NTSC)(US)(M8)(Track 18 of 18)[!].wav" size="29853980" crc="abfe80fd" />
- -->
- <description>World Cup USA 94 (USA)</description>
- <year>1993</year>
- <publisher>U.S. Gold</publisher>
- <info name="serial" value="T-79025"/>
+ <info name="serial" value="T-6402"/>
+ <info name="release" value="199211xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="world cup usa 94 (1993)(u.s. gold)(ntsc)(us)(m8)[!]" sha1="b346a7e7189b458eeabfa5c8b30fcc58126c2f88"/>
+ <disk name="wonder dog (usa)" sha1="dbb8d538de584c38f0d0217777d091b593e27999"/>
</diskarea>
</part>
</software>
- <software name="ragecage">
- <!-- source toseciso
- <rom name="WWF Rage in the Cage (1993)(Arena)(NTSC)(US)[!][SEGAT81015 R1D].cue" size="323" crc="447380ea" />
- <rom name="WWF Rage in the Cage (1993)(Arena)(NTSC)(US)(Track 1 of 2)[!][SEGAT81015 R1D].iso" size="212832256" crc="4bd0c45e" />
- <rom name="WWF Rage in the Cage (1993)(Arena)(NTSC)(US)(Track 2 of 2)[!][SEGAT81015 R1D].wav" size="3532748" crc="9ee553a0" />
- -->
- <description>WWF Rage in the Cage (USA)</description>
- <year>1993</year>
- <publisher>Arena</publisher>
- <info name="serial" value="T-81015"/>
- <info name="ring_code" value="SEGAT81015 R1D"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="wwf rage in the cage (1993)(arena)(ntsc)(us)[!][segat81015 r1d]" sha1="17d1690befd2f6ed73fea8022016ae02273892cf"/>
- </diskarea>
- </part>
- </software>
+ <!-- The following images have been sourced from various other sources because no "better" dumps are known to exist. -->
- <software name="comptons">
- <!-- source toseciso
- <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)[!][JVC X'Eye].cue" size="379" crc="989f6666" />
- <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)(Track 1 of 2)[!][JVC X'Eye].iso" size="331114496" crc="2dfc3acf" />
- <rom name="Compton's Interactive Encyclopedia v2.10 (1994)(Compton's NewMedia)(NTSC)(US)(Track 2 of 2)[!][JVC X'Eye].wav" size="2410844" crc="a5a98467" />
- -->
- <description>Compton's Interactive Encyclopedia v2.10 (USA)</description>
- <year>1994</year>
- <publisher>Compton's NewMedia</publisher>
- <info name="serial" value="T-118025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="compton's interactive encyclopedia v2.10 (1994)(compton's newmedia)(ntsc)(us)[!][jvc x'eye]" sha1="07568afaf31544942d9304fe1d0e6b70684de0d1"/>
- </diskarea>
- </part>
- </software>
-
- <software name="comptonsa" cloneof="comptons">
- <!-- source toseciso
- <rom name="Compton's Interactive Encyclopedia v2.01R (1994)(Compton's NewMedia)(NTSC)(US)[!].cue" size="359" crc="7ba74575" />
- <rom name="Compton's Interactive Encyclopedia v2.01R (1994)(Compton's NewMedia)(NTSC)(US)(Track 1 of 2)[!].iso" size="331114496" crc="92c80414" />
- <rom name="Compton's Interactive Encyclopedia v2.01R (1994)(Compton's NewMedia)(NTSC)(US)(Track 2 of 2)[!].wav" size="2410844" crc="f7092f86" />
- -->
- <description>Compton's Interactive Encyclopedia v2.01R (USA)</description>
+ <software name="bcracers">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\BC Racers (1994)(Time Warner Interactive)(US).ccd" size="2990" crc="75ef5a02" md5="6d65d70b42192358761a2ad4cdd9a31e" sha1="64317ace80a4c67052a6f6174dafd1f86fd01a84"/>
+ <rom name="Media (CD-ROM)\BC Racers (1994)(Time Warner Interactive)(US).img" size="480673536" crc="5a313588" md5="5b537f47d1b36755e2fd7cda042fee04" sha1="a3233561fb73248e3cc09b542ce045b4b15a5a4a"/>
+ <rom name="Media (CD-ROM)\BC Racers (1994)(Time Warner Interactive)(US).sub" size="19619328" crc="ec7a4537" md5="1c1ffbdeeb5ca4644036544ede3bb7df" sha1="073b4e227275b69fb97d3d4add8f2b5f162d80ac"/>
+ -->
+ <description>BC Racers (USA)</description>
<year>1994</year>
- <publisher>Compton's NewMedia</publisher>
- <info name="serial" value="T-118025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="compton's interactive encyclopedia v2.01r (1994)(compton's newmedia)(ntsc)(us)[!]" sha1="b765e77367f710ab2829492eb888a0d883f4e6bf"/>
- </diskarea>
- </part>
- </software>
-
- <software name="dlaird" cloneof="dlair">
- <!-- source toseciso
- <rom name="Dragon's Lair - Demo CD (1993)(ReadySoft)(NTSC)(US).cue" size="140" crc="186a5613" />
- <rom name="Dragon's Lair - Demo CD (1993)(ReadySoft)(NTSC)(US).iso" size="12802048" crc="22189e3c" />
- -->
- <description>Dragon's Lair (USA, Demo CD)</description>
- <year>1993</year>
- <publisher>ReadySoft</publisher>
+ <publisher>Core Design</publisher>
+ <info name="release" value="199412xx" />
+ <info name="serial" value="T-115075"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="dragon's lair - demo cd (1993)(readysoft)(ntsc)(us)" sha1="d96e5388a727dcb7fa948b38d275e1a42c752a36"/>
+ <disk name="bc racers (usa)" sha1="b60b60c6fccc892bf9bf4ebc876b78da10182350"/>
</diskarea>
</part>
</software>
- <software name="hothits">
- <description>Hot Hits - Adventurous New Music Sampler (USA) [CD-Audio]</description>
+ <!-- Sourced from the hiddenpalace forums - http://hiddenpalace.org/forums/viewtopic.php?t=2880 -->
+ <!-- Marked as bad dump as it's an MP3-based dump -->
+ <software name="blackhp" cloneof="blackh">
+ <description>Blackhole Assault (USA, Prototype 19920210)</description>
<year>1992</year>
<publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="hot hits - adventurous new music sampler (1992)(sega)(us)[!][cd-audio]" sha1="0a83a39a37faf3f7338d7926ac3e22471319a433"/>
+ <disk name="blackhole assault (usa, prototype 19920210)" sha1="57b0d81a327f6f3aadae1ca477566a602781ff23" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="inxs">
- <!-- source toseciso
- <rom name="INXS (1992)(Sega)(NTSC)(US)[!].cue" size="257" crc="800b4eb4" />
- <rom name="INXS (1992)(Sega)(NTSC)(US)(Track 1 of 2)[!].iso" size="439228416" crc="dee3c121" />
- <rom name="INXS (1992)(Sega)(NTSC)(US)(Track 2 of 2)[!].wav" size="1528844" crc="c72f6465" />
- -->
- <description>INXS (USA)</description>
- <year>1992</year>
+ <!--
+ This is an early prototype of Sonic the Hedgehog CD, often called the 510 prototype
+ because it's from the 10th of May, 1993. It's sourced from a group of Sonic fans
+ calling themselves Sega Extreme.
+ -->
+ <!-- Marked as bad dump as it's an MP3-based dump. -->
+ <software name="soniccd510" cloneof="soniccd">
+ <description>CD Sonic the Hedgehog (USA, Prototype 19930510)</description>
+ <year>1993</year>
<publisher>Sega</publisher>
- <info name="serial" value="4902"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="inxs (1992)(sega)(ntsc)(us)[!]" sha1="2370215eabf6fa7190c39f74f3365d7af6fe2a48"/>
+ <disk name="cd sonic the hedgehog (usa, prototype 19930510)" sha1="a4678b0879fcd42de426ae48bea90214058731e0" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="kidssite">
- <!-- source toseciso
- <rom name="Kids on Site (1994)(Digital Pictures)(NTSC)(US)[!].cue" size="297" crc="d143f0e4" />
- <rom name="Kids on Site (1994)(Digital Pictures)(NTSC)(US)(Track 1 of 2)[!].iso" size="449316864" crc="a5a6ce0f" />
- <rom name="Kids on Site (1994)(Digital Pictures)(NTSC)(US)(Track 2 of 2)[!].wav" size="2119196" crc="e4edf1fe" />
+ <software name="champs94">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Championship Soccer &apos;94 (1994)(Sony Imagesoft)(US).ccd" size="15559" crc="2a045e57" md5="1a7ed3eae49fd8d150e683d5763c8bfe" sha1="9b184230999074191e5030a13b39893cbc005205"/>
+ <rom name="Media (CD-ROM)\Championship Soccer &apos;94 (1994)(Sony Imagesoft)(US).img" size="344854944" crc="b11061b6" md5="83afac7f6886c1b77e1557d95b924983" sha1="dc7cc40fce9de63cfe96e6f8c44ac6e384b7b467"/>
+ <rom name="Media (CD-ROM)\Championship Soccer &apos;94 (1994)(Sony Imagesoft)(US).sub" size="14075712" crc="9f351d63" md5="780a4d479e107f07f4743e1cbeb23f6e" sha1="338bdaa774c897cbf2a6602fd3cbf6a6f9e3ba15"/>
-->
- <description>Kids on Site (USA)</description>
+ <description>Championship Soccer '94 (USA)</description>
<year>1994</year>
- <publisher>Digital Pictures</publisher>
- <info name="serial" value="T-162015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="kids on site (1994)(sega club)(ntsc)(us)[!]" sha1="b992b67b1e3e4bce2cd13e8756fdacea23709e4a"/>
- </diskarea>
- </part>
- </software>
-
- <software name="kriskros">
- <!-- source toseciso
- <rom name="Kris Kross (1992)(Sony Imagesoft)(NTSC)(US)[!].cue" size="135" crc="c958c6ce" />
- <rom name="Kris Kross (1992)(Sony Imagesoft)(NTSC)(US)[!].iso" size="335626240" crc="af0beabc" />
- -->
- <description>Kris Kross (USA)</description>
- <year>1992</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="SCD-J2620"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="kris kross (1992)(sony imagesoft)(ntsc)(us)[!]" sha1="1bfbe435dcb3c4b7e892f6fdcf19d08015a01933"/>
- </diskarea>
- </part>
- </software>
-
- <software name="marky">
- <!-- source toseciso
- <rom name="Marky Mark and The Funky Bunch (1992)(Sega)(NTSC)(US)[!].cue" size="145" crc="649b6eb3" />
- <rom name="Marky Mark and The Funky Bunch (1992)(Sega)(NTSC)(US)[!].iso" size="482007040" crc="1ff62043" />
- -->
- <description>Marky Mark and The Funky Bunch (USA)</description>
- <year>1992</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4901"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="marky mark and the funky bunch (1992)(sega)(ntsc)(us)[!]" sha1="43371912dc0bf83158ec383bbc4cf2b4b9e60274"/>
- </diskarea>
- </part>
- </software>
-
- <software name="ccmusic">
- <!-- source toseciso
- <rom name="Power Factory featuring C+C Music Factory (1993)(Sony Imagesoft)(NTSC)(US)[!].cue" size="166" crc="3eaf3f54" />
- <rom name="Power Factory featuring C+C Music Factory (1993)(Sony Imagesoft)(NTSC)(US)[!].iso" size="374863872" crc="3cd44c0a" />
- -->
- <description>Power Factory featuring C+C Music Factory (USA)</description>
- <year>1993</year>
<publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93035"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="power factory featuring c+c music factory (1993)(sony imagesoft)(ntsc)(us)[!]" sha1="2fbb157ab695769d9dc11a9f56605934ad684a4c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="animals">
- <!-- source toseciso
- <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)[!].cue" size="425" crc="a45c87f3" />
- <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)(Track 1 of 2)[!].iso" size="605767680" crc="c5dc6cff" />
- <rom name="San Diego Zoo Presents... The Animals!, The - A True Multimedia Experience (1992)(Software Toolworks)(NTSC)(US)(Track 2 of 2)[!].wav" size="1168988" crc="37bbe730" />
- -->
- <description>The San Diego Zoo Presents... The Animals! (USA)</description>
- <year>1992</year>
- <publisher>Software Toolworks</publisher>
- <info name="serial" value="T-87015"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="san diego zoo presents... the animals!, the (1992)(software toolworks)(ntsc)(us)[!]" sha1="88f7be68f35e5dd7776b3ff580ae40ce7087151b"/>
- </diskarea>
- </part>
- </software>
-
- <software name="spaceaced" cloneof="spaceace">
- <!-- source toseciso
- <rom name="Space Ace - Demo Disc (1994)(ReadySoft)(NTSC)(US).cue" size="138" crc="b931b4d1" />
- <rom name="Space Ace - Demo Disc (1994)(ReadySoft)(NTSC)(US).iso" size="8802304" crc="884f4f1f" />
- -->
- <description>Space Ace (USA, Demo Disc)</description>
- <year>1994</year>
- <publisher>ReadySoft</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="space ace - demo disc (1994)(readysoft)(ntsc)(us)" sha1="a2c36f02bab608baca10bf8d4e6b450cab49715c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="virtvcr">
- <!-- source toseciso
- <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)[!].cue" size="371" crc="8220807b" />
- <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)(Track 1 of 2)[!].iso" size="142809088" crc="4cb16b03" />
- <rom name="Virtual VCR - The Colors of Modern Rock (1993)(Sega - Warner Custom Music)(NTSC)(US)(Track 2 of 2)[!].wav" size="1874588" crc="b2357e36" />
- -->
- <description>Virtual VCR - The Colors of Modern Rock (USA)</description>
- <year>1993</year>
- <publisher>Sega - Warner Custom Music</publisher>
+ <info name="serial" value="T-93185"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="virtual vcr - the colors of modern rock (1993)(sega - warner custom music)(ntsc)(us)[!]" sha1="1f45476a265c3c1e60c523930d51dd0beff6f282"/>
+ <disk name="championship soccer '94 (usa)" sha1="314522011b559b18082a1c867de1ace574a4a680"/>
</diskarea>
</part>
</software>
-
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
- <!-- **************************************************************************************************************************************************** -->
-
- <!-- Images below are miscellaneous dumps where no better dumps are known to exist -->
- <!-- Some of these have been sourced from MP3 based rips, and are thus tagged as BAD_DUMP -->
-
- <software name="bariarm">
- <!-- Unknown source
- <rom name="android_assault_-_sega_CD_T-163015-00.cue" size="1253" crc="0503be31" />
- <rom name="android_assault_-_sega_CD_T-163015-00.bin" size="362210352" crc="468cf3e8" />
- -->
- <!-- Ringcode: T-163015-00 - Alt. Title: Android Assault - The Revenge of Bari-Arm -->
- <description>Bari-Arm (USA)</description>
- <year>1994</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4405"/>
+<!--
+ <software name="colrmech">
+ <description>Color Mechanica (USA)</description>
+ <year>2013</year>
+ <publisher>&lt;unlicensed&gt;</publisher>
+ <info name="release" value="20131227" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="android_assault_-_sega_cd_t-163015-00" sha1="c5c104993fd2822cad89a083b1188d9762fcbadf"/>
+ <disk name="color mechanica (usa)" status="nodump"/>
</diskarea>
</part>
</software>
+-->
- <software name="ax101">
- <!-- Unknown source
- <rom name="AX-101 (1994)(Absolute Entertainment)(NTSC)(US)[SEGAT86015RE R1J].cue" size="216" crc="60a77adf" />
- <rom name="AX-101 (1994)(Absolute Entertainment)(NTSC)(US)[SEGAT86015RE R1J].bin" size="630427728" crc="7ea998e8" />
- -->
- <description>AX-101 (USA)</description>
+ <!-- This was exclusively bundled with the JVC X'Eye console -->
+<!--
+ <software name="comptons200s" cloneof="comptons">
+ <description>Compton's Interactive Encyclopedia v2.00S (USA)</description>
<year>1994</year>
- <publisher>Absolute Entertainment</publisher>
- <info name="serial" value="T-86015"/>
- <info name="ring_code" value="SEGAT86015RE R1J"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="ax-101 (1994)(absolute entertainment)(ntsc)(us)[segat86015re r1j]" sha1="a0b60c2c8d90371e2e4e164aa392a2457ba9262f"/>
- </diskarea>
- </part>
- </software>
-
- <software name="bcracers">
- <!-- Unknown source
- <rom name="BC_Racers(US-Genesis).cue" size="981" crc="44573c41" />
- <rom name="BC_Racers(US-Genesis).bin" size="480320736" crc="d323435a" />
- -->
- <description>BC Racers (USA)</description>
- <year>1995</year>
- <publisher>Core Design</publisher>
- <info name="serial" value="T-115075"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="bc_racers(us)" sha1="44a2214465c5da33d80d7aa3d93e8efffdde4523"/>
- </diskarea>
- </part>
- </software>
-
- <software name="blackhp" cloneof="blackh">
- <description>Blackhole Assault (USA, Prototype 1002) [MP3-sourced]</description>
- <year>19??</year>
- <publisher>Sega</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="blackholebeta1002 (mp3-sourced)" sha1="57b0d81a327f6f3aadae1ca477566a602781ff23" status="baddump"/>
- </diskarea>
- </part>
- </software>
-
- <software name="bugblast">
- <description>Bug Blasters (USA)</description>
- <year>2003</year>
- <publisher>Good Deal Games</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="bug blasters" sha1="dc6e42763e4729ceef2694d1af2c0b6a2d7a782c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="frcestrk">
- <!-- Alt. Title: Burning Fists - Force Striker (Box) -->
- <description>Force Striker (USA)</description>
- <year>2006</year>
- <publisher>Good Deal Games</publisher>
+ <publisher>Compton's NewMedia</publisher>
+ <info name="serial" value="T-118025"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="burning fists - force striker" sha1="78d766e286bbc9fcb5c7be8c5c27f1463c0021e6"/>
+ <disk name="compton's interactive encyclopedia v2.00s (usa)" status="nodump"/>
</diskarea>
</part>
</software>
+-->
- <software name="champs94">
- <!-- Unknown source
- <rom name="Championship Soccer '94 (1994)(Sony Imagesoft)(NTSC)(US)[CDAC-068200 1].cue" size="6128" crc="41e9637d" />
- <rom name="Championship Soccer '94 (1994)(Sony Imagesoft)(NTSC)(US)[CDAC-068200 1].bin" size="344502144" crc="0e409c1f" />
+ <!-- This was exclusively bundled with the JVC X'Eye console -->
+ <software name="comptons201s" cloneof="comptons">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Compton&apos;s Interactive Encyclopedia (Bundled with JVC X&apos;Eye RG-M10BU) (1994)(Compton&apos;s NewMedia)(US) - [05041994].ccd" size="932" crc="bb889eac" md5="f4533ef4fe6e085fb014f7dd699301e1" sha1="1958362b0de44c13f353ef71975d7b4f25fd2b2f"/>
+ <rom name="Media (CD-ROM)\Compton&apos;s Interactive Encyclopedia (Bundled with JVC X&apos;Eye RG-M10BU) (1994)(Compton&apos;s NewMedia)(US) - [05041994].img" size="222993120" crc="9ba98ddd" md5="231f593dd27b48d83f0337f2e3b37332" sha1="1d9c41457269c14ca4e6f5090c1554849adf13bd"/>
+ <rom name="Media (CD-ROM)\Compton&apos;s Interactive Encyclopedia (Bundled with JVC X&apos;Eye RG-M10BU) (1994)(Compton&apos;s NewMedia)(US) - [05041994].sub" size="9101760" crc="e665f137" md5="9eaec9dee3dd0097fecc59ea9f71a23a" sha1="6f21fb451e36064d4310a584688226b10a2c775f"/>
-->
- <description>Championship Soccer '94 (USA)</description>
+ <description>Compton's Interactive Encyclopedia v2.01S (USA)</description>
<year>1994</year>
- <publisher>Sony Imagesoft</publisher>
- <info name="serial" value="T-93185"/>
- <info name="ring_code" value="CDAC-068200 1"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="championship soccer '94 (1994)(sony imagesoft)(ntsc)(us)[cdac-068200 1]" sha1="f71281170fbdc7b8eda13414dfdcdd9a7224e0b3"/>
- </diskarea>
- </part>
- </software>
-
- <software name="citizenx">
- <!-- Unknown source
- <rom name="Citizen X Beta (2002)(Good Deal Games - Oldergames)(NTSC)(US)[!][unreleased beta].cue" size="170" crc="71c85c20" />
- <rom name="Citizen X Beta (2002)(Good Deal Games - Oldergames)(NTSC)(US)[!][unreleased beta].iso" size="329457664" crc="36c21367" />
- -->
- <description>Citizen X</description>
- <year>2002</year>
- <publisher>Good Deal Games</publisher>
+ <publisher>Compton's NewMedia</publisher>
+ <info name="serial" value="T-118025"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="citizen x" sha1="8264c6175e61475cdd8bab342251c36162d37c0a"/>
+ <disk name="compton's interactive encyclopedia v2.01s (usa)" sha1="79ca6bb38c296ac3cc6352823be337371ad7a396" />
</diskarea>
</part>
</software>
<software name="cpatrol">
- <!-- Unknown source
- <rom name="CRIMEPATROL.CUE" size="139" crc="5705c8a3" />
- <rom name="CRIMEPATROL.BIN" size="282661008" crc="16da07cc" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Crime Patrol (1994)(American Laser Games)(US).ccd" size="935" crc="7933aeee" md5="a277484e7b59d61dc88eace77c786fb9" sha1="d3372533a744e57b88d374b760a6411f8aec4eae"/>
+ <rom name="Media (CD-ROM)\Crime Patrol (1994)(American Laser Games)(US).img" size="282661008" crc="19476f80" md5="4438092b9d5208651f827a438104250a" sha1="cfbb47d3546733e26ec3a87992f5943454d0928e"/>
+ <rom name="Media (CD-ROM)\Crime Patrol (1994)(American Laser Games)(US).sub" size="11537184" crc="6b1d8986" md5="3e66857aa2719b4770db467cdc67db83" sha1="e569e999d1ba97581a92faeadfa2424c9a102ea7"/>
-->
<description>Crime Patrol (USA)</description>
<year>1994</year>
<publisher>American Laser Games</publisher>
<info name="serial" value="T-111055"/>
<part name="cdrom" interface="scd_cdrom">
+ <feature name="peripheral" value="menacer" />
<diskarea name="cdrom">
- <disk name="crimepatrol" sha1="5065fec20ca6b95bc2cd10fccf5b8db373d1501f"/>
+ <disk name="crime patrol (usa)" sha1="544f2ac30e49c141d5a185a30c80b2ee51f12fd1"/>
</diskarea>
</part>
</software>
<software name="demoman">
- <!-- Unknown source
- <rom name="Demolition Man (U).cue" size="679" crc="d08eafa7" />
- <rom name="Demolition Man (U).bin" size="366314592" crc="426b8d81" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Demolition Man (1995)(Acclaim)(US).ccd" size="2961" crc="aa21d448" md5="a4b90f832a33ee61cb7426a3b691a8e9" sha1="084aad5911a4357afd07e93d87144f61774e3a7e"/>
+ <rom name="Media (CD-ROM)\Demolition Man (1995)(Acclaim)(US).img" size="366667392" crc="0812d166" md5="722dd3adbadf72534fa9bf0652fa7b72" sha1="f31445e2c51b0deaa0b975586c7d2c9f16f46868"/>
+ <rom name="Media (CD-ROM)\Demolition Man (1995)(Acclaim)(US).sub" size="14966016" crc="d31dbe78" md5="9d16994cd51dce678d0bc5c87db26354" sha1="3e9e7455924ade67d1268061442dcafa9fb15894"/>
-->
<description>Demolition Man (USA)</description>
<year>1994</year>
@@ -4420,31 +5369,16 @@
<info name="serial" value="T-81045"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="demolition man (u)" sha1="5296e1230c35ad282dbde2447cf91eedf54a228e"/>
- </diskarea>
- </part>
- </software>
-
- <software name="dungexpl">
- <!-- Unknown source
- <rom name="Dungeon Explorer (U).cue" size="599" crc="d424a8c1" />
- <rom name="Dungeon Explorer (U).bin" size="469099344" crc="3036fe50" />
- -->
- <description>Dungeon Explorer (USA)</description>
- <year>1995</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4657"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="dungeon explorer (u)" sha1="36f7f2d65c88e4a7c61bc4c18ef8cc429973229b"/>
+ <disk name="demolition man (usa)" sha1="5d7a96692fe79c8a1f6105c208bd60ced82d6014"/>
</diskarea>
</part>
</software>
<software name="ejimse">
- <!-- Unknown source
- <rom name="Earthworm Jim - Special Edition (Sega CD) (U).cue" size="2005" crc="eb0f7e53" />
- <rom name="Earthworm Jim - Special Edition (Sega CD) (U).bin" size="394590336" crc="fa170eca" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Earthworm Jim - Special Edition (1995)(Interplay)(US).ccd" size="5027" crc="8234d2f5" md5="7430bca1fc11bd9459f134b1bd533874" sha1="9df046ce244e32f40eaf72984155753d25519fff"/>
+ <rom name="Media (CD-ROM)\Earthworm Jim - Special Edition (1995)(Interplay)(US).img" size="394590336" crc="77bff6db" md5="6fa005832adc7c5eaa63259355f0cd95" sha1="689b87d1e472813114dca75c04c76fdee769e14d"/>
+ <rom name="Media (CD-ROM)\Earthworm Jim - Special Edition (1995)(Interplay)(US).sub" size="16105728" crc="405a8f44" md5="e8c0c79a0f872b3f1873aebf8550a4d1" sha1="6e89eb944d442614f77f3f72f0eb6168eeb71625"/>
-->
<description>Earthworm Jim - Special Edition (USA)</description>
<year>1995</year>
@@ -4452,31 +5386,33 @@
<info name="serial" value="T-125045"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="earthworm jim - special edition (sega cd) (u)" sha1="d688a82849e1cf116b1a819843df9322aa86630d"/>
+ <disk name="earthworm jim - special edition (usa)" sha1="0f7052a3c22367e7c5e0f857254849ffee9c941b"/>
</diskarea>
</part>
</software>
<software name="espnnba">
- <!-- Unknown source
- <rom name="ESPN NBA Hang Time '95 (U).cue" size="1015" crc="69f92ad9" />
- <rom name="ESPN NBA Hang Time '95 (U).bin" size="558425952" crc="1969b96a" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\ESPN NBA Hangtime &apos;95 (1994)(Sony Imagesoft)(US).ccd" size="4237" crc="7a3908b9" md5="83e51cf8925a8c045d9286b84efbf274" sha1="20af00c238ce125e9680b3069e92f99abc85546b"/>
+ <rom name="Media (CD-ROM)\ESPN NBA Hangtime &apos;95 (1994)(Sony Imagesoft)(US).img" size="558778752" crc="9f857619" md5="ead59a34c04d6fb88edd887079cddd11" sha1="3bb97d23d7912033a211413f0e5f9c1dcfda4083"/>
+ <rom name="Media (CD-ROM)\ESPN NBA Hangtime &apos;95 (1994)(Sony Imagesoft)(US).sub" size="22807296" crc="0dba541d" md5="b131512c56eca28f255098e47124a7e4" sha1="66ec4fc8de2b0b83017e107f09171245eb4fec2f"/>
-->
- <description>ESPN NBA Hang Time '95 (USA)</description>
+ <description>ESPN NBA Hangtime '95 (USA)</description>
<year>1994</year>
<publisher>Sony Imagesoft</publisher>
<info name="serial" value="T-93245 "/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="espn nba hang time '95 (u)" sha1="3f1805832a1818ecd749e0cc8bac596288410f34"/>
+ <disk name="espn nba hangtime '95 (usa)" sha1="86f1f4ee8da0f04109cf20b6b8ad455900562abe"/>
</diskarea>
</part>
</software>
<software name="fatfursp">
- <!-- Unknown source
- <rom name="Fatal Fury Special (U).cue" size="2454" crc="ff3f0c12" />
- <rom name="Fatal Fury Special (U).bin" size="517141296" crc="360a90a9" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Fatal Fury Special (1995)(JVC)(US).ccd" size="6615" crc="d05cdeeb" md5="e833dd33c8ba9d22b67585d2d54e4f4b" sha1="2d8a2f1b9d38b87c725fc2ca09cd0d22a40c0ca7"/>
+ <rom name="Media (CD-ROM)\Fatal Fury Special (1995)(JVC)(US).img" size="517494096" crc="e3e5a417" md5="3952e7aed404feeb8457bd8fcef40d41" sha1="b94f21c5836a48f1ff6d7f451c1a3f13968dcb00"/>
+ <rom name="Media (CD-ROM)\Fatal Fury Special (1995)(JVC)(US).sub" size="21122208" crc="8fdc3ee0" md5="d03e98b58ebe7267b3ade06379b70661" sha1="4c7c9a20dd25b7431733f5e5dff8d900f68b4253"/>
-->
<description>Fatal Fury Special (USA)</description>
<year>1995</year>
@@ -4484,26 +5420,29 @@
<info name="serial" value="T-60165"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="fatal fury special (u)" sha1="9be5e6bebd805c57addb98a3fa6c67aabec42757"/>
+ <disk name="fatal fury special (usa)" sha1="07010baf387179950d62efe19745718fd5bc0744"/>
</diskarea>
</part>
</software>
+ <!-- Sourced from the hiddenpalace forums - http://hiddenpalace.org/forums/viewtopic.php?t=2880 -->
+ <!-- Marked as bad dump as it's an MP3-based dump, but possibly it's also a broken dump. -->
<software name="fatfurspp" cloneof="fatfursp">
- <description>Fatal Fury Special (USA, Prototype) [MP3-sourced]</description>
+ <description>Fatal Fury Special (USA, Prototype)</description>
<year>1995</year>
<publisher>JVC</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="fatalfurycdbeta (mp3-sourced)" sha1="f9f8fc41787372a336ccce379c64bf675f7bd82b" status="baddump"/>
+ <disk name="fatal fury special (usa, prototype)" sha1="f9f8fc41787372a336ccce379c64bf675f7bd82b" status="baddump"/>
</diskarea>
</part>
</software>
<software name="flink">
- <!-- Unknown source
- <rom name="Flink (U).cue" size="816" crc="91201b88" />
- <rom name="Flink (U).bin" size="473697504" crc="f5708b8e" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Flink (1994)(Sony Electronic Publishing)(US).ccd" size="3438" crc="a2040ce0" md5="9e0f94509978293f21b9293837d938b8" sha1="398b808949ab2e3e3dc01df4e12d27611dd8d642"/>
+ <rom name="Media (CD-ROM)\Flink (1994)(Sony Electronic Publishing)(US).img" size="474050304" crc="eb91f265" md5="614b74e24afb37fdd80f8f5ff22523e9" sha1="ceebddafa381f51e55c3bc291585dbf4d9a8817d"/>
+ <rom name="Media (CD-ROM)\Flink (1994)(Sony Electronic Publishing)(US).sub" size="19348992" crc="31415da2" md5="824e97f50c0df16d68329b037310a4cc" sha1="e2f71a443eafd9a78c1377cdd4abd657747f6803"/>
-->
<description>Flink (USA)</description>
<year>1994</year>
@@ -4511,332 +5450,382 @@
<info name="serial" value="T-23055"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="flink (u)" sha1="d06479928c94e7117a9f5cf752d23e87d8b18fba"/>
+ <disk name="flink (usa)" sha1="3395bc2c0291f5af9f19ce5ab246c8ff15f6ced3"/>
</diskarea>
</part>
</software>
- <!-- apparently this could be a bad read, but should work with video corruption -->
+ <software name="frogdemo" cloneof="frog">
+ <!-- Source: http://frogfeast.rastersoft.net/SegaCD.html
+ <rom name="Frog.iso" size="411648" crc="d96c1966" />
+ -->
+ <description>Frog Feast (USA, Demo)</description>
+ <year>2007</year>
+ <publisher>RasterSoft</publisher>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="frog feast (usa, demo)" sha1="8411e49c5ef3a39a70d3e1612a04c66e3161eea9"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <!-- Sourced from the hiddenpalace forums - http://hiddenpalace.org/forums/viewtopic.php?t=2880 -->
+ <!-- Marked as bad dump as it's an MP3-based dump, but probably it's also a broken dump. -->
<software name="johnnymn">
<description>Johnny Mnemonic (USA, Prototype)</description>
- <year>19??</year>
+ <year>1995?</year>
<publisher>Sega</publisher>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom1">
- <disk name="johnny1" sha1="bd222aee2d7ebaf9524db3fc3cbc3d9782504d92" status="baddump"/>
+ <disk name="johnny mnemonic (usa, prototype) (disc 1)" sha1="bd222aee2d7ebaf9524db3fc3cbc3d9782504d92" status="baddump"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom2">
- <disk name="johnny2" sha1="e2f626d382b861043fbedddacf948d59cce1f290"/>
+ <disk name="johnny mnemonic (usa, prototype) (disc 2)" sha1="e2f626d382b861043fbedddacf948d59cce1f290" status="baddump"/>
</diskarea>
</part>
</software>
+ <!-- Marked as bad dump as it's an MP3-based dump. -->
<software name="jparkp" cloneof="jpark">
- <description>Jurassic Park (USA, Prototype) [MP3-sourced]</description>
+ <!-- Unknown source -->
+ <description>Jurassic Park (USA, Prototype)</description>
<year>1993?</year>
<publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="jurassicparkbeta (mp3-sourced)" sha1="65e63e6bd734f6eebed6d13ea6bb33627214420d" status="baddump"/>
+ <disk name="jurassic park (usa, prototype)" sha1="65e63e6bd734f6eebed6d13ea6bb33627214420d" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="keio">
- <!-- Unknown source
- <rom name="Keio_Flying_Squadron(US-Genesis).cue" size="1696" crc="74939aa5" />
- <rom name="Keio_Flying_Squadron(US-Genesis).bin" size="557558064" crc="77c4fa1b" />
+ <!--
+ This is strictly not a Sega CD, but an Audio CD bundled together with the JVC X'Eye hardware.
+ It's listed here until it can be properly sorted. It's marked as a bad dump because chdman
+ currently can not handle the CD+G properties of the disc.
+ -->
+ <software name="karaoke">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Karaoke CD G (Bundled with JVC X&apos;Eye RG-M10BU) (1993)(Sega)(US) - [Audio].ccd" size="1561" crc="41c1be6f" md5="7d2415cbf196df0a213f8472a8706d54" sha1="6565b50431b5cb58f766982c7b27c90ec0c6547a"/>
+ <rom name="Media (CD-ROM)\Karaoke CD G (Bundled with JVC X&apos;Eye RG-M10BU) (1993)(Sega)(US) - [Audio].img" size="267269520" crc="68bcd928" md5="2cf5f893b50e29cd304555f43e05f2de" sha1="4e2c95692a880365c1c4303bbae9d0c2f75a2b19"/>
+ <rom name="Media (CD-ROM)\Karaoke CD G (Bundled with JVC X&apos;Eye RG-M10BU) (1993)(Sega)(US) - [Audio].sub" size="10908960" crc="94c105d8" md5="cd08c513c5aa1aaf15a8e3692ce4bca4" sha1="d9236082f1af96cee80a00ad8178d05ad5f42312"/>
-->
- <description>Keio Flying Squadron (USA)</description>
- <year>1994</year>
+ <description>Karaoke - JVC CD+G Karaoke - Top Hit Sampler (USA)</description>
+ <year>1993</year>
<publisher>JVC</publisher>
- <info name="serial" value="T-60185"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="keio_flying_squadron(us)" sha1="f68da083c6bde35b05061fa4441168fa22c2fe33"/>
- </diskarea>
- </part>
- </software>
-
- <!-- is this different to the 'eu-ntsc' copy -->
- <software name="lawnmowra" cloneof="lawnmowr">
- <!-- Unknown source
- <rom name="Lawnmower Man (U).cue" size="145" crc="76b45c9f" />
- <rom name="Lawnmower Man (U).bin" size="615570144" crc="625930e3" />
- -->
- <description>The Lawnmower Man (USA, Alt)</description>
- <year>1994</year>
- <publisher>Time Warner Interactive</publisher>
- <info name="serial" value="T-160015"/>
+ <info name="serial" value="ACDG-GP1"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="lawnmower man (u)" sha1="1b9f4689a231e282d75b3d5fb4f88ef03b06a7ff"/>
+ <disk name="karaoke - jvc cd+g karaoke - top hit sampler (usa)" sha1="e969df346a8106b837b471cc87670b6aab981ec3" status="baddump" />
</diskarea>
</part>
</software>
- <software name="lunar2">
- <!-- Unknown source
- <rom name="Lunar Eternal Blue.cue" size="210" crc="c4ea0464" />
- <rom name="Lunar Eternal Blue.bin" size="584135664" crc="0f898492" />
+ <software name="keio">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Keio Flying Squadron (1994) (US).ccd" size="4734" crc="82f0e093" md5="9c31d390b299d1354ca77ceadd188b13" sha1="2468ae54db4836ced17f2f793661774d195a4e22"/>
+ <rom name="Media (CD-ROM)\Keio Flying Squadron (1994) (US).img" size="557910864" crc="b597d1ad" md5="56ef6addc9746368cd49a96dfdb5a5bf" sha1="fba4a6cc7126cc5fa75dc7909a54377160aad26c"/>
+ <rom name="Media (CD-ROM)\Keio Flying Squadron (1994) (US).sub" size="22771872" crc="2507ed88" md5="290885ff80fc86bad929e5d27804516b" sha1="f98a4f4d06b1f5e6a9ff3f0effb236c4bfea2bc9"/>
-->
- <description>Lunar - Eternal Blue (USA)</description>
+ <description>Keio Flying Squadron (USA)</description>
<year>1995</year>
- <publisher>Working Designs</publisher>
- <info name="serial" value="T-127045"/>
+ <publisher>JVC</publisher>
+ <info name="serial" value="T-60185"/>
+ <info name="release" value="199501xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="lunar eternal blue" sha1="1fefd8ba5ce38eb20f4c71dc00d877eb2c41826e"/>
+ <disk name="keio flying squadron (usa)" sha1="4e47afd43c13ae481dd159fd6e0f2fc4d180a211"/>
</diskarea>
</part>
</software>
<software name="maddog2">
- <!-- Unknown source
- <rom name="Mad Dog II - The Lost Gold (1994)(American Laser Games)(NTSC)(US)[SEGAT111065 R1F].cue" size="233" crc="9ad41639" />
- <rom name="Mad Dog II - The Lost Gold (1994)(American Laser Games)(NTSC)(US)[SEGAT111065 R1F].bin" size="265082160" crc="79461058" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Mad Dog II - The Lost Gold (1995)(American Laser Games)(US).ccd" size="933" crc="72acc415" md5="fea43d6145a158386865b30cfd3b4201" sha1="0d8e24b6a61b78c80f6643f285bb0d49805953c8"/>
+ <rom name="Media (CD-ROM)\Mad Dog II - The Lost Gold (1995)(American Laser Games)(US).img" size="265434960" crc="e91838b8" md5="a5baff7c9153898972a268698e2faef5" sha1="57a3de846fa7556016cae0571e8b3e1947d31fa0"/>
+ <rom name="Media (CD-ROM)\Mad Dog II - The Lost Gold (1995)(American Laser Games)(US).sub" size="10834080" crc="182d8a8d" md5="08584424e369e78694bcc0463ee58784" sha1="e2229f7ec4ad071c63b29952d41e6a6c7d177ef8"/>
-->
<description>Mad Dog II - The Lost Gold (USA)</description>
<year>1994</year>
<publisher>American Laser Games</publisher>
<info name="serial" value="T-111065"/>
- <info name="ring_code" value="SEGAT111065 R1F"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="mad dog ii - the lost gold (1994)(american laser games)(ntsc)(us)[segat111065 r1f]" sha1="e8c61694fab177317b9d89dc50afca02adfb3cc4"/>
+ <disk name="mad dog ii - the lost gold (usa)" sha1="bb599adbb99cfc6fbd667f60429bb1f504af16c6"/>
</diskarea>
</part>
</software>
+<!--
+ <software name="musijpbr">
+ <description>Music from the Sega CD Games - Jurassic Park, Batman Returns (USA)</description>
+ <year>1993</year>
+ <publisher>Sega Multimedia Studio</publisher>
+ <part name="cdrom" interface="scd_cdrom">
+ <diskarea name="cdrom">
+ <disk name="music from the sega cd games - jurassic park, batman returns (usa)" status="nodump"/>
+ </diskarea>
+ </part>
+ </software>
+-->
+
<software name="mypaint">
- <description>My Paint (USA) [MP3-sourced]</description>
- <year>1994</year>
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\My Paint - The Animated Paint Program (1994)(Saddleback Graphics)(US).ccd" size="2200" crc="875860ea" md5="10a674734693eb53c6357bbba348bea6" sha1="25aaa211701aab9f12eb4298ed295b517570dda8"/>
+ <rom name="Media (CD-ROM)\My Paint - The Animated Paint Program (1994)(Saddleback Graphics)(US).img" size="618129120" crc="230b6eb4" md5="2882efcf37028bb0ec08127db027d69e" sha1="cbed6edca283b529a2b7d59941b75bb79be8fd76"/>
+ <rom name="Media (CD-ROM)\My Paint - The Animated Paint Program (1994)(Saddleback Graphics)(US).sub" size="25229760" crc="a5347f81" md5="b2000d87a48dc94f64dfcee04d873421" sha1="c8b900494a304afd98070fd650e4449336f06bef"/>
+ -->
+ <description>My Paint (USA)</description>
+ <year>1993</year>
<publisher>Saddleback Graphics</publisher>
+ <info name="alt_title" value="My Paint - The Animated Paint Program (Box)" />
<info name="serial" value="T-109015"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="my paint (mp3-sourced)" sha1="10742410e81aea3323b7b280ec7d41e8386f83fb" status="baddump"/>
+ <disk name="my paint (usa)" sha1="30917da8038266ad3d76498e3fbe565c4456d602"/>
</diskarea>
</part>
</software>
<software name="nfltriv">
- <!-- Unknown source
- <rom name="NFL Football Trivia Challenge (1994)(CapDisc)(NTSC)(US)[SEGAT135015 R1H].cue" size="223" crc="52fbc690" />
- <rom name="NFL Football Trivia Challenge (1994)(CapDisc)(NTSC)(US)[SEGAT135015 R1H].bin" size="584824800" crc="848753b4" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\NFL Football Trivia Challenge (1993)(CapDisc)(US).ccd" size="935" crc="64a28159" md5="8ec59c5db4b6401984d389a19c1761b3" sha1="e69df89474d95a2f88737d70694a580baa647d98"/>
+ <rom name="Media (CD-ROM)\NFL Football Trivia Challenge (1993)(CapDisc)(US).img" size="585177600" crc="9d15cc46" md5="1430f66fe6c3350218f309bb557f6a7a" sha1="2432ce310abce9abc8820ddcd8faace1fbdc9a76"/>
+ <rom name="Media (CD-ROM)\NFL Football Trivia Challenge (1993)(CapDisc)(US).sub" size="23884800" crc="51af8bf2" md5="0094704a12043836a7dad44528d9258e" sha1="bb5ae163a7484fdec3cc3dd83ddb5edfd20eb375"/>
-->
<description>NFL Football Trivia Challenge (USA)</description>
<year>1994</year>
<publisher>CapDisc</publisher>
<info name="serial" value="T-135015"/>
- <info name="ring_code" value="SEGAT135015 R1H"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="nfl football trivia challenge (1994)(capdisc)(ntsc)(us)[segat135015 r1h]" sha1="426d5e8def59adc5417893d2a695331377e04e26"/>
+ <disk name="nfl football trivia challenge (usa)" sha1="eadf0633891eb5d94dcb0336d367abca750fa903"/>
+ </diskarea>
+ </part>
+ </software>
+
+ <software name="ntrap">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 1 of 2).ccd" size="934" crc="a9d84328" md5="2d6273e67c6602ac5756c3dedabe23ca" sha1="7534eaccfd1977956f36e7492516e0252a111e79"/>
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 1 of 2).img" size="619613232" crc="7cb50000" md5="6061e5642a6070ca6e46269386f4cf06" sha1="53693355efedd1b5afdb24aca323697c860ffd46"/>
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 1 of 2).sub" size="25290336" crc="082ddd18" md5="817f0931fd0ef662324855b2a0e3e653" sha1="3fb15cf5348046064af278ec9ba9c3c4574ee5ed"/>
+
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 2 of 2).ccd" size="934" crc="4f300e66" md5="23b157e5b11458cfa5578064424b58fd" sha1="349e3e2099a12877e675a24ec3ea77833dd0b0ce"/>
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 2 of 2).img" size="517830432" crc="7d03c12f" md5="765aa3e041b84aa867052d00d347afdb" sha1="6a119169b3ce0ed59afe9c63240f7a446206fdf1"/>
+ <rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 2 of 2).sub" size="21135936" crc="7a7d2c9e" md5="e70ac43455d2ac0d3a09c8d93a073a8e" sha1="da0b4fad1a393f9fa4b8f3f580e9af42c7695189"/>
+ -->
+ <description>Night Trap (USA, Re-Release)</description>
+ <year>1995</year>
+ <publisher>Sega</publisher>
+ <info name="serial" value="T-162105"/>
+ <part name="cdrom1" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 1" />
+ <diskarea name="cdrom">
+ <disk name="night trap (usa, re-release) (disc 1)" sha1="69cd893b1b2d971da405cac1c4c71114e8a91648"/>
+ </diskarea>
+ </part>
+ <part name="cdrom2" interface="scd_cdrom">
+ <feature name="part_id" value="Disc 2" />
+ <diskarea name="cdrom">
+ <disk name="night trap (usa, re-release) (disc 2)" sha1="d8447c507abf9b7afc64b943fa3b4f794ddf25f1"/>
</diskarea>
</part>
</software>
<software name="panic">
- <!-- Unknown source
- <rom name="Panic! (1994)(Data East)(NTSC)(US)[SEGAT13015RE R1J].cue" size="3019" crc="aac0387d" />
- <rom name="Panic! (1994)(Data East)(NTSC)(US)[SEGAT13015RE R1J].bin" size="587216784" crc="2632fce7" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Panic! (1994)(Data East)(US).ccd" size="7912" crc="805608ba" md5="afb8050c793cd95449da3903bbdb964d" sha1="26a878790ceab4a61ceed96d05176c8f9504af61"/>
+ <rom name="Media (CD-ROM)\Panic! (1994)(Data East)(US).img" size="587567232" crc="f5002a24" md5="7ffd4ffea20a08bf1a7f514ff6dc0958" sha1="31ac39d0b204cb9d9a5efb49ee4ccdbca3499e3e"/>
+ <rom name="Media (CD-ROM)\Panic! (1994)(Data East)(US).sub" size="23982336" crc="8ea8a7a0" md5="a6aa4e23f41725218653e77aa0599102" sha1="8dd4dc064afdebfec0b138602323f8891fd8aa87"/>
-->
<description>Panic! (USA)</description>
<year>1994</year>
<publisher>Data East</publisher>
<info name="serial" value="T-13015"/>
- <info name="ring_code" value="SEGAT13015RE R1J"/>
+ <info name="release" value="199406xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="panic! (1994)(data east)(ntsc)(us)[segat13015re r1j]" sha1="0613fd42bcb3718d18be3002becd753a39a2ac40"/>
+ <disk name="panic! (usa)" sha1="44216917d5e42f131c0854cd8fb5066f5e39c87f"/>
</diskarea>
</part>
</software>
+ <!-- Marked as bad dump as it's an MP3-based dump. -->
<software name="pennsmok">
- <description>Penn and Tellers Smoke and Mirrors (USA, Prototype) [MP3-sourced]</description>
- <year>19??</year>
+ <!-- Unknown source -->
+ <description>Penn &amp; Teller's Smoke and Mirrors (USA, Prototype)</description>
+ <year>1995?</year>
<publisher>Absolute Entertainment</publisher>
<part name="cdrom1" interface="scd_cdrom">
<feature name="part_id" value="Disc 1" />
<diskarea name="cdrom">
- <disk name="pennsmoke1 (mp3-sourced)" sha1="01d82d2f767df776c55fc49fe0bfe22132fc9e40" status="baddump"/>
+ <disk name="penn and teller's smoke and mirrors (usa, prototype) (disc 1)" sha1="01d82d2f767df776c55fc49fe0bfe22132fc9e40" status="baddump"/>
</diskarea>
</part>
<part name="cdrom2" interface="scd_cdrom">
<feature name="part_id" value="Disc 2" />
<diskarea name="cdrom">
- <disk name="pennsmoke2 (mp3-sourced)" sha1="f7c989041a9775f525287981ed6eae778c5bd5b6" status="baddump"/>
+ <disk name="penn and teller's smoke and mirrors (usa, prototype) (disc 2)" sha1="f7c989041a9775f525287981ed6eae778c5bd5b6" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="popmail">
- <!-- Unknown source
- <rom name="Popful Mail (Sega CD) (U).cue" size="305" crc="94ec9ff5" />
- <rom name="Popful Mail (Sega CD) (U).bin" size="513912000" crc="0108e138" />
+ <software name="revoveng">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Revengers of Vengeance (1994)(Extreme)(US).ccd" size="7735" crc="75c3e0b5" md5="2737502f3259ff622521e8a745a222b8" sha1="ccb7d80c67448267acdb5d695b714754a6691b33"/>
+ <rom name="Media (CD-ROM)\Revengers of Vengeance (1994)(Extreme)(US).img" size="584415552" crc="012a82e5" md5="0392e56182b9b6a9153f852bf16014d8" sha1="5f0a2440e57de8b53f688874422196fd468806f7"/>
+ <rom name="Media (CD-ROM)\Revengers of Vengeance (1994)(Extreme)(US).sub" size="23853696" crc="db27db22" md5="349308500ff7af35d285bf67c5fe9b42" sha1="37874b9d79d0f19106555df95bdf35c87c7a4cc1"/>
-->
- <description>Popful Mail (USA)</description>
- <year>1995</year>
- <publisher>Working Designs</publisher>
- <info name="serial" value="T-127035"/>
+ <description>Revengers of Vengeance (USA)</description>
+ <year>1994</year>
+ <publisher>Extreme Entertainment Group</publisher>
+ <info name="serial" value="T-22035"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="popful mail (sega cd) (u)" sha1="c559f6b2dc8266a6cde1fb06a89aa7b76027dc4c"/>
+ <disk name="revengers of vengeance (usa)" sha1="fda7766a0480655c1a23ca40f33258c0d83abe3e"/>
</diskarea>
</part>
</software>
- <!-- the cuesheet on this seemed invalid, wouldn't mount in DT, or convert with the audio data -->
+ <!-- The disc is a blue Sega Mega CD-R marked RR Beta 3 ??. -->
+ <!-- The cue-sheet for this was invalid and had to be fixed (only used first 3 lines). Therefore it's tagged as a bad dump. -->
<software name="roadrashp" cloneof="roadrash">
- <description>Road Rash CD (Prototype 3 - 19950211) [HPZ-bad cue]</description>
- <year>19??</year>
+ <!-- Source: Hidden Palace - http://hiddenpalace.org/Road_Rash_(Feb_11,_1995_prototype)
+ <rom name="Road Rash CD (Beta 3 - Feb 11, 1995) (hidden-palace.org).cue" size="178" sha1="6da98e6e94ee8cb9ecef40f4c6207d29359b5da2" />
+ <rom name="Road Rash CD (Beta 3 - Feb 11, 1995) (hidden-palace.org).bin" size="625509696" sha1="bd741d48a1977bcc267312f8bfabfdd9355e36c7" />
+ -->
+ <description>Road Rash (USA, Prototype, Beta 3 - 19950211)</description>
+ <year>1995</year>
<publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="road rash cd (beta 3 - feb 11, 1995) (hpz-bad cue)" sha1="7b1c9816eb7297bb091c036bab85a0af30d38307" status="baddump"/>
+ <disk name="road rash (usa, prototype, beta 3 - 19950211)" sha1="7c921496b5caefbb5ff55195d9b2a07b8dc12424" status="baddump"/>
</diskarea>
</part>
</software>
<software name="roboales">
- <!-- Unknown source
- <rom name="Robo_Aleste(US-Genesis).cue" size="1111" crc="22071ddd" />
- <rom name="Robo_Aleste(US-Genesis).bin" size="554220576" crc="0ecd9b12" />
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Robo Aleste (1993)(Tengen)(US).ccd" size="3305" crc="3eab9ae9" md5="5675955d6c124331a366287300859872" sha1="6c40ec6b2ae3ecc69834ed0e838de152125f9f5c"/>
+ <rom name="Media (CD-ROM)\Robo Aleste (1993)(Tengen)(US).img" size="554573376" crc="31d53199" md5="27ced75cb7b67d3da1d11f237f112d2e" sha1="5e349a7647687c886412bf1e61e60087fd73c544"/>
+ <rom name="Media (CD-ROM)\Robo Aleste (1993)(Tengen)(US).sub" size="22635648" crc="b2a042c3" md5="39caf93d216fcbcc245692a573fe0529" sha1="e4b7352d410a4fd98675422a714cee0dfe94ba2f"/>
-->
<description>Robo Aleste (USA)</description>
<year>1993</year>
<publisher>Tengen</publisher>
<info name="serial" value="T-48015"/>
+ <info name="release" value="199308xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="robo_aleste(us)" sha1="29563cae8280614348d0377126c55f5471c6e117"/>
+ <disk name="robo aleste (usa)" sha1="16f734ed901182e0e435e6c2b4f559e99615f148"/>
</diskarea>
</part>
</software>
- <software name="monkey">
- <!-- Unknown source
- <rom name="Secret Of Monkey Island (Sega CD) (U).cue" size="1934" crc="8882ae90" />
- <rom name="Secret Of Monkey Island (Sega CD) (U).bin" size="474944064" crc="a6d2d99b" />
+ <!--
+ This is strictly not a Sega CD, but an Audio CD bundled together with the Sega-CD hardware.
+ It's listed here until it can be properly sorted. It's marked as a bad dump because chdman
+ currently can not handle the CD+G properties of the disc.
+ -->
+ <software name="rockpint">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Rock Paintings - CD G Sampler &amp; Hot Hits - Adventurous New Music Sampler (Double Pack) (1992)(Sega of America)(US) - (Disc 1 of 2) [Rock Paintings - CD+G Sampler][Audio].ccd" size="2967" crc="76c7834b" md5="f58abbf361f5647fe5e611629de8218b" sha1="55c99aad214768bbdf64e71bb108c8cdca6fd182"/>
+ <rom name="Media (CD-ROM)\Rock Paintings - CD G Sampler &amp; Hot Hits - Adventurous New Music Sampler (Double Pack) (1992)(Sega of America)(US) - (Disc 1 of 2) [Rock Paintings - CD+G Sampler][Audio].img" size="428964816" crc="84ff7c4b" md5="ce772878abd6b77536b71c73874d792b" sha1="0096c569810afb6b4a5fc3f90486c7ebc3edd254"/>
+ <rom name="Media (CD-ROM)\Rock Paintings - CD G Sampler &amp; Hot Hits - Adventurous New Music Sampler (Double Pack) (1992)(Sega of America)(US) - (Disc 1 of 2) [Rock Paintings - CD+G Sampler][Audio].sub" size="17508768" crc="f27504d8" md5="6a63cdc2326efa24d432016dd4aaeb7a" sha1="6dcee30867677bb8e4f6bbebca71d20a5ff3ea85"/>
-->
- <description>Secret of Monkey Island (USA)</description>
- <year>1993</year>
- <publisher>JVC</publisher>
- <info name="serial" value="T-60035"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="secret of monkey island (sega cd) (u)" sha1="de9d69a05b219d2b2c86e6ce3f7ad8c41ba3ff5c"/>
- </diskarea>
- </part>
- </software>
-
- <software name="shinfrcep" cloneof="shinfrce">
- <description>Shining Force CD (USA, Prototype) [MP3-sourced]</description>
- <year>1994</year>
+ <description>Rock Paintings (USA)</description>
+ <year>1992</year>
<publisher>Sega</publisher>
+ <info name="serial" value="MK-4128 / WCM-9201"/>
+ <info name="release" value="19921015" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="shiningforcecdbeta (mp3-sourced)" sha1="b5384972be572624929b8f18b7bd2083176bd0af" status="baddump"/>
+ <disk name="rock paintings (usa)" sha1="614f3f8e89e4b91923ff69719c38baef679f8e8d" status="baddump" />
</diskarea>
</part>
</software>
- <software name="snatcher">
- <!-- Unknown source
- <rom name="Snatcher (Sega CD) (U).cue" size="1499" crc="d45002d7" />
- <rom name="Snatcher (Sega CD) (U).bin" size="625192176" crc="acf87638" />
+ <software name="beast2">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Shadow of the Beast II (1994)(Psygnosis)(US).ccd" size="2966" crc="9790f581" md5="ff343a76ba42eb3f200d42754e9478b8" sha1="9d57f681cdc0a46cd94069835a38f0e0b6b359b3"/>
+ <rom name="Media (CD-ROM)\Shadow of the Beast II (1994)(Psygnosis)(US).img" size="456043392" crc="2b254a45" md5="72b829b71e339377ccf973219ff91c1f" sha1="3f02dab2d0e451af263e16042dc6417eca82121b"/>
+ <rom name="Media (CD-ROM)\Shadow of the Beast II (1994)(Psygnosis)(US).sub" size="18614016" crc="3d5e61a3" md5="39ce621265acb3f76427ed2ab3d44296" sha1="f7bd3419880ccc153b8d6e38d37e18cfa12cba87"/>
-->
- <description>Snatcher (USA)</description>
+ <description>Shadow of the Beast II (USA)</description>
<year>1994</year>
- <publisher>Konami</publisher>
- <info name="serial" value="T-95035"/>
+ <publisher>Psygnosis</publisher>
+ <info name="serial" value="T-113045"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="snatcher (sega cd) (u)" sha1="944d639976a18e0afcc9a1fef1aeae703a9ca260"/>
+ <disk name="shadow of the beast ii (usa)" sha1="7c341dbce23c5b166d4d949e977dae44a553f8a4"/>
</diskarea>
</part>
</software>
- <software name="soniccd510" cloneof="soniccd">
- <description>Sonic CD (USA, Prototype 510) [MP3-sourced]</description>
- <year>1993</year>
+ <!--
+ <software name="surgical32x" cloneof="surgical">
+ <description>Surgical Strike (Bra, 32X)</description>
+ <year>1996</year>
<publisher>Sega</publisher>
+ <info name="serial" value="157036"/>
+ <info name="release" value="199601xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sonic cd beta 510 (mp3-sourced)" sha1="a4678b0879fcd42de426ae48bea90214058731e0" status="baddump"/>
+ <disk name="surgical strike (bra, 32x)" status="nodump" />
</diskarea>
</part>
</software>
+ -->
- <software name="soniccd712" cloneof="soniccd">
- <description>Sonic CD (USA, Prototype 712)</description>
- <year>1993</year>
+ <!-- Sourced from the hiddenpalace forums - http://hiddenpalace.org/forums/viewtopic.php?t=2880 -->
+ <!-- Marked as bad dump as it's an MP3-based dump. -->
+ <software name="shinfrcep" cloneof="shinfrce">
+ <description>Shining Force CD (USA, Prototype)</description>
+ <year>1994</year>
<publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sonic cd beta 712" sha1="03ae957f349ed69c20b64c92ea552bc8d3639f04"/>
+ <disk name="shining force cd (usa, prototype)" sha1="b5384972be572624929b8f18b7bd2083176bd0af" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="soniccd920" cloneof="soniccd">
- <description>Sonic CD (USA, Prototype 920)</description>
+ <!--
+ This is a prototype of Sonic the Hedgehog CD, often called the 712 prototype
+ because it's from the 12th of July, 1993. It's sourced from an individual going by
+ the alias Phugolz. The disc is a blue Sega Mega CD-R marked SONIC 712.
+ -->
+ <software name="soniccd712" cloneof="soniccd">
+ <description>Sonic the Hedgehog CD (USA, Prototype 19930712)</description>
<year>1993</year>
<publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="sonic cd beta 920" sha1="324452f48e8ee7ce605f1d40718a346f23ffea5d"/>
- </diskarea>
- </part>
- </software>
-
- <software name="cobra">
- <!-- Unknown source
- <rom name="Space Adventure, The - Cobra - The Legendary Bandit (1994)(Hudson Soft)(NTSC)(US)[SEGAT143015 R1H].cue" size="441" crc="966367c4" />
- <rom name="Space Adventure, The - Cobra - The Legendary Bandit (1994)(Hudson Soft)(NTSC)(US)[SEGAT143015 R1H].bin" size="278098128" crc="f767e27d" />
- -->
- <description>The Space Adventure - Cobra - The Legendary Bandit (USA)</description>
- <year>1994</year>
- <publisher>Hudson Soft</publisher>
- <info name="serial" value="T-143015"/>
- <info name="ring_code" value="SEGAT143015 R1H"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="space adventure, the - cobra - the legendary bandit (1994)(hudson soft)(ntsc)(us)[segat143015 r1h]" sha1="29c8a5f9b635217f1801a765a3eaf1bb44647316"/>
+ <disk name="sonic the hedgehog cd (usa, prototype 19930712)" sha1="03ae957f349ed69c20b64c92ea552bc8d3639f04"/>
</diskarea>
</part>
</software>
- <software name="starstrk">
- <description>Star Strike (USA) [MP3-sourced]</description>
- <year>2003</year>
- <publisher>Good Deal Games</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="star strike (mp3-sourced)" sha1="52eaad4afb7cf7e33858073f80b74aad61527a2c" status="baddump"/>
- </diskarea>
- </part>
- </software>
-
- <software name="swchess">
- <!-- Unknown source
- <rom name="Star Wars Chess (Sega CD) (U).cue" size="176" crc="67a9157b" />
- <rom name="Star Wars Chess (Sega CD) (U).bin" size="262685472" crc="a43489f0" />
+ <!--
+ This is a late prototype of Sonic the Hedgehog CD, often called the 920 prototype
+ because it's from the 20th of September, 1993. The disc is a blue Sega Mega CD-R
+ marked SONIC 920.
+ -->
+ <software name="soniccd920" cloneof="soniccd">
+ <!-- Source: Hidden Palace - http://hiddenpalace.org/Sonic_the_Hedgehog_CD_(Sep_20,_1993_prototype)
+ <rom name="SonicCD920-beta.CUE" size="2006" sha1="5b164c2d1089bc629a234b879e4d70cc617798af" />
+ <rom name="SonicCD920-beta.BIN" size="583084320" sha1="02d3566c12e640f81b5258fe70aed9cec27209e9" />
-->
- <description>The Software Toolworks' Star Wars Chess (USA)</description>
+ <description>Sonic the Hedgehog CD (USA, Prototype 19930920)</description>
<year>1993</year>
- <publisher>Software Toolworks</publisher>
- <info name="serial" value="T-87035"/>
+ <publisher>Sega</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="star wars chess (sega cd) (u)" sha1="d65ffb2f5a5e133ea310f1d8543825e8f204a0b1"/>
+ <disk name="sonic the hedgehog cd (usa, prototype 19930920)" sha1="324452f48e8ee7ce605f1d40718a346f23ffea5d"/>
</diskarea>
</part>
</software>
@@ -4851,155 +5840,90 @@
<publisher>&lt;unknown&gt;</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="syndicatebeta" sha1="7441856d59cee9e7425a7d0716b712be2020082a"/>
- </diskarea>
- </part>
- </software>
-
- <software name="timecop">
- <description>Time Cop (USA, Early Prototype) [MP3-sourced]</description>
- <year>19??</year>
- <publisher>&lt;unknown&gt;</publisher>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="timecop (early beta) (u)" sha1="1faf0b1f68f41d76bd2be4e11ed7ec0d5381da40" status="baddump"/>
- </diskarea>
- </part>
- </software>
-
- <software name="vay">
- <!-- Unknown source
- <rom name="Vay (Sega CD) (U).cue" size="1557" crc="e0c113ae" />
- <rom name="Vay (Sega CD) (U).bin" size="475541472" crc="dd77413c" />
- -->
- <description>Vay (USA)</description>
- <year>1993</year>
- <publisher>Working Designs</publisher>
- <info name="serial" value="T-127025"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="vay (sega cd) (u)" sha1="35564c71b3710056f1967c0e71a1507cf0a9be41"/>
+ <disk name="syndicate (usa, prototype)" sha1="7441856d59cee9e7425a7d0716b712be2020082a"/>
</diskarea>
</part>
</software>
- <software name="wolfchld">
- <!-- Unknown source
- <rom name="Wolfchild (Sega CD) (U).cue" size="793" crc="ee99bf5f" />
- <rom name="Wolfchild (Sega CD) (U).bin" size="385034160" crc="b4f6242a" />
- -->
- <description>Wolfchild (USA)</description>
- <year>1993</year>
- <publisher>JVC</publisher>
- <info name="serial" value="T-6403"/>
+<!--
+ This game was developed for the Sega Mega-CD system by Virtual Studio and was released in Europe.
+ A stateside release never happened, but in 2014 Good Deal Games released a set of reproduction disc
+ made from a prototype build of the US version of the game.
+ -->
+ <!--
+ <software name="smurfs">
+ <description>The Smurfs (USA, Prototype)</description>
+ <year>2014</year>
+ <publisher>Good Deal Games</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="wolfchild (sega cd) (u)" sha1="ed754602454582cec0c169772525d6859d4305a5"/>
+ <disk name="the smurfs (usa, prototype)" status="nodump"/>
</diskarea>
</part>
</software>
+-->
- <software name="aburner3">
- <!-- Unknown source
- <rom name="AfterBurner3(SegaCD-NTSC).cue" size="563" crc="c22dd054" />
- <rom name="AfterBurner3(SegaCD-NTSC).bin" size="322774368" crc="14eae71b" />
+ <software name="cobra">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Space Adventure, The - Cobra - The Legendary Bandit (1995) (US).ccd" size="1407" crc="2b00b531" md5="efe42a39c3487a866a888d752fa71549" sha1="bb5168bfbbe06ea90022192c19546e38b8c700d8"/>
+ <rom name="Media (CD-ROM)\Space Adventure, The - Cobra - The Legendary Bandit (1995) (US).img" size="278450928" crc="3638b070" md5="884d3e20fd2269afe1a15a0e0fe2152f" sha1="d5d0e0431aacc2a2c34ce4be6e0f4aaf9a5f8619"/>
+ <rom name="Media (CD-ROM)\Space Adventure, The - Cobra - The Legendary Bandit (1995) (US).sub" size="11365344" crc="3330db2e" md5="dc1b63f092a1e049a19d73b6a9db2c17" sha1="fec9d8569f2b2e47bd0e7d856d075eda5202e4f8"/>
-->
- <description>Afterburner 3 (USA)</description>
- <year>1993</year>
- <publisher>Sega</publisher>
- <info name="serial" value="4415"/>
+ <description>The Space Adventure - Cobra the Legendary Bandit (USA)</description>
+ <year>1995</year>
+ <publisher>Hudson Soft</publisher>
+ <info name="serial" value="T-143015"/>
+ <info name="alt_title" value="The Space Adventure (Box)" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="afterburner3(segacd-ntsc)" sha1="ddc73bda4715d152a414e9eebe42a74c692187ac"/>
- </diskarea>
- </part>
- </software>
-
- <software name="ntraprr" cloneof="ntrap">
- <!-- Unknown source
- <rom name="Night Trap 1994 Re-Release - Disc 1 (U).cue" size="167" crc="04fa8ca8" />
- <rom name="Night Trap 1994 Re-Release - Disc 1 (U).bin" size="619260432" crc="f0fee581" />
-
- <rom name="Night Trap 1994 Re-Release - Disc 2 (U).cue" size="167" crc="4047e50f" />
- <rom name="Night Trap 1994 Re-Release - Disc 2 (U).bin" size="517477632" crc="f367e477" />
- -->
- <description>Night Trap 1994 Re-Release (USA)</description>
- <year>1994</year>
- <publisher>Digital Pictures</publisher>
- <info name="serial" value="T-162105"/>
- <part name="cdrom1" interface="scd_cdrom">
- <feature name="part_id" value="Disc 1" />
- <diskarea name="cdrom">
- <disk name="night trap 1994 re-release - disc 1 (u)" sha1="3187309b5b7a0197e6cda663c2165ea5ebf19e8d"/>
- </diskarea>
- </part>
- <part name="cdrom2" interface="scd_cdrom">
- <feature name="part_id" value="Disc 2" />
- <diskarea name="cdrom">
- <disk name="night trap 1994 re-release - disc 2 (u)" sha1="818852b5de5f9b82bc78d04e3e4c5c2a77e3060a"/>
+ <disk name="the space adventure - cobra the legendary bandit (usa)" sha1="51a755087713cc945adf5d5e85da713343ea3a0e"/>
</diskarea>
</part>
</software>
- <software name="revoveng">
- <!-- Unknown source
- <rom name="Revengers of Vengeance (U).cue" size="2906" crc="a53dc965" />
- <rom name="Revengers of Vengeance (U).bin" size="584062752" crc="32d2328e" />
- -->
- <description>Revengers of Vengeance (USA)</description>
- <year>1994</year>
- <publisher>Extreme</publisher>
- <info name="serial" value="T-22035"/>
+ <!-- Is the Good Deal Games disc based off this dump? -->
+ <!-- Marked as bad dump as it's an MP3-based dump. -->
+ <software name="timecopp" cloneof="timecop">
+ <description>Timecop (USA, Early Prototype)</description>
+ <year>19??</year>
+ <publisher>&lt;unknown&gt;</publisher>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="revengers of vengeance (u)" sha1="303aa9db7b9a8f4f7669050a297b6e7864457186"/>
+ <disk name="time cop (usa, early prototype)" sha1="1faf0b1f68f41d76bd2be4e11ed7ec0d5381da40" status="baddump"/>
</diskarea>
</part>
</software>
- <software name="roadaven">
- <!-- Unknown source
- <rom name="Road Avenger (Sega CD) (U).cue" size="306" crc="6af2ae2c" />
- <rom name="Road Avenger (Sega CD) (U).bin" size="336253680" crc="b86cbf14" />
- -->
- <description>Road Avenger (USA)</description>
- <year>1993</year>
- <publisher>Renovation</publisher>
- <info name="serial" value="T-6207"/>
+<!--
+ <software name="wixeye">
+ <description>What is X'Eye Multi Entertainment System (USA)</description>
+ <year>1993?</year>
+ <publisher>JVC</publisher>
+ <info name="serial" value="SMJ-4110"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="road avenger (sega cd) (u)" sha1="a07dd8fed7677dc0905ccb71529f48dacb045d84"/>
+ <disk name="what is x'eye multi entertainment system (usa)" status="nodump"/>
</diskarea>
</part>
</software>
+-->
- <software name="beast2">
- <!-- Unknown source
- <rom name="shadowofthebeast2.cue" size="977" crc="72bbb029" />
- <rom name="shadowofthebeast2.bin" size="456043392" crc="daedf970" />
+ <software name="wolfchld">
+ <!-- Source: TruRip
+ <rom name="Media (CD-ROM)\Wolfchild (1992)(JVC)(US).ccd" size="2354" crc="13381b07" md5="a251ca5181ba724b5a9cc6712831619d" sha1="acc6c7a01829bfc6b709182ef2c75c7be8709155"/>
+ <rom name="Media (CD-ROM)\Wolfchild (1992)(JVC)(US).img" size="385034160" crc="89c474d7" md5="1669aaa9d634eb16117c7846ae6b7a52" sha1="820fe43789192605fcc65c0184653ff8c88e018a"/>
+ <rom name="Media (CD-ROM)\Wolfchild (1992)(JVC)(US).sub" size="15715680" crc="421106a7" md5="6d169ba583d1bdc2f1eda53a94833dbe" sha1="ee3e8c74c93412d088b6d7540305821ede4d7929"/>
-->
- <description>Shadow of the Beast II (USA)</description>
- <year>1993</year>
- <publisher>Psygnosis</publisher>
- <info name="serial" value="T-113045"/>
- <part name="cdrom" interface="scd_cdrom">
- <diskarea name="cdrom">
- <disk name="shadowofthebeast2u" sha1="88b1b5fd1b608a3e0440477b5ff50eb42c0db5bd"/>
- </diskarea>
- </part>
- </software>
-
- <!-- reports read error, but boots anyway? -->
- <software name="mmm">
- <description>Mighty Mighty Missile (US, Demo?)</description>
- <year>2004</year>
- <publisher>Good Deal Games</publisher>
+ <description>Wolfchild (USA)</description>
+ <year>1992</year>
+ <publisher>JVC</publisher>
+ <info name="serial" value="T-6403"/>
+ <info name="release" value="199212xx" />
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
- <disk name="mighty mighty missile (u)" sha1="ce86a6d92939e8bf8a4633d7b8887e3247b34b7f"/>
+ <disk name="wolfchild (usa)" sha1="700228109f9fe28bd5af6525c9fe0354913e1c6a"/>
</diskarea>
</part>
</software>
-
</softwarelist>
diff --git a/hash/x68k_flop.xml b/hash/x68k_flop.xml
index 305233de53d..5399b37b22a 100644
--- a/hash/x68k_flop.xml
+++ b/hash/x68k_flop.xml
@@ -1602,6 +1602,17 @@ Most info on release dates and Jpn titles come from the following (wonderful) re
</part>
</software>
+ <software name="bgelmntt">
+ <description>Blade of The Great Elements (Test Version)</description>
+ <year>1990</year>
+ <publisher>アミューズメント (Amusement)</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="blade of the great elements (test version) (1990)(amusement).dim" size="1261824" crc="F0C71952" sha1="7D11252BB23CE4F8C242CFA71F9B04FC1B368B25" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="btlchess">
<description>Battle Chess</description>
<year>1989</year>
@@ -8392,33 +8403,36 @@ maybe the remaining disks are the supposedly undumped addons: Daikairei Powerup
</part>
</software>
- <!-- The first 3 disks are in 2HDE format and are not handled properly -->
+ <!-- This software is compressed game disk unzipping tool (All unzipped to 17 disks (12 titles))
+ Disk 1,2 and 3 use the 2HDE format (Unsupported), Disk 4 system boot disk (2HD format) -->
<software name="ldb_x68k" supported="no">
- <description>LOGiN Disk &amp; Book Series - X68000 Kessaku Game-sen</description>
- <year>19??</year>
+ <description>LOGiN Disk &amp; Book Series - LOGiN Software Contest X68000 Kessaku Game-sen</description>
+ <year>1993</year>
<publisher>Login</publisher>
+ <info name="alt_title" value="LOGiN DISK&amp;BOOKシリーズ - ログインソフトウェアコンテスト X68000傑作ゲーム選" />
+ <info name="release" value="19931025" />
<part name="flop1" interface="floppy_5_25">
- <feature name="part_id" value="Disk 1" />
- <dataarea name="flop" size="1474560">
- <rom name="ldbx68k_1.hdm" size="1474560" crc="35a29e6e" sha1="68be72d44ed55bdc2bb84ab2396475e22452a43b" offset="0" />
+ <feature name="part_id" value="Disk 4" />
+ <dataarea name="flop" size="1261824">
+ <rom name="ldbx68k_4.dim" size="1261824" crc="2c235674" sha1="97729CD1071EABA6EA98DFEB172311520F7E8A24" offset="0" />
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
- <feature name="part_id" value="Disk 2" />
- <dataarea name="flop" size="1474560">
- <rom name="ldbx68k_2.hdm" size="1474560" crc="0e1d25f0" sha1="53f3a6b192b788469142092ae4515612ebb0892c" offset="0" />
+ <feature name="part_id" value="Disk 1" />
+ <dataarea name="flop" size="1474816">
+ <rom name="ldbx68k_1.dim" size="1474816" crc="F04FAEF1" sha1="CA01E3367B84B0752E2D3BF21560D12F776D0778" offset="0" />
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
- <feature name="part_id" value="Disk 3" />
- <dataarea name="flop" size="1474560">
- <rom name="ldbx68k_3.hdm" size="1474560" crc="77726148" sha1="850bc85f0f6ef28082d13a4e7eb3fb0cffca9035" offset="0" />
+ <feature name="part_id" value="Disk 2" />
+ <dataarea name="flop" size="1474816">
+ <rom name="ldbx68k_2.dim" size="1474816" crc="CBF0156F" sha1="904BB6FEB5A6DA7EE04C641E19E6B0E950042C97" offset="0" />
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
- <feature name="part_id" value="Disk 4" />
- <dataarea name="flop" size="1261568">
- <rom name="ldbx68k_4.hdm" size="1261568" crc="bfccf8e0" sha1="ee7f6f56086e997620fef4dc1e9e102f33732a68" offset="0" />
+ <feature name="part_id" value="Disk 3" />
+ <dataarea name="flop" size="1474816">
+ <rom name="ldbx68k_3.dim" size="1474816" crc="B29F51D7" sha1="06DBE68C097D7D152DEE8F2AD938731B681913A3" offset="0" />
</dataarea>
</part>
</software>
@@ -8599,6 +8613,38 @@ maybe the remaining disks are the supposedly undumped addons: Daikairei Powerup
</part>
</software>
+ <software name="mjfants2">
+ <description>Mahjong Gensoukyoku II - Mahjong Fantasia -The 2nd Stage</description>
+ <year>1993</year>
+ <publisher>アクティブ (Active)</publisher>
+ <info name="alt_title" value="麻雀幻想曲Ⅱ" />
+ <info name="release" value="19930828" />
+ <part name="flop1" interface="floppy_5_25">
+ <feature name="part_id" value="Disk A" />
+ <dataarea name="flop" size="1261824">
+ <rom name="mahjong gensoukyoku ii (1993)(active)(disk 1 of 4)(disk a).dim" size="1261824" crc="E22A0A22" sha1="BD62BFA94F7D54273227F56C8798C5669462AF1D" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="flop2" interface="floppy_5_25">
+ <feature name="part_id" value="Disk B" />
+ <dataarea name="flop" size="1261824">
+ <rom name="mahjong gensoukyoku ii (1993)(active)(disk 2 of 4)(disk b).dim" size="1261824" crc="11CF0B83" sha1="E7595FA0BE1D176BC54AE7760F7ABB94E554C329" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="flop3" interface="floppy_5_25">
+ <feature name="part_id" value="Disk C" />
+ <dataarea name="flop" size="1261824">
+ <rom name="mahjong gensoukyoku ii (1993)(active)(disk 3 of 4)(disk c).dim" size="1261824" crc="8DF65565" sha1="4AFD22C642C1C37FF714BAF32F8DB156BF79414B" offset="000000" />
+ </dataarea>
+ </part>
+ <part name="flop4" interface="floppy_5_25">
+ <feature name="part_id" value="Disk D" />
+ <dataarea name="flop" size="1261824">
+ <rom name="mahjong gensoukyoku ii (1993)(active)(disk 4 of 4)(disk d).dim" size="1261824" crc="880B66CE" sha1="B21AB349547585A9859135979CB44B49EED004A1" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="mjkyojs">
<description>Mahjong Kyo Jidai Special</description>
<year>1988</year>
@@ -10494,6 +10540,18 @@ maybe the remaining disks are the supposedly undumped addons: Daikairei Powerup
</part>
</software>
+ <software name="phalanxs" cloneof="phalanx">
+ <description>Phalanx (Sample)</description>
+ <year>1991</year>
+ <publisher>Zoom</publisher>
+ <info name="alt_title" value="ファランクス" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="phalanx (sample) (1991)(zoom).dim" size="1261824" crc="B3D81E59" sha1="92874C431F465968E25AE9FB3B29FAA34D92C966" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="phantas3">
<description>Phantasie III - The Wrath of Nikademus</description>
<year>1989</year>
@@ -20365,6 +20423,113 @@ a contest among doujin programmers... -->
+<!-- Distributed with Magazine Book from "The World of X68000". There are winner of a
+ "The first all japan X68000 art festival (第1回全日本X68000芸術祭)" among programmers. -->
+
+ <software name="formulaxa" cloneof="formulax">
+ <description>The World of X68000 - Formula X</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="フォーミュラX (ザ・ワールド・オブ・X68000)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 (disk 3 of 3) - formula x.dim" size="1261824" crc="17E7DCB5" sha1="4CA19B5054F77139F5951CE00A8A47D4A98783AF" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- This image file is multi boot disk.
+ Set drive 0 to boot "Fortress Attack", Set drive 1 to boot "Fortress Attack". -->
+ <software name="fortatgj">
+ <description>The World of X68000 - Fortress Attack &amp; GJ</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="フォートレスアタック & GJ (ザ・ワールド・オブ・X68000)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 (disk 1 of 3) - fortress attack &amp; gj.dim" size="1261824" crc="373B5D62" sha1="B0E9D5304C33546BEE2FFC3E6380B8FE2F3D3E95" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- This image file is multi boot disk.
+ Set drive 0 to boot "Logic Rush", Set drive 1 to boot "Ah! Ohimesama!". -->
+ <software name="lcmyprin" supported="no">
+ <description>The World of X68000 - Logic Rush &amp; Ah! Ohimesama!</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="ロジックラッシュ & ああっ!お姫さまっ! (ザ・ワールド・オブ・X68000)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 (disk 2 of 3) - logic rush &amp; ah! ohimesama!.dim" size="1261824" crc="235F83CA" sha1="A40470D9FAB4C7D13184B5300EB16AA52DB2D39E" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="cryokua" cloneof="cryoku">
+ <description>The World of X68000 II - C Ryoku Kensa</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="C力検査 (ザ・ワールド・オブ・X68000 Ⅱ)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 ii (disk 1 of 4) - c ryoku kensa.dim" size="1261824" crc="962C135E" sha1="12FC6F23E4AC4F8F32C1BA711A7BE926D3CBEB0B" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="cynthiaa">
+ <description>The World of X68000 II - Cynthia</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="シンシア (ザ・ワールド・オブ・X68000 Ⅱ)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 ii (disk 2 of 4) - cynthia.dim" size="1261824" crc="EB2F94E9" sha1="430E931D2C0DE8BB6CD2DC1D6B64781EDE15B03D" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- This image file is multi boot disk.
+ Set drive 0 to boot "Rush!", Set drive 1 to boot "Useful". -->
+ <software name="rushusfl">
+ <description>The World of X68000 II - Rush! &amp; Useful</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="ラッシュ! & ユースフル (ザ・ワールド・オブ・X68000 Ⅱ)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 ii (disk 3 of 4) - rush! &amp; useful.dim" size="1261824" crc="F60F3B1B" sha1="A4FF175494A9438ED4444E533816BAC8303A6E4C" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="t94xa" cloneof="t94x">
+ <description>The World of X68000 II - T-94X</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <info name="alt_title" value="T-94X (ザ・ワールド・オブ・X68000 Ⅱ)" />
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="the world of x68000 ii (disk 4 of 4) - t-94x.dim" size="1261824" crc="78930F80" sha1="AF8ECDCA86289F203B30DC4F0BFDE025B54E78C8" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <!-- This boot disk is copied file from "The World of X68000" -->
+ <software name="aahime">
+ <description>Aa! O-Hime-sama!</description>
+ <year>1993</year>
+ <publisher>電波新聞社 (Dempa Shinbunsha)</publisher>
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="1261824">
+ <rom name="aa! o-hime-sama!.dim" size="1261824" crc="6605a6b5" sha1="05e30f93a6688a57c34fae9779d7b1cec142fd4c" offset="000000" />
+ </dataarea>
+ </part>
+ </software>
+
+
+
<!-- Doujin -->
@@ -20405,17 +20570,6 @@ a contest among doujin programmers... -->
</part>
</software>
- <software name="aahime">
- <description>Aa! O-Hime-sama!</description>
- <year>19??</year>
- <publisher>&lt;doujin&gt;</publisher>
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1261824">
- <rom name="aa! o-hime-sama!.dim" size="1261824" crc="6605a6b5" sha1="05e30f93a6688a57c34fae9779d7b1cec142fd4c" offset="000000" />
- </dataarea>
- </part>
- </software>
-
<software name="abuten">
<description>Abunai Tengoku Densetsu?</description>
<year>19??</year>
@@ -23418,25 +23572,6 @@ a contest among doujin programmers... -->
</part>
</software>
- <software name="fortatk">
- <description>Fortress Attack</description>
- <year>1993</year>
- <publisher>&lt;doujin&gt;</publisher>
- <info name="developer" value="Shibahara A." />
- <part name="flop1" interface="floppy_5_25">
- <feature name="part_id" value="Disk 1" />
- <dataarea name="flop" size="1261824">
- <rom name="fortress attack (1993)(shibahara a.)(disk 1 of 2).dim" size="1261824" crc="a919b870" sha1="ad7a2a1400c2bc9106021370f9d959f11e96d56e" offset="000000" />
- </dataarea>
- </part>
- <part name="flop2" interface="floppy_5_25">
- <feature name="part_id" value="Disk 2" />
- <dataarea name="flop" size="1261824">
- <rom name="fortress attack (1993)(shibahara a.)(disk 2 of 2).dim" size="1261824" crc="ebbf3a16" sha1="28db90ef8a65d405243bf7a43a235ad1a0c5938b" offset="000000" />
- </dataarea>
- </part>
- </software>
-
<software name="fortyone">
<description>Forty-One</description>
<year>1993</year>
@@ -30892,40 +31027,6 @@ Technically speaking these are invalid XDF files, because they contain more trac
a DIM dump with DIFC, these are at least confirmed as coming from real disk (by SuperDeadite)
-->
- <software name="cryokua" cloneof="cryoku">
- <description>C Ryokukensa V3</description>
- <year>1992</year>
- <publisher>&lt;doujin&gt;</publisher>
- <info name="developer" value="Hayabusa Soft" />
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1277952">
- <rom name="ct.xdf" size="1277952" crc="b494d29c" sha1="4ac45dfa372e0bc4cfd63f16407ed382a942e03a" offset="000000" />
- </dataarea>
- </part>
- </software>
-
- <software name="cynthi2">
- <description>Cynthia V2</description>
- <year>19??</year>
- <publisher>&lt;doujin&gt;</publisher>
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1277952">
- <rom name="cyn.xdf" size="1277952" crc="24b71a3b" sha1="018b73eedd25ae89466157da0de1bf84dd3bb048" offset="000000" />
- </dataarea>
- </part>
- </software>
-
- <software name="formulaxa" cloneof="formulax">
- <description>Formula X (Alt)</description>
- <year>19??</year>
- <publisher>&lt;doujin&gt;</publisher>
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1277952">
- <rom name="for.xdf" size="1277952" crc="593d49fe" sha1="523a83919076de11d377b0d4aeff88c6c271459e" offset="000000" />
- </dataarea>
- </part>
- </software>
-
<software name="grdiusac">
<description>Gradius Arcade</description>
<year>19??</year>
@@ -30972,29 +31073,6 @@ a DIM dump with DIFC, these are at least confirmed as coming from real disk (by
</part>
</software>
- <software name="t94xa" cloneof="t94x">
- <description>T-94X - The Ground Warriors (Alt)</description>
- <year>1994</year>
- <publisher>&lt;doujin&gt;</publisher>
- <info name="developer" value="Team Acquire" />
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1277952">
- <rom name="tx.xdf" size="1277952" crc="955385f5" sha1="b71782694fd7184351c4551c7d58b9aefd705ba9" offset="000000" />
- </dataarea>
- </part>
- </software>
-
- <software name="lcmyprin" supported="no">
- <description>Logic Crush + Ahh My Princess!</description>
- <year>19??</year>
- <publisher>&lt;doujin&gt;</publisher>
- <part name="flop1" interface="floppy_5_25">
- <dataarea name="flop" size="1277952">
- <rom name="worldii.xdf" size="1277952" crc="66671996" sha1="77421d225dcdb944d07a3f0e2e3714ba3f1988c2" offset="000000" />
- </dataarea>
- </part>
- </software>
-
<software name="zeromastx" cloneof="zeromast">
<description>Zero Master-Striker (XDF)</description>
<year>1992</year>
diff --git a/plugins/hiscore/hiscore.dat b/plugins/hiscore/hiscore.dat
index 73a2f71f6d8..10809192b78 100644
--- a/plugins/hiscore/hiscore.dat
+++ b/plugins/hiscore/hiscore.dat
@@ -5545,6 +5545,12 @@ wildfangs:
;@s:galaga.cpp
+battles2:
+@:maincpu,program,8510,4d,00,50
+@:maincpu,program,8024,3,00,00
+@:maincpu,program,8025,1,40,40
+
+
;digdugat1:******dig dug (atari, rev1)
digdug:
digdug1:
@@ -10103,6 +10109,17 @@ paclandm:
;@s:pacman.cpp
+mspacmab2:
+@:maincpu,program,4E88,04,00,00
+@:maincpu,program,43ED,06,40,40
+@:maincpu,program,43D1,01,48,48
+
+
+pinguinos:
+@:maincpu,program,8840,1e,d0,41
+@:maincpu,program,880c,2,d0,07
+
+
;*** puckman/pacman (and clones) for pacmame & regular mame builds **
;abscam:******Abscam
;mspacmbe:******Ms. Pac-Man (bootleg, (encrypted))
@@ -10579,6 +10596,18 @@ dw2v100x:
;@s:phoenix.cpp
+;** after you get a hiscore, you must start a new game then exit **
+;** for save to work (i.e make sure the new top score is displaying in top score spot) **
+condorn:
+@:maincpu,program,4389,3,00,00
+@:maincpu,program,41e0,1,20,20
+@:maincpu,program,41c0,1,20,20
+@:maincpu,program,41a0,1,20,20
+@:maincpu,program,4180,1,20,20
+@:maincpu,program,4160,1,20,20
+@:maincpu,program,4140,1,20,20
+
+
falconz:
vautourz:
@:maincpu,program,4389,03,00,00
@@ -10623,6 +10652,7 @@ condor:
falcon:
nextfase:
phoenix:
+phoenix2:
phoenix3:
phoenixa:
phoenixb:
@@ -10795,6 +10825,12 @@ pooyans:
;@s:popeye.cpp
+popeyej:
+@:maincpu,program,8200,24,00,02
+@:maincpu,program,8fed,3,00,03
+@:maincpu,program,8f32,6,00,00
+
+
popeyef:
@:maincpu,program,8a00,24,00,01
@:maincpu,program,8fed,3,00,02
@@ -11323,6 +11359,11 @@ rollace:
;@s:route16.cpp
+stratvoxa:
+@:cpu1,program,4001,3,00,00
+@:cpu1,program,4010,3,00,00
+
+
route16:
route16a:
route16bl:
@@ -12416,6 +12457,10 @@ glocu:
;@s:seibuspi.cpp
+rdftgb:
+@:maincpu,program,29bc1,aa,40,4f
+
+
rdft2jb:
@:maincpu,program,285dc,1ab,01,2e
@@ -12741,6 +12786,11 @@ penbros:
;@s:sf.cpp
+sfjan:
+@:maincpu,program,ff94f2,9C,00,12
+@:maincpu,program,ff8732,8,00,00
+
+
sf:
sfj:
sfua:
@@ -13108,6 +13158,12 @@ slapfighb3:
;@s:snk.cpp
+jcross:
+jcrossa:
+@:maincpu,program,f5ab,1e,00,49
+@:maincpu,program,da1c,3,00,54
+
+
dogosokb:
dogosoke:
victroad:
@@ -13212,11 +13268,6 @@ tdfeverj:
@:maincpu,program,df28,28,c5,00
-;********jumping cross
-jcross:
-@:maincpu,program,f5ab,1e,00,49
-
-
;(marvins maze)
marvins:
@:maincpu,program,c290,46,00,4b
@@ -13249,6 +13300,11 @@ sgladiat:
;@s:snk6502.cpp
+nibblera:
+@:maincpu,program,0290,28,00,00
+@:maincpu,program,02d0,1e,13,14
+
+
;nibblero:******Nibbler (Olympia)
nibbler:
nibbler6:
@@ -13931,6 +13987,10 @@ superchsu:
;@s:superqix.cpp
+sqixr0:
+@:maincpu,program,f4c0,28,00,03
+
+
;** this only saves the hiscore table, the top score will stay at default **
sqix:
sqixb1:
@@ -15024,6 +15084,10 @@ landgear:
;@s:taitosj.cpp
+elevator4:
+@:maincpu,program,8350,3,00,01
+
+
;(water ski) (by GeoMan)
waterski:
@:maincpu,program,835b,3,0,0
@@ -15163,6 +15227,18 @@ tbowlp:
;@s:tecmo.cpp
+geminib:
+@:maincpu,program,cf41,45,00,46
+@:maincpu,program,c026,3,00,00
+@:maincpu,program,d241,1,40,40
+@:maincpu,program,d221,1,40,40
+@:maincpu,program,d201,1,35,35
+@:maincpu,program,d1e1,1,30,30
+@:maincpu,program,d1c1,1,30,30
+@:maincpu,program,d1a1,1,30,30
+@:maincpu,program,d181,1,30,30
+
+
gemini:
@:maincpu,program,cf41,45,00,46
@:maincpu,program,c026,3,00,00
@@ -16675,6 +16751,27 @@ volfieduo:
;@s:vsnes.cpp
+nvs_machridera:
+@:maincpu,program,700,50,00,4b
+@:maincpu,program,701,1,05,05
+
+
+;mightybj:******vs. mighty bomb jack (japan)
+nvs_mightybj:
+@:maincpu,program,3a8,4,00,00
+@:maincpu,program,3aa,1,10,10
+
+
+;(mach rider) (by GeoMan)
+nvs_machrider:
+@:maincpu,program,0714,50,00,4b
+
+
+;(platoon)
+nvs_platoon:
+@:maincpu,program,700,e9,10,60
+
+
;bnglngby:******vs. raid on bungeling bay (japan)
bnglngby:
@:maincpu,program,6400,5a,00,01
@@ -16699,11 +16796,6 @@ excitebko:
@:maincpu,program,630,14f,00,0e
-machridra:
-@:maincpu,program,700,50,00,4b
-@:maincpu,program,701,1,05,05
-
-
iceclimb:
iceclimba:
@:maincpu,program,750,3c,00,23
@@ -16721,12 +16813,6 @@ vsgshoe:
@:maincpu,program,560,1d,12,a0
-;mightybj:******vs. mighty bomb jack (japan)
-mightybj:
-@:maincpu,program,3a8,4,00,00
-@:maincpu,program,3aa,1,10,10
-
-
;vsfdf:******vs. freedom force
vsfdf:
@:maincpu,program,712,9c,10,28
@@ -16776,11 +16862,6 @@ wrecking:
@:maincpu,program,6000,1e,06,16
-;(mach rider) (by GeoMan)
-machridr:
-@:maincpu,program,0714,50,00,4b
-
-
;(clu clu land)
cluclu:
@:maincpu,program,751,4f,1d,70
@@ -16798,11 +16879,6 @@ balonfgt:
@:maincpu,program,6124,0f,0a,10
-;(platoon)
-platoon:
-@:maincpu,program,700,e9,10,60
-
-
;(duck hunt)
duckhunt:
@:maincpu,program,640,20,12,28
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 85131fa8094..1534e2cf561 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -2913,6 +2913,18 @@ end
---------------------------------------------------
--
+--@src/devices/bus/hp9845_io/hp9845_io.h,BUSES["HP9845_IO"] = true
+---------------------------------------------------
+
+if (BUSES["HP9845_IO"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/bus/hp9845_io/hp9845_io.cpp",
+ MAME_DIR .. "src/devices/bus/hp9845_io/98035.cpp"
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/bus/compis/graphics.h,BUSES["COMPIS_GRAPHICS"] = true
---------------------------------------------------
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index 647e815f242..f1cecc70ec8 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -671,6 +671,18 @@ end
---------------------------------------------------
--
+--@src/devices/machine/ds1386.h,MACHINES["DS1386"] = true
+---------------------------------------------------
+
+if (MACHINES["DS1386"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/ds1386.cpp",
+ MAME_DIR .. "src/devices/machine/ds1386.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/machine/ds2401.h,MACHINES["DS2401"] = true
---------------------------------------------------
@@ -1263,18 +1275,6 @@ end
---------------------------------------------------
--
---@src/devices/machine/matsucd.h,MACHINES["MATSUCD"] = true
----------------------------------------------------
-
-if (MACHINES["MATSUCD"]~=null) then
- files {
- MAME_DIR .. "src/devices/machine/matsucd.cpp",
- MAME_DIR .. "src/devices/machine/matsucd.h",
- }
-end
-
----------------------------------------------------
---
--@src/devices/machine/mb14241.h,MACHINES["MB14241"] = true
---------------------------------------------------
diff --git a/scripts/src/mame/frontend.lua b/scripts/src/mame/frontend.lua
index 41d0598cb15..93129cf85d9 100644
--- a/scripts/src/mame/frontend.lua
+++ b/scripts/src/mame/frontend.lua
@@ -61,6 +61,8 @@ files {
MAME_DIR .. "src/frontend/mame/cheat.h",
MAME_DIR .. "src/frontend/mame/clifront.cpp",
MAME_DIR .. "src/frontend/mame/clifront.h",
+ MAME_DIR .. "src/frontend/mame/console.cpp",
+ MAME_DIR .. "src/frontend/mame/console.h",
MAME_DIR .. "src/frontend/mame/info.cpp",
MAME_DIR .. "src/frontend/mame/info.h",
MAME_DIR .. "src/frontend/mame/language.cpp",
@@ -71,6 +73,8 @@ files {
MAME_DIR .. "src/frontend/mame/mame.h",
MAME_DIR .. "src/frontend/mame/mameopts.cpp",
MAME_DIR .. "src/frontend/mame/mameopts.h",
+ MAME_DIR .. "src/frontend/mame/media_ident.cpp",
+ MAME_DIR .. "src/frontend/mame/media_ident.h",
MAME_DIR .. "src/frontend/mame/pluginopts.cpp",
MAME_DIR .. "src/frontend/mame/pluginopts.h",
MAME_DIR .. "src/frontend/mame/ui/ui.cpp",
diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua
index ba2e689a820..fc555804072 100644
--- a/scripts/src/sound.lua
+++ b/scripts/src/sound.lua
@@ -532,6 +532,20 @@ end
---------------------------------------------------
+-- MEA8000 Voice Synthesizer
+--@src/devices/sound/mea8000.h,SOUNDS["MEA8000"] = true
+---------------------------------------------------
+
+if (SOUNDS["MEA8000"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/sound/mea8000.cpp",
+ MAME_DIR .. "src/devices/sound/mea8000.h",
+ }
+end
+
+
+
+---------------------------------------------------
-- MOS 6560VIC
--@src/devices/sound/mos6560.h,SOUNDS["MOS656X"] = true
---------------------------------------------------
@@ -1376,3 +1390,14 @@ if (SOUNDS["PCD3311"]~=null) then
MAME_DIR .. "src/devices/sound/pcd3311.h",
}
end
+
+---------------------------------------------------
+-- Voltage Regulator
+--@src/devices/sound/volt_reg.h,SOUNDS["VOLT_REG"] = true
+---------------------------------------------------
+if (SOUNDS["VOLT_REG"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/sound/volt_reg.cpp",
+ MAME_DIR .. "src/devices/sound/volt_reg.h",
+ }
+end
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index aa4a8035006..0116a073a0e 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -261,6 +261,8 @@ SOUNDS["ES1373"] = true
SOUNDS["L7A1045"] = true
SOUNDS["AD1848"] = true
--SOUNDS["UPD1771"] = true
+SOUNDS["VOLT_REG"] = true
+--SOUNDS["MEA8000"] = true
--------------------------------------------------
-- specify available video cores
@@ -388,6 +390,7 @@ MACHINES["CR589"] = true
MACHINES["DS1204"] = true
MACHINES["DS1302"] = true
--MACHINES["DS1315"] = true
+--MACHINES["DS1386"] = true
MACHINES["DS2401"] = true
MACHINES["DS2404"] = true
MACHINES["DS75160A"] = true
@@ -440,7 +443,6 @@ MACHINES["LPCI"] = true
--MACHINES["M68307"] = true
--MACHINES["M68340"] = true
MACHINES["M6M80011AP"] = true
-MACHINES["MATSUCD"] = true
MACHINES["MB14241"] = true
MACHINES["MB3773"] = true
MACHINES["MB8421"] = true
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index b109a1a8b11..5ea435e4f73 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -261,6 +261,8 @@ SOUNDS["VRC6"] = true
SOUNDS["UPD1771"] = true
SOUNDS["GB_SOUND"] = true
SOUNDS["PCD3311"] = true
+SOUNDS["VOLT_REG"] = true
+SOUNDS["MEA8000"] = true
--------------------------------------------------
-- specify available video cores
@@ -394,6 +396,7 @@ MACHINES["DP8390"] = true
--MACHINES["DS1204"] = true
MACHINES["DS1302"] = true
MACHINES["DS1315"] = true
+MACHINES["DS1386"] = true
MACHINES["DS2401"] = true
MACHINES["DS2404"] = true
MACHINES["DS75160A"] = true
@@ -445,7 +448,6 @@ MACHINES["LSI53C810"] = true
MACHINES["M68307"] = true
MACHINES["M68340"] = true
MACHINES["M6M80011AP"] = true
-MACHINES["MATSUCD"] = true
MACHINES["MB14241"] = true
MACHINES["MB3773"] = true
MACHINES["MB8421"] = true
@@ -650,6 +652,7 @@ BUSES["IQ151"] = true
BUSES["ISA"] = true
BUSES["ISBX"] = true
BUSES["HP_OPTROM"] = true
+BUSES["HP9845_IO"] = true
BUSES["KC"] = true
BUSES["LPCI"] = true
BUSES["M5"] = true
@@ -866,6 +869,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"adc",
"alesis",
"altos",
+ "ami",
"amiga",
"amstrad",
"apf",
@@ -946,7 +950,6 @@ function linkProjects_mame_mess(_target, _subtarget)
"luxor",
"magnavox",
"makerbot",
- "marx",
"matsushi",
"mattel",
"mb",
@@ -981,7 +984,6 @@ function linkProjects_mame_mess(_target, _subtarget)
"osborne",
"osi",
"palm",
- "parker",
"pc",
"pdp1",
"pel",
@@ -1048,6 +1050,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"unisys",
"usp",
"veb",
+ "verifone",
"vidbrain",
"videoton",
"visual",
@@ -1243,8 +1246,6 @@ end
--------------------------------------------------
createMESSProjects(_target, _subtarget, "messshared")
files {
- MAME_DIR .. "src/mame/audio/mea8000.cpp",
- MAME_DIR .. "src/mame/audio/mea8000.h",
MAME_DIR .. "src/mame/machine/microdrv.cpp",
MAME_DIR .. "src/mame/machine/microdrv.h",
MAME_DIR .. "src/mame/machine/teleprinter.cpp",
@@ -1316,6 +1317,11 @@ files {
MAME_DIR .. "src/mame/drivers/altos486.cpp",
}
+createMESSProjects(_target, _subtarget, "ami")
+files {
+ MAME_DIR .. "src/mame/drivers/hh_amis2k.cpp",
+}
+
createMESSProjects(_target, _subtarget, "amiga")
files {
MAME_DIR .. "src/mame/drivers/amiga.cpp",
@@ -2118,11 +2124,6 @@ files {
MAME_DIR .. "src/mame/drivers/replicator.cpp",
}
-createMESSProjects(_target, _subtarget, "marx")
-files {
- MAME_DIR .. "src/mame/drivers/elecbowl.cpp",
-}
-
createMESSProjects(_target, _subtarget, "mattel")
files {
MAME_DIR .. "src/mame/drivers/aquarius.cpp",
@@ -2141,7 +2142,6 @@ files {
createMESSProjects(_target, _subtarget, "mb")
files {
- MAME_DIR .. "src/mame/drivers/mbdtower.cpp",
MAME_DIR .. "src/mame/drivers/microvsn.cpp",
MAME_DIR .. "src/mame/drivers/phantom.cpp",
}
@@ -2420,11 +2420,6 @@ files {
MAME_DIR .. "src/mame/drivers/palmz22.cpp",
}
-createMESSProjects(_target, _subtarget, "parker")
-files {
- MAME_DIR .. "src/mame/drivers/wildfire.cpp",
-}
-
createMESSProjects(_target, _subtarget, "pitronic")
files {
MAME_DIR .. "src/mame/drivers/beta.cpp",
@@ -3093,6 +3088,12 @@ files {
MAME_DIR .. "src/mame/drivers/sc2.cpp",
}
+createMESSProjects(_target, _subtarget, "verifone")
+files {
+ MAME_DIR .. "src/mame/drivers/tranz330.cpp",
+ MAME_DIR .. "src/mame/includes/tranz330.h"
+}
+
createMESSProjects(_target, _subtarget, "vidbrain")
files {
MAME_DIR .. "src/mame/drivers/vidbrain.cpp",
@@ -3210,11 +3211,13 @@ files {
createMESSProjects(_target, _subtarget, "skeleton")
files {
+ MAME_DIR .. "src/mame/drivers/aceex.cpp",
MAME_DIR .. "src/mame/drivers/akaiax80.cpp",
MAME_DIR .. "src/mame/drivers/alesis_qs.cpp",
MAME_DIR .. "src/mame/drivers/alphasma.cpp",
MAME_DIR .. "src/mame/drivers/ampro.cpp",
MAME_DIR .. "src/mame/drivers/amust.cpp",
+ MAME_DIR .. "src/mame/drivers/anzterm.cpp",
MAME_DIR .. "src/mame/drivers/applix.cpp",
MAME_DIR .. "src/mame/drivers/argox.cpp",
MAME_DIR .. "src/mame/drivers/attache.cpp",
diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua
index a3bdddbee98..8242f67c38e 100644
--- a/scripts/target/mame/nl.lua
+++ b/scripts/target/mame/nl.lua
@@ -45,6 +45,7 @@ SOUNDS["MSM5205"] = true
--SOUNDS["YM3812"] = true
--SOUNDS["CEM3394"] = true
--SOUNDS["VOTRAX"] = true
+SOUNDS["VOLT_REG"] = true
--------------------------------------------------
-- specify available video cores
diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua
index b9ed31261d5..0e770933bef 100644
--- a/scripts/target/mame/tiny.lua
+++ b/scripts/target/mame/tiny.lua
@@ -43,6 +43,7 @@ SOUNDS["HC55516"] = true
SOUNDS["YM3812"] = true
SOUNDS["CEM3394"] = true
SOUNDS["VOTRAX"] = true
+SOUNDS["VOLT_REG"] = true
--------------------------------------------------
-- specify available video cores
diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp
index 0cd70077cea..aa2281eff1e 100644
--- a/src/devices/bus/a2bus/a2dx1.cpp
+++ b/src/devices/bus/a2bus/a2dx1.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include "a2dx1.h"
#include "includes/apple2.h"
-#include "sound/dac.h"
+#include "a2dx1.h"
+#include "sound/volt_reg.h"
/***************************************************************************
PARAMETERS
@@ -22,12 +22,13 @@
const device_type A2BUS_DX1 = &device_creator<a2bus_dx1_device>;
-#define DAC_TAG "dac"
-
MACHINE_CONFIG_FRAGMENT( a2dx1 )
- MCFG_SPEAKER_STANDARD_MONO("dx1spkr")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "dx1spkr", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
@@ -51,14 +52,16 @@ machine_config_constructor a2bus_dx1_device::device_mconfig_additions() const
a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
+ m_dac(*this, "dac"),
+ m_dacvol(*this, "dacvol")
{
}
a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, A2BUS_DX1, "Decillonix DX-1", tag, owner, clock, "a2dx1", __FILE__),
device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
+ m_dac(*this, "dac"),
+ m_dacvol(*this, "dacvol")
{
}
@@ -70,14 +73,6 @@ void a2bus_dx1_device::device_start()
{
// set_a2bus_device makes m_slot valid
set_a2bus_device();
-
- save_item(NAME(m_volume));
- save_item(NAME(m_lastdac));
-}
-
-void a2bus_dx1_device::device_reset()
-{
- m_volume = m_lastdac = 0;
}
UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset)
@@ -101,14 +96,12 @@ void a2bus_dx1_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data
{
switch (offset)
{
- case 5: // volume
- m_volume = data;
- m_dac->write_unsigned16(data*m_lastdac);
+ case 5:
+ m_dacvol->write(data);
break;
case 6:
- m_lastdac = data;
- m_dac->write_unsigned16(data*m_volume);
+ m_dac->write(data);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2dx1.h b/src/devices/bus/a2bus/a2dx1.h
index ce349ab15d9..3dcf59e81e3 100644
--- a/src/devices/bus/a2bus/a2dx1.h
+++ b/src/devices/bus/a2bus/a2dx1.h
@@ -31,19 +31,16 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
+ required_device<dac_byte_interface> m_dacvol;
protected:
virtual void device_start() override;
- virtual void device_reset() override;
// overrides of standard a2bus slot functions
virtual UINT8 read_c0nx(address_space &space, UINT8 offset) override;
virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) override;
virtual bool take_c800() override;
-
-private:
- UINT8 m_volume, m_lastdac;
};
// device type definition
diff --git a/src/devices/bus/a2bus/a2sam.cpp b/src/devices/bus/a2bus/a2sam.cpp
index 7cdabc64b74..4d106f99d98 100644
--- a/src/devices/bus/a2bus/a2sam.cpp
+++ b/src/devices/bus/a2bus/a2sam.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include "a2sam.h"
#include "includes/apple2.h"
-#include "sound/dac.h"
+#include "a2sam.h"
+#include "sound/volt_reg.h"
/***************************************************************************
PARAMETERS
@@ -22,12 +22,11 @@
const device_type A2BUS_SAM = &device_creator<a2bus_sam_device>;
-#define DAC_TAG "dac"
-
MACHINE_CONFIG_FRAGMENT( a2sam )
- MCFG_SPEAKER_STANDARD_MONO("samspkr")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "samspkr", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
@@ -48,17 +47,10 @@ machine_config_constructor a2bus_sam_device::device_mconfig_additions() const
// LIVE DEVICE
//**************************************************************************
-a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
- device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG)
-{
-}
-
a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, A2BUS_SAM, "Don't Ask Software SAM", tag, owner, clock, "a2sam", __FILE__),
device_a2bus_card_interface(mconfig, *this),
- m_dac(*this, DAC_TAG)
+ m_dac(*this, "dac")
{
}
@@ -78,7 +70,7 @@ void a2bus_sam_device::device_reset()
void a2bus_sam_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
{
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
}
bool a2bus_sam_device::take_c800()
diff --git a/src/devices/bus/a2bus/a2sam.h b/src/devices/bus/a2bus/a2sam.h
index 5574a75c27c..cbf328454bd 100644
--- a/src/devices/bus/a2bus/a2sam.h
+++ b/src/devices/bus/a2bus/a2sam.h
@@ -25,13 +25,12 @@ class a2bus_sam_device:
{
public:
// construction/destruction
- a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
protected:
virtual void device_start() override;
diff --git a/src/devices/bus/a7800/a78_slot.cpp b/src/devices/bus/a7800/a78_slot.cpp
index cd0fa0269b7..93997f3fecd 100644
--- a/src/devices/bus/a7800/a78_slot.cpp
+++ b/src/devices/bus/a7800/a78_slot.cpp
@@ -523,7 +523,7 @@ std::string a78_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- dynamic_buffer head(128);
+ std::vector<UINT8> head(128);
int type = A78_TYPE0, mapper;
// Load and check the header
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h
index 0f4fd9d2e92..7267bce373a 100644
--- a/src/devices/bus/a7800/a78_slot.h
+++ b/src/devices/bus/a7800/a78_slot.h
@@ -69,8 +69,8 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
- dynamic_buffer m_nvram; // HiScore cart can save scores!
+ std::vector<UINT8> m_ram;
+ std::vector<UINT8> m_nvram; // HiScore cart can save scores!
// helpers
UINT32 m_base_rom;
int m_bank_mask;
diff --git a/src/devices/bus/a800/a800_slot.cpp b/src/devices/bus/a800/a800_slot.cpp
index 936e0849708..4aafc77f1d3 100644
--- a/src/devices/bus/a800/a800_slot.cpp
+++ b/src/devices/bus/a800/a800_slot.cpp
@@ -405,7 +405,7 @@ std::string a800_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- dynamic_buffer head(0x10);
+ std::vector<UINT8> head(0x10);
UINT32 len = m_file->size();
int type = A800_8K;
@@ -442,7 +442,7 @@ std::string a5200_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- dynamic_buffer head(0x10);
+ std::vector<UINT8> head(0x10);
UINT32 len = m_file->size();
int type = A5200_8K;
@@ -477,7 +477,7 @@ std::string xegs_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- dynamic_buffer head(0x10);
+ std::vector<UINT8> head(0x10);
UINT32 len = m_file->size();
int type = A800_8K;
diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h
index d1cf620bdc4..cc1b6ba275c 100644
--- a/src/devices/bus/a800/a800_slot.h
+++ b/src/devices/bus/a800/a800_slot.h
@@ -72,8 +72,8 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
- dynamic_buffer m_nvram; // HiScore cart can save scores!
+ std::vector<UINT8> m_ram;
+ std::vector<UINT8> m_nvram; // HiScore cart can save scores!
// helpers
int m_bank_mask;
};
diff --git a/src/devices/bus/amiga/zorro/a590.h b/src/devices/bus/amiga/zorro/a590.h
index 252074a2e33..90dc2cd589e 100644
--- a/src/devices/bus/amiga/zorro/a590.h
+++ b/src/devices/bus/amiga/zorro/a590.h
@@ -62,7 +62,7 @@ protected:
required_device<dmac_device> m_dmac;
required_device<wd33c93_device> m_wdc;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
// ======================> a590_device
diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h
index c2dba02fc08..709d2f396a0 100644
--- a/src/devices/bus/apf/slot.h
+++ b/src/devices/bus/apf/slot.h
@@ -47,7 +47,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/astrocde/ram.h b/src/devices/bus/astrocde/ram.h
index 673e7bef8d9..39d854827ac 100644
--- a/src/devices/bus/astrocde/ram.h
+++ b/src/devices/bus/astrocde/ram.h
@@ -26,7 +26,7 @@ public:
virtual DECLARE_WRITE8_MEMBER(write) override;
protected:
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
required_ioport m_write_prot;
};
@@ -71,7 +71,7 @@ public:
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
required_ioport m_write_prot;
};
@@ -94,7 +94,7 @@ public:
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
required_ioport m_write_prot;
};
@@ -117,7 +117,7 @@ public:
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
required_ioport m_write_prot;
};
diff --git a/src/devices/bus/centronics/covox.cpp b/src/devices/bus/centronics/covox.cpp
index 71a89f66219..f8d4da11a6b 100644
--- a/src/devices/bus/centronics/covox.cpp
+++ b/src/devices/bus/centronics/covox.cpp
@@ -7,8 +7,8 @@
***************************************************************************/
#include "emu.h"
-#include "sound/dac.h"
#include "covox.h"
+#include "sound/volt_reg.h"
//**************************************************************************
// COVOX DEVICE
@@ -19,10 +19,10 @@ const device_type CENTRONICS_COVOX = &device_creator<centronics_covox_device>;
static MACHINE_CONFIG_FRAGMENT( covox )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -59,7 +59,7 @@ void centronics_covox_device::device_start()
void centronics_covox_device::update_dac()
{
if (started())
- m_dac->write_unsigned8(m_data);
+ m_dac->write(m_data);
}
//**************************************************************************
@@ -72,12 +72,11 @@ const device_type CENTRONICS_COVOX_STEREO = &device_creator<centronics_covox_ste
static MACHINE_CONFIG_FRAGMENT( covox_stereo )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
-
- MCFG_SOUND_ADD("dac_left", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
- MCFG_SOUND_ADD("dac_right", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -91,9 +90,11 @@ MACHINE_CONFIG_END
centronics_covox_stereo_device::centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CENTRONICS_COVOX_STEREO, "Covox (Stereo-in-1)", tag, owner, clock, "covox_stereo", __FILE__),
device_centronics_peripheral_interface( mconfig, *this ),
- m_dac_left(*this, "dac_left"),
- m_dac_right(*this, "dac_right"), m_strobe(0),
- m_data(0), m_autofd(0)
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
+ m_strobe(0),
+ m_data(0),
+ m_autofd(0)
{
}
@@ -119,9 +120,9 @@ void centronics_covox_stereo_device::update_dac()
if (started())
{
if (m_strobe)
- m_dac_left->write_unsigned8(m_data);
+ m_ldac->write(m_data);
if (m_autofd)
- m_dac_right->write_unsigned8(m_data);
+ m_rdac->write(m_data);
}
}
diff --git a/src/devices/bus/centronics/covox.h b/src/devices/bus/centronics/covox.h
index 68eeff2212f..527c8d8e398 100644
--- a/src/devices/bus/centronics/covox.h
+++ b/src/devices/bus/centronics/covox.h
@@ -40,7 +40,7 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_data7 ) override { if (state) m_data |= 0x80; else m_data &= ~0x80; update_dac(); }
private:
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
void update_dac();
@@ -78,8 +78,8 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_autofd ) override { m_autofd = state; update_dac(); }
private:
- required_device<dac_device> m_dac_left;
- required_device<dac_device> m_dac_right;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
void update_dac();
diff --git a/src/devices/bus/centronics/digiblst.cpp b/src/devices/bus/centronics/digiblst.cpp
index 9fdbfd5c279..1b7ed87ce2f 100644
--- a/src/devices/bus/centronics/digiblst.cpp
+++ b/src/devices/bus/centronics/digiblst.cpp
@@ -7,8 +7,8 @@
*/
#include "emu.h"
-#include "sound/dac.h"
#include "digiblst.h"
+#include "sound/volt_reg.h"
//**************************************************************************
// COVOX DEVICE
@@ -19,10 +19,10 @@ const device_type CENTRONICS_DIGIBLASTER = &device_creator<centronics_digiblaste
static MACHINE_CONFIG_FRAGMENT( digiblst )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -59,5 +59,5 @@ void centronics_digiblaster_device::device_start()
void centronics_digiblaster_device::update_dac()
{
if (started())
- m_dac->write_unsigned8(m_data);
+ m_dac->write(m_data);
}
diff --git a/src/devices/bus/centronics/digiblst.h b/src/devices/bus/centronics/digiblst.h
index cec32eef1e9..6bf4956ee47 100644
--- a/src/devices/bus/centronics/digiblst.h
+++ b/src/devices/bus/centronics/digiblst.h
@@ -46,7 +46,7 @@ protected:
virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override { if (state) m_data &= ~0x80; else m_data |= 0x80; update_dac(); }
private:
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
void update_dac();
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 1ceeb810caf..a4578a312d8 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -26,6 +26,8 @@
*/
#include "epson_lx810l.h"
+#include "sound/volt_reg.h"
+
//extern const char layout_lx800[]; /* use layout from lx800 */
//#define LX810LDEBUG
@@ -130,7 +132,7 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l )
MCFG_UPD7810_AN6(READ8(epson_lx810l_t, an6_r))
MCFG_UPD7810_AN7(READ8(epson_lx810l_t, an7_r))
MCFG_UPD7810_CO0(WRITELINE(epson_lx810l_t, co0_w))
- MCFG_UPD7810_CO1(WRITELINE(epson_lx810l_t, co1_w))
+ MCFG_UPD7810_CO1(DEVWRITELINE("dac", dac_bit_interface, write))
// MCFG_DEFAULT_LAYOUT(layout_lx800)
@@ -143,9 +145,10 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l )
MCFG_SCREEN_UPDATE_DRIVER(epson_lx810l_t, screen_update_lx810l)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* gate array */
MCFG_DEVICE_ADD("e05a30", E05A30, 0)
@@ -292,7 +295,6 @@ epson_lx810l_t::epson_lx810l_t(const machine_config &mconfig, const char *tag, d
m_pf_stepper(*this, "pf_stepper"),
m_cr_stepper(*this, "cr_stepper"),
m_eeprom(*this, "eeprom"),
- m_dac(*this, "dac"),
m_e05a30(*this, "e05a30"),
m_screen(*this, "screen"),
m_93c06_clk(0),
@@ -313,7 +315,6 @@ epson_lx810l_t::epson_lx810l_t(const machine_config &mconfig, device_type type,
m_pf_stepper(*this, "pf_stepper"),
m_cr_stepper(*this, "cr_stepper"),
m_eeprom(*this, "eeprom"),
- m_dac(*this, "dac"),
m_e05a30(*this, "e05a30"),
m_screen(*this, "screen"),
m_93c06_clk(0),
@@ -352,7 +353,6 @@ void epson_lx810l_t::device_start()
void epson_lx810l_t::device_reset()
{
- m_dac->write_unsigned8(0);
}
@@ -602,11 +602,6 @@ WRITE_LINE_MEMBER( epson_lx810l_t::co0_w )
}
}
-WRITE_LINE_MEMBER( epson_lx810l_t::co1_w )
-{
- m_dac->write_unsigned8(0 - !state);
-}
-
/***************************************************************************
ADC
diff --git a/src/devices/bus/centronics/epson_lx810l.h b/src/devices/bus/centronics/epson_lx810l.h
index 6a58929a405..aa3fb556d2a 100644
--- a/src/devices/bus/centronics/epson_lx810l.h
+++ b/src/devices/bus/centronics/epson_lx810l.h
@@ -60,7 +60,6 @@ public:
/* Extended Timer Output */
DECLARE_WRITE_LINE_MEMBER(co0_w);
- DECLARE_WRITE_LINE_MEMBER(co1_w);
/* ADC */
DECLARE_READ8_MEMBER(an0_r);
@@ -117,7 +116,6 @@ private:
required_device<stepper_device> m_pf_stepper;
required_device<stepper_device> m_cr_stepper;
required_device<eeprom_serial_93cxx_device> m_eeprom;
- required_device<dac_device> m_dac;
required_device<e05a30_device> m_e05a30;
required_device<screen_device> m_screen;
diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h
index f1d3f0d2c88..d34b57fdb04 100644
--- a/src/devices/bus/chanf/slot.h
+++ b/src/devices/bus/chanf/slot.h
@@ -51,7 +51,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/coco/coco_orch90.cpp b/src/devices/bus/coco/coco_orch90.cpp
index 8f02d8612db..e81b585dfc2 100644
--- a/src/devices/bus/coco/coco_orch90.cpp
+++ b/src/devices/bus/coco/coco_orch90.cpp
@@ -14,14 +14,15 @@
#include "emu.h"
#include "coco_orch90.h"
-#include "sound/dac.h"
+#include "sound/volt_reg.h"
static MACHINE_CONFIG_FRAGMENT(coco_orch90)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("dac_left", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD("dac_right", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // ls374.ic5 + r7 (8x20k) + r9 (8x10k)
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // ls374.ic4 + r6 (8x20k) + r8 (8x10k)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//**************************************************************************
@@ -40,8 +41,10 @@ const device_type COCO_ORCH90 = &device_creator<coco_orch90_device>;
coco_orch90_device::coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, COCO_ORCH90, "CoCo Orch-90 PAK", tag, owner, clock, "coco_orch90", __FILE__),
- device_cococart_interface( mconfig, *this ), m_left_dac(nullptr), m_right_dac(nullptr)
- {
+ device_cococart_interface(mconfig, *this ),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac")
+{
}
//-------------------------------------------------
@@ -50,8 +53,6 @@ coco_orch90_device::coco_orch90_device(const machine_config &mconfig, const char
void coco_orch90_device::device_start()
{
- m_left_dac = subdevice<dac_device>("dac_left");
- m_right_dac = subdevice<dac_device>("dac_right");
}
//-------------------------------------------------
@@ -73,13 +74,11 @@ WRITE8_MEMBER(coco_orch90_device::write)
switch(offset)
{
case 0x3A:
- /* left channel write */
- m_left_dac->write_unsigned8(data);
+ m_ldac->write(data);
break;
case 0x3B:
- /* right channel write */
- m_right_dac->write_unsigned8(data);
+ m_rdac->write(data);
break;
}
}
diff --git a/src/devices/bus/coco/coco_orch90.h b/src/devices/bus/coco/coco_orch90.h
index 0dcc521ba85..a3554d63868 100644
--- a/src/devices/bus/coco/coco_orch90.h
+++ b/src/devices/bus/coco/coco_orch90.h
@@ -31,8 +31,8 @@ protected:
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
// internal state
- dac_device *m_left_dac;
- dac_device *m_right_dac;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
};
diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp
index 6f8453e3750..072e7e117c4 100644
--- a/src/devices/bus/cpc/amdrum.cpp
+++ b/src/devices/bus/cpc/amdrum.cpp
@@ -7,8 +7,9 @@
*/
#include "emu.h"
-#include "amdrum.h"
#include "includes/amstrad.h"
+#include "amdrum.h"
+#include "sound/volt_reg.h"
//**************************************************************************
@@ -19,9 +20,10 @@ const device_type CPC_AMDRUM = &device_creator<cpc_amdrum_device>;
static MACHINE_CONFIG_FRAGMENT( cpc_amdrum )
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// no pass-through
MACHINE_CONFIG_END
@@ -66,5 +68,5 @@ void cpc_amdrum_device::device_reset()
WRITE8_MEMBER(cpc_amdrum_device::dac_w)
{
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
}
diff --git a/src/devices/bus/cpc/amdrum.h b/src/devices/bus/cpc/amdrum.h
index 5a3df11d273..9f0b753f763 100644
--- a/src/devices/bus/cpc/amdrum.h
+++ b/src/devices/bus/cpc/amdrum.h
@@ -38,7 +38,7 @@ protected:
private:
cpc_expansion_slot_device *m_slot;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
};
// device type definition
diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp
index 6f9a6313a64..711c7978aa3 100644
--- a/src/devices/bus/cpc/magicsound.cpp
+++ b/src/devices/bus/cpc/magicsound.cpp
@@ -8,8 +8,9 @@
*/
#include "emu.h"
-#include "magicsound.h"
#include "includes/amstrad.h"
+#include "magicsound.h"
+#include "sound/volt_reg.h"
//**************************************************************************
@@ -55,9 +56,10 @@ static MACHINE_CONFIG_FRAGMENT( al_magicsound )
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(al_magicsound_device,da0_w))
MCFG_PIT8253_CLK2(XTAL_4MHz)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// no pass-through(?)
MACHINE_CONFIG_END
@@ -73,7 +75,7 @@ machine_config_constructor al_magicsound_device::device_mconfig_additions() cons
al_magicsound_device::al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, AL_MAGICSOUND, "Magic Sound Board", tag, owner, clock, "al_magicsound", __FILE__),
device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
- m_dac1(*this,"dac1"),
+ m_dac(*this,"dac"),
m_dmac(*this,"dmac"),
m_timer1(*this,"timer1"),
m_timer2(*this,"timer2"), m_current_channel(0), m_ramptr(nullptr), m_current_output(0)
@@ -148,7 +150,7 @@ WRITE8_MEMBER(al_magicsound_device::mapper_w)
WRITE_LINE_MEMBER(al_magicsound_device::da0_w)
{
- m_dac1->write_unsigned8(m_output[m_current_output++]);
+ m_dac->write(m_output[m_current_output++]);
if(m_current_output > 3)
m_current_output = 0;
}
diff --git a/src/devices/bus/cpc/magicsound.h b/src/devices/bus/cpc/magicsound.h
index 519e820bac4..1c52a186f54 100644
--- a/src/devices/bus/cpc/magicsound.h
+++ b/src/devices/bus/cpc/magicsound.h
@@ -68,7 +68,7 @@ protected:
private:
cpc_expansion_slot_device *m_slot;
- required_device<dac_device> m_dac1;
+ required_device<dac_byte_interface> m_dac;
required_device<am9517a_device> m_dmac;
required_device<pit8254_device> m_timer1;
required_device<pit8254_device> m_timer2;
diff --git a/src/devices/bus/cpc/symbfac2.h b/src/devices/bus/cpc/symbfac2.h
index 04bc55bae4d..5f5671485aa 100644
--- a/src/devices/bus/cpc/symbfac2.h
+++ b/src/devices/bus/cpc/symbfac2.h
@@ -62,7 +62,7 @@ private:
required_ioport m_mouse_y;
required_ioport m_mouse_buttons;
- dynamic_buffer m_rom_space;
+ std::vector<UINT8> m_rom_space;
bool m_iohigh;
UINT16 m_ide_data;
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp
index 157f5a6130e..c6182053665 100644
--- a/src/devices/bus/gameboy/gb_slot.cpp
+++ b/src/devices/bus/gameboy/gb_slot.cpp
@@ -597,7 +597,7 @@ std::string base_gb_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size(), offset = 0;
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h
index 75a8b4e7cde..d333c524b07 100644
--- a/src/devices/bus/gameboy/gb_slot.h
+++ b/src/devices/bus/gameboy/gb_slot.h
@@ -85,7 +85,7 @@ public:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
// bankswitch variables
// we access ROM/RAM banks through these bank maps
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp
index fc7c723ac15..ad03df06299 100644
--- a/src/devices/bus/gba/gba_slot.cpp
+++ b/src/devices/bus/gba/gba_slot.cpp
@@ -433,7 +433,7 @@ std::string gba_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index a3e07f68ef4..429441b3663 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -45,7 +45,7 @@ public:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
// this replaces m_rom for non-user configurable carts!
optional_memory_region m_region;
diff --git a/src/devices/bus/hp9845_io/98035.cpp b/src/devices/bus/hp9845_io/98035.cpp
new file mode 100644
index 00000000000..5e06d4433c5
--- /dev/null
+++ b/src/devices/bus/hp9845_io/98035.cpp
@@ -0,0 +1,777 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ 98035.cpp
+
+ 98035 module (Real time clock)
+
+ This module has two main functions: it is a battery-backed real
+ time clock and a timer/counter module.
+ It is based on a HP Nanoprocessor CPU having 2K of firmware ROM
+ and 256 bytes of RAM. This processor parses and executes commands
+ that are sent by a HP98xx system and returns the results. All
+ I/O happens (mostly) through ASCII strings.
+ A 1 MHz crystal provides both the clock to the CPU (it runs at 500 kHz)
+ and a periodic 1 kHz interrupt.
+ When main power is removed, time is counted by an unnamed "clock chip"
+ that is powered by a NiCd battery. It appears that HP had such an
+ hard time finding the clock chip that they had to adapt one
+ made for counting and displaying time on a 7-segment display. This
+ chip was probably manufactured for alarm clocks and/or wristwatches.
+ Nanoprocessor parses the digits on the "display" and translates
+ them into a standard month-day-hours-minutes-seconds time.
+ The biggest limit of the clock chip is that it lacks a counter
+ for current year (and so the module cannot recognize leap years).
+ For further info on this module see also:
+ http://www.hp9825.com/html/real-time_clock.html
+
+ This driver tries to reproduce in C++ the behaviour of the
+ nanoprocessor because I couldn't find any dump of the firmware ROM
+ (HP part-no 1818-0469).
+ The following commands are recognized in my "imitation":
+ A Halt all timer units
+ B Warm reset
+ E Read & clear interface errors
+ F Activate all timer units
+ R Read real time clock
+ S Set real time clock
+ T Read trigger status
+ U Control timer units
+ W Read lost interrupts
+
+ The main reference for this module is this manual:
+ HP, 98035A Real Time Clock Installation and Operation Manual
+
+*********************************************************************/
+
+#include "98035.h"
+#include "coreutil.h"
+
+// Debugging
+#define VERBOSE 0
+#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
+
+#define BIT_MASK(n) (1U << (n))
+
+// Macros to clear/set single bits
+#define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n))
+#define BIT_SET(w , n) ((w) |= BIT_MASK(n))
+
+// Possible delimiters
+#define DELIM_CH_0 '/'
+#define DELIM_CH_1 '\n'
+
+// Error masks in m_error
+#define ERR_MASK_INT_MISSED BIT_MASK(0)
+#define ERR_MASK_WRONG_INS BIT_MASK(1)
+#define ERR_MASK_WRONG_UNIT BIT_MASK(2)
+#define ERR_MASK_CANT_EXEC BIT_MASK(3)
+
+// Empty date/time fields
+#define EMPTY_FIELD 0xff
+
+// Timers
+enum {
+ MSEC_TMR_ID
+};
+
+hp98035_io_card::hp98035_io_card(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : hp9845_io_card_device(mconfig , HP98035_IO_CARD , "HP98035 card" , tag , owner , clock , "hp98035" , __FILE__)
+{
+}
+
+hp98035_io_card::~hp98035_io_card()
+{
+}
+
+static INPUT_PORTS_START(hp98035_port)
+ MCFG_HP9845_IO_SC
+INPUT_PORTS_END
+
+ioport_constructor hp98035_io_card::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(hp98035_port);
+}
+
+void hp98035_io_card::device_start()
+{
+ m_msec_timer = timer_alloc(MSEC_TMR_ID);
+}
+
+void hp98035_io_card::device_reset()
+{
+ hp9845_io_card_device::device_reset();
+ install_readwrite_handler(read16_delegate(FUNC(hp98035_io_card::reg_r) , this) , write16_delegate(FUNC(hp98035_io_card::reg_w) , this));
+
+ m_idr_full = false;
+ m_idr = 0;
+ m_odr = 0;
+ m_ibuffer_ptr = 0;
+ m_obuffer_len = 0;
+ m_obuffer_ptr = 0;
+ sts_w(true);
+ set_flg(true);
+
+ // Set real time from the real world
+ system_time systime;
+ machine().base_datetime(systime);
+ m_msec = 0;
+ m_sec = systime.local_time.second;
+ m_min = systime.local_time.minute;
+ m_hrs = systime.local_time.hour;
+ m_dom = systime.local_time.mday;
+ m_mon = systime.local_time.month + 1;
+
+ attotime period(attotime::from_msec(1));
+ m_msec_timer->adjust(period , 0 , period);
+
+ half_init();
+}
+
+void hp98035_io_card::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ if (id == MSEC_TMR_ID) {
+ // Update real time
+ m_msec++;
+ if (m_msec >= 1000) {
+ m_msec = 0;
+ m_sec++;
+ if (m_sec >= 60) {
+ m_sec = 0;
+ m_min++;
+ if (m_min >= 60) {
+ m_min = 0;
+ m_hrs++;
+ if (m_hrs >= 24) {
+ m_hrs = 0;
+ m_dom++;
+ // Use year 1: this RTC doesn't know the year and so it never advances
+ // the date to february 29th
+ if (m_dom > gregorian_days_in_month(m_mon , 1)) {
+ m_dom = 1;
+ m_mon++;
+ if (m_mon > 12) {
+ m_mon = 1;
+ }
+ }
+ }
+ }
+ }
+
+ // Every second: check if new real time matches in any active output unit
+ for (timer_unit_t& unit : m_units) {
+ if (!unit.m_input && unit.m_state == UNIT_ACTIVE &&
+ m_sec == unit.m_match_datetime[ 3 ] &&
+ (unit.m_match_datetime[ 2 ] == EMPTY_FIELD ||
+ (m_min == unit.m_match_datetime[ 2 ] &&
+ (unit.m_match_datetime[ 1 ] == EMPTY_FIELD ||
+ (m_hrs == unit.m_match_datetime[ 1 ] &&
+ (unit.m_match_datetime[ 0 ] == EMPTY_FIELD ||
+ m_dom == unit.m_match_datetime[ 0 ])))))) {
+ // Matched
+ unit.adv_state();
+ LOG(("matched %02u:%03u %p %d %u\n" , m_sec , m_msec , &unit , unit.m_state , unit.m_value));
+ }
+ }
+ }
+
+ // Every ms: advance active units
+ UINT8 triggered = 0;
+ for (timer_unit_t& unit : m_units) {
+ if (unit.m_state != UNIT_IDLE) {
+ if (unit.m_input && unit.m_state == UNIT_ACTIVE) {
+ // Input unit: it just counts msecs
+ // In the real 98035 there is a limit value of 1E+10: not simulated here
+ unit.m_value++;
+ } else if (!unit.m_input && unit.m_state == UNIT_WAIT_FOR_TO &&
+ (unit.m_value == 0 || --unit.m_value == 0)) {
+ // Output unit that is not waiting for real time match and that just reached timeout
+ // Triggered!
+ LOG(("triggered %02u:%03u %p\n" , m_sec , m_msec , &unit));
+ BIT_SET(triggered, unit.m_port - 1);
+ unit.adv_state();
+ if (unit.m_value == 0) {
+ LOG(("deact %p\n" , &unit));
+ unit.deactivate();
+ }
+ }
+ }
+ }
+ // Generate IRQ
+ if (triggered) {
+ // Store which output(s) triggered
+ m_triggered = triggered;
+ if (m_inten) {
+ m_irq = true;
+ update_irq();
+ LOG(("IRQ %02x\n" , m_triggered));
+ } else if (m_intflag) {
+ set_error(ERR_MASK_INT_MISSED);
+ // Record lost interrupts
+ m_lost_irq = triggered;
+ LOG(("lost %02x\n" , m_triggered));
+ }
+ }
+ }
+}
+
+READ16_MEMBER(hp98035_io_card::reg_r)
+{
+ UINT16 res;
+
+ switch (offset) {
+ case 0:
+ // R4: ODR
+ res = m_odr;
+ break;
+
+ case 1:
+ // R5: Status register
+ res = 0x20;
+ if (m_inten) {
+ BIT_SET(res , 7);
+ }
+ if (m_intflag) {
+ BIT_SET(res , 1);
+ }
+ if (m_error) {
+ BIT_SET(res , 0);
+ }
+ break;
+
+ default:
+ res = 0;
+ break;
+ }
+
+ LOG(("read R%u=%04x\n" , offset + 4 , res));
+ return res;
+}
+
+WRITE16_MEMBER(hp98035_io_card::reg_w)
+{
+ bool new_inten;
+
+ switch (offset) {
+ case 0:
+ // R4: IDR
+ m_idr = (UINT8)data;
+ m_idr_full = true;
+ update_ibuffer();
+ break;
+
+ case 1:
+ // R5: interrupt enable
+ new_inten = BIT(data , 7);
+ if (!m_inten && new_inten) {
+ m_intflag = true;
+ }
+ m_inten = new_inten;
+ update_irq();
+ break;
+
+ case 3:
+ // R7: trigger
+ set_flg(false);
+ update_ibuffer();
+ update_obuffer();
+ break;
+ }
+
+ LOG(("write R%u=%04x\n" , offset + 4 , data));
+}
+
+void hp98035_io_card::half_init(void)
+{
+ m_inten = false;
+ m_intflag = false;
+ m_irq = false;
+ m_error = 0;
+ m_triggered = 0;
+ m_lost_irq = 0;
+ update_irq();
+
+ for (timer_unit_t& unit : m_units) {
+ unit.init();
+ }
+ // Unit 1 defaults to output 1
+ // Unit 2 defaults to input 1
+ m_units[ 0 ].m_input = false;
+ m_units[ 0 ].m_port = 1;
+ m_units[ 1 ].m_input = true;
+ m_units[ 1 ].m_port = 1;
+
+ set_obuffer('\n');
+}
+
+void hp98035_io_card::set_flg(bool value)
+{
+ m_flg = value;
+ flg_w(m_flg);
+}
+
+void hp98035_io_card::update_irq(void)
+{
+ if (!m_inten) {
+ m_irq = false;
+ }
+ irq_w(m_inten && m_irq);
+}
+
+void hp98035_io_card::update_ibuffer(void)
+{
+ if (m_idr_full && !m_flg) {
+ // New input byte, put in ibuffer if it's a valid char (A-Z 0-9 = / \n)
+ if (m_idr == DELIM_CH_0 || m_idr == DELIM_CH_1) {
+ process_ibuffer();
+ } else if (((m_idr >= 'A' && m_idr <= 'Z') || (m_idr >= '0' && m_idr <= '9') || m_idr == '=') &&
+ m_ibuffer_ptr < HP98035_IBUFFER_LEN) {
+ m_ibuffer[ m_ibuffer_ptr++ ] = m_idr;
+ }
+ m_idr_full = false;
+ set_flg(true);
+ }
+}
+
+void hp98035_io_card::process_ibuffer(void)
+{
+ m_ibuffer[ m_ibuffer_ptr ] = '\0';
+ const UINT8 *p = &m_ibuffer[ 0 ];
+
+ clear_obuffer();
+
+ bool get_out = false;
+
+ while (*p != '\0' && !get_out) {
+ std::ostringstream out;
+ UINT8 datetime[ 5 ];
+ unsigned unit_no;
+
+ switch (*p++) {
+ case 'A':
+ // Halt all timer units
+ for (timer_unit_t& unit : m_units) {
+ unit.deactivate();
+ }
+ m_inten = false;
+ m_intflag = false;
+ update_irq();
+ break;
+
+ case 'B':
+ // Warm reset
+ half_init();
+ get_out = true;
+ break;
+
+ case 'E':
+ // Read and clear errors
+ set_obuffer(m_error);
+ m_error = 0;
+ break;
+
+ case 'F':
+ // Activate all timer units
+ for (timer_unit_t& unit : m_units) {
+ if (unit.m_port) {
+ unit.adv_state(true);
+ }
+ }
+ break;
+
+ case 'R':
+ // Read time
+ // Assume US format of dates
+ util::stream_format(out , "%02u:%02u:%02u:%02u:%02u" , m_mon , m_dom , m_hrs , m_min , m_sec);
+ set_obuffer(out.str().c_str());
+ break;
+
+ case 'S':
+ // Set time
+ if (parse_datetime(p , datetime)) {
+ // Cannot set time when there's one or more active output units
+ if (std::any_of(std::begin(m_units) , std::end(m_units) , [](const timer_unit_t& u) { return u.m_state != UNIT_IDLE && !u.m_input; })) {
+ set_error(ERR_MASK_CANT_EXEC);
+ } else {
+ m_msec = 0;
+ m_sec = datetime[ 4 ];
+ if (datetime[ 3 ] != EMPTY_FIELD) {
+ m_min = datetime[ 3 ];
+ if (datetime[ 2 ] != EMPTY_FIELD) {
+ m_hrs = datetime[ 2 ];
+ if (datetime[ 1 ] != EMPTY_FIELD) {
+ m_dom = datetime[ 1 ];
+ if (datetime[ 0 ] != EMPTY_FIELD) {
+ m_mon = datetime[ 0 ];
+ }
+ }
+ }
+ }
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ get_out = true;
+ }
+ break;
+
+ case 'T':
+ // Read triggered outputs
+ set_obuffer(m_triggered);
+ m_triggered = 0;
+ break;
+
+ case 'U':
+ // Control timer units
+ if (parse_unit_no(p , unit_no)) {
+ get_out = parse_unit_command(p , unit_no);
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ get_out = true;
+ }
+ break;
+
+ case 'W':
+ // Read unserviced interrupts
+ set_obuffer(m_lost_irq);
+ m_lost_irq = 0;
+ break;
+
+ default:
+ set_error(ERR_MASK_WRONG_INS);
+ get_out = true;
+ break;
+ }
+ }
+
+ m_ibuffer_ptr = 0;
+}
+
+bool hp98035_io_card::assign_unit(timer_unit_t& unit , const UINT8*& p , bool input)
+{
+ unsigned port_no;
+
+ if (parse_unit_no(p , port_no)) {
+ if (unit.m_state == UNIT_IDLE) {
+ unit.init();
+
+ if (std::any_of(std::begin(m_units) , std::end(m_units) , [input , port_no](const timer_unit_t& u) { return u.m_input == input && u.m_port == port_no; })) {
+ // I/O port already assigned
+ set_error(ERR_MASK_WRONG_UNIT);
+ return false;
+ }
+
+ unit.m_input = input;
+ unit.m_port = port_no;
+ } else {
+ set_error(ERR_MASK_CANT_EXEC);
+ }
+ return false;
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ return true;
+ }
+}
+
+bool hp98035_io_card::parse_unit_command(const UINT8*& p, unsigned unit_no)
+{
+ unit_no--;
+ timer_unit_t& unit = m_units[ unit_no ];
+ bool get_out = false;
+ unsigned msec;
+ UINT8 to_match[ 5 ];
+ std::ostringstream out;
+
+ LOG(("U %c %u %p\n" , *p , unit_no , &unit));
+
+ switch (*p++) {
+ case '=':
+ // Assign unit
+ if (*p == 'I') {
+ p++;
+ get_out = assign_unit(unit , p , true);
+ } else if (*p == 'O') {
+ p++;
+ get_out = assign_unit(unit , p , false);
+ }
+ break;
+
+ case 'C':
+ // Clear input unit
+ if (unit.m_input && unit.m_port) {
+ unit.m_value = 0;
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ break;
+
+ case 'D':
+ // Set delay on output unit
+ if (parse_msec(p , msec)) {
+ if (!unit.m_input && unit.m_port) {
+ if (unit.m_state == UNIT_IDLE) {
+ unit.m_delay = msec;
+ } else {
+ set_error(ERR_MASK_CANT_EXEC);
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ }
+ get_out = true;
+ break;
+
+ case 'G':
+ // Activate unit
+ if (unit.m_port && unit.m_state == UNIT_IDLE) {
+ unit.adv_state(true);
+
+ LOG(("act %p %d %d %u %02u:%02u:%02u:%02u %u %u %u\n" , &unit , unit.m_state , unit.m_input , unit.m_port , unit.m_match_datetime[ 0 ] , unit.m_match_datetime[ 1 ] , unit.m_match_datetime[ 2 ] , unit.m_match_datetime[ 3 ] , unit.m_delay , unit.m_period , unit.m_value));
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ break;
+
+ case 'H':
+ // Halt unit
+ if (unit.m_port) {
+ unit.deactivate();
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ break;
+
+ case 'M':
+ // Set date/time to match on output unit
+ if (!unit.m_input && unit.m_port) {
+ if (unit.m_state == UNIT_IDLE) {
+ if (*p == '\0') {
+ unit.m_match_datetime[ 0 ] = EMPTY_FIELD;
+ unit.m_match_datetime[ 1 ] = EMPTY_FIELD;
+ unit.m_match_datetime[ 2 ] = EMPTY_FIELD;
+ unit.m_match_datetime[ 3 ] = EMPTY_FIELD;
+ } else if (parse_datetime(p , to_match) && *p == '\0') {
+ unit.m_match_datetime[ 0 ] = to_match[ 1 ];
+ unit.m_match_datetime[ 1 ] = to_match[ 2 ];
+ unit.m_match_datetime[ 2 ] = to_match[ 3 ];
+ unit.m_match_datetime[ 3 ] = to_match[ 4 ];
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ }
+ } else {
+ set_error(ERR_MASK_CANT_EXEC);
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ get_out = true;
+ break;
+
+ case 'P':
+ // Set period on output unit
+ if (parse_msec(p , msec)) {
+ if (!unit.m_input && unit.m_port) {
+ if (unit.m_state == UNIT_IDLE) {
+ unit.m_period = msec;
+ } else {
+ set_error(ERR_MASK_CANT_EXEC);
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ } else {
+ set_error(ERR_MASK_WRONG_INS);
+ }
+ get_out = true;
+ break;
+
+ case 'V':
+ // Get value of input unit
+ if (unit.m_input && unit.m_port) {
+ util::stream_format(out , "%010u" , unit.m_value);
+ set_obuffer(out.str().c_str());
+ } else {
+ set_error(ERR_MASK_WRONG_UNIT);
+ }
+ break;
+ }
+
+ return get_out;
+}
+
+void hp98035_io_card::clear_obuffer(void)
+{
+ m_obuffer_len = 0;
+ m_obuffer_ptr = 0;
+}
+
+void hp98035_io_card::set_obuffer(UINT8 b)
+{
+ m_obuffer[ 0 ] = b;
+ m_obuffer_len = 1;
+ m_obuffer_ptr = 0;
+}
+
+void hp98035_io_card::set_obuffer(const char* s)
+{
+ unsigned s_len = std::min((unsigned)strlen(s) , (unsigned)(HP98035_OBUFFER_LEN - 1));
+
+ memcpy(&m_obuffer[ 0 ] , s , s_len);
+ m_obuffer[ s_len++ ] = '\n';
+ m_obuffer_len = s_len;
+ m_obuffer_ptr = 0;
+}
+
+void hp98035_io_card::update_obuffer(void)
+{
+ if (!m_idr_full && !m_flg && m_obuffer_ptr < m_obuffer_len) {
+ m_odr = m_obuffer[ m_obuffer_ptr++ ];
+ set_flg(true);
+ }
+}
+
+void hp98035_io_card::set_error(UINT8 mask)
+{
+ m_error |= mask;
+}
+
+bool hp98035_io_card::parse_datetime(const UINT8*& p, UINT8 *out) const
+{
+ unsigned n_fields = 0;
+
+ // Fill all fields with EMPTY_FIELD
+ for (unsigned i = 0; i < 5; i++) {
+ out[ i ] = EMPTY_FIELD;
+ }
+
+ while (n_fields < 5 && *p >= '0' && *p <= '9') {
+ unsigned tmp = *p - '0';
+ p++;
+ if (*p < '0' || *p > '9') {
+ return false;
+ }
+ // Shift all fields one position to the left
+ memmove(&out[ 0 ] , &out[ 1 ] , 4 * sizeof(out[ 0 ]));
+ // Put the new field in the last position
+ out[ 4 ] = (UINT8)(tmp * 10 + *p - '0');
+ n_fields++;
+ p++;
+ }
+
+ if (n_fields == 0) {
+ return false;
+ }
+
+ // Seconds
+ if (out[ 4 ] >= 60) {
+ return false;
+ }
+ if (n_fields == 1) {
+ return true;
+ }
+ // Minutes
+ if (out[ 3 ] >= 60) {
+ return false;
+ }
+ if (n_fields == 2) {
+ return true;
+ }
+ // Hours
+ if (out[ 2 ] >= 24) {
+ return false;
+ }
+ if (n_fields == 3) {
+ return true;
+ }
+ // Month
+ UINT8 month;
+ if (n_fields == 4) {
+ month = m_mon;
+ } else {
+ if (out[ 0 ] < 1 || out[ 0 ] > 12) {
+ return false;
+ }
+ month = out[ 0 ];
+ }
+ // Day of month
+ // Use year 0 here to allow for February 29th
+ if (out[ 1 ] < 1 || out[ 1 ] > gregorian_days_in_month(month , 0)) {
+ return false;
+ }
+ return true;
+}
+
+bool hp98035_io_card::parse_unit_no(const UINT8*& p, unsigned& unit) const
+{
+ if (*p < '1' || *p > '0' + HP98035_UNIT_COUNT) {
+ return false;
+ }
+ unit = *p - '0';
+
+ do {
+ p++;
+ } while (*p >= '0' && *p <= '9');
+
+ return true;
+}
+
+bool hp98035_io_card::parse_msec(const UINT8*& p, unsigned& msec) const
+{
+ msec = 0;
+
+ while (*p >= '0' && *p <= '9') {
+ msec = msec * 10 + *p - '0';
+ p++;
+ }
+
+ return *p == '\0';
+}
+
+void hp98035_io_card::timer_unit_t::init(void)
+{
+ m_state = UNIT_IDLE;
+ m_port = 0;
+ m_match_datetime[ 0 ] = EMPTY_FIELD;
+ m_match_datetime[ 1 ] = EMPTY_FIELD;
+ m_match_datetime[ 2 ] = EMPTY_FIELD;
+ m_match_datetime[ 3 ] = EMPTY_FIELD;
+ m_delay = 0;
+ m_period = 0;
+ m_value = 0;
+}
+
+void hp98035_io_card::timer_unit_t::deactivate(void)
+{
+ m_state = UNIT_IDLE;
+}
+
+void hp98035_io_card::timer_unit_t::adv_state(bool reset)
+{
+ if (reset) {
+ m_state = UNIT_IDLE;
+ }
+
+ if (m_input) {
+ m_state = UNIT_ACTIVE;
+ m_value = 0;
+ } else {
+ if (m_state == UNIT_IDLE) {
+ m_state = UNIT_ACTIVE;
+ if (m_match_datetime[ 3 ] != EMPTY_FIELD) {
+ // Seconds field is not empty -> there's a date/time to be matched first
+ return;
+ }
+ }
+ if (m_state == UNIT_ACTIVE) {
+ m_value = m_delay;
+ } else {
+ m_value = m_period;
+ }
+ m_state = UNIT_WAIT_FOR_TO;
+ }
+}
+
+// device type definition
+const device_type HP98035_IO_CARD = &device_creator<hp98035_io_card>;
diff --git a/src/devices/bus/hp9845_io/98035.h b/src/devices/bus/hp9845_io/98035.h
new file mode 100644
index 00000000000..f3e9a21f7ac
--- /dev/null
+++ b/src/devices/bus/hp9845_io/98035.h
@@ -0,0 +1,109 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ 98035.h
+
+ 98035 module (Real time clock)
+
+*********************************************************************/
+
+#pragma once
+
+#ifndef _98035_H_
+#define _98035_H_
+
+#include "hp9845_io.h"
+
+#define HP98035_IBUFFER_LEN 16 // Totally arbitrary
+#define HP98035_OBUFFER_LEN 16 // Totally arbitrary
+#define HP98035_UNIT_COUNT 4 // Count of counter/timer units
+
+class hp98035_io_card : public hp9845_io_card_device
+{
+public:
+ // construction/destruction
+ hp98035_io_card(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~hp98035_io_card();
+
+ // device-level overrides
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ DECLARE_READ16_MEMBER(reg_r);
+ DECLARE_WRITE16_MEMBER(reg_w);
+
+private:
+ // Interface state
+ bool m_flg;
+ bool m_inten;
+ bool m_intflag;
+ bool m_irq;
+ bool m_idr_full;
+ UINT8 m_idr; // Input Data Register
+ UINT8 m_odr; // Output Data Register
+ UINT8 m_error;
+ UINT8 m_triggered;
+ UINT8 m_lost_irq;
+ UINT8 m_ibuffer[ HP98035_IBUFFER_LEN + 1 ];
+ unsigned m_ibuffer_ptr;
+ UINT8 m_obuffer[ HP98035_OBUFFER_LEN ];
+ unsigned m_obuffer_len;
+ unsigned m_obuffer_ptr;
+
+ // Clock/timer state
+ unsigned m_msec; // Milliseconds
+ UINT8 m_sec; // Seconds
+ UINT8 m_min; // Minutes
+ UINT8 m_hrs; // Hours
+ UINT8 m_dom; // Day of month
+ UINT8 m_mon; // Month
+ // Strangely enough this RTC has no notion of current year
+ emu_timer *m_msec_timer;
+
+ // Timer units
+ typedef enum {
+ UNIT_IDLE, // Not active
+ UNIT_ACTIVE, // Active (output units: waiting for date/time match)
+ UNIT_WAIT_FOR_TO // Active, output units only: waiting for timeout
+ } unit_state_t;
+
+ typedef struct {
+ unit_state_t m_state; // State
+ bool m_input; // Input or output
+ UINT8 m_port; // Assigned port # (0 if not assigned)
+ UINT8 m_match_datetime[ 4 ]; // Date&time to match (month is not included)
+ unsigned m_delay; // Timer delay
+ unsigned m_period; // Timer period (when != 0)
+ unsigned m_value; // Current counter value
+
+ void init(void);
+ void deactivate(void);
+ void adv_state(bool reset = false);
+ } timer_unit_t;
+
+ timer_unit_t m_units[ HP98035_UNIT_COUNT ];
+
+ void half_init(void);
+ void set_flg(bool value);
+ void update_irq(void);
+ void update_ibuffer(void);
+ void process_ibuffer(void);
+ bool assign_unit(timer_unit_t& unit , const UINT8*& p , bool input);
+ bool parse_unit_command(const UINT8*& p, unsigned unit_no);
+ void clear_obuffer(void);
+ void set_obuffer(UINT8 b);
+ void set_obuffer(const char* s);
+ void update_obuffer(void);
+ void set_error(UINT8 mask);
+ bool parse_datetime(const UINT8*& p, UINT8 *out) const;
+ bool parse_unit_no(const UINT8*& p, unsigned& unit) const;
+ bool parse_msec(const UINT8*& p, unsigned& msec) const;
+};
+
+// device type definition
+extern const device_type HP98035_IO_CARD;
+
+#endif /* _98035_H_ */
diff --git a/src/devices/bus/hp9845_io/hp9845_io.cpp b/src/devices/bus/hp9845_io/hp9845_io.cpp
new file mode 100644
index 00000000000..7ea48639b15
--- /dev/null
+++ b/src/devices/bus/hp9845_io/hp9845_io.cpp
@@ -0,0 +1,86 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ hp9845_io.cpp
+
+ I/O bus of HP9845 systems
+
+*********************************************************************/
+
+#include "hp9845_io.h"
+#include "includes/hp9845.h"
+
+// device type definition
+const device_type HP9845_IO_SLOT = &device_creator<hp9845_io_slot_device>;
+
+// +---------------------+
+// |hp9845_io_slot_device|
+// +---------------------+
+hp9845_io_slot_device::hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, HP9845_IO_SLOT, "HP9845 I/O Slot", tag, owner, clock, "hp9845_io_slot", __FILE__),
+ device_slot_interface(mconfig, *this)
+{
+ //printf("hp9845_io_slot_device %s %p\n" , tag , this);
+}
+
+hp9845_io_slot_device::~hp9845_io_slot_device()
+{
+}
+
+void hp9845_io_slot_device::device_start()
+{
+ //printf("hp9845_io_slot_device::device_start\n");
+}
+
+// +---------------------+
+// |hp9845_io_card_device|
+// +---------------------+
+hp9845_io_card_device::hp9845_io_card_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+ device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_slot_card_interface(mconfig, *this),
+ m_sys(nullptr),
+ m_select_code_port(*this , "SC"),
+ m_my_sc(0)
+{
+}
+
+hp9845_io_card_device::~hp9845_io_card_device()
+{
+}
+
+void hp9845_io_card_device::device_reset()
+{
+ m_my_sc = m_select_code_port->read() + HP9845_IO_FIRST_SC;
+ //printf("m_my_sc=%u\n" , m_my_sc);
+}
+
+void hp9845_io_card_device::irq_w(int state)
+{
+ m_sys->irq_w(m_my_sc , state);
+}
+
+void hp9845_io_card_device::sts_w(int state)
+{
+ m_sys->sts_w(m_my_sc , state);
+}
+
+void hp9845_io_card_device::flg_w(int state)
+{
+ m_sys->flg_w(m_my_sc , state);
+}
+
+void hp9845_io_card_device::install_readwrite_handler(read16_delegate rhandler, write16_delegate whandler)
+{
+ if (m_sys == nullptr) {
+ m_sys = dynamic_cast<hp9845b_state*>(&machine().root_device());
+ //printf("m_sys=%p\n" , m_sys);
+ m_sys->install_readwrite_handler(m_my_sc , rhandler, whandler);
+ }
+}
+
+#include "98035.h"
+
+SLOT_INTERFACE_START(hp9845_io_slot_devices)
+SLOT_INTERFACE("98035_rtc" , HP98035_IO_CARD)
+SLOT_INTERFACE_END
diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h
new file mode 100644
index 00000000000..61f8b57575e
--- /dev/null
+++ b/src/devices/bus/hp9845_io/hp9845_io.h
@@ -0,0 +1,81 @@
+// license:BSD-3-Clause
+// copyright-holders: F. Ulivi
+/*********************************************************************
+
+ hp9845_io.h
+
+ I/O bus of HP9845 systems
+
+*********************************************************************/
+
+#pragma once
+
+#ifndef _HP9845_IO_H_
+#define _HP9845_IO_H_
+
+#include "emu.h"
+
+#define MCFG_HP9845_IO_SLOT_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, HP9845_IO_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(hp9845_io_slot_devices, nullptr, false)
+
+#define HP9845_IO_FIRST_SC 1 // Lowest SC used by I/O cards
+
+#define MCFG_HP9845_IO_SC\
+ PORT_START("SC") \
+ PORT_CONFNAME(0xf , 0 , "Select Code") \
+ PORT_CONFSETTING(0 , "1")\
+ PORT_CONFSETTING(1 , "2")\
+ PORT_CONFSETTING(2 , "3")\
+ PORT_CONFSETTING(3 , "4")\
+ PORT_CONFSETTING(4 , "5")\
+ PORT_CONFSETTING(5 , "6")\
+ PORT_CONFSETTING(6 , "7")\
+ PORT_CONFSETTING(7 , "8")\
+ PORT_CONFSETTING(8 , "9")\
+ PORT_CONFSETTING(9 , "10")\
+ PORT_CONFSETTING(10 , "11")\
+ PORT_CONFSETTING(11 , "12")
+
+class hp9845_io_slot_device : public device_t,
+ public device_slot_interface
+{
+public:
+ // construction/destruction
+ hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~hp9845_io_slot_device();
+
+ // device-level overrides
+ virtual void device_start() override;
+};
+
+class hp9845b_state;
+
+class hp9845_io_card_device : public device_t,
+ public device_slot_card_interface
+{
+protected:
+ // construction/destruction
+ hp9845_io_card_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ virtual ~hp9845_io_card_device();
+
+ // device-level overrides
+ virtual void device_reset() override;
+
+ hp9845b_state *m_sys;
+ required_ioport m_select_code_port;
+ UINT8 m_my_sc;
+
+ // card device handling
+ void irq_w(int state);
+ void sts_w(int state);
+ void flg_w(int state);
+ void install_readwrite_handler(read16_delegate rhandler, write16_delegate whandler);
+};
+
+// device type definition
+extern const device_type HP9845_IO_SLOT;
+
+SLOT_INTERFACE_EXTERN(hp9845_io_slot_devices);
+
+#endif /* _HP9845_IO_H_ */
diff --git a/src/devices/bus/hp_optroms/hp_optrom.h b/src/devices/bus/hp_optroms/hp_optrom.h
index 6ca5440cce5..0ddd24b26c9 100644
--- a/src/devices/bus/hp_optroms/hp_optrom.h
+++ b/src/devices/bus/hp_optroms/hp_optrom.h
@@ -61,7 +61,7 @@ public:
protected:
hp_optrom_cart_device *m_cart;
- dynamic_buffer m_content;
+ std::vector<UINT8> m_content;
offs_t m_base_addr;
offs_t m_end_addr;
};
diff --git a/src/devices/bus/intv/slot.cpp b/src/devices/bus/intv/slot.cpp
index e0bc729ba70..eb60f1af14b 100644
--- a/src/devices/bus/intv/slot.cpp
+++ b/src/devices/bus/intv/slot.cpp
@@ -453,7 +453,7 @@ std::string intv_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type = INTV_STD;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h
index 11d88aed25c..37434b4e83d 100644
--- a/src/devices/bus/intv/slot.h
+++ b/src/devices/bus/intv/slot.h
@@ -83,7 +83,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/isa/3c505.h b/src/devices/bus/isa/3c505.h
index 3b2ede78aa2..127dc41afb6 100644
--- a/src/devices/bus/isa/3c505.h
+++ b/src/devices/bus/isa/3c505.h
@@ -182,7 +182,7 @@ private:
threecom3c505_device *m_device; // pointer back to our device
UINT16 m_length;
- dynamic_buffer m_data;
+ std::vector<UINT8> m_data;
};
/* data_buffer fifo (used to buffer the received data) */
diff --git a/src/devices/bus/isa/cga.h b/src/devices/bus/isa/cga.h
index de6c6841e9f..8fdabd41ebb 100644
--- a/src/devices/bus/isa/cga.h
+++ b/src/devices/bus/isa/cga.h
@@ -78,7 +78,7 @@ public:
UINT8 m_vsync;
UINT8 m_hsync;
size_t m_vram_size;
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
bool m_superimpose;
UINT8 m_plantronics; /* This should be moved into the appropriate subclass */
offs_t m_start_offset;
diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp
index a59d0b07b1d..10f8bdb58f4 100644
--- a/src/devices/bus/isa/dectalk.cpp
+++ b/src/devices/bus/isa/dectalk.cpp
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Carl
#include "dectalk.h"
+#include "sound/volt_reg.h"
const device_type ISA8_DECTALK = &device_creator<dectalk_isa_device>;
@@ -61,7 +62,7 @@ WRITE8_MEMBER(dectalk_isa_device::dma_w)
WRITE16_MEMBER(dectalk_isa_device::dac_w)
{
- m_dac->write(data & 0xfff0);
+ m_dac->write(data >> 4);
}
WRITE16_MEMBER(dectalk_isa_device::output_ctl_w)
@@ -147,8 +148,9 @@ static MACHINE_CONFIG_FRAGMENT( dectalk_isa )
MCFG_CPU_PROGRAM_MAP(dectalk_dsp_map)
MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
+ MCFG_SOUND_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( dectalk_isa )
diff --git a/src/devices/bus/isa/dectalk.h b/src/devices/bus/isa/dectalk.h
index 204fdffb487..971d8915e96 100644
--- a/src/devices/bus/isa/dectalk.h
+++ b/src/devices/bus/isa/dectalk.h
@@ -47,7 +47,7 @@ private:
UINT8 m_dma, m_vol, m_bio;
required_device<i80186_cpu_device> m_cpu;
- required_device<dac_device> m_dac;
+ required_device<dac_12bit_r2r_device> m_dac;
required_device<cpu_device> m_dsp;
};
diff --git a/src/devices/bus/isa/gus.h b/src/devices/bus/isa/gus.h
index eb4413d3bd8..0370fd6ed80 100644
--- a/src/devices/bus/isa/gus.h
+++ b/src/devices/bus/isa/gus.h
@@ -191,7 +191,7 @@ public:
void reset_irq(UINT8 source);
void update_volume_ramps();
- dynamic_buffer m_wave_ram;
+ std::vector<UINT8> m_wave_ram;
protected:
// device-level overrides
diff --git a/src/devices/bus/isa/hdc.h b/src/devices/bus/isa/hdc.h
index fd1db1ad65d..9c43fb50d4a 100644
--- a/src/devices/bus/isa/hdc.h
+++ b/src/devices/bus/isa/hdc.h
@@ -70,7 +70,7 @@ protected:
void get_chsn();
int test_ready();
- dynamic_buffer buffer; /* data buffer */
+ std::vector<UINT8> buffer; /* data buffer */
UINT8 *buffer_ptr; /* data pointer */
int csb; /* command status byte */
int status; /* drive status */
diff --git a/src/devices/bus/isa/mcd.cpp b/src/devices/bus/isa/mcd.cpp
index 67fbba6ee28..d2cb19356e8 100644
--- a/src/devices/bus/isa/mcd.cpp
+++ b/src/devices/bus/isa/mcd.cpp
@@ -74,28 +74,32 @@ void mcd_isa_device::device_reset()
m_data = false;
}
-bool mcd_isa_device::read_sector()
+bool mcd_isa_device::read_sector(bool first)
{
+ if((m_irq & IRQ_DATACOMP) && !first)
+ m_isa->irq5_w(ASSERT_LINE);
if(!m_readcount)
{
m_isa->drq5_w(CLEAR_LINE);
- if(m_irq & IRQ_DATACOMP)
- m_isa->irq5_w(ASSERT_LINE);
m_data = false;
- m_cmdbuf[0] = STAT_SPIN | STAT_READY;
- m_cmdbuf_count = 1;
return false;
}
UINT32 lba = msf_to_lba(m_readmsf);
cdrom_read_data(m_cdrom_handle, lba - 150, m_buf, m_mode & 0x40 ? CD_TRACK_MODE1_RAW : CD_TRACK_MODE1);
- m_readmsf = lba_to_msf(lba + 1);
+ if(m_mode & 0x40)
+ {
+ //correct the header
+ m_buf[12] = dec_2_bcd(m_readmsf >> 16);
+ m_buf[13] = dec_2_bcd(m_readmsf >> 8);
+ }
+ m_readmsf = lba_to_msf_alt(lba + 1);
m_buf_count = m_dmalen + 1;
m_buf_idx = 0;
m_data = true;
m_readcount--;
if(m_dma)
m_isa->drq5_w(ASSERT_LINE);
- if(m_irq & IRQ_DATAREADY)
+ if((m_irq & IRQ_DATAREADY) && first)
m_isa->irq5_w(ASSERT_LINE);
return true;
}
@@ -103,18 +107,16 @@ bool mcd_isa_device::read_sector()
READ8_MEMBER(mcd_isa_device::flag_r)
{
UINT8 ret = 0;
- if(!m_buf_count || !m_data)
+ m_isa->irq5_w(CLEAR_LINE);
+ if(!m_buf_count || !m_data || m_dma) // if dma enabled the cpu will never not see that flag as it will be halted
ret |= FLAG_NODATA;
- if(m_buf_count == m_dmalen + 1)
- ret |= FLAG_DATAREADY;
if(!m_cmdbuf_count || !m_newstat)
ret |= FLAG_NOSTAT; // all command results are status
- return ret;
+ return ret | FLAG_UNK;
}
READ8_MEMBER(mcd_isa_device::data_r)
{
- m_isa->irq5_w(CLEAR_LINE);
if(m_cmdbuf_count)
{
m_cmdbuf_count--;
@@ -214,9 +216,15 @@ WRITE8_MEMBER(mcd_isa_device::cmd_w)
case 3:
m_readmsf |= bcd_2_dec(data) << ((m_cmdrd_count - 3) * 8);
break;
+ case 2:
+ m_readcount = data << 16;
+ break;
+ case 1:
+ m_readcount |= data << 8;
+ break;
case 0:
- m_readcount = data + 1;
- read_sector();
+ m_readcount |= data;
+ read_sector(true);
m_cmdbuf_count = 1;
m_cmdbuf[0] = STAT_SPIN | STAT_READY;
break;
@@ -249,6 +257,7 @@ WRITE8_MEMBER(mcd_isa_device::cmd_w)
m_cmdbuf[8] = dec_2_bcd(first & 0xff);
m_cmdbuf[9] = 0;
m_cmdbuf_count = 10;
+ m_readcount = 0;
}
else
{
@@ -275,6 +284,7 @@ WRITE8_MEMBER(mcd_isa_device::cmd_w)
if(m_curtoctrk >= tracks)
m_curtoctrk = 1;
m_cmdbuf_count = 11;
+ m_readcount = 0;
}
else
{
@@ -300,6 +310,7 @@ WRITE8_MEMBER(mcd_isa_device::cmd_w)
case CMD_READ2X:
if(m_cdrom_handle)
{
+ m_readcount = 0;
m_drvmode = DRV_MODE_READ;
m_cmdrd_count = 6;
}
@@ -316,6 +327,7 @@ WRITE8_MEMBER(mcd_isa_device::cmd_w)
m_cmdbuf_count = 4;
break;
case CMD_EJECT:
+ m_readcount = 0;
break;
case CMD_LOCK:
m_cmdrd_count = 1;
diff --git a/src/devices/bus/isa/mcd.h b/src/devices/bus/isa/mcd.h
index aae4d3b638c..3d8d529ce35 100644
--- a/src/devices/bus/isa/mcd.h
+++ b/src/devices/bus/isa/mcd.h
@@ -37,7 +37,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
private:
- bool read_sector();
+ bool read_sector(bool first = false);
bool m_change;
bool m_newstat;
@@ -57,7 +57,7 @@ private:
UINT8 m_dma;
UINT16 m_dmalen;
UINT32 m_readmsf;
- UINT8 m_readcount;
+ UINT32 m_readcount;
bool m_locked;
int m_drvmode;
int m_curtoctrk;
@@ -102,7 +102,7 @@ private:
enum {
FLAG_NODATA = 2,
FLAG_NOSTAT = 4,
- FLAG_DATAREADY = 8, //??
+ FLAG_UNK = 8, //??
FLAG_OPEN = 16
};
enum {
diff --git a/src/devices/bus/isa/mda.h b/src/devices/bus/isa/mda.h
index 1d987789b2b..fc761ead19b 100644
--- a/src/devices/bus/isa/mda.h
+++ b/src/devices/bus/isa/mda.h
@@ -55,7 +55,7 @@ public:
UINT8 *m_chr_gen;
UINT8 m_vsync;
UINT8 m_hsync;
- dynamic_buffer m_videoram;
+ std::vector<UINT8> m_videoram;
UINT8 m_pixel;
required_device<palette_device> m_palette;
};
diff --git a/src/devices/bus/isa/num9rev.h b/src/devices/bus/isa/num9rev.h
index bf185d5eb62..4fe64e19019 100644
--- a/src/devices/bus/isa/num9rev.h
+++ b/src/devices/bus/isa/num9rev.h
@@ -49,8 +49,8 @@ protected:
private:
required_device<upd7220_device> m_upd7220;
required_device<palette_device> m_palette;
- dynamic_buffer m_ram;
- dynamic_buffer m_overlay;
+ std::vector<UINT8> m_ram;
+ std::vector<UINT8> m_overlay;
UINT8 m_bank;
UINT8 m_mode;
diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h
index dbcd9f00103..7a81751bbe7 100644
--- a/src/devices/bus/isa/omti8621.h
+++ b/src/devices/bus/isa/omti8621.h
@@ -83,7 +83,7 @@ private:
int command_status;
// data buffer
- dynamic_buffer sector_buffer;
+ std::vector<UINT8> sector_buffer;
UINT8 *data_buffer;
int data_length;
int data_index;
diff --git a/src/devices/bus/isa/p1_sound.cpp b/src/devices/bus/isa/p1_sound.cpp
index 03499c77643..e77312a3fd9 100644
--- a/src/devices/bus/isa/p1_sound.cpp
+++ b/src/devices/bus/isa/p1_sound.cpp
@@ -12,6 +12,7 @@
**********************************************************************/
#include "p1_sound.h"
+#include "sound/volt_reg.h"
//**************************************************************************
// DEVICE DEFINITIONS
@@ -59,11 +60,12 @@ static MACHINE_CONFIG_FRAGMENT( p1_sound )
MCFG_PIT8253_CLK2(XTAL_12_5MHz/10)
// MCFG_PIT8253_OUT2_HANDLER(XXX)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FILTER_RC_ADD("filter", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -143,7 +145,7 @@ WRITE8_MEMBER( p1_sound_device::dac_w )
WRITE_LINE_MEMBER( p1_sound_device::sampler_sync )
{
if (state) {
- m_dac->write_unsigned8(m_dac_data[m_dac_ptr++]);
+ m_dac->write(m_dac_data[m_dac_ptr++]);
m_dac_ptr &= 7;
if ((m_dac_ptr % 8) == 0) {
m_isa->irq7_w(state);
diff --git a/src/devices/bus/isa/p1_sound.h b/src/devices/bus/isa/p1_sound.h
index 95a6878f395..2dfae20f67c 100644
--- a/src/devices/bus/isa/p1_sound.h
+++ b/src/devices/bus/isa/p1_sound.h
@@ -57,7 +57,7 @@ private:
UINT8 m_dac_data[16];
int m_dac_ptr;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
optional_device<filter_rc_device> m_filter;
required_device<i8251_device> m_midi;
required_device<pit8253_device> m_d14;
diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp
index 9378da64858..3b65ef23894 100644
--- a/src/devices/bus/isa/sb16.cpp
+++ b/src/devices/bus/isa/sb16.cpp
@@ -55,8 +55,8 @@ READ8_MEMBER( sb16_lle_device::adc_data_r )
WRITE8_MEMBER( sb16_lle_device::dac_data_w )
{
- m_dacl->write_unsigned8(data);
- m_dacr->write_unsigned8(data);
+ m_ldac->write(data << 8);
+ m_rdac->write(data << 8);
}
READ8_MEMBER( sb16_lle_device::p1_r )
@@ -412,10 +412,8 @@ static MACHINE_CONFIG_FRAGMENT( sb16 )
MCFG_SOUND_ROUTE(2, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
MCFG_PC_JOY_ADD("pc_joy")
MACHINE_CONFIG_END
@@ -681,8 +679,8 @@ WRITE8_MEMBER( sb16_lle_device::mpu401_w )
sb16_lle_device::sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA16_SB16, "SoundBlaster 16 Audio Adapter LLE", tag, owner, clock, "sb16", __FILE__),
device_isa16_card_interface(mconfig, *this),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_joy(*this, "pc_joy"),
m_cpu(*this, "sb16_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_freq(0), m_mode(0), m_dac_fifo_ctrl(0), m_adc_fifo_ctrl(0), m_ctrl8(0), m_ctrl16(0), m_mpu_byte(0),
m_dma8_len(0), m_dma16_len(0), m_dma8_cnt(0), m_dma16_cnt(0), m_adc_fifo_head(0), m_adc_fifo_tail(0), m_dac_fifo_head(0), m_dac_fifo_tail(0), m_adc_r(false), m_dac_r(false), m_adc_h(false),
@@ -754,21 +752,21 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
switch(m_mode & 0xa0) // dac 16
{
case 0x00: // unsigned stereo
- dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
- dacr = (m_dac_fifo[m_dac_fifo_tail].h[1] - 0x8000);
- break;
- case 0x20: // signed stereo
dacl = m_dac_fifo[m_dac_fifo_tail].h[0];
dacr = m_dac_fifo[m_dac_fifo_tail].h[1];
break;
- case 0x80: // unsigned mono
- dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
- dacr = (m_dac_fifo[m_dac_fifo_tail].h[0] - 0x8000);
+ case 0x20: // signed stereo
+ dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
+ dacr = (m_dac_fifo[m_dac_fifo_tail].h[1] ^ 0x8000);
break;
- case 0xa0: // signed mono
+ case 0x80: // unsigned mono
dacl = m_dac_fifo[m_dac_fifo_tail].h[0];
dacr = m_dac_fifo[m_dac_fifo_tail].h[0];
break;
+ case 0xa0: // signed mono
+ dacl = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
+ dacr = (m_dac_fifo[m_dac_fifo_tail].h[0] ^ 0x8000);
+ break;
}
switch(m_mode & 0x50) // adc 8; placeholder
{
@@ -795,21 +793,21 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
switch(m_mode & 0x50) // dac 8
{
case 0x00: // unsigned stereo
- dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
- dacr = (m_dac_fifo[m_dac_fifo_tail].b[2] - 0x80) << 8;
- break;
- case 0x10: // signed stereo
dacl = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
dacr = m_dac_fifo[m_dac_fifo_tail].b[2] << 8;
break;
- case 0x40: // unsigned mono
- dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
- dacr = (m_dac_fifo[m_dac_fifo_tail].b[0] - 0x80) << 8;
+ case 0x10: // signed stereo
+ dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
+ dacr = (m_dac_fifo[m_dac_fifo_tail].b[2] ^ 0x80) << 8;
break;
- case 0x50: // signed mono
+ case 0x40: // unsigned mono
dacl = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
dacr = m_dac_fifo[m_dac_fifo_tail].b[0] << 8;
break;
+ case 0x50: // signed mono
+ dacl = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
+ dacr = (m_dac_fifo[m_dac_fifo_tail].b[0] ^ 0x80) << 8;
+ break;
}
switch(m_mode & 0xa0) // adc 16; placeholder
{
@@ -831,8 +829,8 @@ void sb16_lle_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
break;
}
}
- m_dacr->write(dacr);
- m_dacl->write(dacl);
+ m_rdac->write(dacr);
+ m_ldac->write(dacl);
if(!(m_ctrl8 & 2))
m_isa->drq1_w(1);
diff --git a/src/devices/bus/isa/sb16.h b/src/devices/bus/isa/sb16.h
index 2d6811a5f78..44ac336e673 100644
--- a/src/devices/bus/isa/sb16.h
+++ b/src/devices/bus/isa/sb16.h
@@ -28,8 +28,8 @@ public:
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
required_device<pc_joy_device> m_joy;
required_device<cpu_device> m_cpu;
diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp
index 6e38b04ce81..9f1c8382af9 100644
--- a/src/devices/bus/isa/sblaster.cpp
+++ b/src/devices/bus/isa/sblaster.cpp
@@ -12,10 +12,10 @@
***************************************************************************/
#include "sblaster.h"
+#include "machine/pic8259.h"
#include "sound/speaker.h"
#include "sound/262intf.h"
-#include "sound/dac.h"
-#include "machine/pic8259.h"
+#include "sound/volt_reg.h"
/*
adlib (YM3812/OPL2 chip), part of many many soundcards (soundblaster)
@@ -73,10 +73,11 @@ static MACHINE_CONFIG_FRAGMENT( sblaster1_0_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
- MCFG_SOUND_ADD("sbdacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("sbdacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@@ -92,10 +93,11 @@ static MACHINE_CONFIG_FRAGMENT( sblaster1_5_config )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
/* no CM/S support (empty sockets) */
- MCFG_SOUND_ADD("sbdacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("sbdacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@@ -111,10 +113,12 @@ static MACHINE_CONFIG_FRAGMENT( sblaster_16_config )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
MCFG_SOUND_ROUTE(2, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
- MCFG_SOUND_ADD("sbdacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("sbdacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
@@ -755,8 +759,8 @@ void sb_device::adpcm_decode(UINT8 sample, int size)
else if(dec_sample < 0)
dec_sample = 0;
m_dsp.adpcm_ref = dec_sample;
- m_dacl->write_unsigned8(m_dsp.adpcm_ref);
- m_dacr->write_unsigned8(m_dsp.adpcm_ref);
+ m_ldac->write(m_dsp.adpcm_ref << 8);
+ m_rdac->write(m_dsp.adpcm_ref << 8);
}
READ8_MEMBER( sb16_device::mpu401_r )
@@ -835,8 +839,8 @@ void sb16_device::mixer_set()
ymf262_device *ymf = subdevice<ymf262_device>("ymf262");
float lmain = m_mixer.main_vol[0]/248.0;
float rmain = m_mixer.main_vol[1]/248.0;
- m_dacl->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0f));
- m_dacr->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0f));
+ m_ldac->set_output_gain(ALL_OUTPUTS, lmain*(m_mixer.dac_vol[0]/248.0f));
+ m_rdac->set_output_gain(ALL_OUTPUTS, rmain*(m_mixer.dac_vol[1]/248.0f));
ymf->set_output_gain(0, lmain*(m_mixer.fm_vol[0]/248.0f));
ymf->set_output_gain(1, rmain*(m_mixer.fm_vol[1]/248.0f));
ymf->set_output_gain(2, lmain*(m_mixer.fm_vol[0]/248.0f));
@@ -1216,8 +1220,8 @@ machine_config_constructor isa16_sblaster16_device::device_mconfig_additions() c
sb_device::sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, const char *name, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_serial_interface(mconfig, *this),
- m_dacl(*this, "sbdacl"),
- m_dacr(*this, "sbdacr"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_joy(*this, "pc_joy"),
m_mdout(*this, "mdout"),
m_config(*this, "CONFIG"), m_dack_out(0), m_onebyte_midi(false), m_uart_midi(false), m_uart_irq(false), m_mpu_midi(false), m_rx_waiting(0), m_tx_waiting(0), m_xmit_read(0), m_xmit_write(0), m_recv_read(0), m_recv_write(0), m_tx_busy(false), m_timer(nullptr)
@@ -1540,40 +1544,40 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
UINT16 lsample, rsample;
switch (m_dsp.flags) {
case 0: // 8-bit unsigned mono
- m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
- m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
+ m_ldac->write(m_dsp.data[m_dsp.d_rptr] << 8);
+ m_rdac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
break;
case SIGNED: // 8-bit signed mono
- m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
- m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
+ m_ldac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
+ m_rdac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
break;
case STEREO: // 8-bit unsigned stereo
- m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
+ m_ldac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
- m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr]);
+ m_rdac->write(m_dsp.data[m_dsp.d_rptr] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x80;
break;
case SIGNED | STEREO: // 8-bit signed stereo
- m_dacl->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
+ m_ldac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
- m_dacr->write_unsigned8(m_dsp.data[m_dsp.d_rptr] + 128);
+ m_rdac->write((m_dsp.data[m_dsp.d_rptr] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
break;
case SIXTEENBIT: // 16-bit unsigned mono
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x80;
- m_dacl->write_unsigned16(lsample);
- m_dacr->write_unsigned16(lsample);
+ m_ldac->write(lsample);
+ m_rdac->write(lsample);
break;
case SIXTEENBIT | SIGNED: // 16-bit signed mono
- lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
+ lsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
- m_dacl->write_unsigned16(lsample + 32768);
- m_dacr->write_unsigned16(lsample + 32768);
+ m_ldac->write(lsample);
+ m_rdac->write(lsample);
break;
case SIXTEENBIT | STEREO: // 16-bit unsigned stereo
lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
@@ -1583,27 +1587,27 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
rsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x80;
- m_dacl->write_unsigned16(lsample);
- m_dacr->write_unsigned16(rsample);
+ m_ldac->write(lsample);
+ m_rdac->write(rsample);
break;
case SIXTEENBIT | SIGNED | STEREO: // 16-bit signed stereo
- lsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
+ lsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.d_rptr %= 128;
- rsample = m_dsp.data[m_dsp.d_rptr] | (m_dsp.data[m_dsp.d_rptr+1] << 8);
+ rsample = m_dsp.data[m_dsp.d_rptr] | ((m_dsp.data[m_dsp.d_rptr+1] ^ 0x80) << 8);
m_dsp.data[m_dsp.d_rptr++] = 0x00;
m_dsp.data[m_dsp.d_rptr++] = 0x00;
- m_dacl->write_unsigned16(lsample + 32768);
- m_dacr->write_unsigned16(rsample + 32768);
+ m_ldac->write(lsample);
+ m_rdac->write(rsample);
break;
case ADPCM2:
if(m_dsp.adpcm_new_ref)
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
- m_dacl->write_unsigned8(m_dsp.adpcm_ref);
- m_dacr->write_unsigned8(m_dsp.adpcm_ref);
+ m_ldac->write(m_dsp.adpcm_ref << 8);
+ m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];
@@ -1630,8 +1634,8 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
- m_dacl->write_unsigned8(m_dsp.adpcm_ref);
- m_dacr->write_unsigned8(m_dsp.adpcm_ref);
+ m_ldac->write(m_dsp.adpcm_ref << 8);
+ m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];
@@ -1655,8 +1659,8 @@ void sb_device::device_timer(emu_timer &timer, device_timer_id tid, int param, v
{
m_dsp.adpcm_ref = m_dsp.data[m_dsp.d_rptr++];
m_dsp.adpcm_new_ref = false;
- m_dacl->write_unsigned8(m_dsp.adpcm_ref);
- m_dacr->write_unsigned8(m_dsp.adpcm_ref);
+ m_ldac->write(m_dsp.adpcm_ref << 8);
+ m_rdac->write(m_dsp.adpcm_ref << 8);
break;
}
lsample = m_dsp.data[m_dsp.d_rptr];
diff --git a/src/devices/bus/isa/sblaster.h b/src/devices/bus/isa/sblaster.h
index 4481193c6fe..47868b51579 100644
--- a/src/devices/bus/isa/sblaster.h
+++ b/src/devices/bus/isa/sblaster.h
@@ -99,8 +99,8 @@ public:
// construction/destruction
sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, const char *name, const char *shortname, const char *source);
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
+ required_device<dac_16bit_r2r_device> m_ldac;
+ required_device<dac_16bit_r2r_device> m_rdac;
required_device<pc_joy_device> m_joy;
required_device<midi_port_device> m_mdout;
required_ioport m_config;
diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h
index ad536a66df0..7a832b53be2 100644
--- a/src/devices/bus/isa/sc499.h
+++ b/src/devices/bus/isa/sc499.h
@@ -53,7 +53,7 @@ protected:
virtual void device_config_complete() override;
virtual void device_start() override { };
- dynamic_buffer m_ctape_data;
+ std::vector<UINT8> m_ctape_data;
};
// ======================> sc499_device
@@ -138,7 +138,7 @@ private:
UINT32 m_ctape_block_index;
UINT64 m_image_length;
- dynamic_buffer m_ctape_block_buffer;
+ std::vector<UINT8> m_ctape_block_buffer;
required_device<sc499_ctape_image_device> m_image;
enum line_state irq_state;
diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp
index 6b76e6c730f..b3877e423a0 100644
--- a/src/devices/bus/isa/stereo_fx.cpp
+++ b/src/devices/bus/isa/stereo_fx.cpp
@@ -5,6 +5,8 @@
// TODO: UART is connected to MIDI port
#include "stereo_fx.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
const device_type ISA8_STEREO_FX = &device_creator<stereo_fx_device>;
@@ -89,13 +91,13 @@ ROM_END
static ADDRESS_MAP_START(stereo_fx_io, AS_IO, 8, stereo_fx_device)
AM_RANGE(0xFF00, 0xFF00) AM_WRITE(port00_w)
- AM_RANGE(0xFF10, 0xFF10) AM_DEVWRITE("dacr", dac_device, write_unsigned8)
+ AM_RANGE(0xFF10, 0xFF10) AM_DEVWRITE("rdac", dac_byte_interface, write)
AM_RANGE(0xFF20, 0xFF20) AM_WRITE(port20_w)
//AM_RANGE(0xFF30, 0xFF30) AM_WRITE() // used only on reset and undocumented cmd 0xc4
AM_RANGE(0xFF40, 0xFF40) AM_READWRITE(dev_dsp_data_r, dev_dsp_data_w)
AM_RANGE(0xFF50, 0xFF50) AM_WRITE(raise_drq_w)
AM_RANGE(0xFF60, 0xFF60) AM_WRITE(dev_host_irq_w)
- AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(p1_r) AM_DEVWRITE("dacl", dac_device, write_unsigned8)
+ AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(p1_r) AM_DEVWRITE("ldac", dac_byte_interface, write)
AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3) AM_READWRITE(p3_r, p3_w)
ADDRESS_MAP_END
@@ -114,10 +116,11 @@ static MACHINE_CONFIG_FRAGMENT( stereo_fx )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
/* no CM/S support (empty sockets) */
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_PC_JOY_ADD("pc_joy")
MACHINE_CONFIG_END
@@ -189,8 +192,6 @@ READ8_MEMBER( stereo_fx_device::invalid_r )
stereo_fx_device::stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISA8_STEREO_FX, "ATI Stereo F/X Audio Adapter", tag, owner, clock, "stereo_fx", __FILE__),
device_isa8_card_interface(mconfig, *this),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr"),
m_joy(*this, "pc_joy"),
m_cpu(*this, "stereo_fx_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_port20(0), m_port00(0), m_timer(nullptr), m_t0(0)
{
diff --git a/src/devices/bus/isa/stereo_fx.h b/src/devices/bus/isa/stereo_fx.h
index 68c0888440f..56ac6d1f74b 100644
--- a/src/devices/bus/isa/stereo_fx.h
+++ b/src/devices/bus/isa/stereo_fx.h
@@ -5,7 +5,6 @@
#include "emu.h"
#include "isa.h"
-#include "sound/dac.h"
#include "bus/pc_joy/pc_joy.h"
#include "cpu/mcs51/mcs51.h"
#include "sound/3812intf.h"
@@ -27,8 +26,6 @@ public:
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
required_device<pc_joy_device> m_joy;
required_device<cpu_device> m_cpu;
diff --git a/src/devices/bus/lpci/southbridge.h b/src/devices/bus/lpci/southbridge.h
index 5e280192dd4..d2591646d3e 100644
--- a/src/devices/bus/lpci/southbridge.h
+++ b/src/devices/bus/lpci/southbridge.h
@@ -18,7 +18,6 @@
#include "imagedev/harddriv.h"
#include "pci.h"
-#include "sound/dac.h"
#include "sound/speaker.h"
#include "machine/ram.h"
#include "machine/nvram.h"
diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h
index 27345e34a99..a31f89f0a49 100644
--- a/src/devices/bus/m5/slot.h
+++ b/src/devices/bus/m5/slot.h
@@ -51,7 +51,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp
index 1e796adb16b..246dc43cab8 100644
--- a/src/devices/bus/megadrive/md_slot.cpp
+++ b/src/devices/bus/megadrive/md_slot.cpp
@@ -471,7 +471,7 @@ image_init_result base_md_cart_slot_device::load_nonlist()
unsigned char *ROM;
bool is_smd, is_md;
UINT32 tmplen = length(), offset, len;
- dynamic_buffer tmpROM(tmplen);
+ std::vector<UINT8> tmpROM(tmplen);
// STEP 1: store a (possibly headered) copy of the file and determine its type (SMD? MD? BIN?)
fread(&tmpROM[0], tmplen);
@@ -919,7 +919,7 @@ std::string base_md_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size(), offset = 0;
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/msx_cart/cartridge.h b/src/devices/bus/msx_cart/cartridge.h
index 6deb2140dea..6016d30202a 100644
--- a/src/devices/bus/msx_cart/cartridge.h
+++ b/src/devices/bus/msx_cart/cartridge.h
@@ -41,10 +41,10 @@ public:
UINT32 get_sram_size() { return m_sram.size(); }
protected:
- dynamic_buffer m_rom;
- dynamic_buffer m_ram;
- dynamic_buffer m_rom_vlm5030;
- dynamic_buffer m_sram;
+ std::vector<UINT8> m_rom;
+ std::vector<UINT8> m_ram;
+ std::vector<UINT8> m_rom_vlm5030;
+ std::vector<UINT8> m_sram;
devcb_write_line m_out_irq_cb;
};
diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp
index ed0a7f8b3f9..659fdf054ea 100644
--- a/src/devices/bus/msx_cart/konami.cpp
+++ b/src/devices/bus/msx_cart/konami.cpp
@@ -2,6 +2,7 @@
// copyright-holders:Wilbert Pol
#include "emu.h"
#include "konami.h"
+#include "sound/volt_reg.h"
const device_type MSX_CART_KONAMI = &device_creator<msx_cart_konami>;
const device_type MSX_CART_KONAMI_SCC = &device_creator<msx_cart_konami_scc>;
@@ -476,9 +477,10 @@ msx_cart_synthesizer::msx_cart_synthesizer(const machine_config &mconfig, const
static MACHINE_CONFIG_FRAGMENT( synthesizer )
// This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'.
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -518,7 +520,7 @@ WRITE8_MEMBER(msx_cart_synthesizer::write_cart)
{
if ((offset & 0xc010) == 0x4000)
{
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
}
}
diff --git a/src/devices/bus/msx_cart/konami.h b/src/devices/bus/msx_cart/konami.h
index aecbc320f92..f42057692b6 100644
--- a/src/devices/bus/msx_cart/konami.h
+++ b/src/devices/bus/msx_cart/konami.h
@@ -112,7 +112,7 @@ public:
private:
UINT8 *m_bank_base;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
};
diff --git a/src/devices/bus/msx_cart/majutsushi.cpp b/src/devices/bus/msx_cart/majutsushi.cpp
index 23091c1fb4b..49dc7b25450 100644
--- a/src/devices/bus/msx_cart/majutsushi.cpp
+++ b/src/devices/bus/msx_cart/majutsushi.cpp
@@ -2,6 +2,7 @@
// copyright-holders:Wilbert Pol
#include "emu.h"
#include "majutsushi.h"
+#include "sound/volt_reg.h"
const device_type MSX_CART_MAJUTSUSHI = &device_creator<msx_cart_majutsushi>;
@@ -24,9 +25,10 @@ msx_cart_majutsushi::msx_cart_majutsushi(const machine_config &mconfig, const ch
static MACHINE_CONFIG_FRAGMENT( majutsushi )
// This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'.
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -90,7 +92,7 @@ WRITE8_MEMBER(msx_cart_majutsushi::write_cart)
case 0x4000:
if (offset & 0x1000)
{
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
}
break;
diff --git a/src/devices/bus/msx_cart/majutsushi.h b/src/devices/bus/msx_cart/majutsushi.h
index 2cff08446a2..82a454b785c 100644
--- a/src/devices/bus/msx_cart/majutsushi.h
+++ b/src/devices/bus/msx_cart/majutsushi.h
@@ -29,7 +29,7 @@ public:
void restore_banks();
private:
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
UINT8 m_selected_bank[4];
UINT8 *m_bank_base[8];
diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp
index 19be1b77921..104f82b6bd5 100644
--- a/src/devices/bus/msx_slot/cartridge.cpp
+++ b/src/devices/bus/msx_slot/cartridge.cpp
@@ -277,7 +277,7 @@ std::string msx_slot_cartridge_device::get_default_card_software()
{
const char *slot_string = "nomapper";
UINT32 length = m_file->size();
- dynamic_buffer rom(length);
+ std::vector<UINT8> rom(length);
int type = NOMAPPER;
// Check if there's some mapper related information in the hashfiles
diff --git a/src/devices/bus/msx_slot/panasonic08.h b/src/devices/bus/msx_slot/panasonic08.h
index 18295c78598..b43d5646bba 100644
--- a/src/devices/bus/msx_slot/panasonic08.h
+++ b/src/devices/bus/msx_slot/panasonic08.h
@@ -39,7 +39,7 @@ private:
UINT8 m_selected_bank[8];
const UINT8 *m_bank_base[8];
UINT8 m_control;
- dynamic_buffer m_sram;
+ std::vector<UINT8> m_sram;
void map_bank(int bank);
};
diff --git a/src/devices/bus/neogeo/prot_cmc.cpp b/src/devices/bus/neogeo/prot_cmc.cpp
index 7a91344aaad..41aabd2447f 100644
--- a/src/devices/bus/neogeo/prot_cmc.cpp
+++ b/src/devices/bus/neogeo/prot_cmc.cpp
@@ -501,7 +501,7 @@ void cmc_prot_device::decrypt(UINT8 *r0, UINT8 *r1,
void cmc_prot_device::gfx_decrypt(UINT8* rom, UINT32 rom_size, int extra_xor)
{
int rpos;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
// Data xor
for (rpos = 0; rpos < rom_size/4; rpos++)
@@ -709,7 +709,7 @@ void cmc_prot_device::cmc50_m1_decrypt(UINT8* romcrypt, UINT32 romcrypt_size, UI
size_t rom_size = 0x80000;
UINT8* rom2 = romaudio;
- dynamic_buffer buffer(rom_size);
+ std::vector<UINT8> buffer(rom_size);
UINT16 key = generate_cs16(rom, 0x10000);
diff --git a/src/devices/bus/neogeo/prot_cthd.cpp b/src/devices/bus/neogeo/prot_cthd.cpp
index b2901a60d3e..a6ccee1a56d 100644
--- a/src/devices/bus/neogeo/prot_cthd.cpp
+++ b/src/devices/bus/neogeo/prot_cthd.cpp
@@ -35,7 +35,7 @@ void cthd_prot_device::fix_do(UINT8* sprrom, UINT32 sprrom_size, int start, int
{
int tilesize = 128;
- dynamic_buffer rom(16 * tilesize); // 16 tiles buffer
+ std::vector<UINT8> rom(16 * tilesize); // 16 tiles buffer
UINT8* realrom = sprrom + start * tilesize;
for (int i = 0; i < (end-start)/16; i++)
@@ -94,7 +94,7 @@ void cthd_prot_device::cthd2003_c(UINT8* sprrom, UINT32 sprrom_size, int pow)
void cthd_prot_device::decrypt_cthd2003(UINT8* sprrom, UINT32 sprrom_size, UINT8* audiorom, UINT32 audiorom_size, UINT8* fixedrom, UINT32 fixedrom_size)
{
UINT8 *romdata = fixedrom;
- dynamic_buffer tmp(8 * 128 * 128);
+ std::vector<UINT8> tmp(8 * 128 * 128);
memcpy(&tmp[8 * 0 * 128], romdata + 8 * 0 * 128, 8 * 32 * 128);
memcpy(&tmp[8 * 32 * 128], romdata + 8 * 64 * 128, 8 * 32 * 128);
@@ -182,7 +182,7 @@ void cthd_prot_device::ct2k3sp_sx_decrypt( UINT8* fixedrom, UINT32 fixedrom_size
{
int rom_size = fixedrom_size;
UINT8 *rom = fixedrom;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
memcpy(&buf[0], rom, rom_size);
@@ -206,7 +206,7 @@ void cthd_prot_device::ct2k3sp_sx_decrypt( UINT8* fixedrom, UINT32 fixedrom_size
void cthd_prot_device::decrypt_ct2k3sp(UINT8* sprrom, UINT32 sprrom_size, UINT8* audiorom, UINT32 audiorom_size, UINT8* fixedrom, UINT32 fixedrom_size)
{
UINT8 *romdata = audiorom + 0x10000;
- dynamic_buffer tmp(8 * 128 * 128);
+ std::vector<UINT8> tmp(8 * 128 * 128);
memcpy(&tmp[8 * 0 * 128], romdata + 8 * 0 * 128, 8 * 32 * 128);
memcpy(&tmp[8 * 32 * 128], romdata + 8 * 64 * 128, 8 * 32 * 128);
memcpy(&tmp[8 * 64 * 128], romdata + 8 * 32 * 128, 8 * 32 * 128);
@@ -225,7 +225,7 @@ void cthd_prot_device::decrypt_ct2k3sp(UINT8* sprrom, UINT32 sprrom_size, UINT8*
void cthd_prot_device::decrypt_ct2k3sa(UINT8* sprrom, UINT32 sprrom_size, UINT8* audiorom, UINT32 audiorom_size )
{
UINT8 *romdata = audiorom + 0x10000;
- dynamic_buffer tmp(8 * 128 * 128);
+ std::vector<UINT8> tmp(8 * 128 * 128);
memcpy(&tmp[8 * 0 * 128], romdata + 8 * 0 * 128, 8 * 32 * 128);
memcpy(&tmp[8 * 32 * 128], romdata + 8 * 64 * 128, 8 * 32 * 128);
memcpy(&tmp[8 * 64 * 128], romdata + 8 * 32 * 128, 8 * 32 * 128);
@@ -280,7 +280,7 @@ void cthd_prot_device::matrimbl_decrypt(UINT8* sprrom, UINT32 sprrom_size, UINT8
{
// decrypt Z80
UINT8 *rom = audiorom + 0x10000;
- dynamic_buffer buf(0x20000);
+ std::vector<UINT8> buf(0x20000);
memcpy(&buf[0], rom, 0x20000);
int j;
diff --git a/src/devices/bus/neogeo/prot_kof2k2.cpp b/src/devices/bus/neogeo/prot_kof2k2.cpp
index fb2c80fd2b0..5ec8c31f979 100644
--- a/src/devices/bus/neogeo/prot_kof2k2.cpp
+++ b/src/devices/bus/neogeo/prot_kof2k2.cpp
@@ -27,7 +27,7 @@ void kof2002_prot_device::kof2002_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size)
{
static const int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};
UINT8 *src = cpurom + 0x100000;
- dynamic_buffer dst(0x400000);
+ std::vector<UINT8> dst(0x400000);
memcpy(&dst[0], src, 0x400000);
for (int i = 0; i < 8; ++i)
@@ -39,7 +39,7 @@ void kof2002_prot_device::matrim_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size)
{
static const int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};
UINT8 *src = cpurom + 0x100000;
- dynamic_buffer dst(0x400000);
+ std::vector<UINT8> dst(0x400000);
memcpy(&dst[0], src, 0x400000);
for (int i = 0; i < 8; ++i)
@@ -51,7 +51,7 @@ void kof2002_prot_device::samsho5_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size)
{
static const int sec[]={0x000000,0x080000,0x700000,0x680000,0x500000,0x180000,0x200000,0x480000,0x300000,0x780000,0x600000,0x280000,0x100000,0x580000,0x400000,0x380000};
UINT8 *src = cpurom;
- dynamic_buffer dst(0x800000);
+ std::vector<UINT8> dst(0x800000);
memcpy(&dst[0], src, 0x800000);
for (int i = 0; i < 16; ++i)
memcpy(src + i * 0x80000, &dst[sec[i]], 0x80000);
@@ -62,7 +62,7 @@ void kof2002_prot_device::samsh5sp_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size
{
static const int sec[]={0x000000,0x080000,0x500000,0x480000,0x600000,0x580000,0x700000,0x280000,0x100000,0x680000,0x400000,0x780000,0x200000,0x380000,0x300000,0x180000};
UINT8 *src = cpurom;
- dynamic_buffer dst(0x800000);
+ std::vector<UINT8> dst(0x800000);
memcpy(&dst[0], src, 0x800000);
for (int i = 0; i < 16; ++i)
diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.cpp b/src/devices/bus/neogeo/prot_kof2k3bl.cpp
index 5ef35dee9c5..35c2272fb3d 100644
--- a/src/devices/bus/neogeo/prot_kof2k3bl.cpp
+++ b/src/devices/bus/neogeo/prot_kof2k3bl.cpp
@@ -82,7 +82,7 @@ void kof2k3bl_prot_device::bl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
static const UINT8 sec[] = { 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
int rom_size = 0x800000;
UINT8 *rom = cpurom;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
memcpy(&buf[0], rom, rom_size);
for (int i = 0; i < rom_size / 0x100000; i++)
diff --git a/src/devices/bus/neogeo/prot_kof98.cpp b/src/devices/bus/neogeo/prot_kof98.cpp
index 9c41f709f2b..86da8a1b7f4 100644
--- a/src/devices/bus/neogeo/prot_kof98.cpp
+++ b/src/devices/bus/neogeo/prot_kof98.cpp
@@ -28,7 +28,7 @@ void kof98_prot_device::device_reset()
void kof98_prot_device::decrypt_68k(UINT8* cpurom, UINT32 cpurom_size)
{
UINT8 *src = cpurom;
- dynamic_buffer dst(0x200000);
+ std::vector<UINT8> dst(0x200000);
int i, j, k;
static const UINT32 sec[]={ 0x000000, 0x100000, 0x000004, 0x100004, 0x10000a, 0x00000a, 0x10000e, 0x00000e };
static const UINT32 pos[]={ 0x000, 0x004, 0x00a, 0x00e };
diff --git a/src/devices/bus/neogeo/prot_misc.cpp b/src/devices/bus/neogeo/prot_misc.cpp
index c858e05f42b..70ded6a0f7f 100644
--- a/src/devices/bus/neogeo/prot_misc.cpp
+++ b/src/devices/bus/neogeo/prot_misc.cpp
@@ -48,7 +48,7 @@ void neoboot_prot_device::cx_decrypt(UINT8*sprrom, UINT32 sprrom_size)
{
int cx_size = sprrom_size;
UINT8 *rom = sprrom;
- dynamic_buffer buf(cx_size);
+ std::vector<UINT8> buf(cx_size);
memcpy(&buf[0], rom, cx_size);
@@ -64,7 +64,7 @@ void neoboot_prot_device::sx_decrypt(UINT8* fixed, UINT32 fixed_size, int value)
if (value == 1)
{
- dynamic_buffer buf(sx_size);
+ std::vector<UINT8> buf(sx_size);
memcpy(&buf[0], rom, sx_size);
for (int i = 0; i < sx_size; i += 0x10)
@@ -171,7 +171,7 @@ void neoboot_prot_device::kf2k5uni_mx_decrypt(UINT8* audiorom, UINT32 audiorom_s
void neoboot_prot_device::decrypt_kof2k4se_68k(UINT8* cpurom, UINT32 cpurom_size)
{
UINT8 *src = cpurom + 0x100000;
- dynamic_buffer dst(0x400000);
+ std::vector<UINT8> dst(0x400000);
static const int sec[] = {0x300000,0x200000,0x100000,0x000000};
memcpy(&dst[0], src, 0x400000);
@@ -196,7 +196,7 @@ void neoboot_prot_device::lans2004_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size
UINT16 *rom = (UINT16*)cpurom;
static const int sec[] = { 0x3, 0x8, 0x7, 0xc, 0x1, 0xa, 0x6, 0xd };
- dynamic_buffer dst(0x600000);
+ std::vector<UINT8> dst(0x600000);
for (int i = 0; i < 8; i++)
memcpy (&dst[i * 0x20000], src + sec[i] * 0x20000, 0x20000);
@@ -232,7 +232,7 @@ void neoboot_prot_device::samsho5b_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{
int px_size = cpurom_size;
UINT8 *rom = cpurom;
- dynamic_buffer buf(px_size);
+ std::vector<UINT8> buf(px_size);
memcpy(&buf[0], rom, px_size);
@@ -311,7 +311,7 @@ void neoboot_prot_device::kog_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{
// the protection chip does some *very* strange things to the rom
UINT8 *src = cpurom;
- dynamic_buffer dst(0x600000);
+ std::vector<UINT8> dst(0x600000);
UINT16 *rom = (UINT16 *)cpurom;
static const int sec[] = { 0x3, 0x8, 0x7, 0xc, 0x1, 0xa, 0x6, 0xd };
@@ -373,7 +373,7 @@ void neoboot_prot_device::svcboot_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
static const UINT8 sec[] = { 0x06, 0x07, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00 };
int size = cpurom_size;
UINT8 *src = cpurom;
- dynamic_buffer dst(size);
+ std::vector<UINT8> dst(size);
for (int i = 0; i < size / 0x100000; i++)
memcpy(&dst[i * 0x100000], &src[sec[i] * 0x100000], 0x100000);
@@ -399,7 +399,7 @@ void neoboot_prot_device::svcboot_cx_decrypt(UINT8* sprrom, UINT32 sprrom_size)
};
int size = sprrom_size;
UINT8 *src = sprrom;
- dynamic_buffer dst(size);
+ std::vector<UINT8> dst(size);
memcpy(&dst[0], src, size);
for (int i = 0; i < size / 0x80; i++)
@@ -423,7 +423,7 @@ void neoboot_prot_device::svcplus_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
static const int sec[] = { 0x00, 0x03, 0x02, 0x05, 0x04, 0x01 };
int size = cpurom_size;
UINT8 *src = cpurom;
- dynamic_buffer dst(size);
+ std::vector<UINT8> dst(size);
memcpy(&dst[0], src, size);
for (int i = 0; i < size / 2; i++)
@@ -457,7 +457,7 @@ void neoboot_prot_device::svcplusa_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
static const int sec[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x00 };
int size = cpurom_size;
UINT8 *src = cpurom;
- dynamic_buffer dst(size);
+ std::vector<UINT8> dst(size);
memcpy(&dst[0], src, size);
for (int i = 0; i < 6; i++)
@@ -472,7 +472,7 @@ void neoboot_prot_device::svcsplus_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
static const int sec[] = { 0x06, 0x07, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00 };
int size = cpurom_size;
UINT8 *src = cpurom;
- dynamic_buffer dst(size);
+ std::vector<UINT8> dst(size);
memcpy(&dst[0], src, size);
for (int i = 0; i < size / 2; i++)
@@ -514,7 +514,7 @@ void neoboot_prot_device::kof2002b_gfx_decrypt(UINT8 *src, int size)
{ 8, 0, 7, 6, 2, 1 },
};
- dynamic_buffer dst(0x10000);
+ std::vector<UINT8> dst(0x10000);
for (int i = 0; i < size; i += 0x10000)
{
@@ -556,7 +556,7 @@ void neoboot_prot_device::kf2k2mp_decrypt(UINT8* cpurom, UINT32 cpurom_size)
void neoboot_prot_device::kf2k2mp2_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{
UINT8 *src = cpurom;
- dynamic_buffer dst(0x600000);
+ std::vector<UINT8> dst(0x600000);
memcpy(&dst[0x000000], &src[0x1C0000], 0x040000);
memcpy(&dst[0x040000], &src[0x140000], 0x080000);
@@ -571,7 +571,7 @@ void neoboot_prot_device::kf2k2mp2_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
void neoboot_prot_device::kof10th_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{
- dynamic_buffer dst(0x900000);
+ std::vector<UINT8> dst(0x900000);
UINT8 *src = cpurom;
memcpy(&dst[0x000000], src + 0x700000, 0x100000); // Correct (Verified in Uni-bios)
diff --git a/src/devices/bus/neogeo/prot_pcm2.cpp b/src/devices/bus/neogeo/prot_pcm2.cpp
index 3432eef4da2..2417075509a 100644
--- a/src/devices/bus/neogeo/prot_pcm2.cpp
+++ b/src/devices/bus/neogeo/prot_pcm2.cpp
@@ -75,7 +75,7 @@ void pcm2_prot_device::swap(UINT8* ymrom, UINT32 ymsize, int value)
{0x4b,0xa4,0x63,0x46,0xf0,0x91,0xea,0x62},
{0x4b,0xa4,0x63,0x46,0xf0,0x91,0xea,0x62}};
- dynamic_buffer buf(0x1000000);
+ std::vector<UINT8> buf(0x1000000);
int j, d;
UINT8* src = ymrom;
memcpy(&buf[0], src, 0x1000000);
diff --git a/src/devices/bus/neogeo/prot_pvc.cpp b/src/devices/bus/neogeo/prot_pvc.cpp
index 1de3383d5a3..8abdeb3ceb6 100644
--- a/src/devices/bus/neogeo/prot_pvc.cpp
+++ b/src/devices/bus/neogeo/prot_pvc.cpp
@@ -100,7 +100,7 @@ void pvc_prot_device::mslug5_decrypt_68k(UINT8* rom, UINT32 size)
static const UINT8 xor1[0x20] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 };
static const UINT8 xor2[0x20] = { 0x36, 0x09, 0xb0, 0x64, 0x95, 0x0f, 0x90, 0x42, 0x6e, 0x0f, 0x30, 0xf6, 0xe5, 0x08, 0x30, 0x64, 0x08, 0x04, 0x00, 0x2f, 0x72, 0x09, 0xa0, 0x13, 0xc9, 0x0b, 0xa0, 0x3e, 0xc2, 0x00, 0x40, 0x2b };
int rom_size = 0x800000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < 0x100000; i++)
rom[i] ^= xor1[(BYTE_XOR_LE(i) % 0x20)];
@@ -139,7 +139,7 @@ void pvc_prot_device::svc_px_decrypt(UINT8* rom, UINT32 size)
static const UINT8 xor1[0x20] = { 0x3b, 0x6a, 0xf7, 0xb7, 0xe8, 0xa9, 0x20, 0x99, 0x9f, 0x39, 0x34, 0x0c, 0xc3, 0x9a, 0xa5, 0xc8, 0xb8, 0x18, 0xce, 0x56, 0x94, 0x44, 0xe3, 0x7a, 0xf7, 0xdd, 0x42, 0xf0, 0x18, 0x60, 0x92, 0x9f };
static const UINT8 xor2[0x20] = { 0x69, 0x0b, 0x60, 0xd6, 0x4f, 0x01, 0x40, 0x1a, 0x9f, 0x0b, 0xf0, 0x75, 0x58, 0x0e, 0x60, 0xb4, 0x14, 0x04, 0x20, 0xe4, 0xb9, 0x0d, 0x10, 0x89, 0xeb, 0x07, 0x30, 0x90, 0x50, 0x0e, 0x20, 0x26 };
int rom_size = 0x800000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < 0x100000; i++)
rom[i] ^= xor1[(BYTE_XOR_LE(i) % 0x20)];
@@ -177,7 +177,7 @@ void pvc_prot_device::kf2k3pcb_decrypt_68k(UINT8* rom, UINT32 size)
{
static const UINT8 xor2[ 0x20 ] = { 0xb4, 0x0f, 0x40, 0x6c, 0x38, 0x07, 0xd0, 0x3f, 0x53, 0x08, 0x80, 0xaa, 0xbe, 0x07, 0xc0, 0xfa, 0xd0, 0x08, 0x10, 0xd2, 0xf1, 0x03, 0x70, 0x7e, 0x87, 0x0b, 0x40, 0xf6, 0x2a, 0x0a, 0xe0, 0xf9 };
int rom_size = 0x900000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < 0x100000; i++)
rom[0x800000 + i] ^= rom[0x100002 | i];
@@ -215,7 +215,7 @@ void pvc_prot_device::kof2003_decrypt_68k(UINT8* rom, UINT32 size)
static const UINT8 xor1[0x20] = { 0x3b, 0x6a, 0xf7, 0xb7, 0xe8, 0xa9, 0x20, 0x99, 0x9f, 0x39, 0x34, 0x0c, 0xc3, 0x9a, 0xa5, 0xc8, 0xb8, 0x18, 0xce, 0x56, 0x94, 0x44, 0xe3, 0x7a, 0xf7, 0xdd, 0x42, 0xf0, 0x18, 0x60, 0x92, 0x9f };
static const UINT8 xor2[0x20] = { 0x2f, 0x02, 0x60, 0xbb, 0x77, 0x01, 0x30, 0x08, 0xd8, 0x01, 0xa0, 0xdf, 0x37, 0x0a, 0xf0, 0x65, 0x28, 0x03, 0xd0, 0x23, 0xd3, 0x03, 0x70, 0x42, 0xbb, 0x06, 0xf0, 0x28, 0xba, 0x0f, 0xf0, 0x7a };
int rom_size = 0x900000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < 0x100000; i++)
rom[0x800000 + i] ^= rom[0x100002 | i];
@@ -256,7 +256,7 @@ void pvc_prot_device::kof2003h_decrypt_68k(UINT8* rom, UINT32 size)
static const UINT8 xor1[0x20] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 };
static const UINT8 xor2[0x20] = { 0x2b, 0x09, 0xd0, 0x7f, 0x51, 0x0b, 0x10, 0x4c, 0x5b, 0x07, 0x70, 0x9d, 0x3e, 0x0b, 0xb0, 0xb6, 0x54, 0x09, 0xe0, 0xcc, 0x3d, 0x0d, 0x80, 0x99, 0x87, 0x03, 0x90, 0x82, 0xfe, 0x04, 0x20, 0x18 };
int rom_size = 0x900000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < 0x100000; i++)
rom[0x800000 + i] ^= rom[0x100002 | i];
diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp
index 6ed293dccfd..d0f1ba00426 100644
--- a/src/devices/bus/nes/aladdin.cpp
+++ b/src/devices/bus/nes/aladdin.cpp
@@ -142,7 +142,7 @@ std::string nes_aladdin_slot_device::get_default_card_software()
{
const char *slot_string = "algn";
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
UINT8 mapper;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx
index a3bf0ad803e..9fd1e5a90eb 100644
--- a/src/devices/bus/nes/nes_ines.hxx
+++ b/src/devices/bus/nes/nes_ines.hxx
@@ -798,7 +798,7 @@ void nes_cart_slot_device::call_load_ines()
if (battery_size || mapper_sram_size)
{
UINT32 tot_size = battery_size + mapper_sram_size;
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
battery_load(&temp_nvram[0], tot_size, 0x00);
if (battery_size)
{
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index e87a6d249a7..67a8d731cac 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -596,12 +596,12 @@ void nes_cart_slot_device::call_load_pcb()
if (battery_size || mapper_sram_size)
{
UINT32 tot_size = battery_size + mapper_sram_size;
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
// some games relies on specific battery patterns to work
// (e.g. Silva Saga does not work with SRAM fully initialized to 0x00)
// and we use the info from xml here to prepare a default NVRAM
- dynamic_buffer default_nvram(tot_size);
+ std::vector<UINT8> default_nvram(tot_size);
if (battery_size)
memcpy(&default_nvram[0], get_software_region("bwram"), battery_size);
if (mapper_sram_size)
diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp
index 914bf8a935a..b63d2742246 100644
--- a/src/devices/bus/nes/nes_slot.cpp
+++ b/src/devices/bus/nes/nes_slot.cpp
@@ -886,7 +886,7 @@ void nes_cart_slot_device::call_unload()
if (m_cart->get_battery_size() || m_cart->get_mapper_sram_size())
{
UINT32 tot_size = m_cart->get_battery_size() + m_cart->get_mapper_sram_size();
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
if (m_cart->get_battery_size())
memcpy(&temp_nvram[0], m_cart->get_battery_base(), m_cart->get_battery_size());
if (m_cart->get_mapper_sram_size())
@@ -908,7 +908,7 @@ std::string nes_cart_slot_device::get_default_card_software()
{
const char *slot_string = "nrom";
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 27790c208e0..ab906ed6162 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -235,9 +235,9 @@ protected:
UINT8 *m_prg;
UINT8 *m_vrom;
UINT8 *m_ciram;
- dynamic_buffer m_prgram;
- dynamic_buffer m_vram;
- dynamic_buffer m_battery;
+ std::vector<UINT8> m_prgram;
+ std::vector<UINT8> m_vram;
+ std::vector<UINT8> m_battery;
UINT32 m_prg_size;
UINT32 m_vrom_size;
@@ -248,7 +248,7 @@ protected:
// these are specific of some boards but must be accessible from the driver
// E.g. additional save ram for HKROM, X1-005 & X1-017 boards, or ExRAM for MMC5
UINT8 *m_mapper_sram;
- dynamic_buffer m_ext_ntram;
+ std::vector<UINT8> m_ext_ntram;
UINT32 m_mapper_sram_size;
int m_ce_mask;
diff --git a/src/devices/bus/nes/nes_unif.hxx b/src/devices/bus/nes/nes_unif.hxx
index 6c95ece3e41..ff5d9e1384d 100644
--- a/src/devices/bus/nes/nes_unif.hxx
+++ b/src/devices/bus/nes/nes_unif.hxx
@@ -213,8 +213,8 @@ void nes_cart_slot_device::call_load_unif()
bool mapr_chunk_found = FALSE, small_prg = FALSE;
// allocate space to temporarily store PRG & CHR banks
- dynamic_buffer temp_prg(256 * 0x4000);
- dynamic_buffer temp_chr(256 * 0x2000);
+ std::vector<UINT8> temp_prg(256 * 0x4000);
+ std::vector<UINT8> temp_chr(256 * 0x2000);
UINT8 temp_byte = 0;
fseek(4, SEEK_SET);
@@ -541,7 +541,7 @@ void nes_cart_slot_device::call_load_unif()
if (battery_size || mapper_sram_size)
{
UINT32 tot_size = battery_size + mapper_sram_size;
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
battery_load(&temp_nvram[0], tot_size, 0x00);
if (battery_size)
{
diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h
index b7f5bed0646..cd0b69c1d27 100644
--- a/src/devices/bus/nubus/nubus.h
+++ b/src/devices/bus/nubus/nubus.h
@@ -171,7 +171,7 @@ public:
const char *m_nubus_tag, *m_nubus_slottag;
int m_slot;
device_nubus_card_interface *m_next;
- dynamic_buffer m_declaration_rom;
+ std::vector<UINT8> m_declaration_rom;
};
#endif /* __NUBUS_H__ */
diff --git a/src/devices/bus/nubus/nubus_48gc.h b/src/devices/bus/nubus/nubus_48gc.h
index 7764321ddb7..32c333113f7 100644
--- a/src/devices/bus/nubus/nubus_48gc.h
+++ b/src/devices/bus/nubus/nubus_48gc.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(mac_48gc_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 m_mode, m_vbl_disable, m_toggle, m_stride, m_base;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
UINT32 m_registers[0x100];
diff --git a/src/devices/bus/nubus/nubus_cb264.h b/src/devices/bus/nubus/nubus_cb264.h
index 54466bb66f2..5caa7cf6545 100644
--- a/src/devices/bus/nubus/nubus_cb264.h
+++ b/src/devices/bus/nubus/nubus_cb264.h
@@ -39,7 +39,7 @@ protected:
DECLARE_WRITE32_MEMBER(cb264_ramdac_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 m_cb264_mode, m_cb264_vbl_disable, m_cb264_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
};
diff --git a/src/devices/bus/nubus/nubus_m2hires.h b/src/devices/bus/nubus/nubus_m2hires.h
index 43c805f03fa..1f5f932e333 100644
--- a/src/devices/bus/nubus/nubus_m2hires.h
+++ b/src/devices/bus/nubus/nubus_m2hires.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/nubus_m2video.h b/src/devices/bus/nubus/nubus_m2video.h
index f30066a408a..1ed9e33f3c5 100644
--- a/src/devices/bus/nubus/nubus_m2video.h
+++ b/src/devices/bus/nubus/nubus_m2video.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/nubus_radiustpd.h b/src/devices/bus/nubus/nubus_radiustpd.h
index a1c3bd4ac6a..e227913a69b 100644
--- a/src/devices/bus/nubus/nubus_radiustpd.h
+++ b/src/devices/bus/nubus/nubus_radiustpd.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/nubus_spec8.h b/src/devices/bus/nubus/nubus_spec8.h
index dfbc23324f8..61af612c7a6 100644
--- a/src/devices/bus/nubus/nubus_spec8.h
+++ b/src/devices/bus/nubus/nubus_spec8.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/nubus_specpdq.h b/src/devices/bus/nubus/nubus_specpdq.h
index 0638114dde1..8b937ffbe64 100644
--- a/src/devices/bus/nubus/nubus_specpdq.h
+++ b/src/devices/bus/nubus/nubus_specpdq.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette_val[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/nubus_vikbw.h b/src/devices/bus/nubus/nubus_vikbw.h
index c299f637878..1a4935a62c5 100644
--- a/src/devices/bus/nubus/nubus_vikbw.h
+++ b/src/devices/bus/nubus/nubus_vikbw.h
@@ -39,7 +39,7 @@ protected:
DECLARE_WRITE32_MEMBER(viking_disable_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 m_vbl_disable, m_palette[2];
};
diff --git a/src/devices/bus/nubus/nubus_wsportrait.h b/src/devices/bus/nubus/nubus_wsportrait.h
index 1c39b5a5ec1..8a499dd632d 100644
--- a/src/devices/bus/nubus/nubus_wsportrait.h
+++ b/src/devices/bus/nubus/nubus_wsportrait.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/pds30_30hr.h b/src/devices/bus/nubus/pds30_30hr.h
index 569401a8070..c243e05a382 100644
--- a/src/devices/bus/nubus/pds30_30hr.h
+++ b/src/devices/bus/nubus/pds30_30hr.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/pds30_cb264.h b/src/devices/bus/nubus/pds30_cb264.h
index f68e7085d5f..b327cb2aff5 100644
--- a/src/devices/bus/nubus/pds30_cb264.h
+++ b/src/devices/bus/nubus/pds30_cb264.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/pds30_mc30.h b/src/devices/bus/nubus/pds30_mc30.h
index 71327a0d0d8..2a953ee5a6f 100644
--- a/src/devices/bus/nubus/pds30_mc30.h
+++ b/src/devices/bus/nubus/pds30_mc30.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/pds30_procolor816.h b/src/devices/bus/nubus/pds30_procolor816.h
index a5922e4a1ed..482593cb549 100644
--- a/src/devices/bus/nubus/pds30_procolor816.h
+++ b/src/devices/bus/nubus/pds30_procolor816.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
diff --git a/src/devices/bus/nubus/pds30_sigmalview.h b/src/devices/bus/nubus/pds30_sigmalview.h
index c5cff0f68b8..3db62231f29 100644
--- a/src/devices/bus/nubus/pds30_sigmalview.h
+++ b/src/devices/bus/nubus/pds30_sigmalview.h
@@ -41,7 +41,7 @@ protected:
DECLARE_WRITE32_MEMBER(vram_w);
public:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT32 *m_vram32;
UINT32 m_vbl_disable, m_toggle;
UINT32 m_palette[256];
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index 50f04e74b7e..454239d8a5a 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -50,7 +50,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/pc_kbd/iskr1030.h b/src/devices/bus/pc_kbd/iskr1030.h
index 81178bbc854..dd3573f0f75 100644
--- a/src/devices/bus/pc_kbd/iskr1030.h
+++ b/src/devices/bus/pc_kbd/iskr1030.h
@@ -79,7 +79,7 @@ private:
required_ioport m_md22;
required_ioport m_md23;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
UINT8 m_bus;
UINT8 m_p1;
UINT8 m_p2;
diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp
index 7c4a024fabd..db42af8281e 100644
--- a/src/devices/bus/pce/pce_slot.cpp
+++ b/src/devices/bus/pce/pce_slot.cpp
@@ -333,7 +333,7 @@ std::string pce_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index 579945229bf..ccd7954b8a5 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -45,7 +45,7 @@ public:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
void rom_map_setup(UINT32 size);
diff --git a/src/devices/bus/pet/2joysnd.cpp b/src/devices/bus/pet/2joysnd.cpp
index ef8fb7f974c..41e998ca429 100644
--- a/src/devices/bus/pet/2joysnd.cpp
+++ b/src/devices/bus/pet/2joysnd.cpp
@@ -47,6 +47,7 @@ Connections
*/
#include "2joysnd.h"
+#include "sound/volt_reg.h"
//**************************************************************************
@@ -55,12 +56,11 @@ Connections
const device_type PET_USERPORT_JOYSTICK_AND_SOUND_DEVICE = &device_creator<pet_userport_joystick_and_sound_device>;
-#define DAC_TAG "dac"
-
MACHINE_CONFIG_FRAGMENT( 2joysnd )
- MCFG_SPEAKER_STANDARD_MONO("cb2spkr")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cb2spkr", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@@ -113,7 +113,7 @@ machine_config_constructor pet_userport_joystick_and_sound_device::device_mconfi
pet_userport_joystick_and_sound_device::pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PET_USERPORT_JOYSTICK_AND_SOUND_DEVICE, "Dual Joysticks and Sound", tag, owner, clock, "2joysnd", __FILE__),
device_pet_user_port_interface(mconfig, *this),
- m_dac(*this, DAC_TAG),
+ m_dac(*this, "dac"),
m_up1(1),
m_down1(1),
m_fire1(1),
@@ -158,5 +158,5 @@ void pet_userport_joystick_and_sound_device::update_port2()
DECLARE_WRITE_LINE_MEMBER( pet_userport_joystick_and_sound_device::input_m )
{
- m_dac->write_unsigned8(state ? 0xff : 0x00);
+ m_dac->write(state);
}
diff --git a/src/devices/bus/pet/2joysnd.h b/src/devices/bus/pet/2joysnd.h
index ee2232e6ad3..040e867ef99 100644
--- a/src/devices/bus/pet/2joysnd.h
+++ b/src/devices/bus/pet/2joysnd.h
@@ -37,7 +37,7 @@ public:
virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
// device_pet_user_port_interface overrides
WRITE_LINE_MEMBER( write_up1 ) { m_up1 = state; update_port1(); }
diff --git a/src/devices/bus/pet/cb2snd.cpp b/src/devices/bus/pet/cb2snd.cpp
index d89ef26268c..b2ef21f79b1 100644
--- a/src/devices/bus/pet/cb2snd.cpp
+++ b/src/devices/bus/pet/cb2snd.cpp
@@ -9,6 +9,7 @@
**********************************************************************/
#include "cb2snd.h"
+#include "sound/volt_reg.h"
//**************************************************************************
// DEVICE DEFINITIONS
@@ -16,12 +17,11 @@
const device_type PET_USERPORT_CB2_SOUND_DEVICE = &device_creator<pet_userport_cb2_sound_device>;
-#define DAC_TAG "dac"
-
MACHINE_CONFIG_FRAGMENT( cb2snd )
- MCFG_SPEAKER_STANDARD_MONO("cb2spkr")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cb2spkr", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@@ -45,7 +45,7 @@ machine_config_constructor pet_userport_cb2_sound_device::device_mconfig_additio
pet_userport_cb2_sound_device::pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PET_USERPORT_CB2_SOUND_DEVICE, "PET Userport 'CB2 Sound' Device", tag, owner, clock, "petucb2", __FILE__),
device_pet_user_port_interface(mconfig, *this),
- m_dac(*this, DAC_TAG)
+ m_dac(*this, "dac")
{
}
@@ -60,5 +60,5 @@ void pet_userport_cb2_sound_device::device_start()
DECLARE_WRITE_LINE_MEMBER( pet_userport_cb2_sound_device::input_m )
{
- m_dac->write_unsigned8(state ? 0xff : 0x00);
+ m_dac->write(state);
}
diff --git a/src/devices/bus/pet/cb2snd.h b/src/devices/bus/pet/cb2snd.h
index 8f62c8973bf..e8caed04480 100644
--- a/src/devices/bus/pet/cb2snd.h
+++ b/src/devices/bus/pet/cb2snd.h
@@ -30,7 +30,7 @@ public:
virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
protected:
// device-level overrides
diff --git a/src/devices/bus/plus4/sid.cpp b/src/devices/bus/plus4/sid.cpp
index 4c100861cd6..d5b72e2a0ea 100644
--- a/src/devices/bus/plus4/sid.cpp
+++ b/src/devices/bus/plus4/sid.cpp
@@ -62,11 +62,9 @@ const tiny_rom_entry *plus4_sid_cartridge_device::device_rom_region() const
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( plus4_sid )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD(MOS8580_TAG, MOS8580, XTAL_17_73447MHz/20)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/plus4/sid.h b/src/devices/bus/plus4/sid.h
index b5980849425..2c9f59c98f2 100644
--- a/src/devices/bus/plus4/sid.h
+++ b/src/devices/bus/plus4/sid.h
@@ -14,7 +14,6 @@
#include "emu.h"
#include "exp.h"
#include "bus/vcs_ctrl/ctrl.h"
-#include "sound/dac.h"
#include "sound/mos6581.h"
diff --git a/src/devices/bus/pofo/hpc104.cpp b/src/devices/bus/pofo/hpc104.cpp
index e08bb317db9..9a2cfa6b8cc 100644
--- a/src/devices/bus/pofo/hpc104.cpp
+++ b/src/devices/bus/pofo/hpc104.cpp
@@ -169,9 +169,9 @@ UINT8 hpc104_t::nrdi_r(address_space &space, offs_t offset, UINT8 data, bool iom
{
if (!(!m_ncc1_out || ncc1))
{
- if (LOG) logerror("%s %s CCM0 read %05x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff);
-
data = m_ccm->nrdi_r(space, offset & 0x1ffff);
+
+ if (LOG) logerror("%s %s CCM1 read %05x:%02x\n", machine().time().as_string(), machine().describe_context(), offset & 0x1ffff, data);
}
if (m_sw1)
@@ -234,7 +234,7 @@ void hpc104_t::nwri_w(address_space &space, offs_t offset, UINT8 data, bool iom,
{
m_ncc1_out = BIT(data, 0);
- if (LOG) logerror("NCC1 out %u\n", machine().time().as_string(), machine().describe_context(), m_ncc1_out);
+ if (LOG) logerror("%s %s NCC1 out %u\n", machine().time().as_string(), machine().describe_context(), m_ncc1_out);
}
}
}
diff --git a/src/devices/bus/sat_ctrl/keybd.cpp b/src/devices/bus/sat_ctrl/keybd.cpp
index 91c3f438f6d..d84922929ff 100644
--- a/src/devices/bus/sat_ctrl/keybd.cpp
+++ b/src/devices/bus/sat_ctrl/keybd.cpp
@@ -250,7 +250,7 @@ INPUT_CHANGED_MEMBER(saturn_keybd_device::key_stroke)
{
if (newval && !oldval)
{
- m_data = ((UINT8)(FPTR)(param) & 0xff);
+ m_data = ((UINT8)(uintptr_t)(param) & 0xff);
m_status |= 8;
}
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index f87ce9bf0d3..5aec2dfdd40 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -55,7 +55,7 @@ protected:
UINT32 m_rom_size;
std::vector<UINT32> m_ext_dram0;
std::vector<UINT32> m_ext_dram1;
- dynamic_buffer m_ext_bram;
+ std::vector<UINT8> m_ext_bram;
};
diff --git a/src/devices/bus/scsi/omti5100.cpp b/src/devices/bus/scsi/omti5100.cpp
index c2c56ff5175..de40a68c32c 100644
--- a/src/devices/bus/scsi/omti5100.cpp
+++ b/src/devices/bus/scsi/omti5100.cpp
@@ -95,7 +95,7 @@ void omti5100_device::ExecCommand()
int track = ((command[1]&0x1f)<<16 | command[2]<<8 | command[3]) / m_param[drive].sectors;
if(((track % m_param[drive].heads) <= info->heads) && (track < (info->cylinders * m_param[drive].heads)))
{
- dynamic_buffer sector(info->sectorbytes);
+ std::vector<UINT8> sector(info->sectorbytes);
memset(&sector[0], 0xe5, info->sectorbytes);
m_phase = SCSI_PHASE_STATUS;
m_status_code = SCSI_STATUS_CODE_GOOD;
diff --git a/src/devices/bus/scsi/s1410.cpp b/src/devices/bus/scsi/s1410.cpp
index eaeaf51d461..b26b9b5aef7 100644
--- a/src/devices/bus/scsi/s1410.cpp
+++ b/src/devices/bus/scsi/s1410.cpp
@@ -256,7 +256,7 @@ void s1410_device::ExecCommand()
if ((m_disk) && (m_blocks))
{
- dynamic_buffer data(m_sector_bytes);
+ std::vector<UINT8> data(m_sector_bytes);
memset(&data[0], 0xc6, m_sector_bytes);
while (m_blocks > 0)
diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp
index c8e05a1229b..d0554c44584 100644
--- a/src/devices/bus/scv/slot.cpp
+++ b/src/devices/bus/scv/slot.cpp
@@ -253,7 +253,7 @@ std::string scv_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h
index cbf87dd7d06..d6168ebed81 100644
--- a/src/devices/bus/scv/slot.h
+++ b/src/devices/bus/scv/slot.h
@@ -51,7 +51,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp
index 04a1498bf84..3cfb14b4981 100644
--- a/src/devices/bus/sega8/sega8_slot.cpp
+++ b/src/devices/bus/sega8/sega8_slot.cpp
@@ -598,7 +598,7 @@ std::string sega8_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size(), offset = 0;
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h
index 5a0ce0af010..4d032e30b50 100644
--- a/src/devices/bus/sega8/sega8_slot.h
+++ b/src/devices/bus/sega8/sega8_slot.h
@@ -80,7 +80,7 @@ public:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
int m_rom_page_count;
bool has_battery;
diff --git a/src/devices/bus/sg1000_exp/fm_unit.cpp b/src/devices/bus/sg1000_exp/fm_unit.cpp
index 7e5e5998357..41142e95bbf 100644
--- a/src/devices/bus/sg1000_exp/fm_unit.cpp
+++ b/src/devices/bus/sg1000_exp/fm_unit.cpp
@@ -128,17 +128,17 @@ WRITE8_MEMBER(sega_fm_unit_device::peripheral_w)
m_audio_control = data & 0x01;
if (m_audio_control == 0x01)
{
- m_ym->set_output_gain(0, 1.0);
+ m_ym->set_output_gain(ALL_OUTPUTS, 1.0);
// assume the PSG output is muted when FM is active.
// Out Run need this. Needs confirmation (see TODO).
if (m_psg.found())
- m_psg->set_output_gain(0, 0.0);
+ m_psg->set_output_gain(ALL_OUTPUTS, 0.0);
}
else
{
- m_ym->set_output_gain(0, 0.0);
+ m_ym->set_output_gain(ALL_OUTPUTS, 0.0);
if (m_psg.found())
- m_psg->set_output_gain(0, 1.0);
+ m_psg->set_output_gain(ALL_OUTPUTS, 1.0);
}
break;
default:
diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp
index df947c270b6..c70a1cac664 100644
--- a/src/devices/bus/snes/snes_slot.cpp
+++ b/src/devices/bus/snes/snes_slot.cpp
@@ -612,7 +612,7 @@ image_init_result base_sns_cart_slot_device::call_load()
if (software_entry() == nullptr)
{
UINT32 tmplen = length();
- dynamic_buffer tmpROM(tmplen);
+ std::vector<UINT8> tmpROM(tmplen);
fread(&tmpROM[0], tmplen);
offset = snes_skip_header(&tmpROM[0], tmplen);
fseek(offset, SEEK_SET);
@@ -665,7 +665,7 @@ image_init_result base_sns_cart_slot_device::call_load()
if (m_cart->get_nvram_size() || m_cart->get_rtc_ram_size())
{
UINT32 tot_size = m_cart->get_nvram_size() + m_cart->get_rtc_ram_size();
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
battery_load(&temp_nvram[0], tot_size, 0xff);
if (m_cart->get_nvram_size())
memcpy(m_cart->get_nvram_base(), &temp_nvram[0], m_cart->get_nvram_size());
@@ -695,7 +695,7 @@ void base_sns_cart_slot_device::call_unload()
if (m_cart->get_nvram_size() || m_cart->get_rtc_ram_size())
{
UINT32 tot_size = m_cart->get_nvram_size() + m_cart->get_rtc_ram_size();
- dynamic_buffer temp_nvram(tot_size);
+ std::vector<UINT8> temp_nvram(tot_size);
if (m_cart->get_nvram_size())
memcpy(&temp_nvram[0], m_cart->get_nvram_base(), m_cart->get_nvram_size());
if (m_cart->get_rtc_ram_size())
@@ -998,7 +998,7 @@ std::string base_sns_cart_slot_device::get_default_card_software()
const char *slot_string;
UINT32 offset;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type = 0, addon = 0;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h
index f6d4208eb1c..c86595d3557 100644
--- a/src/devices/bus/snes/snes_slot.h
+++ b/src/devices/bus/snes/snes_slot.h
@@ -136,9 +136,9 @@ public:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_nvram;
- dynamic_buffer m_bios;
- dynamic_buffer m_rtc_ram; // temp pointer to save RTC ram to nvram (will disappear when RTCs become devices)
+ std::vector<UINT8> m_nvram;
+ std::vector<UINT8> m_bios;
+ std::vector<UINT8> m_rtc_ram; // temp pointer to save RTC ram to nvram (will disappear when RTCs become devices)
UINT8 rom_bank_map[256]; // 32K chunks of rom
};
diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h
index 309a7d76558..34161cb6a5d 100644
--- a/src/devices/bus/ti99x/gromport.h
+++ b/src/devices/bus/ti99x/gromport.h
@@ -342,8 +342,8 @@ protected:
int m_grom_address; // for gromemu
int m_ram_page; // for super
const char* m_tag;
- dynamic_buffer m_nvram; // for MiniMemory
- dynamic_buffer m_ram; // for MBX
+ std::vector<UINT8> m_nvram; // for MiniMemory
+ std::vector<UINT8> m_ram; // for MBX
};
/******************** Standard cartridge ******************************/
diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h
index ed3425d0ddc..479da188c07 100644
--- a/src/devices/bus/vc4000/slot.h
+++ b/src/devices/bus/vc4000/slot.h
@@ -49,7 +49,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp
index deb811bed9a..e9b0a93900b 100644
--- a/src/devices/bus/vcs/vcs_slot.cpp
+++ b/src/devices/bus/vcs/vcs_slot.cpp
@@ -776,7 +776,7 @@ std::string vcs_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 len = m_file->size();
- dynamic_buffer rom(len);
+ std::vector<UINT8> rom(len);
int type;
m_file->read(&rom[0], len);
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index b8532dc216d..da08b7db743 100755
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -76,7 +76,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_ram;
};
diff --git a/src/devices/bus/vectrex/slot.cpp b/src/devices/bus/vectrex/slot.cpp
index 28ead970a75..4063ed7b01c 100644
--- a/src/devices/bus/vectrex/slot.cpp
+++ b/src/devices/bus/vectrex/slot.cpp
@@ -212,7 +212,7 @@ std::string vectrex_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 size = m_file->size();
- dynamic_buffer rom(size);
+ std::vector<UINT8> rom(size);
int type = VECTREX_STD;
m_file->read(&rom[0], size);
diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h
index c9cd6677b55..d7ef79f3528 100644
--- a/src/devices/bus/vidbrain/exp.h
+++ b/src/devices/bus/vidbrain/exp.h
@@ -94,8 +94,8 @@ protected:
videobrain_expansion_slot_device *m_slot;
- dynamic_buffer m_rom;
- dynamic_buffer m_ram;
+ std::vector<UINT8> m_rom;
+ std::vector<UINT8> m_ram;
size_t m_rom_mask;
size_t m_ram_mask;
diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp
index ea075b42cc4..abfa903a6a3 100644
--- a/src/devices/bus/wswan/slot.cpp
+++ b/src/devices/bus/wswan/slot.cpp
@@ -301,7 +301,7 @@ std::string ws_cart_slot_device::get_default_card_software()
{
const char *slot_string;
UINT32 size = m_file->size();
- dynamic_buffer rom(size);
+ std::vector<UINT8> rom(size);
int type;
UINT32 nvram;
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h
index bd9d74fbe85..36ac1c43bc6 100644
--- a/src/devices/bus/wswan/slot.h
+++ b/src/devices/bus/wswan/slot.h
@@ -54,7 +54,7 @@ protected:
// internal state
UINT8 *m_rom;
UINT32 m_rom_size;
- dynamic_buffer m_nvram;
+ std::vector<UINT8> m_nvram;
int m_bank_mask;
bool m_has_rtc, m_is_rotated;
diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp
index 3999332d6ee..58a9077fd9d 100644
--- a/src/devices/cpu/8x300/8x300.cpp
+++ b/src/devices/cpu/8x300/8x300.cpp
@@ -146,16 +146,6 @@ void n8x300_cpu_device::device_start()
m_icountptr = &m_icount;
}
-void n8x300_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
-{
- switch (entry.index())
- {
-// case STATE_GENFLAGS:
-// string.printf("%c%c%c%c%c%c",
-// break;
- }
-}
-
void n8x300_cpu_device::device_reset()
{
/* zero registers */
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index c2eff97499b..0ba76e30d20 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -67,9 +67,6 @@ protected:
}
}
- // device_state_interface overrides
- virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
-
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/alph8201/8201dasm.cpp b/src/devices/cpu/alph8201/8201dasm.cpp
index 6f4b816990b..464813cd170 100644
--- a/src/devices/cpu/alph8201/8201dasm.cpp
+++ b/src/devices/cpu/alph8201/8201dasm.cpp
@@ -2,10 +2,9 @@
// copyright-holders:Tatsuyuki Satoh
/*
-Notice: please do not modify this file, except in case of compile- or critical emulation error
-A more accurate implementation is in mame/alpha8201.*
+Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-cpu/alph8201/ will be removed soon
+cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
diff --git a/src/devices/cpu/alph8201/alph8201.cpp b/src/devices/cpu/alph8201/alph8201.cpp
index 8fa4f51e762..26b358c7b90 100644
--- a/src/devices/cpu/alph8201/alph8201.cpp
+++ b/src/devices/cpu/alph8201/alph8201.cpp
@@ -2,10 +2,9 @@
// copyright-holders:Tatsuyuki Satoh
/*
-Notice: please do not modify this file, except in case of compile- or critical emulation error
-A more accurate implementation is in mame/alpha8201.*
+Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-cpu/alph8201/ will be removed soon
+cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
@@ -394,12 +393,10 @@ void alpha8201_cpu_device::device_start()
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
- state_add( ALPHA8201_PC, "PC", m_pc.w.l ).mask(0x3ff).formatstr("%03X");
+ state_add( ALPHA8201_PC, "PC", m_pc.w.l ).callimport().mask(0x3ff).formatstr("%03X");
state_add( ALPHA8201_SP, "SP", m_sp ).callimport().callexport().formatstr("%02X");
state_add( ALPHA8201_RB, "RB", m_regPtr ).mask(0x7);
state_add( ALPHA8201_MB, "MB", m_mb ).mask(0x3);
- state_add( ALPHA8201_CF, "CF", m_cf ).mask(0x1);
- state_add( ALPHA8201_ZF, "ZF", m_zf ).mask(0x1);
state_add( ALPHA8201_IX0, "IX0", m_ix0.b.l );
state_add( ALPHA8201_IX1, "IX1", m_ix1.b.l );
state_add( ALPHA8201_IX2, "IX2", m_ix2.b.l );
@@ -416,6 +413,9 @@ void alpha8201_cpu_device::device_start()
state_add( ALPHA8201_R5, "R5", m_R[5] ).callimport().callexport().formatstr("%02X");
state_add( ALPHA8201_R6, "R6", m_R[6] ).callimport().callexport().formatstr("%02X");
state_add( ALPHA8201_R7, "R7", m_R[7] ).callimport().callexport().formatstr("%02X");
+ state_add( STATE_GENPCBASE, "CURPC", m_PREVPC ).callimport().noshow();
+ state_add( STATE_GENFLAGS, "CURFLAGS", m_flags ).callimport().callexport().formatstr("%2s").noshow();
+ state_add( STATE_GENSP, "CURSP", m_sp ).callimport().callexport();
save_item(NAME(m_RAM));
save_item(NAME(m_PREVPC));
@@ -445,7 +445,21 @@ void alpha8201_cpu_device::state_import(const device_state_entry &entry)
{
switch (entry.index())
{
+ case ALPHA8201_PC:
+ m_PREVPC = m_pc.w.l;
+ break;
+
+ case STATE_GENPCBASE:
+ m_pc.w.l = m_PREVPC;
+ break;
+
+ case STATE_GENFLAGS:
+ m_cf = BIT(m_flags, 1);
+ m_zf = BIT(m_flags, 0);
+ break;
+
case ALPHA8201_SP:
+ case STATE_GENSP:
M_WRMEM(0x001, m_sp);
break;
@@ -488,7 +502,12 @@ void alpha8201_cpu_device::state_export(const device_state_entry &entry)
{
switch (entry.index())
{
+ case STATE_GENFLAGS:
+ m_flags = (m_cf << 1) | m_zf;
+ break;
+
case ALPHA8201_SP:
+ case STATE_GENSP:
m_sp = M_RDMEM(0x001);
break;
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
index 22130bc5464..432f8193c69 100644
--- a/src/devices/cpu/alph8201/alph8201.h
+++ b/src/devices/cpu/alph8201/alph8201.h
@@ -2,10 +2,9 @@
// copyright-holders:Tatsuyuki Satoh
/*
-Notice: please do not modify this file, except in case of compile- or critical emulation error
-A more accurate implementation is in mame/alpha8201.*
+Notice: The alpha 8201 is now emulated using mame/alpha8201.*
-cpu/alph8201/ will be removed soon
+cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
@@ -28,14 +27,11 @@ cpu/alph8201/ will be removed soon
enum
{
- ALPHA8201_PC=1,
- ALPHA8201_SP,
+ ALPHA8201_PC = STATE_GENPC,
+ ALPHA8201_SP = 0,
ALPHA8201_RB,
ALPHA8201_MB,
//
- ALPHA8201_CF,
- ALPHA8201_ZF,
-//
ALPHA8201_IX0,
ALPHA8201_IX1,
ALPHA8201_IX2,
@@ -402,6 +398,7 @@ protected:
// Used for import/export only
UINT8 m_sp;
UINT8 m_R[8];
+ UINT8 m_flags;
};
diff --git a/src/devices/cpu/apexc/apexc.cpp b/src/devices/cpu/apexc/apexc.cpp
index 56d29e65415..5d367d33667 100644
--- a/src/devices/cpu/apexc/apexc.cpp
+++ b/src/devices/cpu/apexc/apexc.cpp
@@ -776,6 +776,7 @@ void apexc_cpu_device::device_start()
state_add( APEXC_STATE, "CPU state", m_running ).mask(0x01);
state_add( APEXC_PC, "PC", m_pc ).callimport().callexport().formatstr("%03X");
state_add( APEXC_ML_FULL, "ML_FULL", m_ml_full ).callimport().callexport().noshow();
+ state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow();
m_icountptr = &m_icount;
}
diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp
index 7f7f75b279c..952ddc46c73 100644
--- a/src/devices/cpu/arm7/arm7.cpp
+++ b/src/devices/cpu/arm7/arm7.cpp
@@ -125,9 +125,14 @@ sa1110_cpu_device::sa1110_cpu_device(const machine_config &mconfig, const char *
{
}
+void arm7_cpu_device::update_reg_ptr()
+{
+ m_reg_group = sRegisterTable[GET_MODE];
+}
void arm7_cpu_device::set_cpsr(UINT32 val)
{
+ UINT8 old_mode = GET_CPSR & MODE_FLAG;
if (m_archFlags & eARM_ARCHFLAGS_MODE26)
{
if ((val & 0x10) != (m_r[eCPSR] & 0x10))
@@ -158,6 +163,10 @@ void arm7_cpu_device::set_cpsr(UINT32 val)
val |= 0x10; // force valid mode
}
m_r[eCPSR] = val;
+ if ((GET_CPSR & MODE_FLAG) != old_mode)
+ {
+ update_reg_ptr();
+ }
}
@@ -179,13 +188,6 @@ enum
};
-UINT32 arm7_cpu_device::arm7_tlb_get_first_level_descriptor( UINT32 vaddr )
-{
- UINT32 entry_paddr = ( m_tlbBase & COPRO_TLB_BASE_MASK ) | ( ( vaddr & COPRO_TLB_VADDR_FLTI_MASK ) >> COPRO_TLB_VADDR_FLTI_MASK_SHIFT );
- return m_program->read_dword( entry_paddr );
-}
-
-
// COARSE, desc_level1, vaddr
UINT32 arm7_cpu_device::arm7_tlb_get_second_level_descriptor( UINT32 granularity, UINT32 first_desc, UINT32 vaddr )
{
@@ -209,9 +211,9 @@ UINT32 arm7_cpu_device::arm7_tlb_get_second_level_descriptor( UINT32 granularity
}
-int arm7_cpu_device::detect_fault(int permission, int ap, int flags)
+int arm7_cpu_device::detect_fault(int desc_lvl1, int ap, int flags)
{
- switch (permission)
+ switch (m_decoded_access_control[(desc_lvl1 >> 5) & 0xf])
{
case 0 : // "No access - Any access generates a domain fault"
{
@@ -219,62 +221,56 @@ int arm7_cpu_device::detect_fault(int permission, int ap, int flags)
}
case 1 : // "Client - Accesses are checked against the access permission bits in the section or page descriptor"
{
- switch (ap)
+ if ((ap & 3) == 3)
{
- case 0 :
+ return FAULT_NONE;
+ }
+ else if (ap & 2)
+ {
+ if (((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER) && (flags & ARM7_TLB_WRITE))
+ {
+ return FAULT_PERMISSION;
+ }
+ }
+ else if (ap & 1)
+ {
+ if ((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER)
{
- int s = (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0;
- int r = (m_control & COPRO_CTRL_ROM) ? 1 : 0;
- if (s == 0)
+ return FAULT_PERMISSION;
+ }
+ }
+ else
+ {
+ int s = (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0;
+ int r = (m_control & COPRO_CTRL_ROM) ? 1 : 0;
+ if (s == 0)
+ {
+ if (r == 0) // "Any access generates a permission fault"
{
- if (r == 0) // "Any access generates a permission fault"
- {
- return FAULT_PERMISSION;
- }
- else // "Any write generates a permission fault"
- {
- if (flags & ARM7_TLB_WRITE)
- {
- return FAULT_PERMISSION;
- }
- }
+ return FAULT_PERMISSION;
}
- else
+ else // "Any write generates a permission fault"
{
- if (r == 0) // "Only Supervisor read permitted"
- {
- if (((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER) || (flags & ARM7_TLB_WRITE))
- {
- return FAULT_PERMISSION;
- }
- }
- else // "Reserved" -> assume same behaviour as S=0/R=0 case
+ if (flags & ARM7_TLB_WRITE)
{
return FAULT_PERMISSION;
}
}
}
- break;
- case 1 : // "Access allowed only in Supervisor mode"
+ else
{
- if ((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER)
+ if (r == 0) // "Only Supervisor read permitted"
{
- return FAULT_PERMISSION;
+ if (((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER) || (flags & ARM7_TLB_WRITE))
+ {
+ return FAULT_PERMISSION;
+ }
}
- }
- break;
- case 2 : // "Writes in User mode cause permission fault"
- {
- if (((m_r[eCPSR] & MODE_FLAG) == eARM7_MODE_USER) && (flags & ARM7_TLB_WRITE))
+ else // "Reserved" -> assume same behaviour as S=0/R=0 case
{
return FAULT_PERMISSION;
}
}
- break;
- case 3 : // "All access types permitted in both modes"
- {
- return FAULT_NONE;
- }
}
}
break;
@@ -293,30 +289,17 @@ int arm7_cpu_device::detect_fault(int permission, int ap, int flags)
bool arm7_cpu_device::arm7_tlb_translate(offs_t &addr, int flags)
{
- UINT32 desc_lvl1;
- UINT32 desc_lvl2 = 0;
- UINT32 paddr, vaddr = addr;
- UINT8 domain, permission;
-
- if (vaddr < 32 * 1024 * 1024)
+ if (addr < 0x2000000)
{
- UINT32 pid = ((m_fcsePID >> 25) & 0x7F);
- if (pid > 0)
- {
- //LOG( ( "ARM7: FCSE PID vaddr %08X -> %08X\n", vaddr, vaddr + (pid * (32 * 1024 * 1024))) );
- vaddr = vaddr + (((m_fcsePID >> 25) & 0x7F) * (32 * 1024 * 1024));
- }
+ addr += m_pid_offset;
}
- desc_lvl1 = arm7_tlb_get_first_level_descriptor( vaddr );
-
- paddr = vaddr;
+ UINT32 desc_lvl1 = m_program->read_dword(m_tlb_base_mask | ((addr & COPRO_TLB_VADDR_FLTI_MASK) >> COPRO_TLB_VADDR_FLTI_MASK_SHIFT));
#if ARM7_MMU_ENABLE_HACK
if ((m_r[eR15] == (m_mmu_enable_addr + 4)) || (m_r[eR15] == (m_mmu_enable_addr + 8)))
{
- LOG( ( "ARM7: fetch flat, PC = %08x, vaddr = %08x\n", m_r[eR15], vaddr ) );
- *addr = vaddr;
+ LOG( ( "ARM7: fetch flat, PC = %08x, vaddr = %08x\n", m_r[eR15], addr ) );
return true;
}
else
@@ -325,132 +308,113 @@ bool arm7_cpu_device::arm7_tlb_translate(offs_t &addr, int flags)
}
#endif
- domain = (desc_lvl1 >> 5) & 0xF;
- permission = (m_domainAccessControl >> (domain << 1)) & 3;
-
- switch( desc_lvl1 & 3 )
+ UINT8 tlb_type = desc_lvl1 & 3;
+ if (tlb_type == COPRO_TLB_SECTION_TABLE)
{
- case COPRO_TLB_UNMAPPED:
- // Unmapped, generate a translation fault
+ // Entry is a section
+ int fault = detect_fault(desc_lvl1, (desc_lvl1 >> 10) & 3, flags);
+ if (fault == FAULT_NONE)
+ {
+ addr = ( desc_lvl1 & COPRO_TLB_SECTION_PAGE_MASK ) | ( addr & ~COPRO_TLB_SECTION_PAGE_MASK );
+ }
+ else
+ {
if (flags & ARM7_TLB_ABORT_D)
{
- LOG( ( "ARM7: Translation fault on unmapped virtual address, PC = %08x, vaddr = %08x\n", m_r[eR15], vaddr ) );
- m_faultStatus[0] = (5 << 0); // 5 = section translation fault
- m_faultAddress = vaddr;
- m_pendingAbtD = 1;
+ UINT8 domain = (desc_lvl1 >> 5) & 0xF;
+ LOG( ( "ARM7: Section Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", addr, m_r[eR15] ) );
+ m_faultStatus[0] = ((fault == FAULT_DOMAIN) ? (9 << 0) : (13 << 0)) | (domain << 4); // 9 = section domain fault, 13 = section permission fault
+ m_faultAddress = addr;
+ m_pendingAbtD = true;
+ LOG( ( "vaddr %08X desc_lvl1 %08X domain %d permission %d ap %d s %d r %d mode %d read %d write %d\n",
+ addr, desc_lvl1, domain, (m_domainAccessControl >> ((desc_lvl1 >> 4) & 0x1e)) & 3, (desc_lvl1 >> 10) & 3, (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0, (m_control & COPRO_CTRL_ROM) ? 1 : 0,
+ m_r[eCPSR] & MODE_FLAG, flags & ARM7_TLB_READ ? 1 : 0, flags & ARM7_TLB_WRITE ? 1 : 0) );
}
else if (flags & ARM7_TLB_ABORT_P)
{
- LOG( ( "ARM7: Translation fault on unmapped virtual address, PC = %08x, vaddr = %08x\n", m_r[eR15], vaddr ) );
- m_pendingAbtP = 1;
- }
- return FALSE;
- case COPRO_TLB_COARSE_TABLE:
- // Entry is the physical address of a coarse second-level table
- if ((permission == 1) || (permission == 3))
- {
- desc_lvl2 = arm7_tlb_get_second_level_descriptor( TLB_COARSE, desc_lvl1, vaddr );
+ LOG( ( "ARM7: Section Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", addr, m_r[eR15] ) );
+ m_pendingAbtP = true;
}
- else
- {
- fatalerror("ARM7: Not Yet Implemented: Coarse Table, Section Domain fault on virtual address, vaddr = %08x, domain = %08x, PC = %08x\n", vaddr, domain, m_r[eR15]);
- }
- break;
- case COPRO_TLB_SECTION_TABLE:
- {
- // Entry is a section
- UINT8 ap = (desc_lvl1 >> 10) & 3;
- int fault = detect_fault(permission, ap, flags);
- if (fault == FAULT_NONE)
- {
- paddr = ( desc_lvl1 & COPRO_TLB_SECTION_PAGE_MASK ) | ( vaddr & ~COPRO_TLB_SECTION_PAGE_MASK );
- }
- else
- {
- if (flags & ARM7_TLB_ABORT_D)
- {
- LOG( ( "ARM7: Section Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", vaddr, m_r[eR15] ) );
- m_faultStatus[0] = ((fault == FAULT_DOMAIN) ? (9 << 0) : (13 << 0)) | (domain << 4); // 9 = section domain fault, 13 = section permission fault
- m_faultAddress = vaddr;
- m_pendingAbtD = 1;
- LOG( ( "vaddr %08X desc_lvl1 %08X domain %d permission %d ap %d s %d r %d mode %d read %d write %d\n",
- vaddr, desc_lvl1, domain, permission, ap, (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0, (m_control & COPRO_CTRL_ROM) ? 1 : 0,
- m_r[eCPSR] & MODE_FLAG, flags & ARM7_TLB_READ ? 1 : 0, flags & ARM7_TLB_WRITE ? 1 : 0) );
- }
- else if (flags & ARM7_TLB_ABORT_P)
- {
- LOG( ( "ARM7: Section Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", vaddr, m_r[eR15] ) );
- m_pendingAbtP = 1;
- }
- return false;
- }
- }
- break;
- case COPRO_TLB_FINE_TABLE:
- // Entry is the physical address of a coarse second-level table
- if ((permission == 1) || (permission == 3))
- {
- desc_lvl2 = arm7_tlb_get_second_level_descriptor( TLB_FINE, desc_lvl1, vaddr );
- }
- else
- {
- fatalerror("ARM7: Not Yet Implemented: Fine Table, Section Domain fault on virtual address, vaddr = %08x, domain = %08x, PC = %08x\n", vaddr, domain, m_r[eR15]);
- }
- break;
- default:
- // Entry is the physical address of a three-legged termite-eaten table
- break;
+ return false;
+ }
}
-
- if( ( desc_lvl1 & 3 ) == COPRO_TLB_COARSE_TABLE || ( desc_lvl1 & 3 ) == COPRO_TLB_FINE_TABLE )
+ else if (tlb_type == COPRO_TLB_UNMAPPED)
{
+ // Unmapped, generate a translation fault
+ if (flags & ARM7_TLB_ABORT_D)
+ {
+ LOG( ( "ARM7: Translation fault on unmapped virtual address, PC = %08x, vaddr = %08x\n", m_r[eR15], addr ) );
+ m_faultStatus[0] = (5 << 0); // 5 = section translation fault
+ m_faultAddress = addr;
+ m_pendingAbtD = true;
+ }
+ else if (flags & ARM7_TLB_ABORT_P)
+ {
+ LOG( ( "ARM7: Translation fault on unmapped virtual address, PC = %08x, vaddr = %08x\n", m_r[eR15], addr ) );
+ m_pendingAbtP = true;
+ }
+ return FALSE;
+ }
+ else
+ {
+ // Entry is the physical address of a coarse second-level table
+ UINT8 permission = (m_domainAccessControl >> ((desc_lvl1 >> 4) & 0x1e)) & 3;
+ UINT32 desc_lvl2 = arm7_tlb_get_second_level_descriptor( (desc_lvl1 & 3) == COPRO_TLB_COARSE_TABLE ? TLB_COARSE : TLB_FINE, desc_lvl1, addr );
+ if ((permission != 1) && (permission != 3))
+ {
+ UINT8 domain = (desc_lvl1 >> 5) & 0xF;
+ fatalerror("ARM7: Not Yet Implemented: Coarse Table, Section Domain fault on virtual address, vaddr = %08x, domain = %08x, PC = %08x\n", addr, domain, m_r[eR15]);
+ }
+
switch( desc_lvl2 & 3 )
{
case COPRO_TLB_UNMAPPED:
// Unmapped, generate a translation fault
if (flags & ARM7_TLB_ABORT_D)
{
- LOG( ( "ARM7: Translation fault on unmapped virtual address, vaddr = %08x, PC %08X\n", vaddr, m_r[eR15] ) );
+ UINT8 domain = (desc_lvl1 >> 5) & 0xF;
+ LOG( ( "ARM7: Translation fault on unmapped virtual address, vaddr = %08x, PC %08X\n", addr, m_r[eR15] ) );
m_faultStatus[0] = (7 << 0) | (domain << 4); // 7 = page translation fault
- m_faultAddress = vaddr;
- m_pendingAbtD = 1;
+ m_faultAddress = addr;
+ m_pendingAbtD = true;
}
else if (flags & ARM7_TLB_ABORT_P)
{
- LOG( ( "ARM7: Translation fault on unmapped virtual address, vaddr = %08x, PC %08X\n", vaddr, m_r[eR15] ) );
- m_pendingAbtP = 1;
+ LOG( ( "ARM7: Translation fault on unmapped virtual address, vaddr = %08x, PC %08X\n", addr, m_r[eR15] ) );
+ m_pendingAbtP = true;
}
return FALSE;
case COPRO_TLB_LARGE_PAGE:
// Large page descriptor
- paddr = ( desc_lvl2 & COPRO_TLB_LARGE_PAGE_MASK ) | ( vaddr & ~COPRO_TLB_LARGE_PAGE_MASK );
+ addr = ( desc_lvl2 & COPRO_TLB_LARGE_PAGE_MASK ) | ( addr & ~COPRO_TLB_LARGE_PAGE_MASK );
break;
case COPRO_TLB_SMALL_PAGE:
// Small page descriptor
{
- UINT8 ap = ((((desc_lvl2 >> 4) & 0xFF) >> (((vaddr >> 10) & 3) << 1)) & 3);
- int fault = detect_fault(permission, ap, flags);
+ UINT8 ap = ((((desc_lvl2 >> 4) & 0xFF) >> (((addr >> 10) & 3) << 1)) & 3);
+ int fault = detect_fault(desc_lvl1, ap, flags);
if (fault == FAULT_NONE)
{
- paddr = ( desc_lvl2 & COPRO_TLB_SMALL_PAGE_MASK ) | ( vaddr & ~COPRO_TLB_SMALL_PAGE_MASK );
+ addr = ( desc_lvl2 & COPRO_TLB_SMALL_PAGE_MASK ) | ( addr & ~COPRO_TLB_SMALL_PAGE_MASK );
}
else
{
if (flags & ARM7_TLB_ABORT_D)
{
+ UINT8 domain = (desc_lvl1 >> 5) & 0xF;
// hapyfish expects a data abort when something tries to write to a read-only memory location from user mode
- LOG( ( "ARM7: Page Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", vaddr, m_r[eR15] ) );
+ LOG( ( "ARM7: Page Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", addr, m_r[eR15] ) );
m_faultStatus[0] = ((fault == FAULT_DOMAIN) ? (11 << 0) : (15 << 0)) | (domain << 4); // 11 = page domain fault, 15 = page permission fault
- m_faultAddress = vaddr;
- m_pendingAbtD = 1;
+ m_faultAddress = addr;
+ m_pendingAbtD = true;
LOG( ( "vaddr %08X desc_lvl2 %08X domain %d permission %d ap %d s %d r %d mode %d read %d write %d\n",
- vaddr, desc_lvl2, domain, permission, ap, (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0, (m_control & COPRO_CTRL_ROM) ? 1 : 0,
+ addr, desc_lvl2, domain, permission, ap, (m_control & COPRO_CTRL_SYSTEM) ? 1 : 0, (m_control & COPRO_CTRL_ROM) ? 1 : 0,
m_r[eCPSR] & MODE_FLAG, flags & ARM7_TLB_READ ? 1 : 0, flags & ARM7_TLB_WRITE ? 1 : 0) );
}
else if (flags & ARM7_TLB_ABORT_P)
{
- LOG( ( "ARM7: Page Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", vaddr, m_r[eR15] ) );
- m_pendingAbtP = 1;
+ LOG( ( "ARM7: Page Table, Section %s fault on virtual address, vaddr = %08x, PC = %08x\n", (fault == FAULT_DOMAIN) ? "domain" : "permission", addr, m_r[eR15] ) );
+ m_pendingAbtP = true;
}
return false;
}
@@ -460,13 +424,13 @@ bool arm7_cpu_device::arm7_tlb_translate(offs_t &addr, int flags)
// Tiny page descriptor
if( ( desc_lvl1 & 3 ) == 1 )
{
- LOG( ( "ARM7: It would appear that we're looking up a tiny page from a coarse TLB lookup. This is bad. vaddr = %08x\n", vaddr ) );
+ LOG( ( "ARM7: It would appear that we're looking up a tiny page from a coarse TLB lookup. This is bad. vaddr = %08x\n", addr ) );
}
- paddr = ( desc_lvl2 & COPRO_TLB_TINY_PAGE_MASK ) | ( vaddr & ~COPRO_TLB_TINY_PAGE_MASK );
+ addr = ( desc_lvl2 & COPRO_TLB_TINY_PAGE_MASK ) | ( addr & ~COPRO_TLB_TINY_PAGE_MASK );
break;
}
}
- addr = paddr;
+
return true;
}
@@ -501,6 +465,9 @@ void arm7_cpu_device::device_start()
save_item(NAME(m_pendingAbtP));
save_item(NAME(m_pendingUnd));
save_item(NAME(m_pendingSwi));
+ save_item(NAME(m_pending_interrupt));
+ save_item(NAME(m_fcsePID));
+ save_item(NAME(m_pid_offset));
m_icountptr = &m_icount;
@@ -588,19 +555,23 @@ void arm7_cpu_device::state_string_export(const device_state_entry &entry, std::
void arm7_cpu_device::device_reset()
{
memset(m_r, 0, sizeof(m_r));
- m_pendingIrq = 0;
- m_pendingFiq = 0;
- m_pendingAbtD = 0;
- m_pendingAbtP = 0;
- m_pendingUnd = 0;
- m_pendingSwi = 0;
+ m_pendingIrq = false;
+ m_pendingFiq = false;
+ m_pendingAbtD = false;
+ m_pendingAbtP = false;
+ m_pendingUnd = false;
+ m_pendingSwi = false;
+ m_pending_interrupt = false;
m_control = 0;
m_tlbBase = 0;
+ m_tlb_base_mask = 0;
m_faultStatus[0] = 0;
m_faultStatus[1] = 0;
m_faultAddress = 0;
m_fcsePID = 0;
+ m_pid_offset = 0;
m_domainAccessControl = 0;
+ memset(m_decoded_access_control, 0, sizeof(UINT8) * 16);
/* start up in SVC mode with interrupts disabled. */
m_r[eCPSR] = I_MASK | F_MASK | 0x10;
@@ -677,66 +648,69 @@ void arm7_cpu_device::execute_run()
insn = m_direct->read_dword(raddr);
/* process condition codes for this instruction */
- switch (insn >> INSN_COND_SHIFT)
+ if ((insn >> INSN_COND_SHIFT) != COND_AL)
{
- case COND_EQ:
- if (Z_IS_CLEAR(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_NE:
- if (Z_IS_SET(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_CS:
- if (C_IS_CLEAR(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_CC:
- if (C_IS_SET(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_MI:
- if (N_IS_CLEAR(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_PL:
- if (N_IS_SET(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_VS:
- if (V_IS_CLEAR(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_VC:
- if (V_IS_SET(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_HI:
- if (C_IS_CLEAR(m_r[eCPSR]) || Z_IS_SET(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_LS:
- if (C_IS_SET(m_r[eCPSR]) && Z_IS_CLEAR(m_r[eCPSR]))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_GE:
- if (!(m_r[eCPSR] & N_MASK) != !(m_r[eCPSR] & V_MASK)) /* Use x ^ (x >> ...) method */
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_LT:
- if (!(m_r[eCPSR] & N_MASK) == !(m_r[eCPSR] & V_MASK))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_GT:
- if (Z_IS_SET(m_r[eCPSR]) || (!(m_r[eCPSR] & N_MASK) != !(m_r[eCPSR] & V_MASK)))
- { UNEXECUTED(); goto skip_exec; }
- break;
- case COND_LE:
- if (Z_IS_CLEAR(m_r[eCPSR]) && (!(m_r[eCPSR] & N_MASK) == !(m_r[eCPSR] & V_MASK)))
+ switch (insn >> INSN_COND_SHIFT)
+ {
+ case COND_EQ:
+ if (Z_IS_CLEAR(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_NE:
+ if (Z_IS_SET(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_CS:
+ if (C_IS_CLEAR(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_CC:
+ if (C_IS_SET(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_MI:
+ if (N_IS_CLEAR(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_PL:
+ if (N_IS_SET(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_VS:
+ if (V_IS_CLEAR(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_VC:
+ if (V_IS_SET(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_HI:
+ if (C_IS_CLEAR(m_r[eCPSR]) || Z_IS_SET(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_LS:
+ if (C_IS_SET(m_r[eCPSR]) && Z_IS_CLEAR(m_r[eCPSR]))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_GE:
+ if (!(m_r[eCPSR] & N_MASK) != !(m_r[eCPSR] & V_MASK)) /* Use x ^ (x >> ...) method */
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_LT:
+ if (!(m_r[eCPSR] & N_MASK) == !(m_r[eCPSR] & V_MASK))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_GT:
+ if (Z_IS_SET(m_r[eCPSR]) || (!(m_r[eCPSR] & N_MASK) != !(m_r[eCPSR] & V_MASK)))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_LE:
+ if (Z_IS_CLEAR(m_r[eCPSR]) && (!(m_r[eCPSR] & N_MASK) == !(m_r[eCPSR] & V_MASK)))
+ { UNEXECUTED(); goto skip_exec; }
+ break;
+ case COND_NV:
{ UNEXECUTED(); goto skip_exec; }
- break;
- case COND_NV:
- { UNEXECUTED(); goto skip_exec; }
+ }
}
/*******************************************************************/
/* If we got here - condition satisfied, so decode the instruction */
@@ -758,25 +732,26 @@ void arm7_cpu_device::execute_set_input(int irqline, int state)
{
switch (irqline) {
case ARM7_IRQ_LINE: /* IRQ */
- m_pendingIrq = state & 1;
+ m_pendingIrq = state ? true : false;
break;
case ARM7_FIRQ_LINE: /* FIRQ */
- m_pendingFiq = state & 1;
+ m_pendingFiq = state ? true : false;
break;
case ARM7_ABORT_EXCEPTION:
- m_pendingAbtD = state & 1;
+ m_pendingAbtD = state ? true : false;
break;
case ARM7_ABORT_PREFETCH_EXCEPTION:
- m_pendingAbtP = state & 1;
+ m_pendingAbtP = state ? true : false;
break;
case ARM7_UNDEFINE_EXCEPTION:
- m_pendingUnd = state & 1;
+ m_pendingUnd = state ? true : false;
break;
}
+ update_irq_state();
arm7_check_irq_state();
}
@@ -809,7 +784,7 @@ offs_t arm7_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8
WRITE32_MEMBER( arm7_cpu_device::arm7_do_callback )
{
- m_pendingUnd = 1;
+ m_pendingUnd = true;
}
READ32_MEMBER( arm7_cpu_device::arm7_rt_r_callback )
@@ -851,7 +826,7 @@ READ32_MEMBER( arm7_cpu_device::arm7_rt_r_callback )
else
{
LOG( ("ARM7: Unhandled coprocessor %d (archFlags %x)\n", cpnum, m_archFlags) );
- m_pendingUnd = 1;
+ m_pendingUnd = true;
return 0;
}
}
@@ -994,7 +969,7 @@ WRITE32_MEMBER( arm7_cpu_device::arm7_rt_w_callback )
else
{
LOG( ("ARM7: Unhandled coprocessor %d\n", cpnum) );
- m_pendingUnd = 1;
+ m_pendingUnd = true;
return;
}
}
@@ -1039,10 +1014,15 @@ WRITE32_MEMBER( arm7_cpu_device::arm7_rt_w_callback )
case 2: // Translation Table Base
LOG( ( "arm7_rt_w_callback TLB Base = %08x (%d) (%d)\n", data, op2, op3 ) );
COPRO_TLB_BASE = data;
+ m_tlb_base_mask = data & COPRO_TLB_BASE_MASK;
break;
case 3: // Domain Access Control
LOG( ( "arm7_rt_w_callback Domain Access Control = %08x (%d) (%d)\n", data, op2, op3 ) );
COPRO_DOMAIN_ACCESS_CONTROL = data;
+ for (int i = 0; i < 32; i += 2)
+ {
+ m_decoded_access_control[i >> 1] = (COPRO_DOMAIN_ACCESS_CONTROL >> i) & 3;
+ }
break;
case 5: // Fault Status
LOG( ( "arm7_rt_w_callback Fault Status = %08x (%d) (%d)\n", data, op2, op3 ) );
@@ -1068,6 +1048,7 @@ WRITE32_MEMBER( arm7_cpu_device::arm7_rt_w_callback )
case 13: // Write Process ID (PID)
LOG( ( "arm7_rt_w_callback Write PID = %08x (%d) (%d)\n", data, op2, op3 ) );
COPRO_FCSE_PID = data;
+ m_pid_offset = (((COPRO_FCSE_PID >> 25) & 0x7F)) * 0x2000000;
break;
case 14: // Write Breakpoint
LOG( ( "arm7_rt_w_callback Write Breakpoint = %08x (%d) (%d)\n", data, op2, op3 ) );
@@ -1088,7 +1069,7 @@ void arm7_cpu_device::arm7_dt_r_callback(UINT32 insn, UINT32 *prn)
}
else
{
- m_pendingUnd = 1;
+ m_pendingUnd = true;
}
}
@@ -1102,7 +1083,7 @@ void arm7_cpu_device::arm7_dt_w_callback(UINT32 insn, UINT32 *prn)
}
else
{
- m_pendingUnd = 1;
+ m_pendingUnd = true;
}
}
diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h
index 24ab02f2b86..27615a7dbb1 100644
--- a/src/devices/cpu/arm7/arm7.h
+++ b/src/devices/cpu/arm7/arm7.h
@@ -81,12 +81,13 @@ protected:
address_space_config m_program_config;
UINT32 m_r[/*NUM_REGS*/37];
- UINT32 m_pendingIrq;
- UINT32 m_pendingFiq;
- UINT32 m_pendingAbtD;
- UINT32 m_pendingAbtP;
- UINT32 m_pendingUnd;
- UINT32 m_pendingSwi;
+ bool m_pendingIrq;
+ bool m_pendingFiq;
+ bool m_pendingAbtD;
+ bool m_pendingAbtP;
+ bool m_pendingUnd;
+ bool m_pendingSwi;
+ bool m_pending_interrupt;
int m_icount;
endianness_t m_endian;
address_space *m_program;
@@ -95,10 +96,13 @@ protected:
/* Coprocessor Registers */
UINT32 m_control;
UINT32 m_tlbBase;
+ UINT32 m_tlb_base_mask;
UINT32 m_faultStatus[2];
UINT32 m_faultAddress;
UINT32 m_fcsePID;
+ UINT32 m_pid_offset;
UINT32 m_domainAccessControl;
+ UINT8 m_decoded_access_control[16];
UINT8 m_archRev; // ARM architecture revision (3, 4, and 5 are valid)
UINT8 m_archFlags; // architecture flags
@@ -141,10 +145,10 @@ protected:
void arm7ops_f(UINT32 insn);
void set_cpsr(UINT32 val);
bool arm7_tlb_translate(offs_t &addr, int flags);
- UINT32 arm7_tlb_get_first_level_descriptor( UINT32 vaddr );
UINT32 arm7_tlb_get_second_level_descriptor( UINT32 granularity, UINT32 first_desc, UINT32 vaddr );
- int detect_fault(int permission, int ap, int flags);
+ int detect_fault(int desc_lvl1, int ap, int flags);
void arm7_check_irq_state();
+ void update_irq_state();
void arm7_cpu_write32(UINT32 addr, UINT32 data);
void arm7_cpu_write16(UINT32 addr, UINT16 data);
void arm7_cpu_write8(UINT32 addr, UINT8 data);
@@ -445,6 +449,8 @@ protected:
void drctg0f_0(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc);
void drctg0f_1(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc); /* BL */
+ void update_reg_ptr();
+ const int* m_reg_group;
void load_fast_iregs(drcuml_block *block);
void save_fast_iregs(drcuml_block *block);
void arm7_drc_init();
diff --git a/src/devices/cpu/arm7/arm7core.h b/src/devices/cpu/arm7/arm7core.h
index 2bdd15d7ba3..2d4179eda7a 100644
--- a/src/devices/cpu/arm7/arm7core.h
+++ b/src/devices/cpu/arm7/arm7core.h
@@ -165,12 +165,13 @@ struct arm7imp_state;
struct arm_state
{
UINT32 m_r[NUM_REGS];
- UINT32 m_pendingIrq;
- UINT32 m_pendingFiq;
- UINT32 m_pendingAbtD;
- UINT32 m_pendingAbtP;
- UINT32 m_pendingUnd;
- UINT32 m_pendingSwi;
+ bool m_pendingIrq;
+ bool m_pendingFiq;
+ bool m_pendingAbtD;
+ bool m_pendingAbtP;
+ bool m_pendingUnd;
+ bool m_pendingSwi;
+ bool m_pending_interrupt;
int m_icount;
endianness_t m_endian;
address_space *m_program;
@@ -179,10 +180,12 @@ struct arm_state
/* Coprocessor Registers */
UINT32 m_control;
UINT32 m_tlbBase;
+ UINT32 m_tlb_base_mask;
UINT32 m_faultStatus[2];
UINT32 m_faultAddress;
UINT32 m_fcsePID;
UINT32 m_domainAccessControl;
+ UINT32 m_decoded_access_control[16];
UINT8 m_archRev; // ARM architecture revision (3, 4, and 5 are valid)
UINT8 m_archFlags; // architecture flags
@@ -488,7 +491,6 @@ enum
#define R15 m_r[eR15]
#define SPSR 17 // SPSR is always the 18th register in our 0 based array sRegisterTable[][18]
#define GET_CPSR m_r[eCPSR]
-#define SET_CPSR(v) set_cpsr(v)
#define MODE_FLAG 0xF // Mode bits are 4:0 of CPSR, but we ignore bit 4.
#define GET_MODE (GET_CPSR & MODE_FLAG)
#define SIGN_BIT ((UINT32)(1 << 31))
@@ -508,14 +510,6 @@ enum
#define ARM7_TLB_READ (1 << 2)
#define ARM7_TLB_WRITE (1 << 3)
-/* At one point I thought these needed to be cpu implementation specific, but they don't.. */
-#define GET_REGISTER(reg) GetRegister(reg)
-#define SET_REGISTER(reg, val) SetRegister(reg, val)
-#define GET_MODE_REGISTER(mode, reg) GetModeRegister(mode, reg)
-#define SET_MODE_REGISTER(mode, reg, val) SetModeRegister(mode, reg, val)
-#define ARM7_CHECKIRQ arm7_check_irq_state()
-
-
/* ARM flavors */
enum arm_flavor
{
diff --git a/src/devices/cpu/arm7/arm7core.hxx b/src/devices/cpu/arm7/arm7core.hxx
index 736d42b0262..12a6884033c 100644
--- a/src/devices/cpu/arm7/arm7core.hxx
+++ b/src/devices/cpu/arm7/arm7core.hxx
@@ -84,10 +84,18 @@ static const char *GetModeText(int cpsr)
* Main CPU Funcs
***************************************************************************/
+void arm7_cpu_device::update_irq_state()
+{
+ m_pending_interrupt = m_pendingAbtD || m_pendingAbtP || m_pendingUnd || m_pendingSwi || m_pendingFiq || m_pendingIrq;
+}
+
// CPU CHECK IRQ STATE
// Note: couldn't find any exact cycle counts for most of these exceptions
void arm7_cpu_device::arm7_check_irq_state()
{
+ if (!m_pending_interrupt)
+ return;
+
UINT32 cpsr = m_r[eCPSR]; /* save current CPSR */
UINT32 pc = m_r[eR15] + 4; /* save old pc (already incremented in pipeline) */;
@@ -103,41 +111,45 @@ void arm7_cpu_device::arm7_check_irq_state()
*/
// Data Abort
- if (m_pendingAbtD) {
+ if (m_pendingAbtD)
+ {
if (MODE26) fatalerror( "pendingAbtD (todo)\n");
SwitchMode(eARM7_MODE_ABT); /* Set ABT mode so PC is saved to correct R14 bank */
- SET_REGISTER(14, pc - 8 + 8); /* save PC to R14 */
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */
- SET_CPSR(GET_CPSR & ~T_MASK);
+ SetRegister(14, pc - 8 + 8); /* save PC to R14 */
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK); /* Mask IRQ */
+ set_cpsr(GET_CPSR & ~T_MASK);
R15 = 0x10; /* IRQ Vector address */
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
- m_pendingAbtD = 0;
+ m_pendingAbtD = false;
+ update_irq_state();
return;
}
// FIQ
- if (m_pendingFiq && (cpsr & F_MASK) == 0) {
+ if (m_pendingFiq && (cpsr & F_MASK) == 0)
+ {
if (MODE26) fatalerror( "pendingFiq (todo)\n");
SwitchMode(eARM7_MODE_FIQ); /* Set FIQ mode so PC is saved to correct R14 bank */
- SET_REGISTER(14, pc - 4 + 4); /* save PC to R14 */
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK | F_MASK); /* Mask both IRQ & FIQ */
- SET_CPSR(GET_CPSR & ~T_MASK);
+ SetRegister(14, pc - 4 + 4); /* save PC to R14 */
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK | F_MASK); /* Mask both IRQ & FIQ */
+ set_cpsr(GET_CPSR & ~T_MASK);
R15 = 0x1c; /* IRQ Vector address */
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
return;
}
// IRQ
- if (m_pendingIrq && (cpsr & I_MASK) == 0) {
+ if (m_pendingIrq && (cpsr & I_MASK) == 0)
+ {
SwitchMode(eARM7_MODE_IRQ); /* Set IRQ mode so PC is saved to correct R14 bank */
- SET_REGISTER(14, pc - 4 + 4); /* save PC to R14 */
+ SetRegister(14, pc - 4 + 4); /* save PC to R14 */
if (MODE32)
{
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */
- SET_CPSR(GET_CPSR & ~T_MASK);
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK); /* Mask IRQ */
+ set_cpsr(GET_CPSR & ~T_MASK);
R15 = 0x18; /* IRQ Vector address */
}
else
@@ -145,65 +157,70 @@ void arm7_cpu_device::arm7_check_irq_state()
UINT32 temp;
R15 = (pc & 0xF4000000) /* N Z C V F */ | 0x18 | 0x00000002 /* IRQ */ | 0x08000000 /* I */;
temp = (GET_CPSR & 0x0FFFFF3F) /* N Z C V I F */ | (R15 & 0xF0000000) /* N Z C V */ | ((R15 & 0x0C000000) >> (26 - 6)) /* I F */;
- SET_CPSR(temp); /* Mask IRQ */
+ set_cpsr(temp); /* Mask IRQ */
}
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
return;
}
// Prefetch Abort
- if (m_pendingAbtP) {
+ if (m_pendingAbtP)
+ {
if (MODE26) fatalerror( "pendingAbtP (todo)\n");
SwitchMode(eARM7_MODE_ABT); /* Set ABT mode so PC is saved to correct R14 bank */
- SET_REGISTER(14, pc - 4 + 4); /* save PC to R14 */
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */
- SET_CPSR(GET_CPSR & ~T_MASK);
+ SetRegister(14, pc - 4 + 4); /* save PC to R14 */
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK); /* Mask IRQ */
+ set_cpsr(GET_CPSR & ~T_MASK);
R15 = 0x0c; /* IRQ Vector address */
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
- m_pendingAbtP = 0;
+ m_pendingAbtP = false;
+ update_irq_state();
return;
}
// Undefined instruction
- if (m_pendingUnd) {
+ if (m_pendingUnd)
+ {
if (MODE26) fatalerror( "pendingUnd (todo)\n");
SwitchMode(eARM7_MODE_UND); /* Set UND mode so PC is saved to correct R14 bank */
// compensate for prefetch (should this also be done for normal IRQ?)
if (T_IS_SET(GET_CPSR))
{
- SET_REGISTER(14, pc - 4 + 2); /* save PC to R14 */
+ SetRegister(14, pc - 4 + 2); /* save PC to R14 */
}
else
{
- SET_REGISTER(14, pc - 4 + 4 - 4); /* save PC to R14 */
+ SetRegister(14, pc - 4 + 4 - 4); /* save PC to R14 */
}
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */
- SET_CPSR(GET_CPSR & ~T_MASK);
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK); /* Mask IRQ */
+ set_cpsr(GET_CPSR & ~T_MASK);
R15 = 0x04; /* IRQ Vector address */
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
- m_pendingUnd = 0;
+ m_pendingUnd = false;
+ update_irq_state();
return;
}
// Software Interrupt
- if (m_pendingSwi) {
+ if (m_pendingSwi)
+ {
SwitchMode(eARM7_MODE_SVC); /* Set SVC mode so PC is saved to correct R14 bank */
// compensate for prefetch (should this also be done for normal IRQ?)
if (T_IS_SET(GET_CPSR))
{
- SET_REGISTER(14, pc - 4 + 2); /* save PC to R14 */
+ SetRegister(14, pc - 4 + 2); /* save PC to R14 */
}
else
{
- SET_REGISTER(14, pc - 4 + 4); /* save PC to R14 */
+ SetRegister(14, pc - 4 + 4); /* save PC to R14 */
}
if (MODE32)
{
- SET_REGISTER(SPSR, cpsr); /* Save current CPSR */
- SET_CPSR(GET_CPSR | I_MASK); /* Mask IRQ */
- SET_CPSR(GET_CPSR & ~T_MASK); /* Go to ARM mode */
+ SetRegister(SPSR, cpsr); /* Save current CPSR */
+ set_cpsr(GET_CPSR | I_MASK); /* Mask IRQ */
+ set_cpsr(GET_CPSR & ~T_MASK); /* Go to ARM mode */
R15 = 0x08; /* Jump to the SWI vector */
}
else
@@ -211,10 +228,11 @@ void arm7_cpu_device::arm7_check_irq_state()
UINT32 temp;
R15 = (pc & 0xF4000000) /* N Z C V F */ | 0x08 | 0x00000003 /* SVC */ | 0x08000000 /* I */;
temp = (GET_CPSR & 0x0FFFFF3F) /* N Z C V I F */ | (R15 & 0xF0000000) /* N Z C V */ | ((R15 & 0x0C000000) >> (26 - 6)) /* I F */;
- SET_CPSR(temp); /* Mask IRQ */
+ set_cpsr(temp); /* Mask IRQ */
}
if ((COPRO_CTRL & COPRO_CTRL_MMU_EN) && (COPRO_CTRL & COPRO_CTRL_INTVEC_ADJUST)) R15 |= 0xFFFF0000;
- m_pendingSwi = 0;
+ m_pendingSwi = false;
+ update_irq_state();
return;
}
}
diff --git a/src/devices/cpu/arm7/arm7drc.hxx b/src/devices/cpu/arm7/arm7drc.hxx
index c588234eb5b..bff2b776969 100644
--- a/src/devices/cpu/arm7/arm7drc.hxx
+++ b/src/devices/cpu/arm7/arm7drc.hxx
@@ -547,8 +547,8 @@ void arm7_cpu_device::static_generate_check_irq()
UML_JMPc(block, uml::COND_Z, nodabt = label++); // jmpz nodabt
UML_ROLINS(block, uml::mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG); // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG
- UML_MOV(block, uml::mem(&GET_REGISTER(14)), uml::I0); // mov LR, i0
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_MOV(block, uml::mem(&GetRegister(14)), uml::I0); // mov LR, i0
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x00000010); // mov PC, 0x10 (Data Abort vector address)
@@ -563,8 +563,8 @@ void arm7_cpu_device::static_generate_check_irq()
UML_TEST(block, uml::mem(&GET_CPSR), F_MASK); // test CPSR, F_MASK
UML_JMPc(block, uml::COND_Z, nofiq); // jmpz nofiq
- UML_MOV(block, uml::mem(&GET_REGISTER(14)), uml::I0); // mov LR, i0
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_MOV(block, uml::mem(&GetRegister(14)), uml::I0); // mov LR, i0
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK | F_MASK); // or CPSR, CPSR, I_MASK | F_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x0000001c); // mov PC, 0x1c (FIQ vector address)
@@ -579,7 +579,7 @@ void arm7_cpu_device::static_generate_check_irq()
UML_TEST(block, uml::mem(&GET_CPSR), I_MASK); // test CPSR, I_MASK
UML_JMPc(block, uml::COND_Z, noirq); // jmpz noirq
- UML_MOV(block, uml::mem(&GET_REGISTER(14)), uml::I0); // mov LR, i0
+ UML_MOV(block, uml::mem(&GetRegister(14)), uml::I0); // mov LR, i0
UML_TEST(block, uml::mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32
UML_JMPc(block, uml::COND_NZ, irq32 = label++); // jmpnz irq32
UML_AND(block, uml::I1, uml::I0, 0xf4000000); // and i1, i0, 0xf4000000
@@ -591,7 +591,7 @@ void arm7_cpu_device::static_generate_check_irq()
UML_JMP(block, irqadjust); // jmp irqadjust
UML_LABEL(block, irq32); // irq32:
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x00000018); // mov PC, 0x18 (IRQ vector address)
@@ -605,8 +605,8 @@ void arm7_cpu_device::static_generate_check_irq()
UML_JMPc(block, uml::COND_Z, nopabt = label++); // jmpz nopabt
UML_ROLINS(block, uml::mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG); // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG
- UML_MOV(block, uml::mem(&GET_REGISTER(14)), uml::I0); // mov LR, i0
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_MOV(block, uml::mem(&GetRegister(14)), uml::I0); // mov LR, i0
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x0000000c); // mov PC, 0x0c (Prefetch Abort vector address)
@@ -623,8 +623,8 @@ void arm7_cpu_device::static_generate_check_irq()
UML_MOV(block, uml::I1, (UINT64)-4); // mov i1, -4
UML_TEST(block, uml::mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK
UML_MOVc(block, uml::COND_NZ, uml::I1, (UINT64)-2); // movnz i1, -2
- UML_ADD(block, uml::mem(&GET_REGISTER(14)), uml::I0, uml::I1); // add LR, i0, i1
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_ADD(block, uml::mem(&GetRegister(14)), uml::I0, uml::I1); // add LR, i0, i1
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x00000004); // mov PC, 0x0c (Undefined Insn vector address)
@@ -641,7 +641,7 @@ void arm7_cpu_device::static_generate_check_irq()
UML_MOV(block, uml::I1, (UINT64)-4); // mov i1, -4
UML_TEST(block, uml::mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK
UML_MOVc(block, uml::COND_NZ, uml::I1, (UINT64)-2); // movnz i1, -2
- UML_ADD(block, uml::mem(&GET_REGISTER(14)), uml::I0, uml::I1); // add LR, i0, i1
+ UML_ADD(block, uml::mem(&GetRegister(14)), uml::I0, uml::I1); // add LR, i0, i1
UML_TEST(block, uml::mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32
UML_JMPc(block, uml::COND_NZ, swi32 = label++); // jmpnz swi32
@@ -655,7 +655,7 @@ void arm7_cpu_device::static_generate_check_irq()
UML_JMP(block, irqadjust); // jmp irqadjust
UML_LABEL(block, swi32); // irq32:
- UML_MOV(block, uml::mem(&GET_REGISTER(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
+ UML_MOV(block, uml::mem(&GetRegister(SPSR)), uml::mem(&GET_CPSR)); // mov SPSR, CPSR
UML_OR(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK
UML_ROLAND(block, uml::mem(&GET_CPSR), uml::mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK
UML_MOV(block, uml::mem(&R15), 0x00000008); // mov PC, 0x08 (SWI vector address)
@@ -1508,8 +1508,8 @@ bool arm7_cpu_device::drcarm7ops_0123(drcuml_block *block, compiler_state *compi
}
else if ((insn & 0x0ff00090) == 0x01600080) // SMULxy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT32 res;
// select top and bottom halves of src1/src2 and sign extend if necessary
@@ -1536,13 +1536,13 @@ bool arm7_cpu_device::drcarm7ops_0123(drcuml_block *block, compiler_state *compi
}
res = src1 * src2;
- SET_REGISTER((insn>>16)&0xf, res);
+ SetRegister((insn>>16)&0xf, res);
R15 += 4;
}
else if ((insn & 0x0ff000b0) == 0x012000a0) // SMULWy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT64 res;
if (insn & 0x40)
@@ -1560,13 +1560,13 @@ bool arm7_cpu_device::drcarm7ops_0123(drcuml_block *block, compiler_state *compi
res = (INT64)src1 * (INT64)src2;
res >>= 16;
- SET_REGISTER((insn>>16)&0xf, (UINT32)res);
+ SetRegister((insn>>16)&0xf, (UINT32)res);
}
else if ((insn & 0x0ff000b0) == 0x01200080) // SMLAWy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
- INT32 src3 = GET_REGISTER((insn>>12)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
+ INT32 src3 = GetRegister((insn>>12)&0xf);
INT64 res;
if (insn & 0x40)
@@ -1592,7 +1592,7 @@ bool arm7_cpu_device::drcarm7ops_0123(drcuml_block *block, compiler_state *compi
src3 += (INT32)res;
// write the result back
- SET_REGISTER((insn>>16)&0xf, (UINT32)res);
+ SetRegister((insn>>16)&0xf, (UINT32)res);
}
else
/* Multiply OR Swap OR Half Word Data Transfer */
diff --git a/src/devices/cpu/arm7/arm7help.h b/src/devices/cpu/arm7/arm7help.h
index 5625318b942..41d9e8ad63b 100644
--- a/src/devices/cpu/arm7/arm7help.h
+++ b/src/devices/cpu/arm7/arm7help.h
@@ -29,14 +29,14 @@
/* Set NZCV flags for ADDS / SUBS */
#define HandleALUAddFlags(rd, rn, op2) \
if (insn & INSN_S) \
- SET_CPSR(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
+ set_cpsr(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
| (((!SIGN_BITS_DIFFER(rn, op2)) && SIGN_BITS_DIFFER(rn, rd)) << V_BIT) \
| (((IsNeg(rn) & IsNeg(op2)) | (IsNeg(rn) & IsPos(rd)) | (IsNeg(op2) & IsPos(rd))) ? C_MASK : 0) \
| HandleALUNZFlags(rd))); \
R15 += 4;
#define HandleThumbALUAddFlags(rd, rn, op2) \
- SET_CPSR(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
+ set_cpsr(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
| (((!THUMB_SIGN_BITS_DIFFER(rn, op2)) && THUMB_SIGN_BITS_DIFFER(rn, rd)) << V_BIT) \
| (((~(rn)) < (op2)) << C_BIT) \
| HandleALUNZFlags(rd))); \
@@ -62,14 +62,14 @@
#define HandleALUSubFlags(rd, rn, op2) \
if (insn & INSN_S) \
- SET_CPSR(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
+ set_cpsr(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
| ((SIGN_BITS_DIFFER(rn, op2) && SIGN_BITS_DIFFER(rn, rd)) << V_BIT) \
| (((IsNeg(rn) & IsPos(op2)) | (IsNeg(rn) & IsPos(rd)) | (IsPos(op2) & IsPos(rd))) ? C_MASK : 0) \
| HandleALUNZFlags(rd))); \
R15 += 4;
#define HandleThumbALUSubFlags(rd, rn, op2) \
- SET_CPSR(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
+ set_cpsr(((GET_CPSR & ~(N_MASK | Z_MASK | V_MASK | C_MASK)) \
| ((THUMB_SIGN_BITS_DIFFER(rn, op2) && THUMB_SIGN_BITS_DIFFER(rn, rd)) << V_BIT) \
| (((IsNeg(rn) & IsPos(op2)) | (IsNeg(rn) & IsPos(rd)) | (IsPos(op2) & IsPos(rd))) ? C_MASK : 0) \
| HandleALUNZFlags(rd))); \
@@ -122,13 +122,13 @@
#define HandleALULogicalFlags(rd, sc) \
if (insn & INSN_S) \
- SET_CPSR(((GET_CPSR & ~(N_MASK | Z_MASK | C_MASK)) \
+ set_cpsr(((GET_CPSR & ~(N_MASK | Z_MASK | C_MASK)) \
| HandleALUNZFlags(rd) \
| (((sc) != 0) << C_BIT))); \
R15 += 4;
-#define DRC_RD uml::mem(&GET_REGISTER(rd))
-#define DRC_RS uml::mem(&GET_REGISTER(rs))
+#define DRC_RD uml::mem(&GetRegister(rd))
+#define DRC_RS uml::mem(&GetRegister(rs))
#define DRC_CPSR uml::mem(&GET_CPSR)
#define DRC_PC uml::mem(&R15)
#define DRC_REG(i) uml::mem(&m_r[(i)])
@@ -148,8 +148,8 @@
// used to be functions, but no longer a need, so we'll use define for better speed.
-#define GetRegister(rIndex) m_r[sRegisterTable[GET_MODE][rIndex]]
-#define SetRegister(rIndex, value) m_r[sRegisterTable[GET_MODE][rIndex]] = value
+#define GetRegister(rIndex) m_r[m_reg_group[rIndex]]
+#define SetRegister(rIndex, value) m_r[m_reg_group[rIndex]] = value
#define GetModeRegister(mode, rIndex) m_r[sRegisterTable[mode][rIndex]]
#define SetModeRegister(mode, rIndex, value) m_r[sRegisterTable[mode][rIndex]] = value
diff --git a/src/devices/cpu/arm7/arm7ops.cpp b/src/devices/cpu/arm7/arm7ops.cpp
index 9c1f0197764..b41008bc4b1 100644
--- a/src/devices/cpu/arm7/arm7ops.cpp
+++ b/src/devices/cpu/arm7/arm7ops.cpp
@@ -10,12 +10,12 @@ INT64 arm7_cpu_device::saturate_qbit_overflow(INT64 res)
if (res > 2147483647) // INT32_MAX
{ // overflow high? saturate and set Q
res = 2147483647;
- SET_CPSR(GET_CPSR | Q_MASK);
+ set_cpsr(GET_CPSR | Q_MASK);
}
else if (res < (-2147483647-1)) // INT32_MIN
{ // overflow low? saturate and set Q
res = (-2147483647-1);
- SET_CPSR(GET_CPSR | Q_MASK);
+ set_cpsr(GET_CPSR | Q_MASK);
}
return res;
@@ -50,7 +50,7 @@ void arm7_cpu_device::SwitchMode(UINT32 cpsr_mode_val)
UINT32 arm7_cpu_device::decodeShift(UINT32 insn, UINT32 *pCarry)
{
UINT32 k = (insn & INSN_OP2_SHIFT) >> INSN_OP2_SHIFT_SHIFT; // Bits 11-7
- UINT32 rm = GET_REGISTER(insn & INSN_OP2_RM);
+ UINT32 rm = GetRegister(insn & INSN_OP2_RM);
UINT32 t = (insn & INSN_OP2_SHIFT_TYPE) >> INSN_OP2_SHIFT_TYPE_SHIFT;
if ((insn & INSN_OP2_RM) == 0xf) {
@@ -61,17 +61,17 @@ UINT32 arm7_cpu_device::decodeShift(UINT32 insn, UINT32 *pCarry)
/* All shift types ending in 1 are Rk, not #k */
if (t & 1)
{
-// LOG(("%08x: RegShift %02x %02x\n", R15, k >> 1, GET_REGISTER(k >> 1)));
+// LOG(("%08x: RegShift %02x %02x\n", R15, k >> 1, GetRegister(k >> 1)));
#if ARM7_DEBUG_CORE
if ((insn & 0x80) == 0x80)
LOG(("%08x: RegShift ERROR (p36)\n", R15));
#endif
// see p35 for check on this
- //k = GET_REGISTER(k >> 1) & 0x1f;
+ //k = GetRegister(k >> 1) & 0x1f;
// Keep only the bottom 8 bits for a Register Shift
- k = GET_REGISTER(k >> 1) & 0xff;
+ k = GetRegister(k >> 1) & 0xff;
if (k == 0) /* Register shift by 0 is a no-op */
{
@@ -176,21 +176,24 @@ int arm7_cpu_device::loadInc(UINT32 pat, UINT32 rbv, UINT32 s, int mode)
{
if ((pat >> i) & 1)
{
- if (m_pendingAbtD == 0) // "Overwriting of registers stops when the abort happens."
+ if (!m_pendingAbtD) // "Overwriting of registers stops when the abort happens."
{
- data = READ32(rbv += 4);
- if (i == 15) {
- if (s) /* Pull full contents from stack */
- SET_MODE_REGISTER(mode, 15, data);
- else /* Pull only address, preserve mode & status flags */
- if (MODE32)
- SET_MODE_REGISTER(mode, 15, data);
+ data = READ32(rbv += 4);
+ if (i == 15)
+ {
+ if (s) /* Pull full contents from stack */
+ SetModeRegister(mode, 15, data);
+ else if (MODE32) /* Pull only address, preserve mode & status flags */
+ SetModeRegister(mode, 15, data);
else
{
- SET_MODE_REGISTER(mode, 15, (GET_MODE_REGISTER(mode, 15) & ~0x03FFFFFC) | (data & 0x03FFFFFC));
+ SetModeRegister(mode, 15, (GetModeRegister(mode, 15) & ~0x03FFFFFC) | (data & 0x03FFFFFC));
}
- } else
- SET_MODE_REGISTER(mode, i, data);
+ }
+ else
+ {
+ SetModeRegister(mode, i, data);
+ }
}
result++;
}
@@ -210,22 +213,24 @@ int arm7_cpu_device::loadDec(UINT32 pat, UINT32 rbv, UINT32 s, int mode)
{
if ((pat >> i) & 1)
{
- if (m_pendingAbtD == 0) // "Overwriting of registers stops when the abort happens."
+ if (!m_pendingAbtD) // "Overwriting of registers stops when the abort happens."
{
- data = READ32(rbv -= 4);
- if (i == 15) {
- if (s) /* Pull full contents from stack */
- SET_MODE_REGISTER(mode, 15, data);
- else /* Pull only address, preserve mode & status flags */
- if (MODE32)
- SET_MODE_REGISTER(mode, 15, data);
+ data = READ32(rbv -= 4);
+ if (i == 15)
+ {
+ if (s) /* Pull full contents from stack */
+ SetModeRegister(mode, 15, data);
+ else if (MODE32) /* Pull only address, preserve mode & status flags */
+ SetModeRegister(mode, 15, data);
else
{
- SET_MODE_REGISTER(mode, 15, (GET_MODE_REGISTER(mode, 15) & ~0x03FFFFFC) | (data & 0x03FFFFFC));
+ SetModeRegister(mode, 15, (GetModeRegister(mode, 15) & ~0x03FFFFFC) | (data & 0x03FFFFFC));
}
- }
- else
- SET_MODE_REGISTER(mode, i, data);
+ }
+ else
+ {
+ SetModeRegister(mode, i, data);
+ }
}
result++;
}
@@ -247,7 +252,7 @@ int arm7_cpu_device::storeInc(UINT32 pat, UINT32 rbv, int mode)
if (i == 15) /* R15 is plus 12 from address of STM */
LOG(("%08x: StoreInc on R15\n", R15));
#endif
- WRITE32(rbv += 4, GET_MODE_REGISTER(mode, i));
+ WRITE32(rbv += 4, GetModeRegister(mode, i));
result++;
}
}
@@ -280,7 +285,7 @@ int arm7_cpu_device::storeDec(UINT32 pat, UINT32 rbv, int mode)
if (i == 15) /* R15 is plus 12 from address of STM */
LOG(("%08x: StoreDec on R15\n", R15));
#endif
- WRITE32(rbv + (cnt * 4), GET_MODE_REGISTER(mode, i));
+ WRITE32(rbv + (cnt * 4), GetModeRegister(mode, i));
cnt++;
}
}
@@ -308,15 +313,15 @@ void arm7_cpu_device::HandleCoProcRT(UINT32 insn)
if (insn & 0x00100000) // Bit 20 = Load or Store
{
UINT32 res = arm7_rt_r_callback(*m_program, insn, 0); // RT Read handler must parse opcode & return appropriate result
- if (m_pendingUnd == 0)
+ if (!m_pendingUnd)
{
- SET_REGISTER((insn >> 12) & 0xf, res);
+ SetRegister((insn >> 12) & 0xf, res);
}
}
// Store (MCR) data from ARM7 to Co-Proc register
else
{
- arm7_rt_w_callback(*m_program, insn, GET_REGISTER((insn >> 12) & 0xf), 0);
+ arm7_rt_w_callback(*m_program, insn, GetRegister((insn >> 12) & 0xf), 0);
}
}
@@ -335,7 +340,7 @@ void arm7_cpu_device::HandleCoProcRT(UINT32 insn)
void arm7_cpu_device::HandleCoProcDT(UINT32 insn)
{
UINT32 rn = (insn >> 16) & 0xf;
- UINT32 rnv = GET_REGISTER(rn); // Get Address Value stored from Rn
+ UINT32 rnv = GetRegister(rn); // Get Address Value stored from Rn
UINT32 ornv = rnv; // Keep value of Rn
UINT32 off = (insn & 0xff) << 2; // Offset is << 2 according to manual
UINT32 *prn = &ARM7REG(rn); // Pointer to our register, so it can be changed in the callback
@@ -370,7 +375,7 @@ void arm7_cpu_device::HandleCoProcDT(UINT32 insn)
// If writeback not used - ensure the original value of RN is restored in case co-proc callback changed value
if ((insn & 0x200000) == 0)
- SET_REGISTER(rn, ornv);
+ SetRegister(rn, ornv);
}
void arm7_cpu_device::HandleBranch(UINT32 insn)
@@ -380,7 +385,7 @@ void arm7_cpu_device::HandleBranch(UINT32 insn)
/* Save PC into LR if this is a branch with link */
if (insn & INSN_BL)
{
- SET_REGISTER(14, R15 + 4);
+ SetRegister(14, R15 + 4);
}
/* Sign-extend the 24-bit offset in our calculations */
@@ -425,22 +430,22 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
if (insn & INSN_SDT_U)
{
if ((MODE32) || (rn != eR15))
- rnv = (GET_REGISTER(rn) + off);
+ rnv = (GetRegister(rn) + off);
else
rnv = (GET_PC + off);
}
else
{
if ((MODE32) || (rn != eR15))
- rnv = (GET_REGISTER(rn) - off);
+ rnv = (GetRegister(rn) - off);
else
rnv = (GET_PC - off);
}
if (insn & INSN_SDT_W)
{
- rnv_old = GET_REGISTER(rn);
- SET_REGISTER(rn, rnv);
+ rnv_old = GetRegister(rn);
+ SetRegister(rn, rnv);
// check writeback???
}
@@ -461,7 +466,7 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
}
else
{
- rnv = GET_REGISTER(rn);
+ rnv = GetRegister(rn);
}
}
@@ -473,15 +478,15 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
if (insn & INSN_SDT_B)
{
UINT32 data = READ8(rnv);
- if (m_pendingAbtD == 0)
+ if (!m_pendingAbtD)
{
- SET_REGISTER(rd, data);
+ SetRegister(rd, data);
}
}
else
{
UINT32 data = READ32(rnv);
- if (m_pendingAbtD == 0)
+ if (!m_pendingAbtD)
{
if (rd == eR15)
{
@@ -494,7 +499,7 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
}
else
{
- SET_REGISTER(rd, data);
+ SetRegister(rd, data);
}
}
}
@@ -509,7 +514,7 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
LOG(("Wrote R15 in byte mode\n"));
#endif
- WRITE8(rnv, (UINT8) GET_REGISTER(rd) & 0xffu);
+ WRITE8(rnv, (UINT8) GetRegister(rd) & 0xffu);
}
else
{
@@ -518,18 +523,18 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
LOG(("Wrote R15 in 32bit mode\n"));
#endif
- //WRITE32(rnv, rd == eR15 ? R15 + 8 : GET_REGISTER(rd));
- WRITE32(rnv, rd == eR15 ? R15 + 8 + 4 : GET_REGISTER(rd)); // manual says STR rd = PC, +12
+ //WRITE32(rnv, rd == eR15 ? R15 + 8 : GetRegister(rd));
+ WRITE32(rnv, rd == eR15 ? R15 + 8 + 4 : GetRegister(rd)); // manual says STR rd = PC, +12
}
// Store takes only 2 N Cycles, so add + 1
ARM7_ICOUNT += 1;
}
- if (m_pendingAbtD != 0)
+ if (m_pendingAbtD)
{
if ((insn & INSN_SDT_P) && (insn & INSN_SDT_W))
{
- SET_REGISTER(rn, rnv_old);
+ SetRegister(rn, rnv_old);
}
}
else
@@ -542,14 +547,14 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
/* Writeback is applied in pipeline, before value is read from mem,
so writeback is effectively ignored */
if (rd == rn) {
- SET_REGISTER(rn, GET_REGISTER(rd));
+ SetRegister(rn, GetRegister(rd));
// todo: check for offs... ?
}
else {
if ((insn & INSN_SDT_W) != 0)
LOG(("%08x: RegisterWritebackIncrement %d %d %d\n", R15, (insn & INSN_SDT_P) != 0, (insn & INSN_SDT_W) != 0, (insn & INSN_SDT_U) != 0));
- SET_REGISTER(rn, (rnv + off));
+ SetRegister(rn, (rnv + off));
}
}
else
@@ -557,20 +562,19 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
/* Writeback is applied in pipeline, before value is read from mem,
so writeback is effectively ignored */
if (rd == rn) {
- SET_REGISTER(rn, GET_REGISTER(rd));
+ SetRegister(rn, GetRegister(rd));
}
else {
- SET_REGISTER(rn, (rnv - off));
+ SetRegister(rn, (rnv - off));
if ((insn & INSN_SDT_W) != 0)
LOG(("%08x: RegisterWritebackDecrement %d %d %d\n", R15, (insn & INSN_SDT_P) != 0, (insn & INSN_SDT_W) != 0, (insn & INSN_SDT_U) != 0));
}
}
}
+}
- }
-
-// ARM7_CHECKIRQ
+// arm7_check_irq_state();
} /* HandleMemSingle */
@@ -585,7 +589,7 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
}
else {
// register
- off = GET_REGISTER(insn & 0x0f);
+ off = GetRegister(insn & 0x0f);
}
/* Calculate Rn, accounting for PC */
@@ -596,17 +600,17 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
/* Pre-indexed addressing */
if (insn & INSN_SDT_U)
{
- rnv = (GET_REGISTER(rn) + off);
+ rnv = (GetRegister(rn) + off);
}
else
{
- rnv = (GET_REGISTER(rn) - off);
+ rnv = (GetRegister(rn) - off);
}
if (insn & INSN_SDT_W)
{
- rnv_old = GET_REGISTER(rn);
- SET_REGISTER(rn, rnv);
+ rnv_old = GetRegister(rn);
+ SetRegister(rn, rnv);
// check writeback???
}
@@ -624,7 +628,7 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
}
else
{
- rnv = GET_REGISTER(rn);
+ rnv = GetRegister(rn);
}
}
@@ -655,7 +659,7 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
newval = (UINT32)(signbyte << 8)|databyte;
}
- if (m_pendingAbtD == 0)
+ if (!m_pendingAbtD)
{
// PC?
if (rd == eR15)
@@ -667,7 +671,7 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
}
else
{
- SET_REGISTER(rd, newval);
+ SetRegister(rd, newval);
R15 += 4;
}
@@ -683,20 +687,19 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
{
UINT32 newval = READ16(rnv);
- if (m_pendingAbtD == 0)
- {
- if (rd == eR15)
- {
- R15 = newval + 8;
- // extra cycles for LDR(H,SH,SB) PC (5 total cycles)
- ARM7_ICOUNT -= 2;
- }
- else
+ if (!m_pendingAbtD)
{
- SET_REGISTER(rd, newval);
- R15 += 4;
- }
-
+ if (rd == eR15)
+ {
+ R15 = newval + 8;
+ // extra cycles for LDR(H,SH,SB) PC (5 total cycles)
+ ARM7_ICOUNT -= 2;
+ }
+ else
+ {
+ SetRegister(rd, newval);
+ R15 += 4;
+ }
}
else
{
@@ -711,38 +714,38 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
else
{
if ((insn & 0x60) == 0x40) // LDRD
- {
- SET_REGISTER(rd, READ32(rnv));
- SET_REGISTER(rd+1, READ32(rnv+4));
+ {
+ SetRegister(rd, READ32(rnv));
+ SetRegister(rd+1, READ32(rnv+4));
R15 += 4;
- }
+ }
else if ((insn & 0x60) == 0x60) // STRD
- {
- WRITE32(rnv, GET_REGISTER(rd));
- WRITE32(rnv+4, GET_REGISTER(rd+1));
- R15 += 4;
- }
- else
- {
- // WRITE16(rnv, rd == eR15 ? R15 + 8 : GET_REGISTER(rd));
- WRITE16(rnv, rd == eR15 ? R15 + 8 + 4 : GET_REGISTER(rd)); // manual says STR RD=PC, +12 of address
+ {
+ WRITE32(rnv, GetRegister(rd));
+ WRITE32(rnv+4, GetRegister(rd+1));
+ R15 += 4;
+ }
+ else
+ {
+ // WRITE16(rnv, rd == eR15 ? R15 + 8 : GetRegister(rd));
+ WRITE16(rnv, rd == eR15 ? R15 + 8 + 4 : GetRegister(rd)); // manual says STR RD=PC, +12 of address
// if R15 is not increased then e.g. "STRH R10, [R15,#$10]" will be executed over and over again
#if 0
if (rn != eR15)
#endif
- R15 += 4;
+ R15 += 4;
// STRH takes 2 cycles, so we add + 1
ARM7_ICOUNT += 1;
- }
+ }
}
- if (m_pendingAbtD != 0)
+ if (m_pendingAbtD)
{
if ((insn & INSN_SDT_P) && (insn & INSN_SDT_W))
{
- SET_REGISTER(rn, rnv_old);
+ SetRegister(rn, rnv_old);
}
}
else
@@ -757,14 +760,14 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
/* Writeback is applied in pipeline, before value is read from mem,
so writeback is effectively ignored */
if (rd == rn) {
- SET_REGISTER(rn, GET_REGISTER(rd));
+ SetRegister(rn, GetRegister(rd));
// todo: check for offs... ?
}
else {
if ((insn & INSN_SDT_W) != 0)
LOG(("%08x: RegisterWritebackIncrement %d %d %d\n", R15, (insn & INSN_SDT_P) != 0, (insn & INSN_SDT_W) != 0, (insn & INSN_SDT_U) != 0));
- SET_REGISTER(rn, (rnv + off));
+ SetRegister(rn, (rnv + off));
}
}
else
@@ -772,10 +775,10 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn)
/* Writeback is applied in pipeline, before value is read from mem,
so writeback is effectively ignored */
if (rd == rn) {
- SET_REGISTER(rn, GET_REGISTER(rd));
+ SetRegister(rn, GetRegister(rd));
}
else {
- SET_REGISTER(rn, (rnv - off));
+ SetRegister(rn, (rnv - off));
if ((insn & INSN_SDT_W) != 0)
LOG(("%08x: RegisterWritebackDecrement %d %d %d\n", R15, (insn & INSN_SDT_P) != 0, (insn & INSN_SDT_W) != 0, (insn & INSN_SDT_U) != 0));
@@ -791,8 +794,8 @@ void arm7_cpu_device::HandleSwap(UINT32 insn)
{
UINT32 rn, rm, rd, tmp;
- rn = GET_REGISTER((insn >> 16) & 0xf); // reg. w/read address
- rm = GET_REGISTER(insn & 0xf); // reg. w/write address
+ rn = GetRegister((insn >> 16) & 0xf); // reg. w/read address
+ rm = GetRegister(insn & 0xf); // reg. w/write address
rd = (insn >> 12) & 0xf; // dest reg
#if ARM7_DEBUG_CORE
@@ -805,13 +808,13 @@ void arm7_cpu_device::HandleSwap(UINT32 insn)
{
tmp = READ8(rn);
WRITE8(rn, rm);
- SET_REGISTER(rd, tmp);
+ SetRegister(rd, tmp);
}
else
{
tmp = READ32(rn);
WRITE32(rn, rm);
- SET_REGISTER(rd, tmp);
+ SetRegister(rd, tmp);
}
R15 += 4;
@@ -826,7 +829,7 @@ void arm7_cpu_device::HandlePSRTransfer(UINT32 insn)
int oldmode = GET_CPSR & MODE_FLAG;
// get old value of CPSR/SPSR
- newval = GET_REGISTER(reg);
+ newval = GetRegister(reg);
// MSR (bit 21 set) - Copy value to CPSR/SPSR
if ((insn & 0x00200000))
@@ -843,7 +846,7 @@ void arm7_cpu_device::HandlePSRTransfer(UINT32 insn)
// Value from Register
else
{
- val = GET_REGISTER(insn & 0x0f);
+ val = GetRegister(insn & 0x0f);
}
// apply field code bits
@@ -903,9 +906,11 @@ void arm7_cpu_device::HandlePSRTransfer(UINT32 insn)
// Update the Register
if (reg == eCPSR)
- SET_CPSR(newval);
+ {
+ set_cpsr(newval);
+ }
else
- SET_REGISTER(reg, newval);
+ SetRegister(reg, newval);
// Switch to new mode if changed
if ((newval & MODE_FLAG) != oldmode)
@@ -915,7 +920,7 @@ void arm7_cpu_device::HandlePSRTransfer(UINT32 insn)
// MRS (bit 21 clear) - Copy CPSR or SPSR to specified Register
else
{
- SET_REGISTER((insn >> 12)& 0x0f, GET_REGISTER(reg));
+ SetRegister((insn >> 12)& 0x0f, GetRegister(reg));
}
}
@@ -982,7 +987,7 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
}
else
{
- rn = GET_REGISTER(rn);
+ rn = GetRegister(rn);
}
}
@@ -1078,7 +1083,7 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
if (GET_MODE != eARM7_MODE_USER)
{
// Update CPSR from SPSR
- SET_CPSR(GET_REGISTER(SPSR));
+ set_cpsr(GetRegister(SPSR));
SwitchMode(GET_MODE);
}
@@ -1090,7 +1095,7 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
UINT32 temp;
R15 = rd; //(R15 & 0x03FFFFFC) | (rd & 0xFC000003);
temp = (GET_CPSR & 0x0FFFFF20) | (rd & 0xF0000000) /* N Z C V */ | ((rd & 0x0C000000) >> (26 - 6)) /* I F */ | (rd & 0x00000003) /* M1 M0 */;
- SET_CPSR( temp);
+ set_cpsr( temp);
SwitchMode( temp & 3);
}
@@ -1098,11 +1103,11 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
ARM7_ICOUNT -= 2;
/* IRQ masks may have changed in this instruction */
-// ARM7_CHECKIRQ;
+// arm7_check_irq_state();
}
else
/* S Flag is set - Write results to register & update CPSR (which was already handled using HandleALU flag macros) */
- SET_REGISTER(rdn, rd);
+ SetRegister(rdn, rd);
}
}
// SJE: Don't think this applies any more.. (see page 44 at bottom)
@@ -1120,12 +1125,12 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
UINT32 temp;
R15 = (R15 & 0x03FFFFFC) | (rd & ~0x03FFFFFC);
temp = (GET_CPSR & 0x0FFFFF20) | (rd & 0xF0000000) /* N Z C V */ | ((rd & 0x0C000000) >> (26 - 6)) /* I F */ | (rd & 0x00000003) /* M1 M0 */;
- SET_CPSR( temp);
+ set_cpsr( temp);
SwitchMode( temp & 3);
}
/* IRQ masks may have changed in this instruction */
-// ARM7_CHECKIRQ;
+// arm7_check_irq_state();
}
else
{
@@ -1151,8 +1156,8 @@ void arm7_cpu_device::HandleMul(UINT32 insn)
// multiply, which is controlled by the value of the multiplier operand
// specified by Rs.
- rm = GET_REGISTER(insn & INSN_MUL_RM);
- rs = GET_REGISTER((insn & INSN_MUL_RS) >> INSN_MUL_RS_SHIFT);
+ rm = GetRegister(insn & INSN_MUL_RM);
+ rs = GetRegister((insn & INSN_MUL_RS) >> INSN_MUL_RS_SHIFT);
/* Do the basic multiply of Rm and Rs */
r = rm * rs;
@@ -1167,18 +1172,18 @@ void arm7_cpu_device::HandleMul(UINT32 insn)
/* Add on Rn if this is a MLA */
if (insn & INSN_MUL_A)
{
- r += GET_REGISTER((insn & INSN_MUL_RN) >> INSN_MUL_RN_SHIFT);
+ r += GetRegister((insn & INSN_MUL_RN) >> INSN_MUL_RN_SHIFT);
// extra cycle for MLA
ARM7_ICOUNT -= 1;
}
/* Write the result */
- SET_REGISTER((insn & INSN_MUL_RD) >> INSN_MUL_RD_SHIFT, r);
+ SetRegister((insn & INSN_MUL_RD) >> INSN_MUL_RD_SHIFT, r);
/* Set N and Z if asked */
if (insn & INSN_S)
{
- SET_CPSR((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleALUNZFlags(r));
+ set_cpsr((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleALUNZFlags(r));
}
if (rs & SIGN_BIT) rs = -rs;
@@ -1201,8 +1206,8 @@ void arm7_cpu_device::HandleSMulLong(UINT32 insn)
// number of 8 bit multiplier array cycles required to complete the multiply, which is
// controlled by the value of the multiplier operand specified by Rs.
- rm = (INT32)GET_REGISTER(insn & 0xf);
- rs = (INT32)GET_REGISTER(((insn >> 8) & 0xf));
+ rm = (INT32)GetRegister(insn & 0xf);
+ rs = (INT32)GetRegister(((insn >> 8) & 0xf));
rhi = (insn >> 16) & 0xf;
rlo = (insn >> 12) & 0xf;
@@ -1217,20 +1222,20 @@ void arm7_cpu_device::HandleSMulLong(UINT32 insn)
/* Add on Rn if this is a MLA */
if (insn & INSN_MUL_A)
{
- INT64 acum = (INT64)((((INT64)(GET_REGISTER(rhi))) << 32) | GET_REGISTER(rlo));
+ INT64 acum = (INT64)((((INT64)(GetRegister(rhi))) << 32) | GetRegister(rlo));
res += acum;
// extra cycle for MLA
ARM7_ICOUNT -= 1;
}
/* Write the result (upper dword goes to RHi, lower to RLo) */
- SET_REGISTER(rhi, res >> 32);
- SET_REGISTER(rlo, res & 0xFFFFFFFF);
+ SetRegister(rhi, res >> 32);
+ SetRegister(rlo, res & 0xFFFFFFFF);
/* Set N and Z if asked */
if (insn & INSN_S)
{
- SET_CPSR((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleLongALUNZFlags(res));
+ set_cpsr((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleLongALUNZFlags(res));
}
if (rs < 0) rs = -rs;
@@ -1253,8 +1258,8 @@ void arm7_cpu_device::HandleUMulLong(UINT32 insn)
// number of 8 bit multiplier array cycles required to complete the multiply, which is
// controlled by the value of the multiplier operand specified by Rs.
- rm = (INT32)GET_REGISTER(insn & 0xf);
- rs = (INT32)GET_REGISTER(((insn >> 8) & 0xf));
+ rm = (INT32)GetRegister(insn & 0xf);
+ rs = (INT32)GetRegister(((insn >> 8) & 0xf));
rhi = (insn >> 16) & 0xf;
rlo = (insn >> 12) & 0xf;
@@ -1269,20 +1274,20 @@ void arm7_cpu_device::HandleUMulLong(UINT32 insn)
/* Add on Rn if this is a MLA */
if (insn & INSN_MUL_A)
{
- UINT64 acum = (UINT64)((((UINT64)(GET_REGISTER(rhi))) << 32) | GET_REGISTER(rlo));
+ UINT64 acum = (UINT64)((((UINT64)(GetRegister(rhi))) << 32) | GetRegister(rlo));
res += acum;
// extra cycle for MLA
ARM7_ICOUNT -= 1;
}
/* Write the result (upper dword goes to RHi, lower to RLo) */
- SET_REGISTER(rhi, res >> 32);
- SET_REGISTER(rlo, res & 0xFFFFFFFF);
+ SetRegister(rhi, res >> 32);
+ SetRegister(rlo, res & 0xFFFFFFFF);
/* Set N and Z if asked */
if (insn & INSN_S)
{
- SET_CPSR((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleLongALUNZFlags(res));
+ set_cpsr((GET_CPSR & ~(N_MASK | Z_MASK)) | HandleLongALUNZFlags(res));
}
if (rs < 0x00000100) ARM7_ICOUNT -= 1 + 1 + 1;
@@ -1296,7 +1301,7 @@ void arm7_cpu_device::HandleUMulLong(UINT32 insn)
void arm7_cpu_device::HandleMemBlock(UINT32 insn)
{
UINT32 rb = (insn & INSN_RN) >> INSN_RN_SHIFT;
- UINT32 rbp = GET_REGISTER(rb);
+ UINT32 rbp = GetRegister(rb);
int result;
#if ARM7_DEBUG_CORE
@@ -1335,7 +1340,7 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
else
result = loadInc(insn & 0xffff, rbp, insn & INSN_BDT_S, GET_MODE);
- if ((insn & INSN_BDT_W) && (m_pendingAbtD == 0))
+ if ((insn & INSN_BDT_W) && !m_pendingAbtD)
{
#if ARM7_DEBUG_CORE
if (rb == 15)
@@ -1345,19 +1350,20 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
// GBA "V-Rally 3" expects R0 not to be overwritten with the updated base value [BP 8077B0C]
if (((insn >> rb) & 1) == 0)
{
- SET_REGISTER(rb, GET_REGISTER(rb) + result * 4);
+ SetRegister(rb, GetRegister(rb) + result * 4);
}
}
// R15 included? (NOTE: CPSR restore must occur LAST otherwise wrong registers restored!)
- if ((insn & 0x8000) && (m_pendingAbtD == 0)) {
+ if ((insn & 0x8000) && !m_pendingAbtD)
+ {
R15 -= 4; // SJE: I forget why i did this?
// S - Flag Set? Signals transfer of current mode SPSR->CPSR
if (insn & INSN_BDT_S)
{
if (MODE32)
{
- SET_CPSR(GET_REGISTER(SPSR));
+ set_cpsr(GetRegister(SPSR));
SwitchMode(GET_MODE);
}
else
@@ -1365,7 +1371,7 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
UINT32 temp;
// LOG(("LDM + S | R15 %08X CPSR %08X\n", R15, GET_CPSR));
temp = (GET_CPSR & 0x0FFFFF20) | (R15 & 0xF0000000) /* N Z C V */ | ((R15 & 0x0C000000) >> (26 - 6)) /* I F */ | (R15 & 0x00000003) /* M1 M0 */;
- SET_CPSR( temp);
+ set_cpsr( temp);
SwitchMode(temp & 3);
}
}
@@ -1395,26 +1401,26 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
else
result = loadDec(insn & 0xffff, rbp, insn & INSN_BDT_S, GET_MODE);
- if ((insn & INSN_BDT_W) && (m_pendingAbtD == 0))
+ if ((insn & INSN_BDT_W) && !m_pendingAbtD)
{
if (rb == 0xf)
LOG(("%08x: Illegal LDRM writeback to r15\n", R15));
// "A LDM will always overwrite the updated base if the base is in the list." (also for a user bank transfer?)
if (((insn >> rb) & 1) == 0)
{
- SET_REGISTER(rb, GET_REGISTER(rb) - result * 4);
+ SetRegister(rb, GetRegister(rb) - result * 4);
}
}
// R15 included? (NOTE: CPSR restore must occur LAST otherwise wrong registers restored!)
- if ((insn & 0x8000) && (m_pendingAbtD == 0)) {
+ if ((insn & 0x8000) && !m_pendingAbtD) {
R15 -= 4; // SJE: I forget why i did this?
// S - Flag Set? Signals transfer of current mode SPSR->CPSR
if (insn & INSN_BDT_S)
{
if (MODE32)
{
- SET_CPSR(GET_REGISTER(SPSR));
+ set_cpsr(GetRegister(SPSR));
SwitchMode(GET_MODE);
}
else
@@ -1422,7 +1428,7 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
UINT32 temp;
// LOG(("LDM + S | R15 %08X CPSR %08X\n", R15, GET_CPSR));
temp = (GET_CPSR & 0x0FFFFF20) /* N Z C V I F M4 M3 M2 M1 M0 */ | (R15 & 0xF0000000) /* N Z C V */ | ((R15 & 0x0C000000) >> (26 - 6)) /* I F */ | (R15 & 0x00000003) /* M1 M0 */;
- SET_CPSR( temp);
+ set_cpsr(temp);
SwitchMode(temp & 3);
}
}
@@ -1468,9 +1474,9 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
else
result = storeInc(insn & 0xffff, rbp, GET_MODE);
- if ((insn & INSN_BDT_W) && (m_pendingAbtD == 0))
+ if ((insn & INSN_BDT_W) && !m_pendingAbtD)
{
- SET_REGISTER(rb, GET_REGISTER(rb) + result * 4);
+ SetRegister(rb, GetRegister(rb) + result * 4);
}
}
else
@@ -1495,9 +1501,9 @@ void arm7_cpu_device::HandleMemBlock(UINT32 insn)
else
result = storeDec(insn & 0xffff, rbp, GET_MODE);
- if ((insn & INSN_BDT_W) && (m_pendingAbtD == 0))
+ if ((insn & INSN_BDT_W) && !m_pendingAbtD)
{
- SET_REGISTER(rb, GET_REGISTER(rb) - result * 4);
+ SetRegister(rb, GetRegister(rb) - result * 4);
}
}
if (insn & (1 << eR15))
@@ -1530,10 +1536,10 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
/* Branch and Exchange (BX) */
if ((insn & 0x0ffffff0) == 0x012fff10) // bits 27-4 == 000100101111111111110001
{
- R15 = GET_REGISTER(insn & 0x0f);
+ R15 = GetRegister(insn & 0x0f);
// If new PC address has A0 set, switch to Thumb mode
if (R15 & 1) {
- SET_CPSR(GET_CPSR|T_MASK);
+ set_cpsr(GET_CPSR|T_MASK);
R15--;
}
}
@@ -1542,25 +1548,25 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
UINT32 rm = insn&0xf;
UINT32 rd = (insn>>12)&0xf;
- SET_REGISTER(rd, count_leading_zeros(GET_REGISTER(rm)));
+ SetRegister(rd, count_leading_zeros(GetRegister(rm)));
R15 += 4;
}
else if ((insn & 0x0ff000f0) == 0x01000050) // QADD - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>16)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>16)&0xf);
INT64 res;
res = saturate_qbit_overflow((INT64)src1 + (INT64)src2);
- SET_REGISTER((insn>>12)&0xf, (INT32)res);
+ SetRegister((insn>>12)&0xf, (INT32)res);
R15 += 4;
}
else if ((insn & 0x0ff000f0) == 0x01400050) // QDADD - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>16)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>16)&0xf);
INT64 res;
// check if doubling operation will overflow
@@ -1570,24 +1576,24 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
src2 *= 2;
res = saturate_qbit_overflow((INT64)src1 + (INT64)src2);
- SET_REGISTER((insn>>12)&0xf, (INT32)res);
+ SetRegister((insn>>12)&0xf, (INT32)res);
R15 += 4;
}
else if ((insn & 0x0ff000f0) == 0x01200050) // QSUB - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>16)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>16)&0xf);
INT64 res;
res = saturate_qbit_overflow((INT64)src1 - (INT64)src2);
- SET_REGISTER((insn>>12)&0xf, (INT32)res);
+ SetRegister((insn>>12)&0xf, (INT32)res);
R15 += 4;
}
else if ((insn & 0x0ff000f0) == 0x01600050) // QDSUB - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>16)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>16)&0xf);
INT64 res;
// check if doubling operation will overflow
@@ -1597,13 +1603,13 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
src2 *= 2;
res = saturate_qbit_overflow((INT64)src1 - (INT64)src2);
- SET_REGISTER((insn>>12)&0xf, (INT32)res);
+ SetRegister((insn>>12)&0xf, (INT32)res);
R15 += 4;
}
else if ((insn & 0x0ff00090) == 0x01000080) // SMLAxy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT32 res1;
// select top and bottom halves of src1/src2 and sign extend if necessary
@@ -1632,32 +1638,32 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
// do the signed multiply
res1 = src1 * src2;
// and the accumulate. NOTE: only the accumulate can cause an overflow, which is why we do it this way.
- saturate_qbit_overflow((INT64)res1 + (INT64)GET_REGISTER((insn>>12)&0xf));
+ saturate_qbit_overflow((INT64)res1 + (INT64)GetRegister((insn>>12)&0xf));
- SET_REGISTER((insn>>16)&0xf, res1 + GET_REGISTER((insn>>12)&0xf));
+ SetRegister((insn>>16)&0xf, res1 + GetRegister((insn>>12)&0xf));
R15 += 4;
}
else if ((insn & 0x0ff00090) == 0x01400080) // SMLALxy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT64 dst;
- dst = (INT64)GET_REGISTER((insn>>12)&0xf);
- dst |= (INT64)GET_REGISTER((insn>>16)&0xf)<<32;
+ dst = (INT64)GetRegister((insn>>12)&0xf);
+ dst |= (INT64)GetRegister((insn>>16)&0xf)<<32;
// do the multiply and accumulate
dst += (INT64)src1 * (INT64)src2;
// write back the result
- SET_REGISTER((insn>>12)&0xf, (UINT32)dst);
- SET_REGISTER((insn>>16)&0xf, (UINT32)(dst >> 32));
+ SetRegister((insn>>12)&0xf, (UINT32)dst);
+ SetRegister((insn>>16)&0xf, (UINT32)(dst >> 32));
R15 += 4;
}
else if ((insn & 0x0ff00090) == 0x01600080) // SMULxy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT32 res;
// select top and bottom halves of src1/src2 and sign extend if necessary
@@ -1684,13 +1690,13 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
}
res = src1 * src2;
- SET_REGISTER((insn>>16)&0xf, res);
+ SetRegister((insn>>16)&0xf, res);
R15 += 4;
}
else if ((insn & 0x0ff000b0) == 0x012000a0) // SMULWy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
INT64 res;
if (insn & 0x40)
@@ -1706,14 +1712,14 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
res = (INT64)src1 * (INT64)src2;
res >>= 16;
- SET_REGISTER((insn>>16)&0xf, (UINT32)res);
+ SetRegister((insn>>16)&0xf, (UINT32)res);
R15 += 4;
}
else if ((insn & 0x0ff000b0) == 0x01200080) // SMLAWy - v5
{
- INT32 src1 = GET_REGISTER(insn&0xf);
- INT32 src2 = GET_REGISTER((insn>>8)&0xf);
- INT32 src3 = GET_REGISTER((insn>>12)&0xf);
+ INT32 src1 = GetRegister(insn&0xf);
+ INT32 src2 = GetRegister((insn>>8)&0xf);
+ INT32 src3 = GetRegister((insn>>12)&0xf);
INT64 res;
if (insn & 0x40)
@@ -1737,7 +1743,7 @@ void arm7_cpu_device::arm7ops_0123(UINT32 insn)
src3 += (INT32)res;
// write the result back
- SET_REGISTER((insn>>16)&0xf, (UINT32)res);
+ SetRegister((insn>>16)&0xf, (UINT32)res);
R15 += 4;
}
else
@@ -1844,8 +1850,9 @@ void arm7_cpu_device::arm7ops_e(UINT32 insn) /* Co-Processor Data Operation or R
void arm7_cpu_device::arm7ops_f(UINT32 insn) /* Software Interrupt */
{
- m_pendingSwi = 1;
- ARM7_CHECKIRQ;
+ m_pendingSwi = true;
+ update_irq_state();
+ arm7_check_irq_state();
//couldn't find any cycle counts for SWI
// break;
}
diff --git a/src/devices/cpu/arm7/arm7thmb.cpp b/src/devices/cpu/arm7/arm7thmb.cpp
index 3dfd46094aa..fd26210d7bc 100644
--- a/src/devices/cpu/arm7/arm7thmb.cpp
+++ b/src/devices/cpu/arm7/arm7thmb.cpp
@@ -289,30 +289,30 @@ void arm7_cpu_device::tg00_0(UINT32 pc, UINT32 op) /* Shift left */
UINT32 rs, rd, rrs;
INT32 offs;
- SET_CPSR(GET_CPSR & ~(N_MASK | Z_MASK));
+ set_cpsr(GET_CPSR & ~(N_MASK | Z_MASK));
rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- rrs = GET_REGISTER(rs);
+ rrs = GetRegister(rs);
offs = (op & THUMB_SHIFT_AMT) >> THUMB_SHIFT_AMT_SHIFT;
if (offs != 0)
{
- SET_REGISTER(rd, rrs << offs);
+ SetRegister(rd, rrs << offs);
if (rrs & (1 << (31 - (offs - 1))))
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else
{
- SET_REGISTER(rd, rrs);
+ SetRegister(rd, rrs);
}
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -323,34 +323,34 @@ void arm7_cpu_device::tg00_1(UINT32 pc, UINT32 op) /* Shift right */
rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- rrs = GET_REGISTER(rs);
+ rrs = GetRegister(rs);
offs = (op & THUMB_SHIFT_AMT) >> THUMB_SHIFT_AMT_SHIFT;
if (offs != 0)
{
- SET_REGISTER(rd, rrs >> offs);
+ SetRegister(rd, rrs >> offs);
if (rrs & (1 << (offs - 1)))
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else
{
- SET_REGISTER(rd, 0);
+ SetRegister(rd, 0);
if (rrs & 0x80000000)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -365,7 +365,7 @@ void arm7_cpu_device::tg01_0(UINT32 pc, UINT32 op)
{
rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- rrs = GET_REGISTER(rs);
+ rrs = GetRegister(rs);
offs = (op & THUMB_SHIFT_AMT) >> THUMB_SHIFT_AMT_SHIFT;
if (offs == 0)
{
@@ -375,72 +375,72 @@ void arm7_cpu_device::tg01_0(UINT32 pc, UINT32 op)
{
if (rrs >> 31)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
- SET_REGISTER(rd, (rrs & 0x80000000) ? 0xFFFFFFFF : 0x00000000);
+ SetRegister(rd, (rrs & 0x80000000) ? 0xFFFFFFFF : 0x00000000);
}
else
{
if ((rrs >> (offs - 1)) & 1)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
- SET_REGISTER(rd,
+ SetRegister(rd,
(rrs & 0x80000000)
? ((0xFFFFFFFF << (32 - offs)) | (rrs >> offs))
: (rrs >> offs));
}
- SET_CPSR(GET_CPSR & ~(N_MASK | Z_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(N_MASK | Z_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
}
void arm7_cpu_device::tg01_10(UINT32 pc, UINT32 op) /* ADD Rd, Rs, Rn */
{
- UINT32 rn = GET_REGISTER((op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT);
- UINT32 rs = GET_REGISTER((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
+ UINT32 rn = GetRegister((op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT);
+ UINT32 rs = GetRegister((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, rs + rn);
- HandleThumbALUAddFlags(GET_REGISTER(rd), rs, rn);
+ SetRegister(rd, rs + rn);
+ HandleThumbALUAddFlags(GetRegister(rd), rs, rn);
}
void arm7_cpu_device::tg01_11(UINT32 pc, UINT32 op) /* SUB Rd, Rs, Rn */
{
- UINT32 rn = GET_REGISTER((op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT);
- UINT32 rs = GET_REGISTER((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
+ UINT32 rn = GetRegister((op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT);
+ UINT32 rs = GetRegister((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, rs - rn);
- HandleThumbALUSubFlags(GET_REGISTER(rd), rs, rn);
+ SetRegister(rd, rs - rn);
+ HandleThumbALUSubFlags(GetRegister(rd), rs, rn);
}
void arm7_cpu_device::tg01_12(UINT32 pc, UINT32 op) /* ADD Rd, Rs, #imm */
{
UINT32 imm = (op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT;
- UINT32 rs = GET_REGISTER((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
+ UINT32 rs = GetRegister((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, rs + imm);
- HandleThumbALUAddFlags(GET_REGISTER(rd), rs, imm);
+ SetRegister(rd, rs + imm);
+ HandleThumbALUAddFlags(GetRegister(rd), rs, imm);
}
void arm7_cpu_device::tg01_13(UINT32 pc, UINT32 op) /* SUB Rd, Rs, #imm */
{
UINT32 imm = (op & THUMB_ADDSUB_RNIMM) >> THUMB_ADDSUB_RNIMM_SHIFT;
- UINT32 rs = GET_REGISTER((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
+ UINT32 rs = GetRegister((op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT);
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, rs - imm);
- HandleThumbALUSubFlags(GET_REGISTER(rd), rs,imm);
+ SetRegister(rd, rs - imm);
+ HandleThumbALUSubFlags(GetRegister(rd), rs,imm);
}
@@ -450,15 +450,15 @@ void arm7_cpu_device::tg02_0(UINT32 pc, UINT32 op)
{
UINT32 rd = (op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT;
UINT32 op2 = (op & THUMB_INSN_IMM);
- SET_REGISTER(rd, op2);
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ SetRegister(rd, op2);
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
void arm7_cpu_device::tg02_1(UINT32 pc, UINT32 op)
{
- UINT32 rn = GET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
+ UINT32 rn = GetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
UINT32 op2 = op & THUMB_INSN_IMM;
UINT32 rd = rn - op2;
HandleThumbALUSubFlags(rd, rn, op2);
@@ -468,19 +468,19 @@ void arm7_cpu_device::tg02_1(UINT32 pc, UINT32 op)
void arm7_cpu_device::tg03_0(UINT32 pc, UINT32 op) /* ADD Rd, #Offset8 */
{
- UINT32 rn = GET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
+ UINT32 rn = GetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
UINT32 op2 = op & THUMB_INSN_IMM;
UINT32 rd = rn + op2;
- SET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, rd);
+ SetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, rd);
HandleThumbALUAddFlags(rd, rn, op2);
}
void arm7_cpu_device::tg03_1(UINT32 pc, UINT32 op) /* SUB Rd, #Offset8 */
{
- UINT32 rn = GET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
+ UINT32 rn = GetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT);
UINT32 op2 = op & THUMB_INSN_IMM;
UINT32 rd = rn - op2;
- SET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, rd);
+ SetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, rd);
HandleThumbALUSubFlags(rd, rn, op2);
}
@@ -490,9 +490,9 @@ void arm7_cpu_device::tg04_00_00(UINT32 pc, UINT32 op) /* AND Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, GET_REGISTER(rd) & GET_REGISTER(rs));
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ SetRegister(rd, GetRegister(rd) & GetRegister(rs));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -500,9 +500,9 @@ void arm7_cpu_device::tg04_00_01(UINT32 pc, UINT32 op) /* EOR Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, GET_REGISTER(rd) ^ GET_REGISTER(rs));
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ SetRegister(rd, GetRegister(rd) ^ GetRegister(rs));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -510,42 +510,42 @@ void arm7_cpu_device::tg04_00_02(UINT32 pc, UINT32 op) /* LSL Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rrd = GET_REGISTER(rd);
- INT32 offs = GET_REGISTER(rs) & 0x000000ff;
+ UINT32 rrd = GetRegister(rd);
+ INT32 offs = GetRegister(rs) & 0x000000ff;
if (offs > 0)
{
if (offs < 32)
{
- SET_REGISTER(rd, rrd << offs);
+ SetRegister(rd, rrd << offs);
if (rrd & (1 << (31 - (offs - 1))))
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else if (offs == 32)
{
- SET_REGISTER(rd, 0);
+ SetRegister(rd, 0);
if (rrd & 1)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else
{
- SET_REGISTER(rd, 0);
- SET_CPSR(GET_CPSR & ~C_MASK);
+ SetRegister(rd, 0);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -553,42 +553,42 @@ void arm7_cpu_device::tg04_00_03(UINT32 pc, UINT32 op) /* LSR Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rrd = GET_REGISTER(rd);
- INT32 offs = GET_REGISTER(rs) & 0x000000ff;
+ UINT32 rrd = GetRegister(rd);
+ INT32 offs = GetRegister(rs) & 0x000000ff;
if (offs > 0)
{
if (offs < 32)
{
- SET_REGISTER(rd, rrd >> offs);
+ SetRegister(rd, rrd >> offs);
if (rrd & (1 << (offs - 1)))
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else if (offs == 32)
{
- SET_REGISTER(rd, 0);
+ SetRegister(rd, 0);
if (rrd & 0x80000000)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
else
{
- SET_REGISTER(rd, 0);
- SET_CPSR(GET_CPSR & ~C_MASK);
+ SetRegister(rd, 0);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
}
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -596,39 +596,39 @@ void arm7_cpu_device::tg04_00_04(UINT32 pc, UINT32 op) /* ASR Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rrs = GET_REGISTER(rs)&0xff;
- UINT32 rrd = GET_REGISTER(rd);
+ UINT32 rrs = GetRegister(rs)&0xff;
+ UINT32 rrd = GetRegister(rd);
if (rrs != 0)
{
if (rrs >= 32)
{
if (rrd >> 31)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
- SET_REGISTER(rd, (GET_REGISTER(rd) & 0x80000000) ? 0xFFFFFFFF : 0x00000000);
+ SetRegister(rd, (GetRegister(rd) & 0x80000000) ? 0xFFFFFFFF : 0x00000000);
}
else
{
if ((rrd >> (rrs-1)) & 1)
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
- SET_REGISTER(rd, (rrd & 0x80000000)
+ SetRegister(rd, (rrd & 0x80000000)
? ((0xFFFFFFFF << (32 - rrs)) | (rrd >> rrs))
: (rrd >> rrs));
}
}
- SET_CPSR(GET_CPSR & ~(N_MASK | Z_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(N_MASK | Z_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -637,9 +637,9 @@ void arm7_cpu_device::tg04_00_05(UINT32 pc, UINT32 op) /* ADC Rd, Rs */
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
UINT32 op2 = (GET_CPSR & C_MASK) ? 1 : 0;
- UINT32 rn = GET_REGISTER(rd) + GET_REGISTER(rs) + op2;
- HandleThumbALUAddFlags(rn, GET_REGISTER(rd), (GET_REGISTER(rs))); // ?
- SET_REGISTER(rd, rn);
+ UINT32 rn = GetRegister(rd) + GetRegister(rs) + op2;
+ HandleThumbALUAddFlags(rn, GetRegister(rd), (GetRegister(rs))); // ?
+ SetRegister(rd, rn);
}
void arm7_cpu_device::tg04_00_06(UINT32 pc, UINT32 op) /* SBC Rd, Rs */
@@ -647,28 +647,28 @@ void arm7_cpu_device::tg04_00_06(UINT32 pc, UINT32 op) /* SBC Rd, Rs */
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
UINT32 op2 = (GET_CPSR & C_MASK) ? 0 : 1;
- UINT32 rn = GET_REGISTER(rd) - GET_REGISTER(rs) - op2;
- HandleThumbALUSubFlags(rn, GET_REGISTER(rd), (GET_REGISTER(rs))); //?
- SET_REGISTER(rd, rn);
+ UINT32 rn = GetRegister(rd) - GetRegister(rs) - op2;
+ HandleThumbALUSubFlags(rn, GetRegister(rd), (GetRegister(rs))); //?
+ SetRegister(rd, rn);
}
void arm7_cpu_device::tg04_00_07(UINT32 pc, UINT32 op) /* ROR Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rrd = GET_REGISTER(rd);
- UINT32 imm = GET_REGISTER(rs) & 0x0000001f;
- SET_REGISTER(rd, (rrd >> imm) | (rrd << (32 - imm)));
+ UINT32 rrd = GetRegister(rd);
+ UINT32 imm = GetRegister(rs) & 0x0000001f;
+ SetRegister(rd, (rrd >> imm) | (rrd << (32 - imm)));
if (rrd & (1 << (imm - 1)))
{
- SET_CPSR(GET_CPSR | C_MASK);
+ set_cpsr(GET_CPSR | C_MASK);
}
else
{
- SET_CPSR(GET_CPSR & ~C_MASK);
+ set_cpsr(GET_CPSR & ~C_MASK);
}
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -676,8 +676,8 @@ void arm7_cpu_device::tg04_00_08(UINT32 pc, UINT32 op) /* TST Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd) & GET_REGISTER(rs)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd) & GetRegister(rs)));
R15 += 2;
}
@@ -685,34 +685,34 @@ void arm7_cpu_device::tg04_00_09(UINT32 pc, UINT32 op) /* NEG Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rrs = GET_REGISTER(rs);
- SET_REGISTER(rd, 0 - rrs);
- HandleThumbALUSubFlags(GET_REGISTER(rd), 0, rrs);
+ UINT32 rrs = GetRegister(rs);
+ SetRegister(rd, 0 - rrs);
+ HandleThumbALUSubFlags(GetRegister(rd), 0, rrs);
}
void arm7_cpu_device::tg04_00_0a(UINT32 pc, UINT32 op) /* CMP Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rn = GET_REGISTER(rd) - GET_REGISTER(rs);
- HandleThumbALUSubFlags(rn, GET_REGISTER(rd), GET_REGISTER(rs));
+ UINT32 rn = GetRegister(rd) - GetRegister(rs);
+ HandleThumbALUSubFlags(rn, GetRegister(rd), GetRegister(rs));
}
void arm7_cpu_device::tg04_00_0b(UINT32 pc, UINT32 op) /* CMN Rd, Rs - check flags, add dasm */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rn = GET_REGISTER(rd) + GET_REGISTER(rs);
- HandleThumbALUAddFlags(rn, GET_REGISTER(rd), GET_REGISTER(rs));
+ UINT32 rn = GetRegister(rd) + GetRegister(rs);
+ HandleThumbALUAddFlags(rn, GetRegister(rd), GetRegister(rs));
}
void arm7_cpu_device::tg04_00_0c(UINT32 pc, UINT32 op) /* ORR Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, GET_REGISTER(rd) | GET_REGISTER(rs));
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ SetRegister(rd, GetRegister(rd) | GetRegister(rs));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -720,10 +720,10 @@ void arm7_cpu_device::tg04_00_0d(UINT32 pc, UINT32 op) /* MUL Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 rn = GET_REGISTER(rd) * GET_REGISTER(rs);
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_REGISTER(rd, rn);
- SET_CPSR(GET_CPSR | HandleALUNZFlags(rn));
+ UINT32 rn = GetRegister(rd) * GetRegister(rs);
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ SetRegister(rd, rn);
+ set_cpsr(GET_CPSR | HandleALUNZFlags(rn));
R15 += 2;
}
@@ -731,9 +731,9 @@ void arm7_cpu_device::tg04_00_0e(UINT32 pc, UINT32 op) /* BIC Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, GET_REGISTER(rd) & (~GET_REGISTER(rs)));
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ SetRegister(rd, GetRegister(rd) & (~GetRegister(rs)));
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -741,10 +741,10 @@ void arm7_cpu_device::tg04_00_0f(UINT32 pc, UINT32 op) /* MVN Rd, Rs */
{
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- UINT32 op2 = GET_REGISTER(rs);
- SET_REGISTER(rd, ~op2);
- SET_CPSR(GET_CPSR & ~(Z_MASK | N_MASK));
- SET_CPSR(GET_CPSR | HandleALUNZFlags(GET_REGISTER(rd)));
+ UINT32 op2 = GetRegister(rs);
+ SetRegister(rd, ~op2);
+ set_cpsr(GET_CPSR & ~(Z_MASK | N_MASK));
+ set_cpsr(GET_CPSR | HandleALUNZFlags(GetRegister(rd)));
R15 += 2;
}
@@ -759,11 +759,11 @@ void arm7_cpu_device::tg04_01_01(UINT32 pc, UINT32 op) /* ADD Rd, HRs */
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd, GET_REGISTER(rd) + GET_REGISTER(rs+8));
+ SetRegister(rd, GetRegister(rd) + GetRegister(rs+8));
// emulate the effects of pre-fetch
if (rs == 7)
{
- SET_REGISTER(rd, GET_REGISTER(rd) + 4);
+ SetRegister(rd, GetRegister(rd) + 4);
}
R15 += 2;
@@ -773,7 +773,7 @@ void arm7_cpu_device::tg04_01_02(UINT32 pc, UINT32 op) /* ADD HRd, Rs */
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd+8, GET_REGISTER(rd+8) + GET_REGISTER(rs));
+ SetRegister(rd+8, GetRegister(rd+8) + GetRegister(rs));
if (rd == 7)
{
R15 += 2;
@@ -786,11 +786,11 @@ void arm7_cpu_device::tg04_01_03(UINT32 pc, UINT32 op) /* Add HRd, HRs */
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd+8, GET_REGISTER(rd+8) + GET_REGISTER(rs+8));
+ SetRegister(rd+8, GetRegister(rd+8) + GetRegister(rs+8));
// emulate the effects of pre-fetch
if (rs == 7)
{
- SET_REGISTER(rd+8, GET_REGISTER(rd+8) + 4);
+ SetRegister(rd+8, GetRegister(rd+8) + 4);
}
if (rd == 7)
{
@@ -802,32 +802,32 @@ void arm7_cpu_device::tg04_01_03(UINT32 pc, UINT32 op) /* Add HRd, HRs */
void arm7_cpu_device::tg04_01_10(UINT32 pc, UINT32 op) /* CMP Rd, Rs */
{
- UINT32 rs = GET_REGISTER(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT));
- UINT32 rd = GET_REGISTER(op & THUMB_HIREG_RD);
+ UINT32 rs = GetRegister(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT));
+ UINT32 rd = GetRegister(op & THUMB_HIREG_RD);
UINT32 rn = rd - rs;
HandleThumbALUSubFlags(rn, rd, rs);
}
void arm7_cpu_device::tg04_01_11(UINT32 pc, UINT32 op) /* CMP Rd, Hs */
{
- UINT32 rs = GET_REGISTER(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT) + 8);
- UINT32 rd = GET_REGISTER(op & THUMB_HIREG_RD);
+ UINT32 rs = GetRegister(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT) + 8);
+ UINT32 rd = GetRegister(op & THUMB_HIREG_RD);
UINT32 rn = rd - rs;
HandleThumbALUSubFlags(rn, rd, rs);
}
void arm7_cpu_device::tg04_01_12(UINT32 pc, UINT32 op) /* CMP Hd, Rs */
{
- UINT32 rs = GET_REGISTER(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT));
- UINT32 rd = GET_REGISTER((op & THUMB_HIREG_RD) + 8);
+ UINT32 rs = GetRegister(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT));
+ UINT32 rd = GetRegister((op & THUMB_HIREG_RD) + 8);
UINT32 rn = rd - rs;
HandleThumbALUSubFlags(rn, rd, rs);
}
void arm7_cpu_device::tg04_01_13(UINT32 pc, UINT32 op) /* CMP Hd, Hs */
{
- UINT32 rs = GET_REGISTER(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT) + 8);
- UINT32 rd = GET_REGISTER((op & THUMB_HIREG_RD) + 8);
+ UINT32 rs = GetRegister(((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT) + 8);
+ UINT32 rd = GetRegister((op & THUMB_HIREG_RD) + 8);
UINT32 rn = rd - rs;
HandleThumbALUSubFlags(rn, rd, rs);
}
@@ -839,7 +839,7 @@ void arm7_cpu_device::tg04_01_20(UINT32 pc, UINT32 op) /* MOV Rd, Rs (undefined)
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd, GET_REGISTER(rs));
+ SetRegister(rd, GetRegister(rs));
R15 += 2;
}
@@ -847,10 +847,10 @@ void arm7_cpu_device::tg04_01_21(UINT32 pc, UINT32 op) /* MOV Rd, Hs */
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd, GET_REGISTER(rs + 8));
+ SetRegister(rd, GetRegister(rs + 8));
if (rs == 7)
{
- SET_REGISTER(rd, GET_REGISTER(rd) + 4);
+ SetRegister(rd, GetRegister(rd) + 4);
}
R15 += 2;
}
@@ -859,7 +859,7 @@ void arm7_cpu_device::tg04_01_22(UINT32 pc, UINT32 op) /* MOV Hd, Rs */
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
UINT32 rd = op & THUMB_HIREG_RD;
- SET_REGISTER(rd + 8, GET_REGISTER(rs));
+ SetRegister(rd + 8, GetRegister(rs));
if (rd != 7)
{
R15 += 2;
@@ -876,11 +876,11 @@ void arm7_cpu_device::tg04_01_23(UINT32 pc, UINT32 op) /* MOV Hd, Hs */
UINT32 rd = op & THUMB_HIREG_RD;
if (rs == 7)
{
- SET_REGISTER(rd + 8, GET_REGISTER(rs+8)+4);
+ SetRegister(rd + 8, GetRegister(rs+8)+4);
}
else
{
- SET_REGISTER(rd + 8, GET_REGISTER(rs+8));
+ SetRegister(rd + 8, GetRegister(rs+8));
}
if (rd != 7)
{
@@ -895,14 +895,14 @@ void arm7_cpu_device::tg04_01_23(UINT32 pc, UINT32 op) /* MOV Hd, Hs */
void arm7_cpu_device::tg04_01_30(UINT32 pc, UINT32 op)
{
UINT32 rd = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
- UINT32 addr = GET_REGISTER(rd);
+ UINT32 addr = GetRegister(rd);
if (addr & 1)
{
addr &= ~1;
}
else
{
- SET_CPSR(GET_CPSR & ~T_MASK);
+ set_cpsr(GET_CPSR & ~T_MASK);
if (addr & 2)
{
addr += 2;
@@ -914,7 +914,7 @@ void arm7_cpu_device::tg04_01_30(UINT32 pc, UINT32 op)
void arm7_cpu_device::tg04_01_31(UINT32 pc, UINT32 op)
{
UINT32 rs = (op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT;
- UINT32 addr = GET_REGISTER(rs+8);
+ UINT32 addr = GetRegister(rs+8);
if (rs == 7)
{
addr += 2;
@@ -925,7 +925,7 @@ void arm7_cpu_device::tg04_01_31(UINT32 pc, UINT32 op)
}
else
{
- SET_CPSR(GET_CPSR & ~T_MASK);
+ set_cpsr(GET_CPSR & ~T_MASK);
if (addr & 2)
{
addr += 2;
@@ -937,13 +937,13 @@ void arm7_cpu_device::tg04_01_31(UINT32 pc, UINT32 op)
/* BLX */
void arm7_cpu_device::tg04_01_32(UINT32 pc, UINT32 op)
{
- UINT32 addr = GET_REGISTER((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT);
- SET_REGISTER(14, (R15 + 2) | 1);
+ UINT32 addr = GetRegister((op & THUMB_HIREG_RS) >> THUMB_HIREG_RS_SHIFT);
+ SetRegister(14, (R15 + 2) | 1);
// are we also switching to ARM mode?
if (!(addr & 1))
{
- SET_CPSR(GET_CPSR & ~T_MASK);
+ set_cpsr(GET_CPSR & ~T_MASK);
if (addr & 2)
{
addr += 2;
@@ -965,7 +965,7 @@ void arm7_cpu_device::tg04_01_33(UINT32 pc, UINT32 op)
void arm7_cpu_device::tg04_0203(UINT32 pc, UINT32 op)
{
UINT32 readword = READ32((R15 & ~2) + 4 + ((op & THUMB_INSN_IMM) << 2));
- SET_REGISTER((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, readword);
+ SetRegister((op & THUMB_INSN_IMM_RD) >> THUMB_INSN_IMM_RD_SHIFT, readword);
R15 += 2;
}
@@ -976,8 +976,8 @@ void arm7_cpu_device::tg05_0(UINT32 pc, UINT32 op) /* STR Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
- WRITE32(addr, GET_REGISTER(rd));
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
+ WRITE32(addr, GetRegister(rd));
R15 += 2;
}
@@ -986,8 +986,8 @@ void arm7_cpu_device::tg05_1(UINT32 pc, UINT32 op) /* STRH Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
- WRITE16(addr, GET_REGISTER(rd));
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
+ WRITE16(addr, GetRegister(rd));
R15 += 2;
}
@@ -996,8 +996,8 @@ void arm7_cpu_device::tg05_2(UINT32 pc, UINT32 op) /* STRB Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
- WRITE8(addr, GET_REGISTER(rd));
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
+ WRITE8(addr, GetRegister(rd));
R15 += 2;
}
@@ -1006,13 +1006,13 @@ void arm7_cpu_device::tg05_3(UINT32 pc, UINT32 op) /* LDSB Rd, [Rn, Rm] todo, a
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
UINT32 op2 = READ8(addr);
if (op2 & 0x00000080)
{
op2 |= 0xffffff00;
}
- SET_REGISTER(rd, op2);
+ SetRegister(rd, op2);
R15 += 2;
}
@@ -1021,9 +1021,9 @@ void arm7_cpu_device::tg05_4(UINT32 pc, UINT32 op) /* LDR Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
UINT32 op2 = READ32(addr);
- SET_REGISTER(rd, op2);
+ SetRegister(rd, op2);
R15 += 2;
}
@@ -1032,9 +1032,9 @@ void arm7_cpu_device::tg05_5(UINT32 pc, UINT32 op) /* LDRH Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
UINT32 op2 = READ16(addr);
- SET_REGISTER(rd, op2);
+ SetRegister(rd, op2);
R15 += 2;
}
@@ -1043,9 +1043,9 @@ void arm7_cpu_device::tg05_6(UINT32 pc, UINT32 op) /* LDRB Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
UINT32 op2 = READ8(addr);
- SET_REGISTER(rd, op2);
+ SetRegister(rd, op2);
R15 += 2;
}
@@ -1054,13 +1054,13 @@ void arm7_cpu_device::tg05_7(UINT32 pc, UINT32 op) /* LDSH Rd, [Rn, Rm] */
UINT32 rm = (op & THUMB_GROUP5_RM) >> THUMB_GROUP5_RM_SHIFT;
UINT32 rn = (op & THUMB_GROUP5_RN) >> THUMB_GROUP5_RN_SHIFT;
UINT32 rd = (op & THUMB_GROUP5_RD) >> THUMB_GROUP5_RD_SHIFT;
- UINT32 addr = GET_REGISTER(rn) + GET_REGISTER(rm);
+ UINT32 addr = GetRegister(rn) + GetRegister(rm);
UINT32 op2 = READ16(addr);
if (op2 & 0x00008000)
{
op2 |= 0xffff0000;
}
- SET_REGISTER(rd, op2);
+ SetRegister(rd, op2);
R15 += 2;
}
@@ -1071,7 +1071,7 @@ void arm7_cpu_device::tg06_0(UINT32 pc, UINT32 op) /* Store */
UINT32 rn = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = op & THUMB_ADDSUB_RD;
INT32 offs = ((op & THUMB_LSOP_OFFS) >> THUMB_LSOP_OFFS_SHIFT) << 2;
- WRITE32(GET_REGISTER(rn) + offs, GET_REGISTER(rd));
+ WRITE32(GetRegister(rn) + offs, GetRegister(rd));
R15 += 2;
}
@@ -1080,7 +1080,7 @@ void arm7_cpu_device::tg06_1(UINT32 pc, UINT32 op) /* Load */
UINT32 rn = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = op & THUMB_ADDSUB_RD;
INT32 offs = ((op & THUMB_LSOP_OFFS) >> THUMB_LSOP_OFFS_SHIFT) << 2;
- SET_REGISTER(rd, READ32(GET_REGISTER(rn) + offs)); // fix
+ SetRegister(rd, READ32(GetRegister(rn) + offs)); // fix
R15 += 2;
}
@@ -1091,7 +1091,7 @@ void arm7_cpu_device::tg07_0(UINT32 pc, UINT32 op) /* Store */
UINT32 rn = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = op & THUMB_ADDSUB_RD;
INT32 offs = (op & THUMB_LSOP_OFFS) >> THUMB_LSOP_OFFS_SHIFT;
- WRITE8(GET_REGISTER(rn) + offs, GET_REGISTER(rd));
+ WRITE8(GetRegister(rn) + offs, GetRegister(rd));
R15 += 2;
}
@@ -1100,7 +1100,7 @@ void arm7_cpu_device::tg07_1(UINT32 pc, UINT32 op) /* Load */
UINT32 rn = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = op & THUMB_ADDSUB_RD;
INT32 offs = (op & THUMB_LSOP_OFFS) >> THUMB_LSOP_OFFS_SHIFT;
- SET_REGISTER(rd, READ8(GET_REGISTER(rn) + offs));
+ SetRegister(rd, READ8(GetRegister(rn) + offs));
R15 += 2;
}
@@ -1111,7 +1111,7 @@ void arm7_cpu_device::tg08_0(UINT32 pc, UINT32 op) /* Store */
UINT32 imm = (op & THUMB_HALFOP_OFFS) >> THUMB_HALFOP_OFFS_SHIFT;
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- WRITE16(GET_REGISTER(rs) + (imm << 1), GET_REGISTER(rd));
+ WRITE16(GetRegister(rs) + (imm << 1), GetRegister(rd));
R15 += 2;
}
@@ -1120,7 +1120,7 @@ void arm7_cpu_device::tg08_1(UINT32 pc, UINT32 op) /* Load */
UINT32 imm = (op & THUMB_HALFOP_OFFS) >> THUMB_HALFOP_OFFS_SHIFT;
UINT32 rs = (op & THUMB_ADDSUB_RS) >> THUMB_ADDSUB_RS_SHIFT;
UINT32 rd = (op & THUMB_ADDSUB_RD) >> THUMB_ADDSUB_RD_SHIFT;
- SET_REGISTER(rd, READ16(GET_REGISTER(rs) + (imm << 1)));
+ SetRegister(rd, READ16(GetRegister(rs) + (imm << 1)));
R15 += 2;
}
@@ -1130,7 +1130,7 @@ void arm7_cpu_device::tg09_0(UINT32 pc, UINT32 op) /* Store */
{
UINT32 rd = (op & THUMB_STACKOP_RD) >> THUMB_STACKOP_RD_SHIFT;
INT32 offs = (UINT8)(op & THUMB_INSN_IMM);
- WRITE32(GET_REGISTER(13) + ((UINT32)offs << 2), GET_REGISTER(rd));
+ WRITE32(GetRegister(13) + ((UINT32)offs << 2), GetRegister(rd));
R15 += 2;
}
@@ -1138,8 +1138,8 @@ void arm7_cpu_device::tg09_1(UINT32 pc, UINT32 op) /* Load */
{
UINT32 rd = (op & THUMB_STACKOP_RD) >> THUMB_STACKOP_RD_SHIFT;
INT32 offs = (UINT8)(op & THUMB_INSN_IMM);
- UINT32 readword = READ32(GET_REGISTER(13) + ((UINT32)offs << 2));
- SET_REGISTER(rd, readword);
+ UINT32 readword = READ32(GetRegister(13) + ((UINT32)offs << 2));
+ SetRegister(rd, readword);
R15 += 2;
}
@@ -1149,7 +1149,7 @@ void arm7_cpu_device::tg0a_0(UINT32 pc, UINT32 op) /* ADD Rd, PC, #nn */
{
UINT32 rd = (op & THUMB_RELADDR_RD) >> THUMB_RELADDR_RD_SHIFT;
INT32 offs = (UINT8)(op & THUMB_INSN_IMM) << 2;
- SET_REGISTER(rd, ((R15 + 4) & ~2) + offs);
+ SetRegister(rd, ((R15 + 4) & ~2) + offs);
R15 += 2;
}
@@ -1157,7 +1157,7 @@ void arm7_cpu_device::tg0a_1(UINT32 pc, UINT32 op) /* ADD Rd, SP, #nn */
{
UINT32 rd = (op & THUMB_RELADDR_RD) >> THUMB_RELADDR_RD_SHIFT;
INT32 offs = (UINT8)(op & THUMB_INSN_IMM) << 2;
- SET_REGISTER(rd, GET_REGISTER(13) + offs);
+ SetRegister(rd, GetRegister(13) + offs);
R15 += 2;
}
@@ -1167,7 +1167,7 @@ void arm7_cpu_device::tg0b_0(UINT32 pc, UINT32 op) /* ADD SP, #imm */
{
UINT32 addr = (op & THUMB_INSN_IMM);
addr &= ~THUMB_INSN_IMM_S;
- SET_REGISTER(13, GET_REGISTER(13) + ((op & THUMB_INSN_IMM_S) ? -(addr << 2) : (addr << 2)));
+ SetRegister(13, GetRegister(13) + ((op & THUMB_INSN_IMM_S) ? -(addr << 2) : (addr << 2)));
R15 += 2;
}
@@ -1192,8 +1192,8 @@ void arm7_cpu_device::tg0b_4(UINT32 pc, UINT32 op) /* PUSH {Rlist} */
{
if (op & (1 << offs))
{
- SET_REGISTER(13, GET_REGISTER(13) - 4);
- WRITE32(GET_REGISTER(13), GET_REGISTER(offs));
+ SetRegister(13, GetRegister(13) - 4);
+ WRITE32(GetRegister(13), GetRegister(offs));
}
}
R15 += 2;
@@ -1201,14 +1201,14 @@ void arm7_cpu_device::tg0b_4(UINT32 pc, UINT32 op) /* PUSH {Rlist} */
void arm7_cpu_device::tg0b_5(UINT32 pc, UINT32 op) /* PUSH {Rlist}{LR} */
{
- SET_REGISTER(13, GET_REGISTER(13) - 4);
- WRITE32(GET_REGISTER(13), GET_REGISTER(14));
+ SetRegister(13, GetRegister(13) - 4);
+ WRITE32(GetRegister(13), GetRegister(14));
for (INT32 offs = 7; offs >= 0; offs--)
{
if (op & (1 << offs))
{
- SET_REGISTER(13, GET_REGISTER(13) - 4);
- WRITE32(GET_REGISTER(13), GET_REGISTER(offs));
+ SetRegister(13, GetRegister(13) - 4);
+ WRITE32(GetRegister(13), GetRegister(GetRegister(offs)));
}
}
R15 += 2;
@@ -1250,8 +1250,8 @@ void arm7_cpu_device::tg0b_c(UINT32 pc, UINT32 op) /* POP {Rlist} */
{
if (op & (1 << offs))
{
- SET_REGISTER(offs, READ32(GET_REGISTER(13)));
- SET_REGISTER(13, GET_REGISTER(13) + 4);
+ SetRegister(offs, READ32(GetRegister(13)));
+ SetRegister(13, GetRegister(13) + 4);
}
}
R15 += 2;
@@ -1263,11 +1263,11 @@ void arm7_cpu_device::tg0b_d(UINT32 pc, UINT32 op) /* POP {Rlist}{PC} */
{
if (op & (1 << offs))
{
- SET_REGISTER(offs, READ32(GET_REGISTER(13)));
- SET_REGISTER(13, GET_REGISTER(13) + 4);
+ SetRegister(offs, READ32(GetRegister(13)));
+ SetRegister(13, GetRegister(13) + 4);
}
}
- UINT32 addr = READ32(GET_REGISTER(13));
+ UINT32 addr = READ32(GetRegister(13));
if (m_archRev < 5)
{
R15 = addr & ~1;
@@ -1280,7 +1280,7 @@ void arm7_cpu_device::tg0b_d(UINT32 pc, UINT32 op) /* POP {Rlist}{PC} */
}
else
{
- SET_CPSR(GET_CPSR & ~T_MASK);
+ set_cpsr(GET_CPSR & ~T_MASK);
if (addr & 2)
{
addr += 2;
@@ -1289,7 +1289,7 @@ void arm7_cpu_device::tg0b_d(UINT32 pc, UINT32 op) /* POP {Rlist}{PC} */
R15 = addr;
}
- SET_REGISTER(13, GET_REGISTER(13) + 4);
+ SetRegister(13, GetRegister(13) + 4);
}
void arm7_cpu_device::tg0b_e(UINT32 pc, UINT32 op)
@@ -1313,16 +1313,16 @@ void arm7_cpu_device::tg0b_f(UINT32 pc, UINT32 op)
void arm7_cpu_device::tg0c_0(UINT32 pc, UINT32 op) /* Store */
{
UINT32 rd = (op & THUMB_MULTLS_BASE) >> THUMB_MULTLS_BASE_SHIFT;
- UINT32 ld_st_address = GET_REGISTER(rd);
+ UINT32 ld_st_address = GetRegister(rd);
for (INT32 offs = 0; offs < 8; offs++)
{
if (op & (1 << offs))
{
- WRITE32(ld_st_address & ~3, GET_REGISTER(offs));
+ WRITE32(ld_st_address & ~3, GetRegister(offs));
ld_st_address += 4;
}
}
- SET_REGISTER(rd, ld_st_address);
+ SetRegister(rd, ld_st_address);
R15 += 2;
}
@@ -1330,18 +1330,18 @@ void arm7_cpu_device::tg0c_1(UINT32 pc, UINT32 op) /* Load */
{
UINT32 rd = (op & THUMB_MULTLS_BASE) >> THUMB_MULTLS_BASE_SHIFT;
int rd_in_list = op & (1 << rd);
- UINT32 ld_st_address = GET_REGISTER(rd);
+ UINT32 ld_st_address = GetRegister(rd);
for (INT32 offs = 0; offs < 8; offs++)
{
if (op & (1 << offs))
{
- SET_REGISTER(offs, READ32(ld_st_address & ~1));
+ SetRegister(offs, READ32(ld_st_address & ~1));
ld_st_address += 4;
}
}
if (!rd_in_list)
{
- SET_REGISTER(rd, ld_st_address);
+ SetRegister(rd, ld_st_address);
}
R15 += 2;
}
@@ -1539,7 +1539,7 @@ void arm7_cpu_device::tg0d_e(UINT32 pc, UINT32 op) // COND_AL:
void arm7_cpu_device::tg0d_f(UINT32 pc, UINT32 op) // COND_NV: // SWI (this is sort of a "hole" in the opcode encoding)
{
m_pendingSwi = 1;
- ARM7_CHECKIRQ;
+ arm7_check_irq_state();
}
/* B #offs */
@@ -1556,10 +1556,10 @@ void arm7_cpu_device::tg0e_0(UINT32 pc, UINT32 op)
void arm7_cpu_device::tg0e_1(UINT32 pc, UINT32 op)
{
- UINT32 addr = GET_REGISTER(14);
+ UINT32 addr = GetRegister(14);
addr += (op & THUMB_BLOP_OFFS) << 1;
addr &= 0xfffffffc;
- SET_REGISTER(14, (R15 + 4) | 1);
+ SetRegister(14, (R15 + 4) | 1);
R15 = addr;
}
@@ -1573,15 +1573,15 @@ void arm7_cpu_device::tg0f_0(UINT32 pc, UINT32 op)
addr |= 0xff800000;
}
addr += R15 + 4;
- SET_REGISTER(14, addr);
+ SetRegister(14, addr);
R15 += 2;
}
void arm7_cpu_device::tg0f_1(UINT32 pc, UINT32 op) /* BL */
{
- UINT32 addr = GET_REGISTER(14) & ~1;
+ UINT32 addr = GetRegister(14) & ~1;
addr += (op & THUMB_BLOP_OFFS) << 1;
- SET_REGISTER(14, (R15 + 2) | 1);
+ SetRegister(14, (R15 + 2) | 1);
R15 = addr;
//R15 += 2;
}
diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp
index f3f9cf7be9f..a5437e8dfb1 100644
--- a/src/devices/cpu/drcbec.cpp
+++ b/src/devices/cpu/drcbec.cpp
@@ -331,7 +331,7 @@ void drcbe_c::generate(drcuml_block &block, const instruction *instlist, UINT32
block.abort();
// compute the base by aligning the cache top to an even multiple of drcbec_instruction
- drcbec_instruction *base = (drcbec_instruction *)(((FPTR)*cachetop + sizeof(drcbec_instruction) - 1) & ~(sizeof(drcbec_instruction) - 1));
+ drcbec_instruction *base = (drcbec_instruction *)(((uintptr_t)*cachetop + sizeof(drcbec_instruction) - 1) & ~(sizeof(drcbec_instruction) - 1));
drcbec_instruction *dst = base;
// generate code by copying the instructions and extracting immediates
diff --git a/src/devices/cpu/drcbeut.cpp b/src/devices/cpu/drcbeut.cpp
index e4354dda517..8d4821e7421 100644
--- a/src/devices/cpu/drcbeut.cpp
+++ b/src/devices/cpu/drcbeut.cpp
@@ -247,7 +247,7 @@ void drc_map_variables::block_end(drcuml_block &block)
drccodeptr *top = m_cache.begin_codegen(sizeof(UINT64) + sizeof(UINT32) + 2 * sizeof(UINT32) * m_entry_list.count());
if (top == nullptr)
block.abort();
- UINT32 *dest = (UINT32 *)(((FPTR)*top + 7) & ~7);
+ UINT32 *dest = (UINT32 *)(((uintptr_t)*top + 7) & ~7);
// store the cookie first
*(UINT64 *)dest = m_uniquevalue;
@@ -355,7 +355,7 @@ UINT32 drc_map_variables::get_value(drccodeptr codebase, UINT32 mapvar) const
mapvar -= MAPVAR_M0;
// get an aligned pointer to start scanning
- UINT64 *curscan = (UINT64 *)(((FPTR)codebase | 7) + 1);
+ UINT64 *curscan = (UINT64 *)(((uintptr_t)codebase | 7) + 1);
UINT64 *endscan = (UINT64 *)m_cache.top();
// look for the signature
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 7b3693a37ef..4ecb8cef939 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -561,7 +561,7 @@ inline int drcbe_x64::get_base_register_and_offset(x86code *&dst, void *target,
else
{
offset = 0;
- emit_mov_r64_imm(dst, reg, (FPTR)target); // mov reg,target
+ emit_mov_r64_imm(dst, reg, (uintptr_t)target); // mov reg,target
return reg;
}
}
@@ -579,7 +579,7 @@ inline void drcbe_x64::emit_smart_call_r64(x86code *&dst, x86code *target, UINT8
emit_call(dst, target); // call target
else
{
- emit_mov_r64_imm(dst, reg, (FPTR)target); // mov reg,target
+ emit_mov_r64_imm(dst, reg, (uintptr_t)target); // mov reg,target
emit_call_r64(dst, reg); // call reg
}
}
@@ -639,7 +639,7 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
m_near.double1 = 1.0;
// create absolute value masks that are aligned to SSE boundaries
- m_absmask32 = (UINT32 *)(((FPTR)m_absmask32 + 15) & ~15);
+ m_absmask32 = (UINT32 *)(((uintptr_t)m_absmask32 + 15) & ~15);
m_absmask32[0] = m_absmask32[1] = m_absmask32[2] = m_absmask32[3] = 0x7fffffff;
m_absmask64 = (UINT64 *)&m_absmask32[4];
m_absmask64[0] = m_absmask64[1] = U64(0x7fffffffffffffff);
@@ -811,7 +811,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
block.abort();
// compute the base by aligning the cache top to a cache line (assumed to be 64 bytes)
- x86code *base = (x86code *)(((FPTR)*cachetop + 63) & ~63);
+ x86code *base = (x86code *)(((uintptr_t)*cachetop + 63) & ~63);
x86code *dst = base;
// generate code
@@ -2791,13 +2791,13 @@ void drcbe_x64::op_debug(x86code *&dst, const instruction &inst)
be_parameter pcp(*this, inst.param(0), PTYPE_MRI);
// test and branch
- emit_mov_r64_imm(dst, REG_RAX, (FPTR)&m_device.machine().debug_flags); // mov rax,&debug_flags
+ emit_mov_r64_imm(dst, REG_RAX, (uintptr_t)&m_device.machine().debug_flags); // mov rax,&debug_flags
emit_test_m32_imm(dst, MBD(REG_RAX, 0), DEBUG_FLAG_CALL_HOOK); // test [debug_flags],DEBUG_FLAG_CALL_HOOK
emit_link skip = { nullptr };
emit_jcc_short_link(dst, x64emit::COND_Z, skip); // jz skip
// push the parameter
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)&m_device); // mov param1,device
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)&m_device); // mov param1,device
emit_mov_r32_p32(dst, REG_PARAM2, pcp); // mov param2,pcp
emit_smart_call_m64(dst, &m_near.debug_cpu_instruction_hook); // call debug_cpu_instruction_hook
@@ -3068,8 +3068,8 @@ void drcbe_x64::op_callc(x86code *&dst, const instruction &inst)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
// perform the call
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)paramp.memory()); // mov param1,paramp
- emit_smart_call_r64(dst, (x86code *)(FPTR)funcp.cfunc(), REG_RAX); // call funcp
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)paramp.memory()); // mov param1,paramp
+ emit_smart_call_r64(dst, (x86code *)(uintptr_t)funcp.cfunc(), REG_RAX); // call funcp
// resolve the conditional link
if (inst.condition() != uml::COND_ALWAYS)
@@ -3094,7 +3094,7 @@ void drcbe_x64::op_recover(x86code *&dst, const instruction &inst)
// call the recovery code
emit_mov_r64_m64(dst, REG_RAX, MABS(&m_near.stacksave)); // mov rax,stacksave
emit_mov_r64_m64(dst, REG_RAX, MBD(REG_RAX, -8)); // mov rax,[rax-4]
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)&m_map); // mov param1,m_map
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)&m_map); // mov param1,m_map
emit_lea_r64_m64(dst, REG_PARAM2, MBD(REG_RAX, -1)); // lea param2,[rax-1]
emit_mov_r64_imm(dst, REG_PARAM3, inst.param(1).mapvar()); // mov param3,param[1].value
emit_smart_call_m64(dst, &m_near.drcmap_get_value); // call drcmap_get_value
@@ -3339,7 +3339,7 @@ void drcbe_x64::op_save(x86code *&dst, const instruction &inst)
be_parameter dstp(*this, inst.param(0), PTYPE_M);
// copy live state to the destination
- emit_mov_r64_imm(dst, REG_RCX, (FPTR)dstp.memory()); // mov rcx,dstp
+ emit_mov_r64_imm(dst, REG_RCX, (uintptr_t)dstp.memory()); // mov rcx,dstp
// copy flags
emit_pushf(dst); // pushf
@@ -3397,7 +3397,7 @@ void drcbe_x64::op_restore(x86code *&dst, const instruction &inst)
be_parameter srcp(*this, inst.param(0), PTYPE_M);
// copy live state from the destination
- emit_mov_r64_imm(dst, REG_ECX, (FPTR)srcp.memory()); // mov rcx,dstp
+ emit_mov_r64_imm(dst, REG_ECX, (uintptr_t)srcp.memory()); // mov rcx,dstp
// copy integer registers
int regoffs = offsetof(drcuml_machine_state, r);
@@ -3736,7 +3736,7 @@ void drcbe_x64::op_read(x86code *&dst, const instruction &inst)
int dstreg = dstp.select_register(REG_EAX);
// set up a call to the read byte handler
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacesizep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacesizep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param2,addrp
if (spacesizep.size() == SIZE_BYTE)
{
@@ -3795,7 +3795,7 @@ void drcbe_x64::op_readm(x86code *&dst, const instruction &inst)
int dstreg = dstp.select_register(REG_EAX);
// set up a call to the read byte handler
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacesizep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacesizep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param2,addrp
if (spacesizep.size() != SIZE_QWORD)
emit_mov_r32_p32(dst, REG_PARAM3, maskp); // mov param3,maskp
@@ -3848,7 +3848,7 @@ void drcbe_x64::op_write(x86code *&dst, const instruction &inst)
assert(spacesizep.is_size_space());
// set up a call to the write byte handler
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacesizep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacesizep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param2,addrp
if (spacesizep.size() != SIZE_QWORD)
emit_mov_r32_p32(dst, REG_PARAM3, srcp); // mov param3,srcp
@@ -3888,7 +3888,7 @@ void drcbe_x64::op_writem(x86code *&dst, const instruction &inst)
assert(spacesizep.is_size_space());
// set up a call to the write byte handler
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacesizep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacesizep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param2,addrp
if (spacesizep.size() != SIZE_QWORD)
{
@@ -5965,7 +5965,7 @@ void drcbe_x64::op_fread(x86code *&dst, const instruction &inst)
assert((1 << spacep.size()) == inst.size());
// set up a call to the read dword/qword handler
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param2,addrp
if (inst.size() == 4)
emit_smart_call_m64(dst, (x86code **)&m_accessors[spacep.space()].read_dword); // call read_dword
@@ -6009,7 +6009,7 @@ void drcbe_x64::op_fwrite(x86code *&dst, const instruction &inst)
assert((1 << spacep.size()) == inst.size());
// general case
- emit_mov_r64_imm(dst, REG_PARAM1, (FPTR)(m_space[spacep.space()])); // mov param1,space
+ emit_mov_r64_imm(dst, REG_PARAM1, (uintptr_t)(m_space[spacep.space()])); // mov param1,space
emit_mov_r32_p32(dst, REG_PARAM2, addrp); // mov param21,addrp
// 32-bit form
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index 3fab0fea741..4bd869b410d 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -452,7 +452,7 @@ inline void drcbe_x86::set_last_lower_reg(x86code *&dst, const be_parameter &par
if (param.is_memory())
{
m_last_lower_reg = reglo;
- m_last_lower_addr = (UINT32 *)((FPTR)param.memory());
+ m_last_lower_addr = (UINT32 *)((uintptr_t)param.memory());
m_last_lower_pc = dst;
}
}
@@ -466,7 +466,7 @@ inline void drcbe_x86::set_last_lower_reg(x86code *&dst, const be_parameter &par
inline void drcbe_x86::set_last_upper_reg(x86code *&dst, const be_parameter &param, UINT8 reghi)
{
m_last_upper_reg = reghi;
- m_last_upper_addr = (param.is_int_register()) ? m_reghi[param.ireg()] : (UINT32 *)((FPTR)param.memory(4));
+ m_last_upper_addr = (param.is_int_register()) ? m_reghi[param.ireg()] : (UINT32 *)((uintptr_t)param.memory(4));
m_last_upper_pc = dst;
}
@@ -677,8 +677,8 @@ void drcbe_x86::reset()
emit_mov_m32_r32(dst, MBD(REG_ECX, offsetof(drcuml_machine_state, exp)), REG_EAX); // mov state->exp,eax
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
+ uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
+ uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
if (int_register_map[regnum] != 0)
emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), int_register_map[regnum]);
else
@@ -691,8 +691,8 @@ void drcbe_x86::reset()
}
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
+ uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
+ uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.l));
emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), REG_EAX);
emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.h));
@@ -706,8 +706,8 @@ void drcbe_x86::reset()
m_restore = dst;
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
+ uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
+ uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
if (int_register_map[regnum] != 0)
emit_mov_r32_m32(dst, int_register_map[regnum], MBD(REG_ECX, regoffsl));
else
@@ -720,8 +720,8 @@ void drcbe_x86::reset()
}
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
+ uintptr_t regoffsl = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
+ uintptr_t regoffsh = (uintptr_t)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsl));
emit_mov_m32_r32(dst, MABS(&m_state.f[regnum].s.l), REG_EAX);
emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsh));
@@ -780,7 +780,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
block.abort();
// compute the base by aligning the cache top to a cache line (assumed to be 64 bytes)
- x86code *base = (x86code *)(((FPTR)*cachetop + 63) & ~63);
+ x86code *base = (x86code *)(((uintptr_t)*cachetop + 63) & ~63);
x86code *dst = base;
// generate code
@@ -891,7 +891,7 @@ void drcbe_x86::emit_mov_r32_p32_keepflags(x86code *&dst, UINT8 reg, const be_pa
emit_mov_r32_imm(dst, reg, param.immediate()); // mov reg,param
else if (param.is_memory())
{
- if (!can_skip_lower_load(dst, (UINT32 *)((FPTR)param.memory()), reg))
+ if (!can_skip_lower_load(dst, (UINT32 *)((uintptr_t)param.memory()), reg))
emit_mov_r32_m32(dst, reg, MABS(param.memory())); // mov reg,[param]
}
else if (param.is_int_register())
@@ -913,7 +913,7 @@ void drcbe_x86::emit_mov_m32_p32(x86code *&dst, x86_memref memref, const be_para
emit_mov_m32_imm(dst, memref, param.immediate()); // mov [mem],param
else if (param.is_memory())
{
- if (!can_skip_lower_load(dst, (UINT32 *)((FPTR)param.memory()), REG_EAX))
+ if (!can_skip_lower_load(dst, (UINT32 *)((uintptr_t)param.memory()), REG_EAX))
emit_mov_r32_m32(dst, REG_EAX, MABS(param.memory())); // mov eax,[param]
emit_mov_m32_r32(dst, memref, REG_EAX); // mov [mem],eax
}
@@ -1641,8 +1641,8 @@ void drcbe_x86::emit_mov_r64_p64(x86code *&dst, UINT8 reglo, UINT8 reghi, const
}
else if (param.is_memory())
{
- int skip_lower = can_skip_lower_load(dst, (UINT32 *)((FPTR)param.memory()), reglo);
- int skip_upper = can_skip_upper_load(dst, (UINT32 *)((FPTR)param.memory(4)), reghi);
+ int skip_lower = can_skip_lower_load(dst, (UINT32 *)((uintptr_t)param.memory()), reglo);
+ int skip_upper = can_skip_upper_load(dst, (UINT32 *)((uintptr_t)param.memory(4)), reghi);
if (reglo != REG_NONE && !skip_lower)
emit_mov_r32_m32(dst, reglo, MABS(param.memory())); // mov reglo,[param]
if (reghi != REG_NONE && !skip_upper)
@@ -1676,8 +1676,8 @@ void drcbe_x86::emit_mov_r64_p64_keepflags(x86code *&dst, UINT8 reglo, UINT8 reg
}
else if (param.is_memory())
{
- int skip_lower = can_skip_lower_load(dst, (UINT32 *)((FPTR)param.memory()), reglo);
- int skip_upper = can_skip_upper_load(dst, (UINT32 *)((FPTR)param.memory(4)), reghi);
+ int skip_lower = can_skip_lower_load(dst, (UINT32 *)((uintptr_t)param.memory()), reglo);
+ int skip_upper = can_skip_upper_load(dst, (UINT32 *)((uintptr_t)param.memory(4)), reghi);
if (reglo != REG_NONE && !skip_lower)
emit_mov_r32_m32(dst, reglo, MABS(param.memory())); // mov reglo,[param]
if (reghi != REG_NONE && !skip_upper)
@@ -1708,7 +1708,7 @@ void drcbe_x86::emit_mov_m64_p64(x86code *&dst, x86_memref memref, const be_para
}
else if (param.is_memory())
{
- int skip_lower = can_skip_lower_load(dst, (UINT32 *)((FPTR)param.memory()), REG_EAX);
+ int skip_lower = can_skip_lower_load(dst, (UINT32 *)((uintptr_t)param.memory()), REG_EAX);
if (!skip_lower)
emit_mov_r32_m32(dst, REG_EAX, MABS(param.memory())); // mov eax,[param]
emit_mov_m32_r32(dst, memref + 0, REG_EAX); // mov [mem],eax
@@ -2850,7 +2850,7 @@ void drcbe_x86::fixup_exception(drccodeptr *codeptr, void *param1, void *param2)
emit_mov_m32_p32(dst, MABS(&m_state.exp), exp); // mov [exp],exp
// push the original return address on the stack
- emit_push_imm(dst, (FPTR)src); // push <return>
+ emit_push_imm(dst, (uintptr_t)src); // push <return>
if (*targetptr != nullptr)
emit_jmp(dst, *targetptr); // jmp *targetptr
else
@@ -3012,7 +3012,7 @@ void drcbe_x86::op_debug(x86code *&dst, const instruction &inst)
// push the parameter
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), pcp); // mov [esp+4],pcp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_device); // mov [esp],device
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_device); // mov [esp],device
emit_call(dst, (x86code *)debugger_instruction_hook); // call debug_cpu_instruction_hook
track_resolve_link(dst, skip); // skip:
@@ -3274,8 +3274,8 @@ void drcbe_x86::op_callc(x86code *&dst, const instruction &inst)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
// perform the call
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)paramp.memory()); // mov [esp],paramp
- emit_call(dst, (x86code *)(FPTR)funcp.cfunc()); // call funcp
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)paramp.memory()); // mov [esp],paramp
+ emit_call(dst, (x86code *)(uintptr_t)funcp.cfunc()); // call funcp
// resolve the conditional link
if (inst.condition() != uml::COND_ALWAYS)
@@ -3303,7 +3303,7 @@ void drcbe_x86::op_recover(x86code *&dst, const instruction &inst)
emit_sub_r32_imm(dst, REG_EAX, 1); // sub eax,1
emit_mov_m32_imm(dst, MBD(REG_ESP, 8), inst.param(1).mapvar()); // mov [esp+8],param1
emit_mov_m32_r32(dst, MBD(REG_ESP, 4), REG_EAX); // mov [esp+4],eax
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_map); // mov [esp],m_map
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_map); // mov [esp],m_map
emit_call(dst, (x86code *)&drc_map_variables::static_get_value); // call drcmap_get_value
emit_mov_p32_r32(dst, dstp, REG_EAX); // mov dstp,eax
}
@@ -3548,7 +3548,7 @@ void drcbe_x86::op_save(x86code *&dst, const instruction &inst)
be_parameter dstp(*this, inst.param(0), PTYPE_M);
// copy live state to the destination
- emit_mov_r32_imm(dst, REG_ECX, (FPTR)dstp.memory()); // mov ecx,dstp
+ emit_mov_r32_imm(dst, REG_ECX, (uintptr_t)dstp.memory()); // mov ecx,dstp
emit_call(dst, m_save); // call save
}
@@ -3567,7 +3567,7 @@ void drcbe_x86::op_restore(x86code *&dst, const instruction &inst)
be_parameter srcp(*this, inst.param(0), PTYPE_M);
// copy live state from the destination
- emit_mov_r32_imm(dst, REG_ECX, (FPTR)srcp.memory()); // mov ecx,dstp
+ emit_mov_r32_imm(dst, REG_ECX, (uintptr_t)srcp.memory()); // mov ecx,dstp
emit_call(dst, m_restore); // call restore
}
@@ -3870,7 +3870,7 @@ void drcbe_x86::op_read(x86code *&dst, const instruction &inst)
// set up a call to the read byte handler
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacesizep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space
if (spacesizep.size() == SIZE_BYTE)
{
emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_byte);
@@ -3950,7 +3950,7 @@ void drcbe_x86::op_readm(x86code *&dst, const instruction &inst)
else
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), maskp); // mov [esp+8],maskp
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacesizep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space
if (spacesizep.size() == SIZE_WORD)
{
emit_call(dst, (x86code *)m_accessors[spacesizep.space()].read_word_masked);
@@ -4020,7 +4020,7 @@ void drcbe_x86::op_write(x86code *&dst, const instruction &inst)
else
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacesizep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space
if (spacesizep.size() == SIZE_BYTE)
emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_byte);
// call write_byte
@@ -4066,7 +4066,7 @@ void drcbe_x86::op_writem(x86code *&dst, const instruction &inst)
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp
}
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacesizep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacesizep.space()]); // mov [esp],space
if (spacesizep.size() == SIZE_WORD)
emit_call(dst, (x86code *)m_accessors[spacesizep.space()].write_word_masked);
// call write_word_masked
@@ -4848,10 +4848,10 @@ void drcbe_x86::op_mulu(x86code *&dst, const instruction &inst)
emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p
if (!compute_hi)
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reslo); // mov [esp+4],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo
else
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reshi); // mov [esp+4],&reshi
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_reslo); // mov [esp],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // mov [esp+4],&reshi
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo
emit_call(dst, (x86code *)dmulu); // call dmulu
if (inst.flags() != 0)
emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4]
@@ -4978,10 +4978,10 @@ void drcbe_x86::op_muls(x86code *&dst, const instruction &inst)
emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p
if (!compute_hi)
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reslo); // mov [esp+4],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo
else
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reshi); // push [esp+4],&reshi
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_reslo); // mov [esp],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo
emit_call(dst, (x86code *)dmuls); // call dmuls
if (inst.flags() != 0)
emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4]
@@ -5048,10 +5048,10 @@ void drcbe_x86::op_divu(x86code *&dst, const instruction &inst)
emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p
if (!compute_rem)
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reslo); // mov [esp+4],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo
else
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reshi); // push [esp+4],&reshi
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_reslo); // mov [esp],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo
emit_call(dst, (x86code *)ddivu); // call ddivu
if (inst.flags() != 0)
emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4]
@@ -5118,10 +5118,10 @@ void drcbe_x86::op_divs(x86code *&dst, const instruction &inst)
emit_mov_m64_p64(dst, MBD(REG_ESP, 16), src2p); // mov [esp+16],src2p
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), src1p); // mov [esp+8],src1p
if (!compute_rem)
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reslo); // mov [esp+4],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reslo); // mov [esp+4],&reslo
else
- emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (FPTR)&m_reshi); // push [esp+4],&reshi
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)&m_reslo); // mov [esp],&reslo
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 4), (uintptr_t)&m_reshi); // push [esp+4],&reshi
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)&m_reslo); // mov [esp],&reslo
emit_call(dst, (x86code *)ddivs); // call ddivs
if (inst.flags() != 0)
emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4]
@@ -6011,7 +6011,7 @@ void drcbe_x86::op_fread(x86code *&dst, const instruction &inst)
// set up a call to the read dword/qword handler
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacep.space()]); // mov [esp],space
if (inst.size() == 4)
emit_call(dst, (x86code *)m_accessors[spacep.space()].read_dword); // call read_dword
else if (inst.size() == 8)
@@ -6049,7 +6049,7 @@ void drcbe_x86::op_fwrite(x86code *&dst, const instruction &inst)
else if (inst.size() == 8)
emit_mov_m64_p64(dst, MBD(REG_ESP, 8), srcp); // mov [esp+8],srcp
emit_mov_m32_p32(dst, MBD(REG_ESP, 4), addrp); // mov [esp+4],addrp
- emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (FPTR)m_space[spacep.space()]); // mov [esp],space
+ emit_mov_m32_imm(dst, MBD(REG_ESP, 0), (uintptr_t)m_space[spacep.space()]); // mov [esp],space
if (inst.size() == 4)
emit_call(dst, (x86code *)m_accessors[spacep.space()].write_dword); // call write_dword
else if (inst.size() == 8)
diff --git a/src/devices/cpu/drccache.cpp b/src/devices/cpu/drccache.cpp
index ea4cbbbd558..113ce0e5392 100644
--- a/src/devices/cpu/drccache.cpp
+++ b/src/devices/cpu/drccache.cpp
@@ -18,8 +18,8 @@
//**************************************************************************
// ensure that all memory allocated is aligned to an 8-byte boundary
-#define ALIGN_PTR_UP(p) ((void *)(((FPTR)(p) + (CACHE_ALIGNMENT - 1)) & ~(CACHE_ALIGNMENT - 1)))
-#define ALIGN_PTR_DOWN(p) ((void *)((FPTR)(p) & ~(CACHE_ALIGNMENT - 1)))
+#define ALIGN_PTR_UP(p) ((void *)(((uintptr_t)(p) + (CACHE_ALIGNMENT - 1)) & ~(CACHE_ALIGNMENT - 1)))
+#define ALIGN_PTR_DOWN(p) ((void *)((uintptr_t)(p) & ~(CACHE_ALIGNMENT - 1)))
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index 1296aed7f9c..4b1b4d55a9b 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -976,11 +976,11 @@ static int bevalidate_populate_state(drcuml_block *block, drcuml_machine_state *
// memory parameters: set the memory value in the parameter space and set the parameter value to point to it
case parameter::PTYPE_MEMORY:
- curparam->value = (FPTR)&parammem[pnum];
+ curparam->value = (uintptr_t)&parammem[pnum];
if (psize == 4)
- *(UINT32 *)(FPTR)curparam->value = test->param[pnum];
+ *(UINT32 *)(uintptr_t)curparam->value = test->param[pnum];
else
- *(UINT64 *)(FPTR)curparam->value = test->param[pnum];
+ *(UINT64 *)(uintptr_t)curparam->value = test->param[pnum];
break;
// map variables: issue a MAPVAR instruction to set the value and set the parameter value to the mapvar index
@@ -1060,9 +1060,9 @@ static int bevalidate_verify_state(drcuml_state *drcuml, const drcuml_machine_st
// memory registers fetch from the memory address
case parameter::PTYPE_MEMORY:
if (psize == 4)
- result = *(UINT32 *)(FPTR)params[pnum].value;
+ result = *(UINT32 *)(uintptr_t)params[pnum].value;
else
- result = *(UINT64 *)(FPTR)params[pnum].value;
+ result = *(UINT64 *)(uintptr_t)params[pnum].value;
break;
default:
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index 7e5a575a163..4a688ecc0d9 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -6,17 +6,17 @@
// were 0x7026 & 0x7027.
// I searched for a while for any kind of documentation about them but found nothing at all.
// Some time later I found the mnemonics in the binary dump of assembly development option ROM:
-// CIM & SIM, respectively. From the mnemonic I deduced their function: Clear & Set Interrupt Mask.
+// CIM & SIM, respectively. From the mnemonic I deduced their function: Clear & Set Interrupt Mode.
// After a few experiments, crashes, etc. here's my opinion on their purpose.
// When the CPU receives an interrupt, its AEC registers can be in any state so it could
// be impossible to properly save state, fetch the interrupt vector and start executing the ISR.
-// The solution is having an hidden "interrupt mask" flag that gets set when an interrupt (either
+// The solution is having an hidden "interrupt mode" flag that gets set when an interrupt (either
// low or high priority) is acknowledged and is cleared when the "ret 0,p" instruction that ends
-// the ISR is executed. The effects of having the interrupt mask set are:
+// the ISR is executed. The effects of having the interrupt mode set are:
// * No interrupts are recognized
// * A few essential AEC registers are overridden to establish a "safe" environment to save state
// and execute ISR (see hp_5061_3001_cpu_device::add_mae).
-// Inside the ISR, CIM & SIM instructions can be used to change the interrupt mask and switch
+// Inside the ISR, CIM & SIM instructions can be used to change the interrupt mode and switch
// between normal & overridden settings of AEC.
// As an example of CIM&SIM usage, we can have a look at the keyboard ISR in 9845B PPU processor:
// * A key is pressed and IRQ 0 is set
@@ -88,7 +88,7 @@ enum {
#define HPHYBRID_STS_BIT 13 // Status flag
#define HPHYBRID_FLG_BIT 14 // "Flag" flag
#define HPHYBRID_DC_BIT 15 // Decimal carry
-#define HPHYBRID_IM_BIT 16 // Interrupt mask
+#define HPHYBRID_IM_BIT 16 // Interrupt mode
#define HPHYBRID_IV_MASK 0xfff0 // IV mask
@@ -263,14 +263,22 @@ void hp_hybrid_cpu_device::execute_set_input(int inputnum, int state)
*/
UINT16 hp_hybrid_cpu_device::execute_one(UINT16 opcode)
{
- if ((opcode & 0x7fe0) == 0x7000) {
- // EXE
- m_icount -= 8;
- return RM(opcode & 0x1f);
- } else {
- m_reg_P = execute_one_sub(opcode);
- return fetch();
- }
+ if ((opcode & 0x7fe0) == 0x7000) {
+ // EXE
+ m_icount -= 8;
+ // Indirect addressing in EXE instruction seems to use AEC case A instead of case C
+ // (because it's an opcode fetch)
+ UINT16 reg = RM(opcode & 0x1f);
+ if (BIT(opcode , 15)) {
+ m_icount -= 6;
+ return RM(add_mae(AEC_CASE_A , reg));
+ } else {
+ return reg;
+ }
+ } else {
+ m_reg_P = execute_one_sub(opcode);
+ return fetch();
+ }
}
/**
@@ -1492,21 +1500,21 @@ UINT16 hp_5061_3001_cpu_device::execute_no_bpc_ioc(UINT16 opcode)
case 0x7026:
// CIM
// Undocumented instruction, see beginning of this file
- // Probably "Clear Interrupt Mask"
+ // Probably "Clear Interrupt Mode"
// No idea at all about exec. time: make it 9 cycles
m_icount -= 9;
BIT_CLR(m_flags, HPHYBRID_IM_BIT);
- logerror("hp-5061-3001: CIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
+ //logerror("hp-5061-3001: CIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
break;
case 0x7027:
// SIM
// Undocumented instruction, see beginning of this file
- // Probably "Set Interrupt Mask"
+ // Probably "Set Interrupt Mode"
// No idea at all about exec. time: make it 9 cycles
m_icount -= 9;
BIT_SET(m_flags, HPHYBRID_IM_BIT);
- logerror("hp-5061-3001: SIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
+ //logerror("hp-5061-3001: SIM, P = %06x flags = %05x\n" , m_genpc , m_flags);
break;
default:
@@ -1680,7 +1688,7 @@ void hp_5061_3001_cpu_device::write_non_common_reg(UINT16 addr , UINT16 v)
void hp_5061_3001_cpu_device::enter_isr(void)
{
- // Set interrupt mask when entering an ISR
+ // Set interrupt mode when entering an ISR
BIT_SET(m_flags, HPHYBRID_IM_BIT);
}
diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp
index 428b1214052..00f3356f05d 100644
--- a/src/devices/cpu/i86/i186.cpp
+++ b/src/devices/cpu/i86/i186.cpp
@@ -556,7 +556,7 @@ void i80186_cpu_device::device_start()
state_add( I8086_VECTOR, "V", m_int_vector).callimport().callexport().formatstr("%02X");
state_add(STATE_GENPC, "GENPC", m_pc).formatstr("%05X");
- state_add(STATE_GENPC, "CURPC", m_pc).formatstr("%05X");
+ state_add(STATE_GENPCBASE, "CURPC", m_pc).formatstr("%05X");
// register for savestates
save_item(NAME(m_timer[0].control));
diff --git a/src/devices/cpu/m68000/m68kmake.cpp b/src/devices/cpu/m68000/m68kmake.cpp
index 8f29784a018..06e5cdecb1d 100644
--- a/src/devices/cpu/m68000/m68kmake.cpp
+++ b/src/devices/cpu/m68000/m68kmake.cpp
@@ -67,14 +67,8 @@ static const char g_version[] = "4.90";
#if defined(__GNUC__) && (__GNUC__ >= 3)
#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y)))
-#define ATTR_NORETURN __attribute__((noreturn))
#else
#define ATTR_PRINTF(x,y)
-#if defined(_MSC_VER)
-#define ATTR_NORETURN __declspec(noreturn)
-#else
-#define ATTR_NORETURN
-#endif
#endif
#define M68K_MAX_PATH 1024
@@ -223,8 +217,8 @@ struct replace_struct
/* Function Prototypes */
-static void ATTR_NORETURN error_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
-static void ATTR_NORETURN perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
+[[noreturn]] static void error_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
+[[noreturn]] static void perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
static int check_strsncpy(char* dst, char* src, int maxlength);
static int check_atoi(char* str, int *result);
static int skip_spaces(char* str);
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index 148015c3af4..693480cd940 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -139,10 +139,9 @@ void m6809_base_device::device_start()
m_lic_func.resolve_safe();
// register our state for the debugger
- state_add(STATE_GENPC, "GENPC", m_pc.w).noshow();
- state_add(STATE_GENPCBASE, "CURPC", m_ppc.w).noshow();
- state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow();
- state_add(M6809_PC, "PC", m_pc.w).mask(0xffff);
+ state_add(STATE_GENPCBASE, "CURPC", m_ppc.w).callimport().noshow();
+ state_add(STATE_GENFLAGS, "CURFLAGS", m_cc).formatstr("%8s").noshow();
+ state_add(M6809_PC, "PC", m_pc.w).callimport().mask(0xffff);
state_add(M6809_S, "S", m_s.w).mask(0xffff);
state_add(M6809_CC, "CC", m_cc).mask(0xff);
state_add(M6809_DP, "DP", m_dp).mask(0xff);
@@ -305,6 +304,25 @@ const address_space_config *m6809_base_device::memory_space_config(address_space
//-------------------------------------------------
+// state_import - import state into the device,
+// after it has been set
+//-------------------------------------------------
+
+void m6809_base_device::state_import(const device_state_entry &entry)
+{
+ switch (entry.index())
+ {
+ case M6809_PC:
+ m_ppc.w = m_pc.w;
+ break;
+
+ case STATE_GENPCBASE:
+ m_pc.w = m_ppc.w;
+ break;
+ }
+}
+
+//-------------------------------------------------
// state_string_export - export state as a string
// for the debugger
//-------------------------------------------------
diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h
index 8a2f5f9e400..d2124afc277 100644
--- a/src/devices/cpu/m6809/m6809.h
+++ b/src/devices/cpu/m6809/m6809.h
@@ -80,6 +80,7 @@ protected:
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
// device_state_interface overrides
+ virtual void state_import(const device_state_entry &entry) override;
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
virtual bool is_6809() { return true; };
@@ -324,7 +325,7 @@ public:
enum
{
- M6809_PC=1, M6809_S, M6809_CC ,M6809_A, M6809_B, M6809_D, M6809_U, M6809_X, M6809_Y,
+ M6809_PC = STATE_GENPC, M6809_S = 0, M6809_CC ,M6809_A, M6809_B, M6809_D, M6809_U, M6809_X, M6809_Y,
M6809_DP
};
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h
index 047a1f559e2..e6d4f3e21fe 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.h
+++ b/src/devices/cpu/mc68hc11/mc68hc11.h
@@ -112,7 +112,7 @@ private:
int m_ram_position;
int m_reg_position;
- dynamic_buffer m_internal_ram;
+ std::vector<UINT8> m_internal_ram;
int m_has_extended_io; // extended I/O enable flag
int m_internal_ram_size;
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 306760f33d3..d146b70863d 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -624,9 +624,9 @@ void mips3_device::device_start()
state_add( MIPS3_WIRED, "Wired", m_core->cpr[0][COP0_Wired]).formatstr("%08X");
state_add( MIPS3_BADVADDR, "BadVAddr", m_core->cpr[0][COP0_BadVAddr]).formatstr("%08X");
- state_add( STATE_GENPC, "GENPC", m_core->pc).noshow();
- state_add( STATE_GENSP, "GENSP", m_core->r[31]).noshow();
- state_add( STATE_GENFLAGS, "GENFLAGS", m_debugger_temp).formatstr("%1s").noshow();
+ state_add( STATE_GENPCBASE, "CURPC", m_core->pc).noshow();
+ state_add( STATE_GENSP, "CURSP", m_core->r[31]).noshow();
+ state_add( STATE_GENFLAGS, "CURFLAGS", m_debugger_temp).formatstr("%1s").noshow();
m_icountptr = &m_core->icount;
}
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index 998c5edf585..fff9044f472 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -47,8 +47,8 @@ extern const device_type RM7000LE;
enum
{
- MIPS3_PC = 1,
- MIPS3_R0,
+ MIPS3_PC = STATE_GENPC,
+ MIPS3_R0 = 1,
MIPS3_R1,
MIPS3_R2,
MIPS3_R3,
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 3a45d56e1c6..e3156b53f10 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -691,7 +691,7 @@ void mips3_device::static_generate_tlb_mismatch()
if (PRINTF_MMU)
{
static const char text[] = "TLB mismatch @ %08X (ent=%08X)\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), I0); // mov [arg0],i0
UML_MOV(block, mem(&m_core->arg1), I1); // mov [arg1],i1
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
@@ -1236,7 +1236,7 @@ void mips3_device::generate_sequence_instruction(drcuml_block *block, compiler_s
if (PRINTF_MMU)
{
static const char text[] = "Compiler page fault @ %08X";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
@@ -1254,7 +1254,7 @@ void mips3_device::generate_sequence_instruction(drcuml_block *block, compiler_s
if (PRINTF_MMU)
{
static const char text[] = "Checking TLB at @ %08X\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
@@ -1269,7 +1269,7 @@ void mips3_device::generate_sequence_instruction(drcuml_block *block, compiler_s
if (PRINTF_MMU)
{
static const char text[] = "No valid TLB @ %08X\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp
index d65f4dc7cfe..747bea2ffb9 100644
--- a/src/devices/cpu/pdp8/pdp8.cpp
+++ b/src/devices/cpu/pdp8/pdp8.cpp
@@ -73,7 +73,7 @@ void pdp8_device::device_start()
// register our state for the debugger
state_add(STATE_GENPC, "GENPC", m_pc).noshow();
- state_add(STATE_CURPC, "CURPC", m_pc).noshow();
+ state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_l).callimport().callexport().formatstr("%1s").noshow();
state_add(PDP8_PC, "PC", m_pc).mask(0xfff);
state_add(PDP8_AC, "AC", m_ac).mask(0xfff);
diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp
index bda8edfa60f..47a8742a0af 100644
--- a/src/devices/cpu/powerpc/ppcdrc.cpp
+++ b/src/devices/cpu/powerpc/ppcdrc.cpp
@@ -1694,7 +1694,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta
if (desc->pc == PROBE_ADDRESS)
{
UML_MOV(block, mem(&m_core->pc), desc->pc); // mov [pc],desc->pc
- UML_CALLC(block, cfunc_printf_probe, (void *)(FPTR)desc->pc); // callc cfunc_printf_probe,desc->pc
+ UML_CALLC(block, cfunc_printf_probe, (void *)(uintptr_t)desc->pc); // callc cfunc_printf_probe,desc->pc
}
/* if we are debugging, call the debugger */
@@ -1721,7 +1721,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta
if (PRINTF_MMU)
{
const char *text = "Compiler page fault @ %08X\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
@@ -1739,7 +1739,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta
if (PRINTF_MMU)
{
const char *text = "Checking TLB at @ %08X\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
@@ -1754,7 +1754,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta
if (PRINTF_MMU)
{
const char *text = "No valid TLB @ %08X\n";
- UML_MOV(block, mem(&m_core->format), (FPTR)text); // mov [format],text
+ UML_MOV(block, mem(&m_core->format), (uintptr_t)text); // mov [format],text
UML_MOV(block, mem(&m_core->arg0), desc->pc); // mov [arg0],desc->pc
UML_CALLC(block, cfunc_printf_debug, this); // callc printf_debug
}
diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp
index ef6eed4f614..00e28dfafc7 100644
--- a/src/devices/cpu/sharc/sharc.cpp
+++ b/src/devices/cpu/sharc/sharc.cpp
@@ -760,7 +760,7 @@ void adsp21062_device::device_start()
state_add( SHARC_B15, "B15", m_core->dag2.b[7]).formatstr("%08X");
state_add( STATE_GENPC, "GENPC", m_core->pc).noshow();
- state_add( STATE_GENPC, "CURPC", m_core->pc).noshow();
+ state_add( STATE_GENPCBASE, "CURPC", m_core->pc).noshow();
m_icountptr = &m_core->icount;
}
diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp
index 2ca54703497..0aff923fafd 100644
--- a/src/devices/cpu/uml.cpp
+++ b/src/devices/cpu/uml.cpp
@@ -985,7 +985,7 @@ std::string uml::instruction::disasm(drcuml_state *drcuml) const
// cache memory
else if (drcuml != nullptr && drcuml->cache().contains_pointer(param.memory()))
- util::stream_format(buffer, "[+$%X]", (UINT32)(FPTR)((drccodeptr)param.memory() - drcuml->cache().near()));
+ util::stream_format(buffer, "[+$%X]", (UINT32)(uintptr_t)((drccodeptr)param.memory() - drcuml->cache().near()));
// general memory
else
@@ -995,7 +995,7 @@ std::string uml::instruction::disasm(drcuml_state *drcuml) const
// string pointer
case parameter::PTYPE_STRING:
- util::stream_format(buffer, "%s", (const char *)(FPTR)param.string());
+ util::stream_format(buffer, "%s", (const char *)(uintptr_t)param.string());
break;
// handle pointer
diff --git a/src/devices/cpu/x86emit.h b/src/devices/cpu/x86emit.h
index 4767036c728..f2a53332400 100644
--- a/src/devices/cpu/x86emit.h
+++ b/src/devices/cpu/x86emit.h
@@ -1174,9 +1174,9 @@ inline x86_memref MBD(UINT8 base, INT32 disp) { return x86_memref(base, REG_NONE
inline x86_memref MBISD(UINT8 base, UINT8 ind, UINT8 scale, INT32 disp) { return x86_memref(base, ind, scale, disp); }
#if (X86EMIT_SIZE == 32)
-inline x86_memref MABS(const void *mem) { return x86_memref(REG_NONE, REG_NONE, 1, reinterpret_cast<FPTR>(const_cast<void *>(mem))); }
-inline x86_memref MABSI(const void *mem, UINT8 index) { return x86_memref(index, REG_NONE, 1, reinterpret_cast<FPTR>(const_cast<void *>(mem))); }
-inline x86_memref MABSI(const void *mem, UINT8 index, UINT8 scale) { return x86_memref(REG_NONE, index, scale, reinterpret_cast<FPTR>(const_cast<void *>(mem))); }
+inline x86_memref MABS(const void *mem) { return x86_memref(REG_NONE, REG_NONE, 1, reinterpret_cast<uintptr_t>(const_cast<void *>(mem))); }
+inline x86_memref MABSI(const void *mem, UINT8 index) { return x86_memref(index, REG_NONE, 1, reinterpret_cast<uintptr_t>(const_cast<void *>(mem))); }
+inline x86_memref MABSI(const void *mem, UINT8 index, UINT8 scale) { return x86_memref(REG_NONE, index, scale, reinterpret_cast<uintptr_t>(const_cast<void *>(mem))); }
#endif
diff --git a/src/devices/cpu/x86log.cpp b/src/devices/cpu/x86log.cpp
index 4ed80f06131..09d53c80bba 100644
--- a/src/devices/cpu/x86log.cpp
+++ b/src/devices/cpu/x86log.cpp
@@ -146,7 +146,7 @@ void x86log_disasm_code_range(x86log_context *log, const char *label, x86code *s
/* otherwise, do a disassembly of the current instruction */
else
{
- bytes = i386_dasm_one_ex(buffer, (FPTR)cur, cur, sizeof(void *) * 8) & DASMFLAG_LENGTHMASK;
+ bytes = i386_dasm_one_ex(buffer, (uintptr_t)cur, cur, sizeof(void *) * 8) & DASMFLAG_LENGTHMASK;
}
/* if we have a matching comment, output it */
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp
index 509a5952890..72b3718c821 100644
--- a/src/devices/machine/8042kbdc.cpp
+++ b/src/devices/machine/8042kbdc.cpp
@@ -267,28 +267,18 @@ WRITE_LINE_MEMBER( kbdc8042_device::keyboard_w )
at_8042_check_keyboard();
}
-TIMER_CALLBACK_MEMBER( kbdc8042_device::kbdc8042_clr_int )
-{
- /* Lets 8952's timers do their job before clear the interrupt line, */
- /* else Keyboard interrupt never happens. */
- m_input_buffer_full_cb(0);
-}
-
void kbdc8042_device::at_8042_receive(UINT8 data)
{
if (LOG_KEYBOARD)
logerror("at_8042_receive Received 0x%02x\n", data);
m_data = data;
- m_keyboard.received = 1;
-
- if (!m_input_buffer_full_cb.isnull())
+ if(!(m_speaker & 0x80))
{
- m_input_buffer_full_cb(1);
- /* Lets 8952's timers do their job before clear the interrupt line, */
- /* else Keyboard interrupt never happens. */
- /* Why was this done? It dies when an extended scan code is received */
- //machine().scheduler().timer_set(attotime::from_usec(2), timer_expired_delegate(FUNC(kbdc8042_device::kbdc8042_clr_int),this));
+ m_keyboard.received = 1;
+
+ if (!m_input_buffer_full_cb.isnull())
+ m_input_buffer_full_cb(1);
}
}
@@ -312,6 +302,7 @@ void kbdc8042_device::at_8042_clear_keyboard_received()
logerror("kbdc8042_8_r(): Clearing m_keyboard.received\n");
}
+ m_input_buffer_full_cb(0);
m_keyboard.received = 0;
m_mouse.received = 0;
}
@@ -348,29 +339,14 @@ READ8_MEMBER(kbdc8042_device::data_r)
switch (offset) {
case 0:
data = m_data;
- m_input_buffer_full_cb(0);
- if ((m_status_read_mode != 3) || (data != 0xfa))
- {
- if (m_keybtype != KBDC8042_AT386 || (data != 0x55))
- {
- /* at386 self test doesn't like this */
- at_8042_clear_keyboard_received();
- }
- at_8042_check_keyboard();
- }
- else
- {
- m_status_read_mode = 4;
- }
+ at_8042_clear_keyboard_received();
+ at_8042_check_keyboard();
break;
case 1:
data = m_speaker;
data &= ~0xc0; /* AT BIOS don't likes this being set */
- /* needed for AMI BIOS, maybe only some keyboard controller revisions! */
- at_8042_clear_keyboard_received();
-
/* polled for changes in ibmat bios */
if (--m_poll_delay < 0)
{
@@ -420,10 +396,6 @@ READ8_MEMBER(kbdc8042_device::data_r)
case 2:
data |= m_inport<<4;
break;
- case 4:
- at_8042_receive(0xaa);
- m_status_read_mode = 0;
- break;
}
break;
}
@@ -443,19 +415,6 @@ WRITE8_MEMBER(kbdc8042_device::data_w)
m_status_read_mode = 0;
switch (m_operation_write_state) {
case 0:
- if ((data == 0xf4) || (data == 0xff)) /* keyboard enable or keyboard reset */
- {
- at_8042_receive(0xfa); /* ACK, delivered a bit differently */
-
- if (data == 0xff)
- {
- m_status_read_mode = 3; /* keyboard buffer to be written again after next read */
- }
-
- break;
- }
-
- /* normal case */
m_data = data;
m_sending=1;
m_keyboard_dev->write(space, 0, data);
@@ -477,9 +436,7 @@ WRITE8_MEMBER(kbdc8042_device::data_w)
case 2:
/* preceded by writing 0xD2 to port 60h */
- m_data = data;
- m_sending=1;
- m_keyboard_dev->write(space, 0, data);
+ at_8042_receive(data);
break;
case 3:
@@ -502,13 +459,19 @@ WRITE8_MEMBER(kbdc8042_device::data_w)
case 1:
m_speaker = data;
+ if (data & 0x80)
+ {
+ at_8042_check_keyboard();
+ at_8042_clear_keyboard_received();
+ }
+ m_speaker &= ~0x80;
if (!m_speaker_cb.isnull())
m_speaker_cb((offs_t)0, m_speaker);
break;
case 4:
- m_last_write_to_control=0;
+ m_last_write_to_control=1;
/* switch based on the command */
switch(data) {
@@ -558,6 +521,9 @@ WRITE8_MEMBER(kbdc8042_device::data_w)
case 0xc2: /* read input port 7..4 until write to 0x60 */
m_status_read_mode = 2;
break;
+ case 0xca: /* unknown used by savquest (read controller mode AT=0/PS2=1 ?) */
+ at_8042_receive(1);
+ break;
case 0xd0: /* read output port */
at_8042_receive(m_outport);
break;
diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h
index 169c2f9cb12..75ea3d4f2d8 100644
--- a/src/devices/machine/8042kbdc.h
+++ b/src/devices/machine/8042kbdc.h
@@ -72,7 +72,6 @@ public:
DECLARE_WRITE_LINE_MEMBER( keyboard_w );
void at_8042_set_outport(UINT8 data, int initial);
- TIMER_CALLBACK_MEMBER( kbdc8042_clr_int );
void at_8042_receive(UINT8 data);
void at_8042_check_keyboard();
void at_8042_clear_keyboard_received();
diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp
index bf1c5e09203..88cd30a3388 100644
--- a/src/devices/machine/8530scc.cpp
+++ b/src/devices/machine/8530scc.cpp
@@ -530,7 +530,7 @@ void scc8530_t::write_reg(int offset, UINT8 data)
case 0: /* Channel B (Printer Port) Control */
case 1: /* Channel A (Modem Port) Control */
{
- int chan = ((offset == 2) ? 1 : 0);
+ int chan = ((offset == 0) ? 1 : 0);
if (mode == 0)
{
if((data & 0xf0) == 0) // not a reset command
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index f54e28f8bda..bc6900924eb 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -136,7 +136,7 @@ void at28c16_device::nvram_default()
void at28c16_device::nvram_read( emu_file &file )
{
- dynamic_buffer buffer( AT28C16_TOTAL_BYTES );
+ std::vector<UINT8> buffer( AT28C16_TOTAL_BYTES );
file.read( &buffer[0], AT28C16_TOTAL_BYTES );
@@ -153,7 +153,7 @@ void at28c16_device::nvram_read( emu_file &file )
void at28c16_device::nvram_write( emu_file &file )
{
- dynamic_buffer buffer ( AT28C16_TOTAL_BYTES );
+ std::vector<UINT8> buffer ( AT28C16_TOTAL_BYTES );
for( offs_t offs = 0; offs < AT28C16_TOTAL_BYTES; offs++ )
{
diff --git a/src/devices/machine/at45dbxx.h b/src/devices/machine/at45dbxx.h
index 40688fd786e..449d95f9651 100644
--- a/src/devices/machine/at45dbxx.h
+++ b/src/devices/machine/at45dbxx.h
@@ -76,12 +76,12 @@ protected:
void write_byte(UINT8 data);
// internal state
- dynamic_buffer m_data;
+ std::vector<UINT8> m_data;
UINT32 m_size;
UINT8 m_mode;
UINT8 m_status;
- dynamic_buffer m_buffer1;
- //dynamic_buffer m_buffer2;
+ std::vector<UINT8> m_buffer1;
+ //std::vector<UINT8> m_buffer2;
UINT8 m_si_byte;
UINT8 m_si_bits;
UINT8 m_so_byte;
diff --git a/src/devices/machine/atahle.h b/src/devices/machine/atahle.h
index e26ad86b92c..29bc23bf9cd 100644
--- a/src/devices/machine/atahle.h
+++ b/src/devices/machine/atahle.h
@@ -175,7 +175,7 @@ protected:
attotime MINIMUM_COMMAND_TIME;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
UINT16 m_buffer_offset;
UINT16 m_buffer_size;
UINT8 m_error;
diff --git a/src/devices/machine/dp8390.cpp b/src/devices/machine/dp8390.cpp
index 52e66168322..32d41d73896 100644
--- a/src/devices/machine/dp8390.cpp
+++ b/src/devices/machine/dp8390.cpp
@@ -64,7 +64,7 @@ void dp8390_device::check_dma_complete() {
}
void dp8390_device::do_tx() {
- dynamic_buffer buf;
+ std::vector<UINT8> buf;
int i;
UINT32 high16 = (m_regs.dcr & 4)?m_regs.rsar<<16:0;
if(m_reset) return;
diff --git a/src/devices/machine/ds1302.h b/src/devices/machine/ds1302.h
index 6afbc9ea9a4..273bd6bbc9e 100644
--- a/src/devices/machine/ds1302.h
+++ b/src/devices/machine/ds1302.h
@@ -18,6 +18,7 @@
#ifndef __DS1302_H__
#define __DS1302_H__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp
new file mode 100644
index 00000000000..91a6e2f9c06
--- /dev/null
+++ b/src/devices/machine/ds1386.cpp
@@ -0,0 +1,594 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+/**********************************************************************
+
+ Dallas DS1386/DS1386P RAMified Watchdog Timekeeper
+
+ Note: Largely untested.
+
+**********************************************************************/
+
+#include "ds1386.h"
+#include "machine/timehelp.h"
+
+#define DISABLE_OSC (0x80)
+#define DISABLE_SQW (0x40)
+
+#define COMMAND_TE (0x80)
+#define COMMAND_IPSW (0x40)
+#define COMMAND_IBH_LO (0x20)
+#define COMMAND_PU_LVL (0x10)
+#define COMMAND_WAM (0x08)
+#define COMMAND_TDM (0x04)
+#define COMMAND_WAF (0x02)
+#define COMMAND_TDF (0x01)
+
+#define HOURS_12_24 (0x40)
+#define HOURS_AM_PM (0x20)
+
+const device_type DS1386_8K = &device_creator<ds1386_8k_device>;
+const device_type DS1386_32K = &device_creator<ds1386_32k_device>;
+
+ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, size_t size)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
+ , device_nvram_interface(mconfig, *this)
+ , m_tod_alarm(0)
+ , m_watchdog_alarm(0)
+ , m_square(1)
+ , m_inta_cb(*this)
+ , m_intb_cb(*this)
+ , m_sqw_cb(*this)
+ , m_clock_timer(nullptr)
+ , m_square_timer(nullptr)
+ , m_watchdog_timer(nullptr)
+ , m_inta_timer(nullptr)
+ , m_intb_timer(nullptr)
+ , m_default_data(*this, DEVICE_SELF, size)
+ , m_hundredths(0)
+ , m_seconds(0)
+ , m_minutes(0)
+ , m_minutes_alarm(0)
+ , m_hours(0)
+ , m_hours_alarm(0)
+ , m_days(0)
+ , m_days_alarm(0)
+ , m_date(0)
+ , m_months_enables(0)
+ , m_years(0)
+ , m_ram_size(size)
+{
+}
+
+ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : ds1386_device(mconfig, DS1386_8K, "DS1386-8K", tag, owner, clock, "ds1386_8k", 8192)
+{
+}
+
+ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : ds1386_device(mconfig, DS1386_32K, "DS1386-32K", tag, owner, clock, "ds1386_32k", 32768)
+{
+}
+
+void ds1386_device::safe_inta_cb(int state)
+{
+ if (!m_inta_cb.isnull())
+ m_inta_cb(state);
+}
+
+void ds1386_device::safe_intb_cb(int state)
+{
+ if (!m_intb_cb.isnull())
+ m_intb_cb(state);
+}
+
+void ds1386_device::safe_sqw_cb(int state)
+{
+ if (!m_sqw_cb.isnull())
+ m_sqw_cb(state);
+}
+
+void ds1386_device::device_start()
+{
+ m_inta_cb.resolve();
+ m_intb_cb.resolve();
+ m_sqw_cb.resolve();
+
+ m_tod_alarm = 0;
+ m_watchdog_alarm = 0;
+ m_square = 1;
+
+ safe_inta_cb(0);
+ safe_intb_cb(0);
+ safe_sqw_cb(1);
+
+ // allocate timers
+ m_clock_timer = timer_alloc(CLOCK_TIMER);
+ m_clock_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_square_timer = timer_alloc(SQUAREWAVE_TIMER);
+ m_square_timer->adjust(attotime::never);
+ m_watchdog_timer = timer_alloc(WATCHDOG_TIMER);
+ m_watchdog_timer->adjust(attotime::never);
+ m_inta_timer= timer_alloc(INTA_TIMER);
+ m_inta_timer->adjust(attotime::never);
+ m_intb_timer= timer_alloc(INTB_TIMER);
+ m_intb_timer->adjust(attotime::never);
+
+ set_current_time();
+
+ // state saving
+ save_item(NAME(m_tod_alarm));
+ save_item(NAME(m_watchdog_alarm));
+ save_item(NAME(m_square));
+
+ m_ram = std::make_unique<UINT8[]>(m_ram_size);
+ memset(&m_ram[0], 0, m_ram_size);
+}
+
+void ds1386_device::device_reset()
+{
+ m_tod_alarm = 0;
+ m_watchdog_alarm = 0;
+ m_square = 1;
+
+ safe_inta_cb(0);
+ safe_intb_cb(0);
+ safe_sqw_cb(1);
+
+ m_clock_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_square_timer->adjust(attotime::never);
+ m_watchdog_timer->adjust(attotime::never);
+
+ set_current_time();
+}
+
+
+void ds1386_device::set_current_time()
+{
+ system_time systime;
+ machine().base_datetime(systime);
+
+ m_hundredths = 0;
+ m_seconds = time_helper::make_bcd(systime.local_time.second);
+ m_minutes = time_helper::make_bcd(systime.local_time.minute);
+ m_hours = time_helper::make_bcd(systime.local_time.hour);
+ m_days = time_helper::make_bcd(systime.local_time.weekday + 1);
+ m_date = time_helper::make_bcd(systime.local_time.mday);
+ m_months_enables = time_helper::make_bcd(systime.local_time.month + 1);
+ m_years = time_helper::make_bcd(systime.local_time.year % 100);
+}
+
+void ds1386_device::time_of_day_alarm()
+{
+ m_ram[REGISTER_COMMAND] |= COMMAND_TDF;
+ m_tod_alarm = 1;
+
+ if (m_ram[REGISTER_COMMAND] & COMMAND_IPSW)
+ {
+ safe_inta_cb(m_tod_alarm);
+ if (m_ram[REGISTER_COMMAND] & COMMAND_PU_LVL)
+ {
+ m_inta_timer->adjust(attotime::from_msec(3));
+ }
+ }
+ else
+ {
+ safe_intb_cb(m_tod_alarm);
+ if (m_ram[REGISTER_COMMAND] & COMMAND_PU_LVL)
+ {
+ m_intb_timer->adjust(attotime::from_msec(3));
+ }
+ }
+}
+
+void ds1386_device::watchdog_alarm()
+{
+ m_ram[REGISTER_COMMAND] |= COMMAND_WAF;
+ m_watchdog_alarm = 1;
+
+ if (m_ram[REGISTER_COMMAND] & COMMAND_IPSW)
+ {
+ safe_intb_cb(m_watchdog_alarm);
+ if (m_ram[REGISTER_COMMAND] & COMMAND_PU_LVL)
+ {
+ m_intb_timer->adjust(attotime::from_msec(3));
+ }
+ }
+ else
+ {
+ safe_inta_cb(m_watchdog_alarm);
+ if (m_ram[REGISTER_COMMAND] & COMMAND_PU_LVL)
+ {
+ m_inta_timer->adjust(attotime::from_msec(3));
+ }
+ }
+}
+
+void ds1386_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+{
+ switch (id)
+ {
+ case CLOCK_TIMER:
+ advance_hundredths();
+ break;
+
+ case SQUAREWAVE_TIMER:
+ m_square = ((m_square == 0) ? 1 : 0);
+ safe_sqw_cb(m_square);
+ break;
+
+ case WATCHDOG_TIMER:
+ if ((m_ram[REGISTER_COMMAND] & COMMAND_WAF) == 0)
+ watchdog_alarm();
+ break;
+
+ case INTA_TIMER:
+ if (m_ram[REGISTER_COMMAND] & COMMAND_IPSW)
+ {
+ m_tod_alarm = 0;
+ }
+ else
+ {
+ m_watchdog_alarm = 0;
+ }
+ safe_inta_cb(0);
+ break;
+
+ case INTB_TIMER:
+ if (m_ram[REGISTER_COMMAND] & COMMAND_IPSW)
+ {
+ m_watchdog_alarm = 0;
+ }
+ else
+ {
+ m_tod_alarm = 0;
+ }
+ safe_intb_cb(0);
+ break;
+ }
+}
+
+void ds1386_device::advance_hundredths()
+{
+ if ((m_ram[REGISTER_COMMAND] & COMMAND_TE) != 0)
+ {
+ copy_ram_to_registers();
+ }
+
+ int carry = time_helper::inc_bcd(&m_hundredths, 0xff, 0x00, 0x99);
+ if (carry)
+ {
+ carry = time_helper::inc_bcd(&m_seconds, 0x7f, 0x00, 0x59);
+ }
+ if (carry)
+ {
+ carry = time_helper::inc_bcd(&m_minutes, 0x7f, 0x00, 0x59);
+ }
+ if (carry)
+ {
+ UINT8 value = 0;
+ UINT8 min_value = 0;
+ UINT8 max_value = 0;
+ if (m_hours & HOURS_12_24)
+ {
+ value = m_hours & 0x1f;
+ min_value = 0x01;
+ max_value = 0x12;
+ }
+ else
+ {
+ value = m_hours & 0x3f;
+ min_value = 0x00;
+ max_value = 0x23;
+ }
+ carry = time_helper::inc_bcd(&value, 0x1f, min_value, max_value);
+
+ m_hours &= ~0x1f;
+ if (carry)
+ {
+ if (m_hours & HOURS_12_24)
+ {
+ if (m_hours & HOURS_AM_PM)
+ carry = 1;
+ else
+ carry = 0;
+
+ m_hours = m_hours ^ HOURS_AM_PM;
+ }
+ else
+ {
+ m_hours &= ~0x3f;
+ }
+ }
+ else
+ {
+ if ((m_hours & HOURS_12_24) == 0)
+ m_hours &= ~0x3f;
+ }
+ m_hours |= value;
+ }
+
+ if (carry)
+ {
+ UINT8 maxdays;
+ static const UINT8 daysinmonth[] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
+
+ time_helper::inc_bcd(&m_days, 0x07, 0x01, 0x07);
+
+ UINT8 month = time_helper::from_bcd(m_months_enables);
+ UINT8 year = time_helper::from_bcd(m_years);
+
+ if (month == 2 && (year % 4) == 0)
+ {
+ maxdays = 0x29;
+ }
+ else if (month >= 1 && month <= 12)
+ {
+ maxdays = daysinmonth[month - 1];
+ }
+ else
+ {
+ maxdays = 0x31;
+ }
+
+ carry = time_helper::inc_bcd(&m_date, 0x3f, 0x01, maxdays);
+ }
+ if (carry)
+ {
+ UINT8 enables = m_months_enables & 0xc0;
+ carry = time_helper::inc_bcd(&m_months_enables, 0x1f, 0x01, 0x12);
+ m_months_enables &= 0x3f;
+ m_months_enables |= enables;
+ }
+ if (carry)
+ {
+ carry = time_helper::inc_bcd(&m_years, 0xff, 0x00, 0x99);
+ }
+
+ if ((m_ram[REGISTER_COMMAND] & COMMAND_TE) != 0)
+ {
+ copy_registers_to_ram();
+ }
+
+ check_tod_alarm();
+}
+
+void ds1386_device::copy_ram_to_registers()
+{
+ m_hundredths = m_ram[REGISTER_HUNDREDTHS];
+ m_seconds = m_ram[REGISTER_SECONDS];
+ m_minutes = m_ram[REGISTER_MINUTES];
+ m_hours = m_ram[REGISTER_HOURS];
+ m_days = m_ram[REGISTER_DAYS];
+ m_date = m_ram[REGISTER_DATE];
+ m_months_enables = m_ram[REGISTER_MONTHS];
+ m_years = m_ram[REGISTER_YEARS];
+}
+
+void ds1386_device::copy_registers_to_ram()
+{
+ m_ram[REGISTER_HUNDREDTHS] = m_hundredths;
+ m_ram[REGISTER_SECONDS] = m_seconds;
+ m_ram[REGISTER_MINUTES] = m_minutes;
+ m_ram[REGISTER_HOURS] = m_hours;
+ m_ram[REGISTER_DAYS] = m_days;
+ m_ram[REGISTER_DATE] = m_date;
+ m_ram[REGISTER_MONTHS] = m_months_enables;
+ m_ram[REGISTER_YEARS] = m_years;
+}
+
+void ds1386_device::check_tod_alarm()
+{
+ UINT8 mode = BIT(m_days_alarm, 7) | (BIT(m_hours_alarm, 5) << 1) | (BIT(m_minutes_alarm, 3) << 2);
+ bool zeroes = (m_hundredths == 0 && m_seconds == 0);
+ if (zeroes && (m_ram[REGISTER_COMMAND] & COMMAND_TDF) == 0)
+ {
+ bool minutes_match = (m_minutes & 0x7f) == (m_minutes_alarm & 0x7f);
+ bool hours_match = (m_hours & 0x7f) == (m_hours_alarm & 0x7f);
+ bool days_match = (m_days & 0x7) == (m_days_alarm & 0x07);
+ bool alarm_match = false;
+ switch (mode)
+ {
+ case ALARM_PER_MINUTE:
+ alarm_match = true;
+ break;
+ case ALARM_MINUTES_MATCH:
+ alarm_match = minutes_match;
+ break;
+ case ALARM_HOURS_MATCH:
+ alarm_match = hours_match;
+ break;
+ case ALARM_DAYS_MATCH:
+ alarm_match = days_match;
+ break;
+ default:
+ break;
+ }
+ if (alarm_match)
+ {
+ time_of_day_alarm();
+ }
+ }
+}
+
+void ds1386_device::nvram_default()
+{
+ memset(&m_ram[0], 0, m_ram_size);
+}
+
+void ds1386_device::nvram_read(emu_file &file)
+{
+ file.read(&m_ram[0], m_ram_size);
+}
+
+void ds1386_device::nvram_write(emu_file &file)
+{
+ file.write(&m_ram[0], m_ram_size);
+}
+
+WRITE8_MEMBER( ds1386_device::data_w )
+{
+ if (offset >= m_ram_size)
+ return;
+
+ if (offset >= 0xe)
+ {
+ m_ram[offset] = data;
+ }
+ else
+ {
+ switch (offset)
+ {
+ case 0x00: // hundredths
+ case 0x03: // minutes alarm
+ case 0x05: // horus alarm
+ case 0x0a: // years
+ m_ram[offset] = data;
+ break;
+
+ case 0x01: // seconds
+ case 0x02: // minutes
+ case 0x04: // hours
+ m_ram[offset] = data & 0x7f;
+ break;
+
+ case 0x06: // days
+ m_ram[offset] = data & 0x07;
+ break;
+
+ case 0x07: // days alarm
+ m_ram[offset] = data & 0x87;
+ break;
+
+ case 0x08: // date
+ m_ram[offset] = data & 0x3f;
+ break;
+
+ case 0x09: // months
+ {
+ UINT8 old_value = m_ram[offset];
+ m_ram[offset] = data & 0xdf;
+ UINT8 changed = old_value ^ data;
+ if (changed & DISABLE_SQW)
+ {
+ if (m_ram[offset] & DISABLE_SQW)
+ {
+ m_square_timer->adjust(attotime::never);
+ }
+ else
+ {
+ m_square_timer->adjust(attotime::from_hz(2048));
+ }
+ }
+ if (changed & DISABLE_OSC)
+ {
+ if (m_ram[offset] & DISABLE_OSC)
+ {
+ m_clock_timer->adjust(attotime::never);
+ }
+ else
+ {
+ m_clock_timer->adjust(attotime::from_hz(100));
+ }
+ }
+ break;
+ }
+
+ case 0x0c: // watchdog hundredths
+ case 0x0d: // watchdog seconds
+ {
+ if ((m_ram[REGISTER_COMMAND] & COMMAND_WAF) != 0 && (m_ram[REGISTER_COMMAND] & COMMAND_WAM) == 0)
+ {
+ m_ram[REGISTER_COMMAND] &= ~COMMAND_WAF;
+ m_watchdog_alarm = 0;
+ if (m_ram[REGISTER_COMMAND] & COMMAND_IPSW)
+ safe_intb_cb(0);
+ else
+ safe_inta_cb(0);
+ }
+ m_ram[offset] = data;
+ UINT8 wd_hundredths = m_ram[REGISTER_WATCHDOG_HUNDREDTHS];
+ UINT8 wd_seconds = m_ram[REGISTER_WATCHDOG_SECONDS];
+ int total_hundredths = (wd_hundredths & 0xf) + ((wd_hundredths >> 4) & 0xf) * 10 + (wd_seconds & 0xf) * 100 + ((wd_seconds >> 4) & 0xf) * 1000;
+ m_watchdog_timer->adjust(attotime::from_msec(total_hundredths * 10));
+ break;
+ }
+
+ case 0x0b: // command
+ {
+ UINT8 old = m_ram[offset];
+ m_ram[offset] = data & 0xfc;
+ UINT8 changed = old ^ m_ram[offset];
+ if (changed & COMMAND_IPSW)
+ {
+ int old_a = (old & COMMAND_IPSW) ? m_tod_alarm : m_watchdog_alarm;
+ int old_b = (old & COMMAND_IPSW) ? m_watchdog_alarm : m_tod_alarm;
+ int new_a = old_b;
+ int new_b = old_a;
+
+ bool a_changed = old_a != new_a;
+ bool b_changed = old_b != new_b;
+
+ std::swap(m_tod_alarm, m_watchdog_alarm);
+
+ if (a_changed)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_inta_cb(m_tod_alarm);
+ else
+ safe_inta_cb(m_watchdog_alarm);
+ }
+ if (b_changed)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_intb_cb(m_watchdog_alarm);
+ else
+ safe_intb_cb(m_tod_alarm);
+ }
+ }
+ if (changed & COMMAND_WAM)
+ {
+ if (m_ram[offset] & COMMAND_WAF)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_intb_cb(0);
+ else
+ safe_inta_cb(0);
+ }
+ else if (m_watchdog_alarm)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_intb_cb(m_watchdog_alarm);
+ else
+ safe_inta_cb(m_watchdog_alarm);
+ }
+ }
+ if (changed & COMMAND_TDM)
+ {
+ if (m_ram[offset] & COMMAND_TDF)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_inta_cb(0);
+ else
+ safe_intb_cb(0);
+ }
+ else if (m_tod_alarm)
+ {
+ if (m_ram[offset] & COMMAND_IPSW)
+ safe_inta_cb(m_tod_alarm);
+ else
+ safe_intb_cb(m_tod_alarm);
+ }
+ }
+ break;
+ }
+ }
+ }
+}
+
+READ8_MEMBER( ds1386_device::data_r )
+{
+ if (offset >= m_ram_size)
+ return 0;
+
+ return m_ram[offset];
+}
diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h
new file mode 100644
index 00000000000..1146416b923
--- /dev/null
+++ b/src/devices/machine/ds1386.h
@@ -0,0 +1,210 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+/**********************************************************************
+
+ Dallas DS1386/DS1386P RAMified Watchdog Timekeeper
+
+***********************************************************************
+ _____________
+ /INTA 1 | | 32 Vcc
+ /INTB 2 | | 31 SQW
+ NC/A14 3 | | 30 Vcc
+ A12 4 | | 29 /WE
+ A7 5 | | 28 NC/A13
+ A6 6 | | 27 A8
+ A5 7 | | 26 A9
+ A4 8 | | 25 A11
+ A3 9 | | 24 /OE
+ A2 10 | | 23 A10
+ A1 11 | | 22 /CE
+ A0 12 | | 21 DQ7
+ DQ0 13 | | 20 DQ6
+ DQ1 14 | | 19 DQ5
+ DQ2 15 | | 18 DQ4
+ GND 16 |_____________| 17 DQ3
+
+ DS1386 8k/32k x 8
+
+ __________________________________
+ / |
+ / |
+ /INTB | 1 34 | /INTA
+ NC | 2 33 | SQW
+ NC | 3 32 | NC/A13
+ /PFO | 4 31 | NC/A14
+ Vcc | 5 30 | A12
+ /WE | 6 29 | A11
+ /OE | 7 28 | A10
+ /CE | 8 27 | A9
+ DQ7 | 9 26 | A8
+ DQ6 | 10 25 | A7
+ DQ5 | 11 24 | A6
+ DQ4 | 12 23 | A5
+ DQ3 | 13 22 | A4
+ DQ2 | 14 X1 GND Vbat X2 21 | A3
+ DQ1 | 15 ____ ____ ____ ____ 20 | A2
+ DQ0 | 16 | | | | | | | | 19 | A1
+ GND | 17 |____| |____| |____| |____| 18 | A0
+ |____________________________________|
+
+ DS1386 8k/32k x 8, 34-Pin PowerCap Module Board
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef DS1386_H
+#define DS1386_H
+
+#include "emu.h"
+
+// handlers
+
+#define MCFG_DS1386_INTA_HANDLER(_devcb) \
+ devcb = &ds1386_device::set_inta_cb(*device, DEVCB_##_devcb);
+
+#define MCFG_DS1386_INTB_HANDLER(_devcb) \
+ devcb = &ds1386_device::set_inta_cb(*device, DEVCB_##_devcb);
+
+#define MCFG_DS1386_SQW_HANDLER(_devcb) \
+ devcb = &ds1386_device::set_sqw_cb(*device, DEVCB_##_devcb);
+
+// devices
+
+#define MCFG_DS1386_8K_ADD(_tag, _clock) \
+ MCFG_DEVICE_ADD(_tag, DS1386_8K, _clock)
+
+#define MCFG_DS1386_32K_ADD(_tag, _clock) \
+ MCFG_DEVICE_ADD(_tag, DS1386_32K, _clock)
+
+class ds1386_device : public device_t,
+ public device_nvram_interface
+{
+public:
+ ds1386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, size_t size);
+
+ DECLARE_WRITE8_MEMBER( data_w );
+ DECLARE_READ8_MEMBER( data_r );
+
+ DECLARE_WRITE_LINE_MEMBER( ce_w );
+ DECLARE_WRITE_LINE_MEMBER( oe_w );
+ DECLARE_WRITE_LINE_MEMBER( we_w );
+
+ template<class _Object> static devcb_base &set_inta_cb(device_t &device, _Object object) { return downcast<ds1386_device &>(device).m_inta_cb.set_callback(object); }
+ template<class _Object> static devcb_base &set_intb_cb(device_t &device, _Object object) { return downcast<ds1386_device &>(device).m_intb_cb.set_callback(object); }
+ template<class _Object> static devcb_base &set_sqw_cb(device_t &device, _Object object) { return downcast<ds1386_device &>(device).m_sqw_cb.set_callback(object); }
+
+protected:
+ enum
+ {
+ REGISTER_HUNDREDTHS = 0,
+ REGISTER_SECONDS,
+ REGISTER_MINUTES,
+ REGISTER_MINUTE_ALARM,
+ REGISTER_HOURS,
+ REGISTER_HOUR_ALARM,
+ REGISTER_DAYS,
+ REGISTER_DAY_ALARM,
+ REGISTER_DATE,
+ REGISTER_MONTHS,
+ REGISTER_EN_OUTS = REGISTER_MONTHS,
+ REGISTER_YEARS,
+ REGISTER_COMMAND,
+ REGISTER_WATCHDOG_HUNDREDTHS,
+ REGISTER_WATCHDOG_SECONDS,
+ REGISTER_USER = 0xE,
+ };
+
+ enum
+ {
+ ALARM_DAYS_MATCH = 0x0,
+ ALARM_HOURS_MATCH = 0x1,
+ ALARM_MINUTES_MATCH = 0x3,
+ ALARM_PER_MINUTE = 0x7
+ };
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ // device_nvram_interface overrides
+ virtual void nvram_default() override;
+ virtual void nvram_read(emu_file &file) override;
+ virtual void nvram_write(emu_file &file) override;
+
+ static const device_timer_id CLOCK_TIMER = 0;
+ static const device_timer_id SQUAREWAVE_TIMER = 1;
+ static const device_timer_id WATCHDOG_TIMER = 2;
+ static const device_timer_id INTA_TIMER = 3;
+ static const device_timer_id INTB_TIMER = 4;
+
+protected:
+ void safe_inta_cb(int state);
+ void safe_intb_cb(int state);
+ void safe_sqw_cb(int state);
+
+ void set_current_time();
+
+ void check_tod_alarm();
+ void time_of_day_alarm();
+ void watchdog_alarm();
+
+ void advance_hundredths();
+
+ void copy_ram_to_registers();
+ void copy_registers_to_ram();
+
+ int m_tod_alarm;
+ int m_watchdog_alarm;
+ int m_square;
+
+ // interfacing with other devices
+ devcb_write_line m_inta_cb;
+ devcb_write_line m_intb_cb;
+ devcb_write_line m_sqw_cb;
+
+ // timers
+ emu_timer *m_clock_timer;
+ emu_timer *m_square_timer;
+ emu_timer *m_watchdog_timer;
+ emu_timer *m_inta_timer;
+ emu_timer *m_intb_timer;
+
+ std::unique_ptr<UINT8[]> m_ram;
+ optional_region_ptr<UINT8> m_default_data;
+
+ UINT8 m_hundredths;
+ UINT8 m_seconds;
+ UINT8 m_minutes;
+ UINT8 m_minutes_alarm;
+ UINT8 m_hours;
+ UINT8 m_hours_alarm;
+ UINT8 m_days;
+ UINT8 m_days_alarm;
+ UINT8 m_date;
+ UINT8 m_months_enables;
+ UINT8 m_years;
+
+ const size_t m_ram_size;
+};
+
+class ds1386_8k_device : public ds1386_device
+{
+public:
+ // construction/destruction
+ ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+class ds1386_32k_device : public ds1386_device
+{
+public:
+ // construction/destruction
+ ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+// device type definition
+extern const device_type DS1386_8K;
+extern const device_type DS1386_32K;
+
+#endif
diff --git a/src/devices/machine/hd64610.h b/src/devices/machine/hd64610.h
index 81147baede3..2dc5726ddea 100644
--- a/src/devices/machine/hd64610.h
+++ b/src/devices/machine/hd64610.h
@@ -26,6 +26,7 @@
#ifndef __HD64610__
#define __HD64610__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h
index 801aa6de3bd..797df97d70a 100644
--- a/src/devices/machine/i2cmem.h
+++ b/src/devices/machine/i2cmem.h
@@ -142,7 +142,7 @@ protected:
int m_shift;
int m_devsel;
int m_byteaddr;
- dynamic_buffer m_page;
+ std::vector<UINT8> m_page;
int m_page_offset;
};
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index 1bb19bea0a0..7816bfa2d21 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -301,7 +301,7 @@ private:
// disc parameters
chd_file * m_disc; // handle to the disc itself
- dynamic_buffer m_vbidata; // pointer to precomputed VBI data
+ std::vector<UINT8> m_vbidata; // pointer to precomputed VBI data
int m_width; // width of video
int m_height; // height of video
UINT32 m_fps_times_1million; // frame rate of video
diff --git a/src/devices/machine/matsucd.cpp b/src/devices/machine/matsucd.cpp
deleted file mode 100644
index d9d8ec47b27..00000000000
--- a/src/devices/machine/matsucd.cpp
+++ /dev/null
@@ -1,757 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf, Mariusz Wojcieszek
-/***************************************************************************
-
- Matsushita/Panasonic CDR521/522 type CDROM drive emulation
-
-Notes:
-This version implements the drive found in Amiga CDTV. There are
-different drives supporting this command-set (look in the sbpcd driver
-in Linux for examples). Most drives support the exact same command
-structure, but the command numbers differ. Eventually this driver
-can be expanded with support for the other drives as needed.
-
-***************************************************************************/
-
-
-#include "emu.h"
-#include "imagedev/chd_cd.h"
-#include "sound/cdda.h"
-#include "machine/matsucd.h"
-
-
-#define MATSU_STATUS_READY ( 1 << 0 ) /* driver ready */
-#define MATSU_STATUS_DOORLOCKED ( 1 << 1 ) /* door locked */
-#define MATSU_STATUS_PLAYING ( 1 << 2 ) /* drive playing */
-#define MATSU_STATUS_SUCCESS ( 1 << 3 ) /* last command was successful */
-#define MATSU_STATUS_ERROR ( 1 << 4 ) /* last command failed */
-#define MATSU_STATUS_MOTOR ( 1 << 5 ) /* spinning */
-#define MATSU_STATUS_MEDIA ( 1 << 6 ) /* media present (in caddy or tray) */
-#define MATSU_STATUS_DOORCLOSED ( 1 << 7 ) /* tray status */
-
-struct matsucd
-{
- UINT8 enabled; /* /ENABLE - Unit enabled */
- UINT8 cmd_signal; /* /CMD - Command mode */
- UINT8 stch_signal; /* /STCH - Status Changed */
- UINT8 sten_signal; /* /STEN - Status Enabled */
- UINT8 scor_signal; /* /STEN - Subcode Ready */
- UINT8 input[16];
- UINT8 input_pos;
- UINT8 output[16];
- UINT8 output_pos;
- UINT8 output_len;
- UINT8 status;
- UINT8 motor;
- UINT16 sector_size;
- UINT32 lba;
- UINT16 num_blocks;
- UINT16 xfer_offset;
- UINT8 sector_buffer[CD_MAX_SECTOR_DATA];
- UINT8 cdda_set;
- void (*sten_cb)( running_machine &machine, int level ); /* Status enabled callback */
- void (*stch_cb)( running_machine &machine, int level ); /* Status changed callback */
- void (*scor_cb)( running_machine &machine, int level ); /* Subcode ready callback */
- cdrom_file *cdrom;
- cdda_device *cdda;
- emu_timer *frame_timer;
-};
-
-static matsucd cd;
-
-#define MSF2LBA(msf) (((msf >> 16) & 0xff) * 60 * 75 + ((msf >> 8) & 0xff) * 75 + ((msf >> 0) & 0xff))
-#define LBA2MSF(lba) (((lba / (75 * 60)) << 16) | (((lba / 75) % 60) << 8) | (lba % 75))
-
-static TIMER_CALLBACK(matsu_subcode_proc);
-
-void matsucd_init( cdrom_image_device *cdrom_device, const char *cdda_tag )
-{
- memset(&cd, 0, sizeof( matsucd ) );
-
- cd.cdrom = cdrom_device->get_cdrom_file();
- cd.cdda = cdrom_device->machine().device<cdda_device>(cdda_tag);
-
- cd.frame_timer = cdrom_device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(matsu_subcode_proc),&cdrom_device->machine()));
-
- cd.stch_signal = 1;
-}
-
-void matsucd_set_status_enabled_callback( void (*sten_cb)( running_machine &machine, int level ) )
-{
- /* add the callback for status enabled signal */
- cd.sten_cb = sten_cb;
-}
-
-void matsucd_set_status_changed_callback( void (*stch_cb)( running_machine &machine, int level ) )
-{
- /* add the callback for status changed signal */
- cd.stch_cb = stch_cb;
-}
-
-void matsucd_set_subcode_ready_callback( void (*scor_cb)( running_machine &machine, int level ) )
-{
- /* add the callback for subcode ready signal */
- cd.scor_cb = scor_cb;
-}
-
-static int matsucd_getsector_type( running_machine &machine )
-{
- switch( cd.sector_size )
- {
- case 2048: return CD_TRACK_MODE1;
- case 2324: return CD_TRACK_MODE2_FORM2;
- case 2336: return CD_TRACK_MODE2;
- case 2352: return CD_TRACK_MODE2_RAW;
-
- default: machine.logerror( "MATSUCD: Sector size %d unsupported!\n", cd.sector_size ); break;
- }
-
- return CD_TRACK_RAW_DONTCARE;
-}
-
-void matsucd_read_next_block( running_machine &machine )
-{
- cd.xfer_offset = 0;
-
- if ( cd.num_blocks )
- {
- cd.lba++;
- cd.num_blocks--;
-
- if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type(machine)))
- {
- machine.logerror( "MATSUCD - Warning: Read error on CD!\n" );
- }
- }
-}
-
-int matsucd_get_next_byte( UINT8 *data )
-{
- /* no more data to read on this sector */
- if ( cd.xfer_offset >= cd.sector_size )
- return -1;
-
- if ( data )
- *data = cd.sector_buffer[cd.xfer_offset++];
-
- return 0;
-}
-
-static void matsucd_cdda_stop( running_machine &machine )
-{
- if (cd.cdda != nullptr)
- {
- cd.cdda->stop_audio();
- cd.frame_timer->reset( );
- }
-}
-
-static void matsucd_cdda_play( running_machine &machine, UINT32 lba, UINT32 num_blocks )
-{
- if (cd.cdda != nullptr)
- {
- cd.cdda->start_audio(lba, num_blocks);
- cd.frame_timer->adjust(attotime::from_hz( 75 ));
- }
-}
-
-static void matsucd_cdda_pause( running_machine &machine, int pause )
-{
- if (cd.cdda != nullptr)
- {
- cd.cdda->pause_audio(pause);
-
- if ( pause )
- {
- cd.frame_timer->reset( );
- }
- else
- {
- cd.frame_timer->adjust(attotime::from_hz( 75 ));
- }
- }
-}
-
-static UINT8 matsucd_cdda_getstatus( running_machine &machine, UINT32 *lba )
-{
- if ( lba ) *lba = 0;
-
- if (cd.cdda != nullptr)
- {
- if (cd.cdda->audio_active())
- {
- if ( lba ) *lba = cd.cdda->get_audio_lba();
-
- if (cd.cdda->audio_paused())
- {
- return 0x12; /* audio paused */
- }
- else
- {
- return 0x11; /* audio in progress */
- }
- }
- else if (cd.cdda->audio_ended())
- {
- return 0x13; /* audio ended */
- }
- }
-
- return 0x15; /* no audio status */
-}
-
-void matsucd_enable_w( int level )
-{
- cd.enabled = ( level ) ? 0 : 1;
-}
-
-void matsucd_cmd_w( int level )
-{
- cd.cmd_signal = ( level ) ? 0 : 1;
-}
-
-int matsucd_stch_r( void )
-{
- return cd.stch_signal ? 0 : 1;
-}
-
-int matsucd_sten_r( void )
-{
- return cd.sten_signal ? 0 : 1;
-}
-
-int matsucd_scor_r( void )
-{
- return cd.scor_signal ? 0 : 1;
-}
-
-static void update_status_enable( running_machine &machine, int level )
-{
- cd.sten_signal = level;
-
- if ( cd.sten_cb )
- {
- (*cd.sten_cb)(machine, cd.sten_signal);
- }
-}
-
-static void update_status_changed( running_machine &machine, int level )
-{
- cd.stch_signal = level;
-
- if ( cd.stch_cb )
- {
- (*cd.stch_cb)(machine, cd.stch_signal);
- }
-}
-
-static void update_subcode_ready( running_machine &machine, int level )
-{
- cd.scor_signal = level;
-
- if ( cd.scor_cb )
- {
- (*cd.scor_cb)(machine, cd.scor_signal);
- }
-}
-
-static TIMER_CALLBACK(matsucd_set_status_end)
-{
- update_status_changed( machine, 1 );
-}
-
-static void matsucd_set_status( running_machine &machine, UINT8 status )
-{
- if ( status != cd.status )
- {
- cd.status = status;
-
- if ( cd.stch_signal != 0 )
- {
- update_status_changed( machine, 0 );
- machine.scheduler().timer_set(attotime::from_msec(1), timer_expired_delegate(FUNC(matsucd_set_status_end),&machine));
- }
- }
-}
-
-static TIMER_CALLBACK(matsu_subcode_proc)
-{
- (void)param;
-
- if (cd.cdda != nullptr)
- {
- UINT8 s = matsucd_cdda_getstatus(machine, nullptr);
- UINT8 newstatus = cd.status;
-
- if ( s == 0x11 || s == 0x12 )
- {
- if ( s == 0x11 )
- {
- update_subcode_ready( machine, 1 );
- update_subcode_ready( machine, 0 );
- }
-
- newstatus |= MATSU_STATUS_PLAYING;
-
- cd.frame_timer->adjust(attotime::from_hz( 75 ));
- }
- else
- {
- newstatus &= ~MATSU_STATUS_PLAYING;
- }
-
- matsucd_set_status( machine, newstatus );
- }
-}
-
-static void matsucd_command_error( running_machine &machine )
-{
- UINT8 newstatus = cd.status;
-
- newstatus &= ~MATSU_STATUS_SUCCESS;
- newstatus |= MATSU_STATUS_ERROR;
-
- matsucd_set_status( machine, newstatus );
-}
-
-static void matsucd_complete_cmd( running_machine &machine, UINT8 len )
-{
- UINT8 newstatus = cd.status;
-
- cd.input_pos = 0;
- cd.output_pos = 0;
- cd.output_len = len;
-
- newstatus &= ~MATSU_STATUS_ERROR;
- newstatus |= MATSU_STATUS_SUCCESS;
-
- matsucd_set_status( machine, newstatus );
-
- update_status_enable( machine, 1 );
- update_status_enable( machine, 0 );
-}
-
-UINT8 matsucd_response_r( running_machine &machine )
-{
- UINT8 v = cd.output[cd.output_pos++];
-
- if ( cd.output_pos < cd.output_len )
- {
- update_status_enable( machine, 1 );
- update_status_enable( machine, 0 );
- }
-
- return v;
-}
-
-void matsucd_command_w( running_machine &machine, UINT8 data )
-{
- UINT8 cmd;
-
- /* make sure we're enabled */
- if ( cd.enabled == 0 )
- return;
-
- /* make sure /CMD is asserted */
- if ( cd.cmd_signal == 0 )
- return;
-
- if ( cd.cdda_set == 0 )
- {
- if ( cd.cdrom )
- cd.cdda->set_cdrom(cd.cdrom);
-
- cd.cdda_set = 1;
- }
-
- cd.input[cd.input_pos++] = data;
-
- cmd = cd.input[0];
-
- switch( cmd )
- {
- case 0x01: /* seek */
- {
- if ( cd.input_pos < 7 )
- return;
-
- /* stop CDDA audio if necessary */
- matsucd_cdda_stop(machine);
-
- cd.motor = 1;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x02: /* read sectors */
- {
- if ( cd.input_pos < 7 )
- return;
-
- /* stop CDDA audio if necessary */
- matsucd_cdda_stop(machine);
-
- /* LBA */
- cd.lba = cd.input[1];
- cd.lba <<= 8;
- cd.lba |= cd.input[2];
- cd.lba <<= 8;
- cd.lba |= cd.input[3];
-
- /* Number of blocks */
- cd.num_blocks = cd.input[4];
- cd.num_blocks <<= 8;
- cd.num_blocks |= cd.input[5];
-
- /* Reset transfer count */
- cd.xfer_offset = 0;
-
- /* go ahead and cache the first block */
- if (!cdrom_read_data(cd.cdrom, cd.lba, cd.sector_buffer, matsucd_getsector_type(machine)))
- {
- machine.logerror( "MATSUCD - Warning: Read error on CD!\n" );
- matsucd_command_error( machine );
- return;
- }
-
- cd.motor = 1;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x04: /* motor on */
- {
- if ( cd.input_pos < 7 )
- return;
-
- cd.motor = 1;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x05: /* motor off */
- {
- if ( cd.input_pos < 7 )
- return;
-
- /* stop CDDA audio if necessary */
- matsucd_cdda_stop(machine);
-
- cd.motor = 0;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x09: /* play audio cd, LBA mode */
- {
- UINT32 lba, numblocks;
-
- if ( cd.input_pos < 7 )
- return;
-
- lba = cd.input[1];
- lba <<= 8;
- lba |= cd.input[2];
- lba <<= 8;
- lba |= cd.input[3];
-
- numblocks = cd.input[4];
- numblocks <<= 8;
- numblocks |= cd.input[5];
- numblocks <<= 8;
- numblocks |= cd.input[6];
-
- matsucd_cdda_play( machine, lba, numblocks );
-
- cd.motor = 1;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x0a: /* play audio cd, MSF mode */
- {
- UINT32 start, end, lba_start, lba_end;
-
- if ( cd.input_pos < 7 )
- return;
-
- start = cd.input[1];
- start <<= 8;
- start |= cd.input[2];
- start <<= 8;
- start |= cd.input[3];
-
- end = cd.input[4];
- end <<= 8;
- end |= cd.input[5];
- end <<= 8;
- end |= cd.input[6];
-
- lba_start = MSF2LBA( start );
- lba_end = MSF2LBA( end );
-
- if ( end == 0xffffff )
- {
- lba_end = cdrom_get_track_start(cd.cdrom,cdrom_get_last_track(cd.cdrom)-1);
- lba_end += cdrom_get_toc(cd.cdrom)->tracks[cdrom_get_last_track(cd.cdrom)-1].frames;
- }
-
- if ( lba_end <= lba_start )
- {
- matsucd_cdda_stop(machine);
- }
- else
- {
- matsucd_cdda_play( machine, lba_start, lba_end - lba_start );
- cd.motor = 1;
- }
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x0b: /* play audio track and index */
- {
- UINT8 track_start = cd.input[1];
- UINT8 index_start = cd.input[2];
- UINT8 track_end = cd.input[3];
- UINT8 index_end = cd.input[4];
- UINT32 lba_start, lba_end;
-
- /* TODO: Add index support once the CDDA engine supports it */
- (void)index_start;
- (void)index_end;
-
- /* sanitize values */
- if ( track_start == 0 ) track_start++;
- if ( track_end == 0 ) track_end++;
- if ( track_end > cdrom_get_last_track(cd.cdrom) )
- track_end = cdrom_get_last_track(cd.cdrom);
-
- /* find the start and stop positions */
- lba_start = cdrom_get_track_start(cd.cdrom,track_start-1);
- lba_end = cdrom_get_track_start(cd.cdrom,track_end-1);
-
- lba_end += cdrom_get_toc(cd.cdrom)->tracks[track_end-1].frames;
-
- if ( lba_end <= lba_start )
- {
- matsucd_cdda_stop(machine);
- }
- else
- {
- matsucd_cdda_play( machine, lba_start, lba_end - lba_start );
- cd.motor = 1;
- }
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x81: /* status read */
- {
- UINT8 newstatus = cd.status;
-
- newstatus &= MATSU_STATUS_SUCCESS | MATSU_STATUS_ERROR | MATSU_STATUS_PLAYING;
- newstatus |= MATSU_STATUS_READY;
-
- if (cd.cdrom)
- {
- newstatus |= MATSU_STATUS_MEDIA;
- }
-
- if (cd.motor)
- newstatus |= MATSU_STATUS_MOTOR;
-
- cd.output[0] = newstatus;
-
- matsucd_set_status( machine, newstatus );
-
- matsucd_complete_cmd( machine, 1 );
- }
- break;
-
- case 0x82: /* error read */
- {
- if ( cd.input_pos < 7 )
- return;
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 6 );
- }
- break;
-
- case 0x84: /* set mode */
- {
- if ( cd.input_pos < 7 )
- return;
-
- cd.sector_size = cd.input[2];
- cd.sector_size <<= 8;
- cd.sector_size |= cd.input[3];
-
- memset( cd.output, 0, 6 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0x87: /* read SUBQ */
- {
- int msfmode;
- UINT32 lba;
- UINT8 track;
-
- if ( cd.input_pos < 7 )
- return;
-
- msfmode = (cd.input[1] & 0x02) ? 1 : 0;
-
- memset( cd.output, 0, 13 );
-
- cd.output[0] = matsucd_cdda_getstatus( machine, &lba );
-
- if ( lba > 0 )
- {
- UINT32 disk_pos;
- UINT32 track_pos;
-
- track = cdrom_get_track(cd.cdrom, lba);
-
- cd.output[1] = cdrom_get_adr_control(cd.cdrom, track);
- cd.output[2] = track+1;
- cd.output[3] = 0; /* index */
-
- disk_pos = lba;
- if ( msfmode ) disk_pos = LBA2MSF(disk_pos);
-
- cd.output[4] = (disk_pos >> 24) & 0xff;
- cd.output[5] = (disk_pos >> 16) & 0xff;
- cd.output[6] = (disk_pos >> 8) & 0xff;
- cd.output[7] = (disk_pos) & 0xff;
-
- track_pos = lba - cdrom_get_track_start(cd.cdrom, track);
- if ( msfmode ) track_pos = LBA2MSF(track_pos);
-
- cd.output[8] = (track_pos >> 24) & 0xff;
- cd.output[9] = (track_pos >> 16) & 0xff;
- cd.output[10] = (track_pos >> 8) & 0xff;
- cd.output[11] = (track_pos) & 0xff;
-
- /* TODO: UPC flag at offset 12 */
- cd.output[12] = 0;
- }
-
- matsucd_complete_cmd( machine, 13 );
- }
- break;
-
- case 0x89: /* read disk info */
- {
- UINT32 end;
-
- if ( cd.input_pos < 7 )
- return;
-
- memset( cd.output, 0, 5 );
-
- cd.output[0] = cdrom_get_last_track(cd.cdrom) ? 1 : 0;
- cd.output[1] = cdrom_get_last_track(cd.cdrom);
- end = cdrom_get_track_start(cd.cdrom,cd.output[1]-1);
- end += cdrom_get_toc(cd.cdrom)->tracks[cd.output[1]-1].frames;
- end = LBA2MSF(end);
- cd.output[2] = (end >> 16) & 0xff;
- cd.output[3] = (end >> 8) & 0xff;
- cd.output[4] = (end) & 0xff;
-
- matsucd_complete_cmd( machine, 5 );
- }
- break;
-
- case 0x8a: /* read toc */
- {
- UINT8 track;
- int msfmode;
- UINT32 track_start;
-
- if ( cd.input_pos < 7 )
- return;
-
- /* stop CDDA audio if necessary */
- matsucd_cdda_stop(machine);
-
- track = cd.input[2];
- msfmode = (cd.input[1] & 0x02) ? 1 : 0;
-
- if ( cd.cdrom == nullptr )
- {
- machine.logerror( "MATSUCD - Warning: Reading TOC without a CD!\n" );
- matsucd_command_error( machine );
- return;
- }
-
- if ( track > cdrom_get_last_track(cd.cdrom) )
- {
- machine.logerror( "MATSUCD - Warning: Reading invalid track entry from TOC!\n" );
- matsucd_command_error( machine );
- return;
- }
-
- memset( cd.output, 0, 7 );
-
- track_start = cdrom_get_track_start(cd.cdrom, track > 0 ? (track-1) : track );
- if ( msfmode ) track_start = LBA2MSF( track_start );
-
- cd.output[1] = cdrom_get_adr_control(cd.cdrom, track > 0 ? (track-1) : track);
- cd.output[2] = track;
- cd.output[3] = (track == 0 ) ? cdrom_get_last_track(cd.cdrom) : 0;
- cd.output[4] = (track_start >> 24) & 0xff;
- cd.output[5] = (track_start >> 16) & 0xff;
- cd.output[6] = (track_start >> 8) & 0xff;
- cd.output[7] = (track_start) & 0xff;
-
- cd.motor = 1;
-
- matsucd_complete_cmd( machine, 8 );
- }
- break;
-
- case 0x8b: /* pause audio */
- {
- if ( cd.input_pos < 7 )
- return;
-
- matsucd_cdda_pause( machine, (cd.input[1] == 0) ? 1 : 0 );
- memset( cd.output, 0, 7 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- case 0xa3: /* front panel */
- {
- if ( cd.input_pos < 7 )
- return;
-
- /* TODO: ??? */
-
- memset( cd.output, 0, 7 );
- matsucd_complete_cmd( machine, 0 );
- }
- break;
-
- default:
- machine.logerror( "MATSUCD: Unknown/inimplemented command %08x\n", cmd );
- break;
- }
-}
diff --git a/src/devices/machine/matsucd.h b/src/devices/machine/matsucd.h
deleted file mode 100644
index 19a456760a6..00000000000
--- a/src/devices/machine/matsucd.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:smf, Mariusz Wojcieszek
-/***************************************************************************
-
- Matsushita/Panasonic CDR521/522 type CDROM drive emulation
-
-***************************************************************************/
-
-/* initialization */
-void matsucd_init( cdrom_image_device *cdrom_device, const char *cdda_tag );
-
-
-/* signaling */
-extern void matsucd_enable_w( int level ); /* /ENABLE pin */
-extern void matsucd_cmd_w( int level ); /* /CMD pin */
-extern int matsucd_stch_r( void ); /* /STCH pin */
-extern int matsucd_sten_r( void ); /* /STEN pin */
-extern int matsucd_scor_r( void ); /* /SCOR pin */
-
-/* callback for signal changes */
-extern void matsucd_set_status_enabled_callback( void (*sten_cb)( running_machine &machine, int level ) );
-extern void matsucd_set_status_changed_callback( void (*stch_cb)( running_machine &machine, int level ) );
-extern void matsucd_set_subcode_ready_callback( void (*scor_cb)( running_machine &machine, int level ) );
-
-/* data transfer routines */
-extern void matsucd_read_next_block( void );
-extern int matsucd_get_next_byte( UINT8 *data );
-
-/* main command interface */
-extern void matsucd_command_w( running_machine &machine, UINT8 data );
-extern UINT8 matsucd_response_r( running_machine &machine );
diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h
index b7fffda3de7..a4651171179 100644
--- a/src/devices/machine/mc146818.h
+++ b/src/devices/machine/mc146818.h
@@ -172,7 +172,7 @@ private:
// internal state
UINT8 m_index;
- dynamic_buffer m_data;
+ std::vector<UINT8> m_data;
attotime m_last_refresh;
diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp
index 18b9f723bfb..5958ba87f9b 100644
--- a/src/devices/machine/mc6846.cpp
+++ b/src/devices/machine/mc6846.cpp
@@ -178,7 +178,7 @@ inline void mc6846_device::update_cto()
m_old_cto = cto;
}
if ( !m_out_cto_cb.isnull() )
- m_out_cto_cb( (offs_t) 0, cto );
+ m_out_cto_cb( cto );
}
@@ -396,7 +396,7 @@ WRITE8_MEMBER(mc6846_device::write)
{
m_cp2_cpu = (data >> 3) & 1;
if ( !m_out_cp2_cb.isnull() )
- m_out_cp2_cb( (offs_t) 0, m_cp2_cpu );
+ m_out_cp2_cb( m_cp2_cpu );
}
else
logerror( "%s mc6846 acknowledge not implemented\n", machine().describe_context() );
diff --git a/src/devices/machine/mc6846.h b/src/devices/machine/mc6846.h
index bb198ee64d7..b174000b739 100644
--- a/src/devices/machine/mc6846.h
+++ b/src/devices/machine/mc6846.h
@@ -96,14 +96,14 @@ private:
/* CPU write to the outside through chip */
devcb_write8 m_out_port_cb; /* 8-bit output */
- devcb_write8 m_out_cp1_cb; /* 1-bit output */
- devcb_write8 m_out_cp2_cb; /* 1-bit output */
+ devcb_write_line m_out_cp1_cb; /* 1-bit output */
+ devcb_write_line m_out_cp2_cb; /* 1-bit output */
/* CPU read from the outside through chip */
devcb_read8 m_in_port_cb; /* 8-bit input */
/* asynchronous timer output to outside world */
- devcb_write8 m_out_cto_cb; /* 1-bit output */
+ devcb_write_line m_out_cto_cb; /* 1-bit output */
/* timer interrupt */
devcb_write_line m_irq_cb;
diff --git a/src/devices/machine/mccs1850.h b/src/devices/machine/mccs1850.h
index f7643f1465e..c029bc3e89b 100644
--- a/src/devices/machine/mccs1850.h
+++ b/src/devices/machine/mccs1850.h
@@ -22,6 +22,7 @@
#ifndef __MCCS1850__
#define __MCCS1850__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp
index 75e9e799004..148d97260e8 100644
--- a/src/devices/machine/mm58167.cpp
+++ b/src/devices/machine/mm58167.cpp
@@ -9,6 +9,7 @@
**********************************************************************/
#include "mm58167.h"
+#include "machine/timehelp.h"
//**************************************************************************
// LIVE DEVICE
@@ -91,11 +92,6 @@ void mm58167_device::device_reset()
}
-static inline UINT8 make_bcd(UINT8 data)
-{
- return ((data / 10) << 4) | (data % 10);
-}
-
//-------------------------------------------------
// device_timer - handler timer events
//-------------------------------------------------
@@ -124,8 +120,8 @@ void mm58167_device::device_timer(emu_timer &timer, device_timer_id id, int para
if ((m_regs[R_CTL_IRQCONTROL] & 0x80) && m_regs[R_CNT_MONTH] != old_month) set_irq(7); // every month
}
- m_regs[R_CNT_MILLISECONDS] = make_bcd(m_milliseconds % 10);
- m_regs[R_CNT_HUNDTENTHS] = make_bcd(m_milliseconds / 10);
+ m_regs[R_CNT_MILLISECONDS] = time_helper::make_bcd(m_milliseconds % 10);
+ m_regs[R_CNT_HUNDTENTHS] = time_helper::make_bcd(m_milliseconds / 10);
// 10Hz IRQ
if ((m_regs[R_CTL_IRQCONTROL] & 0x02) && (m_milliseconds % 100) == 0)
@@ -158,12 +154,12 @@ void mm58167_device::device_timer(emu_timer &timer, device_timer_id id, int para
void mm58167_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second)
{
- m_regs[R_CNT_SECONDS] = make_bcd(second); // seconds (BCD)
- m_regs[R_CNT_MINUTES] = make_bcd(minute); // minutes (BCD)
- m_regs[R_CNT_HOURS] = make_bcd(hour); // hour (BCD)
- m_regs[R_CNT_DAYOFWEEK] = make_bcd(day_of_week); // day of the week (BCD)
- m_regs[R_CNT_DAYOFMONTH] = make_bcd(day); // day of the month (BCD)
- m_regs[R_CNT_MONTH] = make_bcd(month); // month (BCD)
+ m_regs[R_CNT_SECONDS] = time_helper::make_bcd(second); // seconds (BCD)
+ m_regs[R_CNT_MINUTES] = time_helper::make_bcd(minute); // minutes (BCD)
+ m_regs[R_CNT_HOURS] = time_helper::make_bcd(hour); // hour (BCD)
+ m_regs[R_CNT_DAYOFWEEK] = time_helper::make_bcd(day_of_week); // day of the week (BCD)
+ m_regs[R_CNT_DAYOFMONTH] = time_helper::make_bcd(day); // day of the month (BCD)
+ m_regs[R_CNT_MONTH] = time_helper::make_bcd(month); // month (BCD)
}
void mm58167_device::set_irq(int bit)
diff --git a/src/devices/machine/mm58167.h b/src/devices/machine/mm58167.h
index 6a02497341d..ab1a1d70eb2 100644
--- a/src/devices/machine/mm58167.h
+++ b/src/devices/machine/mm58167.h
@@ -11,6 +11,7 @@
#ifndef __MM58167_H__
#define __MM58167_H__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp
index e87396bcee8..97e89eca2ff 100644
--- a/src/devices/machine/msm5832.cpp
+++ b/src/devices/machine/msm5832.cpp
@@ -145,6 +145,8 @@ void msm5832_device::device_timer(emu_timer &timer, device_timer_id id, int para
void msm5832_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second)
{
+ if (LOG) logerror("MSM5832 Clock Update: %d.%d.%d %d %d:%d:%d\n", year, month, day, day_of_week, hour, minute, second);
+
write_counter(REGISTER_Y1, year);
write_counter(REGISTER_MO1, month);
write_counter(REGISTER_D1, day);
@@ -180,7 +182,7 @@ READ8_MEMBER( msm5832_device::data_r )
}
}
- if (LOG) logerror("MSM5832 '%s' Register Read %01x: %01x\n", tag(), m_address, data & 0x0f);
+ if (LOG) logerror("MSM5832 Register Read %01x: %01x\n", m_address, data & 0x0f);
return data & 0x0f;
}
@@ -192,7 +194,7 @@ READ8_MEMBER( msm5832_device::data_r )
WRITE8_MEMBER( msm5832_device::data_w )
{
- if (LOG) logerror("MSM5832 '%s' Register Write %01x: %01x\n", tag(), m_address, data & 0x0f);
+ if (LOG) logerror("MSM5832 Register Write %01x: %01x\n", m_address, data & 0x0f);
if (m_cs && m_write)
{
@@ -217,7 +219,7 @@ WRITE8_MEMBER( msm5832_device::data_w )
void msm5832_device::address_w(UINT8 data)
{
- if (LOG) logerror("MSM5832 '%s' Address: %01x\n", tag(), data & 0x0f);
+ if (LOG) logerror("MSM5832 Address: %01x\n", data & 0x0f);
m_address = data & 0x0f;
}
@@ -229,7 +231,7 @@ void msm5832_device::address_w(UINT8 data)
WRITE_LINE_MEMBER( msm5832_device::adj_w )
{
- if (LOG) logerror("MSM5832 '%s' 30 ADJ: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 30 ADJ: %u\n", state);
if (state)
{
@@ -244,7 +246,7 @@ WRITE_LINE_MEMBER( msm5832_device::adj_w )
WRITE_LINE_MEMBER( msm5832_device::test_w )
{
- if (LOG) logerror("MSM5832 '%s' TEST: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 TEST: %u\n", state);
}
@@ -254,7 +256,7 @@ WRITE_LINE_MEMBER( msm5832_device::test_w )
WRITE_LINE_MEMBER( msm5832_device::hold_w )
{
- if (LOG) logerror("MSM5832 '%s' HOLD: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 HOLD: %u\n", state);
m_hold = state;
}
@@ -266,7 +268,7 @@ WRITE_LINE_MEMBER( msm5832_device::hold_w )
WRITE_LINE_MEMBER( msm5832_device::read_w )
{
- if (LOG) logerror("MSM5832 '%s' READ: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 READ: %u\n", state);
m_read = state;
}
@@ -278,7 +280,7 @@ WRITE_LINE_MEMBER( msm5832_device::read_w )
WRITE_LINE_MEMBER( msm5832_device::write_w )
{
- if (LOG) logerror("MSM5832 '%s' WR: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 WR: %u\n", state);
m_write = state;
}
@@ -290,7 +292,7 @@ WRITE_LINE_MEMBER( msm5832_device::write_w )
WRITE_LINE_MEMBER( msm5832_device::cs_w )
{
- if (LOG) logerror("MSM5832 '%s' CS: %u\n", tag(), state);
+ if (LOG) logerror("MSM5832 CS: %u\n", state);
m_cs = state;
}
diff --git a/src/devices/machine/msm5832.h b/src/devices/machine/msm5832.h
index aeb6e512f01..d436d4ccc78 100644
--- a/src/devices/machine/msm5832.h
+++ b/src/devices/machine/msm5832.h
@@ -23,6 +23,7 @@
#ifndef __MSM5832__
#define __MSM5832__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/msm58321.h b/src/devices/machine/msm58321.h
index 0013f7901cf..b4f9de48053 100644
--- a/src/devices/machine/msm58321.h
+++ b/src/devices/machine/msm58321.h
@@ -22,6 +22,7 @@
#ifndef __MSM58321__
#define __MSM58321__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/msm6242.h b/src/devices/machine/msm6242.h
index f59902474c4..149d58eea38 100644
--- a/src/devices/machine/msm6242.h
+++ b/src/devices/machine/msm6242.h
@@ -11,6 +11,7 @@
#ifndef __MSM6242DEV_H__
#define __MSM6242DEV_H__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/nscsi_s1410.cpp b/src/devices/machine/nscsi_s1410.cpp
index b486b4994e9..f1725329d9d 100644
--- a/src/devices/machine/nscsi_s1410.cpp
+++ b/src/devices/machine/nscsi_s1410.cpp
@@ -60,7 +60,7 @@ void nscsi_s1410_device::scsi_command()
blocks = (bytes_per_sector == 256) ? 32 : 17;
int track_length = blocks*bytes_per_sector;
- dynamic_buffer data(track_length);
+ std::vector<UINT8> data(track_length);
memset(&data[0], 0xc6, track_length);
if(!hard_disk_write(harddisk, lba, &data[0])) {
diff --git a/src/devices/machine/pcf8593.h b/src/devices/machine/pcf8593.h
index addf666d9fb..b2b09f9ebd0 100644
--- a/src/devices/machine/pcf8593.h
+++ b/src/devices/machine/pcf8593.h
@@ -11,6 +11,7 @@
#ifndef __PCF8593_H__
#define __PCF8593_H__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp
index 2a1d4719013..92e3bd973fd 100644
--- a/src/devices/machine/pckeybrd.cpp
+++ b/src/devices/machine/pckeybrd.cpp
@@ -893,7 +893,7 @@ WRITE8_MEMBER(at_keyboard_device::write)
unicode_char_to_at_keycode
***************************************************************************/
-UINT8 pc_keyboard_device::unicode_char_to_at_keycode(unicode_char ch)
+UINT8 pc_keyboard_device::unicode_char_to_at_keycode(char32_t ch)
{
UINT8 b;
switch(ch)
@@ -1034,7 +1034,7 @@ UINT8 pc_keyboard_device::unicode_char_to_at_keycode(unicode_char ch)
queue_chars
***************************************************************************/
-int pc_keyboard_device::queue_chars(const unicode_char *text, size_t text_len)
+int pc_keyboard_device::queue_chars(const char32_t *text, size_t text_len)
{
int i;
UINT8 b;
@@ -1293,7 +1293,7 @@ INPUT_PORTS_END
Inputx stuff
***************************************************************************/
-bool pc_keyboard_device::accept_char(unicode_char ch)
+bool pc_keyboard_device::accept_char(char32_t ch)
{
return unicode_char_to_at_keycode(ch) != 0;
}
diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h
index 69a133df2c6..58861fc288c 100644
--- a/src/devices/machine/pckeybrd.h
+++ b/src/devices/machine/pckeybrd.h
@@ -49,13 +49,13 @@ protected:
private:
void polling(void);
UINT32 readport(int port);
- UINT8 unicode_char_to_at_keycode(unicode_char ch);
+ UINT8 unicode_char_to_at_keycode(char32_t ch);
virtual void standard_scancode_insert(int our_code, int pressed);
virtual void extended_scancode_insert(int code, int pressed) { }
int queue_size(void);
- int queue_chars(const unicode_char *text, size_t text_len);
- bool accept_char(unicode_char ch);
+ int queue_chars(const char32_t *text, size_t text_len);
+ bool accept_char(char32_t ch);
bool charqueue_empty();
bool m_on;
diff --git a/src/devices/machine/pit8253.cpp b/src/devices/machine/pit8253.cpp
index f542f3753b8..978cb6a50b5 100644
--- a/src/devices/machine/pit8253.cpp
+++ b/src/devices/machine/pit8253.cpp
@@ -317,7 +317,7 @@ void pit8253_device::simulate2(pit8253_timer *timer, INT64 elapsed_cycles)
static const UINT32 CYCLES_NEVER = (0xffffffff);
UINT32 cycles_to_output = 0;
- LOG2(("pit8253: simulate2(): simulating %d cycles for %d in mode %d, bcd = %d, phase = %d, gate = %d, output %d, value = 0x%04x\n",
+ LOG2(("simulate2(): simulating %d cycles for %d in mode %d, bcd = %d, phase = %d, gate = %d, output %d, value = 0x%04x\n",
(int)elapsed_cycles, timer->index, mode, bcd, timer->phase, timer->gate, timer->output, timer->value));
switch (mode)
@@ -698,7 +698,7 @@ void pit8253_device::simulate2(pit8253_timer *timer, INT64 elapsed_cycles)
timer->updatetimer->adjust(next_fire_time - machine().time(), timer->index);
}
- LOG2(("pit8253: simulate2(): simulating %d cycles for %d in mode %d, bcd = %d, phase = %d, gate = %d, output %d, value = 0x%04x, cycles_to_output = %04x\n",
+ LOG2(("simulate2(): simulating %d cycles for %d in mode %d, bcd = %d, phase = %d, gate = %d, output %d, value = 0x%04x, cycles_to_output = %04x\n",
(int)elapsed_cycles, timer->index, mode, bcd, timer->phase, timer->gate, timer->output, timer->value, cycles_to_output));
}
@@ -723,7 +723,7 @@ void pit8253_device::update(pit8253_timer *timer)
attotime elapsed_time = now - timer->last_updated;
INT64 elapsed_cycles = elapsed_time.as_double() * timer->clockin;
- LOG1(("pit8253: update(): timer %d, %d elapsed_cycles\n", timer->index, elapsed_cycles));
+ LOG1(("update(): timer %d, %d elapsed_cycles\n", timer->index, elapsed_cycles));
if (timer->clockin)
timer->last_updated += elapsed_cycles * attotime::from_hz(timer->clockin);
@@ -739,7 +739,7 @@ void pit8253_device::update(pit8253_timer *timer)
mask this bit off. */
UINT16 pit8253_device::masked_value(pit8253_timer *timer)
{
- LOG2(("pit8253: masked_value\n"));
+ LOG2(("masked_value\n"));
if (CTRL_MODE(timer->control) == 3)
return timer->value & 0xfffe;
return timer->value;
@@ -756,7 +756,7 @@ READ8_MEMBER( pit8253_device::read )
UINT8 data;
UINT16 value;
- LOG2(("pit8253_r(): offset %d\n", offset));
+ LOG2(("read(): offset %d\n", offset));
if (timer == nullptr)
{
@@ -816,7 +816,7 @@ READ8_MEMBER( pit8253_device::read )
}
}
- LOG2(("pit8253: read(): offset=%d data=0x%02x\n", offset, data));
+ LOG2(("read(): offset=%d data=0x%02x\n", offset, data));
return data;
}
@@ -825,7 +825,7 @@ READ8_MEMBER( pit8253_device::read )
void pit8253_device::load_count(pit8253_timer *timer, UINT16 newcount)
{
int mode = CTRL_MODE(timer->control);
- LOG1(("pit8253: load_count(): %04x\n", newcount));
+ LOG1(("load_count(): %04x\n", newcount));
if (newcount == 1)
{
@@ -912,7 +912,7 @@ void pit8253_device::readback_command(UINT8 data)
void pit8254_device::readback_command(UINT8 data)
{
- LOG1(("pit8253: write(): readback %02x\n", data & 0x3f));
+ LOG1(("write(): readback %02x\n", data & 0x3f));
/* Bit 0 of data must be 0. Todo: find out what the hardware does if it isn't. */
int read_command = (data >> 4) & 3;
@@ -933,7 +933,7 @@ WRITE8_MEMBER( pit8253_device::write )
{
pit8253_timer *timer = get_timer(offset);
- LOG2(("pit8253: write(): offset=%d data=0x%02x\n", offset, data));
+ LOG2(("write(): offset=%d data=0x%02x\n", offset, data));
if (timer == nullptr)
{
@@ -949,7 +949,7 @@ WRITE8_MEMBER( pit8253_device::write )
if (CTRL_ACCESS(data) == 0)
{
- LOG1(("pit8253: write(): timer=%d readback\n", (data >> 6) & 3));
+ LOG1(("write(): timer=%d readback\n", (data >> 6) & 3));
/* Latch current timer value */
/* Experimentally verified: this command does not affect the mode control register */
@@ -957,7 +957,7 @@ WRITE8_MEMBER( pit8253_device::write )
}
else
{
- LOG1(("pit8253: write(): timer=%d bytes=%d mode=%d bcd=%d\n", (data >> 6) & 3, (data >> 4) & 3, (data >> 1) & 7, data & 1));
+ LOG1(("write(): timer=%d bytes=%d mode=%d bcd=%d\n", (data >> 6) & 3, (data >> 4) & 3, (data >> 1) & 7, data & 1));
timer->control = (data & 0x3f);
timer->null_count = 1;
@@ -1045,7 +1045,7 @@ void pit8253_device::gate_w(int gate, int state)
if (timer == nullptr)
return;
- LOG2(("pit8253 : gate_w(): gate=%d state=%d\n", gate, state));
+ LOG2(("gate_w(): gate=%d state=%d\n", gate, state));
if (state != timer->gate)
{
@@ -1084,7 +1084,7 @@ void pit8253_device::set_clockin(int timerno, double new_clockin)
pit8253_timer *timer = get_timer(timerno);
assert(timer != nullptr);
- LOG2(("pit8253_set_clockin(): PIT timer=%d, clockin = %f\n", timerno, new_clockin));
+ LOG2(("set_clockin(): PIT timer=%d, clockin = %f\n", timerno, new_clockin));
update(timer);
timer->clockin = new_clockin;
@@ -1097,7 +1097,7 @@ void pit8253_device::set_clock_signal(int timerno, int state)
pit8253_timer *timer = get_timer(timerno);
assert(timer != nullptr);
- LOG2(("pit8253_set_clock_signal(): PIT timer=%d, state = %d\n", timerno, state));
+ LOG2(("set_clock_signal(): PIT timer=%d, state = %d\n", timerno, state));
/* Trigger on low to high transition */
if (!timer->clock && state)
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index 73e7430a6ce..73a62b61f8d 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -77,7 +77,7 @@ protected:
private:
// device state
UINT32 m_size;
- dynamic_buffer m_pointer;
+ std::vector<UINT8> m_pointer;
// device config
const char *m_default_size;
diff --git a/src/devices/machine/roc10937.cpp b/src/devices/machine/roc10937.cpp
index c76e02f13e6..c932002e310 100644
--- a/src/devices/machine/roc10937.cpp
+++ b/src/devices/machine/roc10937.cpp
@@ -125,8 +125,6 @@ static const int roc10937poslut[]=
0//15
};
-const device_type ROC10937 = &device_creator<roc10937_t>;
-
rocvfd_t::rocvfd_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
{
@@ -246,6 +244,8 @@ void rocvfd_t::shift_clock(int state)
}
///////////////////////////////////////////////////////////////////////////
+const device_type ROC10937 = &device_creator<roc10937_t>;
+
roc10937_t::roc10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: rocvfd_t(mconfig, ROC10937, "Rockwell 10937 VFD controller and compatible", tag, owner, clock, "roc10937", __FILE__)
{
@@ -260,6 +260,22 @@ msc1937_t::msc1937_t(const machine_config &mconfig, const char *tag, device_t *o
m_port_val=0;
}
+const device_type MIC10937 = &device_creator<mic10937_t>;
+
+mic10937_t::mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : rocvfd_t(mconfig, MIC10937, "Micrel MIC10937 VFD controller", tag, owner, clock, "mic10937", __FILE__)
+{
+ m_port_val=0;
+}
+
+const device_type S16LF01 = &device_creator<s16lf01_t>;
+
+s16lf01_t::s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : rocvfd_t(mconfig, S16LF01, "Samsung 16LF01 Series VFD controller and compatible", tag, owner, clock, "s16lf01", __FILE__)
+{
+ m_port_val=0;
+}
+
void rocvfd_t::write_char(int data)
{
if ( data & 0x80 )
@@ -378,11 +394,3 @@ void roc10957_t::write_char(int data)
}
}
}
-
-const device_type S16LF01 = &device_creator<s16lf01_t>;
-
-s16lf01_t::s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : rocvfd_t(mconfig, S16LF01, "Samsung 16LF01 Series VFD controller and compatible", tag, owner, clock, "s16lf01", __FILE__)
-{
- m_port_val=0;
-}
diff --git a/src/devices/machine/roc10937.h b/src/devices/machine/roc10937.h
index 3acf90726b0..403b1bc98de 100644
--- a/src/devices/machine/roc10937.h
+++ b/src/devices/machine/roc10937.h
@@ -40,6 +40,16 @@
#define MCFG_MSC1937_REMOVE(_tag) \
MCFG_DEVICE_REMOVE(_tag)
+#define MCFG_MIC10937_ADD(_tag,_val) \
+ MCFG_DEVICE_ADD(_tag, MIC10937,60)\
+ MCFG_MIC10937_PORT(_val)
+
+#define MCFG_MIC10937_PORT(_val) \
+ MCFG_ROC10937_PORT(_val)
+
+#define MCFG_MIC10937_REMOVE(_tag) \
+ MCFG_DEVICE_REMOVE(_tag)
+
#define MCFG_S16LF01_ADD(_tag,_val) \
MCFG_DEVICE_ADD(_tag, S16LF01,60)\
MCFG_S16LF01_PORT(_val)
@@ -95,6 +105,11 @@ public:
msc1937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
+class mic10937_t : public rocvfd_t {
+public:
+ mic10937_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
class roc10957_t : public rocvfd_t {
public:
roc10957_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -109,6 +124,7 @@ public:
extern const device_type ROC10937;
extern const device_type MSC1937;
+extern const device_type MIC10937;
extern const device_type ROC10957;
extern const device_type S16LF01;
diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp
index f3112eab607..b2280909fa5 100644
--- a/src/devices/machine/rp5c01.cpp
+++ b/src/devices/machine/rp5c01.cpp
@@ -201,6 +201,12 @@ void rp5c01_device::device_start()
m_16hz_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
}
+ memset(m_reg, 0, sizeof(m_reg));
+ memset(m_ram, 0, sizeof(m_ram));
+
+ // 24 hour mode
+ m_reg[MODE01][REGISTER_12_24_SELECT] = 1;
+
// state saving
save_item(NAME(m_reg[MODE00]));
save_item(NAME(m_reg[MODE01]));
@@ -214,20 +220,6 @@ void rp5c01_device::device_start()
//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void rp5c01_device::device_reset()
-{
- memset(m_reg, 0, sizeof(m_reg));
- memset(m_ram, 0, sizeof(m_ram));
-
- // 24 hour mode
- m_reg[MODE01][REGISTER_12_24_SELECT] = 1;
-}
-
-
-//-------------------------------------------------
// device_timer - handler timer events
//-------------------------------------------------
diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h
index cba2566fcab..0043cc19b6c 100644
--- a/src/devices/machine/rp5c01.h
+++ b/src/devices/machine/rp5c01.h
@@ -23,6 +23,7 @@
#ifndef __RP5C01__
#define __RP5C01__
+#include "emu.h"
#include "dirtc.h"
@@ -64,7 +65,6 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
- virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_rtc_interface overrides
diff --git a/src/devices/machine/rp5c15.h b/src/devices/machine/rp5c15.h
index 4aa3c721662..4a10eaeae3c 100644
--- a/src/devices/machine/rp5c15.h
+++ b/src/devices/machine/rp5c15.h
@@ -23,6 +23,7 @@
#ifndef __RP5C15__
#define __RP5C15__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/rtc4543.h b/src/devices/machine/rtc4543.h
index bd94c2eb918..9a252424eb2 100644
--- a/src/devices/machine/rtc4543.h
+++ b/src/devices/machine/rtc4543.h
@@ -12,6 +12,7 @@
#ifndef __RTC4543_H__
#define __RTC4543_H__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/s3c2400.cpp b/src/devices/machine/s3c2400.cpp
index 157e13bbf85..8b9d4da016c 100644
--- a/src/devices/machine/s3c2400.cpp
+++ b/src/devices/machine/s3c2400.cpp
@@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2400.h"
-#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/s3c2410.cpp b/src/devices/machine/s3c2410.cpp
index 24d6664dea3..c036b1f362c 100644
--- a/src/devices/machine/s3c2410.cpp
+++ b/src/devices/machine/s3c2410.cpp
@@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2410.h"
-#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/s3c2440.cpp b/src/devices/machine/s3c2440.cpp
index fece3da05ab..9ad23516c8d 100644
--- a/src/devices/machine/s3c2440.cpp
+++ b/src/devices/machine/s3c2440.cpp
@@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c2440.h"
-#include "sound/dac.h"
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp
index bf81606cf12..7660918e1a5 100644
--- a/src/devices/machine/s3c44b0.cpp
+++ b/src/devices/machine/s3c44b0.cpp
@@ -12,7 +12,6 @@
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "machine/s3c44b0.h"
-#include "sound/dac.h"
#include "coreutil.h"
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h
index 9d3654fc9c3..e72432cc109 100644
--- a/src/devices/machine/serflash.h
+++ b/src/devices/machine/serflash.h
@@ -88,7 +88,7 @@ protected:
UINT16 m_flash_page_index;
- dynamic_buffer m_flashwritemap;
+ std::vector<UINT8> m_flashwritemap;
UINT8 m_last_flash_cmd;
diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp
index aed8d46aea1..84b9cd8fb51 100644
--- a/src/devices/machine/stvcd.cpp
+++ b/src/devices/machine/stvcd.cpp
@@ -1540,7 +1540,7 @@ void saturn_state::cd_free_block(blockT *blktofree)
{
INT32 i;
- CDROM_LOG(("cd_free_block: %x\n", (UINT32)(FPTR)blktofree))
+ CDROM_LOG(("cd_free_block: %x\n", (UINT32)(uintptr_t)blktofree))
if(blktofree == nullptr)
{
@@ -2142,7 +2142,7 @@ void saturn_state::make_dir_current(UINT32 fad)
{
int i;
UINT32 nextent, numentries;
- dynamic_buffer sect(MAX_DIR_SIZE);
+ std::vector<UINT8> sect(MAX_DIR_SIZE);
direntryT *curentry;
memset(&sect[0], 0, MAX_DIR_SIZE);
diff --git a/src/devices/machine/timehelp.h b/src/devices/machine/timehelp.h
new file mode 100644
index 00000000000..38adfdee502
--- /dev/null
+++ b/src/devices/machine/timehelp.h
@@ -0,0 +1,51 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles,smf
+/***************************************************************************
+
+ timehelp.h
+
+ Assorted shared functionality between timekeeping chips and RTCs.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef SRC_DEVICES_MACHINE_TIMEHELP_H
+#define SRC_DEVICES_MACHINE_TIMEHELP_H
+
+class time_helper
+{
+public:
+ static inline UINT8 make_bcd(UINT8 data)
+ {
+ return (((data / 10) % 10) << 4) + (data % 10);
+ }
+
+ static inline UINT8 from_bcd(UINT8 data)
+ {
+ return (((data >> 4) & 15) * 10) + (data & 15);
+ }
+
+ static int inc_bcd(UINT8 *data, int mask, int min, int max)
+ {
+ int bcd = (*data + 1) & mask;
+ int carry = 0;
+
+ if ((bcd & 0x0f) > 9)
+ {
+ bcd &= 0xf0;
+ bcd += 0x10;
+ if (bcd > max)
+ {
+ bcd = min;
+ carry = 1;
+ }
+ }
+
+ *data = (*data & ~mask) | (bcd & mask);
+ return carry;
+ }
+
+};
+
+#endif // SRC_DEVICES_MACHINE_TIMEHELP_H \ No newline at end of file
diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp
index 4b87d43ff69..e11cd089b1c 100644
--- a/src/devices/machine/timekpr.cpp
+++ b/src/devices/machine/timekpr.cpp
@@ -16,7 +16,7 @@
#include "emu.h"
#include "machine/timekpr.h"
-
+#include "machine/timehelp.h"
// device type definition
const device_type M48T02 = &device_creator<m48t02_device>;
@@ -63,39 +63,6 @@ const device_type MK48T12 = &device_creator<mk48t12_device>;
INLINE FUNCTIONS
***************************************************************************/
-static inline UINT8 make_bcd(UINT8 data)
-{
- return ( ( ( data / 10 ) % 10 ) << 4 ) + ( data % 10 );
-}
-
-static inline UINT8 from_bcd( UINT8 data )
-{
- return ( ( ( data >> 4 ) & 15 ) * 10 ) + ( data & 15 );
-}
-
-static int inc_bcd( UINT8 *data, int mask, int min, int max )
-{
- int bcd;
- int carry;
-
- bcd = ( *( data ) + 1 ) & mask;
- carry = 0;
-
- if( ( bcd & 0x0f ) > 9 )
- {
- bcd &= 0xf0;
- bcd += 0x10;
- if( bcd > max )
- {
- bcd = min;
- carry = 1;
- }
- }
-
- *( data ) = ( *( data ) & ~mask ) | ( bcd & mask );
- return carry;
-}
-
static void counter_to_ram( UINT8 *data, int offset, int counter )
{
if( offset >= 0 )
@@ -233,14 +200,14 @@ void timekeeper_device::device_start()
machine().base_datetime(systime);
m_control = 0;
- m_seconds = make_bcd( systime.local_time.second );
- m_minutes = make_bcd( systime.local_time.minute );
- m_hours = make_bcd( systime.local_time.hour );
- m_day = make_bcd( systime.local_time.weekday + 1 );
- m_date = make_bcd( systime.local_time.mday );
- m_month = make_bcd( systime.local_time.month + 1 );
- m_year = make_bcd( systime.local_time.year % 100 );
- m_century = make_bcd( systime.local_time.year / 100 );
+ m_seconds = time_helper::make_bcd( systime.local_time.second );
+ m_minutes = time_helper::make_bcd( systime.local_time.minute );
+ m_hours = time_helper::make_bcd( systime.local_time.hour );
+ m_day = time_helper::make_bcd( systime.local_time.weekday + 1 );
+ m_date = time_helper::make_bcd( systime.local_time.mday );
+ m_month = time_helper::make_bcd( systime.local_time.month + 1 );
+ m_year = time_helper::make_bcd( systime.local_time.year % 100 );
+ m_century = time_helper::make_bcd( systime.local_time.year / 100 );
m_data.resize( m_size );
save_item( NAME(m_control) );
@@ -298,14 +265,14 @@ void timekeeper_device::device_timer(emu_timer &timer, device_timer_id id, int p
return;
}
- int carry = inc_bcd( &m_seconds, MASK_SECONDS, 0x00, 0x59 );
+ int carry = time_helper::inc_bcd( &m_seconds, MASK_SECONDS, 0x00, 0x59 );
if( carry )
{
- carry = inc_bcd( &m_minutes, MASK_MINUTES, 0x00, 0x59 );
+ carry = time_helper::inc_bcd( &m_minutes, MASK_MINUTES, 0x00, 0x59 );
}
if( carry )
{
- carry = inc_bcd( &m_hours, MASK_HOURS, 0x00, 0x23 );
+ carry = time_helper::inc_bcd( &m_hours, MASK_HOURS, 0x00, 0x23 );
}
if( carry )
@@ -313,10 +280,10 @@ void timekeeper_device::device_timer(emu_timer &timer, device_timer_id id, int p
UINT8 maxdays;
static const UINT8 daysinmonth[] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
- inc_bcd( &m_day, MASK_DAY, 0x01, 0x07 );
+ time_helper::inc_bcd( &m_day, MASK_DAY, 0x01, 0x07 );
- UINT8 month = from_bcd( m_month );
- UINT8 year = from_bcd( m_year );
+ UINT8 month = time_helper::from_bcd( m_month );
+ UINT8 year = time_helper::from_bcd( m_year );
if( month == 2 && ( year % 4 ) == 0 )
{
@@ -331,19 +298,19 @@ void timekeeper_device::device_timer(emu_timer &timer, device_timer_id id, int p
maxdays = 0x31;
}
- carry = inc_bcd( &m_date, MASK_DATE, 0x01, maxdays );
+ carry = time_helper::inc_bcd( &m_date, MASK_DATE, 0x01, maxdays );
}
if( carry )
{
- carry = inc_bcd( &m_month, MASK_MONTH, 0x01, 0x12 );
+ carry = time_helper::inc_bcd( &m_month, MASK_MONTH, 0x01, 0x12 );
}
if( carry )
{
- carry = inc_bcd( &m_year, MASK_YEAR, 0x00, 0x99 );
+ carry = time_helper::inc_bcd( &m_year, MASK_YEAR, 0x00, 0x99 );
}
if( carry )
{
- carry = inc_bcd( &m_century, MASK_CENTURY, 0x00, 0x99 );
+ carry = time_helper::inc_bcd( &m_century, MASK_CENTURY, 0x00, 0x99 );
if( type() == M48T35 ||
type() == M48T58 )
diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h
index f6ecb8dcbfc..e0e9aa6e60d 100644
--- a/src/devices/machine/timekpr.h
+++ b/src/devices/machine/timekpr.h
@@ -91,7 +91,7 @@ private:
UINT8 m_year;
UINT8 m_century;
- dynamic_buffer m_data;
+ std::vector<UINT8> m_data;
optional_region_ptr<UINT8> m_default_data;
protected:
diff --git a/src/devices/machine/upd1990a.h b/src/devices/machine/upd1990a.h
index 9071d843cc2..a526e920017 100644
--- a/src/devices/machine/upd1990a.h
+++ b/src/devices/machine/upd1990a.h
@@ -21,6 +21,7 @@
#ifndef __UPD1990A__
#define __UPD1990A__
+#include "emu.h"
#include "dirtc.h"
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 3d6aa9cf19e..251596f6fac 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -53,10 +53,10 @@ DONE (x) (p=partly) NMOS CMOS ESCC EMSCC
DPLL clock recov Y Y Y Y
-- Additional features CMOS versions -----------------------------------
x Status FIFO N Y Y Y
- SWI ack feat N Y Y Y
+ x SWI ack feat N Y Y Y
higher bps w ext DPLL N 32Mbps 32Mbps 32Mbps
-- Additional features 85C30 -------------------------------------------
- New WR7 feat N 85C30 Y Y
+ x New WR7 feat N 85C30 Y Y
Improved SDLC N 85C30 Y Y
Improved reg handl N 85C30 Y Y
Improved auto feat N 85C30 Y Y
@@ -81,9 +81,11 @@ DONE (x) (p=partly) NMOS CMOS ESCC EMSCC
#define VERBOSE 0
#define LOGPRINT(x) do { if (VERBOSE) logerror x; } while (0)
#define LOG(x) LOGPRINT(x)
-#define LOGR(x)
+#define LOGR(x) LOGPRINT(x)
#define LOGSETUP(x) LOGPRINT(x)
-#define LOGRCV(x) LOGPRINT(x)
+#define LOGINT(x) {} LOGPRINT(x)
+#define LOGTX(x) {} LOGPRINT(x)
+#define LOGRCV(x){}
#if VERBOSE == 2
#define logerror printf
#endif
@@ -250,6 +252,8 @@ void z80scc_device::device_start()
// state saving
save_item(NAME(m_int_state));
+ save_item(NAME(m_int_source));
+ save_item(NAME(m_wr9));
save_item(NAME(m_wr0_ptrbits));
LOG((" - SCC variant %02x\n", m_variant));
}
@@ -263,40 +267,58 @@ void z80scc_device::device_reset()
{
LOG(("%s %s \n",tag(), FUNCNAME));
+ // Do channel reset on both channels
m_chanA->reset();
m_chanB->reset();
+
+ // Fix hardware reset values for registers where it differs from channel reset values
+ m_wr9 &= 0x3c;
+ m_wr9 |= 0xc0;
+ m_chanA->m_wr10 = 0x00;
+ m_chanB->m_wr10 = 0x00;
+ m_chanA->m_wr11 = 0x08;
+ m_chanB->m_wr11 = 0x08;
+ m_chanA->m_wr14 &= 0xf0;
+ m_chanA->m_wr14 |= 0x30;
+ m_chanB->m_wr14 &= 0xf0;
+ m_chanB->m_wr14 |= 0x30;
}
/*
* Interrupts
Each of the SCC's two channels contain three sources of interrupts, making a total of six interrupt
sources. These three sources of interrupts are: 1) Receiver, 2) Transmitter, and 3) External/Status
-conditions. In addition, there are several conditions that may cause these interrupts.*/
+conditions. In addition, there are several conditions that may cause these interrupts.
+
+To allow for control over the daisy chain, the SCC has a Disable Lower Chain (DLC) software command (WR9 bit 2)
+that pulls IEO Low. This selectively deactivates parts of the daisy chain regardless of the interrupt status.
+*/
//-------------------------------------------------
// z80daisy_irq_state - get interrupt status
//-------------------------------------------------
-
int z80scc_device::z80daisy_irq_state()
{
int state = 0;
- int i;
LOG(("%s %s A:%d%d%d B:%d%d%d ",tag(), FUNCNAME,
m_int_state[0], m_int_state[1], m_int_state[2],
m_int_state[3], m_int_state[4], m_int_state[5]));
// loop over all interrupt sources
- for (i = 0; i < 6; i++)
+ for (auto & elem : m_int_state)
{
// if we're servicing a request, don't indicate more interrupts
- if (m_int_state[i] & Z80_DAISY_IEO)
+ if (elem & Z80_DAISY_IEO)
{
state |= Z80_DAISY_IEO;
break;
}
- state |= m_int_state[i];
+ state |= elem;
}
+ // Last chance to keep the control of the interrupt line
+ state |= (m_wr9 & z80scc_channel::WR9_BIT_DLC) ? Z80_DAISY_IEO : 0;
+
LOG(("Interrupt State %u\n", state));
return state;
@@ -309,57 +331,46 @@ int z80scc_device::z80daisy_irq_state()
int z80scc_device::z80daisy_irq_ack()
{
- int i;
-
- LOG(("%s %s - needs fixing for SCC\n",tag(), FUNCNAME));
-
// loop over all interrupt sources
- for (i = 0; i < 6; i++)
+ for (auto & elem : m_int_state)
{
// find the first channel with an interrupt requested
- if (m_int_state[i] & Z80_DAISY_INT)
+ if (elem & Z80_DAISY_INT)
{
- // clear interrupt, switch to the IEO state, and update the IRQs
- m_int_state[i] = Z80_DAISY_IEO;
- //m_chanA->m_rr0 &= ~z80scc_channel::RR0_INTERRUPT_PENDING;
+ elem = Z80_DAISY_IEO; // Set IUS bit (called IEO in z80 daisy lingo)
check_interrupts();
-
- //LOG(("%s %s : Interrupt Acknowledge Vector %02x\n",tag(), FUNCNAME, m_chanB->m_rr2));
-
- return m_chanB->m_rr2;
+ LOGINT((" - Found an INT request, "));
+ if (m_wr9 & z80scc_channel::WR9_BIT_VIS)
+ {
+ LOGINT(("but WR9 D1 set to use autovector, returning -1\n"));
+ return -1;
+ }
+ else
+ {
+ LOGINT(("returning RR2: %02x\n", m_chanB->m_rr2 ));
+ return m_chanB->m_rr2;
+ }
}
}
//logerror("z80scc_irq_ack: failed to find an interrupt to ack!\n");
- return m_chanB->m_rr2;
+ return -1;
}
//-------------------------------------------------
// z80daisy_irq_reti - return from interrupt
//-------------------------------------------------
-
+/*
+"SCC Interrupt Daisy-Chain Operation
+In the SCC, the IUS bit normally controls the state of the IEO line. The IP bit affects the daisy
+chain only during an Interrupt Acknowledge cycle. Since the IP bit is normally not part of the SCC
+interrupt daisy chain, there is no need to decode the RETI instruction. To allow for control over the
+daisy chain, the SCC has a Disable Lower Chain (DLC) software command (WR9 bit 2) that pulls IEO Low."
+*/
void z80scc_device::z80daisy_irq_reti()
{
- int i;
-
- LOG(("%s %s \n",tag(), FUNCNAME));
-
- // loop over all interrupt sources
- for (i = 0; i < 6; i++)
- {
- // find the first channel with an IEO pending
- if (m_int_state[i] & Z80_DAISY_IEO)
- {
- // clear the IEO state and update the IRQs
- m_int_state[i] &= ~Z80_DAISY_IEO;
- check_interrupts();
- return;
- }
- }
-
- //logerror("z80scc_irq_reti: failed to find an interrupt to clear IEO on!\n");
}
@@ -394,29 +405,33 @@ void z80scc_device::reset_interrupts()
UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src)
{
- /*
- Interrupt Vector Modification
- V3 V2 V1 Status High/Status Low =0
- V4 V5 V6 Status High/Status Low =1
- 0 0 0 Ch B Transmit Buffer Empty
- 0 0 1 Ch B External/Status Change
- 0 1 0 Ch B Receive Char. Available
- 0 1 1 Ch B Special Receive Condition
- 1 0 0 Ch A Transmit Buffer Empty
- 1 0 1 Ch A External/Status Change
- 1 1 0 Ch A Receive Char. Available
- 1 1 1 Ch A Special Receive Condition
- */
- // Add channel offset according to table above
+ /*
+ Interrupt Vector Modification
+ V3 V2 V1 Status High/Status Low =0
+ V4 V5 V6 Status High/Status Low =1
+ 0 0 0 Ch B Transmit Buffer Empty
+ 0 0 1 Ch B External/Status Change
+ 0 1 0 Ch B Receive Char. Available
+ 0 1 1 Ch B Special Receive Condition
+ 1 0 0 Ch A Transmit Buffer Empty
+ 1 0 1 Ch A External/Status Change
+ 1 1 0 Ch A Receive Char. Available
+ 1 1 1 Ch A Special Receive Condition
+ */
+
+ // Add channel offset according to table above
+ src &= 3;
src |= (i == CHANNEL_A ? 0x04 : 0x00 );
// Modify vector according to Hi/lo bit of WR9
- if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_SHSL) // Affect V4-V6
+ if (m_wr9 & z80scc_channel::WR9_BIT_SHSL) // Affect V4-V6
{
+ vec &= 0x8f;
vec |= src << 4;
}
else // Affect V1-V3
{
+ vec &= 0xf1;
vec |= src << 1;
}
return vec;
@@ -428,7 +443,7 @@ UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src)
//-------------------------------------------------
void z80scc_device::trigger_interrupt(int index, int state)
{
- UINT8 vector = m_chanB->m_wr2;
+ UINT8 vector = m_chanA->m_rr2;
UINT8 source = 0;
int priority;
@@ -437,7 +452,7 @@ void z80scc_device::trigger_interrupt(int index, int state)
LOG(("%s %s:%c %02x \n",FUNCNAME, tag(), 'A' + index, state));
/* The Master Interrupt Enable (MIE) bit, WR9 D3, must be set to enable the SCC to generate interrupts.*/
- if (!(m_chanA->m_wr9 & z80scc_channel::WR9_BIT_MIE))
+ if (!(m_wr9 & z80scc_channel::WR9_BIT_MIE))
{
LOG(("Master Interrupt Enable is not set, blocking attempt to interrupt\n"));
return;
@@ -452,6 +467,12 @@ void z80scc_device::trigger_interrupt(int index, int state)
source = 2;
prio_level = 2;
break;
+ case z80scc_channel::INT_EXTERNAL:
+ /* The External/status interrupts have several sources which may be individually enabled in WR15.
+ The sources are zero count, /DCD, Sync/Hunt, /CTS, transmitter under-run/EOM and Break/Abort.*/
+ source = 1;
+ prio_level = 0;
+ break;
case z80scc_channel::INT_TRANSMIT:
/*The NMOS/CMOS version of the SCC only has a one byte deep transmit buffer. The status of the
transmit buffer can be determined through TBE bit in RR0, bit D2, which shows whether the
@@ -483,15 +504,15 @@ void z80scc_device::trigger_interrupt(int index, int state)
}
// Vector modification requested?
- if (m_chanA->m_wr9 & z80scc_channel::WR9_BIT_VIS)
+ if (m_wr9 & z80scc_channel::WR9_BIT_VIS)
{
vector = modify_vector(vector, index, source);
}
LOG((" Interrupt Request fired of type %u and vector %02x\n", state, vector));
- // update vector register // TODO: What if interrupts are nested? May we loose the modified vector or even get the wrong one?
- m_chanB->m_wr2 = vector;
+ // update vector register
+ m_chanB->m_rr2 = vector;
/* Check the interrupt source and build the vector modification */
/*Interrupt Source Priority order
@@ -508,8 +529,12 @@ void z80scc_device::trigger_interrupt(int index, int state)
// trigger interrupt
m_int_state[priority] |= Z80_DAISY_INT;
- // Based on the fact that prio levels are aligned with the bitorder of rr3 we can do this... TODO: field needs blanking?
- m_chanA->m_rr3 |= (prio_level << (index == CHANNEL_A ? 3 : 0 ));
+ // remember the source
+ m_int_source[priority] = source;
+
+ // Based on the fact that prio levels are aligned with the bitorder of rr3 we can do this...
+ m_chanA->m_rr3 &= ~( 0x07 << (index == CHANNEL_A ? 3 : 0 ));
+ m_chanA->m_rr3 |= (prio_level << (index == CHANNEL_A ? 3 : 0 ));
// check for interrupt
check_interrupts();
@@ -527,6 +552,72 @@ int z80scc_device::m1_r()
//-------------------------------------------------
+// zbus_r - Z-Bus read
+//-------------------------------------------------
+READ8_MEMBER( z80scc_device::zbus_r )
+{
+ int ba = 0;
+ int reg = 0x20; // Default point to a non register number
+ UINT8 data = 0;
+
+ /* Expell non- Z-Bus variants */
+ if ( !(m_variant & SET_Z80X30))
+ {
+ logerror(" zbus_r not supported by this device variant, you should probably use the universal bus variants c*_r/w and d*_r/w (see z80scc.h)\n");
+ return data;
+ }
+
+ switch ((m_chanB->m_wr0) & 7)
+ {
+ case z80scc_channel::WR0_Z_SEL_SHFT_LEFT: ba = offset & 0x01; reg = (offset >> 1) & 0x0f; break; /* Shift Left mode */
+ case z80scc_channel::WR0_Z_SEL_SHFT_RIGHT: ba = offset & 0x10; reg = (offset >> 1) & 0x0f; break; /* Shift Right mode */
+ default:
+ logerror("Malformed Z-bus SCC read: offset %02x WR0 bits %02x\n", offset, m_chanB->m_wr0);
+ LOG(("Malformed Z-bus SCC read: offset %02x WR0 bits %02x\n", offset, m_chanB->m_wr0));
+ return data;
+ }
+
+ if (ba == 0)
+ data = m_chanB->scc_register_read(reg);
+ else
+ data = m_chanA->scc_register_read(reg);
+
+ return data;
+}
+
+//-------------------------------------------------
+// zbus_w - Z-Bus write
+//-------------------------------------------------
+WRITE8_MEMBER( z80scc_device::zbus_w )
+{
+ int ba = 0;
+ int reg = 0x20; // Default point to a non register number
+
+ /* Expell non- Z-Bus variants */
+ if ( !(m_variant & SET_Z80X30))
+ {
+ logerror(" zbus_w not supported by this device variant, you should probably use the universal bus variants c*_r/w and d*_r/w (see z80scc.h)\n");
+ return;
+ }
+
+ switch ((m_chanB->m_wr0) & 7)
+ {
+ case z80scc_channel::WR0_Z_SEL_SHFT_LEFT: ba = offset & 0x01; reg = (offset >> 1) & 0x0f; break; /* Shift Left mode */
+ case z80scc_channel::WR0_Z_SEL_SHFT_RIGHT: ba = offset & 0x10; reg = (offset >> 1) & 0x0f; break; /* Shift Right mode */
+ default:
+ logerror("Malformed Z-bus SCC write: offset %02x WR0 bits %02x\n", offset, m_chanB->m_wr0);
+ LOG(("Malformed Z-bus SCC write: offset %02x WR0 bits %02x\n", offset, m_chanB->m_wr0));
+ }
+
+ if (ba == 0)
+ m_chanB->scc_register_write(reg, data);
+ else
+ m_chanA->scc_register_write(reg, data);
+
+ return;
+}
+
+//-------------------------------------------------
// cd_ba_r - Universal Bus read
//-------------------------------------------------
READ8_MEMBER( z80scc_device::cd_ba_r )
@@ -593,7 +684,7 @@ READ8_MEMBER( z80scc_device::ba_cd_r )
//-------------------------------------------------
-// ba_cd_w -
+// ba_cd_w - Universal Bus write
//-------------------------------------------------
WRITE8_MEMBER( z80scc_device::ba_cd_w )
@@ -618,7 +709,7 @@ WRITE8_MEMBER( z80scc_device::ba_cd_w )
}
//-------------------------------------------------
-// ba_cd_r - Universal Bus read
+// ba_cd_inv_r - Universal Bus read
//-------------------------------------------------
READ8_MEMBER( z80scc_device::ba_cd_inv_r )
@@ -640,7 +731,7 @@ READ8_MEMBER( z80scc_device::ba_cd_inv_r )
//-------------------------------------------------
-// ba_cd_w -
+// ba_cd_inv_w - Universal Bus read
//-------------------------------------------------
WRITE8_MEMBER( z80scc_device::ba_cd_inv_w )
@@ -690,7 +781,6 @@ z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, d
m_rxd(0),
m_cts(0),
m_dcd(0),
- m_tx_data(0),
m_tx_clock(0),
m_dtr(0),
m_rts(0),
@@ -702,16 +792,19 @@ z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, d
LOG(("%s\n",FUNCNAME));
// Reset all registers
- m_rr0 = m_rr1 = m_rr2 = m_rr3 = m_rr4 = m_rr5 = m_rr6 = m_rr7 = m_rr8
+ m_rr0 = m_rr1 = m_rr2 = m_rr3 = m_rr4 = m_rr5 = m_rr6 = m_rr7 = m_rr7p = m_rr8
= m_rr9 = m_rr10 = m_rr11 = m_rr12 = m_rr13 = m_rr14 = m_rr15 = 0;
- m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = m_wr8
- = m_wr9 = m_wr10 = m_wr11 = m_wr12 = m_wr13 = m_wr14 = m_wr15 = 0;
+ m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = m_wr7p = m_wr8
+ = m_wr10 = m_wr11 = m_wr12 = m_wr13 = m_wr14 = m_wr15 = 0;
- for (int i = 0; i < 3; i++) // TODO adapt to SCC fifos
- {
- m_rx_data_fifo[i] = 0;
- m_rx_error_fifo[i] = 0;
- }
+ for (auto & elem : m_rx_data_fifo)
+ elem = 0;
+ for (auto & elem : m_rx_error_fifo) // TODO: Status FIFO needs to be fixed
+ elem = 0;
+ for (auto & elem : m_tx_data_fifo)
+ elem = 0;
+ for (auto & elem : m_tx_error_fifo) // TODO: Status FIFO needs to be fixed
+ elem = 0;
}
@@ -730,6 +823,9 @@ void z80scc_channel::device_start()
m_rx_fifo_sz = (m_uart->m_variant & SET_ESCC) ? 8 : 3;
m_rx_fifo_wp = m_rx_fifo_rp = 0;
+ m_tx_fifo_sz = (m_uart->m_variant & SET_ESCC) ? 4 : 1;
+ m_tx_fifo_wp = m_tx_fifo_rp = 0;
+
#if LOCAL_BRG
// baudrate clocks and timers
baudtimer = timer_alloc(TIMER_ID_BAUD);
@@ -744,6 +840,7 @@ void z80scc_channel::device_start()
save_item(NAME(m_rr5));
save_item(NAME(m_rr6));
save_item(NAME(m_rr7));
+ save_item(NAME(m_rr7p));
save_item(NAME(m_rr8));
save_item(NAME(m_rr9));
save_item(NAME(m_rr10));
@@ -760,16 +857,21 @@ void z80scc_channel::device_start()
save_item(NAME(m_wr5));
save_item(NAME(m_wr6));
save_item(NAME(m_wr7));
+ save_item(NAME(m_wr7p));
save_item(NAME(m_wr8));
- save_item(NAME(m_wr9));
save_item(NAME(m_wr10));
save_item(NAME(m_wr11));
save_item(NAME(m_wr12));
save_item(NAME(m_wr13));
save_item(NAME(m_wr14));
save_item(NAME(m_wr15));
+ save_item(NAME(m_tx_data_fifo));
+ save_item(NAME(m_tx_error_fifo)); // TODO: Status FIFO needs to be fixed
+ save_item(NAME(m_tx_fifo_rp));
+ save_item(NAME(m_tx_fifo_wp));
+ save_item(NAME(m_tx_fifo_sz));
save_item(NAME(m_rx_data_fifo));
- save_item(NAME(m_rx_error_fifo));
+ save_item(NAME(m_rx_error_fifo)); // TODO: Status FIFO needs to be fixed
save_item(NAME(m_rx_fifo_rp));
save_item(NAME(m_rx_fifo_wp));
save_item(NAME(m_rx_fifo_sz));
@@ -780,7 +882,6 @@ void z80scc_channel::device_start()
save_item(NAME(m_ri));
save_item(NAME(m_cts));
save_item(NAME(m_dcd));
- save_item(NAME(m_tx_data));
save_item(NAME(m_tx_clock));
save_item(NAME(m_dtr));
save_item(NAME(m_rts));
@@ -802,41 +903,32 @@ void z80scc_channel::device_reset()
receive_register_reset();
transmit_register_reset();
- // Soft/Channel Reset values according to SCC users manual
+ // Soft/Channel Reset values (mostly) according to SCC users manual
m_wr0 = 0x00;
m_wr1 &= 0x24;
m_wr3 &= 0x01;
- m_wr4 |= 0x04;
- m_wr5 &= 0x61;
+ m_wr4 = 0x04;
+ m_wr5 = 0x00;
if (m_uart->m_variant & (z80scc_device::TYPE_SCC85C30 | SET_ESCC))
m_wr7 = 0x20;
- m_wr9 &= 0xdf; // WR9 has a different hard reset value
- m_wr10 &= 0x60; // WR10 has a different hard reset value
- m_wr11 &= 0xff; // WR11 has a different hard reset value
- m_wr14 &= 0xc3; // WR14 has a different hard reset value
+ // WR9,WR10,WR11 and WR14 has a different hard reset (see z80scc_device::device_reset()) values
+ m_uart->m_wr9 &= 0xdf;
+ m_wr10 &= 0x60;
+ m_wr11 &= 0xff;
+ m_wr14 &= 0xc3;
m_wr14 |= 0x20;
m_wr15 = 0xf8;
m_rr0 &= 0xfc;
m_rr0 |= 0x44;
m_rr1 &= 0x07;
- m_rr1 |= 0x06;
+ m_rr1 |= 0x06; // Required reset value
+ m_rr1 |= RR1_ALL_SENT; // It is a don't care in the SCC user manual but drivers hangs without it set
m_rr3 = 0x00;
m_rr10 &= 0x40;
-#if 1 // old reset code
- // disable receiver
- m_wr3 &= ~WR3_RX_ENABLE;
-
- // disable transmitter
- m_wr5 &= ~WR5_TX_ENABLE;
- m_rr0 |= RR0_TX_BUFFER_EMPTY;
-#endif
- // TODO: check dependencies on RR1_ALL_SENT and (re)move this setting
- m_rr1 |= RR1_ALL_SENT; // It is a don't care in the SCC user manual
-
- // reset external lines TODO: check relation to control bits and reset
- set_rts(1);
- set_dtr(1);
+ // reset external lines
+ set_rts(m_wr5 & WR5_RTS ? 0 : 1);
+ set_dtr(m_wr14 & WR14_DTR_REQ_FUNC ? 0 : (m_wr5 & WR5_DTR ? 0 : 1));
// reset interrupts
if (m_index == z80scc_device::CHANNEL_A)
@@ -931,23 +1023,48 @@ void z80scc_channel::tra_callback()
void z80scc_channel::tra_complete()
{
+ // Delayed baudrate change according to SCC specs
if ( m_delayed_tx_brg_change == 1)
{
m_delayed_tx_brg_change = 0;
set_tra_rate(m_brg_rate);
LOG(("Delayed setup - Baud Rate Generator: %d mode: %dx\n", m_brg_rate, get_clock_mode() ));
}
- if ((m_wr5 & WR5_TX_ENABLE) && !(m_wr5 & WR5_SEND_BREAK) && !(m_rr0 & RR0_TX_BUFFER_EMPTY))
- {
- LOG((LLFORMAT " %s() \"%s \"Channel %c Transmit Data Byte '%02x' m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, m_tx_data, m_wr5));
- transmit_register_setup(m_tx_data);
+ if ((m_wr5 & WR5_TX_ENABLE) && !(m_wr5 & WR5_SEND_BREAK))
+ {
+ if ( (m_rr0 & RR0_TX_BUFFER_EMPTY) == 0 || // Takes care of the NMOS/CMOS 1 slot TX FIFO
+ m_tx_fifo_rp != m_tx_fifo_wp) // or there are more characters to send in a longer FIFO.
+ {
+ LOGTX((" %s() %s %c done sending, loading data from fifo:%02x '%c'\n", FUNCNAME, m_owner->tag(), 'A' + m_index,
+ m_tx_data_fifo[m_tx_fifo_rp], isascii(m_tx_data_fifo[m_tx_fifo_rp]) ? m_tx_data_fifo[m_tx_fifo_rp] : ' '));
+ transmit_register_setup(m_tx_data_fifo[m_tx_fifo_rp]); // Reload the shift register
+ m_tx_fifo_rp_step();
+ m_rr0 |= RR0_TX_BUFFER_EMPTY; // Now here is room in the tx fifo again
+ }
+ else
+ {
+ LOGTX((" %s() %s %c done sending, setting all sent bit\n", FUNCNAME, m_owner->tag(), 'A' + m_index));
+ m_rr1 |= RR1_ALL_SENT;
- // empty transmit buffer
- m_rr0 |= RR0_TX_BUFFER_EMPTY;
+ // when the RTS bit is reset, the _RTS output goes high after the transmitter empties
+ if (!m_rts) // TODO: Clean up RTS handling
+ set_rts(1);
+ }
if (m_wr1 & WR1_TX_INT_ENABLE)
- m_uart->trigger_interrupt(m_index, INT_TRANSMIT);
+ {
+ if ((m_uart->m_variant & SET_ESCC) &&
+ (m_wr7p & WR7P_TX_FIFO_EMPTY) &&
+ m_tx_fifo_wp == m_tx_fifo_rp) // ESCC and fifo empty bit set and fifo is completelly empty?
+ {
+ m_uart->trigger_interrupt(m_index, INT_TRANSMIT); // Set TXIP bit
+ }
+ else if(m_rr0 & RR0_TX_BUFFER_EMPTY) // Check TBE bit and interrupt if one or more FIFO slots availble
+ {
+ m_uart->trigger_interrupt(m_index, INT_TRANSMIT); // Set TXIP bit
+ }
+ }
}
else if (m_wr5 & WR5_SEND_BREAK)
{
@@ -967,18 +1084,6 @@ void z80scc_channel::tra_complete()
else
m_uart->m_out_txdb_cb(1);
}
-
- // if transmit buffer is empty
- if (m_rr0 & RR0_TX_BUFFER_EMPTY)
- {
- LOG((LLFORMAT " %s() \"%s \"Channel %c Transmit buffer empty m_wr5:%02x\n", machine().firstcpu->total_cycles(), FUNCNAME, m_owner->tag(), 'A' + m_index, m_wr5));
- // then all characters have been sent
- m_rr1 |= RR1_ALL_SENT;
-
- // when the RTS bit is reset, the _RTS output goes high after the transmitter empties
- if (!m_rts)
- set_rts(1);
- }
}
@@ -1170,15 +1275,24 @@ UINT8 z80scc_channel::do_sccreg_rr2()
// If we are chan B we have to modify the vector regardless of the VIS bit
if (m_index == z80scc_device::CHANNEL_B)
{
+ int i = 0;
+
// loop over all interrupt sources
- for (int i = 0; i < 6; i++)
+ for (auto & elem : m_uart->m_int_state)
{
// find the first channel with an interrupt requested
- if (m_uart->m_int_state[i] & Z80_DAISY_INT)
+ if (elem & Z80_DAISY_INT)
{
- m_rr2 = m_uart->modify_vector(m_rr2, i < 3 ? z80scc_device::CHANNEL_A : z80scc_device::CHANNEL_B, i & 3);
+ m_rr2 = m_uart->modify_vector(m_rr2, i < 3 ? z80scc_device::CHANNEL_A : z80scc_device::CHANNEL_B, m_uart->m_int_source[i] & 3);
+ if ((m_uart->m_variant & (SET_ESCC | SET_CMOS)) && (m_uart->m_wr9 & WR9_BIT_IACK))
+ {
+ LOGINT((" - Found an INT request to ack while reading RR2\n"));
+ elem = Z80_DAISY_IEO; // Set IUS bit (called IEO in z80 daisy lingo)
+ m_uart->check_interrupts();
+ }
break;
}
+ i++;
}
}
return m_rr2;
@@ -1231,12 +1345,12 @@ UINT8 z80scc_channel::do_sccreg_rr5()
UINT8 z80scc_channel::do_sccreg_rr6()
{
LOGR(("%s\n", FUNCNAME));
- if (!(m_uart->m_variant & (SET_NMOS)))
+ if (m_wr15 & WR15_STATUS_FIFO)
{
- logerror(" %s() not implemented feature\n", FUNCNAME);
+ logerror(" - Status FIFO for synchronous mode - not implemented\n");
return 0;
}
- return m_rr2;
+ return m_rr2; /* Note that NMOS calls are redirected to do_sccreg_rr2() before getting here */
}
/* (not on NMOS)
@@ -1304,6 +1418,7 @@ UINT8 z80scc_channel::do_sccreg_rr11()
RR12 returns the value stored in WR12, the lower byte of the time constant, for the BRG.*/
UINT8 z80scc_channel::do_sccreg_rr12()
{
+ LOGR(("%s\n", FUNCNAME));
return m_wr12;
}
@@ -1311,6 +1426,7 @@ UINT8 z80scc_channel::do_sccreg_rr12()
RR13 returns the value stored in WR13, the upper byte of the time constant for the BRG. */
UINT8 z80scc_channel::do_sccreg_rr13()
{
+ LOGR(("%s\n", FUNCNAME));
return m_wr13;
}
@@ -1338,41 +1454,55 @@ UINT8 z80scc_channel::do_sccreg_rr15()
}
//-------------------------------------------------
-// control_read - read control register
+// scc_register_read - read a SCC register
//-------------------------------------------------
-UINT8 z80scc_channel::control_read()
+UINT8 z80scc_channel::scc_register_read( UINT8 reg)
{
+ if (reg > 1)
+ LOG(("%s %02x\n", FUNCNAME, reg));
UINT8 data = 0;
- int reg = m_uart->m_wr0_ptrbits; //m_wr0;
- int regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH));
-
- LOGR(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", FUNCNAME, data, reg, regmask, m_wr0));
- m_uart->m_wr0_ptrbits = 0;
- reg &= regmask;
+ UINT8 wreg = 0;
- if (reg != 0)
+ /* Sort out 80X30 limitations in register access */
+// if ((BIT(m_wr15, 2) == 0) || m_uart->m_variant == z80scc_device::TYPE_SCC8030)
+ if (BIT(m_wr15, 2) == 0 || m_uart->m_variant & SET_NMOS)
{
- LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", FUNCNAME, data, reg, regmask, m_wr0));
- // mask out register index
- m_wr0 &= ~regmask;
+ if (reg > 3 && reg < 8) reg &= 0x03;
+ else if (reg == 9) reg = 13;
+ else if (reg == 11) reg = 15;
+ }
+ else if (BIT(m_wr15, 2) != 0)
+ {
+// if (m_uart->variant == z80scc_device::TYPE_SCC80230 && BIT(m_wr7p, 6) != 0)
+ if (m_uart->m_variant & SET_ESCC && BIT(m_wr7p, 6) != 0)
+ {
+ if (reg > 3 && reg < 6) wreg = 1;
+ else if (reg == 9) { reg = 3; wreg = 1; }
+ else if (reg == 11) { reg = 10; wreg = 1; }
+ else if (reg == 14) { reg = 7; wreg = 1; }
+ }
+ else
+ {
+ if (reg > 3 && reg < 6) reg &= 3;
+ else if (reg == 9) { reg = 13; }
+ else if (reg == 11) { reg = 15; }
+ }
}
-
- /* TODO. Sort out 80X30 limitations in register access */
switch (reg)
{
- case REG_RR0_STATUS: data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1
+ case REG_RR0_STATUS: data = do_sccreg_rr0(); break; // TODO: verify handling of SCC specific bits: D6 and D1
case REG_RR1_SPEC_RCV_COND: data = do_sccreg_rr1(); break;
case REG_RR2_INTERRUPT_VECT: data = do_sccreg_rr2(); break; // Channel dependent and SCC specific handling compared to SIO
/* registers 3-7 are specific to SCC. TODO: Check variant and log/stop misuse */
- case REG_RR3_INTERUPPT_PEND: data = do_sccreg_rr3(); break;
- case REG_RR4_WR4_OR_RR0: data = do_sccreg_rr4(); break;
- case REG_RR5_WR5_OR_RR0: data = do_sccreg_rr5(); break;
+ case REG_RR3_INTERUPPT_PEND: data = wreg ? m_wr3 : do_sccreg_rr3(); break;
+ case REG_RR4_WR4_OR_RR0: data = wreg ? m_wr4 : do_sccreg_rr4(); break;
+ case REG_RR5_WR5_OR_RR0: data = wreg ? m_wr5 : do_sccreg_rr5(); break;
case REG_RR6_LSB_OR_RR2: data = do_sccreg_rr6(); break;
- case REG_RR7_MSB_OR_RR3: data = do_sccreg_rr7(); break;
+ case REG_RR7_MSB_OR_RR3: data = wreg ? m_wr7p : do_sccreg_rr7(); break;
/* registers 8-15 are specific to SCC */
case REG_RR8_RECEIVE_DATA: data = data_read(); break;
case REG_RR9_WR3_OR_RR13: data = do_sccreg_rr9(); break;
- case REG_RR10_MISC_STATUS: data = do_sccreg_rr10(); break;
+ case REG_RR10_MISC_STATUS: data = wreg ? m_wr10 : do_sccreg_rr10(); break;
case REG_RR11_WR10_OR_RR15: data = do_sccreg_rr11(); break;
case REG_RR12_LO_TIME_CONST: data = do_sccreg_rr12(); break;
case REG_RR13_HI_TIME_CONST: data = do_sccreg_rr13(); break;
@@ -1381,6 +1511,30 @@ UINT8 z80scc_channel::control_read()
default:
logerror(" \"%s\" %s: %c : Unsupported RRx register:%02x\n", m_owner->tag(), FUNCNAME, 'A' + m_index, reg);
}
+ return data;
+}
+
+//-------------------------------------------------
+// control_read - read control register
+//-------------------------------------------------
+UINT8 z80scc_channel::control_read()
+{
+ UINT8 data = 0;
+ int reg = m_uart->m_wr0_ptrbits; //m_wr0;
+ int regmask = (WR0_REGISTER_MASK | (m_uart->m_wr0_ptrbits & WR0_POINT_HIGH));
+
+ LOGR(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", FUNCNAME, data, reg, regmask, m_wr0));
+ m_uart->m_wr0_ptrbits = 0;
+ reg &= regmask;
+
+ if (reg != 0)
+ {
+ LOG(("%s(%02x) reg %02x, regmask %02x, WR0 %02x\n", FUNCNAME, data, reg, regmask, m_wr0));
+ // mask out register index
+ m_wr0 &= ~regmask;
+ }
+
+ data = scc_register_read(reg);
//LOG(("%s \"%s\": %c : Register R%d read '%02x'\n", FUNCNAME, m_owner->tag(), 'A' + m_index, reg, data));
return data;
@@ -1414,7 +1568,9 @@ void z80scc_channel::do_sccreg_wr0_resets(UINT8 data)
void z80scc_channel::do_sccreg_wr0(UINT8 data)
{
m_wr0 = data;
- m_uart->m_wr0_ptrbits = data & WR0_REGISTER_MASK;
+
+ if (m_uart->m_variant & SET_Z85X3X)
+ m_uart->m_wr0_ptrbits = data & WR0_REGISTER_MASK;
/* Sort out SCC specific behaviours from legacy SIO behaviour */
/* WR0_Z_* are Z80X30 specific commands */
@@ -1430,7 +1586,6 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data)
if (m_uart->m_variant & SET_Z85X3X)
{
LOG(("%s %s: %c : - Point High command\n", FUNCNAME, m_owner->tag(), 'A' + m_index));
- //m_ph = 8;
m_uart->m_wr0_ptrbits |= 8;
}
else
@@ -1459,8 +1614,17 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data)
/* This command resets the highest priority Interrupt Under Service (IUS) bit, allowing lower
priority conditions to request interrupts. This command allows the use of the internal
daisy chain (even in systems without an external daisy chain) and is the last operation in
- an interrupt service routine.TODO: Implement internal Daisychain */
- LOG(("\"%s\" %s: %c : Reset Highest IUS\n", m_owner->tag(), FUNCNAME, 'A' + m_index));
+ an interrupt service routine. */
+ if (m_uart->m_variant & (SET_NMOS))
+ {
+ logerror("WR0 SWI ack command not supported on NMOS\n");
+ LOG(("\"%s\" %s: %c : Reset Highest IUS command not available on NMOS!\n", m_owner->tag(), FUNCNAME, 'A' + m_index));
+ }
+ else
+ {
+ m_uart->z80daisy_irq_ack();
+ LOG(("\"%s\" %s: %c : Reset Highest IUS\n", m_owner->tag(), FUNCNAME, 'A' + m_index));
+ }
break;
case WR0_ERROR_RESET:
/*Error Reset Command (110). This command resets the error bits in RR1. If interrupt on first Rx
@@ -1499,41 +1663,6 @@ void z80scc_channel::do_sccreg_wr0(UINT8 data)
m_uart->m_wr0_ptrbits &= ~WR0_REGISTER_MASK;
m_uart->m_wr0_ptrbits |= (m_wr0 & (WR0_REGISTER_MASK));
}
- else if ( m_uart->m_variant & SET_Z80X30) // TODO: Implement adress decoding for Z80X30 using the shift logic described below
- {
- /*The registers in the Z80X30 are addressed via the address on AD7-AD0 and are latched by the rising
- edge of /AS. The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are
- decoded to form the register address. It is placed in this register to simplify programming when the
- current state of the Shift Right/Shift Left bit is not known.
- A hardware reset forces Shift Left mode where the address is decoded from AD5-AD1. In Shift
- Right mode, the address is decoded from AD4-AD0. The Shift Right/Shift Left bit is written via a
- command to make the software writing to WR0 independent of the state of the Shift Right/Shift
- Left bit.
- While in the Shift Left mode, the register address is placed on AD4-AD1 and the Channel Select
- bit, A/B, is decoded from AD5. The register map for this case is listed in Table on page 21. In
- Shift Right mode, the register address is again placed on AD4-AD1 but the channel select A/B is
- decoded from AD0. The register map for this case is listed in Table on page 23.
- Because the Z80X30 does not contain 16 read registers, the decoding of the read registers is not
- complete; this is listed in Table on page 21 and Table on page 23 by parentheses around the register
- name. These addresses may also be used to access the read registers. Also, note that the
- Z80X30 contains only one WR2 and WR9; these registers may be written from either channel.
- Shift Left Mode is used when Channel A and B are to be programmed differently. This allows the
- software to sequence through the registers of one channel at a time. The Shift Right Mode is used
- when the channels are programmed the same. By incrementing the address, the user can program
- the same data value into both the Channel A and Channel B register.*/
- switch(data & WR0_Z_SHIFT_MASK)
- {
- case WR0_Z_SEL_SHFT_LEFT:
- LOG(("\"%s\": %c : %s - Shift Left Addressing Mode - not implemented\n", m_owner->tag(), 'A' + m_index, FUNCNAME));
- break;
- case WR0_Z_SEL_SHFT_RIGHT:
- LOG(("\"%s\": %c : %s - Shift Right Addressing Mode - not implemented\n", m_owner->tag(), 'A' + m_index, FUNCNAME));
- break;
- default:
- break;
- // LOG(("\"%s\": %c : %s - Null commands\n", m_owner->tag(), 'A' + m_index, FUNCNAME));
- }
- }
}
/* Write Register 1 is the control register for the various SCC interrupt and Wait/Request modes.*/
@@ -1625,6 +1754,7 @@ void z80scc_channel::do_sccreg_wr5(UINT8 data)
}
else
{
+ // UINT8 old_wr5 = m_wr5;
m_wr5 = data;
LOG(("- Transmitter Enable %u\n", (data & WR5_TX_ENABLE) ? 1 : 0));
LOG(("- Transmitter Bits/Character %u\n", get_tx_word_length()));
@@ -1634,6 +1764,10 @@ void z80scc_channel::do_sccreg_wr5(UINT8 data)
update_serial();
safe_transmit_register_reset();
update_rts();
+#if 0
+ if ( !(old_wr5 & WR5_TX_ENABLE) && m_wr5 & WR5_TX_ENABLE )
+ write_data(m_tx_data);
+#endif
m_rr0 |= RR0_TX_BUFFER_EMPTY;
}
}
@@ -1653,7 +1787,7 @@ void z80scc_channel::do_sccreg_wr7(UINT8 data)
/* WR8 is the transmit buffer register */
void z80scc_channel::do_sccreg_wr8(UINT8 data)
{
- LOG(("%s(%02x) \"%s\": %c : Transmit Buffer read %02x\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, data));
+ LOG(("%s(%02x) \"%s\": %c : Transmit Buffer write %02x\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, data));
data_write(data);
}
@@ -1663,13 +1797,7 @@ at the same time as the Reset command, because these bits are only reset by a ha
note that the Z80X30 contains only one WR2 and WR9; these registers may be written from either channel.*/
void z80scc_channel::do_sccreg_wr9(UINT8 data)
{
- if (m_uart->m_variant & SET_Z80X30)
- {
- m_uart->m_chanA->m_wr9 = data;
- m_uart->m_chanB->m_wr9 = data;
- }
- else
- m_wr9 = data;
+ m_uart->m_wr9 = data; // There is only one WR9 register and is written from both channels A and B (if exists)
switch (data & WR9_CMD_MASK)
{
@@ -1688,10 +1816,22 @@ void z80scc_channel::do_sccreg_wr9(UINT8 data)
LOG(("\"%s\": %c : Master Interrupt Control - Device reset %02x\n", m_owner->tag(), 'A' + m_index, data));
/*"The effects of this command are identical to those of a hardware reset, except that the Shift Right/Shift Left bit is
not changed and the MIE, Status High/Status Low and DLC bits take the programmed values that accompany this command."
- The Shift Right/Shift Left bits of the WR0 is only valid on SCC8030 device hence not implemented yet, just the SCC8530 */
- if (data & (WR9_BIT_MIE | WR9_BIT_IACK | WR9_BIT_SHSL | WR9_BIT_DLC | WR9_BIT_NV))
- logerror(" SCC Interrupt system not yet implemented, please be patient.\n");
- m_uart->device_reset();
+ */
+ if (m_uart->m_variant & SET_Z80X30)
+ {
+ UINT8 tmp_wr0 = m_wr0; // Save the Shift Left/Shift Right bits
+ m_uart->device_reset();
+ // Restore the Shift Left/Shift Right bits
+ m_wr0 &= 0xfc;
+ m_wr0 |= (tmp_wr0 & 0x03);
+ }
+ else
+ {
+ m_uart->device_reset();
+ }
+ // Set the MIE, Status High/Status Low and DLC bits as given in this command
+ m_uart->m_wr9 &= ~(WR9_BIT_MIE | WR9_BIT_SHSL | WR9_BIT_DLC );
+ m_uart->m_wr9 |= (data & (WR9_BIT_MIE | WR9_BIT_SHSL | WR9_BIT_DLC ));
break;
default:
logerror("Code is broken in WR9, please report!\n");
@@ -1795,7 +1935,6 @@ void z80scc_channel::do_sccreg_wr11(UINT8 data)
*/
void z80scc_channel::do_sccreg_wr12(UINT8 data)
{
- // TODO: Check if BRG enabled already and restart timer with new value in case advice above is not followed by ROM
m_wr12 = data;
update_serial();
LOG(("\"%s\": %c : %s %02x Low byte of Time Constant for Baudrate generator\n", m_owner->tag(), 'A' + m_index, FUNCNAME, data));
@@ -1804,7 +1943,6 @@ void z80scc_channel::do_sccreg_wr12(UINT8 data)
/* WR13 contains the upper byte of the time constant for the baud rate generator. */
void z80scc_channel::do_sccreg_wr13(UINT8 data)
{
- // TODO: Check if BRG enabled already and restart timer with new value in case advice above is not followed by ROM
m_wr13 = data;
update_serial();
LOG(("\"%s\": %c : %s %02x High byte of Time Constant for Baudrate generator\n", m_owner->tag(), 'A' + m_index, FUNCNAME, data));
@@ -1908,17 +2046,47 @@ void z80scc_channel::do_sccreg_wr14(UINT8 data)
as a group via WR1, bits in this register control which External/Status conditions cause an interrupt.
Only the External/Status conditions that occur after the controlling bit is set to 1 cause an
interrupt. This is true, even if an External/Status condition is pending at the time the bit is set*/
+#define WR15EN "enabled"
+#define WR15NO "not implemented"
void z80scc_channel::do_sccreg_wr15(UINT8 data)
{
- LOG(("%s(%02x) \"%s\": %c : External/Status Control Bits - not implemented\n",
+ LOGINT(("%s(%02x) \"%s\": %c : External/Status Control Bits\n",
FUNCNAME, data, m_owner->tag(), 'A' + m_index));
+ LOGINT(("WR7 prime ints : %s\n", data & WR15_WR7PRIME ? WR15NO : "disabled"));
+ LOGINT(("Zero count ints : %s\n", data & WR15_ZEROCOUNT ? WR15NO : "disabled"));
+ LOGINT(("14 bit Status FIFO : %s\n", data & WR15_STATUS_FIFO ? WR15NO : "disabled"));
+ LOGINT(("DCD ints : %s\n", data & WR15_DCD ? WR15EN : "disabled"));
+ LOGINT(("SYNC/Hunt ints : %s\n", data & WR15_SYNC ? WR15NO : "disabled"));
+ LOGINT(("CTS ints : %s\n", data & WR15_CTS ? WR15EN : "disabled"));
+ LOGINT(("Tx underr./EOM ints: %s\n", data & WR15_TX_EOM ? WR15NO : "disabled"));
+ LOGINT(("Break/Abort ints : %s\n", data & WR15_BREAK_ABORT ? WR15NO : "disabled"));
m_wr15 = data;
}
-/*TODO: Z80X30 Register Access
- ----------------------------
-The Shift Right/Shift Left bit in the Channel B WR0 controls which bits are decoded to form the register
-address. See do_sccreg_wr0() for details */
+void z80scc_channel::scc_register_write(UINT8 reg, UINT8 data)
+{
+ switch (reg)
+ {
+ case REG_WR0_COMMAND_REGPT: do_sccreg_wr0(data); break;
+ case REG_WR1_INT_DMA_ENABLE: do_sccreg_wr1(data); m_uart->check_interrupts(); break;
+ case REG_WR2_INT_VECTOR: do_sccreg_wr2(data); break;
+ case REG_WR3_RX_CONTROL: do_sccreg_wr3(data); break;
+ case REG_WR4_RX_TX_MODES: do_sccreg_wr4(data); break;
+ case REG_WR5_TX_CONTROL: do_sccreg_wr5(data); break;
+ case REG_WR6_SYNC_OR_SDLC_A: do_sccreg_wr6(data); break;
+ case REG_WR7_SYNC_OR_SDLC_F: do_sccreg_wr7(data); break;
+ case REG_WR8_TRANSMIT_DATA: do_sccreg_wr8(data); break;
+ case REG_WR9_MASTER_INT_CTRL: do_sccreg_wr9(data); break;
+ case REG_WR10_MSC_RX_TX_CTRL: do_sccreg_wr10(data); break;
+ case REG_WR11_CLOCK_MODES: do_sccreg_wr11(data); break;
+ case REG_WR12_LO_BAUD_GEN: do_sccreg_wr12(data); break;
+ case REG_WR13_HI_BAUD_GEN: do_sccreg_wr13(data); break;
+ case REG_WR14_MISC_CTRL: do_sccreg_wr14(data); break;
+ case REG_WR15_EXT_ST_INT_CTRL: do_sccreg_wr15(data); break;
+ default:
+ logerror("\"%s\": %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg);
+ }
+}
/*Z85X30 Register Access
-----------------------
@@ -1959,28 +2127,7 @@ void z80scc_channel::control_write(UINT8 data)
//LOG(("\n%s(%02x) reg %02x, regmask %02x\n", FUNCNAME, data, reg, regmask));
LOGSETUP((" * %s %c Reg %02x <- %02x \n", m_owner->tag(), 'A' + m_index, reg, data));
- /* TODO. Sort out 80X30 & other SCC variants limitations in register access */
- switch (reg)
- {
- case REG_WR0_COMMAND_REGPT: do_sccreg_wr0(data); break;
- case REG_WR1_INT_DMA_ENABLE: do_sccreg_wr1(data); m_uart->check_interrupts(); break;
- case REG_WR2_INT_VECTOR: do_sccreg_wr2(data); break;
- case REG_WR3_RX_CONTROL: do_sccreg_wr3(data); break;
- case REG_WR4_RX_TX_MODES: do_sccreg_wr4(data); break;
- case REG_WR5_TX_CONTROL: do_sccreg_wr5(data); break;
- case REG_WR6_SYNC_OR_SDLC_A: do_sccreg_wr6(data); break;
- case REG_WR7_SYNC_OR_SDLC_F: do_sccreg_wr7(data); break;
- case REG_WR8_TRANSMIT_DATA: do_sccreg_wr8(data); break;
- case REG_WR9_MASTER_INT_CTRL: do_sccreg_wr9(data); break;
- case REG_WR10_MSC_RX_TX_CTRL: do_sccreg_wr10(data); break;
- case REG_WR11_CLOCK_MODES: do_sccreg_wr11(data); break;
- case REG_WR12_LO_BAUD_GEN: do_sccreg_wr12(data); break;
- case REG_WR13_HI_BAUD_GEN: do_sccreg_wr13(data); break;
- case REG_WR14_MISC_CTRL: do_sccreg_wr14(data); break;
- case REG_WR15_EXT_ST_INT_CTRL: do_sccreg_wr15(data); break;
- default:
- logerror("\"%s\": %c : Unsupported WRx register:%02x\n", m_owner->tag(), 'A' + m_index, reg);
- }
+ scc_register_write(reg, data);
}
@@ -2014,7 +2161,7 @@ UINT8 z80scc_channel::data_read()
data = m_rx_fifo_rp_data();
// load error status from the FIFO
- m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo_rp];
+ m_rr1 = (m_rr1 & ~(RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR)) | m_rx_error_fifo[m_rx_fifo_rp]; // TODO: Status FIFO needs to be fixed
// trigger interrup and lock the fifo if an error is present
if (m_rr1 & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR))
@@ -2072,7 +2219,7 @@ void z80scc_channel::m_rx_fifo_rp_step()
m_rx_fifo_rp = 0;
}
- // check if FIFO is empty
+ // check if RX FIFO is empty
if (m_rx_fifo_rp == m_rx_fifo_wp)
{
// no more characters available in the FIFO
@@ -2080,6 +2227,16 @@ void z80scc_channel::m_rx_fifo_rp_step()
}
}
+/* Step TX read pointer */
+void z80scc_channel::m_tx_fifo_rp_step()
+{
+ m_tx_fifo_rp++;
+ if (m_tx_fifo_rp >= m_tx_fifo_sz)
+ {
+ m_tx_fifo_rp = 0;
+ }
+}
+
READ8_MEMBER (z80scc_device::da_r) { return m_chanA->data_read(); }
WRITE8_MEMBER (z80scc_device::da_w) { m_chanA->data_write(data); }
READ8_MEMBER (z80scc_device::db_r) { return m_chanB->data_read(); }
@@ -2090,28 +2247,65 @@ WRITE8_MEMBER (z80scc_device::db_w) { m_chanB->data_write(data); }
//-------------------------------------------------
void z80scc_channel::data_write(UINT8 data)
{
- m_tx_data = data;
-
- if ((m_wr5 & WR5_TX_ENABLE) && is_transmit_register_empty())
+ /* Tx FIFO is full or...? */
+ if ( !(m_rr0 & RR0_TX_BUFFER_EMPTY) && // NMOS/CMOS 1 slot "FIFO" is controlled by the TBE bit instead of fifo logic
+ ( (m_tx_fifo_wp + 1 == m_tx_fifo_rp) || ( (m_tx_fifo_wp + 1 == m_tx_fifo_sz) && (m_tx_fifo_rp == 0) )))
{
- LOG(("%s(%02x) \"%s\": %c : Transmit Data Byte '%02x' %c\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, m_tx_data, m_tx_data));
- transmit_register_setup(m_tx_data);
+ logerror("- TX FIFO is full, discarding data\n");
+ LOG(("- TX FIFO is full, discarding data\n"));
+ }
+ else // ..there is still room
+ {
+ m_tx_data_fifo[m_tx_fifo_wp++] = data;
+ if (m_tx_fifo_wp >= m_tx_fifo_sz)
+ {
+ m_tx_fifo_wp = 0;
+ }
- // empty transmit buffer
- m_rr0 |= RR0_TX_BUFFER_EMPTY;
+ // Check FIFO fullness and set TBE bit accordingly
+ if (m_tx_fifo_sz == 1)
+ {
+ m_rr0 &= ~RR0_TX_BUFFER_EMPTY; // If only one FIFO position it is full now!
+ }
+ else if (m_tx_fifo_wp + 1 == m_tx_fifo_rp || ( (m_tx_fifo_wp + 1 == m_tx_fifo_sz) && (m_tx_fifo_rp == 0) ))
+ {
+ m_rr0 &= ~RR0_TX_BUFFER_EMPTY; // Indicate that the TX fifo is full
+ }else
+ m_rr0 |= RR0_TX_BUFFER_EMPTY; // or there is a slot in the FIFO available
- if (m_wr1 & WR1_TX_INT_ENABLE)
+ m_rr1 &= ~RR1_ALL_SENT; // All is definitelly not sent anymore
+ }
+
+ /* Transmitter enabled? */
+ if (m_wr5 & WR5_TX_ENABLE)
+ {
+ if (is_transmit_register_empty()) // Is the shift register loaded?
{
- m_uart->trigger_interrupt(m_index, INT_TRANSMIT);
+ LOG(("- Setting up transmitter\n"));
+ transmit_register_setup(m_tx_data_fifo[m_tx_fifo_rp]); // Load the shift register, reload is done in tra_complete()
+ m_tx_fifo_rp_step();
+ m_rr1 |= RR1_ALL_SENT; // Now stuff is on its way again
+ m_rr0 |= RR0_TX_BUFFER_EMPTY; // And there is a slot in the FIFO available
}
}
- else
+ /* "While transmit interrupts are enabled, the nmos/cmos version sets the transmit interrupt pending
+ (TxIP) bit whenever the transmit buffer becomes empty. this means that the transmit buffer
+ must be full before the TxIP can be set. thus, when transmit interrupts are first enabled, the TxIP
+ will not be set until after the first character is written to the nmos/cmos." */
+ // check if to fire interrupt
+ if (m_wr1 & WR1_TX_INT_ENABLE)
{
- m_rr0 &= ~RR0_TX_BUFFER_EMPTY;
- //LOG(("%s(%02x) \"%s\": %c : failed to send %c,(%02x)\n", FUNCNAME, data, m_owner->tag(), 'A' + m_index, isascii(data) ? data : ' ', data));
+ if ((m_uart->m_variant & SET_ESCC) &&
+ (m_wr7p & WR7P_TX_FIFO_EMPTY) &&
+ m_tx_fifo_wp == m_tx_fifo_rp) // ESCC and fifo empty bit set and fifo is completelly empty?
+ {
+ m_uart->trigger_interrupt(m_index, INT_TRANSMIT); // Set TXIP bit
+ }
+ else if(m_rr0 & RR0_TX_BUFFER_EMPTY) // Check TBE bit and interrupt if one or more FIFO slots availble
+ {
+ m_uart->trigger_interrupt(m_index, INT_TRANSMIT); // Set TXIP bit
+ }
}
-
- m_rr1 &= ~RR1_ALL_SENT;
}
@@ -2126,12 +2320,12 @@ void z80scc_channel::receive_data(UINT8 data)
if (m_rx_fifo_wp + 1 == m_rx_fifo_rp || ( (m_rx_fifo_wp + 1 == m_rx_fifo_sz) && (m_rx_fifo_rp == 0) ))
{
// receive overrun error detected
- m_rx_error_fifo[m_rx_fifo_wp] |= RR1_RX_OVERRUN_ERROR; // = m_rx_error;
+ m_rx_error_fifo[m_rx_fifo_wp] |= RR1_RX_OVERRUN_ERROR; // = m_rx_error; TODO: Status FIFO needs to be fixed
logerror("Receive_data() Error %02x\n", m_rx_error_fifo[m_rx_fifo_wp] & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR));
}
else
{
- m_rx_error_fifo[m_rx_fifo_wp] &= ~RR1_RX_OVERRUN_ERROR; // = m_rx_error;
+ m_rx_error_fifo[m_rx_fifo_wp] &= ~RR1_RX_OVERRUN_ERROR; // = m_rx_error; TODO: Status FIFO needs to be fixed
m_rx_fifo_wp++;
if (m_rx_fifo_wp >= m_rx_fifo_sz)
{
@@ -2191,8 +2385,13 @@ WRITE_LINE_MEMBER( z80scc_channel::cts_w )
else
m_rr0 &= ~RR0_CTS;
- // trigger interrupt
- if (m_wr1 & WR1_EXT_INT_ENABLE)
+ /* If the CTS IE bit in WR15 is set, this bit indicates the state of the /CTS pin while no interrupt is
+ pending, latches the state of the /CTS pin and generates an External/Status interrupt. Any odd
+ number of transitions on the /CTS pin causes another External/Status interrupt condition. If the
+ CTS IE bit is reset, it merely reports the current unlatched state of the /CTS pin.
+
+ Check that external interrupts are enabled and this one in particular and generate an interrupt on any change */
+ if ((m_wr1 & WR1_EXT_INT_ENABLE) && (m_wr15 & WR15_CTS))
{
// trigger interrupt
m_uart->trigger_interrupt(m_index, INT_EXTERNAL);
@@ -2235,7 +2434,14 @@ WRITE_LINE_MEMBER( z80scc_channel::dcd_w )
else
m_rr0 &= ~RR0_DCD;
- if (m_wr1 & WR1_EXT_INT_ENABLE)
+ /* If the DCD IE bit in WR15 is set, this bit indicates the state of the /DCD pin the last time the
+ Enabled External/Status bits changed. Any transition on the /DCD pin, while no interrupt is pending,
+ latches the state of the /DCD pin and generates an External/Status interrupt. Any odd number
+ of transitions on the /DCD pin while another External/Status interrupt condition. If the DCD IE is
+ reset, this bit merely reports the current, unlatched state of the /DCD pin.
+
+ Check that external interrupts are enabled and this one in particular and generate an interrupt on any change */
+ if ((m_wr1 & WR1_EXT_INT_ENABLE) && (m_wr15 & WR15_DCD))
{
// trigger interrupt
m_uart->trigger_interrupt(m_index, INT_EXTERNAL);
@@ -2333,7 +2539,9 @@ WRITE_LINE_MEMBER( z80scc_channel::rxc_w )
m_rx_clock++;
if (m_rx_clock == clocks)
+ {
m_rx_clock = 0;
+ }
}
}
}
@@ -2462,8 +2670,6 @@ void z80scc_channel::set_dtr(int state)
m_uart->m_out_dtrb_cb(m_dtr);
}
-
-
//-------------------------------------------------
// write_rx - called by terminal through rs232/diserial
// when character is sent to board
diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h
index f68ad9760e6..69143eed02a 100644
--- a/src/devices/machine/z80scc.h
+++ b/src/devices/machine/z80scc.h
@@ -169,6 +169,7 @@ public:
UINT8 do_sccreg_rr5();
UINT8 do_sccreg_rr6();
UINT8 do_sccreg_rr7();
+ UINT8 do_sccreg_rr7p(){ return 0; } // Needs to be implemented for Synchronous mode
// UINT8 do_sccreg_rr8(); Short cutted due to frequent use
UINT8 do_sccreg_rr9();
UINT8 do_sccreg_rr10();
@@ -188,6 +189,7 @@ public:
void do_sccreg_wr5(UINT8 data);
void do_sccreg_wr6(UINT8 data);
void do_sccreg_wr7(UINT8 data);
+ void do_sccreg_wr7p(UINT8 data){}; // Needs to be implemented for Synchronous mode
void do_sccreg_wr8(UINT8 data);
void do_sccreg_wr9(UINT8 data);
void do_sccreg_wr10(UINT8 data);
@@ -204,6 +206,7 @@ public:
void data_write(UINT8 data);
void receive_data(UINT8 data);
+ void m_tx_fifo_rp_step();
void m_rx_fifo_rp_step();
UINT8 m_rx_fifo_rp_data();
@@ -228,6 +231,7 @@ public:
UINT8 m_rr5; // REG_RR5_WR5_OR_RR0
UINT8 m_rr6; // REG_RR6_LSB_OR_RR2
UINT8 m_rr7; // REG_RR7_MSB_OR_RR3
+ UINT8 m_rr7p;
UINT8 m_rr8; // REG_RR8_RECEIVE_DATA
UINT8 m_rr9; // REG_RR9_WR3_OR_RR13
UINT8 m_rr10; // REG_RR10_MISC_STATUS
@@ -246,8 +250,9 @@ public:
UINT8 m_wr5; // REG_WR5_TX_CONTROL
UINT8 m_wr6; // REG_WR6_SYNC_OR_SDLC_A
UINT8 m_wr7; // REG_WR7_SYNC_OR_SDLC_F
+ UINT8 m_wr7p; //
UINT8 m_wr8; // REG_WR8_TRANSMIT_DATA
- UINT8 m_wr9; // REG_WR9_MASTER_INT_CTRL
+ // UINT8 m_wr9; // REG_WR9_MASTER_INT_CTRL
UINT8 m_wr10; // REG_WR10_MSC_RX_TX_CTRL
UINT8 m_wr11; // REG_WR11_CLOCK_MODES
UINT8 m_wr12; // REG_WR12_LO_BAUD_GEN
@@ -454,7 +459,12 @@ protected:
WR5_DTR = 0x80
};
- /* SCC specifics */
+
+ enum
+ {
+ WR7P_TX_FIFO_EMPTY = 0x04
+ };
+
enum
{
WR9_CMD_MASK = 0xC0,
@@ -506,7 +516,19 @@ protected:
WR14_BRG_SOURCE = 0x02,
WR14_DTR_REQ_FUNC = 0x04,
WR14_AUTO_ECHO = 0x08,
- WR14_LOCAL_LOOPBACK = 0x010
+ WR14_LOCAL_LOOPBACK = 0x10
+ };
+
+ enum
+ {
+ WR15_WR7PRIME = 0x01,
+ WR15_ZEROCOUNT = 0x02,
+ WR15_STATUS_FIFO = 0x04,
+ WR15_DCD = 0x08,
+ WR15_SYNC = 0x10,
+ WR15_CTS = 0x20,
+ WR15_TX_EOM = 0x40,
+ WR15_BREAK_ABORT = 0x80
};
enum
@@ -526,6 +548,8 @@ protected:
unsigned int m_delayed_tx_brg_change;
unsigned int m_brg_const;
+ void scc_register_write(UINT8 reg, UINT8 data);
+ UINT8 scc_register_read(UINT8 reg);
void update_serial();
void set_dtr(int state);
void set_rts(int state);
@@ -557,7 +581,13 @@ protected:
int m_dcd; // data carrier detect latch
// transmitter state
- UINT8 m_tx_data; // transmit data register
+ UINT8 m_tx_data_fifo[4]; // data FIFO
+ UINT8 m_tx_error_fifo[4]; // error FIFO
+ int m_tx_fifo_rp; // FIFO read pointer
+ int m_tx_fifo_wp; // FIFO write pointer
+ int m_tx_fifo_sz; // FIFO size
+ UINT8 m_tx_error; // current error
+ // UINT8 m_tx_data; // transmit data register
int m_tx_clock; // transmit clock pulse count
int m_dtr; // data terminal ready
@@ -631,9 +661,15 @@ public:
DECLARE_READ8_MEMBER( cb_r ) { return m_chanB->control_read(); }
DECLARE_WRITE8_MEMBER( cb_w ) { m_chanB->control_write(data); }
+ DECLARE_READ8_MEMBER( zbus_r );
+ DECLARE_WRITE8_MEMBER( zbus_w );
+
// interrupt acknowledge
int m1_r();
+ // Single registers instances accessed from both channels
+ UINT8 m_wr9; // REG_WR9_MASTER_INT_CTRL
+
DECLARE_WRITE_LINE_MEMBER( rxa_w ) { m_chanA->write_rx(state); }
DECLARE_WRITE_LINE_MEMBER( rxb_w ) { m_chanB->write_rx(state); }
DECLARE_WRITE_LINE_MEMBER( ctsa_w ) { m_chanA->cts_w(state); }
@@ -726,6 +762,7 @@ protected:
devcb_write_line m_out_txdrqb_cb;
int m_int_state[6]; // interrupt state
+ int m_int_source[6]; // interrupt source
int m_variant;
UINT8 m_wr0_ptrbits;
diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp
index 4c299be37be..cb2607362c1 100644
--- a/src/devices/sound/ad1848.cpp
+++ b/src/devices/sound/ad1848.cpp
@@ -4,6 +4,7 @@
// Analog Devices AD1848, main codec in Windows Sound System adapters
#include "sound/ad1848.h"
+#include "sound/volt_reg.h"
const device_type AD1848 = device_creator<ad1848_device>;
@@ -11,17 +12,18 @@ ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, AD1848, "Analog Devices AD1848", tag, owner, clock, "ad1848", __FILE__),
m_irq_cb(*this),
m_drq_cb(*this),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr")
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac")
{
}
static MACHINE_CONFIG_FRAGMENT( ad1848_config )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
machine_config_constructor ad1848_device::device_mconfig_additions() const
@@ -149,12 +151,12 @@ void ad1848_device::device_timer(emu_timer &timer, device_timer_id id, int param
switch(m_regs.dform >> 4)
{
case 0: // 8bit mono
- m_dacl->write_unsigned8(m_samples & 0xff);
- m_dacr->write_unsigned8(m_samples & 0xff);
+ m_ldac->write(m_samples << 8);
+ m_rdac->write(m_samples << 8);
break;
case 1: // 8bit stereo
- m_dacl->write_unsigned8(m_samples & 0xff);
- m_dacr->write_unsigned8((m_samples >> 8) & 0xff);
+ m_ldac->write(m_samples << 8);
+ m_rdac->write(m_samples & 0xff00);
break;
case 2: // ulaw mono
case 3: // ulaw stereo
@@ -162,12 +164,12 @@ void ad1848_device::device_timer(emu_timer &timer, device_timer_id id, int param
case 7: // alaw stereo
break;
case 4: // 16bit mono
- m_dacl->write(m_samples & 0xffff);
- m_dacr->write(m_samples & 0xffff);
+ m_ldac->write(m_samples ^ 0x8000);
+ m_rdac->write(m_samples ^ 0x8000);
break;
case 5: // 16bit stereo
- m_dacl->write(m_samples & 0xffff);
- m_dacr->write(m_samples >> 16);
+ m_ldac->write(m_samples ^ 0x8000);
+ m_rdac->write((m_samples >> 16) ^ 0x8000);
break;
}
if(!m_count)
diff --git a/src/devices/sound/ad1848.h b/src/devices/sound/ad1848.h
index d2c93c57329..161172f9749 100644
--- a/src/devices/sound/ad1848.h
+++ b/src/devices/sound/ad1848.h
@@ -57,8 +57,8 @@ private:
bool m_play, m_mce, m_trd;
devcb_write_line m_irq_cb;
devcb_write_line m_drq_cb;
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
emu_timer *m_timer;
};
diff --git a/src/devices/sound/dac.cpp b/src/devices/sound/dac.cpp
index d51b51c1410..8650e1decb7 100644
--- a/src/devices/sound/dac.cpp
+++ b/src/devices/sound/dac.cpp
@@ -1,92 +1,18 @@
// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
+// copyright-holders:smf
/***************************************************************************
- dac.c
+ dac.cpp
- DAC device emulator.
+ Four quadrant multiplying DAC.
-***************************************************************************/
-
-#include "emu.h"
-#include "dac.h"
-
-
-// device type definition
-const device_type DAC = &device_creator<dac_device>;
-
-
-//**************************************************************************
-// LIVE DEVICE
-//**************************************************************************
-
-//-------------------------------------------------
-// dac_device - constructor
-//-------------------------------------------------
-
-dac_device::dac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, DAC, "DAC", tag, owner, clock, "dac", __FILE__),
- device_sound_interface(mconfig, *this),
- m_stream(nullptr),
- m_output(0)
-{
-}
-
-
-//-------------------------------------------------
-// write_unsigned8 - write an 8-bit value,
-// keeping the scaled result unsigned
-//-------------------------------------------------
-
-WRITE8_MEMBER( dac_device::write_unsigned8 )
-{
- write_unsigned8(data);
-}
+ Binary Weighted Resistor Network, R-2R Ladder & PWM
+ Binary, Ones Complement, Twos Complement or Sign Magnitude coding
-//-------------------------------------------------
-// write_signed8 - write an 8-bit value,
-// keeping the scaled result signed
-//-------------------------------------------------
-
-WRITE8_MEMBER( dac_device::write_signed8 )
-{
- write_signed8(data);
-}
-
-
-//-------------------------------------------------
-// device_start - device-specific startup
-//-------------------------------------------------
-
-void dac_device::device_start()
-{
- // create the stream
- m_stream = stream_alloc(0, 1, DEFAULT_SAMPLE_RATE);
-
- // register for save states
- save_item(NAME(m_output));
-}
-
-
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void dac_device::device_reset()
-{
- m_output = 0;
-}
-
+***************************************************************************/
-//-------------------------------------------------
-// sound_stream_update - handle update requests
-// for our sound stream
-//-------------------------------------------------
+#define DAC_GENERATOR_EPILOG(_dac_type, _dac_class) \
+const device_type _dac_type = &device_creator<_dac_class>;
-void dac_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
-{
- // just fill with current value
- for (int samp = 0; samp < samples; samp++)
- outputs[0][samp] = m_output;
-}
+#include "dac.h"
diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h
index bd5bdf16d62..c3983eee492 100644
--- a/src/devices/sound/dac.h
+++ b/src/devices/sound/dac.h
@@ -1,70 +1,319 @@
// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
+// copyright-holders:smf
/***************************************************************************
dac.h
- DAC device emulator.
+ Four quadrant multiplying DAC.
+
+ Binary Weighted Resistor Network, R-2R Ladder & PWM
+
+ Binary, Ones Complement, Twos Complement or Sign Magnitude coding
***************************************************************************/
#ifndef __DAC_H__
#define __DAC_H__
+#include "emu.h"
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
+#define DAC_VREF_POS_INPUT (0)
+#define DAC_VREF_NEG_INPUT (1)
-#define MCFG_DAC_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, DAC, 0)
+class dac_bit_interface
+{
+public:
+ virtual DECLARE_WRITE_LINE_MEMBER(write) = 0;
+ virtual DECLARE_WRITE8_MEMBER(write) = 0;
+};
+class dac_byte_interface
+{
+public:
+ virtual void write(unsigned char data) = 0;
+ virtual DECLARE_WRITE8_MEMBER(write) = 0;
+};
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
+class dac_word_interface
+{
+public:
+ virtual void write(unsigned short data) = 0;
+ virtual DECLARE_WRITE16_MEMBER(write) = 0;
+};
+template <int bits>
+stream_sample_t dac_multiply(const double vref, const stream_sample_t code)
+{
+ if (bits > 1)
+ return (vref * code) / (1 << (bits));
-// ======================> dac_device
+ return vref * code;
+}
+
+template <int bits>
+class dac_code
+{
+protected:
+ dac_code(double gain) :
+ m_stream(nullptr),
+ m_code(0),
+ m_gain(gain)
+ {
+ }
+
+ sound_stream * m_stream;
+ stream_sample_t m_code;
+ const double m_gain;
+
+ inline void setCode(stream_sample_t code)
+ {
+ code &= ~(~0U << bits);
+ if (m_code != code)
+ {
+ m_stream->update();
+ m_code = code;
+ }
+ }
+
+ virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) = 0;
+};
+
+template <int bits>
+class dac_code_binary :
+ protected dac_code<bits>
+{
+protected:
+ dac_code_binary(double gain) :
+ dac_code<bits>(gain)
+ {
+ }
+
+ virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
+ double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = vref_neg + dac_multiply<bits>(vref_pos - vref_neg, this->m_code);
+ outputs[0][samp] = vout;
+ }
+ }
+};
+
+template <int bits>
+class dac_code_ones_complement :
+ protected dac_code<bits>
+{
+protected:
+ dac_code_ones_complement(double gain) : dac_code<bits>(gain) {}
+
+ virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
+ {
+ if (this->m_code & (1 << (bits - 1)))
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = dac_multiply<bits - 1>(vref_neg, this->m_code ^ ~(~0U << bits));
+ outputs[0][samp] = vout;
+ }
+ }
+ else
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = dac_multiply<bits - 1>(vref_pos, this->m_code);
+ outputs[0][samp] = vout;
+ }
+ }
+ }
+};
+template <int bits>
+class dac_code_twos_complement :
+ protected dac_code<bits>
+{
+protected:
+ dac_code_twos_complement(double gain) :
+ dac_code<bits>(gain)
+ {
+ }
+
+ virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
+ double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = vref_neg + dac_multiply<bits>(vref_pos - vref_neg, this->m_code ^ (1 << (bits - 1)));
+ outputs[0][samp] = vout;
+ }
+ }
+};
+
+template <int bits>
+class dac_code_sign_magntitude :
+ protected dac_code<bits>
+{
+protected:
+ dac_code_sign_magntitude(double gain) :
+ dac_code<bits>(gain)
+ {
+ }
+
+ virtual void sound_stream_update_tag(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
+ {
+ if (this->m_code & (1 << (bits - 1)))
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_neg = inputs[DAC_VREF_NEG_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = dac_multiply<bits - 1>(vref_neg, this->m_code ^ (1 << (bits - 1)));
+ outputs[0][samp] = vout;
+ }
+ }
+ else
+ {
+ for (int samp = 0; samp < samples; samp++)
+ {
+ double vref_pos = inputs[DAC_VREF_POS_INPUT][samp] * this->m_gain;
+ stream_sample_t vout = dac_multiply<bits - 1>(vref_pos, this->m_code);
+ outputs[0][samp] = vout;
+ }
+ }
+ }
+};
+
+
+template <typename _dac_code>
class dac_device : public device_t,
- public device_sound_interface
+ public device_sound_interface,
+ protected _dac_code
{
- // default to 4x oversampling
- static const UINT32 DEFAULT_SAMPLE_RATE = 48000 * 4;
+protected:
+ dac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_sound_interface(mconfig, *this),
+ _dac_code(gain)
+ {
+ }
+
+ virtual void device_start() override
+ {
+ this->m_stream = stream_alloc(2, 1, 48000 * 4);
+
+ save_item(NAME(this->m_code));
+ }
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override
+ {
+ _dac_code::sound_stream_update_tag(stream, inputs, outputs, samples);
+ }
+};
+
+template <typename dac_interface, typename _dac_code> class dac_generator;
+
+template <typename _dac_code>
+class dac_generator<dac_bit_interface, _dac_code> :
+ public dac_bit_interface,
+ public dac_device<_dac_code>
+{
public:
- // construction/destruction
- dac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
+ dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
+ {
+ }
- // public interface
- INT16 output() const { return m_output; }
- void write(INT16 data) { m_stream->update(); m_output = data; }
- void write_unsigned8(UINT8 data) { write(data * 32767 / 255); } // 0..255, mapped to 0..32767
- void write_signed8(UINT8 data) { write((data - 0x80) * 32767 / 128); } // 0..255, mapped to -32767..32767
- void write_unsigned16(UINT16 data) { write(data / 2); } // 0..65535, mapped to 0..32767
- void write_signed16(UINT16 data) { write(data - 0x8000); } // 0..65535, mapped to -32768..32767
+ virtual WRITE_LINE_MEMBER(write) override { this->setCode(state); }
+ virtual WRITE8_MEMBER(write) override { this->setCode(data); }
+};
- // wrappers
- DECLARE_WRITE8_MEMBER( write_unsigned8 );
- DECLARE_WRITE8_MEMBER( write_signed8 );
+template <typename _dac_code>
+class dac_generator<dac_byte_interface, _dac_code> :
+ public dac_byte_interface,
+ public dac_device<_dac_code>
+{
+public:
+ dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
+ dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
+ {
+ }
-protected:
- // device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void write(unsigned char data) override { this->setCode(data); }
+ virtual DECLARE_WRITE8_MEMBER(write) override { this->setCode(data); }
+};
- // device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+template <typename _dac_code>
+class dac_generator<dac_word_interface, _dac_code> :
+ public dac_word_interface,
+ public dac_device<_dac_code>
+{
+public:
+ dac_generator(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, double gain) :
+ dac_device<_dac_code>(mconfig, type, name, tag, owner, clock, shortname, source, gain)
+ {
+ }
- // internal state
- sound_stream * m_stream;
- INT16 m_output;
+ virtual void write(unsigned short data) override { this->setCode(data); }
+ virtual DECLARE_WRITE16_MEMBER(write) override { this->setCode(data); }
};
+const double dac_gain_r2r = 1.0;
+const double dac_gain_binary_weighted = 2.0;
+
+#ifndef DAC_GENERATOR_EPILOG
+#define DAC_GENERATOR_EPILOG(_dac_type, _dac_class) //
+#endif
+
+#define DAC_GENERATOR(_dac_type, _dac_class, _dac_interface, _dac_coding, _dac_gain, _dac_description, _dac_shortname) \
+extern const device_type _dac_type; \
+class _dac_class : public dac_generator<_dac_interface, _dac_coding> \
+{\
+public: \
+ _dac_class(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : \
+ dac_generator(mconfig, _dac_type, _dac_description, tag, owner, clock, _dac_shortname, __FILE__, _dac_gain) {} \
+}; \
+DAC_GENERATOR_EPILOG(_dac_type, _dac_class)
+
+// DAC chips
+DAC_GENERATOR(AD7521, ad7521_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AD7521", "ad7521")
+DAC_GENERATOR(AD7524, ad7524_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "AD7524", "ad7524")
+DAC_GENERATOR(AD7528, ad7528_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "AD7528", "ad7528") /// 2 x vin + 2 x vout
+DAC_GENERATOR(AD7533, ad7533_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "AD7533", "ad7533")
+DAC_GENERATOR(AD7541, ad7541_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AD7541", "ad7541")
+DAC_GENERATOR(AM6012, am6012_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "AM6012", "am6012")
+DAC_GENERATOR(DAC0800, dac0800_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "DAC0800", "dac0800")
+DAC_GENERATOR(DAC1200, dac1200_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "DAC1200", "dac1200")
+DAC_GENERATOR(MC1408, mc1408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC1408", "mc1408")
+DAC_GENERATOR(MC3408, mc3408_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "MC3408", "mc3408")
+DAC_GENERATOR(MC3410, mc3410_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "MC3410", "mc3410")
+DAC_GENERATOR(PCM54HP, pcm54hp_device, dac_word_interface, dac_code_binary<16>, dac_gain_r2r, "PCM54HP", "pcm54hp")
+DAC_GENERATOR(UDA1341TS, uda1341ts_device, dac_word_interface, dac_code_twos_complement<16>, dac_gain_r2r, "UDA1341TS", "uda1341ts") // I2C stereo audio codec
+DAC_GENERATOR(ZN425E, zn425e_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "ZN425E", "zn425e")
-// device type definition
-extern const device_type DAC;
+// DAC circuits/unidentified chips
+DAC_GENERATOR(DAC_1BIT, dac_1bit_device, dac_bit_interface, dac_code_binary<1>, 1.0, "1-Bit DAC", "dac")
+DAC_GENERATOR(DAC_2BIT_BINARY_WEIGHTED, dac_2bit_binary_weighted_device, dac_byte_interface, dac_code_binary<2>, dac_gain_binary_weighted, "2-Bit Binary Weighted DAC", "dac_2bit_bw")
+DAC_GENERATOR(DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, dac_2bit_binary_weighted_ones_complement_device, dac_byte_interface, dac_code_ones_complement<2>, dac_gain_binary_weighted, "2-Bit Binary Weighted Ones Complement DAC", "dac_2bit_bw_oc")
+DAC_GENERATOR(DAC_2BIT_R2R, dac_2bit_r2r_device, dac_byte_interface, dac_code_binary<2>, dac_gain_r2r, "2-Bit R-2R DAC", "dac_2bit_r2r")
+DAC_GENERATOR(DAC_3BIT_BINARY_WEIGHTED, dac_3bit_binary_weighted_device, dac_byte_interface, dac_code_binary<3>, dac_gain_binary_weighted, "3-Bit Binary Weighted DAC", "dac_3bit_bw")
+DAC_GENERATOR(DAC_4BIT_BINARY_WEIGHTED, dac_4bit_binary_weighted_device, dac_byte_interface, dac_code_binary<4>, dac_gain_binary_weighted, "4-Bit Binary Weighted DAC", "dac_4bit_bw")
+DAC_GENERATOR(DAC_4BIT_BINARY_WEIGHTED_SIGN_MAGNITUDE, dac_4bit_binary_weighted_sign_magnitude_device, dac_byte_interface, dac_code_sign_magntitude<4>, dac_gain_binary_weighted, "4-Bit Binary Weighted Sign Magnitude DAC", "dac_4bit_bw_sm")
+DAC_GENERATOR(DAC_4BIT_R2R, dac_4bit_r2r_device, dac_byte_interface, dac_code_binary<4>, dac_gain_r2r, "4-Bit R-2R DAC", "dac_4bit_r2r")
+DAC_GENERATOR(DAC_6BIT_BINARY_WEIGHTED, dac_6bit_binary_weighted_device, dac_byte_interface, dac_code_binary<6>, dac_gain_binary_weighted, "6-Bit Binary Weighted DAC", "dac_6bit_bw")
+DAC_GENERATOR(DAC_6BIT_R2R, dac_6bit_r2r_device, dac_byte_interface, dac_code_binary<6>, dac_gain_r2r, "6-Bit R-2R DAC", "dac_6bit_r2r")
+DAC_GENERATOR(DAC_8BIT_BINARY_WEIGHTED, dac_binary_weighted_8bit_device, dac_byte_interface, dac_code_binary<8>, dac_gain_binary_weighted, "8-Bit Binary Weighted DAC", "dac_8bit_bw")
+DAC_GENERATOR(DAC_8BIT_PWM, dac_8bit_pwm_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "8-Bit PWM DAC", "dac_8bit_pwm")
+DAC_GENERATOR(DAC_8BIT_R2R, dac_8bit_r2r_device, dac_byte_interface, dac_code_binary<8>, dac_gain_r2r, "8-Bit R-2R DAC", "dac_8bit_r2r")
+DAC_GENERATOR(DAC_8BIT_R2R_TWOS_COMPLEMENT, dac_8bit_r2r_twos_complement_device, dac_byte_interface, dac_code_twos_complement<8>, dac_gain_r2r, "8-Bit R-2R Twos Complement DAC", "dac_8bit_r2r_tc")
+DAC_GENERATOR(DAC_10BIT_R2R, dac_10bit_r2r_device, dac_word_interface, dac_code_binary<10>, dac_gain_r2r, "10-Bit R-2R DAC", "dac_10bit_r2r")
+DAC_GENERATOR(DAC_12BIT_R2R, dac_12bit_r2r_device, dac_word_interface, dac_code_binary<12>, dac_gain_r2r, "12-Bit R-2R DAC", "dac_12bit_r2r")
+DAC_GENERATOR(DAC_12BIT_R2R_TWOS_COMPLEMENT, dac_12bit_r2r_twos_complement_device, dac_word_interface, dac_code_twos_complement<12>, dac_gain_r2r, "12-Bit R-2R Twos Complement DAC", "dac_12bit_r2r_tc")
+DAC_GENERATOR(DAC_16BIT_R2R, dac_16bit_r2r_device, dac_word_interface, dac_code_binary<16>, dac_gain_r2r, "16-Bit R-2R DAC", "dac_16bit_r2r")
+DAC_GENERATOR(DAC_16BIT_R2R_TWOS_COMPLEMENT, dac_16bit_r2r_twos_complement_device, dac_word_interface, dac_code_twos_complement<16>, dac_gain_r2r, "16-Bit R-2R Twos Complement DAC", "dac_16bit_r2r_tc")
+#undef DAC_GENERATOR
+#undef DAC_GENERATOR_EPILOG
#endif /* __DAC_H__ */
diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp
index dc2602c7cea..939a2f79a0c 100644
--- a/src/devices/sound/es5506.cpp
+++ b/src/devices/sound/es5506.cpp
@@ -1096,9 +1096,15 @@ void es5505_device::generate_samples(INT32 **outputs, int offset, int samples)
es550x_voice *voice = &m_voice[v];
UINT16 *base = m_region_base[voice->control >> 14];
+// This special case does not appear to match the behaviour observed in the es5505 in
+// actual Ensoniq synthesizers: those, it turns out, do set loop start and end to the
+// same value, and expect the voice to keep running. Examples can be found among the
+// transwaves on the VFX / SD-1 series of synthesizers.
+#if 0
/* special case: if end == start, stop the voice */
if (voice->start == voice->end)
voice->control |= CONTROL_STOP0;
+#endif
int voice_channel = (voice->control & CONTROL_CAMASK) >> 10;
int channel = voice_channel % m_channels;
@@ -2165,6 +2171,16 @@ inline UINT16 es5505_device::reg_read_test(es550x_voice *voice, offs_t offset)
result = m_read_port_cb(0);
break;
+ /* The following are global, and thus accessible form all pages */
+ case 0x0d: /* ACT */
+ result = m_active_voices;
+ break;
+
+ case 0x0e: /* IRQV */
+ result = m_irqv;
+ update_internal_irq_state();
+ break;
+
case 0x0f: /* PAGE */
result = m_current_page;
break;
diff --git a/src/devices/sound/fmopl.cpp b/src/devices/sound/fmopl.cpp
index 3a9bcebdd70..b3bfe156593 100644
--- a/src/devices/sound/fmopl.cpp
+++ b/src/devices/sound/fmopl.cpp
@@ -183,11 +183,6 @@ static FILE *sample[1];
#endif
#endif
-#define LOG_CYM_FILE 0
-static FILE * cymfile = nullptr;
-
-
-
#define OPL_TYPE_WAVESEL 0x01 /* waveform select */
#define OPL_TYPE_ADPCM 0x02 /* DELTA-T ADPCM unit */
#define OPL_TYPE_KEYBOARD 0x04 /* keyboard interface */
@@ -1458,13 +1453,6 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v)
r &= 0xff;
v &= 0xff;
- if (LOG_CYM_FILE && (cymfile) && (r!=0) )
- {
- fputc( (unsigned char)r, cymfile );
- fputc( (unsigned char)v, cymfile );
- }
-
-
switch(r&0xe0)
{
case 0x00: /* 00-1f:control */
@@ -1719,14 +1707,6 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v)
}
}
-static TIMER_CALLBACK( cymfile_callback )
-{
- if (cymfile)
- {
- fputc( (unsigned char)0, cymfile );
- }
-}
-
/* lock/unlock for common table */
static int OPL_LockTable(device_t *device)
{
@@ -1742,15 +1722,6 @@ static int OPL_LockTable(device_t *device)
return -1;
}
- if (LOG_CYM_FILE)
- {
- cymfile = fopen("3812_.cym","wb");
- if (cymfile)
- device->machine().scheduler().timer_pulse ( attotime::from_hz(110), timer_expired_delegate(FUNC(cymfile_callback),&device->machine())); /*110 Hz pulse timer*/
- else
- device->logerror("Could not create file 3812_.cym\n");
- }
-
return 0;
}
@@ -1762,10 +1733,6 @@ static void OPL_UnLockTable(void)
/* last time */
OPLCloseTable();
-
- if (cymfile)
- fclose (cymfile);
- cymfile = nullptr;
}
static void OPLResetChip(FM_OPL *OPL)
diff --git a/src/mame/audio/mea8000.cpp b/src/devices/sound/mea8000.cpp
index a96098a83ce..481561a7fcf 100644
--- a/src/mame/audio/mea8000.cpp
+++ b/src/devices/sound/mea8000.cpp
@@ -45,7 +45,7 @@
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
/* digital filters work at 8 kHz */
-#define F0 8096
+#define F0 (clock() / 480)
/* filtered output is supersampled x 8 */
#define SUPERSAMPLING 8
@@ -115,9 +115,11 @@ const device_type MEA8000 = &device_creator<mea8000_device>;
mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, MEA8000, "Philips / Signetics MEA 8000 speech synthesizer", tag, owner, clock, "mea8000", __FILE__)
- , m_write_req(*this)
- , m_dac(*this, finder_base::DUMMY_TAG)
+ : device_t(mconfig, MEA8000, "Philips / Signetics MEA 8000 speech synthesizer", tag, owner, clock, "mea8000", __FILE__),
+ device_sound_interface(mconfig, *this),
+ m_write_req(*this),
+ m_stream(nullptr),
+ m_output(0)
{
}
@@ -132,6 +134,9 @@ void mea8000_device::device_start()
init_tables();
+ m_stream = stream_alloc(0, 1, clock() / 60);
+ save_item(NAME(m_output));
+
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mea8000_device::timer_expire),this));
save_item(NAME(m_state));
@@ -161,26 +166,6 @@ void mea8000_device::device_start()
save_item(NAME(m_noise));
}
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void mea8000_device::device_reset()
-{
- LOG(("mea8000_reset\n"));
- m_timer->reset();
- m_phi = 0;
- m_cont = 0;
- m_roe = 0;
- m_state = MEA8000_STOPPED;
- update_req();
- for (auto & elem : m_f)
- {
- elem.last_output = 0;
- elem.output = 0;
- }
-}
-
/***************************** REQ **********************************/
@@ -431,11 +416,20 @@ void mea8000_device::stop_frame()
/* enter stop mode */
m_timer->reset();
m_state = MEA8000_STOPPED;
- m_dac->write_signed16(0x8000);
+ m_stream->update();
+ m_output = 0;
}
+void mea8000_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+{
+ for (int samp = 0; samp < samples; samp++)
+ {
+ outputs[0][samp] = m_output;
+ }
+}
+
/* next sample in frame, sampling at 64 kHz */
TIMER_CALLBACK_MEMBER( mea8000_device::timer_expire )
{
@@ -446,13 +440,15 @@ TIMER_CALLBACK_MEMBER( mea8000_device::timer_expire )
/* sample is really computed only every 8-th time */
m_lastsample = m_sample;
m_sample = compute_sample();
- m_dac->write_signed16(0x8000 + m_lastsample);
+ m_stream->update();
+ m_output = m_lastsample;
}
else
{
/* other samples are simply interpolated */
int sample = m_lastsample + ((pos * (m_sample-m_lastsample)) / SUPERSAMPLING);
- m_dac->write_signed16(0x8000 + sample);
+ m_stream->update();
+ m_output = sample;
}
m_framepos++;
diff --git a/src/mame/audio/mea8000.h b/src/devices/sound/mea8000.h
index fcda2267a80..155249729b9 100644
--- a/src/mame/audio/mea8000.h
+++ b/src/devices/sound/mea8000.h
@@ -11,8 +11,6 @@
#ifndef __MEA8000_H__
#define __MEA8000_H__
-#include "sound/dac.h"
-
#define MCFG_MEA8000_DAC(_tag) \
mea8000_device::static_set_dac_tag(*device, "^" _tag);
@@ -54,13 +52,13 @@ struct filter_t
#endif
};
-class mea8000_device : public device_t
+class mea8000_device : public device_t,
+ public device_sound_interface
{
public:
mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~mea8000_device() {}
- static void static_set_dac_tag(device_t &device, const char *tag) { downcast<mea8000_device &>(device).m_dac.set_tag(tag); }
template<class _Object> static devcb_base &set_req_wr_callback(device_t &device, _Object object) { return downcast<mea8000_device &>(device).m_write_req.set_callback(object); }
DECLARE_READ8_MEMBER(read);
@@ -69,7 +67,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
// internal state
@@ -100,8 +98,6 @@ private:
devcb_write8 m_write_req;
- required_device<dac_device> m_dac;
-
/* state */
mea8000_state m_state; /* current state */
@@ -126,6 +122,8 @@ private:
UINT8 m_noise;
emu_timer *m_timer;
+ sound_stream * m_stream;
+ stream_sample_t m_output;
int m_cos_table[TABLE_LEN]; /* fm => cos coefficient */
int m_exp_table[TABLE_LEN]; /* bw => exp coefficient */
diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp
index 3f8c9fe5bd6..b4e585a211a 100644
--- a/src/devices/sound/spu.cpp
+++ b/src/devices/sound/spu.cpp
@@ -475,7 +475,7 @@ public:
*prev;
};
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
unsigned int head,
tail,
in,
diff --git a/src/devices/sound/tms3615.h b/src/devices/sound/tms3615.h
index c63ef18e7c3..33f561b114f 100644
--- a/src/devices/sound/tms3615.h
+++ b/src/devices/sound/tms3615.h
@@ -55,7 +55,8 @@ private:
int m_enable; /* mask which tones to play */
};
-extern ATTR_DEPRECATED const device_type TMS3615;
+[[deprecated("Use TMS36XX instead")]]
+extern const device_type TMS3615;
#endif /* __TMS3615_H__ */
diff --git a/src/devices/sound/volt_reg.cpp b/src/devices/sound/volt_reg.cpp
new file mode 100644
index 00000000000..11ac2ad47c2
--- /dev/null
+++ b/src/devices/sound/volt_reg.cpp
@@ -0,0 +1,33 @@
+// license:BSD-3-Clause
+// copyright-holders:smf
+/***************************************************************************
+
+ volt_reg.c
+
+ Direct current.
+
+***************************************************************************/
+
+#include "volt_reg.h"
+
+const device_type VOLTAGE_REGULATOR = &device_creator<voltage_regulator_device>;
+
+voltage_regulator_device::voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VOLTAGE_REGULATOR, "Voltage Regulator", tag, owner, clock, "volt_reg", __FILE__),
+ device_sound_interface(mconfig, *this),
+ m_output(0)
+{
+}
+
+void voltage_regulator_device::device_start()
+{
+ m_stream = stream_alloc(0, 1, 500);
+}
+
+void voltage_regulator_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+{
+ for (int samp = 0; samp < samples; samp++)
+ {
+ outputs[0][samp] = m_output;
+ }
+}
diff --git a/src/devices/sound/volt_reg.h b/src/devices/sound/volt_reg.h
new file mode 100644
index 00000000000..d8ca9b163f5
--- /dev/null
+++ b/src/devices/sound/volt_reg.h
@@ -0,0 +1,44 @@
+// license:BSD-3-Clause
+// copyright-holders:smf
+/***************************************************************************
+
+ volt_reg.h
+
+ Voltage Regulator
+
+***************************************************************************/
+
+#ifndef __VOLTAGE_REGULATOR_H__
+#define __VOLTAGE_REGULATOR_H__
+
+#include "emu.h"
+
+#define MCFG_VOLTAGE_REGULATOR_OUTPUT(_output) \
+ voltage_regulator_device::set_output(*device, _output);
+
+class voltage_regulator_device : public device_t,
+ public device_sound_interface
+{
+public:
+ static void set_output(device_t &device, double analogue_dc) { downcast<voltage_regulator_device &>(device).m_output = (analogue_dc * 32768) / 5.0f; }
+
+ voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ~voltage_regulator_device() { }
+
+ virtual bool issound() override { return false; }
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+ // sound stream update overrides
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+
+private:
+ sound_stream* m_stream;
+ stream_sample_t m_output;
+};
+
+extern const device_type VOLTAGE_REGULATOR;
+
+#endif
diff --git a/src/devices/sound/ymf262.cpp b/src/devices/sound/ymf262.cpp
index b7c2aaf4b64..13db00967ae 100644
--- a/src/devices/sound/ymf262.cpp
+++ b/src/devices/sound/ymf262.cpp
@@ -133,12 +133,6 @@ static FILE *sample[1];
#endif
#endif
-#define LOG_CYM_FILE 0
-static FILE * cymfile = nullptr;
-
-
-
-
#define OPL3_TYPE_YMF262 (0) /* 36 operators, 8 waveforms */
@@ -1627,17 +1621,6 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v)
int slot;
int block_fnum;
-
-
- if (LOG_CYM_FILE && (cymfile) && ((r&255)!=0) && (r!=255) )
- {
- if (r>0xff)
- fputc( (unsigned char)0xff, cymfile );/*mark writes to second register set*/
-
- fputc( (unsigned char)r&0xff, cymfile );
- fputc( (unsigned char)v, cymfile );
- }
-
if(r&0x100)
{
switch(r)
@@ -2243,14 +2226,6 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v)
}
}
-static TIMER_CALLBACK( cymfile_callback )
-{
- if (cymfile)
- {
- fputc( (unsigned char)0, cymfile );
- }
-}
-
/* lock/unlock for common table */
static int OPL3_LockTable(device_t *device)
{
@@ -2265,15 +2240,6 @@ static int OPL3_LockTable(device_t *device)
return -1;
}
- if (LOG_CYM_FILE)
- {
- cymfile = fopen("ymf262_.cym","wb");
- if (cymfile)
- device->machine().scheduler().timer_pulse ( attotime::from_hz(110), timer_expired_delegate(FUNC(cymfile_callback),&device->machine())); /*110 Hz pulse timer*/
- else
- device->logerror("Could not create ymf262_.cym file\n");
- }
-
return 0;
}
@@ -2284,10 +2250,6 @@ static void OPL3_UnLockTable(void)
/* last time */
OPLCloseTable();
-
- if (LOG_CYM_FILE)
- fclose (cymfile);
- cymfile = nullptr;
}
static void OPL3ResetChip(OPL3 *chip)
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index 04e7c967869..fb52c855ecc 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -441,6 +441,12 @@ READ_LINE_MEMBER( mc6845_device::cursor_r )
}
+READ_LINE_MEMBER( mc6845_device::cursor_state_r )
+{
+ return m_cursor_state;
+}
+
+
READ_LINE_MEMBER( mc6845_device::hsync_r )
{
return m_hsync;
diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h
index 9bad2348640..f530485b886 100644
--- a/src/devices/video/mc6845.h
+++ b/src/devices/video/mc6845.h
@@ -141,6 +141,7 @@ public:
// read cursor line state
DECLARE_READ_LINE_MEMBER( cursor_r );
+ DECLARE_READ_LINE_MEMBER( cursor_state_r );
// read horizontal sync line state
DECLARE_READ_LINE_MEMBER( hsync_r );
diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h
index a7f0552ffdb..0e7652ee4ea 100644
--- a/src/devices/video/pc_vga.h
+++ b/src/devices/video/pc_vga.h
@@ -115,7 +115,7 @@ protected:
int crtc_regcount;
} svga_intf;
- dynamic_buffer memory;
+ std::vector<UINT8> memory;
UINT32 pens[16]; /* the current 16 pens */
UINT8 miscellaneous_output;
diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp
index d6a37db90c5..5d22db9442c 100644
--- a/src/devices/video/ramdac.cpp
+++ b/src/devices/video/ramdac.cpp
@@ -45,6 +45,7 @@ ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, dev
device_memory_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(ramdac_palram)),
m_palette(*this, finder_base::DUMMY_TAG),
+ m_color_base(0),
m_split_read_reg(0)
{
}
@@ -190,7 +191,8 @@ WRITE8_MEMBER( ramdac_device::ramdac_rgb666_w )
m_palram[offset] = data & 0x3f;
pal_offs = (offset & 0xff);
- m_palette->set_pen_color(offset&0xff,pal6bit(m_palram[pal_offs|0x000]),pal6bit(m_palram[pal_offs|0x100]),pal6bit(m_palram[pal_offs|0x200]));
+ pen_t pen = m_color_base + (offset & 0xff);
+ m_palette->set_pen_color(pen, pal6bit(m_palram[pal_offs|0x000]), pal6bit(m_palram[pal_offs|0x100]), pal6bit(m_palram[pal_offs|0x200]));
}
WRITE8_MEMBER( ramdac_device::ramdac_rgb888_w )
@@ -200,5 +202,6 @@ WRITE8_MEMBER( ramdac_device::ramdac_rgb888_w )
m_palram[offset] = data;
pal_offs = (offset & 0xff);
- m_palette->set_pen_color(offset&0xff,m_palram[pal_offs|0x000],m_palram[pal_offs|0x100],m_palram[pal_offs|0x200]);
+ pen_t pen = m_color_base + (offset & 0xff);
+ m_palette->set_pen_color(pen, m_palram[pal_offs|0x000], m_palram[pal_offs|0x100], m_palram[pal_offs|0x200]);
}
diff --git a/src/devices/video/ramdac.h b/src/devices/video/ramdac.h
index a006312c59f..804bdc68c79 100644
--- a/src/devices/video/ramdac.h
+++ b/src/devices/video/ramdac.h
@@ -23,6 +23,9 @@
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
ramdac_device::static_set_palette_tag(*device, "^" _palette_tag);
+#define MCFG_RAMDAC_COLOR_BASE(_color_base) \
+ ramdac_device::static_set_color_base(*device, _color_base);
+
#define MCFG_RAMDAC_SPLIT_READ(_split) \
ramdac_device::set_split_read(*device, _split);
@@ -42,6 +45,7 @@ public:
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
+ static void static_set_color_base(device_t &device, UINT32 color_base) { downcast<ramdac_device &>(device).m_color_base = color_base; }
static void set_split_read(device_t &device, int split) { downcast<ramdac_device &>(device).m_split_read_reg = split; }
// I/O operations
@@ -76,6 +80,7 @@ private:
const address_space_config m_space_config;
required_device<palette_device> m_palette;
+ UINT32 m_color_base;
UINT8 m_split_read_reg; // read register index is separated, seen in rltennis
};
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index dbedc270767..a2e0d43a0c1 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -206,9 +206,9 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu
m_console.register_command("loadd", CMDFLAG_NONE, AS_DATA, 3, 4, std::bind(&debugger_commands::execute_load, this, _1, _2, _3));
m_console.register_command("loadi", CMDFLAG_NONE, AS_IO, 3, 4, std::bind(&debugger_commands::execute_load, this, _1, _2, _3));
- m_console.register_command("dump", CMDFLAG_NONE, AS_PROGRAM, 3, 6, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
- m_console.register_command("dumpd", CMDFLAG_NONE, AS_DATA, 3, 6, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
- m_console.register_command("dumpi", CMDFLAG_NONE, AS_IO, 3, 6, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
+ m_console.register_command("dump", CMDFLAG_NONE, AS_PROGRAM, 3, 7, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
+ m_console.register_command("dumpd", CMDFLAG_NONE, AS_DATA, 3, 7, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
+ m_console.register_command("dumpi", CMDFLAG_NONE, AS_IO, 3, 7, std::bind(&debugger_commands::execute_dump, this, _1, _2, _3));
m_console.register_command("cheatinit", CMDFLAG_NONE, 0, 0, 4, std::bind(&debugger_commands::execute_cheatinit, this, _1, _2, _3));
m_console.register_command("ci", CMDFLAG_NONE, 0, 0, 4, std::bind(&debugger_commands::execute_cheatinit, this, _1, _2, _3));
@@ -1713,8 +1713,12 @@ void debugger_commands::execute_dump(int ref, int params, const char *param[])
if (!validate_number_parameter(param[4], &ascii))
return;
+ UINT64 rowsize = 16;
+ if (!validate_number_parameter(param[5], &rowsize))
+ return;
+
address_space *space;
- if (!validate_cpu_space_parameter((params > 5) ? param[5] : nullptr, ref, space))
+ if (!validate_cpu_space_parameter((params > 6) ? param[6] : nullptr, ref, space))
return;
/* further validation */
@@ -1727,6 +1731,12 @@ void debugger_commands::execute_dump(int ref, int params, const char *param[])
m_console.printf("Invalid width! (must be 1,2,4 or 8)\n");
return;
}
+ if (rowsize == 0 || (rowsize % width) != 0)
+ {
+ m_console.printf("Invalid row size! (must be a positive multiple of %d)", width);
+ return;
+ }
+
UINT64 endoffset = space->address_to_byte(offset + length - 1) & space->bytemask();
offset = space->address_to_byte(offset) & space->bytemask();
@@ -1741,7 +1751,7 @@ void debugger_commands::execute_dump(int ref, int params, const char *param[])
/* now write the data out */
util::ovectorstream output;
output.reserve(200);
- for (UINT64 i = offset; i <= endoffset; i += 16)
+ for (UINT64 i = offset; i <= endoffset; i += rowsize)
{
output.clear();
output.rdbuf()->clear();
@@ -1750,7 +1760,7 @@ void debugger_commands::execute_dump(int ref, int params, const char *param[])
util::stream_format(output, "%0*X: ", space->logaddrchars(), (UINT32)space->byte_to_address(i));
/* print the bytes */
- for (UINT64 j = 0; j < 16; j += width)
+ for (UINT64 j = 0; j < rowsize; j += width)
{
if (i + j <= endoffset)
{
@@ -1773,7 +1783,7 @@ void debugger_commands::execute_dump(int ref, int params, const char *param[])
if (ascii)
{
util::stream_format(output, " ");
- for (UINT64 j = 0; j < 16 && (i + j) <= endoffset; j++)
+ for (UINT64 j = 0; j < rowsize && (i + j) <= endoffset; j++)
{
offs_t curaddr = i + j;
if (space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr))
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 5e6535a9fb4..e0c4d3b514d 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -1710,7 +1710,7 @@ device_debug::device_debug(device_t &device)
for (auto &entry : m_state->state_entries())
{
strmakelower(tempstr.assign(entry->symbol()));
- m_symtable.add(tempstr.c_str(), (void *)(FPTR)entry->index(), get_state, set_state);
+ m_symtable.add(tempstr.c_str(), (void *)(uintptr_t)entry->index(), get_state, set_state);
}
}
@@ -3137,7 +3137,7 @@ void device_debug::set_logunmap(symbol_table &table, void *ref, UINT64 value)
UINT64 device_debug::get_state(symbol_table &table, void *ref)
{
device_t *device = reinterpret_cast<device_t *>(table.globalref());
- return device->debug()->m_state->state_int(reinterpret_cast<FPTR>(ref));
+ return device->debug()->m_state->state_int(reinterpret_cast<uintptr_t>(ref));
}
@@ -3149,7 +3149,7 @@ UINT64 device_debug::get_state(symbol_table &table, void *ref)
void device_debug::set_state(symbol_table &table, void *ref, UINT64 value)
{
device_t *device = reinterpret_cast<device_t *>(table.globalref());
- device->debug()->m_state->set_state_int(reinterpret_cast<FPTR>(ref), value);
+ device->debug()->m_state->set_state_int(reinterpret_cast<uintptr_t>(ref), value);
}
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 66bbe48e1f2..7ec39ba4863 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -80,7 +80,7 @@ public:
const device_debug * m_debugInterface; // the interface we were created from
breakpoint * m_next; // next in the list
int m_index; // user reported index
- UINT8 m_enabled; // enabled?
+ bool m_enabled; // enabled?
offs_t m_address; // execution address
parsed_expression m_condition; // condition
std::string m_action; // action
@@ -156,7 +156,7 @@ public:
registerpoint * m_next; // next in the list
int m_index; // user reported index
- UINT8 m_enabled; // enabled?
+ bool m_enabled; // enabled?
parsed_expression m_condition; // condition
std::string m_action; // action
};
diff --git a/src/emu/devfind.h b/src/emu/devfind.h
index d069d14033f..7aa8bdcd5d1 100644
--- a/src/emu/devfind.h
+++ b/src/emu/devfind.h
@@ -115,6 +115,12 @@ public:
/// \param [in] index Index of desired element (zero-based).
/// \return Reference to element at specified index.
T &operator[](unsigned index) { assert(index < Count); return m_array[index]; }
+
+ /// \brief Get array size
+ ///
+ /// Returns number of objects in array (compile-time constant).
+ /// \return The size of the array.
+ constexpr unsigned size() const { return Count; }
};
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index 240fd950043..25b3237b87a 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -71,7 +71,6 @@ enum
// MACROS
//**************************************************************************
-#define TIMER_CALLBACK(name) void name(running_machine &machine, void *ptr, int param)
#define TIMER_CALLBACK_MEMBER(name) void name(void *ptr, INT32 param)
// IRQ callback to be called by device implementations when an IRQ is actually taken
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index 72dd9b01d6a..c555204ad38 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -377,11 +377,29 @@ bool device_image_interface::try_change_working_directory(const std::string &sub
void device_image_interface::setup_working_directory()
{
- // first set up the working directory to be the starting directory
- osd_get_full_path(m_working_directory, ".");
+ bool success = false;
+ // get user-specified directory and make sure it exists
+ m_working_directory = device().mconfig().options().sw_path();
+ // if multipath, get first
+ size_t i = m_working_directory.find_first_of(";");
+ if (i != std::string::npos)
+ m_working_directory.resize(i);
+ // validate directory
+ if (!m_working_directory.empty())
+ if (osd::directory::open(m_working_directory))
+ success = true;
+
+ // if not exist, use previous method
+ if (!success)
+ {
+ // first set up the working directory to be the starting directory
+ osd_get_full_path(m_working_directory, ".");
+ // now try browsing down to "software"
+ if (try_change_working_directory("software"))
+ success = true;
+ }
- // now try browsing down to "software"
- if (try_change_working_directory("software"))
+ if (success)
{
// now down to a directory for this computer
int gamedrv = driver_list::find(device().machine().system());
@@ -481,7 +499,7 @@ void device_image_interface::run_hash(void (*partialhash)(util::hash_collection
util::hash_collection &hashes, const char *types)
{
UINT32 size;
- dynamic_buffer buf;
+ std::vector<UINT8> buf;
hashes.reset();
size = (UINT32) length();
diff --git a/src/emu/diserial.cpp b/src/emu/diserial.cpp
index 4613da0d4ad..182360fab3a 100644
--- a/src/emu/diserial.cpp
+++ b/src/emu/diserial.cpp
@@ -454,12 +454,12 @@ UINT8 device_serial_interface::transmit_register_get_data_bit()
bool device_serial_interface::is_receive_register_full()
{
- return m_rcv_flags & RECEIVE_REGISTER_FULL;
+ return (m_rcv_flags & RECEIVE_REGISTER_FULL)!=0;
}
bool device_serial_interface::is_transmit_register_empty()
{
- return m_tra_flags & TRANSMIT_REGISTER_EMPTY;
+ return (m_tra_flags & TRANSMIT_REGISTER_EMPTY)!=0;
}
const char *device_serial_interface::parity_tostring(parity_t parity)
diff --git a/src/emu/diserial.h b/src/emu/diserial.h
index 12c2479234b..1d4d957a041 100644
--- a/src/emu/diserial.h
+++ b/src/emu/diserial.h
@@ -109,7 +109,7 @@ protected:
bool is_receive_register_full();
bool is_transmit_register_empty();
- bool is_receive_register_synchronized() const { return m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED; }
+ bool is_receive_register_synchronized() const { return (m_rcv_flags & RECEIVE_REGISTER_SYNCHRONISED)!=0; }
bool is_receive_register_shifting() const { return m_rcv_bit_count_received > 0; }
bool is_receive_framing_error() const { return m_rcv_framing_error; }
bool is_receive_parity_error() const { return m_rcv_parity_error; }
diff --git a/src/emu/disound.h b/src/emu/disound.h
index f981113317e..2fca3860283 100644
--- a/src/emu/disound.h
+++ b/src/emu/disound.h
@@ -81,6 +81,8 @@ public:
device_sound_interface(const machine_config &mconfig, device_t &device);
virtual ~device_sound_interface();
+ virtual bool issound() { return true; } /// HACK: allow devices to hide from the ui
+
// configuration access
const std::vector<std::unique_ptr<sound_route>> &routes() const { return m_route_list; }
diff --git a/src/emu/distate.h b/src/emu/distate.h
index f4558129bbd..c608e832775 100644
--- a/src/emu/distate.h
+++ b/src/emu/distate.h
@@ -63,7 +63,7 @@ public:
void *dataptr() const { return m_dataptr.v; }
const char *symbol() const { return m_symbol.c_str(); }
bool visible() const { return ((m_flags & DSF_NOSHOW) == 0); }
- bool divider() const { return m_flags & DSF_DIVIDER; }
+ bool divider() const { return ((m_flags & DSF_DIVIDER) != 0); }
device_state_interface *parent_state() const {return m_device_state;}
protected:
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index a5864511c2f..71b480d0b17 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -291,8 +291,8 @@ private:
UINT32 m_dirtyseq; // sequence number; incremented each time a tile is dirtied
UINT8 * m_gfxdata; // pointer to decoded pixel data, 8bpp
- dynamic_buffer m_gfxdata_allocated; // allocated decoded pixel data, 8bpp
- dynamic_buffer m_dirty; // dirty array for detecting chars that need decoding
+ std::vector<UINT8> m_gfxdata_allocated; // allocated decoded pixel data, 8bpp
+ std::vector<UINT8> m_dirty; // dirty array for detecting chars that need decoding
std::vector<UINT32> m_pen_usage; // bitmask of pens that are used (pens 0-31 only)
bool m_layout_is_raw; // raw layout?
diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp
index 450790eb55a..5f67013c603 100644
--- a/src/emu/drivenum.cpp
+++ b/src/emu/drivenum.cpp
@@ -135,8 +135,6 @@ driver_enumerator::driver_enumerator(emu_options &options)
m_included(s_driver_count),
m_config(s_driver_count)
{
- memset(&m_included[0], 0, s_driver_count);
- memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0]));
include_all();
}
@@ -148,8 +146,6 @@ driver_enumerator::driver_enumerator(emu_options &options, const char *string)
m_included(s_driver_count),
m_config(s_driver_count)
{
- memset(&m_included[0], 0, s_driver_count);
- memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0]));
filter(string);
}
@@ -161,8 +157,6 @@ driver_enumerator::driver_enumerator(emu_options &options, const game_driver &dr
m_included(s_driver_count),
m_config(s_driver_count)
{
- memset(&m_included[0], 0, s_driver_count);
- memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0]));
filter(driver);
}
@@ -247,7 +241,7 @@ int driver_enumerator::filter(const game_driver &driver)
void driver_enumerator::include_all()
{
- memset(&m_included[0], 1, sizeof(m_included[0]) * s_driver_count);
+ std::fill(m_included.begin(), m_included.end(), true);
m_filtered_count = s_driver_count;
// always exclude the empty driver
diff --git a/src/emu/drivenum.h b/src/emu/drivenum.h
index cc3bad554bf..3732915b46a 100644
--- a/src/emu/drivenum.h
+++ b/src/emu/drivenum.h
@@ -113,7 +113,7 @@ public:
int filter(const char *string = nullptr);
int filter(const game_driver &driver);
void include_all();
- void exclude_all() { memset(&m_included[0], 0, sizeof(m_included[0]) * s_driver_count); m_filtered_count = 0; }
+ void exclude_all() { std::fill(m_included.begin(), m_included.end(), false); m_filtered_count = 0; }
void reset() { m_current = -1; }
bool next();
bool next_excluded();
@@ -132,7 +132,7 @@ private:
int m_current;
int m_filtered_count;
emu_options & m_options;
- std::vector<UINT8> m_included;
+ std::vector<bool> m_included;
mutable std::vector<std::unique_ptr<machine_config>> m_config;
mutable std::vector<int> m_config_cache;
};
diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp
index f424bca39cb..39f42378499 100644
--- a/src/emu/emualloc.cpp
+++ b/src/emu/emualloc.cpp
@@ -67,7 +67,7 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
std::lock_guard<std::mutex> lock(m_listlock);
// insert into hash table
- int hashval = reinterpret_cast<FPTR>(item.m_ptr) % m_hash_size;
+ int hashval = reinterpret_cast<uintptr_t>(item.m_ptr) % m_hash_size;
item.m_next = m_hash[hashval];
m_hash[hashval] = &item;
@@ -121,7 +121,7 @@ void resource_pool::remove(void *ptr)
// search for the item
std::lock_guard<std::mutex> lock(m_listlock);
- int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
+ int hashval = reinterpret_cast<uintptr_t>(ptr) % m_hash_size;
for (resource_pool_item **scanptr = &m_hash[hashval]; *scanptr != nullptr; scanptr = &(*scanptr)->m_next)
// must match the pointer
@@ -160,7 +160,7 @@ resource_pool_item *resource_pool::find(void *ptr)
// search for the item
std::lock_guard<std::mutex> lock(m_listlock);
- int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
+ int hashval = reinterpret_cast<uintptr_t>(ptr) % m_hash_size;
resource_pool_item *item;
for (item = m_hash[hashval]; item != nullptr; item = item->m_next)
if (item->m_ptr == ptr)
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index 7aadaa170a5..cf4d77acd27 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -371,8 +371,8 @@ enum_value(T value) noexcept
// FUNCTION PROTOTYPES
//**************************************************************************
-ATTR_NORETURN void fatalerror(const char *format, ...) ATTR_PRINTF(1,2);
-ATTR_NORETURN void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...) ATTR_PRINTF(3,4);
+[[noreturn]] void fatalerror(const char *format, ...) ATTR_PRINTF(1,2);
+[[noreturn]] void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...) ATTR_PRINTF(3,4);
//**************************************************************************
// INLINE FUNCTIONS
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index b761409ce42..fbbc20eb2a4 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -4054,7 +4054,7 @@ memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteen
{
m_allocated.resize(length + 0xfff);
memset(&m_allocated[0], 0, length + 0xfff);
- m_data = reinterpret_cast<UINT8 *>((reinterpret_cast<FPTR>(&m_allocated[0]) + 0xfff) & ~0xfff);
+ m_data = reinterpret_cast<UINT8 *>((reinterpret_cast<uintptr_t>(&m_allocated[0]) + 0xfff) & ~0xfff);
}
}
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index c5ed0c10ba5..85242882d90 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -532,7 +532,7 @@ private:
address_space & m_space; // which address space are we associated with?
offs_t m_bytestart, m_byteend; // byte-normalized start/end for verifying a match
UINT8 * m_data; // pointer to the data for this block
- dynamic_buffer m_allocated; // pointer to the actually allocated block
+ std::vector<UINT8> m_allocated; // pointer to the actually allocated block
};
@@ -694,7 +694,7 @@ private:
// internal data
running_machine & m_machine;
std::string m_name;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
endianness_t m_endianness;
UINT8 m_bitwidth;
UINT8 m_bytewidth;
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index 1c488239efa..d9cde626d01 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -39,6 +39,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" },
{ OPTION_PLUGINSPATH, "plugins", OPTION_STRING, "path to plugin files" },
{ OPTION_LANGUAGEPATH, "language", OPTION_STRING, "path to language files" },
+ { OPTION_SWPATH, "software", OPTION_STRING, "path to loose software" },
// output directory options
{ nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 5275b65614f..ec0ee216bbe 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -36,6 +36,7 @@
#define OPTION_CROSSHAIRPATH "crosshairpath"
#define OPTION_PLUGINSPATH "pluginspath"
#define OPTION_LANGUAGEPATH "languagepath"
+#define OPTION_SWPATH "swpath"
// core directory options
#define OPTION_CFG_DIRECTORY "cfg_directory"
@@ -224,6 +225,7 @@ public:
const char *crosshair_path() const { return value(OPTION_CROSSHAIRPATH); }
const char *plugins_path() const { return value(OPTION_PLUGINSPATH); }
const char *language_path() const { return value(OPTION_LANGUAGEPATH); }
+ const char *sw_path() const { return value(OPTION_SWPATH); }
// core directory options
const char *cfg_directory() const { return value(OPTION_CFG_DIRECTORY); }
diff --git a/src/emu/fileio.h b/src/emu/fileio.h
index 218821f7aa5..930ff749c36 100644
--- a/src/emu/fileio.h
+++ b/src/emu/fileio.h
@@ -165,7 +165,7 @@ private:
util::hash_collection m_hashes; // collection of hashes
std::unique_ptr<util::archive_file> m_zipfile; // ZIP file pointer
- dynamic_buffer m_zipdata; // ZIP file data
+ std::vector<UINT8> m_zipdata; // ZIP file data
UINT64 m_ziplength; // ZIP file length
bool m_remove_on_close; // flag: remove the file when closing
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index ee9279bcf8b..2943457ebb9 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -620,7 +620,7 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
// reset sequences and chars
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
m_seq[seqtype].set_default();
- m_chars[0] = m_chars[1] = m_chars[2] = m_chars[3] = unicode_char(0);
+ m_chars[0] = m_chars[1] = m_chars[2] = m_chars[3] = char32_t(0);
// for DIP switches and configs, look for a default value from the owner
if (type == IPT_DIPSWITCH || type == IPT_CONFIG)
@@ -743,9 +743,9 @@ ioport_type_class ioport_field::type_class() const
// code
//-------------------------------------------------
-unicode_char ioport_field::keyboard_code(int which) const
+char32_t ioport_field::keyboard_code(int which) const
{
- unicode_char ch;
+ char32_t ch;
if (which >= ARRAY_LENGTH(m_chars))
throw emu_fatalerror("Tried to access keyboard_code with out-of-range index %d\n", which);
@@ -765,7 +765,7 @@ unicode_char ioport_field::keyboard_code(int which) const
std::string ioport_field::key_name(int which) const
{
- unicode_char ch = keyboard_code(which);
+ char32_t ch = keyboard_code(which);
// attempt to get the string from the character info table
switch (ch)
@@ -1075,8 +1075,8 @@ void ioport_field::frame_update(ioport_value &result)
if (machine().ui().is_menu_active())
return;
- // if we're a keyboard type and using natural keyboard, bail
- if (m_type == IPT_KEYBOARD && machine().ui().use_natural_keyboard())
+ // if user input is locked out here, bail
+ if (m_live->lockout)
{
// use just the digital value
if (m_digital_value)
@@ -1349,7 +1349,8 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
toggle(field.toggle()),
joydir(digital_joystick::JOYDIR_COUNT),
autofire(false),
- autopressed(0)
+ autopressed(0),
+ lockout(false)
{
// fill in the basic values
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
@@ -1368,7 +1369,7 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
// loop through each character on the field
for (int which = 0; ; which++)
{
- unicode_char ch = field.keyboard_code(which);
+ char32_t ch = field.keyboard_code(which);
if (ch == 0)
break;
name.append(string_format("%-*s ", std::max(SPACE_COUNT - 1, 0), field.key_name(which)));
@@ -2515,7 +2516,7 @@ bool ioport_manager::playback_read<bool>(bool &result)
{
UINT8 temp;
playback_read(temp);
- return result = bool(temp);
+ return result = temp!=0;
}
@@ -2970,7 +2971,7 @@ const char *ioport_configurer::string_from_token(const char *string)
return nullptr;
// if the index is greater than the count, assume it to be a pointer
- if (FPTR(string) >= INPUT_STRING_COUNT)
+ if (uintptr_t(string) >= INPUT_STRING_COUNT)
return string;
#if FALSE // Set TRUE, If you want to take care missing-token or wrong-sorting
@@ -2979,14 +2980,14 @@ const char *ioport_configurer::string_from_token(const char *string)
{
int index;
for (index = 0; index < ARRAY_LENGTH(input_port_default_strings); index++)
- if (input_port_default_strings[index].id == FPTR(string))
+ if (input_port_default_strings[index].id == uintptr_t(string))
return input_port_default_strings[index].string;
}
return "(Unknown Default)";
#else
- return input_port_default_strings[FPTR(string)-1].string;
+ return input_port_default_strings[uintptr_t(string)-1].string;
#endif
}
@@ -3055,7 +3056,7 @@ void ioport_configurer::field_alloc(ioport_type type, ioport_value defval, iopor
// field_add_char - add a character to a field
//-------------------------------------------------
-void ioport_configurer::field_add_char(unicode_char ch)
+void ioport_configurer::field_add_char(char32_t ch)
{
for (int index = 0; index < ARRAY_LENGTH(m_curfield->m_chars); index++)
if (m_curfield->m_chars[index] == 0)
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index 1f182d03137..122f242f6b3 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -37,12 +37,12 @@ const ioport_value IP_ACTIVE_LOW = 0xffffffff;
const int MAX_PLAYERS = 10;
// unicode constants
-const unicode_char UCHAR_PRIVATE = 0x100000;
-const unicode_char UCHAR_SHIFT_1 = UCHAR_PRIVATE + 0;
-const unicode_char UCHAR_SHIFT_2 = UCHAR_PRIVATE + 1;
-const unicode_char UCHAR_SHIFT_BEGIN = UCHAR_SHIFT_1;
-const unicode_char UCHAR_SHIFT_END = UCHAR_SHIFT_2;
-const unicode_char UCHAR_MAMEKEY_BEGIN = UCHAR_PRIVATE + 2;
+const char32_t UCHAR_PRIVATE = 0x100000;
+const char32_t UCHAR_SHIFT_1 = UCHAR_PRIVATE + 0;
+const char32_t UCHAR_SHIFT_2 = UCHAR_PRIVATE + 1;
+const char32_t UCHAR_SHIFT_BEGIN = UCHAR_SHIFT_1;
+const char32_t UCHAR_SHIFT_END = UCHAR_SHIFT_2;
+const char32_t UCHAR_MAMEKEY_BEGIN = UCHAR_PRIVATE + 2;
// sequence types for input_port_seq() call
@@ -1073,7 +1073,7 @@ public:
const ioport_value *remap_table() const { return m_remap_table; }
UINT8 way() const { return m_way; }
- unicode_char keyboard_code(int which) const;
+ char32_t keyboard_code(int which) const;
std::string key_name(int which) const;
ioport_field_live &live() const { assert(m_live != nullptr); return *m_live; }
@@ -1159,7 +1159,7 @@ private:
// data relevant to other specific types
UINT8 m_way; // digital joystick 2/4/8-way descriptions
- unicode_char m_chars[4]; // unicode key data
+ char32_t m_chars[4]; // unicode key data
};
@@ -1182,6 +1182,7 @@ struct ioport_field_live
digital_joystick::direction_t joydir; // digital joystick direction index
bool autofire; // autofire
int autopressed; // autofire status
+ bool lockout; // user lockout
std::string name; // overridden name
};
@@ -1512,7 +1513,7 @@ public:
// field helpers
void field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name = nullptr);
- void field_add_char(unicode_char ch);
+ void field_add_char(char32_t ch);
void field_add_code(input_seq_type which, input_code code);
void field_set_way(int way) const { m_curfield->m_way = way; }
void field_set_rotated() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_ROTATED; }
diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp
index 9a654c2078d..0ecf260353a 100644
--- a/src/emu/natkeyboard.cpp
+++ b/src/emu/natkeyboard.cpp
@@ -10,6 +10,7 @@
#include "emu.h"
#include "natkeyboard.h"
+#include "emuopts.h"
//**************************************************************************
@@ -25,7 +26,7 @@
//**************************************************************************
const int KEY_BUFFER_SIZE = 4096;
-const unicode_char INVALID_CHAR = '?';
+const char32_t INVALID_CHAR = '?';
@@ -36,10 +37,10 @@ const unicode_char INVALID_CHAR = '?';
// character information
struct char_info
{
- unicode_char ch;
+ char32_t ch;
const char *alternate; // alternative string, in UTF-8
- static const char_info *find(unicode_char target);
+ static const char_info *find(char32_t target);
};
@@ -314,6 +315,7 @@ const char_info charinfo[] =
natural_keyboard::natural_keyboard(running_machine &machine)
: m_machine(machine),
+ m_in_use(false),
m_bufbegin(0),
m_bufend(0),
m_status_keydown(false),
@@ -331,6 +333,9 @@ natural_keyboard::natural_keyboard(running_machine &machine)
m_buffer.resize(KEY_BUFFER_SIZE);
m_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(natural_keyboard::timer), this));
}
+
+ // retrieve option setting
+ set_in_use(machine.options().natural_keyboard());
}
@@ -349,10 +354,34 @@ void natural_keyboard::configure(ioport_queue_chars_delegate queue_chars, ioport
//-------------------------------------------------
+// set_in_use - specify whether the natural
+// keyboard is active
+//-------------------------------------------------
+
+void natural_keyboard::set_in_use(bool usage)
+{
+ if (m_in_use != usage)
+ {
+ // update active usage
+ m_in_use = usage;
+ std::string error;
+ machine().options().set_value(OPTION_NATURAL_KEYBOARD, usage, OPTION_PRIORITY_CMDLINE, error);
+ assert(error.empty());
+
+ // lock out (or unlock) all keyboard inputs
+ for (auto &port : machine().ioport().ports())
+ for (ioport_field &field : port.second->fields())
+ if (field.type() == IPT_KEYBOARD)
+ field.live().lockout = usage;
+ }
+}
+
+
+//-------------------------------------------------
// post - post a single character
//-------------------------------------------------
-void natural_keyboard::post(unicode_char ch)
+void natural_keyboard::post(char32_t ch)
{
// ignore any \n that are preceded by \r
if (m_last_cr && ch == '\n')
@@ -397,14 +426,14 @@ void natural_keyboard::post(unicode_char ch)
// post - post a unicode encoded string
//-------------------------------------------------
-void natural_keyboard::post(const unicode_char *text, size_t length, const attotime &rate)
+void natural_keyboard::post(const char32_t *text, size_t length, const attotime &rate)
{
// set the fixed rate
m_current_rate = rate;
// 0 length means strlen
if (length == 0)
- for (const unicode_char *scan = text; *scan != 0; scan++)
+ for (const char32_t *scan = text; *scan != 0; scan++)
length++;
// iterate over characters or until the buffer is full up
@@ -434,7 +463,7 @@ void natural_keyboard::post_utf8(const char *text, size_t length, const attotime
while (length > 0)
{
// decode the next character
- unicode_char uc;
+ char32_t uc;
int count = uchar_from_utf8(&uc, text, length);
if (count < 0)
{
@@ -459,7 +488,7 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
static const struct
{
const char *key;
- unicode_char code;
+ char32_t code;
} codes[] =
{
{ "BACKSPACE", 8 },
@@ -504,7 +533,7 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
while (curpos < length)
{
// extract next character
- unicode_char ch = text[curpos];
+ char32_t ch = text[curpos];
size_t increment = 1;
// look for escape characters
@@ -547,7 +576,7 @@ void natural_keyboard::build_codes(ioport_manager &manager)
if (field.type() == IPT_KEYBOARD)
{
// fetch the code, ignoring 0
- unicode_char code = field.keyboard_code(curshift);
+ char32_t code = field.keyboard_code(curshift);
if (code == 0)
continue;
@@ -586,7 +615,7 @@ void natural_keyboard::build_codes(ioport_manager &manager)
// unicode character can be directly posted
//-------------------------------------------------
-bool natural_keyboard::can_post_directly(unicode_char ch)
+bool natural_keyboard::can_post_directly(char32_t ch)
{
// if we have a queueing callback, then it depends on whether we can accept the character
if (!m_queue_chars.isnull())
@@ -603,7 +632,7 @@ bool natural_keyboard::can_post_directly(unicode_char ch)
// unicode character can be posted via translation
//-------------------------------------------------
-bool natural_keyboard::can_post_alternate(unicode_char ch)
+bool natural_keyboard::can_post_alternate(char32_t ch)
{
const char_info *info = char_info::find(ch);
if (info == nullptr)
@@ -615,7 +644,7 @@ bool natural_keyboard::can_post_alternate(unicode_char ch)
while (*altstring != 0)
{
- unicode_char uchar;
+ char32_t uchar;
int count = uchar_from_utf8(&uchar, altstring, strlen(altstring));
if (count <= 0)
return false;
@@ -632,7 +661,7 @@ bool natural_keyboard::can_post_alternate(unicode_char ch)
// posting keyboard events
//-------------------------------------------------
-attotime natural_keyboard::choose_delay(unicode_char ch)
+attotime natural_keyboard::choose_delay(char32_t ch)
{
// if we have a live rate, just use that
if (m_current_rate != attotime::zero)
@@ -651,7 +680,7 @@ attotime natural_keyboard::choose_delay(unicode_char ch)
// internal_post - post a keyboard event
//-------------------------------------------------
-void natural_keyboard::internal_post(unicode_char ch)
+void natural_keyboard::internal_post(char32_t ch)
{
// need to start up the timer?
if (empty())
@@ -714,7 +743,7 @@ void natural_keyboard::timer(void *ptr, int param)
// logging and debugging
//-------------------------------------------------
-std::string natural_keyboard::unicode_to_string(unicode_char ch)
+std::string natural_keyboard::unicode_to_string(char32_t ch)
{
std::string buffer;
switch (ch)
@@ -752,7 +781,7 @@ std::string natural_keyboard::unicode_to_string(unicode_char ch)
// find_code - find a code in our lookup table
//-------------------------------------------------
-const natural_keyboard::keycode_map_entry *natural_keyboard::find_code(unicode_char ch) const
+const natural_keyboard::keycode_map_entry *natural_keyboard::find_code(char32_t ch) const
{
for (auto & elem : m_keycode_map)
{
@@ -802,7 +831,7 @@ std::string natural_keyboard::dump()
// character
//-------------------------------------------------
-const char_info *char_info::find(unicode_char target)
+const char_info *char_info::find(char32_t target)
{
// perform a simple binary search to find the proper alternate
int low = 0;
@@ -810,7 +839,7 @@ const char_info *char_info::find(unicode_char target)
while (high > low)
{
int middle = (high + low) / 2;
- unicode_char ch = charinfo[middle].ch;
+ char32_t ch = charinfo[middle].ch;
if (ch < target)
low = middle + 1;
else if (ch > target)
@@ -832,7 +861,7 @@ int validate_natural_keyboard_statics(void)
{
int i;
int error = FALSE;
- unicode_char last_char = 0;
+ char32_t last_char = 0;
const char_info *ci;
// check to make sure that charinfo is in order
diff --git a/src/emu/natkeyboard.h b/src/emu/natkeyboard.h
index 519482b8cb9..00fc18daf09 100644
--- a/src/emu/natkeyboard.h
+++ b/src/emu/natkeyboard.h
@@ -19,8 +19,8 @@
//**************************************************************************
// keyboard helper function delegates
-typedef delegate<int (const unicode_char *, size_t)> ioport_queue_chars_delegate;
-typedef delegate<bool (unicode_char)> ioport_accept_char_delegate;
+typedef delegate<int (const char32_t *, size_t)> ioport_queue_chars_delegate;
+typedef delegate<bool (char32_t)> ioport_accept_char_delegate;
typedef delegate<bool ()> ioport_charqueue_empty_delegate;
@@ -41,13 +41,15 @@ public:
bool full() const { return ((m_bufend + 1) % m_buffer.size()) == m_bufbegin; }
bool can_post() const { return (!m_queue_chars.isnull() || !m_keycode_map.empty()); }
bool is_posting() const { return (!empty() || (!m_charqueue_empty.isnull() && !m_charqueue_empty())); }
+ bool in_use() const { return m_in_use; }
// configuration
void configure(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty);
+ void set_in_use(bool usage);
// posting
- void post(unicode_char ch);
- void post(const unicode_char *text, size_t length = 0, const attotime &rate = attotime::zero);
+ void post(char32_t ch);
+ void post(const char32_t *text, size_t length = 0, const attotime &rate = attotime::zero);
void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero);
void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero);
@@ -58,25 +60,26 @@ private:
// internal keyboard code information
struct keycode_map_entry
{
- unicode_char ch;
+ char32_t ch;
ioport_field * field[UCHAR_SHIFT_END + 1 - UCHAR_SHIFT_BEGIN];
};
// internal helpers
void build_codes(ioport_manager &manager);
- bool can_post_directly(unicode_char ch);
- bool can_post_alternate(unicode_char ch);
- attotime choose_delay(unicode_char ch);
- void internal_post(unicode_char ch);
+ bool can_post_directly(char32_t ch);
+ bool can_post_alternate(char32_t ch);
+ attotime choose_delay(char32_t ch);
+ void internal_post(char32_t ch);
void timer(void *ptr, int param);
- std::string unicode_to_string(unicode_char ch);
- const keycode_map_entry *find_code(unicode_char ch) const;
+ std::string unicode_to_string(char32_t ch);
+ const keycode_map_entry *find_code(char32_t ch) const;
// internal state
running_machine & m_machine; // reference to our machine
+ bool m_in_use; // is natural keyboard in use?
UINT32 m_bufbegin; // index of starting character
UINT32 m_bufend; // index of ending character
- std::vector<unicode_char> m_buffer; // actual buffer
+ std::vector<char32_t> m_buffer; // actual buffer
bool m_status_keydown; // current keydown status
bool m_last_cr; // was the last char a CR?
emu_timer * m_timer; // timer for posting characters
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 0e28f3c0494..0fbe12ba665 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -205,7 +205,7 @@ inline item_layer get_layer_and_blendmode(const layout_view &view, int index, in
void render_primitive::reset()
{
// do not clear m_next!
- memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
+ memset(&type, 0, uintptr_t(&texcoords + 1) - uintptr_t(&type));
}
@@ -967,7 +967,7 @@ render_target::render_target(render_manager &manager, const internal_layout *lay
m_layerconfig = m_base_layerconfig;
// load the layout files
- load_layout_files(layoutfile, flags & RENDER_CREATE_SINGLE_FILE);
+ load_layout_files(layoutfile, (flags & RENDER_CREATE_SINGLE_FILE)!=0);
// set the current view to the first one
set_view(0);
@@ -1219,7 +1219,7 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height
int scale_mode = m_scale_mode;
if (m_scale_mode == SCALE_FRACTIONAL_AUTO)
{
- bool is_rotated = (m_manager.machine().system().flags & ORIENTATION_SWAP_XY) ^ (target_orientation & ORIENTATION_SWAP_XY);
+ bool is_rotated = ((m_manager.machine().system().flags & ORIENTATION_SWAP_XY) ^ (target_orientation & ORIENTATION_SWAP_XY))!=0;
scale_mode = is_rotated ^ target_is_portrait ? SCALE_FRACTIONAL_Y : SCALE_FRACTIONAL_X;
}
@@ -2235,27 +2235,27 @@ void render_target::config_load(xml_data_node &targetnode)
// modify the artwork config
int tmpint = xml_get_attribute_int(&targetnode, "backdrops", -1);
if (tmpint == 0 || tmpint == 1)
- set_backdrops_enabled(tmpint);
+ set_backdrops_enabled(tmpint != 0);
tmpint = xml_get_attribute_int(&targetnode, "overlays", -1);
if (tmpint == 0 || tmpint == 1)
- set_overlays_enabled(tmpint);
+ set_overlays_enabled(tmpint != 0);
tmpint = xml_get_attribute_int(&targetnode, "bezels", -1);
if (tmpint == 0 || tmpint == 1)
- set_bezels_enabled(tmpint);
+ set_bezels_enabled(tmpint != 0);
tmpint = xml_get_attribute_int(&targetnode, "cpanels", -1);
if (tmpint == 0 || tmpint == 1)
- set_cpanels_enabled(tmpint);
+ set_cpanels_enabled(tmpint != 0);
tmpint = xml_get_attribute_int(&targetnode, "marquees", -1);
if (tmpint == 0 || tmpint == 1)
- set_marquees_enabled(tmpint);
+ set_marquees_enabled(tmpint != 0);
tmpint = xml_get_attribute_int(&targetnode, "zoom", -1);
if (tmpint == 0 || tmpint == 1)
- set_zoom_to_screen(tmpint);
+ set_zoom_to_screen(tmpint != 0);
// apply orientation
tmpint = xml_get_attribute_int(&targetnode, "rotate", -1);
diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp
index 7aebe9d9b35..af4580cc9c1 100644
--- a/src/emu/rendfont.cpp
+++ b/src/emu/rendfont.cpp
@@ -54,7 +54,7 @@ inline const char *next_line(const char *ptr)
// in a font, expanding if necessary
//-------------------------------------------------
-inline render_font::glyph &render_font::get_char(unicode_char chnum)
+inline render_font::glyph &render_font::get_char(char32_t chnum)
{
static glyph dummy_glyph;
@@ -214,7 +214,7 @@ render_font::~render_font()
// character into a bitmap
//-------------------------------------------------
-void render_font::char_expand(unicode_char chnum, glyph &gl)
+void render_font::char_expand(char32_t chnum, glyph &gl)
{
rgb_t color = rgb_t(0xff,0xff,0xff,0xff);
bool is_cmd = (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT);
@@ -350,7 +350,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
// bounds of the final bitmap
//-------------------------------------------------
-render_texture *render_font::get_char_texture_and_bounds(float height, float aspect, unicode_char chnum, render_bounds &bounds)
+render_texture *render_font::get_char_texture_and_bounds(float height, float aspect, char32_t chnum, render_bounds &bounds)
{
glyph &gl = get_char(chnum);
@@ -373,7 +373,7 @@ render_texture *render_font::get_char_texture_and_bounds(float height, float asp
// scaled bitmap and bounding rect for a char
//-------------------------------------------------
-void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, unicode_char chnum, rectangle &bounds)
+void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, char32_t chnum, rectangle &bounds)
{
glyph &gl = get_char(chnum);
@@ -409,7 +409,7 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height
// at the given height
//-------------------------------------------------
-float render_font::char_width(float height, float aspect, unicode_char ch)
+float render_font::char_width(float height, float aspect, char32_t ch)
{
return float(get_char(ch).width) * m_scale * height * aspect;
}
@@ -427,7 +427,7 @@ float render_font::string_width(float height, float aspect, const char *string)
const char *ends = string + strlen(string);
const char *s = string;
- unicode_char schar;
+ char32_t schar;
// loop over characters
while (*s != 0)
@@ -457,7 +457,7 @@ float render_font::utf8string_width(float height, float aspect, const char *utf8
INT32 totwidth = 0;
for (std::size_t offset = 0U; offset < length; offset += unsigned(count))
{
- unicode_char uchar;
+ char32_t uchar;
count = uchar_from_utf8(&uchar, utf8string + offset, length - offset);
if (count < 0)
break;
@@ -760,10 +760,10 @@ bool render_font::save_cached(const char *filename, UINT32 hash)
try
{
// allocate an array to hold the character data
- dynamic_buffer chartable(numchars * CACHED_CHAR_SIZE, 0);
+ std::vector<UINT8> chartable(numchars * CACHED_CHAR_SIZE, 0);
// allocate a temp buffer to compress into
- dynamic_buffer tempbuffer(65536);
+ std::vector<UINT8> tempbuffer(65536);
// write the header
UINT8 *dest = &tempbuffer[0];
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h
index 52a65527282..6e2f410dfec 100644
--- a/src/emu/rendfont.h
+++ b/src/emu/rendfont.h
@@ -39,13 +39,13 @@ public:
// size queries
INT32 pixel_height() const { return m_height; }
- float char_width(float height, float aspect, unicode_char ch);
+ float char_width(float height, float aspect, char32_t ch);
float string_width(float height, float aspect, const char *string);
float utf8string_width(float height, float aspect, const char *utf8string);
// texture/bitmap queries
- render_texture *get_char_texture_and_bounds(float height, float aspect, unicode_char ch, render_bounds &bounds);
- void get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, unicode_char chnum, rectangle &bounds);
+ render_texture *get_char_texture_and_bounds(float height, float aspect, char32_t ch, render_bounds &bounds);
+ void get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height, float aspect, char32_t chnum, rectangle &bounds);
private:
// a glyph describes a single glyph
@@ -80,8 +80,8 @@ private:
};
// helpers
- glyph &get_char(unicode_char chnum);
- void char_expand(unicode_char chnum, glyph &ch);
+ glyph &get_char(char32_t chnum);
+ void char_expand(char32_t chnum, glyph &ch);
bool load_cached_bdf(const char *filename);
bool load_bdf();
bool load_cached(emu_file &file, UINT32 hash);
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 5a8b5dd3531..74246d4a6a4 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -962,7 +962,7 @@ void layout_element::reel_component::draw(running_machine &machine, bitmap_argb3
const char *origs = m_stopnames[fruit].c_str();
const char *ends = origs + strlen(origs);
const char *s = origs;
- unicode_char schar;
+ char32_t schar;
// loop over characters
while (*s != 0)
@@ -1122,7 +1122,7 @@ void layout_element::reel_component::draw_beltreel(running_machine &machine, bit
const char *origs =m_stopnames[fruit].c_str();
const char *ends = origs + strlen(origs);
const char *s = origs;
- unicode_char schar;
+ char32_t schar;
// loop over characters
while (*s != 0)
@@ -1969,7 +1969,7 @@ void layout_element::component::draw_text(render_font &font, bitmap_argb32 &dest
const char *origs = str;
const char *ends = origs + strlen(origs);
const char *s = origs;
- unicode_char schar;
+ char32_t schar;
// loop over characters
while (*s != 0)
diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp
index c356a1d0abd..1d59c92db0b 100644
--- a/src/emu/rendutil.cpp
+++ b/src/emu/rendutil.cpp
@@ -262,7 +262,7 @@ static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT3
render_clip_line - clip a line to a rectangle
-------------------------------------------------*/
-int render_clip_line(render_bounds *bounds, const render_bounds *clip)
+bool render_clip_line(render_bounds *bounds, const render_bounds *clip)
{
/* loop until we get a final result */
while (1)
@@ -291,13 +291,13 @@ int render_clip_line(render_bounds *bounds, const render_bounds *clip)
if (bounds->x1 < clip->x0)
code1 |= 8;
- /* trivial accept: just return FALSE */
+ /* trivial accept: just return false */
if ((code0 | code1) == 0)
- return FALSE;
+ return false;
- /* trivial reject: just return TRUE */
+ /* trivial reject: just return true */
if ((code0 & code1) != 0)
- return TRUE;
+ return true;
/* fix one of the OOB cases */
thiscode = code0 ? code0 : code1;
@@ -349,7 +349,7 @@ int render_clip_line(render_bounds *bounds, const render_bounds *clip)
render_clip_quad - clip a quad to a rectangle
-------------------------------------------------*/
-int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords)
+bool render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords)
{
/* ensure our assumptions about the bounds are correct */
assert(bounds->x0 <= bounds->x1);
@@ -357,13 +357,13 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
/* trivial reject */
if (bounds->y1 < clip->y0)
- return TRUE;
+ return true;
if (bounds->y0 > clip->y1)
- return TRUE;
+ return true;
if (bounds->x1 < clip->x0)
- return TRUE;
+ return true;
if (bounds->x0 > clip->x1)
- return TRUE;
+ return true;
/* clip top (x0,y0)-(x1,y1) */
if (bounds->y0 < clip->y0)
@@ -420,7 +420,7 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
texcoords->br.v -= (texcoords->br.v - texcoords->bl.v) * frac;
}
}
- return FALSE;
+ return false;
}
diff --git a/src/emu/rendutil.h b/src/emu/rendutil.h
index 2aa898ac470..9d3bb526c6d 100644
--- a/src/emu/rendutil.h
+++ b/src/emu/rendutil.h
@@ -22,8 +22,8 @@
/* ----- render utilities ----- */
void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color, bool force = false);
-int render_clip_line(render_bounds *bounds, const render_bounds *clip);
-int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords);
+bool render_clip_line(render_bounds *bounds, const render_bounds *clip);
+bool render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords);
void render_line_to_quad(const render_bounds *bounds, float width, float length_extension, render_bounds *bounds0, render_bounds *bounds1);
void render_load_jpeg(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename);
bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename, bool load_as_alpha_to_existing = false);
diff --git a/src/emu/romentry.cpp b/src/emu/romentry.cpp
index 57e005adb37..1a8545d348b 100644
--- a/src/emu/romentry.cpp
+++ b/src/emu/romentry.cpp
@@ -30,7 +30,7 @@ static std::string hashdata_from_tiny_rom_entry(const tiny_rom_entry &ent)
case ROMENTRYTYPE_FILL:
case ROMENTRYTYPE_COPY:
// for these types, tiny_rom_entry::hashdata is an integer typecasted to a pointer
- result = string_format("0x%x", (unsigned)(FPTR)ent.hashdata);
+ result = string_format("0x%x", (unsigned)(uintptr_t)ent.hashdata);
break;
default:
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index be05a4505bc..b1f9703e690 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -715,7 +715,7 @@ int rom_load_manager::read_rom_data(const rom_entry *parent_region, const rom_en
/* use a temporary buffer for complex loads */
tempbufsize = std::min(TEMPBUFFER_MAX_SIZE, numbytes);
- dynamic_buffer tempbuf(tempbufsize);
+ std::vector<UINT8> tempbuf(tempbufsize);
/* chunky reads for complex loads */
skip += groupsize;
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 1d10b515f43..f1a47766c87 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -114,9 +114,7 @@ screen_device_svg_renderer::screen_device_svg_renderer(memory_region *region)
}
}
m_key_state.resize(m_key_count);
- // Don't memset a vector<bool>, they're special, and not in a good way
- for(int i=0; i != m_key_count; i++)
- m_key_state[i] = false;
+ std::fill(m_key_state.begin(),m_key_state.end(),false);
m_sx = m_sy = 0;
m_scale = 1.0;
@@ -248,7 +246,7 @@ void screen_device_svg_renderer::output_change(const char *outname, INT32 value)
auto l = m_key_ids.find(outname);
if (l == m_key_ids.end())
return;
- m_key_state[l->second] = value;
+ m_key_state[l->second] = value!=0;
}
void screen_device_svg_renderer::compute_initial_bboxes(std::vector<bbox> &bboxes)
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index cafd6fbfde9..70415f7532f 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -1060,7 +1060,7 @@ void sound_manager::update(void *ptr, int param)
// force all the speaker streams to generate the proper number of samples
int samples_this_update = 0;
for (speaker_device &speaker : speaker_device_iterator(machine().root_device()))
- speaker.mix(&m_leftmix[0], &m_rightmix[0], samples_this_update, (m_muted & MUTE_REASON_SYSTEM));
+ speaker.mix(&m_leftmix[0], &m_rightmix[0], samples_this_update, (m_muted & MUTE_REASON_SYSTEM)!=0);
// now downmix the final result
UINT32 finalmix_step = machine().video().speed_factor();
diff --git a/src/emu/ui/cmdrender.h b/src/emu/ui/cmdrender.h
index 130fed0a272..e065e9dcc6d 100644
--- a/src/emu/ui/cmdrender.h
+++ b/src/emu/ui/cmdrender.h
@@ -21,7 +21,7 @@ void convert_command_glyph(std::string &str)
for (int i = j = 0; i < len;)
{
fix_command_t *fixcmd = nullptr;
- unicode_char uchar;
+ char32_t uchar;
int ucharcount = uchar_from_utf8(&uchar, str.substr(i).c_str(), len - i);
if (ucharcount == -1)
break;
diff --git a/src/emu/ui/uimain.h b/src/emu/ui/uimain.h
index 49d2dd023a5..44561ad0174 100644
--- a/src/emu/ui/uimain.h
+++ b/src/emu/ui/uimain.h
@@ -23,7 +23,7 @@ class ui_manager
{
public:
// construction/destruction
- ui_manager(running_machine &machine) : m_machine(machine),m_use_natural_keyboard(false),m_show_timecode_counter(false),m_show_timecode_total(false) { }
+ ui_manager(running_machine &machine) : m_machine(machine),m_show_timecode_counter(false),m_show_timecode_total(false) { }
virtual ~ui_manager() { }
@@ -32,8 +32,6 @@ public:
// is a menuing system active? we want to disable certain keyboard/mouse inputs under such context
virtual bool is_menu_active() { return false; }
- bool use_natural_keyboard() const { return m_use_natural_keyboard; }
-
void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; }
bool show_timecode_counter() const { return m_show_timecode_counter; }
@@ -48,7 +46,6 @@ public:
protected:
// instance variables
running_machine & m_machine;
- bool m_use_natural_keyboard;
bool m_show_timecode_counter;
bool m_show_timecode_total;
};
diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp
index 9707793b2a3..380dc5c16c9 100644
--- a/src/emu/uiinput.cpp
+++ b/src/emu/uiinput.cpp
@@ -244,7 +244,7 @@ bool ui_input_manager::pressed(int code)
bool ui_input_manager::pressed_repeat(int code, int speed)
{
- int pressed;
+ bool pressed;
g_profiler.start(PROFILER_INPUT);
@@ -386,7 +386,7 @@ void ui_input_manager::push_mouse_double_click_event(render_target* target, INT3
push_char_event - pushes a char event
to the specified render_target
-------------------------------------------------*/
-void ui_input_manager::push_char_event(render_target* target, unicode_char ch)
+void ui_input_manager::push_char_event(render_target* target, char32_t ch)
{
ui_event event = { UI_EVENT_NONE };
event.event_type = UI_EVENT_CHAR;
diff --git a/src/emu/uiinput.h b/src/emu/uiinput.h
index e1752f64b19..25d18966e08 100644
--- a/src/emu/uiinput.h
+++ b/src/emu/uiinput.h
@@ -46,7 +46,7 @@ struct ui_event
INT32 mouse_x;
INT32 mouse_y;
input_item_id key;
- unicode_char ch;
+ char32_t ch;
short zdelta;
int num_lines;
};
@@ -92,7 +92,7 @@ public:
void push_mouse_rdown_event(render_target* target, INT32 x, INT32 y);
void push_mouse_rup_event(render_target* target, INT32 x, INT32 y);
void push_mouse_double_click_event(render_target* target, INT32 x, INT32 y);
- void push_char_event(render_target* target, unicode_char ch);
+ void push_char_event(render_target* target, char32_t ch);
void push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines);
void mark_all_as_pressed();
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index 9ddab3cdf84..f98e5b8ed5f 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -32,7 +32,7 @@
inline const char *validity_checker::ioport_string_from_index(UINT32 index)
{
- return ioport_configurer::string_from_token((const char *)(FPTR)index);
+ return ioport_configurer::string_from_token((const char *)(uintptr_t)index);
}
diff --git a/src/emu/validity.h b/src/emu/validity.h
index 36b40df80c9..495e9d934a6 100644
--- a/src/emu/validity.h
+++ b/src/emu/validity.h
@@ -61,7 +61,7 @@ protected:
private:
// internal map types
typedef std::unordered_map<std::string,const game_driver *> game_driver_map;
- typedef std::unordered_map<std::string,FPTR> int_map;
+ typedef std::unordered_map<std::string,uintptr_t> int_map;
// internal helpers
const char *ioport_string_from_index(UINT32 index);
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index abd1bd24066..627b2f1f6da 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -35,20 +35,20 @@
//**************************************************************************
// frameskipping tables
-const UINT8 video_manager::s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS] =
+const bool video_manager::s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS] =
{
- { 0,0,0,0,0,0,0,0,0,0,0,0 },
- { 0,0,0,0,0,0,0,0,0,0,0,1 },
- { 0,0,0,0,0,1,0,0,0,0,0,1 },
- { 0,0,0,1,0,0,0,1,0,0,0,1 },
- { 0,0,1,0,0,1,0,0,1,0,0,1 },
- { 0,1,0,0,1,0,1,0,0,1,0,1 },
- { 0,1,0,1,0,1,0,1,0,1,0,1 },
- { 0,1,0,1,1,0,1,0,1,1,0,1 },
- { 0,1,1,0,1,1,0,1,1,0,1,1 },
- { 0,1,1,1,0,1,1,1,0,1,1,1 },
- { 0,1,1,1,1,1,0,1,1,1,1,1 },
- { 0,1,1,1,1,1,1,1,1,1,1,1 }
+ { false,false,false,false,false,false,false,false,false,false,false,false },
+ { false,false,false,false,false,false,false,false,false,false,false,true },
+ { false,false,false,false,false,true ,false,false,false,false,false,true },
+ { false,false,false,true ,false,false,false,true ,false,false,false,true },
+ { false,false,true ,false,false,true ,false,false,true ,false,false,true },
+ { false,true ,false,false,true ,false,true ,false,false,true ,false,true },
+ { false,true ,false,true ,false,true ,false,true ,false,true ,false,true },
+ { false,true ,false,true ,true ,false,true ,false,true ,true ,false,true },
+ { false,true ,true ,false,true ,true ,false,true ,true ,false,true ,true },
+ { false,true ,true ,true ,false,true ,true ,true ,false,true ,true ,true },
+ { false,true ,true ,true ,true ,true ,false,true ,true ,true ,true ,true },
+ { false,true ,true ,true ,true ,true ,true ,true ,true ,true ,true ,true }
};
diff --git a/src/emu/video.h b/src/emu/video.h
index cf6a1a05017..64536083764 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -194,7 +194,7 @@ private:
// movie recording - dummy
bool m_dummy_recording; // indicates if snapshot should be created of every frame
- static const UINT8 s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS];
+ static const bool s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS];
static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4;
static const int PAUSED_REFRESH_RATE = 30;
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp
index c3fbb049ffa..d7f9a7e76e6 100644
--- a/src/frontend/mame/clifront.cpp
+++ b/src/frontend/mame/clifront.cpp
@@ -14,7 +14,6 @@
#include "chd.h"
#include "emuopts.h"
#include "mameopts.h"
-#include "jedparse.h"
#include "audit.h"
#include "info.h"
#include "unzip.h"
@@ -22,8 +21,7 @@
#include "sound/samples.h"
#include "clifront.h"
#include "xmlfile.h"
-
-#include "drivenum.h"
+#include "media_ident.h"
#include "osdepend.h"
#include "softlist_dev.h"
@@ -31,10 +29,7 @@
#include "ui/moptions.h"
#include "language.h"
#include "pluginopts.h"
-
-#include "linenoise-ng/include/linenoise.h"
-#include <atomic>
-#include <thread>
+#include "console.h"
#include <new>
#include <ctype.h>
@@ -115,294 +110,6 @@ const options_entry cli_option_entries[] =
{ nullptr }
};
-
-// media_identifier class identifies media by hash via a search in
-// the driver database
-class media_identifier
-{
-public:
- // construction/destruction
- media_identifier(emu_options &options);
-
- // getters
- int total() const { return m_total; }
- int matches() const { return m_matches; }
- int nonroms() const { return m_nonroms; }
-
- // operations
- void reset() { m_total = m_matches = m_nonroms = 0; }
- void identify(const char *name);
- void identify_file(const char *name);
- void identify_data(const char *name, const UINT8 *data, int length);
- int find_by_hash(const util::hash_collection &hashes, int length);
-
-private:
- // internal state
- driver_enumerator m_drivlist;
- int m_total;
- int m_matches;
- int m_nonroms;
-};
-
-
-
-//**************************************************************************
-// MEDIA IDENTIFIER
-//**************************************************************************
-
-//-------------------------------------------------
-// media_identifier - constructor
-//-------------------------------------------------
-
-media_identifier::media_identifier(emu_options &options)
- : m_drivlist(options),
- m_total(0),
- m_matches(0),
- m_nonroms(0)
-{
-}
-
-
-//-------------------------------------------------
-// identify - identify a directory, ZIP file,
-// or raw file
-//-------------------------------------------------
-
-void media_identifier::identify(const char *filename)
-{
- // first try to open as a directory
- osd::directory::ptr directory = osd::directory::open(filename);
- if (directory)
- {
- // iterate over all files in the directory
- for (const osd::directory::entry *entry = directory->read(); entry != nullptr; entry = directory->read())
- if (entry->type == osd::directory::entry::entry_type::FILE)
- {
- std::string curfile = std::string(filename).append(PATH_SEPARATOR).append(entry->name);
- identify(curfile.c_str());
- }
-
- // close the directory and be done
- directory.reset();
- }
-
- // if that failed, and the filename ends with .zip, identify as a ZIP file
- if (core_filename_ends_with(filename, ".7z") || core_filename_ends_with(filename, ".zip"))
- {
- // first attempt to examine it as a valid _7Z file
- util::archive_file::ptr archive;
- util::archive_file::error err;
- if (core_filename_ends_with(filename, ".7z"))
- err = util::archive_file::open_7z(filename, archive);
- else
- err = util::archive_file::open_zip(filename, archive);
- if ((err == util::archive_file::error::NONE) && archive)
- {
- std::vector<std::uint8_t> data;
-
- // loop over entries in the .7z, skipping empty files and directories
- for (int i = archive->first_file(); i >= 0; i = archive->next_file())
- {
- const std::uint64_t length(archive->current_uncompressed_length());
- if (!archive->current_is_directory() && (length != 0) && (std::uint32_t(length) == length))
- {
- // decompress data into RAM and identify it
- try
- {
- data.resize(std::size_t(length));
- err = archive->decompress(&data[0], std::uint32_t(length));
- if (err == util::archive_file::error::NONE)
- identify_data(archive->current_name().c_str(), &data[0], length);
- }
- catch (...)
- {
- // resizing the buffer could cause a bad_alloc if archive contains large files
- }
- data.clear();
- }
- }
- }
-
- // clear out any cached files
- archive.reset();
- util::archive_file::cache_clear();
- }
-
- // otherwise, identify as a raw file
- else
- identify_file(filename);
-}
-
-
-//-------------------------------------------------
-// identify_file - identify a file
-//-------------------------------------------------
-
-void media_identifier::identify_file(const char *name)
-{
- // CHD files need to be parsed and their hashes extracted from the header
- if (core_filename_ends_with(name, ".chd"))
- {
- // output the name
- osd_printf_info("%-20s", core_filename_extract_base(name).c_str());
- m_total++;
-
- // attempt to open as a CHD; fail if not
- chd_file chd;
- chd_error err = chd.open(name);
- if (err != CHDERR_NONE)
- {
- osd_printf_info("NOT A CHD\n");
- m_nonroms++;
- return;
- }
-
- // error on writable CHDs
- if (!chd.compressed())
- {
- osd_printf_info("is a writeable CHD\n");
- return;
- }
-
- // otherwise, get the hash collection for this CHD
- util::hash_collection hashes;
- if (chd.sha1() != util::sha1_t::null)
- hashes.add_sha1(chd.sha1());
-
- // determine whether this file exists
- int found = find_by_hash(hashes, chd.logical_bytes());
- if (found == 0)
- osd_printf_info("NO MATCH\n");
- else
- m_matches++;
- }
-
- // all other files have their hashes computed directly
- else
- {
- // load the file and process if it opens and has a valid length
- UINT32 length;
- void *data;
- const osd_file::error filerr = util::core_file::load(name, &data, length);
- if (filerr == osd_file::error::NONE && length > 0)
- {
- identify_data(name, reinterpret_cast<UINT8 *>(data), length);
- osd_free(data);
- }
- }
-}
-
-
-//-------------------------------------------------
-// identify_data - identify a buffer full of
-// data; if it comes from a .JED file, parse the
-// fusemap into raw data first
-//-------------------------------------------------
-
-void media_identifier::identify_data(const char *name, const UINT8 *data, int length)
-{
- // if this is a '.jed' file, process it into raw bits first
- dynamic_buffer tempjed;
- jed_data jed;
- if (core_filename_ends_with(name, ".jed") && jed_parse(data, length, &jed) == JEDERR_NONE)
- {
- // now determine the new data length and allocate temporary memory for it
- length = jedbin_output(&jed, nullptr, 0);
- tempjed.resize(length);
- jedbin_output(&jed, &tempjed[0], length);
- data = &tempjed[0];
- }
-
- // compute the hash of the data
- util::hash_collection hashes;
- hashes.compute(data, length, util::hash_collection::HASH_TYPES_CRC_SHA1);
-
- // output the name
- m_total++;
- osd_printf_info("%-20s", core_filename_extract_base(name).c_str());
-
- // see if we can find a match in the ROMs
- int found = find_by_hash(hashes, length);
-
- // if we didn't find it, try to guess what it might be
- if (found == 0)
- osd_printf_info("NO MATCH\n");
-
- // if we did find it, count it as a match
- else
- m_matches++;
-}
-
-
-//-------------------------------------------------
-// find_by_hash - scan for a file in the list
-// of drivers by hash
-//-------------------------------------------------
-
-int media_identifier::find_by_hash(const util::hash_collection &hashes, int length)
-{
- int found = 0;
- std::unordered_set<std::string> listnames;
- std::unordered_set<std::string> shortnames;
-
- // iterate over drivers
- m_drivlist.reset();
- while (m_drivlist.next())
- {
- // iterate over devices, regions and files within the region
- for (device_t &device : device_iterator(m_drivlist.config().root_device()))
- {
- if (shortnames.insert(device.shortname()).second)
- {
- for (const rom_entry *region = rom_first_region(device); region != nullptr; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
- {
- util::hash_collection romhashes(ROM_GETHASHDATA(rom));
- if (!romhashes.flag(util::hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
- {
- bool baddump = romhashes.flag(util::hash_collection::FLAG_BAD_DUMP);
-
- // output information about the match
- if (found)
- osd_printf_info(" ");
- osd_printf_info("= %s%-20s %-10s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), m_drivlist.driver().name, m_drivlist.driver().description);
- found++;
- }
- }
- }
- }
-
- // next iterate over softlists
- for (software_list_device &swlistdev : software_list_device_iterator(m_drivlist.config().root_device()))
- {
- if (listnames.insert(swlistdev.list_name()).second)
- {
- for (const software_info &swinfo : swlistdev.get_info())
- for (const software_part &part : swinfo.parts())
- for (const rom_entry *region = part.romdata().data(); region != nullptr; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
- {
- util::hash_collection romhashes(ROM_GETHASHDATA(rom));
- if (hashes == romhashes)
- {
- bool baddump = romhashes.flag(util::hash_collection::FLAG_BAD_DUMP);
-
- // output information about the match
- if (found)
- osd_printf_info(" ");
- osd_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev.list_name().c_str(), swinfo.shortname().c_str(), swinfo.longname().c_str());
- found++;
- }
- }
- }
- }
- }
-
- return found;
-}
-
-
-
void print_summary(
const media_auditor &auditor, media_auditor::summary summary, bool record_none_needed,
const char *type, const char *name, const char *parent,
@@ -581,95 +288,7 @@ void cli_frontend::start_execution(mame_machine_manager *manager,int argc, char
m_result = manager->execute();
}
}
-/*
-static const char* examples[] = {
- "db", "hello", "hallo", "hans", "hansekogge", "seamann", "quetzalcoatl", "quit", "power", NULL
-};
-
-void completionHook(char const* prefix, linenoiseCompletions* lc) {
- size_t i;
- for (i = 0; examples[i] != NULL; ++i) {
- if (strncmp(prefix, examples[i], strlen(prefix)) == 0) {
- linenoiseAddCompletion(lc, examples[i]);
- }
- }
-}
-*/
-
-void read_console(std::atomic<bool>& run, std::atomic<bool>& wait, std::string &cmdLine)
-{
- char const* prompt = "\x1b[1;36m[MAME]\x1b[0m> ";
-
- while (run.load())
- {
- while (wait.load())
- {
- using namespace std::chrono_literals;
- std::this_thread::sleep_for(100ms);
- }
- char* result = linenoise(prompt);
- if (result == NULL)
- {
- continue;
- }
-/* else if (!strncmp(result, "/history", 8)) {
- // Display the current history.
- for (int index = 0; ; ++index) {
- char* hist = linenoiseHistoryLine(index);
- if (hist == NULL) break;
- printf("%4d: %s\n", index, hist);
- free(hist);
- }
- }*/
- else if (*result == '\0') {
- free(result);
- continue;
- }
- cmdLine = std::string(result);
- linenoiseHistoryAdd(result);
- //prompt = "\x1b[1;36m[MAME]\x1b[0m \x1b[1;32m[test]\x1b[0m> ";
-
- free(result);
- wait.store(true);
- }
-}
-
-void cli_frontend::start_console()
-{
- linenoiseInstallWindowChangeHandler();
- std::string cmdLine = "";
- const char* file = "./history";
-
- linenoiseHistoryLoad(file);
- //linenoiseSetCompletionCallback(completionHook);
- printf(" _/ _/ _/_/ _/ _/ _/_/_/_/\n");
- printf(" _/_/ _/_/ _/ _/ _/_/ _/_/ _/ \n");
- printf(" _/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/ \n");
- printf(" _/ _/ _/ _/ _/ _/ _/ \n");
- printf("_/ _/ _/ _/ _/ _/ _/_/_/_/ \n");
- printf("\n");
- printf("%s v%s\n%s\n\n", emulator_info::get_appname(), build_version, emulator_info::get_copyright_info());
-
- std::atomic<bool> run(true), wait(false);
- std::thread cinThread(read_console, std::ref(run), std::ref(wait), std::ref(cmdLine));
-
- while (run.load())
- {
- if (wait.load())
- {
- //printf("command %s\n", cmdLine.c_str());
- cmdLine.clear();
- wait.store(false);
- }
- }
-
- run.store(false);
- cinThread.join();
-
- linenoiseHistorySave(file);
- linenoiseHistoryFree();
-}
//-------------------------------------------------
// execute - execute a game via the standard
// command line interface
@@ -695,7 +314,8 @@ int cli_frontend::execute(int argc, char **argv)
if (m_options.console()) {
//manager->lua()->start_console();
- start_console();
+ console_frontend console(m_options, m_osd);
+ console.start_console();
} else {
start_execution(manager, argc, argv, option_errors);
}
diff --git a/src/frontend/mame/clifront.h b/src/frontend/mame/clifront.h
index aeceeace397..4e3958cd5c3 100644
--- a/src/frontend/mame/clifront.h
+++ b/src/frontend/mame/clifront.h
@@ -62,7 +62,6 @@ private:
void display_suggestions(const char *gamename);
void output_single_softlist(FILE *out, software_list_device &swlist);
void start_execution(mame_machine_manager *manager, int argc, char **argv, std::string &option_errors);
- void start_console();
// internal state
emu_options & m_options;
diff --git a/src/frontend/mame/console.cpp b/src/frontend/mame/console.cpp
new file mode 100644
index 00000000000..2d77380a94a
--- /dev/null
+++ b/src/frontend/mame/console.cpp
@@ -0,0 +1,185 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/***************************************************************************
+
+ console.c
+
+ Console interface frontend for MAME.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "console.h"
+#include "linenoise-ng/include/linenoise.h"
+#include "mame.h"
+
+#include <atomic>
+#include <thread>
+
+static console_frontend *gConsole = nullptr;
+//-------------------------------------------------
+// console_frontend - constructor
+//-------------------------------------------------
+
+console_frontend::console_frontend(emu_options &options, osd_interface &osd)
+ : //m_options(options),
+ //m_osd(osd),
+ m_run(true),
+ m_wait(false),
+ m_prompt("\x1b[1;36m[MAME]\x1b[0m> ")
+{
+ using namespace std::placeholders;
+ m_commands.insert(std::make_pair("quit", std::bind(&console_frontend::cmd_quit, this, _1)));
+ m_commands.insert(std::make_pair("exit", std::bind(&console_frontend::cmd_quit, this, _1)));
+ gConsole = this;
+}
+
+
+//-------------------------------------------------
+// ~console_frontend - destructor
+//-------------------------------------------------
+
+console_frontend::~console_frontend()
+{
+}
+
+void console_frontend::completion(char const* prefix, linenoiseCompletions* lc)
+{
+ for (auto cmd : m_commands)
+ {
+ if (strncmp(prefix, cmd.first.c_str(), strlen(prefix)) == 0)
+ {
+ linenoiseAddCompletion(lc, cmd.first.c_str());
+ }
+ }
+}
+
+void console_frontend::cmd_quit(std::vector<std::string>& arg)
+{
+ printf("Exiting application\n");
+ m_run.store(false);
+ m_wait.store(false);
+}
+
+void console_frontend::read_console(std::string &cmdLine)
+{
+ while (m_run.load())
+ {
+ while (m_wait.load())
+ {
+ using namespace std::chrono_literals;
+ std::this_thread::sleep_for(100ms);
+ }
+ if (!m_run.load()) break;
+ char* result = linenoise(m_prompt.c_str());
+ if (result == NULL)
+ {
+ continue;
+ }
+ else if (*result == '\0') {
+ free(result);
+ continue;
+ }
+ cmdLine = std::string(result);
+ linenoiseHistoryAdd(result);
+ //m_prompt = "\x1b[1;36m[MAME]\x1b[0m \x1b[1;32m[test]\x1b[0m> ";
+
+ free(result);
+ m_wait.store(true);
+ }
+}
+
+void console_frontend::split_command(std::vector<std::string>& arg, std::string command)
+{
+ int len = command.length();
+ bool qot = false, sqot = false;
+ int arglen;
+ for (int i = 0; i < len; i++) {
+ int start = i;
+ if (command[i] == '\"') {
+ qot = true;
+ }
+ else if (command[i] == '\'') sqot = true;
+
+ if (qot) {
+ i++;
+ start++;
+ while (i<len && command[i] != '\"')
+ i++;
+ if (i<len)
+ qot = false;
+ arglen = i - start;
+ i++;
+ }
+ else if (sqot) {
+ i++;
+ while (i<len && command[i] != '\'')
+ i++;
+ if (i<len)
+ sqot = false;
+ arglen = i - start;
+ i++;
+ }
+ else {
+ while (i<len && command[i] != ' ')
+ i++;
+ arglen = i - start;
+ }
+ arg.push_back(command.substr(start, arglen));
+ }
+}
+
+static void completionHook(char const* prefix, linenoiseCompletions* lc)
+{
+ gConsole->completion(prefix, lc);
+}
+
+void console_frontend::start_console()
+{
+ linenoiseInstallWindowChangeHandler();
+ std::string cmdLine = "";
+ const char* file = "./history";
+
+ linenoiseHistoryLoad(file);
+ linenoiseSetCompletionCallback(completionHook);
+
+ // Display app info
+ printf(" _/ _/ _/_/ _/ _/ _/_/_/_/\n");
+ printf(" _/_/ _/_/ _/ _/ _/_/ _/_/ _/ \n");
+ printf(" _/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/ \n");
+ printf(" _/ _/ _/ _/ _/ _/ _/ \n");
+ printf("_/ _/ _/ _/ _/ _/ _/_/_/_/ \n");
+ printf("\n");
+ printf("%s v%s\n%s\n\n", emulator_info::get_appname(), build_version, emulator_info::get_copyright_info());
+
+
+ std::thread cinThread(&console_frontend::read_console, this, std::ref(cmdLine));
+
+ while (m_run.load())
+ {
+ if (m_wait.load())
+ {
+ std::vector<std::string> arg;
+ split_command(arg, cmdLine);
+ auto command = m_commands.find(arg[0]);
+ if (command != m_commands.end())
+ {
+ command->second(arg);
+ }
+ else {
+ printf("Unknown command: %s\n", arg[0].c_str());
+ }
+ cmdLine.clear();
+ m_wait.store(false);
+ } else {
+ using namespace std::chrono_literals;
+ std::this_thread::sleep_for(100ms);
+ }
+ }
+
+ m_run.store(false);
+ cinThread.join();
+
+ linenoiseHistorySave(file);
+ linenoiseHistoryFree();
+}
diff --git a/src/frontend/mame/console.h b/src/frontend/mame/console.h
new file mode 100644
index 00000000000..c2bfb0c87a1
--- /dev/null
+++ b/src/frontend/mame/console.h
@@ -0,0 +1,44 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic
+/***************************************************************************
+
+ console.c
+
+ Console interface frontend for MAME.
+
+***************************************************************************/
+#ifndef MAME_FRONTEND_CONSOLE_H
+#define MAME_FRONTEND_CONSOLE_H
+
+#pragma once
+
+#include "emu.h"
+
+struct linenoiseCompletions;
+
+class console_frontend
+{
+public:
+ // construction/destruction
+ console_frontend(emu_options &options, osd_interface &osd);
+ ~console_frontend();
+
+ void start_console();
+ void completion(char const* prefix, linenoiseCompletions* lc);
+
+private:
+ void read_console(std::string &cmdLine);
+ void split_command(std::vector<std::string>& arg, std::string command);
+
+ void cmd_quit(std::vector<std::string>& arg);
+ // internal state
+ //emu_options & m_options;
+ //osd_interface & m_osd;
+ std::atomic<bool> m_run;
+ std::atomic<bool> m_wait;
+ std::string m_prompt;
+
+ std::unordered_map<std::string, std::function<void(std::vector<std::string>& arg)>> m_commands;
+};
+
+#endif /* MAME_FRONTEND_CONSOLE_H */
diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp
index 1d1468643c6..c35f9e8d743 100644
--- a/src/frontend/mame/info.cpp
+++ b/src/frontend/mame/info.cpp
@@ -692,7 +692,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
// iterate over sound devices
for (device_sound_interface &sound : sound_interface_iterator(device))
{
- if (strcmp(sound.device().tag(), device.tag()))
+ if (strcmp(sound.device().tag(), device.tag()) != 0 && sound.issound())
{
std::string newtag(sound.device().tag()), oldtag(":");
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 4dd56437644..22380727f59 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -2832,4 +2832,26 @@ namespace luabridge {
return static_cast <unsigned long long> (luaL_checkunsigned (L, index));
}
};
+
+ template <>
+ struct Stack <char16_t> {
+ static inline void push(lua_State* L, char16_t value) {
+ lua_pushunsigned(L, static_cast <lua_Unsigned> (value));
+ }
+
+ static inline char16_t get(lua_State* L, int index) {
+ return static_cast <char16_t> (luaL_checkunsigned(L, index));
+ }
+ };
+
+ template <>
+ struct Stack <char32_t> {
+ static inline void push(lua_State* L, char32_t value) {
+ lua_pushunsigned(L, static_cast <lua_Unsigned> (value));
+ }
+
+ static inline char32_t get(lua_State* L, int index) {
+ return static_cast <char32_t> (luaL_checkunsigned(L, index));
+ }
+ };
}
diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp
index 9b1150a9590..195fdff70bb 100644
--- a/src/frontend/mame/mameopts.cpp
+++ b/src/frontend/mame/mameopts.cpp
@@ -291,13 +291,9 @@ void mame_options::parse_standard_inis(emu_options &options, std::string &error_
}
}
- // next parse "source/<sourcefile>.ini"; if that doesn't exist, try <sourcefile>.ini
+ // next parse "source/<sourcefile>.ini"
std::string sourcename = core_filename_extract_base(cursystem->source_file, true).insert(0, "source" PATH_SEPARATOR);
- if (!parse_one_ini(options,sourcename.c_str(), OPTION_PRIORITY_SOURCE_INI, &error_string))
- {
- sourcename = core_filename_extract_base(cursystem->source_file, true);
- parse_one_ini(options,sourcename.c_str(), OPTION_PRIORITY_SOURCE_INI, &error_string);
- }
+ parse_one_ini(options,sourcename.c_str(), OPTION_PRIORITY_SOURCE_INI, &error_string);
// then parse the grandparent, parent, and system-specific INIs
int parent = driver_list::clone(*cursystem);
diff --git a/src/frontend/mame/media_ident.cpp b/src/frontend/mame/media_ident.cpp
new file mode 100644
index 00000000000..4642cc84fb5
--- /dev/null
+++ b/src/frontend/mame/media_ident.cpp
@@ -0,0 +1,273 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+/***************************************************************************
+
+ media_ident.c
+
+ Media identify.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "drivenum.h"
+#include "media_ident.h"
+#include "unzip.h"
+#include "jedparse.h"
+#include "softlist_dev.h"
+
+
+//**************************************************************************
+// MEDIA IDENTIFIER
+//**************************************************************************
+
+//-------------------------------------------------
+// media_identifier - constructor
+//-------------------------------------------------
+
+media_identifier::media_identifier(emu_options &options)
+ : m_drivlist(options),
+ m_total(0),
+ m_matches(0),
+ m_nonroms(0)
+{
+}
+
+
+//-------------------------------------------------
+// identify - identify a directory, ZIP file,
+// or raw file
+//-------------------------------------------------
+
+void media_identifier::identify(const char *filename)
+{
+ // first try to open as a directory
+ osd::directory::ptr directory = osd::directory::open(filename);
+ if (directory)
+ {
+ // iterate over all files in the directory
+ for (const osd::directory::entry *entry = directory->read(); entry != nullptr; entry = directory->read())
+ if (entry->type == osd::directory::entry::entry_type::FILE)
+ {
+ std::string curfile = std::string(filename).append(PATH_SEPARATOR).append(entry->name);
+ identify(curfile.c_str());
+ }
+
+ // close the directory and be done
+ directory.reset();
+ }
+
+ // if that failed, and the filename ends with .zip, identify as a ZIP file
+ if (core_filename_ends_with(filename, ".7z") || core_filename_ends_with(filename, ".zip"))
+ {
+ // first attempt to examine it as a valid _7Z file
+ util::archive_file::ptr archive;
+ util::archive_file::error err;
+ if (core_filename_ends_with(filename, ".7z"))
+ err = util::archive_file::open_7z(filename, archive);
+ else
+ err = util::archive_file::open_zip(filename, archive);
+ if ((err == util::archive_file::error::NONE) && archive)
+ {
+ std::vector<std::uint8_t> data;
+
+ // loop over entries in the .7z, skipping empty files and directories
+ for (int i = archive->first_file(); i >= 0; i = archive->next_file())
+ {
+ const std::uint64_t length(archive->current_uncompressed_length());
+ if (!archive->current_is_directory() && (length != 0) && (std::uint32_t(length) == length))
+ {
+ // decompress data into RAM and identify it
+ try
+ {
+ data.resize(std::size_t(length));
+ err = archive->decompress(&data[0], std::uint32_t(length));
+ if (err == util::archive_file::error::NONE)
+ identify_data(archive->current_name().c_str(), &data[0], length);
+ }
+ catch (...)
+ {
+ // resizing the buffer could cause a bad_alloc if archive contains large files
+ }
+ data.clear();
+ }
+ }
+ }
+
+ // clear out any cached files
+ archive.reset();
+ util::archive_file::cache_clear();
+ }
+
+ // otherwise, identify as a raw file
+ else
+ identify_file(filename);
+}
+
+
+//-------------------------------------------------
+// identify_file - identify a file
+//-------------------------------------------------
+
+void media_identifier::identify_file(const char *name)
+{
+ // CHD files need to be parsed and their hashes extracted from the header
+ if (core_filename_ends_with(name, ".chd"))
+ {
+ // output the name
+ osd_printf_info("%-20s", core_filename_extract_base(name).c_str());
+ m_total++;
+
+ // attempt to open as a CHD; fail if not
+ chd_file chd;
+ chd_error err = chd.open(name);
+ if (err != CHDERR_NONE)
+ {
+ osd_printf_info("NOT A CHD\n");
+ m_nonroms++;
+ return;
+ }
+
+ // error on writable CHDs
+ if (!chd.compressed())
+ {
+ osd_printf_info("is a writeable CHD\n");
+ return;
+ }
+
+ // otherwise, get the hash collection for this CHD
+ util::hash_collection hashes;
+ if (chd.sha1() != util::sha1_t::null)
+ hashes.add_sha1(chd.sha1());
+
+ // determine whether this file exists
+ int found = find_by_hash(hashes, chd.logical_bytes());
+ if (found == 0)
+ osd_printf_info("NO MATCH\n");
+ else
+ m_matches++;
+ }
+
+ // all other files have their hashes computed directly
+ else
+ {
+ // load the file and process if it opens and has a valid length
+ UINT32 length;
+ void *data;
+ const osd_file::error filerr = util::core_file::load(name, &data, length);
+ if (filerr == osd_file::error::NONE && length > 0)
+ {
+ identify_data(name, reinterpret_cast<UINT8 *>(data), length);
+ osd_free(data);
+ }
+ }
+}
+
+
+//-------------------------------------------------
+// identify_data - identify a buffer full of
+// data; if it comes from a .JED file, parse the
+// fusemap into raw data first
+//-------------------------------------------------
+
+void media_identifier::identify_data(const char *name, const UINT8 *data, int length)
+{
+ // if this is a '.jed' file, process it into raw bits first
+ std::vector<UINT8> tempjed;
+ jed_data jed;
+ if (core_filename_ends_with(name, ".jed") && jed_parse(data, length, &jed) == JEDERR_NONE)
+ {
+ // now determine the new data length and allocate temporary memory for it
+ length = jedbin_output(&jed, nullptr, 0);
+ tempjed.resize(length);
+ jedbin_output(&jed, &tempjed[0], length);
+ data = &tempjed[0];
+ }
+
+ // compute the hash of the data
+ util::hash_collection hashes;
+ hashes.compute(data, length, util::hash_collection::HASH_TYPES_CRC_SHA1);
+
+ // output the name
+ m_total++;
+ osd_printf_info("%-20s", core_filename_extract_base(name).c_str());
+
+ // see if we can find a match in the ROMs
+ int found = find_by_hash(hashes, length);
+
+ // if we didn't find it, try to guess what it might be
+ if (found == 0)
+ osd_printf_info("NO MATCH\n");
+
+ // if we did find it, count it as a match
+ else
+ m_matches++;
+}
+
+
+//-------------------------------------------------
+// find_by_hash - scan for a file in the list
+// of drivers by hash
+//-------------------------------------------------
+
+int media_identifier::find_by_hash(const util::hash_collection &hashes, int length)
+{
+ int found = 0;
+ std::unordered_set<std::string> listnames;
+ std::unordered_set<std::string> shortnames;
+
+ // iterate over drivers
+ m_drivlist.reset();
+ while (m_drivlist.next())
+ {
+ // iterate over devices, regions and files within the region
+ for (device_t &device : device_iterator(m_drivlist.config().root_device()))
+ {
+ if (shortnames.insert(device.shortname()).second)
+ {
+ for (const rom_entry *region = rom_first_region(device); region != nullptr; region = rom_next_region(region))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
+ {
+ util::hash_collection romhashes(ROM_GETHASHDATA(rom));
+ if (!romhashes.flag(util::hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
+ {
+ bool baddump = romhashes.flag(util::hash_collection::FLAG_BAD_DUMP);
+
+ // output information about the match
+ if (found)
+ osd_printf_info(" ");
+ osd_printf_info("= %s%-20s %-10s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), m_drivlist.driver().name, m_drivlist.driver().description);
+ found++;
+ }
+ }
+ }
+ }
+
+ // next iterate over softlists
+ for (software_list_device &swlistdev : software_list_device_iterator(m_drivlist.config().root_device()))
+ {
+ if (listnames.insert(swlistdev.list_name()).second)
+ {
+ for (const software_info &swinfo : swlistdev.get_info())
+ for (const software_part &part : swinfo.parts())
+ for (const rom_entry *region = part.romdata().data(); region != nullptr; region = rom_next_region(region))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
+ {
+ util::hash_collection romhashes(ROM_GETHASHDATA(rom));
+ if (hashes == romhashes)
+ {
+ bool baddump = romhashes.flag(util::hash_collection::FLAG_BAD_DUMP);
+
+ // output information about the match
+ if (found)
+ osd_printf_info(" ");
+ osd_printf_info("= %s%-20s %s:%s %s\n", baddump ? "(BAD) " : "", ROM_GETNAME(rom), swlistdev.list_name().c_str(), swinfo.shortname().c_str(), swinfo.longname().c_str());
+ found++;
+ }
+ }
+ }
+ }
+ }
+
+ return found;
+}
+
diff --git a/src/frontend/mame/media_ident.h b/src/frontend/mame/media_ident.h
new file mode 100644
index 00000000000..93ff8caad52
--- /dev/null
+++ b/src/frontend/mame/media_ident.h
@@ -0,0 +1,42 @@
+// license:BSD-3-Clause
+// copyright-holders:Aaron Giles
+/***************************************************************************
+
+ media_ident.h
+
+ Media identify.
+
+***************************************************************************/
+#ifndef MAME_FRONTEND_MEDIA_IDENT_H
+#define MAME_FRONTEND_MEDIA_IDENT_H
+
+// media_identifier class identifies media by hash via a search in
+// the driver database
+class media_identifier
+{
+public:
+ // construction/destruction
+ media_identifier(emu_options &options);
+
+ // getters
+ int total() const { return m_total; }
+ int matches() const { return m_matches; }
+ int nonroms() const { return m_nonroms; }
+
+ // operations
+ void reset() { m_total = m_matches = m_nonroms = 0; }
+ void identify(const char *name);
+ void identify_file(const char *name);
+ void identify_data(const char *name, const UINT8 *data, int length);
+ int find_by_hash(const util::hash_collection &hashes, int length);
+
+private:
+ // internal state
+ driver_enumerator m_drivlist;
+ int m_total;
+ int m_matches;
+ int m_nonroms;
+};
+
+
+#endif /* MAME_FRONTEND_MEDIA_IDENT_H */
diff --git a/src/frontend/mame/ui/auditmenu.cpp b/src/frontend/mame/ui/auditmenu.cpp
index 2c243215f49..c76d43da8db 100644
--- a/src/frontend/mame/ui/auditmenu.cpp
+++ b/src/frontend/mame/ui/auditmenu.cpp
@@ -168,7 +168,7 @@ void menu_audit::handle()
void menu_audit::populate()
{
- item_append("Dummy", "", 0, (void *)(FPTR)1);
+ item_append("Dummy", "", 0, (void *)(uintptr_t)1);
}
//-------------------------------------------------
diff --git a/src/frontend/mame/ui/custmenu.cpp b/src/frontend/mame/ui/custmenu.cpp
index 761dc2b1291..71f65a4093f 100644
--- a/src/frontend/mame/ui/custmenu.cpp
+++ b/src/frontend/mame/ui/custmenu.cpp
@@ -50,7 +50,7 @@ void menu_custom_filter::handle()
const event *menu_event = process(PROCESS_LR_REPEAT);
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case MAIN_FILTER:
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
@@ -79,9 +79,9 @@ void menu_custom_filter::handle()
break;
}
- if ((FPTR)menu_event->itemref >= OTHER_FILTER && (FPTR)menu_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
+ if ((uintptr_t)menu_event->itemref >= OTHER_FILTER && (uintptr_t)menu_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - OTHER_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - OTHER_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && custfltr::other[pos] > FILTER_UNAVAILABLE + 1)
{
custfltr::other[pos]--;
@@ -109,9 +109,9 @@ void menu_custom_filter::handle()
menu::stack_push<menu_selector>(ui(), container(), s_sel, custfltr::other[pos]);
}
}
- else if ((FPTR)menu_event->itemref >= YEAR_FILTER && (FPTR)menu_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= YEAR_FILTER && (uintptr_t)menu_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - YEAR_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - YEAR_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && custfltr::year[pos] > 0)
{
custfltr::year[pos]--;
@@ -125,9 +125,9 @@ void menu_custom_filter::handle()
else if (menu_event->iptkey == IPT_UI_SELECT)
menu::stack_push<menu_selector>(ui(), container(), c_year::ui, custfltr::year[pos]);
}
- else if ((FPTR)menu_event->itemref >= MNFCT_FILTER && (FPTR)menu_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= MNFCT_FILTER && (uintptr_t)menu_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - MNFCT_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - MNFCT_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && custfltr::mnfct[pos] > 0)
{
custfltr::mnfct[pos]--;
@@ -156,7 +156,7 @@ void menu_custom_filter::populate()
{
// add main filter
UINT32 arrow_flags = get_arrow_flags<UINT16>(FILTER_ALL, FILTER_UNAVAILABLE, custfltr::main);
- item_append(_("Main filter"), main_filters::text[custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER);
+ item_append(_("Main filter"), main_filters::text[custfltr::main], arrow_flags, (void *)(uintptr_t)MAIN_FILTER);
// add other filters
for (int x = 1; x <= custfltr::numother; x++)
@@ -165,7 +165,7 @@ void menu_custom_filter::populate()
// add filter items
arrow_flags = get_arrow_flags<UINT16>(FILTER_UNAVAILABLE + 1, FILTER_LAST - 1, custfltr::other[x]);
- item_append(_("Other filter"), main_filters::text[custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x));
+ item_append(_("Other filter"), main_filters::text[custfltr::other[x]], arrow_flags, (void *)(uintptr_t)(OTHER_FILTER + x));
if (m_added)
selected = item.size() - 2;
@@ -176,7 +176,7 @@ void menu_custom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, c_mnfct::ui.size() - 1, custfltr::mnfct[x]);
std::string fbuff(_("^!Manufacturer"));
convert_command_glyph(fbuff);
- item_append(fbuff, c_mnfct::ui[custfltr::mnfct[x]], arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
+ item_append(fbuff, c_mnfct::ui[custfltr::mnfct[x]], arrow_flags, (void *)(uintptr_t)(MNFCT_FILTER + x));
}
// add year subitem
@@ -185,17 +185,17 @@ void menu_custom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, c_year::ui.size() - 1, custfltr::year[x]);
std::string fbuff(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff, c_year::ui[custfltr::year[x]], arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
+ item_append(fbuff, c_year::ui[custfltr::year[x]], arrow_flags, (void *)(uintptr_t)(YEAR_FILTER + x));
}
}
item_append(menu_item_type::SEPARATOR);
if (custfltr::numother > 0)
- item_append(_("Remove last filter"), "", 0, (void *)(FPTR)REMOVE_FILTER);
+ item_append(_("Remove last filter"), "", 0, (void *)(uintptr_t)REMOVE_FILTER);
if (custfltr::numother < MAX_CUST_FILTER - 2)
- item_append(_("Add filter"), "", 0, (void *)(FPTR)ADD_FILTER);
+ item_append(_("Add filter"), "", 0, (void *)(uintptr_t)ADD_FILTER);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -293,7 +293,7 @@ void menu_swcustom_filter::handle()
const event *menu_event = process(PROCESS_LR_REPEAT);
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case MAIN_FILTER:
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
@@ -322,9 +322,9 @@ void menu_swcustom_filter::handle()
break;
}
- if ((FPTR)menu_event->itemref >= OTHER_FILTER && (FPTR)menu_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
+ if ((uintptr_t)menu_event->itemref >= OTHER_FILTER && (uintptr_t)menu_event->itemref < OTHER_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - OTHER_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - OTHER_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::other[pos] > UI_SW_UNAVAILABLE + 1)
{
sw_custfltr::other[pos]--;
@@ -348,9 +348,9 @@ void menu_swcustom_filter::handle()
menu::stack_push<menu_selector>(ui(), container(), s_sel, sw_custfltr::other[pos]);
}
}
- else if ((FPTR)menu_event->itemref >= YEAR_FILTER && (FPTR)menu_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= YEAR_FILTER && (uintptr_t)menu_event->itemref < YEAR_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - YEAR_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - YEAR_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::year[pos] > 0)
{
sw_custfltr::year[pos]--;
@@ -364,9 +364,9 @@ void menu_swcustom_filter::handle()
else if (menu_event->iptkey == IPT_UI_SELECT)
menu::stack_push<menu_selector>(ui(), container(), m_filter.year.ui, sw_custfltr::year[pos]);
}
- else if ((FPTR)menu_event->itemref >= TYPE_FILTER && (FPTR)menu_event->itemref < TYPE_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= TYPE_FILTER && (uintptr_t)menu_event->itemref < TYPE_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - TYPE_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - TYPE_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::type[pos] > 0)
{
sw_custfltr::type[pos]--;
@@ -380,9 +380,9 @@ void menu_swcustom_filter::handle()
else if (menu_event->iptkey == IPT_UI_SELECT)
menu::stack_push<menu_selector>(ui(), container(), m_filter.type.ui, sw_custfltr::type[pos]);
}
- else if ((FPTR)menu_event->itemref >= MNFCT_FILTER && (FPTR)menu_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= MNFCT_FILTER && (uintptr_t)menu_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - MNFCT_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - MNFCT_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::mnfct[pos] > 0)
{
sw_custfltr::mnfct[pos]--;
@@ -396,9 +396,9 @@ void menu_swcustom_filter::handle()
else if (menu_event->iptkey == IPT_UI_SELECT)
menu::stack_push<menu_selector>(ui(), container(), m_filter.publisher.ui, sw_custfltr::mnfct[pos]);
}
- else if ((FPTR)menu_event->itemref >= REGION_FILTER && (FPTR)menu_event->itemref < REGION_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= REGION_FILTER && (uintptr_t)menu_event->itemref < REGION_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - REGION_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - REGION_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::region[pos] > 0)
{
sw_custfltr::region[pos]--;
@@ -412,9 +412,9 @@ void menu_swcustom_filter::handle()
else if (menu_event->iptkey == IPT_UI_SELECT)
menu::stack_push<menu_selector>(ui(), container(), m_filter.region.ui, sw_custfltr::region[pos]);
}
- else if ((FPTR)menu_event->itemref >= LIST_FILTER && (FPTR)menu_event->itemref < LIST_FILTER + MAX_CUST_FILTER)
+ else if ((uintptr_t)menu_event->itemref >= LIST_FILTER && (uintptr_t)menu_event->itemref < LIST_FILTER + MAX_CUST_FILTER)
{
- int pos = (int)((FPTR)menu_event->itemref - LIST_FILTER);
+ int pos = (int)((uintptr_t)menu_event->itemref - LIST_FILTER);
if (menu_event->iptkey == IPT_UI_LEFT && sw_custfltr::list[pos] > 0)
{
sw_custfltr::list[pos]--;
@@ -443,7 +443,7 @@ void menu_swcustom_filter::populate()
{
// add main filter
UINT32 arrow_flags = get_arrow_flags<UINT16>(UI_SW_ALL, UI_SW_UNAVAILABLE, sw_custfltr::main);
- item_append(_("Main filter"), sw_filters::text[sw_custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER);
+ item_append(_("Main filter"), sw_filters::text[sw_custfltr::main], arrow_flags, (void *)(uintptr_t)MAIN_FILTER);
// add other filters
for (int x = 1; x <= sw_custfltr::numother; x++)
@@ -452,7 +452,7 @@ void menu_swcustom_filter::populate()
// add filter items
arrow_flags = get_arrow_flags<UINT16>(UI_SW_UNAVAILABLE + 1, UI_SW_LAST - 1, sw_custfltr::other[x]);
- item_append(_("Other filter"), sw_filters::text[sw_custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x));
+ item_append(_("Other filter"), sw_filters::text[sw_custfltr::other[x]], arrow_flags, (void *)(uintptr_t)(OTHER_FILTER + x));
if (m_added)
selected = item.size() - 2;
@@ -463,7 +463,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, m_filter.publisher.ui.size() - 1, sw_custfltr::mnfct[x]);
std::string fbuff(_("^!Publisher"));
convert_command_glyph(fbuff);
- item_append(fbuff, m_filter.publisher.ui[sw_custfltr::mnfct[x]], arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
+ item_append(fbuff, m_filter.publisher.ui[sw_custfltr::mnfct[x]], arrow_flags, (void *)(uintptr_t)(MNFCT_FILTER + x));
}
// add year subitem
@@ -472,7 +472,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, m_filter.year.ui.size() - 1, sw_custfltr::year[x]);
std::string fbuff(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff, m_filter.year.ui[sw_custfltr::year[x]], arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
+ item_append(fbuff, m_filter.year.ui[sw_custfltr::year[x]], arrow_flags, (void *)(uintptr_t)(YEAR_FILTER + x));
}
// add year subitem
@@ -481,7 +481,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, m_filter.swlist.name.size() - 1, sw_custfltr::list[x]);
std::string fbuff(_("^!Software List"));
convert_command_glyph(fbuff);
- item_append(fbuff, m_filter.swlist.description[sw_custfltr::list[x]], arrow_flags, (void *)(FPTR)(LIST_FILTER + x));
+ item_append(fbuff, m_filter.swlist.description[sw_custfltr::list[x]], arrow_flags, (void *)(uintptr_t)(LIST_FILTER + x));
}
// add device type subitem
@@ -490,7 +490,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, m_filter.type.ui.size() - 1, sw_custfltr::type[x]);
std::string fbuff(_("^!Device type"));
convert_command_glyph(fbuff);
- item_append(fbuff, m_filter.type.ui[sw_custfltr::type[x]], arrow_flags, (void *)(FPTR)(TYPE_FILTER + x));
+ item_append(fbuff, m_filter.type.ui[sw_custfltr::type[x]], arrow_flags, (void *)(uintptr_t)(TYPE_FILTER + x));
}
// add region subitem
@@ -499,17 +499,17 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags<UINT16>(0, m_filter.region.ui.size() - 1, sw_custfltr::region[x]);
std::string fbuff(_("^!Region"));
convert_command_glyph(fbuff);
- item_append(fbuff, m_filter.region.ui[sw_custfltr::region[x]], arrow_flags, (void *)(FPTR)(REGION_FILTER + x));
+ item_append(fbuff, m_filter.region.ui[sw_custfltr::region[x]], arrow_flags, (void *)(uintptr_t)(REGION_FILTER + x));
}
}
item_append(menu_item_type::SEPARATOR);
if (sw_custfltr::numother > 0)
- item_append(_("Remove last filter"), "", 0, (void *)(FPTR)REMOVE_FILTER);
+ item_append(_("Remove last filter"), "", 0, (void *)(uintptr_t)REMOVE_FILTER);
if (sw_custfltr::numother < MAX_CUST_FILTER - 2)
- item_append(_("Add filter"), "", 0, (void *)(FPTR)ADD_FILTER);
+ item_append(_("Add filter"), "", 0, (void *)(uintptr_t)ADD_FILTER);
item_append(menu_item_type::SEPARATOR);
diff --git a/src/frontend/mame/ui/custui.cpp b/src/frontend/mame/ui/custui.cpp
index 767fd4224be..f71c9525019 100644
--- a/src/frontend/mame/ui/custui.cpp
+++ b/src/frontend/mame/ui/custui.cpp
@@ -88,7 +88,7 @@ void menu_custom_ui::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case FONT_MENU:
if (menu_event->iptkey == IPT_UI_SELECT)
@@ -140,17 +140,17 @@ void menu_custom_ui::handle()
void menu_custom_ui::populate()
{
UINT32 arrow_flags;
- item_append(_("Fonts"), "", 0, (void *)(FPTR)FONT_MENU);
- item_append(_("Colors"), "", 0, (void *)(FPTR)COLORS_MENU);
+ item_append(_("Fonts"), "", 0, (void *)(uintptr_t)FONT_MENU);
+ item_append(_("Colors"), "", 0, (void *)(uintptr_t)COLORS_MENU);
if (!m_lang.empty())
{
arrow_flags = get_arrow_flags<std::uint16_t>(0, m_lang.size() - 1, m_currlang);
- item_append(_("Language"), m_lang[m_currlang].c_str(), arrow_flags, (void *)(FPTR)LANGUAGE_MENU);
+ item_append(_("Language"), m_lang[m_currlang].c_str(), arrow_flags, (void *)(uintptr_t)LANGUAGE_MENU);
}
arrow_flags = get_arrow_flags<UINT16>(0, HIDE_BOTH, ui_globals::panels_status);
- item_append(_("Show side panels"), _(HIDE_STATUS[ui_globals::panels_status]), arrow_flags, (void *)(FPTR)HIDE_MENU);
+ item_append(_("Show side panels"), _(HIDE_STATUS[ui_globals::panels_status]), arrow_flags, (void *)(uintptr_t)HIDE_MENU);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -283,7 +283,7 @@ void menu_font_ui::handle()
const event *menu_event = process(PROCESS_LR_REPEAT);
if (menu_event != nullptr && menu_event->itemref != nullptr)
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case INFOS_SIZE:
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
@@ -323,7 +323,7 @@ void menu_font_ui::handle()
case MUI_ITALIC:
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT || menu_event->iptkey == IPT_UI_SELECT)
{
- ((FPTR)menu_event->itemref == MUI_BOLD) ? m_bold = !m_bold : m_italic = !m_italic;
+ ((uintptr_t)menu_event->itemref == MUI_BOLD) ? m_bold = !m_bold : m_italic = !m_italic;
changed = true;
}
break;
@@ -345,24 +345,24 @@ void menu_font_ui::populate()
// add fonts option
arrow_flags = get_arrow_flags<std::uint16_t>(0, m_fonts.size() - 1, m_actual);
- item_append(_("UI Font"), m_fonts[m_actual].second, arrow_flags, (void *)(FPTR)MUI_FNT);
+ item_append(_("UI Font"), m_fonts[m_actual].second, arrow_flags, (void *)(uintptr_t)MUI_FNT);
#ifdef UI_WINDOWS
if (m_fonts[m_actual].first != "default")
{
- item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD);
- item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC);
+ item_append(_("Bold"), m_bold ? "On" : "Off", m_bold ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(uintptr_t)MUI_BOLD);
+ item_append(_("Italic"), m_italic ? "On" : "Off", m_italic ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(uintptr_t)MUI_ITALIC);
}
#endif
arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size);
- item_append(_("Lines"), string_format("%2d", m_font_size), arrow_flags, (void *)(FPTR)FONT_SIZE);
+ item_append(_("Lines"), string_format("%2d", m_font_size), arrow_flags, (void *)(uintptr_t)FONT_SIZE);
item_append(menu_item_type::SEPARATOR);
// add item
arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size);
- item_append(_("Infos text size"), string_format("%3.2f", m_info_size), arrow_flags, (void *)(FPTR)INFOS_SIZE);
+ item_append(_("Infos text size"), string_format("%3.2f", m_info_size), arrow_flags, (void *)(uintptr_t)INFOS_SIZE);
item_append(menu_item_type::SEPARATOR);
@@ -403,7 +403,7 @@ void menu_font_ui::custom_render(void *selectedref, float top, float bottom, flo
ui().draw_text_full(container(), topbuf.c_str(), x1, y1, x2 - x1, ui::text_layout::CENTER, ui::text_layout::TRUNCATE,
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
- if ((FPTR)selectedref == INFOS_SIZE)
+ if ((uintptr_t)selectedref == INFOS_SIZE)
{
topbuf = _("Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
@@ -484,8 +484,8 @@ void menu_colors_ui::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr && menu_event->iptkey == IPT_UI_SELECT)
{
- if ((FPTR)menu_event->itemref != MUI_RESTORE)
- menu::stack_push<menu_rgb_ui>(ui(), container(), &m_color_table[(FPTR)menu_event->itemref].color, item[selected].text);
+ if ((uintptr_t)menu_event->itemref != MUI_RESTORE)
+ menu::stack_push<menu_rgb_ui>(ui(), container(), &m_color_table[(uintptr_t)menu_event->itemref].color, item[selected].text);
else
{
changed = true;
@@ -503,25 +503,25 @@ void menu_colors_ui::handle()
void menu_colors_ui::populate()
{
- item_append(_("Normal text"), "", 0, (void *)(FPTR)MUI_TEXT_COLOR);
- item_append(_("Selected color"), "", 0, (void *)(FPTR)MUI_SELECTED_COLOR);
- item_append(_("Normal text background"), "", 0, (void *)(FPTR)MUI_TEXT_BG_COLOR);
- item_append(_("Selected background color"), "", 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR);
- item_append(_("Subitem color"), "", 0, (void *)(FPTR)MUI_SUBITEM_COLOR);
- item_append(_("Clone"), "", 0, (void *)(FPTR)MUI_CLONE_COLOR);
- item_append(_("Border"), "", 0, (void *)(FPTR)MUI_BORDER_COLOR);
- item_append(_("Background"), "", 0, (void *)(FPTR)MUI_BACKGROUND_COLOR);
- item_append(_("Dipswitch"), "", 0, (void *)(FPTR)MUI_DIPSW_COLOR);
- item_append(_("Unavailable color"), "", 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR);
- item_append(_("Slider color"), "", 0, (void *)(FPTR)MUI_SLIDER_COLOR);
- item_append(_("Gfx viewer background"), "", 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR);
- item_append(_("Mouse over color"), "", 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR);
- item_append(_("Mouse over background color"), "", 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR);
- item_append(_("Mouse down color"), "", 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR);
- item_append(_("Mouse down background color"), "", 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR);
+ item_append(_("Normal text"), "", 0, (void *)(uintptr_t)MUI_TEXT_COLOR);
+ item_append(_("Selected color"), "", 0, (void *)(uintptr_t)MUI_SELECTED_COLOR);
+ item_append(_("Normal text background"), "", 0, (void *)(uintptr_t)MUI_TEXT_BG_COLOR);
+ item_append(_("Selected background color"), "", 0, (void *)(uintptr_t)MUI_SELECTED_BG_COLOR);
+ item_append(_("Subitem color"), "", 0, (void *)(uintptr_t)MUI_SUBITEM_COLOR);
+ item_append(_("Clone"), "", 0, (void *)(uintptr_t)MUI_CLONE_COLOR);
+ item_append(_("Border"), "", 0, (void *)(uintptr_t)MUI_BORDER_COLOR);
+ item_append(_("Background"), "", 0, (void *)(uintptr_t)MUI_BACKGROUND_COLOR);
+ item_append(_("Dipswitch"), "", 0, (void *)(uintptr_t)MUI_DIPSW_COLOR);
+ item_append(_("Unavailable color"), "", 0, (void *)(uintptr_t)MUI_UNAVAILABLE_COLOR);
+ item_append(_("Slider color"), "", 0, (void *)(uintptr_t)MUI_SLIDER_COLOR);
+ item_append(_("Gfx viewer background"), "", 0, (void *)(uintptr_t)MUI_GFXVIEWER_BG_COLOR);
+ item_append(_("Mouse over color"), "", 0, (void *)(uintptr_t)MUI_MOUSEOVER_COLOR);
+ item_append(_("Mouse over background color"), "", 0, (void *)(uintptr_t)MUI_MOUSEOVER_BG_COLOR);
+ item_append(_("Mouse down color"), "", 0, (void *)(uintptr_t)MUI_MOUSEDOWN_COLOR);
+ item_append(_("Mouse down background color"), "", 0, (void *)(uintptr_t)MUI_MOUSEDOWN_BG_COLOR);
item_append(menu_item_type::SEPARATOR);
- item_append(_("Restore originals colors"), "", 0, (void *)(FPTR)MUI_RESTORE);
+ item_append(_("Restore originals colors"), "", 0, (void *)(uintptr_t)MUI_RESTORE);
custombottom = customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -723,7 +723,7 @@ void menu_rgb_ui::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case RGB_ALPHA:
if (menu_event->iptkey == IPT_UI_LEFT && m_color->a() > 1)
@@ -834,37 +834,37 @@ void menu_rgb_ui::populate()
if (m_lock_ref != RGB_ALPHA)
{
arrow_flags = get_arrow_flags<UINT8>(0, 255, m_color->a());
- item_append(_("Alpha"), string_format("%3u", m_color->a()), arrow_flags, (void *)(FPTR)RGB_ALPHA);
+ item_append(_("Alpha"), string_format("%3u", m_color->a()), arrow_flags, (void *)(uintptr_t)RGB_ALPHA);
}
else
- item_append(_("Alpha"), s_text, 0, (void *)(FPTR)RGB_ALPHA);
+ item_append(_("Alpha"), s_text, 0, (void *)(uintptr_t)RGB_ALPHA);
if (m_lock_ref != RGB_RED)
{
arrow_flags = get_arrow_flags<UINT8>(0, 255, m_color->r());
- item_append(_("Red"), string_format("%3u", m_color->r()), arrow_flags, (void *)(FPTR)RGB_RED);
+ item_append(_("Red"), string_format("%3u", m_color->r()), arrow_flags, (void *)(uintptr_t)RGB_RED);
}
else
- item_append(_("Red"), s_text, 0, (void *)(FPTR)RGB_RED);
+ item_append(_("Red"), s_text, 0, (void *)(uintptr_t)RGB_RED);
if (m_lock_ref != RGB_GREEN)
{
arrow_flags = get_arrow_flags<UINT8>(0, 255, m_color->g());
- item_append(_("Green"), string_format("%3u", m_color->g()), arrow_flags, (void *)(FPTR)RGB_GREEN);
+ item_append(_("Green"), string_format("%3u", m_color->g()), arrow_flags, (void *)(uintptr_t)RGB_GREEN);
}
else
- item_append(_("Green"), s_text, 0, (void *)(FPTR)RGB_GREEN);
+ item_append(_("Green"), s_text, 0, (void *)(uintptr_t)RGB_GREEN);
if (m_lock_ref != RGB_BLUE)
{
arrow_flags = get_arrow_flags<UINT8>(0, 255, m_color->b());
- item_append(_("Blue"), string_format("%3u", m_color->b()), arrow_flags, (void *)(FPTR)RGB_BLUE);
+ item_append(_("Blue"), string_format("%3u", m_color->b()), arrow_flags, (void *)(uintptr_t)RGB_BLUE);
}
else
- item_append(_("Blue"), s_text, 0, (void *)(FPTR)RGB_BLUE);
+ item_append(_("Blue"), s_text, 0, (void *)(uintptr_t)RGB_BLUE);
item_append(menu_item_type::SEPARATOR);
- item_append(_("Choose from palette"), "", 0, (void *)(FPTR)PALETTE_CHOOSE);
+ item_append(_("Choose from palette"), "", 0, (void *)(uintptr_t)PALETTE_CHOOSE);
item_append(menu_item_type::SEPARATOR);
custombottom = customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -941,14 +941,14 @@ void menu_rgb_ui::inkey_special(const event *menu_event)
if (menu_event->iptkey == IPT_UI_SELECT)
{
m_key_active = !m_key_active;
- m_lock_ref = (FPTR)menu_event->itemref;
+ m_lock_ref = (uintptr_t)menu_event->itemref;
if (!m_key_active)
{
int val = atoi(m_search.data());
val = m_color->clamp(val);
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case RGB_ALPHA:
m_color->set_a(val);
@@ -1038,7 +1038,7 @@ void menu_palette_sel::handle()
void menu_palette_sel::populate()
{
for (unsigned x = 0; x < ARRAY_LENGTH(s_palette); ++x)
- item_append(_(s_palette[x].first), s_palette[x].second, 0, (void *)(FPTR)(x + 1));
+ item_append(_(s_palette[x].first), s_palette[x].second, 0, (void *)(uintptr_t)(x + 1));
item_append(menu_item_type::SEPARATOR);
}
diff --git a/src/frontend/mame/ui/datmenu.cpp b/src/frontend/mame/ui/datmenu.cpp
index e28f16afd69..c2126d50d15 100644
--- a/src/frontend/mame/ui/datmenu.cpp
+++ b/src/frontend/mame/ui/datmenu.cpp
@@ -397,7 +397,7 @@ void menu_dats_view::get_data()
for (int x = 0; x < lines; ++x)
{
std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
- item_append(tempbuf, "", (FLAG_UI_DATS | FLAG_DISABLE), (void *)(FPTR)(x + 1));
+ item_append(tempbuf, "", (FLAG_UI_DATS | FLAG_DISABLE), (void *)(uintptr_t)(x + 1));
}
}
@@ -415,7 +415,7 @@ void menu_dats_view::get_data_sw()
for (int x = 0; x < lines; ++x)
{
std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x]));
- item_append(tempbuf, "", (FLAG_UI_DATS | FLAG_DISABLE), (void *)(FPTR)(x + 1));
+ item_append(tempbuf, "", (FLAG_UI_DATS | FLAG_DISABLE), (void *)(uintptr_t)(x + 1));
}
}
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp
index 9ebfd7f70e5..120ff1d774e 100644
--- a/src/frontend/mame/ui/devopt.cpp
+++ b/src/frontend/mame/ui/devopt.cpp
@@ -112,7 +112,7 @@ void menu_device_config::populate()
std::unordered_set<std::string> soundtags;
for (device_sound_interface &sound : snditer)
{
- if (!soundtags.insert(sound.device().tag()).second)
+ if (!sound.issound() || !soundtags.insert(sound.device().tag()).second)
continue;
// count how many identical sound chips we have
diff --git a/src/frontend/mame/ui/dirmenu.cpp b/src/frontend/mame/ui/dirmenu.cpp
index 36cf6dbd773..2621a0dbb39 100644
--- a/src/frontend/mame/ui/dirmenu.cpp
+++ b/src/frontend/mame/ui/dirmenu.cpp
@@ -33,6 +33,7 @@ struct folders_entry
static const folders_entry s_folders[] =
{
{ __("ROMs"), OPTION_MEDIAPATH, ADDING },
+ { __("Software Media"), OPTION_SWPATH, CHANGE },
{ __("UI"), OPTION_UI_PATH, CHANGE },
{ __("Language"), OPTION_LANGUAGEPATH, CHANGE },
{ __("Samples"), OPTION_SAMPLEPATH, ADDING },
@@ -100,7 +101,7 @@ void menu_directory::handle()
void menu_directory::populate()
{
for (auto & elem : s_folders)
- item_append(_(elem.name), "", 0, (void *)(FPTR)elem.action);
+ item_append(_(elem.name), "", 0, (void *)(uintptr_t)elem.action);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
@@ -164,7 +165,7 @@ void menu_display_actual::handle()
// process the menu
const event *menu_event = process(0);
if (menu_event != nullptr && menu_event->itemref != nullptr && menu_event->iptkey == IPT_UI_SELECT)
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case REMOVE:
menu::stack_push<menu_remove_folder>(ui(), container(), m_ref);
@@ -311,7 +312,7 @@ void menu_add_change_folder::handle()
{
if (menu_event->iptkey == IPT_UI_SELECT)
{
- int index = (FPTR)menu_event->itemref - 1;
+ int index = (uintptr_t)menu_event->itemref - 1;
const menu_item &pitem = item[index];
// go up to the parent path
@@ -455,13 +456,13 @@ void menu_add_change_folder::populate()
// add the drives
for (int i = 0; (volume_name = osd_get_volume_name(i)) != nullptr; ++i)
- item_append(volume_name, "[DRIVE]", 0, (void *)(FPTR)++folders_count);
+ item_append(volume_name, "[DRIVE]", 0, (void *)(uintptr_t)++folders_count);
// add the directories
while ((dirent = path.next()) != nullptr)
{
if (dirent->type == osd::directory::entry::entry_type::DIR && strcmp(dirent->name, ".") != 0)
- item_append(dirent->name, "[DIR]", 0, (void *)(FPTR)++folders_count);
+ item_append(dirent->name, "[DIR]", 0, (void *)(uintptr_t)++folders_count);
}
item_append(menu_item_type::SEPARATOR);
@@ -611,7 +612,7 @@ void menu_remove_folder::populate()
{
int folders_count = 0;
for (auto & elem : m_folders)
- item_append(elem, "", 0, (void *)(FPTR)++folders_count);
+ item_append(elem, "", 0, (void *)(uintptr_t)++folders_count);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp
index aa2de97ad1c..a1540e403a5 100644
--- a/src/frontend/mame/ui/filecreate.cpp
+++ b/src/frontend/mame/ui/filecreate.cpp
@@ -270,7 +270,7 @@ void menu_select_format::populate()
if (i && i == m_ext_match)
item_append(menu_item_type::SEPARATOR);
- item_append(fmt->description(), fmt->name(), 0, (void *)(FPTR)i);
+ item_append(fmt->description(), fmt->name(), 0, (void *)(uintptr_t)i);
}
}
@@ -285,7 +285,7 @@ void menu_select_format::handle()
const event *event = process(0);
if (event != nullptr && event->iptkey == IPT_UI_SELECT)
{
- *m_result = int(FPTR(event->itemref));
+ *m_result = int(uintptr_t(event->itemref));
stack_pop();
}
}
diff --git a/src/frontend/mame/ui/filemngr.cpp b/src/frontend/mame/ui/filemngr.cpp
index 485e2f41130..a5ae3c84968 100644
--- a/src/frontend/mame/ui/filemngr.cpp
+++ b/src/frontend/mame/ui/filemngr.cpp
@@ -170,7 +170,7 @@ void menu_file_manager::handle()
const event *event = process(0);
if (event != nullptr && event->itemref != nullptr && event->iptkey == IPT_UI_SELECT)
{
- if ((FPTR)event->itemref == 1)
+ if ((uintptr_t)event->itemref == 1)
{
if (m_curr_selected)
machine().schedule_hard_reset();
diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp
index 187b7175cb0..fe63b20d3a8 100644
--- a/src/frontend/mame/ui/filesel.cpp
+++ b/src/frontend/mame/ui/filesel.cpp
@@ -540,7 +540,7 @@ void menu_select_rw::handle()
void *menu_select_rw::itemref_from_result(menu_select_rw::result result)
{
- return (void *)(FPTR)(unsigned int)result;
+ return (void *)(uintptr_t)(unsigned int)result;
}
@@ -550,7 +550,7 @@ void *menu_select_rw::itemref_from_result(menu_select_rw::result result)
menu_select_rw::result menu_select_rw::result_from_itemref(void *itemref)
{
- return (menu_select_rw::result) (unsigned int) (FPTR)itemref;
+ return (menu_select_rw::result) (unsigned int) (uintptr_t)itemref;
}
diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp
index 4dfc260be57..8d5d468332b 100644
--- a/src/frontend/mame/ui/info.cpp
+++ b/src/frontend/mame/ui/info.cpp
@@ -243,7 +243,7 @@ std::string machine_info::game_info_string()
bool found_sound = false;
for (device_sound_interface &sound : snditer)
{
- if (!soundtags.insert(sound.device().tag()).second)
+ if (!sound.issound() || !soundtags.insert(sound.device().tag()).second)
continue;
// append the Sound: string
diff --git a/src/frontend/mame/ui/inputmap.cpp b/src/frontend/mame/ui/inputmap.cpp
index bf13eb22e84..a45438f38ba 100644
--- a/src/frontend/mame/ui/inputmap.cpp
+++ b/src/frontend/mame/ui/inputmap.cpp
@@ -54,9 +54,9 @@ void menu_input_groups::populate()
for (player = 0; player < MAX_PLAYERS; player++)
{
auto s = string_format("Player %d Controls", player + 1);
- item_append(s, "", 0, (void *)(FPTR)(IPG_PLAYER1 + player + 1));
+ item_append(s, "", 0, (void *)(uintptr_t)(IPG_PLAYER1 + player + 1));
}
- item_append(_("Other Controls"), "", 0, (void *)(FPTR)(IPG_OTHER + 1));
+ item_append(_("Other Controls"), "", 0, (void *)(uintptr_t)(IPG_OTHER + 1));
}
menu_input_groups::~menu_input_groups()
@@ -122,6 +122,7 @@ void menu_input_general::populate()
item->defseq = &entry.defseq(seqtype);
item->sortorder = sortorder * 4 + suborder[seqtype];
item->type = ioport_manager::type_is_analog(entry.type()) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL;
+ item->is_optional = false;
item->name = entry.name();
item->owner_name = nullptr;
item->next = itemlist;
@@ -199,6 +200,7 @@ void menu_input_specific::populate()
item->defseq = &field.defseq(seqtype);
item->sortorder = sortorder + suborder[seqtype];
item->type = field.is_analog() ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL;
+ item->is_optional = field.optional();
item->name = field.name();
item->owner_name = field.device().tag();
item->next = itemlist;
@@ -420,6 +422,8 @@ void menu_input::populate_and_sort(input_item_data *itemlist)
}
std::string text = string_format(nameformat[item->type], item->name);
+ if (item->is_optional)
+ text = "(" + text + ")";
/* if we're polling this item, use some spaces with left/right arrows */
if (pollingref == item->ref)
@@ -481,7 +485,7 @@ void menu_settings::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
// reset
- if ((FPTR)menu_event->itemref == 1)
+ if ((uintptr_t)menu_event->itemref == 1)
{
if (menu_event->iptkey == IPT_UI_SELECT)
machine().schedule_hard_reset();
@@ -650,7 +654,7 @@ void menu_settings_dip_switches::custom_render(void *selectedref, float top, flo
UINT32 selectedmask = 0;
// determine the mask of selected bits
- if ((FPTR)selectedref != 1)
+ if ((uintptr_t)selectedref != 1)
{
ioport_field *field = (ioport_field *)selectedref;
diff --git a/src/frontend/mame/ui/inputmap.h b/src/frontend/mame/ui/inputmap.h
index 522ea8bd7e9..9acee915025 100644
--- a/src/frontend/mame/ui/inputmap.h
+++ b/src/frontend/mame/ui/inputmap.h
@@ -55,6 +55,7 @@ protected:
const char * owner_name; /* pointer to the name of the owner of the item */
UINT32 sortorder; /* sorting information */
UINT8 type; /* type of port */
+ bool is_optional; /* true if this input is considered optional */
};
void populate_and_sort(struct input_item_data *itemlist);
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index de2b0c8adc7..cee07c6da88 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -136,7 +136,7 @@ protected:
void *itemref; // reference for the selected item
menu_item_type type; // item type (eventually will go away when itemref is proper ui_menu_item class rather than void*)
int iptkey; // one of the IPT_* values from inptport.h
- unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
+ char32_t unichar; // unicode character if iptkey == IPT_SPECIAL
render_bounds mouse; // mouse position if iptkey == IPT_CUSTOM
};
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 296b5a4be05..e33502ea606 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -14,6 +14,7 @@
#include "mameopts.h"
#include "pluginopts.h"
#include "drivenum.h"
+#include "natkeyboard.h"
#include "uiinput.h"
#include "ui/ui.h"
@@ -38,7 +39,7 @@ menu_keyboard_mode::menu_keyboard_mode(mame_ui_manager &mui, render_container &c
void menu_keyboard_mode::populate()
{
- bool natural = ui().use_natural_keyboard();
+ bool natural = machine().ioport().natkeyboard().in_use();
item_append(_("Keyboard Mode:"), natural ? _("Natural") : _("Emulated"), natural ? FLAG_LEFT_ARROW : FLAG_RIGHT_ARROW, nullptr);
}
@@ -48,7 +49,7 @@ menu_keyboard_mode::~menu_keyboard_mode()
void menu_keyboard_mode::handle()
{
- bool natural = ui().use_natural_keyboard();
+ bool natural = machine().ioport().natkeyboard().in_use();
/* process the menu */
const event *menu_event = process(0);
@@ -57,7 +58,7 @@ void menu_keyboard_mode::handle()
{
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
{
- ui().set_use_natural_keyboard(natural ^ true);
+ machine().ioport().natkeyboard().set_in_use(!natural);
reset(reset_options::REMEMBER_REF);
}
}
@@ -111,7 +112,7 @@ void menu_bios_selection::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
+ if ((uintptr_t)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
machine().schedule_hard_reset();
else if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
{
@@ -568,7 +569,7 @@ void menu_export::handle()
const event *menu_event = process(PROCESS_NOIMAGE);
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case 1:
case 3:
@@ -604,7 +605,7 @@ void menu_export::handle()
drvlist.include(driver_list::find(*elem));
info_xml_creator creator(drvlist);
- creator.output(pfile, ((FPTR)menu_event->itemref == 1) ? false : true);
+ creator.output(pfile, ((uintptr_t)menu_event->itemref == 1) ? false : true);
fclose(pfile);
machine().popmessage(_("%s.xml saved under ui folder."), filename.c_str());
}
@@ -664,9 +665,9 @@ void menu_export::handle()
void menu_export::populate()
{
// add options items
- item_append(_("Export list in XML format (like -listxml)"), "", 0, (void *)(FPTR)1);
- item_append(_("Export list in XML format (like -listxml, but exclude devices)"), "", 0, (void *)(FPTR)3);
- item_append(_("Export list in TXT format (like -listfull)"), "", 0, (void *)(FPTR)2);
+ item_append(_("Export list in XML format (like -listxml)"), "", 0, (void *)(uintptr_t)1);
+ item_append(_("Export list in XML format (like -listxml, but exclude devices)"), "", 0, (void *)(uintptr_t)3);
+ item_append(_("Export list in TXT format (like -listfull)"), "", 0, (void *)(uintptr_t)2);
item_append(menu_item_type::SEPARATOR);
}
@@ -708,7 +709,7 @@ void menu_machine_configure::handle()
{
if (menu_event->iptkey == IPT_UI_SELECT)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case SAVE:
{
@@ -775,15 +776,15 @@ void menu_machine_configure::populate()
if (!m_bios.empty())
{
UINT32 arrows = get_arrow_flags(std::size_t(0), m_bios.size() - 1, m_curbios);
- item_append(_("Driver"), m_bios[m_curbios].first, arrows, (void *)(FPTR)BIOS);
+ item_append(_("Driver"), m_bios[m_curbios].first, arrows, (void *)(uintptr_t)BIOS);
}
else
item_append(_("This machine has no bios."), "", FLAG_DISABLE, nullptr);
item_append(menu_item_type::SEPARATOR);
- item_append(_(submenu::advanced_options[0].description), "", 0, (void *)(FPTR)ADVANCED);
- item_append(_(submenu::video_options[0].description), "", 0, (void *)(FPTR)VIDEO);
- item_append(_(submenu::control_options[0].description), "", 0, (void *)(FPTR)CONTROLLER);
+ item_append(_(submenu::advanced_options[0].description), "", 0, (void *)(uintptr_t)ADVANCED);
+ item_append(_(submenu::video_options[0].description), "", 0, (void *)(uintptr_t)VIDEO);
+ item_append(_(submenu::control_options[0].description), "", 0, (void *)(uintptr_t)CONTROLLER);
item_append(menu_item_type::SEPARATOR);
if (!mame_machine_manager::instance()->favorite().isgame_favorite(m_drv))
@@ -792,7 +793,7 @@ void menu_machine_configure::populate()
item_append(_("Remove From Favorites"), "", 0, (void *)DELFAV);
item_append(menu_item_type::SEPARATOR);
- item_append(_("Save machine configuration"), "", 0, (void *)(FPTR)SAVE);
+ item_append(_("Save machine configuration"), "", 0, (void *)(uintptr_t)SAVE);
item_append(menu_item_type::SEPARATOR);
customtop = 2.0f * ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -943,7 +944,7 @@ void menu_plugins_configure::populate()
{
auto enabled = std::string(curentry.value()) == "1";
item_append(curentry.description(), enabled ? _("On") : _("Off"),
- enabled ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)curentry.name());
+ enabled ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(uintptr_t)curentry.name());
}
}
item_append(menu_item_type::SEPARATOR);
diff --git a/src/frontend/mame/ui/optsmenu.cpp b/src/frontend/mame/ui/optsmenu.cpp
index 9912935a755..eab7a415ac5 100644
--- a/src/frontend/mame/ui/optsmenu.cpp
+++ b/src/frontend/mame/ui/optsmenu.cpp
@@ -69,7 +69,7 @@ void menu_game_options::handle()
}
if (menu_event != nullptr && menu_event->itemref != nullptr)
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case FILTER_MENU:
{
@@ -229,7 +229,7 @@ void menu_game_options::populate()
// add filter item
UINT32 arrow_flags = get_arrow_flags<UINT16>(FILTER_FIRST, FILTER_LAST, m_main);
- item_append(_("Filter"), main_filters::text[m_main], arrow_flags, (void *)(FPTR)FILTER_MENU);
+ item_append(_("Filter"), main_filters::text[m_main], arrow_flags, (void *)(uintptr_t)FILTER_MENU);
// add category subitem
if (m_main == FILTER_CATEGORY && mame_machine_manager::instance()->inifile().total() > 0)
@@ -239,12 +239,12 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(UINT16(0), UINT16(inif.total() - 1), inif.cur_file());
fbuff = _(" ^!File");
convert_command_glyph(fbuff);
- item_append(fbuff, inif.get_file(), arrow_flags, (void *)(FPTR)FILE_CATEGORY_FILTER);
+ item_append(fbuff, inif.get_file(), arrow_flags, (void *)(uintptr_t)FILE_CATEGORY_FILTER);
arrow_flags = get_arrow_flags(UINT16(0), UINT16(inif.cat_total() - 1), inif.cur_cat());
fbuff = _(" ^!Category");
convert_command_glyph(fbuff);
- item_append(fbuff, inif.get_category(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER);
+ item_append(fbuff, inif.get_category(), arrow_flags, (void *)(uintptr_t)CATEGORY_FILTER);
}
// add manufacturer subitem
else if (m_main == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0)
@@ -252,7 +252,7 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(UINT16(0), UINT16(c_mnfct::ui.size() - 1), c_mnfct::actual);
fbuff = _("^!Manufacturer");
convert_command_glyph(fbuff);
- item_append(fbuff, c_mnfct::ui[c_mnfct::actual], arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER);
+ item_append(fbuff, c_mnfct::ui[c_mnfct::actual], arrow_flags, (void *)(uintptr_t)MANUFACT_CAT_FILTER);
}
// add year subitem
else if (m_main == FILTER_YEAR && c_year::ui.size() > 0)
@@ -260,30 +260,30 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(UINT16(0), UINT16(c_year::ui.size() - 1), c_year::actual);
fbuff.assign(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff, c_year::ui[c_year::actual], arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER);
+ item_append(fbuff, c_year::ui[c_year::actual], arrow_flags, (void *)(uintptr_t)YEAR_CAT_FILTER);
}
// add custom subitem
else if (m_main == FILTER_CUSTOM)
{
fbuff = _("^!Setup custom filter");
convert_command_glyph(fbuff);
- item_append(fbuff, "", 0, (void *)(FPTR)CUSTOM_FILTER);
+ item_append(fbuff, "", 0, (void *)(uintptr_t)CUSTOM_FILTER);
}
item_append(menu_item_type::SEPARATOR);
// add options items
- item_append(_("Customize UI"), "", 0, (void *)(FPTR)CUSTOM_MENU);
- item_append(_("Configure Directories"), "", 0, (void *)(FPTR)CONF_DIR);
+ item_append(_("Customize UI"), "", 0, (void *)(uintptr_t)CUSTOM_MENU);
+ item_append(_("Configure Directories"), "", 0, (void *)(uintptr_t)CONF_DIR);
}
- item_append(_(submenu::video_options[0].description), "", 0, (void *)(FPTR)DISPLAY_MENU);
- item_append(_("Sound Options"), "", 0, (void *)(FPTR)SOUND_MENU);
- item_append(_(submenu::misc_options[0].description), "", 0, (void *)(FPTR)MISC_MENU);
- item_append(_(submenu::control_options[0].description), "", 0, (void *)(FPTR)CONTROLLER_MENU);
- item_append(_("General Inputs"), "", 0, (void *)(FPTR)CGI_MENU);
- item_append(_(submenu::advanced_options[0].description), "", 0, (void *)(FPTR)ADVANCED_MENU);
+ item_append(_(submenu::video_options[0].description), "", 0, (void *)(uintptr_t)DISPLAY_MENU);
+ item_append(_("Sound Options"), "", 0, (void *)(uintptr_t)SOUND_MENU);
+ item_append(_(submenu::misc_options[0].description), "", 0, (void *)(uintptr_t)MISC_MENU);
+ item_append(_(submenu::control_options[0].description), "", 0, (void *)(uintptr_t)CONTROLLER_MENU);
+ item_append(_("General Inputs"), "", 0, (void *)(uintptr_t)CGI_MENU);
+ item_append(_(submenu::advanced_options[0].description), "", 0, (void *)(uintptr_t)ADVANCED_MENU);
item_append(menu_item_type::SEPARATOR);
- item_append(_("Save Configuration"), "", 0, (void *)(FPTR)SAVE_CONFIG);
+ item_append(_("Save Configuration"), "", 0, (void *)(uintptr_t)SAVE_CONFIG);
custombottom = 2.0f * ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
customtop = ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
diff --git a/src/frontend/mame/ui/pluginopt.cpp b/src/frontend/mame/ui/pluginopt.cpp
index d6037af438b..e456562c4fc 100644
--- a/src/frontend/mame/ui/pluginopt.cpp
+++ b/src/frontend/mame/ui/pluginopt.cpp
@@ -55,7 +55,7 @@ void menu_plugin_opt::handle()
{
const event *menu_event = process(0);
- if (menu_event != nullptr && (FPTR)menu_event->itemref)
+ if (menu_event != nullptr && (uintptr_t)menu_event->itemref)
{
std::string key;
switch(menu_event->iptkey)
@@ -84,7 +84,7 @@ void menu_plugin_opt::handle()
default:
return;
}
- if(mame_machine_manager::instance()->lua()->menu_callback(m_menu, (FPTR)menu_event->itemref, key))
+ if(mame_machine_manager::instance()->lua()->menu_callback(m_menu, (uintptr_t)menu_event->itemref, key))
reset(reset_options::REMEMBER_REF);
}
}
@@ -93,7 +93,7 @@ void menu_plugin_opt::populate()
{
std::vector<lua_engine::menu_item> menu_list;
mame_machine_manager::instance()->lua()->menu_populate(m_menu, menu_list);
- FPTR i = 1;
+ uintptr_t i = 1;
for(auto &item : menu_list)
{
UINT32 flags = 0;
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index 2e4c3c7de17..9a7251d5290 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -138,12 +138,12 @@ menu_select_game::~menu_select_game()
game_driver const *const driver(isfavorite() ? nullptr : reinterpret_cast<game_driver const *>(get_selection_ref()));
ui_software_info *const swinfo(isfavorite() ? reinterpret_cast<ui_software_info *>(get_selection_ref()) : nullptr);
- if (reinterpret_cast<FPTR>(driver) > skip_main_items)
+ if (reinterpret_cast<uintptr_t>(driver) > skip_main_items)
last_driver = driver->name;
else if (driver && m_prev_selected)
last_driver = reinterpret_cast<game_driver const *>(m_prev_selected)->name;
- if (reinterpret_cast<FPTR>(swinfo) > skip_main_items)
+ if (reinterpret_cast<uintptr_t>(swinfo) > skip_main_items)
last_driver = swinfo->shortname;
else if (swinfo && m_prev_selected)
last_driver = reinterpret_cast<ui_software_info *>(m_prev_selected)->shortname;
@@ -255,7 +255,7 @@ void menu_select_game::handle()
if (!isfavorite())
{
const game_driver *drv = (const game_driver *)menu_event->itemref;
- if ((FPTR)drv > skip_main_items && ui_globals::curdats_view > 0)
+ if ((uintptr_t)drv > skip_main_items && ui_globals::curdats_view > 0)
{
ui_globals::curdats_view--;
m_topline_datsview = 0;
@@ -269,7 +269,7 @@ void menu_select_game::handle()
ui_globals::curdats_view--;
m_topline_datsview = 0;
}
- else if ((FPTR)drv > skip_main_items && ui_globals::cur_sw_dats_view > 0)
+ else if ((uintptr_t)drv > skip_main_items && ui_globals::cur_sw_dats_view > 0)
{
ui_globals::cur_sw_dats_view--;
m_topline_datsview = 0;
@@ -293,7 +293,7 @@ void menu_select_game::handle()
if (!isfavorite())
{
const game_driver *drv = (const game_driver *)menu_event->itemref;
- if ((FPTR)drv > skip_main_items && ui_globals::curdats_view < (ui_globals::curdats_total - 1))
+ if ((uintptr_t)drv > skip_main_items && ui_globals::curdats_view < (ui_globals::curdats_total - 1))
{
ui_globals::curdats_view++;
m_topline_datsview = 0;
@@ -307,7 +307,7 @@ void menu_select_game::handle()
ui_globals::curdats_view++;
m_topline_datsview = 0;
}
- else if ((FPTR)drv > skip_main_items && ui_globals::cur_sw_dats_view < (ui_globals::cur_sw_dats_total - 1))
+ else if ((uintptr_t)drv > skip_main_items && ui_globals::cur_sw_dats_view < (ui_globals::cur_sw_dats_total - 1))
{
ui_globals::cur_sw_dats_view++;
m_topline_datsview = 0;
@@ -347,14 +347,14 @@ void menu_select_game::handle()
if (!isfavorite())
{
const game_driver *driver = (const game_driver *)menu_event->itemref;
- if ((FPTR)driver > skip_main_items && mame_machine_manager::instance()->lua()->call_plugin(driver->name, "data_list"))
+ if ((uintptr_t)driver > skip_main_items && mame_machine_manager::instance()->lua()->call_plugin(driver->name, "data_list"))
menu::stack_push<menu_dats_view>(ui(), container(), driver);
}
else
{
ui_software_info *ui_swinfo = (ui_software_info *)menu_event->itemref;
- if ((FPTR)ui_swinfo > skip_main_items)
+ if ((uintptr_t)ui_swinfo > skip_main_items)
{
if (ui_swinfo->startempty == 1 && mame_machine_manager::instance()->lua()->call_plugin(ui_swinfo->driver->name, "data_list"))
menu::stack_push<menu_dats_view>(ui(), container(), ui_swinfo->driver);
@@ -369,7 +369,7 @@ void menu_select_game::handle()
if (!isfavorite())
{
const game_driver *driver = (const game_driver *)menu_event->itemref;
- if ((FPTR)driver > skip_main_items)
+ if ((uintptr_t)driver > skip_main_items)
{
favorite_manager &mfav = mame_machine_manager::instance()->favorite();
if (!mfav.isgame_favorite(driver))
@@ -388,7 +388,7 @@ void menu_select_game::handle()
else
{
ui_software_info *swinfo = (ui_software_info *)menu_event->itemref;
- if ((FPTR)swinfo > skip_main_items)
+ if ((uintptr_t)swinfo > skip_main_items)
{
machine().popmessage(_("%s\n removed from favorites list."), swinfo->longname.c_str());
mame_machine_manager::instance()->favorite().remove_favorite_game(*swinfo);
@@ -592,12 +592,12 @@ void menu_select_game::populate()
// add special items
if (stack_has_special_main_menu())
{
- item_append(_("Configure Options"), "", flags_ui, (void *)(FPTR)CONF_OPTS);
- item_append(_("Configure Machine"), "", flags_ui, (void *)(FPTR)CONF_MACHINE);
+ item_append(_("Configure Options"), "", flags_ui, (void *)(uintptr_t)CONF_OPTS);
+ item_append(_("Configure Machine"), "", flags_ui, (void *)(uintptr_t)CONF_MACHINE);
skip_main_items = 2;
if (machine().options().plugins())
{
- item_append(_("Plugins"), "", flags_ui, (void *)(FPTR)CONF_PLUGINS);
+ item_append(_("Plugins"), "", flags_ui, (void *)(uintptr_t)CONF_PLUGINS);
skip_main_items++;
}
}
@@ -773,11 +773,11 @@ void menu_select_game::inkey_select(const event *menu_event)
const game_driver *driver = (const game_driver *)menu_event->itemref;
// special case for configure options
- if ((FPTR)driver == CONF_OPTS)
+ if ((uintptr_t)driver == CONF_OPTS)
menu::stack_push<menu_game_options>(ui(), container());
// special case for configure machine
- else if (FPTR(driver) == CONF_MACHINE)
+ else if (uintptr_t(driver) == CONF_MACHINE)
{
if (m_prev_selected)
menu::stack_push<menu_machine_configure>(ui(), container(), reinterpret_cast<const game_driver *>(m_prev_selected));
@@ -785,7 +785,7 @@ void menu_select_game::inkey_select(const event *menu_event)
}
// special case for configure plugins
- else if ((FPTR)driver == CONF_PLUGINS)
+ else if ((uintptr_t)driver == CONF_PLUGINS)
{
menu::stack_push<menu_plugins_configure>(ui(), container());
}
@@ -842,12 +842,12 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
ui_software_info *ui_swinfo = (ui_software_info *)menu_event->itemref;
ui_options &mopt = ui().options();
- if ((FPTR)ui_swinfo == CONF_OPTS)
+ if ((uintptr_t)ui_swinfo == CONF_OPTS)
{
// special case for configure options
menu::stack_push<menu_game_options>(ui(), container());
}
- else if ((FPTR)ui_swinfo == CONF_MACHINE)
+ else if ((uintptr_t)ui_swinfo == CONF_MACHINE)
{
// special case for configure machine
if (m_prev_selected)
@@ -857,7 +857,7 @@ void menu_select_game::inkey_select_favorite(const event *menu_event)
}
return;
}
- else if ((FPTR)ui_swinfo == CONF_PLUGINS)
+ else if ((uintptr_t)ui_swinfo == CONF_PLUGINS)
{
// special case for configure plugins
menu::stack_push<menu_plugins_configure>(ui(), container());
diff --git a/src/frontend/mame/ui/selgame.h b/src/frontend/mame/ui/selgame.h
index 49d3725803d..9455acb90cf 100644
--- a/src/frontend/mame/ui/selgame.h
+++ b/src/frontend/mame/ui/selgame.h
@@ -79,7 +79,7 @@ private:
void *get_selection_ptr() const
{
void *const selected_ref(get_selection_ref());
- return (FPTR(selected_ref) > skip_main_items) ? selected_ref : m_prev_selected;
+ return (uintptr_t(selected_ref) > skip_main_items) ? selected_ref : m_prev_selected;
}
// General info
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
index 39579af4eb7..bafcbfda82f 100644
--- a/src/frontend/mame/ui/selsoft.cpp
+++ b/src/frontend/mame/ui/selsoft.cpp
@@ -273,7 +273,7 @@ void menu_select_software::handle()
// handle UI_FAVORITES
ui_software_info *swinfo = (ui_software_info *)menu_event->itemref;
- if ((FPTR)swinfo > 2)
+ if ((uintptr_t)swinfo > 2)
{
favorite_manager &mfav = mame_machine_manager::instance()->favorite();
if (!mfav.isgame_favorite(*swinfo))
diff --git a/src/frontend/mame/ui/simpleselgame.cpp b/src/frontend/mame/ui/simpleselgame.cpp
index 15a25a73547..f4c583eb55f 100644
--- a/src/frontend/mame/ui/simpleselgame.cpp
+++ b/src/frontend/mame/ui/simpleselgame.cpp
@@ -149,7 +149,7 @@ void simple_menu_select_game::inkey_select(const event *menu_event)
const game_driver *driver = (const game_driver *)menu_event->itemref;
// special case for configure inputs
- if ((FPTR)driver == 1)
+ if ((uintptr_t)driver == 1)
menu::stack_push<menu_game_options>(ui(), container());
// anything else is a driver
else
@@ -311,7 +311,7 @@ void simple_menu_select_game::custom_render(void *selectedref, float top, float
mame_ui_manager::NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// determine the text to render below
- driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
+ driver = ((uintptr_t)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr;
if (driver != nullptr)
{
const char *gfxstat, *soundstat;
diff --git a/src/frontend/mame/ui/slotopt.cpp b/src/frontend/mame/ui/slotopt.cpp
index ae7e2b8633e..9c68410f2ef 100644
--- a/src/frontend/mame/ui/slotopt.cpp
+++ b/src/frontend/mame/ui/slotopt.cpp
@@ -189,7 +189,7 @@ void menu_slot_devices::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
+ if ((uintptr_t)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
{
mame_options::add_slot_options(machine().options());
machine().schedule_hard_reset();
diff --git a/src/frontend/mame/ui/sndmenu.cpp b/src/frontend/mame/ui/sndmenu.cpp
index 6277e751773..a5c8425f337 100644
--- a/src/frontend/mame/ui/sndmenu.cpp
+++ b/src/frontend/mame/ui/sndmenu.cpp
@@ -78,7 +78,7 @@ void menu_sound_options::handle()
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
case ENABLE_SOUND:
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT || menu_event->iptkey == IPT_UI_SELECT)
@@ -130,9 +130,9 @@ void menu_sound_options::populate()
m_sample_rate = m_sound_rate[m_cur_rates];
// add options items
- item_append(_("Sound"), m_sound ? _("On") : _("Off"), m_sound ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
- item_append(_("Sample Rate"), string_format("%d", m_sample_rate), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
- item_append(_("Use External Samples"), m_samples ? _("On") : _("Off"), m_samples ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
+ item_append(_("Sound"), m_sound ? _("On") : _("Off"), m_sound ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(uintptr_t)ENABLE_SOUND);
+ item_append(_("Sample Rate"), string_format("%d", m_sample_rate), arrow_flags, (void *)(uintptr_t)SAMPLE_RATE);
+ item_append(_("Use External Samples"), m_samples ? _("On") : _("Off"), m_samples ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(uintptr_t)ENABLE_SAMPLES);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
diff --git a/src/frontend/mame/ui/swlist.cpp b/src/frontend/mame/ui/swlist.cpp
index df7bc42e2c1..2488c1d1cc4 100644
--- a/src/frontend/mame/ui/swlist.cpp
+++ b/src/frontend/mame/ui/swlist.cpp
@@ -36,7 +36,7 @@ namespace ui {
// part
//-------------------------------------------------
-static bool is_valid_softlist_part_char(unicode_char ch)
+static bool is_valid_softlist_part_char(char32_t ch)
{
return (ch == (char)ch) && isalnum(ch);
}
@@ -241,7 +241,7 @@ void menu_software_list::handle()
if (event && event->itemref)
{
- if ((FPTR)event->itemref == 1 && event->iptkey == IPT_UI_SELECT)
+ if ((uintptr_t)event->itemref == 1 && event->iptkey == IPT_UI_SELECT)
{
m_ordered_by_shortname = !m_ordered_by_shortname;
@@ -267,7 +267,7 @@ void menu_software_list::handle()
ui().popup_time(ERROR_MESSAGE_TIME, "%s", m_filename_buffer);
// identify the selected entry
- entry_info const *const cur_selected = (FPTR(event->itemref) != 1)
+ entry_info const *const cur_selected = (uintptr_t(event->itemref) != 1)
? reinterpret_cast<entry_info const *>(get_selection_ref())
: nullptr;
diff --git a/src/frontend/mame/ui/text.cpp b/src/frontend/mame/ui/text.cpp
index 50e7cf6bbfe..457e9362f6e 100644
--- a/src/frontend/mame/ui/text.cpp
+++ b/src/frontend/mame/ui/text.cpp
@@ -25,7 +25,7 @@ INLINE FUNCTIONS
// is_space_character
//-------------------------------------------------
-inline bool is_space_character(unicode_char ch)
+inline bool is_space_character(char32_t ch)
{
return ch == ' ';
}
@@ -36,7 +36,7 @@ inline bool is_space_character(unicode_char ch)
// character a possible line break?
//-------------------------------------------------
-inline bool is_breakable_char(unicode_char ch)
+inline bool is_breakable_char(char32_t ch)
{
// regular spaces and hyphens are breakable
if (is_space_character(ch) || ch == '-')
@@ -127,7 +127,7 @@ void text_layout::add_text(const char *text, const char_style &style)
if (m_current_line == nullptr)
{
// get the current character
- unicode_char schar;
+ char32_t schar;
int const scharcount = uchar_from_utf8(&schar, &text[position], text_length - position);
if (scharcount < 0)
break;
@@ -145,7 +145,7 @@ void text_layout::add_text(const char *text, const char_style &style)
}
// get the current character
- unicode_char ch;
+ char32_t ch;
int const scharcount = uchar_from_utf8(&ch, &text[position], text_length - position);
if (scharcount < 0)
break;
@@ -303,7 +303,7 @@ void text_layout::start_new_line(text_layout::text_justify justify, float height
// get_char_width
//-------------------------------------------------
-float text_layout::get_char_width(unicode_char ch, float size)
+float text_layout::get_char_width(char32_t ch, float size)
{
return font().char_width(size * yscale(), xscale() / yscale(), ch);
}
@@ -315,7 +315,7 @@ float text_layout::get_char_width(unicode_char ch, float size)
void text_layout::truncate_wrap()
{
- const unicode_char elipsis = 0x2026;
+ const char32_t elipsis = 0x2026;
// for now, lets assume that we're only truncating the last character
size_t truncate_position = m_current_line->character_count() - 1;
@@ -516,7 +516,7 @@ text_layout::line::line(text_layout &layout, text_justify justify, float yoffset
// line::add_character
//-------------------------------------------------
-void text_layout::line::add_character(unicode_char ch, const char_style &style, const source_info &source)
+void text_layout::line::add_character(char32_t ch, const char_style &style, const source_info &source)
{
// get the width of this character
float chwidth = m_layout.get_char_width(ch, style.size);
diff --git a/src/frontend/mame/ui/text.h b/src/frontend/mame/ui/text.h
index 9ab717b5c5a..417fe27595d 100644
--- a/src/frontend/mame/ui/text.h
+++ b/src/frontend/mame/ui/text.h
@@ -98,7 +98,7 @@ private:
// we'll get there eventually
struct positioned_char
{
- unicode_char character;
+ char32_t character;
char_style style;
source_info source;
float xoffset;
@@ -112,7 +112,7 @@ private:
line(text_layout &layout, text_justify justify, float yoffset, float height);
// methods
- void add_character(unicode_char ch, const char_style &style, const source_info &source);
+ void add_character(char32_t ch, const char_style &style, const source_info &source);
void truncate(size_t position);
// accessors
@@ -151,7 +151,7 @@ private:
// methods
void add_text(const char *text, const char_style &style);
void start_new_line(text_justify justify, float height);
- float get_char_width(unicode_char ch, float size);
+ float get_char_width(char32_t ch, float size);
void truncate_wrap();
void word_wrap();
void invalidate_calculated_actual_width();
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 9b988c93075..4499109f5c7 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -210,8 +210,7 @@ void mame_ui_manager::init()
// request a callback upon exiting
machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(mame_ui_manager::exit), this));
- // retrieve options
- m_use_natural_keyboard = machine().options().natural_keyboard();
+ // create mouse bitmap
bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine(), bitmap_argb32(32, 32));
UINT32 *dst = &ui_mouse_bitmap->pix32(0);
memcpy(dst,mouse_bitmap,32*32*sizeof(UINT32));
@@ -512,7 +511,7 @@ float mame_ui_manager::get_line_height()
// single character
//-------------------------------------------------
-float mame_ui_manager::get_char_width(unicode_char ch)
+float mame_ui_manager::get_char_width(char32_t ch)
{
return get_font()->char_width(get_line_height(), machine().render().ui_aspect(), ch);
}
@@ -1107,7 +1106,7 @@ UINT32 mame_ui_manager::handler_ingame(render_container &container)
}
// is the natural keyboard enabled?
- if (use_natural_keyboard() && (machine().phase() == MACHINE_PHASE_RUNNING))
+ if (machine().ioport().natkeyboard().in_use() && (machine().phase() == MACHINE_PHASE_RUNNING))
process_natural_keyboard();
if (!ui_disabled)
@@ -1483,7 +1482,7 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
INT32 defval = 1000;
std::string str = string_format(_("%1$s Volume"), info.stream->input_name(info.inputnum));
- sliders.push_back(slider_alloc(machine, SLIDER_ID_MIXERVOL + item, str.c_str(), 0, defval, maxval, 20, (void *)(FPTR)item));
+ sliders.push_back(slider_alloc(machine, SLIDER_ID_MIXERVOL + item, str.c_str(), 0, defval, maxval, 20, (void *)(uintptr_t)item));
}
// add analog adjusters
@@ -1703,7 +1702,7 @@ INT32 mame_ui_manager::slider_volume(running_machine &machine, void *arg, int id
INT32 mame_ui_manager::slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, INT32 newval)
{
mixer_input info;
- if (!machine.sound().indexed_mixer_input((FPTR)arg, info))
+ if (!machine.sound().indexed_mixer_input((uintptr_t)arg, info))
return 0;
if (newval != SLIDER_NOCHANGE)
{
@@ -2117,19 +2116,6 @@ INT32 mame_ui_manager::slider_crossoffset(running_machine &machine, void *arg, i
}
#endif
-//-------------------------------------------------
-// set_use_natural_keyboard - specifies
-// whether the natural keyboard is active
-//-------------------------------------------------
-
-void mame_ui_manager::set_use_natural_keyboard(bool use_natural_keyboard)
-{
- m_use_natural_keyboard = use_natural_keyboard;
- std::string error;
- machine().options().set_value(OPTION_NATURAL_KEYBOARD, use_natural_keyboard, OPTION_PRIORITY_CMDLINE, error);
- assert(error.empty());
-}
-
//-------------------------------------------------
// wrap_text
diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h
index 03f32496e1a..aa9852005ef 100644
--- a/src/frontend/mame/ui/ui.h
+++ b/src/frontend/mame/ui/ui.h
@@ -177,7 +177,7 @@ public:
void update_and_render(render_container &container);
render_font *get_font();
float get_line_height();
- float get_char_width(unicode_char ch);
+ float get_char_width(char32_t ch);
float get_string_width(const char *s, float text_size = 1.0f);
void draw_outlined_box(render_container &container, float x0, float y0, float x1, float y1, rgb_t backcolor);
void draw_outlined_box(render_container &container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
@@ -204,7 +204,6 @@ public:
virtual bool is_menu_active() override;
bool can_paste();
void paste();
- void set_use_natural_keyboard(bool use_natural_keyboard);
void image_handler_ingame();
void increase_frameskip();
void decrease_frameskip();
diff --git a/src/frontend/mame/ui/utils.h b/src/frontend/mame/ui/utils.h
index 04f1eb58da5..5e6c2f6acfd 100644
--- a/src/frontend/mame/ui/utils.h
+++ b/src/frontend/mame/ui/utils.h
@@ -244,7 +244,7 @@ std::vector<std::string> tokenize(const std::string &text, char sep);
//-------------------------------------------------
template <typename F>
-bool input_character(std::string &buffer, std::string::size_type size, unicode_char unichar, F &&filter)
+bool input_character(std::string &buffer, std::string::size_type size, char32_t unichar, F &&filter)
{
bool result = false;
auto buflen = buffer.size();
@@ -280,7 +280,7 @@ bool input_character(std::string &buffer, std::string::size_type size, unicode_c
//-------------------------------------------------
template <typename F>
-bool input_character(std::string &buffer, unicode_char unichar, F &&filter)
+bool input_character(std::string &buffer, char32_t unichar, F &&filter)
{
auto size = std::numeric_limits<std::string::size_type>::max();
return input_character(buffer, size, unichar, filter);
diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp
index 23ce49fa280..3d3aaf69e26 100644
--- a/src/frontend/mame/ui/videoopt.cpp
+++ b/src/frontend/mame/ui/videoopt.cpp
@@ -75,7 +75,7 @@ void menu_video_options::handle()
const event *menu_event = process(0);
if (menu_event != nullptr && menu_event->itemref != nullptr)
{
- switch ((FPTR)menu_event->itemref)
+ switch ((uintptr_t)menu_event->itemref)
{
/* rotate adds rotation depending on the direction */
case VIDEO_ITEM_ROTATE:
@@ -145,9 +145,9 @@ void menu_video_options::handle()
/* anything else is a view item */
default:
- if (menu_event->iptkey == IPT_UI_SELECT && (int)(FPTR)menu_event->itemref >= VIDEO_ITEM_VIEW)
+ if (menu_event->iptkey == IPT_UI_SELECT && (int)(uintptr_t)menu_event->itemref >= VIDEO_ITEM_VIEW)
{
- target->set_view((FPTR)menu_event->itemref - VIDEO_ITEM_VIEW);
+ target->set_view((uintptr_t)menu_event->itemref - VIDEO_ITEM_VIEW);
changed = true;
}
break;
@@ -187,7 +187,7 @@ void menu_video_options::populate()
/* create a string for the item, replacing underscores with spaces */
tempstring.assign(name);
strreplace(tempstring, "_", " ");
- item_append(tempstring, "", 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum));
+ item_append(tempstring, "", 0, (void *)(uintptr_t)(VIDEO_ITEM_VIEW + viewnum));
}
/* add a separator */
diff --git a/src/lib/formats/cassimg.cpp b/src/lib/formats/cassimg.cpp
index ac2e9f56900..39e3176e121 100644
--- a/src/lib/formats/cassimg.cpp
+++ b/src/lib/formats/cassimg.cpp
@@ -870,8 +870,8 @@ cassette_image::error cassette_legacy_construct(cassette_image *cassette,
cassette_image::error err;
int length;
int sample_count;
- dynamic_buffer bytes;
- dynamic_buffer chunk;
+ std::vector<UINT8> bytes;
+ std::vector<UINT8> chunk;
std::vector<INT16> samples;
int pos = 0;
UINT64 offset = 0;
diff --git a/src/lib/formats/ccvf_dsk.cpp b/src/lib/formats/ccvf_dsk.cpp
index 8e30dcfff33..abce7fb55da 100644
--- a/src/lib/formats/ccvf_dsk.cpp
+++ b/src/lib/formats/ccvf_dsk.cpp
@@ -90,11 +90,11 @@ bool ccvf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
const format &f = formats[0];
UINT64 size = io_generic_size(io);
- dynamic_buffer img(size);
+ std::vector<UINT8> img(size);
io_generic_read(io, &img[0], 0, size);
std::string ccvf = std::string((const char *)&img[0], size);
- dynamic_buffer bytes(78720);
+ std::vector<UINT8> bytes(78720);
int start = 0, end = 0;
std::string line;
diff --git a/src/lib/formats/cqm_dsk.cpp b/src/lib/formats/cqm_dsk.cpp
index ff191aec56c..94ba350c2a4 100644
--- a/src/lib/formats/cqm_dsk.cpp
+++ b/src/lib/formats/cqm_dsk.cpp
@@ -275,7 +275,7 @@ int cqm_format::identify(io_generic *io, UINT32 form_factor)
bool cqm_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
{
const int max_size = 4*1024*1024; // 4MB ought to be large enough for any floppy
- dynamic_buffer imagebuf(max_size);
+ std::vector<UINT8> imagebuf(max_size);
UINT8 header[CQM_HEADER_SIZE];
io_generic_read(io, header, 0, CQM_HEADER_SIZE);
@@ -318,7 +318,7 @@ bool cqm_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
int base_cell_count = rate*60/rpm;
int cqm_size = io_generic_size(io);
- dynamic_buffer cqmbuf(cqm_size);
+ std::vector<UINT8> cqmbuf(cqm_size);
io_generic_read(io, &cqmbuf[0], 0, cqm_size);
// decode the RLE data
diff --git a/src/lib/formats/csw_cas.cpp b/src/lib/formats/csw_cas.cpp
index 3b07576254b..0790dd16dee 100644
--- a/src/lib/formats/csw_cas.cpp
+++ b/src/lib/formats/csw_cas.cpp
@@ -52,7 +52,7 @@ static int csw_cas_to_wav_size( const UINT8 *casdata, int caslen )
UINT8 CompressionType;
UINT8 Flags;
UINT8 HeaderExtensionLength;
- dynamic_buffer gz_ptr;
+ std::vector<UINT8> gz_ptr;
int total_size;
z_stream d_stream;
@@ -172,7 +172,7 @@ static int csw_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes )
UINT8 HeaderExtensionLength;
INT8 Bit;
- dynamic_buffer gz_ptr;
+ std::vector<UINT8> gz_ptr;
int total_size;
z_stream d_stream;
int err;
diff --git a/src/lib/formats/d64_dsk.cpp b/src/lib/formats/d64_dsk.cpp
index b637d44c48c..2cece44c43a 100644
--- a/src/lib/formats/d64_dsk.cpp
+++ b/src/lib/formats/d64_dsk.cpp
@@ -215,7 +215,7 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
const format &f = formats[type];
UINT64 size = io_generic_size(io);
- dynamic_buffer img;
+ std::vector<UINT8> img;
if(size == (UINT32)f.sector_count*f.sector_base_size) {
img.resize(size + f.sector_count);
diff --git a/src/lib/formats/dfi_dsk.cpp b/src/lib/formats/dfi_dsk.cpp
index e8bb38d6dd0..dae3d737b67 100644
--- a/src/lib/formats/dfi_dsk.cpp
+++ b/src/lib/formats/dfi_dsk.cpp
@@ -68,7 +68,7 @@ bool dfi_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
{
UINT64 size = io_generic_size(io);
UINT64 pos = 4;
- dynamic_buffer data;
+ std::vector<UINT8> data;
int onerev_time = 0; // time for one revolution, used to guess clock and rpm for DFE2 files
unsigned long clock_rate = 100000000; // sample clock rate in megahertz
int rpm=360; // drive rpm
diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp
index 82f8d28ca93..72786f6422e 100644
--- a/src/lib/formats/flopimg.cpp
+++ b/src/lib/formats/flopimg.cpp
@@ -393,7 +393,7 @@ static floperr_t floppy_readwrite_sector(floppy_image_legacy *floppy, int head,
floperr_t err;
const struct FloppyCallbacks *fmt;
size_t this_buffer_len;
- dynamic_buffer alloc_buf;
+ std::vector<UINT8> alloc_buf;
UINT32 sector_length;
UINT8 *buffer_ptr = (UINT8 *)buffer;
floperr_t (*read_sector)(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen);
diff --git a/src/lib/formats/fsd_dsk.cpp b/src/lib/formats/fsd_dsk.cpp
index 2d31be1123c..cbf474da116 100644
--- a/src/lib/formats/fsd_dsk.cpp
+++ b/src/lib/formats/fsd_dsk.cpp
@@ -104,7 +104,7 @@ bool fsd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
result[0x20] = "Deleted Data";
UINT64 size = io_generic_size(io);
- dynamic_buffer img(size);
+ std::vector<UINT8> img(size);
io_generic_read(io, &img[0], 0, size);
UINT64 pos;
diff --git a/src/lib/formats/g64_dsk.cpp b/src/lib/formats/g64_dsk.cpp
index e85b5c34682..302bfc0e842 100644
--- a/src/lib/formats/g64_dsk.cpp
+++ b/src/lib/formats/g64_dsk.cpp
@@ -41,7 +41,7 @@ int g64_format::identify(io_generic *io, UINT32 form_factor)
bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
{
UINT64 size = io_generic_size(io);
- dynamic_buffer img(size);
+ std::vector<UINT8> img(size);
io_generic_read(io, &img[0], 0, size);
if (img[POS_VERSION]) {
@@ -115,7 +115,7 @@ bool g64_format::save(io_generic *io, floppy_image *image)
for (int head = 0; head < heads; head++) {
int tracks_written = 0;
- dynamic_buffer trackbuf(TRACK_LENGTH-2);
+ std::vector<UINT8> trackbuf(TRACK_LENGTH-2);
for (int track = 0; track < TRACK_COUNT; track++) {
UINT32 tpos = POS_TRACK_OFFSET + (track * 4);
diff --git a/src/lib/formats/hxchfe_dsk.cpp b/src/lib/formats/hxchfe_dsk.cpp
index cf959fdff32..1e532e140b2 100644
--- a/src/lib/formats/hxchfe_dsk.cpp
+++ b/src/lib/formats/hxchfe_dsk.cpp
@@ -233,7 +233,7 @@ bool hfe_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
}
// Load the tracks
- dynamic_buffer cylinder_buffer;
+ std::vector<UINT8> cylinder_buffer;
for(int cyl=0; cyl < m_cylinders; cyl++)
{
// actual data read
@@ -402,7 +402,7 @@ void hfe_format::generate_track_from_hfe_bitstream(int cyl, int head, int sample
bool hfe_format::save(io_generic *io, floppy_image *image)
{
- dynamic_buffer cylbuf;
+ std::vector<UINT8> cylbuf;
cylbuf.resize(0x6200);
UINT8 header[HEADER_LENGTH];
diff --git a/src/lib/formats/hxcmfm_dsk.cpp b/src/lib/formats/hxcmfm_dsk.cpp
index fe25f9158c9..07a05d3e2f6 100644
--- a/src/lib/formats/hxcmfm_dsk.cpp
+++ b/src/lib/formats/hxcmfm_dsk.cpp
@@ -76,7 +76,7 @@ bool mfm_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
// read header
io_generic_read(io, &header, 0, sizeof(header));
int counter = 0;
- dynamic_buffer trackbuf;
+ std::vector<UINT8> trackbuf;
for(int track=0; track < header.number_of_track; track++) {
for(int side=0; side < header.number_of_side; side++) {
// read location of
diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp
index 7683f890986..13f155b638a 100644
--- a/src/lib/formats/imd_dsk.cpp
+++ b/src/lib/formats/imd_dsk.cpp
@@ -423,7 +423,7 @@ int imd_format::identify(io_generic *io, UINT32 form_factor)
bool imd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
{
UINT64 size = io_generic_size(io);
- dynamic_buffer img(size);
+ std::vector<UINT8> img(size);
io_generic_read(io, &img[0], 0, size);
UINT64 pos;
diff --git a/src/lib/formats/ipf_dsk.cpp b/src/lib/formats/ipf_dsk.cpp
index 1292ce8b354..40ad1229ab8 100644
--- a/src/lib/formats/ipf_dsk.cpp
+++ b/src/lib/formats/ipf_dsk.cpp
@@ -45,7 +45,7 @@ int ipf_format::identify(io_generic *io, UINT32 form_factor)
bool ipf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
{
UINT64 size = io_generic_size(io);
- dynamic_buffer data(size);
+ std::vector<UINT8> data(size);
io_generic_read(io, &data[0], 0, size);
bool res = parse(data, image);
return res;
@@ -80,7 +80,7 @@ UINT32 ipf_format::crc32r(const UINT8 *data, UINT32 size)
return ~crc;
}
-bool ipf_format::parse(dynamic_buffer &data, floppy_image *image)
+bool ipf_format::parse(std::vector<UINT8> &data, floppy_image *image)
{
image->set_variant(floppy_image::DSDD); // Not handling anything else yet
tcount = 84*2+1; // Usual max
@@ -182,7 +182,7 @@ bool ipf_format::parse_data(const UINT8 *data, UINT32 &pos, UINT32 max_extra_siz
return true;
}
-bool ipf_format::scan_one_tag(dynamic_buffer &data, UINT32 &pos, UINT8 *&tag, UINT32 &tsize)
+bool ipf_format::scan_one_tag(std::vector<UINT8> &data, UINT32 &pos, UINT8 *&tag, UINT32 &tsize)
{
if(data.size()-pos < 12)
return false;
@@ -198,7 +198,7 @@ bool ipf_format::scan_one_tag(dynamic_buffer &data, UINT32 &pos, UINT8 *&tag, UI
return true;
}
-bool ipf_format::scan_all_tags(dynamic_buffer &data)
+bool ipf_format::scan_all_tags(std::vector<UINT8> &data)
{
UINT32 pos = 0;
UINT32 size = data.size();
diff --git a/src/lib/formats/ipf_dsk.h b/src/lib/formats/ipf_dsk.h
index a0a16d36daf..0df0e4c3285 100644
--- a/src/lib/formats/ipf_dsk.h
+++ b/src/lib/formats/ipf_dsk.h
@@ -50,8 +50,8 @@ private:
bool parse_imge(const UINT8 *imge);
bool parse_data(const UINT8 *data, UINT32 &pos, UINT32 max_extra_size);
- bool scan_one_tag(dynamic_buffer &data, UINT32 &pos, UINT8 *&tag, UINT32 &tsize);
- bool scan_all_tags(dynamic_buffer &data);
+ bool scan_one_tag(std::vector<UINT8> &data, UINT32 &pos, UINT8 *&tag, UINT32 &tsize);
+ bool scan_all_tags(std::vector<UINT8> &data);
static UINT32 r32(const UINT8 *p);
static UINT32 rb(const UINT8 *&p, int count);
@@ -81,7 +81,7 @@ private:
bool generate_track(track_info *t, floppy_image *image);
bool generate_tracks(floppy_image *image);
- bool parse(dynamic_buffer &data, floppy_image *image);
+ bool parse(std::vector<UINT8> &data, floppy_image *image);
};
extern const floppy_format_type FLOPPY_IPF_FORMAT;
diff --git a/src/lib/formats/kc_cas.cpp b/src/lib/formats/kc_cas.cpp
index e357261ec5e..2e9638d19c9 100644
--- a/src/lib/formats/kc_cas.cpp
+++ b/src/lib/formats/kc_cas.cpp
@@ -212,7 +212,7 @@ static int kc_handle_tap(INT16 *buffer, const UINT8 *casdata)
static int kc_handle_sss(INT16 *buffer, const UINT8 *casdata)
{
- dynamic_buffer sss(kc_image_size + 11);
+ std::vector<UINT8> sss(kc_image_size + 11);
// tries to generate the missing head
memset(&sss[0], 0xd3, 3);
diff --git a/src/lib/formats/mfi_dsk.cpp b/src/lib/formats/mfi_dsk.cpp
index b6d0f11e2c7..ea3eed8a29f 100644
--- a/src/lib/formats/mfi_dsk.cpp
+++ b/src/lib/formats/mfi_dsk.cpp
@@ -119,7 +119,7 @@ bool mfi_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
image->set_variant(h.variant);
- dynamic_buffer compressed;
+ std::vector<UINT8> compressed;
entry *ent = entries;
for(unsigned int cyl=0; cyl <= (h.cyl_count - 1) << 2; cyl += 4 >> resolution)
diff --git a/src/lib/formats/pasti_dsk.cpp b/src/lib/formats/pasti_dsk.cpp
index 78e016991d9..9ddce45138a 100644
--- a/src/lib/formats/pasti_dsk.cpp
+++ b/src/lib/formats/pasti_dsk.cpp
@@ -64,7 +64,7 @@ bool pasti_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
UINT8 fh[16];
io_generic_read(io, fh, 0, 16);
- dynamic_buffer raw_track;
+ std::vector<UINT8> raw_track;
int tracks = fh[10];
int heads = 1+(tracks >= 160);
diff --git a/src/lib/formats/td0_dsk.cpp b/src/lib/formats/td0_dsk.cpp
index 69b3e5bfc14..51fa59488a6 100644
--- a/src/lib/formats/td0_dsk.cpp
+++ b/src/lib/formats/td0_dsk.cpp
@@ -838,7 +838,7 @@ bool td0_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
int track_spt;
int offset = 0;
const int max_size = 4*1024*1024; // 4MB ought to be large enough for any floppy
- dynamic_buffer imagebuf(max_size);
+ std::vector<UINT8> imagebuf(max_size);
UINT8 header[12];
io_generic_read(io, header, 0, 12);
diff --git a/src/lib/formats/victor9k_dsk.cpp b/src/lib/formats/victor9k_dsk.cpp
index bce82cdf028..5f0936a8048 100644
--- a/src/lib/formats/victor9k_dsk.cpp
+++ b/src/lib/formats/victor9k_dsk.cpp
@@ -257,7 +257,7 @@ bool victor9k_format::load(io_generic *io, UINT32 form_factor, floppy_image *ima
const format &f = formats[type];
UINT64 size = io_generic_size(io);
- dynamic_buffer img;
+ std::vector<UINT8> img;
img.resize(size);
io_generic_read(io, &img[0], 0, size);
diff --git a/src/lib/util/avhuff.cpp b/src/lib/util/avhuff.cpp
index 277f056c7ad..dbec214076a 100644
--- a/src/lib/util/avhuff.cpp
+++ b/src/lib/util/avhuff.cpp
@@ -308,7 +308,7 @@ UINT32 avhuff_encoder::raw_data_size(const UINT8 *data)
}
/**
- * @fn avhuff_error avhuff_encoder::assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
+ * @fn avhuff_error avhuff_encoder::assemble_data(std::vector<UINT8> &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
*
* @brief -------------------------------------------------
* assemble_data - assemble a datastream from raw bits
@@ -325,7 +325,7 @@ UINT32 avhuff_encoder::raw_data_size(const UINT8 *data)
* @return An avhuff_error.
*/
-avhuff_error avhuff_encoder::assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
+avhuff_error avhuff_encoder::assemble_data(std::vector<UINT8> &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
{
// sanity check the inputs
if (metadatasize > 255)
diff --git a/src/lib/util/avhuff.h b/src/lib/util/avhuff.h
index cdaa3ec5f3a..ca1bd4cec49 100644
--- a/src/lib/util/avhuff.h
+++ b/src/lib/util/avhuff.h
@@ -90,7 +90,7 @@ public:
// static helpers
static UINT32 raw_data_size(const UINT8 *data);
static UINT32 raw_data_size(UINT32 width, UINT32 height, UINT8 channels, UINT32 numsamples, UINT32 metadatasize = 0) { return 12 + channels * numsamples * 2 + width * height * 2; }
- static avhuff_error assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata = nullptr, UINT32 metadatasize = 0);
+ static avhuff_error assemble_data(std::vector<UINT8> &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata = nullptr, UINT32 metadatasize = 0);
private:
// delta-RLE Huffman encoder
@@ -127,7 +127,7 @@ private:
deltarle_encoder m_crcontext;
// audio encoding contexts
- dynamic_buffer m_audiobuffer;
+ std::vector<UINT8> m_audiobuffer;
#if AVHUFF_USE_FLAC
flac_encoder m_flac_encoder;
#else
diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp
index 59a5b6cc18c..7b5dae18a4e 100644
--- a/src/lib/util/cdrom.cpp
+++ b/src/lib/util/cdrom.cpp
@@ -1225,7 +1225,7 @@ chd_error cdrom_parse_metadata(chd_file *chd, cdrom_toc *toc)
printf("toc->numtrks = %u?!\n", toc->numtrks);
/* look for old-style metadata */
- dynamic_buffer oldmetadata;
+ std::vector<UINT8> oldmetadata;
err = chd->read_metadata(CDROM_OLD_METADATA_TAG, 0, oldmetadata);
if (err != CHDERR_NONE)
return err;
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp
index 07da646dca3..8bce55cb947 100644
--- a/src/lib/util/chd.cpp
+++ b/src/lib/util/chd.cpp
@@ -1271,7 +1271,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex
}
/**
- * @fn chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output)
+ * @fn chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output)
*
* @brief Reads a metadata.
*
@@ -1285,7 +1285,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex
* @return The metadata.
*/
-chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output)
+chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output)
{
// wrap this for clean reporting
try
@@ -1349,7 +1349,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex
}
/**
- * @fn chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output, chd_metadata_tag &resulttag, UINT8 &resultflags)
+ * @fn chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output, chd_metadata_tag &resulttag, UINT8 &resultflags)
*
* @brief Reads a metadata.
*
@@ -1365,7 +1365,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex
* @return The metadata.
*/
-chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output, chd_metadata_tag &resulttag, UINT8 &resultflags)
+chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output, chd_metadata_tag &resulttag, UINT8 &resultflags)
{
// wrap this for clean reporting
try
@@ -1530,7 +1530,7 @@ chd_error chd_file::clone_all_metadata(chd_file &source)
try
{
// iterate over metadata entries in the source
- dynamic_buffer filedata;
+ std::vector<UINT8> filedata;
metadata_entry metaentry;
metaentry.metatag = 0;
metaentry.length = 0;
@@ -1577,7 +1577,7 @@ util::sha1_t chd_file::compute_overall_sha1(util::sha1_t rawsha1)
return rawsha1;
// iterate over metadata
- dynamic_buffer filedata;
+ std::vector<UINT8> filedata;
std::vector<metadata_hash> hasharray;
metadata_entry metaentry;
for (bool has_data = metadata_find(CHDMETATAG_WILDCARD, 0, metaentry); has_data; has_data = metadata_find(CHDMETATAG_WILDCARD, 0, metaentry, true))
@@ -1931,7 +1931,7 @@ chd_error chd_file::compress_v5_map()
util::crc16_t mapcrc = util::crc16_creator::simple(&m_rawmap[0], m_hunkcount * 12);
// create a buffer to hold the RLE data
- dynamic_buffer compression_rle(m_hunkcount);
+ std::vector<UINT8> compression_rle(m_hunkcount);
UINT8 *dest = &compression_rle[0];
// use a huffman encoder for 16 different codes, maximum length is 8 bits
@@ -2014,7 +2014,7 @@ chd_error chd_file::compress_v5_map()
}
// compute a tree and export it to the buffer
- dynamic_buffer compressed(m_hunkcount * 6);
+ std::vector<UINT8> compressed(m_hunkcount * 6);
bitstream_out bitbuf(&compressed[16], compressed.size() - 16);
huffman_error err = encoder.compute_tree_from_histo();
if (err != HUFFERR_NONE)
@@ -2155,7 +2155,7 @@ void chd_file::decompress_v5_map()
UINT8 parentbits = rawbuf[14];
// now read the map
- dynamic_buffer compressed(mapbytes);
+ std::vector<UINT8> compressed(mapbytes);
file_read(m_mapoffset + 16, &compressed[0], mapbytes);
bitstream_in bitbuf(&compressed[0], compressed.size());
diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h
index b0eb4143374..51c6fed0b54 100644
--- a/src/lib/util/chd.h
+++ b/src/lib/util/chd.h
@@ -349,12 +349,12 @@ public:
// metadata management
chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::string &output);
- chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output);
+ chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output);
chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 &resultlen);
- chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output, chd_metadata_tag &resulttag, UINT8 &resultflags);
+ chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::vector<UINT8> &output, chd_metadata_tag &resulttag, UINT8 &resultflags);
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const void *inputbuf, UINT32 inputlen, UINT8 flags = CHD_MDFLAGS_CHECKSUM);
chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const std::string &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input.c_str(), input.length() + 1, flags); }
- chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const dynamic_buffer &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, &input[0], input.size(), flags); }
+ chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const std::vector<UINT8> &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, &input[0], input.size(), flags); }
chd_error delete_metadata(chd_metadata_tag metatag, UINT32 metaindex);
chd_error clone_all_metadata(chd_file &source);
@@ -428,14 +428,14 @@ private:
// map information
UINT32 m_mapentrybytes; // length of each entry in a map
- dynamic_buffer m_rawmap; // raw map data
+ std::vector<UINT8> m_rawmap; // raw map data
// compression management
chd_decompressor * m_decompressor[4]; // array of decompression codecs
- dynamic_buffer m_compressed; // temporary buffer for compressed data
+ std::vector<UINT8> m_compressed; // temporary buffer for compressed data
// caching
- dynamic_buffer m_cache; // single-hunk cache for partial reads/writes
+ std::vector<UINT8> m_cache; // single-hunk cache for partial reads/writes
UINT32 m_cachehunk; // which hunk is in the cache?
};
@@ -571,8 +571,8 @@ private:
// work item thread
static const int WORK_BUFFER_HUNKS = 256;
osd_work_queue * m_work_queue; // queue for doing work on other threads
- dynamic_buffer m_work_buffer; // buffer containing hunk data to work on
- dynamic_buffer m_compressed_buffer;// buffer containing compressed data
+ std::vector<UINT8> m_work_buffer; // buffer containing hunk data to work on
+ std::vector<UINT8> m_compressed_buffer;// buffer containing compressed data
work_item m_work_item[WORK_BUFFER_HUNKS]; // status of each hunk
chd_compressor_group * m_codecs[WORK_MAX_THREADS]; // codecs to use
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index 041061c38e9..e2758f08a9e 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -258,7 +258,7 @@ private:
flac_encoder m_encoder;
z_stream m_deflater;
chd_zlib_allocator m_allocator;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
};
@@ -281,7 +281,7 @@ private:
flac_decoder m_decoder;
z_stream m_inflater;
chd_zlib_allocator m_allocator;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
};
@@ -350,7 +350,7 @@ private:
// internal state
_BaseCompressor m_base_compressor;
_SubcodeCompressor m_subcode_compressor;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
};
@@ -410,7 +410,7 @@ private:
// internal state
_BaseDecompressor m_base_decompressor;
_SubcodeDecompressor m_subcode_decompressor;
- dynamic_buffer m_buffer;
+ std::vector<UINT8> m_buffer;
};
diff --git a/src/lib/util/chdcodec.h b/src/lib/util/chdcodec.h
index bfde8d2cde7..0b56cbdeb9c 100644
--- a/src/lib/util/chdcodec.h
+++ b/src/lib/util/chdcodec.h
@@ -154,10 +154,10 @@ private:
// internal state
UINT32 m_hunkbytes; // number of bytes in a hunk
chd_compressor * m_compressor[4]; // array of active codecs
- dynamic_buffer m_compress_test; // test buffer for compression
+ std::vector<UINT8> m_compress_test; // test buffer for compression
#if CHDCODEC_VERIFY_COMPRESSION
chd_decompressor * m_decompressor[4]; // array of active codecs
- dynamic_buffer m_decompressed; // verification buffer
+ std::vector<UINT8> m_decompressed; // verification buffer
#endif
};
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index ff8f3137cc0..699ef91027b 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -410,8 +410,8 @@ int core_text_file::getc()
}
// fetch the next character
- utf16_char utf16_buffer[UTF16_CHAR_MAX];
- unicode_char uchar = unicode_char(~0);
+ char16_t utf16_buffer[UTF16_CHAR_MAX];
+ char32_t uchar = char32_t(~0);
switch (m_text_type)
{
default:
@@ -1221,7 +1221,7 @@ osd_file::error core_file::load(std::string const &filename, void **data, std::u
return osd_file::error::NONE;
}
-osd_file::error core_file::load(std::string const &filename, dynamic_buffer &data)
+osd_file::error core_file::load(std::string const &filename, std::vector<UINT8> &data)
{
ptr file;
diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h
index efbda400202..70b966c394c 100644
--- a/src/lib/util/corefile.h
+++ b/src/lib/util/corefile.h
@@ -101,7 +101,7 @@ public:
// open a file with the specified filename, read it into memory, and return a pointer
static osd_file::error load(std::string const &filename, void **data, std::uint32_t &length);
- static osd_file::error load(std::string const &filename, dynamic_buffer &data);
+ static osd_file::error load(std::string const &filename, std::vector<UINT8> &data);
// ----- file write -----
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index aff90713dbb..e94e467f2b2 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -21,10 +21,6 @@
#include <utility>
#include <vector>
-
-typedef std::vector<UINT8> dynamic_buffer;
-
-
// ======================> simple_list
// a simple_list is a singly-linked list whose 'next' pointer is owned
diff --git a/src/lib/util/flac.cpp b/src/lib/util/flac.cpp
index 085eaacffef..46d349c3452 100644
--- a/src/lib/util/flac.cpp
+++ b/src/lib/util/flac.cpp
@@ -355,7 +355,7 @@ bool flac_decoder::reset()
&flac_decoder::metadata_callback_static,
&flac_decoder::error_callback_static, this) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
return false;
- return FLAC__stream_decoder_process_until_end_of_metadata(m_decoder);
+ return FLAC__stream_decoder_process_until_end_of_metadata(m_decoder)!=0;
}
diff --git a/src/lib/util/huffman.cpp b/src/lib/util/huffman.cpp
index 62756b89a17..c38d78853fb 100644
--- a/src/lib/util/huffman.cpp
+++ b/src/lib/util/huffman.cpp
@@ -316,7 +316,7 @@ huffman_error huffman_context_base::import_tree_huffman(bitstream_in &bitbuf)
huffman_error huffman_context_base::export_tree_huffman(bitstream_out &bitbuf)
{
// first RLE compress the lengths of all the nodes
- dynamic_buffer rle_data(m_numcodes);
+ std::vector<UINT8> rle_data(m_numcodes);
UINT8 *dest = &rle_data[0];
std::vector<UINT16> rle_lengths(m_numcodes/3);
UINT16 *lengths = &rle_lengths[0];
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index b669000e59f..d25a29ef1db 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -86,7 +86,7 @@ public:
UINT32 flags() const { return m_flags; }
bool is_header() const { return type() == OPTION_HEADER; }
bool is_command() const { return type() == OPTION_COMMAND; }
- bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
+ bool is_internal() const { return (m_flags & OPTION_FLAG_INTERNAL)!=0; }
bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); }
int priority() const { return m_priority; }
bool is_changed() const { return m_changed; }
diff --git a/src/lib/util/un7z.cpp b/src/lib/util/un7z.cpp
index 33a9c3f51db..7af3e7f78ce 100644
--- a/src/lib/util/un7z.cpp
+++ b/src/lib/util/un7z.cpp
@@ -184,7 +184,7 @@ private:
std::uint32_t m_curr_crc; // current file crc
std::vector<UInt16> m_utf16_buf;
- std::vector<unicode_char> m_uchar_buf;
+ std::vector<char32_t> m_uchar_buf;
std::vector<char> m_utf8_buf;
CFileInStream m_archive_stream;
@@ -479,7 +479,7 @@ void m7z_file_impl::make_utf8_name(int index)
out_pos = 0;
for (std::size_t in_pos = 0; in_pos < (len - 1); )
{
- const int used = uchar_from_utf16(&m_uchar_buf[out_pos], &m_utf16_buf[in_pos], len - in_pos);
+ const int used = uchar_from_utf16(&m_uchar_buf[out_pos], (char16_t *)&m_utf16_buf[in_pos], len - in_pos);
if (used < 0)
{
in_pos++;
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index 65936e10b48..a6c5515fbf6 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -16,7 +16,7 @@
// character is a legitimate unicode character
//-------------------------------------------------
-bool uchar_isvalid(unicode_char uchar)
+bool uchar_isvalid(char32_t uchar)
{
return (uchar < 0x110000) && !((uchar >= 0xd800) && (uchar <= 0xdfff));
}
@@ -27,7 +27,7 @@ bool uchar_isvalid(unicode_char uchar)
// char is printable
//-------------------------------------------------
-bool uchar_is_printable(unicode_char uchar)
+bool uchar_is_printable(char32_t uchar)
{
return
!(0x0001f >= uchar) && // C0 control
@@ -43,7 +43,7 @@ bool uchar_is_printable(unicode_char uchar)
// char is a digit
//-------------------------------------------------
-bool uchar_is_digit(unicode_char uchar)
+bool uchar_is_digit(char32_t uchar)
{
return uchar >= '0' && uchar <= '9';
}
@@ -54,9 +54,9 @@ bool uchar_is_digit(unicode_char uchar)
// into a unicode character
//-----------------------------------------------
-int uchar_from_utf8(unicode_char *uchar, const char *utf8char, size_t count)
+int uchar_from_utf8(char32_t *uchar, const char *utf8char, size_t count)
{
- unicode_char c, minchar;
+ char32_t c, minchar;
int auxlen, i;
char auxchar;
@@ -149,7 +149,7 @@ int uchar_from_utf8(unicode_char *uchar, const char *utf8char, size_t count)
// into a unicode character
//-------------------------------------------------
-int uchar_from_utf16(unicode_char *uchar, const utf16_char *utf16char, size_t count)
+int uchar_from_utf16(char32_t *uchar, const char16_t *utf16char, size_t count)
{
int rc = -1;
@@ -184,9 +184,9 @@ int uchar_from_utf16(unicode_char *uchar, const utf16_char *utf16char, size_t co
// byte order
//-------------------------------------------------
-int uchar_from_utf16f(unicode_char *uchar, const utf16_char *utf16char, size_t count)
+int uchar_from_utf16f(char32_t *uchar, const char16_t *utf16char, size_t count)
{
- utf16_char buf[2] = {0};
+ char16_t buf[2] = {0};
if (count > 0)
buf[0] = flipendian_int16(utf16char[0]);
if (count > 1)
@@ -200,7 +200,7 @@ int uchar_from_utf16f(unicode_char *uchar, const utf16_char *utf16char, size_t c
// into a UTF-8 sequence
//-------------------------------------------------
-int utf8_from_uchar(char *utf8string, size_t count, unicode_char uchar)
+int utf8_from_uchar(char *utf8string, size_t count, char32_t uchar)
{
int rc = 0;
@@ -278,7 +278,7 @@ int utf8_from_uchar(char *utf8string, size_t count, unicode_char uchar)
// into a UTF-8 sequence
//-------------------------------------------------
-std::string utf8_from_uchar(unicode_char uchar)
+std::string utf8_from_uchar(char32_t uchar)
{
char buffer[UTF8_CHAR_MAX];
auto len = utf8_from_uchar(buffer, ARRAY_LENGTH(buffer), uchar);
@@ -291,7 +291,7 @@ std::string utf8_from_uchar(unicode_char uchar)
// into a UTF-16 sequence
//-------------------------------------------------
-int utf16_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar)
+int utf16_from_uchar(char16_t *utf16string, size_t count, char32_t uchar)
{
int rc;
@@ -304,7 +304,7 @@ int utf16_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar)
// single word case
if (count < 1)
return -1;
- utf16string[0] = (utf16_char) uchar;
+ utf16string[0] = (char16_t) uchar;
rc = 1;
}
else if (uchar < 0x100000)
@@ -330,10 +330,10 @@ int utf16_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar)
// into a UTF-16 sequence with flipped endianness
//-------------------------------------------------
-int utf16f_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar)
+int utf16f_from_uchar(char16_t *utf16string, size_t count, char32_t uchar)
{
int rc;
- utf16_char buf[2] = { 0, 0 };
+ char16_t buf[2] = { 0, 0 };
rc = utf16_from_uchar(buf, count, uchar);
@@ -390,7 +390,7 @@ bool utf8_is_valid_string(const char *utf8string)
while (*utf8string != 0)
{
- unicode_char uchar = 0;
+ char32_t uchar = 0;
int charlen;
// extract the current character and verify it
diff --git a/src/lib/util/unicode.h b/src/lib/util/unicode.h
index 152e76826c2..5cc6db383ee 100644
--- a/src/lib/util/unicode.h
+++ b/src/lib/util/unicode.h
@@ -73,39 +73,29 @@
#define UTF8_DOWN "\xe2\x86\x93" /* cursor down */
-
-/***************************************************************************
- TYPE DEFINITIONS
-***************************************************************************/
-
-typedef UINT16 utf16_char;
-typedef UINT32 unicode_char;
-
-
-
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
// tests to see if a unicode char is a valid code point
-bool uchar_isvalid(unicode_char uchar);
+bool uchar_isvalid(char32_t uchar);
// tests to see if a unicode char is printable
-bool uchar_is_printable(unicode_char uchar);
+bool uchar_is_printable(char32_t uchar);
// tests to see if a unicode char is a digit
-bool uchar_is_digit(unicode_char uchar);
+bool uchar_is_digit(char32_t uchar);
// converting strings to 32-bit Unicode chars
-int uchar_from_utf8(unicode_char *uchar, const char *utf8char, size_t count);
-int uchar_from_utf16(unicode_char *uchar, const utf16_char *utf16char, size_t count);
-int uchar_from_utf16f(unicode_char *uchar, const utf16_char *utf16char, size_t count);
+int uchar_from_utf8(char32_t *uchar, const char *utf8char, size_t count);
+int uchar_from_utf16(char32_t *uchar, const char16_t *utf16char, size_t count);
+int uchar_from_utf16f(char32_t *uchar, const char16_t *utf16char, size_t count);
// converting 32-bit Unicode chars to strings
-int utf8_from_uchar(char *utf8string, size_t count, unicode_char uchar);
-std::string utf8_from_uchar(unicode_char uchar);
-int utf16_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar);
-int utf16f_from_uchar(utf16_char *utf16string, size_t count, unicode_char uchar);
+int utf8_from_uchar(char *utf8string, size_t count, char32_t uchar);
+std::string utf8_from_uchar(char32_t uchar);
+int utf16_from_uchar(char16_t *utf16string, size_t count, char32_t uchar);
+int utf16f_from_uchar(char16_t *utf16string, size_t count, char32_t uchar);
// misc UTF-8 helpers
const char *utf8_previous_char(const char *utf8string);
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index fe6ec9cb975..a65bda9a99c 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -620,16 +620,16 @@ class general_flag_reader
public:
general_flag_reader(std::uint16_t val) : m_value(val) { }
- bool encrypted() const { return bool(m_value & 0x0001); }
- bool implode_8k_dict() const { return bool(m_value & 0x0002); }
- bool implode_3_trees() const { return bool(m_value & 0x0004); }
+ bool encrypted() const { return (m_value & 0x0001) !=0; }
+ bool implode_8k_dict() const { return (m_value & 0x0002) != 0; }
+ bool implode_3_trees() const { return (m_value & 0x0004) != 0; }
unsigned deflate_option() const { return unsigned((m_value >> 1) & 0x0003); }
- bool lzma_eos_mark() const { return bool(m_value & 0x0002); }
- bool use_descriptor() const { return bool(m_value & 0x0008); }
- bool patch_data() const { return bool(m_value & 0x0020); }
- bool strong_encryption() const { return bool(m_value & 0x0040); }
- bool utf8_encoding() const { return bool(m_value & 0x0800); }
- bool directory_encryption() const { return bool(m_value & 0x2000); }
+ bool lzma_eos_mark() const { return (m_value & 0x0002) != 0; }
+ bool use_descriptor() const { return (m_value & 0x0008) != 0; }
+ bool patch_data() const { return (m_value & 0x0020) != 0; }
+ bool strong_encryption() const { return (m_value & 0x0040) != 0; }
+ bool utf8_encoding() const { return (m_value & 0x0800) != 0; }
+ bool directory_encryption() const { return (m_value & 0x2000) != 0; }
private:
std::uint16_t m_value;
diff --git a/src/lib/util/vecstream.h b/src/lib/util/vecstream.h
index 1af7dd0cd86..faf8b73c669 100644
--- a/src/lib/util/vecstream.h
+++ b/src/lib/util/vecstream.h
@@ -148,8 +148,8 @@ public:
protected:
virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override
{
- bool const in(which & std::ios_base::in);
- bool const out(which & std::ios_base::out);
+ bool const in((which & std::ios_base::in)!=0);
+ bool const out((which & std::ios_base::out)!=0);
if ((!in && !out) ||
(in && out && (std::ios_base::cur == dir)) ||
(in && !(m_mode & std::ios_base::in)) ||
diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt
index b3deb7cf62d..fee8dd43390 100644
--- a/src/mame/arcade.flt
+++ b/src/mame/arcade.flt
@@ -724,6 +724,7 @@ missb2.cpp
missile.cpp
mitchell.cpp
mjkjidai.cpp
+mjsenpu.cpp
mjsister.cpp
mlanding.cpp
mmagic.cpp
diff --git a/src/mame/audio/alesis.cpp b/src/mame/audio/alesis.cpp
index 7a253db43a2..fdd2c00fc05 100644
--- a/src/mame/audio/alesis.cpp
+++ b/src/mame/audio/alesis.cpp
@@ -13,6 +13,7 @@
#include "emu.h"
#include "includes/alesis.h"
+#include "sound/volt_reg.h"
#define LOG 1
@@ -24,10 +25,11 @@ const device_type ALESIS_DM3AG = &device_creator<alesis_dm3ag_device>;
***************************************************************************/
static MACHINE_CONFIG_FRAGMENT( alesis_dm3ag )
- MCFG_SPEAKER_STANDARD_STEREO("out1_left", "out1_right")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "out1_left", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "out1_right", 1.0)
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker1", "rspeaker1")
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker2", "rspeaker2")
+ MCFG_SOUND_ADD("dac", PCM54HP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker1", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker1", 1.0) // PCM54HP DAC + R63/R73-75 + Sample and hold
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@@ -114,7 +116,7 @@ void alesis_dm3ag_device::device_timer(emu_timer &timer, device_timer_id id, int
sample = m_samples[m_cur_sample++];
}
- m_dac->write_signed16((sample << m_shift) + 0x8000);
+ m_dac->write(sample << m_shift);
}
}
diff --git a/src/mame/audio/cchasm.cpp b/src/mame/audio/cchasm.cpp
index b4474772a34..ad41d560061 100644
--- a/src/mame/audio/cchasm.cpp
+++ b/src/mame/audio/cchasm.cpp
@@ -11,7 +11,6 @@
#include "machine/z80ctc.h"
#include "includes/cchasm.h"
#include "sound/ay8910.h"
-#include "sound/dac.h"
WRITE8_MEMBER(cchasm_state::reset_coin_flag_w)
@@ -102,9 +101,8 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_1_w)
{
if (state) /* rising edge */
{
- m_output[0] ^= 0x7f;
- m_channel_active[0] = 1;
- m_dac1->write_unsigned8(m_output[0]);
+ m_output[0] = !m_output[0];
+ m_dac1->write(m_output[0]);
}
}
@@ -112,9 +110,8 @@ WRITE_LINE_MEMBER(cchasm_state::ctc_timer_2_w)
{
if (state) /* rising edge */
{
- m_output[1] ^= 0x7f;
- m_channel_active[1] = 1;
- m_dac2->write_unsigned8(m_output[0]);
+ m_output[1] = !m_output[1];
+ m_dac2->write(m_output[1]);
}
}
@@ -127,6 +124,5 @@ void cchasm_state::sound_start()
save_item(NAME(m_sound_flags));
save_item(NAME(m_coin_flag));
- save_item(NAME(m_channel_active));
save_item(NAME(m_output));
}
diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp
index fb9bc5901ab..bd20ab77b17 100644
--- a/src/mame/audio/cclimber.cpp
+++ b/src/mame/audio/cclimber.cpp
@@ -22,12 +22,12 @@ SAMPLES_START_CB_MEMBER( cclimber_audio_device::sh_start )
MACHINE_CONFIG_FRAGMENT( cclimber_audio )
MCFG_SOUND_ADD("aysnd", AY8910, SND_CLOCK/2)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(cclimber_audio_device, sample_select_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(cclimber_audio_device, sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.5)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":speaker", 0.5)
MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/mame/audio/cyberbal.cpp b/src/mame/audio/cyberbal.cpp
index 32a9403a2f6..07ec31523e4 100644
--- a/src/mame/audio/cyberbal.cpp
+++ b/src/mame/audio/cyberbal.cpp
@@ -136,8 +136,15 @@ WRITE16_MEMBER(cyberbal_state::sound_68k_w)
WRITE16_MEMBER(cyberbal_state::sound_68k_dac_w)
{
- dac_device *dac = (offset & 8) ? m_dac2 : m_dac1;
- dac->write_unsigned16((((data >> 3) & 0x800) | ((data >> 2) & 0x7ff)) << 4);
+ //int clip = BIT(data, 15);
+ //int off0b = BIT(data, 13) | BIT(data, 14);
+ //int off4b = BIT(data, 13) & BIT(data, 14);
+ uint16 sample = ((data >> 3) & 0x800) | ((data >> 2) & 0x7ff);
+
+ if (offset & 8)
+ m_ldac->write(sample);
+ else
+ m_rdac->write(sample);
if (m_fast_68k_int)
{
diff --git a/src/mame/audio/galaxian.cpp b/src/mame/audio/galaxian.cpp
index 95598d41d1d..ca4505c00e9 100644
--- a/src/mame/audio/galaxian.cpp
+++ b/src/mame/audio/galaxian.cpp
@@ -509,20 +509,20 @@ void galaxian_sound_device::sound_stream_update(sound_stream &stream, stream_sam
MACHINE_CONFIG_FRAGMENT( galaxian_audio )
MCFG_SOUND_ADD("cust", GALAXIAN, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0)
MCFG_DISCRETE_INTF(galaxian)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( mooncrst_audio )
MCFG_SOUND_ADD("cust", GALAXIAN, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
MCFG_SOUND_ADD(GAL_AUDIO, DISCRETE, 0)
MCFG_DISCRETE_INTF(mooncrst)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 5f5fc4cad69..17db18103dd 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -11,6 +11,8 @@
***************************************************************************/
#include "audio/gottlieb.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define SOUND1_CLOCK XTAL_3_579545MHz
@@ -234,14 +236,14 @@ MACHINE_CONFIG_FRAGMENT( reactor_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_NAMES(reactor_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( qbert_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_NAMES(qbert_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
#endif
@@ -260,7 +262,6 @@ gottlieb_sound_r0_device::gottlieb_sound_r0_device(const machine_config &mconfig
, device_mixer_interface(mconfig, *this)
, m_audiocpu(*this, "audiocpu")
, m_r6530(*this, "r6530")
- , m_dac(*this, "dac")
, m_sndcmd(0)
{
}
@@ -313,12 +314,13 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r0 )
// I/O configuration
MCFG_DEVICE_ADD("r6530", MOS6530, SOUND1_CLOCK/4) // unknown - same as cpu
- MCFG_MOS6530_OUT_PA_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_MOS6530_OUT_PA_CB(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_MOS6530_IN_PB_CB(READ8(gottlieb_sound_r0_device, r6530b_r))
// sound devices
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -385,7 +387,6 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_riot(*this, "riot"),
- m_dac(*this, "dac"),
m_votrax(*this, "votrax"),
//m_populate_votrax(false),
m_last_speech_clock(0)
@@ -403,7 +404,6 @@ gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_riot(*this, "riot"),
- m_dac(*this, "dac"),
m_votrax(*this, "votrax"),
//m_populate_votrax(populate_votrax),
m_last_speech_clock(0)
@@ -522,7 +522,7 @@ static ADDRESS_MAP_START( gottlieb_sound_r1_map, AS_PROGRAM, 8, gottlieb_sound_r
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0d80) AM_RAM
AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0de0) AM_DEVREADWRITE("riot", riot6532_device, read, write)
- AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0fff) AM_WRITE(votrax_data_w)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_WRITE(speech_clock_dac_w)
AM_RANGE(0x6000, 0x7fff) AM_ROM
@@ -545,8 +545,9 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1 )
MCFG_RIOT6532_IRQ_CB(WRITELINE(gottlieb_sound_r1_device, snd_interrupt))
// sound devices
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1_with_votrax )
@@ -555,7 +556,7 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r1_with_votrax )
// add the VOTRAX
MCFG_DEVICE_ADD("votrax", VOTRAX_SC01, 720000)
MCFG_VOTRAX_SC01_REQUEST_CB(DEVWRITELINE(DEVICE_SELF, gottlieb_sound_r1_device, votrax_request))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
@@ -667,7 +668,6 @@ gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig
device_mixer_interface(mconfig, *this),
m_audiocpu(*this, "audiocpu"),
m_speechcpu(*this, "speechcpu"),
- m_dac(*this, "dac"),
m_ay1(*this, "ay1"),
m_ay2(*this, "ay2"),
m_sp0250(*this, "spsnd"),
@@ -803,20 +803,6 @@ CUSTOM_INPUT_MEMBER( gottlieb_sound_r2_device::speech_drq_custom_r )
//-------------------------------------------------
-// dac_w - write to one of the two DACs on the
-// board
-//-------------------------------------------------
-
-WRITE8_MEMBER( gottlieb_sound_r2_device::dac_w )
-{
- // dual DAC; the first DAC serves as the reference voltage for the
- // second, effectively scaling the output
- m_dac_data[offset] = data;
- m_dac->write_unsigned16(m_dac_data[0] * m_dac_data[1]);
-}
-
-
-//-------------------------------------------------
// speech_control_w - primary audio control
// register on the speech board
//-------------------------------------------------
@@ -900,7 +886,8 @@ WRITE8_MEMBER( gottlieb_sound_r2_device::sp0250_latch_w )
static ADDRESS_MAP_START( gottlieb_sound_r2_map, AS_PROGRAM, 8, gottlieb_sound_r2_device )
AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x3c00) AM_RAM
- AM_RANGE(0x4000, 0x4001) AM_MIRROR(0x3ffe) AM_WRITE(dac_w)
+ AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x3ffe) AM_DEVWRITE("dacvol", dac_byte_interface, write)
+ AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x3ffe) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x3fff) AM_READ(audio_data_r)
AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM
ADDRESS_MAP_END
@@ -936,8 +923,11 @@ MACHINE_CONFIG_FRAGMENT( gottlieb_sound_r2 )
MCFG_CPU_PROGRAM_MAP(gottlieb_speech_r2_map)
// sound hardware
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.075) // unknown DAC
+ MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("ay1", AY8913, SOUND2_CLOCK/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15)
@@ -1002,9 +992,6 @@ void gottlieb_sound_r2_device::device_start()
m_nmi_rate = 0;
nmi_timer_adjust();
- // reset the DACs
- m_dac_data[0] = m_dac_data[1] = 0xff;
-
// disable the non-speech CPU for cobram3
if (m_cobram3_mod)
m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
@@ -1050,3 +1037,4 @@ void gottlieb_sound_r2_device::device_timer(emu_timer &timer, device_timer_id id
break;
}
}
+
diff --git a/src/mame/audio/gottlieb.h b/src/mame/audio/gottlieb.h
index 6295af33542..cb5f678586b 100644
--- a/src/mame/audio/gottlieb.h
+++ b/src/mame/audio/gottlieb.h
@@ -10,7 +10,6 @@
#include "cpu/m6502/m6502.h"
#include "machine/mos6530.h"
#include "machine/6532riot.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
#include "sound/sp0250.h"
#include "sound/votrax.h"
@@ -36,18 +35,7 @@ extern const device_type GOTTLIEB_SOUND_REV2;
// DEVICE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_GOTTLIEB_SOUND_R0_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV0, 0)
-
-#define MCFG_GOTTLIEB_SOUND_R1_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV1, 0)
-#define MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX(_tag) \
- MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0)
-
-#define MCFG_GOTTLIEB_SOUND_R2_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV2, 0)
-#define MCFG_GOTTLIEB_SOUND_R2_ADD_COBRAM3(_tag) \
- MCFG_DEVICE_ADD(_tag, GOTTLIEB_SOUND_REV2, 0) \
+#define MCFG_GOTTLIEB_ENABLE_COBRAM3_MODS() \
gottlieb_sound_r2_device::static_enable_cobram3_mods(*device);
@@ -81,7 +69,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<mos6530_device> m_r6530;
- required_device<dac_device> m_dac;
UINT8 m_sndcmd;
};
@@ -116,7 +103,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<riot6532_device> m_riot;
- required_device<dac_device> m_dac;
optional_device<votrax_sc01_device> m_votrax;
// internal state
@@ -172,7 +158,6 @@ public:
DECLARE_WRITE8_MEMBER( signal_audio_nmi_w );
DECLARE_WRITE8_MEMBER( nmi_rate_w );
CUSTOM_INPUT_MEMBER( speech_drq_custom_r );
- DECLARE_WRITE8_MEMBER( dac_w );
DECLARE_WRITE8_MEMBER( speech_control_w );
DECLARE_WRITE8_MEMBER( sp0250_latch_w );
DECLARE_WRITE8_MEMBER( psg_latch_w );
@@ -200,7 +185,6 @@ private:
// devices
required_device<m6502_device> m_audiocpu;
required_device<m6502_device> m_speechcpu;
- required_device<dac_device> m_dac;
required_device<ay8913_device> m_ay1;
required_device<ay8913_device> m_ay2;
optional_device<sp0250_device> m_sp0250;
@@ -214,7 +198,6 @@ private:
UINT8 m_speechcpu_latch;
UINT8 m_speech_control;
UINT8 m_last_command;
- UINT8 m_dac_data[2];
UINT8 m_psg_latch;
UINT8 m_psg_data_latch;
UINT8 m_sp0250_latch;
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index f45c4755fea..7c38118370a 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -7,10 +7,10 @@
****************************************************************************/
#include "emu.h"
+#include "includes/harddriv.h"
#include "cpu/tms32010/tms32010.h"
-#include "sound/dac.h"
#include "machine/atarigen.h"
-#include "includes/harddriv.h"
+#include "sound/volt_reg.h"
#define BIO_FREQUENCY (1000000 / 50)
@@ -38,7 +38,6 @@ harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &m
m_mainflag(0),
m_sounddata(0),
m_maindata(0),
- m_dacmute(0),
m_cramen(0),
m_irq68k(0),
m_sound_rom_offs(0),
@@ -325,9 +324,8 @@ READ_LINE_MEMBER(harddriv_sound_board_device::hdsnddsp_get_bio)
WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_dac_w)
{
- /* DAC L */
- if (!m_dacmute)
- m_dac->write_signed16(data ^ 0x8000);
+ /* /DACL */
+ m_dac->write((data >> 4) ^ 0x800); // schematics show d0-3 are ignored & the msb is inverted
}
@@ -341,7 +339,6 @@ WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_comport_w)
WRITE16_MEMBER(harddriv_sound_board_device::hdsnddsp_mute_w)
{
/* mute DAC audio, D0=1 */
-/* m_dacmute = data & 1; -- NOT STUFFED */
logerror("%06X:mute DAC=%d\n", space.device().safe_pcbase(), data);
}
@@ -413,7 +410,7 @@ ADDRESS_MAP_END
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */
static ADDRESS_MAP_START( driversnd_dsp_io_map, AS_IO, 16, harddriv_sound_board_device )
- AM_RANGE(0, 0) AM_READWRITE(hdsnddsp_rom_r, hdsnddsp_dac_w)
+ AM_RANGE(0, 0) AM_READ(hdsnddsp_rom_r) AM_WRITE(hdsnddsp_dac_w)
AM_RANGE(1, 1) AM_READ(hdsnddsp_comram_r)
AM_RANGE(2, 2) AM_READ(hdsnddsp_compare_r)
AM_RANGE(1, 2) AM_WRITENOP
@@ -437,10 +434,11 @@ static MACHINE_CONFIG_FRAGMENT( harddriv_snd )
MCFG_TMS32010_BIO_IN_CB(READLINE(harddriv_sound_board_device, hdsnddsp_get_bio))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // ls374d.75e + ls374d.90e + am6012
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
diff --git a/src/mame/audio/hyprolyb.cpp b/src/mame/audio/hyprolyb.cpp
index c7402dd4dcf..3e9b29d356c 100644
--- a/src/mame/audio/hyprolyb.cpp
+++ b/src/mame/audio/hyprolyb.cpp
@@ -114,7 +114,7 @@ MACHINE_CONFIG_FRAGMENT( hyprolyb_adpcm )
MCFG_SOUND_ADD("msm", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(DEVWRITELINE("hyprolyb_adpcm", hyprolyb_adpcm_device, vck_callback)) /* VCK function */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S96_4B) /* 4 kHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/jaguar.cpp b/src/mame/audio/jaguar.cpp
index e3d09c6ef8a..441e25fd236 100644
--- a/src/mame/audio/jaguar.cpp
+++ b/src/mame/audio/jaguar.cpp
@@ -334,12 +334,12 @@ WRITE32_MEMBER( jaguar_state::serial_w )
{
/* right DAC */
case 2:
- m_dac2->write_signed16((data & 0xffff) ^ 0x8000);
+ m_rdac->write(data & 0xffff);
break;
/* left DAC */
case 3:
- m_dac1->write_signed16((data & 0xffff) ^ 0x8000);
+ m_ldac->write(data & 0xffff);
break;
/* frequency register */
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 6cf7e4740ad..260e775df58 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -10,7 +10,7 @@
-------------------------------------------------------------------
1st generation sound hardware was controlled by the master Z80.
- It drove an AY-8910/AY-8912 pair for music. It also had two DACs
+ It drove either an AY-8910/AY-8912 for music. It also had two DACs
that were driven by the video refresh. At the end of each scanline
there are 8-bit DAC samples that can be enabled via the output
ports on the AY-8910. The DACs run at a fixed frequency of 15.3kHz,
@@ -80,8 +80,9 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
#include "includes/leland.h"
+#include "cpu/z80/z80.h"
+#include "sound/volt_reg.h"
#define LOG_COMM 0
#define LOG_EXTERN 0
@@ -112,11 +113,6 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::pit1_2_w)
set_clock_line(5, state);
}
-WRITE_LINE_MEMBER(leland_80186_sound_device::pit2_0_w)
-{
- set_clock_line(5, state);
-}
-
WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr0_w)
{
set_clock_line(6, state);
@@ -128,7 +124,7 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w)
{
if (m_ext_active && (m_ext_start < m_ext_stop))
{
- m_dac4->write_signed8(m_ext_base[m_ext_start]);
+ m_dac4->write(m_ext_base[m_ext_start]);
m_ext_start++;
}
}
@@ -137,20 +133,27 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w)
static MACHINE_CONFIG_FRAGMENT( leland_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac3", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac4", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac5", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac6", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac7", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
+ MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u31 + ad7524.u46
+ MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u32 + ad7524.u47
+ MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u33 + ad7524.u48
+ MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u34 + ad7524.u49
+ MCFG_SOUND_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u35 + ad7524.u50
+ MCFG_SOUND_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u36 + ad7524.u51
+ MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // ad7533.u64
+ MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u17 + r2-r9 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u18 + r12-r19 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u19 + r22-r29 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u20 + r32-r39 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u21 + r42-r49 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u22 + r52-r59 (24k,12k,6.2k,3k,1.5k,750,360,160)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(4000000)
@@ -171,22 +174,31 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( redline_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac3", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac4", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac5", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac6", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac7", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac8", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
+ MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac7", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac8", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac7vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac8vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac8vol", 1.0, DAC_VREF_POS_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(7000000)
@@ -212,16 +224,21 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( ataxx_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac3", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac4", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac7", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
+ MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pit0", PIT8254, 0)
MCFG_PIT8253_CLK0(4000000)
@@ -234,16 +251,21 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( wsf_80186_sound )
MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac3", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac4", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.40)
- MCFG_SOUND_ADD("dac7", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.00)
+ MCFG_SOUND_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
/* sound hardware */
MCFG_YM2151_ADD("ymsnd", 4000000)
@@ -339,6 +361,15 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
m_dac6(*this, "dac6"),
m_dac7(*this, "dac7"),
m_dac8(*this, "dac8"),
+ m_dac9(*this, "dac9"),
+ m_dac1vol(*this, "dac1vol"),
+ m_dac2vol(*this, "dac2vol"),
+ m_dac3vol(*this, "dac3vol"),
+ m_dac4vol(*this, "dac4vol"),
+ m_dac5vol(*this, "dac5vol"),
+ m_dac6vol(*this, "dac6vol"),
+ m_dac7vol(*this, "dac7vol"),
+ m_dac8vol(*this, "dac8vol"),
m_pit0(*this, "pit0"),
m_pit1(*this, "pit1"),
m_pit2(*this, "pit2"),
@@ -357,6 +388,15 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf
m_dac6(*this, "dac6"),
m_dac7(*this, "dac7"),
m_dac8(*this, "dac8"),
+ m_dac9(*this, "dac9"),
+ m_dac1vol(*this, "dac1vol"),
+ m_dac2vol(*this, "dac2vol"),
+ m_dac3vol(*this, "dac3vol"),
+ m_dac4vol(*this, "dac4vol"),
+ m_dac5vol(*this, "dac5vol"),
+ m_dac6vol(*this, "dac6vol"),
+ m_dac7vol(*this, "dac7vol"),
+ m_dac8vol(*this, "dac8vol"),
m_pit0(*this, "pit0"),
m_pit1(*this, "pit1"),
m_pit2(*this, "pit2"),
@@ -489,13 +529,6 @@ WRITE8_MEMBER( leland_80186_sound_device::leland_80186_command_hi_w )
}
-READ16_MEMBER( leland_80186_sound_device::main_to_sound_comm_r )
-{
- if (LOG_COMM) logerror("%05X:Read sound command latch = %02X\n", m_audiocpu->device_t::safe_pc(), m_sound_command);
- return m_sound_command;
-}
-
-
/*************************************
@@ -542,13 +575,6 @@ READ8_MEMBER( leland_80186_sound_device::leland_80186_response_r )
}
-WRITE16_MEMBER( leland_80186_sound_device::sound_to_main_comm_w )
-{
- if (LOG_COMM) logerror("%05X:Write sound response latch = %02X\n", m_audiocpu->device_t::safe_pc(), data);
- m_sound_response = data;
-}
-
-
/*************************************
*
@@ -558,71 +584,73 @@ WRITE16_MEMBER( leland_80186_sound_device::sound_to_main_comm_w )
WRITE16_MEMBER( leland_80186_sound_device::dac_w )
{
- int which = offset & 7;
+ int dac = offset & 7;
/* handle value changes */
if (ACCESSING_BITS_0_7)
{
- switch(which)
+ switch (dac)
{
- case 0:
- m_dac1->write_signed8(data & 0xff);
- break;
- case 1:
- m_dac2->write_signed8(data & 0xff);
- break;
- case 2:
- m_dac3->write_signed8(data & 0xff);
- break;
- case 3:
- m_dac4->write_signed8(data & 0xff);
- break;
- case 4:
- m_dac5->write_signed8(data & 0xff);
- break;
- case 5:
- m_dac6->write_signed8(data & 0xff);
- break;
- case 6:
- m_dac7->write_signed8(data & 0xff);
- break;
- case 7:
- m_dac8->write_signed8(data & 0xff);
- break;
+ case 0:
+ m_dac1->write(data & 0xff);
+ break;
+ case 1:
+ m_dac2->write(data & 0xff);
+ break;
+ case 2:
+ m_dac3->write(data & 0xff);
+ break;
+ case 3:
+ m_dac4->write(data & 0xff);
+ break;
+ case 4:
+ m_dac5->write(data & 0xff);
+ break;
+ case 5:
+ m_dac6->write(data & 0xff);
+ break;
+ case 6:
+ m_dac7->write(data & 0xff);
+ break;
+ case 7:
+ m_dac8->write(data & 0xff);
+ break;
}
- m_clock_active &= ~(1<<which);
+
+ set_clock_line(dac, 0);
}
/* handle volume changes */
if (ACCESSING_BITS_8_15)
- switch(which)
+ {
+ switch(dac)
{
- case 0:
- m_dac1->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 1:
- m_dac2->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 2:
- m_dac3->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 3:
- m_dac4->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 4:
- m_dac5->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 5:
- m_dac6->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 6:
- m_dac7->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
- case 7:
- m_dac8->set_output_gain(ALL_OUTPUTS, (data >> 8)/255.0f);
- break;
+ case 0:
+ m_dac1vol->write(data >> 8);
+ break;
+ case 1:
+ m_dac2vol->write(data >> 8);
+ break;
+ case 2:
+ m_dac3vol->write(data >> 8);
+ break;
+ case 3:
+ m_dac4vol->write(data >> 8);
+ break;
+ case 4:
+ m_dac5vol->write(data >> 8);
+ break;
+ case 5:
+ m_dac6vol->write(data >> 8);
+ break;
+ case 6:
+ m_dac7vol->write(data >> 8);
+ break;
+ case 7:
+ m_dac8vol->write(data >> 8);
+ break;
}
-
+ }
}
@@ -633,67 +661,62 @@ WRITE16_MEMBER( redline_80186_sound_device::redline_dac_w )
WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
{
- /* handle common offsets */
- switch (offset)
+ if (ACCESSING_BITS_0_7)
{
+ /* handle common offsets */
+ switch (offset)
+ {
case 0x00:
case 0x01:
case 0x02:
- if (ACCESSING_BITS_0_7)
- dac_w(space, offset, data, 0x00ff);
+ dac_w(space, offset, data, 0x00ff);
return;
-
case 0x03:
- if(ACCESSING_BITS_0_7)
- {
- m_dac1->set_output_gain(ALL_OUTPUTS, (((data & 7) * 0x49) >> 1) / 255.0f);
- m_dac2->set_output_gain(ALL_OUTPUTS, ((((data >> 3) & 7) * 0x49) >> 1) / 255.0f);
- m_dac3->set_output_gain(ALL_OUTPUTS, (((data >> 6) & 3) * 0x55) / 255.0f);
- }
- return;
-
- case 0x21:
- if (ACCESSING_BITS_0_7)
- dac_w(space, 1, data, mem_mask);
+ m_dac1vol->write((data & 7) << 5);
+ m_dac2vol->write(((data >> 3) & 7) << 5);
+ m_dac3vol->write(((data >> 6) & 3) << 6);
return;
-
- default:
- break;
+ }
}
/* if we have a YM2151 (and an external DAC), handle those offsets */
- if (m_type == TYPE_WSF)
+ switch (m_type)
{
+ case TYPE_WSF:
+ switch (offset)
+ {
+ case 0x04:
+ m_ext_active = 1;
+ if (LOG_EXTERN) logerror("External DAC active\n");
+ return;
+ case 0x05:
+ m_ext_active = 0;
+ if (LOG_EXTERN) logerror("External DAC inactive\n");
+ return;
+ case 0x06:
+ m_ext_start >>= 4;
+ COMBINE_DATA(&m_ext_start);
+ m_ext_start <<= 4;
+ if (LOG_EXTERN) logerror("External DAC start = %05X\n", m_ext_start);
+ return;
+ case 0x07:
+ m_ext_stop >>= 4;
+ COMBINE_DATA(&m_ext_stop);
+ m_ext_stop <<= 4;
+ if (LOG_EXTERN) logerror("External DAC stop = %05X\n", m_ext_stop);
+ return;
+ }
+ break;
+ default:
switch (offset)
{
- case 0x04:
- m_ext_active = 1;
- if (LOG_EXTERN) logerror("External DAC active\n");
- return;
-
- case 0x05:
- m_ext_active = 0;
- if (LOG_EXTERN) logerror("External DAC inactive\n");
- return;
-
- case 0x06:
- m_ext_start >>= 4;
- COMBINE_DATA(&m_ext_start);
- m_ext_start <<= 4;
- if (LOG_EXTERN) logerror("External DAC start = %05X\n", m_ext_start);
- return;
-
- case 0x07:
- m_ext_stop >>= 4;
- COMBINE_DATA(&m_ext_stop);
- m_ext_stop <<= 4;
- if (LOG_EXTERN) logerror("External DAC stop = %05X\n", m_ext_stop);
- return;
-
- default:
- break;
+ case 0x21:
+ dac_w(space, 3, data, mem_mask);
+ return;
}
+ break;
}
+
logerror("%05X:Unexpected peripheral write %d/%02X = %02X\n", m_audiocpu->device_t::safe_pc(), 5, offset, data);
}
@@ -717,7 +740,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
//if ((++m_clock_tick & 7) == 0)
// return 0;
- /* if we've filled up all the active channels, we can give this CPU a reset */
+ /* if we've filled up all the active channels, we can give this CPU a rest */
/* until the next interrupt */
if (m_type != TYPE_REDLINE)
return ((m_clock_active >> 1) & 0x3e);
@@ -725,17 +748,18 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
return ((m_clock_active << 1) & 0x7e);
case 1:
- return main_to_sound_comm_r(space, offset, mem_mask);
+ if (LOG_COMM) logerror("%05X:Read sound command latch = %02X\n", m_audiocpu->device_t::safe_pc(), m_sound_command);
+ return m_sound_command;
case 2:
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
return m_pit0->read(space, offset & 3);
break;
case 3:
if (m_type <= TYPE_REDLINE)
{
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
return m_pit1->read(space, offset & 3);
}
else if (m_type == TYPE_WSF)
@@ -745,7 +769,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
case 4:
if (m_type == TYPE_REDLINE)
{
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
return m_pit2->read(space, offset & 3);
}
else
@@ -768,18 +792,19 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
switch (select)
{
case 1:
- sound_to_main_comm_w(space, offset, data, mem_mask);
+ if (LOG_COMM) logerror("%05X:Write sound response latch = %02X\n", m_audiocpu->device_t::safe_pc(), data);
+ m_sound_response = data;
break;
case 2:
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
m_pit0->write(space, offset & 3, data);
break;
case 3:
if (m_type <= TYPE_REDLINE)
{
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
m_pit1->write(space, offset & 3, data);
}
else if(m_type == TYPE_WSF)
@@ -789,13 +814,13 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
case 4:
if (m_type == TYPE_REDLINE)
{
- if (mem_mask != 0xff00)
+ if (ACCESSING_BITS_0_7)
m_pit2->write(space, offset & 3, data);
}
else if (mem_mask == 0xffff)
{
- m_dac7->write_signed16(data << 6);
- m_clock_active &= ~(1<<6);
+ m_dac9->write(data);
+ set_clock_line(6, 0);
}
break;
diff --git a/src/mame/audio/m72.cpp b/src/mame/audio/m72.cpp
index 9c539ad59cc..883fed63576 100644
--- a/src/mame/audio/m72.cpp
+++ b/src/mame/audio/m72.cpp
@@ -55,6 +55,7 @@ m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *ta
, m_sample_addr(0)
, m_samples(*this, "^samples")
, m_samples_size(0)
+ , m_dac(*this, "^dac")
, m_soundlatch(*this, "^soundlatch")
{
}
@@ -77,7 +78,6 @@ void m72_audio_device::device_start()
{
m_samples_size = m_samples.bytes();
m_space = &machine().device("soundcpu")->memory().space(AS_IO);
- m_dac = machine().device<dac_device>("dac");
save_item(NAME(m_irqvector));
save_item(NAME(m_sample_addr));
@@ -216,7 +216,7 @@ READ8_MEMBER( m72_audio_device::sample_r )
WRITE8_MEMBER( m72_audio_device::sample_w )
{
- m_dac->write_signed8(data);
+ m_dac->write(data);
m_sample_addr = (m_sample_addr + 1) & (m_samples_size - 1);
}
diff --git a/src/mame/audio/m72.h b/src/mame/audio/m72.h
index 3ac86396e3a..9e6c241206c 100644
--- a/src/mame/audio/m72.h
+++ b/src/mame/audio/m72.h
@@ -55,7 +55,7 @@ private:
optional_region_ptr<UINT8> m_samples;
UINT32 m_samples_size;
address_space *m_space;
- dac_device *m_dac;
+ optional_device<dac_byte_interface> m_dac;
required_device<generic_latch_8_device> m_soundlatch;
TIMER_CALLBACK_MEMBER( setvector_callback );
diff --git a/src/mame/audio/meadows.cpp b/src/mame/audio/meadows.cpp
index 48836a9975c..d4a72a027ad 100644
--- a/src/mame/audio/meadows.cpp
+++ b/src/mame/audio/meadows.cpp
@@ -12,7 +12,6 @@
#include "cpu/s2650/s2650.h"
#include "includes/meadows.h"
#include "sound/samples.h"
-#include "sound/dac.h"
@@ -33,8 +32,6 @@ static const INT16 waveform[2] = { -120*256, 120*256 };
SAMPLES_START_CB_MEMBER(meadows_state::meadows_sh_start)
{
m_0c00 = m_0c01 = m_0c02 = m_0c03 = 0;
- m_dac_data = 0;
- m_dac_enable = 0;
m_channel = 0;
m_freq1 = m_freq2 = 1000;
m_latched_0c01 = m_latched_0c02 = m_latched_0c03 = 0;
@@ -88,29 +85,12 @@ void meadows_state::meadows_sh_update()
m_samples->set_volume(1,amp/255.0);
}
- if (m_latched_0c03 != m_0c03)
+ if (((m_latched_0c03 ^ m_0c03) & ENABLE_DAC) != 0)
{
- m_dac_enable = m_0c03 & ENABLE_DAC;
-
- if (m_dac_enable)
- m_dac->write_unsigned8(m_dac_data);
- else
- m_dac->write_unsigned8(0);
+ m_dac->set_output_gain(ALL_OUTPUTS, (m_0c03 & ENABLE_DAC) != 0 ? 1.0 : 0.0);
}
m_latched_0c01 = m_0c01;
m_latched_0c02 = m_0c02;
m_latched_0c03 = m_0c03;
}
-
-/************************************/
-/* Write DAC value */
-/************************************/
-void meadows_state::meadows_sh_dac_w(int data)
-{
- m_dac_data = data;
- if (m_dac_enable)
- m_dac->write_unsigned8(m_dac_data);
- else
- m_dac->write_unsigned8(0);
-}
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index 6b9167bc5b2..5a9fbe6f802 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -9,9 +9,10 @@
***************************************************************************/
#include "emu.h"
-#include "audio/williams.h"
#include "includes/mcr.h"
#include "audio/midway.h"
+#include "audio/williams.h"
+#include "sound/volt_reg.h"
@@ -539,8 +540,8 @@ WRITE_LINE_MEMBER(midway_chip_squeak_deluxe_device::reset_write)
WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w)
{
- m_dacval = (m_dacval & ~0x3fc) | (data << 2);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (data << 2) | (m_dacval & 3);
+ m_dac->write(m_dacval);
}
@@ -550,8 +551,8 @@ WRITE8_MEMBER(midway_chip_squeak_deluxe_device::porta_w)
WRITE8_MEMBER(midway_chip_squeak_deluxe_device::portb_w)
{
- m_dacval = (m_dacval & ~0x003) | (data >> 6);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (m_dacval & ~3) | (data >> 6);
+ m_dac->write(m_dacval);
UINT8 z_mask = m_pia->port_b_z_mask();
if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1);
@@ -628,8 +629,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_chip_squeak_deluxe)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_chip_squeak_deluxe_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_chip_squeak_deluxe_device, irq_w))
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
+ MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -738,8 +740,8 @@ WRITE_LINE_MEMBER(midway_sounds_good_device::reset_write)
WRITE8_MEMBER(midway_sounds_good_device::porta_w)
{
- m_dacval = (m_dacval & ~0x3fc) | (data << 2);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (data << 2) | (m_dacval & 3);
+ m_dac->write(m_dacval);
}
@@ -751,8 +753,8 @@ WRITE8_MEMBER(midway_sounds_good_device::portb_w)
{
UINT8 z_mask = m_pia->port_b_z_mask();
- m_dacval = (m_dacval & ~0x003) | (data >> 6);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (m_dacval & ~3) | (data >> 6);
+ m_dac->write(m_dacval);
if (~z_mask & 0x10) m_status = (m_status & ~1) | ((data >> 4) & 1);
if (~z_mask & 0x20) m_status = (m_status & ~2) | ((data >> 4) & 2);
@@ -798,8 +800,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_sounds_good)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_sounds_good_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_sounds_good_device, irq_w))
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
+ MCFG_SOUND_ADD("dac", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) /// ad7533jn.u10
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -907,8 +910,8 @@ WRITE_LINE_MEMBER(midway_turbo_chip_squeak_device::reset_write)
WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w)
{
- m_dacval = (m_dacval & ~0x3fc) | (data << 2);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (data << 2) | (m_dacval & 3);
+ m_dac->write(m_dacval);
}
@@ -918,8 +921,8 @@ WRITE8_MEMBER(midway_turbo_chip_squeak_device::porta_w)
WRITE8_MEMBER(midway_turbo_chip_squeak_device::portb_w)
{
- m_dacval = (m_dacval & ~0x003) | (data >> 6);
- m_dac->write_signed16(m_dacval << 6);
+ m_dacval = (m_dacval & ~3) | (data >> 6);
+ m_dac->write(m_dacval);
m_status = (data >> 4) & 3;
}
@@ -962,8 +965,9 @@ static MACHINE_CONFIG_FRAGMENT(midway_turbo_chip_squeak)
MCFG_PIA_IRQA_HANDLER(WRITELINE(midway_turbo_chip_squeak_device, irq_w))
MCFG_PIA_IRQB_HANDLER(WRITELINE(midway_turbo_chip_squeak_device, irq_w))
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0)
+ MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/midway.h b/src/mame/audio/midway.h
index 60cc5571cf0..b6956b99b82 100644
--- a/src/mame/audio/midway.h
+++ b/src/mame/audio/midway.h
@@ -36,22 +36,6 @@ extern const device_type MIDWAY_SQUAWK_N_TALK;
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_MIDWAY_SSIO_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MIDWAY_SSIO, 0)
-#define MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MIDWAY_CHIP_SQUEAK_DELUXE, 0)
-#define MCFG_MIDWAY_SOUNDS_GOOD_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MIDWAY_SOUNDS_GOOD, 0)
-#define MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MIDWAY_TURBO_CHIP_SQUEAK, 0)
-#define MCFG_MIDWAY_SQUAWK_N_TALK_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MIDWAY_SQUAWK_N_TALK, 0)
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -156,7 +140,7 @@ private:
// devices
required_device<m68000_device> m_cpu;
required_device<pia6821_device> m_pia;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;
@@ -194,7 +178,7 @@ private:
// devices
required_device<m68000_device> m_cpu;
required_device<pia6821_device> m_pia;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;
@@ -232,7 +216,7 @@ private:
// devices
required_device<m6809e_device> m_cpu;
required_device<pia6821_device> m_pia;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
// internal state
UINT8 m_status;
diff --git a/src/mame/audio/n8080.cpp b/src/mame/audio/n8080.cpp
index 7cbab15d9a8..b4b094c6c2c 100644
--- a/src/mame/audio/n8080.cpp
+++ b/src/mame/audio/n8080.cpp
@@ -8,6 +8,7 @@
#include "emu.h"
#include "includes/n8080.h"
+#include "sound/volt_reg.h"
static const double ATTACK_RATE = 10e-6 * 500;
static const double DECAY_RATE = 10e-6 * 16000;
@@ -324,13 +325,7 @@ READ8_MEMBER(n8080_state::helifire_8035_p2_r)
WRITE8_MEMBER(n8080_state::n8080_dac_w)
{
- m_dac->write_unsigned8(data & 0x80);
-}
-
-
-WRITE8_MEMBER(n8080_state::helifire_dac_w)
-{
- m_dac->write_unsigned8(data * m_helifire_dac_volume);
+ m_n8080_dac->write(BIT(data, 7));
}
@@ -379,6 +374,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::helifire_dac_volume_timer)
{
m_helifire_dac_volume = exp(t / DECAY_RATE);
}
+
+ m_helifire_dac->set_output_gain(ALL_OUTPUTS, m_helifire_dac_volume);
}
@@ -487,7 +484,7 @@ static ADDRESS_MAP_START( helifire_sound_io_map, AS_IO, 8, n8080_state )
AM_RANGE(0x00, 0x7f) AM_READ(helifire_8035_external_ram_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(helifire_dac_w)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("helifire_dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(helifire_sound_ctrl_w)
ADDRESS_MAP_END
@@ -505,10 +502,11 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
MCFG_TIMER_DRIVER_ADD_PERIODIC("vco_timer", n8080_state, spacefev_vco_voltage_timer, attotime::from_hz(1000))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("snsnd", SN76477, 0)
MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(150), CAP_N(1)) // noise + filter
@@ -524,7 +522,7 @@ MACHINE_CONFIG_FRAGMENT( spacefev_sound )
MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
MCFG_SN76477_ENABLE(1) // enable
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
@@ -539,10 +537,11 @@ MACHINE_CONFIG_FRAGMENT( sheriff_sound )
MCFG_CPU_IO_MAP(n8080_sound_io_map)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ADD("n8080_dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "n8080_dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("snsnd", SN76477, 0)
MCFG_SN76477_NOISE_PARAMS(RES_K(36), RES_K(100), CAP_N(1)) // noise + filter
@@ -558,7 +557,7 @@ MACHINE_CONFIG_FRAGMENT( sheriff_sound )
MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
MCFG_SN76477_ENABLE(1) // enable
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
@@ -572,11 +571,11 @@ MACHINE_CONFIG_FRAGMENT( helifire_sound )
MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map)
MCFG_CPU_IO_MAP(helifire_sound_io_map)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac_volume_timer", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("helifire_dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "helifire_dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "helifire_dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/s11c_bg.cpp b/src/mame/audio/s11c_bg.cpp
index fc45e1b222e..a700e188aa2 100644
--- a/src/mame/audio/s11c_bg.cpp
+++ b/src/mame/audio/s11c_bg.cpp
@@ -8,18 +8,20 @@
*/
#include "s11c_bg.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
const device_type S11C_BG = &device_creator<s11c_bg_device>;
s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig,S11C_BG,"Williams System 11C Background Music",tag,owner,clock, "s11c_bg", __FILE__),
- m_cpu(*this,"bgcpu"),
- m_ym2151(*this,"ym2151"),
- m_hc55516(*this,"hc55516_bg"),
- m_dac1(*this,"dac1"),
- m_pia40(*this,"pia40"),
- m_cpubank(*this,"bgbank")
+ device_mixer_interface(mconfig, *this),
+ m_cpu(*this,"bgcpu"),
+ m_ym2151(*this,"ym2151"),
+ m_hc55516(*this,"hc55516_bg"),
+ m_pia40(*this,"pia40"),
+ m_cpubank(*this,"bgbank")
{
}
@@ -33,11 +35,6 @@ static ADDRESS_MAP_START( s11c_bg_map, AS_PROGRAM, 8, s11c_bg_device )
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bgbank")
ADDRESS_MAP_END
-WRITE8_MEMBER( s11c_bg_device::pia40_pa_w )
-{
- m_dac1->write_unsigned8(data);
-}
-
WRITE_LINE_MEMBER( s11c_bg_device::pia40_cb2_w)
{
// m_pia34->cb1_w(state); // To Widget MCB1 through CPU Data interface
@@ -69,19 +66,19 @@ MACHINE_CONFIG_FRAGMENT( s11c_bg )
MCFG_CPU_PROGRAM_MAP(s11c_bg_map)
MCFG_QUANTUM_TIME(attotime::from_hz(50))
- MCFG_SPEAKER_STANDARD_MONO("bg")
MCFG_YM2151_ADD("ym2151", 3580000)
MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11c_bg_device, ym2151_irq_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("hc55516_bg", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MCFG_DEVICE_ADD("pia40", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11c_bg_device, pia40_pa_w))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11c_bg_device, pia40_pb_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11c_bg_device, pia40_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11c_bg_device, pia40_cb2_w))
@@ -110,7 +107,7 @@ void s11c_bg_device::device_reset()
m_cpu->set_input_line(INPUT_LINE_RESET,PULSE_LINE);
}
-void s11c_bg_device::static_set_gfxregion(device_t &device, const char *tag)
+void s11c_bg_device::static_set_romregion(device_t &device, const char *tag)
{
s11c_bg_device &cpuboard = downcast<s11c_bg_device &>(device);
cpuboard.m_regiontag = tag;
diff --git a/src/mame/audio/s11c_bg.h b/src/mame/audio/s11c_bg.h
index 55d4b853f47..211a88c23e5 100644
--- a/src/mame/audio/s11c_bg.h
+++ b/src/mame/audio/s11c_bg.h
@@ -12,16 +12,16 @@
#include "emu.h"
#include "cpu/m6809/m6809.h"
#include "sound/ym2151.h"
-#include "sound/dac.h"
#include "sound/hc55516.h"
#include "machine/6821pia.h"
-#define MCFG_WMS_S11C_BG_ADD(_tag, _region) \
- MCFG_DEVICE_ADD(_tag, S11C_BG, 0) \
- s11c_bg_device::static_set_gfxregion(*device, _region);
+#define MCFG_S11C_BG_ROM_REGION(_region) \
+ s11c_bg_device::static_set_romregion(*device, _region);
-class s11c_bg_device : public device_t
+
+class s11c_bg_device : public device_t,
+ public device_mixer_interface
{
public:
// construction/destruction
@@ -30,12 +30,10 @@ public:
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
required_device<hc55516_device> m_hc55516;
- required_device<dac_device> m_dac1;
required_device<pia6821_device> m_pia40;
required_memory_bank m_cpubank;
memory_region* m_rom;
- DECLARE_WRITE8_MEMBER(pia40_pa_w);
DECLARE_WRITE8_MEMBER(pia40_pb_w);
DECLARE_WRITE_LINE_MEMBER(pia40_ca2_w);
DECLARE_WRITE_LINE_MEMBER(pia40_cb2_w);
@@ -46,7 +44,7 @@ public:
void ctrl_w(UINT8 data);
void data_w(UINT8 data);
- static void static_set_gfxregion(device_t &device, const char *tag);
+ static void static_set_romregion(device_t &device, const char *tag);
protected:
// overrides
@@ -56,7 +54,6 @@ protected:
private:
const char* m_regiontag;
-
};
extern const device_type S11C_BG;
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 60cdcc7a93a..05680d2adb8 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -17,6 +17,7 @@
#include "sound/samples.h"
#include "sound/tms36xx.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
/*************************************
@@ -245,7 +246,7 @@ MACHINE_CONFIG_FRAGMENT( astrob_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(11)
MCFG_SAMPLES_NAMES(astrob_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -437,10 +438,10 @@ MACHINE_CONFIG_FRAGMENT( 005_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(7)
MCFG_SAMPLES_NAMES(sega005_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("005", SEGA005, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -595,7 +596,7 @@ MACHINE_CONFIG_FRAGMENT( spaceod_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(11)
MCFG_SAMPLES_NAMES(spaceod_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -690,7 +691,7 @@ static ADDRESS_MAP_START( monsterb_7751_portmap, AS_IO, 8, segag80r_state )
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(n7751_t1_r)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(n7751_command_r)
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(n7751_rom_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(n7751_p2_w)
AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("audio_8243", i8243_device, i8243_prog_w)
ADDRESS_MAP_END
@@ -721,15 +722,16 @@ MACHINE_CONFIG_FRAGMENT( monsterb_sound_board )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(2)
MCFG_SAMPLES_NAMES(monsterb_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_TMS36XX_ADD("music", 247)
MCFG_TMS36XX_TYPE(TMS3617)
MCFG_TMS36XX_DECAY_TIMES(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/segasnd.cpp b/src/mame/audio/segasnd.cpp
index abc5df498d4..2fca18abd9b 100644
--- a/src/mame/audio/segasnd.cpp
+++ b/src/mame/audio/segasnd.cpp
@@ -228,7 +228,7 @@ MACHINE_CONFIG_FRAGMENT( sega_speech_board )
MCFG_SOUND_ADD("segaspeech", SEGASPEECH, 0)
MCFG_SOUND_ADD("speech", SP0250, SPEECH_MASTER_CLOCK)
MCFG_SP0250_DRQ_CALLBACK(DEVWRITELINE("segaspeech", speech_sound_device, drq_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/segasnd.h b/src/mame/audio/segasnd.h
index 8436d8427e7..be4386d2ac7 100644
--- a/src/mame/audio/segasnd.h
+++ b/src/mame/audio/segasnd.h
@@ -188,8 +188,8 @@ extern const device_type SEGAUSBROM;
#define MCFG_SEGAUSB_ADD(_tag) \
MCFG_SOUND_ADD(_tag, SEGAUSB, 0) \
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
#define MCFG_SEGAUSBROM_ADD(_tag) \
MCFG_SOUND_ADD(_tag, SEGAUSBROM, 0) \
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
diff --git a/src/mame/audio/senjyo.cpp b/src/mame/audio/senjyo.cpp
index 1b0c938a295..3367a8b3b6e 100644
--- a/src/mame/audio/senjyo.cpp
+++ b/src/mame/audio/senjyo.cpp
@@ -23,7 +23,7 @@ WRITE_LINE_MEMBER(senjyo_state::sound_line_clock)
{
if (state != 0)
{
- m_dac->write_signed16(2184 * 2 * ((m_sound_state & 8) ? m_single_volume : 0));
+ m_dac->write((m_sound_state & 8) ? m_single_volume : 0);
m_sound_state++;
}
}
diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp
index 9e846d04904..7f9cd3767e9 100644
--- a/src/mame/audio/spacefb.cpp
+++ b/src/mame/audio/spacefb.cpp
@@ -7,10 +7,11 @@
****************************************************************************/
#include "emu.h"
+#include "includes/spacefb.h"
#include "cpu/mcs48/mcs48.h"
#include "sound/dac.h"
#include "sound/samples.h"
-#include "includes/spacefb.h"
+#include "sound/volt_reg.h"
READ8_MEMBER(spacefb_state::audio_p2_r)
@@ -75,13 +76,13 @@ static const char *const spacefb_sample_names[] =
MACHINE_CONFIG_FRAGMENT( spacefb_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(3)
MCFG_SAMPLES_NAMES(spacefb_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp
index 440678e1113..8c3fed212f0 100644
--- a/src/mame/audio/targ.cpp
+++ b/src/mame/audio/targ.cpp
@@ -15,6 +15,7 @@
#include "emu.h"
#include "includes/exidy.h"
+#include "sound/volt_reg.h"
@@ -56,8 +57,8 @@ void exidy_state::adjust_sample(UINT8 freq)
WRITE8_MEMBER( exidy_state::targ_audio_1_w )
{
/* CPU music */
- if ((data & 0x01) != (m_port_1_last & 0x01))
- m_dac->write_unsigned8((data & 0x01) * 0xff);
+ if (BIT(m_port_1_last ^ data, 0))
+ m_dac->write(BIT(data, 0));
/* shot */
if (FALLING_EDGE(0x02) && !m_samples->playing(0)) m_samples->start(0,1);
@@ -175,29 +176,31 @@ SAMPLES_START_CB_MEMBER(exidy_state::targ_audio_start)
MACHINE_CONFIG_FRAGMENT( spectar_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(4)
MCFG_SAMPLES_NAMES(sample_names)
MCFG_SAMPLES_START_CB(exidy_state, spectar_audio_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
MACHINE_CONFIG_FRAGMENT( targ_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(4)
MCFG_SAMPLES_NAMES(sample_names)
MCFG_SAMPLES_START_CB(exidy_state, targ_audio_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index 78172f3251d..f5a5aca24a2 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -31,13 +31,14 @@
****************************************************************************/
#include "emu.h"
+#include "williams.h"
#include "machine/6821pia.h"
#include "cpu/m6809/m6809.h"
-#include "williams.h"
#include "sound/ym2151.h"
#include "sound/okim6295.h"
#include "sound/hc55516.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define NARC_MASTER_CLOCK XTAL_8MHz
@@ -211,7 +212,7 @@ static MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound )
MCFG_CPU_PROGRAM_MAP(williams_cvsd_map)
MCFG_DEVICE_ADD("pia", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(williams_cvsd_sound_device, talkback_w))
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_cvsd_sound_device, pia_irqa))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_cvsd_sound_device, pia_irqb))
@@ -220,8 +221,9 @@ static MACHINE_CONFIG_FRAGMENT( williams_cvsd_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_cvsd_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("cvsd", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60)
@@ -513,7 +515,7 @@ static ADDRESS_MAP_START( williams_narc_master_map, AS_PROGRAM, 8, williams_narc
AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(master_talkback_w)
AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_WRITE(command2_w)
- AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
+ AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command_r)
AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(master_bank_select_w)
AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(master_sync_w)
@@ -531,7 +533,7 @@ static ADDRESS_MAP_START( williams_narc_slave_map, AS_PROGRAM, 8, williams_narc_
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(cvsd_clock_set_w)
AM_RANGE(0x2400, 0x2400) AM_MIRROR(0x03ff) AM_WRITE(cvsd_digit_clock_clear_w)
AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_WRITE(slave_talkback_w)
- AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
+ AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_READ(command2_r)
AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x03ff) AM_WRITE(slave_bank_select_w)
AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x03ff) AM_WRITE(slave_sync_w)
@@ -555,11 +557,11 @@ static MACHINE_CONFIG_FRAGMENT( williams_narc_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_narc_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("cvsd", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60)
@@ -794,7 +796,7 @@ static ADDRESS_MAP_START( williams_adpcm_map, AS_PROGRAM, 8, williams_adpcm_soun
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(bank_select_w)
AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
- AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2c00, 0x2c00) AM_MIRROR(0x03ff) AM_DEVREADWRITE("oki", okim6295_device, read, write)
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_READ(command_r)
AM_RANGE(0x3400, 0x3400) AM_MIRROR(0x03ff) AM_WRITE(oki6295_bank_select_w)
@@ -826,12 +828,13 @@ static MACHINE_CONFIG_FRAGMENT( williams_adpcm_sound )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(williams_adpcm_sound_device, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.10)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_DEVICE_ADDRESS_MAP(AS_0, williams_adpcm_oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/williams.h b/src/mame/audio/williams.h
index f7217f60bdb..aa0e8019b0a 100644
--- a/src/mame/audio/williams.h
+++ b/src/mame/audio/williams.h
@@ -14,7 +14,6 @@
#include "sound/ym2151.h"
#include "sound/okim6295.h"
#include "sound/hc55516.h"
-#include "sound/dac.h"
@@ -29,18 +28,6 @@ extern const device_type WILLIAMS_ADPCM_SOUND;
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_WILLIAMS_NARC_SOUND_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, WILLIAMS_NARC_SOUND, 0)
-#define MCFG_WILLIAMS_CVSD_SOUND_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, WILLIAMS_CVSD_SOUND, 0)
-#define MCFG_WILLIAMS_ADPCM_SOUND_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, WILLIAMS_ADPCM_SOUND, 0)
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/mame/audio/wpcsnd.cpp b/src/mame/audio/wpcsnd.cpp
index 66f4208e9d6..bdd5613b707 100644
--- a/src/mame/audio/wpcsnd.cpp
+++ b/src/mame/audio/wpcsnd.cpp
@@ -8,21 +8,23 @@
*/
#include "wpcsnd.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define LOG_WPCSND (0)
const device_type WPCSND = &device_creator<wpcsnd_device>;
wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig,WPCSND,"Williams WPC Sound",tag,owner,clock, "wpcsnd", __FILE__)
- , m_cpu(*this, "bgcpu")
- , m_ym2151(*this, "ym2151")
- , m_hc55516(*this, "hc55516")
- , m_dac(*this, "dac")
- , m_cpubank(*this, "rombank")
- , m_fixedbank(*this, "fixed")
- , m_rom(*this, finder_base::DUMMY_TAG)
- , m_reply_cb(*this)
+ : device_t(mconfig,WPCSND,"Williams WPC Sound",tag,owner,clock, "wpcsnd", __FILE__),
+ device_mixer_interface(mconfig, *this),
+ m_cpu(*this, "bgcpu"),
+ m_ym2151(*this, "ym2151"),
+ m_hc55516(*this, "hc55516"),
+ m_cpubank(*this, "rombank"),
+ m_fixedbank(*this, "fixed"),
+ m_rom(*this, finder_base::DUMMY_TAG),
+ m_reply_cb(*this)
{
}
@@ -30,7 +32,7 @@ static ADDRESS_MAP_START( wpcsnd_map, AS_PROGRAM, 8, wpcsnd_device )
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x03ff) AM_WRITE(rombank_w)
AM_RANGE(0x2400, 0x2401) AM_MIRROR(0x03fe) AM_DEVREADWRITE("ym2151", ym2151_device, read, write)
- AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x03ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2c00, 0x2fff) AM_WRITE(bg_speech_digit_w)
AM_RANGE(0x3000, 0x33ff) AM_READ(latch_r)
AM_RANGE(0x3400, 0x37ff) AM_WRITE(bg_speech_clock_w)
@@ -68,16 +70,16 @@ MACHINE_CONFIG_FRAGMENT( wpcsnd )
MCFG_CPU_PROGRAM_MAP(wpcsnd_map)
MCFG_QUANTUM_TIME(attotime::from_hz(50))
- MCFG_SPEAKER_STANDARD_MONO("bg")
MCFG_YM2151_ADD("ym2151", 3580000)
MCFG_YM2151_IRQ_HANDLER(WRITELINE(wpcsnd_device, ym2151_irq_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
machine_config_constructor wpcsnd_device::device_mconfig_additions() const
@@ -105,7 +107,7 @@ void wpcsnd_device::device_reset()
m_reply_available = false;
}
-void wpcsnd_device::static_set_gfxregion(device_t &device, const char *tag)
+void wpcsnd_device::static_set_romregion(device_t &device, const char *tag)
{
wpcsnd_device &cpuboard = downcast<wpcsnd_device &>(device);
cpuboard.m_rom.set_tag(tag);
diff --git a/src/mame/audio/wpcsnd.h b/src/mame/audio/wpcsnd.h
index 54a9cd3df0b..badaaef58e7 100644
--- a/src/mame/audio/wpcsnd.h
+++ b/src/mame/audio/wpcsnd.h
@@ -13,16 +13,17 @@
#include "cpu/m6809/m6809.h"
#include "sound/ym2151.h"
#include "sound/hc55516.h"
-#include "sound/dac.h"
-#define MCFG_WMS_WPC_SOUND_ADD(_tag, _region) \
- MCFG_DEVICE_ADD(_tag, WPCSND, 0) \
- wpcsnd_device::static_set_gfxregion(*device, _region);
+
+#define MCFG_WPC_ROM_REGION(_region) \
+ wpcsnd_device::static_set_romregion(*device, _region);
#define MCFG_WPC_SOUND_REPLY_CALLBACK(_reply) \
downcast<wpcsnd_device *>(device)->set_reply_callback(DEVCB_##_reply);
-class wpcsnd_device : public device_t
+
+class wpcsnd_device : public device_t,
+ public device_mixer_interface
{
public:
// construction/destruction
@@ -31,7 +32,6 @@ public:
required_device<cpu_device> m_cpu;
required_device<ym2151_device> m_ym2151;
required_device<hc55516_device> m_hc55516;
- required_device<dac_device> m_dac;
required_memory_bank m_cpubank;
required_memory_bank m_fixedbank;
required_memory_region m_rom;
@@ -49,7 +49,7 @@ public:
UINT8 ctrl_r();
UINT8 data_r();
- static void static_set_gfxregion(device_t &device, const char *tag);
+ static void static_set_romregion(device_t &device, const char *tag);
// callbacks
template<class _reply> void set_reply_callback(_reply reply) { m_reply_cb.set_callback(reply); }
@@ -67,7 +67,6 @@ private:
// callback
devcb_write_line m_reply_cb;
-
};
extern const device_type WPCSND;
diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp
index 9c7b8065d42..afb065e6968 100644
--- a/src/mame/audio/zaccaria.cpp
+++ b/src/mame/audio/zaccaria.cpp
@@ -2,11 +2,11 @@
// copyright-holders:Vas Crabb
#include "emu.h"
#include "audio/zaccaria.h"
-
#include "cpu/m6800/m6800.h"
#include "machine/clock.h"
#include "machine/rescap.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
//**************************************************************************
@@ -128,7 +128,7 @@ static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_d
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM
AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write)
- AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408
+ AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w)
AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r)
AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low
@@ -200,8 +200,9 @@ MACHINE_CONFIG_DERIVED(zac1b11142_config, zac1b111xx_base_config)
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w))
- MCFG_DAC_ADD("dac_1f")
- MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0)
+ MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.40, 0) // mc1408.1f
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF)
// 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz
diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h
index ec717f04db3..5cab5da41c8 100644
--- a/src/mame/audio/zaccaria.h
+++ b/src/mame/audio/zaccaria.h
@@ -25,12 +25,6 @@ extern device_type const ZACCARIA_1B11142;
// DEVICE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_ZACCARIA_1B11107(_tag) \
- MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11107, 0)
-
-#define MCFG_ZACCARIA_1B11142(_tag) \
- MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0)
-
#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \
devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb);
diff --git a/src/mame/audio/zaxxon.cpp b/src/mame/audio/zaxxon.cpp
index 720c510b50d..9fc5387f639 100644
--- a/src/mame/audio/zaxxon.cpp
+++ b/src/mame/audio/zaxxon.cpp
@@ -96,7 +96,7 @@ MACHINE_CONFIG_FRAGMENT( zaxxon_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(12)
MCFG_SAMPLES_NAMES(zaxxon_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -196,7 +196,7 @@ MACHINE_CONFIG_FRAGMENT( congo_samples )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(5)
MCFG_SAMPLES_NAMES(congo_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp
index 2bc2375d6f3..59705e05803 100644
--- a/src/mame/drivers/20pacgal.cpp
+++ b/src/mame/drivers/20pacgal.cpp
@@ -84,11 +84,12 @@ Graphics: CY37256P160-83AC x 2 (Ultra37000 CPLD family - 160 pin TQFP, 256 Macro
***************************************************************************/
#include "emu.h"
+#include "includes/20pacgal.h"
#include "cpu/z180/z180.h"
#include "machine/eepromser.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
-#include "includes/20pacgal.h"
+#include "sound/volt_reg.h"
/*************************************
@@ -244,7 +245,7 @@ READ8_MEMBER( _25pacman_state::_25pacman_io_87_r )
AM_RANGE(0x87, 0x87) AM_READ( _25pacman_io_87_r ) // not eeprom on this
AM_RANGE(0x87, 0x87) AM_WRITENOP
// AM_RANGE(0x88, 0x88) AM_WRITE(ram_bank_select_w)
- AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8a, 0x8a) AM_WRITEONLY AM_SHARE("stars_ctrl") /* stars: bits 3-4 = active set; bit 5 = enable */
AM_RANGE(0x8b, 0x8b) AM_WRITEONLY AM_SHARE("flip")
AM_RANGE(0x8c, 0x8c) AM_WRITENOP
@@ -265,7 +266,7 @@ static ADDRESS_MAP_START( 20pacgal_io_map, AS_IO, 8, _20pacgal_state )
AM_RANGE(0x85, 0x86) AM_WRITEONLY AM_SHARE("stars_seed") /* stars: rng seed (lo/hi) */
AM_RANGE(0x87, 0x87) AM_READ_PORT("EEPROMIN") AM_WRITE_PORT("EEPROMOUT")
AM_RANGE(0x88, 0x88) AM_WRITE(ram_bank_select_w)
- AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x89, 0x89) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8a, 0x8a) AM_WRITEONLY AM_SHARE("stars_ctrl") /* stars: bits 3-4 = active set; bit 5 = enable */
AM_RANGE(0x8b, 0x8b) AM_WRITEONLY AM_SHARE("flip")
AM_RANGE(0x8f, 0x8f) AM_WRITE(_20pacgal_coin_counter_w)
@@ -402,14 +403,15 @@ static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state )
MCFG_FRAGMENT_ADD(20pacgal_video)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("namco", NAMCO_CUS30, NAMCO_AUDIO_CLOCK)
MCFG_NAMCO_AUDIO_VOICES(3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/4004clk.cpp b/src/mame/drivers/4004clk.cpp
index 224102e80ef..3408f0eb25e 100644
--- a/src/mame/drivers/4004clk.cpp
+++ b/src/mame/drivers/4004clk.cpp
@@ -11,6 +11,7 @@
#include "emu.h"
#include "cpu/i4004/i4004.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "4004clk.lh"
class nixieclock_state : public driver_device
@@ -19,17 +20,14 @@ public:
nixieclock_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
m_input(*this, "INPUT")
{ }
required_device<i4004_cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
required_ioport m_input;
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( nixie_w );
DECLARE_WRITE8_MEMBER( neon_w );
- DECLARE_WRITE8_MEMBER( relays_w );
UINT16 m_nixie[16];
UINT8 m_timer;
virtual void machine_start() override;
@@ -88,11 +86,6 @@ WRITE8_MEMBER(nixieclock_state::neon_w)
output_set_neon_value(3,BIT(data,0));
}
-WRITE8_MEMBER(nixieclock_state::relays_w)
-{
- m_dac->write_unsigned8((data & 1) ? 0x80 : 0x40); //tick - tock
-}
-
static ADDRESS_MAP_START(4004clk_rom, AS_PROGRAM, 8, nixieclock_state)
AM_RANGE(0x0000, 0x0FFF) AM_ROM
ADDRESS_MAP_END
@@ -107,7 +100,7 @@ static ADDRESS_MAP_START( 4004clk_io, AS_IO, 8, nixieclock_state)
AM_RANGE(0x00, 0x0e) AM_WRITE(nixie_w)
AM_RANGE(0x00, 0x00) AM_READ(data_r)
AM_RANGE(0x0f, 0x0f) AM_WRITE(neon_w)
- AM_RANGE(0x10, 0x10) AM_WRITE(relays_w)
+ AM_RANGE(0x10, 0x10) AM_DEVWRITE("dac", dac_bit_interface, write)
ADDRESS_MAP_END
/* Input ports */
@@ -159,9 +152,10 @@ static MACHINE_CONFIG_START( 4004clk, nixieclock_state )
MCFG_DEFAULT_LAYOUT(layout_4004clk)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_TIMER_DRIVER_ADD_PERIODIC("4004clk_timer", nixieclock_state, timer_callback, attotime::from_hz(120))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/40love.cpp b/src/mame/drivers/40love.cpp
index d209e7c3c44..a8ef7726dde 100644
--- a/src/mame/drivers/40love.cpp
+++ b/src/mame/drivers/40love.cpp
@@ -222,11 +222,12 @@ Notes - Has jumper setting for 122HZ or 61HZ)
*/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/40love.h"
#include "cpu/m6805/m6805.h"
+#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/40love.h"
+#include "sound/volt_reg.h"
void fortyl_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
@@ -750,7 +751,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, fortyl_state )
AM_RANGE(0xd800, 0xd800) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_WRITE(to_main_w)
AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read */
AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w)
- AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_device, write_signed8) /* signed 8-bit DAC - unknown read */
+ AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_byte_interface, write) /* signed 8-bit DAC - unknown read */
AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostics ROM */
ADDRESS_MAP_END
@@ -1067,31 +1068,32 @@ static MACHINE_CONFIG_START( 40love, fortyl_state )
MCFG_PALETTE_INIT_OWNER(fortyl_state, fortyl)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( undoukai, fortyl_state )
@@ -1126,31 +1128,32 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state )
MCFG_PALETTE_INIT_OWNER(fortyl_state, fortyl)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(fortyl_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(fortyl_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*******************************************************************************/
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index 1cdd0ba5419..2883da6c1a3 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -2833,7 +2833,7 @@ DRIVER_INIT_MEMBER(_8080bw_state,vortex)
{
UINT8 *rom = memregion("maincpu")->base();
int length = memregion("maincpu")->bytes();
- dynamic_buffer buf1(length);
+ std::vector<UINT8> buf1(length);
UINT32 x;
for (x = 0; x < length; x++)
{
@@ -3247,7 +3247,7 @@ DRIVER_INIT_MEMBER(_8080bw_state,attackfc)
{
UINT8 *rom = memregion("maincpu")->base();
UINT32 len = memregion("maincpu")->bytes();
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
// swap a8/a9
for (int i = 0; i < len; i++)
diff --git a/src/mame/drivers/a310.cpp b/src/mame/drivers/a310.cpp
index 4b5f27395c1..dcc55ab7b9c 100644
--- a/src/mame/drivers/a310.cpp
+++ b/src/mame/drivers/a310.cpp
@@ -70,13 +70,12 @@
#include "emu.h"
#include "cpu/arm/arm.h"
-#include "sound/dac.h"
#include "includes/archimds.h"
+#include "formats/acorn_dsk.h"
#include "machine/i2cmem.h"
-//#include "machine/aakart.h"
#include "machine/ram.h"
#include "machine/wd_fdc.h"
-#include "formats/acorn_dsk.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
class a310_state : public archimedes_state
@@ -151,11 +150,6 @@ DRIVER_INIT_MEMBER(a310_state,a310)
void a310_state::machine_start()
{
archimedes_init();
-
-
-
- // reset the DAC to centerline
- //m_dac->write_signed8(0x80);
}
void a310_state::machine_reset()
@@ -175,8 +169,8 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(a310_state::key_stroke)
{
- UINT8 row_val = (UINT8)(FPTR)(param) >> 4;
- UINT8 col_val = (UINT8)(FPTR)(param) & 0xf;
+ UINT8 row_val = (UINT8)(uintptr_t)(param) >> 4;
+ UINT8 col_val = (UINT8)(uintptr_t)(param) & 0xf;
if(newval && !oldval)
m_kart->send_keycode_down(row_val,col_val);
@@ -397,30 +391,24 @@ static MACHINE_CONFIG_START( a310, a310_state )
MCFG_SOFTWARE_LIST_ADD("flop_list", "archimedes")
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac0", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac3", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac4", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac5", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac6", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_SOUND_ADD("dac7", DAC, 0)
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START(a310)
diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp
index 5537cb21126..31d0836c357 100644
--- a/src/mame/drivers/abc80.cpp
+++ b/src/mame/drivers/abc80.cpp
@@ -490,7 +490,7 @@ QUICKLOAD_LOAD_MEMBER( abc80_state, bac )
offs_t address = space.read_byte(BOFA + 1) << 8 | space.read_byte(BOFA);
if (LOG) logerror("BOFA %04x\n",address);
- dynamic_buffer data;
+ std::vector<UINT8> data;
data.resize(quickload_size);
image.fread(&data[0], quickload_size);
for (int i = 1; i < quickload_size; i++)
diff --git a/src/mame/drivers/aceex.cpp b/src/mame/drivers/aceex.cpp
new file mode 100644
index 00000000000..aa0864d74f6
--- /dev/null
+++ b/src/mame/drivers/aceex.cpp
@@ -0,0 +1,94 @@
+// license:BSD-3-Clause
+// copyright-holders:Joakim Larsson Edstrom
+/*
+
+ This is a driver for the Aceex DM2814 28.8kbps modem containing the following chips
+
+ U1-U3 JRC 4558D Dual op amps
+ U4 SN74LS374N
+ U5 SN74LS04N
+ U7 Rockwell RC288DPi integrated modem chip marked Mexico (40.320MHz TXC crystal Y1 nearby)
+ U8 HD74LS153P
+ U9 SN75C189N
+ U10,U12 SN75C188N
+ U11 HD74LS244P
+ U13 SN74LS374N
+ U14 Winbond W78C31B which is a 8031 derivate (45.342720MHz TXC crystal Y2 nearby)
+ U15 SN74LS138N (inside the socket of U14)
+ U16 Macronix MX27C512 64KB EPROM
+ U17 HD74LS32P (inside the socket of U16)
+ U18 LM386N
+ U19 CSI CAT93C46P 1KB eeproom
+ U20 Winbond W24257 32KB static RAM
+ U21 SN74LS373N
+ LED1-11 Front leds
+ SP1 Speaker
+ SW1 On/Off switch
+
+ +------------------------------------------------------+
+ | |
+ | U1 U2 U3 PHONE
+ | U4 U5 |
+ |LED1 LINE
+ |LED2 = R
+ |LED3 U7 U8 U9 U10 D S
+ |LED4 Y1 U11 SP1 2 2
+ |LED5 U13 U12 5 3
+ |LED6 = 2
+ |LED7 U14 U16 U18 |
+ |LED8 PWR
+ |LED9-11 U20 U21 SW1
+ +------------------------------------------------------+
+
+ The U16 EPROM contains the following string
+
+ COPYWRITE BY TSAI CHIH-HWA
+
+*/
+
+#include "emu.h"
+#include "cpu/mcs51/mcs51.h"
+
+class aceex2814_state : public driver_device
+{
+public:
+ aceex2814_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ ,m_maincpu(*this, "maincpu")
+ { }
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ required_device<cpu_device> m_maincpu;
+};
+
+static ADDRESS_MAP_START( aceex2814_map, AS_PROGRAM, 8, aceex2814_state )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ADDRESS_MAP_END
+
+static INPUT_PORTS_START( aceex2814 )
+INPUT_PORTS_END
+
+void aceex2814_state::machine_start()
+{
+}
+
+void aceex2814_state::machine_reset()
+{
+}
+
+#define Y1_CLOCK 40320000
+#define Y2_CLOCK 45342720
+static MACHINE_CONFIG_START( aceex2814, aceex2814_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", I80C31, Y2_CLOCK)
+ MCFG_CPU_PROGRAM_MAP(aceex2814_map)
+MACHINE_CONFIG_END
+
+ROM_START( aceex2814 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "dm2814u16-194.bin", 0x00000, 0x10000, CRC(36dc423d) SHA1(0f350b7c533eb5270a72587ab3e050e5fe453006) )
+ROM_END
+
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+COMP( 1995, aceex2814, 0, 0, aceex2814, aceex2814, driver_device, 0, "Aceex Corporation", "Aceex 2814", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp
index 82d32c65e85..a9b01d35d77 100644
--- a/src/mame/drivers/acefruit.cpp
+++ b/src/mame/drivers/acefruit.cpp
@@ -202,7 +202,7 @@ UINT32 acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_ind1
CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
@@ -218,7 +218,7 @@ CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r)
CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
@@ -238,7 +238,7 @@ CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r)
CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_payout_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
diff --git a/src/mame/drivers/advision.cpp b/src/mame/drivers/advision.cpp
index e303e3db28b..ea26784aec5 100644
--- a/src/mame/drivers/advision.cpp
+++ b/src/mame/drivers/advision.cpp
@@ -22,7 +22,7 @@
#include "includes/advision.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/cop400/cop400.h"
-#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
/* Memory Maps */
@@ -85,10 +85,10 @@ static MACHINE_CONFIG_START( advision, advision_state )
MCFG_PALETTE_INIT_OWNER(advision_state, advision)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "advision_cart")
diff --git a/src/mame/drivers/alg.cpp b/src/mame/drivers/alg.cpp
index 84db75d0179..7f39462df83 100644
--- a/src/mame/drivers/alg.cpp
+++ b/src/mame/drivers/alg.cpp
@@ -698,7 +698,7 @@ DRIVER_INIT_MEMBER(alg_state,palr1)
UINT32 length = memregion("user2")->bytes();
UINT8 *rom = memregion("user2")->base();
- dynamic_buffer original(length);
+ std::vector<UINT8> original(length);
UINT32 srcaddr;
memcpy(&original[0], rom, length);
@@ -717,7 +717,7 @@ DRIVER_INIT_MEMBER(alg_state,palr3)
UINT32 length = memregion("user2")->bytes();
UINT8 *rom = memregion("user2")->base();
- dynamic_buffer original(length);
+ std::vector<UINT8> original(length);
UINT32 srcaddr;
memcpy(&original[0], rom, length);
@@ -735,7 +735,7 @@ DRIVER_INIT_MEMBER(alg_state,palr6)
UINT32 length = memregion("user2")->bytes();
UINT8 *rom = memregion("user2")->base();
- dynamic_buffer original(length);
+ std::vector<UINT8> original(length);
UINT32 srcaddr;
memcpy(&original[0], rom, length);
diff --git a/src/mame/drivers/alpha68k.cpp b/src/mame/drivers/alpha68k.cpp
index 59676926d2f..d3b882f8394 100644
--- a/src/mame/drivers/alpha68k.cpp
+++ b/src/mame/drivers/alpha68k.cpp
@@ -185,15 +185,16 @@ DIP locations verified from manuals for:
***************************************************************************/
#include "emu.h"
+#include "includes/alpha68k.h"
#include "cpu/m68000/m68000.h"
-#include "cpu/z80/z80.h"
#include "cpu/mcs48/mcs48.h"
+#include "cpu/z80/z80.h"
+#include "sound/2203intf.h"
+#include "sound/3812intf.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "sound/3812intf.h"
+#include "sound/volt_reg.h"
#include "sound/ym2413.h"
-#include "sound/2203intf.h"
-#include "includes/alpha68k.h"
@@ -737,7 +738,7 @@ static ADDRESS_MAP_START( kyros_sound_map, AS_PROGRAM, 8, alpha68k_state )
AM_RANGE(0xc000, 0xc7ff) AM_RAM
AM_RANGE(0xe000, 0xe000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xe002, 0xe002) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
- AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe006, 0xe00e) AM_WRITENOP // soundboard I/O's, ignored
/* reference only
AM_RANGE(0xe006, 0xe006) AM_WRITENOP // NMI: diminishing saw-tooth
@@ -753,7 +754,7 @@ static ADDRESS_MAP_START( sstingry_sound_map, AS_PROGRAM, 8, alpha68k_state )
AM_RANGE(0x8000, 0x87ff) AM_RAM
AM_RANGE(0xc100, 0xc100) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0xc102, 0xc102) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
- AM_RANGE(0xc104, 0xc104) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0xc104, 0xc104) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xc106, 0xc10e) AM_WRITENOP // soundboard I/O's, ignored
ADDRESS_MAP_END
@@ -781,7 +782,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, alpha68k_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("soundlatch", generic_latch_8_device, read, clear_w)
- AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x08, 0x08) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x0a, 0x0b) AM_DEVWRITE("ym2", ym2413_device, write)
AM_RANGE(0x0c, 0x0d) AM_DEVWRITE("ym1", ym2203_device, write)
AM_RANGE(0x0e, 0x0e) AM_WRITE(sound_bank_w)
@@ -1952,21 +1953,22 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym2", YM2203, 3000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym3", YM2203, 3000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( kyros, alpha68k_state )
@@ -2003,21 +2005,22 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym2", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_SOUND_ADD("ym3", YM2203, XTAL_24MHz/12) /* Verified on bootleg PCB */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( jongbou, alpha68k_state )
@@ -2053,13 +2056,13 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,kyros)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
@@ -2092,13 +2095,13 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,paddlem)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
INTERRUPT_GEN_MEMBER(alpha68k_state::alpha68k_sound_nmi)
@@ -2139,20 +2142,21 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( btlfieldb, alpha68k_II )
@@ -2194,20 +2198,21 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
@@ -2242,20 +2247,21 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
@@ -2290,20 +2296,21 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state )
MCFG_VIDEO_START_OVERRIDE(alpha68k_state,alpha68k)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ym1", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(alpha68k_state, porta_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.65)
MCFG_SOUND_ADD("ym2", YM2413, 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
@@ -2337,13 +2344,13 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state )
MCFG_PALETTE_INIT_OWNER(alpha68k_state,paddlem)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/amaticmg.cpp b/src/mame/drivers/amaticmg.cpp
index c7e380db196..4fb5c60b078 100644
--- a/src/mame/drivers/amaticmg.cpp
+++ b/src/mame/drivers/amaticmg.cpp
@@ -421,7 +421,7 @@
#include "video/mc6845.h"
#include "machine/i8255.h"
#include "sound/3812intf.h"
-#include "sound/dac.h"
+//#include "sound/dac.h"
#include "suprstar.lh"
@@ -627,7 +627,7 @@ WRITE8_MEMBER(amaticmg_state::out_c_w)
WRITE8_MEMBER( amaticmg_state::unk80_w )
{
-// m_dac->write_unsigned8(data & 0x01); /* Sound DAC */
+// m_dac->write(BIT(data, 0)); /* Sound DAC */
}
@@ -656,8 +656,8 @@ static ADDRESS_MAP_START( amaticmg_portmap, AS_IO, 8, amaticmg_state )
AM_RANGE(0x80, 0x80) AM_WRITE(unk80_w)
AM_RANGE(0xc0, 0xc0) AM_WRITE(rombank_w)
// AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("ppi8255_2", ppi8255_device, read, write)
-// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac1", dac_device, write_signed8)
-// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac2", dac_device, write_signed8)
+// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac1", dac_byte_interface, write)
+// AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac2", dac_byte_interface, write)
ADDRESS_MAP_END
@@ -858,14 +858,10 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state )
MCFG_PALETTE_INIT_OWNER(amaticmg_state, amaticmg)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD("ymsnd", YM3812, SND_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
-// MCFG_DAC_ADD("dac") /* Y3014B */
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("ymsnd", YM3812, SND_CLOCK) /* Y3014B DAC */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index 4b561e6eab2..308071d5dc4 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -907,7 +907,7 @@ CUSTOM_INPUT_MEMBER( cd32_state::cd32_input )
CUSTOM_INPUT_MEMBER( cd32_state::cd32_sel_mirror_input )
{
- UINT8 bits = m_player_ports[(int)(FPTR)param]->read();
+ UINT8 bits = m_player_ports[(int)(uintptr_t)param]->read();
return (bits & 0x20)>>5;
}
diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp
index a300b1cc485..0eb226243de 100644
--- a/src/mame/drivers/amusco.cpp
+++ b/src/mame/drivers/amusco.cpp
@@ -7,12 +7,6 @@
Preliminary driver by Roberto Fresca.
- TODO:
- - i8259 and irqs
- - understand how videoram works (tied to port $70?)
- - inputs
- - everything else;
-
*******************************************************************************
Hardware Notes:
@@ -48,7 +42,8 @@
The program code reads from and writes to what must be a line printer and a RTC
(probably a MSM5832), though neither is present on the main board. The I/O write
patterns also suggest that each or both of these devices are accessed through an
- unknown interface chip or gate array (not i8255-compatible).
+ unknown interface chip or gate array (not i8255-compatible). The printer appears to
+ use non-Epson control codes: ETB, DLE, DC4, DC2, SO, EM, DC1 and STX.
*****************************************************************************************
@@ -67,8 +62,11 @@
TODO:
- Proper tile colors.
- - Hook PPI8255 devices.
- - I/O.
+ - Determine PIT clocks for proper IRQ timing.
+ - Make the 6845 transparent videoram addressing actually transparent.
+ (IRQ1 changes the 6845 address twice but neither reads nor writes data?)
+ - Add NVRAM in a way that won't trigger POST error message (needs NMI on shutdown?)
+ - Identify outputs from first PPI (these include button lamps?)
*******************************************************************************/
@@ -100,13 +98,18 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_pic(*this, "pic8259"),
m_rtc(*this, "rtc"),
- m_crtc(*this, "crtc")
+ m_crtc(*this, "crtc"),
+ m_screen(*this, "screen")
{ }
required_shared_ptr<UINT8> m_videoram;
tilemap_t *m_bg_tilemap;
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void video_start() override;
+ virtual void machine_start() override;
+ DECLARE_READ8_MEMBER(hack_coin1_r);
+ DECLARE_READ8_MEMBER(hack_coin2_r);
+ DECLARE_READ8_MEMBER(hack_908_r);
DECLARE_READ8_MEMBER(mc6845_r);
DECLARE_WRITE8_MEMBER(mc6845_w);
DECLARE_WRITE8_MEMBER(output_a_w);
@@ -118,15 +121,17 @@ public:
DECLARE_READ8_MEMBER(rtc_r);
DECLARE_WRITE8_MEMBER(rtc_w);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
+ MC6845_UPDATE_ROW(update_row);
- UINT32 screen_update_amusco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<pic8259_device> m_pic;
required_device<msm5832_device> m_rtc;
required_device<mc6845_device> m_crtc;
+ required_device<screen_device> m_screen;
UINT8 m_mc6845_address;
UINT16 m_video_update_address;
+ UINT8 m_rtc_data;
};
@@ -143,11 +148,16 @@ TILE_GET_INFO_MEMBER(amusco_state::get_bg_tile_info)
---- ---- seems unused.
*/
int code = m_videoram[tile_index * 2] | (m_videoram[tile_index * 2 + 1] << 8);
+ int color = (code & 0x7000) >> 12;
+
+ // 6845 cursor is only used for its blink state
+ if (BIT(code, 15) && !m_crtc->cursor_state_r())
+ code = 0;
SET_TILE_INFO_MEMBER(
0 /* bank */,
code & 0x3ff,
- 0 /* color */,
+ color,
0
);
}
@@ -157,10 +167,9 @@ void amusco_state::video_start()
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(amusco_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 10, 74, 24);
}
-UINT32 amusco_state::screen_update_amusco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+void amusco_state::machine_start()
{
- m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
- return 0;
+ m_rtc_data = 0;
}
@@ -168,12 +177,32 @@ UINT32 amusco_state::screen_update_amusco(screen_device &screen, bitmap_ind16 &b
* Read / Write Handlers *
**************************/
+READ8_MEMBER(amusco_state::hack_coin1_r)
+{
+ // actually set by IRQ4
+ return BIT(ioport("IN2")->read(), 1) ? 1 : 0;
+}
+
+READ8_MEMBER(amusco_state::hack_coin2_r)
+{
+ // actually set by IRQ4
+ return BIT(ioport("IN2")->read(), 2) ? 1 : 0;
+}
+
+READ8_MEMBER(amusco_state::hack_908_r)
+{
+ // IRQ4 and other routines wait for bits of this to be set by IRQ2
+ return 0xff;
+}
/*************************
* Memory Map Information *
*************************/
static ADDRESS_MAP_START( amusco_mem_map, AS_PROGRAM, 8, amusco_state )
+ AM_RANGE(0x006a6, 0x006a6) AM_READ(hack_coin1_r)
+ AM_RANGE(0x006a8, 0x006a8) AM_READ(hack_coin2_r)
+ AM_RANGE(0x00908, 0x00908) AM_READ(hack_908_r)
AM_RANGE(0x00000, 0x0ffff) AM_RAM
AM_RANGE(0xec000, 0xecfff) AM_RAM AM_SHARE("videoram") // placeholder
AM_RANGE(0xf8000, 0xfffff) AM_ROM
@@ -228,8 +257,19 @@ WRITE8_MEMBER(amusco_state::vram_w)
READ8_MEMBER(amusco_state::lpt_r)
{
- logerror("Reading from printer port 28%dh\n", offset);
- return 0;
+ switch (offset)
+ {
+ case 2:
+ // Bit 0 = busy
+ // Bit 1 = paper jam (inverted)
+ // Bit 3 = out of paper
+ // Bit 4 = low paper
+ return 2;
+
+ default:
+ logerror("Reading from printer port 28%dh\n", offset);
+ return 0;
+ }
}
WRITE8_MEMBER(amusco_state::lpt_w)
@@ -257,12 +297,15 @@ WRITE8_MEMBER(amusco_state::rtc_w)
case 1:
m_rtc->address_w(data & 0x0f);
m_rtc->cs_w(BIT(data, 6));
+ m_rtc->hold_w(BIT(data, 6));
m_rtc->write_w(BIT(data, 5));
+ if (BIT(data, 5))
+ m_rtc->data_w(space, 0, m_rtc_data);
m_rtc->read_w(BIT(data, 4));
break;
case 3:
- m_rtc->data_w(space, 0, data);
+ m_rtc_data = data;
break;
default:
@@ -301,34 +344,29 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( amusco )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CODE(KEYCODE_4)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play Credit")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) // actual name uncertain; next screen in service mode
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // decrement in service mode
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Draw") // previous screen in service mode
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) // actual name uncertain; increment in service mode
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // move left in service mode
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // move right in service mode
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("Cash Door")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_CODE(KEYCODE_W)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Logic Door")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // move down in service mode
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // move up in service mode
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5")
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7")
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) //PORT_WRITE_LINE_DEVICE_MEMBER("pic8259", pic8259_device, ir4_w)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) //PORT_WRITE_LINE_DEVICE_MEMBER("pic8259", pic8259_device, ir4_w)
+ PORT_BIT( 0xf9, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@@ -353,7 +391,7 @@ static const gfx_layout charlayout =
******************************/
static GFXDECODE_START( amusco )
- GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 )
+ GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, /*8*/ 1 ) // current palette has only 8 colors...
GFXDECODE_END
@@ -366,6 +404,13 @@ MC6845_ON_UPDATE_ADDR_CHANGED(amusco_state::crtc_addr)
// m_video_update_address = address;
}
+MC6845_UPDATE_ROW(amusco_state::update_row)
+{
+ const rectangle rowrect(0, 8 * x_count - 1, y, y);
+ m_bg_tilemap->mark_all_dirty();
+ m_bg_tilemap->draw(*m_screen, bitmap, rowrect, 0, 0);
+}
+
/*************************
* Machine Drivers *
*************************/
@@ -381,6 +426,10 @@ static MACHINE_CONFIG_START( amusco, amusco_state )
MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NOOP)
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
+ //MCFG_PIT8253_CLK0(nnn)
+ //MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
+ //MCFG_PIT8253_CLK1(nnn)
+ //MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir2_w))
MCFG_DEVICE_ADD("ppi_outputs", I8255, 0)
MCFG_I8255_OUT_PORTA_CB(WRITE8(amusco_state, output_a_w))
@@ -400,10 +449,10 @@ static MACHINE_CONFIG_START( amusco, amusco_state )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(88*8, 27*10) // screen size: 88*8 27*10
MCFG_SCREEN_VISIBLE_AREA(0*8, 74*8-1, 0*10, 24*10-1) // visible scr: 74*8 24*10
- MCFG_SCREEN_UPDATE_DRIVER(amusco_state, screen_update_amusco)
+ MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", amusco)
+
MCFG_PALETTE_ADD_3BIT_GBR("palette")
MCFG_MC6845_ADD("crtc", R6545_1, "screen", CRTC_CLOCK) /* guess */
@@ -412,6 +461,7 @@ static MACHINE_CONFIG_START( amusco, amusco_state )
MCFG_MC6845_ADDR_CHANGED_CB(amusco_state, crtc_addr)
MCFG_MC6845_OUT_DE_CB(DEVWRITELINE("pic8259", pic8259_device, ir1_w)) // IRQ1 sets 0x918 bit 3
MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("pic8259", pic8259_device, ir0_w)) // IRQ0 sets 0x665 to 0xff
+ MCFG_MC6845_UPDATE_ROW_CB(amusco_state, update_row)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -449,4 +499,4 @@ ROM_END
*************************/
/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1987, amusco, 0, amusco, amusco, driver_device, 0, ROT0, "Amusco", "American Music Poker (V1.4)", MACHINE_NOT_WORKING )
+GAME( 1987, amusco, 0, amusco, amusco, driver_device, 0, ROT0, "Amusco", "American Music Poker (V1.4)", MACHINE_IMPERFECT_COLORS | MACHINE_NODEVICE_PRINTER ) // runs much too fast; palette totally wrong
diff --git a/src/mame/drivers/anzterm.cpp b/src/mame/drivers/anzterm.cpp
new file mode 100644
index 00000000000..bb948672784
--- /dev/null
+++ b/src/mame/drivers/anzterm.cpp
@@ -0,0 +1,480 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+/**************************************************************************
+
+ Burroughs EF315-I220 bank teller terminal
+
+ These 8-bit terminals were used by banks before they were displaced
+ by cheap PCs. There's an external customer PIN pad with its own
+ ROMs, and a keyboard for the teller. Unfortunately the teller
+ keyboard was missing from the unit that was dumped. These terminals
+ contain a hardware DES chip which was a controlled item due to trade
+ restrictions on encryption technology.
+
+ The main system consists of three large boards in a stack: D8302
+ (I/O board), A8301 (memory board), and C8209 (CPU board).
+
+ The MICR/OCR unit appears to be an off-the-shelf unit built by
+ Recognition Equipment and has a single board mounted in the top
+ case. Its main CPU is a MOSTEK MK3870/42 which has an undumped
+ 4032-byte internal mask ROM.
+
+ Onboard peripherals:
+ - Small "green-screen" CRT display mounted on an adjustable "stalk"
+ - Thermal printer
+ - Card swipe
+ - MICR/OCR for reading cheque numbers (swiped the same way as cards)
+
+ Rear panel connectors:
+ - J1 (25-pin D-sub male)
+ - J2 (25-pin D-sub male)
+ - J3 (7-pin MIL-C-5015 connector)
+ - J4 (5-pin 180-degree DIN female)
+ - J5 (25-pin D-sub male)
+ - J6 (15-pin D-sub female)
+
+ TODO:
+ - Check designation of MICR board.
+ - Does U2 on the MICR board exist? I can't find it on the overlay.
+ - Finish parts list and ASCII art for CPU board.
+ - Do IC50 and IC56 on the I/O board exist? I can't find them on the overlay.
+ - Work out how clocks are derived.
+ - Hook everything up.
+ - Emulate DES engine.
+ - Photograph the guts of the PIN pad and check ROM labels.
+ - Find way to dump MK3870/42 in MICR reader.
+
+****************************************************************************/
+
+/*
+
+(Despite my ASCII art, the main boards are actually all the same size.)
+
+C8209 CPU Board
+==================
+
+Components:
+ IC1 - SN75189N
+ IC3 - unpopulated (16-pin DIP)
+ IC7 - SN75174NG
+ IC8 - SN75175N
+ IC9 - MC6850P
+ IC12 - SN75189N
+ IC13 - SN75188N
+ IC14, IC15 - unpopulated (16-pin DIP)
+ IC16 - MC6854P
+ IC17 - MC6850P
+ IC18 - HD46850P
+ IC19 - MC6854P
+ IC20 - unpopulated (24-pin DIP)
+ IC21 - SN74LS74AN
+ IC22 - SN74LS51N
+ IC23 - SN75189N
+ IC24 - unpopulated (16-pin DIP)
+ IC25 - SN74LS08N
+ IC26 - SN74LS00N
+ IC27 - DM74LS04N
+ IC28 - SN74LS367AN
+ IC29 - SN74LS161AN
+ IC30, IC31, IC32 - SN74LS367AN
+ IC33 - SN74LS74AN
+ IC34 - SN74LS393N
+ IC36 - SN74LS367AN
+ IC37 - SN74LS20N
+ IC38 - SN74LS74AN
+ IC39 - P8214
+ IC42 - SN74LS245N
+ IC45 - SN74LS10N
+ IC46 - SN74LS86N
+ IC48 - 74LS05N
+ IC50 - WD200IAH-20
+ IC51 - DM74LS04N
+ IC52 - CD4093BE
+ IC53 - SN74LS393N
+ IC54 - SN74LS74AN
+ IC55 - SN74LS00AN
+ IC56 - SN74LS367AN
+ IC57 - SN74LS132AN
+ IC58 - SN74LS32N
+ IC60 - unpopulated (16-pin DIP)
+ J7 - System bus (50-pin DIL IDC)
+ J8 - Power (24-pin SIL)
+
+
+A8301 Memory Board
+==================
+
++------------------------------+------------J1------------+---+ +---+
+| +--------------------------+ +---------J2---------+ |
+| [=IC9==] [=IC19=] +--------------------+ |
+| |
+| +--J-IC8---+ +--A-IC18--+ [=IC25=] [=IC29=] [=IC34=] [=RP12=] |
+| +----------+ +----------+ Q5 Q6 Q7 |
+| +--IC23---+ |
+| +--K-IC7---+ +--B-IC17--+ +---------+ [=IC28==] [=IC42==] |
+| +----------+ +----------+ [=IC55=] [=IC66=] |
+| [=IC22=] [=RP10=] [=IC33=] [=RP11=] |
+| +--L-IC6---+ +--C-IC16--+ [=IC54=] [=IC65=] |
+| +----------+ +----------+ |
+| [=HP3==] [=IC27=] [=IC41=] [=IC53=] [=RP14=] |
+| +--M-IC5---+ +--D-IC15--+ |
+| +----------+ +----------+ [=HP2==] [=IC52=] [=IC64=] |
+| [=IC40=] |
+| +--N-IC4--+ +--E-IC14-+ +---HP1---+ [=IC26=] [=IC51=] [=IC63=] |
+| +---------+ +---------+ +---------+ [=IC39==] [=IC50=] [=IC62=] |
+| +-----+ [=IC49=] [=IC61=] |
+| +--P-IC3--+ +--F-IC13-+ | | [=IC21=] [=IC32=] [=IC38=] |
+| +---------+ +---------+ | B1 | [=IC48=] [=IC60=] |
+| | B2 | [=IC31=] [=IC37=] [=IC47=] [=IC59=] |
+| +--Q-IC2--+ +--G-IC12-+ | B3 | Q4 [=IC46=] [=IC58=] |
+| +---------+ +---------+ | B4 | Q2 [=IC30=] [=IC36=] [=IC45=] [=IC57=] |
+| | B5 | Q3 |
+| +--R-IC1--+ +--H-IC11-+ | | Q1 [=IC35=] [=IC44=] [=IC56=] |
+| +---------+ +---------+ +-----+ |
+| [=RP2=] [=IC10=] [=IC43=] |
++--------------------------------------------------------------------------------------+
+
+Components:
+ B1, B2, B3, B4, B5 - space provided for various NiCd batteries - B4 is populated (3.6V 100mAh)
+ HP1 - 24-pin DIP wired links - 1/2/16/22/24 3/4/5 6 7/8/9/10 11/12 13/14 15/17/18 19/20 21 23
+ HP2 - 16-pin DIP wired links - 1/2/3/16 4/6/7/8/14 5/9/10/12 11/13/15
+ HP3 - 16-pin DIP wired links - 1/4 2 3 5/12 6/11 7/10 8/9 13 14 15 16
+ IC1, IC2 - HM6116LP-3
+ IC3, IC4 - unpopulated (24-pin DIP socket)
+ IC5, IC6, IC7, IC8 - HN482764G
+ IC9 - HM6147LP-3 (18-pin DIP in 20-pin socket; overlay says "CMOS PARITY 1")
+ IC10 - DM74LS156N
+ IC11, IC12 - unpopulated (24-pin DIP socket)
+ IC13, IC14 - TMS2516JL-45
+ IC15 - unpopulated (28-pin DIP socket)
+ IC16, IC17, IC18 - HN482764G
+ IC19 - unpopulated (20-pin DIP socket; overlay says "CMOS PARITY 2")
+ IC20 - location for 14-pin DIP integrated transistor pack replacing Q1/Q2/Q3/Q4
+ IC21 - SN74LS03N
+ IC22 - DM74LS156N
+ IC23 - TBP28S166N
+ IC24 - location for 16-pin DIP under IC23 (for smaller address decoding ROM/PLD?)
+ IC25 - SN74LS367AN
+ IC26 - DM74LS156N
+ IC27 - SN74LS157N
+ IC28 - SN74LS273N
+ IC29 - SN74LS367AN
+ IC30 - SN74LS139N
+ IC31 - SN74LS32N
+ IC32 - SN74LS20N
+ IC33 - SN74LS280N
+ IC34 - SN74LS367AN
+ IC35 - SN74LS32N
+ IC36 - SN74LS13N
+ IC37 - SN74LS163AN
+ IC38 - SN74S74N
+ IC39 - BELFUSE 8331 0447-0439-99 (DRAM timing device?)
+ IC40 - SN74LS132N
+ IC41 - SN74S02N
+ IC42 - SN74LS245N
+ IC43 - SN74S08N
+ IC44 - IC52 - HM4864P-2 (DRAM BANK 1 BIT 0 - 8 and PARITY, respectively)
+ IC53, IC54 - SN74LS158N
+ IC55 - SN74LS393N
+ IC56 - IC64 - HM4864P-2 (DRAM BANK 2 BIT 0 - 8 and PARITY, respectively)
+ IC65, IC66 - SN74LS158N
+ J1 - System bus (50-pin DIL IDC)
+ J2 - Power (24-pin SIL)
+
+
+D8302 I/O Board
+==================
+
++----------------------------+--------------J5--------------+----+ +----+
+| +------------------------------+ +-----------J7-----------+ |
+| J4 | +------------------------+ |
+| | |
+| J1 | | [=IC18=] [=RP2=] |
+| | [==IC26=] |
+| J3 | +---IC25---+ |
+| [=IC7=] | [=IC17=] +----------+ [=IC45=] |
+| [=IC44=] |
+| +---IC6---+ +---IC16--+ |
+| +---------+ +---------+ [==IC34=] [=IC43=] |
+| |
+| [==IC5==] +-------IC15-------+ ++
+| +------------------+ [=IC33=] [=IC42=] Q12 [=IC51=] Q13 ||
+| [==IC4==] ||
+| [=IC11=] [=IC24=] [=IC41=] ||
+| [==IC3==] [==IC32=] ||
+| [=IC10=] [=IC14=] [=IC23=] [=IC40=] [=IC62=] [=IC61=] J9 ||
+| [==IC2==] [==IC31=] ||
+| +-------IC39-------+ [=IC55=] ||
+| [==IC1==] [=IC22=] [==IC30=] +------------------+ ||
+| ++ [=IC29=] [==IC38=] [=IC49=] ++
+| J2 [=IC54=] [=IC60=] |
+| || [=IC21=] IC28 +---IC37--+ |
+| ++ +---------+ [=IC48=] [=IC53=] [=IC59=] |
+| J6 [=IC27=] [=IC36=] [=IC63=] [=IC47=] [=IC58=] |
+| [=IC9==] | [=IC13=] [=IC20=]+-X1-+ |
+| [=IC8==] | [=IC12=] [=IC19=]+----+ [J10] [=IC35=] [=IC46=] [=IC52=] [=IC57=] |
++----------------------------------------------------------------------------------------------+
+
+Components:
+ IC1, IC2 - SN74LS273N
+ IC3, IC4 - SN74LS245N
+ IC5 - SN74LS273N
+ IC6 - D2716D
+ IC7 - DM7404N
+ IC8 - SN74LS04N
+ IC9 - SN74LS74AN
+ IC10 - SN74LS157N
+ IC11 - SN74LS166AN
+ IC12 - SN74LS21N
+ IC13 - SN74LS93N
+ IC14 - SN74LS157N
+ IC15 - HD46505SP-1 HD68A45SP
+ IC16 - HD46850P HD6850P
+ IC17 - MC1488 75188N
+ IC18 - SN74LS86N
+ IC19 - SN74LS08N
+ IC20 - SN74LS93N
+ IC21 - SN74LS132N
+ IC22 - SN74LS08N
+ IC23 - MC1489A SN75189AN
+ IC24 - SN74LS157N
+ IC25 - D8251AC
+ IC26 - SN74LS245N
+ IC27 - SN7406N
+ IC28 - NE555P
+ IC29 - DM74LS00N
+ IC30, IC31, IC32 - MCM2114P20
+ IC33 - SN74LS157N
+ IC34 - SN74LS273N
+ IC35 - SN74LS27N
+ IC36 - 74LS168
+ IC37 - D2716D
+ IC38 - SN74LS273N
+ IC39 - HD46821P HD6821P
+ IC40 - SN74LS74AN
+ IC41, IC42, IC43 - 74LS32
+ IC44 - SN74LS04N
+ IC45 - SN74LS367AN
+ IC47 - SN74LS10N
+ IC48 - SN74LS74AN
+ IC49 - 74LS03
+ IC51 - 74LS138N
+ IC52 - 74LS02
+ IC53 - 74LS00N
+ IC54 - SN74121N
+ IC55 - SN74LS09N
+ IC57, IC58 - SN74LS74AN
+ IC59 - SN74LS14N
+ IC60 - 74LS132N
+ IC61 - SN74LS09N
+ IC62 - SN74LS08N
+ IC63 - 74LS03
+ J1 - Card Swipe (6-pin SIL)
+ J2 - MICR Reader Board (10-pin DIL IDC)
+ J3 - not populated (6-pin SIL)
+ J4 - CRT (8-pin SIL)
+ J5 - System bus (50-pin DIL IDC)
+ J6 - External connector on left side of case (6-pin SIL)
+ J7 - Power (24-pin SIL)
+ J9 - Printer (30-pin double-sided female edge connector)
+ J10 - Possibly service mode - case contains a loose connector for shorting two pins (6-pin SIL)
+ X1 - CK1100AC 15974.40KHz (oscillator module)
+
+
+MICR Board
+==================
+
++-------------------------------------------------------------+
+| +---K1---+ |
+| +---U15----+ +--------+ |
+| Q5 [=U23=] +----------+ [=U1==] |
+| Q6 |
+| +---U16----+ Q8 |
+| Q7 [=U24=] +----------+ Q10 Q3 |
+| |
+| +---U17----+ +---U11---+ +---U7----+ |
+| [=U25=] +----------+ +---------+ +---------+ U4 |
+| |
+| ++ [=U26=] +---U18----+ |
+| || +----------+ [=U12=] +-----U5------+ |
+| || JP5 +-------------+ U3 |
+| || [=U27=] +---U19----+ ++ |
+| || +----------+ U6 |
+| || +---U8----+ ++ |
+| ++ [=U28=] +---U20----+ +---------+ |
+| Q9 [=JP==] +----------+ ++ |
+| || |
+| +---U29---+ +----+ Q2 Q1 || |
+| +---------+ +U13 | U10 || |
+| Q4 +----+ || |
+| [=U31=] [=U21=] || |
+| +-----U14-----+ [=U9==] ++ |
+| [=U30=] [=U22=] +-------------+ |
++-------------------------------------------------------------+
+
+Components:
+ JP - Jumpers JP1, JP2, JP3, JP4
+ K1 - SPDT Relay
+ U1 - TL497ACN
+ U3, U4 - DS0026CN
+ U5 - CF11000A
+ U6 - CXO-043D 36.0000MHz 4E (oscillator module)
+ U7 - AMI 8336CK 5020056 CO4423
+ U8 - 5020884-002 853C
+ U9 - SN7414N
+ U10 - ICL8211CPA
+ U11 - ET2732Q-3
+ U12 - SN74LS00N
+ U13 - MB63303A
+ U14 - MK3870/42
+ U15 - AM2716DC (24-pin DIP in 28-pin socket)
+ U16 - ET2732Q-3 (24-pin DIP in 28-pin socket)
+ U17, U18, U19 - unpopulated (28-pin DIP socket)
+ U20 - ET2732Q-3 (24-pin DIP in 28-pin socket)
+ U21 - SN74LS26N
+ U22 - SN74LS245N
+ U23 - SN7406N
+ U24 - unpopulated (14-pin DIP socket)
+ U25 - SN74LS08N
+ U26, U27 - SN75189AN
+ U28 - SN74LS367AN
+ U29 - TMS2732AJL-45
+ U30 - unpopulated (20-pin SDIP socket)
+ U31 - SN74LS374N
+
+*/
+
+#include "emu.h"
+
+#include "cpu/m6809/m6809.h"
+#include "machine/6850acia.h"
+#include "machine/i8214.h"
+#include "machine/mc6854.h"
+
+
+namespace {
+
+class anzterm_state : public driver_device
+{
+public:
+ anzterm_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ {
+ }
+
+ UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+ {
+ return 0;
+ }
+};
+
+
+gfx_layout const screenfont =
+{
+ 8, 16, // 8x8
+ RGN_FRAC(1, 1), // whole region
+ 1, // 1bpp
+ { 0 }, // bitplane offset
+ { 0*1, 1*1, 2*1, 3*1, 4*1, 5*1, 6*1, 7*1 }, // x offsets
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
+ 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, // y offsets
+ 128 // stride
+};
+
+gfx_layout const printfont =
+{
+ 8, 8, // 7x8
+ RGN_FRAC(1, 1), // whole region
+ 1, // 1bpp
+ { 0 }, // bitplane offset
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, // x offsets
+ { 7*1, 6*1, 5*1, 4*1, 3*1, 2*1, 1*1, 0*1 }, // y offsets
+ 64 // stride
+};
+
+GFXDECODE_START( anzterm )
+ GFXDECODE_ENTRY("crtc", 0x0000, screenfont, 0, 1)
+ GFXDECODE_ENTRY("prnt", 0x0000, printfont, 0, 1)
+GFXDECODE_END
+
+
+ADDRESS_MAP_START( anzterm, AS_PROGRAM, 8, driver_device )
+ // There are two battery-backed 2kB SRAM chips with a 4kb SRAM chip for parity
+ // There are two 64kB DRAM banks (with parity)
+ // There's also a whole lot of ROM
+ AM_RANGE(0x0000, 0x3fff) AM_RAM
+ AM_RANGE(0xe000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+
+MACHINE_CONFIG_START( anzterm, anzterm_state )
+ MCFG_CPU_ADD("maincpu", M6809, 15974400/4)
+ MCFG_CPU_PROGRAM_MAP(anzterm)
+
+ MCFG_DEVICE_ADD("pic.ic39", I8214, 0)
+ MCFG_DEVICE_ADD("adlc.ic16", MC6854, 0)
+ MCFG_DEVICE_ADD("adlc.1c19", MC6854, 0)
+ MCFG_DEVICE_ADD("acia.ic17", ACIA6850, 0)
+ MCFG_DEVICE_ADD("acia.ic18", ACIA6850, 0)
+
+ MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green)
+ MCFG_SCREEN_UPDATE_DRIVER(anzterm_state, screen_update)
+ MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_RAW_PARAMS(15974400/4, 1024, 0, 104*8, 260, 0, 24*10) // this is totally wrong, it just stops a validation error
+
+ MCFG_PALETTE_ADD_MONOCHROME("palette")
+
+ MCFG_GFXDECODE_ADD("gfxdecode", "palette", anzterm)
+MACHINE_CONFIG_END
+
+
+INPUT_PORTS_START( anzterm )
+INPUT_PORTS_END
+
+} // anonymous namespace
+
+
+ROM_START( anzterm )
+ // Main program on memory board - loading is definitely wrong
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "fj-a-25.ic18", 0xe000, 0x2000, CRC(8c31a9dd) SHA1(864babf6c77813f17ce9082013098e8a677b0af6) )
+ ROM_LOAD( "fj-b-25.ic17", 0x2000, 0x2000, CRC(a893aeaf) SHA1(64e8a935fe37195533a0a19f00bdc4e6a2007728) )
+ ROM_LOAD( "fj-c-25.ic16", 0x4000, 0x2000, CRC(ae678bde) SHA1(b41da540b99a0c3ef9489d9cd25e5fa32e2d13f9) )
+ ROM_LOAD( "fj-e-25.ic14", 0x6000, 0x0800, CRC(786beceb) SHA1(d20b870528d12f8457e3c746b539fcfc3ded3b0b) )
+ ROM_LOAD( "fj-f-25.ic13", 0x6800, 0x0800, CRC(2890d808) SHA1(6871f4c5fd1bc7e2d1db2e663ffb342988de94b7) )
+ ROM_LOAD( "fj-j-25.ic8", 0x8000, 0x2000, CRC(23fa4b36) SHA1(b3676579b2ea4efb0bf867557b53a6ccba7cc60f) )
+ ROM_LOAD( "fj-k-25.ic7", 0xa000, 0x2000, CRC(cbd17462) SHA1(7e7460f99e7dd5c9ae113f69b67e2b6079a57c6d) )
+ ROM_LOAD( "fj-l-25.ic6", 0xc000, 0x2000, CRC(8989c2ed) SHA1(912d8152f8f67a964dcd360151d8c8438a652d58) )
+ ROM_LOAD( "fj-m-25.ic5", 0x0000, 0x2000, CRC(82762fee) SHA1(234a438abab91936e7073bd7cc62414dfae10373) )
+
+ // BPROM on memory board - address decoding?
+ ROM_REGION( 0x0800, "prom", 0 )
+ ROM_LOAD( "08177-80002.ic23", 0x0000, 0x0800, CRC(3cec2386) SHA1(a1ae5e07756eac5abbb3e178e12b213770432b5f) )
+
+ // CRTC character ROM on I/O board
+ ROM_REGION( 0x0800, "crtc", 0 )
+ ROM_LOAD( "crt-5080-2.ic6", 0x0000, 0x0800, CRC(cdea8532) SHA1(683743e477518695c2a1d9510bee25b7ef3f909b) )
+
+ // Printer font ROM on I/O board
+ ROM_REGION( 0x0800, "prnt", 0 )
+ ROM_LOAD( "prt-04.ic37", 0x0000, 0x0800, CRC(68870564) SHA1(06819a633dc545f103e8b843a2f553ac46a16a05) )
+
+ // ROMs in PIN pad
+ ROM_REGION( 0x1000, "pinpad", 0 )
+ ROM_LOAD( "ck-a-pr01.ic4", 0x0000, 0x0800, CRC(d0981882) SHA1(b55fd313c9b3e00039501a53a53c820d98f2258a) )
+ ROM_LOAD( "ck-b-pr01.ic3", 0x0000, 0x0800, CRC(96c9d90d) SHA1(400980c7a2c5306be28b74284c626ef2ed24c1a5) )
+
+ // Undumped microcontroller ROM in MICR reader
+ ROM_REGION( 0x0fc0, "micrmcu", 0 )
+ ROM_LOAD( "mk3870.u14", 0x0000, 0x0fc0, NO_DUMP )
+
+ // MICR reader data table ROMS, no idea how this stuff is used but dumps should be preserved
+ ROM_REGION( 0x5000, "micrdata", 0 )
+ ROM_LOAD( "cdn1-ebb.u20", 0x0000, 0x1000, CRC(0f9a9db3) SHA1(aedfe3ba7afb1d0a827fec5418369fca9348940f) )
+ ROM_LOAD( "cdn2-ebb.u16", 0x1000, 0x1000, CRC(648fff69) SHA1(59653d34067d9a3061857507868fd2147dadf537) )
+ ROM_LOAD( "6047204005.u15", 0x2000, 0x0800, CRC(70bfac37) SHA1(84081249ead5b957d98b3bd06665ef52d0a0243c) )
+ ROM_LOAD( "6048225001.u29", 0x3000, 0x1000, CRC(59c73999) SHA1(7dd12b500e13b177d19a24d148310541f7e660b4) )
+ ROM_LOAD( "ebb-fea-v96-9-23-83-f43a.u11", 0x4000, 0x1000, CRC(0e572470) SHA1(966e5eeb0114589a7cab3c29a1db48cdd8634be5) )
+ROM_END
+
+COMP( 1986?, anzterm, 0, 0, anzterm, anzterm, driver_device, 0, "Burroughs", "EF315-I220 Teller Terminal (ANZ)", MACHINE_IS_SKELETON ) // year comes from sticker on bottom of case, it's more likely a 1983 revision
diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp
index 7076123f631..b19e032034c 100644
--- a/src/mame/drivers/apc.cpp
+++ b/src/mame/drivers/apc.cpp
@@ -500,7 +500,7 @@ INPUT_CHANGED_MEMBER(apc_state::key_stroke)
{
if(newval && !oldval)
{
- m_keyb.data = (UINT8)(FPTR)(param) & 0xff;
+ m_keyb.data = (UINT8)(uintptr_t)(param) & 0xff;
//m_keyb.status &= ~1;
machine().device<pic8259_device>("pic8259_master")->ir4_w(1);
}
diff --git a/src/mame/drivers/apple3.cpp b/src/mame/drivers/apple3.cpp
index d369a914217..68a43923597 100644
--- a/src/mame/drivers/apple3.cpp
+++ b/src/mame/drivers/apple3.cpp
@@ -17,9 +17,10 @@
***************************************************************************/
#include "emu.h"
-#include "bus/rs232/rs232.h"
#include "includes/apple3.h"
#include "includes/apple2.h"
+#include "bus/rs232/rs232.h"
+#include "sound/volt_reg.h"
#include "formats/ap2_dsk.h"
#include "bus/a2bus/a2cffa.h"
@@ -141,11 +142,13 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(apple3_state, apple3_via_1_irq_func))
/* sound */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("bell", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // 6522.b5(pb0-pb5) + 320k,160k,80k,40k,20k,10k
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "bell", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_TIMER_DRIVER_ADD_PERIODIC("c040", apple3_state, apple3_c040_tick, attotime::from_hz(2000))
/* internal ram */
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index 8b343a19f13..aca9a670e8d 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -4,7 +4,7 @@
Applix 1616 computer
- See for docs: http;//www.microbee-mspp.org.au
+ See for docs: http://psiphi.server101.com/applix/
First revealed to the world in December 1986 issue of Electronics Today
International (ETI) an Australian electronics magazine which is now defunct.
@@ -40,9 +40,10 @@
#include "cpu/mcs51/mcs51.h"
#include "video/mc6845.h"
#include "machine/6522via.h"
+#include "machine/wd_fdc.h"
#include "sound/dac.h"
#include "sound/wave.h"
-#include "machine/wd_fdc.h"
+#include "sound/volt_reg.h"
#include "formats/applix_dsk.h"
#include "imagedev/cassette.h"
#include "bus/centronics/ctronics.h"
@@ -63,8 +64,8 @@ public:
m_fdc(*this, "fdc"),
m_floppy0(*this, "fdc:0"),
m_floppy1(*this, "fdc:1"),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_cass(*this, "cassette"),
m_io_dsw(*this, "DSW"),
m_io_fdc(*this, "FDC"),
@@ -163,8 +164,8 @@ private:
required_device<wd1772_t> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
required_device<cassette_image_device> m_cass;
required_ioport m_io_dsw;
required_ioport m_io_fdc;
@@ -219,10 +220,10 @@ WRITE16_MEMBER( applix_state::dac_latch_w )
m_dac_latch = data;
if ((m_analog_latch & 0x70) == 0) // right
- m_dacr->write_unsigned8(m_dac_latch);
+ m_rdac->write(m_dac_latch);
else
if ((m_analog_latch & 0x70) == 0x10) // left
- m_dacl->write_unsigned8(m_dac_latch);
+ m_ldac->write(m_dac_latch);
}
//cent = odd, video = even
@@ -849,10 +850,12 @@ static MACHINE_CONFIG_START( applix, applix_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 2.0 )
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 2.0 )
+ MCFG_SOUND_ADD("ldac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23
+ MCFG_SOUND_ADD("rdac", DAC0800, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // 74ls374.u20 + dac0800.u21 + 4052.u23
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp
index 46966547f03..ef8adc53f24 100644
--- a/src/mame/drivers/aristmk5.cpp
+++ b/src/mame/drivers/aristmk5.cpp
@@ -170,12 +170,10 @@
#define MASTER_CLOCK XTAL_72MHz /* confirmed */
#include "emu.h"
+#include "includes/archimds.h"
#include "cpu/arm/arm.h"
#include "machine/watchdog.h"
-#include "sound/dac.h"
-#include "includes/archimds.h"
-//#include "machine/i2cmem.h"
-
+#include "sound/volt_reg.h"
class aristmk5_state : public archimedes_state
{
@@ -488,9 +486,6 @@ void aristmk5_state::machine_start()
{
archimedes_init();
- // reset the DAC to centerline
- //m_dac->write_signed8(0x80);
-
m_mk5_2KHz_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_2KHz_callback),this));
m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_VSYNC_callback),this));
}
@@ -550,30 +545,24 @@ static MACHINE_CONFIG_START( aristmk5, aristmk5_state )
MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac0")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac5")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac6")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac7")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( aristmk5_usa, aristmk5_state )
@@ -598,30 +587,24 @@ static MACHINE_CONFIG_START( aristmk5_usa, aristmk5_state )
MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac0")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac5")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac6")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
-
- MCFG_DAC_ADD("dac7")
- MCFG_SOUND_ROUTE(0, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
#define ARISTOCRAT_MK5_BIOS \
diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp
index eb3f12a14f5..de4b3bf0375 100644
--- a/src/mame/drivers/arkanoid.cpp
+++ b/src/mame/drivers/arkanoid.cpp
@@ -2048,7 +2048,7 @@ DRIVER_INIT_MEMBER(arkanoid_state,block2)
// the graphics on this bootleg have the data scrambled
int tile;
UINT8* srcgfx = memregion("gfx1")->base();
- dynamic_buffer buffer(0x18000);
+ std::vector<UINT8> buffer(0x18000);
for (tile = 0; tile < 0x3000; tile++)
{
diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp
index 0dbc5915b60..52eda2e7e2f 100644
--- a/src/mame/drivers/armedf.cpp
+++ b/src/mame/drivers/armedf.cpp
@@ -288,13 +288,13 @@ Notes:
***********************************************************************/
-
#include "emu.h"
+#include "includes/armedf.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/3812intf.h"
-#include "includes/armedf.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define LEGION_HACK 0
@@ -747,8 +747,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, armedf_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x0, 0x1) AM_DEVWRITE("ymsnd", ym3812_device, write)
- AM_RANGE(0x2, 0x2) AM_DEVWRITE("dac1", dac_device, write_signed8)
- AM_RANGE(0x3, 0x3) AM_DEVWRITE("dac2", dac_device, write_signed8)
+ AM_RANGE(0x2, 0x2) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x3, 0x3) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x4, 0x4) AM_READ(soundlatch_clear_r)
AM_RANGE(0x6, 0x6) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -1203,18 +1203,18 @@ static MACHINE_CONFIG_START( terraf, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( terrafjb, armedf_state )
@@ -1255,18 +1255,18 @@ static MACHINE_CONFIG_START( terrafjb, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( terrafb, terraf )
@@ -1309,18 +1309,18 @@ static MACHINE_CONFIG_START( kozure, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( armedf, armedf_state )
@@ -1357,18 +1357,18 @@ static MACHINE_CONFIG_START( armedf, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", 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_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( cclimbr2, armedf_state )
@@ -1407,18 +1407,18 @@ static MACHINE_CONFIG_START( cclimbr2, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( legion, armedf_state )
@@ -1457,18 +1457,18 @@ static MACHINE_CONFIG_START( legion, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( legionjb, armedf_state )
@@ -1506,18 +1506,18 @@ static MACHINE_CONFIG_START( legionjb, armedf_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
MACHINE_START_MEMBER(bigfghtr_state,bigfghtr)
@@ -1565,18 +1565,18 @@ static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*************************************
diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp
index 5195cc5d8ab..d54a3f723f6 100644
--- a/src/mame/drivers/arsystems.cpp
+++ b/src/mame/drivers/arsystems.cpp
@@ -154,7 +154,7 @@ WRITE8_MEMBER(arcadia_amiga_state::arcadia_cia_0_portb_w)
CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r)
{
- int coin = (FPTR)param;
+ int coin = (uintptr_t)param;
/* return coin counter values */
return m_coin_counter[coin] & 3;
@@ -163,7 +163,7 @@ CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r)
INPUT_CHANGED_MEMBER(arcadia_amiga_state::coin_changed_callback)
{
- int coin = (FPTR)param;
+ int coin = (uintptr_t)param;
/* check for a 0 -> 1 transition */
if (!oldval && newval && m_coin_counter[coin] < 3)
diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp
index 17af5d97240..cf0f2f30691 100644
--- a/src/mame/drivers/atari400.cpp
+++ b/src/mame/drivers/atari400.cpp
@@ -41,13 +41,14 @@
******************************************************************************/
#include "emu.h"
+#include "includes/atari400.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821pia.h"
#include "machine/ram.h"
+#include "machine/atarifdc.h"
#include "sound/dac.h"
#include "sound/pokey.h"
-#include "includes/atari400.h"
-#include "machine/atarifdc.h"
+#include "sound/volt_reg.h"
#include "bus/a800/a800_slot.h"
#include "bus/a800/a800_carts.h"
#include "bus/a800/a8sio.h"
@@ -300,7 +301,7 @@ protected:
//required_device<cpu_device> m_maincpu; // maincpu is already contained in atari_common_state
required_device<ram_device> m_ram;
required_device<pia6821_device> m_pia;
- optional_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac;
required_memory_region m_region_maincpu;
optional_memory_bank m_0000;
optional_memory_bank m_8000;
@@ -2044,10 +2045,7 @@ MACHINE_START_MEMBER( a400_state, a5200 )
WRITE8_MEMBER(a400_state::gtia_cb)
{
- if (data & 0x08)
- m_dac->write_unsigned8((UINT8)-120);
- else
- m_dac->write_unsigned8(+120);
+ m_dac->write(BIT(data, 3));
}
/**************************************************************
@@ -2104,7 +2102,7 @@ static MACHINE_CONFIG_START( atari_common_nodac, a400_state )
MCFG_A8SIO_SLOT_ADD("a8sio", "sio", nullptr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("pokey", POKEY, FREQ_17_EXACT)
MCFG_POKEY_POT0_R_CB(IOPORT("analog_0"))
MCFG_POKEY_POT1_R_CB(IOPORT("analog_1"))
@@ -2119,12 +2117,13 @@ static MACHINE_CONFIG_START( atari_common_nodac, a400_state )
MCFG_POKEY_KEYBOARD_CB(atari_common_state, a800_keyboard)
MCFG_POKEY_INTERRUPT_CB(atari_common_state, interrupt_cb)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( atari_common, atari_common_nodac )
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.03)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
@@ -2319,7 +2318,7 @@ static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac )
MCFG_POKEY_KEYBOARD_CB(atari_common_state, a5200_keypads)
MCFG_POKEY_INTERRUPT_CB(atari_common_state, interrupt_cb)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DEVICE_ADD("gtia", ATARI_GTIA, 0)
diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp
index 9807399b3b5..1d39882ea7a 100644
--- a/src/mame/drivers/atari_s1.cpp
+++ b/src/mame/drivers/atari_s1.cpp
@@ -47,6 +47,7 @@ ToDo:
#include "cpu/m6800/m6800.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "atari_s1.lh"
@@ -98,7 +99,7 @@ private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT8> m_p_ram;
- required_device<dac_device> m_dac;
+ required_device<dac_4bit_r2r_device> m_dac;
required_ioport_array<10> m_switch;
};
@@ -403,7 +404,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_s1_state::timer_s )
{
m_timer_s[2]++;
offs_t offs = (m_timer_s[2] & 31) | ((m_1080 & 15) << 5);
- m_dac->write_unsigned8(m_p_prom[offs]<< 4);
+ m_dac->write(m_p_prom[offs]);
}
else
m_timer_s[2] = 0;
@@ -425,6 +426,7 @@ void atari_s1_state::machine_reset()
{
m_p_prom = memregion("proms")->base();
m_vol = 0;
+ m_dac->set_output_gain(0, 0);
m_t_c = 0;
m_audiores = 0;
}
@@ -438,9 +440,11 @@ static MACHINE_CONFIG_START( atari_s1, atari_s1_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+
+ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* Video */
MCFG_DEFAULT_LAYOUT(layout_atari_s1)
diff --git a/src/mame/drivers/atari_s2.cpp b/src/mame/drivers/atari_s2.cpp
index 69f77261570..2727c0522be 100644
--- a/src/mame/drivers/atari_s2.cpp
+++ b/src/mame/drivers/atari_s2.cpp
@@ -25,6 +25,7 @@ ToDo:
#include "cpu/m6800/m6800.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "atari_s2.lh"
@@ -58,8 +59,8 @@ private:
UINT8 *m_p_prom;
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
- required_device<dac_device> m_dac1;
+ required_device<dac_4bit_binary_weighted_device> m_dac;
+ required_device<dac_3bit_binary_weighted_device> m_dac1;
};
@@ -391,7 +392,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_s2_state::timer_s )
m_timer_s[2]++;
offs_t offs = (m_timer_s[2] & 31) | ((m_sound0 & 15) << 5);
if (BIT(m_sound0, 6))
- m_dac->write_unsigned8(m_p_prom[offs]<< 4);
+ m_dac->write(m_p_prom[offs]);
// noise
if (BIT(m_sound0, 7))
{
@@ -399,7 +400,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( atari_s2_state::timer_s )
bool ab1 = !BIT(m_timer_s[3], 1);
m_timer_s[3] = (m_timer_s[3] << 1) | ab0;
m_timer_s[4] = (m_timer_s[4] << 1) | ab1;
- m_dac1->write_unsigned8((m_timer_s[4] & 7)<< 5);
+ m_dac1->write(m_timer_s[4] & 7);
}
else
{
@@ -419,7 +420,7 @@ WRITE8_MEMBER( atari_s2_state::sound0_w )
m_sound0 = data;
offs_t offs = (m_timer_s[2] & 31) | ((m_sound0 & 15) << 5);
if (BIT(m_sound0, 6))
- m_dac->write_unsigned8(m_p_prom[offs]<< 4);
+ m_dac->write(m_p_prom[offs]);
}
// d0-3 = volume
@@ -432,6 +433,7 @@ WRITE8_MEMBER( atari_s2_state::sound1_w )
if (data != m_vol)
{
+ // 4066 + r65-r68 (68k,33k,18k,8.2k)
m_vol = data;
float vol = m_vol/16.666+0.1;
m_dac->set_output_gain(0, vol);
@@ -451,6 +453,8 @@ void atari_s2_state::machine_reset()
{
m_p_prom = memregion("proms")->base();
m_vol = 0;
+ m_dac->set_output_gain(0,0);
+ m_dac1->set_output_gain(0,0);
m_sound0 = 0;
m_sound1 = 0;
}
@@ -465,11 +469,13 @@ static MACHINE_CONFIG_START( atari_s2, atari_s2_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+
+ MCFG_SOUND_ADD("dac", DAC_4BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // r23-r26 (68k,33k,18k,8.2k)
+ MCFG_SOUND_ADD("dac1", DAC_3BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // r18-r20 (100k,47k,100k)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
/* Video */
MCFG_DEFAULT_LAYOUT(layout_atari_s2)
diff --git a/src/mame/drivers/backfire.cpp b/src/mame/drivers/backfire.cpp
index 04714bcbaee..b63e0f1af08 100644
--- a/src/mame/drivers/backfire.cpp
+++ b/src/mame/drivers/backfire.cpp
@@ -678,7 +678,7 @@ void backfire_state::descramble_sound()
{
UINT8 *rom = memregion("ymz")->base();
int length = 0x200000; // only the first rom is swapped on backfire!
- dynamic_buffer buf1(length);
+ std::vector<UINT8> buf1(length);
UINT32 x;
for (x = 0; x < length; x++)
diff --git a/src/mame/drivers/balsente.cpp b/src/mame/drivers/balsente.cpp
index 3a2dc41fd2b..c9204564cd4 100644
--- a/src/mame/drivers/balsente.cpp
+++ b/src/mame/drivers/balsente.cpp
@@ -2204,7 +2204,7 @@ void balsente_state::expand_roms(UINT8 cd_rom_mask)
/* load EF from 0x2e000-0x30000 */
/* ROM region must be 0x40000 total */
- dynamic_buffer temp(0x20000);
+ std::vector<UINT8> temp(0x20000);
{
UINT8 *rom = memregion("maincpu")->base();
UINT32 len = memregion("maincpu")->bytes();
diff --git a/src/mame/drivers/barata.cpp b/src/mame/drivers/barata.cpp
index e4e2b974ca5..e4d6a2c2e1a 100644
--- a/src/mame/drivers/barata.cpp
+++ b/src/mame/drivers/barata.cpp
@@ -11,7 +11,7 @@
Manufactured by Matic: http://maticplay.com.br/
This driver still only emulates an early prototype of the game.
- Propper dumps of the actual released game is still lacking.
+ Proper dumps of the actual released game is still lacking.
Photos on the web make us believe that there are at least 2 official
releases of this game.
@@ -38,7 +38,6 @@
#include "emu.h"
#include "cpu/mcs51/mcs51.h"
-#include "sound/dac.h"
#include "barata.lh"
#include "rendlay.h"
@@ -47,8 +46,7 @@ class barata_state : public driver_device
public:
barata_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac") { }
+ m_maincpu(*this, "maincpu") { }
DECLARE_WRITE8_MEMBER(fpga_w);
DECLARE_WRITE8_MEMBER(port0_w);
DECLARE_WRITE8_MEMBER(port2_w);
@@ -56,7 +54,6 @@ public:
void fpga_send(unsigned char cmd);
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
private:
unsigned char row_selection;
};
@@ -313,9 +310,7 @@ static MACHINE_CONFIG_START( barata, barata_state )
MCFG_DEFAULT_LAYOUT( layout_barata )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
/* TODO: add sound samples */
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/barni.cpp b/src/mame/drivers/barni.cpp
index 6d6a8113215..ffd4cbeb15d 100644
--- a/src/mame/drivers/barni.cpp
+++ b/src/mame/drivers/barni.cpp
@@ -21,7 +21,6 @@ SOUND: basically the same as Bally's Squalk & Talk -61 board but missing AY891
#include "cpu/m6809/m6809.h"
#include "machine/6522via.h"
#include "machine/6821pia.h"
-#include "sound/dac.h"
#include "sound/tms5220.h"
class barni_state : public genpin_class
diff --git a/src/mame/drivers/beezer.cpp b/src/mame/drivers/beezer.cpp
index eaac517988c..ce5630be6e1 100644
--- a/src/mame/drivers/beezer.cpp
+++ b/src/mame/drivers/beezer.cpp
@@ -14,7 +14,6 @@
#include "emu.h"
#include "machine/6522via.h"
#include "cpu/m6809/m6809.h"
-#include "sound/dac.h"
#include "includes/beezer.h"
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, beezer_state )
@@ -108,12 +107,10 @@ static MACHINE_CONFIG_START( beezer, beezer_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- //MCFG_DAC_ADD("dac")
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SOUND_ADD("custom", BEEZER, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* via */
MCFG_DEVICE_ADD("via6522_0", VIA6522, 0)
diff --git a/src/mame/drivers/beta.cpp b/src/mame/drivers/beta.cpp
index f9b946f4cd0..b8a84700dc4 100644
--- a/src/mame/drivers/beta.cpp
+++ b/src/mame/drivers/beta.cpp
@@ -86,7 +86,7 @@ public:
UINT16 m_eprom_addr;
UINT8 m_eprom_data;
UINT8 m_old_data;
- dynamic_buffer m_eprom_rom;
+ std::vector<UINT8> m_eprom_rom;
/* display state */
UINT8 m_ls145_p;
diff --git a/src/mame/drivers/bfcobra.cpp b/src/mame/drivers/bfcobra.cpp
index 3523fa6e492..81ac7473a95 100644
--- a/src/mame/drivers/bfcobra.cpp
+++ b/src/mame/drivers/bfcobra.cpp
@@ -1569,7 +1569,7 @@ DRIVER_INIT_MEMBER(bfcobra_state,bfcobra)
UINT32 i;
UINT8 *rom;
- dynamic_buffer tmp(0x8000);
+ std::vector<UINT8> tmp(0x8000);
rom = memregion("audiocpu")->base() + 0x8000;
memcpy(&tmp[0], rom, 0x8000);
diff --git a/src/mame/drivers/binbug.cpp b/src/mame/drivers/binbug.cpp
index b0fb117513c..85062aeea0d 100644
--- a/src/mame/drivers/binbug.cpp
+++ b/src/mame/drivers/binbug.cpp
@@ -224,7 +224,7 @@ QUICKLOAD_LOAD_MEMBER( binbug_state, binbug )
int quick_addr = 0x440;
int exec_addr;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/bking.cpp b/src/mame/drivers/bking.cpp
index b85088542c8..b7034cff81b 100644
--- a/src/mame/drivers/bking.cpp
+++ b/src/mame/drivers/bking.cpp
@@ -18,12 +18,13 @@ DIP Locations verified for:
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/bking.h"
#include "cpu/m6805/m6805.h"
+#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/bking.h"
+#include "sound/volt_reg.h"
READ8_MEMBER(bking_state::bking_sndnmi_disable_r)
@@ -481,20 +482,21 @@ static MACHINE_CONFIG_START( bking, bking_state )
MCFG_PALETTE_INIT_OWNER(bking_state, bking)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_6MHz/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_6MHz/4)
- MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_device, write_signed8))
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(bking_state, port_b_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( bking3, bking )
diff --git a/src/mame/drivers/blitz68k.cpp b/src/mame/drivers/blitz68k.cpp
index ffa7d6215c8..5eb8b53fc29 100644
--- a/src/mame/drivers/blitz68k.cpp
+++ b/src/mame/drivers/blitz68k.cpp
@@ -47,7 +47,6 @@ To Do:
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "video/mc6845.h"
-#include "sound/dac.h"
#include "sound/saa1099.h"
#include "machine/nvram.h"
#include "video/ramdac.h"
@@ -1690,10 +1689,6 @@ static MACHINE_CONFIG_START( ilpag, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
/*
@@ -1767,10 +1762,6 @@ static MACHINE_CONFIG_START( cjffruit, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -1803,10 +1794,6 @@ static MACHINE_CONFIG_START( bankrob, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -1837,10 +1824,6 @@ static MACHINE_CONFIG_START( bankroba, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k_addr_factor1)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -1870,10 +1853,6 @@ static MACHINE_CONFIG_START( deucesw2, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -1905,10 +1884,6 @@ static MACHINE_CONFIG_START( dualgame, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
@@ -1938,10 +1913,6 @@ static MACHINE_CONFIG_START( hermit, blitz68k_state )
MCFG_VIDEO_START_OVERRIDE(blitz68k_state,blitz68k)
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/blktiger.cpp b/src/mame/drivers/blktiger.cpp
index 92eade7109d..7cd5d86a6eb 100644
--- a/src/mame/drivers/blktiger.cpp
+++ b/src/mame/drivers/blktiger.cpp
@@ -599,7 +599,7 @@ DRIVER_INIT_MEMBER(blktiger_state,blktigerb3)
{
UINT8 *src = memregion("audiocpu")->base();
int len = 0x8000;
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
for (int i = 0; i < len; i++)
{
diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp
index db3beac36f2..ed01ca3fd5a 100644
--- a/src/mame/drivers/bnstars.cpp
+++ b/src/mame/drivers/bnstars.cpp
@@ -708,7 +708,7 @@ GFXDECODE_END
CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
{
- required_ioport_array<4> &keys = (((int)(FPTR)param) == 0) ? m_p1_keys : m_p2_keys;
+ required_ioport_array<4> &keys = (((int)(uintptr_t)param) == 0) ? m_p1_keys : m_p2_keys;
switch (m_bnstars1_mahjong_select & 0x2080)
{
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp
index 8942f44fe1d..7a0328ad0a9 100644
--- a/src/mame/drivers/bw12.cpp
+++ b/src/mame/drivers/bw12.cpp
@@ -27,7 +27,10 @@
#include "includes/bw12.h"
#include "bus/rs232/rs232.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
+
/*
TODO:
@@ -176,7 +179,7 @@ static ADDRESS_MAP_START( bw12_io, AS_IO, 8, bw12_state )
AM_RANGE(0x20, 0x21) AM_MIRROR(0x0e) AM_DEVICE(UPD765_TAG, upd765a_device, map)
AM_RANGE(0x30, 0x33) AM_MIRROR(0x0c) AM_DEVREADWRITE(PIA6821_TAG, pia6821_device, read, write)
AM_RANGE(0x40, 0x43) AM_MIRROR(0x0c) AM_DEVREADWRITE(Z80SIO_TAG, z80sio0_device, ba_cd_r, ba_cd_w)
- AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_DEVWRITE(MC1408_TAG, dac_device, write_unsigned8)
+ AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x60, 0x63) AM_MIRROR(0x0c) AM_DEVREADWRITE(PIT8253_TAG, pit8253_device, read, write)
ADDRESS_MAP_END
@@ -560,10 +563,10 @@ static MACHINE_CONFIG_START( common, bw12_state )
MCFG_MC6845_UPDATE_ROW_CB(bw12_state, crtc_update_row)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD(MC1408_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // ls273.ic5 + mc1408.ic4
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* devices */
MCFG_TIMER_DRIVER_ADD(FLOPPY_TIMER_TAG, bw12_state, floppy_motor_off_tick)
diff --git a/src/mame/drivers/bwing.cpp b/src/mame/drivers/bwing.cpp
index cc832d5f60b..8c047cd50f1 100644
--- a/src/mame/drivers/bwing.cpp
+++ b/src/mame/drivers/bwing.cpp
@@ -25,11 +25,12 @@ Known issues:
// Directives
#include "emu.h"
-#include "cpu/m6809/m6809.h"
+#include "includes/bwing.h"
#include "cpu/m6502/deco16.h"
+#include "cpu/m6809/m6809.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/bwing.h"
+#include "sound/volt_reg.h"
//****************************************************************************
@@ -154,7 +155,7 @@ ADDRESS_MAP_END
// Sound CPU
static ADDRESS_MAP_START( bwp3_map, AS_PROGRAM, 8, bwing_state )
AM_RANGE(0x0000, 0x01ff) AM_RAM
- AM_RANGE(0x0200, 0x0200) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x0200, 0x0200) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x1000, 0x1000) AM_WRITE(bwp3_nmiack_w)
AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_device, data_w)
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w)
@@ -392,18 +393,19 @@ static MACHINE_CONFIG_START( bwing, bwing_state )
// sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//****************************************************************************
diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp
index f6ea6742774..128ea6eb3fb 100644
--- a/src/mame/drivers/by17.cpp
+++ b/src/mame/drivers/by17.cpp
@@ -431,8 +431,8 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
{
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@@ -444,8 +444,8 @@ CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 )
{
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@@ -460,8 +460,8 @@ CUSTOM_INPUT_MEMBER( by17_state::drop_target_x2 )
{
/* Here we simulate fallen Drop Targets so the Drop Target Reset Solenoids can release the switches */
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
switch (bit_shift)
{
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index 85eda358902..6728f12eae1 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -430,8 +430,8 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
{
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@@ -443,8 +443,8 @@ CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
{
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@@ -458,8 +458,8 @@ CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 )
{
/* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */
- int bit_shift = ((FPTR)param & 0x07);
- int port = (((FPTR)param >> 4) & 0x07);
+ int bit_shift = ((uintptr_t)param & 0x07);
+ int port = (((uintptr_t)param >> 4) & 0x07);
switch (bit_shift)
{
diff --git a/src/mame/drivers/by6803.cpp b/src/mame/drivers/by6803.cpp
index 017e80256f7..2d11daa4ba6 100644
--- a/src/mame/drivers/by6803.cpp
+++ b/src/mame/drivers/by6803.cpp
@@ -400,9 +400,9 @@ static MACHINE_CONFIG_START( by6803, by6803_state )
MCFG_PIA_WRITEPB_HANDLER(WRITE8(by6803_state, pia1_b_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(by6803_state, pia1_cb2_w))
- //MCFG_SPEAKER_STANDARD_MONO("mono")
- //MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs") // Cheap Squeak Turbo
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ //MCFG_SPEAKER_STANDARD_MONO("speaker")
+ //MCFG_SOUND_ADD("tcs", MIDWAY_TURBO_CHIP_SQUEAK, 0) // Cheap Squeak Turbo
+ //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/byvid.cpp b/src/mame/drivers/byvid.cpp
index cac3fc83d4f..33461908dac 100644
--- a/src/mame/drivers/byvid.cpp
+++ b/src/mame/drivers/byvid.cpp
@@ -42,9 +42,10 @@ ToDo (granny):
#include "cpu/m6809/m6809.h"
#include "video/tms9928a.h"
#include "machine/6821pia.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
#include "sound/beep.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
class by133_state : public driver_device
{
@@ -179,7 +180,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, by133_state ) // U27 Vidiot
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, by133_state )
- AM_RANGE(M6801_PORT1, M6801_PORT1) AM_DEVWRITE("dac", dac_device, write_unsigned8) // P10-P17
+ AM_RANGE(M6801_PORT1, M6801_PORT1) AM_DEVWRITE("dac", dac_byte_interface, write) // P10-P17
AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READWRITE(m6803_port2_r, m6803_port2_w) // P20-P24 sound command in
ADDRESS_MAP_END
@@ -792,9 +793,11 @@ static MACHINE_CONFIG_START( babypac, by133_state )
MCFG_SCREEN_UPDATE_DEVICE( "crtc", tms9928a_device, screen_update )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SPEAKER_STANDARD_MONO("beee")
MCFG_SOUND_ADD("beeper", BEEP, 600)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "beee", 0.10)
diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp
index 2ab7999827e..88d65a9afa2 100644
--- a/src/mame/drivers/c128.cpp
+++ b/src/mame/drivers/c128.cpp
@@ -27,7 +27,6 @@
#include "machine/mos8722.h"
#include "machine/pla.h"
#include "machine/ram.h"
-#include "sound/dac.h"
#include "sound/mos6581.h"
#include "video/mc6845.h"
#include "video/mos6566.h"
@@ -1711,13 +1710,11 @@ static MACHINE_CONFIG_START( ntsc, c128_state )
MCFG_GFXDECODE_ADD("gfxdecode", MOS8563_TAG":palette", c128)
// sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD(MOS6581_TAG, MOS6581, XTAL_14_31818MHz*2/3.5/8)
MCFG_MOS6581_POTX_CALLBACK(READ8(c128_state, sid_potx_r))
MCFG_MOS6581_POTY_CALLBACK(READ8(c128_state, sid_poty_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
// devices
MCFG_DEVICE_ADD(MOS8722_TAG, MOS8722, XTAL_14_31818MHz*2/3.5/8)
@@ -1884,13 +1881,11 @@ static MACHINE_CONFIG_START( pal, c128_state )
MCFG_GFXDECODE_ADD("gfxdecode", MOS8563_TAG":palette", c128)
// sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD(MOS6581_TAG, MOS6581, XTAL_17_734472MHz*2/4.5/8)
MCFG_MOS6581_POTX_CALLBACK(READ8(c128_state, sid_potx_r))
MCFG_MOS6581_POTY_CALLBACK(READ8(c128_state, sid_poty_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
// devices
MCFG_DEVICE_ADD(MOS8722_TAG, MOS8722, XTAL_17_734472MHz*2/4.5/8)
diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp
index 18354d8e5dc..de72447a43d 100644
--- a/src/mame/drivers/calchase.cpp
+++ b/src/mame/drivers/calchase.cpp
@@ -128,24 +128,23 @@ something wrong in the disk geometry reported by calchase.chd (20,255,63) since
#include "emu.h"
+#include "bus/isa/trident.h"
#include "cpu/i386/i386.h"
#include "machine/lpci.h"
#include "machine/pckeybrd.h"
#include "machine/idectrl.h"
-#include "video/pc_vga.h"
-#include "sound/dac.h"
#include "machine/pcshare.h"
#include "machine/ds128x.h"
-#include "bus/isa/trident.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/pc_vga.h"
class calchase_state : public pcat_base_state
{
public:
calchase_state(const machine_config &mconfig, device_type type, const char *tag)
- : pcat_base_state(mconfig, type, tag),
- m_dac_l(*this, "dac_l"),
- m_dac_r(*this, "dac_r")
+ : pcat_base_state(mconfig, type, tag)
{
}
@@ -164,15 +163,11 @@ public:
DECLARE_READ16_MEMBER(calchase_iocard5_r);
DECLARE_READ32_MEMBER(calchase_idle_skip_r);
DECLARE_WRITE32_MEMBER(calchase_idle_skip_w);
- DECLARE_WRITE16_MEMBER(calchase_dac_l_w);
- DECLARE_WRITE16_MEMBER(calchase_dac_r_w);
DECLARE_DRIVER_INIT(calchase);
DECLARE_DRIVER_INIT(hostinv);
virtual void machine_start() override;
virtual void machine_reset() override;
void intel82439tx_init();
- required_device<dac_device> m_dac_l;
- required_device<dac_device> m_dac_r;
};
// Intel 82439TX System Controller (MTXC)
@@ -378,16 +373,6 @@ READ16_MEMBER(calchase_state::calchase_iocard5_r)
}
-WRITE16_MEMBER(calchase_state::calchase_dac_l_w)
-{
- m_dac_l->write_unsigned16((data & 0xfff) << 4);
-}
-
-WRITE16_MEMBER(calchase_state::calchase_dac_r_w)
-{
- m_dac_r->write_unsigned16((data & 0xfff) << 4);
-}
-
static ADDRESS_MAP_START( calchase_map, AS_PROGRAM, 32, calchase_state )
AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
AM_RANGE(0x000a0000, 0x000bffff) AM_DEVREADWRITE8("vga", trident_vga_device, mem_r, mem_w, 0xffffffff) // VGA VRAM
@@ -400,8 +385,8 @@ static ADDRESS_MAP_START( calchase_map, AS_PROGRAM, 32, calchase_state )
AM_RANGE(0x000d0030, 0x000d0033) AM_READ16(calchase_iocard4_r, 0x0000ffff)
AM_RANGE(0x000d0034, 0x000d0037) AM_READ16(calchase_iocard5_r, 0x0000ffff)
AM_RANGE(0x000d0008, 0x000d000b) AM_WRITENOP // ???
- AM_RANGE(0x000d0024, 0x000d0027) AM_WRITE16(calchase_dac_l_w,0x0000ffff)
- AM_RANGE(0x000d0028, 0x000d002b) AM_WRITE16(calchase_dac_r_w,0x0000ffff)
+ AM_RANGE(0x000d0024, 0x000d0027) AM_DEVWRITE16("ldac", dac_word_interface, write, 0x0000ffff)
+ AM_RANGE(0x000d0028, 0x000d002b) AM_DEVWRITE16("rdac", dac_word_interface, write, 0x0000ffff)
AM_RANGE(0x000d0800, 0x000d0fff) AM_ROM AM_REGION("nvram",0) //
AM_RANGE(0x000d0800, 0x000d0fff) AM_RAM // GAME_CMOS
@@ -677,10 +662,11 @@ static MACHINE_CONFIG_START( calchase, calchase_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
- MCFG_DAC_ADD("dac_l")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_DAC_ADD("dac_r")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
+ MCFG_SOUND_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( hostinv, calchase_state )
@@ -702,11 +688,12 @@ static MACHINE_CONFIG_START( hostinv, calchase_state )
MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
- MCFG_DAC_ADD("dac_l")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_DAC_ADD("dac_r")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+ MCFG_SOUND_ADD("ldac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index 22aa565c06e..c8f17e6514d 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -119,9 +119,10 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "video/mc6845.h"
-#include "sound/dac.h"
#include "imagedev/cassette.h"
+#include "sound/dac.h"
#include "sound/wave.h"
+#include "sound/volt_reg.h"
#include "formats/camplynx_cas.h"
#include "machine/wd_fdc.h"
#include "formats/camplynx_dsk.h"
@@ -171,7 +172,7 @@ private:
required_device<cassette_image_device> m_cass;
//required_device<> m_printer;
required_device<mc6845_device> m_crtc;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
optional_device<fd1793_t> m_fdc;
optional_device<floppy_connector> m_floppy0;
optional_device<floppy_connector> m_floppy1;
@@ -650,7 +651,7 @@ WRITE8_MEMBER( camplynx_state::port84_w )
m_cass->output(BIT(data, 5) ? -1.0 : +1.0);
}
else // speaker output
- m_dac->write_unsigned8(space, 0, data);
+ m_dac->write(data);
}
/*
@@ -787,11 +788,12 @@ static MACHINE_CONFIG_FRAGMENT( lynx_common )
MCFG_PALETTE_ADD_3BIT_RGB("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.5)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.02)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.02)
MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( lynx_disk )
diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp
index 52f37d5266e..eed4313b5c3 100644
--- a/src/mame/drivers/capbowl.cpp
+++ b/src/mame/drivers/capbowl.cpp
@@ -93,6 +93,7 @@
#include "includes/capbowl.h"
#include "sound/2203intf.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK XTAL_8MHz
@@ -243,7 +244,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, capbowl_state )
AM_RANGE(0x0000, 0x07ff) AM_RAM
AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
AM_RANGE(0x2000, 0x2000) AM_WRITENOP /* watchdog */
- AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x7000, 0x7000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -341,7 +342,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
MCFG_TMS34061_INTERRUPT_CB(INPUTLINE("maincpu", M6809_FIRQ_LINE)) /* interrupt gen callback */
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
@@ -349,13 +350,14 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", M6809_FIRQ_LINE))
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("ticket", ticket_dispenser_device, read))
MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("ticket", ticket_dispenser_device, write)) /* Also a status LED. See memory map above */
- MCFG_SOUND_ROUTE(0, "mono", 0.07)
- MCFG_SOUND_ROUTE(1, "mono", 0.07)
- MCFG_SOUND_ROUTE(2, "mono", 0.07)
- MCFG_SOUND_ROUTE(3, "mono", 0.75)
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.07)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.07)
+ MCFG_SOUND_ROUTE(2, "speaker", 0.07)
+ MCFG_SOUND_ROUTE(3, "speaker", 0.75)
+
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp
index f96a5f7bbed..f39366536eb 100644
--- a/src/mame/drivers/casloopy.cpp
+++ b/src/mame/drivers/casloopy.cpp
@@ -478,7 +478,7 @@ DEVICE_IMAGE_LOAD_MEMBER( casloopy_state, loopy_cart )
{
UINT32 size = m_cart->common_get_size("rom");
UINT8 *SRC, *DST;
- dynamic_buffer temp;
+ std::vector<UINT8> temp;
temp.resize(size);
m_cart->rom_alloc(size, GENERIC_ROM32_WIDTH, ENDIANNESS_LITTLE);
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index 77e0b1a4994..fd58d35cb61 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -4884,7 +4884,7 @@ DRIVER_INIT_MEMBER(cave_state,mazinger)
membank("okibank2")->configure_entries(0, 4, &ROM[0x00000], 0x20000);
/* decrypt sprites */
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
{
int i;
for (i = 0; i < len; i++)
@@ -4946,7 +4946,7 @@ DRIVER_INIT_MEMBER(cave_state,pwrinst2j)
membank("z80bank")->configure_entries(0, 8, &ROM[0x00000], 0x4000);
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
{
for(i = 0; i < len/2; i++)
{
@@ -4999,7 +4999,7 @@ DRIVER_INIT_MEMBER(cave_state,sailormn)
membank("oki2bank2")->configure_entries(0, 0x10, &ROM[0x00000], 0x20000);
/* decrypt sprites */
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
{
int i;
for (i = 0; i < len; i++)
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index 078ae13fdd3..9ebabd01c39 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -29,7 +29,6 @@
#include "machine/pic8259.h"
#include "machine/pla.h"
#include "machine/ram.h"
-#include "sound/dac.h"
#include "sound/mos6581.h"
#include "video/mc6845.h"
#include "video/mos6566.h"
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index f3500bcabbd..3385d032ef9 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -73,12 +73,13 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/tms7000/tms7000.h"
-#include "video/hd44780.h"
-#include "sound/dac.h"
-#include "machine/nvram.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "cpu/tms7000/tms7000.h"
+#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/hd44780.h"
#include "softlist.h"
#include "cc40.lh"
@@ -90,7 +91,6 @@ public:
cc40_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
m_cart(*this, "cartslot"),
m_key_matrix(*this, "IN.%u", 0),
m_battery_inp(*this, "BATTERY")
@@ -100,7 +100,6 @@ public:
}
required_device<tms70c20_device> m_maincpu;
- required_device<dac_device> m_dac;
required_device<generic_slot_device> m_cart;
required_ioport_array<8> m_key_matrix;
required_ioport m_battery_inp;
@@ -131,7 +130,6 @@ public:
DECLARE_READ8_MEMBER(bus_control_r);
DECLARE_WRITE8_MEMBER(bus_control_w);
DECLARE_WRITE8_MEMBER(power_w);
- DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_READ8_MEMBER(battery_r);
DECLARE_READ8_MEMBER(bankswitch_r);
DECLARE_WRITE8_MEMBER(bankswitch_w);
@@ -289,12 +287,6 @@ WRITE8_MEMBER(cc40_state::power_w)
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
-WRITE8_MEMBER(cc40_state::sound_w)
-{
- // d0: piezo control
- m_dac->write_signed8((data & 1) ? 0x7f : 0);
-}
-
READ8_MEMBER(cc40_state::battery_r)
{
// d0: low battery sense line (0 = low power)
@@ -370,7 +362,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, cc40_state )
AM_RANGE(0x0112, 0x0112) AM_NOP // d0-d3: Hexbus data
AM_RANGE(0x0113, 0x0113) AM_NOP // d0: Hexbus available
AM_RANGE(0x0114, 0x0114) AM_NOP // d0,d1: Hexbus handshake
- AM_RANGE(0x0115, 0x0115) AM_WRITE(sound_w)
+ AM_RANGE(0x0115, 0x0115) AM_DEVWRITE("dac", dac_bit_interface, write) // d0: piezo control
AM_RANGE(0x0116, 0x0116) AM_READ(battery_r)
AM_RANGE(0x0119, 0x0119) AM_READWRITE(bankswitch_r, bankswitch_w)
AM_RANGE(0x011a, 0x011a) AM_READWRITE(clock_control_r, clock_control_w)
@@ -397,7 +389,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(cc40_state::sysram_size_changed)
{
- init_sysram((int)(FPTR)param, newval << 11);
+ init_sysram((int)(uintptr_t)param, newval << 11);
}
static INPUT_PORTS_START( cc40 )
@@ -609,10 +601,10 @@ static MACHINE_CONFIG_START( cc40, cc40_state )
MCFG_HD44780_PIXEL_UPDATE_CB(cc40_state, cc40_pixel_update)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cc40_cart")
diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp
index 66a27f1467a..c5375bb136c 100644
--- a/src/mame/drivers/cchasm.cpp
+++ b/src/mame/drivers/cchasm.cpp
@@ -15,15 +15,15 @@
***************************************************************************/
#include "emu.h"
+#include "includes/cchasm.h"
#include "cpu/z80/z80.h"
#include "cpu/z80/z80daisy.h"
#include "cpu/m68000/m68000.h"
-#include "sound/ay8910.h"
-#include "sound/dac.h"
#include "machine/6840ptm.h"
#include "machine/z80ctc.h"
#include "machine/watchdog.h"
-#include "includes/cchasm.h"
+#include "sound/ay8910.h"
+#include "sound/volt_reg.h"
#define CCHASM_68K_CLOCK (XTAL_8MHz)
@@ -169,7 +169,7 @@ static MACHINE_CONFIG_START( cchasm, cchasm_state )
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
@@ -177,16 +177,16 @@ static MACHINE_CONFIG_START( cchasm, cchasm_state )
MCFG_GENERIC_LATCH_8_ADD("soundlatch4")
MCFG_SOUND_ADD("ay1", AY8910, 1818182)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2)
MCFG_SOUND_ADD("ay2", AY8910, 1818182)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
/* 6840 PTM */
MCFG_DEVICE_ADD("6840ptm", PTM6840, 0)
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index f876b126fe1..fa265a400f7 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -1140,7 +1140,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cclimber, root )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_CCLIMBER_AUDIO_ADD("cclimber_audio")
MACHINE_CONFIG_END
@@ -1192,13 +1192,13 @@ static MACHINE_CONFIG_DERIVED( yamato, root )
MCFG_SCREEN_UPDATE_DRIVER(cclimber_state, screen_update_yamato)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ay1", AY8910, 1536000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, 1536000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -1254,15 +1254,15 @@ static MACHINE_CONFIG_START( swimmer, cclimber_state )
MCFG_VIDEO_START_OVERRIDE(cclimber_state,swimmer)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_4MHz/2) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_4MHz/2) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( guzzler, swimmer )
diff --git a/src/mame/drivers/cd2650.cpp b/src/mame/drivers/cd2650.cpp
index 9e72052234a..a9da4aaa250 100644
--- a/src/mame/drivers/cd2650.cpp
+++ b/src/mame/drivers/cd2650.cpp
@@ -212,7 +212,7 @@ QUICKLOAD_LOAD_MEMBER( cd2650_state, cd2650 )
}
else
{
- dynamic_buffer quick_data(quick_length);
+ std::vector<UINT8> quick_data(quick_length);
int read_ = image.fread( &quick_data[0], quick_length);
if (read_ != quick_length)
{
diff --git a/src/mame/drivers/cdi.cpp b/src/mame/drivers/cdi.cpp
index fb0bdbf47e4..0ed78ba75e0 100644
--- a/src/mame/drivers/cdi.cpp
+++ b/src/mame/drivers/cdi.cpp
@@ -140,7 +140,7 @@ INPUT_CHANGED_MEMBER(cdi_state::mcu_input)
{
bool send = false;
- switch((FPTR)param)
+ switch((uintptr_t)param)
{
case 0x39:
if (m_input1.read_safe(0) & 0x01) send = true;
@@ -177,7 +177,7 @@ INPUT_CHANGED_MEMBER(cdi_state::mcu_input)
if(send)
{
- UINT8 data = (UINT8)((FPTR)param & 0x000000ff);
+ UINT8 data = (UINT8)((uintptr_t)param & 0x000000ff);
m_scc->quizard_rx(data);
}
}
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 99fcbc9ee13..c7cbfad74a4 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -79,11 +79,13 @@ TODO:
***************************************************************************/
#include "emu.h"
+#include "includes/champbas.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
-#include "includes/champbas.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
@@ -111,16 +113,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(champbas_state::exctsccr_sound_irq)
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
-WRITE8_MEMBER(champbas_state::dac1_w)
-{
- m_dac1->write_signed8(data << 2);
-}
-
-WRITE8_MEMBER(champbas_state::dac2_w)
-{
- m_dac2->write_signed8(data << 2);
-}
-
/*************************************
@@ -269,7 +261,7 @@ static ADDRESS_MAP_START( champbas_sound_map, AS_PROGRAM, 8, champbas_state )
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_WRITENOP // 4-bit return code to main CPU (not used)
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
- AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_WRITE(dac1_w)
+ AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe000, 0xe3ff) AM_MIRROR(0x1c00) AM_RAM
ADDRESS_MAP_END
@@ -277,8 +269,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( exctsccr_sound_map, AS_PROGRAM, 8, champbas_state )
AM_RANGE(0x0000, 0x8fff) AM_ROM
AM_RANGE(0xa000, 0xa7ff) AM_RAM
- AM_RANGE(0xc008, 0xc008) AM_WRITE(dac1_w)
- AM_RANGE(0xc009, 0xc009) AM_WRITE(dac2_w)
+ AM_RANGE(0xc008, 0xc008) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0xc009, 0xc009) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0xc00c, 0xc00c) AM_DEVWRITE("soundlatch", generic_latch_8_device, clear_w)
AM_RANGE(0xc00d, 0xc00d) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
// AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP // ?
@@ -554,12 +546,12 @@ static MACHINE_CONFIG_START( talbot, champbas_state )
MCFG_VIDEO_START_OVERRIDE(champbas_state,champbas)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -591,15 +583,16 @@ static MACHINE_CONFIG_START( champbas, champbas_state )
MCFG_VIDEO_START_OVERRIDE(champbas_state,champbas)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( champbasj, champbas )
@@ -670,28 +663,28 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state )
MCFG_VIDEO_START_OVERRIDE(champbas_state,exctsccr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
/* AY (melody) clock is specified by a VR (0.9 - 3.9 MHz) */
MCFG_SOUND_ADD("ay1", AY8910, 1940000) /* VR has a factory mark and this is the value read */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.08)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_14_31818MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.08)
MCFG_SOUND_ADD("ay3", AY8910, XTAL_14_31818MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.08)
MCFG_SOUND_ADD("ay4", AY8910, XTAL_14_31818MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.08)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ADD("dac1", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/* Bootleg running on a modified Champion Baseball board */
@@ -726,15 +719,16 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state )
MCFG_VIDEO_START_OVERRIDE(champbas_state,exctsccr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18_432MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cheekyms.cpp b/src/mame/drivers/cheekyms.cpp
index 8935f8d20d3..39c9972c1d1 100644
--- a/src/mame/drivers/cheekyms.cpp
+++ b/src/mame/drivers/cheekyms.cpp
@@ -7,9 +7,9 @@
**************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "includes/cheekyms.h"
+#include "cpu/z80/z80.h"
+#include "sound/volt_reg.h"
INPUT_CHANGED_MEMBER(cheekyms_state::coin_inserted)
@@ -142,10 +142,25 @@ static MACHINE_CONFIG_START( cheekyms, cheekyms_state )
MCFG_PALETTE_INIT_OWNER(cheekyms_state, cheekyms)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+
+ MCFG_SOUND_ADD("dac0", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac4", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac5", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac6", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac7", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chessmst.cpp b/src/mame/drivers/chessmst.cpp
index 771b281ebd2..0da9d76a24f 100644
--- a/src/mame/drivers/chessmst.cpp
+++ b/src/mame/drivers/chessmst.cpp
@@ -117,7 +117,7 @@ INPUT_CHANGED_MEMBER(chessmst_state::view_monitor_button)
INPUT_CHANGED_MEMBER(chessmst_state::chessmst_sensor)
{
- UINT8 pos = (UINT8)(FPTR)param;
+ UINT8 pos = (UINT8)(uintptr_t)param;
if (newval)
{
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index a2632d922fc..a1934dd93e4 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -260,7 +260,7 @@ Notes:
CN5 - USB connector joining to JVS I/O board with standard USB cable
CN8 - A/V input connector (from XBox board via short A/V cable)
CN9 - VGA output connector
- CN10 - 14 pin connector (purpose unknown but appears to be unused)
+ CN10 - 14 pin connector (purpose unknown, maybe another video connector)
CN11 - 16-pin flat cable connector joining to LPC connector on XBox board
CN12 - 40-pin IDE flat cable connector joining to IDE connector on XBox board
CN14S - 7-pin power output connector joining to XBox board
@@ -869,9 +869,10 @@ int ohci_hlean2131qc_device::handle_nonstandard_request(int endpoint, USBSetupPa
sense = 3;
else
sense = 0; // need to check
- // PINSA register, bits 4-1 special value, must be 10 xor 15, but bit 3 is ignored since its used as the CS pin of the chip
+ // PINSA register, bits 0-2 connected do dip switches 1-3 on filter board, bit 4 to dip switch 4, bit 5 to dip switch 5, bits 6-7 to buttons 1-2 on filter board
+ // bits 4-1 value must be 10 xor 15, and bit 3 is ignored since its used as the CS pin of the chip
endpoints[endpoint].buffer[1] = 0x4b;
- // PINSB register, bit 4 connected to re/de pins of max485, bits 2-3 used as uart pins, bit 0-1 is the sense pin of the jvs connector
+ // PINSB register, bits 5-7 connected to 3 leds not mounted on pcb, bit 4 connected to re/de pins of max485, bits 2-3 used as uart pins, bit 0-1 give the status of the sense pin of the jvs connector
// if bits 0-1 are 11, the not all the connected jvs devices have been assigned an address yet
endpoints[endpoint].buffer[2] = 0x52 | sense;
// OUTB register
diff --git a/src/mame/drivers/chsuper.cpp b/src/mame/drivers/chsuper.cpp
index 261809d255e..bd2d7345ae9 100644
--- a/src/mame/drivers/chsuper.cpp
+++ b/src/mame/drivers/chsuper.cpp
@@ -22,8 +22,9 @@
#include "emu.h"
#include "cpu/z180/z180.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/ramdac.h"
#include "chsuper.lh"
@@ -218,7 +219,7 @@ static ADDRESS_MAP_START( chsuper_portmap, AS_IO, 8, chsuper_state )
AM_RANGE( 0x00fd, 0x00fd ) AM_DEVWRITE("ramdac", ramdac_device, pal_w)
AM_RANGE( 0x00fe, 0x00fe ) AM_DEVWRITE("ramdac", ramdac_device, mask_w)
AM_RANGE( 0x8300, 0x8300 ) AM_READ_PORT("IN2") // valid input port present in test mode.
- AM_RANGE( 0xff20, 0xff3f ) AM_DEVWRITE("dac", dac_device, write_unsigned8) // unk writes
+ AM_RANGE( 0xff20, 0xff3f ) AM_DEVWRITE("dac", dac_byte_interface, write) // unk writes
ADDRESS_MAP_END
/* About Sound...
@@ -371,10 +372,11 @@ static MACHINE_CONFIG_START( chsuper, chsuper_state )
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp
index ced692dc44d..91d56abb2ce 100644
--- a/src/mame/drivers/circusc.cpp
+++ b/src/mame/drivers/circusc.cpp
@@ -52,14 +52,14 @@ This bug is due to 380_r02.6h, it differs from 380_q02.6h by 2 bytes, at
***************************************************************************/
#include "emu.h"
+#include "includes/circusc.h"
#include "cpu/z80/z80.h"
-#include "machine/konami1.h"
#include "cpu/m6809/m6809.h"
#include "machine/gen_latch.h"
+#include "machine/konami1.h"
#include "machine/watchdog.h"
-#include "sound/dac.h"
#include "sound/discrete.h"
-#include "includes/circusc.h"
+#include "sound/volt_reg.h"
void circusc_state::machine_start()
@@ -123,7 +123,7 @@ WRITE8_MEMBER(circusc_state::circusc_sound_w)
/* CS5 */
case 3:
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
break;
/* CS6 */
@@ -372,8 +372,9 @@ static MACHINE_CONFIG_START( circusc, circusc_state )
MCFG_SOUND_ADD("sn2", SN76496, XTAL_14_31818MHz/8)
MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 1)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 2)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 2) // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("fltdisc", DISCRETE, 0)
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index 50c2a04b9bb..8e6ed65744e 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -786,7 +786,7 @@ void cischeat_state::captflag_motor_move(int side, UINT16 data)
CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_pos_r)
{
const UINT8 pos[4] = {1,0,2,3}; // -> 2,3,1,0 offsets -> 0123
- return ~pos[m_captflag_motor_pos[(FPTR)param]];
+ return ~pos[m_captflag_motor_pos[(uintptr_t)param]];
}
CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_busy_r)
diff --git a/src/mame/drivers/cntsteer.cpp b/src/mame/drivers/cntsteer.cpp
index 49210c1bc17..7bcc7bc15ae 100644
--- a/src/mame/drivers/cntsteer.cpp
+++ b/src/mame/drivers/cntsteer.cpp
@@ -35,6 +35,7 @@
#include "machine/gen_latch.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class cntsteer_state : public driver_device
@@ -524,17 +525,12 @@ WRITE8_MEMBER(cntsteer_state::cntsteer_sub_irq_w)
WRITE8_MEMBER(cntsteer_state::cntsteer_sub_nmi_w)
{
-// if (data)
- machine().scheduler().synchronize(); // force resync
-
- //m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
// popmessage("%02x", data);
}
WRITE8_MEMBER(cntsteer_state::cntsteer_main_irq_w)
{
- machine().scheduler().synchronize(); // force resync
m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
@@ -944,19 +940,20 @@ static MACHINE_CONFIG_START( cntsteer, cntsteer_state )
MCFG_VIDEO_START_OVERRIDE(cntsteer_state,cntsteer)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( zerotrgt, cntsteer_state )
@@ -995,15 +992,15 @@ static MACHINE_CONFIG_START( zerotrgt, cntsteer_state )
MCFG_VIDEO_START_OVERRIDE(cntsteer_state,zerotrgt)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
/***************************************************************************/
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index bae50cb4dbd..aa9ec9350ad 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -24,15 +24,16 @@
***************************************************************************/
#include "includes/coco12.h"
-#include "imagedev/cassette.h"
-#include "cpu/m6809/m6809.h"
#include "bus/coco/coco_232.h"
#include "bus/coco/coco_orch90.h"
#include "bus/coco/coco_pak.h"
#include "bus/coco/coco_fdc.h"
#include "bus/coco/coco_multi.h"
#include "bus/coco/coco_dwsock.h"
+#include "cpu/m6809/m6809.h"
#include "formats/coco_cas.h"
+#include "imagedev/cassette.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
//**************************************************************************
@@ -270,11 +271,12 @@ SLOT_INTERFACE_END
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( coco_sound )
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/coinmstr.cpp b/src/mame/drivers/coinmstr.cpp
index 2b3c8ba4a9c..e699adeb329 100644
--- a/src/mame/drivers/coinmstr.cpp
+++ b/src/mame/drivers/coinmstr.cpp
@@ -1530,7 +1530,7 @@ DRIVER_INIT_MEMBER(coinmstr_state,coinmstr)
{
UINT8 *rom = memregion("user1")->base();
int length = memregion("user1")->bytes();
- dynamic_buffer buf(length);
+ std::vector<UINT8> buf(length);
int i;
memcpy(&buf[0],rom,length);
diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp
index 866690da7f5..a1ed7a94ad4 100644
--- a/src/mame/drivers/coolpool.cpp
+++ b/src/mame/drivers/coolpool.cpp
@@ -26,14 +26,12 @@
***************************************************************************/
-#include "emu.h"
+#include "includes/coolpool.h"
#include "cpu/tms32010/tms32010.h"
-#include "cpu/tms34010/tms34010.h"
#include "cpu/tms32025/tms32025.h"
-#include "video/tlc34076.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
-#include "includes/coolpool.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
@@ -528,12 +526,6 @@ WRITE16_MEMBER(coolpool_state::dsp_romaddr_w)
}
-WRITE16_MEMBER(coolpool_state::dsp_dac_w)
-{
- m_dac->write_signed16((INT16)(data << 4) + 0x8000);
-}
-
-
/*************************************
*
@@ -659,7 +651,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( amerdart_dsp_io_map, AS_IO, 16, coolpool_state )
AM_RANGE(0x00, 0x01) AM_WRITE(dsp_romaddr_w)
AM_RANGE(0x02, 0x02) AM_WRITE(amerdart_dsp_answer_w)
- AM_RANGE(0x03, 0x03) AM_WRITE(dsp_dac_w)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac", dac_word_interface, write)
AM_RANGE(0x04, 0x04) AM_READ(dsp_rom_r)
AM_RANGE(0x05, 0x05) AM_READ_PORT("IN0")
AM_RANGE(0x06, 0x06) AM_READ(amerdart_trackball_r)
@@ -676,7 +668,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( coolpool_dsp_io_map, AS_IO, 16, coolpool_state )
AM_RANGE(0x00, 0x01) AM_WRITE(dsp_romaddr_w)
AM_RANGE(0x02, 0x02) AM_READWRITE(dsp_cmd_r, dsp_answer_w)
- AM_RANGE(0x03, 0x03) AM_WRITE(dsp_dac_w)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac", dac_word_interface, write)
AM_RANGE(0x04, 0x04) AM_READ(dsp_rom_r)
AM_RANGE(0x05, 0x05) AM_READ_PORT("IN0")
AM_RANGE(0x07, 0x07) AM_READ_PORT("IN1")
@@ -812,10 +804,10 @@ static MACHINE_CONFIG_START( amerdart, coolpool_state )
MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_12BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -851,10 +843,10 @@ static MACHINE_CONFIG_START( coolpool, coolpool_state )
MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_12BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cop01.cpp b/src/mame/drivers/cop01.cpp
index 650895fd373..9485816f51a 100644
--- a/src/mame/drivers/cop01.cpp
+++ b/src/mame/drivers/cop01.cpp
@@ -99,7 +99,7 @@ READ8_MEMBER(cop01_state::cop01_sound_command_r)
CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
}
diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp
index 7aba45dcd58..bc2e4564818 100644
--- a/src/mame/drivers/cosmic.cpp
+++ b/src/mame/drivers/cosmic.cpp
@@ -35,11 +35,11 @@ cosmicg - board can operate in b&w mode if there is no PROM, in this case
#include "emu.h"
+#include "includes/cosmic.h"
#include "cpu/tms9900/tms9980a.h"
#include "cpu/z80/z80.h"
#include "sound/samples.h"
-#include "sound/dac.h"
-#include "includes/cosmic.h"
+#include "sound/volt_reg.h"
/* Schematics show 12 triggers for discrete sound circuits */
@@ -101,21 +101,29 @@ WRITE8_MEMBER(cosmic_state::panic_sound_output_w)
m_samples->stop(4);
break;
- case 10: m_dac->write_unsigned8(data); break;/* Bonus */
- case 15: if (data) m_samples->start(0, 6); break; /* Player Die */
- case 16: if (data) m_samples->start(5, 7); break; /* Enemy Laugh */
- case 17: if (data) m_samples->start(0, 10); break; /* Coin - Not triggered by software */
+ case 10: m_dac->write(BIT(data, 7)); break; /* Bonus */
}
}
#ifdef MAME_DEBUG
- logerror("Sound output %x=%x\n", offset, data);
+ logerror("panic_sound_output_w %x=%x\n", offset, data);
#endif
}
WRITE8_MEMBER(cosmic_state::panic_sound_output2_w)
{
- panic_sound_output_w(space, offset + 15, data);
+ if (m_sound_enabled)
+ {
+ switch (offset)
+ {
+ case 0: if (data) m_samples->start(0, 6); break; /* Player Die */
+ case 1: if (data) m_samples->start(5, 7); break; /* Enemy Laugh */
+ }
+ }
+
+#ifdef MAME_DEBUG
+ logerror("panic_sound_output2_w %x=%x\n", offset, data);
+#endif
}
WRITE8_MEMBER(cosmic_state::cosmicg_output_w)
@@ -136,10 +144,10 @@ WRITE8_MEMBER(cosmic_state::cosmicg_output_w)
switch (offset)
{
/* The schematics show a direct link to the sound amp */
- /* as other cosmic series games, but it never seems to */
- /* be used for anything. It is implemented for sake of */
- /* completness. Maybe it plays a tune if you win ? */
- case 1: m_dac->write_unsigned8(-data); break;
+ /* as other cosmic series games, but it is toggled */
+ /* once during game over. It is implemented for sake */
+ /* of completness. */
+ case 1: m_dac->write(BIT(data, 0)); break; /* Game Over */
case 2: if (data) m_samples->start(0, m_march_select); break; /* March Sound */
case 3: m_march_select = (m_march_select & 0xfe) | data; break;
case 4: m_march_select = (m_march_select & 0xfd) | (data << 1); break;
@@ -167,7 +175,7 @@ WRITE8_MEMBER(cosmic_state::cosmicg_output_w)
break;
case 9: if (data) m_samples->start(3, 11); break; /* Got Ship */
-// case 11: watchdog_reset_w(0, 0); break; /* Watchdog */
+ case 11: /* watchdog_reset_w(0, 0); */ break; /* Watchdog? only toggles during game play */
case 13: if (data) m_samples->start(8, 13 - m_gun_die_select); break; /* Got Monster / Gunshot */
case 14: m_gun_die_select = data; break;
case 15: if (data) m_samples->start(5, 14); break; /* Coin Extend (extra base) */
@@ -175,7 +183,7 @@ WRITE8_MEMBER(cosmic_state::cosmicg_output_w)
}
#ifdef MAME_DEBUG
- if (offset != 11) logerror("Output %x=%x\n", offset, data);
+ if (offset != 11) logerror("cosmicg_output_w %x=%x\n", offset, data);
#endif
}
@@ -203,6 +211,8 @@ WRITE8_MEMBER(cosmic_state::cosmica_sound_output_w)
{
case 0: if (data) m_samples->start(1, 2); break; /*Dive Bombing Type A*/
+ case 1: break; /* game writes 0 when alien shot */
+
case 2: /*Dive Bombing Type B (Main Control)*/
if (data)
{
@@ -311,10 +321,14 @@ WRITE8_MEMBER(cosmic_state::cosmica_sound_output_w)
}
#ifdef MAME_DEBUG
- logerror("Sound output %x=%x\n", offset, data);
+ logerror("cosmica_sound_output_w %x=%x\n", offset, data);
#endif
}
+WRITE8_MEMBER(cosmic_state::dac_w)
+{
+ m_dac->write(BIT(data, 7));
+}
READ8_MEMBER(cosmic_state::cosmica_pixel_clock_r)
{
@@ -406,7 +420,7 @@ static ADDRESS_MAP_START( magspot_map, AS_PROGRAM, 8, cosmic_state )
AM_RANGE(0x0000, 0x2fff) AM_ROM
AM_RANGE(0x3800, 0x3807) AM_READ(magspot_coinage_dip_r)
AM_RANGE(0x4000, 0x401f) AM_WRITEONLY AM_SHARE("spriteram")
- AM_RANGE(0x4800, 0x4800) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x4800, 0x4800) AM_WRITE(dac_w)
AM_RANGE(0x480c, 0x480d) AM_WRITE(cosmic_color_register_w)
AM_RANGE(0x480f, 0x480f) AM_WRITE(flip_screen_w)
AM_RANGE(0x5000, 0x5000) AM_READ_PORT("IN0")
@@ -417,10 +431,13 @@ static ADDRESS_MAP_START( magspot_map, AS_PROGRAM, 8, cosmic_state )
ADDRESS_MAP_END
-
-INPUT_CHANGED_MEMBER(cosmic_state::panic_coin_inserted)
+WRITE_LINE_MEMBER(cosmic_state::panic_coin_inserted)
{
- panic_sound_output_w(m_maincpu->space(AS_PROGRAM), 17, newval == 0);
+ if (m_sound_enabled && !state) m_samples->start(0, 10); /* Coin - Not triggered by software */
+
+#ifdef MAME_DEBUG
+ logerror("panic_coin_inserted %x\n", state);
+#endif
}
static INPUT_PORTS_START( panic )
@@ -475,8 +492,8 @@ static INPUT_PORTS_START( panic )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,panic_coin_inserted, 0)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,panic_coin_inserted, 0)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, cosmic_state, panic_coin_inserted)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, cosmic_state, panic_coin_inserted)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(cosmic_state::cosmica_coin_inserted)
@@ -1026,15 +1043,16 @@ static MACHINE_CONFIG_DERIVED( panic, cosmic )
MCFG_SCREEN_UPDATE_DRIVER(cosmic_state, screen_update_panic)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(9)
MCFG_SAMPLES_NAMES(panic_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -1054,16 +1072,12 @@ static MACHINE_CONFIG_DERIVED( cosmica, cosmic )
MCFG_SCREEN_UPDATE_DRIVER(cosmic_state, screen_update_cosmica)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(13)
MCFG_SAMPLES_NAMES(cosmica_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( cosmicg, cosmic_state )
@@ -1090,15 +1104,16 @@ static MACHINE_CONFIG_START( cosmicg, cosmic_state )
MCFG_PALETTE_INIT_OWNER(cosmic_state,cosmicg)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(9)
MCFG_SAMPLES_NAMES(cosmicg_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -1118,10 +1133,11 @@ static MACHINE_CONFIG_DERIVED( magspot, cosmic )
MCFG_SCREEN_UPDATE_DRIVER(cosmic_state, screen_update_magspot)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -1151,10 +1167,11 @@ static MACHINE_CONFIG_DERIVED( nomnlnd, cosmic )
MCFG_SCREEN_UPDATE_DRIVER(cosmic_state, screen_update_nomnlnd)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -1568,7 +1585,7 @@ DRIVER_INIT_MEMBER(cosmic_state,nomnlnd)
m_maincpu->space(AS_PROGRAM).install_read_handler(0x5000, 0x5001, read8_delegate(FUNC(cosmic_state::nomnlnd_port_0_1_r),this));
m_maincpu->space(AS_PROGRAM).nop_write(0x4800, 0x4800);
m_maincpu->space(AS_PROGRAM).install_write_handler(0x4807, 0x4807, write8_delegate(FUNC(cosmic_state::cosmic_background_enable_w),this));
- m_maincpu->space(AS_PROGRAM).install_write_handler(0x480a, 0x480a, write8_delegate(FUNC(dac_device::write_unsigned8),(dac_device*)m_dac));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0x480a, 0x480a, write8_delegate(FUNC(cosmic_state::dac_w), this));
}
DRIVER_INIT_MEMBER(cosmic_state,panic)
diff --git a/src/mame/drivers/craft.cpp b/src/mame/drivers/craft.cpp
index 0601bf3659c..cc2ad5f5d49 100644
--- a/src/mame/drivers/craft.cpp
+++ b/src/mame/drivers/craft.cpp
@@ -11,6 +11,7 @@
#include "emu.h"
#include "cpu/avr8/avr8.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define VERBOSE_LEVEL (0)
@@ -63,7 +64,7 @@ public:
virtual void machine_reset() override;
UINT32 screen_update_craft(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4);
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
};
inline void craft_state::verboselog(int n_level, const char *s_fmt, ...)
@@ -137,7 +138,7 @@ WRITE8_MEMBER(craft_state::port_w)
{
m_port_d = data;
UINT8 audio_sample = (data & 0x02) | ((data & 0xf4) >> 2);
- m_dac->write_unsigned8(audio_sample << 1);
+ m_dac->write(audio_sample);
break;
}
}
@@ -230,8 +231,6 @@ DRIVER_INIT_MEMBER(craft_state,craft)
void craft_state::machine_reset()
{
- m_dac->write_unsigned8(0x00);
-
m_frame_start_cycle = 0;
m_last_cycles = 0;
}
@@ -256,8 +255,9 @@ static MACHINE_CONFIG_START( craft, craft_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("avr8")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(0, "avr8", 1.00)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "avr8", 0.25) // pd1/pd2/pd4/pd5/pd6/pd7 + 2k(x7) + 1k(x5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( craft )
diff --git a/src/mame/drivers/crystal.cpp b/src/mame/drivers/crystal.cpp
index ec80ebaa415..7664c0422ea 100644
--- a/src/mame/drivers/crystal.cpp
+++ b/src/mame/drivers/crystal.cpp
@@ -270,6 +270,8 @@ public:
DECLARE_WRITE32_MEMBER(trivrus_input_w);
UINT8 m_trivrus_input;
+ DECLARE_READ32_MEMBER(crzyddz2_4_r);
+
virtual void machine_start() override;
virtual void machine_reset() override;
UINT32 screen_update_crystal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -284,8 +286,6 @@ public:
void PatchReset( );
UINT16 GetVidReg( address_space &space, UINT16 reg );
void SetVidReg( address_space &space, UINT16 reg, UINT16 val );
-
-
};
void crystal_state::IntReq( int num )
@@ -389,7 +389,7 @@ WRITE32_MEMBER(crystal_state::Banksw_w)
TIMER_CALLBACK_MEMBER(crystal_state::Timercb)
{
- int which = (int)(FPTR)ptr;
+ int which = (int)(uintptr_t)ptr;
static const int num[] = { 0, 1, 9, 10 };
if (!(m_Timerctrl[which] & 2))
@@ -664,6 +664,48 @@ static ADDRESS_MAP_START( trivrus_mem, AS_PROGRAM, 32, crystal_state )
ADDRESS_MAP_END
+// Crazy Dou Di Zhu II
+// To do: HY04 (pic?) protection
+
+READ32_MEMBER(crystal_state::crzyddz2_4_r)
+{
+ return 0xffffff3f | (machine().rand() & 0xc0);
+}
+
+static ADDRESS_MAP_START( crzyddz2_mem, AS_PROGRAM, 32, crystal_state )
+ AM_RANGE(0x00000000, 0x00ffffff) AM_ROM AM_WRITENOP
+
+ AM_RANGE(0x01280000, 0x01280003) AM_WRITE(Banksw_w)
+ AM_RANGE(0x01400000, 0x0140ffff) AM_RAM AM_SHARE("nvram")
+ AM_RANGE(0x01500000, 0x01500003) AM_READ_PORT("P1_P2")
+ AM_RANGE(0x01500004, 0x01500007) AM_READ(crzyddz2_4_r)
+
+ AM_RANGE(0x01801400, 0x01801403) AM_READWRITE(Timer0_r, Timer0_w)
+ AM_RANGE(0x01801408, 0x0180140b) AM_READWRITE(Timer1_r, Timer1_w)
+ AM_RANGE(0x01801410, 0x01801413) AM_READWRITE(Timer2_r, Timer2_w)
+ AM_RANGE(0x01801418, 0x0180141b) AM_READWRITE(Timer3_r, Timer3_w)
+ AM_RANGE(0x01802004, 0x01802007) AM_READWRITE(PIO_r, PIO_w)
+
+ AM_RANGE(0x01800800, 0x01800803) AM_READWRITE(DMA0_r, DMA0_w)
+ AM_RANGE(0x01800810, 0x01800813) AM_READWRITE(DMA1_r, DMA1_w)
+
+ AM_RANGE(0x01800c04, 0x01800c07) AM_WRITE(IntAck_w)
+ AM_RANGE(0x01800000, 0x0180ffff) AM_RAM AM_SHARE("sysregs")
+ AM_RANGE(0x02000000, 0x027fffff) AM_RAM AM_SHARE("workram")
+
+ AM_RANGE(0x030000a4, 0x030000a7) AM_READWRITE(FlipCount_r, FlipCount_w)
+
+ AM_RANGE(0x03000000, 0x0300ffff) AM_RAM AM_SHARE("vidregs")
+ AM_RANGE(0x03800000, 0x03ffffff) AM_RAM AM_SHARE("textureram")
+ AM_RANGE(0x04000000, 0x047fffff) AM_RAM AM_SHARE("frameram")
+ AM_RANGE(0x04800000, 0x04800fff) AM_DEVREADWRITE("vrender", vrender0_device, vr0_snd_read, vr0_snd_write)
+
+ AM_RANGE(0x05000000, 0x05000003) AM_READWRITE(FlashCmd_r, FlashCmd_w)
+ AM_RANGE(0x05000000, 0x05ffffff) AM_ROMBANK("bank1")
+
+// AM_RANGE(0x44414F4C, 0x44414F7F) AM_RAM AM_SHARE("reset_patch")
+ADDRESS_MAP_END
+
void crystal_state::PatchReset( )
{
@@ -730,7 +772,7 @@ void crystal_state::machine_start()
int i;
for (i = 0; i < 4; i++)
- m_Timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(crystal_state::Timercb),this), (void*)(FPTR)i);
+ m_Timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(crystal_state::Timercb),this), (void*)(uintptr_t)i);
PatchReset();
@@ -1174,6 +1216,12 @@ static MACHINE_CONFIG_DERIVED( trivrus, crystal )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( crzyddz2, crystal )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_PROGRAM_MAP(crzyddz2_mem)
+MACHINE_CONFIG_END
+
+
ROM_START( crysbios )
ROM_REGION( 0x20000, "maincpu", 0 ) // bios
ROM_LOAD("mx27l1000.u14", 0x000000, 0x020000, CRC(beff39a9) SHA1(b6f6dda58d9c82273f9422c1bd623411e58982cb) )
@@ -1287,6 +1335,68 @@ ROM_START( ddz )
ROM_REGION( 0x1000000, "user2", ROMREGION_ERASEFF )
ROM_END
+/***************************************************************************
+
+Crazy Dou Di Zhu II
+Sealy, 2006
+
+PCB Layout
+----------
+
+070405-fd-VER1.2
+|--------------------------------------|
+| PAL 27C322.U36 |
+| BATTERY|
+| M59PW1282 62256 14.31818MHz |
+| W9864G66 |
+| |
+|J VRENDERZERO+ |
+|A W9864G66 |
+|M W9864G66 |
+|M 8MHz |
+|A HY04 0260F8A |
+| 28.63636MHz |
+| |
+| VR1 TLDA1311 |
+| TDA1519|
+| 18WAY VOL 10WAY |
+|--------------------------------------|
+Notes:
+ 0260F8A - unknown TQFP44
+ HY04 - rebadged DIP8 PIC - type unknown *
+ W9864G66 - Winbond 64MBit DRAM
+ M59PW1282 - ST Microelectronics 128MBit SOP44 FlashROM.
+ This is two 64MB SOP44 ROMs in one package
+
+* The pins are:
+ 1 ground
+ 2 nothing
+ 3 data (only active for 1/4 second when the playing cards or "PASS" shows in game next to each player)
+ 4 nothing
+ 5 nothing
+ 6 clock
+ 7 +5V (could be VPP for programming voltage)
+ 8 +5V
+
+***************************************************************************/
+
+// if you bypass the hy04 error, if fails with "THERE IS NO IMAGE" as it tries to load files from the flash.
+// Indeed, apart from logo.bmp, the rest of the filenames it tries to load are not in the flash.
+
+ROM_START( crzyddz2 )
+ ROM_REGION32_LE( 0x3000000, "user1", ROMREGION_ERASEFF ) // Flash
+ ROM_LOAD( "rom.u48", 0x000000, 0x1000000, CRC(e24257c4) SHA1(569d79a61ff6d35100ba5727069363146df9e0b7) )
+
+ ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASEFF )
+ ROM_COPY( "user1", 0x000000, 0x000000, 0x1000000 ) // copy flash here
+ ROM_LOAD( "27c322.u36", 0x000000, 0x0200000, CRC(b3177f39) SHA1(2a28bf8045bd2e053d88549b79fbc11f30ef9a32) ) // 1ST AND 2ND HALF IDENTICAL
+ ROM_CONTINUE( 0x000000, 0x0200000 )
+
+ ROM_REGION( 0x4280, "pic", 0 ) // hy04
+ ROM_LOAD("hy04", 0x000000, 0x4280, NO_DUMP )
+
+ ROM_REGION( 0x1000000, "user2", ROMREGION_ERASEFF ) // Unmapped flash
+ROM_END
@@ -1416,8 +1526,9 @@ GAME( 2001, crysbios, 0, crystal, crystal, driver_device, 0, ROT
GAME( 2001, crysking, crysbios, crystal, crystal, crystal_state, crysking, ROT0, "BrezzaSoft", "The Crystal of Kings", 0 )
GAME( 2001, evosocc, crysbios, crystal, crystal, crystal_state, evosocc, ROT0, "Evoga", "Evolution Soccer", 0 )
GAME( 2003, topbladv, crysbios, crystal, crystal, crystal_state, topbladv, ROT0, "SonoKong / Expotato", "Top Blade V", 0 )
-GAME( 2001, officeye, 0, crystal, officeye,crystal_state, officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", MACHINE_NOT_WORKING ) // still has some instability issues
-GAME( 2001, donghaer, 0, crystal, crystal, crystal_state, donghaer, ROT0, "Danbi", "Donggul Donggul Haerong", MACHINE_NOT_WORKING )
+GAME( 2001, officeye, 0, crystal, officeye,crystal_state, officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // still has some instability issues
+GAME( 2001, donghaer, 0, crystal, crystal, crystal_state, donghaer, ROT0, "Danbi", "Donggul Donggul Haerong", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 2006, crzyddz2, 0, crzyddz2, crystal, driver_device, 0, ROT0, "Sealy", "Crazy Dou Di Zhu II", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
GAME( 2009, trivrus, 0, trivrus, trivrus, driver_device, 0, ROT0, "AGT", "Trivia R Us (v1.07)", 0 )
// has a CF card instead of flash roms
GAME( 2004, psattack, 0, crystal, crystal, crystal_state, psattack, ROT0, "Uniana", "P's Attack", MACHINE_IS_SKELETON )
diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp
index 3f320093d01..bd49b56a9ef 100644
--- a/src/mame/drivers/csplayh5.cpp
+++ b/src/mame/drivers/csplayh5.cpp
@@ -24,15 +24,16 @@
***********************************************************************************************************/
#include "emu.h"
+#include "cpu/h8/h83002.h"
#include "cpu/m68000/m68000.h"
-#include "machine/tmp68301.h"
-#include "video/v9938.h"
#include "cpu/z80/tmpz84c011.h"
-#include "sound/dac.h"
-#include "sound/3812intf.h"
#include "machine/gen_latch.h"
#include "machine/nvram.h"
-#include "cpu/h8/h83002.h"
+#include "machine/tmp68301.h"
+#include "sound/dac.h"
+#include "sound/3812intf.h"
+#include "sound/volt_reg.h"
+#include "video/v9938.h"
class csplayh5_state : public driver_device
@@ -43,8 +44,6 @@ public:
m_maincpu(*this, "maincpu"),
m_tmp68301(*this, "tmp68301"),
m_v9958(*this, "v9958"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
m_soundlatch(*this, "soundlatch"),
m_key(*this, "KEY.%u", 0),
m_region_maincpu(*this, "maincpu"),
@@ -55,8 +54,6 @@ public:
required_device<cpu_device> m_maincpu;
required_device<tmp68301_device> m_tmp68301;
required_device<v9958_device> m_v9958;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
required_device<generic_latch_8_device> m_soundlatch;
required_ioport_array<5> m_key;
required_memory_region m_region_maincpu;
@@ -73,8 +70,6 @@ public:
DECLARE_READ8_MEMBER(soundcpu_portd_r);
DECLARE_WRITE8_MEMBER(soundcpu_porta_w);
- DECLARE_WRITE8_MEMBER(soundcpu_dac2_w);
- DECLARE_WRITE8_MEMBER(soundcpu_dac1_w);
DECLARE_WRITE8_MEMBER(soundcpu_porte_w);
DECLARE_DRIVER_INIT(mjmania);
@@ -175,13 +170,6 @@ sound HW is identical to Niyanpai
/* TMPZ84C011 PIO emulation */
-#define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC
-#if SIGNED_DAC
-#define DAC_WRITE write_signed8
-#else
-#define DAC_WRITE write_unsigned8
-#endif
-
void csplayh5_state::soundbank_w(int data)
{
m_bank1->set_base(m_region_audiocpu->base() + 0x08000 + (0x8000 * (data & 0x03)));
@@ -208,16 +196,6 @@ WRITE8_MEMBER(csplayh5_state::soundcpu_porta_w)
soundbank_w(data & 0x03);
}
-WRITE8_MEMBER(csplayh5_state::soundcpu_dac2_w)
-{
- m_dac2->DAC_WRITE(data);
-}
-
-WRITE8_MEMBER(csplayh5_state::soundcpu_dac1_w)
-{
- m_dac1->DAC_WRITE(data);
-}
-
WRITE8_MEMBER(csplayh5_state::soundcpu_porte_w)
{
if (!(data & 0x01)) csplayh5_soundclr_w(space, 0, 0);
@@ -472,8 +450,8 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
MCFG_CPU_PROGRAM_MAP(csplayh5_sound_map)
MCFG_CPU_IO_MAP(csplayh5_sound_io_map)
MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(csplayh5_state, soundcpu_porta_w))
- MCFG_TMPZ84C011_PORTB_WRITE_CB(WRITE8(csplayh5_state, soundcpu_dac2_w))
- MCFG_TMPZ84C011_PORTC_WRITE_CB(WRITE8(csplayh5_state, soundcpu_dac1_w))
+ MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac2", dac_byte_interface, write))
+ MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac1", dac_byte_interface, write))
MCFG_TMPZ84C011_PORTD_READ_CB(READ8(csplayh5_state, soundcpu_portd_r))
MCFG_TMPZ84C011_PORTE_WRITE_CB(WRITE8(csplayh5_state, soundcpu_porte_w))
MCFG_TMPZ84C011_ZC0_CB(DEVWRITELINE("audiocpu", tmpz84c011_device, trg3))
@@ -486,19 +464,19 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9958", XTAL_21_4772MHz)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-MACHINE_CONFIG_END
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
+
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/cubeqst.cpp b/src/mame/drivers/cubeqst.cpp
index 6c084f3b897..4f72111642b 100644
--- a/src/mame/drivers/cubeqst.cpp
+++ b/src/mame/drivers/cubeqst.cpp
@@ -20,12 +20,12 @@
****************************************************************************/
#include "emu.h"
-#include "cpu/m68000/m68000.h"
#include "cpu/cubeqcpu/cubeqcpu.h"
-#include "sound/dac.h"
+#include "cpu/m68000/m68000.h"
#include "machine/ldpr8210.h"
#include "machine/nvram.h"
-
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
class cubeqst_state : public driver_device
{
@@ -37,6 +37,16 @@ public:
m_linecpu(*this, "line_cpu"),
m_soundcpu(*this, "sound_cpu"),
m_screen(*this, "screen"),
+ m_dacs(*this, {
+ "rdac0", "ldac0",
+ "rdac1", "ldac1",
+ "rdac2", "ldac2",
+ "rdac3", "ldac3",
+ "rdac4", "ldac4",
+ "rdac5", "ldac5",
+ "rdac6", "ldac6",
+ "rdac7", "ldac7"
+ }),
m_generic_paletteram_16(*this, "paletteram") { }
std::unique_ptr<UINT8[]> m_depth_buffer;
@@ -48,6 +58,7 @@ public:
required_device<cquestlin_cpu_device> m_linecpu;
required_device<cquestsnd_cpu_device> m_soundcpu;
required_device<screen_device> m_screen;
+ required_device_array<dac_word_interface, 16> m_dacs;
required_shared_ptr<UINT16> m_generic_paletteram_16;
std::unique_ptr<rgb_t[]> m_colormap;
DECLARE_WRITE16_MEMBER(palette_w);
@@ -485,18 +496,10 @@ void cubeqst_state::machine_reset()
/* Called by the sound CPU emulation */
WRITE16_MEMBER( cubeqst_state::sound_dac_w )
{
- static const char *const dacs[] =
- {
- "rdac0", "ldac0",
- "rdac1", "ldac1",
- "rdac2", "ldac2",
- "rdac3", "ldac3",
- "rdac4", "ldac4",
- "rdac5", "ldac5",
- "rdac6", "ldac6",
- "rdac7", "ldac7"
- };
- machine().device<dac_device>(dacs[data & 15])->write_signed16((data & 0xfff0) ^ 0x8000);
+ /// d0 selects between 4051.1d (right, d0=1) and 4051.3d (left, d0=0)
+ /// d1-d3 select the channel
+ /// d4-d11 are sent to the 7521 dac, d11 is inverted
+ m_dacs[data & 15]->write((data >> 4) ^ 0x800);
}
@@ -542,38 +545,39 @@ static MACHINE_CONFIG_START( cubeqst, cubeqst_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
- MCFG_DAC_ADD("rdac0")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac0")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac1")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac1")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac2")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac2")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac3")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac3")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac4")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac4")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac5")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac5")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac6")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac6")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
- MCFG_DAC_ADD("rdac7")
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.125)
- MCFG_DAC_ADD("ldac7")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.125)
+ MCFG_SOUND_ADD("rdac0", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c22 (34) + tl074cn.1b (53) + r10k.rn1 (30)
+ MCFG_SOUND_ADD("ldac0", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c13 (34) + tl074cn.3b (53) + r10k.rn3 (30)
+ MCFG_SOUND_ADD("rdac1", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c21 (34) + tl074cn.1c (53) + r10k.rn2 (30)
+ MCFG_SOUND_ADD("ldac1", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c12 (34) + tl074cn.3c (53) + r10k.rn4 (30)
+ MCFG_SOUND_ADD("rdac2", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c20 (34) + tl074cn.1c (53) + r10k.rn2 (30)
+ MCFG_SOUND_ADD("ldac2", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c11 (34) + tl074cn.3c (53) + r10k.rn4 (30)
+ MCFG_SOUND_ADD("rdac3", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c19 (34) + tl074cn.1b (53) + r10k.rn1 (30)
+ MCFG_SOUND_ADD("ldac3", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c10 (34) + tl074cn.3b (53) + r10k.rn3 (30)
+ MCFG_SOUND_ADD("rdac4", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c18 (34) + tl074cn.1c (53) + r10k.rn2 (30)
+ MCFG_SOUND_ADD("ldac4", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c9 (34) + tl074cn.3c (53) + r10k.rn4 (30)
+ MCFG_SOUND_ADD("rdac5", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c17 (34) + tl074cn.1b (53) + r10k.rn1 (30)
+ MCFG_SOUND_ADD("ldac5", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c8 (34) + tl074cn.3b (53) + r10k.rn3 (30)
+ MCFG_SOUND_ADD("rdac6", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c16 (34) + tl074cn.1c (53) + r10k.rn2 (30)
+ MCFG_SOUND_ADD("ldac6", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c7 (34) + tl074cn.3c (53) + r10k.rn4 (30)
+ MCFG_SOUND_ADD("rdac7", AD7521, 0) MCFG_SOUND_ROUTE(0, "rspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c15 (34) + tl074cn.1b (53) + r10k.rn1 (30)
+ MCFG_SOUND_ADD("ldac7", AD7521, 0) MCFG_SOUND_ROUTE(0, "lspeaker", 0.125) // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c6 (34) + tl074cn.3b (53) + r10k.rn3 (30)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "rdac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac7", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp
index 010c59a762e..5532adb9171 100644
--- a/src/mame/drivers/cubo.cpp
+++ b/src/mame/drivers/cubo.cpp
@@ -522,7 +522,7 @@ CUSTOM_INPUT_MEMBER( cubo_state::cubo_input )
CUSTOM_INPUT_MEMBER( cubo_state::cd32_sel_mirror_input )
{
- UINT8 bits = m_player_ports[(int)(FPTR)param]->read();
+ UINT8 bits = m_player_ports[(int)(uintptr_t)param]->read();
return (bits & 0x20)>>5;
}
diff --git a/src/mame/drivers/cvs.cpp b/src/mame/drivers/cvs.cpp
index ee26f242769..5ff7e05dbe0 100644
--- a/src/mame/drivers/cvs.cpp
+++ b/src/mame/drivers/cvs.cpp
@@ -93,8 +93,9 @@ Todo & FIXME:
***************************************************************************/
#include "emu.h"
-#include "cpu/s2650/s2650.h"
#include "includes/cvs.h"
+#include "cpu/s2650/s2650.h"
+#include "sound/volt_reg.h"
/* Turn to 1 so all inputs are always available (this shall only be a debug feature) */
@@ -294,7 +295,7 @@ TIMER_CALLBACK_MEMBER(cvs_state::cvs_393hz_timer_cb)
if (m_dac3 != nullptr)
{
if (m_dac3_state[2])
- m_dac3->write_unsigned8(m_cvs_393hz_clock * 0xff);
+ m_dac3->write(m_cvs_393hz_clock);
}
}
@@ -331,8 +332,8 @@ WRITE8_MEMBER(cvs_state::cvs_4_bit_dac_data_w)
(m_cvs_4_bit_dac_data[2] << 2) |
(m_cvs_4_bit_dac_data[3] << 3);
- /* scale up to a full byte and output */
- m_dac2->write_unsigned8((dac_value << 4) | dac_value);
+ /* output */
+ m_dac2->write(dac_value);
}
WRITE8_MEMBER(cvs_state::cvs_unknown_w)
@@ -478,7 +479,7 @@ static ADDRESS_MAP_START( cvs_dac_cpu_map, AS_PROGRAM, 8, cvs_state )
AM_RANGE(0x0000, 0x0fff) AM_ROM
AM_RANGE(0x1000, 0x107f) AM_RAM
AM_RANGE(0x1800, 0x1800) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0x1840, 0x1840) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
+ AM_RANGE(0x1840, 0x1840) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0x1880, 0x1883) AM_WRITE(cvs_4_bit_dac_data_w) AM_SHARE("4bit_dac")
AM_RANGE(0x1884, 0x1887) AM_WRITE(cvs_unknown_w) AM_SHARE("dac3_state") /* ???? not connected to anything */
ADDRESS_MAP_END
@@ -1020,25 +1021,21 @@ static MACHINE_CONFIG_START( cvs, cvs_state )
MCFG_S2636_OFFSETS(CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- //MCFG_DAC_ADD("dac1a")
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("tms", TMS5100, XTAL_640kHz)
MCFG_TMS5110_DATA_CB(READLINE(cvs_state, speech_rom_read_bit))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 6798d43c693..bbcb02505aa 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -22,10 +22,11 @@
#include "emu.h"
+#include "includes/cyberbal.h"
#include "machine/watchdog.h"
#include "sound/ym2151.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
-#include "includes/cyberbal.h"
/*************************************
@@ -463,11 +464,11 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.60)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ MCFG_SOUND_ADD("rdac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // AM6012.6j
+ MCFG_SOUND_ADD("ldac", AM6012, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // AM6012.6j
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/d6800.cpp b/src/mame/drivers/d6800.cpp
index 8440b6aa783..3302f68dbc8 100644
--- a/src/mame/drivers/d6800.cpp
+++ b/src/mame/drivers/d6800.cpp
@@ -344,7 +344,7 @@ QUICKLOAD_LOAD_MEMBER( d6800_state, d6800 )
int quick_addr = 0x200;
int exec_addr = 0xc000;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 77bdacd178d..7f0fbba2064 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -35,7 +35,6 @@
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
-#include "sound/dac.h"
#include "sound/msm5205.h"
#include "sound/ay8910.h"
#include "video/resnet.h"
diff --git a/src/mame/drivers/dambustr.cpp b/src/mame/drivers/dambustr.cpp
index d6b2032b695..28a83d5231a 100644
--- a/src/mame/drivers/dambustr.cpp
+++ b/src/mame/drivers/dambustr.cpp
@@ -282,7 +282,7 @@ static MACHINE_CONFIG_START( dambustr, dambustr_state )
MCFG_VIDEO_START_OVERRIDE(dambustr_state,dambustr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FRAGMENT_ADD(galaxian_audio)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/darkmist.cpp b/src/mame/drivers/darkmist.cpp
index fcb6b54c6d8..9d71fa75ee8 100644
--- a/src/mame/drivers/darkmist.cpp
+++ b/src/mame/drivers/darkmist.cpp
@@ -325,7 +325,7 @@ ROM_END
void darkmist_state::decrypt_fgbgtiles(UINT8* rom, int size)
{
- dynamic_buffer buf(0x40000);
+ std::vector<UINT8> buf(0x40000);
/* data lines */
for (int i = 0;i < size/2;i++)
{
@@ -350,7 +350,7 @@ void darkmist_state::decrypt_fgbgtiles(UINT8* rom, int size)
void darkmist_state::decrypt_gfx()
{
- dynamic_buffer buf(0x40000);
+ std::vector<UINT8> buf(0x40000);
UINT8 *rom;
int size;
int i;
@@ -416,7 +416,7 @@ DRIVER_INIT_MEMBER(darkmist_state,darkmist)
{
int i, len;
UINT8 *ROM = memregion("maincpu")->base();
- dynamic_buffer buffer(0x10000);
+ std::vector<UINT8> buffer(0x10000);
decrypt_gfx();
diff --git a/src/mame/drivers/dassault.cpp b/src/mame/drivers/dassault.cpp
index b334031a98e..1e76ca2249f 100644
--- a/src/mame/drivers/dassault.cpp
+++ b/src/mame/drivers/dassault.cpp
@@ -1050,7 +1050,7 @@ DRIVER_INIT_MEMBER(dassault_state,dassault)
{
const UINT8 *src = memregion("gfx1")->base();
UINT8 *dst = memregion("gfx2")->base();
- dynamic_buffer tmp(0x80000);
+ std::vector<UINT8> tmp(0x80000);
/* Playfield 4 also has access to the char graphics, make things easier
by just copying the chars to both banks (if I just used a different gfx
@@ -1065,7 +1065,7 @@ DRIVER_INIT_MEMBER(dassault_state,thndzone)
{
const UINT8 *src = memregion("gfx1")->base();
UINT8 *dst = memregion("gfx2")->base();
- dynamic_buffer tmp(0x80000);
+ std::vector<UINT8> tmp(0x80000);
/* Playfield 4 also has access to the char graphics, make things easier
by just copying the chars to both banks (if I just used a different gfx
diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp
index c1766d41585..e221d23e27b 100644
--- a/src/mame/drivers/ddayjlc.cpp
+++ b/src/mame/drivers/ddayjlc.cpp
@@ -669,7 +669,7 @@ DRIVER_INIT_MEMBER(ddayjlc_state,ddayjlc)
{
UINT32 oldaddr, newadr, length,j;
UINT8 *src, *dst;
- dynamic_buffer temp(0x10000);
+ std::vector<UINT8> temp(0x10000);
src = &temp[0];
dst = memregion("gfx1")->base();
length = memregion("gfx1")->bytes();
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp
index 723e051c55a..be319f612bb 100644
--- a/src/mame/drivers/deco156.cpp
+++ b/src/mame/drivers/deco156.cpp
@@ -658,7 +658,7 @@ void deco156_state::descramble_sound( const char *tag )
{
UINT8 *rom = memregion(tag)->base();
int length = memregion(tag)->bytes();
- dynamic_buffer buf1(length);
+ std::vector<UINT8> buf1(length);
UINT32 x;
for (x = 0; x < length; x++)
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index 5408597756a..a84589e5848 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -4042,7 +4042,7 @@ DRIVER_INIT_MEMBER(dragngun_state,lockload)
DRIVER_INIT_MEMBER(deco32_state,tattass)
{
UINT8 *RAM = memregion("gfx1")->base();
- dynamic_buffer tmp(0x80000);
+ std::vector<UINT8> tmp(0x80000);
/* Reorder bitplanes to make decoding easier */
memcpy(&tmp[0],RAM+0x80000,0x80000);
@@ -4069,7 +4069,7 @@ DRIVER_INIT_MEMBER(deco32_state,tattass)
DRIVER_INIT_MEMBER(deco32_state,nslasher)
{
UINT8 *RAM = memregion("gfx1")->base();
- dynamic_buffer tmp(0x80000);
+ std::vector<UINT8> tmp(0x80000);
/* Reorder bitplanes to make decoding easier */
memcpy(&tmp[0],RAM+0x80000,0x80000);
diff --git a/src/mame/drivers/deco_mlc.cpp b/src/mame/drivers/deco_mlc.cpp
index 0365d844625..bcb9c107fec 100644
--- a/src/mame/drivers/deco_mlc.cpp
+++ b/src/mame/drivers/deco_mlc.cpp
@@ -848,7 +848,7 @@ void deco_mlc_state::descramble_sound( )
/* the same as simpl156 / heavy smash? */
UINT8 *rom = memregion("ymz")->base();
int length = memregion("ymz")->bytes();
- dynamic_buffer buf1(length);
+ std::vector<UINT8> buf1(length);
UINT32 x;
diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp
index f34f84d7b98..49b3f909f91 100644
--- a/src/mame/drivers/decocass.cpp
+++ b/src/mame/drivers/decocass.cpp
@@ -249,6 +249,42 @@ static INPUT_PORTS_START( csuperas )
/* Switches 6, 7 & 8 are listed as "Country Code" A through F and "Don't Change" */
INPUT_PORTS_END
+
+static INPUT_PORTS_START( cocean1a ) /* 10 */
+ PORT_INCLUDE( decocass )
+
+ PORT_MODIFY("DSW1") /* Switches 5 and 6 defined as blank/2100/2100/2100 and "Don't change" */
+ PORT_DIPNAME( 0x07, 0x07, "Number of 1 Coin Credit") PORT_DIPLOCATION("SW1:1,2,3") /* Credits for 1 coin */
+ PORT_DIPSETTING( 0x07, "1")
+ PORT_DIPSETTING( 0x06, "2")
+ PORT_DIPSETTING( 0x05, "5")
+ PORT_DIPSETTING( 0x04, "10")
+ PORT_DIPSETTING( 0x03, "20")
+ PORT_DIPSETTING( 0x02, "30")
+ PORT_DIPSETTING( 0x01, "40")
+ PORT_DIPSETTING( 0x00, "50")
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( None ) ) PORT_DIPLOCATION("SW1:4") /* Default is "Off" and shown as "Don't change" */
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( None ) )
+
+ PORT_MODIFY("DSW2")
+ PORT_DIPNAME( 0x03, 0x03, "Key Switch Credit" ) PORT_DIPLOCATION("SW2:1,2") /* Unknown */
+ PORT_DIPSETTING( 0x03, "1 Coin 10 Credits" )
+ PORT_DIPSETTING( 0x02, "1 Coin 20 Credits" )
+ PORT_DIPSETTING( 0x01, "1 Coin 50 Credits" )
+ PORT_DIPSETTING( 0x00, "1 Coin 100 Credits" )
+ PORT_DIPNAME( 0x04, 0x04, "Game Select" ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x04, "1 to 8 Lines" )
+ PORT_DIPSETTING( 0x00, "Center Line" )
+ PORT_DIPNAME( 0x08, 0x08, "Background Music" ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, "Pay Out %" ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x10, "Payout 75%")
+ PORT_DIPSETTING( 0x00, "Payout 85%")
+ /* Switches 6 to 8 are shown as completly blank and "Don't change" */
+INPUT_PORTS_END
+
static INPUT_PORTS_START( clocknch )
PORT_INCLUDE( decocass )
@@ -816,6 +852,13 @@ static MACHINE_CONFIG_DERIVED( csuperas, decocass )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( cocean1a, decocass ) /* 10 */
+
+ /* basic machine hardware */
+ MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cocean1a)
+MACHINE_CONFIG_END
+
+
static MACHINE_CONFIG_DERIVED( clocknch, decocass )
/* basic machine hardware */
@@ -991,46 +1034,106 @@ static MACHINE_CONFIG_DERIVED( cflyball, decocass )
MACHINE_CONFIG_END
-#define DECOCASS_COMMON_ROMS \
- ROM_REGION( 0x10000, "audiocpu", 0 ) \
- ROM_LOAD( "v1-.5a", 0xf800, 0x0800, CRC(b66b2c2a) SHA1(0097f38beb4872e735e560148052e258a26b08fd) ) /* from RMS-8 board: 2716 eprom @5A w/V1- label, contains audio cpu code */ \
-\
- ROM_REGION( 0x10000, "mcu", 0 ) /* 4k for the 8041 MCU (actually 1K ROM + 64 bytes RAM @ 0x800) */ \
- ROM_LOAD( "cassmcu.1c", 0x0000, 0x0400, CRC(a6df18fd) SHA1(1f9ea47e372d31767c936c15852b43df2b0ee8ff) ) /* from B10-B board: "NEC // JAPAN // X1202D-108 // D8041C 535" 8041 MCU @1C, handles cassette and other stuff; This info needs additional verification, as the d8041-535 mcu has not been dumped yet to prove code is the same. */ \
-\
- ROM_REGION( 0x00060, "proms", 0 ) /* PROMS */ \
- ROM_LOAD( "v2.3m", 0x0000, 0x0020, CRC(238fdb40) SHA1(b88e8fabb82092105c3828154608ea067acbf2e5) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3M w/'V2' stamp, unknown purpose (gfx related: row/interrupt/vblank related? vertical counter related) */ \
- ROM_LOAD( "v4.10d", 0x0020, 0x0020, CRC(3b5836b4) SHA1(b630bb277d9ec09d46ef26b944014dd6165b35d8) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @10D w/'V4' stamp, unknown purpose (gfx related: tile banking? horizontal counter related) */ \
- ROM_LOAD( "v3.3j", 0x0040, 0x0020, CRC(51eef657) SHA1(eaedce5caf55624ad6ae706aedf82c5717c60f1f) ) /* from RMS-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3J w/'V3' stamp, handles DRAM banking and timing */
-
-#define DECOCASS_BIOS_A_ROMS \
- /* v0a.7e, New boardset bios, revision A */ \
-\
+#define ROM_LOAD_BIOS(bios,name,offset,length,hash) \
+ ROMX_LOAD(name, offset, length, hash, ROM_BIOS(bios+1)) /* Note '+1' */
+
+
+/************ Version A bios roms *************/
+
+/* v0a.7e, New boardset bios, revision A */
+#define DECOCASS_BIOS_A_MAINCPU \
+ ROM_SYSTEM_BIOS( 0, "a", "Bios A (Japan)" ) \
+ ROM_LOAD_BIOS( 0, "v0a-.7e", 0xf000, 0x1000, CRC(3d33ac34) SHA1(909d59e7a993affd10224402b4370e82a5f5545c) ) /* from RMS-8 board: 2732 EPROM @7E w/'V0A-' label (has HDRA01HDR string inside it), bios code */
+#define DECOCASS_BIOS_A_AUDIOCPU \
+ ROM_LOAD_BIOS( 0, "v1-.5a", 0xf800, 0x0800, CRC(b66b2c2a) SHA1(0097f38beb4872e735e560148052e258a26b08fd) ) /* from RMS-8 board: 2716 eprom @5A w/V1- label, contains audio cpu code */
+#define DECOCASS_BIOS_A_PROMS \
+ ROM_LOAD_BIOS( 0, "v2.3m", 0x0000, 0x0020, CRC(238fdb40) SHA1(b88e8fabb82092105c3828154608ea067acbf2e5) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3M w/'V2' stamp, unknown purpose (gfx related: row/interrupt/vblank related? vertical counter related) */ \
+ ROM_LOAD_BIOS( 0, "v4.10d", 0x0020, 0x0020, CRC(3b5836b4) SHA1(b630bb277d9ec09d46ef26b944014dd6165b35d8) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @10D w/'V4' stamp, unknown purpose (gfx related: tile banking? horizontal counter related) */ \
+ ROM_LOAD_BIOS( 0, "v3.3j", 0x0040, 0x0020, CRC(51eef657) SHA1(eaedce5caf55624ad6ae706aedf82c5717c60f1f) ) /* from RMS-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3J w/'V3' stamp, handles DRAM banking and timing */
+
+/* Old boardset bios, version A for Japan, 2x 2716 EPROM, MD labbeled as RMS-3D and MT as RMS-3T, region code (letter) is (not always) inserted after "-" */ \
+#define DECOCASS_BIOS_A0_MAINCPU \
+ ROM_SYSTEM_BIOS( 1, "a0", "Bios A (Japan, older)" ) \
+ ROM_LOAD_BIOS( 1, "dsp-3_p0-a.m9", 0xf000, 0x0800, CRC(2541e34b) SHA1(4f983513dbae1350c83a433dea77a4465748b9c6) ) \
+ ROM_LOAD_BIOS( 1, "dsp-3_p1-.l9", 0xf800, 0x0800, CRC(3bfff5f3) SHA1(4e9437cb1b76d64da6b37f01bd6e879fb399e8ce) )
+#define DECOCASS_BIOS_A0_AUDIOCPU \
+ ROM_LOAD_BIOS( 1, "rms-3_p2-.c9", 0xfc00, 0x0400, CRC(6c4a891f) SHA1(5c00cf8b1accfdbb1d61e9b3f6db1594dfbc608b) ) /* 2708 EPROM, contains audio cpu code */
+#define DECOCASS_BIOS_A0_PROMS \
+ ROM_LOAD_BIOS( 1, "dsp-3_p3-.e5", 0x0000, 0x0020, CRC(539a5a64) SHA1(7b7d3cc58ac6f95242240c97046e770d2fd20c96) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, unknown purpose (gfx related: row/interrupt/vblank related? vertical counter related) */ \
+ ROM_LOAD_BIOS( 1, "rms-3_p4-.f6", 0x0020, 0x0020, CRC(9014c0fd) SHA1(7405d39a5f4fcad821448ddaf6bd4e27c0c9e145) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, unknown purpose (gfx related: tile banking? horizontal counter related) */ \
+ ROM_LOAD_BIOS( 1, "dsp-3_p5-.m4", 0x0040, 0x0020, CRC(e52089a0) SHA1(d85c17809b089c6977ee9571f976af6f107fd4d3) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, handles DRAM banking and timing */ \
+
+/************ Version B bios roms *************/
+
+/* rms8.7e, New boardset bios, revision B */ \
+#define DECOCASS_BIOS_B_MAINCPU \
+ ROM_SYSTEM_BIOS( 2, "b", "Bios B (USA)" ) \
+ ROM_LOAD_BIOS( 2, "v0b-.7e", 0xf000, 0x1000, CRC(23d929b7) SHA1(063f83020ba3d6f43ab8471f95ca919767b93aa4) ) /* from RMS-8 board: 2732 EPROM @7E w/'V0B-' label (has HDRB01HDR string inside it), bios code */
+#define DECOCASS_BIOS_B_AUDIOCPU \
+ ROM_LOAD_BIOS( 2, "v1-.5a", 0xf800, 0x0800, CRC(b66b2c2a) SHA1(0097f38beb4872e735e560148052e258a26b08fd) ) /* from RMS-8 board: 2716 eprom @5A w/V1- label, contains audio cpu code */
+#define DECOCASS_BIOS_B_PROMS \
+ ROM_LOAD_BIOS( 2, "v2.3m", 0x0000, 0x0020, CRC(238fdb40) SHA1(b88e8fabb82092105c3828154608ea067acbf2e5) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3M w/'V2' stamp, unknown purpose (gfx related: row/interrupt/vblank related? vertical counter related) */ \
+ ROM_LOAD_BIOS( 2, "v4.10d", 0x0020, 0x0020, CRC(3b5836b4) SHA1(b630bb277d9ec09d46ef26b944014dd6165b35d8) ) /* from DSP-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @10D w/'V4' stamp, unknown purpose (gfx related: tile banking? horizontal counter related) */ \
+ ROM_LOAD_BIOS( 2, "v3.3j", 0x0040, 0x0020, CRC(51eef657) SHA1(eaedce5caf55624ad6ae706aedf82c5717c60f1f) ) /* from RMS-8 board: M3-7603-5 (82s123 equiv, 32x8 TS) PROM @3J w/'V3' stamp, handles DRAM banking and timing */
+
+/* Old boardset bios, version B for USA, 2x 2716 EPROM, MD labbeled as RMS-3D and MT as RMS-3T, region code (letter) is (not always) inserted after "-" */ \
+/* dsp3.p0b/p1b, Old boardset bios, revision B?; from DSP-3 board? has HDRB01x string in it, 2x 2716 EPROM? */ \
+#define DECOCASS_BIOS_B0_MAINCPU \
+ ROM_SYSTEM_BIOS( 3, "b0", "Bios B (USA, older)" ) \
+ ROM_LOAD_BIOS( 3, "dsp-3_p0-b.m9", 0xf000, 0x0800, CRC(b67a91d9) SHA1(681c040be0f0ed1ba0a50161b36d0ad8e1c8c5cb) ) \
+ ROM_LOAD_BIOS( 3, "dsp-3_p1-.l9", 0xf800, 0x0800, CRC(3bfff5f3) SHA1(4e9437cb1b76d64da6b37f01bd6e879fb399e8ce) )
+#define DECOCASS_BIOS_B0_AUDIOCPU \
+ ROM_LOAD_BIOS( 3, "rms-3_p2-.c9", 0xfc00, 0x0400, CRC(6c4a891f) SHA1(5c00cf8b1accfdbb1d61e9b3f6db1594dfbc608b) ) /* 2708 EPROM, contains audio cpu code */
+#define DECOCASS_BIOS_B0_PROMS \
+ ROM_LOAD_BIOS( 3, "dsp-3_p3-.e5", 0x0000, 0x0020, CRC(539a5a64) SHA1(7b7d3cc58ac6f95242240c97046e770d2fd20c96) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, unknown purpose (gfx related: row/interrupt/vblank related? vertical counter related) */ \
+ ROM_LOAD_BIOS( 3, "rms-3_p4-.f6", 0x0020, 0x0020, CRC(9014c0fd) SHA1(7405d39a5f4fcad821448ddaf6bd4e27c0c9e145) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, unknown purpose (gfx related: tile banking? horizontal counter related) */ \
+ ROM_LOAD_BIOS( 3, "dsp-3_p5-.m4", 0x0040, 0x0020, CRC(e52089a0) SHA1(d85c17809b089c6977ee9571f976af6f107fd4d3) ) /* M3-7603-5 (82s123 equiv, 32x8 TS) PROM, handles DRAM banking and timing */ \
+
+/************ Common MCU bios rom *************/
+
+#define DECOCASS_BIOS_MCU \
+ ROM_LOAD( "cassmcu.1c", 0x0000, 0x0400, CRC(a6df18fd) SHA1(1f9ea47e372d31767c936c15852b43df2b0ee8ff) ) /* from B10-B board: "NEC // JAPAN // X1202D-108 // D8041C 535" 8041 MCU @1C, handles cassette and other stuff; This info needs additional verification, as the d8041-535 mcu has not been dumped yet to prove code is the same. */
+
+
+
+#define DECOCASS_BIOS_MAIN \
ROM_REGION( 0x10000, "maincpu", 0 ) \
- ROM_LOAD( "v0a-.7e", 0xf000, 0x1000, CRC(3d33ac34) SHA1(909d59e7a993affd10224402b4370e82a5f5545c) ) /* from RMS-8 board: 2732 EPROM @7E w/'V0A-' label (has HDRA01HDR string inside it), bios code */ \
-\
- DECOCASS_COMMON_ROMS
+ DECOCASS_BIOS_A_MAINCPU \
+ DECOCASS_BIOS_A0_MAINCPU \
+ DECOCASS_BIOS_B_MAINCPU \
+ DECOCASS_BIOS_B0_MAINCPU \
+ ROM_REGION( 0x10000, "audiocpu", 0 ) \
+ DECOCASS_BIOS_A_AUDIOCPU \
+ DECOCASS_BIOS_A0_AUDIOCPU \
+ DECOCASS_BIOS_B_AUDIOCPU \
+ DECOCASS_BIOS_B0_AUDIOCPU \
+ ROM_REGION( 0x00060, "proms", 0 ) \
+ DECOCASS_BIOS_A_PROMS \
+ DECOCASS_BIOS_A0_PROMS \
+ DECOCASS_BIOS_B_PROMS \
+ DECOCASS_BIOS_B0_PROMS \
+ ROM_REGION( 0x10000, "mcu", 0 ) /* 4k for the 8041 MCU (actually 1K ROM + 64 bytes RAM @ 0x800) */ \
+ DECOCASS_BIOS_MCU
-#define DECOCASS_BIOS_B_ROMS \
- /* rms8.7e, New boardset bios, revision B */ \
-\
- ROM_REGION( 0x10000, "maincpu", 0 ) \
- ROM_LOAD( "v0b-.7e", 0xf000, 0x1000, CRC(23d929b7) SHA1(063f83020ba3d6f43ab8471f95ca919767b93aa4) ) /* from RMS-8 board: 2732 EPROM @7E w/'V0B-' label (has HDRB01HDR string inside it), bios code */ \
-\
- DECOCASS_COMMON_ROMS
-#define DECOCASS_BIOS_B2_ROMS \
- /* dsp3.p0b/p1b, Old boardset bios, revision B?; from DSP-3 board? has HDRB01x string in it, 2x 2716 EPROM? */ \
-\
- ROM_REGION( 0x10000, "maincpu", 0 ) \
- ROM_LOAD( "dsp3.p0b", 0xf000, 0x0800, CRC(b67a91d9) SHA1(681c040be0f0ed1ba0a50161b36d0ad8e1c8c5cb) ) \
- ROM_LOAD( "dsp3.p1b", 0xf800, 0x0800, CRC(3bfff5f3) SHA1(4e9437cb1b76d64da6b37f01bd6e879fb399e8ce) ) \
-\
- DECOCASS_COMMON_ROMS
+#define DECOCASS_BIOS_B_ROMS \
+ DECOCASS_BIOS_MAIN \
+ ROM_DEFAULT_BIOS( "b" )
-ROM_START( decocass )
- DECOCASS_BIOS_B_ROMS
+#define DECOCASS_BIOS_BO_ROMS \
+ DECOCASS_BIOS_MAIN \
+ ROM_DEFAULT_BIOS( "b0" )
+
+#define DECOCASS_BIOS_A_ROMS \
+ DECOCASS_BIOS_MAIN \
+ ROM_DEFAULT_BIOS( "a" )
+#define DECOCASS_BIOS_AO_ROMS \
+ DECOCASS_BIOS_MAIN \
+ ROM_DEFAULT_BIOS( "a0" )
+
+ROM_START( decocass )
+ DECOCASS_BIOS_MAIN
ROM_END
/* The Following use Dongle Type 1 (DE-0061)
@@ -1102,6 +1205,27 @@ ROM_START( csuperas )
ROM_LOAD( "csuperas.cas", 0x0000, 0x8000, CRC(fabcd07f) SHA1(4070c668ad6725f0710cf7fe6df0d5f80272a449) )
ROM_END
+/* 10 Ocean to Ocean (World) */
+ROM_START( cocean1a ) // version MD 1-A-0 verified, 061 blocks, decrypted main data CRC(b97ab3cb)
+ DECOCASS_BIOS_AO_ROMS
+
+ ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */
+ ROM_LOAD( "dt-1101-a-0.cas", 0x0000, 0x3e00, CRC(db8ab848) SHA1(2b2acb249bf66e6c5e15d89b7ebd294ed2eee066) )
+
+ ROM_REGION( 0x00020, "dongle", 0 ) /* dongle data */
+ ROM_LOAD( "dp-1100-a.rom", 0x0000, 0x0020, CRC(1bc9fccb) SHA1(ffc59c7660d5c87a8deca294f80260b6bc7c3027) )
+ROM_END
+
+ROM_START( cocean6b ) // version MD 10-B-0 not verified, 068 blocks, decrypted main data CRC(410d1f19)
+ DECOCASS_BIOS_BO_ROMS
+
+ ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */
+ ROM_LOAD( "dt-1106-b-0.cas", 0x0000, 0x4500, CRC(fa6ffc95) SHA1(95f881503aa8cd97d04b327abeb68891d053563f) )
+
+ ROM_REGION( 0x00020, "dongle", 0 ) /* dongle data */
+ ROM_LOAD( "dp-1100-b.rom", 0x0000, 0x0020, CRC(e09ae5de) SHA1(7dec067d0739a6dad2607132641b66880a5b7751) )
+ROM_END
+
/* 11 Lock'n'Chase */
ROM_START( clocknch )
DECOCASS_BIOS_B_ROMS
@@ -1651,65 +1775,66 @@ DRIVER_INIT_MEMBER(decocass_state,cdsteljn)
}
/* -- */ GAME( 1981, decocass, 0, decocass, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "DECO Cassette System", MACHINE_IS_BIOS_ROOT )
-/* -- */ GAME( 1981, ctsttape, decocass, ctsttape, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Test Tape (DECO Cassette)", 0 )
-/* 01 */ GAME( 1980, chwy, decocass, chwy, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Highway Chase (DECO Cassette)", 0 )
+/* -- */ GAME( 1981, ctsttape, decocass, ctsttape, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Test Tape (DECO Cassette) (US)", 0 )
+/* 01 */ GAME( 1980, chwy, decocass, chwy, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Highway Chase (DECO Cassette) (US)", 0 )
/* 02 */ // 1980.12 Sengoku Ninjatai
-/* 03 */ GAME( 1981, cmanhat, decocass, cmanhat, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Manhattan (DECO Cassette)", MACHINE_IMPERFECT_GRAPHICS )
-/* 04 */ GAME( 1981, cterrani, decocass, cterrani, cterrani, decocass_state, decocass, ROT270, "Data East Corporation", "Terranean (DECO Cassette)", 0 )
+/* 03 */ GAME( 1981, cmanhat, decocass, cmanhat, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Manhattan (DECO Cassette) (Japan)", MACHINE_IMPERFECT_GRAPHICS )
+/* 04 */ GAME( 1981, cterrani, decocass, cterrani, cterrani, decocass_state, decocass, ROT270, "Data East Corporation", "Terranean (DECO Cassette) (US)", 0 )
/* 05 */ // 1981.?? Missile Sprinter
/* 06 */ // 1980.12 Nebula
-/* 07 */ GAME( 1981, castfant, decocass, castfant, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Astro Fantasia (DECO Cassette)", 0 )
+/* 07 */ GAME( 1981, castfant, decocass, castfant, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Astro Fantasia (DECO Cassette) (US)", 0 )
/* 08 */ // 1981.03 The Tower
-/* 09 */ GAME( 1981, csuperas, decocass, csuperas, csuperas, decocass_state, decocass, ROT270, "Data East Corporation", "Super Astro Fighter (DECO Cassette)", 0 )
-/* 10 */ // 1981.?? Ocean to Ocean (medal)
-/* 11 */ GAME( 1981, clocknch, decocass, clocknch, clocknch, decocass_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette)", 0 )
+/* 09 */ GAME( 1981, csuperas, decocass, csuperas, csuperas, decocass_state, decocass, ROT270, "Data East Corporation", "Super Astro Fighter (DECO Cassette) (US)", 0 )
+/* 10 */ GAME( 1981, cocean1a, decocass, cocean1a, cocean1a, decocass_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.1,Japan)", 0 ) /* no lever, 1P/2P buttons used to switch player, cocktail mode not emulated */
+/* */ GAME( 1981, cocean6b, cocean1a, cocean1a, cocean1a, decocass_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.6,US)", 0 ) /* lever, 1P/2P buttons used to switch player, cocktail mode not emulated */
+/* 11 */ GAME( 1981, clocknch, decocass, clocknch, clocknch, decocass_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette) (US)", 0 )
/* 12 */ // 1981.08 Flash Boy/DECO Kid
-/* 13 */ GAME( 1981, cprogolf, decocass, cprogolf, cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette)", 0 )
-/* */ GAME( 1981, cprogolfj, cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette, Japan)", 0 )
-/* 14 */ GAME( 1981, cdsteljn, decocass, cdsteljn, cdsteljn, decocass_state, cdsteljn, ROT270, "Data East Corporation", "DS Telejan (DECO Cassette, Japan)", 0 )
-/* 15 */ GAME( 1981, cluckypo, decocass, cluckypo, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Lucky Poker (DECO Cassette)", 0 )
-/* 16 */ GAME( 1981, ctisland, decocass, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette, set 1)", 0 )
-/* */ GAME( 1981, ctisland2, ctisland, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette, set 2)", 0 )
-/* */ GAME( 1981, ctisland3, ctisland, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette, set 3)", MACHINE_NOT_WORKING ) /* Different Bitswap? */
+/* 13 */ GAME( 1981, cprogolf, decocass, cprogolf, cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (US)", 0 )
+/* */ GAME( 1981, cprogolfj, cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (Japan)", 0 )
+/* 14 */ GAME( 1981, cdsteljn, decocass, cdsteljn, cdsteljn, decocass_state, cdsteljn, ROT270, "Data East Corporation", "DS Telejan (DECO Cassette) (Japan)", 0 )
+/* 15 */ GAME( 1981, cluckypo, decocass, cluckypo, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Lucky Poker (DECO Cassette) (US)", 0 )
+/* 16 */ GAME( 1981, ctisland, decocass, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 1)", 0 )
+/* */ GAME( 1981, ctisland2, ctisland, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 2)", 0 )
+/* */ GAME( 1981, ctisland3, ctisland, ctisland, decocass, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (unk)", MACHINE_NOT_WORKING ) /* Different Bitswap, region not verified */
/* 17 */ // 1981.10 Bobbitto
-/* 18 */ GAME( 1982, cexplore, decocass, cexplore, cexplore, decocass_state, decocass, ROT270, "Data East Corporation", "Explorer (DECO Cassette)", MACHINE_NOT_WORKING )
-/* 19 */ GAME( 1982, cdiscon1, decocass, cdiscon1, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Disco No.1 (DECO Cassette)", 0 )
-/* */ GAME( 1982, csweetht, cdiscon1, cdiscon1, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Sweet Heart (DECO Cassette)", 0 )
-/* 20 */ GAME( 1982, ctornado, decocass, ctornado, ctornado, decocass_state, decocass, ROT270, "Data East Corporation", "Tornado (DECO Cassette)", 0 )
-/* 21 */ GAME( 1982, cmissnx, decocass, cmissnx, cmissnx, decocass_state, decocass, ROT270, "Data East Corporation", "Mission-X (DECO Cassette)", 0 )
-/* 22 */ GAME( 1982, cptennis, decocass, cptennis, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette)", 0 )
-/* 23 */ GAME( 1982, cprogolf18,cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "18 Challenge Pro Golf (DECO Cassette, Japan)", 0 ) // 1982.?? 18 Hole Pro Golf
+/* 18 */ GAME( 1982, cexplore, decocass, cexplore, cexplore, decocass_state, decocass, ROT270, "Data East Corporation", "Explorer (DECO Cassette) (US)", MACHINE_NOT_WORKING )
+/* 19 */ GAME( 1982, cdiscon1, decocass, cdiscon1, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Disco No.1 (DECO Cassette) (US)", 0 )
+/* */ GAME( 1982, csweetht, cdiscon1, cdiscon1, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Sweet Heart (DECO Cassette) (US)", 0 )
+/* 20 */ GAME( 1982, ctornado, decocass, ctornado, ctornado, decocass_state, decocass, ROT270, "Data East Corporation", "Tornado (DECO Cassette) (US)", 0 )
+/* 21 */ GAME( 1982, cmissnx, decocass, cmissnx, cmissnx, decocass_state, decocass, ROT270, "Data East Corporation", "Mission-X (DECO Cassette) (US)", 0 )
+/* 22 */ GAME( 1982, cptennis, decocass, cptennis, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette) (US)", 0 )
+/* 23 */ GAME( 1982, cprogolf18,cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "18 Challenge Pro Golf (DECO Cassette) (Japan)", 0 ) // 1982.?? 18 Hole Pro Golf
/* 24 */ // 1982.07 Tsumego Kaisyou
-/* 25 */ GAME( 1982, cadanglr, decocass, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Angler Dangler (DECO Cassette)", 0 )
-/* 25 */ GAME( 1982, cfishing, cadanglr, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Fishing (DECO Cassette, Japan)", 0 )
-/* 26 */ GAME( 1983, cbtime, decocass, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Burger Time (DECO Cassette)", 0 )
-/* */ GAME( 1982, chamburger,cbtime, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Hamburger (DECO Cassette, Japan)", 0 )
-/* 27 */ GAME( 1982, cburnrub, decocass, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette, set 1)", 0 )
-/* */ GAME( 1982, cburnrub2, cburnrub, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette, set 2)", 0 )
-/* */ GAME( 1982, cbnj, cburnrub, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Bump 'n' Jump (DECO Cassette, Japan)", 0 )
-/* 28 */ GAME( 1983, cgraplop, decocass, cgraplop, cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Cluster Buster (DECO Cassette)", 0 )
-/* */ GAME( 1983, cgraplop2, cgraplop, cgraplop2,cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Graplop (no title screen) (DECO Cassette)", 0 ) // a version with title screen exists, see reference videos
-/* 29 */ GAME( 1983, clapapa, decocass, clapapa, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' / La-Pa-Pa (DECO Cassette)" , 0) /* Displays 'La-Pa-Pa during attract */
-/* */ GAME( 1983, clapapa2, clapapa, clapapa, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' (DECO Cassette)" , 0) /* Displays 'Rootin' Tootin' during attract */
-/* 30 */ GAME( 1983, cskater, decocass, cskater, cskater, decocass_state, decocass, ROT270, "Data East Corporation", "Skater (DECO Cassette, Japan)", 0 )
-/* 31 */ GAME( 1983, cprobowl, decocass, cprobowl, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Bowling (DECO Cassette)", 0 )
-/* 32 */ GAME( 1983, cnightst, decocass, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette, set 1)", 0 )
-/* */ GAME( 1983, cnightst2, cnightst, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette, set 2)", 0 )
-/* 33 */ GAME( 1983, cpsoccer, decocass, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette)", 0 )
-/* */ GAME( 1983, cpsoccerj, cpsoccer, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette, Japan)", 0 )
-/* 34 */ GAME( 1983, csdtenis, decocass, csdtenis, csdtenis, decocass_state, decocass, ROT270, "Data East Corporation", "Super Doubles Tennis (DECO Cassette, Japan)", MACHINE_WRONG_COLORS )
-/* 35 */ GAME( 1985, cflyball, decocass, cflyball, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Flying Ball (DECO Cassette)", 0 )
+/* 25 */ GAME( 1982, cadanglr, decocass, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Angler Dangler (DECO Cassette) (US)", 0 )
+/* 25 */ GAME( 1982, cfishing, cadanglr, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Fishing (DECO Cassette) (Japan)", 0 )
+/* 26 */ GAME( 1983, cbtime, decocass, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Burger Time (DECO Cassette) (US)", 0 )
+/* */ GAME( 1982, chamburger,cbtime, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Hamburger (DECO Cassette) (Japan)", 0 )
+/* 27 */ GAME( 1982, cburnrub, decocass, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 1)", 0 )
+/* */ GAME( 1982, cburnrub2, cburnrub, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 2)", 0 )
+/* */ GAME( 1982, cbnj, cburnrub, cburnrub, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Bump 'n' Jump (DECO Cassette) (US)", 0 ) // was marked 'Japan' but uses the type B (US) bios
+/* 28 */ GAME( 1983, cgraplop, decocass, cgraplop, cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Cluster Buster (DECO Cassette) (US)", 0 )
+/* */ GAME( 1983, cgraplop2, cgraplop, cgraplop2,cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Graplop (no title screen) (DECO Cassette) (US)", 0 ) // a version with title screen exists, see reference videos
+/* 29 */ GAME( 1983, clapapa, decocass, clapapa, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' / La-Pa-Pa (DECO Cassette) (US)" , 0) /* Displays 'La-Pa-Pa during attract */
+/* */ GAME( 1983, clapapa2, clapapa, clapapa, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' (DECO Cassette) (US)" , 0) /* Displays 'Rootin' Tootin' during attract */
+/* 30 */ GAME( 1983, cskater, decocass, cskater, cskater, decocass_state, decocass, ROT270, "Data East Corporation", "Skater (DECO Cassette) (Japan)", 0 )
+/* 31 */ GAME( 1983, cprobowl, decocass, cprobowl, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Bowling (DECO Cassette) (US)", 0 )
+/* 32 */ GAME( 1983, cnightst, decocass, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 1)", 0 )
+/* */ GAME( 1983, cnightst2, cnightst, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 2)", 0 )
+/* 33 */ GAME( 1983, cpsoccer, decocass, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (US)", 0 )
+/* */ GAME( 1983, cpsoccerj, cpsoccer, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (Japan)", 0 )
+/* 34 */ GAME( 1983, csdtenis, decocass, csdtenis, csdtenis, decocass_state, decocass, ROT270, "Data East Corporation", "Super Doubles Tennis (DECO Cassette) (Japan)", MACHINE_WRONG_COLORS )
+/* 35 */ GAME( 1985, cflyball, decocass, cflyball, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Flying Ball (DECO Cassette) (US)", 0 )
/* 36 */ // 1984.04 Genesis/Boomer Rang'r
-/* 37 */ GAME( 1983, czeroize, decocass, czeroize, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Zeroize (DECO Cassette)", 0 )
-/* 38 */ GAME( 1984, cscrtry, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette, set 1)", 0 )
-/* */ GAME( 1984, cscrtry2, cscrtry, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette, set 2)", 0 )
-/* 39 */ GAME( 1984, cppicf, decocass, cppicf, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette, set 1)", 0 )
-/* */ GAME( 1984, cppicf2, cppicf, cppicf, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette, set 2)", 0 )
-/* 40 */ GAME( 1984, cfghtice, decocass, cfghtice, cfghtice, decocass_state, decocass, ROT270, "Data East Corporation", "Fighting Ice Hockey (DECO Cassette)", 0 )
-/* 41 */ GAME( 1984, coozumou, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Oozumou - The Grand Sumo (DECO Cassette, Japan)", 0 )
+/* 37 */ GAME( 1983, czeroize, decocass, czeroize, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Zeroize (DECO Cassette) (US)", 0 )
+/* 38 */ GAME( 1984, cscrtry, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 1)", 0 )
+/* */ GAME( 1984, cscrtry2, cscrtry, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 2)", 0 )
+/* 39 */ GAME( 1984, cppicf, decocass, cppicf, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 1)", 0 )
+/* */ GAME( 1984, cppicf2, cppicf, cppicf, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 2)", 0 )
+/* 40 */ GAME( 1984, cfghtice, decocass, cfghtice, cfghtice, decocass_state, decocass, ROT270, "Data East Corporation", "Fighting Ice Hockey (DECO Cassette) (US)", 0 )
+/* 41 */ GAME( 1984, coozumou, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Oozumou - The Grand Sumo (DECO Cassette) (Japan)", 0 )
/* 42 */ // 1984.08 Hellow Gateball // not a typo, this is official spelling
/* 43 */ // 1984.08 Yellow Cab
-/* 44 */ GAME( 1985, cbdash, decocass, cbdash, cbdash, decocass_state, decocass, ROT270, "Data East Corporation", "Boulder Dash (DECO Cassette)", 0 )
+/* 44 */ GAME( 1985, cbdash, decocass, cbdash, cbdash, decocass_state, decocass, ROT270, "Data East Corporation", "Boulder Dash (DECO Cassette) (US)", 0 )
/* UX7 */ // 1984.12 Tokyo MIE Clinic/Tokyo MIE Shinryoujo
/* UX8 */ // 1985.01 Tokyo MIE Clinic/Tokyo MIE Shinryoujo Part 2
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index 1bf72ecced5..dcff714c654 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -265,6 +265,7 @@ dgc (dg(no!spam)cx@mac.com)
#include "machine/mc68681.h"
#include "machine/x2212.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class dectalk_state : public driver_device
@@ -311,7 +312,7 @@ public:
required_device<cpu_device> m_dsp;
required_device<mc68681_device> m_duart;
required_device<x2212_device> m_nvram;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
DECLARE_WRITE_LINE_MEMBER(dectalk_duart_irq_handler);
DECLARE_WRITE_LINE_MEMBER(dectalk_duart_txa);
DECLARE_READ8_MEMBER(dectalk_duart_input);
@@ -843,7 +844,7 @@ TIMER_CALLBACK_MEMBER(dectalk_state::outfifo_read_cb)
if (data!= 0x8000) logerror("sample output: %04X\n", data);
#endif
timer_set(attotime::from_hz(10000), TIMER_OUTFIFO_READ);
- m_dac->write_signed16(data);
+ m_dac->write(data >> 4);
// hack for break key, requires hacked up duart core so disabled for now
// also it doesn't work well, the setup menu is badly corrupt
/*device_t *duart = machine().device("duartn68681");
@@ -888,9 +889,10 @@ static MACHINE_CONFIG_START( dectalk, dectalk_state )
/* video hardware */
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0) /* E88 10KHz OSC, handled by timer */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.9)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", AD7541, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9) // ad7541.e107 (E88 10KHz OSC, handled by timer)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* Y2 is a 3.579545 MHz xtal for the dtmf decoder chip */
diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp
index 17a67a9a56c..a3fce6cb892 100644
--- a/src/mame/drivers/deshoros.cpp
+++ b/src/mame/drivers/deshoros.cpp
@@ -156,7 +156,7 @@ INPUT_CHANGED_MEMBER(destiny_state::coin_inserted)
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
// coincounter on coin insert
- if (((int)(FPTR)param) == 0)
+ if (((int)(uintptr_t)param) == 0)
machine().bookkeeping().coin_counter_w(0, newval);
}
diff --git a/src/mame/drivers/digel804.cpp b/src/mame/drivers/digel804.cpp
index 8e56c443a0f..05ab0883ca3 100644
--- a/src/mame/drivers/digel804.cpp
+++ b/src/mame/drivers/digel804.cpp
@@ -350,7 +350,7 @@ INPUT_CHANGED_MEMBER( digel804_state::mode_change )
{
if (!newval && !m_keyen_state)
{
- switch ((int)(FPTR)param)
+ switch ((int)(uintptr_t)param)
{
case MODE_OFF:
m_key_mode = m_remote_mode = m_sim_mode = 1;
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index 52949b17816..1151c6c28bd 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -258,7 +258,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( dgnalpha, dragon_base, dragon_alpha_state )
MCFG_SOUND_ADD(AY8912_TAG, AY8912, 1000000)
MCFG_AY8910_PORT_A_READ_CB(READ8(dragon_alpha_state, psg_porta_read))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(dragon_alpha_state, psg_porta_write))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
// pia 2
MCFG_DEVICE_ADD( PIA2_TAG, PIA6821, 0)
diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp
index 79008b34894..134c6c2e605 100644
--- a/src/mame/drivers/dynax.cpp
+++ b/src/mame/drivers/dynax.cpp
@@ -1084,8 +1084,8 @@ static ADDRESS_MAP_START( mjelctrn_io_map, AS_IO, 8, dynax_state )
AM_RANGE( 0x81, 0x81 ) AM_READ_PORT("COINS") // Coins
AM_RANGE( 0x82, 0x82 ) AM_READ(mjelctrn_keyboard_1_r) // P2
AM_RANGE( 0x83, 0x83 ) AM_READ(hanamai_keyboard_0_r) // P1
- AM_RANGE( 0x84, 0x84 ) AM_READ(mjelctrn_dsw_r) // DSW x 4
- AM_RANGE( 0x85, 0x85 ) AM_READ(ret_ff) // ?
+ AM_RANGE( 0x84, 0x84 ) AM_READ(mjelctrn_dsw_r) // DSW8 x 4
+ AM_RANGE( 0x85, 0x85 ) AM_READ_PORT("SW1") // DSW2
AM_RANGE( 0xa1, 0xa7 ) AM_WRITE(dynax_blitter_rev2_w) // Blitter
AM_RANGE( 0xc0, 0xc0 ) AM_WRITE(dynax_flipscreen_w) // Flip Screen
AM_RANGE( 0xc1, 0xc1 ) AM_WRITE(hanamai_layer_half_w) // half of the interleaved layer to write to
@@ -2627,15 +2627,14 @@ static INPUT_PORTS_START( mjdialq2 )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x38, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5,6")
- PORT_DIPSETTING( 0x38, "1 (Easy)" )
- PORT_DIPSETTING( 0x30, "2" )
- PORT_DIPSETTING( 0x28, "3" )
- PORT_DIPSETTING( 0x20, "4" )
- PORT_DIPSETTING( 0x18, "5" )
- PORT_DIPSETTING( 0x10, "6" )
- PORT_DIPSETTING( 0x08, "7" )
- PORT_DIPSETTING( 0x00, "8 (Hard)" )
-
+ PORT_DIPSETTING( 0x38, "1 (Easy)" )
+ PORT_DIPSETTING( 0x30, "2" )
+ PORT_DIPSETTING( 0x28, "3" )
+ PORT_DIPSETTING( 0x20, "4" )
+ PORT_DIPSETTING( 0x18, "5" )
+ PORT_DIPSETTING( 0x10, "6" )
+ PORT_DIPSETTING( 0x08, "7" )
+ PORT_DIPSETTING( 0x00, "8 (Hard)" )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -3402,32 +3401,49 @@ static INPUT_PORTS_START( mjembase )
INPUT_PORTS_END
+// dip locations verified on mjelctrb pcb
static INPUT_PORTS_START( mjelct3 )
+ PORT_START("COINS")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
+
+ PORT_INCLUDE( MAHJONG_KEYS_BET )
+
+ PORT_START("SW1") // port 85
+ PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
+ PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
+
PORT_START("DSW0") /* 7c21 (select = 00) */
- PORT_DIPNAME( 0x03, 0x03, "Difficulty?" )
+ PORT_DIPNAME( 0x03, 0x03, "Difficulty?" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x03, "0" ) // 20
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW3:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x30, 0x30, "Min Pay?" )
+ PORT_DIPNAME( 0x30, 0x30, "Min Pay?" ) PORT_DIPLOCATION("SW3:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" )
+ PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" )
+ PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1") /* 7c20 (select = 40) */
- PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" )
+ PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" ) PORT_DIPLOCATION("SW4:1,2,3,4")
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x01, "53" )
PORT_DIPSETTING( 0x02, "56" )
@@ -3444,32 +3460,20 @@ static INPUT_PORTS_START( mjelct3 )
PORT_DIPSETTING( 0x0d, "90" )
PORT_DIPSETTING( 0x0e, "93" )
PORT_DIPSETTING( 0x0f, "96" )
- PORT_DIPNAME( 0x30, 0x30, "Max Bet" )
+ PORT_DIPNAME( 0x30, 0x30, "Max Bet" ) PORT_DIPLOCATION("SW4:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW4:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
-
- PORT_INCLUDE( MAHJONG_KEYS_BET )
-
PORT_START("DSW2") /* 7c22 (select = 80) */
- PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" )
+ PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "Cut" )
PORT_DIPSETTING( 0x06, "1 T" )
PORT_DIPSETTING( 0x05, "300" )
@@ -3478,45 +3482,45 @@ static INPUT_PORTS_START( mjelct3 )
PORT_DIPSETTING( 0x02, "1000" )
// PORT_DIPSETTING( 0x01, "1000" )
// PORT_DIPSETTING( 0x00, "1000" )
- PORT_DIPNAME( 0x08, 0x08, "YAKU times" )
+ PORT_DIPNAME( 0x08, 0x08, "YAKU times" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x10, 0x10, "Win Rate?" )
+ PORT_DIPNAME( 0x10, 0x10, "Win Rate?" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
- PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 3 Only)" )
+ PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 3 Only)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, "Automatic" )
PORT_DIPSETTING( 0x20, "Manual" )
- PORT_DIPNAME( 0x40, 0x40, "DonDen Key" )
+ PORT_DIPNAME( 0x40, 0x40, "DonDen Key" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, "A" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
- PORT_DIPNAME( 0x80, 0x00, "Subtitle" )
+ PORT_DIPNAME( 0x80, 0x00, "Subtitle" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, "None (Part 2)" )
PORT_DIPSETTING( 0x00, "Super Express (Part 3)" )
PORT_START("DSW3") /* 7c23 (select = c0) */
- PORT_DIPNAME( 0x01, 0x01, "Last Chance" )
+ PORT_DIPNAME( 0x01, 0x01, "Last Chance" ) PORT_DIPLOCATION("SW5:1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" )
+ PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" ) PORT_DIPLOCATION("SW5:2")
PORT_DIPSETTING( 0x02, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
- PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" )
+ PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" ) PORT_DIPLOCATION("SW5:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" )
+ PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" ) PORT_DIPLOCATION("SW5:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, "In-Game Music" )
+ PORT_DIPNAME( 0x20, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW5:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Select Girl" )
+ PORT_DIPNAME( 0x40, 0x40, "Select Girl" ) PORT_DIPLOCATION("SW5:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, "Nudity" )
+ PORT_DIPNAME( 0x80, 0x00, "Nudity" ) PORT_DIPLOCATION("SW5:8")
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face
@@ -3528,31 +3532,47 @@ INPUT_PORTS_END
static INPUT_PORTS_START( mjelctrn )
+ PORT_START("COINS")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
+
+ PORT_INCLUDE( MAHJONG_KEYS_BET )
+
+ PORT_START("SW1") // port 85
+ PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
+ PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2")
+
PORT_START("DSW0") /* 7c21 (select = 00) */
- PORT_DIPNAME( 0x03, 0x03, "Difficulty?" )
+ PORT_DIPNAME( 0x03, 0x03, "Difficulty?" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x03, "0" ) // 20
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW3:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x30, 0x30, "Min Pay?" )
+ PORT_DIPNAME( 0x30, 0x30, "Min Pay?" ) PORT_DIPLOCATION("SW3:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" )
+ PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" )
+ PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("DSW1") /* 7c20 (select = 40) */
- PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" )
+ PORT_START("DSW1") /* 7c20 (select = 40) */
+ PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" ) PORT_DIPLOCATION("SW4:1,2,3,4")
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x01, "53" )
PORT_DIPSETTING( 0x02, "56" )
@@ -3569,32 +3589,20 @@ static INPUT_PORTS_START( mjelctrn )
PORT_DIPSETTING( 0x0d, "90" )
PORT_DIPSETTING( 0x0e, "93" )
PORT_DIPSETTING( 0x0f, "96" )
- PORT_DIPNAME( 0x30, 0x30, "Max Bet" )
+ PORT_DIPNAME( 0x30, 0x30, "Max Bet" ) PORT_DIPLOCATION("SW4:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW4:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Analyzer
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
-
- PORT_INCLUDE( MAHJONG_KEYS_BET )
-
- PORT_START("DSW2") /* 7c22 (select = 80) */
- PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" )
+ PORT_START("DSW2") /* 7c22 (select = 80) */
+ PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "Cut" )
PORT_DIPSETTING( 0x06, "1 T" )
PORT_DIPSETTING( 0x05, "300" )
@@ -3603,45 +3611,45 @@ static INPUT_PORTS_START( mjelctrn )
PORT_DIPSETTING( 0x02, "1000" )
// PORT_DIPSETTING( 0x01, "1000" )
// PORT_DIPSETTING( 0x00, "1000" )
- PORT_DIPNAME( 0x08, 0x08, "YAKU times" )
+ PORT_DIPNAME( 0x08, 0x08, "YAKU times" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x10, 0x10, "Win Rate?" )
+ PORT_DIPNAME( 0x10, 0x10, "Win Rate?" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
- PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 4 Only)" )
+ PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 4 Only)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, "Automatic" )
PORT_DIPSETTING( 0x20, "Manual" )
- PORT_DIPNAME( 0x40, 0x40, "DonDen Key" )
+ PORT_DIPNAME( 0x40, 0x40, "DonDen Key" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, "A" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
- PORT_DIPNAME( 0x80, 0x00, "Subtitle" )
+ PORT_DIPNAME( 0x80, 0x00, "Subtitle" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, "None (Part 2)" )
PORT_DIPSETTING( 0x00, "???? (Part 4)" )
- PORT_START("DSW3") // 7c23 (select = c0)
- PORT_DIPNAME( 0x01, 0x01, "Last Chance" )
+ PORT_START("DSW3") /* 7c23 (select = c0) */
+ PORT_DIPNAME( 0x01, 0x01, "Last Chance" ) PORT_DIPLOCATION("SW5:1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" )
+ PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" ) PORT_DIPLOCATION("SW5:2")
PORT_DIPSETTING( 0x02, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
- PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" )
+ PORT_DIPNAME( 0x04, 0x04, "Choose Bonus" ) PORT_DIPLOCATION("SW5:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" )
+ PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" ) PORT_DIPLOCATION("SW5:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, "In-Game Music" )
+ PORT_DIPNAME( 0x20, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW5:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Select Girl" )
+ PORT_DIPNAME( 0x40, 0x40, "Select Girl" ) PORT_DIPLOCATION("SW5:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, "Girls" )
+ PORT_DIPNAME( 0x80, 0x00, "Girls" ) PORT_DIPLOCATION("SW5:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -3774,6 +3782,9 @@ static INPUT_PORTS_START( majxtal7 )
PORT_DIPNAME( 0xff, 0xff, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0xff, DEF_STR( On ) )
+
+ /* the following are needed to make happy the read handlers shared with mjelctrn */
+ PORT_START("SW1")
INPUT_PORTS_END
static INPUT_PORTS_START( neruton )
@@ -3841,6 +3852,7 @@ static INPUT_PORTS_START( neruton )
PORT_INCLUDE( MAHJONG_KEYS )
/* 2008-06 FP: the following are needed to make happy the read handlers shared with mjelctrn */
+ PORT_START("SW1")
PORT_START("DSW2")
PORT_START("DSW3")
PORT_START("FAKE")
@@ -5504,7 +5516,7 @@ DRIVER_INIT_MEMBER(dynax_state,maya)
/* Address lines scrambling on the blitter data roms */
{
- dynamic_buffer rom(0xc0000);
+ std::vector<UINT8> rom(0xc0000);
memcpy(&rom[0], gfx, 0xc0000);
for (i = 0; i < 0xc0000; i++)
gfx[i] = rom[BITSWAP24(i, 23, 22, 21, 20, 19, 18, 14, 15, 16, 17, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)];
@@ -5521,7 +5533,7 @@ DRIVER_INIT_MEMBER(dynax_state,mayac)
/* Address lines scrambling on the blitter data roms */
{
- dynamic_buffer rom(0xc0000);
+ std::vector<UINT8> rom(0xc0000);
memcpy(&rom[0], gfx, 0xc0000);
for (i = 0; i < 0xc0000; i++)
gfx[i] = rom[BITSWAP24(i, 23, 22, 21, 20, 19, 18, 17, 14, 16, 15, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)];
@@ -6236,9 +6248,6 @@ ROM_END
/***************************************************************************
Mahjong Electron Base (bootleg)
-PCB works (see s/shot in archive), but I couldn't get it
-to do anything other than show a diagnostic screen??
-
PCB Layout
----------
@@ -6443,7 +6452,7 @@ DRIVER_INIT_MEMBER(dynax_state,mjelct3)
int i;
UINT8 *rom = memregion("maincpu")->base();
size_t size = memregion("maincpu")->bytes();
- dynamic_buffer rom1(size);
+ std::vector<UINT8> rom1(size);
memcpy(&rom1[0], rom, size);
for (i = 0; i < size; i++)
@@ -6455,7 +6464,7 @@ DRIVER_INIT_MEMBER(dynax_state,mjelct3a)
int i, j;
UINT8 *rom = memregion("maincpu")->base();
size_t size = memregion("maincpu")->bytes();
- dynamic_buffer rom1(size);
+ std::vector<UINT8> rom1(size);
memcpy(&rom1[0], rom, size);
for (i = 0; i < size; i++)
diff --git a/src/mame/drivers/elecbowl.cpp b/src/mame/drivers/elecbowl.cpp
deleted file mode 100644
index 297288fcbde..00000000000
--- a/src/mame/drivers/elecbowl.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:hap, Kevin Horton
-/***************************************************************************
-
- ** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.cpp) **
-
- Marx Series 300 Electronic Bowling Game
- Main board:
- * TMS1100NLL MP3403 DBS 7836 SINGAPORE (no decap)
- * 4*SN75492 quad segment driver, 2*SN74259 8-line demultiplexer,
- 2*CD4043 quad r/s input latch
- * 5 7seg LEDs, 15 lamps(10 lamps projected to bowling pins reflection),
- 1bit-sound with crude volume control
- * edge connector to sensors(switches trigger when ball rolls over)
- and other inputs
-
- lamp translation table: SN74259.u5(mux 1) goes to MAME output lamp5x,
- SN74259.u6(mux 2) goes to MAME output lamp6x. u1-u3 are SN75492 ICs,
- where other: u1 A2 is N/C, u3 A1 is from O2 and goes to digits seg C.
-
- u5 Q0 -> u1 A4 -> L2 (pin #2) u6 Q0 -> u3 A4 -> L1 (pin #1)
- u5 Q1 -> u1 A5 -> L4 (pin #4) u6 Q1 -> u3 A5 -> L5 (pin #5)
- u5 Q2 -> u1 A6 -> L7 (pin #7) u6 Q2 -> u2 A3 -> L11 (player 1)
- u5 Q3 -> u1 A1 -> L8 (pin #8) u6 Q3 -> u2 A2 -> L12 (player 2)
- u5 Q4 -> u3 A2 -> L3 (pin #3) u6 Q4 -> u2 A1 -> L15 (?)
- u5 Q5 -> u2 A6 -> L6 (pin #6) u6 Q5 -> u3 A6 -> L14 (?)
- u5 Q6 -> u2 A5 -> L10 (pin #10) u6 Q6 -> u1 A3 -> L13 (spare)
- u5 Q7 -> u2 A4 -> L9 (pin #9) u6 Q7 -> u3 A3 -> digit 4 B+C
-
-***************************************************************************/
-
-#include "includes/hh_tms1k.h"
-#include "elecbowl.lh"
-
-
-class elecbowl_state : public hh_tms1k_state
-{
-public:
- elecbowl_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-};
-
-
-/***************************************************************************
-
- Display
-
-***************************************************************************/
-
-void elecbowl_state::prepare_display()
-{
- // standard 7segs
- for (int y = 0; y < 4; y++)
- {
- m_display_segmask[y] = 0x7f;
- m_display_state[y] = (m_r >> (y + 4) & 1) ? m_o : 0;
- }
-
- // lamp muxes
- UINT8 mask = 1 << (m_o & 7);
- UINT8 d = (m_r & 2) ? mask : 0;
- if (~m_r & 1)
- m_display_state[5] = (m_display_state[5] & ~mask) | d;
- if (~m_r & 4)
- m_display_state[6] = (m_display_state[6] & ~mask) | d;
-
- // digit 4 is from mux2 Q7
- m_display_segmask[4] = 6;
- m_display_state[4] = (m_display_state[6] & 0x80) ? 6 : 0;
-
- set_display_size(8, 7);
- display_update();
-}
-
-
-
-/***************************************************************************
-
- I/O
-
-***************************************************************************/
-
-WRITE16_MEMBER(elecbowl_state::write_r)
-{
- // R5-R7,R10: input mux
- m_inp_mux = (data >> 5 & 7) | (data >> 7 & 8);
-
- // R9: speaker out
- // R3,R8: speaker volume..
- m_speaker->level_w(data >> 9 & 1);
-
- // R4-R7: select digit
- // R0,R2: lamp mux1,2 _enable
- // R1: lamp muxes state
- m_r = data;
- prepare_display();
-}
-
-WRITE16_MEMBER(elecbowl_state::write_o)
-{
- //if (data & 0x80) printf("%X ",data&0x7f);
-
- // O0-O2: lamp muxes select
- // O0-O6: digit segments A-G
- // O7: N/C
- m_o = data & 0x7f;
- prepare_display();
-}
-
-READ8_MEMBER(elecbowl_state::read_k)
-{
- // K: multiplexed inputs
- return read_inputs(4);
-}
-
-
-
-/***************************************************************************
-
- Inputs
-
-***************************************************************************/
-
-static INPUT_PORTS_START( elecbowl )
- PORT_START("IN.0") // R5
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)
-
- PORT_START("IN.1") // R6
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) // reset/test?
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) // reset/test?
-
- PORT_START("IN.2") // R7
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F)
-
- PORT_START("IN.3") // R10
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X)
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) // 2 players sw?
-INPUT_PORTS_END
-
-
-
-/***************************************************************************
-
- Machine Config
-
-***************************************************************************/
-
-// output PLA is not decapped
-static const UINT16 elecbowl_output_pla[0x20] =
-{
- lA+lB+lC+lD+lE+lF, // 0
- lB+lC, // 1
- lA+lB+lG+lE+lD, // 2
- lA+lB+lG+lC+lD, // 3
- lF+lB+lG+lC, // 4
- lA+lF+lG+lC+lD, // 5
- lA+lF+lG+lC+lD+lE, // 6
- lA+lB+lC, // 7
- lA+lB+lC+lD+lE+lF+lG, // 8
- lA+lB+lG+lF+lC+lD, // 9
-
- 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0,1,2,3,4,5,6,7, // lamp muxes select
- 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
-};
-
-static MACHINE_CONFIG_START( elecbowl, elecbowl_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf
- MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla)
- MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(elecbowl_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_elecbowl)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-/***************************************************************************
-
- Game driver(s)
-
-***************************************************************************/
-
-ROM_START( elecbowl )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "mp3403.u9", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified
- ROM_REGION( 365, "maincpu:opla", 0 )
- ROM_LOAD( "tms1100_elecbowl_output.pla", 0, 365, NO_DUMP )
-ROM_END
-
-
-CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling (Marx)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 71455d4e7c6..2a3ec845281 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -7,6 +7,7 @@ Bull Fighter (c) 1984 Alpha Denshi Co./Sega
Gekisou (c) 1985 Eastern Corp.
The Koukouyakyuh (c) 1985 Alpha Denshi Co.
Splendor Blast (c) 1985 Alpha Denshi Co.
+Splendor Blast II (c) 1985 Alpha Denshi Co.
High Voltage (c) 1985 Alpha Denshi Co.
The following are not dumped yet:
@@ -122,6 +123,10 @@ Notes:
CABINET Cocktail ON
Upright OFF
+- splendorblast2 is different in many areas, most notibly in the title screen and
+ the operation of the missiles which is a power-up pickup rather than a cumulative
+ collecting of missiles that can run out.
+
TODO:
----
@@ -356,13 +361,14 @@ D
*******************************************************************************/
#include "emu.h"
-#include "cpu/m68000/m68000.h"
+#include "includes/equites.h"
#include "cpu/alph8201/alph8201.h"
#include "cpu/i8085/i8085.h"
-#include "sound/ay8910.h"
+#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
-#include "includes/equites.h"
+#include "sound/ay8910.h"
+#include "sound/volt_reg.h"
#define FRQ_ADJUSTER_TAG "FRQ"
@@ -500,15 +506,15 @@ void equites_state::equites_update_dac( )
// Note that PB0 goes through three filters while PB1 only goes through one.
if (m_eq8155_port_b & 1)
- m_dac_1->write_signed8(m_dac_latch);
+ m_dac_1->write(m_dac_latch);
if (m_eq8155_port_b & 2)
- m_dac_2->write_signed8(m_dac_latch);
+ m_dac_2->write(m_dac_latch);
}
WRITE8_MEMBER(equites_state::equites_dac_latch_w)
{
- m_dac_latch = data << 2;
+ m_dac_latch = data;
equites_update_dac();
}
@@ -1051,40 +1057,40 @@ static MACHINE_CONFIG_FRAGMENT( common_sound )
MCFG_CPU_IO_MAP(sound_portmap)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("msm", MSM5232, MSM5232_MAX_CLOCK) // will be adjusted at runtime through PORT_ADJUSTER
MCFG_MSM5232_SET_CAPACITORS(0.47e-6, 0.47e-6, 0.47e-6, 0.47e-6, 0.47e-6, 0.47e-6, 0.47e-6, 0.47e-6) // verified
MCFG_MSM5232_GATE_HANDLER_CB(WRITELINE(equites_state, equites_msm5232_gate))
- MCFG_SOUND_ROUTE(0, "mono", MSM5232_BASE_VOLUME/2.2) // pin 28 2'-1 : 22k resistor
- MCFG_SOUND_ROUTE(1, "mono", MSM5232_BASE_VOLUME/1.5) // pin 29 4'-1 : 15k resistor
- MCFG_SOUND_ROUTE(2, "mono", MSM5232_BASE_VOLUME) // pin 30 8'-1 : 10k resistor
- MCFG_SOUND_ROUTE(3, "mono", MSM5232_BASE_VOLUME) // pin 31 16'-1 : 10k resistor
- MCFG_SOUND_ROUTE(4, "mono", MSM5232_BASE_VOLUME/2.2) // pin 36 2'-2 : 22k resistor
- MCFG_SOUND_ROUTE(5, "mono", MSM5232_BASE_VOLUME/1.5) // pin 35 4'-2 : 15k resistor
- MCFG_SOUND_ROUTE(6, "mono", MSM5232_BASE_VOLUME) // pin 34 8'-2 : 10k resistor
- MCFG_SOUND_ROUTE(7, "mono", MSM5232_BASE_VOLUME) // pin 33 16'-2 : 10k resistor
- MCFG_SOUND_ROUTE(8, "mono", 1.0) // pin 1 SOLO 8' (this actually feeds an analog section)
- MCFG_SOUND_ROUTE(9, "mono", 1.0) // pin 2 SOLO 16' (this actually feeds an analog section)
- MCFG_SOUND_ROUTE(10,"mono", 0.12) // pin 22 Noise Output (this actually feeds an analog section)
+ MCFG_SOUND_ROUTE(0, "speaker", MSM5232_BASE_VOLUME/2.2) // pin 28 2'-1 : 22k resistor
+ MCFG_SOUND_ROUTE(1, "speaker", MSM5232_BASE_VOLUME/1.5) // pin 29 4'-1 : 15k resistor
+ MCFG_SOUND_ROUTE(2, "speaker", MSM5232_BASE_VOLUME) // pin 30 8'-1 : 10k resistor
+ MCFG_SOUND_ROUTE(3, "speaker", MSM5232_BASE_VOLUME) // pin 31 16'-1 : 10k resistor
+ MCFG_SOUND_ROUTE(4, "speaker", MSM5232_BASE_VOLUME/2.2) // pin 36 2'-2 : 22k resistor
+ MCFG_SOUND_ROUTE(5, "speaker", MSM5232_BASE_VOLUME/1.5) // pin 35 4'-2 : 15k resistor
+ MCFG_SOUND_ROUTE(6, "speaker", MSM5232_BASE_VOLUME) // pin 34 8'-2 : 10k resistor
+ MCFG_SOUND_ROUTE(7, "speaker", MSM5232_BASE_VOLUME) // pin 33 16'-2 : 10k resistor
+ MCFG_SOUND_ROUTE(8, "speaker", 1.0) // pin 1 SOLO 8' (this actually feeds an analog section)
+ MCFG_SOUND_ROUTE(9, "speaker", 1.0) // pin 2 SOLO 16' (this actually feeds an analog section)
+ MCFG_SOUND_ROUTE(10,"speaker", 0.12) // pin 22 Noise Output (this actually feeds an analog section)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_6_144MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(equites_state, equites_8910porta_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(equites_state, equites_8910portb_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_6BIT_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_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(3)
MCFG_SAMPLES_NAMES(alphamc07_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
/******************************************************************************/
@@ -1702,6 +1708,156 @@ ROM_START( splndrbt )
ROM_LOAD( "s3.8l", 0x0100, 0x0100, CRC(1314b0b5) SHA1(31ef4b916110581390afc1ba90c5dca7c08c619f) ) // y
ROM_END
+ROM_START( splndrbta )
+ ROM_REGION( 0x10000, "maincpu", 0 ) // 68000 ROMs(16k x 4) - Red band on program rom labels
+ ROM_LOAD16_BYTE( "1red.16b", 0x00001, 0x4000, CRC(3e342030) SHA1(82529e12378c0036097a654fe059f82d69fac8e6) )
+ ROM_LOAD16_BYTE( "2red.16c", 0x00000, 0x4000, CRC(757e270b) SHA1(be615829fd21609ded21888e7a75456cbeecb603) )
+ ROM_LOAD16_BYTE( "3red.15b", 0x08001, 0x4000, CRC(788deb02) SHA1(a4e79621bf4cda50dfb8dfab7f70dc4021065794) )
+ ROM_LOAD16_BYTE( "4red.15c", 0x08000, 0x4000, CRC(d02a5606) SHA1(6bb2e5d95ea711452dd40218bd90488d70f82006) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
+ ROM_LOAD( "8v.1l", 0x00000, 0x4000, CRC(71b2ec29) SHA1(89c630c5bf9c4752b01006183d1419fe6a458f5c) )
+ ROM_LOAD( "9v.1h", 0x04000, 0x4000, CRC(e95abcb5) SHA1(1680875fc16d1a4e1054ccdabdf6fd06d434a163) )
+
+ ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
+ ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
+
+ ROM_REGION( 0x2000, "gfx1", 0 ) // chars
+ ROM_LOAD( "10.8c", 0x00000, 0x2000, CRC(501887d4) SHA1(3cf4401d6fddff1500066219a71ac3b30ecbdd28) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 ) // tiles
+ ROM_LOAD( "8.14m", 0x00000, 0x4000, CRC(c2c86621) SHA1(a715c70ace98502f2c0d4a81539cd79d19e9b6c4) )
+ ROM_LOAD( "9.12m", 0x04000, 0x4000, CRC(4f7da6ff) SHA1(0516271df4a36d6ea38d1b8a5e471e1d2a79e8c1) )
+
+ ROM_REGION( 0x10000, "gfx3", 0 ) // sprites
+ ROM_LOAD( "6.18n", 0x00000, 0x2000, CRC(aa72237f) SHA1(0a26746a6c448a7fb853ef708e2bdeb76edd99cf) )
+ // empty space to unpack previous ROM
+ ROM_CONTINUE( 0x04000, 0x2000 )
+ // empty space to unpack previous ROM
+ ROM_LOAD( "5.18m", 0x08000, 0x4000, CRC(5f618b39) SHA1(2891067e71b8e1183ee5741487faa1561316cade) )
+ ROM_LOAD( "7.17m", 0x0c000, 0x4000, CRC(abdd8483) SHA1(df8c8338c24fa487c49b01ce26db7eb28c8c6b85) )
+
+ ROM_REGION( 0x0500, "proms", 0 )
+ ROM_LOAD( "r.3a", 0x0000, 0x100, CRC(ca1f08ce) SHA1(e46e2850d3ee3c8cbb23c10645f07d406c7ff50b) ) // R
+ ROM_LOAD( "g.1a", 0x0100, 0x100, CRC(66f89177) SHA1(caa51c1bf071764d5089487342794cbf023136c0) ) // G
+ ROM_LOAD( "b.2a", 0x0200, 0x100, CRC(d14318bc) SHA1(e219963b3e40eb246e608fbe10daa85dbb4c1226) ) // B
+ ROM_LOAD( "2.8k", 0x0300, 0x100, CRC(e1770ad3) SHA1(e408b175b8fff934e07b0ded1ee21d7f91a9523d) ) // CLUT bg
+ ROM_LOAD( "s5.15p", 0x0400, 0x100, CRC(7f6cf709) SHA1(5938faf937b682dcc83e53444cbf5e0bd7741363) ) // CLUT sprites
+
+ ROM_REGION( 0x0020, "prom", 0 )
+ ROM_LOAD( "3h.bpr", 0x00000, 0x020, CRC(33b98466) SHA1(017c73cf8c17dc5047c89316ae5b45f8d22092e8) )
+
+ ROM_REGION( 0x2100, "user1", 0 ) // bg scaling
+ ROM_LOAD( "0.8h", 0x0000, 0x2000, CRC(12681fb5) SHA1(7a0930819d4cd00475d1897128daa6ac865e07d0) ) // x
+ ROM_LOAD( "1.9j", 0x2000, 0x0100, CRC(f5b9b777) SHA1(a4ec731be77306db6baf319391c4fe78517fe43e) ) // y
+
+ ROM_REGION( 0x0200, "user2", 0 ) // sprite scaling
+ ROM_LOAD( "4.7m", 0x0000, 0x0100, CRC(12cbcd2c) SHA1(a7946820bbf3f7e110a328b673123988af97ce7e) ) // x
+ ROM_LOAD( "s3.8l", 0x0100, 0x0100, CRC(1314b0b5) SHA1(31ef4b916110581390afc1ba90c5dca7c08c619f) ) // y
+ROM_END
+
+ROM_START( splndrbtb )
+ ROM_REGION( 0x10000, "maincpu", 0 ) // 68000 ROMs(16k x 4) - Blue band on program rom labels
+ ROM_LOAD16_BYTE( "1blue.16a", 0x00001, 0x4000, CRC(f8507502) SHA1(35a915db9ef90e45aac8ce9e349c319e99a36810) )
+ ROM_LOAD16_BYTE( "2blue.16c", 0x00000, 0x4000, CRC(8969bd04) SHA1(6cd8a0ab58ce0e4a43cf5ca4fcd10b30962a13b3) )
+ ROM_LOAD16_BYTE( "3blue.15a", 0x08001, 0x4000, CRC(bce26d4f) SHA1(81a295e665af9e46ff28618f2f77f31f41f14a4f) )
+ ROM_LOAD16_BYTE( "4blue.15c", 0x08000, 0x4000, CRC(5715ec1b) SHA1(fddf45a4e1b2fd319b0a47376c11ce2a41c40eb2) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
+ ROM_LOAD( "1_v.1m", 0x00000, 0x2000, CRC(1b3a6e42) SHA1(41a4f0503c939ec0a739c8bc6bf3c8fc354912ee) )
+ ROM_LOAD( "2_v.1l", 0x02000, 0x2000, CRC(2a618c72) SHA1(6ad459d94352c317150ae6344d4db9bb613938dd) )
+ ROM_LOAD( "3_v.1k", 0x04000, 0x2000, CRC(bbee5346) SHA1(753cb784b04f081fa1f8590dc28056d9918f313b) )
+ ROM_LOAD( "4_v.1h", 0x06000, 0x2000, CRC(10f45af4) SHA1(00fa599bad8bf3ba6deee54165f381403096e8f9) )
+
+ ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
+ ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
+
+ ROM_REGION( 0x2000, "gfx1", 0 ) // chars
+ ROM_LOAD( "10.8c", 0x00000, 0x2000, CRC(501887d4) SHA1(3cf4401d6fddff1500066219a71ac3b30ecbdd28) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 ) // tiles
+ ROM_LOAD( "8.14m", 0x00000, 0x4000, CRC(c2c86621) SHA1(a715c70ace98502f2c0d4a81539cd79d19e9b6c4) )
+ ROM_LOAD( "9.12m", 0x04000, 0x4000, CRC(4f7da6ff) SHA1(0516271df4a36d6ea38d1b8a5e471e1d2a79e8c1) )
+
+ ROM_REGION( 0x10000, "gfx3", 0 ) // sprites
+ ROM_LOAD( "6.18n", 0x00000, 0x2000, CRC(aa72237f) SHA1(0a26746a6c448a7fb853ef708e2bdeb76edd99cf) )
+ // empty space to unpack previous ROM
+ ROM_CONTINUE( 0x04000, 0x2000 )
+ // empty space to unpack previous ROM
+ ROM_LOAD( "5.18m", 0x08000, 0x4000, CRC(5f618b39) SHA1(2891067e71b8e1183ee5741487faa1561316cade) )
+ ROM_LOAD( "7.17m", 0x0c000, 0x4000, CRC(abdd8483) SHA1(df8c8338c24fa487c49b01ce26db7eb28c8c6b85) )
+
+ ROM_REGION( 0x0500, "proms", 0 )
+ ROM_LOAD( "r.3a", 0x0000, 0x100, CRC(ca1f08ce) SHA1(e46e2850d3ee3c8cbb23c10645f07d406c7ff50b) ) // R
+ ROM_LOAD( "g.1a", 0x0100, 0x100, CRC(66f89177) SHA1(caa51c1bf071764d5089487342794cbf023136c0) ) // G
+ ROM_LOAD( "b.2a", 0x0200, 0x100, CRC(d14318bc) SHA1(e219963b3e40eb246e608fbe10daa85dbb4c1226) ) // B
+ ROM_LOAD( "2.8k", 0x0300, 0x100, CRC(e1770ad3) SHA1(e408b175b8fff934e07b0ded1ee21d7f91a9523d) ) // CLUT bg
+ ROM_LOAD( "s5.15p", 0x0400, 0x100, CRC(7f6cf709) SHA1(5938faf937b682dcc83e53444cbf5e0bd7741363) ) // CLUT sprites
+
+ ROM_REGION( 0x0020, "prom", 0 )
+ ROM_LOAD( "3h.bpr", 0x00000, 0x020, CRC(33b98466) SHA1(017c73cf8c17dc5047c89316ae5b45f8d22092e8) )
+
+ ROM_REGION( 0x2100, "user1", 0 ) // bg scaling
+ ROM_LOAD( "0.8h", 0x0000, 0x2000, CRC(12681fb5) SHA1(7a0930819d4cd00475d1897128daa6ac865e07d0) ) // x
+ ROM_LOAD( "1.9j", 0x2000, 0x0100, CRC(f5b9b777) SHA1(a4ec731be77306db6baf319391c4fe78517fe43e) ) // y
+
+ ROM_REGION( 0x0200, "user2", 0 ) // sprite scaling
+ ROM_LOAD( "4.7m", 0x0000, 0x0100, CRC(12cbcd2c) SHA1(a7946820bbf3f7e110a328b673123988af97ce7e) ) // x
+ ROM_LOAD( "s3.8l", 0x0100, 0x0100, CRC(1314b0b5) SHA1(31ef4b916110581390afc1ba90c5dca7c08c619f) ) // y
+ROM_END
+
+ROM_START( splendorblast2 )
+ ROM_REGION( 0x10000, "maincpu", 0 ) // 68000 ROMs(16k x 4)
+ ROM_LOAD16_BYTE( "1.a16", 0x00001, 0x4000, CRC(0fd3121d) SHA1(f9767af477442a09a70c04e4d427914557fddcd9) )
+ ROM_LOAD16_BYTE( "2.c16", 0x00000, 0x4000, CRC(227d8a1b) SHA1(8ce976e6d3dce1236a784e48f4829f42c801249c) )
+ ROM_LOAD16_BYTE( "3.a15", 0x08001, 0x4000, CRC(936f7cc9) SHA1(ef1601097659700f4a4b53fb57cd6d73efa03e0d) )
+ ROM_LOAD16_BYTE( "4.c15", 0x08000, 0x4000, CRC(3ff7c7b5) SHA1(4997efd4427f09a5427f752d0147b648fbdce252) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
+ ROM_LOAD( "s1.m1", 0x00000, 0x02000, CRC(045eac1b) SHA1(49ecc73b999719e470b2ef0afee6a84df620e0d9) )
+ ROM_LOAD( "s2.l1", 0x02000, 0x02000, CRC(65a3d094) SHA1(f6415eb323478a2d38acd4507404d9530fac77c4) )
+ ROM_LOAD( "s3.k1", 0x04000, 0x02000, CRC(980d38be) SHA1(c07f9851cfb6352781568f333d931b4ca08fd888) )
+ ROM_LOAD( "s4.h1", 0x06000, 0x02000, CRC(10f45af4) SHA1(00fa599bad8bf3ba6deee54165f381403096e8f9) )
+ ROM_LOAD( "s5.f1", 0x08000, 0x02000, CRC(0d76cac0) SHA1(15d0d5860035f06020589115b40d347c06d7ecbe) )
+ ROM_LOAD( "s6.e1", 0x0a000, 0x02000, CRC(bc65d469) SHA1(45145974d3ae7040fd00c776418702166c06b0dc) )
+
+ ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
+ ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
+
+ ROM_REGION( 0x2000, "gfx1", 0 ) // chars
+ ROM_LOAD( "5.b8", 0x00000, 0x02000, CRC(77a5dc55) SHA1(49f19e8816629b661c135b0db6f6e087eb2690ff) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 ) // tiles
+ ROM_LOAD( "8.m13", 0x00000, 0x4000, CRC(c2c86621) SHA1(a715c70ace98502f2c0d4a81539cd79d19e9b6c4) )
+ ROM_LOAD( "9.m12", 0x04000, 0x4000, CRC(4f7da6ff) SHA1(0516271df4a36d6ea38d1b8a5e471e1d2a79e8c1) )
+
+ ROM_REGION( 0x10000, "gfx3", 0 ) // sprites
+ ROM_LOAD( "8.n18", 0x00000, 0x4000, CRC(15b8277b) SHA1(36d80e9c1200f587cafdf43fafafe844d56296aa) )
+ // empty space to unpack previous ROM
+ // ROM_CONTINUE( 0x04000, 0x2000 )
+ // empty space to unpack previous ROM
+ ROM_LOAD( "5.m18", 0x08000, 0x4000, CRC(5f618b39) SHA1(2891067e71b8e1183ee5741487faa1561316cade) )
+ ROM_LOAD( "7.m17", 0x0c000, 0x4000, CRC(abdd8483) SHA1(df8c8338c24fa487c49b01ce26db7eb28c8c6b85) )
+
+ ROM_REGION( 0x0500, "proms", 0 )
+ ROM_LOAD( "r.3a", 0x0000, 0x100, CRC(ca1f08ce) SHA1(e46e2850d3ee3c8cbb23c10645f07d406c7ff50b) ) // R
+ ROM_LOAD( "g.1a", 0x0100, 0x100, CRC(66f89177) SHA1(caa51c1bf071764d5089487342794cbf023136c0) ) // G
+ ROM_LOAD( "b.2a", 0x0200, 0x100, CRC(d14318bc) SHA1(e219963b3e40eb246e608fbe10daa85dbb4c1226) ) // B
+ ROM_LOAD( "2.8k", 0x0300, 0x100, CRC(e1770ad3) SHA1(e408b175b8fff934e07b0ded1ee21d7f91a9523d) ) // CLUT bg
+ ROM_LOAD( "s5.15p", 0x0400, 0x100, CRC(7f6cf709) SHA1(5938faf937b682dcc83e53444cbf5e0bd7741363) ) // CLUT sprites
+
+ ROM_REGION( 0x0020, "prom", 0 )
+ ROM_LOAD( "3h.bpr", 0x00000, 0x020, CRC(33b98466) SHA1(017c73cf8c17dc5047c89316ae5b45f8d22092e8) )
+
+ ROM_REGION( 0x2100, "user1", 0 ) // bg scaling
+ ROM_LOAD( "0.h7", 0x0000, 0x2000, CRC(12681fb5) SHA1(7a0930819d4cd00475d1897128daa6ac865e07d0) ) // x
+ ROM_LOAD( "1.9j", 0x2000, 0x0100, CRC(f5b9b777) SHA1(a4ec731be77306db6baf319391c4fe78517fe43e) ) // y
+
+ ROM_REGION( 0x0200, "user2", 0 ) // sprite scaling
+ ROM_LOAD( "4.7m", 0x0000, 0x0100, CRC(12cbcd2c) SHA1(a7946820bbf3f7e110a328b673123988af97ce7e) ) // x
+ ROM_LOAD( "s3.8l", 0x0100, 0x0100, CRC(1314b0b5) SHA1(31ef4b916110581390afc1ba90c5dca7c08c619f) ) // y
+ROM_END
+
/******************************************************************************/
// High Voltage ROM Map
@@ -1817,5 +1973,8 @@ GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, equites, RO
GAME( 1985, gekisou, 0, gekisou, gekisou, equites_state, equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
// Splendor Blast Hardware
-GAME( 1985, splndrbt, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, splendorblast2, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast II", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, splndrbt, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, splndrbta, splndrbt, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, splndrbtb, splndrbt, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, hvoltage, 0, hvoltage, hvoltage, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/ertictac.cpp b/src/mame/drivers/ertictac.cpp
index e3723ee91cd..3723698acd8 100644
--- a/src/mame/drivers/ertictac.cpp
+++ b/src/mame/drivers/ertictac.cpp
@@ -24,11 +24,11 @@ PCB has a single OSC at 24MHz
*******************************************************************************************/
#include "emu.h"
-#include "cpu/arm/arm.h"
-#include "sound/dac.h"
#include "includes/archimds.h"
-#include "machine/i2cmem.h"
+#include "cpu/arm/arm.h"
#include "machine/aakart.h"
+#include "machine/i2cmem.h"
+#include "sound/volt_reg.h"
class ertictac_state : public archimedes_state
@@ -202,9 +202,6 @@ DRIVER_INIT_MEMBER(ertictac_state,ertictac)
void ertictac_state::machine_start()
{
archimedes_init();
-
- // reset the DAC to centerline
- //m_dac->write_signed8(0x80);
}
void ertictac_state::machine_reset()
@@ -241,30 +238,24 @@ static MACHINE_CONFIG_START( ertictac, ertictac_state )
MCFG_PALETTE_ADD("palette", 0x200)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac0")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac5")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac6")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
-
- MCFG_DAC_ADD("dac7")
- MCFG_SOUND_ROUTE(0, "mono", 0.05)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac4", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac5", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac6", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_SOUND_ADD("dac7", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.05) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac7", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( ertictac )
diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp
index daa63b3904d..51310b25c8d 100644
--- a/src/mame/drivers/esq1.cpp
+++ b/src/mame/drivers/esq1.cpp
@@ -571,13 +571,13 @@ INPUT_CHANGED_MEMBER(esq1_state::key_stroke)
{
if (oldval == 0 && newval == 1)
{
- send_through_panel((UINT8)(FPTR)param);
- send_through_panel((UINT8)(FPTR)0x00);
+ send_through_panel((UINT8)(uintptr_t)param);
+ send_through_panel((UINT8)(uintptr_t)0x00);
}
else if (oldval == 1 && newval == 0)
{
- send_through_panel((UINT8)(FPTR)param&0x7f);
- send_through_panel((UINT8)(FPTR)0x00);
+ send_through_panel((UINT8)(uintptr_t)param&0x7f);
+ send_through_panel((UINT8)(uintptr_t)0x00);
}
}
diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp
index e509840cb74..b9e72bec995 100644
--- a/src/mame/drivers/esq5505.cpp
+++ b/src/mame/drivers/esq5505.cpp
@@ -100,7 +100,7 @@
62 = DATA INCREMENT
63 = DATA DECREMENT
- VFX / VFX-SD / SD-1 analog values:
+ VFX / VFX-SD / SD-1 analog values: all values are 10 bits, left-justified within 16 bits.
0 = Pitch Bend
1 = Patch Select
2 = Mod Wheel
@@ -243,28 +243,17 @@ SLOT_INTERFACE_END
IRQ_CALLBACK_MEMBER(esq5505_state::maincpu_irq_acknowledge_callback)
{
- // We immediately update the interrupt presented to the CPU, so that it doesn't
- // end up retrying the same interrupt over and over. We then return the appropriate vector.
- int vector = 0;
switch(irqline) {
case 1:
- otis_irq_state = 0;
- vector = M68K_INT_ACK_AUTOVECTOR;
- break;
+ return M68K_INT_ACK_AUTOVECTOR;
case 2:
- dmac_irq_state = 0;
- vector = dmac_irq_vector;
- break;
+ return dmac_irq_vector;
case 3:
- duart_irq_state = 0;
- vector = duart_irq_vector;
- break;
+ return duart_irq_vector;
default:
logerror("\nUnexpected IRQ ACK Callback: IRQ %d\n", irqline);
return 0;
}
- update_irq_to_maincpu();
- return vector;
}
void esq5505_state::machine_start()
@@ -283,13 +272,13 @@ void esq5505_state::machine_reset()
floppy_connector *con = machine().device<floppy_connector>("wd1772:0");
floppy_image_device *floppy = con ? con->get_device() : nullptr;
- // Default analog values:
- m_analog_values[0] = 0x7fff; // pitch mod: start in the center
+ // Default analog values: all values are 10 bits, left-justified within 16 bits.
+ m_analog_values[0] = 0x7fc0; // pitch mod: start in the center
m_analog_values[1] = 0x0000; // patch select: nothing pressed.
- m_analog_values[2] = 0x0000; // mod wheel: at the bottom, no modulation
- m_analog_values[3] = 0xcccc; // data entry: somewhere in the middle
- m_analog_values[4] = 0xffff; // control voltage / pedal: full on.
- m_analog_values[5] = 0xffff; // Volume control: full on.
+ m_analog_values[2] = 0xffc0; // mod wheel: at the bottom, no modulation
+ m_analog_values[3] = 0xccc0; // data entry: somewhere in the middle
+ m_analog_values[4] = 0xffc0; // control voltage / pedal: full on.
+ m_analog_values[5] = 0xffc0; // Volume control: full on.
m_analog_values[6] = 0x7fc0; // Battery voltage: something reasonable.
m_analog_values[7] = 0x5540; // vRef to check battery.
@@ -316,7 +305,7 @@ void esq5505_state::machine_reset()
}
void esq5505_state::update_irq_to_maincpu() {
- //printf("\nupdating IRQ state: have OTIS=%d, DMAC=%d, DUART=%d\n", otis_irq_state, dmac_irq_state, duart_irq_state);
+ // printf("updating IRQ state: have OTIS=%d, DMAC=%d, DUART=%d\n", otis_irq_state, dmac_irq_state, duart_irq_state);
if (duart_irq_state) {
m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
@@ -526,6 +515,7 @@ WRITE8_MEMBER(esq5505_state::dma_end)
dmac_irq_state = 0;
}
+ // printf("IRQ update from DMAC: have OTIS=%d, DMAC=%d, DUART=%d\n", otis_irq_state, dmac_irq_state, duart_irq_state);
update_irq_to_maincpu();
}
@@ -558,7 +548,7 @@ WRITE8_MEMBER(esq5505_state::fdc_write_byte)
#if KEYBOARD_HACK
INPUT_CHANGED_MEMBER(esq5505_state::key_stroke)
{
- int val = (UINT8)(FPTR)param;
+ int val = (UINT8)(uintptr_t)param;
int cmp = 0x60;
if (m_system_type == SQ1)
@@ -601,7 +591,7 @@ INPUT_CHANGED_MEMBER(esq5505_state::key_stroke)
}
else if (oldval == 1 && newval == 0)
{
- // printf("key off %x\n", (UINT8)(FPTR)param);
+ // printf("key off %x\n", (UINT8)(uintptr_t)param);
m_panel->xmit_char(val&0x7f);
m_panel->xmit_char(0x00);
}
@@ -977,7 +967,9 @@ DRIVER_INIT_MEMBER(esq5505_state,sq1)
{
DRIVER_INIT_CALL(common);
m_system_type = SQ1;
+#if KEYBOARD_HACK
shift = 60;
+#endif
}
DRIVER_INIT_MEMBER(esq5505_state,denib)
diff --git a/src/mame/drivers/esripsys.cpp b/src/mame/drivers/esripsys.cpp
index 81683144df5..bf62a7e04fc 100644
--- a/src/mame/drivers/esripsys.cpp
+++ b/src/mame/drivers/esripsys.cpp
@@ -27,12 +27,12 @@
****************************************************************************/
#include "emu.h"
-#include "cpu/m6809/m6809.h"
+#include "includes/esripsys.h"
#include "cpu/esrip/esrip.h"
+#include "cpu/m6809/m6809.h"
#include "machine/6840ptm.h"
#include "machine/nvram.h"
-#include "sound/dac.h"
-#include "includes/esripsys.h"
+#include "sound/volt_reg.h"
/*************************************
@@ -552,22 +552,10 @@ WRITE8_MEMBER(esripsys_state::esripsys_dac_w)
else
{
UINT16 dac_data = (m_dac_msb << 8) | data;
-
- /*
- The 8-bit DAC modulates the 10-bit DAC.
- Shift down to prevent clipping.
- */
- m_dac->write_signed16((m_dac_vol * dac_data) >> 1);
+ m_dac->write(dac_data);
}
}
-/* 8-bit MC3408 DAC */
-WRITE8_MEMBER(esripsys_state::volume_dac_w)
-{
- m_dac_vol = data;
-}
-
-
/*************************************
*
* Memory Maps
@@ -603,7 +591,7 @@ static ADDRESS_MAP_START( sound_cpu_map, AS_PROGRAM, 8, esripsys_state )
AM_RANGE(0x0800, 0x0fff) AM_RAM // Not installed on later PCBs
AM_RANGE(0x2008, 0x2009) AM_READWRITE(tms5220_r, tms5220_w)
AM_RANGE(0x200a, 0x200b) AM_WRITE(esripsys_dac_w)
- AM_RANGE(0x200c, 0x200c) AM_WRITE(volume_dac_w)
+ AM_RANGE(0x200c, 0x200c) AM_DEVWRITE("dacvol", dac_byte_interface, write)
AM_RANGE(0x200d, 0x200d) AM_WRITE(control_w)
AM_RANGE(0x200e, 0x200e) AM_READWRITE(s_200e_r, s_200e_w)
AM_RANGE(0x200f, 0x200f) AM_READWRITE(s_200f_r, s_200f_w)
@@ -662,7 +650,6 @@ DRIVER_INIT_MEMBER(esripsys_state,esripsys)
save_item(NAME(m_s_to_g_latch1));
save_item(NAME(m_s_to_g_latch2));
save_item(NAME(m_dac_msb));
- save_item(NAME(m_dac_vol));
save_item(NAME(m_tms_data));
m_fasel = 0;
@@ -700,13 +687,16 @@ static MACHINE_CONFIG_START( esripsys, esripsys_state )
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
/* Sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", MC3410, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("dacvol", MC3408, 0) // unknown DAC
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
MCFG_SOUND_ADD("tms5220nl", TMS5220, 640000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* 6840 PTM */
MCFG_DEVICE_ADD("6840ptm", PTM6840, 0)
diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp
index c52f9e1f66f..74227888bb0 100644
--- a/src/mame/drivers/eti660.cpp
+++ b/src/mame/drivers/eti660.cpp
@@ -267,7 +267,7 @@ QUICKLOAD_LOAD_MEMBER( eti660_state, eti660 )
int i;
int quick_addr = 0x600;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/exerion.cpp b/src/mame/drivers/exerion.cpp
index fb8bf40a063..97ae0912dc7 100644
--- a/src/mame/drivers/exerion.cpp
+++ b/src/mame/drivers/exerion.cpp
@@ -513,7 +513,7 @@ DRIVER_INIT_MEMBER(exerion_state,exerion)
UINT8 *src, *dst;
/* allocate some temporary space */
- dynamic_buffer temp(0x10000);
+ std::vector<UINT8> temp(0x10000);
/* make a temporary copy of the character data */
src = &temp[0];
diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp
index 0db0060e437..ec8dfdcc9fc 100644
--- a/src/mame/drivers/exterm.cpp
+++ b/src/mame/drivers/exterm.cpp
@@ -63,13 +63,13 @@
****************************************************************************/
#include "emu.h"
-#include "cpu/tms34010/tms34010.h"
+#include "includes/exterm.h"
#include "cpu/m6502/m6502.h"
-#include "sound/dac.h"
-#include "sound/ym2151.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
-#include "includes/exterm.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
@@ -238,14 +238,6 @@ READ8_MEMBER(exterm_state::sound_slave_latch_r)
}
-WRITE8_MEMBER(exterm_state::sound_slave_dac_w)
-{
- /* DAC A is used to modulate DAC B */
- m_dac_value[offset & 1] = data;
- m_dac->write_unsigned16((m_dac_value[0] ^ 0xff) * m_dac_value[1]);
-}
-
-
READ8_MEMBER(exterm_state::sound_nmi_to_slave_r)
{
/* a read from here triggers an NMI pulse to the slave */
@@ -320,7 +312,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_slave_map, AS_PROGRAM, 8, exterm_state )
AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM
AM_RANGE(0x4000, 0x5fff) AM_READ(sound_slave_latch_r)
- AM_RANGE(0x8000, 0xbfff) AM_WRITE(sound_slave_dac_w)
+ AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x3ffe) AM_DEVWRITE("dacvol", dac_byte_interface, write)
+ AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x3ffe) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -447,13 +440,16 @@ static MACHINE_CONFIG_START( exterm, exterm_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac", AD7528, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ad7528j.e2
+ MCFG_SOUND_ADD("dacvol", AD7528, 0) // ad7528j.e2
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
MCFG_YM2151_ADD("ymsnd", 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index ce62e04be0d..8645b119da1 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -62,7 +62,6 @@ Notes/ToDo:
#include "emu.h"
#include "video/ppu2c0x.h"
#include "cpu/m6502/n2a03.h"
-#include "sound/dac.h"
#include "debugger.h"
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index 06f807891a5..552fe5a4869 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -46,13 +46,14 @@ Year + Game Main CPU Sound CPU Sound Video
***************************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "cpu/nec/nec.h"
+#include "includes/fantland.h"
#include "cpu/i86/i86.h"
-#include "sound/ym2151.h"
+#include "cpu/nec/nec.h"
+#include "cpu/z80/z80.h"
#include "sound/3526intf.h"
#include "sound/dac.h"
-#include "includes/fantland.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
/***************************************************************************
@@ -295,7 +296,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( fantland_sound_iomap, AS_IO, 8, fantland_state )
AM_RANGE( 0x0080, 0x0080 ) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE( 0x0100, 0x0101 ) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
- AM_RANGE( 0x0180, 0x0180 ) AM_DEVWRITE("dac", dac_device, write_unsigned8 )
+ AM_RANGE( 0x0180, 0x0180 ) AM_DEVWRITE("dac", dac_byte_interface, write )
ADDRESS_MAP_END
static ADDRESS_MAP_START( galaxygn_sound_iomap, AS_IO, 8, fantland_state )
@@ -718,7 +719,7 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r)
{
- int player = (FPTR)param;
+ int player = (uintptr_t)param;
int delta = ioport(player ? "WHEEL1" : "WHEEL0")->read();
delta = (delta & 0x7f) - (delta & 0x80) + 4;
@@ -867,16 +868,17 @@ static MACHINE_CONFIG_START( fantland, fantland_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_YM2151_ADD("ymsnd", 3000000)
- MCFG_SOUND_ROUTE(0, "mono", 0.35)
- MCFG_SOUND_ROUTE(1, "mono", 0.35)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.35)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -914,14 +916,14 @@ static MACHINE_CONFIG_START( galaxygn, fantland_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_YM2151_ADD("ymsnd", 3000000)
MCFG_YM2151_IRQ_HANDLER(WRITELINE(fantland_state, galaxygn_sound_irq))
- MCFG_SOUND_ROUTE(0, "mono", 1.0)
- MCFG_SOUND_ROUTE(1, "mono", 1.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0)
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -994,7 +996,7 @@ static MACHINE_CONFIG_START( borntofi, fantland_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
@@ -1002,22 +1004,22 @@ static MACHINE_CONFIG_START( borntofi, fantland_state )
MCFG_SOUND_ADD("msm1", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(WRITELINE(fantland_state, borntofi_adpcm_int_0)) /* IRQ handler */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* 8 kHz, 4 Bits */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("msm2", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(WRITELINE(fantland_state, borntofi_adpcm_int_1)) /* IRQ handler */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* 8 kHz, 4 Bits */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("msm3", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(WRITELINE(fantland_state, borntofi_adpcm_int_2)) /* IRQ handler */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* 8 kHz, 4 Bits */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("msm4", MSM5205, 384000)
MCFG_MSM5205_VCLK_CB(WRITELINE(fantland_state, borntofi_adpcm_int_3)) /* IRQ handler */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* 8 kHz, 4 Bits */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1049,13 +1051,13 @@ static MACHINE_CONFIG_START( wheelrun, fantland_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_14MHz/4)
MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_IRQ0))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/fcombat.cpp b/src/mame/drivers/fcombat.cpp
index 304f33b1e7c..43f8afc5682 100644
--- a/src/mame/drivers/fcombat.cpp
+++ b/src/mame/drivers/fcombat.cpp
@@ -331,7 +331,7 @@ DRIVER_INIT_MEMBER(fcombat_state,fcombat)
UINT8 *src, *dst;
/* allocate some temporary space */
- dynamic_buffer temp(0x10000);
+ std::vector<UINT8> temp(0x10000);
/* make a temporary copy of the character data */
src = &temp[0];
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index 2ecda370ff1..f702d3ef68b 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -347,6 +347,24 @@ CPU D6 to W: (model 6092, tied to VCC otherwise)
******************************************************************************
+Designer series:
+
+Designer 2000 (model 6102)
+----------------
+8KB RAM(KM6264AL-10), 32KB ROM(AMI 101.1077A01)
+Ricoh RP65C02G CPU, 3MHz XTAL
+PCB label 510-1129A01
+basically same as Excellence hardware, reskinned board
+
+Designer 1500 is on Z80 hardware
+
+Designer 2100 Display (model 6106)
+----------------
+TODO
+
+
+******************************************************************************
+
Chesster (model 6120)
There is also a German version titled Kishon Chesster
----------------
@@ -362,19 +380,19 @@ I/O is via TTL, see source code for more info
******************************************************************************/
#include "emu.h"
+#include "includes/fidelz80.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/r65c02.h"
#include "cpu/m6502/m65sc02.h"
#include "machine/6821pia.h"
#include "machine/i8255.h"
#include "machine/nvram.h"
-#include "sound/dac.h"
-
-#include "includes/fidelz80.h"
+#include "sound/volt_reg.h"
// internal artwork
#include "fidel_chesster.lh" // clickable
#include "fidel_csc.lh" // clickable, with preliminary boardpieces simulation
+#include "fidel_des2000.lh" // clickable
#include "fidel_eag.lh" // clickable
#include "fidel_eas.lh" // clickable
#include "fidel_ex.lh" // clickable
@@ -466,7 +484,7 @@ void fidel6502_state::csc_prepare_display()
m_inp_mux = 1 << m_led_select & 0x3ff;
// 7442 9: speaker out
- m_speaker->level_w(m_inp_mux >> 9 & 1);
+ m_dac->write(BIT(m_inp_mux, 9));
// 7seg leds+H (not on all models), 8*8(+1) chessboard leds
set_display_segmask(0xf, 0x7f);
@@ -636,7 +654,7 @@ WRITE8_MEMBER(fidel6502_state::eas_ppi_portc_w)
eas_prepare_display();
// 7442 9: speaker out
- m_speaker->level_w(m_led_select >> 9 & 1);
+ m_dac->write(BIT(m_led_select, 9));
// d4: speech ROM A12
m_speech->force_update(); // update stream to now
@@ -689,7 +707,7 @@ WRITE8_MEMBER(fidel6502_state::sc9_control_w)
sc9_prepare_display();
// 74245 Q9: speaker out
- m_speaker->level_w(sel >> 9 & 1);
+ m_dac->write(BIT(sel, 9));
// d4,d5: ?
// d6,d7: N/C
@@ -724,7 +742,7 @@ WRITE8_MEMBER(fidel6502_state::sc12_control_w)
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out
- m_speaker->level_w(sel >> 9 & 1);
+ m_dac->write(BIT(sel, 9));
// d6,d7: led select (active low)
display_matrix(9, 2, sel & 0x1ff, ~data >> 6 & 3);
@@ -785,7 +803,7 @@ WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w)
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out (optional?)
- m_speaker->level_w(sel >> 9 & 1);
+ m_dac->write(BIT(sel, 9));
// 74259 Q4-Q7,Q2,Q1: digit/led select (active low)
UINT8 led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f;
@@ -976,14 +994,14 @@ ADDRESS_MAP_END
// Excellence
static ADDRESS_MAP_START( fexcel_map, AS_PROGRAM, 8, fidel6502_state )
- AM_RANGE(0x0000, 0x07ff) AM_RAM
+ AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x3800) AM_RAM
AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x3ff8) AM_READWRITE(fexcel_ttl_r, fexcel_ttl_w)
//AM_RANGE(0x8000, 0x8000) AM_READNOP // checks for opening book module, but hw doesn't have a module slot
AM_RANGE(0xc000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( fexcelp_map, AS_PROGRAM, 8, fidel6502_state )
- AM_RANGE(0x0000, 0x1fff) AM_RAM
+ AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM
AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x3ff8) AM_READWRITE(fexcel_ttl_r, fexcel_ttl_w)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -1001,7 +1019,7 @@ static ADDRESS_MAP_START( chesster_map, AS_PROGRAM, 8, fidel6502_state )
AM_RANGE(0x0000, 0x1fff) AM_RAM
AM_RANGE(0x2000, 0x2007) AM_MIRROR(0x1ff8) AM_READWRITE(chesster_input_r, chesster_control_w)
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
- AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_DEVWRITE("dac8", dac_byte_interface, write)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -1447,9 +1465,10 @@ static MACHINE_CONFIG_START( rsc, fidel6502_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_rsc_v2)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( csc, fidel6502_state )
@@ -1478,13 +1497,14 @@ static MACHINE_CONFIG_START( csc, fidel6502_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_csc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( su9, csc )
@@ -1514,13 +1534,14 @@ static MACHINE_CONFIG_START( eas, fidel6502_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_eas)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
@@ -1552,9 +1573,10 @@ static MACHINE_CONFIG_START( sc9, fidel6502_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_sc9)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
@@ -1584,7 +1606,7 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", R65C02, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(sc12_map)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer (22nf, 82kohm, 1kohm)
MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780))
@@ -1592,9 +1614,10 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_sc12)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
@@ -1608,17 +1631,18 @@ static MACHINE_CONFIG_START( fexcel, fidel6502_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M65SC02, XTAL_12MHz/4) // G65SC102P-3, 12.0M ceramic resonator
MCFG_CPU_PROGRAM_MAP(fexcel_map)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer, PCB photo suggests it's same as sc12
- MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us
- MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(630)) // from 556 timer (22nf, 102kohm, 1kohm)
+ MCFG_TIMER_START_DELAY(attotime::from_hz(630) - attotime::from_nsec(15250)) // active for 15.25us
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(630))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_fidel_ex)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( fexcelb, fexcel )
@@ -1635,12 +1659,28 @@ static MACHINE_CONFIG_DERIVED( fexcelp, fexcel )
MCFG_CPU_PROGRAM_MAP(fexcelp_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( fdes2000, fexcel )
+
+ /* basic machine hardware */
+ MCFG_CPU_REPLACE("maincpu", R65C02, XTAL_3MHz) // RP65C02G
+ MCFG_CPU_PROGRAM_MAP(fexcelp_map)
+
+ // change irq timer frequency
+ MCFG_DEVICE_REMOVE("irq_on")
+ MCFG_DEVICE_REMOVE("irq_off")
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(585)) // from 556 timer (22nf, 110kohm, 1kohm)
+ MCFG_TIMER_START_DELAY(attotime::from_hz(585) - attotime::from_nsec(15250)) // active for 15.25us
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(585))
+
+ MCFG_DEFAULT_LAYOUT(layout_fidel_des2000)
+MACHINE_CONFIG_END
+
static MACHINE_CONFIG_DERIVED( fexcelv, fexcelb )
/* sound hardware */
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, fexcelv_speech_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( fexceld, fexcelb )
@@ -1654,15 +1694,19 @@ static MACHINE_CONFIG_START( chesster, fidel6502_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", R65C02, XTAL_5MHz) // RP65C02G
MCFG_CPU_PROGRAM_MAP(chesster_map)
- MCFG_CPU_PERIODIC_INT_DRIVER(fidelz80base_state, irq0_line_hold, 9500) // R/C circuit, approximation
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(9615)) // R/C circuit, measured
+ MCFG_TIMER_START_DELAY(attotime::from_hz(9615) - attotime::from_nsec(2600)) // active for 2.6us
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(9615))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_fidel_chesster)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac8", DAC_8BIT_R2R, 0) // m74hc374b1.ic1 + 8l513_02.z2
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1980,7 +2024,7 @@ ROM_END
ROM_START( fexcela )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("ep12_d.ic5", 0xc000, 0x4000, CRC(212b006d) SHA1(242ff851b0841cbec66bbada6a730da021010e2c) )
+ ROM_LOAD("101-1072a01.ic5", 0xc000, 0x4000, CRC(212b006d) SHA1(242ff851b0841cbec66bbada6a730da021010e2c) )
ROM_END
ROM_START( fexcelp )
@@ -1988,6 +2032,11 @@ ROM_START( fexcelp )
ROM_LOAD("par_ex.ic5", 0x8000, 0x8000, CRC(274d6aff) SHA1(c8d943b2f15422ac62f539b568f5509cbce568a3) ) // GI 27C256, no label
ROM_END
+ROM_START( fdes2000 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD("101-1077a01.ic5", 0x8000, 0x8000, CRC(62006320) SHA1(1d6370973dbae42c54639b261cc81e32cdfc1d5d) ) // AMI
+ROM_END
+
ROM_START( fexcelv )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) // PCB1, M27256
@@ -2052,10 +2101,12 @@ CONS( 1983, fscc9ps, fscc9, 0, playmatic, playmatic, driver_device, 0
CONS( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1985, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "The Excellence (model 6080)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1985, fexcela, fexcel, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "The Excellence (model EP12)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1986, fexcelp, fexcel, 0, fexcelp, fexcel, driver_device, 0, "Fidelity Electronics", "The Par Excellence (model 6083)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1985, fexcela, fexcel, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "The Excellence (model EP12)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 1st version
CONS( 1987, fexcelb, fexcel, 0, fexcelb, fexcelb, driver_device, 0, "Fidelity Electronics", "The Excellence (model 6080B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1987, fexcelv, fexcel, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence (model 6092)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1987, fexceld, fexcel, 0, fexceld, fexcelb, driver_device, 0, "Fidelity Electronics", "Excel Display (model 6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1986, fexcelp, fexcel, 0, fexcelp, fexcel, driver_device, 0, "Fidelity Electronics", "The Par Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1987, fexcelv, fexcel, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1987, fexceld, fexcel, 0, fexceld, fexcelb, driver_device, 0, "Fidelity Electronics", "Excel Display", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+
+CONS( 1989, fdes2000, 0, 0, fdes2000, fexcel, driver_device, 0, "Fidelity Electronics", "Designer 2000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // Excellence series hardware
CONS( 1990, chesster, 0, 0, chesster, chesster, fidel6502_state, chesster, "Fidelity Electronics", "Chesster Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
index f6411ee7ea9..617cf5b57e2 100644
--- a/src/mame/drivers/fidel68k.cpp
+++ b/src/mame/drivers/fidel68k.cpp
@@ -143,10 +143,10 @@ B0000x-xxxxxx: see V7, -800000
******************************************************************************/
#include "emu.h"
+#include "includes/fidelz80.h"
#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
-
-#include "includes/fidelz80.h"
+#include "sound/volt_reg.h"
// internal artwork
#include "fidel_eag_68k.lh" // clickable
@@ -224,7 +224,7 @@ WRITE8_MEMBER(fidel68k_state::eag_mux_w)
// 74145 0-8: input mux, digit/led select
// 74145 9: speaker out
UINT16 sel = 1 << (data & 0xf);
- m_speaker->level_w(sel >> 9 & 1);
+ m_dac->write(BIT(sel, 9));
m_inp_mux = sel & 0x1ff;
eag_prepare_display();
}
@@ -415,9 +415,10 @@ static MACHINE_CONFIG_START( eag, fidel68k_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_eag_68k)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc")
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index f708158b734..6b8782c0c02 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -490,14 +490,14 @@ expect that the software reads these once on startup only.
******************************************************************************/
#include "emu.h"
+#include "includes/fidelz80.h"
#include "cpu/z80/z80.h"
#include "cpu/mcs48/mcs48.h"
#include "machine/i8255.h"
#include "machine/i8243.h"
#include "machine/z80pio.h"
#include "sound/beep.h"
-
-#include "includes/fidelz80.h"
+#include "sound/volt_reg.h"
// internal artwork
#include "fidel_cc.lh" // clickable
@@ -881,7 +881,7 @@ WRITE8_MEMBER(fidelz80_state::bcc_control_w)
// a0-a2,d7: digit segment data via NE591, Q7 is speaker out
UINT8 mask = 1 << (offset & 7);
m_7seg_data = (m_7seg_data & ~mask) | ((data & 0x80) ? mask : 0);
- m_speaker->level_w(m_7seg_data >> 7 & 1);
+ m_dac->write(BIT(m_7seg_data, 7));
// d0-d3: led select, input mux
// d4,d5: check,lose leds(direct)
@@ -1456,9 +1456,10 @@ static MACHINE_CONFIG_START( bcc, fidelz80_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_bcc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( cc10, fidelz80_state )
@@ -1479,9 +1480,9 @@ static MACHINE_CONFIG_START( cc10, fidelz80_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_cc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("beeper", BEEP, 1360) // approximation, from 556 timer ic
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_TIMER_DRIVER_ADD("beeper_off", fidelz80_state, beeper_off_callback)
MACHINE_CONFIG_END
@@ -1505,16 +1506,16 @@ static MACHINE_CONFIG_START( vcc, fidelz80_state )
MCFG_MACHINE_START_OVERRIDE(fidelz80_state,vcc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_EXT_READ_HANDLER(READ8(fidelz80_state, vcc_speech_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( vsc, fidelz80_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
+ MCFG_CPU_ADD("maincpu", Z80, 3900000) // 3.9MHz resonator
MCFG_CPU_PROGRAM_MAP(vsc_map)
MCFG_CPU_IO_MAP(vsc_io)
MCFG_CPU_PERIODIC_INT_DRIVER(fidelz80base_state, nmi_line_pulse, 600) // 555 timer, approx 600hz
@@ -1533,10 +1534,10 @@ static MACHINE_CONFIG_START( vsc, fidelz80_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_vsc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_EXT_READ_HANDLER(READ8(fidelz80_state, vcc_speech_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( vbrc, fidelz80_state )
@@ -1556,10 +1557,10 @@ static MACHINE_CONFIG_START( vbrc, fidelz80_state )
MCFG_DEFAULT_LAYOUT(layout_fidel_vbrc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
MCFG_S14001A_BSY_HANDLER(INPUTLINE("maincpu", Z80_INPUT_LINE_WAIT))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp
index 79c0cfbb869..6fc8a45d826 100644
--- a/src/mame/drivers/finalizr.cpp
+++ b/src/mame/drivers/finalizr.cpp
@@ -13,15 +13,16 @@
***************************************************************************/
#include "emu.h"
-#include "machine/konami1.h"
+#include "includes/finalizr.h"
+#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
#include "cpu/mcs48/mcs48.h"
#include "machine/gen_latch.h"
+#include "machine/konami1.h"
#include "machine/watchdog.h"
-#include "sound/sn76496.h"
#include "sound/dac.h"
-#include "includes/konamipt.h"
-#include "includes/finalizr.h"
+#include "sound/sn76496.h"
+#include "sound/volt_reg.h"
TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::finalizr_scanline)
@@ -133,7 +134,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, finalizr_state )
AM_RANGE(0x00, 0xff) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_w)
AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_WRITE(i8039_T0_w)
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(i8039_T1_r)
@@ -287,15 +288,16 @@ static MACHINE_CONFIG_START( finalizr, finalizr_state )
MCFG_PALETTE_INIT_OWNER(finalizr_state, finalizr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.65)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.325) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/firetrap.cpp b/src/mame/drivers/firetrap.cpp
index 05f577354a0..6a2dc7d14a5 100644
--- a/src/mame/drivers/firetrap.cpp
+++ b/src/mame/drivers/firetrap.cpp
@@ -409,7 +409,7 @@ INPUT_CHANGED_MEMBER(firetrap_state::coin_inserted)
/* coin insertion causes an IRQ */
if(newval)
{
- m_coin_command_pending = (UINT8)(FPTR)(param);
+ m_coin_command_pending = (UINT8)(uintptr_t)(param);
/* Make sure coin IRQ's aren't generated when another command is pending, the main cpu
definitely doesn't expect them as it locks out the coin routine */
diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp
index edefbdff506..c0f4bf3539c 100644
--- a/src/mame/drivers/firetrk.cpp
+++ b/src/mame/drivers/firetrk.cpp
@@ -45,7 +45,7 @@ INPUT_CHANGED_MEMBER(firetrk_state::gear_changed)
{
if (newval)
{
- m_gear = (FPTR)param;
+ m_gear = (uintptr_t)param;
output().set_value("P1gear", m_gear+1);
}
}
@@ -179,20 +179,20 @@ READ8_MEMBER(firetrk_state::montecar_dip_r)
CUSTOM_INPUT_MEMBER(firetrk_state::steer_dir_r)
{
- return m_steer_dir[(FPTR)param];
+ return m_steer_dir[(uintptr_t)param];
}
CUSTOM_INPUT_MEMBER(firetrk_state::steer_flag_r)
{
- return m_steer_flag[(FPTR)param];
+ return m_steer_flag[(uintptr_t)param];
}
CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
{
UINT32 ret;
- int which = (FPTR)param;
+ int which = (uintptr_t)param;
if (which != 2)
ret = m_skid[which];
@@ -206,7 +206,7 @@ CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
{
UINT32 ret;
- int which = (FPTR)param;
+ int which = (uintptr_t)param;
if (which != 2)
ret = m_crash[which];
@@ -219,7 +219,7 @@ CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
CUSTOM_INPUT_MEMBER(firetrk_state::gear_r)
{
- return (m_gear == (FPTR)param) ? 1 : 0;
+ return (m_gear == (uintptr_t)param) ? 1 : 0;
}
diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp
index 1afa2a7ac5e..2d1ade9af49 100644
--- a/src/mame/drivers/flstory.cpp
+++ b/src/mame/drivers/flstory.cpp
@@ -12,11 +12,12 @@
***************************************************************************/
#include "emu.h"
+#include "includes/flstory.h"
#include "cpu/z80/z80.h"
#include "cpu/m6805/m6805.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/flstory.h"
+#include "sound/volt_reg.h"
READ8_MEMBER(flstory_state::from_snd_r)
{
@@ -436,7 +437,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, flstory_state )
AM_RANGE(0xd800, 0xd800) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_WRITE(to_main_w)
AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read*/
AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w)
- AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_device, write_unsigned8) /* signed 8-bit DAC & unknown read */
+ AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE("dac", dac_byte_interface, write) /* signed 8-bit DAC & unknown read */
AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostics ROM */
ADDRESS_MAP_END
@@ -1076,31 +1077,32 @@ static MACHINE_CONFIG_START( flstory, flstory_state )
MCFG_VIDEO_START_OVERRIDE(flstory_state,flstory)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_8MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, XTAL_8MHz/4) /* verified on pcb */
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( onna34ro, flstory_state )
@@ -1138,31 +1140,32 @@ static MACHINE_CONFIG_START( onna34ro, flstory_state )
MCFG_VIDEO_START_OVERRIDE(flstory_state,flstory)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( victnine, flstory_state )
@@ -1200,31 +1203,32 @@ static MACHINE_CONFIG_START( victnine, flstory_state )
MCFG_VIDEO_START_OVERRIDE(flstory_state,victnine)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("msm", MSM5232, 8000000/4)
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
MACHINE_RESET_MEMBER(flstory_state,rumba)
@@ -1268,31 +1272,32 @@ static MACHINE_CONFIG_START( rumba, flstory_state )
MCFG_VIDEO_START_OVERRIDE(flstory_state,rumba)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_8MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(flstory_state, sound_control_2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(flstory_state, sound_control_3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("msm", MSM5232, XTAL_8MHz/4) /* verified on pcb */
MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/flyball.cpp b/src/mame/drivers/flyball.cpp
index 450fcbabc82..c1bab2d6190 100644
--- a/src/mame/drivers/flyball.cpp
+++ b/src/mame/drivers/flyball.cpp
@@ -426,7 +426,7 @@ void flyball_state::machine_start()
/* address bits 0 through 8 are inverted */
UINT8 *ROM = memregion("maincpu")->base();
int len = memregion("maincpu")->bytes();
- dynamic_buffer buf(len);
+ std::vector<UINT8> buf(len);
for (int i = 0; i < len; i++)
buf[i ^ 0x1ff] = ROM[i];
memcpy(ROM, &buf[0], len);
diff --git a/src/mame/drivers/forte2.cpp b/src/mame/drivers/forte2.cpp
index 8f770e467b7..6cd35edaa74 100644
--- a/src/mame/drivers/forte2.cpp
+++ b/src/mame/drivers/forte2.cpp
@@ -149,7 +149,7 @@ DRIVER_INIT_MEMBER(forte2_state,pesadelo)
}
// address line swap
- dynamic_buffer buf(memsize);
+ std::vector<UINT8> buf(memsize);
memcpy(&buf[0], mem, memsize);
for (int i = 0; i < memsize; i++)
{
diff --git a/src/mame/drivers/fruitpc.cpp b/src/mame/drivers/fruitpc.cpp
index b0a1c415ca7..f5c5ad4cd3a 100644
--- a/src/mame/drivers/fruitpc.cpp
+++ b/src/mame/drivers/fruitpc.cpp
@@ -19,7 +19,6 @@
#include "machine/pckeybrd.h"
#include "machine/idectrl.h"
#include "video/pc_vga.h"
-#include "sound/dac.h"
#include "machine/pcshare.h"
#include "bus/isa/isa.h"
#include "bus/isa/sblaster.h"
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index 87c8742c2b9..1e0b4e18a4a 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -6175,7 +6175,7 @@ DRIVER_INIT_MEMBER(funworld_state, saloon)
}
{
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0], rom, size);
@@ -6194,7 +6194,7 @@ DRIVER_INIT_MEMBER(funworld_state, saloon)
******************************/
{
- dynamic_buffer buffer(sizeg);
+ std::vector<UINT8> buffer(sizeg);
memcpy(&buffer[0], gfxrom, sizeg);
/* address lines swap: fedcba9876543210 -> fedcb67584a39012 */
@@ -6219,7 +6219,7 @@ DRIVER_INIT_MEMBER(funworld_state, saloon)
}
{
- dynamic_buffer buffer(sizep);
+ std::vector<UINT8> buffer(sizep);
memcpy(&buffer[0], prom, sizep);
@@ -6354,7 +6354,7 @@ DRIVER_INIT_MEMBER(funworld_state, dino4)
}
{
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0], rom, size);
@@ -6373,7 +6373,7 @@ DRIVER_INIT_MEMBER(funworld_state, dino4)
******************************/
{
- dynamic_buffer buffer(sizeg);
+ std::vector<UINT8> buffer(sizeg);
memcpy(&buffer[0], gfxrom, sizeg);
/* address lines swap: fedcba9876543210 -> fedcb67584a39012 */
@@ -6458,7 +6458,7 @@ static void decrypt_rcdino4(UINT8 *rom, int size, UINT8 *gfxrom, int sizeg, UINT
}
{
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0], rom, size);
@@ -6477,7 +6477,7 @@ static void decrypt_rcdino4(UINT8 *rom, int size, UINT8 *gfxrom, int sizeg, UINT
******************************/
{
- dynamic_buffer buffer(sizeg);
+ std::vector<UINT8> buffer(sizeg);
memcpy(&buffer[0], gfxrom, sizeg);
/* address lines swap: fedcba9876543210 -> fedcb67584a39012 */
diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp
index a5c101635aa..27491d2e0ee 100644
--- a/src/mame/drivers/gaelco3d.cpp
+++ b/src/mame/drivers/gaelco3d.cpp
@@ -397,7 +397,7 @@ WRITE16_MEMBER(gaelco3d_state::sound_status_w)
CUSTOM_INPUT_MEMBER(gaelco3d_state::analog_bit_r)
{
- int which = (FPTR)param;
+ int which = (uintptr_t)param;
return (m_analog_ports[which] >> 7) & 0x01;
}
diff --git a/src/mame/drivers/gaiden.cpp b/src/mame/drivers/gaiden.cpp
index ca633313c58..d6556c5481d 100644
--- a/src/mame/drivers/gaiden.cpp
+++ b/src/mame/drivers/gaiden.cpp
@@ -1567,7 +1567,7 @@ void gaiden_state::descramble_drgnbowl(int descramble_cpu)
if (descramble_cpu)
{
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0], ROM, size);
for( i = 0; i < size; i++ )
@@ -1584,7 +1584,7 @@ void gaiden_state::descramble_drgnbowl(int descramble_cpu)
ROM = memregion("gfx2")->base();
size = memregion("gfx2")->bytes();
{
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0],ROM,size);
for( i = 0; i < size; i++ )
@@ -1619,7 +1619,7 @@ void gaiden_state::descramble_mastninj_gfx(UINT8* src)
/* rearrange gfx */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
{
@@ -1635,7 +1635,7 @@ void gaiden_state::descramble_mastninj_gfx(UINT8* src)
}
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0; i < len; i++)
{
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index 494e7eaa2d7..ce8bb01b2eb 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -655,14 +655,15 @@ TODO:
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/galaxian.h"
+#include "audio/cclimber.h"
+#include "audio/galaxian.h"
#include "cpu/s2650/s2650.h"
+#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
-#include "sound/sn76496.h"
#include "sound/discrete.h"
-#include "audio/cclimber.h"
-#include "audio/galaxian.h"
-#include "includes/galaxian.h"
+#include "sound/sn76496.h"
+#include "sound/volt_reg.h"
#define KONAMI_SOUND_CLOCK 14318000
@@ -971,7 +972,7 @@ WRITE8_MEMBER(galaxian_state::sfx_sample_io_w)
{
/* the decoding here is very simplistic, and you can address both simultaneously */
if (offset & 0x04) m_ppi8255_2->write(space, offset & 3, data);
- if (offset & 0x10) m_dac->write_signed8(data);
+ if (offset & 0x10) m_dac->write(data);
}
@@ -1299,7 +1300,7 @@ WRITE8_MEMBER(galaxian_state::zigzag_ay8910_w)
CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r)
{
- return (ioport("FAKE")->read() >> (FPTR)param) & 1;
+ return (ioport("FAKE")->read() >> (uintptr_t)param) & 1;
}
@@ -1347,7 +1348,7 @@ WRITE8_MEMBER(galaxian_state::kingball_sound2_w)
WRITE8_MEMBER(galaxian_state::kingball_dac_w)
{
- m_dac->write_unsigned8(data ^ 0xff);
+ m_dac->write(data >> 4);
}
@@ -5532,7 +5533,7 @@ static MACHINE_CONFIG_START( galaxian_base, galaxian_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("stars", galaxian_state, galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
@@ -5574,7 +5575,7 @@ static MACHINE_CONFIG_FRAGMENT( konami_sound_1x_ay8910 )
MCFG_SOUND_ADD("konami", DISCRETE, 0)
MCFG_DISCRETE_INTF(konami_sound)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.75)
MACHINE_CONFIG_END
@@ -5606,7 +5607,7 @@ static MACHINE_CONFIG_FRAGMENT( konami_sound_2x_ay8910 )
MCFG_SOUND_ADD("konami", DISCRETE, 0)
MCFG_DISCRETE_INTF(konami_sound)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -5659,7 +5660,7 @@ static MACHINE_CONFIG_DERIVED( zigzag, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) /* matches PCB video - unconfirmed */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -5696,10 +5697,10 @@ static MACHINE_CONFIG_DERIVED( fantastc, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("8910.1", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -5726,10 +5727,10 @@ static MACHINE_CONFIG_DERIVED( timefgtr, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("8910.1", AY8910, GALAXIAN_PIXEL_CLOCK/3/2) // 3.072MHz
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -5743,7 +5744,7 @@ static MACHINE_CONFIG_DERIVED( jumpbug, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2/2) /* matches PCB video - unconfirmed */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -5759,7 +5760,7 @@ static MACHINE_CONFIG_DERIVED( checkman, mooncrst )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, 1789750)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -5780,7 +5781,7 @@ static MACHINE_CONFIG_DERIVED( checkmaj, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, 1620000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 2)
MACHINE_CONFIG_END
@@ -5807,8 +5808,9 @@ static MACHINE_CONFIG_DERIVED( kingball, mooncrst )
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
/* sound hardware */
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.53) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -5930,11 +5932,11 @@ static MACHINE_CONFIG_DERIVED( explorer, galaxian_base )
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, explorer_sound_latch_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("8910.1", AY8910, KONAMI_SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, konami_sound_timer_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( takeoff, explorer ) // takeoff shares the same main map as explorer, but uses only an AY8912 for sound.
@@ -5954,7 +5956,7 @@ static MACHINE_CONFIG_DERIVED( takeoff, explorer ) // takeoff shares the same ma
MCFG_SOUND_ADD("8912", AY8912, XTAL_12MHz / 8)
MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, explorer_sound_latch_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scorpion, theend )
@@ -5978,10 +5980,10 @@ static MACHINE_CONFIG_DERIVED( scorpion, theend )
MCFG_SOUND_ADD("8910.2", AY8910, KONAMI_SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("digitalker", digitalker_device, digitalker_data_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(galaxian_state, scorpion_digitalker_control_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_DIGITALKER_ADD("digitalker", 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
MACHINE_CONFIG_END
@@ -6022,8 +6024,9 @@ static MACHINE_CONFIG_DERIVED( sfx, galaxian_base )
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(galaxian_state, sfx_sample_control_w))
/* DAC for the sample player */
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -6136,7 +6139,7 @@ static MACHINE_CONFIG_DERIVED( anteater, scobra )
/* quiet down the sounds */
MCFG_SOUND_MODIFY("konami")
MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
@@ -6323,7 +6326,7 @@ void galaxian_state::decode_anteater_gfx()
{
UINT32 romlength = memregion("gfx1")->bytes();
UINT8 *rombase = memregion("gfx1")->base();
- dynamic_buffer scratch(romlength);
+ std::vector<UINT8> scratch(romlength);
UINT32 offs;
memcpy(&scratch[0], rombase, romlength);
@@ -6342,7 +6345,7 @@ void galaxian_state::decode_losttomb_gfx()
{
UINT32 romlength = memregion("gfx1")->bytes();
UINT8 *rombase = memregion("gfx1")->base();
- dynamic_buffer scratch(romlength);
+ std::vector<UINT8> scratch(romlength);
UINT32 offs;
memcpy(&scratch[0], rombase, romlength);
diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp
index e33e6f55b15..79f0270fb06 100644
--- a/src/mame/drivers/galaxold.cpp
+++ b/src/mame/drivers/galaxold.cpp
@@ -105,7 +105,6 @@ Stephh's notes (based on the games Z80 code and some tests) for other games :
#include "machine/watchdog.h"
#include "sound/ay8910.h"
#include "sound/sn76496.h"
-#include "sound/dac.h"
#include "audio/galaxian.h"
#include "includes/galaxold.h"
@@ -782,7 +781,7 @@ ADDRESS_MAP_END
/* Lives Dips are spread across two input ports */
CUSTOM_INPUT_MEMBER(galaxold_state::vpool_lives_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
@@ -1025,7 +1024,7 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
CUSTOM_INPUT_MEMBER(galaxold_state::ckongg_coinage_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
@@ -1537,7 +1536,7 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
CUSTOM_INPUT_MEMBER(galaxold_state::dkongjrm_coinage_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
@@ -2239,7 +2238,7 @@ static MACHINE_CONFIG_START( galaxold_base, galaxold_state )
MCFG_VIDEO_START_OVERRIDE(galaxold_state,galaxold)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
@@ -2428,7 +2427,7 @@ static MACHINE_CONFIG_DERIVED( ozon1, galaxold_base )
MCFG_VIDEO_START_OVERRIDE(galaxold_state,ozon1)
MCFG_SOUND_ADD("aysnd", AY8910, PIXEL_CLOCK/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -2457,7 +2456,7 @@ static MACHINE_CONFIG_START( drivfrcg, galaxold_state )
MCFG_VIDEO_START_OVERRIDE(galaxold_state,drivfrcg)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FRAGMENT_ADD(galaxian_audio)
MACHINE_CONFIG_END
@@ -2478,7 +2477,7 @@ static MACHINE_CONFIG_DERIVED( bongo, galaxold_base )
/* sound hardware */
MCFG_SOUND_ADD("aysnd", AY8910, PIXEL_CLOCK/4)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -2538,9 +2537,9 @@ static MACHINE_CONFIG_START( racknrol, galaxold_state )
MCFG_VIDEO_START_OVERRIDE(galaxold_state,racknrol)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("snsnd", SN76489A, PIXEL_CLOCK/2) // SN76489AN
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -2564,9 +2563,9 @@ static MACHINE_CONFIG_START( hexpoola, galaxold_state )
MCFG_VIDEO_START_OVERRIDE(galaxold_state,racknrol)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("snsnd", SN76496, PIXEL_CLOCK/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -2793,7 +2792,7 @@ DRIVER_INIT_MEMBER(galaxold_state,ckonggx)
};
UINT8 *rom = memregion("maincpu")->base();
- dynamic_buffer buffer(0x5800);
+ std::vector<UINT8> buffer(0x5800);
for (int i=0;i<88;i++)
{
diff --git a/src/mame/drivers/galeb.cpp b/src/mame/drivers/galeb.cpp
index d595a603966..9faf0b73a54 100644
--- a/src/mame/drivers/galeb.cpp
+++ b/src/mame/drivers/galeb.cpp
@@ -14,26 +14,58 @@
#include "emu.h"
-#include "cpu/m6502/m6502.h"
-#include "sound/dac.h"
#include "includes/galeb.h"
+#include "cpu/m6502/m6502.h"
+#include "sound/volt_reg.h"
static GFXDECODE_START( galeb )
GFXDECODE_ENTRY( "gfx1", 0x0000, galeb_charlayout, 0, 1 )
GFXDECODE_END
-READ8_MEMBER(galeb_state::galeb_keyboard_r)
+void galeb_state::machine_start()
{
- static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7" };
+ save_item(NAME(m_dac_state));
- return ioport(keynames[offset])->read();
+ m_dac->write(m_dac_state);
+}
+
+WRITE8_MEMBER(galeb_state::dac_w)
+{
+ m_dac_state = !m_dac_state;
+ m_dac->write(m_dac_state);
+}
+
+READ8_MEMBER(galeb_state::keyboard_r)
+{
+ return m_keyboard[offset]->read();
+}
+
+READ8_MEMBER(galeb_state::tape_status_r)
+{
+ int status = 0;
+ status |= 2; /// send ready
+ status |= 1; /// receive ready
+ return status;
+}
+
+WRITE8_MEMBER(galeb_state::tape_data_w)
+{
+ logerror("tape_data_w %02x\n", data);
+}
+
+READ8_MEMBER(galeb_state::tape_data_r)
+{
+ logerror("tape_data_r (press escape to cancel load)\n");
+ return 0x00;
}
/* Address maps */
static ADDRESS_MAP_START(galeb_mem, AS_PROGRAM, 8, galeb_state )
AM_RANGE( 0x0000, 0x1fff ) AM_RAM // RAM
- AM_RANGE( 0xbfe0, 0xbfe7 ) AM_READ(galeb_keyboard_r )
- AM_RANGE( 0xbfe0, 0xbfe0 ) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE( 0xbfe0, 0xbfe7 ) AM_READ(keyboard_r )
+ AM_RANGE( 0xbfe0, 0xbfe0 ) AM_WRITE(dac_w)
+ AM_RANGE( 0xbffe, 0xbffe ) AM_READ(tape_status_r)
+ AM_RANGE( 0xbfff, 0xbfff ) AM_READWRITE(tape_data_r, tape_data_w)
AM_RANGE( 0xb000, 0xb3ff ) AM_RAM AM_SHARE("video_ram") // video ram
AM_RANGE( 0xc000, 0xc7ff ) AM_ROM // BASIC 01 ROM
AM_RANGE( 0xc800, 0xcfff ) AM_ROM // BASIC 02 ROM
@@ -147,9 +179,10 @@ static MACHINE_CONFIG_START( galeb, galeb_state )
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/galivan.cpp b/src/mame/drivers/galivan.cpp
index 4b5e8b109b3..67230e355df 100644
--- a/src/mame/drivers/galivan.cpp
+++ b/src/mame/drivers/galivan.cpp
@@ -34,10 +34,11 @@ TODO
***************************************************************************/
#include "emu.h"
+#include "includes/galivan.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/3526intf.h"
-#include "includes/galivan.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(galivan_state::galivan_sound_command_w)
@@ -119,8 +120,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, galivan_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym3526_device, write)
- AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
- AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
AM_RANGE(0x06, 0x06) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -450,18 +451,18 @@ static MACHINE_CONFIG_START( galivan, galivan_state )
MCFG_VIDEO_START_OVERRIDE(galivan_state,galivan)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( ninjemak, galivan_state )
@@ -502,18 +503,18 @@ static MACHINE_CONFIG_START( ninjemak, galivan_state )
MCFG_VIDEO_START_OVERRIDE(galivan_state,ninjemak)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_8MHz/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gamecom.cpp b/src/mame/drivers/gamecom.cpp
index 3e0a9d046c7..1ece0f8cd2f 100644
--- a/src/mame/drivers/gamecom.cpp
+++ b/src/mame/drivers/gamecom.cpp
@@ -24,6 +24,7 @@ Game Status:
***************************************************************************/
#include "includes/gamecom.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
#include "gamecom.lh"
@@ -266,17 +267,15 @@ static MACHINE_CONFIG_START( gamecom, gamecom_state )
MCFG_PALETTE_INIT_OWNER(gamecom_state, gamecom)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_STEREO( "lspeaker", "rspeaker" )
+ MCFG_SPEAKER_STANDARD_MONO( "speaker" )
/* TODO: much more complex than this */
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
- MCFG_SOUND_ADD("dac0", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.10)
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.10)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC (Digital audio)
+ MCFG_SOUND_ADD("dac0", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC (Frequency modulation)
+ MCFG_SOUND_ADD("dac1", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC (Frequency modulation)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_linear_slot, "gamecom_cart")
diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp
index 4bb236869c5..87cf50209ee 100644
--- a/src/mame/drivers/gauntlet.cpp
+++ b/src/mame/drivers/gauntlet.cpp
@@ -1672,7 +1672,7 @@ DRIVER_INIT_MEMBER(gauntlet_state,gauntlet)
DRIVER_INIT_MEMBER(gauntlet_state,vindctr2)
{
UINT8 *gfx2_base = memregion("gfx2")->base();
- dynamic_buffer data(0x8000);
+ std::vector<UINT8> data(0x8000);
int i;
common_init(1);
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index aa6ac9fa745..f05c534146c 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -11,12 +11,12 @@
***************************************************************************/
#include "emu.h"
+#include "includes/gba.h"
+#include "bus/gba/rom.h"
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
-#include "sound/dac.h"
#include "sound/gb.h"
-#include "includes/gba.h"
-#include "bus/gba/rom.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
/* Sound Registers */
@@ -154,7 +154,7 @@ TIMER_CALLBACK_MEMBER(gba_state::dma_complete)
{
static const UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 };
- FPTR ch = param;
+ uintptr_t ch = param;
// printf("dma complete: ch %d\n", ch);
@@ -329,11 +329,11 @@ void gba_state::audio_tick(int ref)
if (SOUNDCNT_H & 0x200)
{
- m_ladac->write_signed8(m_fifo_a[m_fifo_a_ptr]^0x80);
+ m_ldaca->write(m_fifo_a[m_fifo_a_ptr]);
}
if (SOUNDCNT_H & 0x100)
{
- m_radac->write_signed8(m_fifo_a[m_fifo_a_ptr]^0x80);
+ m_rdaca->write(m_fifo_a[m_fifo_a_ptr]);
}
m_fifo_a_ptr++;
}
@@ -365,11 +365,11 @@ void gba_state::audio_tick(int ref)
if (SOUNDCNT_H & 0x2000)
{
- m_lbdac->write_signed8(m_fifo_b[m_fifo_b_ptr]^0x80);
+ m_ldacb->write(m_fifo_b[m_fifo_b_ptr]);
}
if (SOUNDCNT_H & 0x1000)
{
- m_rbdac->write_signed8(m_fifo_b[m_fifo_b_ptr]^0x80);
+ m_rdacb->write(m_fifo_b[m_fifo_b_ptr]);
}
m_fifo_b_ptr++;
}
@@ -394,7 +394,7 @@ void gba_state::audio_tick(int ref)
TIMER_CALLBACK_MEMBER(gba_state::timer_expire)
{
static const UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW };
- FPTR tmr = (FPTR) param;
+ uintptr_t tmr = (uintptr_t) param;
// "The reload value is copied into the counter only upon following two situations: Automatically upon timer overflows,"
// "or when the timer start bit becomes changed from 0 to 1."
@@ -865,8 +865,8 @@ WRITE32_MEMBER(gba_state::gba_io_w)
{
m_fifo_a_ptr = 17;
m_fifo_a_in = 17;
- m_ladac->write_signed8(0x80);
- m_radac->write_signed8(0x80);
+ m_ldaca->write(0);
+ m_rdaca->write(0);
}
// DAC B reset?
@@ -874,8 +874,8 @@ WRITE32_MEMBER(gba_state::gba_io_w)
{
m_fifo_b_ptr = 17;
m_fifo_b_in = 17;
- m_lbdac->write_signed8(0x80);
- m_rbdac->write_signed8(0x80);
+ m_ldacb->write(0);
+ m_rdacb->write(0);
}
}
break;
@@ -887,10 +887,10 @@ WRITE32_MEMBER(gba_state::gba_io_w)
{
m_fifo_a_ptr = m_fifo_a_in = 17;
m_fifo_b_ptr = m_fifo_b_in = 17;
- m_ladac->write_signed8(0x80);
- m_radac->write_signed8(0x80);
- m_lbdac->write_signed8(0x80);
- m_rbdac->write_signed8(0x80);
+ m_ldaca->write(0);
+ m_rdaca->write(0);
+ m_ldacb->write(0);
+ m_rdacb->write(0);
}
}
break;
@@ -1263,10 +1263,10 @@ void gba_state::machine_reset()
m_fifo_a_in = m_fifo_b_in = 17;
// and clear the DACs
- m_ladac->write_signed8(0x80);
- m_radac->write_signed8(0x80);
- m_lbdac->write_signed8(0x80);
- m_rbdac->write_signed8(0x80);
+ m_ldaca->write(0);
+ m_rdaca->write(0);
+ m_ldacb->write(0);
+ m_rdacb->write(0);
}
void gba_state::machine_start()
@@ -1407,18 +1407,20 @@ static MACHINE_CONFIG_START( gbadv, gba_state )
MCFG_GBA_LCD_DMA_HBLANK(WRITELINE(gba_state, dma_hblank_callback))
MCFG_GBA_LCD_DMA_VBLANK(WRITELINE(gba_state, dma_vblank_callback))
- MCFG_SPEAKER_STANDARD_STEREO("spkleft", "spkright")
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("custom", CGB04_APU, XTAL_16_777216MHz/4)
- MCFG_SOUND_ROUTE(0, "spkleft", 0.50)
- MCFG_SOUND_ROUTE(1, "spkright", 0.50)
- MCFG_SOUND_ADD("direct_a_left", DAC, 0) // GBA direct sound A left
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "spkleft", 0.50)
- MCFG_SOUND_ADD("direct_a_right", DAC, 0) // GBA direct sound A right
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "spkright", 0.50)
- MCFG_SOUND_ADD("direct_b_left", DAC, 0) // GBA direct sound B left
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "spkleft", 0.50)
- MCFG_SOUND_ADD("direct_b_right", DAC, 0) // GBA direct sound B right
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "spkright", 0.50)
+ MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
+ MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
+
+ MCFG_SOUND_ADD("ldaca", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdaca", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("ldacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdacb", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldaca", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdaca", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdaca", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldacb", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdacb", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdacb", -1.0, DAC_VREF_NEG_INPUT)
MCFG_GBA_CARTRIDGE_ADD("cartslot", gba_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","gba")
diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp
index e9aa2de3526..1e46fe8e471 100644
--- a/src/mame/drivers/gei.cpp
+++ b/src/mame/drivers/gei.cpp
@@ -74,9 +74,10 @@ NOTE: Trivia Question rom names are the internal names used. IE: read from the f
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
-#include "machine/ticket.h"
#include "machine/nvram.h"
+#include "machine/ticket.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class gei_state : public driver_device
@@ -90,7 +91,7 @@ public:
m_screen(*this, "screen") { }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
optional_device<ticket_dispenser_device> m_ticket;
required_device<screen_device> m_screen;
@@ -216,7 +217,7 @@ WRITE8_MEMBER(gei_state::sound_w)
m_nmi_mask = data & 0x40;
/* bit 7 goes directly to the sound amplifier */
- m_dac->write_unsigned8(((data & 0x80) >> 7) * 255);
+ m_dac->write(BIT(data, 7));
}
WRITE8_MEMBER(gei_state::sound2_w)
@@ -233,7 +234,7 @@ WRITE8_MEMBER(gei_state::sound2_w)
output().set_led_value(12,data & 0x20);
/* bit 7 goes directly to the sound amplifier */
- m_dac->write(((data & 0x80) >> 7) * 255);
+ m_dac->write(BIT(data, 7));
}
WRITE8_MEMBER(gei_state::lamps2_w)
@@ -1053,10 +1054,10 @@ static MACHINE_CONFIG_START( getrivia, gei_state )
MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( findout, getrivia )
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp
index 95a038ea0bd..bb1ec82b0aa 100644
--- a/src/mame/drivers/geniusiq.cpp
+++ b/src/mame/drivers/geniusiq.cpp
@@ -498,7 +498,7 @@ INPUT_CHANGED_MEMBER( geniusiq_state::send_mouse_input )
INPUT_CHANGED_MEMBER( geniusiq_state::send_input )
{
- UINT16 data = (UINT16)(FPTR)param;
+ UINT16 data = (UINT16)(uintptr_t)param;
// set bit 7 if the key is released
if (!newval)
diff --git a/src/mame/drivers/go2000.cpp b/src/mame/drivers/go2000.cpp
index a9d5e47d241..82316f301df 100644
--- a/src/mame/drivers/go2000.cpp
+++ b/src/mame/drivers/go2000.cpp
@@ -36,6 +36,7 @@ Notes:
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class go2000_state : public driver_device
{
@@ -104,7 +105,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( go2000_sound_io, AS_IO, 8, go2000_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x03, 0x03) AM_WRITE(go2000_pcm_1_bankswitch_w)
ADDRESS_MAP_END
@@ -354,13 +355,12 @@ static MACHINE_CONFIG_START( go2000, go2000_state )
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
-
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( go2000 )
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index 01636756c80..9369b45b194 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -14929,7 +14929,7 @@ void cb3_state::do_blockswaps(UINT8* ROM)
0xa000, 0xa800, 0xb000, 0xb800,
};
- dynamic_buffer buffer(0x10000);
+ std::vector<UINT8> buffer(0x10000);
memcpy(&buffer[0], ROM, 0x10000);
// swap some 0x800 blocks around..
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index 2a335e14010..5fb828631be 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -1782,32 +1782,32 @@ static MACHINE_CONFIG_START( gottlieb_core, gottlieb_state )
MCFG_PALETTE_ADD("palette", 16)
// basic speaker configuration
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gottlieb1, gottlieb_core )
- MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gottlieb2, gottlieb_core )
- MCFG_GOTTLIEB_SOUND_R2_ADD("r2sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r2sound", GOTTLIEB_SOUND_REV2, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( g2laser, gottlieb_core )
- MCFG_GOTTLIEB_SOUND_R2_ADD("r2sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r2sound", GOTTLIEB_SOUND_REV2, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_LASERDISC_PR8210_ADD("laserdisc")
MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(FUNC(gottlieb_state::laserdisc_audio_process), (gottlieb_state*)owner))
MCFG_LASERDISC_OVERLAY_DRIVER(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, gottlieb_state, screen_update_gottlieb)
MCFG_LASERDISC_OVERLAY_CLIP(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8)
MCFG_LASERDISC_OVERLAY_PALETTE("palette")
- MCFG_SOUND_ROUTE(0, "mono", 1.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0)
/* right channel is processed as data */
MCFG_DEVICE_REMOVE("screen")
@@ -1856,8 +1856,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gottlieb1_votrax, gottlieb_core )
- MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1891,15 +1891,16 @@ static MACHINE_CONFIG_DERIVED( screwloo, gottlieb2 )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cobram3, gottlieb_core )
- MCFG_GOTTLIEB_SOUND_R2_ADD_COBRAM3("r2sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r2sound", GOTTLIEB_SOUND_REV2, 0)
+ MCFG_GOTTLIEB_ENABLE_COBRAM3_MODS()
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_LASERDISC_PR8210_ADD("laserdisc")
MCFG_LASERDISC_AUDIO(laserdisc_audio_delegate(FUNC(gottlieb_state::laserdisc_audio_process), (gottlieb_state*)owner))
MCFG_LASERDISC_OVERLAY_DRIVER(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, gottlieb_state, screen_update_gottlieb)
MCFG_LASERDISC_OVERLAY_CLIP(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8)
MCFG_LASERDISC_OVERLAY_PALETTE("palette")
- MCFG_SOUND_ROUTE(0, "mono", 1.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0)
/* right channel is processed as data */
MCFG_DEVICE_REMOVE("screen")
diff --git a/src/mame/drivers/gp32.cpp b/src/mame/drivers/gp32.cpp
index 0addf2d91c2..b4050f0a39e 100644
--- a/src/mame/drivers/gp32.cpp
+++ b/src/mame/drivers/gp32.cpp
@@ -17,9 +17,10 @@
**************************************************************************/
#include "emu.h"
+#include "includes/gp32.h"
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
-#include "includes/gp32.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#include "softlist.h"
@@ -1519,8 +1520,8 @@ WRITE32_MEMBER(gp32_state::s3c240x_iis_w)
if (m_s3c240x_iis.fifo_index == 2)
{
m_s3c240x_iis.fifo_index = 0;
- m_dac1->write_signed16(m_s3c240x_iis.fifo[0] + 0x8000);
- m_dac2->write_signed16(m_s3c240x_iis.fifo[1] + 0x8000);
+ m_ldac->write(m_s3c240x_iis.fifo[0]);
+ m_rdac->write(m_s3c240x_iis.fifo[1]);
}
}
break;
@@ -1601,18 +1602,18 @@ WRITE32_MEMBER(gp32_state::s3c240x_mmc_w)
void gp32_state::s3c240x_machine_start()
{
- m_s3c240x_pwm_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)0);
- m_s3c240x_pwm_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)1);
- m_s3c240x_pwm_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)2);
- m_s3c240x_pwm_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)3);
- m_s3c240x_pwm_timer[4] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)4);
- m_s3c240x_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)0);
- m_s3c240x_dma_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)1);
- m_s3c240x_dma_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)2);
- m_s3c240x_dma_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)3);
- m_s3c240x_iic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iic_timer_exp),this), (void *)(FPTR)0);
- m_s3c240x_iis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iis_timer_exp),this), (void *)(FPTR)0);
- m_s3c240x_lcd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_lcd_timer_exp),this), (void *)(FPTR)0);
+ m_s3c240x_pwm_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)0);
+ m_s3c240x_pwm_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)1);
+ m_s3c240x_pwm_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)2);
+ m_s3c240x_pwm_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)3);
+ m_s3c240x_pwm_timer[4] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)4);
+ m_s3c240x_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)0);
+ m_s3c240x_dma_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)1);
+ m_s3c240x_dma_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)2);
+ m_s3c240x_dma_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)3);
+ m_s3c240x_iic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iic_timer_exp),this), (void *)(uintptr_t)0);
+ m_s3c240x_iis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iis_timer_exp),this), (void *)(uintptr_t)0);
+ m_s3c240x_lcd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_lcd_timer_exp),this), (void *)(uintptr_t)0);
m_eeprom_data = std::make_unique<UINT8[]>(0x2000);
m_nvram->set_base(m_eeprom_data.get(), 0x2000);
smc_init();
@@ -1693,10 +1694,11 @@ static MACHINE_CONFIG_START( gp32, gp32_state )
MCFG_DEFAULT_LAYOUT(layout_lcd_rot)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_NVRAM_ADD_1FILL("nvram")
diff --git a/src/mame/drivers/gts80.cpp b/src/mame/drivers/gts80.cpp
index fae401f2695..58d014d4c08 100644
--- a/src/mame/drivers/gts80.cpp
+++ b/src/mame/drivers/gts80.cpp
@@ -374,23 +374,23 @@ static MACHINE_CONFIG_START( gts80, gts80_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80_s, gts80 )
- MCFG_GOTTLIEB_SOUND_R0_ADD("r0sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r0sound", GOTTLIEB_SOUND_REV0, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80_hh, gts80 )
- MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80_ss, gts80 )
- MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
- //MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound") // votrax crashes
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1, 0)
+ //MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0) // votrax crashes
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
/*-------------------------------------------------------------------
diff --git a/src/mame/drivers/gts80a.cpp b/src/mame/drivers/gts80a.cpp
index d06ee59cc01..5d883ec4dfa 100644
--- a/src/mame/drivers/gts80a.cpp
+++ b/src/mame/drivers/gts80a.cpp
@@ -363,18 +363,18 @@ static MACHINE_CONFIG_START( gts80a, gts80a_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80a_s, gts80a )
- MCFG_GOTTLIEB_SOUND_R0_ADD("r0sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r0sound", GOTTLIEB_SOUND_REV0, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80a_ss, gts80a )
- MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
- //MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound") // votrax crashes
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1, 0)
+ //MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0) // votrax crashes
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gts80b.cpp b/src/mame/drivers/gts80b.cpp
index 2f38cd3b7f5..41419b762e6 100644
--- a/src/mame/drivers/gts80b.cpp
+++ b/src/mame/drivers/gts80b.cpp
@@ -401,18 +401,18 @@ static MACHINE_CONFIG_START( gts80b, gts80b_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80b_s, gts80b )
- MCFG_GOTTLIEB_SOUND_R0_ADD("r0sound")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("r0sound", GOTTLIEB_SOUND_REV0, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
//static MACHINE_CONFIG_DERIVED( gts80b_ss, gts80b )
-// MCFG_GOTTLIEB_SOUND_R1_ADD("r1sound")
-// //MCFG_GOTTLIEB_SOUND_R1_ADD_VOTRAX("r1sound") // votrax crashes
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+// MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1, 0)
+// //MCFG_SOUND_ADD("r1sound", GOTTLIEB_SOUND_REV1_WITH_VOTRAX, 0) // votrax crashes
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
//MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( gts80b_s1, gts80b )
diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp
index 222a23b86f5..62a04e77e23 100644
--- a/src/mame/drivers/guab.cpp
+++ b/src/mame/drivers/guab.cpp
@@ -304,7 +304,7 @@ INPUT_CHANGED_MEMBER(guab_state::coin_inserted)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* Get the current credit value and add the new coin value */
- credit = space.read_dword(0x8002c) + (UINT32)(FPTR)param;
+ credit = space.read_dword(0x8002c) + (UINT32)(uintptr_t)param;
space.write_dword(0x8002c, credit);
}
}
diff --git a/src/mame/drivers/hankin.cpp b/src/mame/drivers/hankin.cpp
index c31bce41d45..8d99c6de57e 100644
--- a/src/mame/drivers/hankin.cpp
+++ b/src/mame/drivers/hankin.cpp
@@ -19,6 +19,7 @@ ToDo:
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "hankin.lh"
class hankin_state : public genpin_class
@@ -83,7 +84,7 @@ private:
required_device<pia6821_device> m_ic10;
required_device<pia6821_device> m_ic11;
required_device<pia6821_device> m_ic2;
- required_device<dac_device> m_dac;
+ required_device<dac_4bit_r2r_device> m_dac;
required_ioport m_io_test;
required_ioport m_io_dsw0;
required_ioport m_io_dsw1;
@@ -428,7 +429,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( hankin_state::timer_s )
{
m_timer_s[2]++;
offs_t offs = (m_timer_s[2] & 31) | (m_ic2a << 5);
- m_dac->write_unsigned8(m_p_prom[offs]<< 4);
+ m_dac->write(m_p_prom[offs]);
}
else
m_timer_s[2] = 0;
@@ -440,6 +441,7 @@ void hankin_state::machine_reset()
{
m_p_prom = memregion("roms")->base() + 0x1800;
m_vol = 0;
+ m_dac->set_output_gain(0, 0);
}
// PA0-3 = sound data from main cpu
@@ -453,7 +455,7 @@ WRITE8_MEMBER( hankin_state::ic2_a_w )
{
m_ic2a = data >> 4;
offs_t offs = (m_timer_s[2] & 31) | (m_ic2a << 5);
- m_dac->write_unsigned8(m_p_prom[offs]<< 4);
+ m_dac->write(m_p_prom[offs]);
}
// PB0-3 = preset on 74LS161
@@ -500,9 +502,10 @@ static MACHINE_CONFIG_START( hankin, hankin_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_4BIT_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* Devices */
MCFG_DEVICE_ADD("ic10", PIA6821, 0)
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index 1ce2fe985e4..224e9b83062 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -324,13 +324,11 @@ Notes:
****************************************************************************/
-
#include "emu.h"
-#include "machine/watchdog.h"
-#include "sound/dac.h"
-#include "includes/slapstic.h"
#include "includes/harddriv.h"
-
+#include "includes/slapstic.h"
+#include "machine/watchdog.h"
+#include "sound/volt_reg.h"
#include "racedrivpan.lh"
/*************************************
@@ -354,8 +352,8 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_ds3xdsp(*this, "ds3xdsp"),
m_ds3sdsp_region(*this, "ds3sdsp"),
m_ds3xdsp_region(*this, "ds3xdsp"),
- m_ds3dac1(*this, "ds3dac1"),
- m_ds3dac2(*this, "ds3dac2"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_harddriv_sound(*this, "harddriv_sound"),
m_jsa(*this, "jsa"),
m_screen(*this, "screen"),
@@ -818,17 +816,16 @@ static INPUT_PORTS_START( harddriv )
PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 - steering wheel */
- PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
+ PORT_BIT( 0xfff, 0x800, IPT_PADDLE ) PORT_MINMAX(0x010,0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 - force brake */
- PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(40) PORT_REVERSE PORT_NAME("Force Brake")
+ PORT_BIT( 0xfff, 0x000, IPT_PEDAL2 ) PORT_SENSITIVITY(400) PORT_KEYDELTA(100) PORT_REVERSE PORT_NAME("Brake Pedal")
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
-
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -902,16 +899,16 @@ static INPUT_PORTS_START( racedriv )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 - steering wheel */
- PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
+ PORT_BIT( 0xfff, 0x800, IPT_PADDLE ) PORT_MINMAX(0x010,0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 - force brake */
- PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(40) PORT_REVERSE PORT_NAME("Force Brake")
+ PORT_BIT( 0xfff, 0x000, IPT_PEDAL2 ) PORT_SENSITIVITY(400) PORT_KEYDELTA(100) PORT_REVERSE PORT_NAME("Brake Pedal")
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( racedriv_pan )
@@ -1032,15 +1029,15 @@ static INPUT_PORTS_START( racedrivc )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* 400000 - steering wheel */
- PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
+ PORT_BIT(0xfff, 0x800, IPT_PADDLE) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
/* dummy ADC ports to end up with the same number as the full version */
PORT_START("mainpcb:12BADC.1")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -1114,16 +1111,16 @@ static INPUT_PORTS_START( stunrun )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
/* stunrun has its own coins */
// todo
@@ -1204,16 +1201,16 @@ static INPUT_PORTS_START( steeltal )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 */
- PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) /* left/right */
+ PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_X ) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(10) /* left/right */
PORT_START("mainpcb:12BADC.1") /* b80000 - 12 bit ADC 1 */
- PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) /* up/down */
+ PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_Y ) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(10) /* up/down */
PORT_START("mainpcb:12BADC.2") /* b80000 - 12 bit ADC 2 */
- PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Collective") PORT_REVERSE /* collective */
+ PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_Z ) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(10) PORT_NAME("Collective") PORT_REVERSE /* collective */
PORT_START("mainpcb:12BADC.3") /* b80000 - 12 bit ADC 3 */
- PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Rudder") PORT_PLAYER(2) /* rudder */
+ PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_X ) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(10) PORT_NAME("Rudder") PORT_PLAYER(2) /* rudder */
/* steeltal has its own coins */
// todo
@@ -1301,15 +1298,15 @@ static INPUT_PORTS_START( strtdriv )
PORT_BIT( 0xff, 0x80, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* 400000 - steering wheel */
- PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
+ PORT_BIT(0xfff, 0x800, IPT_PADDLE) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_NAME("Steering Wheel")
/* dummy ADC ports to end up with the same number as the full version */
PORT_START("mainpcb:12BADC.1") /* FAKE */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.2") /* FAKE */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3") /* FAKE */
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -1391,15 +1388,15 @@ static INPUT_PORTS_START( hdrivair )
PORT_BIT( 0xff, 0x80, IPT_UNUSED )
PORT_START("mainpcb:12BADC.0") /* 400000 - steering wheel */
- PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5) PORT_REVERSE PORT_NAME("Steering Wheel")
+ PORT_BIT(0xfff, 0x800, IPT_PADDLE) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(400) PORT_KEYDELTA(5) PORT_REVERSE PORT_NAME("Steering Wheel")
/* dummy ADC ports to end up with the same number as the full version */
PORT_START("mainpcb:12BADC.1")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("mainpcb:12BADC.3")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xfff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -1577,11 +1574,11 @@ static MACHINE_CONFIG_FRAGMENT( ds3 )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("ds3dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
- MCFG_SOUND_ADD("ds3dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1709,8 +1706,9 @@ static MACHINE_CONFIG_FRAGMENT( steeltal )
MCFG_FRAGMENT_ADD( ds3 ) /* DS III board */
MCFG_DEVICE_REMOVE("ds3sdsp") /* DS III sound components are not present */
MCFG_DEVICE_REMOVE("ds3xdsp")
- MCFG_DEVICE_REMOVE("ds3dac1")
- MCFG_DEVICE_REMOVE("ds3dac2")
+ MCFG_DEVICE_REMOVE("ldac")
+ MCFG_DEVICE_REMOVE("rdac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_DEVICE_REMOVE("lspeaker")
MCFG_DEVICE_REMOVE("rspeaker")
diff --git a/src/mame/drivers/wildfire.cpp b/src/mame/drivers/hh_amis2k.cpp
index fcb708de312..1cf99b74180 100644
--- a/src/mame/drivers/wildfire.cpp
+++ b/src/mame/drivers/hh_amis2k.cpp
@@ -13,6 +13,8 @@
TODO:
+ - driver needs a cleanup when another AMI S2000 handheld gets dumped/added
+
- sound emulation could still be improved
- when the game strobes a led faster, it should appear brighter, for example when
the ball hits one of the bumpers
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 0968a9e2501..d6590a10c99 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -14,8 +14,8 @@
#include "emu.h"
#include "cpu/cop400/cop400.h"
-#include "sound/speaker.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
// internal artwork
#include "bship82.lh" // clickable
@@ -36,7 +36,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_inp_matrix(*this, "IN.%u", 0),
- m_speaker(*this, "speaker"),
m_display_wait(33),
m_display_maxy(1),
m_display_maxx(0)
@@ -45,7 +44,6 @@ public:
// devices
required_device<cpu_device> m_maincpu;
optional_ioport_array<5> m_inp_matrix; // max 5
- optional_device<speaker_sound_device> m_speaker;
// misc common
UINT8 m_l; // MCU port L write data
@@ -267,7 +265,6 @@ public:
DECLARE_WRITE8_MEMBER(write_g);
DECLARE_WRITE8_MEMBER(write_l);
- DECLARE_WRITE_LINE_MEMBER(write_sk);
DECLARE_READ8_MEMBER(read_l);
};
@@ -292,12 +289,6 @@ READ8_MEMBER(ctstein_state::read_l)
return read_inputs(3) << 4 | 0xf;
}
-WRITE_LINE_MEMBER(ctstein_state::write_sk)
-{
- // SK: speaker out
- m_speaker->level_w(state);
-}
-
// config
@@ -328,16 +319,17 @@ static MACHINE_CONFIG_START( ctstein, ctstein_state )
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g))
MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l))
- MCFG_COP400_WRITE_SK_CB(WRITELINE(ctstein_state, write_sk))
+ MCFG_COP400_WRITE_SK_CB(DEVWRITELINE("dac", dac_bit_interface, write))
MCFG_COP400_READ_L_CB(READ8(ctstein_state, read_l))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_ctstein)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -407,12 +399,6 @@ READ8_MEMBER(h2hbaskb_state::read_in)
return (read_inputs(4) & 7) | (m_inp_matrix[4]->read() & 8);
}
-WRITE_LINE_MEMBER(h2hbaskb_state::write_so)
-{
- // SO: speaker out
- m_speaker->level_w(state);
-}
-
// config
@@ -459,15 +445,16 @@ static MACHINE_CONFIG_START( h2hbaskb, h2hbaskb_state )
MCFG_COP400_WRITE_G_CB(WRITE8(h2hbaskb_state, write_g))
MCFG_COP400_WRITE_L_CB(WRITE8(h2hbaskb_state, write_l))
MCFG_COP400_READ_IN_CB(READ8(h2hbaskb_state, read_in))
- MCFG_COP400_WRITE_SO_CB(WRITELINE(h2hbaskb_state, write_so))
+ MCFG_COP400_WRITE_SO_CB(DEVWRITELINE("dac", dac_bit_interface, write))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_h2hbaskb)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -491,9 +478,12 @@ class einvaderc_state : public hh_cop400_state
{
public:
einvaderc_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_cop400_state(mconfig, type, tag)
+ : hh_cop400_state(mconfig, type, tag),
+ m_dac(*this, "dac")
{ }
+ required_device<dac_bit_interface> m_dac;
+
void prepare_display();
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_g);
@@ -533,7 +523,7 @@ WRITE8_MEMBER(einvaderc_state::write_g)
WRITE_LINE_MEMBER(einvaderc_state::write_sk)
{
// SK: speaker out + led grid 8
- m_speaker->level_w(state);
+ m_dac->write(state);
m_sk = state;
prepare_display();
}
@@ -581,9 +571,10 @@ static MACHINE_CONFIG_START( einvaderc, einvaderc_state )
MCFG_DEFAULT_LAYOUT(layout_einvaderc)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -602,9 +593,12 @@ class funjacks_state : public hh_cop400_state
{
public:
funjacks_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_cop400_state(mconfig, type, tag)
+ : hh_cop400_state(mconfig, type, tag),
+ m_dac(*this, "dac")
{ }
+ required_device<dac_bit_interface> m_dac;
+
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_g);
@@ -632,7 +626,7 @@ WRITE8_MEMBER(funjacks_state::write_l)
WRITE8_MEMBER(funjacks_state::write_g)
{
// G1: speaker out
- m_speaker->level_w(data >> 1 & 1);
+ m_dac->write(BIT(data, 1));
m_g = data;
}
@@ -689,9 +683,10 @@ static MACHINE_CONFIG_START( funjacks, funjacks_state )
MCFG_DEFAULT_LAYOUT(layout_funjacks)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -714,9 +709,12 @@ class funrlgl_state : public hh_cop400_state
{
public:
funrlgl_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_cop400_state(mconfig, type, tag)
+ : hh_cop400_state(mconfig, type, tag),
+ m_dac(*this, "dac")
{ }
+ required_device<dac_bit_interface> m_dac;
+
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_g);
@@ -744,7 +742,7 @@ WRITE8_MEMBER(funrlgl_state::write_l)
WRITE8_MEMBER(funrlgl_state::write_g)
{
// G3: speaker out
- m_speaker->level_w(data >> 3 & 1);
+ m_dac->write(BIT(data, 3));
}
@@ -784,9 +782,10 @@ static MACHINE_CONFIG_START( funrlgl, funrlgl_state )
MCFG_DEFAULT_LAYOUT(layout_funrlgl)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -805,9 +804,12 @@ class plus1_state : public hh_cop400_state
{
public:
plus1_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_cop400_state(mconfig, type, tag)
+ : hh_cop400_state(mconfig, type, tag),
+ m_dac(*this, "dac")
{ }
+ required_device<dac_bit_interface> m_dac;
+
DECLARE_WRITE8_MEMBER(write_d);
};
@@ -816,7 +818,7 @@ public:
WRITE8_MEMBER(plus1_state::write_d)
{
// D?: speaker out
- m_speaker->level_w(data & 1);
+ m_dac->write(BIT(data, 0));
}
@@ -849,9 +851,10 @@ static MACHINE_CONFIG_START( plus1, plus1_state )
/* no visual feedback! */
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -889,7 +892,6 @@ public:
DECLARE_WRITE_LINE_MEMBER(write_so);
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE8_MEMBER(write_l);
- DECLARE_WRITE_LINE_MEMBER(write_sk);
DECLARE_READ8_MEMBER(read_g);
};
@@ -923,12 +925,6 @@ WRITE8_MEMBER(lightfgt_state::write_l)
prepare_display();
}
-WRITE_LINE_MEMBER(lightfgt_state::write_sk)
-{
- // SK: speaker out
- m_speaker->level_w(state);
-}
-
READ8_MEMBER(lightfgt_state::read_g)
{
// G: multiplexed inputs
@@ -979,16 +975,17 @@ static MACHINE_CONFIG_START( lightfgt, lightfgt_state )
MCFG_COP400_WRITE_SO_CB(WRITELINE(lightfgt_state, write_so))
MCFG_COP400_WRITE_D_CB(WRITE8(lightfgt_state, write_d))
MCFG_COP400_WRITE_L_CB(WRITE8(lightfgt_state, write_l))
- MCFG_COP400_WRITE_SK_CB(WRITELINE(lightfgt_state, write_sk))
+ MCFG_COP400_WRITE_SK_CB(DEVWRITELINE("dac", dac_bit_interface, write))
MCFG_COP400_READ_G_CB(READ8(lightfgt_state, read_g))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_lightfgt)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -1008,14 +1005,10 @@ class bship82_state : public hh_cop400_state
{
public:
bship82_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_cop400_state(mconfig, type, tag),
- m_dac(*this, "dac")
+ : hh_cop400_state(mconfig, type, tag)
{ }
- required_device<dac_device> m_dac;
-
DECLARE_WRITE8_MEMBER(write_d);
- DECLARE_WRITE8_MEMBER(write_g);
DECLARE_READ8_MEMBER(read_l);
DECLARE_READ8_MEMBER(read_in);
DECLARE_WRITE_LINE_MEMBER(write_so);
@@ -1029,13 +1022,6 @@ WRITE8_MEMBER(bship82_state::write_d)
m_inp_mux = data;
}
-WRITE8_MEMBER(bship82_state::write_g)
-{
- // G: 4-bit signed DAC
- if (~data & 8) data ^= 7;
- m_dac->write_signed8(data << 4);
-}
-
READ8_MEMBER(bship82_state::read_l)
{
// L: multiplexed inputs
@@ -1118,13 +1104,31 @@ static INPUT_PORTS_START( bship82 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_TOGGLE PORT_CODE(KEYCODE_F1) PORT_NAME("Load/Go") // switch
INPUT_PORTS_END
+/*
+
+http://www.seanriddle.com/bship82.txt
+
+21 G0 3.9K resistor to speaker transistor base
+22 G1 2.2K resistor to speaker transistor base
+23 G2 1.0K resistor to speaker transistor base
+24 G3 speaker transistor base tied high 4.7K
+
+speaker connection
+2N3904 transistor:
+emitter to 10ohm resistor to ground
+collector to 68ohm resistor to speaker (other speaker terminal to VCC)
+base pulled high with 4.7K resistor, connects directly to G3, 1K resistor to G2,
+2.2K resistor to G1, 3.9K resistor to G0
+
+*/
+
static MACHINE_CONFIG_START( bship82, bship82_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP420, 3000000) // approximation - RC osc. R=14K, C=100pf
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_COP400_WRITE_D_CB(WRITE8(bship82_state, write_d))
- MCFG_COP400_WRITE_G_CB(WRITE8(bship82_state, write_g))
+ MCFG_COP400_WRITE_G_CB(DEVWRITE8("dac", dac_byte_interface, write)) // G: 4-bit signed DAC
MCFG_COP400_READ_L_CB(READ8(bship82_state, read_l))
MCFG_COP400_READ_IN_CB(READ8(bship82_state, read_in))
MCFG_COP400_WRITE_SO_CB(WRITELINE(bship82_state, write_so))
@@ -1134,9 +1138,10 @@ static MACHINE_CONFIG_START( bship82, bship82_state )
MCFG_DEFAULT_LAYOUT(layout_bship82)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_4BIT_BINARY_WEIGHTED_SIGN_MAGNITUDE, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index ce85efeda38..677e3be8862 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -341,7 +341,7 @@ void hh_hmcs40_state::set_interrupt(int line, int state)
INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line)
{
- set_interrupt((int)(FPTR)param, newval);
+ set_interrupt((int)(uintptr_t)param, newval);
}
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 80bc065cecc..25d0b2cff75 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -7,8 +7,6 @@
part of a series is (or will be) in its own driver, see:
- hh_tms1k: here
- microvsn: Milton Bradley MicroVision
- - mbdtower: Milton Bradley Dark Tower
- - elecbowl: Marx Electronic Bowling
- ticalc1x: TI TMS1K-based calculators
- tispellb: TI Spelling B series gen. 1
- tispeak: TI Speak & Spell series gen. 1
@@ -21,14 +19,16 @@
@CP0904A TMS0970 1977, Milton Bradley Comp IV
@MP0905B TMS0970 1977, Parker Brothers Codename Sector
*MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?)
- @MP0158 TMS1000 1979, Entex Soccer
+ @MP0158 TMS1000 1979, Entex Soccer (6003)
@MP0163 TMS1000 1979, A-One LSI Match Number/LJN Electronic Concentration
*MP0168 TMS1000 1979, Conic Basketball/Tandy Sports Arena
@MP0170 TMS1000 1979, Conic Football
- *MP0230 TMS1000? 1980, Entex Blast It
+ *MP0230 TMS1000? 1980, Entex Blast It (6015)
@MP0914 TMS1000 1979, Entex Baseball 1
+ *MP0915 TMS1000 1979, Bandai System Control Car: Cheetah/Palitoy The Incredible Brain Buggy
@MP0919 TMS1000 1979, Tiger Copy Cat (model 7-520)
- @MP0923 TMS1000 1979, Entex Baseball 2
+ *MP0920 TMS1000 1979, Entex Space Battle (6004)
+ @MP0923 TMS1000 1979, Entex Baseball 2 (6002)
@MP1030 TMS1100 1980, APF Mathemagician
@MP1133 TMS1470 1979, Kosmos Astro
@MP1180 TMS1100 1980, Tomy Power House Pinball
@@ -37,17 +37,17 @@
@MP1193 TMS1100 1980, Tandy Championship Football (model 60-2150)
@MP1204 TMS1100 1980, Entex Baseball 3 (6007)
*MP1209 TMS1100 1980, U.S. Games Space Cruiser/Strategy Football
- @MP1211 TMS1100 1980, Entex Space Invader
+ @MP1211 TMS1100 1980, Entex Space Invader (6012)
@MP1218 TMS1100 1980, Entex Basketball 2 (6010)
@MP1219 TMS1100 1980, U.S. Games Super Sports-4
- @MP1221 TMS1100 1980, Entex Raise The Devil
+ @MP1221 TMS1100 1980, Entex Raise The Devil (6011)
*MP1296 TMS1100? 1982, Entex Black Knight
@MP1312 TMS1100 1983, Gakken FX-Micom R-165/Tandy Radio Shack Science Fair Microcomputer Trainer
*MP1359 TMS1100? 1985, Capsela CRC2000
@MP1525 TMS1170 1980, Coleco Head to Head Baseball
*MP1604 ? 1981, Hanzawa Twinvader III/Tandy Cosmic Fire Away 3000 (? note: VFD-capable)
@MP1801 TMS1700 1981, Tiger Ditto/Tandy Pocket Repeat (model 60-2152)
- @MP2105 TMS1370 1979, Gakken/Entex Poker
+ @MP2105 TMS1370 1979, Gakken/Entex Poker (6005)
*MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000
@MP2726 TMS1040 1979, Tomy Break Up
*MP2788 TMS1040? 1980, Bandai Flight Time (? note: VFD-capable)
@@ -61,7 +61,7 @@
*MP3320A TMS1000 1979, Coleco Head to Head Basketball
*M32001 TMS1000 1981, Coleco Quiz Wiz Challenger (note: MP3398, MP3399, M3200x?)
*M32018 TMS1000 1990, unknown device, decap/dump is available
- MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.cpp
+ @MP3403 TMS1100 1978, Marx Electronic Bowling
@MP3404 TMS1100 1978, Parker Brothers Merlin
@MP3405 TMS1100 1979, Coleco Amaze-A-Tron
@MP3415 TMS1100 1978, Coleco Electronic Quarterback
@@ -94,11 +94,11 @@
@MP7313 TMS1400 1980, Parker Brothers Bank Shot
@MP7314 TMS1400 1980, Parker Brothers Split Second
MP7324 TMS1400 1985, Tiger K28/Coleco Talking Teacher -> tispeak.cpp
- MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.cpp
+ @MP7332 TMS1400 1981, Milton Bradley Dark Tower
@MP7334 TMS1400 1981, Coleco Total Control 4
@MP7351 TMS1400 1982, Parker Brothers Master Merlin
@MP7551 TMS1670 1980, Entex Color Football 4 (6009)
- @MPF553 TMS1670 1980, Gakken/Entex Jackpot: Gin Rummy & Black Jack (note: assume F to be a misprint)
+ @MPF553 TMS1670 1980, Gakken/Entex Jackpot: Gin Rummy & Black Jack (6008) (note: assume F to be a misprint)
*MP7573 TMS1670? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable)
inconsistent:
@@ -121,6 +121,7 @@
- tbreakup: some of the leds flicker (rom and PLAs doublechecked)
- bship discrete sound, netlist is documented
- finish bshipb SN76477 sound
+ - improve elecbowl driver
***************************************************************************/
@@ -150,6 +151,7 @@
#include "ebaskb2.lh"
#include "efootb4.lh"
#include "einvader.lh" // test-layout(but still playable)
+#include "elecbowl.lh"
#include "elecdet.lh"
#include "esoccer.lh"
#include "fxmcr165.lh" // clickable
@@ -161,6 +163,7 @@
#include "lostreas.lh" // clickable
#include "matchnum.lh" // clickable
#include "mathmagi.lh"
+#include "mbdtower.lh" // clickable
#include "mdndclab.lh" // clickable
#include "merlin.lh" // clickable
#include "mmerlin.lh" // clickable
@@ -378,7 +381,7 @@ WRITE_LINE_MEMBER(hh_tms1k_state::auto_power_off)
INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button)
{
- m_power_on = (bool)(FPTR)param;
+ m_power_on = (bool)(uintptr_t)param;
m_maincpu->set_input_line(INPUT_LINE_RESET, m_power_on ? CLEAR_LINE : ASSERT_LINE);
}
@@ -642,7 +645,6 @@ static INPUT_PORTS_START( mathmagi )
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-
// output PLA is not decapped
static const UINT16 mathmagi_output_pla[0x20] =
{
@@ -892,46 +894,63 @@ READ8_MEMBER(zodiac_state::read_k)
// config
+/* The physical button layout and labels are like this:
+
+ [P] [A]
+ [ 1 ] [ 2 ] [ 3 ]
+ [L] [ 4 ] [ 5 ] [ 6 ] [D]
+ [ 7 ] [ 8 ] [ 9 ]
+ [J] [ 0 ] [CLR] [ENT] [E]
+
+ [.__.__.__.]
+ OFF H P A
+
+Despite that this layout features a typical digital keypad and distances
+the letter buttons from it, the 8-character encoding for date input uses
+letters and digits in combination. This fact and the use of the P key are
+why the digit buttons are mapped here as keyboard inputs rather than as a
+keypad.
+*/
+
static INPUT_PORTS_START( zodiac )
PORT_START("IN.0") // R0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('3')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0')
PORT_START("IN.1") // R1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('4')
PORT_START("IN.2") // R2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("D")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("A")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8')
PORT_START("IN.3") // R3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("P")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("L")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("J")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("E")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
PORT_START("IN.4") // R4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_CHAR(13)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Clear") PORT_CHAR(8)
PORT_START("IN.5") // R8
PORT_CONFNAME( 0x03, 0x01, "Mode")
- PORT_CONFSETTING( 0x01, "H" ) // Horoscope
- PORT_CONFSETTING( 0x02, "P" ) // Preview
- PORT_CONFSETTING( 0x00, "A" ) // Answer
+ PORT_CONFSETTING( 0x01, "Horoscope" )
+ PORT_CONFSETTING( 0x02, "Preview" )
+ PORT_CONFSETTING( 0x00, "Answer" )
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-
// output PLA is not decapped
static const UINT16 zodiac_output_pla[0x20] =
{
@@ -1849,7 +1868,6 @@ static INPUT_PORTS_START( cnfball2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-
// output PLA is not decapped
static const UINT16 cnfball2_output_pla[0x20] =
{
@@ -3029,7 +3047,6 @@ static INPUT_PORTS_START( gpoker )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Bet") // BT
INPUT_PORTS_END
-
void gpoker_state::machine_reset()
{
hh_tms1k_state::machine_reset();
@@ -3690,6 +3707,175 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Marx Series 300 Electronic Bowling Game
+ * TMS1100NLL MP3403 DBS 7836 SINGAPORE (no decap)
+ * 4*SN75492 quad segment driver, 2*SN74259 8-line demultiplexer,
+ 2*CD4043 quad r/s input latch
+ * 5 7seg LEDs, 15 lamps(10 lamps projected to bowling pins reflection),
+ 1bit-sound with crude volume control
+ * edge connector to sensors(switches trigger when ball rolls over)
+ and other inputs
+
+ lamp translation table: SN74259.u5(mux 1) goes to MAME output lamp5x,
+ SN74259.u6(mux 2) goes to MAME output lamp6x. u1-u3 are SN75492 ICs,
+ where other: u1 A2 is N/C, u3 A1 is from O2 and goes to digits seg C.
+
+ u5 Q0 -> u1 A4 -> L2 (pin #2) u6 Q0 -> u3 A4 -> L1 (pin #1)
+ u5 Q1 -> u1 A5 -> L4 (pin #4) u6 Q1 -> u3 A5 -> L5 (pin #5)
+ u5 Q2 -> u1 A6 -> L7 (pin #7) u6 Q2 -> u2 A3 -> L11 (player 1)
+ u5 Q3 -> u1 A1 -> L8 (pin #8) u6 Q3 -> u2 A2 -> L12 (player 2)
+ u5 Q4 -> u3 A2 -> L3 (pin #3) u6 Q4 -> u2 A1 -> L15 (?)
+ u5 Q5 -> u2 A6 -> L6 (pin #6) u6 Q5 -> u3 A6 -> L14 (?)
+ u5 Q6 -> u2 A5 -> L10 (pin #10) u6 Q6 -> u1 A3 -> L13 (spare)
+ u5 Q7 -> u2 A4 -> L9 (pin #9) u6 Q7 -> u3 A3 -> digit 4 B+C
+
+***************************************************************************/
+
+class elecbowl_state : public hh_tms1k_state
+{
+public:
+ elecbowl_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_tms1k_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ DECLARE_WRITE16_MEMBER(write_r);
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_READ8_MEMBER(read_k);
+};
+
+// handlers
+
+void elecbowl_state::prepare_display()
+{
+ // standard 7segs
+ for (int y = 0; y < 4; y++)
+ {
+ m_display_segmask[y] = 0x7f;
+ m_display_state[y] = (m_r >> (y + 4) & 1) ? m_o : 0;
+ }
+
+ // lamp muxes
+ UINT8 mask = 1 << (m_o & 7);
+ UINT8 d = (m_r & 2) ? mask : 0;
+ if (~m_r & 1)
+ m_display_state[5] = (m_display_state[5] & ~mask) | d;
+ if (~m_r & 4)
+ m_display_state[6] = (m_display_state[6] & ~mask) | d;
+
+ // digit 4 is from mux2 Q7
+ m_display_segmask[4] = 6;
+ m_display_state[4] = (m_display_state[6] & 0x80) ? 6 : 0;
+
+ set_display_size(8, 7);
+ display_update();
+}
+
+WRITE16_MEMBER(elecbowl_state::write_r)
+{
+ // R5-R7,R10: input mux
+ m_inp_mux = (data >> 5 & 7) | (data >> 7 & 8);
+
+ // R9: speaker out
+ // R3,R8: speaker volume..
+ m_speaker->level_w(data >> 9 & 1);
+
+ // R4-R7: select digit
+ // R0,R2: lamp mux1,2 _enable
+ // R1: lamp muxes state
+ m_r = data;
+ prepare_display();
+}
+
+WRITE16_MEMBER(elecbowl_state::write_o)
+{
+ //if (data & 0x80) printf("%X ",data&0x7f);
+
+ // O0-O2: lamp muxes select
+ // O0-O6: digit segments A-G
+ // O7: N/C
+ m_o = data & 0x7f;
+ prepare_display();
+}
+
+READ8_MEMBER(elecbowl_state::read_k)
+{
+ // K: multiplexed inputs
+ return read_inputs(4);
+}
+
+
+// config
+
+static INPUT_PORTS_START( elecbowl )
+ PORT_START("IN.0") // R5
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4)
+
+ PORT_START("IN.1") // R6
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) // reset/test?
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) // reset/test?
+
+ PORT_START("IN.2") // R7
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F)
+
+ PORT_START("IN.3") // R10
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) // 2 players sw?
+INPUT_PORTS_END
+
+// output PLA is not decapped
+static const UINT16 elecbowl_output_pla[0x20] =
+{
+ lA+lB+lC+lD+lE+lF, // 0
+ lB+lC, // 1
+ lA+lB+lG+lE+lD, // 2
+ lA+lB+lG+lC+lD, // 3
+ lF+lB+lG+lC, // 4
+ lA+lF+lG+lC+lD, // 5
+ lA+lF+lG+lC+lD+lE, // 6
+ lA+lB+lC, // 7
+ lA+lB+lC+lD+lE+lF+lG, // 8
+ lA+lB+lG+lF+lC+lD, // 9
+
+ 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+ 0,1,2,3,4,5,6,7, // lamp muxes select
+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
+};
+
+static MACHINE_CONFIG_START( elecbowl, elecbowl_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf
+ MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla)
+ MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(elecbowl_state, write_o))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_elecbowl)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Mattel Dungeons & Dragons - Computer Labyrinth Game
* TMS1100 M34012-N2LL (die label M34012)
* 72 buttons, no LEDs, 1-bit sound
@@ -3739,52 +3925,52 @@ READ8_MEMBER(mdndclab_state::read_k)
static INPUT_PORTS_START( mdndclab )
PORT_START("IN.0") // O0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.1") // O1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.2") // O2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.3") // O3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.4") // O4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.5") // O5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.6") // O6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.7") // O7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h4")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h3")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h2")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.8") // R0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Wall / Door")
@@ -3793,52 +3979,52 @@ static INPUT_PORTS_START( mdndclab )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Warrior 2 / Treasure")
PORT_START("IN.9") // R1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square a5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.10") // R2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square b5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.11") // R3
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square c5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.12") // R4
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square d5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.13") // R5
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square e5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.14") // R6
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square f5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.15") // R7
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square g5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.16") // R8
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h8")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h7")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h6")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square h5")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Board Sensor")
PORT_START("IN.17") // R9
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Switch Key")
@@ -3847,7 +4033,6 @@ static INPUT_PORTS_START( mdndclab )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Dragon Attacks / Dragon Wakes")
INPUT_PORTS_END
-
static MACHINE_CONFIG_START( mdndclab, mdndclab_state )
/* basic machine hardware */
@@ -4634,7 +4819,6 @@ static INPUT_PORTS_START( bigtrak )
PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-
void bigtrak_state::machine_start()
{
hh_tms1k_state::machine_start();
@@ -4671,6 +4855,238 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Milton Bradley Dark Tower
+ * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die label MP7332
+ (assume same ROM contents between revisions)
+ * SN75494N MOS-to-LED digit driver
+ * motorized rotating reel + lightsensor, 1bit-sound
+
+ This is a board game, it obviously requires game pieces and the board.
+ The emulated part is the centerpiece, a black tower with a rotating card
+ panel and LED digits for displaying health, amount of gold, etc. As far
+ as MAME is concerned, the game works fine.
+
+ To start up the game, first press [MOVE], the machine now does a self-test.
+ Then select level and number of players and the game will start. Read the
+ official manual on how to play the game.
+
+***************************************************************************/
+
+class mbdtower_state : public hh_tms1k_state
+{
+public:
+ mbdtower_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_tms1k_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ bool sensor_led_on() { return m_display_decay[0][0] != 0; }
+
+ int m_motor_pos;
+ int m_motor_pos_prev;
+ int m_motor_decay;
+ bool m_motor_on;
+ bool m_sensor_blind;
+
+ TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick);
+
+ DECLARE_WRITE16_MEMBER(write_r);
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_READ8_MEMBER(read_k);
+
+protected:
+ virtual void machine_start() override;
+};
+
+// handlers
+
+TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick)
+{
+ // it rotates counter-clockwise (when viewed from above)
+ if (m_motor_on)
+ {
+ m_motor_pos = (m_motor_pos - 1) & 0x7f;
+
+ // give it some time to spin out when it's turned off
+ if (m_r & 0x200)
+ m_motor_decay += (m_motor_decay < 4);
+ else if (m_motor_decay > 0)
+ m_motor_decay--;
+ else
+ m_motor_on = false;
+ }
+
+ // 8 evenly spaced holes in the rotation disc for the sensor to 'see' through.
+ // The first hole is much bigger, enabling the game to determine the position.
+ if ((m_motor_pos & 0xf) < 4 || m_motor_pos < 0xc)
+ m_sensor_blind = false;
+ else
+ m_sensor_blind = true;
+
+ // on change, output info
+ if (m_motor_pos != m_motor_pos_prev)
+ output().set_value("motor_pos", 100 * (m_motor_pos / (float)0x80));
+
+ /* 3 display cards per hole, like this:
+
+ (0) <---- display increments this way <---- (7)
+
+ CURSED VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void)
+ LOST WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void)
+ PLAGUE BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void)
+ */
+ int card_pos = m_motor_pos >> 4 & 7;
+ if (card_pos != (m_motor_pos_prev >> 4 & 7))
+ output().set_value("card_pos", card_pos);
+
+ m_motor_pos_prev = m_motor_pos;
+}
+
+
+void mbdtower_state::prepare_display()
+{
+ // declare display matrix size and the 2 7segs
+ set_display_size(7, 3);
+ set_display_segmask(6, 0x7f);
+
+ // update current state
+ if (~m_r & 0x10)
+ {
+ UINT8 o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
+ m_display_state[2] = (m_o & 0x80) ? o : 0;
+ m_display_state[1] = (m_o & 0x80) ? 0 : o;
+ m_display_state[0] = (m_r >> 8 & 1) | (m_r >> 4 & 0xe);
+
+ display_update();
+ }
+ else
+ {
+ // display items turned off
+ display_matrix(7, 3, 0, 0);
+ }
+}
+
+WRITE16_MEMBER(mbdtower_state::write_r)
+{
+ // R0-R2: input mux
+ m_inp_mux = data & 7;
+
+ // R9: motor on
+ if ((m_r ^ data) & 0x200)
+ output().set_value("motor_on", data >> 9 & 1);
+ if (data & 0x200)
+ m_motor_on = true;
+
+ // R3: N/C
+ // R4: 75494 /EN (speaker, lamps, digit select go through that IC)
+ // R5-R7: tower lamps
+ // R8: rotation sensor led
+ m_r = data;
+ prepare_display();
+
+ // R10: speaker out
+ m_speaker->level_w(~data >> 4 & data >> 10 & 1);
+}
+
+WRITE16_MEMBER(mbdtower_state::write_o)
+{
+ // O0-O6: led segments A-G
+ // O7: digit select
+ m_o = data;
+ prepare_display();
+}
+
+READ8_MEMBER(mbdtower_state::read_k)
+{
+ // K: multiplexed inputs
+ // K8: rotation sensor
+ return read_inputs(3) | ((!m_sensor_blind && sensor_led_on()) ? 8 : 0);
+}
+
+
+// config
+
+/* physical button layout and labels is like this:
+
+ (green) (l.blue) (red)
+ [YES/ [REPEAT] [NO/
+ BUY] END]
+
+ (yellow) (blue) (white)
+ [HAGGLE] [BAZAAR] [CLEAR]
+
+ (blue) (blue) (blue)
+ [TOMB/ [MOVE] [SANCTUARY/
+ RUIN] CITADEL]
+
+ (orange) (blue) (d.yellow)
+ [DARK [FRONTIER] [INVENTORY]
+ TOWER]
+*/
+
+static INPUT_PORTS_START( mbdtower )
+ PORT_START("IN.0") // R0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Inventory")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_NAME("No/End")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Clear")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("Sanctuary/Citadel")
+
+ PORT_START("IN.1") // R1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Frontier")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_NAME("Repeat")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("Bazaar")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Move")
+
+ PORT_START("IN.2") // R2
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Dark Tower")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_NAME("Yes/Buy")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Haggle")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("Tomb/Ruin")
+INPUT_PORTS_END
+
+void mbdtower_state::machine_start()
+{
+ hh_tms1k_state::machine_start();
+
+ // zerofill
+ m_motor_pos = 0;
+ m_motor_pos_prev = -1;
+ m_motor_decay = 0;
+ m_motor_on = false;
+ m_sensor_blind = false;
+
+ // register for savestates
+ save_item(NAME(m_motor_pos));
+ /* save_item(NAME(m_motor_pos_prev)); */ // don't save!
+ save_item(NAME(m_motor_decay));
+ save_item(NAME(m_motor_on));
+ save_item(NAME(m_sensor_blind));
+}
+
+static MACHINE_CONFIG_START( mbdtower, mbdtower_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf
+ MCFG_TMS1XXX_READ_K_CB(READ8(mbdtower_state, read_k))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("tower_motor", mbdtower_state, motor_sim_tick, attotime::from_msec(3500/0x80)) // ~3.5sec for a full rotation
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_mbdtower)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Parker Brothers Code Name: Sector, by Bob Doyle
* TMS0970 MCU, MP0905BNL ZA0379 (die label 0970F-05B)
* 6-digit 7seg LED display + 4 LEDs for compass, no sound
@@ -5564,7 +5980,6 @@ static INPUT_PORTS_START( tcfballa )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Display")
INPUT_PORTS_END
-
// output PLA is not decapped, dumped electronically
static const UINT16 tcfballa_output_pla[0x20] =
{
@@ -5600,12 +6015,17 @@ MACHINE_CONFIG_END
* TMS1100 MCU, label CD7282SL
* 12 lamps behind buttons, 1-bit sound
- This handheld contains 12 minigames. It looks and plays like "Fabulous Fred"
- by the Japanese company Mego Corp. in 1980, which in turn is a mix of Merlin
- and Simon. Unlike Merlin and Simon, spin-offs like these were not successful.
- There were releases with and without the prefix "Tandy-12", I don't know
- which name was more common. Also not worth noting is that it needed five
- batteries; 4 C-cells and a 9-volt.
+ known releases:
+ - World: Tandy-12: Computerized Arcade
+ - Mexico: Fabuloso Fred, distributed by Ensueno Toys (also released as
+ 9-button version, a clone of Mego Fabulous Fred)
+
+ This handheld contains 12 minigames. It looks and plays like Game Robot 9 by
+ Gakken (aka Mego's Fabulous Fred) from 1980, which in turn is a mix of Merlin
+ and Simon. Unlike Merlin and Simon, spin-offs were not as successful in the USA.
+ There were releases with and without the prefix "Tandy-12", I don't know which
+ name was more common. Also not worth noting is that it needed five batteries;
+ four C-cells and a 9-volt.
Some of the games require accessories included with the toy (eg. the Baseball
game is played with a board representing the playing field). To start a game,
@@ -5718,7 +6138,6 @@ static INPUT_PORTS_START( tandy12 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Button 5")
INPUT_PORTS_END
-
// output PLA is not decapped
static const UINT16 tandy12_output_pla[0x20] =
{
@@ -6456,7 +6875,7 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button)
{
// rectangular LEDs under LEDs D,F and E,G are directly connected
// to the left and right flipper buttons - output them to lamp90 and 91
- output().set_lamp_value(90 + (int)(FPTR)param, newval);
+ output().set_lamp_value(90 + (int)(uintptr_t)param, newval);
}
@@ -6588,7 +7007,6 @@ static INPUT_PORTS_START( ssports4 )
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-
// output PLA is not decapped, dumped electronically
static const UINT16 ssports4_output_pla[0x20] =
{
@@ -6913,6 +7331,17 @@ ROM_START( astro )
ROM_END
+ROM_START( elecbowl )
+ ROM_REGION( 0x0800, "maincpu", 0 )
+ ROM_LOAD( "mp3403.u9", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) )
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified
+ ROM_REGION( 365, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1100_elecbowl_output.pla", 0, 365, NO_DUMP )
+ROM_END
+
+
ROM_START( mdndclab )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "m34012", 0x0000, 0x0800, CRC(e851fccd) SHA1(158362c2821678a51554e02dbb2f9ef5aaf5f59f) )
@@ -6993,6 +7422,17 @@ ROM_START( bigtrak )
ROM_END
+ROM_START( mbdtower )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "mp7332", 0x0000, 0x1000, CRC(ebeab91a) SHA1(7edbff437da371390fa8f28b3d183f833eaa9be9) )
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
+ ROM_REGION( 557, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1400_mbdtower_output.pla", 0, 557, CRC(64c84697) SHA1(72ce6d24cedf9c606f1742cd5620f75907246e87) )
+ROM_END
+
+
ROM_START( cnsector )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "mp0905bnl_za0379", 0x0000, 0x0400, CRC(201036e9) SHA1(b37fef86bb2bceaf0ac8bb3745b4702d17366914) )
@@ -7240,6 +7680,8 @@ CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Ken
COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kosmos", "Astro", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling (Marx)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_MECHANICAL | MACHINE_NOT_WORKING ) // ***
+
CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // ***
CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW )
@@ -7248,6 +7690,7 @@ CONS( 1977, bshipb, bship, 0, bshipb, bship, driver_device, 0, "Mil
CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // ***
+CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_MECHANICAL ) // ***
CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NO_SOUND_HW ) // ***
CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index b92f259f4c2..4aba54a2591 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -48,7 +48,7 @@
@258 uPD553C 1984, Tomy Alien Chase (TN-16)
*296 uPD553C 1984, Epoch Computer Beam Gun Professional
- *511 uPD557LC 1980, Gakken Game Robot 9/Mego Fabulous Fred
+ @511 uPD557LC 1980, Gakken Game Robot 9/Mego Fabulous Fred
@512 uPD557LC 1980, Castle Toy Tactix
@060 uPD650C 1979, Mattel Computer Gin
@@ -70,6 +70,7 @@ TODO:
// internal artwork
#include "efball.lh"
+#include "grobot9.lh" // clickable
#include "mcompgin.lh"
#include "mvbfree.lh"
#include "tactix.lh" // clickable
@@ -88,6 +89,7 @@ void hh_ucom4_state::machine_start()
memset(m_display_segmask, 0, sizeof(m_display_segmask));
memset(m_port, 0, sizeof(m_port));
+ m_int = 0;
m_inp_mux = 0;
m_grid = 0;
m_plate = 0;
@@ -103,6 +105,7 @@ void hh_ucom4_state::machine_start()
save_item(NAME(m_display_segmask));
save_item(NAME(m_port));
+ save_item(NAME(m_int));
save_item(NAME(m_inp_mux));
save_item(NAME(m_grid));
save_item(NAME(m_plate));
@@ -110,6 +113,7 @@ void hh_ucom4_state::machine_start()
void hh_ucom4_state::machine_reset()
{
+ refresh_interrupts();
}
@@ -222,6 +226,31 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
}
+// interrupt handling
+
+void hh_ucom4_state::refresh_interrupts()
+{
+ m_maincpu->set_input_line(0, m_int ? ASSERT_LINE : CLEAR_LINE);
+}
+
+void hh_ucom4_state::set_interrupt(int state)
+{
+ state = state ? 1 : 0;
+
+ if (state != m_int)
+ {
+ if (machine().phase() >= MACHINE_PHASE_RESET)
+ m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
+ m_int = state;
+ }
+}
+
+INPUT_CHANGED_MEMBER(hh_ucom4_state::single_interrupt_line)
+{
+ set_interrupt(newval);
+}
+
+
/***************************************************************************
@@ -1630,6 +1659,121 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Gakken Game Robot 9
+ * PCB label GAME ROBOT 7520
+ * NEC uCOM-43 MCU, label TTGR-512 (die label NEC D557 511)
+ * 9 lamps behind buttons
+
+ known releases:
+ - Japan: Game Robot 9 (Takatoku Toys?)
+ - USA: Fabulous Fred - The Ultimate Electronic Game, distributed by Mego
+ - Mexico: Fabuloso Fred, distributed by Ensueno Toys (also released as
+ 12-button version, a clone of Tandy-12)
+
+ Accessories were included for some of the minigames.
+
+***************************************************************************/
+
+class grobot9_state : public hh_ucom4_state
+{
+public:
+ grobot9_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_ucom4_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(lamps_w);
+ DECLARE_WRITE8_MEMBER(speaker_w);
+ DECLARE_WRITE8_MEMBER(input_w);
+ DECLARE_READ8_MEMBER(input_r);
+};
+
+// handlers
+
+WRITE8_MEMBER(grobot9_state::lamps_w)
+{
+ if (offset == NEC_UCOM4_PORTE)
+ {
+ // E1: speaker out
+ m_speaker->level_w(data >> 1 & 1);
+
+ // E3: input mux high bit
+ m_inp_mux = (m_inp_mux & 7) | (data & 8);
+ }
+
+ // D,F,E0: lamps
+ m_port[offset] = data;
+ display_matrix(9, 1, m_port[NEC_UCOM4_PORTD] | m_port[NEC_UCOM4_PORTF] << 4 | m_port[NEC_UCOM4_PORTE] << 8, 1);
+}
+
+WRITE8_MEMBER(grobot9_state::input_w)
+{
+ // C012: input mux low
+ m_inp_mux = (m_inp_mux & 8) | (data & 7);
+}
+
+READ8_MEMBER(grobot9_state::input_r)
+{
+ // A: multiplexed inputs
+ return read_inputs(5);
+}
+
+
+// config
+
+static INPUT_PORTS_START( grobot9 )
+ PORT_START("IN.0") // C0 port A
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_Q) PORT_NAME("Button 1")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_W) PORT_NAME("Button 2")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_E) PORT_NAME("Button 3")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D) PORT_NAME("Button 4")
+
+ PORT_START("IN.1") // C1 port A
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_C) PORT_NAME("Button 5")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_X) PORT_NAME("Button 6")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_Z) PORT_NAME("Button 7")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_A) PORT_NAME("Button 8")
+
+ PORT_START("IN.2") // C2 port A
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_S) PORT_NAME("Button 9")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Rest")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("Eighth Note")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.3") // E3 port A
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Select")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("Hit")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Repeat")
+
+ PORT_START("IN.4") // INT
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_ucom4_state, single_interrupt_line, nullptr) PORT_NAME("Start-Pitch")
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( grobot9, grobot9_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", NEC_D557L, 160000) // approximation
+ MCFG_UCOM4_READ_A_CB(READ8(grobot9_state, input_r))
+ MCFG_UCOM4_WRITE_C_CB(WRITE8(grobot9_state, input_w))
+ MCFG_UCOM4_WRITE_D_CB(WRITE8(grobot9_state, lamps_w))
+ MCFG_UCOM4_WRITE_E_CB(WRITE8(grobot9_state, lamps_w))
+ MCFG_UCOM4_WRITE_F_CB(WRITE8(grobot9_state, lamps_w))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_grobot9)
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Mattel Computer Gin
* NEC uCOM-43 MCU, label D650C 060
* Hughes HLCD0569 LCD driver
@@ -2624,6 +2768,12 @@ ROM_START( edracula )
ROM_END
+ROM_START( grobot9 )
+ ROM_REGION( 0x0800, "maincpu", 0 )
+ ROM_LOAD( "ttgr-511", 0x0000, 0x0800, CRC(1f25b2bb) SHA1(55ae7e23f6dd46cc6e1a65839327726678410c3a) )
+ROM_END
+
+
ROM_START( mcompgin )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "d650c-060", 0x0000, 0x0800, BAD_DUMP CRC(92a4d8be) SHA1(d67f14a2eb53b79a7d9eb08103325299bc643781) ) // d5 stuck: xx1x xxxx
@@ -2709,6 +2859,8 @@ CONS( 1981, galaxy2b, galaxy2, 0, galaxy2b, galaxy2, driver_device, 0, "Epoch"
CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", MACHINE_SUPPORTS_SAVE )
CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", MACHINE_SUPPORTS_SAVE )
+CONS( 1980, grobot9, 0, 0, grobot9, grobot9, driver_device, 0, "Gakken", "Game Robot 9", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: ***
+
CONS( 1979, mcompgin, 0, 0, mcompgin, mcompgin, driver_device, 0, "Mattel", "Computer Gin", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
CONS( 1979, mvbfree, 0, 0, mvbfree, mvbfree, driver_device, 0, "Mego", "Mini-Vid Break Free", MACHINE_SUPPORTS_SAVE )
@@ -2719,3 +2871,6 @@ CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy",
CONS( 1982, tmscramb, 0, 0, tmscramb, tmscramb, driver_device, 0, "Tomy", "Scramble (Tomy)", MACHINE_SUPPORTS_SAVE )
CONS( 1982, tcaveman, 0, 0, tcaveman, tcaveman, driver_device, 0, "Tomy", "Caveman (Tomy)", MACHINE_SUPPORTS_SAVE )
CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", MACHINE_SUPPORTS_SAVE )
+
+// ***: As far as MAME is concerned, the game is emulated fine. But for it to be playable, it requires interaction
+// with other, unemulatable, things eg. game board/pieces, playing cards, pen & paper, etc.
diff --git a/src/mame/drivers/hng64.cpp b/src/mame/drivers/hng64.cpp
index 6f3a85b5f35..b5f013580ba 100644
--- a/src/mame/drivers/hng64.cpp
+++ b/src/mame/drivers/hng64.cpp
@@ -1374,7 +1374,7 @@ static void hng64_reorder( UINT8* gfxregion, size_t gfxregionsize)
// reorder them
UINT8 tilesize = 4*8; // 4 bytes per line, 8 lines
- dynamic_buffer buffer(gfxregionsize);
+ std::vector<UINT8> buffer(gfxregionsize);
for (int i = 0; i < gfxregionsize/2; i += tilesize)
{
diff --git a/src/mame/drivers/homedata.cpp b/src/mame/drivers/homedata.cpp
index 8a8083b456e..de8133351ba 100644
--- a/src/mame/drivers/homedata.cpp
+++ b/src/mame/drivers/homedata.cpp
@@ -163,6 +163,7 @@ Mahjong Vitamin C
(c)1989 Home Data
Board: X73-PWB-A(A)
+Board: X83-PWB-AC(A)
CPU: 68B09E uPD7807CW(?)
Sound: SN76489AN DAC
@@ -189,11 +190,12 @@ Mahjong Kinjirareta Asobi
Board: X83-PWB-A(A)
CPU: 68B09E uPD7807CW
-Sound: SN76489AN
- DAC
+Sound: SN76489AN DAC
OSC: 11.000MHz 16.000MHz
Custom: GX61A01
+Note: seems likely above 11mhz crystal was a repair
+
----------------------------------------------------------------------------
Mahjong Jogakuen
(c)19?? Windom
@@ -232,11 +234,12 @@ Custom: GX61A01
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/homedata.h"
#include "cpu/m6809/m6809.h"
#include "cpu/upd7810/upd7810.h"
-#include "includes/homedata.h"
-
+#include "cpu/z80/z80.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
INTERRUPT_GEN_MEMBER(homedata_state::homedata_irq)
{
@@ -315,20 +318,6 @@ WRITE8_MEMBER(homedata_state::mrokumei_sound_bank_w)
m_sndbank = data;
}
-WRITE8_MEMBER(homedata_state::mrokumei_sound_io_w)
-{
- switch (offset & 0xff)
- {
- case 0x40:
- case 0x7f: // hourouki mirror
- m_dac->write_signed8(data);
- break;
- default:
- logerror("%04x: I/O write to port %04x %02x\n", space.device().safe_pc(), offset,data);
- break;
- }
-}
-
WRITE8_MEMBER(homedata_state::mrokumei_sound_cmd_w)
{
m_soundlatch->write(space, offset, data);
@@ -558,15 +547,15 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mrokumei_sound_map, AS_PROGRAM, 8, homedata_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
- // TODO: might be that the entire area is sound_bank_w
AM_RANGE(0xfffc, 0xfffd) AM_WRITENOP /* stack writes happen here, but there's no RAM */
AM_RANGE(0x8080, 0x8080) AM_WRITE(mrokumei_sound_bank_w)
- AM_RANGE(0xffbf, 0xffbf) AM_WRITE(mrokumei_sound_bank_w) // hourouki mirror
ADDRESS_MAP_END
-
static ADDRESS_MAP_START( mrokumei_sound_io_map, AS_IO, 8, homedata_state )
- AM_RANGE(0x0000, 0xffff) AM_READWRITE(mrokumei_sound_io_r, mrokumei_sound_io_w) /* read address is 16-bit, write address is only 8-bit */
+ AM_RANGE(0x0000, 0xffff) AM_READ(mrokumei_sound_io_r) /* read address is 16-bit */
+ AM_RANGE(0x0040, 0x0040) AM_MIRROR(0xff00) AM_DEVWRITE("dac", dac_byte_interface, write) /* write address is only 8-bit */
+ // hourouki mirror...
+ AM_RANGE(0x007f, 0x007f) AM_MIRROR(0xff00) AM_DEVWRITE("dac", dac_byte_interface, write) /* write address is only 8-bit */
ADDRESS_MAP_END
/********************************************************************************/
@@ -597,7 +586,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( reikaids_upd7807_io_map, AS_IO, 8, homedata_state )
AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READWRITE(reikaids_upd7807_porta_r, reikaids_upd7807_porta_w)
- AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_WRITE(reikaids_upd7807_portc_w)
AM_RANGE(UPD7807_PORTT, UPD7807_PORTT) AM_READ(reikaids_snd_command_r)
ADDRESS_MAP_END
@@ -632,7 +621,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pteacher_upd7807_io_map, AS_IO, 8, homedata_state )
AM_RANGE(UPD7807_PORTA, UPD7807_PORTA) AM_READWRITE(pteacher_upd7807_porta_r, pteacher_upd7807_porta_w)
- AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(UPD7807_PORTB, UPD7807_PORTB) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(UPD7807_PORTC, UPD7807_PORTC) AM_READ_PORT("COIN") AM_WRITE(pteacher_upd7807_portc_w)
AM_RANGE(UPD7807_PORTT, UPD7807_PORTT) AM_READ(pteacher_keyboard_r)
ADDRESS_MAP_END
@@ -1262,15 +1251,16 @@ static MACHINE_CONFIG_START( mrokumei, homedata_state )
MCFG_VIDEO_START_OVERRIDE(homedata_state,mrokumei)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1310,18 +1300,19 @@ static MACHINE_CONFIG_START( reikaids, homedata_state )
MCFG_VIDEO_START_OVERRIDE(homedata_state,reikaids)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, 3000000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
- MCFG_SOUND_ROUTE(0, "mono", 0.25)
- MCFG_SOUND_ROUTE(1, "mono", 0.25)
- MCFG_SOUND_ROUTE(2, "mono", 0.25)
- MCFG_SOUND_ROUTE(3, "mono", 1.0)
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(2, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0)
+
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1362,13 +1353,14 @@ static MACHINE_CONFIG_START( pteacher, homedata_state )
MCFG_VIDEO_START_OVERRIDE(homedata_state,pteacher)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mjkinjas, pteacher )
@@ -1525,13 +1517,13 @@ static MACHINE_CONFIG_START( mirderby, homedata_state )
MCFG_VIDEO_START_OVERRIDE(homedata_state,mirderby)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, 2000000)
- MCFG_SOUND_ROUTE(0, "mono", 0.25)
- MCFG_SOUND_ROUTE(1, "mono", 0.25)
- MCFG_SOUND_ROUTE(2, "mono", 0.25)
- MCFG_SOUND_ROUTE(3, "mono", 1.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(2, "speaker", 0.25)
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0)
MACHINE_CONFIG_END
/**************************************************************************/
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index 975f15ddd95..2efc82859f4 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -34,12 +34,12 @@ MB7051 - fuse programmed prom.
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "sound/speaker.h"
-#include "sound/wave.h"
#include "imagedev/cassette.h"
-#include "audio/mea8000.h"
-#include "sound/dac.h"
#include "imagedev/snapquik.h"
+#include "sound/dac.h"
+#include "sound/mea8000.h"
+#include "sound/volt_reg.h"
+#include "sound/wave.h"
@@ -48,9 +48,9 @@ class homelab_state : public driver_device
public:
homelab_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_speaker(*this, "speaker"),
- m_cass(*this, "cassette")
+ m_maincpu(*this, "maincpu"),
+ m_dac(*this, "dac"),
+ m_cass(*this, "cassette")
{ }
DECLARE_READ8_MEMBER(key_r);
@@ -66,7 +66,7 @@ public:
const UINT8 *m_p_videoram;
bool m_nmi;
required_device<cpu_device> m_maincpu;
- required_device<speaker_sound_device> m_speaker;
+ required_device<dac_bit_interface> m_dac;
required_device<cassette_image_device> m_cass;
DECLARE_DRIVER_INIT(brailab4);
DECLARE_VIDEO_START(homelab2);
@@ -171,13 +171,13 @@ READ8_MEMBER( homelab_state::exxx_r )
else
if (offset == 0x80)
{
- m_speaker->level_w(0);
+ m_dac->write(0);
m_cass->output(-1.0);
}
else
if (offset == 0x02)
{
- m_speaker->level_w(1);
+ m_dac->write(1);
m_cass->output(+1.0);
}
@@ -651,7 +651,7 @@ QUICKLOAD_LOAD_MEMBER( homelab_state,homelab)
UINT16 quick_addr;
UINT16 quick_length;
UINT16 quick_end;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
char pgmname[256];
UINT16 args[2];
int read_;
@@ -750,11 +750,13 @@ static MACHINE_CONFIG_START( homelab, homelab_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2)
@@ -781,11 +783,13 @@ static MACHINE_CONFIG_START( homelab3, homelab_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2)
@@ -812,15 +816,16 @@ static MACHINE_CONFIG_START( brailab4, homelab_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_SOUND_ADD ( "speech", DAC, 0 )
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("mea8000", MEA8000, 0)
- MCFG_MEA8000_DAC("speech")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+
+ MCFG_SOUND_ADD("mea8000", MEA8000, 3840000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 18)
diff --git a/src/mame/drivers/hp48.cpp b/src/mame/drivers/hp48.cpp
index 317389522fc..a49c56c8ade 100644
--- a/src/mame/drivers/hp48.cpp
+++ b/src/mame/drivers/hp48.cpp
@@ -9,11 +9,10 @@
**********************************************************************/
#include "emu.h"
+#include "includes/hp48.h"
#include "cpu/saturn/saturn.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
-
-#include "includes/hp48.h"
+#include "sound/volt_reg.h"
/* TODO:
- IR I/O port
@@ -1280,9 +1279,10 @@ static MACHINE_CONFIG_START( hp48_common, hp48_state )
MCFG_PALETTE_INIT_OWNER(hp48_state, hp48)
/* sound */
- MCFG_SPEAKER_STANDARD_MONO( "mono" )
- MCFG_SOUND_ADD( "dac", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.) /* 1-bit beeper */
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( hp48gx, hp48_common )
diff --git a/src/mame/drivers/hp49gp.cpp b/src/mame/drivers/hp49gp.cpp
index 4dbfe0bdb56..fcadcfa0f87 100644
--- a/src/mame/drivers/hp49gp.cpp
+++ b/src/mame/drivers/hp49gp.cpp
@@ -238,7 +238,7 @@ WRITE32_MEMBER(hp49gp_state::s3c2410_gpio_port_w)
INPUT_CHANGED_MEMBER(hp49gp_state::port_changed)
{
- m_s3c2410->s3c2410_request_eint( (FPTR)param + 8);
+ m_s3c2410->s3c2410_request_eint( (uintptr_t)param + 8);
}
// ...
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp
index c3f25382182..c93fac46164 100644
--- a/src/mame/drivers/hp9845.cpp
+++ b/src/mame/drivers/hp9845.cpp
@@ -29,12 +29,9 @@
// - Speed, as usual
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/hp9845.h"
#include "softlist.h"
-#include "cpu/hphybrid/hphybrid.h"
-#include "machine/hp_taco.h"
#include "bus/hp_optroms/hp_optrom.h"
-#include "sound/beep.h"
#define BIT_MASK(n) (1U << (n))
@@ -98,138 +95,10 @@ public:
static INPUT_PORTS_START( hp9845 )
INPUT_PORTS_END
-class hp9845b_state : public driver_device
+UINT32 hp9845_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
-public:
- hp9845b_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_lpu(*this , "lpu"),
- m_ppu(*this , "ppu"),
- m_screen(*this , "screen"),
- m_palette(*this , "palette"),
- m_gv_timer(*this , "gv_timer"),
- m_io_key0(*this , "KEY0"),
- m_io_key1(*this , "KEY1"),
- m_io_key2(*this , "KEY2"),
- m_io_key3(*this , "KEY3"),
- m_t15(*this , "t15"),
- m_beeper(*this , "beeper"),
- m_beep_timer(*this , "beep_timer")
- { }
-
- UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
-
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
- TIMER_DEVICE_CALLBACK_MEMBER(gv_timer);
-
- void vblank_w(screen_device &screen, bool state);
-
- void set_graphic_mode(bool graphic);
- DECLARE_READ16_MEMBER(graphic_r);
- DECLARE_WRITE16_MEMBER(graphic_w);
- attotime time_to_gv_mem_availability(void) const;
- void advance_gv_fsm(bool ds , bool trigger);
- void update_graphic_bits(void);
-
- IRQ_CALLBACK_MEMBER(irq_callback);
- void update_irq(void);
-
- TIMER_DEVICE_CALLBACK_MEMBER(kb_scan);
- DECLARE_READ16_MEMBER(kb_scancode_r);
- DECLARE_READ16_MEMBER(kb_status_r);
- DECLARE_WRITE16_MEMBER(kb_irq_clear_w);
- TIMER_DEVICE_CALLBACK_MEMBER(beeper_off);
-
- DECLARE_WRITE8_MEMBER(pa_w);
-
- DECLARE_WRITE_LINE_MEMBER(t15_irq_w);
- DECLARE_WRITE_LINE_MEMBER(t15_flg_w);
- DECLARE_WRITE_LINE_MEMBER(t15_sts_w);
-
-private:
- required_device<hp_5061_3001_cpu_device> m_lpu;
- required_device<hp_5061_3001_cpu_device> m_ppu;
- required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- required_device<timer_device> m_gv_timer;
- required_ioport m_io_key0;
- required_ioport m_io_key1;
- required_ioport m_io_key2;
- required_ioport m_io_key3;
- required_device<hp_taco_device> m_t15;
- required_device<beep_device> m_beeper;
- required_device<timer_device> m_beep_timer;
-
- void set_video_mar(UINT16 mar);
- void video_fill_buff(bool buff_idx);
- void video_render_buff(unsigned video_scanline , unsigned line_in_row, bool buff_idx);
- void graphic_video_render(unsigned video_scanline);
-
- // Character generator
- const UINT8 *m_chargen;
-
- // Optional character generator
- const UINT8 *m_optional_chargen;
-
- // Text mode video I/F
- typedef struct {
- UINT8 chars[ 80 ];
- UINT8 attrs[ 80 ];
- bool full;
- } video_buffer_t;
-
- bitmap_rgb32 m_bitmap;
- offs_t m_video_mar;
- UINT16 m_video_word;
- bool m_video_load_mar;
- bool m_video_first_mar;
- bool m_video_byte_idx;
- UINT8 m_video_attr;
- bool m_video_buff_idx;
- bool m_video_blanked;
- video_buffer_t m_video_buff[ 2 ];
-
- // Graphic video
- typedef enum {
- GV_STAT_RESET,
- GV_STAT_WAIT_DS_0 = GV_STAT_RESET,
- GV_STAT_WAIT_TRIG_0,
- GV_STAT_WAIT_MEM_0,
- GV_STAT_WAIT_DS_1,
- GV_STAT_WAIT_DS_2,
- GV_STAT_WAIT_TRIG_1,
- GV_STAT_WAIT_MEM_1,
- GV_STAT_WAIT_MEM_2
- } gv_fsm_state_t;
-
- bool m_graphic_sel;
- gv_fsm_state_t m_gv_fsm_state;
- bool m_gv_int_en;
- bool m_gv_dma_en;
- bool m_gv_ready;
- UINT8 m_gv_cmd; // U65 (GC)
- UINT16 m_gv_data_w; // U29, U45, U28 & U44 (GC)
- UINT16 m_gv_data_r; // U59 & U60 (GC)
- UINT16 m_gv_io_counter; // U1, U2, U14 & U15 (GC)
- UINT16 m_gv_cursor_w; // U38 & U39 (GS)
- UINT16 m_gv_cursor_x; // U31 & U23 (GS)
- UINT16 m_gv_cursor_y; // U15 & U8 (GS)
- bool m_gv_cursor_gc; // U8 (GS)
- bool m_gv_cursor_fs; // U8 (GS)
- std::vector<UINT16> m_graphic_mem;
-
- // Interrupt handling
- UINT8 m_irl_pending;
- UINT8 m_irh_pending;
-
- // State of keyboard
- ioport_value m_kb_state[ 4 ];
- UINT8 m_kb_scancode;
- UINT16 m_kb_status;
-};
+ return 0;
+}
static INPUT_PORTS_START(hp9845b)
// Keyboard is arranged in a 8 x 16 matrix. Of the 128 possible positions, 118 are used.
@@ -375,9 +244,22 @@ static INPUT_PORTS_START(hp9845b)
INPUT_PORTS_END
-UINT32 hp9845_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+hp9845b_state::hp9845b_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_lpu(*this , "lpu"),
+ m_ppu(*this , "ppu"),
+ m_screen(*this , "screen"),
+ m_palette(*this , "palette"),
+ m_gv_timer(*this , "gv_timer"),
+ m_io_key0(*this , "KEY0"),
+ m_io_key1(*this , "KEY1"),
+ m_io_key2(*this , "KEY2"),
+ m_io_key3(*this , "KEY3"),
+ m_t15(*this , "t15"),
+ m_beeper(*this , "beeper"),
+ m_beep_timer(*this , "beep_timer"),
+ m_io_slot0(*this , "slot0")
{
- return 0;
}
UINT32 hp9845b_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@@ -402,33 +284,45 @@ void hp9845b_state::machine_start()
m_graphic_mem.resize(GVIDEO_MEM_SIZE);
}
-void hp9845b_state::machine_reset()
+void hp9845b_state::device_reset()
{
- m_lpu->halt_w(1);
- m_ppu->halt_w(0);
-
- // Some sensible defaults
- m_video_mar = VIDEO_BUFFER_BASE;
- m_video_load_mar = false;
- m_video_first_mar = false;
- m_video_byte_idx = false;
- m_video_attr = 0;
- m_video_buff_idx = false;
- m_video_blanked = false;
- m_graphic_sel = false;
- m_gv_fsm_state = GV_STAT_RESET;
- m_gv_int_en = false;
- m_gv_dma_en = false;
- m_gv_ready = true;
+ // FLG & STS are to be reset before sub-devices,
+ // because the latter may set the former in their own reset functions
+ m_flg_status = 0;
+ m_sts_status = 0;
+}
- m_irl_pending = 0;
- m_irh_pending = 0;
+void hp9845b_state::machine_reset()
+{
+ m_lpu->halt_w(1);
+ m_ppu->halt_w(0);
+
+ // Some sensible defaults
+ m_video_mar = VIDEO_BUFFER_BASE;
+ m_video_load_mar = false;
+ m_video_first_mar = false;
+ m_video_byte_idx = false;
+ m_video_attr = 0;
+ m_video_buff_idx = false;
+ m_video_blanked = false;
+ m_graphic_sel = false;
+ m_gv_fsm_state = GV_STAT_RESET;
+ m_gv_int_en = false;
+ m_gv_dma_en = false;
+
+ m_irl_pending = 0;
+ m_irh_pending = 0;
+ m_pa = 0;
+
+ sts_w(GVIDEO_PA , true);
+
+ memset(&m_kb_state[ 0 ] , 0 , sizeof(m_kb_state));
+ m_kb_scancode = 0x7f;
+ m_kb_status = 0;
- memset(&m_kb_state[ 0 ] , 0 , sizeof(m_kb_state));
- m_kb_scancode = 0x7f;
- m_kb_status = 0;
+ m_beeper->set_state(0);
- m_beeper->set_state(0);
+ logerror("STS=%04x FLG=%04x\n" , m_sts_status , m_flg_status);
}
void hp9845b_state::set_video_mar(UINT16 mar)
@@ -851,27 +745,19 @@ void hp9845b_state::advance_gv_fsm(bool ds , bool trigger)
void hp9845b_state::update_graphic_bits(void)
{
- m_gv_ready = m_gv_fsm_state == GV_STAT_WAIT_DS_0 ||
+ bool gv_ready = m_gv_fsm_state == GV_STAT_WAIT_DS_0 ||
m_gv_fsm_state == GV_STAT_WAIT_DS_1 ||
m_gv_fsm_state == GV_STAT_WAIT_DS_2;
- bool irq = m_gv_int_en && !m_gv_dma_en && m_gv_ready;
+ flg_w(GVIDEO_PA , gv_ready);
- if (irq) {
- BIT_SET(m_irh_pending, GVIDEO_PA - 8);
- } else {
- BIT_CLR(m_irh_pending, GVIDEO_PA - 8);
- }
+ bool irq = m_gv_int_en && !m_gv_dma_en && gv_ready;
- update_irq();
+ irq_w(GVIDEO_PA , irq);
- bool dmar = m_gv_ready && m_gv_dma_en;
+ bool dmar = gv_ready && m_gv_dma_en;
m_ppu->dmar_w(dmar);
-
- if (m_ppu->pa_r() == GVIDEO_PA) {
- m_ppu->flag_w(m_gv_ready);
- }
}
void hp9845b_state::graphic_video_render(unsigned video_scanline)
@@ -916,10 +802,10 @@ void hp9845b_state::graphic_video_render(unsigned video_scanline)
IRQ_CALLBACK_MEMBER(hp9845b_state::irq_callback)
{
if (irqline == HPHYBRID_IRL) {
- logerror("irq ack L %02x\n" , m_irl_pending);
+ //logerror("irq ack L %02x\n" , m_irl_pending);
return m_irl_pending;
} else {
- logerror("irq ack H %02x\n" , m_irh_pending);
+ //logerror("irq ack H %02x\n" , m_irh_pending);
return m_irh_pending;
}
}
@@ -930,6 +816,64 @@ void hp9845b_state::update_irq(void)
m_ppu->set_input_line(HPHYBRID_IRH , m_irh_pending != 0);
}
+void hp9845b_state::irq_w(UINT8 sc , int state)
+{
+ unsigned bit_n = sc % 8;
+
+ if (sc < 8) {
+ if (state) {
+ BIT_SET(m_irl_pending, bit_n);
+ } else {
+ BIT_CLR(m_irl_pending, bit_n);
+ }
+ } else {
+ if (state) {
+ BIT_SET(m_irh_pending, bit_n);
+ } else {
+ BIT_CLR(m_irh_pending, bit_n);
+ }
+ }
+ update_irq();
+}
+
+void hp9845b_state::update_flg_sts(void)
+{
+ bool sts = BIT(m_sts_status , m_pa);
+ bool flg = BIT(m_flg_status , m_pa);
+ m_ppu->status_w(sts);
+ m_ppu->flag_w(flg);
+}
+
+void hp9845b_state::sts_w(UINT8 sc , int state)
+{
+ if (state) {
+ BIT_SET(m_sts_status, sc);
+ } else {
+ BIT_CLR(m_sts_status, sc);
+ }
+ if (sc == m_pa) {
+ update_flg_sts();
+ }
+}
+
+void hp9845b_state::flg_w(UINT8 sc , int state)
+{
+ if (state) {
+ BIT_SET(m_flg_status, sc);
+ } else {
+ BIT_CLR(m_flg_status, sc);
+ }
+ if (sc == m_pa) {
+ update_flg_sts();
+ }
+}
+
+void hp9845b_state::install_readwrite_handler(UINT8 sc , read16_delegate rhandler, write16_delegate whandler)
+{
+ // Install r/w handlers to cover all I/O addresses of PPU belonging to "sc" select code
+ m_ppu->space(AS_IO).install_readwrite_handler(sc * 4 , sc * 4 + 3 , rhandler , whandler);
+}
+
TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan)
{
ioport_value input[ 4 ];
@@ -986,9 +930,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan)
if ((input[ idx ] & ~m_kb_state[ idx ]) & mask) {
// Key pressed, store scancode & generate IRL
m_kb_scancode = i;
- BIT_SET(m_irl_pending , 0);
+ irq_w(0 , 1);
BIT_SET(m_kb_status, 0);
- update_irq();
// Special case: pressing stop key sets LPU "status" flag
if (i == 0x47) {
@@ -1012,9 +955,8 @@ READ16_MEMBER(hp9845b_state::kb_status_r)
WRITE16_MEMBER(hp9845b_state::kb_irq_clear_w)
{
- BIT_CLR(m_irl_pending , 0);
+ irq_w(0 , 0);
BIT_CLR(m_kb_status, 0);
- update_irq();
m_lpu->status_w(0);
if (BIT(data , 15)) {
@@ -1031,42 +973,25 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::beeper_off)
WRITE8_MEMBER(hp9845b_state::pa_w)
{
- if (data == T15_PA) {
- // RHS tape drive (T15)
- m_ppu->status_w(m_t15->sts_r());
- m_ppu->flag_w(m_t15->flg_r());
- } else if (data == GVIDEO_PA) {
- // Graphic video
- m_ppu->status_w(1);
- m_ppu->flag_w(m_gv_ready);
- } else {
- m_ppu->status_w(0);
- m_ppu->flag_w(0);
- }
+ if (data != m_pa) {
+ m_pa = data;
+ update_flg_sts();
+ }
}
WRITE_LINE_MEMBER(hp9845b_state::t15_irq_w)
{
- if (state) {
- BIT_SET(m_irh_pending , T15_PA - 8);
- } else {
- BIT_CLR(m_irh_pending , T15_PA - 8);
- }
- update_irq();
+ irq_w(T15_PA , state);
}
WRITE_LINE_MEMBER(hp9845b_state::t15_flg_w)
{
- if (m_ppu->pa_r() == T15_PA) {
- m_ppu->flag_w(state);
- }
+ flg_w(T15_PA , state);
}
WRITE_LINE_MEMBER(hp9845b_state::t15_sts_w)
{
- if (m_ppu->pa_r() == T15_PA) {
- m_ppu->status_w(state);
- }
+ sts_w(T15_PA , state);
}
static MACHINE_CONFIG_START( hp9845a, hp9845_state )
@@ -1185,7 +1110,9 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state )
MCFG_DEVICE_ADD("drawer8", HP_OPTROM_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(hp_optrom_slot_device, NULL, false)
- MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
+ MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom")
+
+ MCFG_HP9845_IO_SLOT_ADD("slot0")
MACHINE_CONFIG_END
ROM_START( hp9845a )
diff --git a/src/mame/drivers/hyhoo.cpp b/src/mame/drivers/hyhoo.cpp
index 64fcee9eda1..270e7285daa 100644
--- a/src/mame/drivers/hyhoo.cpp
+++ b/src/mame/drivers/hyhoo.cpp
@@ -24,11 +24,12 @@ Memo:
******************************************************************************/
#include "emu.h"
+#include "includes/hyhoo.h"
#include "cpu/z80/z80.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/hyhoo.h"
-#include "machine/nvram.h"
+#include "sound/volt_reg.h"
static ADDRESS_MAP_START( hyhoo_map, AS_PROGRAM, 8, hyhoo_state )
@@ -47,7 +48,7 @@ static ADDRESS_MAP_START( hyhoo_io_map, AS_IO, 8, hyhoo_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xcf) AM_WRITEONLY AM_SHARE("clut")
- AM_RANGE(0xd0, 0xd0) AM_READNOP AM_DEVWRITE("dac", dac_device, write_unsigned8) // unknown read
+ AM_RANGE(0xd0, 0xd0) AM_READNOP AM_DEVWRITE("dac", dac_byte_interface, write) // unknown read
AM_RANGE(0xe0, 0xe0) AM_WRITE(hyhoo_romsel_w)
AM_RANGE(0xe0, 0xe1) AM_DEVREAD("nb1413m3", nb1413m3_device, gfxrom_r)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
@@ -244,14 +245,16 @@ static MACHINE_CONFIG_START( hyhoo, hyhoo_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
+
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hyperspt.cpp b/src/mame/drivers/hyperspt.cpp
index fcdb0081961..8319f084f42 100644
--- a/src/mame/drivers/hyperspt.cpp
+++ b/src/mame/drivers/hyperspt.cpp
@@ -9,18 +9,19 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz)
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/konamipt.h"
+#include "includes/hyperspt.h"
+#include "audio/trackfld.h"
+#include "audio/hyprolyb.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "sound/dac.h"
+#include "cpu/z80/z80.h"
+#include "machine/gen_latch.h"
#include "machine/konami1.h"
#include "machine/nvram.h"
-#include "machine/gen_latch.h"
#include "machine/watchdog.h"
-#include "includes/konamipt.h"
-#include "audio/trackfld.h"
-#include "audio/hyprolyb.h"
-#include "includes/hyperspt.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(hyperspt_state::hyperspt_coin_counter_w)
@@ -82,7 +83,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, hyperspt_state )
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("vlm", vlm5030_device, data_w) /* speech data */
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, hyperspt_sound_w) /* speech and output control */
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
ADDRESS_MAP_END
@@ -94,7 +95,7 @@ static ADDRESS_MAP_START( roadf_sound_map, AS_PROGRAM, 8, hyperspt_state )
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_NOP // No VLM
AM_RANGE(0xc000, 0xdfff) AM_NOP // No VLM
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
ADDRESS_MAP_END
@@ -106,7 +107,7 @@ static ADDRESS_MAP_START( soundb_map, AS_PROGRAM, 8, hyperspt_state )
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_NOP
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("hyprolyb_adpcm", hyprolyb_adpcm_device, write) /* speech and output control */
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
ADDRESS_MAP_END
@@ -320,20 +321,21 @@ static MACHINE_CONFIG_START( hyperspt, hyperspt_state )
MCFG_PALETTE_INIT_OWNER(hyperspt_state, hyperspt)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("snsnd", SN76496, XTAL_14_31818MHz/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp
index d615313c397..80dd5d8e91f 100644
--- a/src/mame/drivers/igs011.cpp
+++ b/src/mame/drivers/igs011.cpp
@@ -985,7 +985,7 @@ void igs011_state::lhb2_decrypt_gfx()
int i;
unsigned rom_size = 0x200000;
UINT8 *src = (UINT8 *) (memregion("blitter")->base());
- dynamic_buffer result_data(rom_size);
+ std::vector<UINT8> result_data(rom_size);
for (i=0; i<rom_size; i++)
result_data[i] = src[BITSWAP24(i, 23,22,21,20, 19, 17,16,15, 13,12, 10,9,8,7,6,5,4, 2,1, 3, 11, 14, 18, 0)];
@@ -998,7 +998,7 @@ void igs011_state::drgnwrld_gfx_decrypt()
int i;
unsigned rom_size = 0x400000;
UINT8 *src = (UINT8 *) (memregion("blitter")->base());
- dynamic_buffer result_data(rom_size);
+ std::vector<UINT8> result_data(rom_size);
for (i=0; i<rom_size; i++)
result_data[i] = src[BITSWAP24(i, 23,22,21,20,19,18,17,16,15, 12, 13, 14, 11,10,9,8,7,6,5,4,3,2,1,0)];
diff --git a/src/mame/drivers/igs017.cpp b/src/mame/drivers/igs017.cpp
index 4899caf1c21..c2719ef35b9 100644
--- a/src/mame/drivers/igs017.cpp
+++ b/src/mame/drivers/igs017.cpp
@@ -21,8 +21,8 @@ Year + Game PCB CPU Sound Custom
98 Mj Long Hu Zheng Ba 2 NO-0206 68000 M6295 IGS031 IGS025 IGS022* Battery
98 Mj Shuang Long Qiang Zhu 2 NO-0207 68000 M6295 IGS031 IGS025 IGS022 Battery
98 Mj Man Guan Cai Shen NO-0192-1 68000 M6295 IGS017 IGS025 IGS029 Battery
-99? Tarzan (V107)? NO-0248-1 Z180 M6295 IGS031 IGS025 Battery
-99? Tarzan (V109C)? NO-0228? Z180 M6295 IGS031 IGS025 IGS029 Battery
+99 Tarzan (V107) NO-0228? Z180 M6295 IGS031 IGS025 IGS029 Battery
+99 Tarzan (V109C) NO-0248-1 Z180 M6295 IGS031 IGS025 Battery
00? Super Tarzan (V100I) NO-0230-1 Z180 M6295 IGS031 IGS025 Battery
?? Super Poker / Formosa NO-0187 Z180 M6295 YM2413 IGS017 IGS025 Battery
-------------------------------------------------------------------------------------------------------------
@@ -181,6 +181,9 @@ public:
void mgcs_flip_sprites();
void mgcs_patch_rom();
void mgcs_igs029_run();
+ void tarzan_decrypt_tiles();
+ void tarzan_decrypt_program_rom();
+ void tarzana_decrypt_program_rom();
void starzan_decrypt(UINT8 *ROM, int size, bool isOpcode);
void lhzb2_patch_rom();
void lhzb2_decrypt_tiles();
@@ -432,7 +435,7 @@ void igs017_state::mgcs_decrypt_tiles()
{
int length = memregion("tilemaps")->bytes();
UINT8 *rom = memregion("tilemaps")->base();
- dynamic_buffer tmp(length);
+ std::vector<UINT8> tmp(length);
int i;
memcpy(&tmp[0],rom,length);
@@ -488,8 +491,23 @@ DRIVER_INIT_MEMBER(igs017_state,mgcs)
// tarzan, tarzana
+void igs017_state::tarzan_decrypt_tiles()
+{
+ int length = memregion("tilemaps")->bytes();
+ UINT8 *rom = memregion("tilemaps")->base();
+ std::vector<UINT8> tmp(length);
+ int i;
+
+ memcpy(&tmp[0],rom,length);
+ for (i = 0;i < length;i++)
+ {
+ int addr = (i & ~0xffff) | BITSWAP16(i,15,14,13,12,11,7,8,6,10,9,5,4,3,2,1,0);
+ rom[i] = BITSWAP8(tmp[addr],0,1,2,3,4,5,6,7);
+ }
+}
+
// decryption is incomplete, the first part of code doesn't seem right.
-DRIVER_INIT_MEMBER(igs017_state,tarzan)
+void igs017_state::tarzan_decrypt_program_rom()
{
UINT16 *ROM = (UINT16 *)memregion("maincpu")->base();
int i;
@@ -515,7 +533,7 @@ DRIVER_INIT_MEMBER(igs017_state,tarzan)
}
}
// by iq_132
-DRIVER_INIT_MEMBER(igs017_state,tarzana)
+void igs017_state::tarzana_decrypt_program_rom()
{
UINT8 *ROM = memregion("maincpu")->base();
int i;
@@ -533,6 +551,17 @@ DRIVER_INIT_MEMBER(igs017_state,tarzana)
}
}
+DRIVER_INIT_MEMBER(igs017_state,tarzan)
+{
+ tarzan_decrypt_program_rom();
+ tarzan_decrypt_tiles();
+}
+
+DRIVER_INIT_MEMBER(igs017_state,tarzana)
+{
+ tarzana_decrypt_program_rom();
+// tarzana_decrypt_tiles(); // to do
+}
// starzan
@@ -723,7 +752,7 @@ void igs017_state::lhzb2_decrypt_tiles()
{
int length = memregion("tilemaps")->bytes();
UINT8 *rom = memregion("tilemaps")->base();
- dynamic_buffer tmp(length);
+ std::vector<UINT8> tmp(length);
int i;
int addr;
@@ -948,7 +977,7 @@ void igs017_state::slqz2_decrypt_tiles()
{
int length = memregion("tilemaps")->bytes();
UINT8 *rom = memregion("tilemaps")->base();
- dynamic_buffer tmp(length);
+ std::vector<UINT8> tmp(length);
int i;
memcpy(&tmp[0],rom,length);
@@ -4089,17 +4118,75 @@ ROM_END
/***************************************************************************
-Tarzan
+Taishan (Tarzan) Chuang Tian Guan
+IGS 1999
+
+PCB Layout
+----------
+
+IGS PCB NO-0248-1
+|------------------------------|
+| J A M M A |
+|1 22MHz T2105.U5 A2104.U15 |
+|8 DIP42 |
+|W |
+|A IGS031 U19 |
+|Y 24257 |
+| |
+| IGS025 PAL.U20|
+| DSW1 |
+| Z180 |
+| DSW2 16MHz |
+|1 PAL.U21|
+|0 DSW3 |
+|W BATT |
+|A VOL LM7805 RES_SW|
+|Y UPC1242 M6295 U14 |
+|------------------------------|
+Notes:
+ IGS025 - custom IGS chip labelled 'TARZAN 1'
+ IGS031 - custom IGS chip
+ VSync - 60.0060Hz
+ HSync - 15.3002kHz
+ M6295 - Clock 1.000MHz [16/16], pin 7 high
+ Z180 - Clock 16.000MHz
+ DIP42 - Empty socket
+ U19 - 28F2000 Flash ROM (DIP32)
+ U14 - 23C4000 mask ROM (DIP32)
+ U5 - 23C2048 mask ROM (DIP40)
+ U15 - 23C3210 mask ROM (DIP42)
+ 24257 - 32kx8 SRAM
***************************************************************************/
+// IGS PCB NO-0248-1
+ROM_START( tarzanc )
+ ROM_REGION( 0x40000, "maincpu", 0 ) // V109C TARZAN C (same as tarzan set)
+ ROM_LOAD( "u19", 0x00000, 0x40000, CRC(e6c552a5) SHA1(f156de9459833474c85a1f5b35917881b390d34c) )
+
+ ROM_REGION( 0x400000, "sprites", 0 )
+ ROM_LOAD( "igs_a2104_cg_v110.u15", 0x00000, 0x400000, CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // FIXED BITS (xxxxxxx0xxxxxxxx)
+
+ ROM_REGION( 0x80000, "tilemaps", 0 )
+ ROM_LOAD( "igs_t2105_cg_v110.u5", 0x00000, 0x80000, CRC(1d4be260) SHA1(6374c61735144b3ff54d5e490f26adac4a10b14d) ) // 27C4096 (27C2048 printed on the PCB)
+
+ ROM_REGION( 0x80000, "oki", 0 )
+ ROM_LOAD( "igs_s2102_sp_v102.u14", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) )
+
+ ROM_REGION( 0x2dd * 2, "plds", 0 )
+ ROM_LOAD( "eg.u20", 0x000, 0x2dd, NO_DUMP )
+ ROM_LOAD( "eg.u21", 0x2dd, 0x2dd, NO_DUMP )
+ROM_END
+
+// sets below are guesswork, assembled from partial dumps...
+
// IGS NO-0248-1? Mislabeled?
ROM_START( tarzan )
- ROM_REGION( 0x40000, "maincpu", 0 ) // V109C TARZAN C
+ ROM_REGION( 0x40000, "maincpu", 0 ) // V109C TARZAN C (same as tarzanc set)
ROM_LOAD( "0228-u16.bin", 0x00000, 0x40000, CRC(e6c552a5) SHA1(f156de9459833474c85a1f5b35917881b390d34c) )
ROM_REGION( 0x80000, "sprites", 0 )
- ROM_LOAD( "a2104_cg_v110.u15", 0x00000, 0x80000, NO_DUMP )
+ ROM_LOAD( "sprites.u15", 0x00000, 0x80000, NO_DUMP )
ROM_REGION( 0x80000, "tilemaps", 0 )
ROM_LOAD( "0228-u6.bin", 0x00000, 0x80000, CRC(55e94832) SHA1(b15409f4f1264b6d1218d5dc51c5bd1de2e40284) )
@@ -4108,20 +4195,20 @@ ROM_START( tarzan )
ROM_LOAD( "sound.u14", 0x00000, 0x40000, NO_DUMP )
ROM_REGION( 0x2dd * 2, "plds", 0 )
- ROM_LOAD( "eg.u20", 0x000, 0x2dd, NO_DUMP )
- ROM_LOAD( "eg.u21", 0x2dd, 0x2dd, NO_DUMP )
+ ROM_LOAD( "pal1", 0x000, 0x2dd, NO_DUMP )
+ ROM_LOAD( "pal2", 0x2dd, 0x2dd, NO_DUMP )
ROM_END
// IGS NO-0228?
ROM_START( tarzana )
ROM_REGION( 0x80000, "maincpu", 0 ) // V107 TAISAN
- ROM_LOAD( "0228-u21.bin", 0x00000, 0x80000, CRC(80aaece4) SHA1(07cad92492c5de36c3915867ed4c6544b1a30c07) )
+ ROM_LOAD( "0228-u21.bin", 0x00000, 0x80000, CRC(80aaece4) SHA1(07cad92492c5de36c3915867ed4c6544b1a30c07) ) // 1ST AND 2ND HALF IDENTICAL
ROM_REGION( 0x80000, "sprites", 0 )
ROM_LOAD( "sprites.u17", 0x00000, 0x80000, NO_DUMP )
ROM_REGION( 0x80000, "tilemaps", 0 )
- ROM_LOAD( "text.u6", 0x00000, 0x80000, NO_DUMP )
+ ROM_LOAD( "0228-u6.bin", 0x00000, 0x80000, CRC(55e94832) SHA1(b15409f4f1264b6d1218d5dc51c5bd1de2e40284) )
ROM_REGION( 0x40000, "oki", ROMREGION_ERASE )
ROM_LOAD( "sound.u16", 0x00000, 0x40000, NO_DUMP )
@@ -4232,19 +4319,20 @@ ROM_START( spkrform )
ROM_END
-GAME( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, iqblocka, ROT0, "IGS", "Shu Zi Le Yuan (V127M)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 1996, iqblockf, iqblock, iqblocka, iqblocka, igs017_state, iqblockf, ROT0, "IGS", "Shu Zi Le Yuan (V113FR)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 1997, mgdh, 0, mgdha, mgdh, igs017_state, mgdh, ROT0, "IGS", "Mahjong Man Guan Da Heng (Taiwan, V125T1)", 0 )
-GAME( 1997, mgdha, mgdh, mgdha, mgdh , igs017_state, mgdha, ROT0, "IGS", "Mahjong Man Guan Da Heng (Taiwan, V123T1)", 0 )
-GAME( 1997, sdmg2, 0, sdmg2, sdmg2, igs017_state, sdmg2, ROT0, "IGS", "Mahjong Super Da Man Guan II (China, V754C)", 0 )
-GAME( 1997, tjsb, 0, tjsb, tjsb, igs017_state, tjsb, ROT0, "IGS", "Mahjong Tian Jiang Shen Bing (V137C)", MACHINE_UNEMULATED_PROTECTION )
-GAME( 1998, mgcs, 0, mgcs, mgcs, igs017_state, mgcs, ROT0, "IGS", "Mahjong Man Guan Cai Shen (V103CS)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND )
-GAME( 1998, lhzb2, 0, lhzb2, lhzb2, igs017_state, lhzb2, ROT0, "IGS", "Mahjong Long Hu Zheng Ba 2 (set 1)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 1998, lhzb2a, lhzb2, lhzb2a, lhzb2a, igs017_state, lhzb2a, ROT0, "IGS", "Mahjong Long Hu Zheng Ba 2 (VS221M)", 0 )
-GAME( 1998, slqz2, 0, slqz2, slqz2, igs017_state, slqz2, ROT0, "IGS", "Mahjong Shuang Long Qiang Zhu 2 (VS203J)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 1999?, tarzan, 0, iqblocka, iqblocka, igs017_state, tarzan, ROT0, "IGS", "Tarzan (V109C)", MACHINE_NOT_WORKING )
-GAME( 1999?, tarzana, tarzan, iqblocka, iqblocka, igs017_state, tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING )
-GAME( 2000?, starzan, 0, starzan, iqblocka, igs017_state, starzan, ROT0, "IGS / G.F. Gioca", "Super Tarzan (Italy, V100I)", MACHINE_NOT_WORKING )
+GAME( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, iqblocka, ROT0, "IGS", "Shu Zi Le Yuan (V127M)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1996, iqblockf, iqblock, iqblocka, iqblocka, igs017_state, iqblockf, ROT0, "IGS", "Shu Zi Le Yuan (V113FR)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1997, mgdh, 0, mgdha, mgdh, igs017_state, mgdh, ROT0, "IGS", "Mahjong Man Guan Da Heng (Taiwan, V125T1)", 0 )
+GAME( 1997, mgdha, mgdh, mgdha, mgdh , igs017_state, mgdha, ROT0, "IGS", "Mahjong Man Guan Da Heng (Taiwan, V123T1)", 0 )
+GAME( 1997, sdmg2, 0, sdmg2, sdmg2, igs017_state, sdmg2, ROT0, "IGS", "Mahjong Super Da Man Guan II (China, V754C)", 0 )
+GAME( 1997, tjsb, 0, tjsb, tjsb, igs017_state, tjsb, ROT0, "IGS", "Mahjong Tian Jiang Shen Bing (V137C)", MACHINE_UNEMULATED_PROTECTION )
+GAME( 1998, mgcs, 0, mgcs, mgcs, igs017_state, mgcs, ROT0, "IGS", "Mahjong Man Guan Cai Shen (V103CS)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND )
+GAME( 1998, lhzb2, 0, lhzb2, lhzb2, igs017_state, lhzb2, ROT0, "IGS", "Mahjong Long Hu Zheng Ba 2 (set 1)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1998, lhzb2a, lhzb2, lhzb2a, lhzb2a, igs017_state, lhzb2a, ROT0, "IGS", "Mahjong Long Hu Zheng Ba 2 (VS221M)", 0 )
+GAME( 1998, slqz2, 0, slqz2, slqz2, igs017_state, slqz2, ROT0, "IGS", "Mahjong Shuang Long Qiang Zhu 2 (VS203J)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1999, tarzanc, 0, iqblocka, iqblocka, igs017_state, tarzan, ROT0, "IGS", "Tarzan Chuang Tian Guan (V109C, set 1)", MACHINE_NOT_WORKING )
+GAME( 1999, tarzan, tarzanc, iqblocka, iqblocka, igs017_state, tarzan, ROT0, "IGS", "Tarzan Chuang Tian Guan (V109C, set 2)", MACHINE_NOT_WORKING )
+GAME( 1999, tarzana, tarzanc, iqblocka, iqblocka, igs017_state, tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING )
+GAME( 2000?, starzan, 0, starzan, iqblocka, igs017_state, starzan, ROT0, "IGS (G.F. Gioca license)", "Super Tarzan (Italy, V100I)", MACHINE_NOT_WORKING )
/* Parent spk306us in driver spoker.cpp. Move this set to that driver? */
GAME( ????, spkrform, spk306us, spkrform, spkrform, igs017_state, spkrform, ROT0, "IGS", "Super Poker (v100xD03) / Formosa", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
diff --git a/src/mame/drivers/igs_m027.cpp b/src/mame/drivers/igs_m027.cpp
index 48d85476b15..3edc07d09fb 100644
--- a/src/mame/drivers/igs_m027.cpp
+++ b/src/mame/drivers/igs_m027.cpp
@@ -208,7 +208,7 @@ void igs_m027_state::sdwx_gfx_decrypt()
int i;
unsigned rom_size = 0x80000;
UINT8 *src = (UINT8 *) (memregion("tilemaps")->base());
- dynamic_buffer result_data(rom_size);
+ std::vector<UINT8> result_data(rom_size);
for (i=0; i<rom_size; i++)
result_data[i] = src[BITSWAP24(i, 23,22,21,20,19,18,17,16,15,14,13,12,11,8,7,6,10,9,5,4,3,2,1,0)];
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 8d976347e73..183088c3b78 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -2476,7 +2476,7 @@ DRIVER_INIT_MEMBER(igspoker_state,number10)
/* Descramble graphic */
rom = memregion("gfx1")->base();
length = memregion("gfx1")->bytes();
- dynamic_buffer tmp(length);
+ std::vector<UINT8> tmp(length);
memcpy(&tmp[0],rom,length);
for (A = 0; A < length; A++)
{
diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp
index 2631d9f66fb..5eadc569c0a 100644
--- a/src/mame/drivers/indy_indigo2.cpp
+++ b/src/mame/drivers/indy_indigo2.cpp
@@ -50,148 +50,214 @@
#include "machine/pit8253.h"
#include "video/newport.h"
#include "sound/dac.h"
-#include "machine/nvram.h"
+#include "sound/volt_reg.h"
#include "bus/scsi/scsi.h"
#include "bus/scsi/scsicd.h"
#include "bus/scsi/scsihd.h"
#include "machine/wd33c93.h"
+#include "machine/ds1386.h"
+#include "machine/z80scc.h"
-struct RTC_t
+#define SCC_TAG "scc"
+#define PI1_TAG "pi1"
+#define KBDC_TAG "kbdc"
+#define PIT_TAG "pit"
+
+#define SCC_CLOCK XTAL_10MHz
+
+#define MCFG_IOC2_GUINNESS_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, SGI_IOC2_GUINNESS, 0)
+
+#define MCFG_IOC2_FULL_HOUSE_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, SGI_IOC2_FULL_HOUSE, 0)
+
+class ioc2_device : public device_t
{
- UINT8 nRegs[0x80];
- UINT8 nUserRAM[0x200];
- UINT8 nRAM[0x800];
+public:
+ ioc2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, UINT8 id);
+
+ DECLARE_WRITE32_MEMBER( write );
+ DECLARE_READ32_MEMBER( read );
+
+ DECLARE_INPUT_CHANGED_MEMBER( power_button );
+ DECLARE_INPUT_CHANGED_MEMBER( volume_down );
+ DECLARE_INPUT_CHANGED_MEMBER( volume_up );
+
+ void lower_local0_irq(UINT8 source_mask);
+ void raise_local0_irq(UINT8 source_mask);
+ void lower_local1_irq(UINT8 source_mask);
+ void raise_local1_irq(UINT8 source_mask);
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ machine_config_constructor device_mconfig_additions() const override;
+ virtual ioport_constructor device_input_ports() const override;
+
+ required_device<mips3_device> m_maincpu;
+ required_device<scc85C30_device> m_scc;
+ required_device<pc_lpt_device> m_pi1; // we assume standard parallel port (SPP) mode
+ // TODO: SGI parallel port (SGIPP), HP BOISE high speed parallel port (HPBPP), and Ricoh scanner modes
+ required_device<kbdc8042_device> m_kbdc;
+ required_device<pit8254_device> m_pit;
+
+ virtual void handle_reset_reg_write(UINT8 data);
+
+ UINT8 m_gen_ctrl_select_reg;
+ UINT8 m_gen_ctrl_reg;
+ UINT8 m_front_panel_reg;
+
+ UINT8 m_read_reg;
+ UINT8 m_dma_sel;
+ UINT8 m_reset_reg;
+ UINT8 m_write_reg;
+
+ UINT8 m_int3_local0_status_reg;
+ UINT8 m_int3_local0_mask_reg;
+ UINT8 m_int3_local1_status_reg;
+ UINT8 m_int3_local1_mask_reg;
+ UINT8 m_int3_map_status_reg;
+ UINT8 m_int3_map_mask0_reg;
+ UINT8 m_int3_map_mask1_reg;
+ UINT8 m_int3_map_pol_reg;
+ UINT8 m_int3_timer_clear_reg;
+ UINT8 m_int3_err_status_reg;
+
+ UINT32 m_par_read_cnt;
+ UINT32 m_par_cntl;
+ UINT8 m_system_id;
};
-struct HPC3_t
+class ioc2_guinness_device : public ioc2_device
{
- UINT32 nenetr_nbdp;
- UINT32 nenetr_cbp;
- UINT32 nunk0;
- UINT32 nunk1;
- UINT32 nIC_Unk0;
- UINT32 nSCSI0Descriptor;
- UINT32 nSCSI0DMACtrl;
+public:
+ ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ioc2_guinness_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+ : ioc2_device(mconfig, type, name, tag, owner, clock, shortname, source, 0x01) { }
};
-struct HAL2_t
+class ioc2_full_house_device : public ioc2_device
{
- UINT32 nIAR;
- UINT32 nIDR[4];
+public:
+ ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ioc2_full_house_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
+ : ioc2_device(mconfig, type, name, tag, owner, clock, shortname, source, 0x20) { }
};
-struct PBUS_DMA_t
+const device_type SGI_IOC2_GUINNESS = &device_creator<ioc2_guinness_device>;
+const device_type SGI_IOC2_FULL_HOUSE = &device_creator<ioc2_full_house_device>;
+
+ioc2_guinness_device::ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : ioc2_guinness_device(mconfig, SGI_IOC2_GUINNESS, "SGI IOC2 (Guinness)", tag, owner, clock, "ioc2g", __FILE__)
{
- UINT8 nActive;
- UINT32 nCurPtr;
- UINT32 nDescPtr;
- UINT32 nNextPtr;
- UINT32 nWordsLeft;
-};
+}
-class ip22_state : public driver_device
+ioc2_full_house_device::ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : ioc2_full_house_device(mconfig, SGI_IOC2_FULL_HOUSE, "SGI IOC2 (Full House)", tag, owner, clock, "ioc2f", __FILE__)
{
-public:
- enum
- {
- TIMER_IP22_DMA,
- TIMER_IP22_MSEC
- };
+}
- ip22_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_wd33c93(*this, "wd33c93"),
- m_unkpbus0(*this, "unkpbus0"),
- m_mainram(*this, "mainram"),
- m_lpt0(*this, "lpt_0"),
- m_pit(*this, "pit8254"),
- m_sgi_mc(*this, "sgi_mc"),
- m_newport(*this, "newport"),
- m_dac(*this, "dac"),
- m_kbdc8042(*this, "kbdc")
- {
- }
+static INPUT_PORTS_START( front_panel )
+ PORT_START("panel_buttons")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Power") PORT_CHANGED_MEMBER(DEVICE_SELF, ioc2_device, power_button, 0)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Volume Down") PORT_CHANGED_MEMBER(DEVICE_SELF, ioc2_device, volume_down, 0)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Volume Up") PORT_CHANGED_MEMBER(DEVICE_SELF, ioc2_device, volume_up, 0)
+INPUT_PORTS_END
- required_device<mips3_device> m_maincpu;
- required_device<wd33c93_device> m_wd33c93;
- required_shared_ptr<UINT32> m_unkpbus0;
- required_shared_ptr<UINT32> m_mainram;
- required_device<pc_lpt_device> m_lpt0;
- required_device<pit8254_device> m_pit;
- required_device<sgi_mc_device> m_sgi_mc;
- required_device<newport_video_device> m_newport;
- required_device<dac_device> m_dac;
- required_device<kbdc8042_device> m_kbdc8042;
-
- RTC_t m_RTC;
- UINT32 m_int3_regs[64];
- UINT32 m_nIOC_ParReadCnt;
- /*UINT8 m_nIOC_ParCntl;*/
- HPC3_t m_HPC3;
- HAL2_t m_HAL2;
- PBUS_DMA_t m_PBUS_DMA;
- UINT32 m_nIntCounter;
- UINT8 m_dma_buffer[4096];
- DECLARE_READ32_MEMBER(hpc3_pbus6_r);
- DECLARE_WRITE32_MEMBER(hpc3_pbus6_w);
- DECLARE_READ32_MEMBER(hpc3_hd_enet_r);
- DECLARE_WRITE32_MEMBER(hpc3_hd_enet_w);
- DECLARE_READ32_MEMBER(hpc3_hd0_r);
- DECLARE_WRITE32_MEMBER(hpc3_hd0_w);
- DECLARE_READ32_MEMBER(hpc3_pbus4_r);
- DECLARE_WRITE32_MEMBER(hpc3_pbus4_w);
- DECLARE_READ32_MEMBER(rtc_r);
- DECLARE_WRITE32_MEMBER(rtc_w);
- DECLARE_WRITE32_MEMBER(ip22_write_ram);
- DECLARE_READ32_MEMBER(hal2_r);
- DECLARE_WRITE32_MEMBER(hal2_w);
- DECLARE_READ32_MEMBER(hpc3_pbusdma_r);
- DECLARE_WRITE32_MEMBER(hpc3_pbusdma_w);
- DECLARE_READ32_MEMBER(hpc3_unkpbus0_r);
- DECLARE_WRITE32_MEMBER(hpc3_unkpbus0_w);
- DECLARE_WRITE_LINE_MEMBER(scsi_irq);
- DECLARE_DRIVER_INIT(ip225015);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- INTERRUPT_GEN_MEMBER(ip22_vbl);
- TIMER_CALLBACK_MEMBER(ip22_dma);
- TIMER_CALLBACK_MEMBER(ip22_timer);
- inline void ATTR_PRINTF(3,4) verboselog(int n_level, const char *s_fmt, ... );
- void int3_raise_local0_irq(UINT8 source_mask);
- void int3_lower_local0_irq(UINT8 source_mask);
- void dump_chain(address_space &space, UINT32 ch_base);
- void rtc_update();
+ioport_constructor ioc2_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(front_panel);
+}
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-};
+MACHINE_CONFIG_FRAGMENT( ioc2_device )
+ MCFG_SCC85C30_ADD(SCC_TAG, SCC_CLOCK, 0, 0, 0, 0)
+ MCFG_DEVICE_ADD(PI1_TAG, PC_LPT, 0)
-#define VERBOSE_LEVEL ( 0 )
+ MCFG_DEVICE_ADD(KBDC_TAG, KBDC8042, 0)
+ MCFG_KBDC8042_KEYBOARD_TYPE(KBDC8042_STANDARD)
+ MCFG_KBDC8042_SYSTEM_RESET_CB(INPUTLINE("^maincpu", INPUT_LINE_RESET))
+
+ MCFG_DEVICE_ADD(PIT_TAG, PIT8254, 0)
+ MCFG_PIT8253_CLK0(1000000)
+ MCFG_PIT8253_CLK1(1000000)
+ MCFG_PIT8253_CLK2(1000000)
+ MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE(KBDC_TAG, kbdc8042_device, write_out2))
+MACHINE_CONFIG_END
+machine_config_constructor ioc2_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(ioc2_device);
+}
-inline void ATTR_PRINTF(3,4) ip22_state::verboselog(int n_level, const char *s_fmt, ... )
+ioc2_device::ioc2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, UINT8 id)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ , m_maincpu(*this, "^maincpu")
+ , m_scc(*this, SCC_TAG)
+ , m_pi1(*this, PI1_TAG)
+ , m_kbdc(*this, KBDC_TAG)
+ , m_pit(*this, PIT_TAG)
+ , m_gen_ctrl_select_reg(0)
+ , m_gen_ctrl_reg(0)
+ , m_front_panel_reg(0)
+ , m_read_reg(0)
+ , m_dma_sel(0)
+ , m_reset_reg(0)
+ , m_write_reg(0)
+ , m_int3_local0_status_reg(0)
+ , m_int3_local0_mask_reg(0)
+ , m_int3_local1_status_reg(0)
+ , m_int3_local1_mask_reg(0)
+ , m_int3_map_status_reg(0)
+ , m_int3_map_mask0_reg(0)
+ , m_int3_map_mask1_reg(0)
+ , m_int3_map_pol_reg(0)
+ , m_int3_timer_clear_reg(0)
+ , m_int3_err_status_reg(0)
+ , m_par_read_cnt(0)
+ , m_par_cntl(0)
+ , m_system_id(id)
{
- if( VERBOSE_LEVEL >= n_level )
- {
- va_list v;
- char buf[ 32768 ];
- va_start( v, s_fmt );
- vsprintf( buf, s_fmt, v );
- va_end( v );
- logerror("%08x: %s", m_maincpu->pc(), buf);
- }
}
+#define FRONT_PANEL_POWER_STATE (0x01)
+#define FRONT_PANEL_POWER_BUTTON_INT (0x02)
+#define FRONT_PANEL_VOL_DOWN_INT (0x10)
+#define FRONT_PANEL_VOL_DOWN_HOLD (0x20)
+#define FRONT_PANEL_VOL_UP_INT (0x40)
+#define FRONT_PANEL_VOL_UP_HOLD (0x80)
-#define RTC_DAY m_RTC.nRAM[0x09]
-#define RTC_HOUR m_RTC.nRAM[0x08]
-#define RTC_MINUTE m_RTC.nRAM[0x07]
-#define RTC_SECOND m_RTC.nRAM[0x06]
-#define RTC_HUNDREDTH m_RTC.nRAM[0x05]
+void ioc2_device::device_start()
+{
+ m_front_panel_reg = FRONT_PANEL_POWER_STATE;
+}
+
+void ioc2_device::device_reset()
+{
+ m_par_read_cnt = 0;
+ m_par_cntl = 0;
+
+ m_gen_ctrl_select_reg = 0;
+ m_gen_ctrl_reg = 0;
+ m_front_panel_reg = FRONT_PANEL_POWER_STATE;
+
+ m_read_reg = 0;
+ m_dma_sel = 0;
+ m_reset_reg = 0;
+ m_write_reg = 0;
+
+ m_int3_local0_status_reg = 0;
+ m_int3_local0_mask_reg = 0;
+ m_int3_local1_status_reg = 0;
+ m_int3_local1_mask_reg = 0;
+ m_int3_map_status_reg = 0;
+ m_int3_map_mask0_reg = 0;
+ m_int3_map_mask1_reg = 0;
+ m_int3_map_pol_reg = 0;
+ m_int3_timer_clear_reg = 0;
+ m_int3_err_status_reg = 0;
+}
-// interrupt sources handled by INT3
#define INT3_LOCAL0_FIFO (0x01)
#define INT3_LOCAL0_SCSI0 (0x02)
#define INT3_LOCAL0_SCSI1 (0x04)
@@ -210,224 +276,424 @@ inline void ATTR_PRINTF(3,4) ip22_state::verboselog(int n_level, const char *s_f
#define INT3_LOCAL1_VSYNC (0x40)
#define INT3_LOCAL1_RETRACE (0x80)
-// raise a local0 interrupt
-void ip22_state::int3_raise_local0_irq(UINT8 source_mask)
+void ioc2_device::raise_local0_irq(UINT8 source_mask)
{
- // signal the interrupt is pending
- m_int3_regs[0] |= source_mask;
-
- // if it's not masked, also assert it now at the CPU
- if (m_int3_regs[1] & source_mask)
- m_maincpu->set_input_line(MIPS3_IRQ0, ASSERT_LINE);
+ m_int3_local0_status_reg |= source_mask;
+ m_maincpu->set_input_line(MIPS3_IRQ0, (m_int3_local0_mask_reg & m_int3_local0_status_reg) != 0 ? ASSERT_LINE : CLEAR_LINE);
}
-// lower a local0 interrupt
-void ip22_state::int3_lower_local0_irq(UINT8 source_mask)
+void ioc2_device::lower_local0_irq(UINT8 source_mask)
{
- m_int3_regs[0] &= ~source_mask;
+ m_int3_local0_status_reg &= ~source_mask;
}
-#ifdef UNUSED_FUNCTION
-// raise a local1 interrupt
-void ip22_state::int3_raise_local1_irq(UINT8 source_mask)
+void ioc2_device::raise_local1_irq(UINT8 source_mask)
{
- // signal the interrupt is pending
- m_int3_regs[2] |= source_mask;
-
- // if it's not masked, also assert it now at the CPU
- if (m_int3_regs[2] & source_mask)
- m_maincpu->set_input_line(MIPS3_IRQ1, ASSERT_LINE);
+ m_int3_local1_status_reg |= source_mask;
+ m_maincpu->set_input_line(MIPS3_IRQ1, (m_int3_local1_mask_reg & m_int3_local1_status_reg) != 0 ? ASSERT_LINE : CLEAR_LINE);
}
-// lower a local1 interrupt
-void ip22_state::int3_lower_local1_irq(UINT8 source_mask)
+void ioc2_device::lower_local1_irq(UINT8 source_mask)
{
- m_int3_regs[2] &= ~source_mask;
+ m_int3_local1_status_reg &= ~source_mask;
}
-#endif
-READ32_MEMBER(ip22_state::hpc3_pbus6_r)
+READ32_MEMBER( ioc2_device::read )
{
- UINT8 ret8;
- switch( offset )
+ switch (offset)
{
- case 0x004/4:
- ret8 = m_lpt0->control_r(space, 0) ^ 0x0d;
- //verboselog(0, "Parallel Control Read: %02x\n", ret8 );
- return ret8;
- case 0x008/4:
- ret8 = m_lpt0->status_r(space, 0) ^ 0x80;
- //verboselog(0, "Parallel Status Read: %02x\n", ret8 );
- return ret8;
- case 0x030/4:
- //verboselog(2, "Serial 1 Command Transfer Read, 0x1fbd9830: %02x\n", 0x04 );
- switch(space.device().safe_pc())
- {
- case 0x9fc1d9e4: // interpreter (ip244415)
- case 0x9fc1d9e0: // DRC (ip244415)
- case 0x9fc1f8e0: // interpreter (ip224613)
- case 0x9fc1f8dc: // DRC (ip224613)
- case 0x9fc204c8: // interpreter (ip225015)
- case 0x9fc204c4: // DRC (ip225015)
- return 0x00000005;
- }
- return 0x00000004;
- case 0x038/4:
- //verboselog(2, "Serial 2 Command Transfer Read, 0x1fbd9838: %02x\n", 0x04 );
- return 0x00000004;
- case 0x40/4:
- return m_kbdc8042->data_r(space, 0);
- case 0x44/4:
- return m_kbdc8042->data_r(space, 4);
- case 0x58/4:
- return 0x20; // chip rev 1, board rev 0, "Guinness" (Indy) => 0x01 for "Full House" (Indigo2)
- case 0x80/4:
- case 0x84/4:
- case 0x88/4:
- case 0x8c/4:
- case 0x90/4:
- case 0x94/4:
- case 0x98/4:
- case 0x9c/4:
- case 0xa0/4:
- case 0xa4/4:
- case 0xa8/4:
- case 0xac/4:
-// osd_printf_info("INT3: r @ %x mask %08x (PC=%x)\n", offset*4, mem_mask, activecpu_get_pc());
- return m_int3_regs[offset-0x80/4];
- case 0xb0/4:
- ret8 = m_pit->read(space, 0);
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 0 Register Read: 0x%02x (%08x)\n", ret8, mem_mask );
- return ret8;
- case 0xb4/4:
- ret8 = m_pit->read(space, 1);
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 1 Register Read: 0x%02x (%08x)\n", ret8, mem_mask );
- return ret8;
- case 0xb8/4:
- ret8 = m_pit->read(space, 2);
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 2 Register Read: 0x%02x (%08x)\n", ret8, mem_mask );
- return ret8;
- case 0xbc/4:
- ret8 = m_pit->read(space, 3);
- //verboselog(0, "HPC PBUS6 IOC4 Timer Control Word Register Read: 0x%02x (%08x)\n", ret8, mem_mask );
- return ret8;
- default:
- //verboselog(0, "Unknown HPC PBUS6 Read: 0x%08x (%08x)\n", 0x1fbd9800 + ( offset << 2 ), mem_mask );
- return 0;
+ case 0x00/4: case 0x04/4: case 0x08/4:
+ return m_pi1->read(space, offset, 0xff);
+
+ case 0x0c/4: // Parallel Port DMA Control Register [docs?]
+ case 0x10/4: // Parallel Port Interrupt Status Register [docs?]
+ case 0x14/4: // Parallel Port Interrupt Mask Register [docs?]
+ case 0x18/4: // Parallel Port Timer 1 Register [docs?]
+ case 0x1c/4: // Parallel Port Timer 2 Register [docs?]
+ case 0x20/4: // Parallel Port Timer 3 Register [docs?]
+ case 0x24/4: // Parallel Port Timer 4 Register [docs?]
+ return 0;
+
+ case 0x30/4: // Serial Port1 Command Transfer
+ case 0x34/4: // Serial Port1 Data Transfer
+ case 0x38/4: // Serial Port2 Command Transfer
+ case 0x3c/4: // Serial Port2 Data Transfer
+ return m_scc->ba_cd_r(space, (offset - 0x30/4) ^ 1);
+
+ case 0x40/4: // Keyboard/Mouse Registers
+ case 0x44/4: // Keyboard/Mouse Registers
+ return m_kbdc->data_r(space, (offset - 0x40/4) * 4);
+
+ case 0x50/4: // Front Panel Register
+ return m_front_panel_reg;
+
+ case 0x58/4: // System ID Register
+ return m_system_id;
+
+ case 0x60/4: // Read Register
+ return m_read_reg;
+
+ case 0x68/4: // DMA_SEL Register
+ // Bits 2-0 not quite understood, seem to be copy/paste error in SGI's own documents:
+ //
+ // 2 RW Parallel Port DMA Select. A high bit selects the Parallel Port DMA channel. 0\h is the default after reset. [this makes sense. -ed.]
+ // 1 RW ISDN Channel B DMA Select. A high bit selects the Parallel Port DMA channel. 0\h is the default after reset. [is this a copy/paste error? perhaps "Parallel Port" should be "ISDN Channel B"?]
+ // 0 RW [same text as above. Another copy/paste error, maybe? Should be channel A, with the bit selecting DMA channel 0/1 for ISDN channel A, the and the same for ISDN channel B in bit 1?]
+ return m_dma_sel;
+
+ case 0x70/4: // Reset Register
+ return m_reset_reg;
+
+ case 0x78/4: // Write Register
+ // Not yet implemented, some bits unnecessary:
+ //
+ // Bit Oper Description
+ // 7 RW Margin High. Set low for normal +5V operation, high to step supply up to +5.5V. Cleared at reset.
+ // 6 RW Margin Low. Set lowf or normal +5V operation, high to step supply down to +4.5V. Cleared at reset.
+ // 5 RW UART1 PC Mode. Set low to configure Port1 for RS422 Mac mode, high to select RS232 PC mode. Cleared at reset.
+ // 4 RW UART2 PC Mode. Set low to configure Port2 for RS422 Mac mode, high to select RS232 PC mode. Cleared at reset.
+ // 3 RW Ethernet Auto Select (active high). Set low for manual mode, high to have LXT901 automatically select TP or AUI based on link integrity. Cleared at reset.
+ // 2 RW Ethernet Port Select. Set low for TP, high for AUI. This setting is only used when Auto Select is in manual mode. Cleared at reset.
+ // 1 RW Ethernet UTP/STP select. Set low to select 150 ohm termination fro shielded TP (default), set high to select 100 ohm termination for unshielded TP. Cleared at reset.
+ // 0 RW Ethernet Normal Threshold (NTH) select. Set low to select the normal TP squelch threshold (default), high to reduce threshold by 4.5 dB (set low when reset).
+ return m_write_reg;
+
+ case 0x80/4: // INT3 Local0 Status Register
+ return m_int3_local0_status_reg;
+
+ case 0x84/4: // INT3 Local0 Mask Register
+ return m_int3_local0_mask_reg;
+
+ case 0x88/4: // INT3 Local1 Status Register
+ return m_int3_local1_status_reg;
+
+ case 0x8c/4: // INT3 Local1 Mask Register
+ return m_int3_local1_mask_reg;
+
+ case 0x90/4: // INT3 Map Status Register [TODO]
+ return m_int3_map_status_reg;
+
+ case 0x94/4: // INT3 Map Mask0 Register [TODO]
+ return m_int3_map_mask0_reg;
+
+ case 0x98/4: // INT3 Map Mask1 Register [TODO]
+ return m_int3_map_mask1_reg;
+
+ case 0x9c/4: // INT3 Map Pol Register [TODO]
+ return m_int3_map_pol_reg;
+
+ case 0xa0/4: // INT3 Timer Clear Register [TODO]
+ return m_int3_timer_clear_reg;
+
+ case 0xa4/4: // INT3 Error Status Register [TODO]
+ return m_int3_err_status_reg;
+
+ case 0xb0/4: // Timer Counter 0 Register
+ case 0xb4/4: // Timer Counter 1 Register
+ case 0xb8/4: // Timer Counter 2 Register
+ case 0xbc/4: // Timer Control Word Register
+ return m_pit->read(space, offset - 0xb0/4);
}
+
+ return 0;
}
-WRITE32_MEMBER(ip22_state::hpc3_pbus6_w)
-{
- char cChar;
+#define DMA_SEL_CLOCK_SEL_MASK (0x30)
+#define DMA_SEL_CLOCK_SEL_10MHz (0x00)
+#define DMA_SEL_CLOCK_SEL_6_67MHz (0x10)
+#define DMA_SEL_CLOCK_SEL_EXT (0x20)
- switch( offset )
+WRITE32_MEMBER( ioc2_device::write )
+{
+ switch (offset)
{
- case 0x004/4:
- //verboselog(0, "Parallel Control Write: %08x\n", data );
- m_lpt0->control_w(space, 0, data ^ 0x0d);
- //m_nIOC_ParCntl = data;
- break;
- case 0x030/4:
- if( ( data & 0x000000ff ) >= 0x20 )
- {
- //verboselog(2, "Serial 1 Command Transfer Write: %02x: %c\n", data & 0x000000ff, data & 0x000000ff );
- }
- else
+ case 0x00/4: case 0x04/4: case 0x08/4:
+ m_pi1->write(space, offset, data & 0xff, 0xff);
+ return;
+
+ case 0x0c/4: // Parallel Port DMA Control Register [docs?]
+ case 0x10/4: // Parallel Port Interrupt Status Register [docs?]
+ case 0x14/4: // Parallel Port Interrupt Mask Register [docs?]
+ case 0x18/4: // Parallel Port Timer 1 Register [docs?]
+ case 0x1c/4: // Parallel Port Timer 2 Register [docs?]
+ case 0x20/4: // Parallel Port Timer 3 Register [docs?]
+ case 0x24/4: // Parallel Port Timer 4 Register [docs?]
+ return;
+
+ case 0x30/4: // Serial Port1 Command Transfer
+ case 0x34/4: // Serial Port1 Data Transfer
+ case 0x38/4: // Serial Port2 Command Transfer
+ case 0x3c/4: // Serial Port2 Data Transfer
+ m_scc->ba_cd_w(space, (offset - 0x30/4) ^ 1, data & 0xff);
+ return;
+
+ case 0x40/4: // Keyboard/Mouse Registers
+ case 0x44/4: // Keyboard/Mouse Registers
+ m_kbdc->data_w(space, (offset - 0x40/4) * 4, data & 0xff);
+ return;
+
+ case 0x50/4: // Front Panel Register
+ m_front_panel_reg &= ~(data & (FRONT_PANEL_VOL_UP_INT | FRONT_PANEL_VOL_DOWN_INT | FRONT_PANEL_POWER_BUTTON_INT));
+ return;
+
+ case 0x68/4: // DMA_SEL Register
{
- //verboselog(2, "Serial 1 Command Transfer Write: %02x\n", data & 0x000000ff );
- }
- cChar = data & 0x000000ff;
- if( cChar >= 0x20 || cChar == 0x0d || cChar == 0x0a )
- {
-// osd_printf_info( "%c", cChar );
- }
- break;
- case 0x034/4:
- if( ( data & 0x000000ff ) >= 0x20 )
- {
- //verboselog(2, "Serial 1 Data Transfer Write: %02x: %c\n", data & 0x000000ff, data & 0x000000ff );
+ // Bits 2-0 not quite understood, seem to be copy/paste error in SGI's own documents:
+ //
+ // 5:4 RW Serial Port Clock Select: 00 selects a 10MHz internal clock (default), 01 selects a 6.67MHz internal clock, and 02 or 03 selects the external clock input.
+ // 2 RW Parallel Port DMA Select. A high bit selects the Parallel Port DMA channel. 0\h is the default after reset. [this makes sense. -ed.]
+ // 1 RW ISDN Channel B DMA Select. A high bit selects the Parallel Port DMA channel. 0\h is the default after reset. [is this a copy/paste error? perhaps "Parallel Port" should be "ISDN Channel B"?]
+ // 0 RW [same text as above. Another copy/paste error, maybe? Should be channel A, with the bit selecting DMA channel 0/1 for ISDN channel A, the and the same for ISDN channel B in bit 1?]
+ UINT8 old = m_dma_sel;
+ m_dma_sel = data;
+ UINT8 diff = old ^ m_dma_sel;
+ if (diff & DMA_SEL_CLOCK_SEL_MASK)
+ {
+ if (diff & DMA_SEL_CLOCK_SEL_EXT)
+ {
+ printf("External clock select %sselected\n", (old & DMA_SEL_CLOCK_SEL_EXT) != 0 ? "de" : "");
+ }
+ }
+ // TODO: Currently we always assume a 10MHz clock
+ return;
}
- else
+
+ case 0x70/4: // Reset Register
+ handle_reset_reg_write(data);
+ return;
+
+ case 0x78/4: // Write Register
+ m_write_reg = data;
+ return;
+
+ case 0x80/4: // INT3 Local0 Status Register
+ case 0x88/4: // INT3 Local1 Status Register
+ case 0x90/4: // INT3 Map Status Register
+ case 0xa4/4: // INT3 Error Stat Register
+ // Read-only registers
+ return;
+
+ case 0x84/4: // INT3 Local0 Mask Register
{
- //verboselog(2, "Serial 1 Data Transfer Write: %02x\n", data & 0x000000ff );
+ UINT8 old = m_int3_local0_mask_reg;
+ m_int3_local0_mask_reg = data;
+ bool old_line = (old & m_int3_local0_status_reg) != 0;
+ bool new_line = (m_int3_local0_mask_reg & m_int3_local0_status_reg) != 0;
+ if (old_line != new_line)
+ m_maincpu->set_input_line(MIPS3_IRQ0, (m_int3_local0_mask_reg & m_int3_local0_status_reg) != 0 ? ASSERT_LINE : CLEAR_LINE);
+ return;
}
- cChar = data & 0x000000ff;
- if( cChar >= 0x20 || cChar == 0x0d || cChar == 0x0a )
+
+ case 0x8c/4: // INT3 Local1 Mask Register
{
-// osd_printf_info( "%c", cChar );
+ UINT8 old = m_int3_local0_mask_reg;
+ m_int3_local0_mask_reg = data;
+ bool old_line = (old & m_int3_local0_status_reg) != 0;
+ bool new_line = (m_int3_local0_mask_reg & m_int3_local0_status_reg) != 0;
+ if (old_line != new_line)
+ m_maincpu->set_input_line(MIPS3_IRQ0, (m_int3_local0_mask_reg & m_int3_local0_status_reg) != 0 ? ASSERT_LINE : CLEAR_LINE);
+ return;
}
- break;
- case 0x40/4:
- m_kbdc8042->data_w(space, 0, data);
- break;
- case 0x44/4:
- m_kbdc8042->data_w(space, 4, data);
- break;
- case 0x80/4:
- case 0x84/4:
- case 0x88/4:
- case 0x8c/4:
- case 0x90/4:
- case 0x94/4:
- case 0x98/4:
- case 0x9c/4:
- case 0xa0/4:
- case 0xa4/4:
-// osd_printf_info("INT3: w %x to %x (reg %d) mask %08x (PC=%x)\n", data, offset*4, offset-0x80/4, mem_mask, activecpu_get_pc());
- m_int3_regs[offset-0x80/4] = data;
-
- // if no local0 interrupts now, clear the input to the CPU
- if ((m_int3_regs[0] & m_int3_regs[1]) == 0)
- m_maincpu->set_input_line(MIPS3_IRQ0, CLEAR_LINE);
- else
- m_maincpu->set_input_line(MIPS3_IRQ0, ASSERT_LINE);
- // if no local1 interrupts now, clear the input to the CPU
- if ((m_int3_regs[2] & m_int3_regs[3]) == 0)
- m_maincpu->set_input_line(MIPS3_IRQ1, CLEAR_LINE);
- else
- m_maincpu->set_input_line(MIPS3_IRQ1, ASSERT_LINE);
+ case 0x94/4: // INT3 Map Mask0 Register
+ // TODO: Implement mappable interrupts
+ m_int3_map_mask0_reg = data;
+ return;
+
+ case 0x98/4: // INT3 Map Mask1 Register
+ // TODO: Implement mappable interrupts
+ m_int3_map_mask1_reg = data;
+ return;
+
+ case 0x9c/4: // INT3 Map Pol Register
+ // TODO: Mappable interrupt polarity select
+ m_int3_map_pol_reg = data;
+ return;
+
+ case 0xb0/4: // Timer Counter 0 Register
+ case 0xb4/4: // Timer Counter 1 Register
+ case 0xb8/4: // Timer Counter 2 Register
+ case 0xbc/4: // Timer Control Word Register
+ m_pit->write(space, offset - 0xb0/4, data & 0xff);
+ return;
+ }
+}
- break;
- case 0xb0/4:
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 0 Register Write: 0x%08x (%08x)\n", data, mem_mask );
- m_pit->write(space, 0, data & 0x000000ff);
- return;
- case 0xb4/4:
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 1 Register Write: 0x%08x (%08x)\n", data, mem_mask );
- m_pit->write(space, 1, data & 0x000000ff);
- return;
- case 0xb8/4:
- //verboselog(0, "HPC PBUS6 IOC4 Timer Counter 2 Register Write: 0x%08x (%08x)\n", data, mem_mask );
- m_pit->write(space, 2, data & 0x000000ff);
- return;
- case 0xbc/4:
- //verboselog(0, "HPC PBUS6 IOC4 Timer Control Word Register Write: 0x%08x (%08x)\n", data, mem_mask );
- m_pit->write(space, 3, data & 0x000000ff);
- return;
- default:
- //verboselog(0, "Unknown HPC PBUS6 Write: 0x%08x: 0x%08x (%08x)\n", 0x1fbd9800 + ( offset << 2 ), data, mem_mask );
- break;
+void ioc2_device::handle_reset_reg_write(UINT8 data)
+{
+ // guinness/fullhouse-specific implementations can handle bit 3 being used for ISDN reset on Indy only and bit 2 for EISA reset on Indigo 2 only, but for now we do nothing with it
+ m_reset_reg = data;
+}
+
+INPUT_CHANGED_MEMBER( ioc2_device::power_button )
+{
+ if (!newval)
+ {
+ m_front_panel_reg |= FRONT_PANEL_POWER_BUTTON_INT;
+ }
+}
+
+INPUT_CHANGED_MEMBER( ioc2_device::volume_up )
+{
+ if (!newval)
+ {
+ m_front_panel_reg |= FRONT_PANEL_VOL_UP_INT;
+ m_front_panel_reg |= FRONT_PANEL_VOL_UP_HOLD;
+ }
+ else
+ {
+ m_front_panel_reg &= ~FRONT_PANEL_VOL_UP_HOLD;
+ }
+}
+
+INPUT_CHANGED_MEMBER( ioc2_device::volume_down )
+{
+ if (!newval)
+ {
+ m_front_panel_reg |= FRONT_PANEL_VOL_DOWN_INT;
+ m_front_panel_reg |= FRONT_PANEL_VOL_DOWN_HOLD;
+ }
+ else
+ {
+ m_front_panel_reg &= ~FRONT_PANEL_VOL_DOWN_HOLD;
+ }
+}
+
+#define IOC2_TAG "ioc2"
+#define RTC_TAG "ds1386"
+
+struct hpc3_t
+{
+ UINT32 m_enetr_nbdp;
+ UINT32 m_enetr_cbp;
+ UINT32 m_unk0;
+ UINT32 m_unk1;
+ UINT32 m_ic_unk0;
+ UINT32 m_scsi0_desc;
+ UINT32 m_scsi0_dma_ctrl;
+};
+
+struct hal2
+{
+ UINT32 m_iar;
+ UINT32 m_idr[4];
+};
+
+struct pbus_dma_t
+{
+ UINT8 m_active;
+ UINT32 m_cur_ptr;
+ UINT32 m_desc_ptr;
+ UINT32 m_next_ptr;
+ UINT32 m_words_left;
+};
+
+class ip22_state : public driver_device
+{
+public:
+ enum
+ {
+ TIMER_IP22_DMA
+ };
+
+ ip22_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_wd33c93(*this, "wd33c93")
+ , m_unkpbus0(*this, "unkpbus0")
+ , m_mainram(*this, "mainram")
+ , m_sgi_mc(*this, "sgi_mc")
+ , m_newport(*this, "newport")
+ , m_dac(*this, "dac")
+ , m_ioc2(*this, IOC2_TAG)
+ , m_rtc(*this, RTC_TAG)
+ {
+ }
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ DECLARE_READ32_MEMBER(hpc3_hd_enet_r);
+ DECLARE_WRITE32_MEMBER(hpc3_hd_enet_w);
+ DECLARE_READ32_MEMBER(hpc3_hd0_r);
+ DECLARE_WRITE32_MEMBER(hpc3_hd0_w);
+ DECLARE_READ32_MEMBER(hpc3_pbus4_r);
+ DECLARE_WRITE32_MEMBER(hpc3_pbus4_w);
+ DECLARE_READ32_MEMBER(hpc3_pbusdma_r);
+ DECLARE_WRITE32_MEMBER(hpc3_pbusdma_w);
+ DECLARE_READ32_MEMBER(hpc3_unkpbus0_r);
+ DECLARE_WRITE32_MEMBER(hpc3_unkpbus0_w);
+
+ DECLARE_WRITE32_MEMBER(ip22_write_ram);
+
+ DECLARE_READ32_MEMBER(hal2_r);
+ DECLARE_WRITE32_MEMBER(hal2_w);
+
+ DECLARE_WRITE_LINE_MEMBER(scsi_irq);
+
+ DECLARE_DRIVER_INIT(ip225015);
+
+ TIMER_CALLBACK_MEMBER(ip22_dma);
+
+protected:
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+ required_device<mips3_device> m_maincpu;
+ required_device<wd33c93_device> m_wd33c93;
+ required_shared_ptr<UINT32> m_unkpbus0;
+ required_shared_ptr<UINT32> m_mainram;
+ required_device<sgi_mc_device> m_sgi_mc;
+ required_device<newport_video_device> m_newport;
+ required_device<dac_word_interface> m_dac;
+ required_device<ioc2_device> m_ioc2;
+ required_device<ds1386_device> m_rtc;
+
+ void dump_chain(address_space &space, UINT32 ch_base);
+
+ hpc3_t m_hpc3;
+
+ hal2 m_hal2;
+
+ pbus_dma_t m_pbus_dma;
+ UINT8 m_dma_buffer[4096];
+
+ inline void ATTR_PRINTF(3,4) verboselog(int n_level, const char *s_fmt, ... );
+};
+
+
+#define VERBOSE_LEVEL ( 0 )
+
+
+inline void ATTR_PRINTF(3,4) ip22_state::verboselog(int n_level, const char *s_fmt, ... )
+{
+ if( VERBOSE_LEVEL >= n_level )
+ {
+ va_list v;
+ char buf[ 32768 ];
+ va_start( v, s_fmt );
+ vsprintf( buf, s_fmt, v );
+ va_end( v );
+ logerror("%08x: %s", m_maincpu->pc(), buf);
}
}
+
READ32_MEMBER(ip22_state::hpc3_hd_enet_r)
{
switch( offset )
{
case 0x0004/4:
- //verboselog((machine, 0, "HPC3 SCSI0DESC Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nSCSI0Descriptor );
- return m_HPC3.nSCSI0Descriptor;
+ //verboselog((machine, 0, "HPC3 SCSI0DESC Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_hpc3.m_scsi0_desc );
+ return m_hpc3.m_scsi0_desc;
case 0x1004/4:
- //verboselog((machine, 0, "HPC3 SCSI0DMACTRL Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nSCSI0DMACtrl );
- return m_HPC3.nSCSI0DMACtrl;
+ //verboselog((machine, 0, "HPC3 SCSI0DMACTRL Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_hpc3.m_scsi0_dma_ctrl );
+ return m_hpc3.m_scsi0_dma_ctrl;
case 0x4000/4:
- //verboselog((machine, 2, "HPC3 ENETR CBP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nenetr_nbdp );
- return m_HPC3.nenetr_cbp;
+ //verboselog((machine, 2, "HPC3 ENETR CBP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_hpc3.m_enetr_nbdp );
+ return m_hpc3.m_enetr_cbp;
case 0x4004/4:
- //verboselog((machine, 2, "HPC3 ENETR NBDP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_HPC3.nenetr_nbdp );
- return m_HPC3.nenetr_nbdp;
+ //verboselog((machine, 2, "HPC3 ENETR NBDP Read: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2), mem_mask, m_hpc3.m_enetr_nbdp );
+ return m_hpc3.m_enetr_nbdp;
default:
//verboselog((machine, 0, "Unknown HPC3 ENET/HDx Read: %08x (%08x)\n", 0x1fb90000 + ( offset << 2 ), mem_mask );
return 0;
@@ -440,19 +706,19 @@ WRITE32_MEMBER(ip22_state::hpc3_hd_enet_w)
{
case 0x0004/4:
//verboselog((machine, 2, "HPC3 SCSI0DESC Write: %08x\n", data );
- m_HPC3.nSCSI0Descriptor = data;
+ m_hpc3.m_scsi0_desc = data;
break;
case 0x1004/4:
//verboselog((machine, 2, "HPC3 SCSI0DMACTRL Write: %08x\n", data );
- m_HPC3.nSCSI0DMACtrl = data;
+ m_hpc3.m_scsi0_dma_ctrl = data;
break;
case 0x4000/4:
//verboselog((machine, 2, "HPC3 ENETR CBP Write: %08x\n", data );
- m_HPC3.nenetr_cbp = data;
+ m_hpc3.m_enetr_cbp = data;
break;
case 0x4004/4:
//verboselog((machine, 2, "HPC3 ENETR NBDP Write: %08x\n", data );
- m_HPC3.nenetr_nbdp = data;
+ m_hpc3.m_enetr_nbdp = data;
break;
default:
//verboselog((machine, 0, "Unknown HPC3 ENET/HDx write: %08x (%08x): %08x\n", 0x1fb90000 + ( offset << 2 ), mem_mask, data );
@@ -524,14 +790,14 @@ READ32_MEMBER(ip22_state::hpc3_pbus4_r)
switch( offset )
{
case 0x0004/4:
- //verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Read: (%08x): %08x\n", mem_mask, m_HPC3.nunk0 );
- return m_HPC3.nunk0;
+ //verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Read: (%08x): %08x\n", mem_mask, m_hpc3.m_unk0 );
+ return m_hpc3.m_unk0;
case 0x000c/4:
- //verboselog((machine, 2, "Interrupt Controller(?) Read: (%08x): %08x\n", mem_mask, m_HPC3.nIC_Unk0 );
- return m_HPC3.nIC_Unk0;
+ //verboselog((machine, 2, "Interrupt Controller(?) Read: (%08x): %08x\n", mem_mask, m_hpc3.m_ic_unk0 );
+ return m_hpc3.m_ic_unk0;
case 0x0014/4:
- //verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Read: (%08x): %08x\n", mem_mask, m_HPC3.nunk1 );
- return m_HPC3.nunk1;
+ //verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Read: (%08x): %08x\n", mem_mask, m_hpc3.m_unk1 );
+ return m_hpc3.m_unk1;
default:
//verboselog((machine, 0, "Unknown HPC3 PBUS4 Read: %08x (%08x)\n", 0x1fbd9000 + ( offset << 2 ), mem_mask );
return 0;
@@ -544,15 +810,15 @@ WRITE32_MEMBER(ip22_state::hpc3_pbus4_w)
{
case 0x0004/4:
//verboselog((machine, 2, "HPC3 PBUS4 Unknown 0 Write: %08x (%08x)\n", data, mem_mask );
- m_HPC3.nunk0 = data;
+ m_hpc3.m_unk0 = data;
break;
case 0x000c/4:
//verboselog((machine, 2, "Interrupt Controller(?) Write: (%08x): %08x\n", mem_mask, data );
- m_HPC3.nIC_Unk0 = data;
+ m_hpc3.m_ic_unk0 = data;
break;
case 0x0014/4:
//verboselog((machine, 2, "HPC3 PBUS4 Unknown 1 Write: %08x (%08x)\n", data, mem_mask );
- m_HPC3.nunk1 = data;
+ m_hpc3.m_unk1 = data;
break;
default:
//verboselog((machine, 0, "Unknown HPC3 PBUS4 Write: %08x (%08x): %08x\n", 0x1fbd9000 + ( offset << 2 ), mem_mask, data );
@@ -560,308 +826,6 @@ WRITE32_MEMBER(ip22_state::hpc3_pbus4_w)
}
}
-#define RTC_SECONDS m_RTC.nRegs[0x00]
-#define RTC_SECONDS_A m_RTC.nRegs[0x01]
-#define RTC_MINUTES m_RTC.nRegs[0x02]
-#define RTC_MINUTES_A m_RTC.nRegs[0x03]
-#define RTC_HOURS m_RTC.nRegs[0x04]
-#define RTC_HOURS_A m_RTC.nRegs[0x05]
-#define RTC_DAYOFWEEK m_RTC.nRegs[0x06]
-#define RTC_DAYOFMONTH m_RTC.nRegs[0x07]
-#define RTC_MONTH m_RTC.nRegs[0x08]
-#define RTC_YEAR m_RTC.nRegs[0x09]
-#define RTC_REGISTERA m_RTC.nRegs[0x0a]
-#define RTC_REGISTERB m_RTC.nRegs[0x0b]
-#define RTC_REGISTERC m_RTC.nRegs[0x0c]
-#define RTC_REGISTERD m_RTC.nRegs[0x0d]
-#define RTC_MODELBYTE m_RTC.nRegs[0x40]
-#define RTC_SERBYTE0 m_RTC.nRegs[0x41]
-#define RTC_SERBYTE1 m_RTC.nRegs[0x42]
-#define RTC_SERBYTE2 m_RTC.nRegs[0x43]
-#define RTC_SERBYTE3 m_RTC.nRegs[0x44]
-#define RTC_SERBYTE4 m_RTC.nRegs[0x45]
-#define RTC_SERBYTE5 m_RTC.nRegs[0x46]
-#define RTC_CRC m_RTC.nRegs[0x47]
-#define RTC_CENTURY m_RTC.nRegs[0x48]
-#define RTC_DAYOFMONTH_A m_RTC.nRegs[0x49]
-#define RTC_EXTCTRL0 m_RTC.nRegs[0x4a]
-#define RTC_EXTCTRL1 m_RTC.nRegs[0x4b]
-#define RTC_RTCADDR2 m_RTC.nRegs[0x4e]
-#define RTC_RTCADDR3 m_RTC.nRegs[0x4f]
-#define RTC_RAMLSB m_RTC.nRegs[0x50]
-#define RTC_RAMMSB m_RTC.nRegs[0x51]
-#define RTC_WRITECNT m_RTC.nRegs[0x5e]
-
-READ32_MEMBER(ip22_state::rtc_r)
-{
- if( offset <= 0x0d )
- {
- switch( offset )
- {
- case 0x0000:
-// //verboselog((machine, 2, "RTC Seconds Read: %d \n", RTC_SECONDS );
- return RTC_SECONDS;
- case 0x0001:
-// //verboselog((machine, 2, "RTC Seconds Alarm Read: %d \n", RTC_SECONDS_A );
- return RTC_SECONDS_A;
- case 0x0002:
- //verboselog((machine, 3, "RTC Minutes Read: %d \n", RTC_MINUTES );
- return RTC_MINUTES;
- case 0x0003:
- //verboselog((machine, 3, "RTC Minutes Alarm Read: %d \n", RTC_MINUTES_A );
- return RTC_MINUTES_A;
- case 0x0004:
- //verboselog((machine, 3, "RTC Hours Read: %d \n", RTC_HOURS );
- return RTC_HOURS;
- case 0x0005:
- //verboselog((machine, 3, "RTC Hours Alarm Read: %d \n", RTC_HOURS_A );
- return RTC_HOURS_A;
- case 0x0006:
- //verboselog((machine, 3, "RTC Day of Week Read: %d \n", RTC_DAYOFWEEK );
- return RTC_DAYOFWEEK;
- case 0x0007:
- //verboselog((machine, 3, "RTC Day of Month Read: %d \n", RTC_DAYOFMONTH );
- return RTC_DAYOFMONTH;
- case 0x0008:
- //verboselog((machine, 3, "RTC Month Read: %d \n", RTC_MONTH );
- return RTC_MONTH;
- case 0x0009:
- //verboselog((machine, 3, "RTC Year Read: %d \n", RTC_YEAR );
- return RTC_YEAR;
- case 0x000a:
- //verboselog((machine, 3, "RTC Register A Read: %02x \n", RTC_REGISTERA );
- return RTC_REGISTERA;
- case 0x000b:
- //verboselog((machine, 3, "RTC Register B Read: %02x \n", RTC_REGISTERB );
- return RTC_REGISTERB;
- case 0x000c:
- //verboselog((machine, 3, "RTC Register C Read: %02x \n", RTC_REGISTERC );
- return RTC_REGISTERC;
- case 0x000d:
- //verboselog((machine, 3, "RTC Register D Read: %02x \n", RTC_REGISTERD );
- return RTC_REGISTERD;
- default:
- //verboselog((machine, 3, "Unknown RTC Read: %08x (%08x)\n", 0x1fbe0000 + ( offset << 2 ), mem_mask );
- return 0;
- }
- }
-
- if( offset >= 0x0e && offset < 0x40 )
- return m_RTC.nRegs[offset];
-
- if( offset >= 0x40 && offset < 0x80 && !( RTC_REGISTERA & 0x10 ) )
- return m_RTC.nUserRAM[offset - 0x40];
-
- if( offset >= 0x40 && offset < 0x80 && ( RTC_REGISTERA & 0x10 ) )
- {
- switch( offset )
- {
- case 0x0040:
- //verboselog((machine, 3, "RTC Model Byte Read: %02x\n", RTC_MODELBYTE );
- return RTC_MODELBYTE;
- case 0x0041:
- //verboselog((machine, 3, "RTC Serial Byte 0 Read: %02x\n", RTC_SERBYTE0 );
- return RTC_SERBYTE0;
- case 0x0042:
- //verboselog((machine, 3, "RTC Serial Byte 1 Read: %02x\n", RTC_SERBYTE1 );
- return RTC_SERBYTE1;
- case 0x0043:
- //verboselog((machine, 3, "RTC Serial Byte 2 Read: %02x\n", RTC_SERBYTE2 );
- return RTC_SERBYTE2;
- case 0x0044:
- //verboselog((machine, 3, "RTC Serial Byte 3 Read: %02x\n", RTC_SERBYTE3 );
- return RTC_SERBYTE3;
- case 0x0045:
- //verboselog((machine, 3, "RTC Serial Byte 4 Read: %02x\n", RTC_SERBYTE4 );
- return RTC_SERBYTE4;
- case 0x0046:
- //verboselog((machine, 3, "RTC Serial Byte 5 Read: %02x\n", RTC_SERBYTE5 );
- return RTC_SERBYTE5;
- case 0x0047:
- //verboselog((machine, 3, "RTC CRC Read: %02x\n", RTC_CRC );
- return RTC_CRC;
- case 0x0048:
- //verboselog((machine, 3, "RTC Century Read: %02x\n", RTC_CENTURY );
- return RTC_CENTURY;
- case 0x0049:
- //verboselog((machine, 3, "RTC Day of Month Alarm Read: %02x \n", RTC_DAYOFMONTH_A );
- return RTC_DAYOFMONTH_A;
- case 0x004a:
- //verboselog((machine, 3, "RTC Extended Control 0 Read: %02x \n", RTC_EXTCTRL0 );
- return RTC_EXTCTRL0;
- case 0x004b:
- //verboselog((machine, 3, "RTC Extended Control 1 Read: %02x \n", RTC_EXTCTRL1 );
- return RTC_EXTCTRL1;
- case 0x004e:
- //verboselog((machine, 3, "RTC SMI Recovery Address 2 Read: %02x \n", RTC_RTCADDR2 );
- return RTC_RTCADDR2;
- case 0x004f:
- //verboselog((machine, 3, "RTC SMI Recovery Address 3 Read: %02x \n", RTC_RTCADDR3 );
- return RTC_RTCADDR3;
- case 0x0050:
- //verboselog((machine, 3, "RTC RAM LSB Read: %02x \n", RTC_RAMLSB );
- return RTC_RAMLSB;
- case 0x0051:
- //verboselog((machine, 3, "RTC RAM MSB Read: %02x \n", RTC_RAMMSB );
- return RTC_RAMMSB;
- case 0x0053:
- return m_RTC.nRAM[ (( RTC_RAMMSB << 8 ) | RTC_RAMLSB) & 0x7ff ];
- case 0x005e:
- return RTC_WRITECNT;
- default:
- //verboselog((machine, 3, "Unknown RTC Ext. Reg. Read: %02x\n", offset );
- return 0;
- }
- }
-
- if( offset >= 0x80 )
- return m_RTC.nUserRAM[ offset - 0x80 ];
-
- return 0;
-}
-
-WRITE32_MEMBER(ip22_state::rtc_w)
-{
- RTC_WRITECNT++;
-
-// osd_printf_info("RTC_W: offset %x => %x (PC=%x)\n", data, offset, space.device().safe_pc());
-
- if( offset <= 0x0d )
- {
- switch( offset )
- {
- case 0x0000:
- //verboselog((machine, 3, "RTC Seconds Write: %02x \n", data );
- RTC_SECONDS = data;
- break;
- case 0x0001:
- //verboselog((machine, 3, "RTC Seconds Alarm Write: %02x \n", data );
- RTC_SECONDS_A = data;
- break;
- case 0x0002:
- //verboselog((machine, 3, "RTC Minutes Write: %02x \n", data );
- RTC_MINUTES = data;
- break;
- case 0x0003:
- //verboselog((machine, 3, "RTC Minutes Alarm Write: %02x \n", data );
- RTC_MINUTES_A = data;
- break;
- case 0x0004:
- //verboselog((machine, 3, "RTC Hours Write: %02x \n", data );
- RTC_HOURS = data;
- break;
- case 0x0005:
- //verboselog((machine, 3, "RTC Hours Alarm Write: %02x \n", data );
- RTC_HOURS_A = data;
- break;
- case 0x0006:
- //verboselog((machine, 3, "RTC Day of Week Write: %02x \n", data );
- RTC_DAYOFWEEK = data;
- break;
- case 0x0007:
- //verboselog((machine, 3, "RTC Day of Month Write: %02x \n", data );
- RTC_DAYOFMONTH = data;
- break;
- case 0x0008:
- //verboselog((machine, 3, "RTC Month Write: %02x \n", data );
- RTC_MONTH = data;
- break;
- case 0x0009:
- //verboselog((machine, 3, "RTC Year Write: %02x \n", data );
- RTC_YEAR = data;
- break;
- case 0x000a:
- //verboselog((machine, 3, "RTC Register A Write (Bit 7 Ignored): %02x \n", data );
- RTC_REGISTERA = data & 0x0000007f;
- break;
- case 0x000b:
- //verboselog((machine, 3, "RTC Register B Write: %02x \n", data );
- RTC_REGISTERB = data;
- break;
- case 0x000c:
- //verboselog((machine, 3, "RTC Register C Write (Ignored): %02x \n", data );
- break;
- case 0x000d:
- //verboselog((machine, 3, "RTC Register D Write (Ignored): %02x \n", data );
- break;
- default:
- //verboselog((machine, 3, "Unknown RTC Write: %08x (%08x): %08x\n", 0x1fbe0000 + ( offset << 2 ), mem_mask, data );
- break;
- }
- }
- if( offset >= 0x0e && offset < 0x40 )
- {
- m_RTC.nRegs[offset] = data;
- return;
- }
- if( offset >= 0x40 && offset < 0x80 && !( RTC_REGISTERA & 0x10 ) )
- {
- m_RTC.nUserRAM[offset - 0x40] = data;
- return;
- }
- if( offset >= 0x40 && offset < 0x80 && ( RTC_REGISTERA & 0x10 ) )
- {
- switch( offset )
- {
- case 0x0040:
- case 0x0041:
- case 0x0042:
- case 0x0043:
- case 0x0044:
- case 0x0045:
- case 0x0046:
- //verboselog((machine, 3, "Invalid write to RTC serial number byte %d: %02x\n", offset - 0x0040, data );
- break;
- case 0x0047:
- //verboselog((machine, 3, "RTC Century Write: %02x \n", data );
- RTC_CENTURY = data;
- break;
- case 0x0048:
- //verboselog((machine, 3, "RTC Century Write: %02x \n", data );
- RTC_CENTURY = data;
- break;
- case 0x0049:
- //verboselog((machine, 3, "RTC Day of Month Alarm Write: %02x \n", data );
- RTC_DAYOFMONTH_A = data;
- break;
- case 0x004a:
- //verboselog((machine, 3, "RTC Extended Control 0 Write: %02x \n", data );
- RTC_EXTCTRL0 = data;
- break;
- case 0x004b:
- //verboselog((machine, 3, "RTC Extended Control 1 Write: %02x \n", data );
- RTC_EXTCTRL1 = data;
- break;
- case 0x004e:
- //verboselog((machine, 3, "RTC SMI Recovery Address 2 Write: %02x \n", data );
- RTC_RTCADDR2 = data;
- break;
- case 0x004f:
- //verboselog((machine, 3, "RTC SMI Recovery Address 3 Write: %02x \n", data );
- RTC_RTCADDR3 = data;
- break;
- case 0x0050:
- //verboselog((machine, 3, "RTC RAM LSB Write: %02x \n", data );
- RTC_RAMLSB = data;
- break;
- case 0x0051:
- //verboselog((machine, 3, "RTC RAM MSB Write: %02x \n", data );
- RTC_RAMMSB = data;
- break;
- case 0x0053:
- m_RTC.nRAM[ (( RTC_RAMMSB << 8 ) | RTC_RAMLSB) & 0x7ff ] = data;
- break;
- default:
- //verboselog((machine, 3, "Unknown RTC Ext. Reg. Write: %02x: %02x\n", offset, data );
- break;
- }
- }
- if( offset >= 0x80 )
- {
- m_RTC.nUserRAM[ offset - 0x80 ] = data;
- }
-}
-
// a bit hackish, but makes the memory detection work properly and allows a big cleanup of the mapping
WRITE32_MEMBER(ip22_state::ip22_write_ram)
{
@@ -926,7 +890,7 @@ WRITE32_MEMBER(ip22_state::hal2_w)
break;
case 0x0030/4:
//verboselog((machine, 0, "HAL2 Indirect Address Register Write: 0x%08x (%08x)\n", data, mem_mask );
- m_HAL2.nIAR = data;
+ m_hal2.m_iar = data;
switch( data & H2_IAR_TYPE )
{
case 0x1000:
@@ -1003,19 +967,19 @@ WRITE32_MEMBER(ip22_state::hal2_w)
//break;
case 0x0040/4:
//verboselog((machine, 0, "HAL2 Indirect Data Register 0 Write: 0x%08x (%08x)\n", data, mem_mask );
- m_HAL2.nIDR[0] = data;
+ m_hal2.m_idr[0] = data;
return;
case 0x0050/4:
//verboselog((machine, 0, "HAL2 Indirect Data Register 1 Write: 0x%08x (%08x)\n", data, mem_mask );
- m_HAL2.nIDR[1] = data;
+ m_hal2.m_idr[1] = data;
return;
case 0x0060/4:
//verboselog((machine, 0, "HAL2 Indirect Data Register 2 Write: 0x%08x (%08x)\n", data, mem_mask );
- m_HAL2.nIDR[2] = data;
+ m_hal2.m_idr[2] = data;
return;
case 0x0070/4:
//verboselog((machine, 0, "HAL2 Indirect Data Register 3 Write: 0x%08x (%08x)\n", data, mem_mask );
- m_HAL2.nIDR[3] = data;
+ m_hal2.m_idr[3] = data;
return;
}
//verboselog((machine, 0, "Unknown HAL2 write: 0x%08x: 0x%08x (%08x)\n", 0x1fbd8000 + offset*4, data, mem_mask );
@@ -1046,9 +1010,6 @@ void ip22_state::device_timer(emu_timer &timer, device_timer_id id, int param, v
case TIMER_IP22_DMA:
ip22_dma(ptr, param);
break;
- case TIMER_IP22_MSEC:
- ip22_timer(ptr, param);
- break;
default:
assert_always(FALSE, "Unknown id in ip22_state::device_timer");
}
@@ -1058,28 +1019,28 @@ TIMER_CALLBACK_MEMBER(ip22_state::ip22_dma)
{
timer_set(attotime::never, TIMER_IP22_DMA);
#if 0
- if( m_PBUS_DMA.nActive )
+ if( m_pbus_dma.m_active )
{
- UINT16 temp16 = ( m_mainram[(m_PBUS_DMA.nCurPtr - 0x08000000)/4] & 0xffff0000 ) >> 16;
+ UINT16 temp16 = ( m_mainram[(m_pbus_dma.m_cur_ptr - 0x08000000)/4] & 0xffff0000 ) >> 16;
INT16 stemp16 = (INT16)((temp16 >> 8) | (temp16 << 8));
- m_dac->write_signed16(stemp16 ^ 0x8000);
+ m_dac->write_signed16(stemp16);
- m_PBUS_DMA.nCurPtr += 4;
+ m_pbus_dma.m_cur_ptr += 4;
- m_PBUS_DMA.nWordsLeft -= 4;
- if( m_PBUS_DMA.nWordsLeft == 0 )
+ m_pbus_dma.m_words_left -= 4;
+ if( m_pbus_dma.m_words_left == 0 )
{
- if( m_PBUS_DMA.nNextPtr != 0 )
+ if( m_pbus_dma.m_next_ptr != 0 )
{
- m_PBUS_DMA.nDescPtr = m_PBUS_DMA.nNextPtr;
- m_PBUS_DMA.nCurPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4];
- m_PBUS_DMA.nWordsLeft = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+1];
- m_PBUS_DMA.nNextPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+2];
+ m_pbus_dma.m_desc_ptr = m_pbus_dma.m_next_ptr;
+ m_pbus_dma.m_cur_ptr = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4];
+ m_pbus_dma.m_words_left = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4+1];
+ m_pbus_dma.m_next_ptr = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4+2];
}
else
{
- m_PBUS_DMA.nActive = 0;
+ m_pbus_dma.m_active = 0;
return;
}
}
@@ -1108,14 +1069,14 @@ WRITE32_MEMBER(ip22_state::hpc3_pbusdma_w)
//verboselog((machine, 0, "PBUS DMA Channel %d Descriptor Pointer Write: 0x%08x\n", channel, data );
if( channel == 1 )
{
- m_PBUS_DMA.nDescPtr = data;
- m_PBUS_DMA.nCurPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4];
- m_PBUS_DMA.nWordsLeft = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+1];
- m_PBUS_DMA.nNextPtr = m_mainram[(m_PBUS_DMA.nDescPtr - 0x08000000)/4+2];
- //verboselog((machine, 0, "nPBUS_DMA_DescPtr = %08x\n", m_PBUS_DMA.nDescPtr );
- //verboselog((machine, 0, "nPBUS_DMA_CurPtr = %08x\n", m_PBUS_DMA.nCurPtr );
- //verboselog((machine, 0, "nPBUS_DMA_WordsLeft = %08x\n", m_PBUS_DMA.nWordsLeft );
- //verboselog((machine, 0, "nPBUS_DMA_NextPtr = %08x\n", m_PBUS_DMA.nNextPtr );
+ m_pbus_dma.m_desc_ptr = data;
+ m_pbus_dma.m_cur_ptr = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4];
+ m_pbus_dma.m_words_left = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4+1];
+ m_pbus_dma.m_next_ptr = m_mainram[(m_pbus_dma.m_desc_ptr - 0x08000000)/4+2];
+ //verboselog((machine, 0, "nPBUS_DMA_DescPtr = %08x\n", m_pbus_dma.m_desc_ptr );
+ //verboselog((machine, 0, "nPBUS_DMA_CurPtr = %08x\n", m_pbus_dma.m_cur_ptr );
+ //verboselog((machine, 0, "nPBUS_DMA_WordsLeft = %08x\n", m_pbus_dma.m_words_left );
+ //verboselog((machine, 0, "nPBUS_DMA_NextPtr = %08x\n", m_pbus_dma.m_next_ptr );
}
return;
case 0x1000/4:
@@ -1154,7 +1115,7 @@ WRITE32_MEMBER(ip22_state::hpc3_pbusdma_w)
if( ( data & PBUS_CTRL_DMASTART ) || ( data & PBUS_CTRL_LOAD_EN ) )
{
timer_set(attotime::from_hz(44100), TIMER_IP22_DMA);
- m_PBUS_DMA.nActive = 1;
+ m_pbus_dma.m_active = 1;
}
return;
}
@@ -1187,34 +1148,24 @@ static ADDRESS_MAP_START( ip225015_map, AS_PROGRAM, 32, ip22_state )
AM_RANGE( 0x1fbd8000, 0x1fbd83ff ) AM_READWRITE(hal2_r, hal2_w )
AM_RANGE( 0x1fbd8400, 0x1fbd87ff ) AM_RAM /* hack */
AM_RANGE( 0x1fbd9000, 0x1fbd93ff ) AM_READWRITE(hpc3_pbus4_r, hpc3_pbus4_w )
- AM_RANGE( 0x1fbd9800, 0x1fbd9bff ) AM_READWRITE(hpc3_pbus6_r, hpc3_pbus6_w )
+ AM_RANGE( 0x1fbd9800, 0x1fbd9bff ) AM_DEVREADWRITE(IOC2_TAG, ioc2_device, read, write)
AM_RANGE( 0x1fbdc000, 0x1fbdc7ff ) AM_RAM
AM_RANGE( 0x1fbdd000, 0x1fbdd3ff ) AM_RAM
- AM_RANGE( 0x1fbe0000, 0x1fbe04ff ) AM_READWRITE(rtc_r, rtc_w )
+ AM_RANGE( 0x1fbe0000, 0x1fbe04ff ) AM_DEVREADWRITE8(RTC_TAG, ds1386_device, data_r, data_w, 0x000000ff)
AM_RANGE( 0x1fc00000, 0x1fc7ffff ) AM_ROM AM_REGION( "user1", 0 )
AM_RANGE( 0x20000000, 0x27ffffff ) AM_SHARE("mainram") AM_RAM_WRITE(ip22_write_ram)
ADDRESS_MAP_END
-TIMER_CALLBACK_MEMBER(ip22_state::ip22_timer)
-{
- timer_set(attotime::from_msec(1), TIMER_IP22_MSEC);
-}
-
void ip22_state::machine_reset()
{
- m_HPC3.nenetr_nbdp = 0x80000000;
- m_HPC3.nenetr_cbp = 0x80000000;
- m_nIntCounter = 0;
- RTC_REGISTERB = 0x08;
- RTC_REGISTERD = 0x80;
-
- timer_set(attotime::from_msec(1), TIMER_IP22_MSEC);
+ m_hpc3.m_enetr_nbdp = 0x80000000;
+ m_hpc3.m_enetr_cbp = 0x80000000;
// set up low RAM mirror
membank("bank1")->set_base(m_mainram);
- m_PBUS_DMA.nActive = 0;
+ m_pbus_dma.m_active = 0;
m_maincpu->mips3drc_set_options(MIPS3DRC_COMPATIBLE_OPTIONS | MIPS3DRC_CHECK_OVERFLOWS);
}
@@ -1245,13 +1196,13 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
if (m_wd33c93->get_dma_count())
{
printf("m_wd33c93->get_dma_count() is %d\n", m_wd33c93->get_dma_count() );
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENABLE)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENABLE)
{
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_IRQ) logerror("IP22: Unhandled SCSI DMA IRQ\n");
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_IRQ) logerror("IP22: Unhandled SCSI DMA IRQ\n");
}
// HPC3 DMA: host to device
- if ((m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENABLE) && (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_DIR))
+ if ((m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENABLE) && (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_DIR))
{
UINT32 wptr, tmpword;
int words, dptr, twords;
@@ -1259,13 +1210,13 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
words = m_wd33c93->get_dma_count();
words /= 4;
- wptr = space.read_dword(m_HPC3.nSCSI0Descriptor);
- m_HPC3.nSCSI0Descriptor += words*4;
+ wptr = space.read_dword(m_hpc3.m_scsi0_desc);
+ m_hpc3.m_scsi0_desc += words*4;
dptr = 0;
printf("DMA to device: %d words @ %x\n", words, wptr);
- dump_chain(space, m_HPC3.nSCSI0Descriptor);
+ dump_chain(space, m_hpc3.m_scsi0_desc);
if (words <= (512/4))
{
@@ -1276,7 +1227,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
{
tmpword = space.read_dword(wptr);
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENDIAN)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENDIAN)
{
m_dma_buffer[dptr+3] = (tmpword>>24)&0xff;
m_dma_buffer[dptr+2] = (tmpword>>16)&0xff;
@@ -1305,14 +1256,14 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
{
//m_wd33c93->dma_read_data(512, m_dma_buffer);
twords = 512/4;
- m_HPC3.nSCSI0Descriptor += 512;
+ m_hpc3.m_scsi0_desc += 512;
dptr = 0;
while (twords)
{
tmpword = space.read_dword(wptr);
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENDIAN)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENDIAN)
{
m_dma_buffer[dptr+3] = (tmpword>>24)&0xff;
m_dma_buffer[dptr+2] = (tmpword>>16)&0xff;
@@ -1342,13 +1293,13 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
m_wd33c93->clear_dma();
#if 0
UINT32 dptr, tmpword;
- UINT32 bc = space.read_dword(m_HPC3.nSCSI0Descriptor + 4);
- UINT32 rptr = space.read_dword(m_HPC3.nSCSI0Descriptor);
+ UINT32 bc = space.read_dword(m_hpc3.m_scsi0_desc + 4);
+ UINT32 rptr = space.read_dword(m_hpc3.m_scsi0_desc);
int length = bc & 0x3fff;
int xie = (bc & 0x20000000) ? 1 : 0;
int eox = (bc & 0x80000000) ? 1 : 0;
- dump_chain(space, m_HPC3.nSCSI0Descriptor);
+ dump_chain(space, m_hpc3.m_scsi0_desc);
printf("PC is %08x\n", machine.device("maincpu")->safe_pc());
printf("DMA to device: length %x xie %d eox %d\n", length, xie, eox);
@@ -1359,7 +1310,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
while (length > 0)
{
tmpword = space.read_dword(rptr);
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENDIAN)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENDIAN)
{
m_dma_buffer[dptr+3] = (tmpword>>24)&0xff;
m_dma_buffer[dptr+2] = (tmpword>>16)&0xff;
@@ -1379,7 +1330,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
length -= 4;
}
- length = space.read_dword(m_HPC3.nSCSI0Descriptor+4) & 0x3fff;
+ length = space.read_dword(m_hpc3.m_scsi0_desc+4) & 0x3fff;
m_wd33c93->write_data(length, m_dma_buffer);
// clear DMA on the controller too
@@ -1393,7 +1344,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
}
// HPC3 DMA: device to host
- if ((m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENABLE) && !(m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_DIR))
+ if ((m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENABLE) && !(m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_DIR))
{
UINT32 wptr, tmpword;
int words, sptr, twords;
@@ -1401,12 +1352,12 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
words = m_wd33c93->get_dma_count();
words /= 4;
- wptr = space.read_dword(m_HPC3.nSCSI0Descriptor);
+ wptr = space.read_dword(m_hpc3.m_scsi0_desc);
sptr = 0;
// osd_printf_info("DMA from device: %d words @ %x\n", words, wptr);
- dump_chain(space, m_HPC3.nSCSI0Descriptor);
+ dump_chain(space, m_hpc3.m_scsi0_desc);
if (words <= (1024/4))
{
@@ -1415,7 +1366,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
while (words)
{
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENDIAN)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENDIAN)
{
tmpword = m_dma_buffer[sptr+3]<<24 | m_dma_buffer[sptr+2]<<16 | m_dma_buffer[sptr+1]<<8 | m_dma_buffer[sptr];
}
@@ -1440,7 +1391,7 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
while (twords)
{
- if (m_HPC3.nSCSI0DMACtrl & HPC3_DMACTRL_ENDIAN)
+ if (m_hpc3.m_scsi0_dma_ctrl & HPC3_DMACTRL_ENDIAN)
{
tmpword = m_dma_buffer[sptr+3]<<24 | m_dma_buffer[sptr+2]<<16 | m_dma_buffer[sptr+1]<<8 | m_dma_buffer[sptr];
}
@@ -1465,29 +1416,25 @@ WRITE_LINE_MEMBER(ip22_state::scsi_irq)
}
// clear HPC3 DMA active flag
- m_HPC3.nSCSI0DMACtrl &= ~HPC3_DMACTRL_ENABLE;
+ m_hpc3.m_scsi0_dma_ctrl &= ~HPC3_DMACTRL_ENABLE;
// set the interrupt
- int3_raise_local0_irq(INT3_LOCAL0_SCSI0);
+ m_ioc2->raise_local0_irq(INT3_LOCAL0_SCSI0);
}
else
{
- int3_lower_local0_irq(INT3_LOCAL0_SCSI0);
+ m_ioc2->lower_local0_irq(INT3_LOCAL0_SCSI0);
}
}
void ip22_state::machine_start()
{
- // SCSI init
- machine().device<nvram_device>("nvram_user")->set_base(m_RTC.nUserRAM, 0x200);
- machine().device<nvram_device>("nvram")->set_base(m_RTC.nRAM, 0x200);
}
-DRIVER_INIT_MEMBER(ip22_state,ip225015)
+DRIVER_INIT_MEMBER(ip22_state, ip225015)
{
// IP22 uses 2 pieces of PC-compatible hardware: the 8042 PS/2 keyboard/mouse
// interface and the 8254 PIT. Both are licensed cores embedded in the IOC custom chip.
- m_nIOC_ParReadCnt = 0;
}
static INPUT_PORTS_START( ip225015 )
@@ -1498,80 +1445,6 @@ static INPUT_PORTS_START( ip225015 )
PORT_INCLUDE( at_keyboard ) /* IN4 - IN11 */
INPUT_PORTS_END
-void ip22_state::rtc_update()
-{
- RTC_SECONDS++;
-
- switch( RTC_REGISTERB & 0x04 )
- {
- case 0x00: /* Non-BCD */
- if( RTC_SECONDS == 60 )
- {
- RTC_SECONDS = 0;
- RTC_MINUTES++;
- }
- if( RTC_MINUTES == 60 )
- {
- RTC_MINUTES = 0;
- RTC_HOURS++;
- }
- if( RTC_HOURS == 24 )
- {
- RTC_HOURS = 0;
- RTC_DAYOFMONTH++;
- }
- RTC_SECONDS_A = RTC_SECONDS;
- RTC_MINUTES_A = RTC_MINUTES;
- RTC_HOURS_A = RTC_HOURS;
- break;
- case 0x04: /* BCD */
- if( ( RTC_SECONDS & 0x0f ) == 0x0a )
- {
- RTC_SECONDS -= 0x0a;
- RTC_SECONDS += 0x10;
- }
- if( ( RTC_SECONDS & 0xf0 ) == 0x60 )
- {
- RTC_SECONDS -= 0x60;
- RTC_MINUTES++;
- }
- if( ( RTC_MINUTES & 0x0f ) == 0x0a )
- {
- RTC_MINUTES -= 0x0a;
- RTC_MINUTES += 0x10;
- }
- if( ( RTC_MINUTES & 0xf0 ) == 0x60 )
- {
- RTC_MINUTES -= 0x60;
- RTC_HOURS++;
- }
- if( ( RTC_HOURS & 0x0f ) == 0x0a )
- {
- RTC_HOURS -= 0x0a;
- RTC_HOURS += 0x10;
- }
- if( RTC_HOURS == 0x24 )
- {
- RTC_HOURS = 0;
- RTC_DAYOFMONTH++;
- }
- RTC_SECONDS_A = RTC_SECONDS;
- RTC_MINUTES_A = RTC_MINUTES;
- RTC_HOURS_A = RTC_HOURS;
- break;
- }
-}
-
-INTERRUPT_GEN_MEMBER(ip22_state::ip22_vbl)
-{
- m_nIntCounter++;
-// if( m_nIntCounter == 60 )
- {
- m_nIntCounter = 0;
- rtc_update();
- }
-}
-
static MACHINE_CONFIG_FRAGMENT( cdrom_config )
MCFG_DEVICE_MODIFY( "cdda" )
MCFG_SOUND_ROUTE( 0, "^^^^lspeaker", 1.0 )
@@ -1583,17 +1456,6 @@ static MACHINE_CONFIG_START( ip225015, ip22_state )
//MCFG_MIPS3_ICACHE_SIZE(32768)
//MCFG_MIPS3_DCACHE_SIZE(32768)
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
-
-
- MCFG_NVRAM_ADD_0FILL("nvram")
- MCFG_NVRAM_ADD_0FILL("nvram_user")
-
- MCFG_DEVICE_ADD("pit8254", PIT8254, 0)
- MCFG_PIT8253_CLK0(1000000)
- MCFG_PIT8253_CLK1(1000000)
- MCFG_PIT8253_CLK2(1000000)
- MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("kbdc", kbdc8042_device, write_out2))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1609,12 +1471,11 @@ static MACHINE_CONFIG_START( ip225015, ip22_state )
MCFG_DEVICE_ADD("sgi_mc", SGI_MC, 0)
- MCFG_DEVICE_ADD("lpt_0", PC_LPT, 0)
-
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD( "dac", DAC, 0 )
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_1)
@@ -1625,9 +1486,9 @@ static MACHINE_CONFIG_START( ip225015, ip22_state )
MCFG_LEGACY_SCSI_PORT("scsi")
MCFG_WD33C93_IRQ_CB(WRITELINE(ip22_state,scsi_irq))
- MCFG_DEVICE_ADD("kbdc", KBDC8042, 0)
- MCFG_KBDC8042_KEYBOARD_TYPE(KBDC8042_STANDARD)
- MCFG_KBDC8042_SYSTEM_RESET_CB(INPUTLINE("maincpu", INPUT_LINE_RESET))
+ MCFG_IOC2_GUINNESS_ADD(IOC2_TAG)
+
+ MCFG_DS1386_8K_ADD(RTC_TAG, 32768)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ip224613, ip225015 )
@@ -1635,7 +1496,6 @@ static MACHINE_CONFIG_DERIVED( ip224613, ip225015 )
//MCFG_MIPS3_ICACHE_SIZE(32768)
//MCFG_MIPS3_DCACHE_SIZE(32768)
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ip244415, ip225015 )
@@ -1643,7 +1503,6 @@ static MACHINE_CONFIG_DERIVED( ip244415, ip225015 )
//MCFG_MIPS3_ICACHE_SIZE(32768)
//MCFG_MIPS3_DCACHE_SIZE(32768)
MCFG_CPU_PROGRAM_MAP( ip225015_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", ip22_state, ip22_vbl)
MACHINE_CONFIG_END
ROM_START( ip225015 )
diff --git a/src/mame/drivers/instruct.cpp b/src/mame/drivers/instruct.cpp
index f4183a91466..13b7a632296 100644
--- a/src/mame/drivers/instruct.cpp
+++ b/src/mame/drivers/instruct.cpp
@@ -339,7 +339,7 @@ QUICKLOAD_LOAD_MEMBER( instruct_state, instruct )
}
else
{
- dynamic_buffer quick_data(quick_length);
+ std::vector<UINT8> quick_data(quick_length);
read_ = image.fread( &quick_data[0], quick_length);
if (read_ != quick_length)
{
diff --git a/src/mame/drivers/iris3130.cpp b/src/mame/drivers/iris3130.cpp
index 47d8c0fb9b1..11ace305b2f 100644
--- a/src/mame/drivers/iris3130.cpp
+++ b/src/mame/drivers/iris3130.cpp
@@ -40,7 +40,6 @@
#include "emu.h"
#include "bus/rs232/rs232.h"
-#include "sound/dac.h"
#include "cpu/m68000/m68000.h"
#include "machine/mc146818.h" /* TOD clock */
#include "machine/mc68681.h" /* DUART0, DUART1 */
@@ -436,11 +435,6 @@ static MACHINE_CONFIG_START( sgi_ip2, sgi_ip2_state )
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duart68681a", mc68681_device, rx_b_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", ip2_terminal)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD( "dac", DAC, 0 )
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
static INPUT_PORTS_START( sgi_ip2 )
diff --git a/src/mame/drivers/istrebiteli.cpp b/src/mame/drivers/istrebiteli.cpp
index c9ac3e9bb41..c1538d33c74 100644
--- a/src/mame/drivers/istrebiteli.cpp
+++ b/src/mame/drivers/istrebiteli.cpp
@@ -5,19 +5,19 @@
Istrebiteli driver by MetalliC
TODO:
- sound emulation
+ hardware-like noice sound generation
accurate sprite collision
- how to play:
+ how to play:
insert one or more coins, each coin gives 2 minutes of play time, then press 1 or 2 player game start
- hit enemy 15 or more times to get bonus game
-
- test mode:
- insert 12 or more coins then press 2 player start
+ hit enemy 15 or more times to get bonus game
- note:
+ test mode:
+ insert 12 or more coins then press 2 player start
+
+ notes:
dumped PCB is early game version, have several bugs, possible test/prototype.
- later version was seen in St.Petersburg arcade museum.
+ later version was seen in St.Petersburg arcade museum, CPU board have single 8Kx8 ROM.
**************************************************************************/
@@ -91,8 +91,8 @@ void istrebiteli_sound_device::sound_stream_update(sound_stream &stream, stream_
smpl = (m_rom[m_rom_cnt] >> m_sample_num) & 1;
// below is huge guess
- if ((m_prev_data & 0x40) == 0) // b6 noice enable ?
- smpl &= rand() & 1;
+ if ((m_prev_data & 0x40) == 0) // b6 noice enable ?
+ smpl &= rand() & 1;
smpl *= (m_prev_data & 0x80) ? 1000 : 4000; // b7 volume ?
*sample++ = smpl;
@@ -113,8 +113,8 @@ void istrebiteli_sound_device::sound_w(UINT8 data)
}
else
m_rom_incr = 1;
-// if (m_prev_data != data)
-// printf("sound %02X rescnt %d sample %d outen %d b6 %d b7 %d\n", data, (data >> 1) & 1, (data >> 2) & 7, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1);
+// if (m_prev_data != data)
+// printf("sound %02X rescnt %d sample %d outen %d b6 %d b7 %d\n", data, (data >> 1) & 1, (data >> 2) & 7, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1);
m_prev_data = data;
}
@@ -413,7 +413,7 @@ GFXDECODE_END
static MACHINE_CONFIG_START( istreb, istrebiteli_state)
/* basic machine hardware */
- MCFG_CPU_ADD(I8080_TAG, I8080, XTAL_8MHz / 4) // KR580VM80A
+ MCFG_CPU_ADD(I8080_TAG, I8080, XTAL_8MHz / 4) // KR580VM80A
MCFG_CPU_PROGRAM_MAP(mem_map)
MCFG_CPU_IO_MAP(io_map)
@@ -445,7 +445,11 @@ MACHINE_CONFIG_END
ROM_START( istreb )
ROM_REGION( 0x1000, I8080_TAG, ROMREGION_ERASEFF )
- ROM_LOAD( "main.bin", 0x000, 0xa00, CRC(ae67c41c) SHA1(1f7807d486cd4d161ee49be991b81db7dc9b0f3b) ) // actually 5x 512B ROMs, TODO split
+ ROM_LOAD( "002-ia12.bin", 0x000, 0x200, CRC(de0bce75) SHA1(ca284e8220d0d55c1a4dd3e951b53404f40fc873) )
+ ROM_LOAD( "002-ia9.bin", 0x200, 0x200, CRC(e9a93ee7) SHA1(63c2001140d2b30657fceca97a639b1acbf614c2) )
+ ROM_LOAD( "002-ib11-2.bin", 0x400, 0x200, CRC(4bb8b875) SHA1(230193e08586f4585fe98b2b31c4c8aa57a83e70) )
+ ROM_LOAD( "002-ib9.bin", 0x600, 0x200, CRC(4eb948b5) SHA1(e9926591d1b0c528630b54956993c01139c58913) )
+ ROM_LOAD( "002-ib13.bin", 0x800, 0x200, CRC(4fec5b14) SHA1(72b01c28882d567cad6924e05849438e5fe7a133) )
ROM_REGION( 0x200, "chars", 0 )
ROM_LOAD( "003-g8.bin", 0x000, 0x200, CRC(5cd7ad47) SHA1(2142711c8a3640b7aa258a2059cfb0f14297a5ac) )
diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp
index f9fa040576f..a008d2eaaa2 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -333,21 +333,20 @@ Notes:
#include "emu.h"
+#include "includes/jaguar.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "cpu/m68000/m68000.h"
#include "cpu/mips/r3000.h"
#include "cpu/jaguar/jaguar.h"
-#include "machine/vt83c461.h"
-#include "sound/dac.h"
-#include "includes/jaguar.h"
+#include "imagedev/chd_cd.h"
#include "imagedev/snapquik.h"
-#include "sound/dac.h"
#include "machine/eepromser.h"
#include "machine/watchdog.h"
+#include "machine/vt83c461.h"
#include "sound/cdda.h"
+#include "sound/volt_reg.h"
#include "cdrom.h"
-#include "imagedev/chd_cd.h"
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
#include "softlist.h"
#define COJAG_CLOCK XTAL_52MHz
@@ -1831,12 +1830,11 @@ static MACHINE_CONFIG_START( cojagr3k, jaguar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cojagr3k_rom, cojagr3k )
@@ -1877,10 +1875,11 @@ static MACHINE_CONFIG_START( jaguar, jaguar_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
/* quickload */
MCFG_QUICKLOAD_ADD("quickload", jaguar_state, jaguar, "abs,bin,cof,jag,prg", 2)
diff --git a/src/mame/drivers/jalmah.cpp b/src/mame/drivers/jalmah.cpp
index 51503e263e3..e95bf5877ec 100644
--- a/src/mame/drivers/jalmah.cpp
+++ b/src/mame/drivers/jalmah.cpp
@@ -21,6 +21,7 @@ Notes(general):
adding a value to these RAM areas according to what button is pressed.
TODO:
+-kakumei2: unemulated RNG;
-Back layer pens looks ugly in some circumstances (i.e. suchipi when you win, mjzoomin when coined up),
static or controlled by something else?
-daireika: the ranking screen on the original pcb shows some hearts instead of the "0".
@@ -39,7 +40,7 @@ TODO:
the programs are actually into the m68k program itself (like hachamf/tdragon/ddealer);
-Video code could be optimized too (for example by calling the priority function only when
priority number is updated), might also need a merging with Jaleco Mega System 1/NMK16 drivers;
-
+
Notes (1st MCU ver.):
-$f000e is bogus,maybe the program snippets can modify this value,or the MCU itself can
do that,returning the contents of D0 register seems enough for now...
@@ -52,7 +53,8 @@ Notes (1st MCU ver.):
BTW,the real HW is using a sort of bankswitch or I'm missing something?
-$f0020 is for the sound program,same for all games, for example mjzoomin hasn't any clear
write to $80040 area and the program jumps to $f0020 when there should be a sample.
-
+-Likewise, D0 upper byte is used but currently ignored.
+
============================================================================================
Debug cheats:
@@ -2471,10 +2473,10 @@ DRIVER_INIT_MEMBER(jalmah_state,suchipi)
}
/*First version of the MCU*/
-GAME( 1989, urashima, 0, urashima, urashima, jalmah_state, urashima, ROT0, "UPL", "Otogizoushi Urashima Mahjong (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1989, daireika, 0, jalmah, daireika, jalmah_state, daireika, ROT0, "Jaleco / NMK", "Mahjong Daireikai (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1990, mjzoomin, 0, jalmah, mjzoomin, jalmah_state, mjzoomin, ROT0, "Jaleco", "Mahjong Channel Zoom In (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+GAME( 1989, urashima, 0, urashima, urashima, jalmah_state, urashima, ROT0, "UPL", "Otogizoushi Urashima Mahjong (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1989, daireika, 0, jalmah, daireika, jalmah_state, daireika, ROT0, "Jaleco / NMK", "Mahjong Daireikai (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1990, mjzoomin, 0, jalmah, mjzoomin, jalmah_state, mjzoomin, ROT0, "Jaleco", "Mahjong Channel Zoom In (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION )
/*Second version of the MCU*/
GAME( 1990, kakumei, 0, jalmah, kakumei, jalmah_state, kakumei, ROT0, "Jaleco", "Mahjong Kakumei (Japan)", MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1992, kakumei2, 0, jalmah, kakumei2, jalmah_state, kakumei2, ROT0, "Jaleco", "Mahjong Kakumei 2 - Princess League (Japan)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1992, kakumei2, 0, jalmah, kakumei2, jalmah_state, kakumei2, ROT0, "Jaleco", "Mahjong Kakumei 2 - Princess League (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_UNEMULATED_PROTECTION )
GAME( 1993, suchipi, 0, jalmah, suchipi, jalmah_state, suchipi, ROT0, "Jaleco", "Idol Janshi Suchie-Pai Special (Japan)", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp
index 085f30db0ff..f504b477348 100644
--- a/src/mame/drivers/jankenmn.cpp
+++ b/src/mame/drivers/jankenmn.cpp
@@ -153,7 +153,7 @@
#include "machine/z80ctc.h"
#include "machine/i8255.h"
#include "sound/dac.h"
-
+#include "sound/volt_reg.h"
#include "jankenmn.lh"
@@ -375,7 +375,7 @@ static MACHINE_CONFIG_START( jankenmn, jankenmn_state )
MCFG_DEVICE_ADD("ppi8255_1", I8255, 0)
/* (20-23) Mode 0 - Ports A, B, high C & low C set as output. */
- MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(jankenmn_state, lamps1_w))
MCFG_I8255_OUT_PORTC_CB(WRITE8(jankenmn_state, lamps2_w))
@@ -385,11 +385,11 @@ static MACHINE_CONFIG_START( jankenmn, jankenmn_state )
/* NO VIDEO */
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index 6d723807db8..daae934128e 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -1309,7 +1309,7 @@ DRIVER_INIT_MEMBER(darkhors_state,darkhors)
if (eeprom != 0x00)
{
size_t len = memregion("eeprom")->bytes();
- dynamic_buffer temp(len);
+ std::vector<UINT8> temp(len);
int i;
for (i = 0; i < len; i++)
temp[i] = eeprom[BITSWAP8(i,7,5,4,3,2,1,0,6)];
diff --git a/src/mame/drivers/joctronic.cpp b/src/mame/drivers/joctronic.cpp
index 643ed02cfda..368dafccd58 100644
--- a/src/mame/drivers/joctronic.cpp
+++ b/src/mame/drivers/joctronic.cpp
@@ -9,7 +9,6 @@
#include "cpu/z80/z80.h"
#include "machine/z80ctc.h"
#include "sound/ay8910.h"
-#include "sound/dac.h"
class joctronic_state : public genpin_class
{
diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp
index a024b893759..f24d24f85ff 100644
--- a/src/mame/drivers/juicebox.cpp
+++ b/src/mame/drivers/juicebox.cpp
@@ -13,6 +13,7 @@
#include "machine/s3c44b0.h"
#include "machine/smartmed.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#include "softlist.h"
@@ -34,13 +35,11 @@ public:
juicebox_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
m_s3c44b0(*this, "s3c44b0"),
m_smartmedia(*this, "smartmedia")
{ }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
required_device<s3c44b0_device> m_s3c44b0;
required_device<smartmedia_image_device> m_smartmedia;
UINT32 port[9];
@@ -240,18 +239,11 @@ WRITE32_MEMBER(juicebox_state::juicebox_nand_w)
if (ACCESSING_BITS_24_31) smc_write((data >> 24) & 0xFF);
}
-// I2S
-
-WRITE16_MEMBER(juicebox_state::s3c44b0_i2s_data_w )
-{
- m_dac->write_signed16(data ^ 0x8000);
-}
-
// ...
INPUT_CHANGED_MEMBER(juicebox_state::port_changed)
{
- m_s3c44b0->request_eint((FPTR)param);
+ m_s3c44b0->request_eint((uintptr_t)param);
}
// ...
@@ -321,15 +313,15 @@ static MACHINE_CONFIG_START( juicebox, juicebox_state )
MCFG_SCREEN_UPDATE_DEVICE("s3c44b0", s3c44b0_device, video_update)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("s3c44b0", S3C44B0, 10000000)
MCFG_S3C44B0_GPIO_PORT_R_CB(READ32(juicebox_state, s3c44b0_gpio_port_r))
MCFG_S3C44B0_GPIO_PORT_W_CB(WRITE32(juicebox_state, s3c44b0_gpio_port_w))
- MCFG_S3C44B0_I2S_DATA_W_CB(WRITE16(juicebox_state, s3c44b0_i2s_data_w))
+ MCFG_S3C44B0_I2S_DATA_W_CB(DEVWRITE16("dac", dac_word_interface, write))
MCFG_DEVICE_ADD("smartmedia", SMARTMEDIA, 0)
diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp
index af23aeba49b..a3fe2a21ede 100644
--- a/src/mame/drivers/junofrst.cpp
+++ b/src/mame/drivers/junofrst.cpp
@@ -80,17 +80,18 @@ Blitter source graphics
#include "emu.h"
+#include "includes/konamipt.h"
+#include "includes/tutankhm.h"
#include "cpu/m6809/m6809.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
+#include "machine/konami1.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/flt_rc.h"
-#include "machine/konami1.h"
-#include "includes/konamipt.h"
-#include "includes/tutankhm.h"
+#include "sound/volt_reg.h"
class junofrst_state : public tutankhm_state
@@ -333,7 +334,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mcu_io_map, AS_IO, 8, junofrst_state )
AM_RANGE(0x00, 0xff) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w)
ADDRESS_MAP_END
@@ -439,7 +440,7 @@ static MACHINE_CONFIG_START( junofrst, junofrst_state )
MCFG_SCREEN_UPDATE_DRIVER(junofrst_state, screen_update_tutankhm)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
@@ -451,15 +452,16 @@ static MACHINE_CONFIG_START( junofrst, junofrst_state )
MCFG_SOUND_ROUTE(1, "filter.0.1", 0.30)
MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_FILTER_RC_ADD("filter.0.0", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_FILTER_RC_ADD("filter.0.1", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_FILTER_RC_ADD("filter.0.2", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kas89.cpp b/src/mame/drivers/kas89.cpp
index e7f7c8305f7..206c51dfff5 100644
--- a/src/mame/drivers/kas89.cpp
+++ b/src/mame/drivers/kas89.cpp
@@ -842,7 +842,7 @@ DRIVER_INIT_MEMBER(kas89_state,kas89)
}
/* Unscrambling address lines */
- dynamic_buffer buf(memsize);
+ std::vector<UINT8> buf(memsize);
memcpy(&buf[0], mem, memsize);
for ( i = 0; i < memsize; i++ )
{
diff --git a/src/mame/drivers/kchamp.cpp b/src/mame/drivers/kchamp.cpp
index 84a9831a699..e8f9b0deec9 100644
--- a/src/mame/drivers/kchamp.cpp
+++ b/src/mame/drivers/kchamp.cpp
@@ -65,10 +65,10 @@ IO ports and memory map changes. Dip switches differ too.
***************************************************************************/
#include "emu.h"
+#include "includes/kchamp.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
-#include "sound/dac.h"
-#include "includes/kchamp.h"
+#include "sound/volt_reg.h"
/********************
@@ -156,8 +156,8 @@ WRITE8_MEMBER(kchamp_state::kc_sound_control_w)
{
if (offset == 0)
m_sound_nmi_enable = ((data >> 7) & 1);
-// else
-// DAC_set_volume(0, (data == 1) ? 255 : 0, 0);
+ else
+ m_dac->set_output_gain(0, BIT(data,0) ? 1.0 : 0);
}
static ADDRESS_MAP_START( kchamp_map, AS_PROGRAM, 8, kchamp_state )
@@ -188,7 +188,7 @@ static ADDRESS_MAP_START( kchamp_sound_io_map, AS_IO, 8, kchamp_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
- AM_RANGE(0x04, 0x04) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x04, 0x04) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x05, 0x05) AM_WRITE(kc_sound_control_w)
AM_RANGE(0x06, 0x06) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -428,20 +428,20 @@ static MACHINE_CONFIG_START( kchampvs, kchamp_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("msm", MSM5205, 375000) /* verified on pcb, discrete circuit clock */
MCFG_MSM5205_VCLK_CB(WRITELINE(kchamp_state, msmint)) /* interrupt function */
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S96_4B) /* 1 / 96 = 3906.25Hz playback */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
/********************
@@ -480,18 +480,19 @@ static MACHINE_CONFIG_START( kchamp, kchamp_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) /* guess: using volume 0.50 makes the sound to clip a lot */
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kim1.cpp b/src/mame/drivers/kim1.cpp
index 50e3e36ef2c..a599c7959b4 100644
--- a/src/mame/drivers/kim1.cpp
+++ b/src/mame/drivers/kim1.cpp
@@ -253,11 +253,6 @@ static MACHINE_CONFIG_START( kim1, kim1_state )
// video hardware
MCFG_DEFAULT_LAYOUT( layout_kim1 )
- // sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-
// devices
MCFG_DEVICE_ADD("miot_u2", MOS6530, 1000000)
MCFG_MOS6530_IN_PA_CB(READ8(kim1_state, kim1_u2_read_a))
diff --git a/src/mame/drivers/kingobox.cpp b/src/mame/drivers/kingobox.cpp
index 3fc9c6f496c..de077e75212 100644
--- a/src/mame/drivers/kingobox.cpp
+++ b/src/mame/drivers/kingobox.cpp
@@ -18,10 +18,11 @@ Main CPU:
***************************************************************************/
#include "emu.h"
+#include "includes/kingobox.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/kingobox.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(kingofb_state::video_interrupt_w)
{
@@ -92,7 +93,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( kingobox_sound_io_map, AS_IO, 8, kingofb_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w)
AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("aysnd", ay8910_device, address_w)
ADDRESS_MAP_END
@@ -137,7 +138,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( ringking_sound_io_map, AS_IO, 8, kingofb_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x02, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
ADDRESS_MAP_END
@@ -494,16 +495,17 @@ static MACHINE_CONFIG_START( kingofb, kingofb_state )
MCFG_VIDEO_START_OVERRIDE(kingofb_state,kingofb)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -547,16 +549,17 @@ static MACHINE_CONFIG_START( ringking, kingofb_state )
MCFG_VIDEO_START_OVERRIDE(kingofb_state,ringking)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, 1500000)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ksayakyu.cpp b/src/mame/drivers/ksayakyu.cpp
index 15707b5314d..d54dedb4657 100644
--- a/src/mame/drivers/ksayakyu.cpp
+++ b/src/mame/drivers/ksayakyu.cpp
@@ -66,10 +66,11 @@ SRAM:
*/
#include "emu.h"
+#include "includes/ksayakyu.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/ksayakyu.h"
+#include "sound/volt_reg.h"
#define MAIN_CLOCK XTAL_18_432MHz
@@ -127,7 +128,7 @@ static ADDRESS_MAP_START( soundcpu_map, AS_PROGRAM, 8, ksayakyu_state )
AM_RANGE(0xa001, 0xa001) AM_DEVREAD("ay1", ay8910_device, data_r)
AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
AM_RANGE(0xa006, 0xa007) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
- AM_RANGE(0xa008, 0xa008) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xa008, 0xa008) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xa00c, 0xa00c) AM_WRITE(tomaincpu_w)
AM_RANGE(0xa010, 0xa010) AM_WRITENOP //a timer of some sort?
ADDRESS_MAP_END
@@ -274,22 +275,23 @@ static MACHINE_CONFIG_START( ksayakyu, ksayakyu_state )
MCFG_PALETTE_INIT_OWNER(ksayakyu_state, ksayakyu)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, MAIN_CLOCK/16) //unknown clock
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ksayakyu_state, dummy1_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, MAIN_CLOCK/16) //unknown clock
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(ksayakyu_state, dummy2_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(ksayakyu_state, dummy3_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( ksayakyu )
diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp
index 946d22200c8..fcb7a3df640 100644
--- a/src/mame/drivers/laserbat.cpp
+++ b/src/mame/drivers/laserbat.cpp
@@ -504,7 +504,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state )
MCFG_PALETTE_INIT_OWNER(laserbat_state, laserbat)
// sound board devices
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("csg", SN76477, 0) // audio output not used
MCFG_SN76477_NOISE_PARAMS(RES_K(47), RES_K(270), CAP_P(1000)) // R21, switchable R30/R23/R24/R25/R29/R28/R27/R26, C21
@@ -522,10 +522,10 @@ static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state )
MCFG_SN76477_ENABLE(0) // AB SOUND
MCFG_TMS3615_ADD("synth_low", XTAL_4MHz/16/2) // from the other one's /2 clock output
- MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0)
+ MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "speaker", 1.0)
MCFG_TMS3615_ADD("synth_high", XTAL_4MHz/16) // 4MHz divided down with a 74LS161
- MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0)
+ MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -536,9 +536,9 @@ static MACHINE_CONFIG_DERIVED_CLASS( catnmous, laserbat_base, catnmous_state )
MCFG_PALETTE_INIT_OWNER(catnmous_state, catnmous)
// sound board devices
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_ZACCARIA_1B11107("audiopcb")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("audiopcb", ZACCARIA_1B11107, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/lasso.cpp b/src/mame/drivers/lasso.cpp
index 3451fe1d5bd..935a0bc6cc8 100644
--- a/src/mame/drivers/lasso.cpp
+++ b/src/mame/drivers/lasso.cpp
@@ -31,11 +31,12 @@ DIP locations verified for:
***************************************************************************/
#include "emu.h"
+#include "includes/lasso.h"
#include "cpu/m6502/m6502.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
-#include "includes/lasso.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
INPUT_CHANGED_MEMBER(lasso_state::coin_inserted)
@@ -160,7 +161,7 @@ static ADDRESS_MAP_START( wwjgtin_audio_map, AS_PROGRAM, 8, lasso_state )
AM_RANGE(0x4000, 0x7fff) AM_MIRROR(0x8000) AM_ROM
AM_RANGE(0xb000, 0xb000) AM_WRITEONLY AM_SHARE("chip_data")
AM_RANGE(0xb001, 0xb001) AM_WRITE(sound_select_w)
- AM_RANGE(0xb003, 0xb003) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xb003, 0xb003) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xb004, 0xb004) AM_READ(sound_status_r)
AM_RANGE(0xb005, 0xb005) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -501,15 +502,15 @@ static MACHINE_CONFIG_START( base, lasso_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", lasso)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("sn76489.1", SN76489, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("sn76489.2", SN76489, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( lasso, base )
@@ -563,8 +564,9 @@ static MACHINE_CONFIG_DERIVED( wwjgtin, base )
MCFG_VIDEO_START_OVERRIDE(lasso_state,wwjgtin)
/* sound hardware */
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pinbo, base )
@@ -591,10 +593,10 @@ static MACHINE_CONFIG_DERIVED( pinbo, base )
MCFG_DEVICE_REMOVE("sn76489.2")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_18MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.55)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_18MHz/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.55)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/lazercmd.cpp b/src/mame/drivers/lazercmd.cpp
index f78dd9488cd..df7f7d26933 100644
--- a/src/mame/drivers/lazercmd.cpp
+++ b/src/mame/drivers/lazercmd.cpp
@@ -235,6 +235,7 @@
#include "emu.h"
#include "includes/lazercmd.h"
+#include "sound/volt_reg.h"
// color overlays, bbonk does not have an overlay
#include "lazercmd.lh"
@@ -309,11 +310,10 @@ WRITE8_MEMBER(lazercmd_state::lazercmd_hardware_w)
switch (offset)
{
case 0: /* audio channels */
- m_dac_data = (data & 0x80) ^ ((data & 0x40) << 1) ^ ((data & 0x20) << 2) ^ ((data & 0x10) << 3);
- if (m_dac_data)
- m_dac->write_unsigned8(0xff);
- else
- m_dac->write_unsigned8(0);
+ m_dac0->write(BIT(data, 7));
+ m_dac1->write(BIT(data, 6));
+ m_dac2->write(BIT(data, 5));
+ m_dac3->write(BIT(data, 4));
break;
case 1: /* marker Y position */
m_marker_y = data;
@@ -335,11 +335,8 @@ WRITE8_MEMBER(lazercmd_state::medlanes_hardware_w)
/* bits 4 and 5 are used to control a sound board */
/* these could be used to control sound samples */
/* at the moment they are routed through the dac */
- m_dac_data = ((data & 0x20) << 2) ^ ((data & 0x10) << 3);
- if (m_dac_data)
- m_dac->write_unsigned8(0xff);
- else
- m_dac->write_unsigned8(0);
+ m_dac2->write(BIT(data, 5));
+ m_dac3->write(BIT(data, 4));
break;
case 1: /* marker Y position */
m_marker_y = data;
@@ -361,11 +358,8 @@ WRITE8_MEMBER(lazercmd_state::bbonk_hardware_w)
/* bits 4 and 5 are used to control a sound board */
/* these could be used to control sound samples */
/* at the moment they are routed through the dac */
- m_dac_data = ((data & 0x20) << 2) ^ ((data & 0x10) << 3);
- if (m_dac_data)
- m_dac->write_unsigned8(0xff);
- else
- m_dac->write_unsigned8(0);
+ m_dac2->write(BIT(data, 5));
+ m_dac3->write(BIT(data, 4));
break;
case 3: /* D5 inverts video?, D4 clears coin detected and D0 toggles on attract mode */
m_attract = data;
@@ -613,7 +607,6 @@ void lazercmd_state::machine_start()
save_item(NAME(m_marker_y));
save_item(NAME(m_timer_count));
save_item(NAME(m_sense_state));
- save_item(NAME(m_dac_data));
save_item(NAME(m_attract));
}
@@ -623,7 +616,6 @@ void lazercmd_state::machine_reset()
m_marker_y = 0;
m_timer_count = 0;
m_sense_state = 0;
- m_dac_data = 0;
m_attract = 0;
}
@@ -654,10 +646,16 @@ static MACHINE_CONFIG_START( lazercmd, lazercmd_state )
MCFG_PALETTE_INIT_OWNER(lazercmd_state, lazercmd)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac1", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -687,10 +685,12 @@ static MACHINE_CONFIG_START( medlanes, lazercmd_state )
MCFG_PALETTE_INIT_OWNER(lazercmd_state, lazercmd)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
@@ -720,10 +720,12 @@ static MACHINE_CONFIG_START( bbonk, lazercmd_state )
MCFG_PALETTE_INIT_OWNER(lazercmd_state, lazercmd)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac2", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_SOUND_ADD("dac3", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/legionna.cpp b/src/mame/drivers/legionna.cpp
index 08c4480e40b..814603b9900 100644
--- a/src/mame/drivers/legionna.cpp
+++ b/src/mame/drivers/legionna.cpp
@@ -1053,7 +1053,7 @@ void legionna_state::descramble_legionnaire_gfx(UINT8* src)
int len = 0x10000;
/* rearrange gfx */
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
{
int i;
for (i = 0;i < len; i++)
diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp
index aa59e32d783..51b5a0d0384 100644
--- a/src/mame/drivers/leland.cpp
+++ b/src/mame/drivers/leland.cpp
@@ -59,12 +59,12 @@
***************************************************************************/
#include "emu.h"
+#include "includes/leland.h"
#include "cpu/i86/i186.h"
+#include "cpu/z80/z80.h"
#include "machine/eepromser.h"
#include "machine/nvram.h"
-#include "cpu/z80/z80.h"
-#include "includes/leland.h"
-#include "sound/ay8910.h"
+#include "sound/volt_reg.h"
/* Master Clock2 is for Asylum, Ataxx, Brute Force, Danny Sullivan's Indy Heat, World Soccer Finals */
@@ -935,26 +935,6 @@ INPUT_PORTS_END
/*************************************
*
- * Sound definitions
- *
- *************************************/
-
-/*
- 2 AY8910 chips - Actually, one of these is an 8912
- (8910 with only 1 output port)
-
- Port A of both chips is connected to a banking control
- register.
-
- All 6 (3*2) AY-3-8910/12 outputs are tied together
- and put with 1000 Ohm to gnd.
- The following is a approximation, since
- it does not take cross-chip mixing effects into account.
-*/
-
-
-/*************************************
- *
* Machine driver
*
*************************************/
@@ -980,26 +960,28 @@ static MACHINE_CONFIG_START( leland, leland_state )
/* video hardware */
MCFG_FRAGMENT_ADD(leland_video)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_SOUND_ADD("ay8910.1", AY8910, 10000000/6)
+ // only one of the AY sockets is populated
+ MCFG_SOUND_ADD("ay8910", AY8910, 10000000/6)
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
MCFG_AY8910_RES_LOADS(1000, 0, 0)
MCFG_AY8910_PORT_A_READ_CB(READ8(leland_state, leland_sound_port_r))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(leland_state, leland_sound_port_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- MCFG_SOUND_ADD("ay8910.2", AY8910, 10000000/6)
- MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
- MCFG_AY8910_RES_LOADS(1000, 0, 0)
- MCFG_AY8910_PORT_A_READ_CB(READ8(leland_state, leland_sound_port_r))
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(leland_state, leland_sound_port_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- MCFG_SOUND_ADD("dac0", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+
+// MCFG_SOUND_ADD("ay8912", AY8912, 10000000/6)
+// MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
+// MCFG_AY8910_RES_LOADS(1000, 0, 0)
+// MCFG_AY8910_PORT_A_READ_CB(READ8(leland_state, leland_sound_port_r))
+// MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(leland_state, leland_sound_port_w))
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+
+ MCFG_SOUND_ADD("dac0", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u79 + r17-r23 (24k,12k,6.2k,3k,1.5k,750,390,180)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625) // ls374.u88 + r27-r34 (24k,12k,6.2k,3k,1.5k,750,390,180)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp
index a57effa73f6..122f7f0f889 100644
--- a/src/mame/drivers/littlerb.cpp
+++ b/src/mame/drivers/littlerb.cpp
@@ -68,8 +68,9 @@ Dip sw.2
#include "emu.h"
#include "cpu/m68000/m68000.h"
-#include "sound/dac.h"
#include "machine/inder_vid.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
class littlerb_state : public driver_device
{
@@ -78,21 +79,17 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_indervid(*this, "inder_vid"),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_soundframe(0)
{
}
-
-
-
required_device<cpu_device> m_maincpu;
required_device<inder_vid_device> m_indervid;
-
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
UINT8 m_sound_index_l,m_sound_index_r;
UINT16 m_sound_pointer_l,m_sound_pointer_r;
int m_soundframe;
@@ -235,13 +232,10 @@ INPUT_PORTS_END
TIMER_DEVICE_CALLBACK_MEMBER(littlerb_state::littlerb_sound_cb)
{
- UINT8 res;
UINT8 *sample_rom = memregion("samples")->base();
- res = sample_rom[m_sound_pointer_l|(m_sound_index_l<<10)|0x40000];
- m_dacl->write_signed8(res);
- res = sample_rom[m_sound_pointer_r|(m_sound_index_r<<10)|0x00000];
- m_dacr->write_signed8(res);
+ m_ldac->write(sample_rom[m_sound_pointer_l | (m_sound_index_l << 10) | 0x40000]);
+ m_rdac->write(sample_rom[m_sound_pointer_r | (m_sound_index_r << 10) | 0x00000]);
m_sound_pointer_l++;
m_sound_pointer_l&=0x3ff;
m_sound_pointer_r++;
@@ -265,11 +259,11 @@ static MACHINE_CONFIG_START( littlerb, littlerb_state )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
- MCFG_DAC_ADD("dacl")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
-
- MCFG_DAC_ADD("dacr")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( littlerb )
diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp
index e6e2f558c82..e7c6a4691b9 100644
--- a/src/mame/drivers/looping.cpp
+++ b/src/mame/drivers/looping.cpp
@@ -55,6 +55,7 @@ L056-6 9A " " VLI-8-4 7A "
*/
#include "emu.h"
+#include "cpu/cop400/cop400.h"
#include "cpu/tms9900/tms9995.h"
#include "cpu/tms9900/tms9980a.h"
#include "machine/gen_latch.h"
@@ -62,8 +63,8 @@ L056-6 9A " " VLI-8-4 7A "
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/tms5220.h"
+#include "sound/volt_reg.h"
#include "video/resnet.h"
-#include "cpu/cop400/cop400.h"
/*************************************
@@ -161,7 +162,7 @@ public:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
@@ -419,7 +420,7 @@ WRITE8_MEMBER(looping_state::looping_sound_sw)
*/
m_sound[offset + 1] = data ^ 1;
- m_dac->write_unsigned8(((m_sound[2] << 7) + (m_sound[3] << 6)) * m_sound[7]);
+ m_dac->write(((m_sound[2] << 1) + m_sound[3]) * m_sound[7]);
}
@@ -649,20 +650,21 @@ static MACHINE_CONFIG_START( looping, looping_state )
MCFG_PALETTE_INIT_OWNER(looping_state, looping)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, SOUND_CLOCK/4)
MCFG_AY8910_PORT_A_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2)
MCFG_SOUND_ADD("tms", TMS5220, TMS_CLOCK)
MCFG_TMS52XX_IRQ_HANDLER(WRITELINE(looping_state, looping_spcint))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/lynx.cpp b/src/mame/drivers/lynx.cpp
index d878481b464..b6d6fa5349d 100644
--- a/src/mame/drivers/lynx.cpp
+++ b/src/mame/drivers/lynx.cpp
@@ -152,7 +152,7 @@ ROM_END
QUICKLOAD_LOAD_MEMBER( lynx_state, lynx )
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- dynamic_buffer data;
+ std::vector<UINT8> data;
UINT8 *rom = memregion("maincpu")->base();
UINT8 header[10]; // 80 08 dw Start dw Len B S 9 3
UINT16 start, length;
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp
index 0280a91cc60..98cefc79b33 100644
--- a/src/mame/drivers/m72.cpp
+++ b/src/mame/drivers/m72.cpp
@@ -184,14 +184,15 @@ other supported games as well.
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/m72.h"
+#include "includes/iremipt.h"
+#include "cpu/mcs51/mcs51.h"
#include "cpu/nec/nec.h"
#include "cpu/nec/v25.h"
+#include "cpu/z80/z80.h"
#include "machine/irem_cpu.h"
#include "sound/ym2151.h"
-#include "includes/iremipt.h"
-#include "includes/m72.h"
-#include "cpu/mcs51/mcs51.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK XTAL_32MHz
#define SOUND_CLOCK XTAL_3_579545MHz
@@ -480,7 +481,7 @@ DRIVER_INIT_MEMBER(m72_state,m72_8751)
io.install_write_handler(0xc0, 0xc1, write16_delegate(FUNC(m72_state::main_mcu_sound_w),this));
/* sound cpu */
- sndio.install_write_handler(0x82, 0x82, write8_delegate(FUNC(dac_device::write_unsigned8),(dac_device*)m_dac));
+ sndio.install_write_handler(0x82, 0x82, write8_delegate(FUNC(dac_byte_interface::write),(dac_byte_interface *)m_dac));
sndio.install_read_handler (0x84, 0x84, read8_delegate(FUNC(m72_state::snd_cpu_sample_r),this));
/* lohtb2 */
@@ -1869,18 +1870,19 @@ GFXDECODE_END
static MACHINE_CONFIG_FRAGMENT( m72_audio_chips )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_SOUND_ADD("m72", M72, 0);
+ MCFG_SOUND_ADD("m72", M72, 0)
MCFG_YM2151_ADD("ymsnd", SOUND_CLOCK)
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("m72", m72_audio_device, ym2151_irq_handler))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( m72_base, m72_state )
@@ -1923,7 +1925,6 @@ static MACHINE_CONFIG_DERIVED( m72_8751, m72_base )
MCFG_CPU_ADD("mcu",I8751, XTAL_8MHz) /* Uses its own XTAL */
MCFG_CPU_IO_MAP(mcu_io_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", m72_state, mcu_int)
-
MACHINE_CONFIG_END
@@ -1935,6 +1936,7 @@ static MACHINE_CONFIG_DERIVED( rtype, m72_base )
MCFG_CPU_IO_MAP(rtype_sound_portmap)
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( m72_xmultipl, m72_8751 )
diff --git a/src/mame/drivers/m90.cpp b/src/mame/drivers/m90.cpp
index 766cd377685..6658e5c0e53 100644
--- a/src/mame/drivers/m90.cpp
+++ b/src/mame/drivers/m90.cpp
@@ -19,14 +19,15 @@
*****************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/m90.h"
+#include "includes/iremipt.h"
#include "cpu/nec/nec.h"
#include "cpu/nec/v25.h"
-#include "includes/iremipt.h"
+#include "cpu/z80/z80.h"
#include "machine/irem_cpu.h"
#include "sound/dac.h"
#include "sound/ym2151.h"
-#include "includes/m90.h"
+#include "sound/volt_reg.h"
/***************************************************************************/
@@ -142,7 +143,7 @@ static ADDRESS_MAP_START( dynablsb_sound_cpu_io_map, AS_IO, 8, m90_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0x80, 0x80) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0x82, 0x82) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x82, 0x82) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
static ADDRESS_MAP_START( m99_sound_cpu_io_map, AS_IO, 8, m90_state )
@@ -742,7 +743,7 @@ static MACHINE_CONFIG_START( m90, m90_state )
MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
@@ -750,11 +751,12 @@ static MACHINE_CONFIG_START( m90, m90_state )
MCFG_YM2151_ADD("ymsnd", XTAL_3_579545MHz) /* verified on pcb */
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("m72", m72_audio_device, ym2151_irq_handler))
- MCFG_SOUND_ROUTE(0, "mono", 0.15)
- MCFG_SOUND_ROUTE(1, "mono", 0.15)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.15)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.15)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp
index 321d8208dea..4b88606d1f9 100644
--- a/src/mame/drivers/mac.cpp
+++ b/src/mame/drivers/mac.cpp
@@ -46,21 +46,18 @@
#include "emu.h"
+#include "includes/mac.h"
#include "cpu/m68000/m68000.h"
#include "cpu/powerpc/ppc.h"
#include "cpu/m6805/m6805.h"
-#include "machine/6522via.h"
#include "machine/applefdc.h"
#include "machine/swim.h"
#include "machine/sonydriv.h"
#include "formats/ap_dsk35.h"
-#include "machine/ram.h"
#include "bus/scsi/scsi.h"
#include "bus/scsi/scsihd.h"
#include "bus/scsi/scsicd.h"
-#include "sound/asc.h"
-#include "sound/awacs.h"
-#include "sound/cdda.h"
+#include "sound/volt_reg.h"
// NuBus and 030/040 PDS cards
#include "bus/nubus/nubus_48gc.h"
@@ -83,7 +80,6 @@
// 68000 PDS cards
#include "bus/macpds/pds_tpdfpd.h"
-#include "includes/mac.h"
#include "machine/macadb.h"
#include "softlist.h"
#include "mac.lh"
@@ -574,31 +570,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(mac_state::mac_scanline)
{
int scanline = param;
UINT16 *mac_snd_buf_ptr;
- UINT16 last_val;
- if (m_snd_enable)
+ if (m_main_buffer)
{
- if (m_main_buffer)
- {
- mac_snd_buf_ptr = (UINT16 *)(m_ram->pointer() + m_ram->size() - MAC_MAIN_SND_BUF_OFFSET);
- }
- else
- {
- mac_snd_buf_ptr = (UINT16 *)(m_ram->pointer() + m_ram->size() - MAC_ALT_SND_BUF_OFFSET);
- }
-
- last_val = (UINT8)((mac_snd_buf_ptr[scanline] >> 8) & 0xff);
+ mac_snd_buf_ptr = (UINT16 *)(m_ram->pointer() + m_ram->size() - MAC_MAIN_SND_BUF_OFFSET);
}
else
{
- last_val = 0x80;
+ mac_snd_buf_ptr = (UINT16 *)(m_ram->pointer() + m_ram->size() - MAC_ALT_SND_BUF_OFFSET);
}
- // apply 0-7 volume
- last_val *= m_snd_vol;
- last_val <<= 5;
-
- m_dac->write_unsigned16(last_val);
+ m_dac->write(mac_snd_buf_ptr[scanline] >> 8);
}
@@ -945,10 +927,10 @@ static MACHINE_CONFIG_START( mac512ke, mac_state )
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mac_state, mac_scanline, "screen", 0, 1)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- //MCFG_SOUND_ADD("custom", MAC_SOUND, 0)
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_PWM, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // 2 x ls161
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* devices */
MCFG_RTC3430042_ADD("rtc", XTAL_32_768kHz)
diff --git a/src/mame/drivers/magicfly.cpp b/src/mame/drivers/magicfly.cpp
index a447a05781c..479574b3d90 100644
--- a/src/mame/drivers/magicfly.cpp
+++ b/src/mame/drivers/magicfly.cpp
@@ -445,9 +445,10 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
-#include "video/mc6845.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/mc6845.h"
class magicfly_state : public driver_device
@@ -477,7 +478,7 @@ public:
DECLARE_VIDEO_START(7mezzo);
UINT32 screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
};
@@ -658,7 +659,7 @@ WRITE8_MEMBER(magicfly_state::mux_port_w)
*/
m_input_selector = data & 0x0f; /* Input Selector */
- m_dac->write_unsigned8(data & 0x80); /* Sound DAC */
+ m_dac->write(BIT(data, 7)); /* Sound DAC */
machine().bookkeeping().coin_counter_w(0, data & 0x40); /* Coin1 */
machine().bookkeeping().coin_counter_w(1, data & 0x10); /* Coin2 */
@@ -956,10 +957,10 @@ static MACHINE_CONFIG_START( magicfly, magicfly_state )
MCFG_MC6845_CHAR_WIDTH(8)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp
index 784d951bca5..92c8cc959c8 100644
--- a/src/mame/drivers/mappy.cpp
+++ b/src/mame/drivers/mappy.cpp
@@ -549,10 +549,10 @@ TODO:
***************************************************************************/
#include "emu.h"
+#include "includes/mappy.h"
#include "cpu/m6809/m6809.h"
#include "machine/watchdog.h"
-#include "sound/dac.h"
-#include "includes/mappy.h"
+#include "sound/volt_reg.h"
/*************************************
*
@@ -1696,11 +1696,11 @@ static MACHINE_CONFIG_FRAGMENT( superpac_common )
MCFG_VIDEO_START_OVERRIDE(mappy_state,superpac)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("namco", NAMCO_15XX, 18432000/768)
MCFG_NAMCO_AUDIO_VOICES(8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1766,8 +1766,9 @@ static MACHINE_CONFIG_START( grobda, mappy_state )
MCFG_NAMCO56XX_OUT_0_CB(WRITE8(mappy_state, out_mux))
/* sound hardware */
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.275) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1820,11 +1821,11 @@ static MACHINE_CONFIG_START( phozon, mappy_state )
MCFG_VIDEO_START_OVERRIDE(mappy_state,phozon)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("namco", NAMCO_15XX, 18432000/768)
MCFG_NAMCO_AUDIO_VOICES(8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1860,11 +1861,11 @@ static MACHINE_CONFIG_FRAGMENT( mappy_common )
MCFG_VIDEO_START_OVERRIDE(mappy_state,mappy)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("namco", NAMCO_15XX, 18432000/768)
MCFG_NAMCO_AUDIO_VOICES(8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( mappy, mappy_state )
@@ -2397,11 +2398,6 @@ ROM_END
-WRITE8_MEMBER(mappy_state::grobda_DAC_w)
-{
- m_dac->write_unsigned8((data << 4) | data);
-}
-
DRIVER_INIT_MEMBER(mappy_state,superpac)
{
m_type = GAME_SUPERPAC;
@@ -2424,7 +2420,7 @@ DRIVER_INIT_MEMBER(mappy_state,grobda)
However, removing the 15XX from the board causes sound to disappear completely, so
the DAC might be built-in after all.
*/
- m_subcpu->space(AS_PROGRAM).install_write_handler(0x0002, 0x0002, write8_delegate(FUNC(mappy_state::grobda_DAC_w),this));
+ m_subcpu->space(AS_PROGRAM).install_write_handler(0x0002, 0x0002, write8_delegate(FUNC(dac_byte_interface::write), (dac_byte_interface *)m_dac));
}
DRIVER_INIT_MEMBER(mappy_state,phozon)
diff --git a/src/mame/drivers/matmania.cpp b/src/mame/drivers/matmania.cpp
index 4b872c5a373..305c364f3b8 100644
--- a/src/mame/drivers/matmania.cpp
+++ b/src/mame/drivers/matmania.cpp
@@ -32,14 +32,14 @@ The driver has been updated accordingly.
***************************************************************************/
#include "emu.h"
+#include "includes/matmania.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6809/m6809.h"
#include "cpu/m6805/m6805.h"
+#include "sound/3526intf.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "sound/3526intf.h"
-#include "includes/matmania.h"
-
+#include "sound/volt_reg.h"
/*************************************
*
@@ -230,7 +230,7 @@ static ADDRESS_MAP_START( matmania_sound_map, AS_PROGRAM, 8, matmania_state )
AM_RANGE(0x0000, 0x01ff) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
- AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2007, 0x2007) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -238,7 +238,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( maniach_sound_map, AS_PROGRAM, 8, matmania_state )
AM_RANGE(0x0000, 0x0fff) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ymsnd", ym3526_device, write)
- AM_RANGE(0x2002, 0x2002) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x2002, 0x2002) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2004, 0x2004) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -449,18 +449,19 @@ static MACHINE_CONFIG_START( matmania, matmania_state )
MCFG_PALETTE_INIT_OWNER(matmania_state, matmania)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -530,16 +531,17 @@ static MACHINE_CONFIG_START( maniach, matmania_state )
MCFG_PALETTE_INIT_OWNER(matmania_state, matmania)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3526, 3600000)
MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", M6809_FIRQ_LINE))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mbdtower.cpp b/src/mame/drivers/mbdtower.cpp
deleted file mode 100644
index 5d756cefe63..00000000000
--- a/src/mame/drivers/mbdtower.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:hap, Sean Riddle
-/***************************************************************************
-
- ** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.cpp) **
-
- Milton Bradley Dark Tower
- * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die label MP7332
- (assume same ROM contents between revisions)
- * SN75494N MOS-to-LED digit driver
- * motorized rotating reel + lightsensor, 1bit-sound
-
- This is a board game, it obviously requires game pieces and the board.
- The emulated part is the centerpiece, a black tower with a rotating card
- panel and LED digits for displaying health, amount of gold, etc. As far
- as MAME is concerned, the game works fine.
-
- To start up the game, first press [MOVE], the machine now does a self-test.
- Then select level and number of players and the game will start. Read the
- official manual on how to play the game.
-
-***************************************************************************/
-
-#include "includes/hh_tms1k.h"
-#include "mbdtower.lh"
-
-
-class mbdtower_state : public hh_tms1k_state
-{
-public:
- mbdtower_state(const machine_config &mconfig, device_type type, const char *tag)
- : hh_tms1k_state(mconfig, type, tag)
- { }
-
- void prepare_display();
- bool sensor_led_on() { return m_display_decay[0][0] != 0; }
-
- int m_motor_pos;
- int m_motor_pos_prev;
- int m_motor_decay;
- bool m_motor_on;
- bool m_sensor_blind;
-
- TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick);
-
- DECLARE_WRITE16_MEMBER(write_r);
- DECLARE_WRITE16_MEMBER(write_o);
- DECLARE_READ8_MEMBER(read_k);
-
-protected:
- virtual void machine_start() override;
-};
-
-
-/***************************************************************************
-
- Display, Motor
-
-***************************************************************************/
-
-void mbdtower_state::prepare_display()
-{
- // declare display matrix size and the 2 7segs
- set_display_size(7, 3);
- set_display_segmask(6, 0x7f);
-
- // update current state
- if (~m_r & 0x10)
- {
- UINT8 o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
- m_display_state[2] = (m_o & 0x80) ? o : 0;
- m_display_state[1] = (m_o & 0x80) ? 0 : o;
- m_display_state[0] = (m_r >> 8 & 1) | (m_r >> 4 & 0xe);
-
- display_update();
- }
- else
- {
- // display items turned off
- display_matrix(7, 3, 0, 0);
- }
-}
-
-
-TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick)
-{
- // it rotates counter-clockwise (when viewed from above)
- if (m_motor_on)
- {
- m_motor_pos = (m_motor_pos - 1) & 0x7f;
-
- // give it some time to spin out when it's turned off
- if (m_r & 0x200)
- m_motor_decay += (m_motor_decay < 4);
- else if (m_motor_decay > 0)
- m_motor_decay--;
- else
- m_motor_on = false;
- }
-
- // 8 evenly spaced holes in the rotation disc for the sensor to 'see' through.
- // The first hole is much bigger, enabling the game to determine the position.
- if ((m_motor_pos & 0xf) < 4 || m_motor_pos < 0xc)
- m_sensor_blind = false;
- else
- m_sensor_blind = true;
-
- // on change, output info
- if (m_motor_pos != m_motor_pos_prev)
- output().set_value("motor_pos", 100 * (m_motor_pos / (float)0x80));
-
- /* 3 display cards per hole, like this:
-
- (0) <---- display increments this way <---- (7)
-
- CURSED VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void)
- LOST WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void)
- PLAGUE BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void)
- */
- int card_pos = m_motor_pos >> 4 & 7;
- if (card_pos != (m_motor_pos_prev >> 4 & 7))
- output().set_value("card_pos", card_pos);
-
- m_motor_pos_prev = m_motor_pos;
-}
-
-
-
-/***************************************************************************
-
- I/O
-
-***************************************************************************/
-
-WRITE16_MEMBER(mbdtower_state::write_r)
-{
- // R0-R2: input mux
- m_inp_mux = data & 7;
-
- // R9: motor on
- if ((m_r ^ data) & 0x200)
- output().set_value("motor_on", data >> 9 & 1);
- if (data & 0x200)
- m_motor_on = true;
-
- // R3: N/C
- // R4: 75494 /EN (speaker, lamps, digit select go through that IC)
- // R5-R7: tower lamps
- // R8: rotation sensor led
- m_r = data;
- prepare_display();
-
- // R10: speaker out
- m_speaker->level_w(~data >> 4 & data >> 10 & 1);
-}
-
-WRITE16_MEMBER(mbdtower_state::write_o)
-{
- // O0-O6: led segments A-G
- // O7: digit select
- m_o = data;
- prepare_display();
-}
-
-READ8_MEMBER(mbdtower_state::read_k)
-{
- // K: multiplexed inputs
- // K8: rotation sensor
- return read_inputs(3) | ((!m_sensor_blind && sensor_led_on()) ? 8 : 0);
-}
-
-
-
-/***************************************************************************
-
- Inputs
-
-***************************************************************************/
-
-/* physical button layout and labels is like this:
-
- (green) (l.blue) (red)
- [YES/ [REPEAT] [NO/
- BUY] END]
-
- (yellow) (blue) (white)
- [HAGGLE] [BAZAAR] [CLEAR]
-
- (blue) (blue) (blue)
- [TOMB/ [MOVE] [SANCTUARY/
- RUIN] CITADEL]
-
- (orange) (blue) (d.yellow)
- [DARK [FRONTIER] [INVENTORY]
- TOWER]
-*/
-
-static INPUT_PORTS_START( mbdtower )
- PORT_START("IN.0") // R0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Inventory")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_NAME("No/End")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Clear")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("Sanctuary/Citadel")
-
- PORT_START("IN.1") // R1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Frontier")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_NAME("Repeat")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("Bazaar")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Move")
-
- PORT_START("IN.2") // R2
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Dark Tower")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_NAME("Yes/Buy")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Haggle")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("Tomb/Ruin")
-INPUT_PORTS_END
-
-
-
-/***************************************************************************
-
- Machine Config
-
-***************************************************************************/
-
-void mbdtower_state::machine_start()
-{
- hh_tms1k_state::machine_start();
-
- // zerofill
- m_motor_pos = 0;
- m_motor_pos_prev = -1;
- m_motor_decay = 0;
- m_motor_on = false;
- m_sensor_blind = false;
-
- // register for savestates
- save_item(NAME(m_motor_pos));
- /* save_item(NAME(m_motor_pos_prev)); */ // don't save!
- save_item(NAME(m_motor_decay));
- save_item(NAME(m_motor_on));
- save_item(NAME(m_sensor_blind));
-}
-
-static MACHINE_CONFIG_START( mbdtower, mbdtower_state )
-
- /* basic machine hardware */
- MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf
- MCFG_TMS1XXX_READ_K_CB(READ8(mbdtower_state, read_k))
- MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r))
- MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tower_motor", mbdtower_state, motor_sim_tick, attotime::from_msec(3500/0x80)) // ~3.5sec for a full rotation
- MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
- MCFG_DEFAULT_LAYOUT(layout_mbdtower)
-
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
-
-
-
-/***************************************************************************
-
- Game driver(s)
-
-***************************************************************************/
-
-ROM_START( mbdtower )
- ROM_REGION( 0x1000, "maincpu", 0 )
- ROM_LOAD( "mp7332", 0x0000, 0x1000, CRC(ebeab91a) SHA1(7edbff437da371390fa8f28b3d183f833eaa9be9) )
-
- ROM_REGION( 867, "maincpu:mpla", 0 )
- ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
- ROM_REGION( 557, "maincpu:opla", 0 )
- ROM_LOAD( "tms1400_mbdtower_output.pla", 0, 557, CRC(64c84697) SHA1(72ce6d24cedf9c606f1742cd5620f75907246e87) )
-ROM_END
-
-
-CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_MECHANICAL )
diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp
index 5451c6ea12e..1817a096725 100644
--- a/src/mame/drivers/mc10.cpp
+++ b/src/mame/drivers/mc10.cpp
@@ -9,13 +9,14 @@
#include "emu.h"
#include "cpu/m6800/m6800.h"
-#include "sound/dac.h"
-#include "video/mc6847.h"
-#include "video/ef9345.h"
+#include "formats/coco_cas.h"
#include "imagedev/cassette.h"
#include "imagedev/printer.h"
-#include "formats/coco_cas.h"
#include "machine/ram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/mc6847.h"
+#include "video/ef9345.h"
#include "softlist.h"
//printer state
@@ -48,7 +49,7 @@ public:
required_device<m6803_cpu_device> m_maincpu;
optional_device<mc6847_base_device> m_mc6847;
optional_device<ef9345_device> m_ef9345;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<ram_device> m_ram;
required_device<cassette_image_device> m_cassette;
required_device<printer_image_device> m_printer;
@@ -131,13 +132,13 @@ WRITE8_MEMBER( mc10_state::mc10_bfff_w )
m_mc6847->css_w(BIT(data, 6));
/* bit 7, dac output */
- m_dac->write_unsigned8(BIT(data, 7));
+ m_dac->write(BIT(data, 7));
}
WRITE8_MEMBER( mc10_state::alice32_bfff_w )
{
/* bit 7, dac output */
- m_dac->write_unsigned8(BIT(data, 7));
+ m_dac->write(BIT(data, 7));
}
@@ -490,9 +491,10 @@ static MACHINE_CONFIG_START( mc10, mc10_state )
MCFG_MC6847_INPUT_CALLBACK(READ8(mc10_state, mc6847_videoram_r))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_FORMATS(coco_cassette_formats)
@@ -531,9 +533,10 @@ static MACHINE_CONFIG_START( alice32, mc10_state )
MCFG_TIMER_DRIVER_ADD_SCANLINE("alice32_sl", mc10_state, alice32_scanline, "screen", 0, 10)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_FORMATS(alice32_cassette_formats)
diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp
index f95392d9bc3..9f02ea9d8b6 100644
--- a/src/mame/drivers/mcr.cpp
+++ b/src/mame/drivers/mcr.cpp
@@ -1791,7 +1791,7 @@ static MACHINE_CONFIG_START( mcr_90009, mcr_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_MIDWAY_SSIO_ADD("ssio")
+ MCFG_SOUND_ADD("ssio", MIDWAY_SSIO, 0)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1868,7 +1868,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mcr_91490_snt, mcr_91490 )
/* basic machine hardware */
- MCFG_MIDWAY_SQUAWK_N_TALK_ADD("snt")
+ MCFG_SOUND_ADD("snt", MIDWAY_SQUAWK_N_TALK, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1907,7 +1907,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mcr_91490_tcs, mcr_91490 )
/* basic machine hardware */
- MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs")
+ MCFG_SOUND_ADD("tcs", MIDWAY_TURBO_CHIP_SQUEAK, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -2036,13 +2036,9 @@ ROM_START( dpoker )
ROM_LOAD( "vppp.d6", 0x5000, 0x1000, CRC(b0023bf1) SHA1(77a57a42dd403ef56f334ca295b5b43e94b99598) )
ROM_LOAD( "vppp.d7", 0x6000, 0x1000, CRC(a4012f5a) SHA1(011e77a6634fbb02a6ae99fe6685c92f2fad3fee) )
- // The sound board was missing in this pcb set, we'll use the roms from Kick as placeholder.
- // Funnily enough, according to a cabinet recording, the sound is actually very similar to Kickman.
- ROM_REGION( 0x10000, "ssio:cpu", 0 )
- ROM_LOAD( "vssp.a7", 0x0000, 0x1000, BAD_DUMP CRC(9e35c02e) SHA1(92afd0126dcfb2d4401927b2cf261090e186b6fa) )
- ROM_LOAD( "vssp.a8", 0x1000, 0x1000, BAD_DUMP CRC(ca2b7c28) SHA1(fdcca3b755822c045c3c321cccc3f58112e2ad11) )
- ROM_LOAD( "vssp.a9", 0x2000, 0x1000, BAD_DUMP CRC(d1901551) SHA1(fd7d6059f8ac59f95ae6f8ef12fbfce7ed16ec12) )
- ROM_LOAD( "vssp.a10", 0x3000, 0x1000, BAD_DUMP CRC(d36ddcdc) SHA1(2d3ec83b9fa5a9d309c393a0c3ee45f0ba8192c9) )
+ ROM_REGION( 0x10000, "ssio:cpu", ROMREGION_ERASEFF ) // a9 and a10 are unpopulated
+ ROM_LOAD( "vssp.a7", 0x0000, 0x1000, CRC(f78b2283) SHA1(b69f987112f82c92f5cf38ca2577195a4972cc47) )
+ ROM_LOAD( "vssp.a8", 0x1000, 0x1000, CRC(3f531bd0) SHA1(0e860bb5af83985b7143abdab5715f46c6a1e804) )
ROM_REGION( 0x02000, "gfx1", 0 )
ROM_LOAD( "vpbg.g4", 0x0000, 0x1000, CRC(9fe9aad8) SHA1(f9174bcce3886548b8c18c5a06995d5c69ce5486) )
@@ -2930,7 +2926,7 @@ GAME( 1981, solarfox, 0, mcr_90009, solarfox, mcr_state, solarfox, R
GAME( 1981, kick, 0, mcr_90009, kick, mcr_state, kick, ORIENTATION_SWAP_XY, "Midway", "Kick (upright)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, kickman, kick, mcr_90009, kick, mcr_state, kick, ORIENTATION_SWAP_XY, "Midway", "Kickman (upright)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, kickc, kick, mcr_90009, kickc, mcr_state, kick, ROT90, "Midway", "Kick (cocktail)", MACHINE_SUPPORTS_SAVE )
-GAMEL(1985, dpoker, 0, mcr_90009_dp, dpoker, mcr_state, dpoker, ROT0, "Bally", "Draw Poker (Bally, 03-20)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_dpoker )
+GAMEL(1985, dpoker, 0, mcr_90009_dp, dpoker, mcr_state, dpoker, ROT0, "Bally", "Draw Poker (Bally, 03-20)", MACHINE_SUPPORTS_SAVE, layout_dpoker )
/* 90010 CPU board + 91399 video gen + 90913 sound I/O */
GAME( 1981, shollow, 0, mcr_90010, shollow, mcr_state, mcr_90010, ROT90, "Bally Midway", "Satan's Hollow (set 1)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index f0c4804d4f6..0dda83ab1b3 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -1126,7 +1126,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mono_tcs, mcrmono )
/* basic machine hardware */
- MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs")
+ MCFG_SOUND_ADD("tcs", MIDWAY_TURBO_CHIP_SQUEAK, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1136,7 +1136,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mono_sg, mcrmono )
/* basic machine hardware */
- MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg")
+ MCFG_SOUND_ADD("sg", MIDWAY_SOUNDS_GOOD, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1149,7 +1149,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mcrscroll, mcrmono )
/* basic machine hardware */
- MCFG_MIDWAY_SSIO_ADD("ssio")
+ MCFG_SOUND_ADD("ssio", MIDWAY_SSIO, 0)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
@@ -1175,7 +1175,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mcrsc_csd, mcrscroll )
/* basic machine hardware */
- MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD("csd")
+ MCFG_SOUND_ADD("csd", MIDWAY_CHIP_SQUEAK_DELUXE, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp
index ede36d0e4f2..5b14fffa3ea 100644
--- a/src/mame/drivers/mcr68.cpp
+++ b/src/mame/drivers/mcr68.cpp
@@ -1059,9 +1059,9 @@ static MACHINE_CONFIG_START( zwackery, mcr68_state )
MCFG_VIDEO_START_OVERRIDE(mcr68_state,zwackery)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_MIDWAY_CHIP_SQUEAK_DELUXE_ADD("csd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("csd", MIDWAY_CHIP_SQUEAK_DELUXE, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1093,22 +1093,22 @@ static MACHINE_CONFIG_START( mcr68, mcr68_state )
MCFG_VIDEO_START_OVERRIDE(mcr68_state,mcr68)
/* sound hardware -- determined by specific machine */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( xenophob, mcr68 )
/* basic machine hardware */
- MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("sg", MIDWAY_SOUNDS_GOOD, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( intlaser, mcr68 )
/* basic machine hardware */
- MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("sg", MIDWAY_SOUNDS_GOOD, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_WATCHDOG_MODIFY("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 800)
@@ -1118,26 +1118,26 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( spyhunt2, mcr68 )
/* basic machine hardware */
- MCFG_MIDWAY_SOUNDS_GOOD_ADD("sg")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_MIDWAY_TURBO_CHIP_SQUEAK_ADD("tcs")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("sg", MIDWAY_SOUNDS_GOOD, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MCFG_SOUND_ADD("tcs", MIDWAY_TURBO_CHIP_SQUEAK, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( archrivl, mcr68 )
/* basic machine hardware */
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pigskin, mcr68 )
/* basic machine hardware */
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(pigskin_map)
@@ -1147,8 +1147,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( trisport, mcr68 )
/* basic machine hardware */
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(trisport_map)
diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp
index f97ee965bce..ff2e5847de6 100644
--- a/src/mame/drivers/meadows.cpp
+++ b/src/mame/drivers/meadows.cpp
@@ -119,7 +119,7 @@
***************************************************************************/
#include "includes/meadows.h"
-
+#include "sound/volt_reg.h"
#include "deadeye.lh"
#include "gypsyjug.lh"
#include "minferno.lh"
@@ -242,7 +242,7 @@ WRITE8_MEMBER(meadows_state::audio_hardware_w)
switch (offset & 3)
{
case 0: /* DAC */
- meadows_sh_dac_w(data ^ 0xff);
+ m_dac->write(data ^ 0xff);
break;
case 1: /* counter clk 5 MHz / 256 */
@@ -631,15 +631,15 @@ static MACHINE_CONFIG_START( meadows, meadows_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(2)
MCFG_SAMPLES_START_CB(meadows_state, meadows_sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -692,20 +692,20 @@ static MACHINE_CONFIG_START( bowl3d, meadows_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(2)
MCFG_SAMPLES_START_CB(meadows_state, meadows_sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("samples2", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_NAMES(bowl3d_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index 8630eb72396..53bf399171f 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -266,7 +266,7 @@ MACHINE_START_MEMBER(md_cons_state, md_common)
// setup timers for 6 button pads
for (int i = 0; i < 3; i++)
- m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(FPTR)i);
+ m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(uintptr_t)i);
m_vdp->stop_timers();
@@ -527,7 +527,7 @@ DRIVER_INIT_MEMBER(md_cons_state, md_jpn)
DEVICE_IMAGE_LOAD_MEMBER( md_cons_state, _32x_cart )
{
UINT32 length;
- dynamic_buffer temp_copy;
+ std::vector<UINT8> temp_copy;
UINT16 *ROM16;
UINT32 *ROM32;
int i;
diff --git a/src/mame/drivers/megadrvb.cpp b/src/mame/drivers/megadrvb.cpp
index b2ed760453a..8f8a438f7f9 100644
--- a/src/mame/drivers/megadrvb.cpp
+++ b/src/mame/drivers/megadrvb.cpp
@@ -694,7 +694,7 @@ MACHINE_START_MEMBER(md_boot_state, md_6button)
// setup timers for 6 button pads
for (int i = 0; i < 3; i++)
- m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(FPTR)i);
+ m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(uintptr_t)i);
}
static MACHINE_CONFIG_START( megadrvb_6b, md_boot_state )
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index d261df9b46e..842a07ee80f 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -4099,7 +4099,7 @@ void megasys1_state::rodland_gfx_unmangle(const char *region)
| ((rom[i] & 0x48) << 1)
| ((rom[i] & 0x10) << 2);
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0],rom,size);
@@ -4125,7 +4125,7 @@ void megasys1_state::jitsupro_gfx_unmangle(const char *region)
for (i = 0;i < size;i++)
rom[i] = BITSWAP8(rom[i],0x4,0x3,0x5,0x7,0x6,0x2,0x1,0x0);
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0],rom,size);
@@ -4149,7 +4149,7 @@ void megasys1_state::stdragona_gfx_unmangle(const char *region)
for (i = 0;i < size;i++)
rom[i] = BITSWAP8(rom[i],3,7,5,6,4,2,1,0);
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
memcpy(&buffer[0],rom,size);
diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp
index a41aa788cf0..94738431af1 100644
--- a/src/mame/drivers/megazone.cpp
+++ b/src/mame/drivers/megazone.cpp
@@ -9,17 +9,18 @@ To enter service mode, keep 1&2 pressed on reset
***************************************************************************/
#include "emu.h"
-#include "machine/konami1.h"
+#include "includes/konamipt.h"
+#include "includes/megazone.h"
#include "cpu/m6809/m6809.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
+#include "machine/konami1.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
#include "sound/flt_rc.h"
-#include "includes/konamipt.h"
-#include "includes/megazone.h"
+#include "sound/volt_reg.h"
READ8_MEMBER(megazone_state::megazone_port_a_r)
@@ -126,7 +127,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( megazone_i8039_io_map, AS_IO, 8, megazone_state )
AM_RANGE(0x00, 0xff) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w)
ADDRESS_MAP_END
@@ -268,7 +269,7 @@ static MACHINE_CONFIG_START( megazone, megazone_state )
MCFG_PALETTE_INIT_OWNER(megazone_state, megazone)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
@@ -279,15 +280,16 @@ static MACHINE_CONFIG_START( megazone, megazone_state )
MCFG_SOUND_ROUTE(1, "filter.0.1", 0.30)
MCFG_SOUND_ROUTE(2, "filter.0.2", 0.30)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_FILTER_RC_ADD("filter.0.0", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_FILTER_RC_ADD("filter.0.1", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_FILTER_RC_ADD("filter.0.2", 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/meyc8080.cpp b/src/mame/drivers/meyc8080.cpp
index abd0cb8f070..095c615ae2e 100644
--- a/src/mame/drivers/meyc8080.cpp
+++ b/src/mame/drivers/meyc8080.cpp
@@ -57,8 +57,9 @@
#include "emu.h"
#include "cpu/i8085/i8085.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "wldarrow.lh"
#include "mdrawpkr.lh"
@@ -89,7 +90,7 @@ public:
DECLARE_WRITE8_MEMBER(meyc8080_dac_4_w);
UINT32 screen_update_meyc8080(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
};
@@ -276,25 +277,25 @@ WRITE8_MEMBER(meyc8080_state::counters_w)
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_1_w)
{
- m_dac->write_unsigned8(0x00);
+ m_dac->write(0);
}
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_2_w)
{
- m_dac->write_unsigned8(0x55);
+ m_dac->write(1);
}
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_3_w)
{
- m_dac->write_unsigned8(0xaa);
+ m_dac->write(2);
}
WRITE8_MEMBER(meyc8080_state::meyc8080_dac_4_w)
{
- m_dac->write_unsigned8(0xff);
+ m_dac->write(3);
}
@@ -592,9 +593,10 @@ static MACHINE_CONFIG_START( meyc8080, meyc8080_state )
MCFG_SCREEN_UPDATE_DRIVER(meyc8080_state, screen_update_meyc8080)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.66) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp
index 28a11ecb608..3930afc0fc1 100644
--- a/src/mame/drivers/meyc8088.cpp
+++ b/src/mame/drivers/meyc8088.cpp
@@ -30,8 +30,8 @@
#include "machine/i8155.h"
#include "machine/nvram.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/resnet.h"
-
#include "gldarrow.lh"
@@ -43,14 +43,12 @@ public:
m_maincpu(*this,"maincpu"),
m_vram(*this, "vram"),
m_heartbeat(*this, "heartbeat"),
- m_dac(*this, "dac"),
m_switches(*this, {"C0", "C1", "C2", "C3"})
{ }
required_device<cpu_device> m_maincpu;
required_shared_ptr<UINT8> m_vram;
required_device<timer_device> m_heartbeat;
- required_device<dac_device> m_dac;
optional_ioport_array<4> m_switches;
@@ -68,7 +66,6 @@ public:
DECLARE_WRITE8_MEMBER(meyc8088_lights2_w);
DECLARE_WRITE8_MEMBER(meyc8088_common_w);
- DECLARE_WRITE_LINE_MEMBER(meyc8088_sound_out);
DECLARE_PALETTE_INIT(meyc8088);
UINT32 screen_update_meyc8088(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_meyc8088(screen_device &screen, bool state);
@@ -280,11 +277,6 @@ WRITE8_MEMBER(meyc8088_state::meyc8088_common_w)
m_common = data >> 2 & 0xf;
}
-WRITE_LINE_MEMBER(meyc8088_state::meyc8088_sound_out)
-{
- m_dac->write_signed8(state ? 0x7f : 0);
-}
-
/***************************************************************************
@@ -368,7 +360,7 @@ static MACHINE_CONFIG_START( meyc8088, meyc8088_state )
MCFG_I8155_OUT_PORTA_CB(WRITE8(meyc8088_state, meyc8088_lights2_w))
MCFG_I8155_OUT_PORTB_CB(WRITE8(meyc8088_state, meyc8088_lights1_w))
MCFG_I8155_OUT_PORTC_CB(WRITE8(meyc8088_state, meyc8088_common_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(meyc8088_state, meyc8088_sound_out))
+ MCFG_I8155_OUT_TIMEROUT_CB(DEVWRITELINE("dac", dac_bit_interface, write))
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -385,10 +377,11 @@ static MACHINE_CONFIG_START( meyc8088, meyc8088_state )
MCFG_PALETTE_INIT_OWNER(meyc8088_state, meyc8088)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/microtan.cpp b/src/mame/drivers/microtan.cpp
index fcf0676cb15..9b97bb0d17b 100644
--- a/src/mame/drivers/microtan.cpp
+++ b/src/mame/drivers/microtan.cpp
@@ -44,7 +44,6 @@
/* Components */
#include "sound/ay8910.h"
-#include "sound/dac.h"
#include "sound/wave.h"
#include "machine/6522via.h"
#include "machine/mos6551.h"
@@ -228,15 +227,13 @@ static MACHINE_CONFIG_START( microtan, microtan_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay8910.1", AY8910, 1000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("ay8910.2", AY8910, 1000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
/* snapshot/quickload */
MCFG_SNAPSHOT_ADD("snapshot", microtan_state, microtan, "m65", 0.5)
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index dbc4865ecfc..abf820992a4 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -16,13 +16,13 @@ of the games were clocked at around 500KHz, 550KHz, or 300KHz.
****************************************************************************/
#include "emu.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "cpu/mcs48/mcs48.h"
#include "cpu/tms1000/tms1100.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
-
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
#include "softlist.h"
#define LOG 0
@@ -89,7 +89,7 @@ public:
rc_type m_rc_type;
protected:
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<cpu_device> m_i8021;
required_device<cpu_device> m_tms1100;
required_device<generic_slot_device> m_cart;
@@ -111,7 +111,6 @@ protected:
// generic variables
void update_lcd();
void lcd_write(UINT8 control, UINT8 data);
- void speaker_write(UINT8 speaker);
bool m_pla;
UINT8 m_lcd_latch[8];
@@ -314,17 +313,6 @@ void microvision_state::lcd_write(UINT8 control, UINT8 data)
}
-/*
-speaker is SPKR1 SPKR0
-*/
-void microvision_state::speaker_write(UINT8 speaker)
-{
- const INT8 speaker_level[4] = { 0, 127, -128, 0 };
-
- m_dac->write_signed8( speaker_level[ speaker & 0x03 ] );
-}
-
-
void microvision_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch ( id )
@@ -381,7 +369,7 @@ WRITE8_MEMBER( microvision_state::i8021_p2_write )
m_p2 = data;
- speaker_write( m_p2 & 0x03 );
+ m_dac->write(m_p2 & 0x03);
if ( m_p2 & 0x0c )
{
@@ -488,7 +476,7 @@ WRITE16_MEMBER( microvision_state::tms1100_write_r )
m_r = data;
- speaker_write( ( ( m_r & 0x01 ) << 1 ) | ( ( m_r & 0x02 ) >> 1 ) );
+ m_dac->write((BIT(m_r, 0) << 1) | BIT(m_r, 1));
lcd_write( ( m_r >> 6 ) & 0x03, m_o & 0x0f );
}
@@ -681,9 +669,10 @@ static MACHINE_CONFIG_START( microvision, microvision_state )
MCFG_DEFAULT_LAYOUT(layout_lcd)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "microvision_cart")
MCFG_GENERIC_MANDATORY
diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp
index a54bed49a1f..d6d3a606fff 100644
--- a/src/mame/drivers/midtunit.cpp
+++ b/src/mame/drivers/midtunit.cpp
@@ -621,9 +621,9 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tunit_adpcm, tunit_core )
/* basic machine hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_WILLIAMS_ADPCM_SOUND_ADD("adpcm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("adpcm", WILLIAMS_ADPCM_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index 4887dd68ee3..7fd9c9dea4f 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -1096,7 +1096,7 @@ static MACHINE_CONFIG_START( zunit, midyunit_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_WILLIAMS_NARC_SOUND_ADD("narcsnd")
+ MCFG_SOUND_ADD("narcsnd", WILLIAMS_NARC_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1136,15 +1136,15 @@ static MACHINE_CONFIG_START( yunit_core, midyunit_state )
MCFG_SCREEN_PALETTE("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( yunit_cvsd_4bit_slow, yunit_core )
/* basic machine hardware */
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
@@ -1159,8 +1159,8 @@ static MACHINE_CONFIG_DERIVED( yunit_cvsd_4bit_fast, yunit_core )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_CLOCK(FAST_MASTER_CLOCK)
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
@@ -1172,8 +1172,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( yunit_cvsd_6bit_slow, yunit_core )
/* basic machine hardware */
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
@@ -1188,8 +1188,8 @@ static MACHINE_CONFIG_DERIVED( yunit_adpcm_6bit_fast, yunit_core )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_CLOCK(FAST_MASTER_CLOCK)
- MCFG_WILLIAMS_ADPCM_SOUND_ADD("adpcm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("adpcm", WILLIAMS_ADPCM_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
@@ -1204,8 +1204,8 @@ static MACHINE_CONFIG_DERIVED( yunit_adpcm_6bit_faster, yunit_core )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_CLOCK(FASTER_MASTER_CLOCK)
- MCFG_WILLIAMS_ADPCM_SOUND_ADD("adpcm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("adpcm", WILLIAMS_ADPCM_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
@@ -1231,7 +1231,7 @@ static MACHINE_CONFIG_DERIVED( mkyawdim, yunit_core )
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_OKIM6295_ADD("oki", XTAL_8MHz / 8, OKIM6295_PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mikro80.cpp b/src/mame/drivers/mikro80.cpp
index ae543027dfc..083edea51da 100644
--- a/src/mame/drivers/mikro80.cpp
+++ b/src/mame/drivers/mikro80.cpp
@@ -11,10 +11,10 @@
#include "emu.h"
#include "cpu/i8085/i8085.h"
-#include "sound/wave.h"
-#include "includes/mikro80.h"
#include "formats/rk_cas.h"
-#include "sound/dac.h"
+#include "includes/mikro80.h"
+#include "sound/volt_reg.h"
+#include "sound/wave.h"
#include "softlist.h"
/* Address maps */
@@ -41,7 +41,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( radio99_io , AS_IO, 8, mikro80_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE( 0x01, 0x01) AM_READWRITE(mikro80_tape_r, mikro80_tape_w )
- AM_RANGE( 0x04, 0x04) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE( 0x04, 0x04) AM_WRITE(radio99_sound_w)
AM_RANGE( 0x05, 0x05) AM_READWRITE(mikro80_8255_portc_r, mikro80_8255_portc_w )
AM_RANGE( 0x06, 0x06) AM_READ(mikro80_8255_portb_r)
AM_RANGE( 0x07, 0x07) AM_WRITE(mikro80_8255_porta_w)
@@ -181,9 +181,9 @@ static MACHINE_CONFIG_START( mikro80, mikro80_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", mikro80)
MCFG_PALETTE_ADD_MONOCHROME("palette")
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_FORMATS(rk8_cassette_formats)
@@ -199,8 +199,9 @@ static MACHINE_CONFIG_DERIVED( radio99, mikro80 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(radio99_io)
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 16.00)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( kristall, mikro80 )
diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp
index b0f27510098..afc143249d8 100644
--- a/src/mame/drivers/mini2440.cpp
+++ b/src/mame/drivers/mini2440.cpp
@@ -11,6 +11,7 @@
#include "machine/s3c2440.h"
#include "machine/smartmed.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#define VERBOSE_LEVEL ( 0 )
@@ -23,16 +24,16 @@ public:
m_maincpu(*this, "maincpu"),
m_s3c2440(*this, "s3c2440"),
m_nand(*this, "nand"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_penx(*this, "PENX"),
m_peny(*this, "PENY") { }
required_device<cpu_device> m_maincpu;
required_device<s3c2440_device> m_s3c2440;
required_device<nand_device> m_nand;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
required_ioport m_penx;
required_ioport m_peny;
@@ -92,6 +93,10 @@ READ32_MEMBER(mini2440_state::s3c2440_gpio_port_r)
WRITE32_MEMBER(mini2440_state::s3c2440_gpio_port_w)
{
+ // tout2/gb2 -> uda1341ts l3mode
+ // tout3/gb3 -> uda1341ts l3data
+ // tclk0/gb4 -> uda1341ts l3clock
+
m_port[offset] = data;
switch (offset)
{
@@ -154,9 +159,9 @@ WRITE8_MEMBER(mini2440_state::s3c2440_nand_data_w )
WRITE16_MEMBER(mini2440_state::s3c2440_i2s_data_w )
{
if ( offset )
- m_dac1->write_signed16(data + 0x8000);
+ m_ldac->write(data);
else
- m_dac2->write_signed16(data + 0x8000);
+ m_rdac->write(data);
}
// ADC
@@ -227,10 +232,11 @@ static MACHINE_CONFIG_START( mini2440, mini2440_state )
MCFG_SCREEN_UPDATE_DEVICE("s3c2440", s3c2440_device, screen_update)
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_SOUND_ADD("dac1", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ADD("dac2", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // uda1341ts.u12
+ MCFG_SOUND_ADD("rdac", UDA1341TS, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // uda1341ts.u12
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("s3c2440", S3C2440, 12000000)
MCFG_S3C2440_PALETTE("palette")
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index 8aa3921091d..a92ee546a95 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -2295,7 +2295,7 @@ DRIVER_INIT_MEMBER(mitchell_state,mstworld)
{
/* descramble the program rom .. */
int len = memregion("maincpu")->bytes();
- dynamic_buffer source(len);
+ std::vector<UINT8> source(len);
UINT8* dst = memregion("maincpu")->base() ;
int x;
diff --git a/src/mame/drivers/mjsenpu.cpp b/src/mame/drivers/mjsenpu.cpp
index 1aa9d03af34..f4c585d0fcb 100644
--- a/src/mame/drivers/mjsenpu.cpp
+++ b/src/mame/drivers/mjsenpu.cpp
@@ -46,6 +46,7 @@
#include "cpu/e132xs/e132xs.h"
#include "sound/okim6295.h"
#include "machine/nvram.h"
+#include "machine/ticket.h"
class mjsenpu_state : public driver_device
{
@@ -54,6 +55,7 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_oki(*this, "oki"),
+ m_hopper(*this, "hopper"),
m_mainram(*this, "mainram"),
// m_vram(*this, "vram"),
m_palette(*this, "palette")
@@ -63,6 +65,7 @@ public:
/* devices */
required_device<e132xt_device> m_maincpu;
required_device<okim6295_device> m_oki;
+ required_device<ticket_dispenser_device> m_hopper;
required_shared_ptr<UINT32> m_mainram;
// required_shared_ptr<UINT32> m_vram;
@@ -142,8 +145,7 @@ WRITE32_MEMBER(mjsenpu_state::vram_w)
WRITE8_MEMBER(mjsenpu_state::control_w)
{
- m_control = data;
- // bit 0x80 is always set?
+ // bit 0x80 is always set? (sometimes disabled during screen transitions briefly, could be display enable?)
// bit 0x40 not used?
// bit 0x20 not used?
@@ -151,10 +153,16 @@ WRITE8_MEMBER(mjsenpu_state::control_w)
// bit 0x10 is the M6295 bank, samples <26 are the same in both banks and so bank switch isn't written for them, not even in sound test.
m_oki->set_rom_bank((data&0x10)>>4);
- // bits 0x08 and 0x04 seem to be hopper/ticket related? different ones get used depending on the dips
+ // bits 0x08 is used in the alt payout / hopper mode (see dipswitches)
+
+ // 0x04 seem to be hopper/ticket related? different ones get used depending on the dips
+ m_hopper->write(space, 0, data & 0x04);
// bit 0x02 could be coin counter?
+ machine().bookkeeping().coin_counter_w(0, data & 0x02 );
+
// bit 0x01 alternates frequently, using as video buffer, but that's a complete guess
+ m_control = data;
// if (data &~0x9e)
// printf("control_w %02x\n", data);
@@ -286,26 +294,21 @@ static INPUT_PORTS_START( mjsenpu )
PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) // or maybe service?
- PORT_DIPNAME( 0x00000002, 0x00000002, "IN1" )
- PORT_DIPSETTING( 0x00000002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000004, 0x00000004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_SERVICE_NO_TOGGLE( 0x00000010, IP_ACTIVE_LOW )
- PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
+ PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // might be coin out
+ PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
+ PORT_SERVICE_NO_TOGGLE( 0x00000010, IP_ACTIVE_LOW )
+ PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // clears stats in bookkeeping
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW3", 0x08,EQUALS,0x00)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) ) // unused??
PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+
+
PORT_START("DSW1")
PORT_DIPNAME( 0x00000003, 0x00000003, DEF_STR( Coin_A ) )
@@ -313,7 +316,7 @@ static INPUT_PORTS_START( mjsenpu )
PORT_DIPSETTING( 0x00000003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00000002, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x00000001, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x0000000c, 0x0000000c, "Value 1" )
+ PORT_DIPNAME( 0x0000000c, 0x0000000c, "Note Value" ) // used if DSW3 bit 0x02 is changed
PORT_DIPSETTING( 0x00000000, "100" )
PORT_DIPSETTING( 0x00000004, "50" )
PORT_DIPSETTING( 0x00000008, "10" )
@@ -357,15 +360,15 @@ static INPUT_PORTS_START( mjsenpu )
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW3")
- PORT_DIPNAME( 0x00000001, 0x00000001, "Value 4" )
+ PORT_DIPNAME( 0x00000001, 0x00000001, "Credit Limit" )
PORT_DIPSETTING( 0x00000001, "100" )
PORT_DIPSETTING( 0x00000000, "500" )
- PORT_DIPNAME( 0x00000002, 0x00000002, "Symbol 2" )
- PORT_DIPSETTING( 0x00000002, "0" )
- PORT_DIPSETTING( 0x00000000, "1" )
- PORT_DIPNAME( 0x00000004, 0x00000004, "Symbol 3" )
- PORT_DIPSETTING( 0x00000004, "0" )
- PORT_DIPSETTING( 0x00000000, "1" )
+ PORT_DIPNAME( 0x00000002, 0x00000002, "Coin Type?" ) // uses different coinage
+ PORT_DIPSETTING( 0x00000002, "Coins?" )
+ PORT_DIPSETTING( 0x00000000, "Notes?" )
+ PORT_DIPNAME( 0x00000004, 0x00000004, "Hopper Type?" )
+ PORT_DIPSETTING( 0x00000004, "Normal?" ) // pressing Pay Out button activates hopper on bit 0x04 and pays out
+ PORT_DIPSETTING( 0x00000000, "Other?" ) // pressing Pay Out activates something on bit 0x08, prints KEY OUT and quickly resets the game
PORT_DIPNAME( 0x00000008, 0x00000008, "Control Type" )
PORT_DIPSETTING( 0x00000008, "Mahjong Panel" )
PORT_DIPSETTING( 0x00000000, "Joystick" )
@@ -459,6 +462,9 @@ static MACHINE_CONFIG_START( mjsenpu, mjsenpu_state )
MCFG_NVRAM_ADD_1FILL("nvram")
+ // more likely coins out?
+ MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(50), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
+
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -526,6 +532,4 @@ DRIVER_INIT_MEMBER(mjsenpu_state,mjsenpu)
}
-
-
-GAME( 2002, mjsenpu, 0, mjsenpu, mjsenpu, mjsenpu_state, mjsenpu, ROT0, "Oriental Soft", "Mahjong Senpu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+GAME( 2002, mjsenpu, 0, mjsenpu, mjsenpu, mjsenpu_state, mjsenpu, ROT0, "Oriental Soft", "Mahjong Senpu", 0 )
diff --git a/src/mame/drivers/mjsister.cpp b/src/mame/drivers/mjsister.cpp
index bc306fb5dd8..aa2e45514d8 100644
--- a/src/mame/drivers/mjsister.cpp
+++ b/src/mame/drivers/mjsister.cpp
@@ -10,8 +10,9 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define MCLK 12000000
@@ -55,7 +56,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
/* memory */
UINT8 m_videoram0[0x8000];
@@ -197,7 +198,7 @@ TIMER_CALLBACK_MEMBER(mjsister_state::dac_callback)
{
UINT8 *DACROM = memregion("samples")->base();
- m_dac->write_unsigned8(DACROM[(m_dac_bank * 0x10000 + m_dac_adr++) & 0x1ffff]);
+ m_dac->write(DACROM[(m_dac_bank * 0x10000 + m_dac_adr++) & 0x1ffff]);
if (((m_dac_adr & 0xff00 ) >> 8) != m_dac_adr_e)
timer_set(attotime::from_hz(MCLK) * 1024, TIMER_DAC);
@@ -497,15 +498,16 @@ static MACHINE_CONFIG_START( mjsister, mjsister_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, MCLK/8)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW1"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*************************************
diff --git a/src/mame/drivers/mk14.cpp b/src/mame/drivers/mk14.cpp
index e152fcbc144..4018daf4c47 100644
--- a/src/mame/drivers/mk14.cpp
+++ b/src/mame/drivers/mk14.cpp
@@ -34,10 +34,11 @@ ToDo:
#include "emu.h"
#include "cpu/scmp/scmp.h"
+#include "imagedev/cassette.h"
#include "machine/ins8154.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "sound/wave.h"
-#include "imagedev/cassette.h"
#include "mk14.lh"
@@ -62,7 +63,7 @@ private:
required_device<cpu_device> m_maincpu;
required_ioport_array<8> m_keyboard;
required_device<cassette_image_device> m_cass;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
};
/*
@@ -172,7 +173,7 @@ WRITE8_MEMBER( mk14_state::port_a_w )
WRITE_LINE_MEMBER( mk14_state::cass_w )
{
m_cass->output(state ? -1.0 : +1.0);
- m_dac->write_unsigned8(state ? 0x40 : 0);
+ m_dac->write(state);
}
READ_LINE_MEMBER( mk14_state::cass_r )
@@ -195,16 +196,19 @@ static MACHINE_CONFIG_START( mk14, mk14_state )
MCFG_DEFAULT_LAYOUT(layout_mk14)
// sound
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05)
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_SOUND_ADD("dac8", ZN425E, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // Ferranti ZN425E
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac8", -1.0, DAC_VREF_NEG_INPUT)
/* devices */
MCFG_DEVICE_ADD("ic8", INS8154, 0)
MCFG_INS8154_OUT_A_CB(WRITE8(mk14_state, port_a_w))
- MCFG_INS8154_OUT_B_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_INS8154_OUT_B_CB(DEVWRITE8("dac8", dac_byte_interface, write))
MCFG_CASSETTE_ADD( "cassette" )
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 5a653bfb399..749834b0879 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -352,7 +352,7 @@ WRITE32_MEMBER(model2_state::timers_w)
TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_timer_cb)
{
- int tnum = (int)(FPTR)ptr;
+ int tnum = (int)(uintptr_t)ptr;
int bit = tnum + 2;
if(m_timerrun[tnum] == 0)
@@ -2354,13 +2354,13 @@ static MACHINE_CONFIG_START( model2o, model2_state )
MCFG_NVRAM_ADD_1FILL("backup2")
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)0)
+ MCFG_TIMER_PTR((uintptr_t)0)
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)1)
+ MCFG_TIMER_PTR((uintptr_t)1)
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)2)
+ MCFG_TIMER_PTR((uintptr_t)2)
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)3)
+ MCFG_TIMER_PTR((uintptr_t)3)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
MCFG_S24TILE_DEVICE_PALETTE("palette")
@@ -2402,13 +2402,13 @@ static MACHINE_CONFIG_START( model2a, model2_state )
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)0)
+ MCFG_TIMER_PTR((uintptr_t)0)
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)1)
+ MCFG_TIMER_PTR((uintptr_t)1)
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)2)
+ MCFG_TIMER_PTR((uintptr_t)2)
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)3)
+ MCFG_TIMER_PTR((uintptr_t)3)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
MCFG_S24TILE_DEVICE_PALETTE("palette")
@@ -2519,13 +2519,13 @@ static MACHINE_CONFIG_START( model2b, model2_state )
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)0)
+ MCFG_TIMER_PTR((uintptr_t)0)
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)1)
+ MCFG_TIMER_PTR((uintptr_t)1)
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)2)
+ MCFG_TIMER_PTR((uintptr_t)2)
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)3)
+ MCFG_TIMER_PTR((uintptr_t)3)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
MCFG_S24TILE_DEVICE_PALETTE("palette")
@@ -2584,13 +2584,13 @@ static MACHINE_CONFIG_START( model2c, model2_state )
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)0)
+ MCFG_TIMER_PTR((uintptr_t)0)
MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)1)
+ MCFG_TIMER_PTR((uintptr_t)1)
MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)2)
+ MCFG_TIMER_PTR((uintptr_t)2)
MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb)
- MCFG_TIMER_PTR((FPTR)3)
+ MCFG_TIMER_PTR((uintptr_t)3)
MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff)
MCFG_S24TILE_DEVICE_PALETTE("palette")
diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp
index 2b175343017..9040ec0e35d 100644
--- a/src/mame/drivers/mogura.cpp
+++ b/src/mame/drivers/mogura.cpp
@@ -4,8 +4,9 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "includes/konamipt.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
class mogura_state : public driver_device
{
@@ -13,16 +14,16 @@ public:
mogura_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_gfxram(*this, "gfxram"),
m_tileram(*this, "tileram"),
m_gfxdecode(*this, "gfxdecode")
{ }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
required_shared_ptr<UINT8> m_gfxram;
required_shared_ptr<UINT8> m_tileram;
required_device<gfxdecode_device> m_gfxdecode;
@@ -116,8 +117,8 @@ WRITE8_MEMBER(mogura_state::mogura_tileram_w)
WRITE8_MEMBER(mogura_state::mogura_dac_w)
{
- m_dac1->write_unsigned8(data & 0xf0); /* left */
- m_dac2->write_unsigned8((data & 0x0f) << 4); /* right */
+ m_ldac->write(data >> 4);
+ m_rdac->write(data & 15);
}
@@ -220,13 +221,12 @@ static MACHINE_CONFIG_START( mogura, mogura_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MACHINE_CONFIG_END
ROM_START( mogura )
diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp
index f3f6192b36c..a17570c5b2e 100644
--- a/src/mame/drivers/mrgame.cpp
+++ b/src/mame/drivers/mrgame.cpp
@@ -35,11 +35,12 @@ ToDo:
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
+#include "machine/i8255.h"
#include "machine/nvram.h"
-#include "video/resnet.h"
-#include "sound/tms5220.h"
#include "sound/dac.h"
-#include "machine/i8255.h"
+#include "sound/tms5220.h"
+#include "sound/volt_reg.h"
+#include "video/resnet.h"
class mrgame_state : public driver_device
{
@@ -135,7 +136,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( audio1_io, AS_IO, 8, mrgame_state )
ADDRESS_MAP_GLOBAL_MASK(3)
- AM_RANGE(0x0000, 0x0000) AM_WRITENOP //AM_DEVWRITE("dac", dac_device, write_unsigned8) //DA1. The DC output might be an electronic volume control of the M114's output.
+ AM_RANGE(0x0000, 0x0000) AM_DEVWRITE("dacvol", dac_byte_interface, write) //DA1
AM_RANGE(0x0001, 0x0001) AM_READ(sound_r) //IN1
AM_RANGE(0x0002, 0x0002) AM_WRITE(ack1_w) //AKL1
AM_RANGE(0x0003, 0x0003) AM_WRITENOP //SGS pass data to M114
@@ -148,11 +149,11 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( audio2_io, AS_IO, 8, mrgame_state )
ADDRESS_MAP_GLOBAL_MASK(7)
- AM_RANGE(0x0000, 0x0000) AM_DEVWRITE("dacl", dac_device, write_unsigned8) //DA2
+ AM_RANGE(0x0000, 0x0000) AM_DEVWRITE("ldac", dac_byte_interface, write) //DA2
AM_RANGE(0x0001, 0x0001) AM_READ(sound_r) //IN2
AM_RANGE(0x0002, 0x0002) AM_WRITE(ack2_w) //AKL2
AM_RANGE(0x0003, 0x0003) AM_DEVREADWRITE("tms", tms5220_device, status_r, data_w) //Speech
- AM_RANGE(0x0004, 0x0004) AM_DEVWRITE("dacr", dac_device, write_unsigned8) //DA3
+ AM_RANGE(0x0004, 0x0004) AM_DEVWRITE("rdac", dac_byte_interface, write) //DA3
ADDRESS_MAP_END
static INPUT_PORTS_START( mrgame )
@@ -487,10 +488,14 @@ static MACHINE_CONFIG_START( mrgame, mrgame_state )
/* Sound */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DAC_ADD("dacl")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_DAC_ADD("dacr")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dacvol", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dacvol", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SOUND_ADD("tms", TMS5220, 672000) // uses a RC combination. 672k copied from jedi.h
MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_BOGUSWAIT))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp
index d4ff0382374..62cdec58fd9 100644
--- a/src/mame/drivers/ms32.cpp
+++ b/src/mame/drivers/ms32.cpp
@@ -2258,8 +2258,8 @@ DRIVER_INIT_MEMBER(ms32_state,bnstars)
GAME( 1994, hayaosi2, 0, ms32, hayaosi2, ms32_state, ss92046_01, ROT0, "Jaleco", "Hayaoshi Quiz Grand Champion Taikai", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1994, hayaosi3, 0, ms32, hayaosi3, ms32_state, ss92046_01, ROT0, "Jaleco", "Hayaoshi Quiz Nettou Namahousou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
GAME( 1994, bbbxing, 0, ms32, bbbxing, ms32_state, ss92046_01, ROT0, "Jaleco", "Best Bout Boxing", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-GAME( 1994, 47pie2, 0, ms32, 47pie2, ms32_state, 47pie2, ROT0, "Jaleco", "Idol Janshi Su-Chi-Pie II (v1.1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1994, 47pie2o, 47pie2, ms32, 47pie2, ms32_state, 47pie2, ROT0, "Jaleco", "Idol Janshi Su-Chi-Pie II (v1.0)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, 47pie2, 0, ms32, 47pie2, ms32_state, 47pie2, ROT0, "Jaleco", "Idol Janshi Suchie-Pai II (v1.1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1994, 47pie2o, 47pie2, ms32, 47pie2, ms32_state, 47pie2, ROT0, "Jaleco", "Idol Janshi Suchie-Pai II (v1.0)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, desertwr, 0, ms32, desertwr, ms32_state, ss91022_10, ROT270, "Jaleco", "Desert War / Wangan Sensou", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, gametngk, 0, ms32, gametngk, ms32_state, ss91022_10, ROT270, "Jaleco", "The Game Paradise - Master of Shooting! / Game Tengoku - The Game Paradise", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, tetrisp, 0, ms32, tetrisp, ms32_state, ss92046_01, ROT0, "Jaleco / BPS", "Tetris Plus", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 2e8fa7fcc90..02ffb7393ed 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -532,6 +532,7 @@ PCB Layouts missing
#include "machine/msx_matsushita.h"
#include "machine/msx_s1985.h"
#include "machine/msx_systemflags.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
@@ -1334,7 +1335,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( msx_ym2413 )
MCFG_SOUND_ADD("ym2413", YM2413, XTAL_21_4772MHz/6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( msx2_64kb_vram )
@@ -1356,18 +1357,20 @@ static MACHINE_CONFIG_START( msx, msx_state )
MCFG_I8255_OUT_PORTC_CB(WRITE8(msx_state, msx_ppi_port_c_w))
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_10_738635MHz/3/2)
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
/* printer */
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
@@ -1498,18 +1501,20 @@ static MACHINE_CONFIG_START( msx2, msx_state )
MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", XTAL_21_4772MHz)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_21_4772MHz/6/2)
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
/* printer */
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
@@ -1554,18 +1559,20 @@ static MACHINE_CONFIG_START( msx2p, msx_state )
MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9958", XTAL_21_4772MHz)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay8910", AY8910, XTAL_21_4772MHz/6/2)
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
MCFG_AY8910_PORT_A_READ_CB(READ8(msx_state, msx_psg_port_a_r))
MCFG_AY8910_PORT_B_READ_CB(READ8(msx_state, msx_psg_port_b_r))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
/* printer */
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp
index 0cc66d4c57a..b913573702b 100644
--- a/src/mame/drivers/multfish.cpp
+++ b/src/mame/drivers/multfish.cpp
@@ -435,7 +435,7 @@ A12 <-> A13
UINT32 i,j,jscr,romoffset;
UINT8 *igrosoft_gamble_gfx = memregion("gfx")->base();
- dynamic_buffer temprom(igrosoft_gamble_ROM_SIZE);
+ std::vector<UINT8> temprom(igrosoft_gamble_ROM_SIZE);
/* ROM 1 decode */
@@ -506,7 +506,7 @@ static inline void rom_decodeh(UINT8 *romptr, UINT8 *tmprom, UINT8 xor_data, UIN
static void lottery_decode(running_machine &machine, UINT8 xor12, UINT8 xor34, UINT8 xor56, UINT8 xor78, UINT32 xor_addr)
{
UINT8 *igrosoft_gamble_gfx = machine.root_device().memregion("gfx")->base();
- dynamic_buffer temprom(igrosoft_gamble_ROM_SIZE);
+ std::vector<UINT8> temprom(igrosoft_gamble_ROM_SIZE);
/* ROMs decode */
rom_decodel(&igrosoft_gamble_gfx[0x000000], &temprom[0], xor12, xor_addr);
@@ -545,7 +545,7 @@ static inline void roment_decodeh(UINT8 *romptr, UINT8 *tmprom, UINT8 xor_data,
static void ent_decode(running_machine &machine, UINT8 xor12, UINT8 xor34, UINT8 xor56, UINT8 xor78, UINT32 xor_addr)
{
UINT8 *igrosoft_gamble_gfx = machine.root_device().memregion("gfx")->base();
- dynamic_buffer temprom(igrosoft_gamble_ROM_SIZE);
+ std::vector<UINT8> temprom(igrosoft_gamble_ROM_SIZE);
/* ROMs decode */
roment_decodel(&igrosoft_gamble_gfx[0x000000], &temprom[0], xor12, xor_addr);
diff --git a/src/mame/drivers/multi8.cpp b/src/mame/drivers/multi8.cpp
index 1cb27eb6b42..0739638b5ab 100644
--- a/src/mame/drivers/multi8.cpp
+++ b/src/mame/drivers/multi8.cpp
@@ -677,4 +677,4 @@ ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-COMP( 1983, multi8, 0, 0, multi8, multi8, driver_device, 0, "Mitsubishi", "Multi 8", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+COMP( 1983, multi8, 0, 0, multi8, multi8, driver_device, 0, "Mitsubishi", "Multi 8 (Mitsubishi)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp
index 5e49c9fe7bc..e3f72a883a0 100644
--- a/src/mame/drivers/multigam.cpp
+++ b/src/mame/drivers/multigam.cpp
@@ -108,7 +108,6 @@ Eproms are 27512,27010,274001
#include "emu.h"
#include "cpu/m6502/n2a03.h"
-#include "sound/dac.h"
#include "video/ppu2c0x.h"
@@ -1421,7 +1420,7 @@ DRIVER_INIT_MEMBER(multigam_state,multigmt)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
- dynamic_buffer buf(0x80000);
+ std::vector<UINT8> buf(0x80000);
UINT8 *rom;
int size;
int i;
diff --git a/src/mame/drivers/murogem.cpp b/src/mame/drivers/murogem.cpp
index 3df8476b7d4..a39c141e09d 100644
--- a/src/mame/drivers/murogem.cpp
+++ b/src/mame/drivers/murogem.cpp
@@ -110,6 +110,7 @@ val (hex): 27 20 22 04 26 00 20 20 00 07 00 00 80 00 00 00 ns
#include "cpu/m6800/m6800.h"
#include "video/mc6845.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class murogem_state : public driver_device
@@ -124,7 +125,7 @@ public:
m_videoram(*this, "videoram") { }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -146,7 +147,7 @@ WRITE8_MEMBER(murogem_state::outport_w)
7654 3210
---- x--- Sound DAC.
*/
- m_dac->write_unsigned8(data & 0x08);
+ m_dac->write(BIT(data, 3));
}
@@ -266,9 +267,10 @@ static MACHINE_CONFIG_START( murogem, murogem_state )
MCFG_MC6845_CHAR_WIDTH(8)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 12.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.375)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/murogmbl.cpp b/src/mame/drivers/murogmbl.cpp
index 245f6c3953b..fead2b8200b 100644
--- a/src/mame/drivers/murogmbl.cpp
+++ b/src/mame/drivers/murogmbl.cpp
@@ -38,6 +38,7 @@ Dumped: 06/04/2009 f205v
#include "emu.h"
#include "cpu/z80/z80.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
class murogmbl_state : public driver_device
@@ -98,7 +99,7 @@ static ADDRESS_MAP_START( murogmbl_map, AS_PROGRAM, 8, murogmbl_state )
AM_RANGE(0x6000, 0x6000) AM_READ_PORT("IN0")
AM_RANGE(0x6800, 0x6800) AM_READ_PORT("DSW")
AM_RANGE(0x7000, 0x7000) AM_READ_PORT("IN1")
- AM_RANGE(0x7800, 0x7800) AM_READNOP AM_DEVWRITE("dac1", dac_device, write_unsigned8) /* read is always discarded */
+ AM_RANGE(0x7800, 0x7800) AM_READNOP AM_DEVWRITE("dac", dac_byte_interface, write) /* read is always discarded */
ADDRESS_MAP_END
void murogmbl_state::video_start()
@@ -210,9 +211,10 @@ static MACHINE_CONFIG_START( murogmbl, murogmbl_state )
MCFG_PALETTE_ADD("palette", 0x100)
MCFG_PALETTE_INIT_OWNER(murogmbl_state, murogmbl)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mustache.cpp b/src/mame/drivers/mustache.cpp
index b5c2d31db76..5703c6ffb74 100644
--- a/src/mame/drivers/mustache.cpp
+++ b/src/mame/drivers/mustache.cpp
@@ -239,7 +239,7 @@ DRIVER_INIT_MEMBER(mustache_state,mustache)
int G2 = memregion("gfx2")->bytes()/2;
UINT8 *gfx1 = memregion("gfx1")->base();
UINT8 *gfx2 = memregion("gfx2")->base();
- dynamic_buffer buf(G2*2);
+ std::vector<UINT8> buf(G2*2);
/* BG data lines */
for (i=0;i<G1; i++)
diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp
index 925a1e23170..99d78f6466e 100644
--- a/src/mame/drivers/mz2000.cpp
+++ b/src/mame/drivers/mz2000.cpp
@@ -34,6 +34,15 @@
#define MASTER_CLOCK XTAL_17_73447MHz/5 /* TODO: was 4 MHz, but otherwise cassette won't work due of a bug with MZF support ... */
+#define UTF8_PI "\xcf\x80"
+#define UTF8_POUND "\xc2\xa3"
+#define UTF8_YEN "\xc2\xa5"
+#define UTF8_SPADES "\xe2\x99\xa0"
+#define UTF8_DIAMONDS "\xe2\x99\xa6"
+#define UTF8_CLUBS "\xe2\x99\xa3"
+#define UTF8_HEARTS "\xe2\x99\xa5"
+#define UTF8_KANA_KATAKANA "\xe3\x82\xab\xe3\x83\x8a"
+
class mz2000_state : public driver_device
{
@@ -388,7 +397,7 @@ static ADDRESS_MAP_START(mz2000_map, AS_PROGRAM, 8, mz2000_state )
AM_RANGE( 0x0000, 0xffff ) AM_READWRITE(mz2000_mem_r,mz2000_mem_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(mz2000_io, AS_IO, 8, mz2000_state )
+static ADDRESS_MAP_START(mz80b_io, AS_IO, 8, mz2000_state )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0xd8, 0xdb) AM_READWRITE(fdc_r, fdc_w)
@@ -398,132 +407,143 @@ static ADDRESS_MAP_START(mz2000_io, AS_IO, 8, mz2000_state )
AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_device, read, write)
AM_RANGE(0xe8, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_device, read_alt, write_alt)
AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w)
-// AM_RANGE(0xf4, 0xf7) CRTC
+// AM_RANGE(0xf4, 0xf4) AM_WRITE(vram_bank_w)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START(mz2000_io, AS_IO, 8, mz2000_state )
+ ADDRESS_MAP_UNMAP_HIGH
+ ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0xf5, 0xf5) AM_WRITE(mz2000_tvram_attr_w)
AM_RANGE(0xf6, 0xf6) AM_WRITE(mz2000_gvram_mask_w)
AM_RANGE(0xf7, 0xf7) AM_WRITE(mz2000_gvram_bank_w)
+ AM_IMPORT_FROM(mz80b_io)
ADDRESS_MAP_END
+// The \ key is actually directly to the left of the BREAK key; the CLR/HOME and INST/DEL keys sit
+// between the BREAK key and the CR key, and the ] key lies directly to the left of CR. The somewhat
+// fudged key bindings for this corner of the keyboard approximate those used for other JIS keyboards.
+// (The Japanese MZ-80B/MZ-2000 keyboard layout is almost but not quite JIS.)
+
/* Input ports */
-static INPUT_PORTS_START( mz2000 )
+static INPUT_PORTS_START( mz80be ) // European keyboard
PORT_START("KEY0")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6)
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7)
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
PORT_START("KEY1")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9)
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10)
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("8 (PAD)") PORT_CODE(KEYCODE_8_PAD)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("9 (PAD)") PORT_CODE(KEYCODE_9_PAD)
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("00 (PAD)") PORT_CODE(KEYCODE_00_PAD)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME(". (PAD)") PORT_CODE(KEYCODE_DEL_PAD)
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("+ (PAD)") PORT_CODE(KEYCODE_PLUS_PAD)
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("- (PAD)") PORT_CODE(KEYCODE_MINUS_PAD)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_00_PAD) PORT_CHAR(UCHAR_MAMEKEY(00_PAD))
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
PORT_START("KEY2")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("0 (PAD)") PORT_CODE(KEYCODE_0_PAD)
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("1 (PAD)") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("2 (PAD)") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("3 (PAD)") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("4 (PAD)") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("5 (PAD)") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("6 (PAD)") PORT_CODE(KEYCODE_6_PAD)
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("7 (PAD)") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
PORT_START("KEY3")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB)
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(27)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("BREAK") //PORT_CODE(KEYCODE_ESC)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_LALT) PORT_CHAR('\t')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CR") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR('\r') // also "ENT" on keypad
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("KEY4")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("/") //PORT_CODE(KEYCODE_SLASH)
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ \xe2\x86\x90 \xe2\x86\x92") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A \xe2\x94\x94") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B " UTF8_CLUBS) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C " UTF8_HEARTS) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D \xe2\x94\x82") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E \xe2\x94\xa4") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F \xe2\x94\x80") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G \xe2\x94\xbc") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
PORT_START("KEY5")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H \xe2\x95\x91") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I \xe2\x95\x9e") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J \xe2\x95\x90") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K \xe2\x95\xac") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L \xe2\x95\xab") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M " UTF8_POUND) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N \xe2\x97\x8b") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O \xe2\x95\xa8") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
PORT_START("KEY6")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P \xe2\x95\xa5") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q \xe2\x94\x8c") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R \xe2\x94\x9c") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S \xe2\x94\x98") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T \xe2\x94\xb4") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U \xe2\x95\xa1") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V " UTF8_DIAMONDS) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W \xe2\x94\x90") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
PORT_START("KEY7")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("^")
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("\\")
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("_")
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME(".")
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME(",")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X " UTF8_SPADES) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y \xe2\x94\xac") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z \xe2\x95\xaa") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("? \xe2\x86\x91 \xe2\x86\x93") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR('?')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". > " UTF8_PI) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", < " UTF8_YEN) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_START("KEY8")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
PORT_START("KEY9")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9')
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME(":")
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME(";")
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("@")
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("[")
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_UNUSED)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*')
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+')
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') // actually between P and ~
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{')
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("KEYA")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("]")
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_UNUSED)
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("HOME") PORT_CODE(KEYCODE_HOME)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_BACKSPACE)
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_UNUSED)
- PORT_BIT(0x20,IP_ACTIVE_LOW,IPT_UNUSED)
- PORT_BIT(0x40,IP_ACTIVE_LOW,IPT_UNUSED)
- PORT_BIT(0x80,IP_ACTIVE_LOW,IPT_UNUSED)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}')
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLR HOME") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INST DEL") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(DEL))
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("KEYB")
- PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("GRPH")
- PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("SLOCK")
- PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT)
- PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("RVS")
- PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_UNUSED)
- PORT_BIT(0xe0,IP_ACTIVE_LOW,IPT_UNUSED)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRPH") PORT_CODE(KEYCODE_TAB)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SFT LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RVS") PORT_CODE(KEYCODE_TILDE)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("KEYC")
PORT_BIT(0xff,IP_ACTIVE_LOW,IPT_UNUSED)
@@ -546,6 +566,75 @@ static INPUT_PORTS_START( mz2000 )
PORT_CONFSETTING( 0x04, DEF_STR( Yes ) )
INPUT_PORTS_END
+static INPUT_PORTS_START( mz80bj ) // Japanese keyboard (kana, no RVS)
+ PORT_INCLUDE( mz80be )
+
+ PORT_MODIFY("KEY4")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ \xe2\x86\x90 \xe3\x83\xa1 \xe2\x86\x92") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') // me
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A \xe3\x83\x81 \xe2\x94\x94") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // ti
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B \xe3\x82\xb3 " UTF8_CLUBS) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') // ko
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C \xe3\x82\xbd " UTF8_HEARTS) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') // so
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D \xe3\x82\xb7 \xe2\x94\x82") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') // si
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E \xe3\x82\xa4 \xe2\x94\xa4") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // i
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F \xe3\x83\x8f \xe2\x94\x80") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') // ha
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G \xe3\x82\xad \xe2\x94\xbc") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') // ki
+
+ PORT_MODIFY("KEY5")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H \xe3\x82\xaf \xe2\x95\x91") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') // ku
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I \xe3\x83\x8b \xe2\x95\x9e") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') // ni
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J \xe3\x83\x9e \xe2\x95\x90") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') // ma
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K \xe3\x83\x8e \xe2\x95\xac") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') // no
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L \xe3\x83\xaa \xe2\x95\xab") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // ri
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M \xe3\x83\xa2 " UTF8_YEN) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') // mo
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N \xe3\x83\x9f \xe2\x97\x8b") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') // mi
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O \xe3\x83\xa9 \xe2\x95\xa8") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // ra
+
+ PORT_MODIFY("KEY6")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P \xe3\x82\xbb \xe2\x95\xa5") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // se
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q \xe3\x82\xbf \xe2\x94\x8c") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') // ta
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R \xe3\x82\xb9 \xe2\x94\x9c") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // su
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S \xe3\x83\x88 \xe2\x94\x98") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // to
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T \xe3\x82\xab \xe2\x94\xb4") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') // ka
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U \xe3\x83\x8a \xe2\x95\xa1") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') // na
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V \xe3\x83\x92 " UTF8_DIAMONDS) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') // hi
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W \xe3\x83\x86 \xe2\x94\x90") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // te
+
+ PORT_MODIFY("KEY7")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X \xe3\x82\xb5 " UTF8_SPADES) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') // sa
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y \xe3\x83\xb3 \xe2\x94\xac") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') // n
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z \xe3\x83\x84 \xe2\x95\xaa") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // tu
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^ ~ \xe3\x83\x98") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') // he
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ | \xe3\x83\xb2") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('|') // wo
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("? \xe2\x86\x91 \xe3\x83\xad \xe2\x86\x93") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR('?') // ro
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". > \xe3\x83\xab \xe3\x80\x82") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // ru
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", < \xe3\x83\x8d " UTF8_PI) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // ne
+
+ PORT_MODIFY("KEY8")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 _ \xe3\x83\xaf") PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') // wa
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 ! \xe3\x83\x8c") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // nu
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 \" \xe3\x83\x95") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // fu
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 # \xe3\x82\xa2") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // a
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $ \xe3\x82\xa6") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // u
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 % \xe3\x82\xa8") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // e
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 & \xe3\x82\xaa") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // o
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 \' \xe3\x83\xa4") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // ya
+
+ PORT_MODIFY("KEY9")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 ( \xe3\x83\xa6") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') // yu
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 ) \xe3\x83\xa8") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') // yo
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": * \xe3\x82\xb1") PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') // ke
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; + \xe3\x83\xac") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+') // re
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- = \xe3\x83\x9b") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') // ho
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ ` \xe3\x82\x9b") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') // dakuten
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ { \xe3\x82\x9c \xe3\x80\x8c") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') // handakuten
+
+ PORT_MODIFY("KEYA")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] } \xe3\x83\xa0 \xe3\x80\x8d") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') // mu
+
+ PORT_MODIFY("KEYB")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(UTF8_KANA_KATAKANA) PORT_CODE(KEYCODE_TILDE)
+INPUT_PORTS_END
+
void mz2000_state::machine_reset()
{
@@ -823,7 +912,31 @@ static MACHINE_CONFIG_START( mz2000, mz2000_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.15)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( mz80b, mz2000 )
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_IO_MAP(mz80b_io)
+MACHINE_CONFIG_END
+
+
+
+ROM_START( mz80b )
+ ROM_REGION( 0x1000, "ipl", 0 )
+ ROM_LOAD( "ipl.rom", 0x0000, 0x0800, CRC(80beeec0) SHA1(d2b8167cc77ad023a807198993cb5e7a94c9e19e) )
+
+ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
+
+ ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 )
+ //ROM_LOAD( "vosque2000.mzt",0x0000, 0x80, CRC(1) SHA1(1))
+ //ROM_CONTINUE( 0x0000, 0x7f80 )
+
+ ROM_REGION( 0x1000, "tvram", ROMREGION_ERASE00 )
+
+ ROM_REGION( 0x10000, "gvram", ROMREGION_ERASE00 )
+
+ ROM_REGION( 0x1800, "chargen", 0 )
+ ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) )
+ROM_END
ROM_START( mz2000 )
ROM_REGION( 0x1000, "ipl", ROMREGION_ERASEFF )
@@ -871,5 +984,6 @@ ROM_END
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-COMP( 1982, mz2000, mz80b, 0, mz2000, mz2000, driver_device, 0, "Sharp", "MZ-2000", MACHINE_NOT_WORKING )
-COMP( 1982, mz2200, mz80b, 0, mz2000, mz2000, driver_device, 0, "Sharp", "MZ-2200", MACHINE_NOT_WORKING )
+COMP( 1981, mz80b, 0, 0, mz80b, mz80be, driver_device, 0, "Sharp", "MZ-80B", MACHINE_NOT_WORKING )
+COMP( 1982, mz2000, mz80b, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2000", MACHINE_NOT_WORKING )
+COMP( 1982, mz2200, mz80b, 0, mz2000, mz80bj, driver_device, 0, "Sharp", "MZ-2200", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp
index 725b3ed668f..661671ac470 100644
--- a/src/mame/drivers/mz80.cpp
+++ b/src/mame/drivers/mz80.cpp
@@ -366,18 +366,7 @@ ROM_START( mz80a )
ROM_LOAD( "mz80acg.rom", 0x0000, 0x0800, CRC(a87c2e2b) SHA1(e8aefbdb48a63e5f96692af868c353ca7e1bfcd2) )
ROM_END
-ROM_START( mz80b )
- ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ipl.rom", 0x0000, 0x0800, CRC(80beeec0) SHA1(d2b8167cc77ad023a807198993cb5e7a94c9e19e) )
-
- ROM_REGION( 0x1000, "chargen", 0 )
- ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) )
-ROM_END
-
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
COMP( 1979, mz80kj, 0, 0, mz80kj, mz80k, mz80_state, mz80k, "Sharp", "MZ-80K (Japanese)", 0 )
COMP( 1979, mz80k, mz80kj, 0, mz80k, mz80k, mz80_state, mz80k, "Sharp", "MZ-80K", 0 )
-
-// These may need a separate driver!
COMP( 1982, mz80a, 0, 0, mz80a, mz80a, mz80_state, mz80k, "Sharp", "MZ-80A", 0 )
-COMP( 1981, mz80b, 0, 0, mz80k, mz80k, mz80_state, mz80k, "Sharp", "MZ-80B", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/namcona1.cpp b/src/mame/drivers/namcona1.cpp
index ee2f1a0fe25..840a0bb524b 100644
--- a/src/mame/drivers/namcona1.cpp
+++ b/src/mame/drivers/namcona1.cpp
@@ -947,7 +947,7 @@ static MACHINE_CONFIG_START( namcona1, namcona1_state )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(38*8, 32*8)
+ MCFG_SCREEN_SIZE(40*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(8, 38*8-1-8, 4*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(namcona1_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
@@ -987,6 +987,13 @@ static MACHINE_CONFIG_DERIVED( namcona2, namcona1 )
MCFG_CPU_IO_MAP( namcona1_mcu_io_map)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( namcona2w, namcona2 )
+
+ /* video hardware */
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_VISIBLE_AREA(0, 38*8-1-0, 4*8, 32*8-1)
+MACHINE_CONFIG_END
+
DRIVER_INIT_MEMBER(namcona1_state,bkrtmaq) { m_gametype = NAMCO_BKRTMAQ; }
DRIVER_INIT_MEMBER(namcona1_state,cgangpzl) { m_gametype = NAMCO_CGANGPZL; }
@@ -1324,7 +1331,7 @@ GAME( 1993, tinklpit, 0, namcona1w, namcona1_joy, namcona1_state, tinkl
GAME( 1992, knckhead, 0, namcona2, namcona1_joy, namcona1_state, knckhead, ROT0, "Namco", "Knuckle Heads (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, knckheadj, knckhead, namcona2, namcona1_joy, namcona1_state, knckhead, ROT0, "Namco", "Knuckle Heads (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, knckheadjp, knckhead, namcona2, namcona1_joy, namcona1_state, knckhead, ROT0, "Namco", "Knuckle Heads (Japan, Prototype?)", MACHINE_SUPPORTS_SAVE )
-GAME( 1993, emeralda, 0, namcona2, namcona1_joy, namcona1_state, emeralda, ROT0, "Namco", "Emeraldia (World)", MACHINE_SUPPORTS_SAVE )
+GAME( 1993, emeralda, 0, namcona2w, namcona1_joy, namcona1_state, emeralda, ROT0, "Namco", "Emeraldia (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, numanath, 0, namcona2, namcona1_joy, namcona1_state, numanath, ROT0, "Namco", "Numan Athletics (World)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, numanathj, numanath, namcona2, namcona1_joy, namcona1_state, numanath, ROT0, "Namco", "Numan Athletics (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, quiztou, 0, namcona2, namcona1_quiz, namcona1_state,quiztou, ROT0, "Namco", "Nettou! Gekitou! Quiztou!! (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/namcos1.cpp b/src/mame/drivers/namcos1.cpp
index 8bc2cd87d73..b206478d92e 100644
--- a/src/mame/drivers/namcos1.cpp
+++ b/src/mame/drivers/namcos1.cpp
@@ -336,11 +336,12 @@ C - uses sub board with support for player 3 and 4 controls
***********************************************************************/
#include "emu.h"
+#include "includes/namcos1.h"
#include "cpu/m6809/m6809.h"
#include "cpu/m6800/m6800.h"
-#include "sound/ym2151.h"
#include "machine/nvram.h"
-#include "includes/namcos1.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
/**********************************************************************/
@@ -365,44 +366,15 @@ WRITE8_MEMBER(namcos1_state::coin_w)
machine().bookkeeping().coin_counter_w(1, data & 4);
}
-void namcos1_state::update_DACs()
-{
- m_dac->write_signed16(0x8000 + (m_dac0_value * m_dac0_gain) + (m_dac1_value * m_dac1_gain));
-}
-
-void namcos1_state::init_DACs()
-{
- m_dac0_value = 0;
- m_dac1_value = 0;
- m_dac0_gain = 0x80;
- m_dac1_gain = 0x80;
-}
-
WRITE8_MEMBER(namcos1_state::dac_gain_w)
{
- int value;
-
- /* DAC0 (bits 0,2) */
- value = (data & 1) | ((data >> 1) & 2); /* GAIN0,GAIN1 */
- m_dac0_gain = 0x20 * (value+1);
-
- /* DAC1 (bits 3,4) */
- value = (data >> 3) & 3; /* GAIN2,GAIN3 */
- m_dac1_gain = 0x20 * (value+1);
-
- update_DACs();
-}
+ /* DAC0 (GAIN0 = bit0, GAIN1 = bit2) */
+ int dac0_gain = (BIT(data, 2) << 1) | BIT(data, 0);
+ m_dac0->set_output_gain(ALL_OUTPUTS, (dac0_gain + 1) / 4.0f);
-WRITE8_MEMBER(namcos1_state::dac0_w)
-{
- m_dac0_value = data - 0x80; /* shift zero point */
- update_DACs();
-}
-
-WRITE8_MEMBER(namcos1_state::dac1_w)
-{
- m_dac1_value = data - 0x80; /* shift zero point */
- update_DACs();
+ /* DAC1 (GAIN2 = bit3, GAIN3 = bit4) */
+ int dac1_gain = (BIT(data, 4) << 1) | BIT(data, 3);
+ m_dac1->set_output_gain(ALL_OUTPUTS, (dac1_gain + 1) / 4.0f);
}
@@ -452,8 +424,8 @@ static ADDRESS_MAP_START( mcu_map, AS_PROGRAM, 8, namcos1_state )
AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("mcubank") /* banked external ROM */
AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("triram")
AM_RANGE(0xc800, 0xcfff) AM_RAM AM_SHARE("nvram") /* EEPROM */
- AM_RANGE(0xd000, 0xd000) AM_WRITE(dac0_w)
- AM_RANGE(0xd400, 0xd400) AM_WRITE(dac1_w)
+ AM_RANGE(0xd000, 0xd000) AM_DEVWRITE("dac0", dac_byte_interface, write)
+ AM_RANGE(0xd400, 0xd400) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0xd800, 0xd800) AM_WRITE(mcu_bankswitch_w) /* ROM bank selector */
AM_RANGE(0xf000, 0xf000) AM_WRITE(irq_ack_w)
AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("mcu", 0) /* internal ROM */
@@ -1096,9 +1068,11 @@ static MACHINE_CONFIG_START( ns1, namcos1_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("dac0", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index c2e709fbb10..bd79f9fcb95 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3310,7 +3310,7 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER(namcos22_state::alpine_motor_read)
{
- return m_motor_status >> (FPTR)param & 1;
+ return m_motor_status >> (uintptr_t)param & 1;
}
static INPUT_PORTS_START( alpiner )
diff --git a/src/mame/drivers/namcos86.cpp b/src/mame/drivers/namcos86.cpp
index 97b4dddd6bf..a2bd0bf6ca3 100644
--- a/src/mame/drivers/namcos86.cpp
+++ b/src/mame/drivers/namcos86.cpp
@@ -1673,7 +1673,7 @@ DRIVER_INIT_MEMBER(namcos86_state,namco86)
size = memregion("gfx1")->bytes() * 2 / 3;
{
- dynamic_buffer buffer( size );
+ std::vector<UINT8> buffer( size );
UINT8 *dest1 = gfx;
UINT8 *dest2 = gfx + ( size / 2 );
UINT8 *mono = gfx + size;
@@ -1696,7 +1696,7 @@ DRIVER_INIT_MEMBER(namcos86_state,namco86)
size = memregion("gfx2")->bytes() * 2 / 3;
{
- dynamic_buffer buffer( size );
+ std::vector<UINT8> buffer( size );
UINT8 *dest1 = gfx;
UINT8 *dest2 = gfx + ( size / 2 );
UINT8 *mono = gfx + size;
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 98e1f843f30..5bba754882b 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -385,19 +385,21 @@ Cosmic Smash 840-0044C 23428 8 (64Mb)
Cosmic Smash (Rev A) 840-0044C 23428A 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons
Crazy Taxi 840-0002C 21684 13 (64Mb)* present 315-6213 317-0248-COM * ic8 and ic9 are not present
Dead Or Alive 2 (Rev A) 841-0003C 22121A 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
-Dead Or Alive 2 Millennium 841-0003C DOA2 M 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
+Dead Or Alive 2 841-0003C-01 22207 21 (64Mb) present 315-6213 317-5048-COM have unlocked Tag and Survival game modes, possible USA or international release
+Dead Or Alive 2 Millennium 841-0003C DOA2 Ver.M 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons
Death Crimson OX 841-0016C 23524 10 (64Mb) present 315-6213 317-5066-COM
Dengen Tenshi Taisen Janshi Shangri-La 841-0004C 22060 12 (64Mb) ? 315-6213 317-5050-JPN
Derby Owners Club (Japan) (Rev B) 840-0016C 22099B 14 (64Mb) ? 315-6213 317-0262-JPN touch panel + 2 buttons + card reader
Derby Owners Club 2000 Ver.2 (Japan) (Rev A) 840-0052C 22284A 16 (64Mb) present 315-6213 not present
-Dynamite Baseball '99 / World Series'99 (Rev B) 840-0019C 22141B 19 (64Mb) ? 315-6213 317-0269-JPN requires special panel (joystick + 2 buttons + bat controller for each player)
-Dynamite Baseball Naomi 840-0001C 21575 21 (64Mb) ? 315-6213 317-0246-JPN requires special panel (joystick + 2 buttons + bat controller for each player)
+Dynamite Baseball '99 (Japan) (Rev B) 840-0019C 22141B 19 (64Mb) ? 315-6213 317-0269-JPN requires special panel (joystick + 2 buttons + bat controller for each player)
+Dynamite Baseball NAOMI (Japan) 840-0001C 21575 21 (64Mb) ? 315-6213 317-0246-JPN requires special panel (joystick + 2 buttons + bat controller for each player)
Ferrari F355 Challenge (deluxe, no link) 834-13842 21902 21 (64Mb) present 315-6213 317-0254-COM BIOS 21863 (USA), also known to exists Japanese BIOS, not dumped
Ferrari F355 Challenge (twin/deluxe) 834-13950 22848 21 (64Mb) present 315-6213 317-0267-COM 2 known BIOS 22850 (USA), 22851 (EXP)
Ferrari F355 Challenge 2 (twin/deluxe) 840-0042C 23399 21 (64Mb) present 315-6213 317-0287-COM 2 known BIOS 22850 (USA), 22851 (EXP)
Giant Gram: All Japan Pro Wrestling 2 840-0007C 21820 9 (64Mb) ? 315-6213 317-0253-JPN joystick + 3 buttons
Guilty Gear X 841-0013C 23356 14 (64Mb) ? 315-6213 317-5063-COM
-Gun Spike / Cannon Spike 841-0012C 23210 12 (64Mb) present 315-6213 317-5060-COM
+Gun Spike 841-0012C 23210 12 (64Mb) present 315-6213 317-5060-COM \same ROM board
+Cannon Spike 841-0012C-01 23210 12 (64Mb) present 315-6213 317-5060-COM /
Heavy Metal Geomatrix (Rev B) HMG016007 23716A 11 (64Mb) present 315-6213 317-5071-COM joystick + 2 buttons
House of the Dead 2 834-13636 21385 20 (64Mb) not present 315-6213 not present
House of the Dead 2 (USA) 834-13636 21585 20 (64Mb) not present 315-6213 not present PCB s/n is 834-13636-01
@@ -417,13 +419,14 @@ Sega Strike Fighter (Rev A, no training mode) 840-0035C 23786A 20 (64Mb)
Sega Tetris 840-0018C 22909 6 (64Mb) present 315-6213 317-0268-COM
Slashout 840-0041C 23341 17 (64Mb) ? 315-6213 317-0286-COM joystick + 4 buttons
Spawn In the Demon's Hand (Rev B) 841-0005C 22977B 10 (64Mb) ? 315-6213 317-5051-COM joystick + 4 buttons
-Super Major League '99 840-0012C 22059 21 (64Mb) ? 315-6213 317-0259-COM
+World Series 99 840-0012C ?22059? 21 (64Mb) ? 315-6213 317-0259-COM \same ?
+Super Major League 99 840-0012C-01 22059 21 (64Mb) ? 315-6213 317-0259-COM /
The Typing of the Dead 840-0026C 23021 20 (64Mb) present 315-6213 not present
The Typing of the Dead (Rev A) 840-0026C 23021A 20 (64Mb) present 315-6213 not present
Touch de UNO! / Unou Nouryoku Check Machine 840-0008C 22073 4 (64Mb) present 315-6213 317-0255-JPN requires 837-13844 JVS IO with DIPSW 5 On, ELO AccuTouch-compatible touch screen controller and special printer.
-Toy Fighter / Waffupu 840-0011C 22035 10 (64Mb) present 315-6212 317-0257-COM joystick + 3 buttons
-Virtua NBA (USA) 840-0021C-01 23073 21 (64Mb) present 315-6213 not present PCB s/n is 840-0021B-01
+Toy Fighter 840-0011C 22035 10 (64Mb) present 315-6212 317-0257-COM joystick + 3 buttons
Virtua NBA 840-0021C 22949 21 (64Mb) present 315-6213 317-0271-COM
+Virtua NBA (USA) 840-0021C-01 23073 21 (64Mb) present 315-6213 not present PCB s/n is 840-0021B-01
Virtua Striker 2 Ver. 2000 (Rev C) 840-0010C 21929C 14 (64Mb)* present 315-6213 317-0258-COM joystick + 3 buttons *(+1x 32Mb)
Virtua Tennis / Power Smash 840-0015C 22927 11 (64Mb) present 315-6213 317-0263-COM
Virtual On Oratorio Tangram M.S.B.S. ver5.66 840-0028C 23198 13 (64Mb) ? 315-6213 317-0279-COM
@@ -3441,7 +3444,7 @@ IC21 64M 002C 8ECA
*/
-ROM_START( doa2 )
+ROM_START( doa2a )
NAOMI_BIOS
NAOMI_DEFAULT_EEPROM_NO_BD
@@ -3478,6 +3481,46 @@ ROM_START( doa2 )
ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" )
ROM_END
+// later original version, have unlocked Tag and Survival game modes, but unlike Millennium have no option to disable them
+// like original rev have 1 life in story mode and no way to tweak it (Millennium have it 2 and test mode option to change it)
+// possible USA or international release
+ROM_START( doa2 )
+ NAOMI_BIOS
+ NAOMI_DEFAULT_EEPROM_NO_BD
+
+ ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF)
+ ROM_LOAD("epr-22207.ic22", 0x0000000, 0x0400000, CRC(313d0e55) SHA1(e2c8b99ef4041ecfa90cb534b160f4ca741e0bf5) )
+
+ ROM_LOAD("mpr-22100.ic1", 0x0800000, 0x0800000, CRC(92a53e5e) SHA1(87fcdeee9c4e65a3eb6eb345eed85d4f2df26c3c) )
+ ROM_LOAD("mpr-22101.ic2", 0x1000000, 0x0800000, CRC(14cd7dce) SHA1(5df14a5dad14bc922b4f88881dc2e9c8e74d6170) )
+ ROM_LOAD("mpr-22102.ic3", 0x1800000, 0x0800000, CRC(34e778b1) SHA1(750ddf5cda9622dd2b0f7069d247ffd55911c38f) )
+ ROM_LOAD("mpr-22103.ic4", 0x2000000, 0x0800000, CRC(6f3db8df) SHA1(e9bbcf7897594ae47a9e3c8641ccb2c09b0809fe) )
+ ROM_LOAD("mpr-22104.ic5", 0x2800000, 0x0800000, CRC(fcc2787f) SHA1(c28eaf91fa64e49e2276702678a4f8f17e09c3b9) )
+ ROM_LOAD("mpr-22105.ic6", 0x3000000, 0x0800000, CRC(3e2da942) SHA1(d8f28c40ab59fa96a1fb19ad3adbee687088a5ab) )
+ ROM_LOAD("mpr-22106.ic7", 0x3800000, 0x0800000, CRC(03aceaaf) SHA1(977e5b660254e7c5fdbd9d52c1f00c8a174a5d7b) )
+ ROM_LOAD("mpr-22107.ic8", 0x4000000, 0x0800000, CRC(6f1705e4) SHA1(b8215dd4ef7214e75c2ec79ad974a32422c17647) )
+ ROM_LOAD("mpr-22108.ic9", 0x4800000, 0x0800000, CRC(d34d3d8a) SHA1(910f1e4d8a54a621d9212e1425152c3029c96234) )
+ ROM_LOAD("mpr-22109.ic10", 0x5000000, 0x0800000, CRC(00ef44dd) SHA1(3fd100007daf59693de2329df1b4981dcdf435cd) )
+ ROM_LOAD("mpr-22110.ic11", 0x5800000, 0x0800000, CRC(a193b577) SHA1(3513853f88c491905481dadc5ce00cc5819b2663) )
+ ROM_LOAD("mpr-22111.ic12s",0x6000000, 0x0800000, CRC(55dddebf) SHA1(a7b8702cf578f5be4dcf8e2eaf11bf8b71d1b4ad) )
+ ROM_LOAD("mpr-22112.ic13s",0x6800000, 0x0800000, CRC(c5ffe564) SHA1(efe4d0cb5a536b26489c6dd31b1e446a9be643c9) )
+ ROM_LOAD("mpr-22113.ic14s",0x7000000, 0x0800000, CRC(12e7adf0) SHA1(2755c3efc6ca6d5680ead1489f42798c0187c5a4) )
+ ROM_LOAD("mpr-22114.ic15s",0x7800000, 0x0800000, CRC(d181d0a0) SHA1(2a0e46dbb31f5c11b6ae2fc8c786192bf3701ec5) )
+ ROM_LOAD("mpr-22115.ic16s",0x8000000, 0x0800000, CRC(ee2c842d) SHA1(8e33f241300481bb8875bda37e3917be71ed2594) )
+ ROM_LOAD("mpr-22116.ic17s",0x8800000, 0x0800000, CRC(224ab770) SHA1(85d849ee077e36da1df759caa4a32525395f741c) )
+ ROM_LOAD("mpr-22117.ic18s",0x9000000, 0x0800000, CRC(884a45a9) SHA1(d947cb3a045c5463523355fa631d55148e12c31e) )
+ ROM_LOAD("mpr-22118.ic19s",0x9800000, 0x0800000, CRC(8d631cbf) SHA1(fe8a65d35b1cdaed650ddde931e59f0768ffff53) )
+ ROM_LOAD("mpr-22119.ic20s",0xa000000, 0x0800000, CRC(d608fa86) SHA1(54c8107cccec8cbb536f13cda5b220b7972190b7) )
+ ROM_LOAD("mpr-22120.ic21s",0xa800000, 0x0800000, CRC(a30facb4) SHA1(70415ca34095c795297486bce1f956f6a8d4817f) )
+
+ // on-cart X76F100 eeprom contents
+ ROM_REGION( 0x84, "naomibd_eeprom", 0 )
+ ROM_LOAD( "841-0003.sf", 0x000000, 0x000084, CRC(3a119a17) SHA1(d37a092cca7c9cfc5f2637b355af90a65d04013e) )
+
+ // 841-0003 1999 317-5048-COM Naomi
+ ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" )
+ROM_END
+
/*
SYSTEMID: NAOMI
@@ -9579,7 +9622,7 @@ ROM_END
/* ????? */ GAME( 1999, alpiltdx, airlbios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Airline Pilots (deluxe) (Rev B)", GAME_FLAGS ) /* specific BIOS "airlbios" needed */
/* 840-xxxxx (Sega Naomi cart games)*/
-/* 0001 */ GAME( 1998, dybbnao, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Dynamite Baseball NAOMI (JPN)", GAME_FLAGS )
+/* 0001 */ GAME( 1998, dybbnao, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Dynamite Baseball NAOMI (Japan)", GAME_FLAGS )
/* 0002 */ GAME( 1999, crzytaxi, naomi, naomim2, crzytaxi,naomi_state, naomi, ROT0, "Sega", "Crazy Taxi", GAME_FLAGS )
/* 0003 */ GAME( 1999, zombrvno, zombrvn, naomim2, zombrvn, naomi_state, naomi, ROT0, "Sega", "Zombie Revenge", GAME_FLAGS )
/* 0003 */ GAME( 1999, zombrvn, naomi, naomim2, zombrvn, naomi_state, naomi, ROT0, "Sega", "Zombie Revenge (Rev A)", GAME_FLAGS )
@@ -9589,13 +9632,13 @@ ROM_END
/* 0008 */ GAME( 1999, tduno, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Touch de Uno! / Unou Nouryoku Check Machine", GAME_FLAGS )
/* 0010 */ GAME( 1999, vs2_2k, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua Striker 2 Ver. 2000 (Rev C)", GAME_FLAGS )
/* 0011 */ GAME( 1999, toyfight, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Toy Fighter", GAME_FLAGS )
-/* 0012 */ GAME( 1999, smlg99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Super Major League '99", GAME_FLAGS )
+/* 0012 */ GAME( 1999, smlg99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "World Series 99 / Super Major League 99", GAME_FLAGS )
/* 0013 */ GAME( 1999, jambo, naomi, naomim2, jambo, naomi_state, naomi, ROT0, "Sega", "Jambo! Safari (Rev A)", GAME_FLAGS )
/* 0015 */ GAME( 1999, vtennis, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua Tennis (USA, EXP, KOR, AUS) / Power Smash (JPN)", GAME_FLAGS )
/* 0016 */ GAME( 1999, derbyoc, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Derby Owners Club (Japan) (Rev B)", GAME_FLAGS )
/* 0017 */ GAME( 1999, otrigger, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "OutTrigger", GAME_FLAGS )
/* 0018 */ GAME( 1999, sgtetris, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Sega Tetris", GAME_FLAGS )
-/* 0019 */ GAME( 1999, dybb99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Dynamite Baseball '99 (JPN) / World Series '99 (USA, EXP, KOR, AUS) (Rev B)", GAME_FLAGS )
+/* 0019 */ GAME( 1999, dybb99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Dynamite Baseball '99 (Japan) (Rev B)", GAME_FLAGS )
/* 0020 */ GAME( 1999, samba, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Samba De Amigo (Rev B)", GAME_FLAGS )
/* none */ GAME( 1999, sambap, samba, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Samba De Amigo (USA, prototype)", GAME_FLAGS )
/* none */ GAME( 2000, virnbap, virnba, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua NBA (prototype)", GAME_FLAGS )
@@ -9678,7 +9721,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 841-xxxxx ("Licensed by Sega" Naomi cart games)*/
/* 0001 */ GAME( 1999, pstone, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Power Stone", GAME_FLAGS )
/* 0002 */ GAME( 1999, suchie3, naomi, naomim2, suchie3, naomi_state,naomi_mp,ROT0, "Jaleco", "Idol Janshi Suchie-Pai 3 (JPN)", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND )
-/* 0003 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (Rev A)", GAME_FLAGS )
+/* 0003 */ GAME( 1999, doa2a, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (Rev A)", GAME_FLAGS )
+/* 0003-01 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2", GAME_FLAGS )
/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium", GAME_FLAGS )
/* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la (Build 0728)", GAME_FLAGS ) // version taken from service mode
/* 0005 */ GAME( 1999, spawn, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Todd Mc Farlane / Capcom","Spawn In the Demon's Hand (Rev B)", GAME_FLAGS )
@@ -9689,7 +9733,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0011 */ GAME( 2000, capsnk, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev C)", GAME_FLAGS )
/* 0011 */ GAME( 2000, capsnka, capsnk,naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev A)", GAME_FLAGS )
/* 0011 */ GAME( 2000, capsnkb, capsnk,naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000", GAME_FLAGS )
-/* 0012 */ GAME( 2000, cspike, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Psikyo / Capcom", "Gun Spike (JPN) / Cannon Spike (USA, EXP, KOR, AUS)", GAME_FLAGS )
+/* 0012 -01 */ GAME( 2000, cspike, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Psikyo / Capcom", "Gun Spike (JPN) / Cannon Spike (USA, EXP, KOR, AUS)", GAME_FLAGS )
/* 0013 */ GAME( 2000, ggx, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Arc System Works","Guilty Gear X (JPN)", GAME_FLAGS )
/* 0014 */ GAME( 2000, gwing2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Takumi / Capcom", "Giga Wing 2", GAME_FLAGS )
/* 0015 */ GAME( 2000, pjustic, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Moero! Justice Gakuen (JPN) / Project Justice (USA, EXP, KOR, AUS) (Rev A)", GAME_FLAGS )
@@ -9732,7 +9776,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0008 */ GAME( 2001, monkeyba, naomigd, naomigd, monkeyba,naomi_state, naomigd, ROT0, "Sega", "Monkey Ball (GDS-0008)", GAME_FLAGS )
// 0009 Dynamic Golf / Virtua Golf (GDS-0009)
/* 0009A */ GAME( 2001, dygolf, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Dynamic Golf / Virtua Golf (Rev A) (GDS-0009A)", GAME_FLAGS )
-/* 0010 */ GAME( 2001, wsbbgd, naomigd, naomigd, dybbnao, naomi_state, naomigd, ROT0, "Sega", "Super Major League / World Series Baseball (GDS-0010)", GAME_FLAGS )
+/* 0010 */ GAME( 2001, wsbbgd, naomigd, naomigd, dybbnao, naomi_state, naomigd, ROT0, "Sega", "World Series Baseball / Super Major League (GDS-0010)", GAME_FLAGS )
/* 0011 */ GAME( 1999, vtennisg, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Virtua Tennis / Power Smash (GDS-0011)", GAME_FLAGS )
/* 0012 */ GAME( 2001, vf4o, vf4, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 (GDS-0012)", GAME_FLAGS )
// 0012A Virtua Fighter 4 (Rev A) (GDS-0012A)
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index 8781299ff14..2486f59a0df 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -31,14 +31,15 @@ TODO:
******************************************************************************/
#include "emu.h"
+#include "includes/nbmj8688.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
-#include "sound/ay8910.h"
+#include "machine/nvram.h"
#include "sound/3812intf.h"
+#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#include "nbmj8688.lh"
-#include "includes/nbmj8688.h"
-#include "machine/nvram.h"
DRIVER_INIT_MEMBER(nbmj8688_state,mjcamera)
@@ -153,7 +154,7 @@ static ADDRESS_MAP_START( secolove_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -178,7 +179,7 @@ static ADDRESS_MAP_START( barline_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport2_r) AM_WRITE(barline_output_w)
AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
-// AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) //not used
+// AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write) //not used
AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -196,7 +197,7 @@ static ADDRESS_MAP_START( crystalg_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(crystalg_romsel_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf0, 0xf0) AM_WRITENOP
@@ -216,7 +217,7 @@ static ADDRESS_MAP_START( otonano_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -236,7 +237,7 @@ static ADDRESS_MAP_START( kaguya_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -257,7 +258,7 @@ static ADDRESS_MAP_START( iemoto_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -279,7 +280,7 @@ static ADDRESS_MAP_START( seiha_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -299,7 +300,7 @@ static ADDRESS_MAP_START( mjgaiden_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -324,7 +325,7 @@ static ADDRESS_MAP_START( p16bit_LCD_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -345,7 +346,7 @@ static ADDRESS_MAP_START( mjsikaku_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -367,7 +368,7 @@ static ADDRESS_MAP_START( mmsikaku_io_map, AS_IO, 8, nbmj8688_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w)
// AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
// AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -381,7 +382,7 @@ CUSTOM_INPUT_MEMBER( nbmj8688_state::nb1413m3_busyflag_r )
static INPUT_PORTS_START( mjsikaku )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easy)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -390,47 +391,25 @@ static INPUT_PORTS_START( mjsikaku )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x10, 0x10, "Character Display Test" )
+ PORT_DIPNAME( 0x10, 0x10, "Character Display Test" ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, "Game Sounds" )
+ PORT_DIPNAME( 0x40, 0x00, "Game Sounds" ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 1-8" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ // does not exist on PCB
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -446,62 +425,8 @@ static INPUT_PORTS_START( mjsikaku )
INPUT_PORTS_END
static INPUT_PORTS_START( mmsikaku )
-#if 1
PORT_START("DSWA")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 1-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-#else
-
- PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x00, "Game Out Rate" )
+ PORT_DIPNAME( 0x07, 0x00, "Game Out Rate" ) PORT_DIPLOCATION("DSWA:1,2,3") // unconfirmed but extremely likely correct
PORT_DIPSETTING( 0x07, "60%" )
PORT_DIPSETTING( 0x06, "65%" )
PORT_DIPSETTING( 0x05, "70%" )
@@ -510,36 +435,41 @@ static INPUT_PORTS_START( mmsikaku )
PORT_DIPSETTING( 0x02, "85%" )
PORT_DIPSETTING( 0x01, "90%" )
PORT_DIPSETTING( 0x00, "95%" )
- PORT_DIPNAME( 0x18, 0x18, "Rate Min" )
+ PORT_DIPNAME( 0x18, 0x18, "Rate Min" ) PORT_DIPLOCATION("DSWA:4,5")
PORT_DIPSETTING( 0x18, "1" )
PORT_DIPSETTING( 0x10, "2" )
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x60, 0x00, "Rate Max" )
+ PORT_DIPNAME( 0x60, 0x00, "Rate Max" ) PORT_DIPLOCATION("DSWA:6,7")
PORT_DIPSETTING( 0x60, "8" )
PORT_DIPSETTING( 0x40, "10" )
PORT_DIPSETTING( 0x20, "12" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x80, 0x00, "Score Pool" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8") // score pool?
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x00, "Rate Up" )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:1") // rate up?
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, "Last Chance" )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:2") // last chance?
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "Character Display Test" )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
-#endif
+ PORT_DIPNAME( 0x08, 0x08, "Character Display Test" ) PORT_DIPLOCATION("DSWB:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST
@@ -600,7 +530,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( mjcamera )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easy)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -609,47 +539,31 @@ static INPUT_PORTS_START( mjcamera )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Character Display Test" )
+ PORT_DIPNAME( 0x80, 0x80, "Character Display Test" ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -665,125 +579,61 @@ static INPUT_PORTS_START( mjcamera )
INPUT_PORTS_END
static INPUT_PORTS_START( kaguya )
- PORT_START("DSWA")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- // NOTE:Coins counted by pressing service switch
- PORT_DIPNAME( 0x04, 0x04, "NOTE" )
- PORT_DIPSETTING( 0x04, "Coin x5" )
- PORT_DIPSETTING( 0x00, "Coin x10" )
- PORT_DIPNAME( 0x18, 0x18, "Game Out Rate" )
- PORT_DIPSETTING( 0x00, "60%" )
- PORT_DIPSETTING( 0x08, "70%" )
- PORT_DIPSETTING( 0x10, "80%" )
- PORT_DIPSETTING( 0x18, "90%" )
- PORT_DIPNAME( 0x20, 0x20, "Bonus awarded on" )
- PORT_DIPSETTING( 0x20, "[over BAIMAN]" )
- PORT_DIPSETTING( 0x00, "[BAIMAN]" )
- PORT_DIPNAME( 0x40, 0x40, "Variability of payout rate" )
- PORT_DIPSETTING( 0x40, "[big]" )
- PORT_DIPSETTING( 0x00, "[small]" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ // manual has DSWA and DSWB mixed up compared to PCB
+ // PCB is traditional Nichibutsu legacy, A/B match other PCBs
+ // so assumption is manual is incorrect
- PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x00, "Nudity graphic on bet" )
+ PORT_START("DSWA")
+ PORT_DIPNAME( 0x01, 0x00, "Nudity graphic on bet" ) PORT_DIPLOCATION("DSWA:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x06, 0x06, "Bet Min" )
+ PORT_DIPNAME( 0x06, 0x06, "Bet Min" ) PORT_DIPLOCATION("DSWA:2,3")
PORT_DIPSETTING( 0x06, "1" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x00, "7" )
- PORT_DIPNAME( 0x18, 0x00, "Number of extend TSUMO" )
+ PORT_DIPNAME( 0x18, 0x00, "Number of extend TSUMO" ) PORT_DIPLOCATION("DSWA:4,5")
PORT_DIPSETTING( 0x18, "0" )
PORT_DIPSETTING( 0x10, "2" )
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "4" )
- PORT_DIPNAME( 0x20, 0x20, "Extend TSUMO needs credit" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
- PORT_START("SYSTEM")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
-// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) //
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) //
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Credit Clear") PORT_CODE(KEYCODE_4) // CREDIT CLEAR
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) // COIN2
-
- PORT_INCLUDE( nbmjcontrols )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( kaguya2 )
- PORT_START("DSWA")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" )
+ PORT_DIPNAME( 0x20, 0x20, "Extend TSUMO needs credit" ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 1-8" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWB:1,2")
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
+ // NOTE:Coins counted by pressing service switch
+ PORT_DIPNAME( 0x04, 0x04, "NOTE" ) PORT_DIPLOCATION("DSWB:3")
+ PORT_DIPSETTING( 0x04, "Coin x5" )
+ PORT_DIPSETTING( 0x00, "Coin x10" )
+ PORT_DIPNAME( 0x18, 0x18, "Game Out Rate" ) PORT_DIPLOCATION("DSWB:4,5")
+ PORT_DIPSETTING( 0x00, "60%" )
+ PORT_DIPSETTING( 0x08, "70%" )
+ PORT_DIPSETTING( 0x10, "80%" )
+ PORT_DIPSETTING( 0x18, "90%" )
+ PORT_DIPNAME( 0x20, 0x20, "Bonus awarded on" ) PORT_DIPLOCATION("DSWB:6")
+ PORT_DIPSETTING( 0x20, "[over BAIMAN]" )
+ PORT_DIPSETTING( 0x00, "[BAIMAN]" )
+ PORT_DIPNAME( 0x40, 0x40, "Variability of payout rate" ) PORT_DIPLOCATION("DSWB:7")
+ PORT_DIPSETTING( 0x40, "[big]" )
+ PORT_DIPSETTING( 0x00, "[small]" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
-// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
@@ -795,6 +645,7 @@ static INPUT_PORTS_START( kaguya2 )
PORT_INCLUDE( nbmjcontrols )
INPUT_PORTS_END
+
static INPUT_PORTS_START( kanatuen )
PORT_START("DSWA")
PORT_DIPNAME( 0x07, 0x07, "Game Out Rate" ) PORT_DIPLOCATION("DSWA:1,2,3")
@@ -990,7 +841,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( secolove )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easy)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -999,44 +850,44 @@ static INPUT_PORTS_START( secolove )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x00, "Nudity" )
+ PORT_DIPNAME( 0x40, 0x00, "Nudity" ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" )
+ PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x03, 0x00, "Number of last chance" )
+ PORT_DIPNAME( 0x03, 0x00, "Number of last chance" ) PORT_DIPLOCATION("DSWB:1,2")
PORT_DIPSETTING( 0x03, "0" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPSETTING( 0x00, "10" )
- PORT_DIPNAME( 0x04, 0x00, "Hanahai" )
+ PORT_DIPNAME( 0x04, 0x00, "Hanahai" ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x00, "Open Reach of CPU" )
+ PORT_DIPNAME( 0x08, 0x00, "Open Reach of CPU" ) PORT_DIPLOCATION("DSWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, "Cancel Hand" )
+ PORT_DIPNAME( 0x10, 0x00, "Cancel Hand" ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, "Wareme" )
+ PORT_DIPNAME( 0x20, 0x00, "Wareme" ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1055,7 +906,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( barline )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, "Game Rate" )
+ PORT_DIPNAME( 0x07, 0x07, "Game Rate" ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x00, "58%" )
PORT_DIPSETTING( 0x01, "64%" )
PORT_DIPSETTING( 0x02, "70%" )
@@ -1064,44 +915,44 @@ static INPUT_PORTS_START( barline )
PORT_DIPSETTING( 0x05, "80%" )
PORT_DIPSETTING( 0x06, "88%" )
PORT_DIPSETTING( 0x07, "95%" )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 1-6" )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 1-8" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" ) // auto stop reels?
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:4") // auto stop reels?
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x30, 0x30, "Music" )
+ PORT_DIPNAME( 0x30, 0x00, "Music" ) PORT_DIPLOCATION("DSWB:5,6")
PORT_DIPSETTING( 0x00, "Type 1" )
PORT_DIPSETTING( 0x10, "Type 2" )
PORT_DIPSETTING( 0x20, "Type 3" )
PORT_DIPSETTING( 0x30, DEF_STR( Off ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1162,7 +1013,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( citylove )
PORT_START("DSWA")
- PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3,4")
PORT_DIPSETTING( 0x0f, "1 (Easy)" )
PORT_DIPSETTING( 0x0e, "2" )
PORT_DIPSETTING( 0x0d, "3" )
@@ -1179,37 +1030,37 @@ static INPUT_PORTS_START( citylove )
PORT_DIPSETTING( 0x02, "14" )
PORT_DIPSETTING( 0x01, "15" )
PORT_DIPSETTING( 0x00, "16 (Hard)" )
- PORT_DIPNAME( 0x30, 0x30, "YAKUMAN cut" )
+ PORT_DIPNAME( 0x30, 0x30, "YAKUMAN cut" ) PORT_DIPLOCATION("DSWA:5,6")
PORT_DIPSETTING( 0x30, "10%" )
PORT_DIPSETTING( 0x20, "30%" )
PORT_DIPSETTING( 0x10, "50%" )
PORT_DIPSETTING( 0x00, "90%" )
- PORT_DIPNAME( 0x40, 0x00, "Nudity" )
+ PORT_DIPNAME( 0x40, 0x00, "Nudity" ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x03, 0x00, "Number of last chance" )
+ PORT_DIPNAME( 0x03, 0x00, "Number of last chance" ) PORT_DIPLOCATION("DSWB:1,2")
PORT_DIPSETTING( 0x03, "0" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "5" )
PORT_DIPSETTING( 0x00, "10" )
- PORT_DIPNAME( 0x04, 0x04, "Hanahai" )
+ PORT_DIPNAME( 0x04, 0x04, "Hanahai" ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x00, "Chonbo" )
+ PORT_DIPNAME( 0x08, 0x00, "Chonbo" ) PORT_DIPLOCATION("DSWB:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Open Reach of CPU" )
+ PORT_DIPNAME( 0x10, 0x10, "Open Reach of CPU" ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Open Mode" )
+ PORT_DIPNAME( 0x20, 0x20, "Open Mode" ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0xc0, 0x00, "Cansel Type" )
+ PORT_DIPNAME( 0xc0, 0x00, "Cansel Type" ) PORT_DIPLOCATION("DSWB:7,8")
PORT_DIPSETTING( 0xc0, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, "TSUMO 3" )
PORT_DIPSETTING( 0x40, "TSUMO 7" )
@@ -1292,7 +1143,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( seiha )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3") // is this correct?
PORT_DIPSETTING( 0x07, "1 (Hard)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -1301,47 +1152,31 @@ static INPUT_PORTS_START( seiha )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Easy)" )
- PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" )
+ PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, "Change Pai and Mat Color" )
+ PORT_DIPNAME( 0x10, 0x00, "Change Pai and Mat Color" ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Character Display Test" )
+ PORT_DIPNAME( 0x20, 0x20, "Character Display Test" ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -1422,7 +1257,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( iemoto )
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Hard)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -1431,47 +1266,31 @@ static INPUT_PORTS_START( iemoto )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Easy)" )
- PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" )
+ PORT_DIPNAME( 0x08, 0x00, "RENCHAN after TENPAIed RYUKYOKU" ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Character Display Test" )
+ PORT_DIPNAME( 0x10, 0x10, "Character Display Test" ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -1947,30 +1766,14 @@ static INPUT_PORTS_START( orangec )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -2293,56 +2096,40 @@ INPUT_PORTS_END
static INPUT_PORTS_START( korinai )
PORT_START("DSWA")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Character Display Test" )
+ PORT_DIPNAME( 0x10, 0x10, "Character Display Test" ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "Select" )
+ PORT_DIPNAME( 0x20, 0x20, "Select" ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Region ) )
PORT_DIPSETTING( 0x00, "Girl" )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -2423,7 +2210,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( crystalg )
PORT_START("DSWA")
- PORT_DIPNAME( 0x0f, 0x0d, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x0f, 0x0d, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3,4")
PORT_DIPSETTING( 0x0d, "1 (Easy)" )
PORT_DIPSETTING( 0x0a, "2" )
PORT_DIPSETTING( 0x09, "3" )
@@ -2433,44 +2220,28 @@ static INPUT_PORTS_START( crystalg )
PORT_DIPSETTING( 0x05, "7" )
PORT_DIPSETTING( 0x04, "8" )
PORT_DIPSETTING( 0x00, "9 (Hard)" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -2487,7 +2258,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( crystal2 )
PORT_START("DSWA")
- PORT_DIPNAME( 0x0f, 0x0d, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x0f, 0x0d, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3,4")
PORT_DIPSETTING( 0x0d, "1 (Easy)" )
PORT_DIPSETTING( 0x0a, "2" )
PORT_DIPSETTING( 0x09, "3" )
@@ -2497,40 +2268,40 @@ static INPUT_PORTS_START( crystal2 )
PORT_DIPSETTING( 0x05, "7" )
PORT_DIPSETTING( 0x04, "8" )
PORT_DIPSETTING( 0x00, "9 (Hard)" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x03, 0x00, "Number of last chance" )
+ PORT_DIPNAME( 0x03, 0x00, "Number of last chance" ) PORT_DIPLOCATION("DSWB:1,2")
PORT_DIPSETTING( 0x03, "0" )
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "10" )
- PORT_DIPNAME( 0x0c, 0x00, "SANGEN Rush" )
+ PORT_DIPNAME( 0x0c, 0x00, "SANGEN Rush" ) PORT_DIPLOCATION("DSWB:3,4")
PORT_DIPSETTING( 0x0c, "1" )
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x04, "5" )
PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2641,30 +2412,14 @@ static INPUT_PORTS_START( nightlov )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 2-7" )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "DIPSW 2-8" )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DSWB:1" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DSWB:2" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DSWB:3" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DSWB:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSWB:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSWB:6" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSWB:7" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSWB:8" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8688_state, nb1413m3_busyflag_r, nullptr) // DRAW BUSY
@@ -2714,15 +2469,16 @@ static MACHINE_CONFIG_START( NBMJDRV_4096, nbmj8688_state )
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_pure_12bit)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("psg", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(READ8(nbmj8688_state, dipsw1_r)) // DIPSW-A read
MCFG_AY8910_PORT_B_READ_CB(READ8(nbmj8688_state, dipsw2_r)) // DIPSW-B read
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( NBMJDRV_256, NBMJDRV_4096 )
@@ -2826,9 +2582,10 @@ static MACHINE_CONFIG_DERIVED( barline, mbmj_h12bit )
MCFG_NB1413M3_TYPE( NB1413M3_BARLINE )
MCFG_SOUND_REPLACE("psg", YM3812, 20000000/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mbmj_p16bit, NBMJDRV_65536 )
@@ -2893,15 +2650,16 @@ static MACHINE_CONFIG_START( mbmj_p16bit_LCD, nbmj8688_state )
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_pure_16bit_LCD)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("psg", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(READ8(nbmj8688_state, dipsw1_r)) // DIPSW-A read
MCFG_AY8910_PORT_B_READ_CB(READ8(nbmj8688_state, dipsw2_r)) // DIPSW-B read
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( bijokkoy, mbmj_p16bit_LCD )
@@ -3090,7 +2848,7 @@ static MACHINE_CONFIG_DERIVED( mjsikaku, NBMJDRV_4096 )
/* sound hardware */
MCFG_SOUND_REPLACE("psg", YM3812, 20000000/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mmsikaku, NBMJDRV_4096 )
@@ -4058,8 +3816,8 @@ GAME( 1988, vipclub, orangec, vipclub, vipclub, driver_device, 0,
/* pure 12-bit palette */
GAME( 1988, kaguya, 0, kaguya, kaguya, driver_device, 0, ROT0, "Miki Syouji", "Mahjong Kaguyahime [BET] (Japan 880521)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, kaguya2, 0, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 [BET] (Japan 890829)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, kaguya2f, kaguya2, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 Fukkokuban [BET] (Japan 010808)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, kaguya2, 0, kaguya2, kaguya, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 [BET] (Japan 890829)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, kaguya2f, kaguya2, kaguya2, kaguya, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 Fukkokuban [BET] (Japan 010808)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, kanatuen, 0, kanatuen, kanatuen, nbmj8688_state, kanatuen, ROT0, "Panac", "Kanatsuen no Onna [BET] (Japan 880905)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, kyuhito, kanatuen, kyuhito, kyuhito, nbmj8688_state, kyuhito, ROT0, "Roller Tron", "Kyukyoku no Hito [BET] (Japan 880824)", MACHINE_SUPPORTS_SAVE )
GAME( 1989, idhimitu, 0, idhimitu, idhimitu, nbmj8688_state, idhimitu, ROT0, "Digital Soft", "Idol no Himitsu [BET] (Japan 890304)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp
index 9dce4a86cd6..64966bd50b3 100644
--- a/src/mame/drivers/nbmj8891.cpp
+++ b/src/mame/drivers/nbmj8891.cpp
@@ -41,12 +41,13 @@ TODO:
******************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
-#include "sound/dac.h"
-#include "sound/ay8910.h"
-#include "sound/3812intf.h"
#include "includes/nbmj8891.h"
+#include "cpu/z80/z80.h"
#include "machine/nvram.h"
+#include "sound/3812intf.h"
+#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
DRIVER_INIT_MEMBER(nbmj8891_state,gionbana)
@@ -346,7 +347,7 @@ static ADDRESS_MAP_START( gionbana_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r) //AM_WRITENOP
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(vramsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -365,7 +366,7 @@ static ADDRESS_MAP_START( mgion_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r) //AM_WRITENOP
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(vramsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -388,7 +389,7 @@ static ADDRESS_MAP_START( omotesnd_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r) AM_WRITENOP
AM_RANGE(0xd0, 0xdf) AM_READ(clut_r)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
ADDRESS_MAP_END
@@ -406,7 +407,7 @@ static ADDRESS_MAP_START( hanamomo_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r) //AM_WRITENOP
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) //AM_WRITENOP
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -425,7 +426,7 @@ static ADDRESS_MAP_START( msjiken_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r) //AM_WRITENOP
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) //AM_WRITENOP
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -444,7 +445,7 @@ static ADDRESS_MAP_START( scandal_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport3_r, nmi_clock_w)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) //AM_WRITENOP
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -464,7 +465,7 @@ static ADDRESS_MAP_START( scandalm_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport3_r, nmi_clock_w)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -484,7 +485,7 @@ static ADDRESS_MAP_START( bananadr_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport3_r, nmi_clock_w)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -503,7 +504,7 @@ static ADDRESS_MAP_START( lovehous_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT0-2")
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(vramsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -522,7 +523,7 @@ static ADDRESS_MAP_START( maiko_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT0-2") //AM_WRITENOP
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(vramsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -538,7 +539,7 @@ static ADDRESS_MAP_START( taiwanmb_io_map, AS_IO, 8, nbmj8891_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
// AM_RANGE(0xc0, 0xc0) AM_WRITENOP // ?
// AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog?
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw3_h_r) AM_WRITE(taiwanmb_gfxdraw_w) // blitter draw start
AM_RANGE(0xe1, 0xe1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw3_l_r)
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw2_r, outcoin_w)
@@ -1242,8 +1243,9 @@ INPUT_PORTS_END
static INPUT_PORTS_START( scandal )
+ // do not have the manual
PORT_START("DSWA")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
PORT_DIPSETTING( 0x07, "1 (Easy)" )
PORT_DIPSETTING( 0x06, "2" )
PORT_DIPSETTING( 0x05, "3" )
@@ -1252,45 +1254,45 @@ static INPUT_PORTS_START( scandal )
PORT_DIPSETTING( 0x02, "6" )
PORT_DIPSETTING( 0x01, "7" )
PORT_DIPSETTING( 0x00, "8 (Hard)" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:4")
PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, "Character Display Test" ) PORT_DIPLOCATION("DSWA:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "Character Display Test" )
+ PORT_START("DSWB") // very likely not populated on PCB
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2286,13 +2288,14 @@ static MACHINE_CONFIG_START( gionbana, nbmj8891_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("fmsnd", YM3812, 2500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mgion, gionbana )
@@ -2324,7 +2327,7 @@ static MACHINE_CONFIG_DERIVED( omotesnd, gionbana )
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( abunai, gionbana )
@@ -2575,7 +2578,7 @@ static MACHINE_CONFIG_DERIVED( mjfocusm, gionbana )
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scandalm, mjfocusm )
@@ -2606,7 +2609,7 @@ static MACHINE_CONFIG_DERIVED( taiwanmb, gionbana )
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nbmj8900.cpp b/src/mame/drivers/nbmj8900.cpp
index ff345a57045..b35348273a7 100644
--- a/src/mame/drivers/nbmj8900.cpp
+++ b/src/mame/drivers/nbmj8900.cpp
@@ -26,11 +26,11 @@ TODO:
******************************************************************************/
#include "emu.h"
+#include "includes/nbmj8900.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
-#include "sound/ay8910.h"
#include "sound/3812intf.h"
-#include "includes/nbmj8900.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
DRIVER_INIT_MEMBER(nbmj8900_state,ohpaipee)
@@ -122,7 +122,7 @@ static ADDRESS_MAP_START( ohpaipee_io_map, AS_IO, 8, nbmj8900_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport3_r)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_WRITE(vramsel_w)
AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r)
AM_RANGE(0xf1, 0xf1) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw2_r, outcoin_w)
@@ -323,13 +323,14 @@ static MACHINE_CONFIG_START( ohpaipee, nbmj8900_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM3812, 2500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.42) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( togenkyo, ohpaipee )
diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp
index bd37c58545e..9b8e578432f 100644
--- a/src/mame/drivers/nbmj8991.cpp
+++ b/src/mame/drivers/nbmj8991.cpp
@@ -31,12 +31,13 @@ Notes:
******************************************************************************/
#include "emu.h"
+#include "includes/nbmj8991.h"
#include "cpu/z80/z80.h"
-#include "sound/ay8910.h"
+#include "machine/nvram.h"
#include "sound/3812intf.h"
+#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/nbmj8991.h"
-#include "machine/nvram.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(nbmj8991_state::soundbank_w)
@@ -164,7 +165,7 @@ static ADDRESS_MAP_START( galkoku_io_map, AS_IO, 8, nbmj8991_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport3_r, nmi_clock_w)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -179,7 +180,7 @@ static ADDRESS_MAP_START( hyouban_io_map, AS_IO, 8, nbmj8991_state )
AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w)
AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w)
AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport3_r, nmi_clock_w)
- AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_byte_interface, write)
// AM_RANGE(0xe0, 0xe0) AM_WRITENOP
AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, dipsw1_r, outcoin_w)
AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r)
@@ -221,8 +222,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( nbmj8991_sound_io_map, AS_IO, 8, nbmj8991_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
- AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
+ AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x04, 0x04) AM_WRITE(soundbank_w)
AM_RANGE(0x06, 0x06) AM_WRITENOP
AM_RANGE(0x80, 0x81) AM_DEVWRITE("fmsnd", ym3812_device, write)
@@ -1349,12 +1350,13 @@ static MACHINE_CONFIG_START( nbmjdrv1, nbmj8991_state ) // galkoku
MCFG_PALETTE_ADD("palette", 256)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("fmsnd", YM3812, 25000000/10)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1385,18 +1387,18 @@ static MACHINE_CONFIG_START( nbmjdrv2, nbmj8991_state ) // pstadium
MCFG_PALETTE_ADD("palette", 256)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("fmsnd", YM3812, 25000000/6.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1408,7 +1410,7 @@ static MACHINE_CONFIG_DERIVED( nbmjdrv3, nbmjdrv1 )
MCFG_SOUND_REPLACE("fmsnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp
index 2797a918661..46decf5721d 100644
--- a/src/mame/drivers/nbmj9195.cpp
+++ b/src/mame/drivers/nbmj9195.cpp
@@ -22,12 +22,13 @@ Notes:
******************************************************************************/
#include "emu.h"
-#include "machine/nvram.h"
+#include "includes/nbmj9195.h"
#include "includes/nb1413m3.h" // needed for mahjong input controller
#include "machine/gen_latch.h"
+#include "machine/nvram.h"
#include "sound/3812intf.h"
#include "sound/dac.h"
-#include "includes/nbmj9195.h"
+#include "sound/volt_reg.h"
void nbmj9195_state::machine_start()
@@ -1161,54 +1162,53 @@ static INPUT_PORTS_START( gal10ren )
// I don't have manual for this game.
PORT_START("DSWA")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
+ PORT_DIPSETTING( 0x07, "1 (Easy)" )
+ PORT_DIPSETTING( 0x06, "2" )
+ PORT_DIPSETTING( 0x05, "3" )
+ PORT_DIPSETTING( 0x04, "4" )
+ PORT_DIPSETTING( 0x03, "5" )
+ PORT_DIPSETTING( 0x02, "6" )
+ PORT_DIPSETTING( 0x01, "7" )
+ PORT_DIPSETTING( 0x00, "8 (Hard)" )
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:4,5")
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
+ PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" ) PORT_DIPLOCATION("DSWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
+ PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" ) PORT_DIPLOCATION("DSWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
+ PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
+ PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" ) PORT_DIPLOCATION("DSWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
+ PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
+ PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Character Display Test" )
+ PORT_DIPNAME( 0x40, 0x40, "Character Display Test" ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" )
+ PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1230,54 +1230,53 @@ static INPUT_PORTS_START( renaiclb )
// I don't have manual for this game.
PORT_START("DSWA")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 1-1" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 1-2" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 1-3" )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 1-4" )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 1-5" )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:1,2,3")
+ PORT_DIPSETTING( 0x07, "1 (Easy)" )
+ PORT_DIPSETTING( 0x06, "2" )
+ PORT_DIPSETTING( 0x05, "3" )
+ PORT_DIPSETTING( 0x04, "4" )
+ PORT_DIPSETTING( 0x03, "5" )
+ PORT_DIPSETTING( 0x02, "6" )
+ PORT_DIPSETTING( 0x01, "7" )
+ PORT_DIPSETTING( 0x00, "8 (Hard)" )
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:4,5")
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
+ PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "DIPSW 1-7" )
+ PORT_DIPNAME( 0x40, 0x00, "Voices" ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("DSWB")
- PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" )
+ PORT_DIPNAME( 0x01, 0x01, "DIPSW 2-1" ) PORT_DIPLOCATION("DSWB:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" )
+ PORT_DIPNAME( 0x02, 0x02, "DIPSW 2-2" ) PORT_DIPLOCATION("DSWB:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" )
+ PORT_DIPNAME( 0x04, 0x04, "DIPSW 2-3" ) PORT_DIPLOCATION("DSWB:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" )
+ PORT_DIPNAME( 0x08, 0x08, "DIPSW 2-4" ) PORT_DIPLOCATION("DSWB:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" )
+ PORT_DIPNAME( 0x10, 0x10, "DIPSW 2-5" ) PORT_DIPLOCATION("DSWB:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" )
+ PORT_DIPNAME( 0x20, 0x20, "DIPSW 2-6" ) PORT_DIPLOCATION("DSWB:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Character Display Test" )
+ PORT_DIPNAME( 0x40, 0x40, "Character Display Test" ) PORT_DIPLOCATION("DSWB:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" )
+ PORT_DIPNAME( 0x80, 0x80, "Graphic ROM Test" ) PORT_DIPLOCATION("DSWB:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2556,22 +2555,6 @@ static const z80_daisy_config daisy_chain_sound[] =
{ nullptr }
};
-
-// the only difference between these 2 setups is the DAC is swapped, is that intentional?
-#define OTHERS_TMZ84C011_SOUND_PORTS \
- MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(nbmj9195_state, soundbank_w)) \
- MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac1", dac_device, write_unsigned8)) \
- MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac2", dac_device, write_unsigned8)) \
- MCFG_TMPZ84C011_PORTD_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read)) \
- MCFG_TMPZ84C011_PORTE_WRITE_CB(WRITE8(nbmj9195_state, soundcpu_porte_w))
-#define MSCOUTM_TMZ84C011_SOUND_PORTS \
- MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(nbmj9195_state, soundbank_w)) \
- MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac2", dac_device, write_unsigned8)) \
- MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac1", dac_device, write_unsigned8)) \
- MCFG_TMPZ84C011_PORTD_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read)) \
- MCFG_TMPZ84C011_PORTE_WRITE_CB(WRITE8(nbmj9195_state, soundcpu_porte_w))
-
-
#define MSCOUTM_TMZ84C011_MAIN_PORTS \
MCFG_TMPZ84C011_PORTA_READ_CB(IOPORT("SYSTEM")) \
MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(nbmj9195_state, mscoutm_inputportsel_w)) \
@@ -2602,6 +2585,11 @@ static MACHINE_CONFIG_START( NBMJDRV1_base, nbmj9195_state )
MCFG_CPU_PROGRAM_MAP(sailorws_sound_map)
MCFG_CPU_IO_MAP(sailorws_sound_io_map)
MCFG_TMPZ84C011_ZC0_CB(DEVWRITELINE("audiocpu", tmpz84c011_device, trg3))
+ MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(nbmj9195_state, soundbank_w)) \
+ MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac1", dac_byte_interface, write)) \
+ MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac2", dac_byte_interface, write)) \
+ MCFG_TMPZ84C011_PORTD_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read)) \
+ MCFG_TMPZ84C011_PORTE_WRITE_CB(WRITE8(nbmj9195_state, soundcpu_porte_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -2615,18 +2603,18 @@ static MACHINE_CONFIG_START( NBMJDRV1_base, nbmj9195_state )
MCFG_PALETTE_ADD("palette", 256)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( NBMJDRV1, NBMJDRV1_base )
@@ -2634,9 +2622,6 @@ static MACHINE_CONFIG_DERIVED( NBMJDRV1, NBMJDRV1_base )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
OTHERS_TMZ84C011_MAIN_PORTS
-
- MCFG_CPU_MODIFY("audiocpu")
- OTHERS_TMZ84C011_SOUND_PORTS
MACHINE_CONFIG_END
@@ -2646,9 +2631,6 @@ static MACHINE_CONFIG_DERIVED( NBMJDRV2, NBMJDRV1_base )
MCFG_CPU_MODIFY("maincpu")
OTHERS_TMZ84C011_MAIN_PORTS
- MCFG_CPU_MODIFY("audiocpu")
- OTHERS_TMZ84C011_SOUND_PORTS
-
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(nbmj9195_state,_1layer)
MACHINE_CONFIG_END
@@ -2660,9 +2642,6 @@ static MACHINE_CONFIG_DERIVED( NBMJDRV3, NBMJDRV1_base )
MCFG_CPU_MODIFY("maincpu")
MSCOUTM_TMZ84C011_MAIN_PORTS
- MCFG_CPU_MODIFY("audiocpu")
- MSCOUTM_TMZ84C011_SOUND_PORTS
-
/* video hardware */
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_ENTRIES(512)
diff --git a/src/mame/drivers/neopcb.cpp b/src/mame/drivers/neopcb.cpp
index f2802a5070b..199b2fab29f 100644
--- a/src/mame/drivers/neopcb.cpp
+++ b/src/mame/drivers/neopcb.cpp
@@ -242,7 +242,7 @@ void neopcb_state::svcpcb_gfx_decrypt()
static const UINT8 xorval[4] = { 0x34, 0x21, 0xc4, 0xe9 };
int rom_size = memregion("sprites")->bytes();
UINT8 *rom = memregion("sprites")->base();
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < rom_size; i++)
rom[i] ^= xorval[(i % 4)];
@@ -286,7 +286,7 @@ void neopcb_state::kf2k3pcb_gfx_decrypt()
static const UINT8 xorval[4] = { 0x34, 0x21, 0xc4, 0xe9 };
int rom_size = memregion("sprites")->bytes();
UINT8 *rom = memregion("sprites")->base();
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
for (int i = 0; i < rom_size; i++)
rom[ i ] ^= xorval[ (i % 4) ];
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index 639c980d3bc..1729789d8f6 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -98,17 +98,17 @@ the Neogeo Pocket.
#include "emu.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "cpu/tlcs900/tlcs900.h"
#include "cpu/z80/z80.h"
#include "sound/t6w28.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/k1ge.h"
#include "rendlay.h"
#include "softlist.h"
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
-
enum flash_state
{
F_READ, /* xxxx F0 or 5555 AA 2AAA 55 5555 F0 */
@@ -132,8 +132,8 @@ public:
m_tlcs900(*this, "maincpu"),
m_z80(*this, "soundcpu"),
m_t6w28(*this, "t6w28"),
- m_dac_l(*this, "dac_l"),
- m_dac_r(*this, "dac_r"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_cart(*this, "cartslot"),
m_mainram(*this, "mainram"),
m_k1ge(*this, "k1ge"),
@@ -172,8 +172,8 @@ public:
required_device<cpu_device> m_tlcs900;
required_device<cpu_device> m_z80;
required_device<t6w28_device> m_t6w28;
- required_device<dac_device> m_dac_l;
- required_device<dac_device> m_dac_r;
+ required_device<dac_byte_interface> m_ldac;
+ required_device<dac_byte_interface> m_rdac;
required_device<generic_slot_device> m_cart;
required_shared_ptr<UINT8> m_mainram;
required_device<k1ge_device> m_k1ge;
@@ -278,10 +278,10 @@ WRITE8_MEMBER( ngp_state::ngp_io_w )
break;
case 0x22: /* DAC right */
- m_dac_r->write_unsigned8(data );
+ m_rdac->write(data);
break;
case 0x23: /* DAC left */
- m_dac_l->write_unsigned8(data );
+ m_ldac->write(data);
break;
/* Internal eeprom related? */
@@ -838,10 +838,11 @@ static MACHINE_CONFIG_START( ngp_common, ngp_state )
MCFG_SOUND_ROUTE( 0, "lspeaker", 0.50 )
MCFG_SOUND_ROUTE( 1, "rspeaker", 0.50 )
- MCFG_SOUND_ADD( "dac_l", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "lspeaker", 0.50 )
- MCFG_SOUND_ADD( "dac_r", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "rspeaker", 0.50 )
+ MCFG_SOUND_ADD("ldac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp
index c11ce132fbf..2d0d58f4df4 100644
--- a/src/mame/drivers/ninjakd2.cpp
+++ b/src/mame/drivers/ninjakd2.cpp
@@ -1578,7 +1578,7 @@ void ninjakd2_state::lineswap_gfx_roms(const char *region, const int bit)
{
const int length = memregion(region)->bytes();
UINT8* const src = memregion(region)->base();
- dynamic_buffer temp(length);
+ std::vector<UINT8> temp(length);
const int mask = (1 << (bit + 1)) - 1;
for (int sa = 0; sa < length; sa++)
@@ -1632,6 +1632,8 @@ void ninjakd2_state::robokid_motion_error_kludge(UINT16 offset)
// It looks like it's due to a buggy random number generator,
// then it possibly happens on the real arcade cabinet too.
// I doubt it is protection related, but you can never be sure.
+ // Update 131016: there's also a 5208 VECTOR ERROR happening at worm mid-boss on stage 10, I'm prone to think it's
+ // a timing/sprite fault on our side therefore marking as UNEMULATED_PROTECTION until this is resolved. -AS
UINT8 *ROM = memregion("maincpu")->base() + offset;
ROM[0] = 0xe6;
ROM[1] = 0x03; // and 3
@@ -1671,10 +1673,10 @@ GAME( 1987, mnight, 0, mnight, mnight, ninjakd2_state, mnight, R
GAME( 1988, arkarea, 0, arkarea, arkarea, ninjakd2_state, mnight, ROT0, "UPL", "Ark Area", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokid, 0, robokid, robokid, ninjakd2_state, robokid, ROT0, "UPL", "Atomic Robo-kid (World, Type-2)", MACHINE_SUPPORTS_SAVE ) // 3-digit highscore names
-GAME( 1988, robokidj, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokidj2, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 2)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, robokidj3, robokid, robokid, robokidj, driver_device, 0, ROT0, "UPL", "Atomic Robo-kid (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, robokid, 0, robokid, robokid, ninjakd2_state, robokid, ROT0, "UPL", "Atomic Robo-kid (World, Type-2)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) // 3-digit highscore names
+GAME( 1988, robokidj, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1988, robokidj2, robokid, robokid, robokidj, ninjakd2_state, robokidj, ROT0, "UPL", "Atomic Robo-kid (Japan, Type-2, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1988, robokidj3, robokid, robokid, robokidj, driver_device, 0, ROT0, "UPL", "Atomic Robo-kid (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION )
GAME( 1989, omegaf, 0, omegaf, omegaf, driver_device, 0, ROT270, "UPL", "Omega Fighter", MACHINE_SUPPORTS_SAVE )
GAME( 1989, omegafs, omegaf, omegaf, omegaf, driver_device, 0, ROT270, "UPL", "Omega Fighter Special", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index e7fe3060169..553939db652 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -36,14 +36,15 @@ Memo:
******************************************************************************/
#include "emu.h"
+#include "includes/niyanpai.h"
+#include "includes/nb1413m3.h"
#include "cpu/z80/tmpz84c011.h"
#include "cpu/m68000/m68000.h"
+#include "machine/nvram.h"
#include "machine/tmp68301.h"
-#include "includes/nb1413m3.h"
-#include "sound/dac.h"
#include "sound/3812intf.h"
-#include "machine/nvram.h"
-#include "includes/niyanpai.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(niyanpai_state::soundbank_w)
@@ -732,8 +733,8 @@ static MACHINE_CONFIG_START( niyanpai, niyanpai_state )
MCFG_CPU_IO_MAP(niyanpai_sound_io_map)
MCFG_TMPZ84C011_PORTD_READ_CB(DEVREAD8("soundlatch", generic_latch_8_device, read))
MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(niyanpai_state, soundbank_w))
- MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac1", dac_device, write_unsigned8))
- MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac2", dac_device, write_unsigned8))
+ MCFG_TMPZ84C011_PORTB_WRITE_CB(DEVWRITE8("dac1", dac_byte_interface, write))
+ MCFG_TMPZ84C011_PORTC_WRITE_CB(DEVWRITE8("dac2", dac_byte_interface, write))
MCFG_TMPZ84C011_PORTE_WRITE_CB(WRITE8(niyanpai_state, soundlatch_clear_w))
MCFG_TMPZ84C011_ZC0_CB(DEVWRITELINE("audiocpu", tmpz84c011_device, trg3))
@@ -751,18 +752,18 @@ static MACHINE_CONFIG_START( niyanpai, niyanpai_state )
MCFG_PALETTE_ADD("palette", 256*3)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3812, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.37) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( musobana, niyanpai )
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index d9832defd54..6f75d9c5b69 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -5318,7 +5318,7 @@ static void decryptcode( running_machine &machine, int a23, int a22, int a21, in
int i;
UINT8 *RAM = machine.root_device().memregion( "maincpu" )->base();
size_t size = machine.root_device().memregion( "maincpu" )->bytes();
- dynamic_buffer buffer( size );
+ std::vector<UINT8> buffer( size );
memcpy( &buffer[0], RAM, size );
for( i = 0; i < size; i++ )
@@ -6686,6 +6686,33 @@ ROM_START( bjtwinp )
ROM_LOAD( "bottom.ic27", 0x0c0000, 0x80000, CRC(6ebeb9e4) SHA1(b547b2fbcc0a35d6183dd4f19684b04839690a2b) )
ROM_END
+
+ROM_START( bjtwinpa )
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "ic76.bin", 0x00000, 0x20000, CRC(81106d1e) SHA1(81c195173cf859f6266c160ee94ac4734edef085) )
+ ROM_LOAD16_BYTE( "ic75.bin", 0x00001, 0x20000, CRC(7c99b97f) SHA1(36e34b7a5bb876b7bbee46ace7acc03faeee211e) )
+
+ ROM_REGION( 0x010000, "fgtile", 0 )
+ ROM_LOAD( "ic35.bin", 0x000000, 0x010000, CRC(aa13df7c) SHA1(162d4f12364c68028e86fe97ee75c262daa4c699) ) /* 8x8 tiles */
+
+ ROM_REGION( 0x200000, "bgtile", 0 )
+ ROM_LOAD( "ic32_1.bin", 0x000000, 0x080000, CRC(e2d2b331) SHA1(d8fdbff497303a00fc866f0ef07ba74b369c0636) )
+ ROM_LOAD( "ic32_2.bin", 0x080000, 0x080000, CRC(28a3a845) SHA1(4daf71dce5e598ee7ee7e09bb08ec1b2f06f2b01) )
+ ROM_LOAD( "ic32_3.bin", 0x100000, 0x080000, CRC(ecce80c9) SHA1(ae7410f47e911988f654e78d585d78cf40e0ae5e) )
+
+ ROM_REGION( 0x100000, "sprites", 0 )
+ ROM_LOAD16_BYTE( "ic100_1.bin", 0x000000, 0x080000, CRC(2ea7e460) SHA1(b8dc13994ae2433fc7c38412c9ea6f10f945bca5) )
+ ROM_LOAD16_BYTE( "ic100_2.bin", 0x000001, 0x080000, CRC(ec85e1b7) SHA1(2f9a60ad2beb22d1b41dab7db3634b8e36cfce3e) )
+
+ ROM_REGION( 0x140000, "oki1", 0 ) /* OKIM6295 samples */
+ ROM_LOAD( "bottom.ic30", 0x040000, 0x80000, CRC(b5ef197f) SHA1(89d675f921dead585c2fef44105a7aea2f1f399c) ) /* all banked */
+ ROM_LOAD( "top.ic30", 0x0c0000, 0x80000, CRC(ab50531d) SHA1(918987f01a8b1b007721d2b365e2b2fc536bd676) )
+
+ ROM_REGION( 0x140000, "oki2", 0 ) /* OKIM6295 samples */
+ ROM_LOAD( "top.ic27", 0x040000, 0x80000, CRC(adb2f256) SHA1(ab7bb6683799203d0f46705f2fd241c6de914e77) ) /* all banked */
+ ROM_LOAD( "bottom.ic27", 0x0c0000, 0x80000, CRC(6ebeb9e4) SHA1(b547b2fbcc0a35d6183dd4f19684b04839690a2b) )
+ROM_END
+
ROM_START( atombjt ) // based off bjtwina set
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "22.u67", 0x00000, 0x20000, CRC(bead8c70) SHA1(2694bb0639f6b94119c21faf3810f00ef20b50da) )
@@ -7861,8 +7888,9 @@ GAME( 1992, cactus, sabotenb, bjtwin, sabotenb, nmk16_state, nmk, ROT0,
GAME( 1993, bjtwin, 0, bjtwin, bjtwin, nmk16_state, bjtwin, ROT270, "NMK", "Bombjack Twin (set 1)", MACHINE_NO_COCKTAIL )
GAME( 1993, bjtwina, bjtwin, bjtwin, bjtwin, nmk16_state, bjtwin, ROT270, "NMK", "Bombjack Twin (set 2)", MACHINE_NO_COCKTAIL )
-GAME( 1993, bjtwinp, bjtwin, bjtwin, bjtwin, driver_device, 0, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures)", MACHINE_NO_COCKTAIL ) // Genuine NMK PCB but GFX aren't encrypted
-GAME( 1993, atombjt, bjtwin, atombjt, bjtwin, driver_device, 0, ROT270, "bootleg", "Atom (bootleg of Bombjack Twin)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING ) // some non-trivial mods to the gfx and sound hw
+GAME( 1993, bjtwinp, bjtwin, bjtwin, bjtwin, driver_device, 0, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 1)", MACHINE_NO_COCKTAIL ) // Cheap looking PCB, but Genuine NMK PCB, GFX aren't encrypted (maybe Korean version not proto?)
+GAME( 1993, bjtwinpa, bjtwin, bjtwin, bjtwin, nmk16_state, bjtwin, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 2)", MACHINE_NO_COCKTAIL ) // same PCB as above, different program revision, GFX are encrypted
+GAME( 1993, atombjt, bjtwin, atombjt, bjtwin, driver_device, 0, ROT270, "bootleg", "Atom (bootleg of Bombjack Twin)", MACHINE_NO_COCKTAIL | MACHINE_NOT_WORKING ) // some non-trivial mods to the gfx and sound hw (playmark hardware?)
GAME( 1995, nouryoku, 0, bjtwin, nouryoku, nmk16_state, nmk, ROT0, "Tecmo", "Nouryoku Koujou Iinkai", MACHINE_NO_COCKTAIL )
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index 9a3ab8e7a62..5c637919ca7 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -76,11 +76,12 @@ DONE:
*/
#include "cpu/i86/i86.h"
-#include "machine/pic8259.h"
#include "machine/ay31015.h"
-#include "video/tms9927.h"
-#include "sound/dac.h"
+#include "machine/pic8259.h"
#include "machine/wd_fdc.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/tms9927.h"
class notetaker_state : public driver_device
{
@@ -109,7 +110,7 @@ public:
required_device<ay31015_device> m_kbduart;
required_device<ay31015_device> m_eiauart;
required_device<crt5027_device> m_crtc;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
required_device<fd1791_t> m_fdc;
required_device<floppy_connector> m_floppy0;
floppy_image_device *m_floppy;
@@ -227,7 +228,7 @@ TIMER_CALLBACK_MEMBER(notetaker_state::timer_fifoclk)
m_outfifo_count--;
}
m_outfifo_tail_ptr&=0xF;
- m_dac->write_unsigned16(data);
+ m_dac->write(data);
m_FIFO_timer->adjust(attotime::from_hz(((XTAL_960kHz/10)/4)/((m_FrSel0<<3)+(m_FrSel1<<2)+(m_FrSel2<<1)+1))); // FIFO timer is clocked by 960khz divided by 10 (74ls162 decade counter), divided by 4 (mc14568B with divider 1 pins set to 4), divided by 1,3,5,7,9,11,13,15 (or 0,2,4,6,8,10,12,14?)
}
@@ -349,7 +350,7 @@ WRITE16_MEMBER(notetaker_state::FIFOBus_w)
#endif
return;
}
- m_outfifo[m_outfifo_head_ptr] = data;
+ m_outfifo[m_outfifo_head_ptr] = data >> 4;
m_outfifo_head_ptr++;
m_outfifo_count++;
m_outfifo_head_ptr&=0xF;
@@ -824,10 +825,11 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state )
MCFG_FLOPPY_DRIVE_ADD("wd1791:0", notetaker_floppies, "525dd", floppy_image_device::default_floppy_formats)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono") // TODO: should be stereo
- MCFG_SOUND_ADD("dac", DAC, 0) /* DAC1200, set up with two sample and hold HA2425 chips outside it to do stereo */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+ // TODO: hook DAC up to two HA2425 (sample and hold) chips and hook those up to the speakers
+ MCFG_SOUND_ADD("dac", DAC1200, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(notetaker_state,notetakr)
diff --git a/src/mame/drivers/nova2001.cpp b/src/mame/drivers/nova2001.cpp
index 4c8f3f174d9..fc1e89f98c0 100644
--- a/src/mame/drivers/nova2001.cpp
+++ b/src/mame/drivers/nova2001.cpp
@@ -977,7 +977,7 @@ void nova2001_state::lineswap_gfx_roms(const char *region, const int bit)
UINT8* const src = memregion(region)->base();
- dynamic_buffer temp(length);
+ std::vector<UINT8> temp(length);
const int mask = (1 << (bit + 1)) - 1;
diff --git a/src/mame/drivers/nycaptor.cpp b/src/mame/drivers/nycaptor.cpp
index d0baed92afe..2e5dbd7fb91 100644
--- a/src/mame/drivers/nycaptor.cpp
+++ b/src/mame/drivers/nycaptor.cpp
@@ -194,12 +194,13 @@ Stephh's additional notes (based on the game Z80 code and some tests) :
#include "emu.h"
+#include "includes/nycaptor.h"
#include "cpu/m6805/m6805.h"
#include "cpu/z80/z80.h"
-#include "includes/nycaptor.h"
#include "includes/taitoipt.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(nycaptor_state::sub_cpu_halt_w)
@@ -454,7 +455,7 @@ static ADDRESS_MAP_START( cyclshtg_slave_map, AS_PROGRAM, 8, nycaptor_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( cyclshtg_sound_map, AS_PROGRAM, 8, nycaptor_state )
- AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("dac", dac_device, write_signed8) //otherwise no girl's scream, see MT03975
+ AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("dac", dac_byte_interface, write) //otherwise no girl's scream, see MT03975
AM_IMPORT_FROM( nycaptor_sound_map )
ADDRESS_MAP_END
@@ -835,33 +836,35 @@ static MACHINE_CONFIG_START( nycaptor, nycaptor_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
MCFG_MSM5232_SET_CAPACITORS(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6) /* 0.65 (???) uF capacitors (match the sample, not verified) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
+
+ // Does the DAC also exist on this board? nycaptor writes 0x80 to 0xd600
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( cyclshtg, nycaptor_state )
@@ -898,36 +901,37 @@ static MACHINE_CONFIG_START( cyclshtg, nycaptor_state )
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
MCFG_MSM5232_SET_CAPACITORS(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6) /* 0.65 (???) uF capacitors (match the sample, not verified) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -960,37 +964,37 @@ static MACHINE_CONFIG_START( bronx, nycaptor_state )
MCFG_PALETTE_ADD("palette", 512)
MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
-
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 8000000/4)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nycaptor_state, unk_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(nycaptor_state, unk_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("msm", MSM5232, 2000000)
MCFG_MSM5232_SET_CAPACITORS(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6) /* 0.65 (???) uF capacitors (match the sample, not verified) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
+ MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
+ MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
+ MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
+ MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
+ MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nyny.cpp b/src/mame/drivers/nyny.cpp
index 12d7a69d02e..b6dd5556216 100644
--- a/src/mame/drivers/nyny.cpp
+++ b/src/mame/drivers/nyny.cpp
@@ -64,16 +64,17 @@
***************************************************************************/
#include "emu.h"
-#include "machine/rescap.h"
-#include "machine/6821pia.h"
-#include "machine/74123.h"
-#include "video/mc6845.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "sound/ay8910.h"
-#include "sound/dac.h"
+#include "machine/6821pia.h"
+#include "machine/74123.h"
#include "machine/gen_latch.h"
#include "machine/nvram.h"
+#include "machine/rescap.h"
+#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/mc6845.h"
#define MAIN_CPU_MASTER_CLOCK XTAL_11_2MHz
@@ -637,7 +638,7 @@ static MACHINE_CONFIG_START( nyny, nyny_state )
MCFG_PIA_IRQB_HANDLER(WRITELINE(nyny_state,main_cpu_irq))
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
@@ -645,19 +646,20 @@ static MACHINE_CONFIG_START( nyny, nyny_state )
MCFG_SOUND_ADD("ay1", AY8910, AUDIO_CPU_1_CLOCK)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(nyny_state, nyny_ay8910_37_port_a_w))
- MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("dac", dac_device, write_unsigned8))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, AUDIO_CPU_1_CLOCK)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("SW2"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("SW1"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay3", AY8910, AUDIO_CPU_2_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.03)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.03)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/octopus.cpp b/src/mame/drivers/octopus.cpp
index b1140806bb6..11a4eeae55b 100644
--- a/src/mame/drivers/octopus.cpp
+++ b/src/mame/drivers/octopus.cpp
@@ -124,6 +124,13 @@ Its BIOS performs POST and halts as there's no keyboard.
#include "machine/octo_kbd.h"
#include "machine/bankdev.h"
#include "machine/ram.h"
+#include "bus/centronics/ctronics.h"
+#include "bus/centronics/comxpl80.h"
+#include "bus/centronics/epson_ex800.h"
+#include "bus/centronics/epson_lx800.h"
+#include "bus/centronics/epson_lx810l.h"
+#include "bus/centronics/printer.h"
+#include "softlist.h"
class octopus_state : public driver_device
{
@@ -148,6 +155,7 @@ public:
m_ppi(*this, "ppi"),
m_speaker(*this, "speaker"),
m_serial(*this, "serial"),
+ m_parallel(*this, "parallel"),
m_z80_bankdev(*this, "z80_bank"),
m_ram(*this, "ram"),
m_current_dma(-1),
@@ -184,11 +192,15 @@ public:
DECLARE_WRITE8_MEMBER(rtc_w);
DECLARE_READ8_MEMBER(z80_vector_r);
DECLARE_WRITE8_MEMBER(z80_vector_w);
+ DECLARE_READ8_MEMBER(parallel_r);
+ DECLARE_WRITE8_MEMBER(parallel_w);
DECLARE_WRITE_LINE_MEMBER(spk_w);
DECLARE_WRITE_LINE_MEMBER(spk_freq_w);
DECLARE_WRITE_LINE_MEMBER(beep_w);
DECLARE_WRITE_LINE_MEMBER(serial_clock_w);
+ DECLARE_WRITE_LINE_MEMBER(parallel_busy_w) { m_printer_busy = state; }
+ DECLARE_WRITE_LINE_MEMBER(parallel_slctout_w) { m_printer_slctout = state; }
DECLARE_WRITE_LINE_MEMBER(dack0_w) { m_dma1->hack_w(state ? 0 : 1); } // for all unused DMA channel?
DECLARE_WRITE_LINE_MEMBER(dack1_w) { if(!state) m_current_dma = 1; else if(m_current_dma == 1) m_current_dma = -1; } // HD
@@ -226,6 +238,7 @@ private:
required_device<i8255_device> m_ppi;
required_device<speaker_sound_device> m_speaker;
required_device<z80sio2_device> m_serial;
+ required_device<centronics_device> m_parallel;
required_device<address_map_bank_device> m_z80_bankdev;
required_device<ram_device> m_ram;
@@ -246,6 +259,8 @@ private:
UINT8 m_prev_cntl;
UINT8 m_rs232_vector;
UINT8 m_rs422_vector;
+ bool m_printer_busy;
+ bool m_printer_slctout;
emu_timer* m_timer_beep;
};
@@ -288,7 +303,7 @@ static ADDRESS_MAP_START( octopus_io, AS_IO, 8, octopus_state )
// 0xcf: mode control
AM_RANGE(0xd0, 0xd3) AM_DEVREADWRITE("fdc", fd1793_t, read, write)
AM_RANGE(0xe0, 0xe4) AM_READWRITE(z80_vector_r, z80_vector_w)
- // 0xf0-f1: Parallel interface data I/O (Centronics), and control/status
+ AM_RANGE(0xf0, 0xf1) AM_READWRITE(parallel_r, parallel_w)
AM_RANGE(0xf8, 0xff) AM_DEVREADWRITE("ppi", i8255_device, read, write)
ADDRESS_MAP_END
@@ -414,10 +429,14 @@ WRITE8_MEMBER(octopus_state::system_w)
READ8_MEMBER(octopus_state::system_r)
{
+ UINT8 val = 0x00;
switch(offset)
{
case 0:
- return 0x1f; // do bits 0-4 mean anything? Language DIPs?
+ val = 0x1f;
+ if(m_printer_slctout)
+ val |= 0x20;
+ return val; // do bits 0-4 mean anything? Language DIPs?
}
return 0xff;
@@ -613,6 +632,50 @@ WRITE_LINE_MEMBER(octopus_state::serial_clock_w)
m_serial->txca_w(state);
}
+// Parallel Centronics port
+// 0xf0 : data
+// 0xf1 : control
+// bit 2 = INIT? On boot, bits 0 and 1 are set high, bit 2 is set low then high again, all other bits are set low
+// can generate interrupts - tech manual suggests that Strobe, Init, Ack, and Busy can trigger an interrupt (IRQ14)
+READ8_MEMBER(octopus_state::parallel_r)
+{
+ switch(offset)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return m_printer_busy ? 0x01 : 0x00; // correct? Tech manual doesn't explain which bit is which
+ }
+ return 0xff;
+}
+
+WRITE8_MEMBER(octopus_state::parallel_w)
+{
+ switch(offset)
+ {
+ case 0: // data
+ if(!(m_gpo & 0x02)) // parallel data direction
+ {
+ m_parallel->write_data0(BIT(data,0));
+ m_parallel->write_data1(BIT(data,1));
+ m_parallel->write_data2(BIT(data,2));
+ m_parallel->write_data3(BIT(data,3));
+ m_parallel->write_data4(BIT(data,4));
+ m_parallel->write_data5(BIT(data,5));
+ m_parallel->write_data6(BIT(data,6));
+ m_parallel->write_data7(BIT(data,7));
+ }
+ break;
+ case 1: // control (bit order unknown?)
+ if(!(m_gpo & 0x01)) // parallel control direction
+ {
+ m_parallel->write_init(BIT(data,2));
+ m_pic2->ir6_w(!BIT(data,2));
+ }
+ break;
+ }
+}
+
READ8_MEMBER(octopus_state::dma_read)
{
UINT8 byte;
@@ -642,13 +705,14 @@ WRITE_LINE_MEMBER( octopus_state::dma_hrq_changed )
// Any interrupt will also give bus control back to the 8088
IRQ_CALLBACK_MEMBER(octopus_state::x86_irq_cb)
{
+ UINT8 vector;
m_subcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_z80_active = false;
- if((strcmp(device.tag(),"pic_master") == 0) && irqline == 1)
- return m_serial->m1_r();
- else
- return m_pic1->inta_cb(device,irqline);
+ vector = m_pic1->inta_cb(device,irqline);
+ if(vector == 0x61) // if we have hit a serial comms IRQ, then also have the Z80SIO/2 acknowledge the interrupt
+ vector = m_serial->m1_r();
+ return vector;
}
void octopus_state::machine_start()
@@ -684,7 +748,7 @@ SCN2674_DRAW_CHARACTER_MEMBER(octopus_state::display_pixels)
{
if(!lg)
{
- UINT8 tile = m_vram[address & 0x1fff];
+ UINT8 tile = m_vram[address & 0x0fff];
UINT8 data = m_fontram[(tile * 16) + linecount];
for (int z=0;z<8;z++)
bitmap.pix32(y,x + z) = BIT(data,z) ? rgb_t::white : rgb_t::black;
@@ -707,6 +771,15 @@ static SLOT_INTERFACE_START(keyboard)
SLOT_INTERFACE("octopus", OCTOPUS_KEYBOARD)
SLOT_INTERFACE_END
+SLOT_INTERFACE_START(octopus_centronics_devices)
+ SLOT_INTERFACE("pl80", COMX_PL80)
+ SLOT_INTERFACE("ex800", EPSON_EX800)
+ SLOT_INTERFACE("lx800", EPSON_LX800)
+ SLOT_INTERFACE("lx810l", EPSON_LX810L)
+ SLOT_INTERFACE("ap2000", EPSON_AP2000)
+ SLOT_INTERFACE("printer", CENTRONICS_PRINTER)
+SLOT_INTERFACE_END
+
static MACHINE_CONFIG_START( octopus, octopus_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",I8088, XTAL_24MHz / 3) // 8MHz
@@ -763,7 +836,7 @@ static MACHINE_CONFIG_START( octopus, octopus_state )
MCFG_I8255_OUT_PORTB_CB(WRITE8(octopus_state,cntl_w))
MCFG_I8255_OUT_PORTC_CB(WRITE8(octopus_state,gpo_w))
MCFG_MC146818_ADD("rtc", XTAL_32_768kHz)
- MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic_slave",pic8259_device, ir2_w))
+ MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic_slave",pic8259_device, ir2_w)) MCFG_DEVCB_INVERT
// Keyboard UART
MCFG_DEVICE_ADD("keyboard", I8251, 0)
@@ -782,6 +855,7 @@ static MACHINE_CONFIG_START( octopus, octopus_state )
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("dma2",am9517a_device, dreq1_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", octopus_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", octopus_floppies, "525dd", floppy_image_device::default_floppy_formats)
+ MCFG_SOFTWARE_LIST_ADD("fd_list","octopus")
MCFG_DEVICE_ADD("pit", PIT8253, 0)
MCFG_PIT8253_CLK0(2457500) // DART channel A
@@ -804,9 +878,10 @@ static MACHINE_CONFIG_START( octopus, octopus_state )
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("serial",z80sio2_device, ctsb_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE("serial",z80sio2_device, rib_w)) MCFG_DEVCB_INVERT
- // TODO: add components
- // Centronics parallel interface
- // Winchester HD controller (Xebec/SASI compatible? uses TTL logic)
+ MCFG_CENTRONICS_ADD("parallel", octopus_centronics_devices, "printer")
+ MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(octopus_state, parallel_busy_w))
+ MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(octopus_state, parallel_slctout_w))
+ // TODO: Winchester HD controller (Xebec/SASI compatible? uses TTL logic)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/othello.cpp b/src/mame/drivers/othello.cpp
index 06cf16dbce4..e438d905725 100644
--- a/src/mame/drivers/othello.cpp
+++ b/src/mame/drivers/othello.cpp
@@ -42,8 +42,9 @@ Limit for help/undo (matta):
#include "cpu/mcs48/mcs48.h"
#include "machine/gen_latch.h"
#include "machine/i8243.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/mc6845.h"
@@ -326,7 +327,7 @@ static ADDRESS_MAP_START( n7751_portmap, AS_IO, 8, othello_state )
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(n7751_t1_r)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(n7751_command_r)
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(n7751_rom_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(n7751_p2_w)
AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("n7751_8243", i8243_device, i8243_prog_w)
ADDRESS_MAP_END
@@ -435,18 +436,19 @@ static MACHINE_CONFIG_START( othello, othello_state )
MCFG_MC6845_UPDATE_ROW_CB(othello_state, crtc_update_row)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( othello )
diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp
index f60d74674d2..eeff23b6fbe 100644
--- a/src/mame/drivers/palm.cpp
+++ b/src/mame/drivers/palm.cpp
@@ -16,6 +16,7 @@
#include "machine/mc68328.h"
#include "machine/ram.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#define MC68328_TAG "dragonball"
@@ -27,7 +28,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_lsi(*this, MC68328_TAG),
- m_dac(*this, "dac"),
m_ram(*this, RAM_TAG),
m_io_penx(*this, "PENX"),
m_io_peny(*this, "PENY"),
@@ -36,14 +36,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<mc68328_device> m_lsi;
- required_device<dac_device> m_dac;
required_device<ram_device> m_ram;
- //DECLARE_WRITE8_MEMBER(palm_dac_transition);
- //DECLARE_WRITE8_MEMBER(palm_port_f_out);
- //DECLARE_READ8_MEMBER(palm_port_c_in);
- //DECLARE_READ8_MEMBER(palm_port_f_in);
- //DECLARE_WRITE16_MEMBER(palm_spim_out);
- //DECLARE_READ16_MEMBER(palm_spim_in);
UINT8 m_port_f_latch;
UINT16 m_spim_data;
virtual void machine_start() override;
@@ -55,7 +48,6 @@ public:
DECLARE_READ8_MEMBER(palm_port_f_in);
DECLARE_WRITE16_MEMBER(palm_spim_out);
DECLARE_READ16_MEMBER(palm_spim_in);
- DECLARE_WRITE8_MEMBER(palm_dac_transition);
DECLARE_WRITE_LINE_MEMBER(palm_spim_exchange);
DECLARE_PALETTE_INIT(palm);
@@ -85,7 +77,7 @@ INPUT_CHANGED_MEMBER(palm_state::pen_check)
INPUT_CHANGED_MEMBER(palm_state::button_check)
{
UINT8 button_state = m_io_portd->read();
- m_lsi->set_port_d_lines(button_state, (int)(FPTR)param);
+ m_lsi->set_port_d_lines(button_state, (int)(uintptr_t)param);
}
WRITE8_MEMBER(palm_state::palm_port_f_out)
@@ -170,16 +162,6 @@ ADDRESS_MAP_END
/***************************************************************************
- AUDIO HARDWARE
-***************************************************************************/
-
-WRITE8_MEMBER(palm_state::palm_dac_transition)
-{
- m_dac->write_unsigned8(0x7f * data );
-}
-
-
-/***************************************************************************
MACHINE DRIVERS
***************************************************************************/
@@ -206,16 +188,17 @@ static MACHINE_CONFIG_START( palm, palm_state )
MCFG_DEFAULT_LAYOUT(layout_lcd)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MCFG_DEVICE_ADD( MC68328_TAG, MC68328, 0 ) // lsi device
MCFG_MC68328_CPU("maincpu")
MCFG_MC68328_OUT_PORT_F_CB(WRITE8(palm_state, palm_port_f_out)) // Port F Output
MCFG_MC68328_IN_PORT_C_CB(READ8(palm_state, palm_port_c_in)) // Port C Input
MCFG_MC68328_IN_PORT_F_CB(READ8(palm_state, palm_port_f_in)) // Port F Input
- MCFG_MC68328_OUT_PWM_CB(WRITE8(palm_state, palm_dac_transition))
+ MCFG_MC68328_OUT_PWM_CB(DEVWRITELINE("dac", dac_bit_interface, write))
MCFG_MC68328_OUT_SPIM_CB(WRITE16(palm_state, palm_spim_out))
MCFG_MC68328_IN_SPIM_CB(READ16(palm_state, palm_spim_in))
MCFG_MC68328_SPIM_XCH_TRIGGER_CB(WRITELINE(palm_state, palm_spim_exchange))
diff --git a/src/mame/drivers/palmz22.cpp b/src/mame/drivers/palmz22.cpp
index e89bbd5c85e..9d3af49b602 100644
--- a/src/mame/drivers/palmz22.cpp
+++ b/src/mame/drivers/palmz22.cpp
@@ -237,13 +237,13 @@ READ32_MEMBER(palmz22_state::s3c2410_adc_data_r )
INPUT_CHANGED_MEMBER(palmz22_state::palmz22_input_changed)
{
- if (((int)(FPTR)param) == 0)
+ if (((int)(uintptr_t)param) == 0)
{
m_s3c2410->s3c2410_touch_screen( (newval & 0x01) ? 1 : 0);
}
else
{
- m_s3c2410->s3c2410_request_eint( (FPTR)param - 1);
+ m_s3c2410->s3c2410_request_eint( (uintptr_t)param - 1);
}
}
diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp
index aa7f68bb076..f6d0ad273d9 100644
--- a/src/mame/drivers/pandoras.cpp
+++ b/src/mame/drivers/pandoras.cpp
@@ -24,15 +24,16 @@ Boards:
***************************************************************************/
#include "emu.h"
+#include "includes/pandoras.h"
+#include "includes/konamipt.h"
#include "cpu/m6809/m6809.h"
-#include "cpu/z80/z80.h"
#include "cpu/mcs48/mcs48.h"
+#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/konamipt.h"
-#include "includes/pandoras.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK XTAL_18_432MHz
@@ -175,7 +176,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pandoras_i8039_io_map, AS_IO, 8, pandoras_state )
AM_RANGE(0x00, 0xff) AM_DEVREAD("soundlatch2", generic_latch_8_device, read)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w)
ADDRESS_MAP_END
@@ -356,7 +357,7 @@ static MACHINE_CONFIG_START( pandoras, pandoras_state )
MCFG_PALETTE_INIT_OWNER(pandoras_state, pandoras)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
@@ -364,10 +365,11 @@ static MACHINE_CONFIG_START( pandoras, pandoras_state )
MCFG_SOUND_ADD("aysnd", AY8910, SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_READ_CB(READ8(pandoras_state, pandoras_portA_r)) // not used
MCFG_AY8910_PORT_B_READ_CB(READ8(pandoras_state, pandoras_portB_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/panicr.cpp b/src/mame/drivers/panicr.cpp
index a7035b9458f..8da2c984c08 100644
--- a/src/mame/drivers/panicr.cpp
+++ b/src/mame/drivers/panicr.cpp
@@ -714,7 +714,7 @@ ROM_END
DRIVER_INIT_MEMBER(panicr_state,panicr)
{
- dynamic_buffer buf(0x80000);
+ std::vector<UINT8> buf(0x80000);
UINT8 *rom;
int size;
int i,j;
diff --git a/src/mame/drivers/pastelg.cpp b/src/mame/drivers/pastelg.cpp
index 10c1a2204f5..63c9261496a 100644
--- a/src/mame/drivers/pastelg.cpp
+++ b/src/mame/drivers/pastelg.cpp
@@ -23,19 +23,12 @@ Memo:
******************************************************************************/
#include "emu.h"
+#include "includes/pastelg.h"
#include "cpu/z80/z80.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/pastelg.h"
-#include "machine/nvram.h"
-
-
-#define SIGNED_DAC 0 // 0:unsigned DAC, 1:signed DAC
-#if SIGNED_DAC
-#define DAC_WRITE write_signed8
-#else
-#define DAC_WRITE write_unsigned8
-#endif
+#include "sound/volt_reg.h"
void pastelg_state::machine_start()
@@ -73,7 +66,7 @@ static ADDRESS_MAP_START( pastelg_io_map, AS_IO, 8, pastelg_state )
AM_RANGE(0xb0, 0xb0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport2_r) AM_WRITE(pastelg_romsel_w)
AM_RANGE(0xc0, 0xc0) AM_READ(pastelg_sndrom_r)
AM_RANGE(0xc0, 0xcf) AM_WRITEONLY AM_SHARE("clut")
- AM_RANGE(0xd0, 0xd0) AM_READ(pastelg_irq_ack_r) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_READ(pastelg_irq_ack_r) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe0, 0xe0) AM_READ_PORT("DSWC")
ADDRESS_MAP_END
@@ -126,7 +119,7 @@ static ADDRESS_MAP_START( threeds_io_map, AS_IO, 8, pastelg_state )
AM_RANGE(0xb0, 0xb0) AM_READ(threeds_inputport2_r) AM_WRITE(threeds_output_w)//writes: bit 3 is coin lockout, bit 1 is coin counter
AM_RANGE(0xc0, 0xcf) AM_WRITEONLY AM_SHARE("clut")
AM_RANGE(0xc0, 0xc0) AM_READ(threeds_rom_readback_r)
- AM_RANGE(0xd0, 0xd0) AM_READ(pastelg_irq_ack_r) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xd0, 0xd0) AM_READ(pastelg_irq_ack_r) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
static INPUT_PORTS_START( pastelg )
@@ -425,15 +418,16 @@ static MACHINE_CONFIG_START( pastelg, pastelg_state )
MCFG_PALETTE_INIT_OWNER(pastelg_state, pastelg)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWB"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWA"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*
@@ -483,15 +477,16 @@ static MACHINE_CONFIG_START( threeds, pastelg_state )
MCFG_PALETTE_INIT_OWNER(pastelg_state, pastelg)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 1250000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWB"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWA"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pecom.cpp b/src/mame/drivers/pecom.cpp
index 3a62a0fe84a..5a32fcf84e6 100644
--- a/src/mame/drivers/pecom.cpp
+++ b/src/mame/drivers/pecom.cpp
@@ -52,7 +52,7 @@ mappings, this is another situation where natural keyboard comes very handy!
INPUT_CHANGED_MEMBER(pecom_state::ef_w)
{
- m_cdp1802->set_input_line((int)(FPTR)param, newval);
+ m_cdp1802->set_input_line((int)(uintptr_t)param, newval);
}
static INPUT_PORTS_START( pecom )
diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp
index 4a760e80320..fe4f163d20f 100644
--- a/src/mame/drivers/pegasus.cpp
+++ b/src/mame/drivers/pegasus.cpp
@@ -391,7 +391,7 @@ void pegasus_state::pegasus_decrypt_rom(UINT8 *ROM)
bool doit = FALSE;
UINT8 b;
UINT16 j;
- dynamic_buffer temp_copy;
+ std::vector<UINT8> temp_copy;
temp_copy.resize(0x1000);
if (ROM[0] == 0x02) doit = TRUE;
diff --git a/src/mame/drivers/pengadvb.cpp b/src/mame/drivers/pengadvb.cpp
index c27e512743f..647754bff02 100644
--- a/src/mame/drivers/pengadvb.cpp
+++ b/src/mame/drivers/pengadvb.cpp
@@ -288,7 +288,7 @@ void pengadvb_state::pengadvb_decrypt(const char* region)
}
// address line swap
- dynamic_buffer buf(memsize);
+ std::vector<UINT8> buf(memsize);
memcpy(&buf[0], mem, memsize);
for (int i = 0; i < memsize; i++)
{
diff --git a/src/mame/drivers/peoplepc.cpp b/src/mame/drivers/peoplepc.cpp
index 2146472f4e2..b3da96d75d6 100644
--- a/src/mame/drivers/peoplepc.cpp
+++ b/src/mame/drivers/peoplepc.cpp
@@ -44,7 +44,7 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT16> m_gvram;
required_shared_ptr<UINT16> m_cvram;
- dynamic_buffer m_charram;
+ std::vector<UINT8> m_charram;
MC6845_UPDATE_ROW(update_row);
DECLARE_READ8_MEMBER(get_slave_ack);
diff --git a/src/mame/drivers/peyper.cpp b/src/mame/drivers/peyper.cpp
index 51d55034081..19b9e947b03 100644
--- a/src/mame/drivers/peyper.cpp
+++ b/src/mame/drivers/peyper.cpp
@@ -174,7 +174,7 @@ WRITE8_MEMBER(peyper_state::sol_w)
CUSTOM_INPUT_MEMBER(peyper_state::wolfman_replay_hs_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
diff --git a/src/mame/drivers/phunsy.cpp b/src/mame/drivers/phunsy.cpp
index d4693194ee6..753c15ac08e 100644
--- a/src/mame/drivers/phunsy.cpp
+++ b/src/mame/drivers/phunsy.cpp
@@ -282,7 +282,7 @@ QUICKLOAD_LOAD_MEMBER( phunsy_state, phunsy )
address_space &space = m_maincpu->space(AS_PROGRAM);
UINT16 i;
UINT16 quick_addr = 0x1800;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
image_init_result result = image_init_result::FAIL;
int quick_length = image.length();
if (quick_length > 0x4000)
diff --git a/src/mame/drivers/pipbug.cpp b/src/mame/drivers/pipbug.cpp
index fd2bd2748fd..9088b21663f 100644
--- a/src/mame/drivers/pipbug.cpp
+++ b/src/mame/drivers/pipbug.cpp
@@ -96,7 +96,7 @@ QUICKLOAD_LOAD_MEMBER( pipbug_state, pipbug )
int quick_addr = 0x440;
int exec_addr;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/pirates.cpp b/src/mame/drivers/pirates.cpp
index d0fe75dd6ad..99732d01edc 100644
--- a/src/mame/drivers/pirates.cpp
+++ b/src/mame/drivers/pirates.cpp
@@ -380,7 +380,7 @@ void pirates_state::decrypt_p()
rom_size = memregion("gfx1")->bytes();
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
rom = memregion("gfx1")->base();
memcpy (&buf[0], rom, rom_size);
@@ -403,7 +403,7 @@ void pirates_state::decrypt_s()
rom_size = memregion("gfx2")->bytes();
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
rom = memregion("gfx2")->base();
memcpy (&buf[0], rom, rom_size);
@@ -427,7 +427,7 @@ void pirates_state::decrypt_oki()
rom_size = memregion("oki")->bytes();
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
rom = memregion("oki")->base();
memcpy (&buf[0], rom, rom_size);
diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp
index e2d409fd076..56b4e4f0be6 100644
--- a/src/mame/drivers/playch10.cpp
+++ b/src/mame/drivers/playch10.cpp
@@ -296,7 +296,6 @@ Notes & Todo:
#include "cpu/z80/z80.h"
#include "machine/rp5h01.h"
#include "machine/nvram.h"
-#include "sound/dac.h"
#include "rendlay.h"
#include "includes/playch10.h"
diff --git a/src/mame/drivers/pntnpuzl.cpp b/src/mame/drivers/pntnpuzl.cpp
index 397ffd87d55..9fed245dda1 100644
--- a/src/mame/drivers/pntnpuzl.cpp
+++ b/src/mame/drivers/pntnpuzl.cpp
@@ -312,7 +312,7 @@ INPUT_CHANGED_MEMBER(pntnpuzl_state::coin_inserted)
{
/* TODO: change this! */
if(newval)
- generic_pulse_irq_line(*m_maincpu, (UINT8)(FPTR)param, 1);
+ generic_pulse_irq_line(*m_maincpu, (UINT8)(uintptr_t)param, 1);
}
static INPUT_PORTS_START( pntnpuzl )
diff --git a/src/mame/drivers/pocketc.cpp b/src/mame/drivers/pocketc.cpp
index 324b342a372..6af288dc643 100644
--- a/src/mame/drivers/pocketc.cpp
+++ b/src/mame/drivers/pocketc.cpp
@@ -734,9 +734,6 @@ static MACHINE_CONFIG_START( pocketc, pocketc_state)
MCFG_PALETTE_ADD("palette", 8*2)
MCFG_PALETTE_INDIRECT_ENTRIES(6)
MCFG_PALETTE_INIT_OWNER( pocketc_state, pocketc )
-
- /* sound hardware */
- /*MCFG_SOUND_ADD("dac", DAC, pocketc_sound_interface)*/
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( pc1401, pocketc, pc1401_state )
diff --git a/src/mame/drivers/pockstat.cpp b/src/mame/drivers/pockstat.cpp
index 937452cf688..f7822a8d8fe 100644
--- a/src/mame/drivers/pockstat.cpp
+++ b/src/mame/drivers/pockstat.cpp
@@ -41,12 +41,12 @@ If you do nothing for about 20 secs, it turns itself off (screen goes white).
****************************************************************************/
#include "emu.h"
+#include "bus/generic/carts.h"
+#include "bus/generic/slot.h"
#include "cpu/arm7/arm7.h"
#include "cpu/arm7/arm7core.h"
#include "sound/dac.h"
-
-#include "bus/generic/slot.h"
-#include "bus/generic/carts.h"
+#include "sound/volt_reg.h"
#define MAX_PS_TIMERS 3
@@ -108,13 +108,11 @@ public:
: driver_device(mconfig, type, tag),
m_lcd_buffer(*this, "lcd_buffer"),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
m_cart(*this, "cartslot")
{ }
required_shared_ptr<UINT32> m_lcd_buffer;
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
required_device<generic_slot_device> m_cart;
memory_region *m_cart_rom;
@@ -143,7 +141,6 @@ public:
DECLARE_WRITE32_MEMBER(ps_flash_w);
DECLARE_READ32_MEMBER(ps_audio_r);
DECLARE_WRITE32_MEMBER(ps_audio_w);
- DECLARE_WRITE32_MEMBER(ps_dac_w);
virtual void machine_start() override;
virtual void machine_reset() override;
UINT32 screen_update_pockstat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -840,11 +837,6 @@ WRITE32_MEMBER(pockstat_state::ps_audio_w)
verboselog(0, "ps_audio_w: Unknown Write: %08x = %08x & %08x\n", 0xd800000 + (offset << 2), data, mem_mask);
}
-WRITE32_MEMBER(pockstat_state::ps_dac_w)
-{
- m_dac->write_unsigned16((UINT16)((data + 0x8000) & 0x0000ffff));
-}
-
static ADDRESS_MAP_START(pockstat_mem, AS_PROGRAM, 32, pockstat_state )
AM_RANGE(0x00000000, 0x000007ff) AM_RAM
AM_RANGE(0x02000000, 0x02ffffff) AM_READ(ps_rombank_r)
@@ -858,7 +850,7 @@ static ADDRESS_MAP_START(pockstat_mem, AS_PROGRAM, 32, pockstat_state )
AM_RANGE(0x0d000000, 0x0d000003) AM_READWRITE(ps_lcd_r, ps_lcd_w)
AM_RANGE(0x0d000100, 0x0d00017f) AM_RAM AM_SHARE("lcd_buffer")
AM_RANGE(0x0d80000c, 0x0d80000f) AM_READWRITE(ps_audio_r, ps_audio_w)
- AM_RANGE(0x0d800014, 0x0d800017) AM_WRITE(ps_dac_w)
+ AM_RANGE(0x0d800014, 0x0d800017) AM_DEVWRITE16("dac", dac_word_interface, write, 0x0000ffff)
ADDRESS_MAP_END
/* Input ports */
@@ -993,9 +985,10 @@ static MACHINE_CONFIG_START( pockstat, pockstat_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pockstat_cart")
diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp
index b960e6e55a1..aeaa7103462 100644
--- a/src/mame/drivers/pong.cpp
+++ b/src/mame/drivers/pong.cpp
@@ -49,11 +49,11 @@ TODO: Superpong is believed to use the Pong (Rev E) PCB with some minor modifica
#include "machine/netlist.h"
#include "netlist/devices/net_lib.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/fixfreq.h"
#include "machine/nl_breakout.h"
#include "machine/nl_pong.h"
#include "machine/nl_pongd.h"
-
#include "breakout.lh"
/*
@@ -135,11 +135,11 @@ public:
// devices
required_device<netlist_mame_device_t> m_maincpu;
required_device<fixedfreq_device> m_video;
- required_device<dac_device> m_dac; /* just to have a sound device */
+ required_device<dac_word_interface> m_dac; /* just to have a sound device */
NETDEV_ANALOG_CALLBACK_MEMBER(sound_cb)
{
- m_dac->write_unsigned8(64*data);
+ m_dac->write(std::round(16384 * data));
}
protected:
@@ -255,7 +255,7 @@ NETLIST_END()
INPUT_CHANGED_MEMBER(pong_state::input_changed)
{
- int numpad = (FPTR) (param);
+ int numpad = (uintptr_t) (param);
switch (numpad)
{
@@ -389,10 +389,10 @@ static MACHINE_CONFIG_START( pong, pong_state )
MCFG_FIXFREQ_SYNC_THRESHOLD(0.11)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 48000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( breakout, breakout_state )
@@ -442,10 +442,10 @@ static MACHINE_CONFIG_START( breakout, breakout_state )
MCFG_FIXFREQ_GAIN(1.5)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 48000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pongf, pong )
@@ -486,10 +486,10 @@ static MACHINE_CONFIG_START( pongd, pong_state )
MCFG_FIXFREQ_SYNC_THRESHOLD(0.11)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 48000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp
index 2d14f2edaae..09c70226e16 100644
--- a/src/mame/drivers/popeye.cpp
+++ b/src/mame/drivers/popeye.cpp
@@ -725,7 +725,7 @@ DRIVER_INIT_MEMBER(popeye_state,skyskipr)
/* decrypt the program ROMs */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
buffer[i] = BITSWAP8(rom[BITSWAP16(i,15,14,13,12,11,10,8,7,0,1,2,4,5,9,3,6) ^ 0xfc],3,4,2,5,1,6,0,7);
@@ -744,7 +744,7 @@ DRIVER_INIT_MEMBER(popeye_state,popeye)
/* decrypt the program ROMs */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
buffer[i] = BITSWAP8(rom[BITSWAP16(i,15,14,13,12,11,10,8,7,6,3,9,5,4,2,1,0) ^ 0x3f],3,4,2,5,1,6,0,7);
diff --git a/src/mame/drivers/ppmast93.cpp b/src/mame/drivers/ppmast93.cpp
index 9f157dd6cbc..2cb57231ceb 100644
--- a/src/mame/drivers/ppmast93.cpp
+++ b/src/mame/drivers/ppmast93.cpp
@@ -134,8 +134,9 @@ Dip locations added based on the notes above.
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
-#include "sound/ym2413.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2413.h"
class ppmast93_state : public driver_device
@@ -144,15 +145,11 @@ public:
ppmast93_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
- m_ymsnd(*this, "ymsnd"),
m_gfxdecode(*this, "gfxdecode"),
m_bgram(*this, "bgram"),
m_fgram(*this, "fgram") { }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
- required_device<ym2413_device> m_ymsnd;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<UINT8> m_bgram;
@@ -164,7 +161,6 @@ public:
DECLARE_WRITE8_MEMBER(fgram_w);
DECLARE_WRITE8_MEMBER(bgram_w);
DECLARE_WRITE8_MEMBER(port4_w);
- DECLARE_WRITE8_MEMBER(sound_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
@@ -225,20 +221,10 @@ static ADDRESS_MAP_START( ppmast93_cpu2_map, AS_PROGRAM, 8, ppmast93_state )
AM_RANGE(0xfd00, 0xffff) AM_RAM
ADDRESS_MAP_END
-
-WRITE8_MEMBER(ppmast93_state::sound_w)
-{
- switch(offset&0xff)
- {
- case 0:
- case 1: m_ymsnd->write(space,offset,data); break;
- case 2: m_dac->write_unsigned8(data);break;
- default: logerror("%x %x - %x\n",offset,data,space.device().safe_pcbase());
- }
-}
-
static ADDRESS_MAP_START( ppmast93_cpu2_io, AS_IO, 8, ppmast93_state )
- AM_RANGE(0x0000, 0xffff) AM_ROM AM_WRITE(sound_w) AM_REGION("sub", 0x20000)
+ AM_RANGE(0x0000, 0xffff) AM_ROM AM_REGION("sub", 0x20000)
+ AM_RANGE(0x0000, 0x0001) AM_MIRROR(0xff00) AM_DEVWRITE("ymsnd", ym2413_device, write)
+ AM_RANGE(0x0002, 0x0002) AM_MIRROR(0xff00) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
static INPUT_PORTS_START( ppmast93 )
@@ -398,16 +384,16 @@ static MACHINE_CONFIG_START( ppmast93, ppmast93_state )
MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 0x100)
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM2413, 5000000/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( ppmast93 )
diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp
index 1e598ba4afc..4b832442e0d 100644
--- a/src/mame/drivers/psikyo4.cpp
+++ b/src/mame/drivers/psikyo4.cpp
@@ -171,7 +171,7 @@ INTERRUPT_GEN_MEMBER(psikyo4_state::psikyosh_interrupt)
CUSTOM_INPUT_MEMBER(psikyo4_state::mahjong_ctrl_r)/* used by hotgmck/hgkairak */
{
- int player = (FPTR)param;
+ int player = (uintptr_t)param;
int ret = 0xff;
if (m_io_select & 1) ret &= m_keys[player+0]->read();
diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp
index 2d0f10e592d..9cca2aab819 100644
--- a/src/mame/drivers/px4.cpp
+++ b/src/mame/drivers/px4.cpp
@@ -1075,7 +1075,7 @@ INPUT_CHANGED_MEMBER( px4_state::key_callback )
if (delta & (1 << i))
{
down = (newvalue & (1 << i)) ? 0x10 : 0x00;
- scancode = (FPTR)param * 32 + i;
+ scancode = (uintptr_t)param * 32 + i;
// control keys
if ((scancode & 0xa0) == 0xa0)
diff --git a/src/mame/drivers/quasar.cpp b/src/mame/drivers/quasar.cpp
index dba0ff9a92e..89a5aef0983 100644
--- a/src/mame/drivers/quasar.cpp
+++ b/src/mame/drivers/quasar.cpp
@@ -30,10 +30,10 @@ I8085 Sound Board
************************************************************************/
#include "emu.h"
+#include "includes/quasar.h"
#include "cpu/s2650/s2650.h"
#include "cpu/mcs48/mcs48.h"
-#include "sound/dac.h"
-#include "includes/quasar.h"
+#include "sound/volt_reg.h"
/************************************************************************
@@ -144,7 +144,7 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, quasar_state )
AM_RANGE(0x00, 0x7f) AM_RAM
AM_RANGE(0x80, 0x80) AM_READ(quasar_sh_command_r)
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(audio_t1_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
/************************************************************************
@@ -338,12 +338,12 @@ static MACHINE_CONFIG_START( quasar, quasar_state )
MCFG_VIDEO_START_OVERRIDE(quasar_state,quasar)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( quasar )
diff --git a/src/mame/drivers/quizshow.cpp b/src/mame/drivers/quizshow.cpp
index 543a06a2d5e..e58593491b8 100644
--- a/src/mame/drivers/quizshow.cpp
+++ b/src/mame/drivers/quizshow.cpp
@@ -17,7 +17,7 @@ TODO:
#include "emu.h"
#include "cpu/s2650/s2650.h"
#include "sound/dac.h"
-
+#include "sound/volt_reg.h"
#include "quizshow.lh"
@@ -46,7 +46,7 @@ public:
{ }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_shared_ptr<UINT8> m_main_ram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
@@ -173,7 +173,7 @@ WRITE8_MEMBER(quizshow_state::quizshow_tape_control_w)
WRITE8_MEMBER(quizshow_state::quizshow_audio_w)
{
// d1: audio out
- m_dac->write_signed8((data & 2) ? 0x7f : 0);
+ m_dac->write(BIT(data, 1));
// d0, d2-d7: N/C
}
@@ -397,10 +397,11 @@ static MACHINE_CONFIG_START( quizshow, quizshow_state )
MCFG_PALETTE_INIT_OWNER(quizshow_state, quizshow)
/* sound hardware (discrete) */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp
index 0ac10280aba..19851555a03 100644
--- a/src/mame/drivers/qx10.cpp
+++ b/src/mame/drivers/qx10.cpp
@@ -518,7 +518,7 @@ ADDRESS_MAP_END
{
if(newval && !oldval)
{
- m_keyb.rx = (UINT8)(FPTR)(param) & 0x7f;
+ m_keyb.rx = (UINT8)(uintptr_t)(param) & 0x7f;
m_pic_m->ir4_w(1);
}
diff --git a/src/mame/drivers/r2dx_v33.cpp b/src/mame/drivers/r2dx_v33.cpp
index cd6e0eabdc5..934a024d0d7 100644
--- a/src/mame/drivers/r2dx_v33.cpp
+++ b/src/mame/drivers/r2dx_v33.cpp
@@ -884,7 +884,7 @@ DRIVER_INIT_MEMBER(r2dx_v33_state,zerotm2k)
UINT8 *src = memregion("gfx2")->base()+0x100000;
int len = 0x080000;
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0; i < len; i ++)
buffer[i] = src[BITSWAP32(i,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,5,6,4,3,2,1,0)];
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index 0c625e9d948..9da37b7d252 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -3,8 +3,7 @@
//#define BOOST_DEBUG_PERFORMANCE
-/* NEW COLOR EMULATION (state as of Oct. 1st 2016):
-
+/* GDC COLOR EMULATION
//-------------------- Differences to VT240: ---------------------------------------------------
// - Registers of graphics option not directly mapped (indirect access via mode register)
// - write mask is 16 bits wide (not only 8)
@@ -17,33 +16,30 @@
// Palette takes 2 byte per palette entry. CLUT ("color map") is 32 byte long.
------------------------------------------------------------------------------------------------
-SCREEN 1 vs. SCREEN 2 IN EMULATION
-// All GDC 7220 output is displayed on the right. Be it color or monochrome, Option Graphics output is on screen 2.
-// If you select MONO_MONITOR via DIP, output from GDC will appear on screen 2 in 16 shades of grey.
-// The type of monochrome monitor (VR-210 A, B or C) is selectable via another DIP (coarsly simulates a phosphor color).
-
THE DEC 'R-M-B' COLOR CABLE VS. THE UNOFFICIAL 'R-G-B' MODE (A BIT OF HISTORY)
-// VR-241 came with a standard DEC "color cable", where the green gun is wired to the mono output (DIP switch COLOR_MONITOR).
-// Port $0A decides whether the mono out pin on the back of the Rainbow holds graphics signals or simple text.
-//
-// An unofficial DIY cable gave R-G-B graphics plus seperate text (emulated by DIP setting: DUAL MONITOR).
-// Unfortunately, popular programs like AutoCAD and GWBASIC were initially written for 1 single VR201 or VT241 monitor.
-// A 'R-M-B' cable is expected, and thus writes go to M(ono) instead of G(reen). An awful tint results on R-G-B.
-
-// DEC decided not to support this mode. Nevertheless, AutoCad 2.6 offers a true dual monitor mode.
+// The standard DEC "color cable" connected the green gun of a VR241 to the mono output of the Rainbow
+// (DIP setting COLOR_MONITOR).
+//
+// An unofficial DIY cable enabled R-G-B graphics + seperate text (emulated by DIP setting DUAL MONITOR).
+// As DEC decided not to endorse R-G-B, many commercial programs show incorrect colors.
// A patch from one of the archives corrects the GWBASIC palette problem when using 2 monitors [Bavarese].
EMULATION SPECIFIC
-// A log message informs the user if text output is disabled. Means: software is not ready / patched for dual monitor use.
-// In our emulation, DUAL MONITOR enables both screens, even if onboard graphics has been accidently shut off
-// (helps debugging semi broken programs, try Doodle).
+// If a program disables text output (via port $0A), a log message is given.
-BUGS
-- HIRES-MODE WRONG. MEDRES SEMI-CORRECT.
-BROKEN SPRITES / NO BORDER GRAPHICS IN "PACMAN" (freeware clone; MEDRES; borders probably drawn in vector mode)
+// DUAL MONITOR enables both screens, even if onboard graphics has been accidently shut off
+// (helps debugging semi broken programs, for example Doodle).
+
+SCREEN 1 vs. SCREEN 2 IN EMULATION
+// All GDC 7220 output is displayed on the right. Be it color or monochrome, Option Graphics output is on screen 2.
+// If you select MONO_MONITOR via DIP, output from GDC will appear on screen 2 in 16 shades of grey.
+// The type of monochrome monitor (VR-210 A, B or C) is selectable via another DIP (coarsly simulates a phosphor color).
-- VECTOR MODE SEEMS TO DISPLAY NOTHING AT ALL (16 bit access botched?)
-- CLEARING THE SCREEN DOES NOT WORK (bug in VRAM_W...?)
+BUGS
+- MEDRES LOOKS CORRECT
+- HIRES-MODE UNTESTED.
+- VECTOR MODE SEEMS TO DISPLAY NOTHING AT ALL (16 bit access botched?) Examples: MMIND (MasterMind, after BMP logo), SOLIT (Solitair).
+- GDC diagnostic disk bails out on 11 of 13 low level tests. SCROLL CHECK crashes CPU.
UNIMPLEMENTED:
// - Video levels for color modes.
@@ -2353,7 +2349,7 @@ WRITE_LINE_MEMBER(rainbow_state::GDC_vblank_irq)
// VIDEO LEVELS: 0 is 100 % output; F is 0 % output
// Levels for 100-B model, taken from page 46 of PDF, multiplied by 2.55 to obtain a range of 0...255
- const int v_levels[16] = { 255, 217, 201,186, 171, 156, 140, 125, 110, 97, 79, 66, 54, 31, 18, 0 };
+ const UINT8 v_levels[16] = { 255, 217, 201,186, 171, 156, 140, 125, 110, 97, 79, 66, 54, 31, 18, 0 };
if(m_scroll_buffer_changed)
{
@@ -2715,6 +2711,7 @@ WRITE16_MEMBER(rainbow_state::vram_w)
if(m_GDC_MODE_REGISTER & GDC_MODE_VECTOR) // VT240 : if(SELECT_VECTOR_PATTERN_REGISTER)
{
chr = BITSWAP8(m_vpat, m_patidx, m_patidx, m_patidx, m_patidx, m_patidx, m_patidx, m_patidx, m_patidx);
+ chr |= (chr << 8);
if(m_patcnt-- == 0)
{
m_patcnt = m_patmult;
@@ -2735,7 +2732,7 @@ WRITE16_MEMBER(rainbow_state::vram_w)
{
// ALU_PS register: controls logic used in writing to the bitmap / inhibiting of writing to specified planes.
// plane select and logic operations on write buffer... (and more) **** SEE PAGE 36 ****
- int ps = ~m_GDC_ALU_PS_REGISTER & 0x0F; // PLANE SELECT 0..3 // VT 240 : ~m_GDC_ALU_PS_REGISTER & 3;
+ int ps = m_GDC_ALU_PS_REGISTER & 0x0F; // PLANE SELECT 0..3 // VT 240 : ~m_GDC_ALU_PS_REGISTER & 3;
UINT8 fore = ( (m_GDC_FG_BG & 0xf0) ) >> 4;
UINT8 back = (m_GDC_FG_BG & 0x0f); // background : 0..3 confirmed, see p.39 AA-AE36A (PDF)
@@ -2795,9 +2792,6 @@ WRITE16_MEMBER(rainbow_state::vram_w)
WRITE8_MEMBER(rainbow_state::GDC_EXTRA_REGISTER_w)
{
static int last_message, last_mode, last_readback, last_scroll_index;
-// rectangle curvisarea = m_screen2->visible_area();
-// int vert_pix_total = 256; // should be 240
-// int horiz_pix_total;
if(offset > 0) // Port $50 reset done @ boot ROM 1EB4/8 regardless if option present.
if (m_inp7->read() != 1)
@@ -2878,7 +2872,7 @@ WRITE8_MEMBER(rainbow_state::GDC_EXTRA_REGISTER_w)
if(m_GDC_INDIRECT_REGISTER & GDC_SELECT_PATTERN)
{
- m_vpat = data; // VGl. "vpat_w" im Original!
+ m_vpat = data;
m_patcnt = m_patmult;
m_patidx = 7; // correct...?
break;
@@ -2892,7 +2886,7 @@ WRITE8_MEMBER(rainbow_state::GDC_EXTRA_REGISTER_w)
if(m_GDC_INDIRECT_REGISTER & GDC_SELECT_ALU_PS)
{
- m_GDC_ALU_PS_REGISTER = data; // Neither bitswap nor negated (and also not both)...
+ m_GDC_ALU_PS_REGISTER = ~data; // Negated...
break;
}
@@ -2905,19 +2899,10 @@ WRITE8_MEMBER(rainbow_state::GDC_EXTRA_REGISTER_w)
last_message = 2;
if(data & GDC_MODE_HIGHRES)
- {
-// horiz_pix_total = 800;
printf(" * HIGH RESOLUTION * ");
- }
else
- {
-// horiz_pix_total = 384;
printf(" MEDIUM RESOLUTION ");
- }
}
- // DOES NOT WORK - at least for medres the screen is too far stretched :
-// curvisarea.set(0, horiz_pix_total - 1, 0, vert_pix_total - 1);
-// subdevice<screen_device>("screen2")->configure(horiz_pix_total, vert_pix_total, curvisarea, HZ_TO_ATTOSECONDS(60));
if(last_mode != (data & GDC_MODE_VECTOR))
{
@@ -2990,12 +2975,12 @@ WRITE8_MEMBER(rainbow_state::GDC_EXTRA_REGISTER_w)
// --------- WRITE MASK (2 x 8 = 16 bits) USED IN WORD MODE ONLY !
// NOTE: there is NO specific order for the WRITE_MASK (according to txt/code samples in PDF)!
- // LOW... HI VERIFED
+ // !! NEW: LOW... HI JUXTAPOSITION...!!
case 4: // 54h Write Mask LOW
- m_GDC_WRITE_MASK = ( m_GDC_WRITE_MASK & 0xFF00 ) | BITSWAP8(~data, 0, 1, 2, 3, 4, 5, 6, 7);
+ m_GDC_WRITE_MASK = ( BITSWAP8(data, 0, 1, 2, 3, 4, 5, 6, 7) << 8 ) | ( m_GDC_WRITE_MASK & 0x00FF );
break;
case 5: // 55h Write Mask HIGH
- m_GDC_WRITE_MASK = ( BITSWAP8(~data, 0, 1, 2, 3, 4, 5, 6, 7) << 8 ) | ( m_GDC_WRITE_MASK & 0x00FF );
+ m_GDC_WRITE_MASK = ( m_GDC_WRITE_MASK & 0xFF00 ) | BITSWAP8(data, 0, 1, 2, 3, 4, 5, 6, 7);
break;
}
}
diff --git a/src/mame/drivers/rastersp.cpp b/src/mame/drivers/rastersp.cpp
index 8176fb3f749..c1d261e2881 100644
--- a/src/mame/drivers/rastersp.cpp
+++ b/src/mame/drivers/rastersp.cpp
@@ -21,9 +21,9 @@
#include "machine/53c7xx.h"
#include "machine/mc146818.h"
#include "machine/nscsi_hd.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
-
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
/*************************************
*
@@ -52,8 +52,8 @@ public:
m_maincpu(*this, "maincpu"),
m_dsp(*this, "dsp"),
m_dram(*this, "dram"),
- m_dac_l(*this, "dac_l"),
- m_dac_r(*this, "dac_r"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_tms_timer1(*this, "tms_timer1"),
m_tms_tx_timer(*this, "tms_tx_timer"),
m_palette(*this, "palette"),
@@ -99,8 +99,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_dsp;
required_shared_ptr<UINT32> m_dram;
- required_device<dac_device> m_dac_l;
- required_device<dac_device> m_dac_r;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
required_device<timer_device> m_tms_timer1;
required_device<timer_device> m_tms_tx_timer;
required_device<palette_device> m_palette;
@@ -510,11 +510,8 @@ TIMER_DEVICE_CALLBACK_MEMBER( rastersp_state::tms_tx_timer )
{
UINT32 data = m_tms_io_regs[SPORT_DATA_TX];
- INT16 ldata = data & 0xffff;
- INT16 rdata = data >> 16;
-
- m_dac_l->write_signed16(0x8000 + ldata);
- m_dac_r->write_signed16(0x8000 + rdata);
+ m_ldac->write(data & 0xffff);
+ m_rdac->write(data >> 16);
}
// Set XSREMPTY
@@ -884,10 +881,11 @@ static MACHINE_CONFIG_START( rastersp, rastersp_state )
/* Sound */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DAC_ADD("dac_l")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_DAC_ADD("dac_r")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ravens.cpp b/src/mame/drivers/ravens.cpp
index b49cdf6a5cb..fba58a10221 100644
--- a/src/mame/drivers/ravens.cpp
+++ b/src/mame/drivers/ravens.cpp
@@ -267,7 +267,7 @@ QUICKLOAD_LOAD_MEMBER( ravens_state, ravens )
int quick_addr = 0x900;
int exec_addr;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/rc702.cpp b/src/mame/drivers/rc702.cpp
index b0eb44f763f..4a93c5bac4b 100644
--- a/src/mame/drivers/rc702.cpp
+++ b/src/mame/drivers/rc702.cpp
@@ -13,12 +13,7 @@ ToDo:
- Everything
Issues:
-- Floppy disc isn't being detected.
-
-(bios 1 issues)
-- Daisy chain:
- - Hitting a key causes CTC to interrupt, even though CTC and PIO are not connected.
- - After that, IRQ isn't released, causing the system to be stuck in a loop.
+- Floppy disc error.
****************************************************************************************************************/
@@ -353,6 +348,7 @@ static MACHINE_CONFIG_START( rc702, rc702_state )
MCFG_DEVICE_ADD("ctc1", Z80CTC, XTAL_8MHz / 2)
MCFG_Z80CTC_ZC0_CB(WRITELINE(rc702_state, zc0_w))
MCFG_Z80CTC_ZC1_CB(DEVWRITELINE("sio1", z80dart_device, rxtxcb_w))
+ MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
MCFG_Z80DART_ADD("sio1", XTAL_8MHz / 2, 0, 0, 0, 0 )
MCFG_Z80DART_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
diff --git a/src/mame/drivers/replicator.cpp b/src/mame/drivers/replicator.cpp
index b219db5fde8..52e95585abd 100644
--- a/src/mame/drivers/replicator.cpp
+++ b/src/mame/drivers/replicator.cpp
@@ -25,11 +25,11 @@
// * implement avr8 WDR (watchdog reset) opcode
#include "emu.h"
-#include "cpu/avr8/avr8.h"
-#include "video/hd44780.h"
#include "rendlay.h"
-#include "debugger.h"
+#include "cpu/avr8/avr8.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "video/hd44780.h"
#define MASTER_CLOCK 16000000
#define LOG_PORTS 0
@@ -177,7 +177,7 @@ public:
required_device<avr8_device> m_maincpu;
required_device<hd44780_device> m_lcdc;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
DECLARE_READ8_MEMBER(port_r);
DECLARE_WRITE8_MEMBER(port_w);
@@ -433,14 +433,9 @@ WRITE8_MEMBER(replicator_state::port_w)
if(changed & BUZZ) printf("[G] BUZZ: %s\n", data & BUZZ ? "HIGH" : "LOW");
#endif
- if(changed & BUZZ){
- /* FIX-ME: What is the largest sample value allowed?
- I'm using 0x3F based on what I see in src/mame/drivers/craft.c
- But as the method is called "write_unsigned8", I guess we could have samples with values up to 0xFF, right?
- Anyway... With the 0x3F value we'll get a sound that is not so loud, which may be less annoying... :-)
- */
- UINT8 audio_sample = (data & BUZZ) ? 0x3F : 0;
- m_dac->write_unsigned8(audio_sample << 1);
+ if (changed & BUZZ)
+ {
+ m_dac->write(BIT(data, 5));
}
m_port_g = data;
@@ -636,10 +631,10 @@ static MACHINE_CONFIG_START( replicator, replicator_state )
/* sound hardware */
/* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */
- MCFG_SPEAKER_STANDARD_MONO("buzzer")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(0, "buzzer", 1.00)
-
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(0, "speaker", 0.5)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
ROM_START( replica1 )
diff --git a/src/mame/drivers/rex6000.cpp b/src/mame/drivers/rex6000.cpp
index 9de79b0adeb..509a6d69449 100644
--- a/src/mame/drivers/rex6000.cpp
+++ b/src/mame/drivers/rex6000.cpp
@@ -143,7 +143,7 @@ public:
UINT32 screen_update_oz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
private:
- int oz_wzd_extract_tag(const dynamic_buffer &data, const char *tag, char *dest_buf);
+ int oz_wzd_extract_tag(const std::vector<UINT8> &data, const char *tag, char *dest_buf);
UINT16 m_kb_mask;
};
@@ -705,7 +705,7 @@ QUICKLOAD_LOAD_MEMBER( rex6000_state,rex6000)
static const char magic[] = "ApplicationName:Addin";
UINT32 img_start = 0;
- dynamic_buffer data(image.length());
+ std::vector<UINT8> data(image.length());
image.fread(&data[0], image.length());
if(strncmp((const char*)&data[0], magic, 21))
@@ -720,7 +720,7 @@ QUICKLOAD_LOAD_MEMBER( rex6000_state,rex6000)
return image_init_result::PASS;
}
-int oz750_state::oz_wzd_extract_tag(const dynamic_buffer &data, const char *tag, char *dest_buf)
+int oz750_state::oz_wzd_extract_tag(const std::vector<UINT8> &data, const char *tag, char *dest_buf)
{
int tag_len = strlen(tag);
UINT32 img_start = 0;
@@ -755,7 +755,7 @@ int oz750_state::oz_wzd_extract_tag(const dynamic_buffer &data, const char *tag,
QUICKLOAD_LOAD_MEMBER(oz750_state,oz750)
{
address_space* flash = &machine().device("flash0a")->memory().space(0);
- dynamic_buffer data(image.length());
+ std::vector<UINT8> data(image.length());
image.fread(&data[0], image.length());
const char *fs_type = "BSIC";
diff --git a/src/mame/drivers/rltennis.cpp b/src/mame/drivers/rltennis.cpp
index 20e858041ad..39956156114 100644
--- a/src/mame/drivers/rltennis.cpp
+++ b/src/mame/drivers/rltennis.cpp
@@ -60,11 +60,12 @@ player - when there's nothing to play - first, empty 2k of ROMs are selected.
****************************************************************************************/
+
#include "emu.h"
#include "includes/rltennis.h"
#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
-#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/ramdac.h"
#define RLT_REFRESH_RATE 60
@@ -141,8 +142,8 @@ TIMER_CALLBACK_MEMBER(rltennis_state::sample_player)
}
++m_dac_counter; /* update low address bits */
- m_dac_1->write_signed8(m_samples_1[m_sample_rom_offset_1 + ( m_dac_counter&0x7ff )]);
- m_dac_2->write_unsigned8(m_samples_2[m_sample_rom_offset_2 + ( m_dac_counter&0x7ff )]);
+ m_dac1->write(m_samples_1[m_sample_rom_offset_1 + (m_dac_counter & 0x7ff)]);
+ m_dac2->write(m_samples_2[m_sample_rom_offset_2 + (m_dac_counter & 0x7ff)]);
m_timer->adjust(attotime::from_hz( RLT_TIMER_FREQ ));
}
@@ -198,13 +199,13 @@ static MACHINE_CONFIG_START( rltennis, rltennis_state )
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
MCFG_RAMDAC_SPLIT_READ(1)
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", .5)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", .5)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
ROM_START( rltennis )
diff --git a/src/mame/drivers/route16.cpp b/src/mame/drivers/route16.cpp
index 74037fc663b..0c1dafe967b 100644
--- a/src/mame/drivers/route16.cpp
+++ b/src/mame/drivers/route16.cpp
@@ -70,10 +70,11 @@
***************************************************************************/
#include "emu.h"
+#include "includes/route16.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
-#include "includes/route16.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
@@ -265,7 +266,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( stratvox_cpu2_map, AS_PROGRAM, 8, route16_state )
AM_RANGE(0x0000, 0x1fff) AM_ROM
- AM_RANGE(0x2800, 0x2800) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2800, 0x2800) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("sharedram")
AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram2")
ADDRESS_MAP_END
@@ -575,9 +576,9 @@ static MACHINE_CONFIG_START( route16, route16_state )
MCFG_PALETTE_ADD_3BIT_RGB("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ay8910", AY8910, 10000000/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -621,10 +622,11 @@ static MACHINE_CONFIG_DERIVED( stratvox, route16 )
MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
MCFG_SN76477_ENVELOPE_PARAMS(0, 0) // envelope 1, 2
MCFG_SN76477_ENABLE(1) // enable
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/rowamet.cpp b/src/mame/drivers/rowamet.cpp
index bb303383d6a..5b850491fdc 100644
--- a/src/mame/drivers/rowamet.cpp
+++ b/src/mame/drivers/rowamet.cpp
@@ -22,9 +22,11 @@ ToDO:
*************************************************************************************/
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/z80/z80.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "rowamet.lh"
class rowamet_state : public driver_device
@@ -78,7 +80,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( rowamet_sub_io, AS_IO, 8, rowamet_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READWRITE(sound_r,mute_w)
- AM_RANGE(0x01, 0x01) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
static INPUT_PORTS_START( rowamet )
@@ -216,9 +218,10 @@ static MACHINE_CONFIG_START( rowamet, rowamet_state )
MCFG_DEFAULT_LAYOUT(layout_rowamet)
/* Sound */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*-------------------------------------------------------------------
diff --git a/src/mame/drivers/royalmah.cpp b/src/mame/drivers/royalmah.cpp
index 53f8e77629b..3b287790e55 100644
--- a/src/mame/drivers/royalmah.cpp
+++ b/src/mame/drivers/royalmah.cpp
@@ -97,9 +97,10 @@ Stephh's notes (based on the games Z80 code and some tests) :
#include "cpu/tlcs90/tlcs90.h"
#include "machine/gen_latch.h"
#include "machine/msm6242.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "machine/nvram.h"
+#include "sound/volt_reg.h"
class royalmah_state : public driver_device
@@ -841,7 +842,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( jansou_sub_iomap, AS_IO, 8, royalmah_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("dac", dac_device, write_unsigned8 )
+ AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
@@ -3326,12 +3327,12 @@ static MACHINE_CONFIG_START( royalmah, royalmah_state )
MCFG_SCREEN_PALETTE("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 18432000/12)
MCFG_AY8910_PORT_A_READ_CB(READ8(royalmah_state, royalmah_player_1_port_r))
MCFG_AY8910_PORT_B_READ_CB(READ8(royalmah_state, royalmah_player_2_port_r))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.33)
MACHINE_CONFIG_END
@@ -3359,8 +3360,9 @@ static MACHINE_CONFIG_DERIVED( jansou, royalmah )
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( dondenmj, royalmah )
diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp
index a82700559e5..4ee8972f1a8 100644
--- a/src/mame/drivers/s11.cpp
+++ b/src/mame/drivers/s11.cpp
@@ -17,16 +17,10 @@ ToDo:
*****************************************************************************************/
-
-#include "machine/genpin.h"
+#include "includes/s11.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "machine/6821pia.h"
-#include "sound/hc55516.h"
-#include "sound/ym2151.h"
-#include "sound/dac.h"
-#include "audio/s11c_bg.h"
-#include "includes/s11.h"
+#include "sound/volt_reg.h"
#include "s11.lh"
static ADDRESS_MAP_START( s11_main_map, AS_PROGRAM, 8, s11_state )
@@ -342,23 +336,11 @@ WRITE_LINE_MEMBER( s11_state::pias_cb2_w )
m_hc55516->digit_w(state);
}
-READ8_MEMBER( s11_state::dac_r )
+READ8_MEMBER( s11_state::sound_r )
{
return m_sound_data;
}
-WRITE8_MEMBER( s11_state::dac_w )
-{
- if(m_dac)
- m_dac->write_unsigned8(data);
-}
-
-WRITE8_MEMBER( s11_state::pia40_pa_w )
-{
- if(m_dac1)
- m_dac1->write_unsigned8(data);
-}
-
WRITE_LINE_MEMBER( s11_state::ym2151_irq_w )
{
if(m_pia40)
@@ -406,7 +388,7 @@ static MACHINE_CONFIG_START( s11, s11_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, sol2_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pia21_ca2_w))
@@ -456,18 +438,20 @@ static MACHINE_CONFIG_START( s11, s11_state )
MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s11_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, dac_w))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pias_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pias_cb2_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
@@ -482,11 +466,10 @@ static MACHINE_CONFIG_START( s11, s11_state )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11_state, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) // unknown DAC
MCFG_DEVICE_ADD("pia40", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, pia40_pa_w))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac1", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, pia40_pb_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pia40_cb2_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("bgcpu", M6809_FIRQ_LINE))
diff --git a/src/mame/drivers/s11a.cpp b/src/mame/drivers/s11a.cpp
index b1ac0ab8256..e53d0b28a0b 100644
--- a/src/mame/drivers/s11a.cpp
+++ b/src/mame/drivers/s11a.cpp
@@ -20,16 +20,10 @@ Note: To start a game, certain switches need to be activated. You must first pr
*****************************************************************************************/
-
-#include "machine/genpin.h"
+#include "includes/s11a.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "machine/6821pia.h"
-#include "sound/hc55516.h"
-#include "sound/ym2151.h"
-#include "sound/dac.h"
-#include "audio/s11c_bg.h"
-#include "includes/s11a.h"
+#include "sound/volt_reg.h"
#include "s11a.lh"
static ADDRESS_MAP_START( s11a_main_map, AS_PROGRAM, 8, s11a_state )
@@ -186,7 +180,7 @@ static MACHINE_CONFIG_START( s11a, s11a_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, sol2_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pia21_ca2_w))
@@ -236,18 +230,20 @@ static MACHINE_CONFIG_START( s11a, s11a_state )
MCFG_CPU_ADD("audiocpu", M6802, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s11a_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 0.50)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, dac_w))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pia40_cb2_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
@@ -261,11 +257,10 @@ static MACHINE_CONFIG_START( s11a, s11a_state )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11a_state, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) // unknown DAC
MCFG_DEVICE_ADD("pia40", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, pia40_pa_w))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac1", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, pia40_pb_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pias_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pias_cb2_w))
diff --git a/src/mame/drivers/s11b.cpp b/src/mame/drivers/s11b.cpp
index 06389587017..b7f2b29aa9a 100644
--- a/src/mame/drivers/s11b.cpp
+++ b/src/mame/drivers/s11b.cpp
@@ -20,16 +20,10 @@
- Cyclone: Nothing. The game doesn't bother to check if the ball is ready before allowing start. Insert 1 or more credits first, of course.
*/
-
-#include "machine/genpin.h"
+#include "includes/s11b.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "machine/6821pia.h"
-#include "sound/hc55516.h"
-#include "sound/ym2151.h"
-#include "sound/dac.h"
-#include "audio/s11c_bg.h"
-#include "includes/s11b.h"
+#include "sound/volt_reg.h"
#include "s11b.lh"
static ADDRESS_MAP_START( s11b_main_map, AS_PROGRAM, 8, s11b_state )
@@ -265,7 +259,7 @@ static MACHINE_CONFIG_START( s11b, s11b_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, sol2_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pia21_ca2_w))
@@ -315,18 +309,20 @@ static MACHINE_CONFIG_START( s11b, s11b_state )
MCFG_CPU_ADD("audiocpu", M6802, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s11b_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 0.50)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, dac_w))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pias_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pias_cb2_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
@@ -342,14 +338,13 @@ static MACHINE_CONFIG_START( s11b, s11b_state )
MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11b_state, ym2151_irq_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25) // unknown DAC
MCFG_SOUND_ADD("hc55516_bg", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 0.50)
MCFG_DEVICE_ADD("pia40", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, pia40_pa_w))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac1", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, pia40_pb_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11b_state, pia40_ca2_w))
MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pia40_cb2_w))
diff --git a/src/mame/drivers/s11c.cpp b/src/mame/drivers/s11c.cpp
index a3b413f0cf7..7e8b231cafc 100644
--- a/src/mame/drivers/s11c.cpp
+++ b/src/mame/drivers/s11c.cpp
@@ -4,16 +4,9 @@
Williams System 11c
*/
-
-#include "machine/genpin.h"
+#include "includes/s11c.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m6809/m6809.h"
-#include "machine/6821pia.h"
-#include "sound/hc55516.h"
-#include "sound/ym2151.h"
-#include "sound/dac.h"
-#include "audio/s11c_bg.h"
-#include "includes/s11c.h"
#include "s11c.lh"
@@ -167,7 +160,7 @@ static MACHINE_CONFIG_START( s11c, s11c_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s11_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s11_state, sound_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, sol2_w))
MCFG_PIA_CA2_HANDLER(WRITELINE(s11_state, pia21_ca2_w))
@@ -216,30 +209,10 @@ static MACHINE_CONFIG_START( s11c, s11c_state )
// generic sound board is not used in System 11C, except for Star Trax
/* Add the background music card */
- MCFG_WMS_S11C_BG_ADD("bgm",":bgcpu")
- /*
- MCFG_CPU_ADD("bgcpu", M6809E, XTAL_8MHz) // MC68B09E (note: schematics show this as 8mhz/2, but games crash very quickly with that speed?)
- MCFG_CPU_PROGRAM_MAP(s11c_bg_map)
- MCFG_QUANTUM_TIME(attotime::from_hz(50))
-
- MCFG_SPEAKER_STANDARD_MONO("bg")
- MCFG_YM2151_ADD("ym2151", 3580000)
- MCFG_YM2151_IRQ_HANDLER(WRITELINE(s11b_state, ym2151_irq_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.25)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
-
- MCFG_SOUND_ADD("hc55516_bg", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "bg", 0.50)
-
- MCFG_DEVICE_ADD("pia40", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(s11_state, pia40_pa_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(s11_state, pia40_pb_w))
- MCFG_PIA_CB2_HANDLER(WRITELINE(s11_state, pia40_cb2_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE("bgcpu", M6809_FIRQ_LINE))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE("bgcpu", INPUT_LINE_NMI))
- */
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("bgm", S11C_BG, 0)
+ MCFG_S11C_BG_ROM_REGION(":bgcpu")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
/*--------------------
diff --git a/src/mame/drivers/s3.cpp b/src/mame/drivers/s3.cpp
index 7a251b42a48..84917d56cce 100644
--- a/src/mame/drivers/s3.cpp
+++ b/src/mame/drivers/s3.cpp
@@ -37,14 +37,14 @@ ToDo:
************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "s3.lh"
-
class s3_state : public genpin_class
{
public:
@@ -52,7 +52,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_pia22(*this, "pia22")
, m_pia24(*this, "pia24")
, m_pia28(*this, "pia28")
@@ -60,7 +59,7 @@ public:
, m_pias(*this, "pias")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -94,7 +93,6 @@ private:
bool m_chimes;
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
- optional_device<dac_device> m_dac;
required_device<pia6821_device> m_pia22;
required_device<pia6821_device> m_pia24;
required_device<pia6821_device> m_pia28;
@@ -408,7 +406,7 @@ WRITE8_MEMBER( s3_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s3_state::dac_r )
+READ8_MEMBER( s3_state::sound_r )
{
return m_sound_data;
}
@@ -478,13 +476,15 @@ static MACHINE_CONFIG_DERIVED( s3a, s3 )
MCFG_CPU_ADD("audiocpu", M6802, 3580000)
MCFG_CPU_PROGRAM_MAP(s3_audio_map)
MCFG_MACHINE_RESET_OVERRIDE(s3_state, s3a)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPB_HANDLER(READ8(s3_state, dac_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPB_HANDLER(READ8(s3_state,sound_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
MACHINE_CONFIG_END
@@ -523,7 +523,7 @@ ROM_START(wldcp_l1)
ROM_LOAD("white2wc.716", 0x1800, 0x0800, CRC(618d15b5) SHA1(527387893eeb2cd4aa563a4cfb1948a15d2ed741))
ROM_REGION(0x0800, "audioroms", 0)
- ROM_LOAD("sound1.716", 0x0000, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c))
+ ROM_LOAD("481_s0_world_cup.716", 0x0000, 0x0800, CRC(cf012812) SHA1(26074f6a44075a94e6f91de1dbf92f8ec3ff8ca4))
ROM_END
/*-------------------------------------
@@ -536,7 +536,7 @@ ROM_START(cntct_l1)
ROM_LOAD("white2.716", 0x1800, 0x0800, CRC(4d4010dd) SHA1(11221124fef3b7bf82d353d65ce851495f6946a7))
ROM_REGION(0x0800, "audioroms", 0)
- ROM_LOAD("sound1.716", 0x0000, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c))
+ ROM_LOAD("482_s0_contact.716", 0x0000, 0x0800, CRC(d3c713da) SHA1(1fc4a8fadf472e9a04b3a86f60a9d625d07764e1))
ROM_END
/*-------------------------------------
@@ -549,7 +549,7 @@ ROM_START(disco_l1)
ROM_LOAD("white2.716", 0x1800, 0x0800, CRC(4d4010dd) SHA1(11221124fef3b7bf82d353d65ce851495f6946a7))
ROM_REGION(0x0800, "audioroms", 0)
- ROM_LOAD("sound1.716", 0x0000, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c))
+ ROM_LOAD("483_s0_disco_fever.716", 0x0000, 0x0800, CRC(d1cb5047) SHA1(7f36296975df19feecc6456ffb91f4a23bcad037))
ROM_END
/*--------------------------------
@@ -562,7 +562,7 @@ ROM_START(phnix_l1)
ROM_LOAD("white2.716", 0x1800, 0x0800, CRC(4d4010dd) SHA1(11221124fef3b7bf82d353d65ce851495f6946a7))
ROM_REGION(0x0800, "audioroms", 0)
- ROM_LOAD("sound1.716", 0x0000, 0x0800, CRC(f4190ca3) SHA1(ee234fb5c894fca5876ee6dc7ea8e89e7e0aec9c))
+ ROM_LOAD("485_s0_phoenix.716", 0x0000, 0x0800, CRC(1c3dea6e) SHA1(04bfe952be2eab66f023b204c21a1bd461ea572f))
ROM_END
/*--------------------------------
diff --git a/src/mame/drivers/s4.cpp b/src/mame/drivers/s4.cpp
index f67fd4712c3..c40ee218900 100644
--- a/src/mame/drivers/s4.cpp
+++ b/src/mame/drivers/s4.cpp
@@ -31,10 +31,12 @@ ToDo:
************************************************************************************/
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "s4.lh"
@@ -45,7 +47,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_pia22(*this, "pia22")
, m_pia24(*this, "pia24")
, m_pia28(*this, "pia28")
@@ -53,7 +54,7 @@ public:
, m_pias(*this, "pias")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -87,7 +88,6 @@ private:
bool m_chimes;
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
- optional_device<dac_device> m_dac;
required_device<pia6821_device> m_pia22;
required_device<pia6821_device> m_pia24;
required_device<pia6821_device> m_pia28;
@@ -401,7 +401,7 @@ WRITE8_MEMBER( s4_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s4_state::dac_r )
+READ8_MEMBER( s4_state::sound_r )
{
return m_sound_data;
}
@@ -471,13 +471,15 @@ static MACHINE_CONFIG_DERIVED( s4a, s4 )
MCFG_CPU_ADD("audiocpu", M6808, 3580000)
MCFG_CPU_PROGRAM_MAP(s4_audio_map)
MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4a)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPB_HANDLER(READ8(s4_state, dac_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPB_HANDLER(READ8(s4_state, sound_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/s6.cpp b/src/mame/drivers/s6.cpp
index b921f53b1c2..ec30173edaf 100644
--- a/src/mame/drivers/s6.cpp
+++ b/src/mame/drivers/s6.cpp
@@ -46,12 +46,13 @@ ToDo:
************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
-#include "sound/hc55516.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/hc55516.h"
+#include "sound/volt_reg.h"
#include "s6.lh"
@@ -62,7 +63,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_hc55516(*this, "hc55516")
, m_pias(*this, "pias")
, m_pia22(*this, "pia22")
@@ -71,7 +71,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -104,7 +104,6 @@ private:
static const device_timer_id TIMER_IRQ = 0;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<hc55516_device> m_hc55516;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia22;
@@ -341,7 +340,7 @@ WRITE8_MEMBER( s6_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s6_state::dac_r )
+READ8_MEMBER( s6_state::sound_r )
{
return m_sound_data;
}
@@ -445,16 +444,19 @@ static MACHINE_CONFIG_START( s6, s6_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6802, 3580000)
MCFG_CPU_PROGRAM_MAP(s6_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPB_HANDLER(READ8(s6_state, dac_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPB_HANDLER(READ8(s6_state, sound_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, digit_w))
MCFG_PIA_CB2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, clock_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
diff --git a/src/mame/drivers/s6a.cpp b/src/mame/drivers/s6a.cpp
index ecb2454b3ef..ba773a02cc2 100644
--- a/src/mame/drivers/s6a.cpp
+++ b/src/mame/drivers/s6a.cpp
@@ -39,12 +39,13 @@ ToDo:
************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
-#include "sound/hc55516.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/hc55516.h"
+#include "sound/volt_reg.h"
#include "s6a.lh"
@@ -55,7 +56,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_hc55516(*this, "hc55516")
, m_pias(*this, "pias")
, m_pia22(*this, "pia22")
@@ -64,7 +64,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -97,7 +97,6 @@ private:
static const device_timer_id TIMER_IRQ = 0;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<hc55516_device> m_hc55516;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia22;
@@ -324,7 +323,7 @@ WRITE8_MEMBER( s6a_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s6a_state::dac_r )
+READ8_MEMBER( s6a_state::sound_r )
{
return m_sound_data;
}
@@ -428,16 +427,19 @@ static MACHINE_CONFIG_START( s6a, s6a_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6802, 3580000)
MCFG_CPU_PROGRAM_MAP(s6a_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPB_HANDLER(READ8(s6a_state, dac_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPB_HANDLER(READ8(s6a_state, sound_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, digit_w))
MCFG_PIA_CB2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, clock_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp
index b1eaf21c39d..0af41fade45 100644
--- a/src/mame/drivers/s7.cpp
+++ b/src/mame/drivers/s7.cpp
@@ -56,15 +56,15 @@ ToDo:
*****************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
-#include "sound/hc55516.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/hc55516.h"
+#include "sound/volt_reg.h"
#include "s7.lh"
-
class s7_state : public genpin_class
{
public:
@@ -72,7 +72,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_hc55516(*this, "hc55516")
, m_pias(*this, "pias")
, m_pia21(*this, "pia21")
@@ -82,7 +81,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -126,7 +125,6 @@ private:
virtual void machine_start() override;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<hc55516_device> m_hc55516;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia21;
@@ -360,7 +358,7 @@ WRITE8_MEMBER( s7_state::nvram_w )
m_nvram[offset] = data;
}
-READ8_MEMBER( s7_state::dac_r )
+READ8_MEMBER( s7_state::sound_r )
{
return m_sound_data;
}
@@ -481,16 +479,19 @@ static MACHINE_CONFIG_START( s7, s7_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6808, 3580000)
MCFG_CPU_PROGRAM_MAP(s7_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPB_HANDLER(READ8(s7_state, dac_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPB_HANDLER(READ8(s7_state, sound_r))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_WRITEPB_HANDLER(NOOP)
MCFG_PIA_READCA1_HANDLER(VCC)
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, digit_w))
diff --git a/src/mame/drivers/s8.cpp b/src/mame/drivers/s8.cpp
index 85c68bc748e..8e1328b2310 100644
--- a/src/mame/drivers/s8.cpp
+++ b/src/mame/drivers/s8.cpp
@@ -44,14 +44,14 @@ ToDo:
************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "s8.lh"
-
class s8_state : public genpin_class
{
public:
@@ -59,7 +59,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_pias(*this, "pias")
, m_pia21(*this, "pia21")
, m_pia24(*this, "pia24")
@@ -67,7 +66,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -98,7 +97,6 @@ private:
static const device_timer_id TIMER_IRQ = 0;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia21;
required_device<pia6821_device> m_pia24;
@@ -249,7 +247,7 @@ WRITE8_MEMBER( s8_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s8_state::dac_r )
+READ8_MEMBER( s8_state::sound_r )
{
return m_sound_data;
}
@@ -316,7 +314,7 @@ static MACHINE_CONFIG_START( s8, s8_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s8_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s8_state, sound_r))
MCFG_PIA_READCA1_HANDLER(READLINE(s8_state, pia21_ca1_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s8_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s8_state, sol2_w))
@@ -351,13 +349,15 @@ static MACHINE_CONFIG_START( s8, s8_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s8_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s8_state, dac_r))
- MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPA_HANDLER(READ8(s8_state, sound_r))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/s8a.cpp b/src/mame/drivers/s8a.cpp
index 16f703c8bb7..3645cdbaa02 100644
--- a/src/mame/drivers/s8a.cpp
+++ b/src/mame/drivers/s8a.cpp
@@ -20,14 +20,14 @@ ToDo:
************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "s8a.lh"
-
class s8a_state : public genpin_class
{
public:
@@ -35,7 +35,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_pias(*this, "pias")
, m_pia21(*this, "pia21")
, m_pia24(*this, "pia24")
@@ -43,7 +42,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w);
@@ -74,7 +73,6 @@ private:
static const device_timer_id TIMER_IRQ = 0;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia21;
required_device<pia6821_device> m_pia24;
@@ -221,7 +219,7 @@ WRITE8_MEMBER( s8a_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s8a_state::dac_r )
+READ8_MEMBER( s8a_state::sound_r )
{
return m_sound_data;
}
@@ -288,7 +286,7 @@ static MACHINE_CONFIG_START( s8a, s8a_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s8a_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s8a_state, sound_r))
MCFG_PIA_READCA1_HANDLER(READLINE(s8a_state, pia21_ca1_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s8a_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s8a_state, sol2_w))
@@ -323,13 +321,15 @@ static MACHINE_CONFIG_START( s8a, s8a_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s8a_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s8a_state, dac_r))
- MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPA_HANDLER(READ8(s8a_state, sound_r))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/s9.cpp b/src/mame/drivers/s9.cpp
index ca628508493..3e9a3d4e42d 100644
--- a/src/mame/drivers/s9.cpp
+++ b/src/mame/drivers/s9.cpp
@@ -31,15 +31,15 @@ ToDo:
*****************************************************************************************/
-
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/hc55516.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "s9.lh"
-
class s9_state : public genpin_class
{
public:
@@ -47,7 +47,6 @@ public:
: genpin_class(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
- , m_dac(*this, "dac")
, m_hc55516(*this, "hc55516")
, m_pias(*this, "pias")
, m_pia21(*this, "pia21")
@@ -56,7 +55,7 @@ public:
, m_pia30(*this, "pia30")
{ }
- DECLARE_READ8_MEMBER(dac_r);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
DECLARE_WRITE8_MEMBER(lamp0_w) { };
@@ -87,7 +86,6 @@ private:
static const device_timer_id TIMER_IRQ = 0;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
required_device<hc55516_device> m_hc55516;
required_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia21;
@@ -257,7 +255,7 @@ WRITE8_MEMBER( s9_state::switch_w )
m_kbdrow = data;
}
-READ8_MEMBER( s9_state::dac_r )
+READ8_MEMBER( s9_state::sound_r )
{
return m_sound_data;
}
@@ -324,7 +322,7 @@ static MACHINE_CONFIG_START( s9, s9_state )
/* Devices */
MCFG_DEVICE_ADD("pia21", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s9_state, dac_r))
+ MCFG_PIA_READPA_HANDLER(READ8(s9_state, sound_r))
MCFG_PIA_READCA1_HANDLER(READLINE(s9_state, pia21_ca1_r))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(s9_state, sound_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(s9_state, sol2_w))
@@ -359,16 +357,19 @@ static MACHINE_CONFIG_START( s9, s9_state )
/* Add the soundcard */
MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz)
MCFG_CPU_PROGRAM_MAP(s9_audio_map)
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SPEAKER_STANDARD_MONO("speech")
MCFG_SOUND_ADD("hc55516", HC55516, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
MCFG_DEVICE_ADD("pias", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(s9_state, dac_r))
- MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_READPA_HANDLER(READ8(s9_state, sound_r))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, clock_w))
MCFG_PIA_CB2_HANDLER(DEVWRITELINE("hc55516", hc55516_device, digit_w))
MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", M6808_IRQ_LINE))
diff --git a/src/mame/drivers/sbasketb.cpp b/src/mame/drivers/sbasketb.cpp
index e66f0b403af..2f4a7ddca20 100644
--- a/src/mame/drivers/sbasketb.cpp
+++ b/src/mame/drivers/sbasketb.cpp
@@ -41,16 +41,16 @@ CPU/Video Board Parts:
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/sbasketb.h"
+#include "includes/konamipt.h"
+#include "audio/trackfld.h"
#include "cpu/m6809/m6809.h"
-#include "sound/dac.h"
+#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "machine/konami1.h"
#include "machine/watchdog.h"
-#include "includes/konamipt.h"
-#include "audio/trackfld.h"
-#include "includes/sbasketb.h"
-
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(sbasketb_state::sbasketb_sh_irqtrigger_w)
{
@@ -99,7 +99,7 @@ static ADDRESS_MAP_START( sbasketb_sound_map, AS_PROGRAM, 8, sbasketb_state )
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("vlm", vlm5030_device, data_w) /* speech data */
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, hyperspt_sound_w) /* speech and output control */
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
ADDRESS_MAP_END
@@ -210,20 +210,21 @@ static MACHINE_CONFIG_START( sbasketb, sbasketb_state )
MCFG_PALETTE_INIT_OWNER(sbasketb_state, sbasketb)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("snsnd", SN76489, XTAL_14_31818MHz / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* Schematics say 3.58MHz, but board uses 3.579545MHz xtal */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
MACHINE_CONFIG_DERIVED(sbasketbu, sbasketb)
diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp
index 47dfe922e5d..d27c48cabbd 100644
--- a/src/mame/drivers/sbrkout.cpp
+++ b/src/mame/drivers/sbrkout.cpp
@@ -38,10 +38,9 @@
#include "cpu/m6502/m6502.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
-
+#include "sound/volt_reg.h"
#include "sbrkout.lh"
-
class sbrkout_state : public driver_device
{
public:
@@ -83,7 +82,7 @@ public:
TIMER_CALLBACK_MEMBER(pot_trigger_callback);
void update_nmi_state();
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -159,7 +158,7 @@ TIMER_CALLBACK_MEMBER(sbrkout_state::scanline_callback)
m_maincpu->set_input_line(0, ASSERT_LINE);
/* update the DAC state */
- m_dac->write_unsigned8((videoram[0x380 + 0x11] & (scanline >> 2)) ? 255 : 0);
+ m_dac->write((videoram[0x380 + 0x11] & (scanline >> 2)) != 0);
/* on the VBLANK, read the pot and schedule an interrupt time for it */
if (scanline == m_screen->visible_area().max_y + 1)
@@ -599,9 +598,10 @@ static MACHINE_CONFIG_START( sbrkout, sbrkout_state )
MCFG_PALETTE_ADD_MONOCHROME("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.99)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp
index 84092439b02..7adc4fb4f4c 100644
--- a/src/mame/drivers/scobra.cpp
+++ b/src/mame/drivers/scobra.cpp
@@ -324,7 +324,7 @@ ADDRESS_MAP_END
/* stratgyx coinage DIPs are spread across two input ports */
CUSTOM_INPUT_MEMBER(scobra_state::stratgyx_coinage_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
return (ioport("IN4")->read() & bit_mask) ? 0x01 : 0x00;
}
@@ -1524,6 +1524,29 @@ ROM_START( hustlerb4 )
ROM_LOAD( "top.c5", 0x0000, 0x0800, CRC(88226086) SHA1(fe2da172313063e5b056fc8c8d8b2a5c64db5179) )
ROM_END
+// the following romset came from a blister, so no PCB infos. It's a mix between hustlerb4's main CPU and GFX ROMs and hustlerb's audio CPU ROMs.
+
+ROM_START( hustlerb5 )
+ ROM_REGION( 0x10000, "maincpu", 0 ) // identical to hustlerb but in 6 roms instead of 3
+ ROM_LOAD( "b1.bin", 0x0000, 0x0800, CRC(f87d75c7) SHA1(48f0f5289366a3c4dec86f5bb48d16a33745844d) )
+ ROM_LOAD( "b2.bin", 0x0800, 0x0800, CRC(a639d4e1) SHA1(2130de635f41f915db26a5fcba9654ae140d0ecc) )
+ ROM_LOAD( "b3.bin", 0x1000, 0x0800, CRC(1b75520e) SHA1(b4ebb69c0f17fde7a527d54ec8406b1b80798e0c) )
+ ROM_LOAD( "b4.bin", 0x1800, 0x0800, CRC(fdea3165) SHA1(6120919445599ec9116d14d0baf4fb4e4720e473) )
+ ROM_LOAD( "b5.bin", 0x2000, 0x0800, CRC(730100e1) SHA1(81e44d768ca4e654981c14660e12e355fe720636) )
+ ROM_LOAD( "b6.bin", 0x2800, 0x0800, CRC(68dff552) SHA1(5dad38db45afbd79b5627a75b295fc920ad68856) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 )
+ ROM_LOAD( "bs1.bin", 0x0000, 0x0800, CRC(b559bfde) SHA1(f7733fbc5cabb441ba039b9d7202aaf0cebb9a85) )
+ ROM_LOAD( "bs2.bin", 0x0800, 0x0800, CRC(6ef96cfb) SHA1(eba0bdc8bc1652ff2f62594371ded711dbfcce86) )
+
+ ROM_REGION( 0x1000, "gfx1", 0 )
+ ROM_LOAD( "c1.bin", 0x0000, 0x0800, CRC(0bdfad0e) SHA1(8e6f1737604f3801c03fa2e9a5e6a2778b54bae8) )
+ ROM_LOAD( "c2.bin", 0x0800, 0x0800, CRC(8e062177) SHA1(7e52a1669804b6c2f694cfc64b04abc8246bb0c2) )
+
+ ROM_REGION( 0x0020, "proms", 0 ) // not dumped for this set, but the same in all other original and bootleg sets
+ ROM_LOAD( "mni6331.e6", 0x0000, 0x0020, CRC(aa1f7f5e) SHA1(311dd17aa11490a1173c76223e4ccccf8ea29850) )
+ROM_END
+
ROM_START( mimonkey )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "mm1.2e", 0x0000, 0x1000, CRC(9019f1b1) SHA1(0c45f64e39b9a182f6162ab520ced6ef0686466c) )
@@ -1595,6 +1618,7 @@ GAME( 1981, billiard, hustler, hustler, hustler, scramble_state, billiard
GAME( 1981, hustlerb, hustler, hustlerb, hustler, driver_device, 0, ROT90, "bootleg (Digimatic)", "Video Hustler (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, hustlerb2, hustler, hustler, hustler, scramble_state, hustlerd, ROT90, "bootleg", "Fatsy Gambler (Video Hustler bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, hustlerb4, hustler, hustlerb4, hustler, driver_device, 0, ROT90, "bootleg", "Video Hustler (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, hustlerb5, hustler, hustlerb, hustler, driver_device, 0, ROT90, "bootleg", "Video Hustler (bootleg, set 3)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, mimonkey, 0, mimonkey, mimonkey, scramble_state, mimonkey, ROT90, "Universal Video Games", "Mighty Monkey", MACHINE_SUPPORTS_SAVE )
GAME( 1982, mimonsco, mimonkey, mimonkey, mimonsco, scramble_state, mimonsco, ROT90, "bootleg", "Mighty Monkey (bootleg on Super Cobra hardware)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp
index c5e0af69fa3..37da3330846 100644
--- a/src/mame/drivers/scramble.cpp
+++ b/src/mame/drivers/scramble.cpp
@@ -32,7 +32,6 @@ Notes:
#include "cpu/z80/z80.h"
#include "cpu/s2650/s2650.h"
#include "sound/ay8910.h"
-#include "sound/dac.h"
#include "machine/i8255.h"
#include "machine/gen_latch.h"
#include "machine/watchdog.h"
@@ -540,7 +539,7 @@ INPUT_PORTS_END
/* ckongs coinage DIPs are spread across two input ports */
CUSTOM_INPUT_MEMBER(scramble_state::ckongs_coinage_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
}
diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp
index f717645494e..07b634f4464 100644
--- a/src/mame/drivers/seattle.cpp
+++ b/src/mame/drivers/seattle.cpp
@@ -197,6 +197,7 @@
#include "calspeed.lh"
#include "vaportrx.lh"
#include "hyprdriv.lh"
+#include "sfrush.lh"
@@ -3306,8 +3307,8 @@ DRIVER_INIT_MEMBER(seattle_state,hyprdriv)
GAME( 1996, wg3dh, 0, wg3dh, wg3dh, seattle_state, wg3dh, ROT0, "Atari Games", "Wayne Gretzky's 3D Hockey", MACHINE_SUPPORTS_SAVE )
GAME( 1996, mace, 0, mace, mace, seattle_state, mace, ROT0, "Atari Games", "Mace: The Dark Age (boot ROM 1.0ce, HDD 1.0b)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, macea, mace, mace, mace, seattle_state, mace, ROT0, "Atari Games", "Mace: The Dark Age (HDD 1.0a)", MACHINE_SUPPORTS_SAVE )
-GAME( 1996, sfrush, 0, sfrush, sfrush, seattle_state, sfrush, ROT0, "Atari Games", "San Francisco Rush", MACHINE_SUPPORTS_SAVE )
-GAME( 1996, sfrushrk, 0, sfrushrk, sfrushrk, seattle_state, sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAMEL( 1996, sfrush, 0, sfrush, sfrush, seattle_state, sfrush, ROT0, "Atari Games", "San Francisco Rush", MACHINE_SUPPORTS_SAVE, layout_sfrush )
+GAMEL( 1996, sfrushrk, 0, sfrushrk, sfrushrk, seattle_state, sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sfrush )
GAMEL( 1998, calspeed, 0, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 2.1a Apr 17 1998, GUTS 1.25 Apr 17 1998 / MAIN Apr 17 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )
GAMEL( 1998, calspeeda,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r8 Mar 10 1998, GUTS Mar 10 1998 / MAIN Mar 10 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )
GAMEL( 1998, calspeedb,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r7a Mar 4 1998, GUTS Mar 3 1998 / MAIN Jan 19 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index ce6bfb195c5..1ec19493e82 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -108,7 +108,6 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/sn76496.h"
#include "sound/samples.h"
#include "machine/i8255.h"
@@ -826,7 +825,7 @@ static MACHINE_CONFIG_START( g80r_base, segag80r_state )
MCFG_SCREEN_PALETTE("palette")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
@@ -937,10 +936,10 @@ static MACHINE_CONFIG_DERIVED( sindbadm, g80r_base )
/* sound hardware */
MCFG_SOUND_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("sn2", SN76496, SINDBADM_SOUND_CLOCK/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1411,7 +1410,7 @@ void segag80r_state::monsterb_expand_gfx(const char *region)
/* expand the background ROMs; A11/A12 of each ROM is independently controlled via */
/* banking */
dest = memregion(region)->base();
- dynamic_buffer temp(0x4000);
+ std::vector<UINT8> temp(0x4000);
memcpy(&temp[0], dest, 0x4000);
/* 16 effective total banks */
diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp
index e925643f520..f83b59aba7c 100644
--- a/src/mame/drivers/segag80v.cpp
+++ b/src/mame/drivers/segag80v.cpp
@@ -888,7 +888,7 @@ static MACHINE_CONFIG_START( g80v_base, segag80v_state )
MCFG_VECTOR_ADD("vector")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
@@ -898,7 +898,7 @@ static MACHINE_CONFIG_DERIVED( elim2, g80v_base )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(8)
MCFG_SAMPLES_NAMES(elim_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -908,7 +908,7 @@ static MACHINE_CONFIG_DERIVED( spacfury, g80v_base )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(8)
MCFG_SAMPLES_NAMES(spacfury_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
/* speech board */
MCFG_FRAGMENT_ADD(sega_speech_board)
@@ -921,10 +921,10 @@ static MACHINE_CONFIG_DERIVED( zektor, g80v_base )
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(8)
MCFG_SAMPLES_NAMES(zektor_sample_names)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MCFG_SOUND_ADD("aysnd", AY8910, VIDEO_CLOCK/4/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.33)
/* speech board */
MCFG_FRAGMENT_ADD(sega_speech_board)
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index be4486d08ec..4df3505e6c9 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -148,12 +148,12 @@ Tetris - - - - EPR12169 EPR12170 -
#include "emu.h"
#include "includes/segas16a.h"
-#include "machine/segacrp2_device.h"
+#include "includes/segaipt.h"
#include "machine/fd1089.h"
#include "machine/nvram.h"
+#include "machine/segacrp2_device.h"
#include "sound/dac.h"
-#include "includes/segaipt.h"
-
+#include "sound/volt_reg.h"
//**************************************************************************
// PPI READ/WRITE CALLBACKS
@@ -1003,7 +1003,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( n7751_portmap, AS_IO, 8, segas16a_state )
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(n7751_rom_r)
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(n7751_t1_r)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(n7751_p2_r, n7751_p2_w)
AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("n7751_8243", i8243_device, i8243_prog_w)
ADDRESS_MAP_END
@@ -1930,16 +1930,17 @@ static MACHINE_CONFIG_START( system16a, segas16a_state )
MCFG_PALETTE_ADD("palette", 2048*3)
// sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_YM2151_ADD("ymsnd", 4000000)
MCFG_YM2151_PORT_WRITE_HANDLER(WRITE8(segas16a_state, n7751_control_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.43)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.43)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1979,9 +1980,10 @@ static MACHINE_CONFIG_DERIVED( system16a_no7751, system16a )
MCFG_DEVICE_REMOVE("n7751")
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SOUND_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system16a_no7751p, system16a_no7751 )
@@ -1996,9 +1998,10 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system16a_i8751_no7751, system16a_i8751 )
MCFG_DEVICE_REMOVE("n7751")
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SOUND_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
*/
@@ -2008,9 +2011,10 @@ static MACHINE_CONFIG_DERIVED( system16a_fd1089a_no7751, system16a_fd1089a )
MCFG_DEVICE_REMOVE("n7751")
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SOUND_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system16a_fd1089b_no7751, system16a_fd1089b )
@@ -2019,9 +2023,10 @@ static MACHINE_CONFIG_DERIVED( system16a_fd1089b_no7751, system16a_fd1089b )
MCFG_DEVICE_REMOVE("n7751")
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SOUND_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system16a_fd1094_no7751, system16a_fd1094 )
@@ -2030,9 +2035,10 @@ static MACHINE_CONFIG_DERIVED( system16a_fd1094_no7751, system16a_fd1094 )
MCFG_DEVICE_REMOVE("n7751")
MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SOUND_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index b62cc727138..92058189954 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -336,15 +336,14 @@ Notes:
*/
#include "emu.h"
+#include "includes/segas24.h"
+#include "includes/segaipt.h"
#include "cpu/m68000/m68000.h"
-#include "sound/ym2151.h"
-#include "sound/dac.h"
-#include "sound/ym2151.h"
#include "machine/fd1094.h"
#include "machine/nvram.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
#include "video/segaic24.h"
-#include "includes/segas24.h"
-#include "includes/segaipt.h"
#define MASTER_CLOCK XTAL_20MHz
#define VIDEO_CLOCK XTAL_32MHz
@@ -604,7 +603,7 @@ void segas24_state::mahmajn_io_w(UINT8 port, UINT8 data)
cur_input_line = (cur_input_line + 1) & 7;
break;
case 7: // DAC
- m_dac->write_signed8(data);
+ m_dac->write(data);
break;
default:
fprintf(stderr, "Port %d : %02x\n", port, data & 0xff);
@@ -618,7 +617,7 @@ void segas24_state::hotrod_io_w(UINT8 port, UINT8 data)
case 3: // Lamps
break;
case 7: // DAC
- m_dac->write_signed8(data);
+ m_dac->write(data);
break;
default:
fprintf(stderr, "Port %d : %02x\n", port, data & 0xff);
@@ -2043,9 +2042,9 @@ static MACHINE_CONFIG_START( system24, segas24_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( system24_floppy, system24 )
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 4f29c2fda4c..2c13b3cd65e 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -1198,7 +1198,7 @@ CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode)
Start - 111 port A
*/
static const UINT8 encoding[] = { 6, 5, 4, 3, 2, 7 };
- ioport_value state = ~m_key[(FPTR)param]->read();
+ ioport_value state = ~m_key[(uintptr_t)param]->read();
for (int bit = 0; bit < ARRAY_LENGTH(encoding); bit++)
if (state & (1 << bit))
@@ -1349,16 +1349,16 @@ static INPUT_PORTS_START( spi_ejanhs )
PORT_INCLUDE( spi_mahjong_keyboard )
PORT_START("INPUTS")
- PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)3)
- PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)4)
- PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)2)
- PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)0)
+ PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)3)
+ PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)4)
+ PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)2)
+ PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)0)
PORT_SPECIAL_ONOFF_DIPLOC( 0x00008000, 0x00000000, Flip_Screen, "SW1:1" )
PORT_BIT( 0xffff4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
// These need a noncontiguous encoding, but are nonfunctional in any case
- //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)1)
+ //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)1)
PORT_SERVICE_NO_TOGGLE( 0x00000004, IP_ACTIVE_LOW )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x000000f3, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/seicross.cpp b/src/mame/drivers/seicross.cpp
index 9761fb364b6..591b6c10760 100644
--- a/src/mame/drivers/seicross.cpp
+++ b/src/mame/drivers/seicross.cpp
@@ -45,13 +45,12 @@ This info came from http://www.ne.jp/asahi/cc-sakura/akkun/old/fryski.html
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/seicross.h"
#include "cpu/m6800/m6800.h"
+#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
-#include "sound/dac.h"
-#include "includes/seicross.h"
-
+#include "sound/volt_reg.h"
void seicross_state::nvram_init(nvram_device &nvram, void *data, size_t size)
{
@@ -102,6 +101,10 @@ WRITE8_MEMBER(seicross_state::portB_w)
m_portb = data;
}
+WRITE8_MEMBER(seicross_state::dac_w)
+{
+ m_dac->write(data >> 4);
+}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, seicross_state )
AM_RANGE(0x0000, 0x77ff) AM_ROM
@@ -127,7 +130,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mcu_nvram_map, AS_PROGRAM, 8, seicross_state )
AM_RANGE(0x0000, 0x007f) AM_RAM
AM_RANGE(0x1000, 0x10ff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2000, 0x2000) AM_WRITE(dac_w)
AM_RANGE(0x8000, 0xf7ff) AM_ROM AM_REGION("maincpu", 0)
AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1")
ADDRESS_MAP_END
@@ -137,7 +140,7 @@ static ADDRESS_MAP_START( mcu_no_nvram_map, AS_PROGRAM, 8, seicross_state )
AM_RANGE(0x1003, 0x1003) AM_READ_PORT("DSW1") /* DSW1 */
AM_RANGE(0x1005, 0x1005) AM_READ_PORT("DSW2") /* DSW2 */
AM_RANGE(0x1006, 0x1006) AM_READ_PORT("DSW3") /* DSW3 */
- AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2000, 0x2000) AM_WRITE(dac_w)
AM_RANGE(0x8000, 0xf7ff) AM_ROM AM_REGION("maincpu", 0)
AM_RANGE(0xf800, 0xffff) AM_RAM AM_SHARE("share1")
ADDRESS_MAP_END
@@ -413,15 +416,16 @@ static MACHINE_CONFIG_START( no_nvram, seicross_state )
MCFG_PALETTE_INIT_OWNER(seicross_state, seicross)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 1536000)
MCFG_AY8910_PORT_B_READ_CB(READ8(seicross_state, portB_r))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(seicross_state, portB_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/senjyo.cpp b/src/mame/drivers/senjyo.cpp
index f951a36dcd1..e0d5af33981 100644
--- a/src/mame/drivers/senjyo.cpp
+++ b/src/mame/drivers/senjyo.cpp
@@ -78,10 +78,11 @@ I/O read/write
/* 26.February 2012 Tsuyoshi Hasegawa fixed palette intensity */
#include "emu.h"
+#include "includes/senjyo.h"
#include "cpu/z80/z80.h"
-#include "sound/sn76496.h"
#include "machine/segacrpt_device.h"
-#include "includes/senjyo.h"
+#include "sound/sn76496.h"
+#include "sound/volt_reg.h"
void senjyo_state::machine_start()
{
@@ -583,19 +584,20 @@ static MACHINE_CONFIG_START( senjyo, senjyo_state )
MCFG_PALETTE_INIT_OWNER(senjyo_state, radar)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("sn1", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("sn2", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("sn3", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05)
+ MCFG_SOUND_ADD("dac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.05) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index b1b479b72e7..170c3abbce1 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -11473,7 +11473,7 @@ DRIVER_INIT_MEMBER(seta_state,blandia)
int rpos;
rom_size = 0x80000;
- dynamic_buffer buf(rom_size);
+ std::vector<UINT8> buf(rom_size);
rom = memregion("gfx2")->base() + 0x40000;
diff --git a/src/mame/drivers/shangkid.cpp b/src/mame/drivers/shangkid.cpp
index 8bb8482aee4..1a5adeee78b 100644
--- a/src/mame/drivers/shangkid.cpp
+++ b/src/mame/drivers/shangkid.cpp
@@ -51,10 +51,11 @@ Games by Nihon Game/Culture Brain:
*/
#include "emu.h"
+#include "includes/shangkid.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/shangkid.h"
+#include "sound/volt_reg.h"
/***************************************************************************************/
@@ -339,7 +340,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, shangkid_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
/***************************************************************************************/
@@ -378,15 +379,16 @@ static MACHINE_CONFIG_START( chinhero, shangkid_state )
MCFG_VIDEO_START_OVERRIDE(shangkid_state,shangkid)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_18_432MHz/12) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(shangkid_state, chinhero_ay8910_porta_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(shangkid_state, ay8910_portb_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MACHINE_CONFIG_END
@@ -459,10 +461,10 @@ static MACHINE_CONFIG_START( dynamski, shangkid_state )
MCFG_PALETTE_INIT_OWNER(shangkid_state,dynamski)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
MACHINE_CONFIG_END
/***************************************************************************************/
diff --git a/src/mame/drivers/shisen.cpp b/src/mame/drivers/shisen.cpp
index 6954a34b2f3..7e8eba9c78f 100644
--- a/src/mame/drivers/shisen.cpp
+++ b/src/mame/drivers/shisen.cpp
@@ -9,10 +9,10 @@ driver by Nicola Salmoria
***************************************************************************/
#include "emu.h"
+#include "includes/shisen.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/ym2151.h"
-#include "includes/shisen.h"
+#include "sound/volt_reg.h"
READ8_MEMBER(shisen_state::dsw1_r)
{
@@ -241,9 +241,9 @@ static MACHINE_CONFIG_START( shisen, shisen_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index 942d6dad243..e1738fa3468 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -1019,7 +1019,7 @@ DRIVER_INIT_MEMBER(simpl156_state,simpl156)
{
UINT8 *rom = memregion("okimusic")->base();
int length = memregion("okimusic")->bytes();
- dynamic_buffer buf1(length);
+ std::vector<UINT8> buf1(length);
UINT32 x;
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index 4464a9a38b0..b5b78b3c761 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -127,6 +127,7 @@
#include "machine/i8255.h"
#include "machine/nvram.h"
#include "machine/ticket.h"
+#include "video/ramdac.h"
#include <algorithm>
@@ -153,8 +154,6 @@ public:
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
- m_generic_paletteram_8(*this, "paletteram"),
- m_generic_paletteram2_8(*this, "paletteram2"),
m_hopper(*this, "hopper") { }
tilemap_t *m_tmap;
@@ -189,8 +188,6 @@ public:
DECLARE_WRITE8_MEMBER(reeltileshigh_2_w);
DECLARE_WRITE8_MEMBER(reeltileshigh_3_w);
DECLARE_WRITE8_MEMBER(reeltileshigh_4_w);
- DECLARE_WRITE8_MEMBER(skylncr_paletteram_w);
- DECLARE_WRITE8_MEMBER(skylncr_paletteram2_w);
DECLARE_WRITE8_MEMBER(reelscroll1_w);
DECLARE_WRITE8_MEMBER(reelscroll2_w);
DECLARE_WRITE8_MEMBER(reelscroll3_w);
@@ -201,7 +198,6 @@ public:
DECLARE_WRITE8_MEMBER(mbutrfly_prot_w);
READ_LINE_MEMBER(mbutrfly_prot_r);
DECLARE_READ8_MEMBER(bdream97_opcode_r);
- DECLARE_DRIVER_INIT(skylncr);
DECLARE_DRIVER_INIT(sonikfig);
TILE_GET_INFO_MEMBER(get_tile_info);
TILE_GET_INFO_MEMBER(get_reel_1_tile_info);
@@ -214,8 +210,6 @@ public:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- optional_shared_ptr<UINT8> m_generic_paletteram_8;
- optional_shared_ptr<UINT8> m_generic_paletteram2_8;
required_device<ticket_dispenser_device> m_hopper;
bool m_mbutrfly_prot;
};
@@ -372,55 +366,6 @@ WRITE8_MEMBER(skylncr_state::reeltileshigh_4_w)
m_reel_4_tilemap->mark_tile_dirty(offset);
}
-// FIXME: this is a VGA-style RAMDAC, so use one
-// instead of this custom implementation
-
-WRITE8_MEMBER(skylncr_state::skylncr_paletteram_w)
-{
- if (offset == 0)
- {
- m_color = data;
- }
- else
- {
- int r,g,b;
- m_generic_paletteram_8[m_color] = data;
-
- r = m_generic_paletteram_8[(m_color/3 * 3) + 0];
- g = m_generic_paletteram_8[(m_color/3 * 3) + 1];
- b = m_generic_paletteram_8[(m_color/3 * 3) + 2];
- r = (r << 2) | (r >> 4);
- g = (g << 2) | (g >> 4);
- b = (b << 2) | (b >> 4);
-
- m_palette->set_pen_color(m_color / 3, rgb_t(r, g, b));
- m_color = (m_color + 1) % (0x100 * 3);
- }
-}
-
-WRITE8_MEMBER(skylncr_state::skylncr_paletteram2_w)
-{
- if (offset == 0)
- {
- m_color2 = data;
- }
- else
- {
- int r,g,b;
- m_generic_paletteram2_8[m_color2] = data;
-
- r = m_generic_paletteram2_8[(m_color2/3 * 3) + 0];
- g = m_generic_paletteram2_8[(m_color2/3 * 3) + 1];
- b = m_generic_paletteram2_8[(m_color2/3 * 3) + 2];
- r = (r << 2) | (r >> 4);
- g = (g << 2) | (g >> 4);
- b = (b << 2) | (b >> 4);
-
- m_palette->set_pen_color(0x100 + m_color2 / 3, rgb_t(r, g, b));
- m_color2 = (m_color2 + 1) % (0x100 * 3);
- }
-}
-
WRITE8_MEMBER(skylncr_state::reelscroll1_w)
{
m_reelscroll1[offset] = data;
@@ -449,7 +394,7 @@ WRITE8_MEMBER(skylncr_state::reelscroll4_w)
WRITE8_MEMBER(skylncr_state::skylncr_coin_w)
{
machine().bookkeeping().coin_counter_w(0, data & 0x04);
- m_hopper->write(space, 0, (data & 0x20) ? 0x80 : 0);
+ m_hopper->motor_w(data & 0x20);
}
READ8_MEMBER(skylncr_state::ret_ff)
@@ -561,15 +506,20 @@ static ADDRESS_MAP_START( io_map_skylncr, AS_IO, 8, skylncr_state )
AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */
AM_RANGE(0x10, 0x13) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports */
- AM_RANGE(0x20, 0x20) AM_WRITE(skylncr_coin_w )
+ AM_RANGE(0x20, 0x20) AM_WRITE(skylncr_coin_w)
AM_RANGE(0x30, 0x31) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
AM_RANGE(0x31, 0x31) AM_DEVREAD("aysnd", ay8910_device, data_r)
- AM_RANGE(0x40, 0x41) AM_WRITE(skylncr_paletteram_w )
- AM_RANGE(0x50, 0x51) AM_WRITE(skylncr_paletteram2_w )
+ AM_RANGE(0x40, 0x40) AM_DEVWRITE("ramdac", ramdac_device, index_w)
+ AM_RANGE(0x41, 0x41) AM_DEVWRITE("ramdac", ramdac_device, pal_w)
+ AM_RANGE(0x42, 0x42) AM_DEVWRITE("ramdac", ramdac_device, mask_w)
- AM_RANGE(0x70, 0x70) AM_WRITE(skylncr_nmi_enable_w )
+ AM_RANGE(0x50, 0x50) AM_DEVWRITE("ramdac2", ramdac_device, index_w)
+ AM_RANGE(0x51, 0x51) AM_DEVWRITE("ramdac2", ramdac_device, pal_w)
+ AM_RANGE(0x52, 0x52) AM_DEVWRITE("ramdac2", ramdac_device, mask_w)
+
+ AM_RANGE(0x70, 0x70) AM_WRITE(skylncr_nmi_enable_w)
ADDRESS_MAP_END
@@ -585,6 +535,17 @@ static ADDRESS_MAP_START( bdream97_opcode_map, AS_DECRYPTED_OPCODES, 8, skylncr_
ADDRESS_MAP_END
+static ADDRESS_MAP_START( ramdac_map, AS_0, 8, skylncr_state )
+ AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
+ADDRESS_MAP_END
+
+
+static ADDRESS_MAP_START( ramdac2_map, AS_0, 8, skylncr_state )
+ AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac2", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
+ADDRESS_MAP_END
+
+
+
/***************************************
* Graphics Layouts *
***************************************/
@@ -1689,6 +1650,12 @@ static MACHINE_CONFIG_START( skylncr, skylncr_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", skylncr)
MCFG_PALETTE_ADD("palette", 0x200)
+ MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
+ MCFG_RAMDAC_COLOR_BASE(0)
+
+ MCFG_RAMDAC_ADD("ramdac2", ramdac2_map, "palette")
+ MCFG_RAMDAC_COLOR_BASE(0x100)
+
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("aysnd", AY8910, MASTER_CLOCK/8)
@@ -2007,12 +1974,6 @@ ROM_END
* Driver Init *
**********************************/
-DRIVER_INIT_MEMBER(skylncr_state, skylncr)
-{
- m_generic_paletteram_8.allocate(0x100 * 3);
- m_generic_paletteram2_8.allocate(0x100 * 3);
-}
-
DRIVER_INIT_MEMBER(skylncr_state, sonikfig)
/*
Encryption: For each 8 bytes group,
@@ -2043,9 +2004,6 @@ DRIVER_INIT_MEMBER(skylncr_state, sonikfig)
std::swap(ROM[x + 1], ROM[x + 4]);
std::swap(ROM[x + 3], ROM[x + 6]);
}
-
- m_generic_paletteram_8.allocate(0x100 * 3);
- m_generic_paletteram2_8.allocate(0x100 * 3);
}
@@ -2054,13 +2012,13 @@ DRIVER_INIT_MEMBER(skylncr_state, sonikfig)
****************************************************/
/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */
-GAME( 1995, skylncr, 0, skylncr, skylncr, skylncr_state, skylncr, ROT0, "Bordun International", "Sky Lancer (Bordun, version U450C)", 0 )
-GAME( 1995, butrfly, 0, skylncr, skylncr, skylncr_state, skylncr, ROT0, "Bordun International", "Butterfly Video Game (version U350C)", 0 )
-GAME( 1999, mbutrfly, 0, mbutrfly, mbutrfly, skylncr_state, skylncr, ROT0, "Bordun International", "Magical Butterfly (version U350C, protected)", 0 )
-GAME( 1995, madzoo, 0, skylncr, skylncr, skylncr_state, skylncr, ROT0, "Bordun International", "Mad Zoo (version U450C)", 0 )
-GAME( 1995, leader, 0, skylncr, leader, skylncr_state, skylncr, ROT0, "bootleg", "Leader (version Z 2E, Greece)", 0 )
-GAME( 199?, gallag50, 0, skylncr, gallag50, skylncr_state, skylncr, ROT0, "bootleg", "Gallag Video Game / Petalouda (Butterfly, x50)", 0 )
-GAME( 199?, neraidou, 0, neraidou, neraidou, skylncr_state, skylncr, ROT0, "bootleg", "Neraidoula (Fairy Butterfly)", 0 )
-GAME( 199?, sstar97, 0, sstar97, sstar97, skylncr_state, skylncr, ROT0, "Bordun International", "Super Star 97 / Ming Xing 97 (version V153B)", 0 )
-GAME( 1995, bdream97, 0, bdream97, skylncr, skylncr_state, skylncr, ROT0, "bootleg (KKK)", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
+GAME( 1995, skylncr, 0, skylncr, skylncr, driver_device, 0, ROT0, "Bordun International", "Sky Lancer (Bordun, version U450C)", 0 )
+GAME( 1995, butrfly, 0, skylncr, skylncr, driver_device, 0, ROT0, "Bordun International", "Butterfly Video Game (version U350C)", 0 )
+GAME( 1999, mbutrfly, 0, mbutrfly, mbutrfly, driver_device, 0, ROT0, "Bordun International", "Magical Butterfly (version U350C, protected)", 0 )
+GAME( 1995, madzoo, 0, skylncr, skylncr, driver_device, 0, ROT0, "Bordun International", "Mad Zoo (version U450C)", 0 )
+GAME( 1995, leader, 0, skylncr, leader, driver_device, 0, ROT0, "bootleg", "Leader (version Z 2E, Greece)", 0 )
+GAME( 199?, gallag50, 0, skylncr, gallag50, driver_device, 0, ROT0, "bootleg", "Gallag Video Game / Petalouda (Butterfly, x50)", 0 )
+GAME( 199?, neraidou, 0, neraidou, neraidou, driver_device, 0, ROT0, "bootleg", "Neraidoula (Fairy Butterfly)", 0 )
+GAME( 199?, sstar97, 0, sstar97, sstar97, driver_device, 0, ROT0, "Bordun International", "Super Star 97 / Ming Xing 97 (version V153B)", 0 )
+GAME( 1995, bdream97, 0, bdream97, skylncr, driver_device, 0, ROT0, "bootleg (KKK)", "Butterfly Dream 97 / Hudie Meng 97", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
GAME( 2000, sonikfig, 0, skylncr, sonikfig, skylncr_state, sonikfig, ROT0, "Z Games", "Sonik Fighter (version 02, encrypted)", MACHINE_WRONG_COLORS | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index 96d29d098f0..54de1dc057f 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -719,7 +719,7 @@ hand, always returning 0xf inbetween valid values confuses the game.
CUSTOM_INPUT_MEMBER(snk_state::gwar_rotary)
{
static const char *const ports[] = { "P1ROT", "P2ROT" };
- int which = (int)(FPTR)param;
+ int which = (int)(uintptr_t)param;
int value = ioport(ports[which])->read();
if ((m_last_value[which] == 0x5 && value == 0x6) || (m_last_value[which] == 0x6 && value == 0x5))
@@ -795,7 +795,7 @@ CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y)
CUSTOM_INPUT_MEMBER(snk_state::snk_bonus_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
switch (bit_mask)
{
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index 4938d92f65e..8b87ba5efb4 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -2788,7 +2788,7 @@ DRIVER_INIT_MEMBER(snowbros_state,4in1boot)
/* strange order */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
if (i&1) buffer[i] = BITSWAP8(src[i],6,7,5,4,3,2,1,0);
@@ -2802,7 +2802,7 @@ DRIVER_INIT_MEMBER(snowbros_state,4in1boot)
/* strange order */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
buffer[i] = src[i^0x4000];
@@ -2818,7 +2818,7 @@ DRIVER_INIT_MEMBER(snowbros_state,snowbro3)
/* strange order */
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
for (i = 0;i < len; i++)
buffer[i] = src[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,3,4,1,2,0)];
diff --git a/src/mame/drivers/socrates.cpp b/src/mame/drivers/socrates.cpp
index 6b2535e6fd4..3f660d21dc4 100644
--- a/src/mame/drivers/socrates.cpp
+++ b/src/mame/drivers/socrates.cpp
@@ -947,7 +947,7 @@ WRITE8_MEMBER( iqunlim_state::colors_w )
INPUT_CHANGED_MEMBER( iqunlim_state::send_input )
{
- UINT8 data = (UINT8)(FPTR)param;
+ UINT8 data = (UINT8)(uintptr_t)param;
if (newval)
{
diff --git a/src/mame/drivers/spacefb.cpp b/src/mame/drivers/spacefb.cpp
index a7641a58287..e34bd2b1b7e 100644
--- a/src/mame/drivers/spacefb.cpp
+++ b/src/mame/drivers/spacefb.cpp
@@ -244,7 +244,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( spacefb_audio_io_map, AS_IO, 8, spacefb_state )
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(audio_p2_r)
AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(audio_t0_r)
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(audio_t1_r)
diff --git a/src/mame/drivers/spaceg.cpp b/src/mame/drivers/spaceg.cpp
index 785d22f2de3..42c033cde7b 100644
--- a/src/mame/drivers/spaceg.cpp
+++ b/src/mame/drivers/spaceg.cpp
@@ -164,9 +164,8 @@ Notes:
**************************************************************************************/
#include "emu.h"
+#include "includes/mw8080bw.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
-#include "sound/sn76496.h"
/*************************************
@@ -185,7 +184,13 @@ public:
m_io9400(*this, "io9400"),
m_io9401(*this, "io9401"),
m_maincpu(*this, "maincpu"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_samples(*this, "samples"),
+ m_sn(*this, "snsnd"),
+ m_sound1(0),
+ m_sound2(0),
+ m_sound3(0)
+ { }
required_shared_ptr<UINT8> m_colorram;
required_shared_ptr<UINT8> m_videoram;
@@ -197,8 +202,27 @@ public:
UINT32 screen_update_spaceg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
+ required_device<samples_device> m_samples;
+ required_device<sn76477_device> m_sn;
+
+ DECLARE_WRITE8_MEMBER(sound1_w);
+ DECLARE_WRITE8_MEMBER(sound2_w);
+ DECLARE_WRITE8_MEMBER(sound3_w);
+ uint8_t m_sound1;
+ uint8_t m_sound2;
+ uint8_t m_sound3;
+
+protected:
+ virtual void driver_start() override;
};
+void spaceg_state::driver_start()
+{
+ save_item(NAME(m_sound1));
+ save_item(NAME(m_sound2));
+ save_item(NAME(m_sound3));
+}
+
/*************************************
*
* Video emulation
@@ -327,6 +351,62 @@ UINT32 spaceg_state::screen_update_spaceg(screen_device &screen, bitmap_ind16 &b
return 0;
}
+static const char *const invaders_sample_names[] =
+{
+ "*invaders",
+ "1", /* shot/missle */
+ "2", /* base hit/explosion */
+ "3", /* invader hit */
+ "4", /* fleet move 1 */
+ "5", /* fleet move 2 */
+ "6", /* fleet move 3 */
+ "7", /* fleet move 4 */
+ "8", /* UFO/saucer hit */
+ "9", /* bonus base */
+ nullptr
+};
+
+WRITE8_MEMBER(spaceg_state::sound1_w)
+{
+ if (!BIT(m_sound1, 1) && BIT(data, 1))
+ m_samples->start(1, 1); // Death
+
+ if (!BIT(m_sound1, 2) && BIT(data, 2))
+ m_samples->start(0, 0); // Shoot
+
+ m_sn->enable_w(!(data & 0x08)); // Boss
+
+ m_sound1 = data;
+
+ if (data & ~0x0e) logerror("spaceg sound3 unmapped %02x\n", data & ~0x0e);
+}
+
+WRITE8_MEMBER(spaceg_state::sound2_w)
+{
+ // game writes 0x01 at bootup & 0x11 when you start a game
+ m_sound2 = data;
+
+ if (data & ~0x11) logerror("spaceg sound2 unmapped %02x\n", data & ~0x11);
+}
+
+WRITE8_MEMBER(spaceg_state::sound3_w)
+{
+ if (!BIT(m_sound3, 0) && BIT(data, 0))
+ m_samples->start(4, 8); // Start of level
+
+ if (!BIT(m_sound3, 1) && BIT(data, 1))
+ m_samples->start(5, 8); // Rocket
+
+ if (!BIT(m_sound3, 2) && BIT(data, 2))
+ m_samples->start(2, 2); // Hit
+
+ if (!BIT(m_sound3, 3) && BIT(data, 3))
+ m_samples->start(3, 7); // Dive bomb
+
+ m_sound3 = data;
+
+ if (data & ~0x0f) logerror("spaceg sound3 unmapped %02x\n", data & ~0x0f);
+}
/*************************************
*
@@ -350,7 +430,10 @@ static ADDRESS_MAP_START( spaceg_map, AS_PROGRAM, 8, spaceg_state )
bit 3 is probably a flip screen
bit 7 - unknown - set to 1 during the gameplay (coinlock ?)
*/
- AM_RANGE(0x9402, 0x9407) AM_RAM /* surely wrong */
+ AM_RANGE(0x9402, 0x9402) AM_WRITENOP
+ AM_RANGE(0x9405, 0x9405) AM_WRITE(sound1_w)
+ AM_RANGE(0x9406, 0x9406) AM_WRITE(sound2_w)
+ AM_RANGE(0x9407, 0x9407) AM_WRITE(sound3_w)
AM_RANGE(0x9800, 0x9800) AM_READ_PORT("9800")
AM_RANGE(0x9801, 0x9801) AM_READ_PORT("9801")
@@ -432,19 +515,30 @@ static MACHINE_CONFIG_START( spaceg, spaceg_state )
MCFG_PALETTE_INIT_OWNER(spaceg_state, spaceg)
/* sound hardware */
-// MCFG_SPEAKER_STANDARD_MONO("mono")
-
-// MCFG_SOUND_ADD("sn1", SN76496, 15468480/4)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-// MCFG_SOUND_ADD("sn2", SN76496, 15468480/4)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-// MCFG_SOUND_ADD("sn3", SN76496, 15468480/4)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-// MCFG_DAC_ADD("dac")
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+
+ // HACK: SN76477 parameters copied from space invaders
+ MCFG_SOUND_ADD("snsnd", SN76477, 0)
+ MCFG_SN76477_NOISE_PARAMS(0, 0, 0) // noise + filter: N/C
+ MCFG_SN76477_DECAY_RES(0) // decay_res: N/C
+ MCFG_SN76477_ATTACK_PARAMS(0, RES_K(100)) // attack_decay_cap + attack_res
+ MCFG_SN76477_AMP_RES(RES_K(56)) // amplitude_res
+ MCFG_SN76477_FEEDBACK_RES(RES_K(10)) // feedback_res
+ MCFG_SN76477_VCO_PARAMS(0, CAP_U(0.1), RES_K(8.2)) // VCO volt + cap + res
+ MCFG_SN76477_PITCH_VOLTAGE(5.0) // pitch_voltage
+ MCFG_SN76477_SLF_PARAMS(CAP_U(1.0), RES_K(120)) // slf caps + res
+ MCFG_SN76477_ONESHOT_PARAMS(0, 0) // oneshot caps + res: N/C
+ MCFG_SN76477_VCO_MODE(1) // VCO mode
+ MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C
+ MCFG_SN76477_ENVELOPE_PARAMS(1, 0) // envelope 1, 2
+ MCFG_SN76477_ENABLE(1) // enable
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+
+ // HACK: samples copied from space invaders
+ MCFG_SOUND_ADD("samples", SAMPLES, 0)
+ MCFG_SAMPLES_CHANNELS(6)
+ MCFG_SAMPLES_NAMES(invaders_sample_names)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -481,4 +575,4 @@ ROM_END
*
*************************************/
-GAME( 1979, spaceg, 0, spaceg, spaceg, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Space Guerrilla", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1979, spaceg, 0, spaceg, spaceg, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Space Guerrilla", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/special.cpp b/src/mame/drivers/special.cpp
index 46a52a9ef8b..b4ce4e5ac49 100644
--- a/src/mame/drivers/special.cpp
+++ b/src/mame/drivers/special.cpp
@@ -9,8 +9,8 @@
****************************************************************************/
-
#include "includes/special.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
/* Address maps */
@@ -372,11 +372,13 @@ static MACHINE_CONFIG_START( special, special_state )
MCFG_PALETTE_ADD("palette", 2)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
/* Devices */
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
@@ -436,7 +438,7 @@ static MACHINE_CONFIG_DERIVED( specimx, special )
/* audio hardware */
MCFG_SOUND_ADD("custom", SPECIMX_SND, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* Devices */
MCFG_DEVICE_ADD( "pit8253", PIT8253, 0)
@@ -489,11 +491,13 @@ static MACHINE_CONFIG_START( erik, special_state )
MCFG_PALETTE_INIT_OWNER(special_state,erik)
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.0625)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
/* Devices */
MCFG_CASSETTE_ADD( "cassette" )
diff --git a/src/mame/drivers/speedbal.cpp b/src/mame/drivers/speedbal.cpp
index 354e0380446..0f92ffc75a1 100644
--- a/src/mame/drivers/speedbal.cpp
+++ b/src/mame/drivers/speedbal.cpp
@@ -293,7 +293,7 @@ DRIVER_INIT_MEMBER(speedbal_state,speedbal)
{
// sprite tiles are in an odd order, rearrange to simplify video drawing function
UINT8* rom = memregion("sprites")->base();
- dynamic_buffer temp(0x200*128);
+ std::vector<UINT8> temp(0x200*128);
for (int i=0;i<0x200;i++)
{
diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp
index 87a54f7daed..5b250ae5c65 100644
--- a/src/mame/drivers/sprint4.cpp
+++ b/src/mame/drivers/sprint4.cpp
@@ -21,7 +21,7 @@ Atari Sprint 4 driver
CUSTOM_INPUT_MEMBER(sprint4_state::get_lever)
{
- int n = (FPTR) param;
+ int n = (uintptr_t) param;
return 4 * m_gear[n] > m_da_latch;
}
@@ -29,7 +29,7 @@ CUSTOM_INPUT_MEMBER(sprint4_state::get_lever)
CUSTOM_INPUT_MEMBER(sprint4_state::get_wheel)
{
- int n = (FPTR) param;
+ int n = (uintptr_t) param;
return 8 * m_steer_FF1[n] + 8 * m_steer_FF2[n] > m_da_latch;
}
@@ -37,7 +37,7 @@ CUSTOM_INPUT_MEMBER(sprint4_state::get_wheel)
CUSTOM_INPUT_MEMBER(sprint4_state::get_collision)
{
- int n = (FPTR) param;
+ int n = (uintptr_t) param;
return m_collision[n];
}
diff --git a/src/mame/drivers/srmp6.cpp b/src/mame/drivers/srmp6.cpp
index 2ca8ab298f2..e09dfd951fe 100644
--- a/src/mame/drivers/srmp6.cpp
+++ b/src/mame/drivers/srmp6.cpp
@@ -620,8 +620,8 @@ static INPUT_PORTS_START( srmp6 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
PORT_BIT( 0x0180, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("DSW") /* 16-bit DSW1+DSW2 */
- PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) // DSW1
+ PORT_START("DSW") /* 16-bit DSW1 (0x0000) +DSW2 (0x0700) */
+ PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:1,2,3")
PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) )
@@ -630,22 +630,22 @@ static INPUT_PORTS_START( srmp6 )
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:5")
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused ) )
+ PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0000, "Re-Clothe" )
+ PORT_DIPNAME( 0x0040, 0x0000, "Re-Clothe" ) PORT_DIPLOCATION("DSW1:7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, "Nudity" )
+ PORT_DIPNAME( 0x0080, 0x0080, "Nudity" ) PORT_DIPLOCATION("DSW1:8")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
- PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Difficulty ) ) // DSW2
+ PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2,3")
PORT_DIPSETTING( 0x0000, "8" )
PORT_DIPSETTING( 0x0100, "7" )
PORT_DIPSETTING( 0x0200, "6" )
@@ -654,19 +654,19 @@ static INPUT_PORTS_START( srmp6 )
PORT_DIPSETTING( 0x0500, "2" )
PORT_DIPSETTING( 0x0600, "1" )
PORT_DIPSETTING( 0x0700, "4" )
- PORT_DIPNAME( 0x0800, 0x0000, "Kuitan" )
+ PORT_DIPNAME( 0x0800, 0x0000, "Kuitan" ) PORT_DIPLOCATION("DSW2:4")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0800, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Continues ) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Continues ) ) PORT_DIPLOCATION("DSW2:5")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x1000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x2000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
+ PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "DSW2:8" ) PORT_DIPLOCATION("DSW2:8")
INPUT_PORTS_END
/***************************************************************************
diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp
index b9b82319932..a36d8d09916 100644
--- a/src/mame/drivers/ssem.cpp
+++ b/src/mame/drivers/ssem.cpp
@@ -108,7 +108,7 @@ INPUT_CHANGED_MEMBER(ssem_state::panel_check)
UINT8 edit3_state = ioport("EDIT3")->read();
UINT8 misc_state = ioport("MISC")->read();
- switch( (int)(FPTR)param )
+ switch( (int)(uintptr_t)param )
{
case PANEL_BIT0:
if(edit0_state & 0x01) m_store[(m_store_line << 2) | 0] ^= 0x80;
diff --git a/src/mame/drivers/ssozumo.cpp b/src/mame/drivers/ssozumo.cpp
index 1f13c6b6138..ce6287a4948 100644
--- a/src/mame/drivers/ssozumo.cpp
+++ b/src/mame/drivers/ssozumo.cpp
@@ -10,11 +10,12 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04
***************************************************************************/
#include "emu.h"
+#include "includes/ssozumo.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6809/m6809.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/ssozumo.h"
+#include "sound/volt_reg.h"
void ssozumo_state::machine_start()
@@ -58,7 +59,7 @@ static ADDRESS_MAP_START( ssozumo_sound_map, AS_PROGRAM, 8, ssozumo_state )
AM_RANGE(0x0000, 0x01ff) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
- AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_signed8)
+ AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w)
AM_RANGE(0x2007, 0x2007) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x4000, 0xffff) AM_ROM
@@ -218,18 +219,19 @@ static MACHINE_CONFIG_START( ssozumo, ssozumo_state )
MCFG_PALETTE_INIT_OWNER(ssozumo_state, ssozumo)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("ay2", AY8910, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ssystem3.cpp b/src/mame/drivers/ssystem3.cpp
index 03240af22b5..96a26c41cce 100644
--- a/src/mame/drivers/ssystem3.cpp
+++ b/src/mame/drivers/ssystem3.cpp
@@ -39,7 +39,6 @@ backup of playfield rom and picture/description of its board
#include "includes/ssystem3.h"
#include "cpu/m6502/m6502.h"
-#include "sound/dac.h"
// in my opinion own cpu to display lcd field and to handle own buttons
@@ -304,11 +303,6 @@ static MACHINE_CONFIG_START( ssystem3, ssystem3_state )
MCFG_PALETTE_ADD("palette", 242 + 32768)
MCFG_PALETTE_INIT_OWNER(ssystem3_state, ssystem3)
- /* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-
/* via */
MCFG_DEVICE_ADD("via6522_0", VIA6522, 0)
MCFG_VIA6522_READPA_HANDLER(READ8(ssystem3_state,ssystem3_via_read_a))
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 94244301f7c..efaa4fbbeae 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -57,16 +57,19 @@
/*
-I/O overview:
- PORT-A 1st player inputs
- PORT-B 2nd player inputs
- PORT-C system input
- PORT-D system output
- PORT-E I/O 1
- PORT-F I/O 2
- PORT-G I/O 3
- PORT-AD AD-Stick inputs?
- SERIAL COM
+I/O overview: Connector (as described in service manual)
+ PORT-A 1st player inputs JAMMA (56P)
+ PORT-B 2nd player inputs JAMMA (56P)
+ PORT-C system input JAMMA (56P)
+ PORT-D system output JAMMA (56P) + CN25 (JST NH 5P) RESERVED OUTPUT 4bit. (?)
+ PORT-E I/O 1 CN32 (JST NH 9P) EXTENSION I/O 8bit.
+ PORT-F I/O 2 CN21 (JST NH 11P) EXTENSION I/O 8bit.
+ PORT-G I/O 3 CN20 (JST HN 10P) EXTENSION INPUT 8bit. (?)
+ PORT-AD AD-Stick inputs? CN19 (JST NH 12P) A/D INPUT 8Ch.
+ SERIAL COM CN18 (JST NH 6P) SERIAL COMMUNICATION
+ ??? CN22 (JST NH 3P) MIDI OUT
+ ??? CN27 (JST NH 3P) LIGHT GUN TRIGGER
+ ??? CN24 (JST NH 4P) AUDIO LINE OUTPUT
offsets:
0x0001 PORT-A (P1)
@@ -94,11 +97,11 @@ READ8_MEMBER(stv_state::stv_ioga_r)
UINT8 res;
res = 0xff;
- offset &= 0x1f; // mirror?
-
if(offset & 0x20 && !space.debugger_access())
printf("Reading from mirror %08x?\n",offset);
+ offset &= 0x1f; // mirror?
+
switch(offset)
{
case 0x01: res = ioport("PORTA")->read(); break; // P1
@@ -115,10 +118,10 @@ READ8_MEMBER(stv_state::stv_ioga_r)
WRITE8_MEMBER(stv_state::stv_ioga_w)
{
- offset &= 0x1f; // mirror?
-
if(offset & 0x20 && !space.debugger_access())
- printf("Reading from mirror %08x?\n",offset);
+ printf("Writing to mirror %08x %02x?\n",offset,data);
+
+ offset &= 0x1f; // mirror?
switch(offset)
{
@@ -993,7 +996,7 @@ static MACHINE_CONFIG_START( stv, stv_state )
MCFG_MACHINE_START_OVERRIDE(stv_state,stv)
MCFG_MACHINE_RESET_OVERRIDE(stv_state,stv)
- MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") /* Actually 93c45 */
+ MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") /* Actually AK93C45F */
MCFG_TIMER_DRIVER_ADD("sector_timer", stv_state, stv_sector_cb)
MCFG_TIMER_DRIVER_ADD("sh1_cmd", stv_state, stv_sh1_sim)
@@ -1784,6 +1787,7 @@ epr-17951a - Japan STVB1.13J0950425 95/04/25 v1.13
epr-17952a - USA STVB1.13U0950425 95/04/25 v1.13
epr-17953a - Taiwan STVB1.13T0950425 95/04/25 v1.13
epr-17954a - Europe STVB1.13E0950425 95/04/25 v1.13
+epr-19854 - Taiwan STVB1.14T0970515 97/05/15 v1.14
epr-18343 - ????? STVB1.30S0950727 95/07/27 v1.30 - Special version used on Sports Fishing 2 (CD based)
epr-19730 - Japan PCD11.13J0970217 97/02/17 v1.13 - Enhanced version for CD based units?
@@ -1823,14 +1827,16 @@ ROM_LOAD16_WORD_SWAP_BIOS( x, "saturn.bin", 0x000000, 0x080000, CRC(653ff2d8) SH
ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-17954a.ic8", 0x000000, 0x080000, CRC(f7722da3) SHA1(af79cff317e5b57d49e463af16a9f616ed1eee08) ) \
ROM_SYSTEM_BIOS( 6, "us", "EPR-17952A (USA 95/04/25)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-17952a.ic8", 0x000000, 0x080000, CRC(d1be2adf) SHA1(eaf1c3e5d602e1139d2090a78d7e19f04f916794) ) \
- ROM_SYSTEM_BIOS( 7, "tw", "EPR-17953A (Taiwan 95/04/25)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-17953a.ic8", 0x000000, 0x080000, CRC(a4c47570) SHA1(9efc73717ec8a13417e65c54344ded9fc25bf5ef) ) \
- ROM_SYSTEM_BIOS( 8, "tw1", "STVB1.11T (Taiwan 95/02/20)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 8, "stvb111t.ic8", 0x000000, 0x080000, CRC(02daf123) SHA1(23185beb1ce9c09b8719e57d1adb7b28c8141fd5) ) \
- ROM_SYSTEM_BIOS( 9, "debug", "Debug (95/01/13)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 9, "stv110.bin", 0x000000, 0x080000, CRC(3dfeda92) SHA1(8eb33192a57df5f3a1dfb57263054867c6b2db6d) ) \
- ROM_SYSTEM_BIOS( 10, "dev", "Development (bios 1.061)" ) \
- ROM_LOAD16_WORD_SWAP_BIOS( 10, "stv1061.bin", 0x000000, 0x080000, CRC(728dbca3) SHA1(0ed2030177f0aa8285645c395ae9ad9f568ab1d6) ) \
+ ROM_SYSTEM_BIOS( 7, "tw", "EPR-19854 (Taiwan 97/05/15)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-19854.ic8", 0x000000, 0x080000, CRC(e09d1f60) SHA1(b55cdcb45b2a5b0b35e352cf7625f0bd659084df) ) \
+ ROM_SYSTEM_BIOS( 8, "tw1", "EPR-17953A (Taiwan 95/04/25)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-17953a.ic8", 0x000000, 0x080000, CRC(a4c47570) SHA1(9efc73717ec8a13417e65c54344ded9fc25bf5ef) ) \
+ ROM_SYSTEM_BIOS( 9, "tw2", "STVB1.11T (Taiwan 95/02/20)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 9, "stvb111t.ic8", 0x000000, 0x080000, CRC(02daf123) SHA1(23185beb1ce9c09b8719e57d1adb7b28c8141fd5) ) \
+ ROM_SYSTEM_BIOS( 10, "debug","Debug (95/01/13)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 10, "stv110.bin", 0x000000, 0x080000, CRC(3dfeda92) SHA1(8eb33192a57df5f3a1dfb57263054867c6b2db6d) ) \
+ ROM_SYSTEM_BIOS( 11, "dev", "Development (bios 1.061)" ) \
+ ROM_LOAD16_WORD_SWAP_BIOS( 11, "stv1061.bin", 0x000000, 0x080000, CRC(728dbca3) SHA1(0ed2030177f0aa8285645c395ae9ad9f568ab1d6) ) \
\
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */ \
ROM_COPY( "maincpu",0,0,0x080000) \
@@ -2969,6 +2975,28 @@ ROM_START( micrombc ) // set to 1p
ROM_LOAD( "micrombc.nv", 0x0000, 0x0080, CRC(6e89815f) SHA1(4478f614fb61859f4ee7bf55462f737387887e6f) )
ROM_END
+ROM_START( choroqhr ) // set to 1p
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
+ ROM_LOAD16_WORD_SWAP( "ic22.bin", 0x0200000, 0x200000, CRC(fd04598b) SHA1(4797127869fafae0ecfddc07b1c1325b11ca981a) )
+ ROM_LOAD16_WORD_SWAP( "ic24.bin", 0x0400000, 0x200000, CRC(09b8a154) SHA1(cfd212c6fe6188b9c665650b21f2fd80cd65268f) )
+ ROM_LOAD16_WORD_SWAP( "ic26.bin", 0x0600000, 0x200000, CRC(136ca5e9) SHA1(8697a415d0958e58f5cea5dcc767dd6a4cbdef5c) )
+ ROM_LOAD16_WORD_SWAP( "ic28.bin", 0x0800000, 0x200000, CRC(3c949563) SHA1(ab2a9f9ec23071cc236dee945b436a9cd73efb92) )
+ ROM_LOAD16_WORD_SWAP( "ic30.bin", 0x0a00000, 0x200000, CRC(7e93078d) SHA1(10fa99029a3e741ea0fddcf00ee07b5fd039bf19) )
+ ROM_LOAD16_WORD_SWAP( "ic32.bin", 0x0c00000, 0x200000, BAD_DUMP CRC(d311c5f6) SHA1(c210463ae5b4bcc498de786e05dec245c0d3b46e) ) // ic7 bad
+ //ROM_LOAD16_WORD_SWAP( "ic32.bad2.bin", 0x000000, 0x200000, CRC(76709d73) SHA1(a7805e956ee1a3701a803d0af082c33c89c26c3a) )
+ //ROM_LOAD16_WORD_SWAP( "ic32.bad3.bin", 0x000000, 0x200000, CRC(b873cf3e) SHA1(8ed42a229e416125d7a2359faaea17208324feb0) )
+ //ROM_LOAD16_WORD_SWAP( "ic32.bad4.bin", 0x000000, 0x200000, CRC(ed808ad4) SHA1(b00791ec3ee6255bccde171279a1a14e322d0e6d) )
+ //ROM_LOAD16_WORD_SWAP( "ic32.bad5.bin", 0x000000, 0x200000, CRC(ed808ad4) SHA1(b00791ec3ee6255bccde171279a1a14e322d0e6d) )
+ //ROM_LOAD16_WORD_SWAP( "ic32.bad6.bin", 0x000000, 0x200000, CRC(ed808ad4) SHA1(b00791ec3ee6255bccde171279a1a14e322d0e6d) )
+ ROM_LOAD16_WORD_SWAP( "ic34.bin", 0x0e00000, 0x200000, CRC(be2ed0a0) SHA1(a9225ba6b78fa0119fc6484828f4d4cc6ea05d8f) )
+ ROM_LOAD16_WORD_SWAP( "ic36.bin", 0x1000000, 0x200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) )
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
+ ROM_LOAD( "choroqhr.nv", 0x0000, 0x0080, CRC(69a71aea) SHA1(08ca9cd70fa3fa6c3156edd966a81244bad5f0c2) )
+ROM_END
+
ROM_START( pclub2 ) // set to 1p / runs with the USA bios
STV_BIOS
ROM_DEFAULT_BIOS( "us" )
@@ -3612,6 +3640,7 @@ GAME( 1998, twsoc98, twcup98, stv_5881, stv, stv_state, twcup98, ROT
GAME( 1996, magzun, stvbios, stv, stv, stv_state, magzun, ROT0, "Sega", "Magical Zunou Power (J 961031 V1.000)", MACHINE_NOT_WORKING | MACHINE_NODEVICE_MICROPHONE )
GAME( 1997, techbowl, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Technical Bowling (J 971212 V1.000)", MACHINE_NOT_WORKING )
GAME( 1999, micrombc, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Microman Battle Charge (J 990326 V1.000)", MACHINE_NOT_WORKING )
+GAME( 1998, choroqhr, stvbios, stv, stv, stv_state, stv, ROT0, "Sega / Takara", "Choro Q Hyper Racing 5 (J 981230 V1.000)", MACHINE_NOT_WORKING )
/* CD games */
GAME( 1995, sfish2, 0, stv, stv, stv_state, stv, ROT0, "Sega", "Sport Fishing 2 (UET 951106 V1.10e)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/suna16.cpp b/src/mame/drivers/suna16.cpp
index e32d00c6f16..b690876c05c 100644
--- a/src/mame/drivers/suna16.cpp
+++ b/src/mame/drivers/suna16.cpp
@@ -25,12 +25,14 @@ Year + Game By Board Hardware
***************************************************************************/
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/suna16.h"
#include "cpu/m68000/m68000.h"
-#include "sound/ym2151.h"
-#include "sound/ay8910.h"
+#include "cpu/z80/z80.h"
#include "sound/3526intf.h"
-#include "includes/suna16.h"
+#include "sound/ay8910.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "sound/ym2151.h"
/***************************************************************************
@@ -332,38 +334,19 @@ ADDRESS_MAP_END
-/* 2 DACs per CPU - 4 bits per sample */
-
-WRITE8_MEMBER(suna16_state::DAC1_w)
-{
- m_dac1->write_unsigned8( (data & 0xf) * 0x11 );
-}
-WRITE8_MEMBER(suna16_state::DAC2_w)
-{
- m_dac2->write_unsigned8( (data & 0xf) * 0x11 );
-}
-WRITE8_MEMBER(suna16_state::bssoccer_DAC3_w)
-{
- m_dac3->write_unsigned8( (data & 0xf) * 0x11 );
-}
-WRITE8_MEMBER(suna16_state::bssoccer_DAC4_w)
-{
- m_dac4->write_unsigned8( (data & 0xf) * 0x11 );
-}
-
static ADDRESS_MAP_START( bssoccer_pcm_1_io_map, AS_IO, 8, suna16_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch2", generic_latch_8_device, read) // From The Sound Z80
- AM_RANGE(0x00, 0x00) AM_WRITE(DAC1_w) // 2 x DAC
- AM_RANGE(0x01, 0x01) AM_WRITE(DAC2_w) // 2 x DAC
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("ldac", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("rdac", dac_byte_interface, write)
AM_RANGE(0x03, 0x03) AM_WRITE(bssoccer_pcm_1_bankswitch_w) // Rom Bank
ADDRESS_MAP_END
static ADDRESS_MAP_START( bssoccer_pcm_2_io_map, AS_IO, 8, suna16_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch3", generic_latch_8_device, read) // From The Sound Z80
- AM_RANGE(0x00, 0x00) AM_WRITE(bssoccer_DAC3_w) // 2 x DAC
- AM_RANGE(0x01, 0x01) AM_WRITE(bssoccer_DAC4_w) // 2 x DAC
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("ldac2", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("rdac2", dac_byte_interface, write)
AM_RANGE(0x03, 0x03) AM_WRITE(bssoccer_pcm_2_bankswitch_w) // Rom Bank
ADDRESS_MAP_END
@@ -391,8 +374,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( uballoon_pcm_1_io_map, AS_IO, 8, suna16_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch2", generic_latch_8_device, read) // From The Sound Z80
- AM_RANGE(0x00, 0x00) AM_WRITE(DAC1_w) // 2 x DAC
- AM_RANGE(0x01, 0x01) AM_WRITE(DAC2_w) // 2 x DAC
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("ldac", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("rdac", dac_byte_interface, write)
AM_RANGE(0x03, 0x03) AM_WRITE(uballoon_pcm_1_bankswitch_w) // Rom Bank
ADDRESS_MAP_END
@@ -421,8 +404,10 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( bestbest_pcm_1_iomap, AS_IO, 8, suna16_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch2", generic_latch_8_device, read) // From The Sound Z80
- AM_RANGE(0x00, 0x00) AM_MIRROR(0x02) AM_WRITE(DAC1_w) // 2 x DAC
- AM_RANGE(0x01, 0x01) AM_MIRROR(0x02) AM_WRITE(DAC2_w) // 2 x DAC
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("ldac", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("rdac", dac_byte_interface, write)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("ldac2", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("rdac2", dac_byte_interface, write)
ADDRESS_MAP_END
/***************************************************************************
@@ -851,20 +836,18 @@ static MACHINE_CONFIG_START( bssoccer, suna16_state )
MCFG_GENERIC_LATCH_8_ADD("soundlatch3")
MCFG_YM2151_ADD("ymsnd", XTAL_14_31818MHz/4) /* 3.579545MHz */
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
+ MCFG_SOUND_ROUTE(0, "lspeaker", 0.2)
+ MCFG_SOUND_ROUTE(1, "rspeaker", 0.2)
+
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -917,11 +900,11 @@ static MACHINE_CONFIG_START( uballoon, suna16_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
@@ -973,11 +956,11 @@ static MACHINE_CONFIG_START( sunaq, suna16_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
@@ -1038,17 +1021,15 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2) // unknown DAC
+ MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp
index 9c129a5174a..114ab90e917 100644
--- a/src/mame/drivers/suna8.cpp
+++ b/src/mame/drivers/suna8.cpp
@@ -8,7 +8,7 @@
Main CPU: Encrypted Z80 (Epoxy Module)
-Sound CPU: Z80 [Music] + Z80 [8 Bit PCM, Optional]
+Sound CPU: Z80 [Music] + Z80 [4 Bit PCM, Optional]
Sound Chips: AY8910 + YM3812/YM2203 + DAC x 4 [Optional] + Samples [Optional]
@@ -36,13 +36,14 @@ Notes:
***************************************************************************/
#include "emu.h"
+#include "includes/suna8.h"
#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
-#include "sound/ay8910.h"
#include "sound/2203intf.h"
#include "sound/3812intf.h"
+#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/suna8.h"
+#include "sound/volt_reg.h"
#define SUNA8_MASTER_CLOCK XTAL_24MHz
@@ -1307,17 +1308,13 @@ static ADDRESS_MAP_START( brickzn_pcm_map, AS_PROGRAM, 8, suna8_state )
ADDRESS_MAP_END
-WRITE8_MEMBER(suna8_state::brickzn_pcm_w)
-{
- static const char *const dacs[] = { "dac1", "dac2", "dac3", "dac4" };
- machine().device<dac_device>(dacs[offset & 3])->write_signed8( (data & 0xf) * 0x11 );
-}
-
-
static ADDRESS_MAP_START( brickzn_pcm_io_map, AS_IO, 8, suna8_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_DEVREAD("soundlatch2", generic_latch_8_device, read) // From Sound CPU
- AM_RANGE(0x00, 0x03) AM_WRITE(brickzn_pcm_w ) // 4 x DAC
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("ldac", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("rdac", dac_byte_interface, write)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("ldac2", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("rdac2", dac_byte_interface, write)
ADDRESS_MAP_END
/***************************************************************************
@@ -1898,23 +1895,23 @@ static MACHINE_CONFIG_START( hardhead, suna8_state )
MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(suna8_state, sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -1957,7 +1954,7 @@ static MACHINE_CONFIG_START( rranger, suna8_state )
MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
@@ -1965,15 +1962,15 @@ static MACHINE_CONFIG_START( rranger, suna8_state )
MCFG_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 16) /* verified on pcb */
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, rranger_play_samples_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9)
MCFG_SOUND_ADD("ym2", YM2203, SUNA8_MASTER_CLOCK / 16) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.9)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(suna8_state, sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -2026,29 +2023,27 @@ static MACHINE_CONFIG_START( brickzn11, suna8_state )
MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_brickzn)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8) // 3MHz (measured)
MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16) // 1.5MHz (measured)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.17)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.17)
-
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.17)
-
- MCFG_DAC_ADD("dac4")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.17)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.33)
+
+ MCFG_SOUND_ADD("ldac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC
+ MCFG_SOUND_ADD("ldac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC
+ MCFG_SOUND_ADD("rdac2", DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.17) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "ldac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( brickzn, brickzn11 )
@@ -2139,23 +2134,23 @@ static MACHINE_CONFIG_START( starfigh, suna8_state )
MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_starfigh)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(suna8_state, sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
@@ -2193,23 +2188,23 @@ static MACHINE_CONFIG_START( sparkman, suna8_state )
MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_sparkman)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_GENERIC_LATCH_8_ADD("soundlatch2")
MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(suna8_state, suna8_play_samples_w)) // two sample roms
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(suna8_state, suna8_samples_number_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(suna8_state, sh_start)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp
index d233790e0c3..110d492f90e 100644
--- a/src/mame/drivers/super80.cpp
+++ b/src/mame/drivers/super80.cpp
@@ -605,25 +605,25 @@ static const gfx_layout super80v_charlayout =
};
static GFXDECODE_START( super80 )
- GFXDECODE_ENTRY( "chargen", 0x0000, super80_charlayout, 0, 1 )
+ GFXDECODE_ENTRY( "chargen", 0x0000, super80_charlayout, 16, 1 )
GFXDECODE_END
static GFXDECODE_START( super80d )
- GFXDECODE_ENTRY( "chargen", 0x0000, super80d_charlayout, 0, 1 )
+ GFXDECODE_ENTRY( "chargen", 0x0000, super80d_charlayout, 16, 1 )
GFXDECODE_END
static GFXDECODE_START( super80e )
- GFXDECODE_ENTRY( "chargen", 0x0000, super80e_charlayout, 0, 1 )
+ GFXDECODE_ENTRY( "chargen", 0x0000, super80e_charlayout, 16, 1 )
GFXDECODE_END
static GFXDECODE_START( super80m )
- GFXDECODE_ENTRY( "chargen", 0x0000, super80e_charlayout, 0, 8 )
- GFXDECODE_ENTRY( "chargen", 0x1000, super80d_charlayout, 0, 8 )
+ GFXDECODE_ENTRY( "chargen", 0x0000, super80e_charlayout, 2, 6 )
+ GFXDECODE_ENTRY( "chargen", 0x1000, super80d_charlayout, 2, 6 )
GFXDECODE_END
/* This will show the 128 characters in the ROM + whatever happens to be in the PCG */
static GFXDECODE_START( super80v )
- GFXDECODE_ENTRY( "maincpu", 0xf000, super80v_charlayout, 0, 8 )
+ GFXDECODE_ENTRY( "maincpu", 0xf000, super80v_charlayout, 2, 6 )
GFXDECODE_END
diff --git a/src/mame/drivers/supracan.cpp b/src/mame/drivers/supracan.cpp
index 1b7c07036cc..bff1ed72fd6 100644
--- a/src/mame/drivers/supracan.cpp
+++ b/src/mame/drivers/supracan.cpp
@@ -165,7 +165,7 @@ public:
emu_timer *m_line_on_timer;
emu_timer *m_line_off_timer;
- dynamic_buffer m_vram_addr_swapped;
+ std::vector<UINT8> m_vram_addr_swapped;
UINT16 *m_pram;
diff --git a/src/mame/drivers/tagteam.cpp b/src/mame/drivers/tagteam.cpp
index dab1d7a459c..cc593cfd304 100644
--- a/src/mame/drivers/tagteam.cpp
+++ b/src/mame/drivers/tagteam.cpp
@@ -27,11 +27,11 @@ TODO:
***************************************************************************/
#include "emu.h"
+#include "includes/tagteam.h"
#include "cpu/m6502/m6502.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/tagteam.h"
-
+#include "sound/volt_reg.h"
void tagteam_state::machine_start()
{
@@ -73,7 +73,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tagteam_state )
AM_RANGE(0x0000, 0x03ff) AM_RAM
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
- AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w)
AM_RANGE(0x2007, 0x2007) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x4000, 0xffff) AM_ROM
@@ -234,18 +234,19 @@ static MACHINE_CONFIG_START( tagteam, tagteam_state )
MCFG_PALETTE_INIT_OWNER(tagteam_state, tagteam)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/taito.cpp b/src/mame/drivers/taito.cpp
index d079a1ddf9f..80149f34436 100644
--- a/src/mame/drivers/taito.cpp
+++ b/src/mame/drivers/taito.cpp
@@ -41,13 +41,15 @@ ToDO:
*****************************************************************************************/
-#include "machine/genpin.h"
+#include "emu.h"
#include "cpu/i8085/i8085.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
+#include "machine/genpin.h"
#include "sound/ay8910.h"
-#include "sound/votrax.h"
#include "sound/dac.h"
+#include "sound/votrax.h"
+#include "sound/volt_reg.h"
#include "taito.lh"
class taito_state : public genpin_class
@@ -332,13 +334,14 @@ static MACHINE_CONFIG_START( taito, taito_state )
/* Sound */
MCFG_FRAGMENT_ADD( genpin_audio )
- MCFG_SPEAKER_STANDARD_MONO("dacsnd")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "dacsnd", 0.95)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.475) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD("pia", PIA6821, 0)
//MCFG_PIA_READPA_HANDLER(READ8(taito_state, pia_pa_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_READPB_HANDLER(READ8(taito_state, pia_pb_r))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(taito_state, pia_pb_w))
//MCFG_PIA_CA2_HANDLER(WRITELINE(taito_state, pia_ca2_w))
@@ -368,16 +371,8 @@ static MACHINE_CONFIG_DERIVED( taito4, taito )
MCFG_VOTRAX_SC01_REQUEST_CB(WRITELINE(taito_state, votrax_request))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "voxsnd", 0.15) // todo: fix - it makes noise continuously
- MCFG_DEVICE_REMOVE("pia")
- MCFG_DEVICE_ADD("pia", PIA6821, 0)
- //MCFG_PIA_READPA_HANDLER(READ8(taito_state, pia_pa_r))
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8))
- MCFG_PIA_READPB_HANDLER(READ8(taito_state, pia_pb_r))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(taito_state, pia_pb_w))
- //MCFG_PIA_CA2_HANDLER(WRITELINE(taito_state, pia_ca2_w))
+ MCFG_DEVICE_MODIFY("pia")
MCFG_PIA_CB2_HANDLER(WRITELINE(taito_state, pia_cb2_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE("audiocpu", M6802_IRQ_LINE))
MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( taito_ay_audio )
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 1df78f00958..72eec9fcdbd 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -45,7 +45,7 @@
CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r)
{
- int num = (FPTR)param;
+ int num = (uintptr_t)param;
int data = m_dial[num]->read();
return ((data & 0xf)<<12) | ((data & 0xff0)>>4);
}
@@ -53,7 +53,7 @@ CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r)
CUSTOM_INPUT_MEMBER(taito_f3_state::f3_coin_r)
{
- int num = (FPTR)param;
+ int num = (uintptr_t)param;
return m_coin_word[num];
}
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index 04a5f702d32..75c0f6117e3 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -166,10 +166,10 @@ TODO:
***************************************************************************/
#include "emu.h"
+#include "includes/taitosj.h"
#include "cpu/z80/z80.h"
#include "cpu/m6805/m6805.h"
#include "machine/watchdog.h"
-#include "includes/taitosj.h"
WRITE8_MEMBER(taitosj_state::taitosj_sndnmi_msk_w)
@@ -268,7 +268,7 @@ CUSTOM_INPUT_MEMBER(taitosj_state::kikstart_gear_r)
{
const char *port_tag;
- int player = (int)(FPTR)param;
+ int player = (int)(uintptr_t)param;
if (player == 0)
port_tag = "GEARP1";
@@ -1726,38 +1726,25 @@ static GFXDECODE_START( taitosj )
GFXDECODE_ENTRY( nullptr, 0xa800, spritelayout, 0, 8 ) /* the game dynamically modifies this */
GFXDECODE_END
-
-static const UINT8 voltable[256] =
+static const discrete_dac_r1_ladder taitosj_dacvol_ladder =
{
- 0xff,0xfe,0xfc,0xfb,0xf9,0xf7,0xf6,0xf4,0xf3,0xf2,0xf1,0xef,0xee,0xec,0xeb,0xea,
- 0xe8,0xe7,0xe5,0xe4,0xe2,0xe1,0xe0,0xdf,0xde,0xdd,0xdc,0xdb,0xd9,0xd8,0xd7,0xd6,
- 0xd5,0xd4,0xd3,0xd2,0xd1,0xd0,0xcf,0xce,0xcd,0xcc,0xcb,0xca,0xc9,0xc8,0xc7,0xc6,
- 0xc5,0xc4,0xc3,0xc2,0xc1,0xc0,0xbf,0xbf,0xbe,0xbd,0xbc,0xbb,0xba,0xba,0xb9,0xb8,
- 0xb7,0xb7,0xb6,0xb5,0xb4,0xb3,0xb3,0xb2,0xb1,0xb1,0xb0,0xaf,0xae,0xae,0xad,0xac,
- 0xab,0xaa,0xaa,0xa9,0xa8,0xa8,0xa7,0xa6,0xa6,0xa5,0xa5,0xa4,0xa3,0xa2,0xa2,0xa1,
- 0xa1,0xa0,0xa0,0x9f,0x9e,0x9e,0x9d,0x9d,0x9c,0x9c,0x9b,0x9b,0x9a,0x99,0x99,0x98,
- 0x97,0x97,0x96,0x96,0x95,0x95,0x94,0x94,0x93,0x93,0x92,0x92,0x91,0x91,0x90,0x90,
- 0x8b,0x8b,0x8a,0x8a,0x89,0x89,0x89,0x88,0x88,0x87,0x87,0x87,0x86,0x86,0x85,0x85,
- 0x84,0x84,0x83,0x83,0x82,0x82,0x82,0x81,0x81,0x81,0x80,0x80,0x7f,0x7f,0x7f,0x7e,
- 0x7e,0x7e,0x7d,0x7d,0x7c,0x7c,0x7c,0x7b,0x7b,0x7b,0x7a,0x7a,0x7a,0x79,0x79,0x79,
- 0x78,0x78,0x77,0x77,0x77,0x76,0x76,0x76,0x75,0x75,0x75,0x74,0x74,0x74,0x73,0x73,
- 0x73,0x73,0x72,0x72,0x72,0x71,0x71,0x71,0x70,0x70,0x70,0x70,0x6f,0x6f,0x6f,0x6e,
- 0x6e,0x6e,0x6d,0x6d,0x6d,0x6c,0x6c,0x6c,0x6c,0x6b,0x6b,0x6b,0x6b,0x6a,0x6a,0x6a,
- 0x6a,0x69,0x69,0x69,0x68,0x68,0x68,0x68,0x68,0x67,0x67,0x67,0x66,0x66,0x66,0x66,
- 0x65,0x65,0x65,0x65,0x64,0x64,0x64,0x64,0x64,0x63,0x63,0x63,0x63,0x62,0x62,0x62,
+ 8, // size of ladder
+ { RES_K(680), RES_K(330), RES_K(150), RES_K(82), RES_K(39), RES_K(20), RES_K(10), RES_K(4.7) },
+ 0,
+ 0, // no rBias
+ 0, // no rGnd
+ 0 // no cap
};
+DISCRETE_SOUND_START(taitosj_dacvol)
+ DISCRETE_INPUT_DATA(NODE_01)
+ DISCRETE_DAC_R1(NODE_02, NODE_01, DEFAULT_TTL_V_LOGIC_1, &taitosj_dacvol_ladder)
+ DISCRETE_OUTPUT(NODE_02, 9637)
+DISCRETE_SOUND_END
-WRITE8_MEMBER(taitosj_state::dac_out_w)
-{
- m_dac_out = data - 0x80;
- m_dac->write_signed16(m_dac_out * m_dac_vol + 0x8000);
-}
-
-WRITE8_MEMBER(taitosj_state::dac_vol_w)
+WRITE8_MEMBER(taitosj_state::taitosj_dacvol_w)
{
- m_dac_vol = voltable[data];
- m_dac->write_signed16(m_dac_out * m_dac_vol + 0x8000);
+ m_dacvol->write(space, NODE_01, data ^ 0xff); // 7416 hex inverter
}
static MACHINE_CONFIG_START( nomcu, taitosj_state )
@@ -1790,25 +1777,25 @@ static MACHINE_CONFIG_START( nomcu, taitosj_state )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ay1", AY8910, XTAL_6MHz/4) // 6mhz/4 on GAME board, AY-3-8910 @ IC53 (this is the only AY which uses proper mixing resistors, the 3 below have outputs tied together)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay2", AY8910, XTAL_6MHz/4) // 6mhz/4 on GAME board, AY-3-8910 @ IC51
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
- MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitosj_state, dac_out_w)) /* port Awrite */
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitosj_state, dac_vol_w)) /* port Bwrite */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write))
+ MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitosj_state, taitosj_dacvol_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay3", AY8910, XTAL_6MHz/4) // 6mhz/4 on GAME board, AY-3-8910 @ IC49
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(taitosj_state, input_port_4_f0_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15)
MCFG_SOUND_ADD("ay4", AY8910, XTAL_6MHz/4) // 6mhz/4 on GAME board, AY-3-8910 @ IC50
MCFG_AY8910_OUTPUT_TYPE(AY8910_SINGLE_OUTPUT)
@@ -1819,13 +1806,14 @@ static MACHINE_CONFIG_START( nomcu, taitosj_state )
Bio Attack uses this?
*/
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(taitosj_state, taitosj_sndnmi_msk_w)) /* port Bwrite */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 30k r-2r network
+ MCFG_SOUND_ADD("dacvol", DISCRETE, 0) MCFG_DISCRETE_INTF(taitosj_dacvol)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -2790,8 +2778,6 @@ void taitosj_state::reset_common()
/* start in 1st gear */
m_kikstart_gears[0] = 0x02;
m_kikstart_gears[1] = 0x02;
- m_dac_out = 0;
- m_dac_vol = 0;
}
void taitosj_state::init_common()
@@ -2801,8 +2787,6 @@ void taitosj_state::init_common()
save_item(NAME(m_sound_semaphore));
save_item(NAME(m_input_port_4_f0));
save_item(NAME(m_kikstart_gears));
- save_item(NAME(m_dac_out));
- save_item(NAME(m_dac_vol));
machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(taitosj_state::reset_common), this));
}
diff --git a/src/mame/drivers/tamag1.cpp b/src/mame/drivers/tamag1.cpp
index 1275d33f0c7..36dd47e59e7 100644
--- a/src/mame/drivers/tamag1.cpp
+++ b/src/mame/drivers/tamag1.cpp
@@ -105,7 +105,7 @@ INPUT_CHANGED_MEMBER(tamag1_state::input_changed)
{
// inputs are hooked up backwards here, because MCU input
// ports are all tied to its interrupt controller
- int line = (int)(FPTR)param;
+ int line = (int)(uintptr_t)param;
int state = newval ? ASSERT_LINE : CLEAR_LINE;
m_maincpu->set_input_line(line, state);
}
diff --git a/src/mame/drivers/tceptor.cpp b/src/mame/drivers/tceptor.cpp
index 84eeae9edbe..f2100692abc 100644
--- a/src/mame/drivers/tceptor.cpp
+++ b/src/mame/drivers/tceptor.cpp
@@ -9,15 +9,17 @@
*/
#include "emu.h"
+#include "includes/tceptor.h"
#include "cpu/m6502/m65c02.h"
#include "cpu/m6809/m6809.h"
#include "cpu/m6800/m6800.h"
#include "cpu/m68000/m68000.h"
+#include "machine/nvram.h"
+#include "sound/dac.h"
#include "sound/ym2151.h"
+#include "sound/volt_reg.h"
#include "rendlay.h"
#include "tceptor2.lh"
-#include "includes/tceptor.h"
-#include "machine/nvram.h"
/*******************************************************************/
@@ -85,12 +87,6 @@ WRITE8_MEMBER(tceptor_state::mcu_irq_disable_w)
}
-WRITE8_MEMBER(tceptor_state::voice_w)
-{
- m_dac->write_signed16(data ? (data + 1) * 0x100 : 0x8000);
-}
-
-
/* fix dsw/input data to memory mapped data */
UINT8 tceptor_state::fix_input0(UINT8 in1, UINT8 in2)
{
@@ -186,7 +182,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( m6502_b_map, AS_PROGRAM, 8, tceptor_state )
AM_RANGE(0x0000, 0x00ff) AM_RAM AM_SHARE("share2")
AM_RANGE(0x0100, 0x01ff) AM_RAM
- AM_RANGE(0x4000, 0x4000) AM_WRITE(voice_w) // voice data
+ AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0x5000, 0x5000) AM_WRITEONLY // voice ctrl??
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -422,9 +418,9 @@ static MACHINE_CONFIG_START( tceptor, tceptor_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.40)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.40)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tcl.cpp b/src/mame/drivers/tcl.cpp
index 46f6f537572..a951a646e47 100644
--- a/src/mame/drivers/tcl.cpp
+++ b/src/mame/drivers/tcl.cpp
@@ -173,7 +173,7 @@ DRIVER_INIT_MEMBER(tcl_state,tcl)
UINT8 *dest = memregion("maincpu")->base();
int len = memregion("maincpu")->bytes();
- dynamic_buffer src(len);
+ std::vector<UINT8> src(len);
int i,idx=0;
memcpy(&src[0], dest, len);
diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp
index 9bf4104be33..ef7874db697 100644
--- a/src/mame/drivers/terracre.cpp
+++ b/src/mame/drivers/terracre.cpp
@@ -81,12 +81,13 @@ AT-2
*/
#include "emu.h"
+#include "includes/terracre.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/2203intf.h"
#include "sound/3526intf.h"
-#include "includes/terracre.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
static const UINT16 mAmazonProtData[] =
@@ -222,8 +223,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_3526_io_map, AS_IO, 8, terracre_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym3526_device, write)
- AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_signed8)
- AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_signed8)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
AM_RANGE(0x06, 0x06) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -231,8 +232,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_2203_io_map, AS_IO, 8, terracre_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ym1", ym2203_device, write)
- AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_signed8)
- AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_signed8)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
AM_RANGE(0x06, 0x06) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
ADDRESS_MAP_END
@@ -539,19 +540,19 @@ static MACHINE_CONFIG_START( ym3526, terracre_state )
MCFG_PALETTE_INDIRECT_ENTRIES(256)
MCFG_PALETTE_INIT_OWNER(terracre_state, terracre)
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_16MHz/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", 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_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ym2203, ym3526 )
MCFG_CPU_MODIFY("audiocpu")
@@ -560,10 +561,10 @@ static MACHINE_CONFIG_DERIVED( ym2203, ym3526 )
MCFG_DEVICE_REMOVE("ymsnd")
MCFG_SOUND_ADD("ym1", YM2203, XTAL_16MHz/4)
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
- MCFG_SOUND_ROUTE(2, "mono", 0.20)
- MCFG_SOUND_ROUTE(3, "mono", 0.40)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.2)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.2)
+ MCFG_SOUND_ROUTE(2, "speaker", 0.2)
+ MCFG_SOUND_ROUTE(3, "speaker", 0.4)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( amazon, ym3526 )
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index 75027cdfecb..1fed3eb538a 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -77,15 +77,16 @@
*/
#include "includes/thomson.h"
-#include "bus/rs232/rs232.h"
-#include "machine/6821pia.h"
-#include "machine/wd_fdc.h"
-#include "machine/clock.h"
#include "bus/centronics/ctronics.h"
-#include "imagedev/flopdrv.h"
+#include "bus/rs232/rs232.h"
#include "formats/cd90_640_dsk.h"
#include "formats/basicdsk.h"
+#include "imagedev/flopdrv.h"
+#include "machine/6821pia.h"
+#include "machine/clock.h"
#include "machine/ram.h"
+#include "machine/wd_fdc.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
@@ -635,13 +636,16 @@ static MACHINE_CONFIG_START( to7, thomson_state )
MCFG_VIDEO_START_OVERRIDE( thomson_state, thom )
/* sound */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD ( "buzzer", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.) /* 1-bit buzzer */
- MCFG_SOUND_ADD ( "dac", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.) /* 6-bit game extention DAC */
- MCFG_SOUND_ADD ( "speech", DAC, 0 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.) /* speech synthesis */
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("buzzer", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ MCFG_SOUND_ADD("dac", DAC_6BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC (6-bit game extension DAC)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "buzzer", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
+/* speech synthesis */
+ MCFG_SOUND_ADD("mea8000", MEA8000, 3840000)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
/* cassette */
MCFG_CASSETTE_ADD( "cassette" )
@@ -652,15 +656,11 @@ static MACHINE_CONFIG_START( to7, thomson_state )
/* timer */
MCFG_DEVICE_ADD("mc6846", MC6846, 0)
MCFG_MC6846_OUT_PORT_CB(WRITE8(thomson_state, to7_timer_port_out))
- MCFG_MC6846_OUT_CP2_CB(WRITE8(thomson_state, to7_timer_cp2_out))
+ MCFG_MC6846_OUT_CP2_CB(DEVWRITELINE("buzzer", dac_bit_interface, write))
MCFG_MC6846_IN_PORT_CB(READ8(thomson_state, to7_timer_port_in))
- MCFG_MC6846_OUT_CTO_CB(WRITE8(thomson_state, to7_timer_tco_out))
+ MCFG_MC6846_OUT_CTO_CB(WRITELINE(thomson_state, to7_set_cassette))
MCFG_MC6846_IRQ_CB(WRITELINE(thomson_state, thom_dev_irq_0))
-/* speech synthesis */
- MCFG_DEVICE_ADD("mea8000", MEA8000, 0)
- MCFG_MEA8000_DAC("speech")
-
/* floppy */
MCFG_DEVICE_ADD("mc6843", MC6843, 0)
@@ -1122,7 +1122,7 @@ static MACHINE_CONFIG_DERIVED( mo5, to7 )
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, mo5_sys_porta_in))
MCFG_PIA_READPB_HANDLER(READ8(thomson_state, mo5_sys_portb_in))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, mo5_sys_porta_out))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, mo5_sys_portb_out))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("buzzer", dac_bit_interface, write))
MCFG_PIA_CA2_HANDLER(WRITELINE(thomson_state, mo5_set_cassette_motor))
MCFG_PIA_CB2_HANDLER(NOOP)
MCFG_PIA_IRQB_HANDLER(WRITELINE(thomson_state, thom_irq_1)) /* WARNING: differs from TO7 ! */
@@ -1704,7 +1704,7 @@ static MACHINE_CONFIG_DERIVED( to8, to7 )
MCFG_DEVICE_MODIFY("mc6846")
MCFG_MC6846_OUT_PORT_CB(WRITE8(thomson_state, to8_timer_port_out))
- MCFG_MC6846_OUT_CP2_CB(WRITE8(thomson_state, to8_timer_cp2_out))
+ MCFG_MC6846_OUT_CP2_CB(WRITELINE(thomson_state, to8_timer_cp2_out))
MCFG_MC6846_IN_PORT_CB(READ8(thomson_state, to8_timer_port_in))
/* internal ram */
@@ -1868,7 +1868,7 @@ static MACHINE_CONFIG_DERIVED( to9p, to7 )
MCFG_DEVICE_MODIFY("mc6846")
MCFG_MC6846_OUT_PORT_CB(WRITE8(thomson_state, to9p_timer_port_out))
- MCFG_MC6846_OUT_CP2_CB(WRITE8(thomson_state, to8_timer_cp2_out))
+ MCFG_MC6846_OUT_CP2_CB(WRITELINE(thomson_state, to8_timer_cp2_out))
MCFG_MC6846_IN_PORT_CB(READ8(thomson_state, to9p_timer_port_in))
/* internal ram */
@@ -2213,7 +2213,7 @@ static MACHINE_CONFIG_DERIVED( mo6, to7 )
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, mo6_sys_porta_in))
MCFG_PIA_READPB_HANDLER(READ8(thomson_state, mo6_sys_portb_in))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, mo6_sys_porta_out))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, mo6_sys_portb_out))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("buzzer", dac_bit_interface, write))
MCFG_PIA_CA2_HANDLER(WRITELINE(thomson_state, mo5_set_cassette_motor))
MCFG_PIA_CB2_HANDLER(WRITELINE(thomson_state, mo6_sys_cb2_out))
MCFG_PIA_IRQB_HANDLER(WRITELINE(thomson_state, thom_irq_1)) /* differs from TO */
@@ -2482,7 +2482,7 @@ static MACHINE_CONFIG_DERIVED( mo5nr, to7 )
MCFG_PIA_READPA_HANDLER(READ8(thomson_state, mo6_sys_porta_in))
MCFG_PIA_READPB_HANDLER(READ8(thomson_state, mo5nr_sys_portb_in))
MCFG_PIA_WRITEPA_HANDLER(WRITE8(thomson_state, mo5nr_sys_porta_out))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(thomson_state, mo6_sys_portb_out))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("buzzer", dac_bit_interface, write))
MCFG_PIA_CA2_HANDLER(WRITELINE(thomson_state, mo5_set_cassette_motor))
MCFG_PIA_CB2_HANDLER(WRITELINE(thomson_state, mo6_sys_cb2_out))
MCFG_PIA_IRQB_HANDLER(WRITELINE(thomson_state, thom_irq_1)) /* differs from TO */
diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp
index e558e53756b..f536ddbb9ea 100644
--- a/src/mame/drivers/ticalc1x.cpp
+++ b/src/mame/drivers/ticalc1x.cpp
@@ -21,6 +21,7 @@
#include "includes/hh_tms1k.h"
// internal artwork
+#include "cmulti8.lh"
#include "dataman.lh"
#include "mathmarv.lh"
#include "ti1250.lh"
@@ -48,6 +49,157 @@ public:
/***************************************************************************
+ Canon Multi 8 (Palmtronic MD-8) / Canon Canola MD 810
+ * TMS1070 MCU label TMC1079 (die label 1070B, 1079A)
+ * 2-line cyan VFD display, each 9-digit 7seg + 1 custom (label 20-ST-22)
+ * PCB label Canon EHI-0115-03
+
+***************************************************************************/
+
+class cmulti8_state : public ticalc1x_state
+{
+public:
+ cmulti8_state(const machine_config &mconfig, device_type type, const char *tag)
+ : ticalc1x_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ DECLARE_WRITE16_MEMBER(write_o);
+ DECLARE_WRITE16_MEMBER(write_r);
+ DECLARE_READ8_MEMBER(read_k);
+};
+
+// handlers
+
+void cmulti8_state::prepare_display()
+{
+ set_display_segmask(0xfffff, 0xff);
+
+ // M-digit is on in memory mode, upper row is off in single mode
+ UINT32 m = (m_inp_matrix[10]->read() & 0x10) ? 0x100000 : 0;
+ UINT32 mask = (m_inp_matrix[10]->read() & 0x20) ? 0xfffff : 0xffc00;
+
+ // R10 selects display row
+ UINT32 sel = (m_r & 0x400) ? (m_r & 0x3ff) : (m_r << 10 & 0xffc00);
+ display_matrix(8, 21, m_o, (sel & mask) | m);
+}
+
+WRITE16_MEMBER(cmulti8_state::write_r)
+{
+ // R0-R10: input mux, select digit
+ m_r = m_inp_mux = data;
+ prepare_display();
+}
+
+WRITE16_MEMBER(cmulti8_state::write_o)
+{
+ // O0-O7: digit segments
+ m_o = BITSWAP8(data,0,4,5,6,7,1,2,3);
+ prepare_display();
+}
+
+READ8_MEMBER(cmulti8_state::read_k)
+{
+ // K: multiplexed inputs
+ return read_inputs(11);
+}
+
+
+// config
+
+static INPUT_PORTS_START( cmulti8 )
+ PORT_START("IN.0") // R0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("% +/-")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0")
+
+ PORT_START("IN.1") // R1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("RM") // recall memory
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1")
+
+ PORT_START("IN.2") // R2
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("SC") // sign change
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2")
+
+ PORT_START("IN.3") // R3
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("CM") // clear memory
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3")
+
+ PORT_START("IN.4") // R4
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4")
+
+ PORT_START("IN.5") // R5
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("M+") // add to memory
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5")
+
+ PORT_START("IN.6") // R6
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("RV") // reverse
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6")
+
+ PORT_START("IN.7") // R7
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7")
+
+ PORT_START("IN.8") // R8
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8")
+
+ PORT_START("IN.9") // R9
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CI/C")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
+
+ PORT_START("IN.10") // R10
+ PORT_CONFNAME( 0x31, 0x20, "Mode" ) // bit 4 indicates M-digit on/off, bit 5 indicates upper row filament on/off
+ PORT_CONFSETTING( 0x31, "Memory" )
+ PORT_CONFSETTING( 0x01, "Single" )
+ PORT_CONFSETTING( 0x20, "Process" )
+ PORT_CONFNAME( 0x02, 0x00, "AM" ) // accumulate memory
+ PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
+ PORT_CONFSETTING( 0x02, DEF_STR( On ) )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( cmulti8, cmulti8_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", TMS1070, 250000) // approximation - RC osc. R=56K, C=68pf
+ MCFG_TMS1XXX_READ_K_CB(READ8(cmulti8_state, read_k))
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cmulti8_state, write_o))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cmulti8_state, write_r))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_cmulti8)
+
+ /* no sound! */
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
TI SR-16 (1974, first consumer product with TMS1000 series MCU)
* TMS1000 MCU label TMS1001NL (die label 1000, 1001A)
* 12-digit 7seg LED display
@@ -1241,6 +1393,17 @@ MACHINE_CONFIG_END
***************************************************************************/
+ROM_START( cmulti8 )
+ ROM_REGION( 0x0400, "maincpu", 0 )
+ ROM_LOAD( "tmc1079nl", 0x0000, 0x0400, CRC(202c5ed8) SHA1(0143975cac20cb4a4e9f659ca0535e8a9056f5bb) )
+
+ ROM_REGION( 867, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms1000_common2_micro.pla", 0, 867, CRC(d33da3cf) SHA1(13c4ebbca227818db75e6db0d45b66ba5e207776) )
+ ROM_REGION( 365, "maincpu:opla", 0 )
+ ROM_LOAD( "tms1000_cmulti8_output.pla", 0, 365, CRC(e999cece) SHA1(c5012877cd030a4dc66228f109fa23eec1867873) )
+ROM_END
+
+
ROM_START( tisr16 )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "tms1001nl", 0x0000, 0x0400, CRC(b7ce3c1d) SHA1(95cdb0c6be31043f4fe06314ed41c0ca1337bc46) )
@@ -1437,6 +1600,8 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
+COMP( 1977, cmulti8, 0, 0, cmulti8, cmulti8, driver_device, 0, "Canon", "Multi 8 (Canon)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+
COMP( 1974, tisr16, 0, 0, tisr16, tisr16, driver_device, 0, "Texas Instruments", "SR-16", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
COMP( 1975, tisr16ii, 0, 0, tisr16, tisr16ii, driver_device, 0, "Texas Instruments", "SR-16 II", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp
index 5fd75e50487..8b63f982b80 100644
--- a/src/mame/drivers/timex.cpp
+++ b/src/mame/drivers/timex.cpp
@@ -606,7 +606,7 @@ DEVICE_IMAGE_LOAD_MEMBER( spectrum_state, timex_cart )
{
UINT8 *DOCK;
int chunks_in_file = 0;
- dynamic_buffer header;
+ std::vector<UINT8> header;
header.resize(9);
if (size % 0x2000 != 9)
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 92591ad9a72..dea10f66d29 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -725,7 +725,7 @@ READ8_MEMBER(tispeak_state::k28_read_k)
INPUT_CHANGED_MEMBER(tispeak_state::power_button)
{
- int on = (int)(FPTR)param;
+ int on = (int)(uintptr_t)param;
if (on && !m_power_on)
{
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index 258ccc82a0e..4d1198f1d93 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -243,7 +243,7 @@ WRITE16_MEMBER(tispellb_state::rev2_write_r)
INPUT_CHANGED_MEMBER(tispellb_state::power_button)
{
- int on = (int)(FPTR)param;
+ int on = (int)(uintptr_t)param;
if (on && !m_power_on)
{
diff --git a/src/mame/drivers/tnzs.cpp b/src/mame/drivers/tnzs.cpp
index 9a033fd1a90..a4929cb53e3 100644
--- a/src/mame/drivers/tnzs.cpp
+++ b/src/mame/drivers/tnzs.cpp
@@ -620,12 +620,12 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/11/06
***************************************************************************/
-
#include "emu.h"
-#include "cpu/z80/z80.h"
+#include "includes/tnzs.h"
#include "includes/taitoipt.h"
+#include "cpu/z80/z80.h"
#include "sound/2203intf.h"
-#include "includes/tnzs.h"
+#include "sound/volt_reg.h"
#include "sound/ym2151.h"
SAMPLES_START_CB_MEMBER(tnzs_state::kageki_init_samples)
@@ -734,13 +734,6 @@ WRITE8_MEMBER(tnzs_state::kabukiz_sound_bank_w)
m_audiobank->set_entry(data & 0x07);
}
-WRITE8_MEMBER(tnzs_state::kabukiz_sample_w)
-{
- // to avoid the write when the sound chip is initialized
- if (data != 0xff)
- m_dac->write_unsigned8(data);
-}
-
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tnzs_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_DEVICE("mainbank", address_map_bank_device, amap8)
@@ -1583,12 +1576,12 @@ static MACHINE_CONFIG_START( arknoid2, tnzs_state )
MCFG_PALETTE_INIT_OWNER(tnzs_state,arknoid2)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
@@ -1629,12 +1622,12 @@ static MACHINE_CONFIG_START( drtoppel, tnzs_state )
MCFG_PALETTE_INIT_OWNER(tnzs_state,arknoid2)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
@@ -1677,12 +1670,12 @@ static MACHINE_CONFIG_START( tnzs, tnzs_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
@@ -1722,12 +1715,12 @@ static MACHINE_CONFIG_START( insectx, tnzs_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
@@ -1767,20 +1760,20 @@ static MACHINE_CONFIG_START( kageki, tnzs_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_AY8910_PORT_A_READ_CB(READ8(tnzs_state, kageki_csport_r))
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tnzs_state, kageki_csport_w))
- MCFG_SOUND_ROUTE(0, "mono", 0.15)
- MCFG_SOUND_ROUTE(1, "mono", 0.15)
- MCFG_SOUND_ROUTE(2, "mono", 0.15)
- MCFG_SOUND_ROUTE(3, "mono", 0.35)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.15)
+ MCFG_SOUND_ROUTE(1, "speaker", 0.15)
+ MCFG_SOUND_ROUTE(2, "speaker", 0.15)
+ MCFG_SOUND_ROUTE(3, "speaker", 0.35)
MCFG_SOUND_ADD("samples", SAMPLES, 0)
MCFG_SAMPLES_CHANNELS(1)
MCFG_SAMPLES_START_CB(tnzs_state, kageki_init_samples)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -1824,16 +1817,16 @@ static MACHINE_CONFIG_START( tnzsb, tnzs_state )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/4) /* verified on pcb */
MCFG_YM2203_IRQ_HANDLER(WRITELINE(tnzs_state, irqhandler))
- MCFG_SOUND_ROUTE(0, "mono", 1.0)
- MCFG_SOUND_ROUTE(1, "mono", 1.0)
- MCFG_SOUND_ROUTE(2, "mono", 1.0)
- MCFG_SOUND_ROUTE(3, "mono", 2.0)
+ MCFG_SOUND_ROUTE(0, "speaker", 1.0)
+ MCFG_SOUND_ROUTE(1, "speaker", 1.0)
+ MCFG_SOUND_ROUTE(2, "speaker", 1.0)
+ MCFG_SOUND_ROUTE(3, "speaker", 2.0)
MACHINE_CONFIG_END
@@ -1848,10 +1841,11 @@ static MACHINE_CONFIG_DERIVED( kabukiz, tnzsb )
MCFG_SOUND_MODIFY("ymsnd")
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(tnzs_state, kabukiz_sound_bank_w))
- MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(tnzs_state, kabukiz_sample_w))
+ MCFG_AY8910_PORT_B_WRITE_CB(DEVWRITE8("dac", dac_byte_interface, write))
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1892,10 +1886,10 @@ static MACHINE_CONFIG_START( jpopnics, tnzs_state )
MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_YM2151_ADD("ymsnd", XTAL_12MHz/4) /* Not verified - Main board Crystal is 12MHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/toaplan1.cpp b/src/mame/drivers/toaplan1.cpp
index 36ea7c5ec07..9a916bfee97 100644
--- a/src/mame/drivers/toaplan1.cpp
+++ b/src/mame/drivers/toaplan1.cpp
@@ -2427,8 +2427,39 @@ ROM_START( demonwld )
ROM_LOAD( "prom13.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */
ROM_END
+// has the same sound rom and same attract order as the parent set, but still a 1989 copyright
+// main 68k program ROMs had an additional 'N' stamped on them
ROM_START( demonwld1 )
ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */
+ ROM_LOAD16_BYTE( "o16n-10.bin", 0x000000, 0x20000, CRC(fc38aeaa) SHA1(db338b3ade4ee90a9528b42a6128b854efdb289f) )
+ ROM_LOAD16_BYTE( "o16n-09.bin", 0x000001, 0x20000, CRC(74f66643) SHA1(3a908f9e1cbd59d674ae719e3d9c87e729dd907f) )
+
+ ROM_REGION( 0x8000, "audiocpu", 0 ) /* Sound Z80 code */
+ ROM_LOAD( "o16-11.bin", 0x0000, 0x8000, CRC(dbe08c85) SHA1(536a242bfe916d15744b079261507af6f12b5b50) )
+
+ ROM_REGION( 0x2000, "dsp", 0 ) /* Co-Processor TMS320C10 MCU code */
+ ROM_LOAD16_BYTE( "dsp_21.bin", 0x0000, 0x0800, CRC(2d135376) SHA1(67a2cc774d272ee1cd6e6bc1c5fc33fc6968837e) )
+ ROM_LOAD16_BYTE( "dsp_22.bin", 0x0001, 0x0800, CRC(79389a71) SHA1(14ec4c1c9b06702319e89a7a250d0038393437f4) )
+
+ ROM_REGION( 0x80000, "gfx1", 0 )
+ ROM_LOAD16_BYTE( "rom05", 0x00000, 0x20000, CRC(6506c982) SHA1(6d4c1ef91e5617724789ff196abb7abf23e4a7fb) )
+ ROM_LOAD16_BYTE( "rom07", 0x00001, 0x20000, CRC(a3a0d993) SHA1(50311b9447eb04271b17b212ca31d083ab5b2414) )
+ ROM_LOAD16_BYTE( "rom06", 0x40000, 0x20000, CRC(4fc5e5f3) SHA1(725d4b009d575ff8ffbe1c00df352ccf235465d7) )
+ ROM_LOAD16_BYTE( "rom08", 0x40001, 0x20000, CRC(eb53ab09) SHA1(d98195cc1b65b76335b5b24adb31deae1b313f3a) )
+
+ ROM_REGION( 0x80000, "gfx2", 0 )
+ ROM_LOAD16_BYTE( "rom01", 0x00000, 0x20000, CRC(1b3724e9) SHA1(3dbb0450ab1e40e6df2b7c7356352419cd3f113d) )
+ ROM_LOAD16_BYTE( "rom02", 0x00001, 0x20000, CRC(7b20a44d) SHA1(4dc1a2fa2058077b112c73492808ee9381060ec7) )
+ ROM_LOAD16_BYTE( "rom03", 0x40000, 0x20000, CRC(2cacdcd0) SHA1(92216d1c6859e05d39363c30e0beb45bc0ae4e1c) )
+ ROM_LOAD16_BYTE( "rom04", 0x40001, 0x20000, CRC(76fd3201) SHA1(7a12737bf90bd9760074132edeb22f3fd3e16b4f) )
+
+ ROM_REGION( 0x40, "proms", 0 ) /* nibble bproms, lo/hi order to be determined */
+ ROM_LOAD( "prom12.bpr", 0x00, 0x20, CRC(bc88cced) SHA1(5055362710c0f58823c05fb4c0e0eec638b91e3d) ) /* sprite attribute (flip/position) ?? */
+ ROM_LOAD( "prom13.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */
+ROM_END
+
+ROM_START( demonwld2 )
+ ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */
ROM_LOAD16_BYTE( "o16-10.rom", 0x000000, 0x20000, CRC(036ee46c) SHA1(60868e5e08e0c9a538ae786de0de6b2531b30b11) )
ROM_LOAD16_BYTE( "o16-09.rom", 0x000001, 0x20000, CRC(bed746e3) SHA1(056668edb7df99bbd240e387af17cf252d1448f3) )
@@ -2456,7 +2487,7 @@ ROM_START( demonwld1 )
ROM_LOAD( "prom13.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */
ROM_END
-ROM_START( demonwld2 )
+ROM_START( demonwld3 )
ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */
ROM_LOAD16_BYTE( "o16-10-2.bin", 0x000000, 0x20000, CRC(84ee5218) SHA1(dc2b017ee630330163be320008d8a0d761cb0cfb) ) // aka o16_10ii
ROM_LOAD16_BYTE( "o16-09-2.bin", 0x000001, 0x20000, CRC(cf474cb2) SHA1(5c049082b8d7118e0d2e50c6ae07f9d3d0110498) ) // aka o16_09ii
@@ -2485,7 +2516,7 @@ ROM_START( demonwld2 )
ROM_LOAD( "prom13.bpr", 0x20, 0x20, CRC(a1e17492) SHA1(9ddec4c97f2d541f69f3c32c47aaa21fd9699ae2) ) /* ??? */
ROM_END
-ROM_START( demonwld3 )
+ROM_START( demonwld4 )
ROM_REGION( 0x040000, "maincpu", 0 ) /* Main 68K code */
ROM_LOAD16_BYTE( "o16-10.bin", 0x000000, 0x20000, CRC(6f7468e0) SHA1(87ef7733fd0d00d0d375dbf30332cf0614480dc2) )
ROM_LOAD16_BYTE( "o16-09.bin", 0x000001, 0x20000, CRC(a572f5f7) SHA1(3d6a443cecd46734c7e1b761130909482c7a9914) )
@@ -2994,9 +3025,10 @@ GAME( 1989, zerowing, 0, zerowing, zerowing2, toaplan1_state, toaplan1,
GAME( 1989, zerowing1, zerowing, zerowing, zerowing, toaplan1_state, toaplan1, ROT0, "Toaplan", "Zero Wing (1P set)", 0 )
GAME( 1989, zerowingw, zerowing, zerowing, zerowing2, toaplan1_state, toaplan1, ROT0, "Toaplan (Williams license)", "Zero Wing (2P set, Williams license)", 0 )
GAME( 1990, demonwld, 0, demonwld, demonwld, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 1)", 0 )
-GAME( 1989, demonwld1, demonwld, demonwld, demonwld1, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 2)", 0 )
+GAME( 1989, demonwld1, demonwld, demonwld, demonwld, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 2)", 0 )
GAME( 1989, demonwld2, demonwld, demonwld, demonwld1, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 3)", 0 )
GAME( 1989, demonwld3, demonwld, demonwld, demonwld1, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 4)", 0 )
+GAME( 1989, demonwld4, demonwld, demonwld, demonwld1, toaplan1_state, demonwld, ROT0, "Toaplan", "Demon's World / Horror Story (set 5)", 0 )
GAME( 1990, fireshrk, 0, samesame, fireshrk, toaplan1_state, toaplan1, ROT270, "Toaplan", "Fire Shark", MACHINE_NO_SOUND )
GAME( 1989, fireshrka, fireshrk, samesame, fireshrka, toaplan1_state, toaplan1, ROT270, "Toaplan", "Fire Shark (earlier)", MACHINE_NO_SOUND )
GAME( 1990, fireshrkd, fireshrk, samesame, samesame2, toaplan1_state, toaplan1, ROT270, "Toaplan (Dooyong license)", "Fire Shark (Korea, set 1, easier)", MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/toki.cpp b/src/mame/drivers/toki.cpp
index f3616913453..890280abee3 100644
--- a/src/mame/drivers/toki.cpp
+++ b/src/mame/drivers/toki.cpp
@@ -857,7 +857,7 @@ ROM_END
DRIVER_INIT_MEMBER(toki_state,toki)
{
UINT8 *ROM = memregion("oki")->base();
- dynamic_buffer buffer(0x20000);
+ std::vector<UINT8> buffer(0x20000);
int i;
memcpy(&buffer[0],ROM,0x20000);
@@ -870,7 +870,7 @@ DRIVER_INIT_MEMBER(toki_state,toki)
DRIVER_INIT_MEMBER(toki_state,tokib)
{
- dynamic_buffer temp(65536 * 2);
+ std::vector<UINT8> temp(65536 * 2);
int i, offs, len;
UINT8 *rom;
@@ -941,7 +941,7 @@ DRIVER_INIT_MEMBER(toki_state,jujuba)
{
UINT8 *ROM = memregion("oki")->base();
- dynamic_buffer buffer(0x20000);
+ std::vector<UINT8> buffer(0x20000);
int i;
memcpy(&buffer[0],ROM,0x20000);
diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp
index 2884a752704..3771ebf3561 100644
--- a/src/mame/drivers/trackfld.cpp
+++ b/src/mame/drivers/trackfld.cpp
@@ -181,17 +181,18 @@ MAIN BOARD:
***************************************************************************/
#include "emu.h"
+#include "includes/trackfld.h"
+#include "includes/konamipt.h"
+#include "audio/trackfld.h"
+#include "audio/hyprolyb.h"
#include "cpu/z80/z80.h"
#include "cpu/m6800/m6800.h"
-#include "machine/konami1.h"
#include "cpu/m6809/m6809.h"
-#include "sound/dac.h"
-#include "audio/trackfld.h"
-#include "audio/hyprolyb.h"
-#include "includes/trackfld.h"
-#include "includes/konamipt.h"
+#include "machine/konami1.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK XTAL_18_432MHz
#define SOUND_CLOCK XTAL_14_31818MHz
@@ -406,7 +407,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, trackfld_state )
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(konami_SN76496_latch_w)
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_READ(trackfld_SN76496_r) AM_WRITE(konami_SN76496_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x1ff8) AM_NOP /* watch dog ?; reaktor reads here */
AM_RANGE(0xe002, 0xe002) AM_MIRROR(0x1ff8) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_speech_r)
AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1c78) AM_SELECT(0x0380) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, trackfld_sound_w)
@@ -420,7 +421,7 @@ static ADDRESS_MAP_START( hyprolyb_sound_map, AS_PROGRAM, 8, trackfld_state )
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_sh_timer_r)
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(konami_SN76496_latch_w)
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_READ(trackfld_SN76496_r) AM_WRITE(konami_SN76496_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x1ff8) AM_NOP /* watch dog ?; reaktor reads here */
AM_RANGE(0xe002, 0xe002) AM_MIRROR(0x1ff8) AM_DEVREAD("hyprolyb_adpcm", hyprolyb_adpcm_device, busy_r)
AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1ff8) AM_WRITENOP
@@ -927,21 +928,22 @@ static MACHINE_CONFIG_START( trackfld, trackfld_state )
MCFG_VIDEO_START_OVERRIDE(trackfld_state,trackfld)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("snsnd", SN76496, SOUND_CLOCK/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("vlm", VLM5030, VLM_CLOCK)
MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
@@ -985,21 +987,22 @@ static MACHINE_CONFIG_START( yieartf, trackfld_state )
MCFG_VIDEO_START_OVERRIDE(trackfld_state,trackfld)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("trackfld_audio", TRACKFLD_AUDIO, 0)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4) // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_SOUND_ADD("snsnd", SN76496, MASTER_CLOCK/6/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("vlm", VLM5030, VLM_CLOCK)
MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
/* same as the original, but uses ADPCM instead of VLM5030 */
diff --git a/src/mame/drivers/tranz330.cpp b/src/mame/drivers/tranz330.cpp
new file mode 100644
index 00000000000..359af3b042f
--- /dev/null
+++ b/src/mame/drivers/tranz330.cpp
@@ -0,0 +1,184 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+/**************************************************************************
+
+ VeriFone Tranz 330
+
+ All information gleaned from:
+ http://www.bigmessowires.com/2011/05/10/mapping-the-tranz-330/
+
+ Currently sits in a loop doing very little, based on the disassembly
+ it presumably needs some kind of interrupt in order to kick it into
+ running.
+
+ Interrupt Vectors are located at 0200-02FF.
+ Display ram at 9000-90FF says GRAMING ERR 0 (part of PROGRAMING ERR message)
+
+ TODO:
+ - get working, driver needs a Z80 peripheral expert to look at it.
+ - hook up magstripe reader
+
+****************************************************************************/
+
+#include "includes/tranz330.h"
+#include "tranz330.lh"
+
+static ADDRESS_MAP_START( tranz330_mem, AS_PROGRAM, 8, tranz330_state )
+ AM_RANGE(0x0000, 0x7fff) AM_ROM
+ AM_RANGE(0x8000, 0xffff) AM_RAM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( tranz330_io, AS_IO, 8, tranz330_state )
+ ADDRESS_MAP_GLOBAL_MASK(0xff)
+ AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(PIO_TAG, z80pio_device, read_alt, write_alt)
+ AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(CTC_TAG, z80ctc_device, read, write)
+ AM_RANGE(0x20, 0x23) AM_DEVREADWRITE(DART_TAG, z80dart_device, ba_cd_r, ba_cd_w)
+ AM_RANGE(0x30, 0x3f) AM_DEVREADWRITE(RTC_TAG, msm6242_device, read, write)
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( tranz330 )
+ PORT_START("COL.0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1) PORT_NAME("1 QZ.")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_4) PORT_NAME("4 GHI")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_7) PORT_NAME("7 PRS")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("* ,'\"")
+
+ PORT_START("COL.1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_2) PORT_NAME("2 ABC")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_5) PORT_NAME("5 JKL")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_8) PORT_NAME("8 TUV")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_0) PORT_NAME("0 -SP")
+
+ PORT_START("COL.2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_3) PORT_NAME("3 DEF")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_CODE(KEYCODE_6) PORT_NAME("6 MNO")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_CODE(KEYCODE_9) PORT_NAME("9 WXY")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_CODE(KEYCODE_H) PORT_NAME("#") // KEYCODE_H for 'hash mark'
+
+ PORT_START("COL.3")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_CODE(KEYCODE_C) PORT_NAME("CLEAR") // KEYCODE_C so as to not collide with potentially-used UI keys
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BACK SPACE")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_CODE(KEYCODE_A) PORT_NAME("ALPHA")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("FUNC | ENTER")
+INPUT_PORTS_END
+
+
+void tranz330_state::machine_start()
+{
+}
+
+void tranz330_state::machine_reset()
+{
+}
+
+WRITE_LINE_MEMBER( tranz330_state::syncb_w )
+{
+}
+
+WRITE_LINE_MEMBER( tranz330_state::sound_w )
+{
+ m_speaker->level_w(state);
+ m_ctc->trg3(state);
+}
+
+WRITE_LINE_MEMBER( tranz330_state::clock_w )
+{
+ // Ch 0 and 1 might be DART Ch A & B baud clocks
+ //m_ctc->trg0(state);
+ //m_ctc->trg1(state);
+ // Ch 2 speaker clock
+ m_ctc->trg2(state);
+}
+
+READ8_MEMBER( tranz330_state::card_r )
+{
+ // return 0xff for a magstripe 0, return 0x00 for a magstripe 1.
+ // an interrupt should be triggered on the Z80 when magstripe reading begins.
+ // external contributors are encouraged to hook this up.
+ return 0xff;
+}
+
+WRITE8_MEMBER( tranz330_state::pio_a_w )
+{
+ m_keypad_col_mask = data & 0xf;
+ m_vfd->por ((data >> 4) & 1);
+ m_vfd->data((data >> 5) & 1);
+ m_vfd->sclk((data >> 6) & 1);
+}
+
+READ8_MEMBER( tranz330_state::pio_b_r )
+{
+ UINT8 input_mask = 0xf;
+ for (int i = 0; i < 4; i++)
+ {
+ if (!BIT(m_keypad_col_mask, i))
+ {
+ input_mask &= m_keypad[i]->read();
+ }
+ }
+ return input_mask;
+}
+
+static const z80_daisy_config tranz330_daisy_chain[] =
+{
+ { DART_TAG },
+ { CTC_TAG },
+ { PIO_TAG },
+ { nullptr }
+};
+
+// * - check clocks
+// ? - check purported RS232 hookup, inconsistent information found at the relevant webpage vs. user-submitted errata
+static MACHINE_CONFIG_START( tranz330, tranz330_state )
+ MCFG_CPU_ADD(CPU_TAG, Z80, XTAL_7_15909MHz/2) //*
+ MCFG_CPU_PROGRAM_MAP(tranz330_mem)
+ MCFG_CPU_IO_MAP(tranz330_io)
+ MCFG_Z80_DAISY_CHAIN(tranz330_daisy_chain)
+
+ MCFG_DEVICE_ADD("ctc_clock", CLOCK, XTAL_7_15909MHz/4) // ?
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(tranz330_state, clock_w))
+
+ MCFG_DEVICE_ADD(RTC_TAG, MSM6242, XTAL_32_768kHz)
+
+ MCFG_DEVICE_ADD(PIO_TAG, Z80PIO, XTAL_7_15909MHz/2) //*
+ MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(CPU_TAG, INPUT_LINE_IRQ0)) //*
+ MCFG_Z80PIO_OUT_PA_CB(WRITE8(tranz330_state, pio_a_w))
+ MCFG_Z80PIO_IN_PA_CB(READ8(tranz330_state, card_r))
+ MCFG_Z80PIO_IN_PB_CB(READ8(tranz330_state, pio_b_r))
+
+ MCFG_Z80DART_ADD(DART_TAG, XTAL_7_15909MHz/2, 0, 0, 0, 0 ) //*
+ MCFG_Z80DART_OUT_SYNCB_CB(WRITELINE(tranz330_state, syncb_w))
+ MCFG_Z80DART_OUT_TXDB_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd)) //?
+ MCFG_Z80DART_OUT_DTRB_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_dtr)) //?
+ MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_rts)) //?
+ MCFG_Z80DART_OUT_INT_CB(INPUTLINE(CPU_TAG, INPUT_LINE_IRQ0))
+
+ MCFG_DEVICE_ADD(CTC_TAG, Z80CTC, XTAL_7_15909MHz/2) //*
+ MCFG_Z80CTC_ZC2_CB(WRITELINE(tranz330_state, sound_w))
+ MCFG_Z80CTC_INTR_CB(INPUTLINE(CPU_TAG, INPUT_LINE_IRQ0))
+
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
+ MCFG_RS232_RXD_HANDLER(DEVWRITELINE(DART_TAG, z80dart_device, rxb_w))
+ MCFG_RS232_DCD_HANDLER(DEVWRITELINE(DART_TAG, z80dart_device, dcdb_w))
+ MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DART_TAG, z80dart_device, ctsb_w))
+
+ // video
+ MCFG_MIC10937_ADD(VFD_TAG, 0)
+ MCFG_DEFAULT_LAYOUT( layout_tranz330 )
+
+ // sound
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+ROM_START( tranz330 )
+ ROM_REGION( 0x8000, CPU_TAG, 0 )
+ ROM_LOAD( "tranz330-original.bin", 0x0000, 0x8000, CRC(af2bf474) SHA1(7896ed23b22b8e1730b689df83eb7bbf7b8dd130))
+ROM_END
+
+
+// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
+COMP( 1985, tranz330, 0, 0, tranz330, tranz330, driver_device, 0, "VeriFone", "Tranz 330", MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/travrusa.cpp b/src/mame/drivers/travrusa.cpp
index 53d32598de5..50e099d023c 100644
--- a/src/mame/drivers/travrusa.cpp
+++ b/src/mame/drivers/travrusa.cpp
@@ -578,7 +578,7 @@ DRIVER_INIT_MEMBER(travrusa_state,motorace)
{
int A, j;
UINT8 *rom = memregion("maincpu")->base();
- dynamic_buffer buffer(0x2000);
+ std::vector<UINT8> buffer(0x2000);
memcpy(&buffer[0], rom, 0x2000);
diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp
index bf8f120f853..ad9fb1fd633 100644
--- a/src/mame/drivers/truco.cpp
+++ b/src/mame/drivers/truco.cpp
@@ -201,17 +201,16 @@
*******************************************************************************************************/
-
#define MASTER_CLOCK XTAL_12MHz /* confirmed */
#define CPU_CLOCK (MASTER_CLOCK/16) /* guess */
#define CRTC_CLOCK (MASTER_CLOCK/8) /* guess */
#include "emu.h"
+#include "includes/truco.h"
#include "cpu/m6809/m6809.h"
-#include "video/mc6845.h"
#include "machine/6821pia.h"
-#include "includes/truco.h"
-
+#include "sound/volt_reg.h"
+#include "video/mc6845.h"
/*******************************************
* Read/Write Handlers *
@@ -237,11 +236,9 @@ WRITE_LINE_MEMBER(truco_state::pia_ca2_w)
WRITE8_MEMBER(truco_state::portb_w)
{
- if ((data & 0x80) | (data == 0))
- {
- m_dac->write_unsigned8(data & 0x80); /* Isolated the bit for Delta-Sigma DAC */
- }
- else
+ m_dac->write(BIT(data, 7)); /* Isolated the bit for Delta-Sigma DAC */
+
+ if (data & 0x7f)
logerror("Port B writes: %2x\n", data);
}
@@ -451,10 +448,10 @@ static MACHINE_CONFIG_START( truco, truco_state )
MCFG_MC6845_CHAR_WIDTH(4)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp
index 75ed2f7bdca..cfc4c675b8b 100644
--- a/src/mame/drivers/trucocl.cpp
+++ b/src/mame/drivers/trucocl.cpp
@@ -35,10 +35,10 @@ Daughterboard: Custom made, plugged in the 2 roms and Z80 mainboard sockets.
***************************************************************************/
#include "emu.h"
+#include "includes/trucocl.h"
#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
-#include "sound/dac.h"
-#include "includes/trucocl.h"
+#include "sound/volt_reg.h"
WRITE8_MEMBER(trucocl_state::irq_enable_w)
{
@@ -83,7 +83,7 @@ WRITE8_MEMBER(trucocl_state::audio_dac_w)
dac_address += 0x10000;
- m_dac->write_unsigned8( rom[dac_address+m_cur_dac_address_index] );
+ m_dac->write(rom[dac_address+m_cur_dac_address_index]);
timer_set( attotime::from_hz( 16000 ), TIMER_DAC_IRQ);
}
@@ -160,10 +160,11 @@ static MACHINE_CONFIG_START( trucocl, trucocl_state )
MCFG_PALETTE_INIT_OWNER(trucocl_state, trucocl)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp
index ffdfa325c3e..29d88419a53 100644
--- a/src/mame/drivers/tsamurai.cpp
+++ b/src/mame/drivers/tsamurai.cpp
@@ -39,10 +39,11 @@ the "America" release.
****************************************************************************/
#include "emu.h"
+#include "includes/tsamurai.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
-#include "includes/tsamurai.h"
+#include "sound/volt_reg.h"
void tsamurai_state::machine_start()
@@ -238,7 +239,7 @@ static ADDRESS_MAP_START( sound1_map, AS_PROGRAM, 8, tsamurai_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x6000, 0x6000) AM_READ(sound_command1_r)
AM_RANGE(0x6001, 0x6001) AM_WRITENOP /* ? - probably clear IRQ */
- AM_RANGE(0x6002, 0x6002) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
+ AM_RANGE(0x6002, 0x6002) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0x7f00, 0x7fff) AM_RAM
ADDRESS_MAP_END
@@ -248,7 +249,7 @@ static ADDRESS_MAP_START( sound2_map, AS_PROGRAM, 8, tsamurai_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x6000, 0x6000) AM_READ(sound_command2_r)
AM_RANGE(0x6001, 0x6001) AM_WRITENOP /* ? - probably clear IRQ */
- AM_RANGE(0x6002, 0x6002) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
+ AM_RANGE(0x6002, 0x6002) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x7f00, 0x7fff) AM_RAM
ADDRESS_MAP_END
@@ -258,7 +259,7 @@ static ADDRESS_MAP_START( sound1_m660_map, AS_PROGRAM, 8, tsamurai_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0xc000, 0xc000) AM_READ(sound_command1_r)
AM_RANGE(0xc001, 0xc001) AM_WRITENOP /* ? - probably clear IRQ */
- AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
+ AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("dac1", dac_byte_interface, write)
AM_RANGE(0x8000, 0x87ff) AM_RAM
ADDRESS_MAP_END
@@ -268,7 +269,7 @@ static ADDRESS_MAP_START( sound2_m660_map, AS_PROGRAM, 8, tsamurai_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0xc000, 0xc000) AM_READ(sound_command2_r)
AM_RANGE(0xc001, 0xc001) AM_WRITENOP /* ? - probably clear IRQ */
- AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
+ AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("dac2", dac_byte_interface, write)
AM_RANGE(0x8000, 0x87ff) AM_RAM
ADDRESS_MAP_END
@@ -360,7 +361,7 @@ static ADDRESS_MAP_START( sound_vsgongf_map, AS_PROGRAM, 8, tsamurai_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x6000, 0x63ff) AM_RAM /* work RAM */
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_WRITE(vsgongf_sound_nmi_enable_w) /* NMI enable */
- AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("dac", dac_byte_interface, write)
ADDRESS_MAP_END
/*******************************************************************************/
@@ -732,16 +733,16 @@ static MACHINE_CONFIG_START( tsamurai, tsamurai_state )
MCFG_VIDEO_START_OVERRIDE(tsamurai_state,tsamurai)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
-
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -773,15 +774,16 @@ static MACHINE_CONFIG_START( vsgongf, tsamurai_state )
MCFG_VIDEO_START_OVERRIDE(tsamurai_state,vsgongf)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -820,16 +822,16 @@ static MACHINE_CONFIG_START( m660, tsamurai_state )
MCFG_VIDEO_START_OVERRIDE(tsamurai_state,m660)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
-
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
/*******************************************************************************/
diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp
index 9964141f3cf..1ba51dcba2e 100644
--- a/src/mame/drivers/tsispch.cpp
+++ b/src/mame/drivers/tsispch.cpp
@@ -112,11 +112,13 @@
/* Core includes */
#include "emu.h"
#include "includes/tsispch.h"
-#include "cpu/upd7725/upd7725.h"
#include "cpu/i86/i86.h"
+#include "cpu/upd7725/upd7725.h"
#include "machine/i8251.h"
#include "machine/pic8259.h"
#include "machine/terminal.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
// defines
#define DEBUG_PARAM 1
@@ -402,9 +404,10 @@ static MACHINE_CONFIG_START( prose2k, tsispch_state )
MCFG_I8251_TXEMPTY_HANDLER(WRITELINE(tsispch_state, i8251_txempty_int))
/* sound hardware */
- //MCFG_SPEAKER_STANDARD_MONO("mono")
- //MCFG_SOUND_ADD("dac", DAC, 0) /* TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up */
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(tsispch_state, i8251_rxd))
diff --git a/src/mame/drivers/turrett.cpp b/src/mame/drivers/turrett.cpp
index 1dbb60575b4..fcb637a4525 100644
--- a/src/mame/drivers/turrett.cpp
+++ b/src/mame/drivers/turrett.cpp
@@ -254,7 +254,7 @@ UINT32 turrett_state::update_inputs(void)
INPUT_CHANGED_MEMBER( turrett_state::ipt_change )
{
- int p = (FPTR)param;
+ int p = (uintptr_t)param;
if (newval != oldval)
{
diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp
index 50d0904e836..a3f05dcc257 100644
--- a/src/mame/drivers/ultratnk.cpp
+++ b/src/mame/drivers/ultratnk.cpp
@@ -22,7 +22,7 @@ Atari Ultra Tank driver
CUSTOM_INPUT_MEMBER(ultratnk_state::get_collision)
{
- return m_collision[(FPTR) param];
+ return m_collision[(uintptr_t) param];
}
diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp
index 8849215091a..4c5b49c7754 100644
--- a/src/mame/drivers/ut88.cpp
+++ b/src/mame/drivers/ut88.cpp
@@ -26,6 +26,7 @@ Paste facility was tested but doesn't work, so all code remnants removed.
#include "formats/rk_cas.h"
#include "softlist.h"
#include "ut88mini.lh"
+#include "sound/volt_reg.h"
static GFXDECODE_START( ut88 )
GFXDECODE_ENTRY( "chargen", 0x0000, ut88_charlayout, 0, 1 )
@@ -198,11 +199,13 @@ static MACHINE_CONFIG_START( ut88, ut88_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", ut88 )
/* audio hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
+
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
/* Devices */
MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
@@ -230,9 +233,9 @@ static MACHINE_CONFIG_START( ut88mini, ut88_state )
MCFG_DEFAULT_LAYOUT(layout_ut88mini)
/* Cassette */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_FORMATS(rku_cassette_formats)
diff --git a/src/mame/drivers/uzebox.cpp b/src/mame/drivers/uzebox.cpp
index 6e64f590e0b..fdfc00d374a 100644
--- a/src/mame/drivers/uzebox.cpp
+++ b/src/mame/drivers/uzebox.cpp
@@ -249,7 +249,7 @@ DEVICE_IMAGE_LOAD_MEMBER(uzebox_state, uzebox_cart)
if (image.software_entry() == nullptr)
{
- dynamic_buffer data(size);
+ std::vector<UINT8> data(size);
image.fread(&data[0], size);
if (!strncmp((const char*)&data[0], "UZEBOX", 6))
diff --git a/src/mame/drivers/v1050.cpp b/src/mame/drivers/v1050.cpp
index 966e008b9e4..f3aa72c312c 100644
--- a/src/mame/drivers/v1050.cpp
+++ b/src/mame/drivers/v1050.cpp
@@ -142,7 +142,6 @@ Notes:
TODO:
- - does not boot CP/M anymore
- floppy 1 is broken
- write to banked RAM at 0x0000-0x1fff when ROM is active
- real keyboard w/i8049
@@ -156,7 +155,16 @@ Notes:
void v1050_state::set_interrupt(int line, int state)
{
- m_pic->r_w(line, (m_int_mask & (1 << state)) ? 0 : 1);
+ if (state)
+ {
+ m_int_state |= (1 << line);
+ }
+ else
+ {
+ m_int_state &= ~(1 << line);
+ }
+
+ m_pic->r_w(line, ((m_int_state & m_int_mask) & (1 << line)) ? 0 : 1);
}
void v1050_state::bankswitch()
@@ -1137,4 +1145,4 @@ ROM_END
// System Drivers
// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS
-COMP( 1983, v1050, 0, 0, v1050, v1050, driver_device, 0, "Visual Technology Inc", "Visual 1050", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND | MACHINE_IMPERFECT_KEYBOARD )
+COMP( 1983, v1050, 0, 0, v1050, v1050, driver_device, 0, "Visual Technology Inc", "Visual 1050", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND | MACHINE_IMPERFECT_KEYBOARD )
diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp
index 66f1886b584..b8ae5425103 100644
--- a/src/mame/drivers/vc4000.cpp
+++ b/src/mame/drivers/vc4000.cpp
@@ -400,7 +400,7 @@ QUICKLOAD_LOAD_MEMBER( vc4000_state,vc4000)
int i;
int exec_addr;
int quick_length;
- dynamic_buffer quick_data;
+ std::vector<UINT8> quick_data;
int read_;
image_init_result result = image_init_result::FAIL;
diff --git a/src/mame/drivers/vcombat.cpp b/src/mame/drivers/vcombat.cpp
index ad72f7770b8..aad397a13f6 100644
--- a/src/mame/drivers/vcombat.cpp
+++ b/src/mame/drivers/vcombat.cpp
@@ -83,13 +83,14 @@ TODO : This is a partially working driver. Most of the memory maps for
*/
#include "emu.h"
-#include "rendlay.h"
#include "cpu/m68000/m68000.h"
#include "cpu/i860/i860.h"
+#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "video/tlc34076.h"
#include "video/mc6845.h"
-#include "sound/dac.h"
-#include "machine/nvram.h"
+#include "rendlay.h"
class vcombat_state : public driver_device
@@ -133,7 +134,7 @@ public:
required_device<cpu_device> m_soundcpu;
required_device<i860_cpu_device> m_vid_0;
optional_device<i860_cpu_device> m_vid_1;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
};
static UINT32 update_screen(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int index)
@@ -341,8 +342,9 @@ WRITE16_MEMBER(vcombat_state::crtc_w)
WRITE16_MEMBER(vcombat_state::vcombat_dac_w)
{
- INT16 newval = ((INT16)data - 0x6000) << 2;
- m_dac->write_signed16(newval + 0x8000);
+ m_dac->write(data >> 5);
+ if (data & 0x801f)
+ fprintf(stderr, "dac overflow %04x\n", data & 0x801f);
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, vcombat_state )
@@ -580,10 +582,10 @@ static MACHINE_CONFIG_START( vcombat, vcombat_state )
MCFG_SCREEN_RAW_PARAMS(XTAL_12MHz / 2, 400, 0, 256, 291, 0, 208)
MCFG_SCREEN_UPDATE_DRIVER(vcombat_state, screen_update_vcombat_aux)
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -614,10 +616,10 @@ static MACHINE_CONFIG_START( shadfgtr, vcombat_state )
MCFG_SCREEN_RAW_PARAMS(XTAL_20MHz / 4, 320, 0, 256, 277, 0, 224)
MCFG_SCREEN_UPDATE_DRIVER(vcombat_state, screen_update_vcombat_main)
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vectrex.cpp b/src/mame/drivers/vectrex.cpp
index 2cbc763c581..402f30b27cb 100644
--- a/src/mame/drivers/vectrex.cpp
+++ b/src/mame/drivers/vectrex.cpp
@@ -11,13 +11,13 @@ Bruce Tomlin (hardware info)
*****************************************************************/
#include "emu.h"
+#include "includes/vectrex.h"
#include "cpu/m6809/m6809.h"
-#include "video/vector.h"
#include "machine/6522via.h"
-#include "includes/vectrex.h"
-#include "sound/ay8910.h"
-#include "sound/dac.h"
#include "machine/nvram.h"
+#include "sound/ay8910.h"
+#include "sound/volt_reg.h"
+#include "video/vector.h"
#include "softlist.h"
static ADDRESS_MAP_START(vectrex_map, AS_PROGRAM, 8, vectrex_state )
@@ -105,13 +105,15 @@ static MACHINE_CONFIG_START( vectrex, vectrex_state )
MCFG_SCREEN_UPDATE_DRIVER(vectrex_state, screen_update_vectrex)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // mc1408.ic301 (also used for vector generation)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+
MCFG_SOUND_ADD("ay8912", AY8912, 1500000)
MCFG_AY8910_PORT_A_READ_CB(IOPORT("BUTTONS"))
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(vectrex_state, vectrex_psg_port_w))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2)
/* via */
MCFG_DEVICE_ADD("via6522_0", VIA6522, 0)
diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp
index 6beab3219bb..2360fe3fabd 100644
--- a/src/mame/drivers/vg5k.cpp
+++ b/src/mame/drivers/vg5k.cpp
@@ -50,13 +50,14 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/ram.h"
+#include "formats/vg5k_cas.h"
+#include "imagedev/cassette.h"
#include "imagedev/printer.h"
-#include "video/ef9345.h"
+#include "machine/ram.h"
#include "sound/dac.h"
-#include "imagedev/cassette.h"
#include "sound/wave.h"
-#include "formats/vg5k_cas.h"
+#include "sound/volt_reg.h"
+#include "video/ef9345.h"
#include "softlist.h"
class vg5k_state : public driver_device
@@ -74,7 +75,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<ef9345_device> m_ef9345;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<printer_image_device> m_printer;
required_device<cassette_image_device> m_cassette;
required_device<ram_device> m_ram;
@@ -138,7 +139,7 @@ READ8_MEMBER ( vg5k_state::cassette_r )
WRITE8_MEMBER ( vg5k_state::cassette_w )
{
- m_dac->write_unsigned8(data <<2);
+ m_dac->write(BIT(data, 3));
if (data == 0x03)
m_cassette->output(+1);
@@ -377,13 +378,14 @@ static MACHINE_CONFIG_START( vg5k, vg5k_state )
MCFG_PALETTE_ADD("palette", 8)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SOUND_ADD("dac", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_1BIT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.125)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT)
/* cassette */
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
- MCFG_SOUND_ROUTE(0, "mono", 0.25)
+ MCFG_SOUND_ROUTE(0, "speaker", 0.25)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_FORMATS(vg5k_cassette_formats)
diff --git a/src/mame/drivers/vic10.cpp b/src/mame/drivers/vic10.cpp
index 42ceda580d1..1cb9152842c 100644
--- a/src/mame/drivers/vic10.cpp
+++ b/src/mame/drivers/vic10.cpp
@@ -17,7 +17,6 @@
#include "cpu/m6502/m6510.h"
#include "machine/mos6526.h"
#include "machine/ram.h"
-#include "sound/dac.h"
#include "sound/mos6581.h"
#include "video/mos6566.h"
diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp
index 01025a50ae9..b19c2614325 100644
--- a/src/mame/drivers/vic20.cpp
+++ b/src/mame/drivers/vic20.cpp
@@ -20,7 +20,6 @@
#include "machine/6522via.h"
#include "machine/cbm_snqk.h"
#include "machine/ram.h"
-#include "sound/dac.h"
#include "sound/mos6560.h"
#define M6502_TAG "ue10"
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index 746ca1883ee..3547570b3bd 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -1299,10 +1299,10 @@ ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(vicdual_state::fake_lives_r)
{
/* use the low byte for the bitmask */
- UINT8 bit_mask = ((FPTR)param) & 0xff;
+ UINT8 bit_mask = ((uintptr_t)param) & 0xff;
/* and use d8 for the port */
- int port = ((FPTR)param) >> 8 & 1;
+ int port = ((uintptr_t)param) >> 8 & 1;
return (m_fake_lives[port].read_safe(0) & bit_mask) ? 0 : 1;
}
@@ -2106,7 +2106,7 @@ WRITE8_MEMBER(vicdual_state::samurai_protection_w)
CUSTOM_INPUT_MEMBER(vicdual_state::samurai_protection_r)
{
- int offset = (FPTR)param;
+ int offset = (uintptr_t)param;
UINT32 answer = 0;
if (m_samurai_protection_data == 0xab)
@@ -2282,7 +2282,7 @@ INPUT_CHANGED_MEMBER(vicdual_state::nsub_coin_in)
{
if (newval)
{
- int which = (int)(FPTR)param;
+ int which = (int)(uintptr_t)param;
int coinage = m_coinage->read();
switch (which)
diff --git a/src/mame/drivers/vidbrain.cpp b/src/mame/drivers/vidbrain.cpp
index 3152f953e56..15be596cddc 100644
--- a/src/mame/drivers/vidbrain.cpp
+++ b/src/mame/drivers/vidbrain.cpp
@@ -36,6 +36,8 @@
*/
#include "includes/vidbrain.h"
+#include "machine/rescap.h"
+#include "sound/volt_reg.h"
#include "softlist.h"
#include "vidbrain.lh"
@@ -142,19 +144,7 @@ WRITE8_MEMBER( vidbrain_state::sound_w )
if (!m_sound_clk && sound_clk)
{
- //m_discrete->write(space, NODE_01, m_keylatch & 0x03);
-
- UINT8 dac_data = 0;
-
- switch (m_keylatch & 0x03)
- {
- case 0: dac_data = 0x00; break;
- case 1: dac_data = 0x55; break;
- case 2: dac_data = 0xaa; break;
- case 3: dac_data = 0xff; break;
- }
-
- m_dac->write_unsigned8(dac_data);
+ m_dac->write(m_keylatch & 3);
}
m_sound_clk = sound_clk;
@@ -367,29 +357,6 @@ INPUT_PORTS_END
//**************************************************************************
-// SOUND
-//**************************************************************************
-
-//-------------------------------------------------
-// DISCRETE_SOUND( vidbrain )
-//-------------------------------------------------
-
-static const discrete_dac_r1_ladder vidbrain_dac =
-{
- 2,
- { RES_K(120), RES_K(120) }, // R=56K, 2R=120K
- 0, 0, RES_K(120), 0
-};
-
-static DISCRETE_SOUND_START( vidbrain )
- DISCRETE_INPUT_DATA(NODE_01)
- DISCRETE_DAC_R1(NODE_02, NODE_01, DEFAULT_TTL_V_LOGIC_1, &vidbrain_dac)
- DISCRETE_OUTPUT(NODE_02, 5000)
-DISCRETE_SOUND_END
-
-
-
-//**************************************************************************
// DEVICE CONFIGURATION
//**************************************************************************
@@ -545,13 +512,10 @@ static MACHINE_CONFIG_START( vidbrain, vidbrain_state )
MCFG_UV201_DB_CALLBACK(READ8(vidbrain_state, memory_read_byte))
// sound hardware
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_SOUND_ADD(DISCRETE_TAG, DISCRETE, 0)
- MCFG_DISCRETE_INTF(vidbrain)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_2BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.167) // 74ls74.u16 + 120k + 56k
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
// devices
MCFG_DEVICE_ADD(F3853_TAG, F3853, XTAL_4MHz/2)
diff --git a/src/mame/drivers/videopkr.cpp b/src/mame/drivers/videopkr.cpp
index 727c3968138..969634e91d7 100644
--- a/src/mame/drivers/videopkr.cpp
+++ b/src/mame/drivers/videopkr.cpp
@@ -285,6 +285,7 @@
#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "videopkr.lh"
#include "blckjack.lh"
#include "videocba.lh"
@@ -369,7 +370,7 @@ public:
void count_7dig(unsigned long data, UINT8 index);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
};
@@ -894,7 +895,7 @@ READ8_MEMBER(videopkr_state::baby_sound_p2_r)
WRITE8_MEMBER(videopkr_state::baby_sound_p2_w)
{
m_sbp2 = data;
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
}
READ8_MEMBER(videopkr_state::baby_sound_p3_r)
@@ -970,7 +971,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( i8039_sound_port, AS_IO, 8, videopkr_state )
AM_RANGE(0x00 , 0xff ) AM_READWRITE(sound_io_r, sound_io_w)
- AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8)
+ AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_byte_interface, write)
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(sound_p2_r, sound_p2_w)
ADDRESS_MAP_END
@@ -1255,9 +1256,10 @@ static MACHINE_CONFIG_START( videopkr, videopkr_state )
MCFG_PALETTE_INIT_OWNER(videopkr_state, videopkr)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.275) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1309,7 +1311,7 @@ static MACHINE_CONFIG_DERIVED( babypkr, videopkr )
MCFG_VIDEO_START_OVERRIDE(videopkr_state,vidadcba)
MCFG_SOUND_ADD("aysnd", AY8910, CPU_CLOCK / 6) /* no ports used */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.3)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( fortune1, videopkr )
diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp
index af5b0dae08f..2b538256a0b 100644
--- a/src/mame/drivers/vigilant.cpp
+++ b/src/mame/drivers/vigilant.cpp
@@ -22,12 +22,12 @@ Bottom board - M75-B-A (all versions regardless of mask ROM/EPROM)
***************************************************************************/
#include "emu.h"
+#include "includes/vigilant.h"
+#include "includes/iremipt.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/2203intf.h"
+#include "sound/volt_reg.h"
#include "sound/ym2151.h"
-#include "includes/vigilant.h"
-#include "includes/iremipt.h"
void vigilant_state::machine_start()
{
@@ -505,9 +505,9 @@ static MACHINE_CONFIG_START( vigilant, vigilant_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.55)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.55)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( buccanrs, vigilant_state )
@@ -564,9 +564,9 @@ static MACHINE_CONFIG_START( buccanrs, vigilant_state )
MCFG_SOUND_ROUTE(3, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(3, "rspeaker", 0.50)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.35)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.35)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.35) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.35) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( kikcubic, vigilant_state )
@@ -607,9 +607,9 @@ static MACHINE_CONFIG_START( kikcubic, vigilant_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 0.55)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.55)
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/vis.cpp b/src/mame/drivers/vis.cpp
index 706e39ae71b..1f5c3c77f7b 100644
--- a/src/mame/drivers/vis.cpp
+++ b/src/mame/drivers/vis.cpp
@@ -4,8 +4,9 @@
#include "emu.h"
#include "cpu/i86/i286.h"
#include "machine/at.h"
-#include "sound/dac.h"
#include "sound/262intf.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "bus/isa/isa_cards.h"
class vis_audio_device : public device_t,
@@ -22,8 +23,8 @@ protected:
virtual void dack16_w(int line, UINT16 data) override { if(m_samples < 2) m_sample[m_samples++] = data; else m_isa->drq7_w(CLEAR_LINE); }
virtual machine_config_constructor device_mconfig_additions() const override;
private:
- required_device<dac_device> m_dacr;
- required_device<dac_device> m_dacl;
+ required_device<dac_word_interface> m_rdac;
+ required_device<dac_word_interface> m_ldac;
UINT16 m_count;
UINT16 m_sample[2];
UINT8 m_index[2]; // unknown indexed registers, volume?
@@ -40,8 +41,8 @@ const device_type VIS_AUDIO = &device_creator<vis_audio_device>;
vis_audio_device::vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VIS_AUDIO, "vis_pcm", tag, owner, clock, "vis_pcm", __FILE__),
device_isa16_card_interface(mconfig, *this),
- m_dacr(*this, "dacr"),
- m_dacl(*this, "dacl")
+ m_rdac(*this, "rdac"),
+ m_ldac(*this, "ldac")
{
}
@@ -72,24 +73,24 @@ void vis_audio_device::device_timer(emu_timer &timer, device_timer_id id, int pa
case 0x80: // 8bit mono
{
UINT8 sample = m_sample[m_sample_byte >> 1] >> ((m_sample_byte & 1) * 8);
- m_dacl->write_signed8(sample);
- m_dacr->write_signed8(sample);
+ m_ldac->write(sample << 8);
+ m_rdac->write(sample << 8);
m_sample_byte++;
break;
}
case 0x00: // 8bit stereo
- m_dacl->write_signed8(m_sample[m_sample_byte >> 1] & 0xff);
- m_dacr->write_signed8(m_sample[m_sample_byte >> 1] >> 8);
+ m_ldac->write(m_sample[m_sample_byte >> 1] << 8);
+ m_rdac->write(m_sample[m_sample_byte >> 1] & 0xff00);
m_sample_byte += 2;
break;
case 0x88: // 16bit mono
- m_dacl->write((INT16)m_sample[m_sample_byte >> 1]);
- m_dacr->write((INT16)m_sample[m_sample_byte >> 1]);
+ m_ldac->write(m_sample[m_sample_byte >> 1] ^ 0x8000);
+ m_rdac->write(m_sample[m_sample_byte >> 1] ^ 0x8000);
m_sample_byte += 2;
break;
case 0x08: // 16bit stereo
- m_dacl->write((INT16)m_sample[0]);
- m_dacr->write((INT16)m_sample[1]);
+ m_ldac->write(m_sample[0] ^ 0x8000);
+ m_rdac->write(m_sample[1] ^ 0x8000);
m_sample_byte += 4;
break;
}
@@ -99,18 +100,16 @@ void vis_audio_device::device_timer(emu_timer &timer, device_timer_id id, int pa
m_sample_byte = 0;
m_samples = 0;
if(m_count)
- {
- m_count--;
m_isa->drq7_w(ASSERT_LINE);
- }
else
{
- m_dacl->write(0);
- m_dacr->write(0);
+ m_ldac->write(0x8000);
+ m_rdac->write(0x8000);
m_stat = 4;
m_pcm->adjust(attotime::never);
m_isa->irq7_w(ASSERT_LINE);
}
+ m_count--;
}
}
@@ -121,10 +120,11 @@ static MACHINE_CONFIG_FRAGMENT( vis_pcm_config )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
MCFG_SOUND_ROUTE(2, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
machine_config_constructor vis_audio_device::device_mconfig_additions() const
diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp
index 49253d6fdbd..4f5bac41fc5 100644
--- a/src/mame/drivers/wecleman.cpp
+++ b/src/mame/drivers/wecleman.cpp
@@ -1376,7 +1376,7 @@ void wecleman_state::wecleman_unpack_sprites()
void wecleman_state::bitswap(UINT8 *src,size_t len,int _14,int _13,int _12,int _11,int _10,int _f,int _e,int _d,int _c,int _b,int _a,int _9,int _8,int _7,int _6,int _5,int _4,int _3,int _2,int _1,int _0)
{
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
int i;
memcpy(&buffer[0],src,len);
@@ -1655,7 +1655,7 @@ void wecleman_state::hotchase_sprite_decode( int num16_banks, int bank_size )
int i;
base = memregion("gfx1")->base(); // sprites
- dynamic_buffer temp( bank_size );
+ std::vector<UINT8> temp( bank_size );
for( i = num16_banks; i >0; i-- ){
UINT8 *finish = base + 2*bank_size*i;
diff --git a/src/mame/drivers/wheelfir.cpp b/src/mame/drivers/wheelfir.cpp
index e2f2c10c88c..3f8dcc2c122 100644
--- a/src/mame/drivers/wheelfir.cpp
+++ b/src/mame/drivers/wheelfir.cpp
@@ -10,15 +10,13 @@ driver by
TODO:
-- sound comms
-- eeprom
+- analogue accelerator is really slow
- various gfx size/pos glitches (gaps, extra rows of pixels here and there)
- real gfx zoom, based on the zoom params, not lookup table
- apply double buffering (sometimes gfx is displayed at y+256 every other frame (extra bits are currently masked out))
- fix road/sky (extra bits in the scroll reg. are there two bitmap buffers? )
- bitmap layer clearing
- fix wrong coords of sprites rendered into the bitmap layer (intro car)
-- is toggle_bit really a vblank bit ? or somethign else (blitter status ?)
- implement(and find) layer enable/disable bits
@@ -208,11 +206,12 @@ suspicious code:
*/
-
#include "emu.h"
-#include "machine/eepromser.h"
#include "cpu/m68000/m68000.h"
+#include "machine/eepromser.h"
+#include "machine/gen_latch.h"
#include "sound/dac.h"
+#include "sound/volt_reg.h"
static const int ZOOM_TABLE_SIZE=1<<14;
static const int NUM_SCANLINES=256-8;
@@ -234,11 +233,13 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
+ m_eeprom(*this, "eeprom"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
+ required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -248,18 +249,14 @@ public:
std::unique_ptr<UINT8[]> m_palette_ptr;
INT32 m_palpos;
- INT32 m_current_scanline;
scroll_info *m_scanlines;
- INT32 m_soundlatch;
-
INT32 m_direct_write_x0;
INT32 m_direct_write_x1;
INT32 m_direct_write_y0;
INT32 m_direct_write_y1;
INT32 m_direct_write_idx;
- INT32 m_toggle_bit;
INT16 m_scanline_cnt;
@@ -277,18 +274,16 @@ public:
}
return 0;
}
- DECLARE_READ16_MEMBER(wheelfir_status_r);
DECLARE_WRITE16_MEMBER(wheelfir_scanline_cnt_w);
DECLARE_WRITE16_MEMBER(wheelfir_blit_w);
DECLARE_WRITE16_MEMBER(pal_reset_pos_w);
DECLARE_WRITE16_MEMBER(pal_data_w);
DECLARE_WRITE16_MEMBER(wheelfir_7c0000_w);
+ DECLARE_READ16_MEMBER(wheelfir_7c0000_r);
DECLARE_WRITE16_MEMBER(wheelfir_snd_w);
DECLARE_READ16_MEMBER(wheelfir_snd_r);
DECLARE_WRITE16_MEMBER(coin_cnt_w);
- DECLARE_DRIVER_INIT(wheelfir);
virtual void machine_start() override;
- virtual void machine_reset() override;
virtual void video_start() override;
UINT32 screen_update_wheelfir(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_wheelfir(screen_device &screen, bool state);
@@ -296,20 +291,6 @@ public:
};
-READ16_MEMBER(wheelfir_state::wheelfir_status_r)
-{
-/*
- fedcba9876543210
- x--------------- vblank ?
- --x------------- ? must be 1
- --------------x- ? eeprom
- ---------------x ? eeprom
-
-*/
-
- return m_toggle_bit| (machine().rand()&0x2000);
-}
-
WRITE16_MEMBER(wheelfir_state::wheelfir_scanline_cnt_w)
{
COMBINE_DATA(&m_scanline_cnt);
@@ -350,40 +331,6 @@ WRITE16_MEMBER(wheelfir_state::wheelfir_blit_w)
}
- int yscroll=-1;
- int xscroll=-1;
-
- if(offset==0x0a && ACCESSING_BITS_0_7)
- {
- xscroll = (m_blitter_data[0xa]&0x00ff) | (m_blitter_data[0x8]&0x0040) << 2;
- }
-
- if(offset==0x0b && ACCESSING_BITS_0_7)
- {
- yscroll = (m_blitter_data[0xb]&0x00ff) | (m_blitter_data[0x8]&0x0080) << 1;
- }
-
- if(offset==0x8 && ACCESSING_BITS_0_7)
- {
- xscroll = (m_blitter_data[0xa]&0x00ff) | (m_blitter_data[0x8]&0x0040) << 2;
- yscroll = (m_blitter_data[0xb]&0x00ff) | (m_blitter_data[0x8]&0x0080) << 1;
- }
-
- if(xscroll>=0)
- {
- int scl=m_current_scanline>=NUM_SCANLINES?0:m_current_scanline;
- m_scanlines[scl].x=xscroll;
- m_scanlines[scl].unkbits=m_blitter_data[0x8]&0xff;
- }
-
- if(yscroll>=0)
- {
- int scl=m_current_scanline>=NUM_SCANLINES?0:m_current_scanline;
- m_scanlines[scl].y=yscroll;
- m_scanlines[scl].unkbits=m_blitter_data[0x8]&0xff;
- }
-
-
if(offset==0xf && data==0xffff)
{
m_maincpu->set_input_line(1, HOLD_LINE);
@@ -557,7 +504,7 @@ WRITE16_MEMBER(wheelfir_state::wheelfir_blit_w)
}
else
{
- screen_y&=0xff;
+ if (vpage == LAYER_FG) screen_y&=0xff;
if(pix && screen_x >0 && screen_y >0 && screen_x < width && screen_y <height)
{
@@ -580,15 +527,14 @@ UINT32 wheelfir_state::screen_update_wheelfir(screen_device &screen, bitmap_ind1
{
bitmap.fill(0, cliprect);
- for(int y=0;y<NUM_SCANLINES;++y)
+ for(int y=cliprect.min_y; y < cliprect.max_y; y++)
{
UINT16 *source = &m_tmp_bitmap[LAYER_BG]->pix16(( (m_scanlines[y].y)&511));
UINT16 *dest = &bitmap.pix16(y);
- for (int x=0;x<336;x++)
+ for (int x = cliprect.min_x; x < cliprect.max_x; x++)
{
dest[x] = source[ (x+(m_scanlines[y].x)) &511];
-
}
}
@@ -638,19 +584,40 @@ WRITE16_MEMBER(wheelfir_state::pal_data_w)
WRITE16_MEMBER(wheelfir_state::wheelfir_7c0000_w)
{
- /* seems to be scanline width/2 (used for scanline int timing ? or real width of scanline ?) */
-}
+ if (ACCESSING_BITS_8_15)
+ {
+ //{UINT16 x = data & 0xf800; static int y = -1; if (x != y) { y = x; printf("%s wheelfir_7c0000_w %d%d%d%d%d\n", machine().describe_context(), BIT(data, 15), BIT(data, 14), BIT(data, 13), BIT(data, 12), BIT(data, 11)); }}
+ //{UINT16 x = data & 0x0700; static int y = -1; if (x != y) { y = x; printf("%s eeprom write %d%d%d\n", machine().describe_context(), BIT(data, 10), BIT(data, 9), BIT(data, 8)); }}
+ m_eeprom->di_write(BIT(data, 9));
+ m_eeprom->clk_write(BIT(data, 8));
+ m_eeprom->cs_write(BIT(data, 10));
+ }
-WRITE16_MEMBER(wheelfir_state::wheelfir_snd_w)
-{
- COMBINE_DATA(&m_soundlatch);
- m_subcpu->set_input_line(1, HOLD_LINE); /* guess, tested also with periodic interrupts and latch clear*/
- machine().scheduler().synchronize();
+ if (ACCESSING_BITS_0_7)
+ {
+ /// alternates between ac & ff
+ //printf("7c0001 %02x\n", data & 0xff);
+ /* seems to be scanline width/2 (used for scanline int timing ? or real width of scanline ?) */
+ }
}
-READ16_MEMBER(wheelfir_state::wheelfir_snd_r)
+READ16_MEMBER(wheelfir_state::wheelfir_7c0000_r)
{
- return m_soundlatch;
+ UINT16 data = 0;
+
+ if (ACCESSING_BITS_8_15)
+ {
+ data |= (machine().rand() & 0x2000); // ?
+ data |= m_eeprom->do_read() << 15;
+ //printf("%s eeprom read %04x %04x\n", machine().describe_context(), data, mem_mask);
+ }
+
+ if (ACCESSING_BITS_0_7)
+ {
+ //printf("unknown read %04x %04x\n", data, mem_mask);
+ }
+
+ return data;
}
WRITE16_MEMBER(wheelfir_state::coin_cnt_w)
@@ -660,7 +627,6 @@ WRITE16_MEMBER(wheelfir_state::coin_cnt_w)
machine().bookkeeping().coin_counter_w(1, data & 0x02);
}
-
static ADDRESS_MAP_START( wheelfir_main, AS_PROGRAM, 16, wheelfir_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x20ffff) AM_RAM
@@ -669,26 +635,27 @@ static ADDRESS_MAP_START( wheelfir_main, AS_PROGRAM, 16, wheelfir_state )
AM_RANGE(0x720000, 0x720001) AM_WRITE(pal_reset_pos_w)
AM_RANGE(0x720002, 0x720003) AM_WRITE(pal_data_w)
AM_RANGE(0x720004, 0x720005) AM_WRITENOP // always ffff?
- AM_RANGE(0x740000, 0x740001) AM_WRITE(wheelfir_snd_w)
- AM_RANGE(0x780000, 0x78000f) AM_READNOP /* net comms ? */
+ AM_RANGE(0x740000, 0x740001) AM_DEVWRITE("soundlatch", generic_latch_16_device, write)
AM_RANGE(0x760000, 0x760001) AM_WRITE(coin_cnt_w)
+ AM_RANGE(0x780000, 0x780005) AM_WRITENOP // Start ADC0808 conversion
+ AM_RANGE(0x780000, 0x780001) AM_READ_PORT("STEERING")
+ AM_RANGE(0x780002, 0x780003) AM_READ_PORT("ACCELERATOR")
+ AM_RANGE(0x780004, 0x780005) AM_READ_PORT("BRAKE")
AM_RANGE(0x7a0000, 0x7a0001) AM_WRITE(wheelfir_scanline_cnt_w)
- AM_RANGE(0x7c0000, 0x7c0001) AM_READWRITE(wheelfir_status_r, wheelfir_7c0000_w)
+ AM_RANGE(0x7c0000, 0x7c0001) AM_READWRITE(wheelfir_7c0000_r, wheelfir_7c0000_w)
AM_RANGE(0x7e0000, 0x7e0001) AM_READ_PORT("P1")
AM_RANGE(0x7e0002, 0x7e0003) AM_READ_PORT("P2")
-
- ADDRESS_MAP_END
+ADDRESS_MAP_END
-/* sub is sound cpu? the program roms contain lots of samples */
static ADDRESS_MAP_START( wheelfir_sub, AS_PROGRAM, 16, wheelfir_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x20ffff) AM_RAM
- AM_RANGE(0x780000, 0x780001) AM_READ(wheelfir_snd_r)
+ AM_RANGE(0x780000, 0x780001) AM_DEVREAD("soundlatch", generic_latch_16_device, read)
- AM_RANGE(0x700000, 0x700001) AM_DEVWRITE8("dac1", dac_device, write_unsigned8, 0xff00) //guess for now
- AM_RANGE(0x740000, 0x740001) AM_DEVWRITE8("dac2", dac_device, write_unsigned8, 0xff00)
+ AM_RANGE(0x700000, 0x700001) AM_DEVWRITE("ldac", dac_word_interface, write)
+ AM_RANGE(0x740000, 0x740001) AM_DEVWRITE("rdac", dac_word_interface, write)
ADDRESS_MAP_END
@@ -706,9 +673,7 @@ static INPUT_PORTS_START( wheelfir )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_DIPNAME( 0x1000, 0x1000, "Test / Game?" )
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Test" )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) /* net comm flag ? */
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -723,50 +688,51 @@ static INPUT_PORTS_START( wheelfir )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("STEERING")
+ PORT_BIT(0xff, 0x80, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Steering Wheel") PORT_REVERSE
+
+ PORT_START("ACCELERATOR")
+ PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_INVERT PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Accelerator Pedal") PORT_MINMAX(0x00, 0xff) PORT_REVERSE
+
+ PORT_START("BRAKE")
+ PORT_BIT(0xff, 0x00, IPT_PEDAL2) PORT_INVERT PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_NAME("Brake Pedal") PORT_MINMAX(0x00, 0xff) PORT_REVERSE
INPUT_PORTS_END
TIMER_DEVICE_CALLBACK_MEMBER(wheelfir_state::scanline_timer_callback)
{
- machine().scheduler().synchronize();
- m_current_scanline=param;
-
- if(m_current_scanline<NUM_SCANLINES)
+ if(param<NUM_SCANLINES)
{
- //visible scanline
+ //copy scanline offset
+ int xscroll = (m_blitter_data[0xa] & 0x00ff) | (m_blitter_data[0x8] & 0x0040) << 2;
+ int yscroll = (m_blitter_data[0xb] & 0x00ff) | (m_blitter_data[0x8] & 0x0080) << 1;
- m_toggle_bit = 0x0000;
+ m_scanlines[param].x = xscroll;
+ m_scanlines[param].y = yscroll;
+ m_scanlines[param].unkbits = m_blitter_data[0x8] & 0xff;
- --m_scanline_cnt;
+ m_blitter_data[0xb]++;
- if(m_current_scanline>0)
- {
- //copy scanline offset
- m_scanlines[m_current_scanline].x=(m_scanlines[m_current_scanline-1].x);
- m_scanlines[m_current_scanline].y=(m_scanlines[m_current_scanline-1].y+1);
- m_scanlines[m_current_scanline].unkbits=m_scanlines[m_current_scanline-1].unkbits;
- }
-
- if(m_scanline_cnt==0) //<=0 ?
+ //visible scanline
+ m_scanline_cnt--;
+ if(m_scanline_cnt==0)
{
m_maincpu->set_input_line(5, HOLD_LINE); // raster IRQ, changes scroll values for road
}
-
+ //m_screen->update_partial(param);
}
else
{
- if(m_current_scanline==NUM_SCANLINES) /* vblank */
+ if(param==NUM_SCANLINES) /* vblank */
{
- m_toggle_bit = 0x8000;
m_maincpu->set_input_line(3, HOLD_LINE);
}
}
-}
-
-void wheelfir_state::machine_reset()
-{
+ m_subcpu->set_input_line(1, HOLD_LINE);
}
+
void wheelfir_state::machine_start()
{
m_zoom_table = std::make_unique<INT32[]>(ZOOM_TABLE_SIZE);
@@ -808,9 +774,8 @@ static MACHINE_CONFIG_START( wheelfir, wheelfir_state )
MCFG_CPU_ADD("subcpu", M68000, 32000000/2)
MCFG_CPU_PROGRAM_MAP(wheelfir_sub)
- //MCFG_CPU_PERIODIC_INT_DRIVER(wheelfir_state, irq1_line_hold, 256*60)
- MCFG_QUANTUM_TIME(attotime::from_hz(12000))
+ //MCFG_QUANTUM_TIME(attotime::from_hz(12000))
MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_timer", wheelfir_state, scanline_timer_callback, "screen", 0, 1)
@@ -827,15 +792,15 @@ static MACHINE_CONFIG_START( wheelfir, wheelfir_state )
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
-
+ MCFG_GENERIC_LATCH_16_ADD("soundlatch")
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("dac1")
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+ MCFG_SOUND_ADD("ldac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_10BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -857,12 +822,9 @@ ROM_START( wheelfir )
ROM_LOAD( "tch9.u57", 0x280000, 0x80000, CRC(83c66de3) SHA1(50deaf3338d590340b928f891548c47ba8f3ca38) )
ROM_LOAD( "tch10.u58",0x300000, 0x80000, CRC(2036ed80) SHA1(910381e2ccdbc2d06f873021d8af02795d22f595) )
ROM_LOAD( "tch12.u59",0x380000, 0x80000, CRC(cce2e675) SHA1(f3d8916077b2e057169d0f254005cd959789a3b3) )
-ROM_END
-DRIVER_INIT_MEMBER(wheelfir_state,wheelfir)
-{
- UINT16 *RAM = (UINT16 *)memregion("maincpu")->base();
- RAM[0xdd3da/2] = 0x4e71; //hack
-}
+ ROM_REGION16_BE(0x80, "eeprom", 0)
+ ROM_LOAD16_WORD_SWAP( "eeprom", 0x000000, 0x000080, CRC(961e4bc9) SHA1(8944504bf56a272e9aa08185e73c6b4212d52383) )
+ROM_END
-GAME( 199?, wheelfir, 0, wheelfir, wheelfir, wheelfir_state, wheelfir, ROT0, "TCH", "Wheels & Fire", MACHINE_NOT_WORKING|MACHINE_NO_SOUND )
+GAME( 199?, wheelfir, 0, wheelfir, wheelfir, driver_device, 0, ROT0, "TCH", "Wheels & Fire", MACHINE_IMPERFECT_GRAPHICS)
diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp
index c2270fdffc6..1e5ca947030 100644
--- a/src/mame/drivers/wildpkr.cpp
+++ b/src/mame/drivers/wildpkr.cpp
@@ -367,7 +367,7 @@ hd63484cp8 advanced CRT controller
*/
-ROM_START( tabpkr )
+ROM_START( tabpkr ) // Royal Poker V 1.85 Oct 29 1996 12:20:07
ROM_REGION( 0x300000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD16_BYTE( "rop1851.bin", 0x000001, 0x80000, CRC(fbe13fa8) SHA1(7c19b6b4d9a9935b6feb70b6261bafc6d9afb59f) )
ROM_LOAD16_BYTE( "rop1853.bin", 0x000000, 0x80000, CRC(e0c312b4) SHA1(57c64c82f723067b7b2f9bf3fdaf5aedeb4f9dc3) )
@@ -393,4 +393,4 @@ DRIVER_INIT_MEMBER(wildpkr_state,wildpkr)
/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
GAME( 199?, wildpkr, 0, wildpkr, wildpkr, wildpkr_state, wildpkr, ROT0, "TAB Austria", "Wild Poker (ver. D 1.01)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
-GAME( 199?, tabpkr, 0, tabpkr, wildpkr, wildpkr_state, wildpkr, ROT0, "TAB Austria", "Unknown Tab Austria Poker", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
+GAME( 1996, tabpkr, 0, tabpkr, wildpkr, wildpkr_state, wildpkr, ROT0, "TAB Austria", "Royal Poker V 1.85", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION )
diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp
index 324fe044cfb..2489ed1de5c 100644
--- a/src/mame/drivers/williams.cpp
+++ b/src/mame/drivers/williams.cpp
@@ -503,6 +503,8 @@ Reference video: https://www.youtube.com/watch?v=R5OeC6Wc_yI
#include "emu.h"
#include "includes/williams.h"
#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK (XTAL_12MHz)
@@ -1459,10 +1461,10 @@ static MACHINE_CONFIG_START( williams, williams_state )
MCFG_VIDEO_START_OVERRIDE(williams_state,williams)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("wmsdac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // mc1408.ic6
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* pia */
MCFG_DEVICE_ADD("pia_0", PIA6821, 0)
@@ -1476,7 +1478,7 @@ static MACHINE_CONFIG_START( williams, williams_state )
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_state, williams_main_irq))
MCFG_DEVICE_ADD("pia_2", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("wmsdac", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_state,williams_snd_irq))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_state,williams_snd_irq))
MACHINE_CONFIG_END
@@ -1556,7 +1558,7 @@ static MACHINE_CONFIG_DERIVED( sinistar, williams )
/* sound hardware */
MCFG_SOUND_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8)
/* pia */
MCFG_DEVICE_MODIFY("pia_0")
@@ -1578,7 +1580,7 @@ static MACHINE_CONFIG_DERIVED( playball, williams )
/* sound hardware */
MCFG_SOUND_ADD("cvsd", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.8)
/* pia */
MCFG_DEVICE_MODIFY("pia_1")
@@ -1624,20 +1626,25 @@ static MACHINE_CONFIG_DERIVED( blaster, blastkit )
MCFG_DEVICE_MODIFY("pia_1")
MCFG_PIA_WRITEPB_HANDLER(WRITE8(blaster_state, blaster_snd_cmd_w))
+ MCFG_DEVICE_MODIFY("pia_2")
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("ldac", dac_byte_interface, write))
+
MCFG_DEVICE_ADD("pia_2b", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("wmsdac_b", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("rdac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(WRITELINE(blaster_state,williams_snd_irq_b))
MCFG_PIA_IRQB_HANDLER(WRITELINE(blaster_state,williams_snd_irq_b))
/* sound hardware */
- MCFG_DEVICE_REMOVE("wmsdac")
- MCFG_DEVICE_REMOVE("mono")
+ MCFG_DEVICE_REMOVE("speaker")
+ MCFG_DEVICE_REMOVE("dac")
+ MCFG_DEVICE_REMOVE("vref")
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
- MCFG_DAC_ADD("wmsdac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_DAC_ADD("wmsdac_b")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ MCFG_SOUND_ADD("ldac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) // unknown DAC
+ MCFG_SOUND_ADD("rdac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
@@ -1678,10 +1685,10 @@ static MACHINE_CONFIG_START( williams2, williams2_state )
MCFG_VIDEO_START_OVERRIDE(williams2_state,williams2)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
-
- MCFG_DAC_ADD("wmsdac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac", MC1408, 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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* pia */
MCFG_DEVICE_ADD("pia_0", PIA6821, 0)
@@ -1698,7 +1705,7 @@ static MACHINE_CONFIG_START( williams2, williams2_state )
MCFG_DEVICE_ADD("pia_2", PIA6821, 0)
MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("pia_1", pia6821_device, portb_w))
- MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("wmsdac", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_CA2_HANDLER(DEVWRITELINE("pia_1", pia6821_device, cb1_w))
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_state,williams_snd_irq))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_state,williams_snd_irq))
@@ -1749,8 +1756,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( joust2, williams2, joust2_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(williams2_d000_rom_map)
- MCFG_WILLIAMS_CVSD_SOUND_ADD("cvsd")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("cvsd", WILLIAMS_CVSD_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_MACHINE_START_OVERRIDE(joust2_state,joust2)
MCFG_MACHINE_RESET_OVERRIDE(joust2_state,joust2)
diff --git a/src/mame/drivers/wink.cpp b/src/mame/drivers/wink.cpp
index 2ea760fd7b1..44780a64522 100644
--- a/src/mame/drivers/wink.cpp
+++ b/src/mame/drivers/wink.cpp
@@ -428,7 +428,7 @@ DRIVER_INIT_MEMBER(wink_state,wink)
{
UINT32 i;
UINT8 *ROM = memregion("maincpu")->base();
- dynamic_buffer buffer(0x8000);
+ std::vector<UINT8> buffer(0x8000);
// protection module reverse engineered by HIGHWAYMAN
diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp
index ecdf27c241e..ef0e3b3ca3a 100644
--- a/src/mame/drivers/wmg.cpp
+++ b/src/mame/drivers/wmg.cpp
@@ -72,6 +72,8 @@ of save-state is also needed.
#include "includes/williams.h"
#include "cpu/m6800/m6800.h"
#include "machine/nvram.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#define MASTER_CLOCK (XTAL_12MHz)
#define SOUND_CLOCK (XTAL_3_579545MHz)
@@ -477,10 +479,11 @@ static MACHINE_CONFIG_START( wmg, wmg_state )
MCFG_VIDEO_START_OVERRIDE(williams_state,williams)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("wmsdac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MCFG_SOUND_ADD("dac", MC1408, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
/* pia */
MCFG_DEVICE_ADD("pia_0", PIA6821, 0)
@@ -495,7 +498,7 @@ static MACHINE_CONFIG_START( wmg, wmg_state )
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_state, williams_main_irq))
MCFG_DEVICE_ADD("pia_2", PIA6821, 0)
- MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("wmsdac", dac_device, write_unsigned8))
+ MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("dac", dac_byte_interface, write))
MCFG_PIA_IRQA_HANDLER(WRITELINE(williams_state,williams_snd_irq))
MCFG_PIA_IRQB_HANDLER(WRITELINE(williams_state,williams_snd_irq))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp
index 549628162ae..2f3eee098d8 100644
--- a/src/mame/drivers/wolfpack.cpp
+++ b/src/mame/drivers/wolfpack.cpp
@@ -48,7 +48,7 @@ void wolfpack_state::machine_reset()
CUSTOM_INPUT_MEMBER(wolfpack_state::wolfpack_dial_r)
{
- int bit = (FPTR)param;
+ int bit = (uintptr_t)param;
return ((ioport("DIAL")->read() + bit) / 2) & 0x01;
}
diff --git a/src/mame/drivers/wpc_an.cpp b/src/mame/drivers/wpc_an.cpp
index 96e665aa08a..2f10e967a4e 100644
--- a/src/mame/drivers/wpc_an.cpp
+++ b/src/mame/drivers/wpc_an.cpp
@@ -329,13 +329,21 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( wpc_an, wpc_an_state )
MCFG_FRAGMENT_ADD(wpc_an_base)
- MCFG_WMS_WPC_SOUND_ADD("wpcsnd",":sound1")
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("wpcsnd", WPCSND, 0)
+ MCFG_WPC_ROM_REGION(":sound1")
MCFG_WPC_SOUND_REPLY_CALLBACK(WRITELINE(wpc_an_state,wpcsnd_reply_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( wpc_an_dd, wpc_an_state )
MCFG_FRAGMENT_ADD(wpc_an_base)
- MCFG_WMS_S11C_BG_ADD("bg",":sound1")
+
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("bg", S11C_BG, 0)
+ MCFG_S11C_BG_ROM_REGION(":sound1")
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
/*-----------------
diff --git a/src/mame/drivers/wpc_dot.cpp b/src/mame/drivers/wpc_dot.cpp
index 4bd300c356a..98b5833d08b 100644
--- a/src/mame/drivers/wpc_dot.cpp
+++ b/src/mame/drivers/wpc_dot.cpp
@@ -311,8 +311,11 @@ static MACHINE_CONFIG_START( wpc_dot, wpc_dot_state )
MCFG_WPC_SOUND_DATA(READ8(wpc_dot_state,wpc_sound_data_r),WRITE8(wpc_dot_state,wpc_sound_data_w))
MCFG_WPC_DMDBANK(WRITE8(wpc_dot_state,wpc_dmdbank_w))
- MCFG_WMS_WPC_SOUND_ADD("wpcsnd",":sound1")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("wpcsnd", WPCSND, 0)
+ MCFG_WPC_ROM_REGION(":sound1")
MCFG_WPC_SOUND_REPLY_CALLBACK(WRITELINE(wpc_dot_state,wpcsnd_reply_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DEFAULT_LAYOUT(layout_lcd)
diff --git a/src/mame/drivers/wpc_flip1.cpp b/src/mame/drivers/wpc_flip1.cpp
index c907cf51de5..1330ae18ead 100644
--- a/src/mame/drivers/wpc_flip1.cpp
+++ b/src/mame/drivers/wpc_flip1.cpp
@@ -167,8 +167,11 @@ static MACHINE_CONFIG_START( wpc_flip1, wpc_flip1_state )
MCFG_WPC_SOUND_DATA(READ8(wpc_dot_state,wpc_sound_data_r),WRITE8(wpc_dot_state,wpc_sound_data_w))
MCFG_WPC_DMDBANK(WRITE8(wpc_dot_state,wpc_dmdbank_w))
- MCFG_WMS_WPC_SOUND_ADD("wpcsnd",":sound1")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("wpcsnd", WPCSND, 0)
+ MCFG_WPC_ROM_REGION(":sound1")
MCFG_WPC_SOUND_REPLY_CALLBACK(WRITELINE(wpc_dot_state,wpcsnd_reply_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DEFAULT_LAYOUT(layout_lcd)
diff --git a/src/mame/drivers/wpc_flip2.cpp b/src/mame/drivers/wpc_flip2.cpp
index 3b04999cab6..b2514c21971 100644
--- a/src/mame/drivers/wpc_flip2.cpp
+++ b/src/mame/drivers/wpc_flip2.cpp
@@ -196,8 +196,11 @@ static MACHINE_CONFIG_START( wpc_flip2, wpc_flip2_state )
MCFG_WPC_SOUND_DATA(READ8(wpc_dot_state,wpc_sound_data_r),WRITE8(wpc_dot_state,wpc_sound_data_w))
MCFG_WPC_DMDBANK(WRITE8(wpc_dot_state,wpc_dmdbank_w))
- MCFG_WMS_WPC_SOUND_ADD("wpcsnd",":sound1")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("wpcsnd", WPCSND, 0)
+ MCFG_WPC_ROM_REGION(":sound1")
MCFG_WPC_SOUND_REPLY_CALLBACK(WRITELINE(wpc_dot_state,wpcsnd_reply_w))
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_DEFAULT_LAYOUT(layout_lcd)
diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp
index cc56896b589..9181618dd37 100644
--- a/src/mame/drivers/x07.cpp
+++ b/src/mame/drivers/x07.cpp
@@ -916,7 +916,7 @@ inline UINT8 x07_state::get_char(UINT16 pos)
INPUT_CHANGED_MEMBER( x07_state::kb_func_keys )
{
UINT8 data = 0;
- UINT8 idx = (UINT8)(FPTR)param;
+ UINT8 idx = (UINT8)(uintptr_t)param;
if (m_kb_on && newval)
{
@@ -943,7 +943,7 @@ INPUT_CHANGED_MEMBER( x07_state::kb_keys )
UINT8 modifier;
UINT8 a1 = ioport("A1")->read();
UINT8 bz = ioport("BZ")->read();
- UINT8 keycode = (UINT8)(FPTR)param;
+ UINT8 keycode = (UINT8)(uintptr_t)param;
if (m_kb_on && !newval)
{
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index 55448209726..cb7ef3c61a1 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -1771,7 +1771,7 @@ MACHINE_CONFIG_END
ROM_START( x68000 )
ROM_REGION16_BE(0x1000000, "maincpu", 0) // 16MB address space
- ROM_DEFAULT_BIOS("ipl10")
+ ROM_DEFAULT_BIOS("cz600ce")
ROM_LOAD( "cgrom.dat", 0xf00000, 0xc0000, CRC(9f3195f1) SHA1(8d72c5b4d63bb14c5dbdac495244d659aa1498b6) )
ROM_SYSTEM_BIOS(0, "ipl10", "IPL-ROM V1.0 (87/05/07)")
ROMX_LOAD( "iplrom.dat", 0xfe0000, 0x20000, CRC(72bdf532) SHA1(0ed038ed2133b9f78c6e37256807424e0d927560), ROM_BIOS(1) )
@@ -1781,6 +1781,9 @@ ROM_START( x68000 )
ROMX_LOAD( "iplromco.dat", 0xfe0000, 0x020000, CRC(6c7ef608) SHA1(77511fc58798404701f66b6bbc9cbde06596eba7), ROM_BIOS(3) )
ROM_SYSTEM_BIOS(3, "ipl13", "IPL-ROM V1.3 (92/11/27)")
ROMX_LOAD( "iplrom30.dat", 0xfe0000, 0x020000, CRC(e8f8fdad) SHA1(239e9124568c862c31d9ec0605e32373ea74b86a), ROM_BIOS(4) )
+ ROM_SYSTEM_BIOS(4, "cz600ce", "CZ-600CE IPL-ROM V1.0 (87/03/18)")
+ ROMX_LOAD( "rh-ix0897cezz.ic12", 0xfe0000, 0x010000, CRC(cdc95995) SHA1(810cae207ffd29926e604cf1eb964ae8ea1fadb5), ROM_BIOS(5) | ROM_SKIP(1) )
+ ROMX_LOAD( "rh-ix0898cezz.ic11", 0xfe0001, 0x010000, CRC(e60e09a8) SHA1(f3d4a6506493ea3ac7b9c8e441d781fbdd61abd5), ROM_BIOS(5) | ROM_SKIP(1) )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
ROM_FILL(0x0000,0x8000,0x00)
ROM_REGION(0x20000, "user2", 0)
@@ -1799,6 +1802,9 @@ ROM_START( x68ksupr )
ROMX_LOAD( "iplromco.dat", 0xfe0000, 0x020000, CRC(6c7ef608) SHA1(77511fc58798404701f66b6bbc9cbde06596eba7), ROM_BIOS(3) )
ROM_SYSTEM_BIOS(3, "ipl13", "IPL-ROM V1.3 (92/11/27)")
ROMX_LOAD( "iplrom30.dat", 0xfe0000, 0x020000, CRC(e8f8fdad) SHA1(239e9124568c862c31d9ec0605e32373ea74b86a), ROM_BIOS(4) )
+ ROM_SYSTEM_BIOS(4, "cz600ce", "CZ-600CE IPL-ROM V1.0 (87/03/18)")
+ ROMX_LOAD( "rh-ix0897cezz.ic12", 0xfe0000, 0x010000, CRC(cdc95995) SHA1(810cae207ffd29926e604cf1eb964ae8ea1fadb5), ROM_BIOS(5) | ROM_SKIP(1) )
+ ROMX_LOAD( "rh-ix0898cezz.ic11", 0xfe0001, 0x010000, CRC(e60e09a8) SHA1(f3d4a6506493ea3ac7b9c8e441d781fbdd61abd5), ROM_BIOS(5) | ROM_SKIP(1) )
ROM_LOAD("scsiinsu.bin",0xfc0000, 0x002000, CRC(f65a3e24) SHA1(15a17798839a3f7f361119205aebc301c2df5967) ) // Dumped from an X68000 Super HD
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
@@ -1819,6 +1825,9 @@ ROM_START( x68kxvi )
ROMX_LOAD( "iplromco.dat", 0xfe0000, 0x020000, CRC(6c7ef608) SHA1(77511fc58798404701f66b6bbc9cbde06596eba7), ROM_BIOS(3) )
ROM_SYSTEM_BIOS(3, "ipl13", "IPL-ROM V1.3 (92/11/27)")
ROMX_LOAD( "iplrom30.dat", 0xfe0000, 0x020000, CRC(e8f8fdad) SHA1(239e9124568c862c31d9ec0605e32373ea74b86a), ROM_BIOS(4) )
+ ROM_SYSTEM_BIOS(4, "cz600ce", "CZ-600CE IPL-ROM V1.0 (87/03/18)")
+ ROMX_LOAD( "rh-ix0897cezz.ic12", 0xfe0000, 0x010000, CRC(cdc95995) SHA1(810cae207ffd29926e604cf1eb964ae8ea1fadb5), ROM_BIOS(5) | ROM_SKIP(1) )
+ ROMX_LOAD( "rh-ix0898cezz.ic11", 0xfe0001, 0x010000, CRC(e60e09a8) SHA1(f3d4a6506493ea3ac7b9c8e441d781fbdd61abd5), ROM_BIOS(5) | ROM_SKIP(1) )
ROM_LOAD("scsiinco.bin",0xfc0000, 0x002000, CRC(2485e14d) SHA1(101a9bba8ea4bb90965c144bcfd7182f889ab958) ) // Dumped from an X68000 XVI Compact
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
@@ -1839,6 +1848,9 @@ ROM_START( x68030 )
ROMX_LOAD( "iplromco.dat", 0xfe0000, 0x020000, CRC(6c7ef608) SHA1(77511fc58798404701f66b6bbc9cbde06596eba7), ROM_BIOS(3) )
ROM_SYSTEM_BIOS(3, "ipl13", "IPL-ROM V1.3 (92/11/27)")
ROMX_LOAD( "iplrom30.dat", 0xfe0000, 0x020000, CRC(e8f8fdad) SHA1(239e9124568c862c31d9ec0605e32373ea74b86a), ROM_BIOS(4) )
+ ROM_SYSTEM_BIOS(4, "cz600ce", "CZ-600CE IPL-ROM V1.0 (87/03/18)")
+ ROMX_LOAD( "rh-ix0897cezz.ic12", 0xfe0000, 0x010000, CRC(cdc95995) SHA1(810cae207ffd29926e604cf1eb964ae8ea1fadb5), ROM_BIOS(5) | ROM_SKIP(1) )
+ ROMX_LOAD( "rh-ix0898cezz.ic11", 0xfe0001, 0x010000, CRC(e60e09a8) SHA1(f3d4a6506493ea3ac7b9c8e441d781fbdd61abd5), ROM_BIOS(5) | ROM_SKIP(1) )
ROM_LOAD("scsiinrom.dat",0xfc0000, 0x002000, CRC(1c6c889e) SHA1(3f063d4231cdf53da6adc4db96533725e260076a) BAD_DUMP )
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp
index c1d22bcd585..1863a72a536 100644
--- a/src/mame/drivers/xtheball.cpp
+++ b/src/mame/drivers/xtheball.cpp
@@ -10,12 +10,12 @@
#include "emu.h"
#include "cpu/tms34010/tms34010.h"
-#include "video/tlc34076.h"
#include "machine/ticket.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
#include "sound/dac.h"
-
+#include "sound/volt_reg.h"
+#include "video/tlc34076.h"
class xtheball_state : public driver_device
{
@@ -248,7 +248,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, xtheball_state )
AM_RANGE(0x03040160, 0x0304016f) AM_READ_PORT("SERVICE")
AM_RANGE(0x03040170, 0x0304017f) AM_READ_PORT("SERVICE1")
AM_RANGE(0x03040180, 0x0304018f) AM_READ(analogy_watchdog_r)
- AM_RANGE(0x03060000, 0x0306000f) AM_DEVWRITE8("dac", dac_device, write_unsigned8, 0xff00)
+ AM_RANGE(0x03060000, 0x0306000f) AM_DEVWRITE8("dac", dac_byte_interface, write, 0xff00)
AM_RANGE(0x04000000, 0x057fffff) AM_ROM AM_REGION("user2", 0)
AM_RANGE(0xc0000000, 0xc00001ff) AM_DEVREADWRITE("maincpu", tms34010_device, io_register_r, io_register_w)
AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
@@ -360,10 +360,11 @@ static MACHINE_CONFIG_START( xtheball, xtheball_state )
MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
- MCFG_DAC_ADD("dac")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_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_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/xxmissio.cpp b/src/mame/drivers/xxmissio.cpp
index b826848f1d5..b5ee061d7ad 100644
--- a/src/mame/drivers/xxmissio.cpp
+++ b/src/mame/drivers/xxmissio.cpp
@@ -23,7 +23,7 @@ WRITE8_MEMBER(xxmissio_state::bank_sel_w)
CUSTOM_INPUT_MEMBER(xxmissio_state::status_r)
{
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
return (m_status & bit_mask) ? 1 : 0;
}
diff --git a/src/mame/drivers/z100.cpp b/src/mame/drivers/z100.cpp
index f6cdba22820..e94fc57e98d 100644
--- a/src/mame/drivers/z100.cpp
+++ b/src/mame/drivers/z100.cpp
@@ -422,7 +422,7 @@ INPUT_CHANGED_MEMBER(z100_state::key_stroke)
if(newval && !oldval)
{
/* TODO: table */
- m_keyb_press = (UINT8)(FPTR)(param) & 0xff;
+ m_keyb_press = (UINT8)(uintptr_t)(param) & 0xff;
//pic8259_ir6_w(m_picm, 1);
m_keyb_status = 1;
}
diff --git a/src/mame/drivers/zaccaria.cpp b/src/mame/drivers/zaccaria.cpp
index 71aa07c5471..dc345153403 100644
--- a/src/mame/drivers/zaccaria.cpp
+++ b/src/mame/drivers/zaccaria.cpp
@@ -366,9 +366,9 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state )
MCFG_PALETTE_INIT_OWNER(zaccaria_state, zaccaria)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_ZACCARIA_1B11142("audiopcb")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("audiopcb", ZACCARIA_1B11142, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp
index 3da5c7365af..cfcf6844566 100644
--- a/src/mame/drivers/zaxxon.cpp
+++ b/src/mame/drivers/zaxxon.cpp
@@ -350,7 +350,7 @@ READ8_MEMBER(zaxxon_state::razmataz_counter_r)
CUSTOM_INPUT_MEMBER(zaxxon_state::razmataz_dial_r)
{
- int num = (FPTR)param;
+ int num = (uintptr_t)param;
int res;
int delta = m_dials[num]->read();
@@ -399,14 +399,14 @@ INPUT_CHANGED_MEMBER(zaxxon_state::zaxxon_coin_inserted)
{
if (newval)
{
- m_coin_status[(int)(FPTR)param] = m_coin_enable[(int)(FPTR)param];
+ m_coin_status[(int)(uintptr_t)param] = m_coin_enable[(int)(uintptr_t)param];
}
}
CUSTOM_INPUT_MEMBER(zaxxon_state::zaxxon_coin_r)
{
- return m_coin_status[(int)(FPTR)param];
+ return m_coin_status[(int)(uintptr_t)param];
}
@@ -939,7 +939,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( zaxxon, root )
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FRAGMENT_ADD(zaxxon_samples)
MACHINE_CONFIG_END
@@ -976,7 +976,7 @@ static MACHINE_CONFIG_DERIVED( futspye, root )
MCFG_SCREEN_UPDATE_DRIVER(zaxxon_state, screen_update_futspy)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_FRAGMENT_ADD(zaxxon_samples)
MACHINE_CONFIG_END
@@ -1000,7 +1000,7 @@ static MACHINE_CONFIG_DERIVED( razmataze, root )
MCFG_SCREEN_UPDATE_DRIVER(zaxxon_state, screen_update_razmataz)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_SEGAUSBROM_ADD("usbsnd")
MACHINE_CONFIG_END
@@ -1038,15 +1038,15 @@ static MACHINE_CONFIG_DERIVED( congo, root )
MCFG_SCREEN_UPDATE_DRIVER(zaxxon_state, screen_update_congo)
/* sound hardware */
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
MCFG_SOUND_ADD("sn1", SN76489A, SOUND_CLOCK) // schematic shows sn76489A
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_SOUND_ADD("sn2", SN76489A, SOUND_CLOCK/4) // schematic shows sn76489A
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MCFG_FRAGMENT_ADD(congo_samples)
MACHINE_CONFIG_END
diff --git a/src/mame/includes/advision.h b/src/mame/includes/advision.h
index 67182a92163..5912479f15c 100644
--- a/src/mame/includes/advision.h
+++ b/src/mame/includes/advision.h
@@ -33,7 +33,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<generic_slot_device> m_cart;
required_memory_bank m_bank1;
required_ioport m_joy;
@@ -65,7 +65,7 @@ public:
int m_ea_bank;
/* external RAM state */
- dynamic_buffer m_ext_ram;
+ std::vector<UINT8> m_ext_ram;
int m_rambank;
/* video state */
@@ -75,7 +75,7 @@ public:
int m_video_bank;
int m_video_hpos;
UINT8 m_led_latch[8];
- dynamic_buffer m_display;
+ std::vector<UINT8> m_display;
/* sound state */
int m_sound_cmd;
diff --git a/src/mame/includes/alesis.h b/src/mame/includes/alesis.h
index c4bb2efa70e..6fb23198755 100644
--- a/src/mame/includes/alesis.h
+++ b/src/mame/includes/alesis.h
@@ -44,7 +44,7 @@ protected:
private:
static const device_timer_id TIMER_DAC_UPDATE = 1;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
required_region_ptr<INT8> m_samples;
emu_timer * m_dac_update_timer;
diff --git a/src/mame/includes/apple2.h b/src/mame/includes/apple2.h
index 0216a80236e..bc5979fb60e 100644
--- a/src/mame/includes/apple2.h
+++ b/src/mame/includes/apple2.h
@@ -11,6 +11,7 @@
#ifndef APPLE2_H_
#define APPLE2_H_
+#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/m65c02.h"
#include "bus/a2bus/a2bus.h"
diff --git a/src/mame/includes/apple3.h b/src/mame/includes/apple3.h
index 384989adf90..68ba39a40e2 100644
--- a/src/mame/includes/apple3.h
+++ b/src/mame/includes/apple3.h
@@ -19,7 +19,6 @@
#include "machine/6522via.h"
#include "machine/kb3600.h"
#include "machine/mm58167.h"
-#include "sound/speaker.h"
#include "sound/dac.h"
#include "machine/wozfdc.h"
#include "imagedev/floppy.h"
@@ -34,9 +33,6 @@
#define VAR_EXTPOWER 0x0040
#define VAR_EXTSIDE 0x0080
-#define SPEAKER_TAG "a3spkr"
-#define DAC_TAG "a3dac"
-
class apple3_state : public driver_device
{
public:
@@ -51,8 +47,8 @@ public:
m_ay3600(*this, "ay3600"),
m_a2bus(*this, "a2bus"),
m_rtc(*this, "rtc"),
- m_speaker(*this, SPEAKER_TAG),
- m_dac(*this, DAC_TAG),
+ m_bell(*this, "bell"),
+ m_dac(*this, "dac"),
m_kbspecial(*this, "keyb_special"),
m_palette(*this, "palette"),
m_joy1x(*this, "joy_1_x"),
@@ -77,8 +73,8 @@ public:
required_device<ay3600_device> m_ay3600;
required_device<a2bus_device> m_a2bus;
required_device<mm58167_device> m_rtc;
- required_device<speaker_sound_device> m_speaker;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_bell;
+ required_device<dac_byte_interface> m_dac;
required_ioport m_kbspecial;
required_device<palette_device> m_palette;
required_ioport m_joy1x, m_joy1y, m_joy2x, m_joy2y, m_joybuttons;
@@ -157,7 +153,7 @@ private:
UINT8 *m_bank2, *m_bank3, *m_bank4, *m_bank5, *m_bank8, *m_bank9;
UINT8 *m_bank10, *m_bank11;
UINT8 *m_bank6, *m_bank7rd, *m_bank7wr;
- int m_speaker_state;
+ int m_bell_state;
int m_c040_time;
UINT16 m_lastchar, m_strobe;
UINT8 m_transchar;
diff --git a/src/mame/includes/archimds.h b/src/mame/includes/archimds.h
index 9156fa255eb..8b818c27022 100644
--- a/src/mame/includes/archimds.h
+++ b/src/mame/includes/archimds.h
@@ -55,7 +55,9 @@ public:
m_region_maincpu(*this, "maincpu"),
m_region_vram(*this, "vram"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_dac(*this, { "dac0", "dac1", "dac2", "dac3", "dac4", "dac5", "dac6", "dac7" })
+ { }
optional_device<aakart_device> m_kart;
void archimedes_init();
@@ -103,7 +105,7 @@ protected:
required_memory_region m_region_vram;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- dac_device *m_dac[8];
+ required_device_array<dac_word_interface, 8> m_dac;
private:
diff --git a/src/mame/includes/bw12.h b/src/mame/includes/bw12.h
index 39330c20fcb..24b6d39ce65 100644
--- a/src/mame/includes/bw12.h
+++ b/src/mame/includes/bw12.h
@@ -16,7 +16,6 @@
#include "machine/upd765.h"
#include "machine/z80dart.h"
#include "video/mc6845.h"
-#include "sound/dac.h"
#define SCREEN_TAG "screen"
#define Z80_TAG "ic35"
@@ -25,7 +24,6 @@
#define Z80SIO_TAG "ic15"
#define PIT8253_TAG "ic34"
#define PIA6821_TAG "ic16"
-#define MC1408_TAG "ic4"
#define AY3600PRO002_TAG "ic74"
#define CENTRONICS_TAG "centronics"
#define FLOPPY_TIMER_TAG "motor_off"
diff --git a/src/mame/includes/cchasm.h b/src/mame/includes/cchasm.h
index cc8ea7f0446..7389a213521 100644
--- a/src/mame/includes/cchasm.h
+++ b/src/mame/includes/cchasm.h
@@ -38,8 +38,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<z80ctc_device> m_ctc;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
+ required_device<dac_bit_interface> m_dac1;
+ required_device<dac_bit_interface> m_dac2;
required_device<vector_device> m_vector;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
@@ -51,7 +51,6 @@ public:
int m_sound_flags;
int m_coin_flag;
- int m_channel_active[2];
int m_output[2];
int m_xcenter;
int m_ycenter;
diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h
index c2f4a70dfb8..ca82f5db17c 100644
--- a/src/mame/includes/champbas.h
+++ b/src/mame/includes/champbas.h
@@ -8,7 +8,6 @@
#include "machine/alpha8201.h"
#include "machine/watchdog.h"
-#include "sound/dac.h"
class champbas_state : public driver_device
@@ -20,8 +19,6 @@ public:
m_audiocpu(*this, "audiocpu"),
m_alpha_8201(*this, "alpha_8201"),
m_watchdog(*this, "watchdog"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_mainram(*this, "mainram"),
@@ -35,8 +32,6 @@ public:
optional_device<cpu_device> m_audiocpu;
optional_device<alpha_8201_device> m_alpha_8201;
required_device<watchdog_timer_device> m_watchdog;
- optional_device<dac_device> m_dac1;
- optional_device<dac_device> m_dac2;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -62,9 +57,6 @@ public:
INTERRUPT_GEN_MEMBER(vblank_irq);
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq);
- DECLARE_WRITE8_MEMBER(dac1_w);
- DECLARE_WRITE8_MEMBER(dac2_w);
-
DECLARE_WRITE8_MEMBER(tilemap_w);
DECLARE_WRITE8_MEMBER(gfxbank_w);
DECLARE_WRITE8_MEMBER(palette_bank_w);
diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h
index 7957a0802f6..c413340d551 100644
--- a/src/mame/includes/cheekyms.h
+++ b/src/mame/includes/cheekyms.h
@@ -6,6 +6,7 @@
*************************************************************************/
+#include "sound/dac.h"
class cheekyms_state : public driver_device
{
@@ -13,7 +14,14 @@ public:
cheekyms_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
+ m_dac0(*this, "dac0"),
+ m_dac1(*this, "dac1"),
+ m_dac2(*this, "dac2"),
+ m_dac3(*this, "dac3"),
+ m_dac4(*this, "dac4"),
+ m_dac5(*this, "dac5"),
+ m_dac6(*this, "dac6"),
+ m_dac7(*this, "dac7"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
@@ -23,7 +31,14 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac0;
+ required_device<dac_bit_interface> m_dac1;
+ required_device<dac_bit_interface> m_dac2;
+ required_device<dac_bit_interface> m_dac3;
+ required_device<dac_bit_interface> m_dac4;
+ required_device<dac_bit_interface> m_dac5;
+ required_device<dac_bit_interface> m_dac6;
+ required_device<dac_bit_interface> m_dac7;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h
index 782a605243d..86ed08bc4bc 100644
--- a/src/mame/includes/circusc.h
+++ b/src/mame/includes/circusc.h
@@ -47,7 +47,7 @@ public:
required_device<cpu_device> m_audiocpu;
required_device<sn76496_device> m_sn_1;
required_device<sn76496_device> m_sn_2;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<discrete_device> m_discrete;
UINT8 m_irq_mask;
diff --git a/src/mame/includes/coco.h b/src/mame/includes/coco.h
index 642c05c3d93..41a05277905 100644
--- a/src/mame/includes/coco.h
+++ b/src/mame/includes/coco.h
@@ -49,7 +49,6 @@ SLOT_INTERFACE_EXTERN( coco_cart );
#define SAM_TAG "sam"
#define VDG_TAG "vdg"
#define SCREEN_TAG "screen"
-#define DAC_TAG "dac"
#define CARTRIDGE_TAG "ext"
#define RS232_TAG "rs232"
#define DWSOCK_TAG "dwsock"
@@ -93,7 +92,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<pia6821_device> m_pia_0;
required_device<pia6821_device> m_pia_1;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<wave_device> m_wave;
required_device<cococart_slot_device> m_cococart;
required_device<ram_device> m_ram;
@@ -233,9 +232,9 @@ private:
UINT8 floating_bus_read(void);
// input ports
- ioport_port *m_keyboard[7];
- ioport_port *m_joystick_type_control;
- ioport_port *m_joystick_hires_control;
+ required_ioport_array<7> m_keyboard;
+ optional_ioport m_joystick_type_control;
+ optional_ioport m_joystick_hires_control;
analog_input_t m_joystick;
analog_input_t m_rat_mouse;
analog_input_t m_diecom_lightgun;
diff --git a/src/mame/includes/coolpool.h b/src/mame/includes/coolpool.h
index 622f46dbe30..dc377c6c9eb 100644
--- a/src/mame/includes/coolpool.h
+++ b/src/mame/includes/coolpool.h
@@ -1,7 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Aaron Giles,Nicola Salmoria
#define NVRAM_UNLOCK_SEQ_LEN 10
-#include "sound/dac.h"
+
+#include "emu.h"
+#include "cpu/tms34010/tms34010.h"
+#include "video/tlc34076.h"
class coolpool_state : public driver_device
{
@@ -10,14 +13,12 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_dsp(*this, "dsp"),
- m_dac(*this, "dac"),
m_tlc34076(*this, "tlc34076"),
m_vram_base(*this, "vram_base"),
m_nvram(*this, "nvram") { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_dsp;
- required_device<dac_device> m_dac;
optional_device<tlc34076_device> m_tlc34076;
required_shared_ptr<UINT16> m_vram_base;
@@ -62,7 +63,6 @@ public:
DECLARE_READ16_MEMBER(dsp_rom_r);
DECLARE_WRITE16_MEMBER(dsp_romaddr_w);
DECLARE_READ16_MEMBER(coolpool_input_r);
- DECLARE_WRITE16_MEMBER(dsp_dac_w);
TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
TMS340X0_SCANLINE_RGB32_CB_MEMBER(amerdart_scanline);
diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h
index 6a2058f0f58..7a17da42b7d 100644
--- a/src/mame/includes/cosmic.h
+++ b/src/mame/includes/cosmic.h
@@ -55,7 +55,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<samples_device> m_samples;
- required_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac;
optional_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -64,6 +64,7 @@ public:
DECLARE_WRITE8_MEMBER(panic_sound_output2_w);
DECLARE_WRITE8_MEMBER(cosmicg_output_w);
DECLARE_WRITE8_MEMBER(cosmica_sound_output_w);
+ DECLARE_WRITE8_MEMBER(dac_w);
DECLARE_READ8_MEMBER(cosmica_pixel_clock_r);
DECLARE_READ8_MEMBER(cosmicg_port_0_r);
DECLARE_READ8_MEMBER(magspot_coinage_dip_r);
@@ -71,7 +72,7 @@ public:
DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_WRITE8_MEMBER(cosmic_color_register_w);
DECLARE_WRITE8_MEMBER(cosmic_background_enable_w);
- DECLARE_INPUT_CHANGED_MEMBER(panic_coin_inserted);
+ DECLARE_WRITE_LINE_MEMBER(panic_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(cosmica_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(cosmicg_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq0);
diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h
index 66d536c7116..7b22a12c1e6 100644
--- a/src/mame/includes/cvs.h
+++ b/src/mame/includes/cvs.h
@@ -75,8 +75,8 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
- optional_device<dac_device> m_dac2;
- optional_device<dac_device> m_dac3;
+ optional_device<dac_byte_interface> m_dac2;
+ optional_device<dac_bit_interface> m_dac3;
optional_device<tms5110_device> m_tms5110;
optional_device<s2636_device> m_s2636_0;
optional_device<s2636_device> m_s2636_1;
diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h
index 1ad764daba9..ff2ed22e5c1 100644
--- a/src/mame/includes/cyberbal.h
+++ b/src/mame/includes/cyberbal.h
@@ -22,8 +22,8 @@ public:
m_audiocpu(*this, "audiocpu"),
m_extracpu(*this, "extra"),
m_daccpu(*this, "dac"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
+ m_rdac(*this, "rdac"),
+ m_ldac(*this, "ldac"),
m_soundcomm(*this, "soundcomm"),
m_jsa(*this, "jsa"),
m_playfield_tilemap(*this, "playfield"),
@@ -39,8 +39,8 @@ public:
optional_device<m6502_device> m_audiocpu;
optional_device<cpu_device> m_extracpu;
optional_device<cpu_device> m_daccpu;
- optional_device<dac_device> m_dac1;
- optional_device<dac_device> m_dac2;
+ optional_device<dac_word_interface> m_rdac;
+ optional_device<dac_word_interface> m_ldac;
optional_device<atari_sound_comm_device> m_soundcomm;
optional_device<atari_jsa_ii_device> m_jsa;
required_device<tilemap_device> m_playfield_tilemap;
diff --git a/src/mame/includes/decocass.h b/src/mame/includes/decocass.h
index ea4f78a4158..6402fb96840 100644
--- a/src/mame/includes/decocass.h
+++ b/src/mame/includes/decocass.h
@@ -183,6 +183,7 @@ public:
DECLARE_MACHINE_RESET(cbdash);
DECLARE_MACHINE_RESET(cflyball);
DECLARE_MACHINE_RESET(cmanhat);
+ DECLARE_MACHINE_RESET(cocean1a); /* 10 */
UINT32 screen_update_decocass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE8_MEMBER(decocass_coin_counter_w);
DECLARE_WRITE8_MEMBER(decocass_sound_command_w);
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index 650b102187a..e41bcb21f6e 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -77,8 +77,8 @@ public:
required_device<alpha_8201_device> m_alpha_8201;
optional_device<cpu_device> m_fakemcu;
required_device<msm5232_device> m_msm;
- required_device<dac_device> m_dac_1;
- required_device<dac_device> m_dac_2;
+ required_device<dac_byte_interface> m_dac_1;
+ required_device<dac_byte_interface> m_dac_2;
required_device<generic_latch_8_device> m_soundlatch;
DECLARE_WRITE8_MEMBER(equites_c0f8_w);
diff --git a/src/mame/includes/esripsys.h b/src/mame/includes/esripsys.h
index 43994ec4ada..9ff17ac03b4 100644
--- a/src/mame/includes/esripsys.h
+++ b/src/mame/includes/esripsys.h
@@ -71,7 +71,6 @@ public:
UINT8 m_s_to_g_latch1;
UINT8 m_s_to_g_latch2;
UINT8 m_dac_msb;
- UINT8 m_dac_vol;
UINT8 m_tms_data;
std::unique_ptr<UINT8[]> m_fdt_a;
std::unique_ptr<UINT8[]> m_fdt_b;
@@ -111,7 +110,6 @@ public:
DECLARE_READ8_MEMBER(tms5220_r);
DECLARE_WRITE8_MEMBER(tms5220_w);
DECLARE_WRITE8_MEMBER(control_w);
- DECLARE_WRITE8_MEMBER(volume_dac_w);
DECLARE_WRITE8_MEMBER(esripsys_bg_intensity_w);
DECLARE_INPUT_CHANGED_MEMBER(keypad_interrupt);
DECLARE_INPUT_CHANGED_MEMBER(coin_interrupt);
@@ -124,7 +122,7 @@ public:
TIMER_CALLBACK_MEMBER(delayed_bank_swap);
TIMER_CALLBACK_MEMBER(hblank_start_callback);
TIMER_CALLBACK_MEMBER(hblank_end_callback);
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
required_device<screen_device> m_screen;
ESRIP_DRAW(esripsys_draw);
};
diff --git a/src/mame/includes/exidy.h b/src/mame/includes/exidy.h
index 594a7ad9873..2f0afba69f7 100644
--- a/src/mame/includes/exidy.h
+++ b/src/mame/includes/exidy.h
@@ -52,7 +52,7 @@ public:
required_device<cpu_device> m_maincpu;
- optional_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac;
optional_device<samples_device> m_samples;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
diff --git a/src/mame/includes/exterm.h b/src/mame/includes/exterm.h
index cf1f601913b..8da912409cb 100644
--- a/src/mame/includes/exterm.h
+++ b/src/mame/includes/exterm.h
@@ -5,8 +5,8 @@
Gottlieb Exterminator hardware
*************************************************************************/
-#include "sound/dac.h"
#include "cpu/tms32010/tms32010.h"
+#include "cpu/tms34010/tms34010.h"
class exterm_state : public driver_device
{
@@ -17,7 +17,6 @@ public:
m_audiocpu(*this, "audiocpu"),
m_audioslave(*this, "audioslave"),
m_slave(*this, "slave"),
- m_dac(*this, "dac"),
m_master_videoram(*this, "master_videoram"),
m_slave_videoram(*this, "slave_videoram") { }
@@ -25,7 +24,6 @@ public:
required_device<cpu_device> m_audiocpu;
required_device<cpu_device> m_audioslave;
required_device<tms34010_device> m_slave;
- required_device<dac_device> m_dac;
required_shared_ptr<UINT16> m_master_videoram;
required_shared_ptr<UINT16> m_slave_videoram;
@@ -35,7 +33,6 @@ public:
UINT8 m_master_sound_latch;
UINT8 m_slave_sound_latch;
UINT8 m_sound_control;
- UINT8 m_dac_value[2];
UINT16 m_last;
DECLARE_WRITE16_MEMBER(exterm_host_data_w);
@@ -50,7 +47,6 @@ public:
DECLARE_READ8_MEMBER(sound_nmi_to_slave_r);
DECLARE_WRITE8_MEMBER(sound_control_w);
DECLARE_WRITE8_MEMBER(ym2151_data_latch_w);
- DECLARE_WRITE8_MEMBER(sound_slave_dac_w);
DECLARE_PALETTE_INIT(exterm);
TIMER_CALLBACK_MEMBER(sound_delayed_w);
TIMER_DEVICE_CALLBACK_MEMBER(master_sound_nmi_callback);
diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h
index d7dd2558b1d..6c540310715 100644
--- a/src/mame/includes/fidelz80.h
+++ b/src/mame/includes/fidelz80.h
@@ -8,7 +8,7 @@
******************************************************************************/
#include "emu.h"
-#include "sound/speaker.h"
+#include "sound/dac.h"
#include "sound/s14001a.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
@@ -23,7 +23,7 @@ public:
m_inp_matrix(*this, "IN.%u", 0),
m_speech(*this, "speech"),
m_speech_rom(*this, "speech"),
- m_speaker(*this, "speaker"),
+ m_dac(*this, "dac"),
m_cart(*this, "cartslot"),
m_display_wait(33),
m_display_maxy(1),
@@ -35,7 +35,7 @@ public:
optional_ioport_array<11> m_inp_matrix; // max 11
optional_device<s14001a_device> m_speech;
optional_region_ptr<UINT8> m_speech_rom;
- optional_device<speaker_sound_device> m_speaker;
+ optional_device<dac_bit_interface> m_dac;
optional_device<generic_slot_device> m_cart;
// misc common
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index c55c82cfb52..ee742054c19 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -64,7 +64,7 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_audio2;
- optional_device<dac_device> m_dac;
+ optional_device<dac_byte_interface> m_dac;
optional_device<ay8910_device> m_ay8910_0;
optional_device<ay8910_device> m_ay8910_1;
optional_device<ay8910_device> m_ay8910_2;
diff --git a/src/mame/includes/galeb.h b/src/mame/includes/galeb.h
index 0c25b29d759..32ff8a45193 100644
--- a/src/mame/includes/galeb.h
+++ b/src/mame/includes/galeb.h
@@ -9,6 +9,7 @@
#ifndef GALEB_H_
#define GALEB_H_
+#include "sound/dac.h"
class galeb_state : public driver_device
{
@@ -18,15 +19,32 @@ public:
m_video_ram(*this, "video_ram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ m_palette(*this, "palette"),
+ m_keyboard(*this, "LINE%u", 0),
+ m_dac(*this, "dac"),
+ m_dac_state(0)
+ {
+ }
required_shared_ptr<UINT8> m_video_ram;
- DECLARE_READ8_MEMBER(galeb_keyboard_r);
+ DECLARE_WRITE8_MEMBER(dac_w);
+ DECLARE_READ8_MEMBER(keyboard_r);
+ DECLARE_READ8_MEMBER(tape_status_r);
+ DECLARE_READ8_MEMBER(tape_data_r);
+ DECLARE_WRITE8_MEMBER(tape_data_w);
virtual void video_start() override;
UINT32 screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
+ required_ioport_array<8> m_keyboard;
+ required_device<dac_1bit_device> m_dac;
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ int m_dac_state;
};
/*----------- defined in video/galeb.c -----------*/
diff --git a/src/mame/includes/gamecom.h b/src/mame/includes/gamecom.h
index b6f494918f6..2afe93a5546 100644
--- a/src/mame/includes/gamecom.h
+++ b/src/mame/includes/gamecom.h
@@ -281,9 +281,9 @@ private:
required_shared_ptr<UINT8> m_p_videoram;
required_shared_ptr<UINT8> m_p_nvram;
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
- required_device<dac_device> m_dac0;
- required_device<dac_device> m_dac1;
+ required_device<dac_byte_interface> m_dac;
+ required_device<dac_byte_interface> m_dac0;
+ required_device<dac_byte_interface> m_dac1;
required_device<generic_slot_device> m_cart1;
required_device<generic_slot_device> m_cart2;
required_memory_bank m_bank1;
diff --git a/src/mame/includes/gba.h b/src/mame/includes/gba.h
index efb8406778d..9f3446d3b86 100644
--- a/src/mame/includes/gba.h
+++ b/src/mame/includes/gba.h
@@ -16,10 +16,10 @@ public:
gba_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_ladac(*this, "direct_a_left"),
- m_radac(*this, "direct_a_right"),
- m_lbdac(*this, "direct_b_left"),
- m_rbdac(*this, "direct_b_right"),
+ m_ldaca(*this, "ldaca"),
+ m_rdaca(*this, "rdaca"),
+ m_ldacb(*this, "ldacb"),
+ m_rdacb(*this, "rdacb"),
m_gbsound(*this, "custom"),
m_cart(*this, "cartslot"),
m_region_maincpu(*this, "maincpu"),
@@ -28,10 +28,10 @@ public:
{ }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_ladac;
- required_device<dac_device> m_radac;
- required_device<dac_device> m_lbdac;
- required_device<dac_device> m_rbdac;
+ required_device<dac_byte_interface> m_ldaca;
+ required_device<dac_byte_interface> m_rdaca;
+ required_device<dac_byte_interface> m_ldacb;
+ required_device<dac_byte_interface> m_rdacb;
required_device<gameboy_sound_device> m_gbsound;
required_device<gba_cart_slot_device> m_cart;
diff --git a/src/mame/includes/gp32.h b/src/mame/includes/gp32.h
index 65ae4f28ed0..54dac50d19f 100644
--- a/src/mame/includes/gp32.h
+++ b/src/mame/includes/gp32.h
@@ -97,8 +97,8 @@ public:
m_s3c240x_ram(*this, "s3c240x_ram"),
m_maincpu(*this, "maincpu"),
m_smartmedia(*this, "smartmedia"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_nvram(*this, "nvram"),
m_io_in0(*this, "IN0"),
m_io_in1(*this, "IN1"),
@@ -187,8 +187,8 @@ public:
protected:
required_device<cpu_device> m_maincpu;
required_device<smartmedia_image_device> m_smartmedia;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
required_device<nvram_device> m_nvram;
required_ioport m_io_in0;
required_ioport m_io_in1;
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index 58a430885bf..1e0394d6e17 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -257,8 +257,8 @@ protected:
optional_device<adsp2105_device> m_ds3xdsp;
optional_memory_region m_ds3sdsp_region;
optional_memory_region m_ds3xdsp_region;
- optional_device<dac_device> m_ds3dac1;
- optional_device<dac_device> m_ds3dac2;
+ optional_device<dac_word_interface> m_ldac;
+ optional_device<dac_word_interface> m_rdac;
optional_device<harddriv_sound_board_device> m_harddriv_sound;
optional_device<atari_jsa_base_device> m_jsa;
optional_device<screen_device> m_screen;
@@ -497,7 +497,7 @@ protected:
private:
required_device<cpu_device> m_soundcpu;
- required_device<dac_device> m_dac;
+ required_device<dac_word_interface> m_dac;
required_device<cpu_device> m_sounddsp;
required_shared_ptr<UINT16> m_sounddsp_ram;
required_region_ptr<UINT8> m_sound_rom;
@@ -507,7 +507,6 @@ private:
UINT16 m_sounddata;
UINT16 m_maindata;
- UINT8 m_dacmute;
UINT8 m_cramen;
UINT8 m_irq68k;
diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h
index a50bc1087ff..9779570f090 100644
--- a/src/mame/includes/hh_ucom4.h
+++ b/src/mame/includes/hh_ucom4.h
@@ -36,9 +36,13 @@ public:
// misc common
UINT8 m_port[9]; // MCU port A-I write data (optional)
+ UINT8 m_int; // MCU INT pin state
UINT16 m_inp_mux; // multiplexed inputs mask
UINT8 read_inputs(int columns);
+ void refresh_interrupts(void);
+ void set_interrupt(int state);
+ DECLARE_INPUT_CHANGED_MEMBER(single_interrupt_line);
// display common
int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h
index 94b55813073..f2062f7eda3 100644
--- a/src/mame/includes/homedata.h
+++ b/src/mame/includes/homedata.h
@@ -2,7 +2,6 @@
// copyright-holders:Phil Stroffolino, Nicola Salmoria
#include "machine/gen_latch.h"
-#include "sound/dac.h"
#include "sound/sn76496.h"
#include "sound/2203intf.h"
@@ -15,7 +14,6 @@ public:
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
- m_dac(*this, "dac"),
m_ymsnd(*this, "ymsnd"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -53,7 +51,6 @@ public:
/* device */
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
- optional_device<dac_device> m_dac;
optional_device<ym2203_device> m_ymsnd;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -65,7 +62,6 @@ public:
DECLARE_WRITE8_MEMBER(mrokumei_keyboard_select_w);
DECLARE_READ8_MEMBER(mrokumei_sound_io_r);
DECLARE_WRITE8_MEMBER(mrokumei_sound_bank_w);
- DECLARE_WRITE8_MEMBER(mrokumei_sound_io_w);
DECLARE_WRITE8_MEMBER(mrokumei_sound_cmd_w);
DECLARE_READ8_MEMBER(reikaids_upd7807_porta_r);
DECLARE_WRITE8_MEMBER(reikaids_upd7807_porta_w);
diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h
index 67aa83b2ae0..f34746878ef 100644
--- a/src/mame/includes/hp48.h
+++ b/src/mame/includes/hp48.h
@@ -103,7 +103,7 @@ public:
void hp48_update_annunciators();
void hp48_apply_modules();
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_device<palette_device> m_palette;
void hp48_pulse_irq( int irq_line);
void hp48_rs232_start_recv_byte( UINT8 data );
diff --git a/src/mame/includes/hp9845.h b/src/mame/includes/hp9845.h
new file mode 100644
index 00000000000..999a4435264
--- /dev/null
+++ b/src/mame/includes/hp9845.h
@@ -0,0 +1,145 @@
+// license:BSD-3-Clause
+// copyright-holders:F. Ulivi
+// **************************
+// Driver for HP 9845B system
+// **************************
+#ifndef _HP9845_H_
+#define _HP9845_H_
+
+#include "emu.h"
+#include "cpu/hphybrid/hphybrid.h"
+#include "machine/hp_taco.h"
+#include "sound/beep.h"
+#include "bus/hp9845_io/hp9845_io.h"
+
+class hp9845b_state : public driver_device
+{
+public:
+ hp9845b_state(const machine_config &mconfig, device_type type, const char *tag);
+
+ UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void device_reset() override;
+
+ TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
+ TIMER_DEVICE_CALLBACK_MEMBER(gv_timer);
+
+ void vblank_w(screen_device &screen, bool state);
+
+ void set_graphic_mode(bool graphic);
+ DECLARE_READ16_MEMBER(graphic_r);
+ DECLARE_WRITE16_MEMBER(graphic_w);
+ attotime time_to_gv_mem_availability(void) const;
+ void advance_gv_fsm(bool ds , bool trigger);
+ void update_graphic_bits(void);
+
+ IRQ_CALLBACK_MEMBER(irq_callback);
+ void update_irq(void);
+ void irq_w(UINT8 sc , int state);
+ void update_flg_sts(void);
+ void sts_w(UINT8 sc , int state);
+ void flg_w(UINT8 sc , int state);
+ void install_readwrite_handler(UINT8 sc , read16_delegate rhandler, write16_delegate whandler);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(kb_scan);
+ DECLARE_READ16_MEMBER(kb_scancode_r);
+ DECLARE_READ16_MEMBER(kb_status_r);
+ DECLARE_WRITE16_MEMBER(kb_irq_clear_w);
+ TIMER_DEVICE_CALLBACK_MEMBER(beeper_off);
+
+ DECLARE_WRITE8_MEMBER(pa_w);
+
+ DECLARE_WRITE_LINE_MEMBER(t15_irq_w);
+ DECLARE_WRITE_LINE_MEMBER(t15_flg_w);
+ DECLARE_WRITE_LINE_MEMBER(t15_sts_w);
+
+private:
+ required_device<hp_5061_3001_cpu_device> m_lpu;
+ required_device<hp_5061_3001_cpu_device> m_ppu;
+ required_device<screen_device> m_screen;
+ required_device<palette_device> m_palette;
+ required_device<timer_device> m_gv_timer;
+ required_ioport m_io_key0;
+ required_ioport m_io_key1;
+ required_ioport m_io_key2;
+ required_ioport m_io_key3;
+ required_device<hp_taco_device> m_t15;
+ required_device<beep_device> m_beeper;
+ required_device<timer_device> m_beep_timer;
+ required_device<hp9845_io_slot_device> m_io_slot0;
+
+ void set_video_mar(UINT16 mar);
+ void video_fill_buff(bool buff_idx);
+ void video_render_buff(unsigned video_scanline , unsigned line_in_row, bool buff_idx);
+ void graphic_video_render(unsigned video_scanline);
+
+ // Character generator
+ const UINT8 *m_chargen;
+
+ // Optional character generator
+ const UINT8 *m_optional_chargen;
+
+ // Text mode video I/F
+ typedef struct {
+ UINT8 chars[ 80 ];
+ UINT8 attrs[ 80 ];
+ bool full;
+ } video_buffer_t;
+
+ bitmap_rgb32 m_bitmap;
+ offs_t m_video_mar;
+ UINT16 m_video_word;
+ bool m_video_load_mar;
+ bool m_video_first_mar;
+ bool m_video_byte_idx;
+ UINT8 m_video_attr;
+ bool m_video_buff_idx;
+ bool m_video_blanked;
+ video_buffer_t m_video_buff[ 2 ];
+
+ // Graphic video
+ typedef enum {
+ GV_STAT_RESET,
+ GV_STAT_WAIT_DS_0 = GV_STAT_RESET,
+ GV_STAT_WAIT_TRIG_0,
+ GV_STAT_WAIT_MEM_0,
+ GV_STAT_WAIT_DS_1,
+ GV_STAT_WAIT_DS_2,
+ GV_STAT_WAIT_TRIG_1,
+ GV_STAT_WAIT_MEM_1,
+ GV_STAT_WAIT_MEM_2
+ } gv_fsm_state_t;
+
+ bool m_graphic_sel;
+ gv_fsm_state_t m_gv_fsm_state;
+ bool m_gv_int_en;
+ bool m_gv_dma_en;
+ UINT8 m_gv_cmd; // U65 (GC)
+ UINT16 m_gv_data_w; // U29, U45, U28 & U44 (GC)
+ UINT16 m_gv_data_r; // U59 & U60 (GC)
+ UINT16 m_gv_io_counter; // U1, U2, U14 & U15 (GC)
+ UINT16 m_gv_cursor_w; // U38 & U39 (GS)
+ UINT16 m_gv_cursor_x; // U31 & U23 (GS)
+ UINT16 m_gv_cursor_y; // U15 & U8 (GS)
+ bool m_gv_cursor_gc; // U8 (GS)
+ bool m_gv_cursor_fs; // U8 (GS)
+ std::vector<UINT16> m_graphic_mem;
+
+ // Interrupt handling
+ UINT8 m_irl_pending;
+ UINT8 m_irh_pending;
+
+ // FLG/STS handling
+ UINT8 m_pa;
+ UINT16 m_flg_status;
+ UINT16 m_sts_status;
+
+ // State of keyboard
+ ioport_value m_kb_state[ 4 ];
+ UINT8 m_kb_scancode;
+ UINT16 m_kb_status;
+};
+
+#endif /* _HP9845_H_ */
diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h
index 0caef91aa9d..689e1e09b9b 100644
--- a/src/mame/includes/jaguar.h
+++ b/src/mame/includes/jaguar.h
@@ -32,8 +32,8 @@ public:
m_maincpu(*this, "maincpu"),
m_gpu(*this, "gpu"),
m_dsp(*this, "dsp"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_cdrom(*this, "cdrom"),
m_nvram(*this, "nvram"),
m_rom_base(*this, "rom"),
@@ -73,8 +73,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<jaguargpu_cpu_device> m_gpu;
required_device<jaguardsp_cpu_device> m_dsp;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
optional_device<cdrom_image_device> m_cdrom;
// memory
diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h
index e4101fddb49..4636290f1f4 100644
--- a/src/mame/includes/kchamp.h
+++ b/src/mame/includes/kchamp.h
@@ -8,6 +8,7 @@
#include "machine/gen_latch.h"
#include "sound/msm5205.h"
+#include "sound/dac.h"
class kchamp_state : public driver_device
{
@@ -21,6 +22,7 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_msm(*this, "msm"),
+ m_dac(*this, "dac"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { }
@@ -45,6 +47,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<msm5205_device> m_msm;
+ optional_device<dac_8bit_r2r_device> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
diff --git a/src/mame/includes/kim1.h b/src/mame/includes/kim1.h
index e1e40b76afa..2f777e9bfed 100644
--- a/src/mame/includes/kim1.h
+++ b/src/mame/includes/kim1.h
@@ -17,7 +17,6 @@
#include "machine/mos6530.h"
#include "imagedev/cassette.h"
#include "formats/kim1_cas.h"
-#include "sound/dac.h"
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/includes/lazercmd.h b/src/mame/includes/lazercmd.h
index 58134751943..c34efcf8fef 100644
--- a/src/mame/includes/lazercmd.h
+++ b/src/mame/includes/lazercmd.h
@@ -28,7 +28,10 @@ public:
lazercmd_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac(*this, "dac"),
+ m_dac0(*this, "dac0"),
+ m_dac1(*this, "dac1"),
+ m_dac2(*this, "dac2"),
+ m_dac3(*this, "dac3"),
m_videoram(*this, "videoram"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
@@ -36,7 +39,10 @@ public:
/* device */
required_device<s2650_device> m_maincpu;
- required_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac0;
+ optional_device<dac_bit_interface> m_dac1;
+ required_device<dac_bit_interface> m_dac2;
+ required_device<dac_bit_interface> m_dac3;
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;
@@ -50,7 +56,6 @@ public:
/* misc */
int m_timer_count;
UINT8 m_sense_state;
- UINT8 m_dac_data;
UINT8 m_attract;
DECLARE_WRITE8_MEMBER(lazercmd_ctrl_port_w);
diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h
index 518db7366f4..1d79e064488 100644
--- a/src/mame/includes/leland.h
+++ b/src/mame/includes/leland.h
@@ -9,6 +9,7 @@
#include "machine/eepromser.h"
#include "sound/ym2151.h"
#include "sound/dac.h"
+#include "sound/ay8910.h"
#include "machine/pit8253.h"
#include "cpu/i86/i186.h"
@@ -36,6 +37,8 @@ public:
m_sound(*this, "custom"),
m_dac0(*this, "dac0"),
m_dac1(*this, "dac1"),
+ m_ay8910(*this, "ay8910"),
+ m_ay8912(*this, "ay8912"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
@@ -44,8 +47,10 @@ public:
required_shared_ptr<UINT8> m_mainram;
required_device<eeprom_serial_93cxx_device> m_eeprom;
optional_device<leland_80186_sound_device> m_sound;
- optional_device<dac_device> m_dac0;
- optional_device<dac_device> m_dac1;
+ optional_device<dac_byte_interface> m_dac0;
+ optional_device<dac_byte_interface> m_dac1;
+ optional_device<ay8910_device> m_ay8910;
+ optional_device<ay8912_device> m_ay8912;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -223,16 +228,13 @@ public:
DECLARE_WRITE16_MEMBER(peripheral_w);
DECLARE_WRITE8_MEMBER(leland_80186_command_lo_w);
DECLARE_WRITE8_MEMBER(leland_80186_command_hi_w);
- DECLARE_READ16_MEMBER(main_to_sound_comm_r);
DECLARE_READ8_MEMBER(leland_80186_response_r);
- DECLARE_WRITE16_MEMBER(sound_to_main_comm_w);
DECLARE_WRITE16_MEMBER(dac_w);
DECLARE_WRITE16_MEMBER(ataxx_dac_control);
DECLARE_WRITE_LINE_MEMBER(pit0_2_w);
DECLARE_WRITE_LINE_MEMBER(pit1_0_w);
DECLARE_WRITE_LINE_MEMBER(pit1_1_w);
DECLARE_WRITE_LINE_MEMBER(pit1_2_w);
- DECLARE_WRITE_LINE_MEMBER(pit2_0_w);
DECLARE_WRITE_LINE_MEMBER(i80186_tmr0_w);
DECLARE_WRITE_LINE_MEMBER(i80186_tmr1_w);
protected:
@@ -248,14 +250,23 @@ protected:
TYPE_WSF
};
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
- required_device<dac_device> m_dac3;
- required_device<dac_device> m_dac4;
- optional_device<dac_device> m_dac5;
- optional_device<dac_device> m_dac6;
- optional_device<dac_device> m_dac7;
- optional_device<dac_device> m_dac8;
+ required_device<dac_byte_interface> m_dac1;
+ required_device<dac_byte_interface> m_dac2;
+ required_device<dac_byte_interface> m_dac3;
+ required_device<dac_byte_interface> m_dac4;
+ optional_device<dac_byte_interface> m_dac5;
+ optional_device<dac_byte_interface> m_dac6;
+ optional_device<dac_byte_interface> m_dac7;
+ optional_device<dac_byte_interface> m_dac8;
+ optional_device<dac_word_interface> m_dac9;
+ required_device<dac_byte_interface> m_dac1vol;
+ required_device<dac_byte_interface> m_dac2vol;
+ required_device<dac_byte_interface> m_dac3vol;
+ required_device<dac_byte_interface> m_dac4vol;
+ optional_device<dac_byte_interface> m_dac5vol;
+ optional_device<dac_byte_interface> m_dac6vol;
+ optional_device<dac_byte_interface> m_dac7vol;
+ optional_device<dac_byte_interface> m_dac8vol;
private:
void command_lo_sync(void *ptr, int param);
diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h
index 29afaea26c7..ef37ee67ac8 100644
--- a/src/mame/includes/m72.h
+++ b/src/mame/includes/m72.h
@@ -53,7 +53,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
optional_device<cpu_device> m_mcu;
- optional_device<dac_device> m_dac;
+ optional_device<dac_byte_interface> m_dac;
optional_device<m72_audio_device> m_audio;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h
index 7426235eee1..4d727427d2e 100644
--- a/src/mame/includes/mac.h
+++ b/src/mame/includes/mac.h
@@ -31,7 +31,6 @@
#define MAC_539X_1_TAG "539x_1"
#define MAC_539X_2_TAG "539x_2"
#define MACKBD_TAG "mackbd"
-#define DAC_TAG "macdac"
// uncomment to run i8021 keyboard in original Mac/512(e)/Plus
//#define MAC_USE_EMULATED_KBD (1)
@@ -172,12 +171,15 @@ public:
m_mouse2(*this, "MOUSE2"),
m_keys(*this, "KEY%u", 0),
m_montype(*this, "MONTYPE"),
+ m_snd_enable(false),
+ m_main_buffer(true),
+ m_snd_vol(7),
m_vram(*this,"vram"),
m_vram16(*this,"vram16"),
m_via2_ca1_hack(0),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_dac(*this, DAC_TAG)
+ m_dac(*this, "dac")
{
}
@@ -306,6 +308,7 @@ public:
void pmu_exec();
void mac_adb_newaction(int state);
void set_adb_line(int linestate);
+ void update_volume();
DECLARE_READ16_MEMBER ( mac_via_r );
DECLARE_WRITE16_MEMBER ( mac_via_w );
@@ -417,7 +420,7 @@ private:
int m_via2_ca1_hack;
optional_device<screen_device> m_screen;
optional_device<palette_device> m_palette;
- optional_device<dac_device> m_dac;
+ optional_device<dac_8bit_pwm_device> m_dac;
public:
emu_timer *m_scanline_timer;
diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h
index 8bbfcf8ff25..15229332d96 100644
--- a/src/mame/includes/mappy.h
+++ b/src/mame/includes/mappy.h
@@ -50,7 +50,7 @@ public:
required_device<cpu_device> m_subcpu;
optional_device<cpu_device> m_subcpu2;
required_device<namco_15xx_device> m_namco_15xx;
- optional_device<dac_device> m_dac;
+ optional_device<dac_byte_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -89,7 +89,6 @@ public:
DECLARE_READ8_MEMBER(dipB_muxi);
DECLARE_WRITE8_MEMBER(out_mux);
DECLARE_WRITE8_MEMBER(out_lamps);
- DECLARE_WRITE8_MEMBER(grobda_DAC_w);
TILEMAP_MAPPER_MEMBER(superpac_tilemap_scan);
TILEMAP_MAPPER_MEMBER(mappy_tilemap_scan);
TILE_GET_INFO_MEMBER(superpac_get_tile_info);
diff --git a/src/mame/includes/meadows.h b/src/mame/includes/meadows.h
index f8c0e47fa94..c84b262c230 100644
--- a/src/mame/includes/meadows.h
+++ b/src/mame/includes/meadows.h
@@ -29,7 +29,7 @@ public:
required_device<s2650_device> m_maincpu;
optional_device<s2650_device> m_audiocpu;
- optional_device<dac_device> m_dac;
+ optional_device<dac_8bit_r2r_device> m_dac;
optional_device<samples_device> m_samples;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
@@ -38,8 +38,6 @@ public:
optional_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_videoram;
- UINT8 m_dac_data;
- int m_dac_enable;
int m_channel;
int m_freq1;
int m_freq2;
@@ -71,7 +69,6 @@ public:
INTERRUPT_GEN_MEMBER(minferno_interrupt);
INTERRUPT_GEN_MEMBER(audio_interrupt);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &clip);
- void meadows_sh_dac_w(int data);
void meadows_sh_update();
SAMPLES_START_CB_MEMBER(meadows_sh_start);
};
diff --git a/src/mame/includes/mikro80.h b/src/mame/includes/mikro80.h
index 441ca98bcda..49b77a3044f 100644
--- a/src/mame/includes/mikro80.h
+++ b/src/mame/includes/mikro80.h
@@ -11,6 +11,7 @@
#include "machine/i8255.h"
#include "imagedev/cassette.h"
+#include "sound/dac.h"
class mikro80_state : public driver_device
{
@@ -38,12 +39,14 @@ public:
m_io_line6(*this, "LINE6"),
m_io_line7(*this, "LINE7"),
m_io_line8(*this, "LINE8") ,
+ m_dac(*this, "dac"),
m_maincpu(*this, "maincpu") { }
required_shared_ptr<UINT8> m_cursor_ram;
required_shared_ptr<UINT8> m_video_ram;
int m_keyboard_mask;
int m_key_mask;
+ DECLARE_WRITE8_MEMBER(radio99_sound_w);
DECLARE_READ8_MEMBER(mikro80_8255_portb_r);
DECLARE_READ8_MEMBER(mikro80_8255_portc_r);
DECLARE_WRITE8_MEMBER(mikro80_8255_porta_w);
@@ -74,6 +77,7 @@ protected:
required_ioport m_io_line6;
required_ioport m_io_line7;
required_ioport m_io_line8;
+ optional_device<dac_bit_interface> m_dac;
required_device<cpu_device> m_maincpu;
};
diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h
index 0c55ee18768..0e6d35b3287 100644
--- a/src/mame/includes/msx.h
+++ b/src/mame/includes/msx.h
@@ -213,7 +213,7 @@ private:
optional_device<v9958_device> m_v9958;
required_device<cassette_image_device> m_cassette;
required_device<ay8910_device> m_ay8910;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
optional_device<rp5c01_device> m_rtc;
address_space_config m_switched_device_as_config;
required_memory_region m_region_maincpu;
diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h
index 9e5926ced41..1af5effdb0b 100644
--- a/src/mame/includes/n8080.h
+++ b/src/mame/includes/n8080.h
@@ -13,7 +13,8 @@ public:
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
- m_dac(*this, "dac"),
+ m_n8080_dac(*this, "n8080_dac"),
+ m_helifire_dac(*this, "helifire_dac"),
m_sn(*this, "snsnd"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
@@ -52,7 +53,8 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- required_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_n8080_dac;
+ optional_device<dac_8bit_r2r_device> m_helifire_dac;
optional_device<sn76477_device> m_sn;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -71,7 +73,6 @@ public:
DECLARE_READ8_MEMBER(helifire_8035_external_ram_r);
DECLARE_READ8_MEMBER(helifire_8035_p2_r);
DECLARE_WRITE8_MEMBER(n8080_dac_w);
- DECLARE_WRITE8_MEMBER(helifire_dac_w);
DECLARE_WRITE8_MEMBER(helifire_sound_ctrl_w);
DECLARE_WRITE_LINE_MEMBER(n8080_inte_callback);
DECLARE_WRITE8_MEMBER(n8080_status_callback);
diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h
index 7c0146bdaa7..a9c4722cc32 100644
--- a/src/mame/includes/namcos1.h
+++ b/src/mame/includes/namcos1.h
@@ -16,7 +16,8 @@ public:
m_mcu(*this, "mcu"),
m_c116(*this, "c116"),
m_c117(*this, "c117"),
- m_dac(*this, "dac"),
+ m_dac0(*this, "dac0"),
+ m_dac1(*this, "dac1"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
@@ -34,7 +35,8 @@ public:
required_device<cpu_device> m_mcu;
required_device<namco_c116_device> m_c116;
required_device<namco_c117_device> m_c117;
- required_device<dac_device> m_dac;
+ required_device<dac_8bit_r2r_device> m_dac0;
+ required_device<dac_8bit_r2r_device> m_dac1;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -49,10 +51,6 @@ public:
required_ioport m_io_dipsw;
- int m_dac0_value;
- int m_dac1_value;
- int m_dac0_gain;
- int m_dac1_gain;
int m_key_id;
int m_key_reg;
int m_key_rng;
@@ -80,8 +78,6 @@ public:
DECLARE_READ8_MEMBER(dsw_r);
DECLARE_WRITE8_MEMBER(coin_w);
DECLARE_WRITE8_MEMBER(dac_gain_w);
- DECLARE_WRITE8_MEMBER(dac0_w);
- DECLARE_WRITE8_MEMBER(dac1_w);
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_WRITE8_MEMBER(mcu_bankswitch_w);
DECLARE_WRITE8_MEMBER(mcu_patch_w);
@@ -138,8 +134,6 @@ public:
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof(screen_device &screen, bool state);
- void update_DACs();
- void init_DACs();
private:
inline void get_tile_info(tile_data &tileinfo,int tile_index,UINT8 *info_vram);
diff --git a/src/mame/includes/nbmj9195.h b/src/mame/includes/nbmj9195.h
index 6020b56fab7..ff7a918224c 100644
--- a/src/mame/includes/nbmj9195.h
+++ b/src/mame/includes/nbmj9195.h
@@ -8,7 +8,6 @@
#include "cpu/z80/tmpz84c011.h"
#include "machine/gen_latch.h"
-#include "sound/dac.h"
#define VRAM_MAX 2
@@ -27,8 +26,6 @@ public:
nbmj9195_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
@@ -36,8 +33,6 @@ public:
{ }
required_device<tmpz84c011_device> m_maincpu;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
diff --git a/src/mame/includes/niyanpai.h b/src/mame/includes/niyanpai.h
index 4461b7b36c5..46fe555a6e8 100644
--- a/src/mame/includes/niyanpai.h
+++ b/src/mame/includes/niyanpai.h
@@ -1,7 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Takahiro Nogi
-#include "sound/dac.h"
#include "machine/gen_latch.h"
#include "machine/tmp68301.h"
@@ -19,16 +18,12 @@ public:
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu"),
m_tmp68301(*this, "tmp68301"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { }
required_device<cpu_device> m_maincpu;
required_device<tmp68301_device> m_tmp68301;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h
index 321a778d689..f62b5011c34 100644
--- a/src/mame/includes/rltennis.h
+++ b/src/mame/includes/rltennis.h
@@ -12,14 +12,14 @@ public:
rltennis_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_dac_1(*this, "dac1"),
- m_dac_2(*this, "dac2"),
+ m_dac1(*this, "dac1"),
+ m_dac2(*this, "dac2"),
m_data760000(0), m_data740000(0), m_dac_counter(0), m_sample_rom_offset_1(0), m_sample_rom_offset_2(0),
m_offset_shift(0) { }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac_1;
- required_device<dac_device> m_dac_2;
+ required_device<dac_byte_interface> m_dac1;
+ required_device<dac_byte_interface> m_dac2;
UINT16 m_blitter[RLT_NUM_BLITTER_REGS];
INT32 m_data760000;
diff --git a/src/mame/includes/s11.h b/src/mame/includes/s11.h
index 9d48924e595..009ea8edf44 100644
--- a/src/mame/includes/s11.h
+++ b/src/mame/includes/s11.h
@@ -9,6 +9,13 @@
#ifndef S11_H_
#define S11_H_
+#include "audio/s11c_bg.h"
+#include "machine/6821pia.h"
+#include "machine/genpin.h"
+#include "sound/dac.h"
+#include "sound/hc55516.h"
+#include "sound/ym2151.h"
+
// 6802/8 CPU's input clock is 4MHz
// but because it has an internal /4 divider, its E clock runs at 1/4 that frequency
#define E_CLOCK (XTAL_4MHz/4)
@@ -27,8 +34,6 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_bgcpu(*this, "bgcpu"),
- m_dac(*this, "dac"),
- m_dac1(*this, "dac1"),
m_hc55516(*this, "hc55516"),
m_pias(*this, "pias"),
m_pia21(*this, "pia21"),
@@ -42,8 +47,7 @@ public:
m_bg(*this, "bgm")
{ }
- DECLARE_READ8_MEMBER(dac_r);
- DECLARE_WRITE8_MEMBER(dac_w);
+ DECLARE_READ8_MEMBER(sound_r);
DECLARE_WRITE8_MEMBER(bank_w);
DECLARE_WRITE8_MEMBER(dig0_w);
DECLARE_WRITE8_MEMBER(dig1_w);
@@ -57,7 +61,6 @@ public:
DECLARE_WRITE8_MEMBER(pia34_pa_w);
DECLARE_WRITE8_MEMBER(pia34_pb_w);
DECLARE_WRITE_LINE_MEMBER(pia34_cb2_w);
- DECLARE_WRITE8_MEMBER(pia40_pa_w);
DECLARE_WRITE8_MEMBER(pia40_pb_w);
DECLARE_WRITE_LINE_MEMBER(pia40_cb2_w);
DECLARE_READ8_MEMBER(switch_r);
@@ -82,8 +85,6 @@ protected:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_bgcpu;
- optional_device<dac_device> m_dac;
- optional_device<dac_device> m_dac1;
optional_device<hc55516_device> m_hc55516;
optional_device<pia6821_device> m_pias;
required_device<pia6821_device> m_pia21;
diff --git a/src/mame/includes/segas24.h b/src/mame/includes/segas24.h
index 2b2d2361bef..957c40f9b5d 100644
--- a/src/mame/includes/segas24.h
+++ b/src/mame/includes/segas24.h
@@ -36,7 +36,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<UINT16> m_generic_paletteram_16;
diff --git a/src/mame/includes/seicross.h b/src/mame/includes/seicross.h
index 999afd71092..d887816380b 100644
--- a/src/mame/includes/seicross.h
+++ b/src/mame/includes/seicross.h
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
#include "machine/nvram.h"
+#include "sound/dac.h"
class seicross_state : public driver_device
{
@@ -9,6 +10,7 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_mcu(*this, "mcu"),
+ m_dac(*this, "dac"),
m_nvram(*this, "nvram"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -22,6 +24,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_mcu;
+ required_device<dac_byte_interface> m_dac;
optional_device<nvram_device> m_nvram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -58,4 +61,6 @@ public:
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
void nvram_init(nvram_device &nvram, void *data, size_t size);
+
+ DECLARE_WRITE8_MEMBER(dac_w);
};
diff --git a/src/mame/includes/senjyo.h b/src/mame/includes/senjyo.h
index 39d42ea5b01..18d399c10d6 100644
--- a/src/mame/includes/senjyo.h
+++ b/src/mame/includes/senjyo.h
@@ -36,7 +36,7 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<z80pio_device> m_pio;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<palette_device> m_radar_palette;
diff --git a/src/mame/includes/sorcerer.h b/src/mame/includes/sorcerer.h
index c3be02dcfe2..1c463a966ac 100644
--- a/src/mame/includes/sorcerer.h
+++ b/src/mame/includes/sorcerer.h
@@ -11,7 +11,6 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "sound/dac.h"
#include "sound/wave.h"
#include "machine/ay31015.h"
#include "bus/centronics/ctronics.h"
diff --git a/src/mame/includes/special.h b/src/mame/includes/special.h
index c6626ccf9ca..b3fb51a421e 100644
--- a/src/mame/includes/special.h
+++ b/src/mame/includes/special.h
@@ -99,7 +99,7 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<i8255_device> m_ppi;
optional_device<fd1793_t> m_fdc;
- optional_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac;
optional_device<pit8253_device> m_pit;
optional_device<cassette_image_device> m_cassette;
optional_device<ram_device> m_ram;
diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h
index 094c95647af..a458c06f914 100644
--- a/src/mame/includes/suna16.h
+++ b/src/mame/includes/suna16.h
@@ -2,7 +2,6 @@
// copyright-holders:Luca Elia
#include "machine/gen_latch.h"
-#include "sound/dac.h"
class suna16_state : public driver_device
{
@@ -10,10 +9,6 @@ public:
suna16_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
- m_dac1(*this, "dac1"),
- m_dac2(*this, "dac2"),
- m_dac3(*this, "dac3"),
- m_dac4(*this, "dac4"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
@@ -27,10 +22,6 @@ public:
{ }
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
- optional_device<dac_device> m_dac3;
- optional_device<dac_device> m_dac4;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -52,8 +43,6 @@ public:
DECLARE_READ16_MEMBER(paletteram_r);
DECLARE_WRITE16_MEMBER(paletteram_w);
DECLARE_WRITE16_MEMBER(flipscreen_w);
- DECLARE_WRITE8_MEMBER(DAC1_w);
- DECLARE_WRITE8_MEMBER(DAC2_w);
// bestbest specific
DECLARE_WRITE16_MEMBER(bestbest_flipscreen_w);
@@ -66,8 +55,6 @@ public:
DECLARE_WRITE16_MEMBER(bssoccer_leds_w);
DECLARE_WRITE8_MEMBER(bssoccer_pcm_1_bankswitch_w);
DECLARE_WRITE8_MEMBER(bssoccer_pcm_2_bankswitch_w);
- DECLARE_WRITE8_MEMBER(bssoccer_DAC3_w);
- DECLARE_WRITE8_MEMBER(bssoccer_DAC4_w);
// uballoon specific
DECLARE_WRITE16_MEMBER(uballoon_leds_w);
diff --git a/src/mame/includes/suna8.h b/src/mame/includes/suna8.h
index f15725507f6..6c7f039017e 100644
--- a/src/mame/includes/suna8.h
+++ b/src/mame/includes/suna8.h
@@ -101,7 +101,6 @@ public:
DECLARE_WRITE8_MEMBER(brickzn_palbank_w);
DECLARE_WRITE8_MEMBER(brickzn_sprbank_w);
DECLARE_WRITE8_MEMBER(brickzn_rombank_w);
- DECLARE_WRITE8_MEMBER(brickzn_pcm_w);
DECLARE_WRITE8_MEMBER(brickzn_banked_paletteram_w);
// brickzn (newer sets)
DECLARE_WRITE8_MEMBER(brickzn_prot2_w);
diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h
index 4d80ec8a9bb..c5fd9f30ca8 100644
--- a/src/mame/includes/taitosj.h
+++ b/src/mame/includes/taitosj.h
@@ -2,8 +2,9 @@
// copyright-holders:Nicola Salmoria
#include "machine/gen_latch.h"
-#include "sound/dac.h"
#include "sound/ay8910.h"
+#include "sound/discrete.h"
+#include "sound/dac.h"
class taitosj_state : public driver_device
{
@@ -28,6 +29,7 @@ public:
m_audiocpu(*this, "audiocpu"),
m_mcu(*this, "mcu"),
m_dac(*this, "dac"),
+ m_dacvol(*this, "dacvol"),
m_ay1(*this, "ay1"),
m_ay2(*this, "ay2"),
m_ay3(*this, "ay3"),
@@ -41,8 +43,6 @@ public:
const rectangle &, int, int *, rectangle *);
UINT8 m_input_port_4_f0;
UINT8 m_kikstart_gears[2];
- INT8 m_dac_out;
- UINT8 m_dac_vol;
required_shared_ptr<UINT8> m_videoram_1;
required_shared_ptr<UINT8> m_videoram_2;
required_shared_ptr<UINT8> m_videoram_3;
@@ -106,8 +106,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r);
DECLARE_WRITE8_MEMBER(taitosj_sndnmi_msk_w);
DECLARE_WRITE8_MEMBER(input_port_4_f0_w);
- DECLARE_WRITE8_MEMBER(dac_out_w);
- DECLARE_WRITE8_MEMBER(dac_vol_w);
+ DECLARE_WRITE8_MEMBER(taitosj_dacvol_w);
DECLARE_DRIVER_INIT(alpinea);
DECLARE_DRIVER_INIT(alpine);
DECLARE_DRIVER_INIT(taitosj);
@@ -143,7 +142,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_mcu;
- required_device<dac_device> m_dac;
+ required_device<dac_8bit_r2r_device> m_dac;
+ required_device<discrete_device> m_dacvol;
required_device<ay8910_device> m_ay1;
required_device<ay8910_device> m_ay2;
required_device<ay8910_device> m_ay3;
diff --git a/src/mame/includes/tceptor.h b/src/mame/includes/tceptor.h
index 5ec6d58a36d..26f5a122dc3 100644
--- a/src/mame/includes/tceptor.h
+++ b/src/mame/includes/tceptor.h
@@ -1,6 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:BUT
-#include "sound/dac.h"
#include "sound/namco.h"
#include "video/c45.h"
@@ -11,7 +10,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_cus30(*this, "namco"),
- m_dac(*this, "dac"),
m_tile_ram(*this, "tile_ram"),
m_tile_attr(*this, "tile_attr"),
m_bg_ram(*this, "bg_ram"),
@@ -27,7 +25,6 @@ public:
UINT8 m_mcu_irq_enable;
required_device<cpu_device> m_maincpu;
required_device<namco_cus30_device> m_cus30;
- required_device<dac_device> m_dac;
required_shared_ptr<UINT8> m_tile_ram;
required_shared_ptr<UINT8> m_tile_attr;
required_shared_ptr<UINT8> m_bg_ram;
@@ -65,7 +62,6 @@ public:
DECLARE_WRITE8_MEMBER(tceptor_bg_ram_w);
DECLARE_WRITE8_MEMBER(tceptor_bg_scroll_w);
void tile_mark_dirty(int offset);
- DECLARE_WRITE8_MEMBER(voice_w);
required_device<namco_c45_road_device> m_c45_road;
required_device<screen_device> m_2dscreen;
diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h
index 92ddeba8327..fdc51b12489 100644
--- a/src/mame/includes/thomson.h
+++ b/src/mame/includes/thomson.h
@@ -19,7 +19,7 @@
#include "machine/6850acia.h"
#include "machine/mos6551.h"
#include "sound/dac.h"
-#include "audio/mea8000.h"
+#include "sound/mea8000.h"
#include "bus/centronics/ctronics.h"
#include "imagedev/cassette.h"
#include "machine/mc6843.h"
@@ -101,7 +101,6 @@ public:
m_mc6854(*this, "mc6854"),
m_maincpu(*this, "maincpu"),
m_cassette(*this, "cassette"),
- m_buzzer(*this, "buzzer"),
m_dac(*this, "dac"),
m_centronics(*this, "centronics"),
m_cent_data_out(*this, "cent_data_out"),
@@ -155,9 +154,8 @@ public:
DECLARE_WRITE8_MEMBER( to7_cartridge_w );
DECLARE_READ8_MEMBER( to7_cartridge_r );
DECLARE_WRITE8_MEMBER( to7_timer_port_out );
- DECLARE_WRITE8_MEMBER( to7_timer_cp2_out );
DECLARE_READ8_MEMBER( to7_timer_port_in );
- DECLARE_WRITE8_MEMBER( to7_timer_tco_out );
+ DECLARE_WRITE_LINE_MEMBER( to7_set_cassette );
DECLARE_WRITE_LINE_MEMBER( to7_sys_cb2_out );
DECLARE_WRITE8_MEMBER( to7_sys_portb_out );
DECLARE_READ8_MEMBER( to7_sys_porta_in );
@@ -191,7 +189,6 @@ public:
TIMER_CALLBACK_MEMBER( mo5_periodic_cb );
DECLARE_WRITE8_MEMBER( mo5_sys_porta_out );
DECLARE_READ8_MEMBER( mo5_sys_porta_in );
- DECLARE_WRITE8_MEMBER( mo5_sys_portb_out );
DECLARE_READ8_MEMBER( mo5_sys_portb_in );
DECLARE_READ8_MEMBER( mo5_gatearray_r );
DECLARE_WRITE8_MEMBER( mo5_gatearray_w );
@@ -236,7 +233,7 @@ public:
DECLARE_WRITE8_MEMBER( to8_sys_portb_out );
DECLARE_READ8_MEMBER( to8_timer_port_in );
DECLARE_WRITE8_MEMBER( to8_timer_port_out );
- DECLARE_WRITE8_MEMBER( to8_timer_cp2_out );
+ DECLARE_WRITE_LINE_MEMBER( to8_timer_cp2_out );
void to8_lightpen_cb( int step );
DECLARE_MACHINE_RESET( to8 );
DECLARE_MACHINE_START( to8 );
@@ -256,7 +253,6 @@ public:
DECLARE_READ8_MEMBER( mo6_sys_porta_in );
DECLARE_READ8_MEMBER( mo6_sys_portb_in );
DECLARE_WRITE8_MEMBER( mo6_sys_porta_out );
- DECLARE_WRITE8_MEMBER( mo6_sys_portb_out );
DECLARE_WRITE_LINE_MEMBER( mo6_sys_cb2_out );
DECLARE_READ8_MEMBER( mo6_gatearray_r );
DECLARE_WRITE8_MEMBER( mo6_gatearray_w );
@@ -358,8 +354,7 @@ public:
protected:
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
- required_device<dac_device> m_buzzer;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
optional_device<centronics_device> m_centronics;
optional_device<output_latch_device> m_cent_data_out;
required_device<pia6821_device> m_pia_sys;
@@ -513,7 +508,6 @@ protected:
void (thomson_state::*m_thom_init_cb)( int init );
int to7_get_cassette();
- void to7_set_cassette( int data );
int mo5_get_cassette();
void mo5_set_cassette( int data );
void thom_set_irq( int line, int state );
diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h
index 3020bfc0ebc..64864f79c27 100644
--- a/src/mame/includes/tnzs.h
+++ b/src/mame/includes/tnzs.h
@@ -34,7 +34,6 @@ public:
m_subcpu(*this, "sub"),
m_mcu(*this, "mcu"),
m_seta001(*this, "spritegen"),
- m_dac(*this, "dac"),
m_samples(*this, "samples"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
@@ -58,7 +57,6 @@ public:
optional_device<cpu_device> m_subcpu;
optional_device<upi41_cpu_device> m_mcu;
optional_device<seta001_device> m_seta001;
- optional_device<dac_device> m_dac;
optional_device<samples_device> m_samples;
required_device<palette_device> m_palette;
optional_device<generic_latch_8_device> m_soundlatch;
@@ -114,7 +112,6 @@ public:
DECLARE_READ8_MEMBER(kageki_csport_r);
DECLARE_WRITE8_MEMBER(kageki_csport_w);
DECLARE_WRITE8_MEMBER(kabukiz_sound_bank_w);
- DECLARE_WRITE8_MEMBER(kabukiz_sample_w);
DECLARE_WRITE_LINE_MEMBER(irqhandler);
SAMPLES_START_CB_MEMBER(kageki_init_samples);
diff --git a/src/mame/includes/tranz330.h b/src/mame/includes/tranz330.h
new file mode 100644
index 00000000000..2421e3a80ed
--- /dev/null
+++ b/src/mame/includes/tranz330.h
@@ -0,0 +1,73 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+#pragma once
+
+#ifndef VERIFONE_TRANZ330_H
+#define VERIFONE_TRANZ330_H
+
+// single-driver build must have emu.h here
+#include "emu.h"
+
+#include "cpu/z80/z80.h"
+#include "cpu/z80/z80daisy.h"
+#include "machine/z80ctc.h"
+#include "machine/z80dart.h"
+#include "machine/z80pio.h"
+#include "machine/msm6242.h"
+#include "machine/roc10937.h"
+#include "bus/rs232/rs232.h"
+#include "sound/speaker.h"
+#include "machine/clock.h"
+
+#define CPU_TAG "cpu"
+#define DART_TAG "dart"
+#define CTC_TAG "ctc"
+#define PIO_TAG "pio"
+#define RTC_TAG "rtc"
+#define VFD_TAG "vfd"
+#define RS232_TAG "rs232"
+#define SPEAKER_TAG "speaker"
+
+class tranz330_state : public driver_device
+{
+public:
+ tranz330_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_cpu(*this, CPU_TAG)
+ , m_ctc(*this, CTC_TAG)
+ , m_dart(*this, DART_TAG)
+ , m_pio(*this, PIO_TAG)
+ , m_rtc(*this, RTC_TAG)
+ , m_vfd(*this, VFD_TAG)
+ , m_rs232(*this, RS232_TAG)
+ , m_speaker(*this, SPEAKER_TAG)
+ , m_keypad(*this, "COL.%u", 0)
+ { }
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ DECLARE_WRITE_LINE_MEMBER( syncb_w );
+ DECLARE_WRITE_LINE_MEMBER(clock_w);
+
+ DECLARE_WRITE_LINE_MEMBER( sound_w );
+
+ DECLARE_WRITE8_MEMBER( pio_a_w );
+ DECLARE_READ8_MEMBER( pio_b_r );
+ DECLARE_READ8_MEMBER( card_r );
+
+private:
+ required_device<cpu_device> m_cpu;
+ required_device<z80ctc_device> m_ctc;
+ required_device<z80dart_device> m_dart;
+ required_device<z80pio_device> m_pio;
+ required_device<msm6242_device> m_rtc;
+ required_device<mic10937_t> m_vfd;
+ required_device<rs232_port_device> m_rs232;
+ required_device<speaker_sound_device> m_speaker;
+ required_ioport_array<4> m_keypad;
+
+ UINT8 m_keypad_col_mask;
+};
+
+#endif // VERIFONE_TRANZ330_H
diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h
index 917e184bc32..627514b74f9 100644
--- a/src/mame/includes/truco.h
+++ b/src/mame/includes/truco.h
@@ -17,7 +17,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<watchdog_timer_device> m_watchdog;
- required_device<dac_device> m_dac;
+ required_device<dac_bit_interface> m_dac;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_battery_ram;
diff --git a/src/mame/includes/trucocl.h b/src/mame/includes/trucocl.h
index f851f627130..3a72c8f9697 100644
--- a/src/mame/includes/trucocl.h
+++ b/src/mame/includes/trucocl.h
@@ -36,7 +36,7 @@ public:
UINT32 screen_update_trucocl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(trucocl_interrupt);
required_device<cpu_device> m_maincpu;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
protected:
diff --git a/src/mame/includes/ut88.h b/src/mame/includes/ut88.h
index a394965f096..f71c43552a6 100644
--- a/src/mame/includes/ut88.h
+++ b/src/mame/includes/ut88.h
@@ -50,7 +50,7 @@ public:
required_device<cassette_image_device> m_cassette;
optional_device<i8255_device> m_ppi;
- optional_device<dac_device> m_dac;
+ optional_device<dac_bit_interface> m_dac;
DECLARE_READ8_MEMBER(ut88_keyboard_r);
DECLARE_WRITE8_MEMBER(ut88_keyboard_w);
DECLARE_WRITE8_MEMBER(ut88_sound_w);
diff --git a/src/mame/includes/v1050.h b/src/mame/includes/v1050.h
index ce79c1a7be9..bfb2f82ba82 100644
--- a/src/mame/includes/v1050.h
+++ b/src/mame/includes/v1050.h
@@ -90,6 +90,8 @@ public:
m_rom(*this, Z80_TAG),
m_video_ram(*this, "video_ram"),
m_attr_ram(*this, "attr_ram"),
+ m_int_mask(0),
+ m_int_state(0),
m_rtc_ppi_pa(0),
m_rtc_ppi_pc(0)
{
@@ -192,6 +194,7 @@ public: // HACK for MC6845
// interrupt state
UINT8 m_int_mask; // interrupt mask
+ UINT8 m_int_state;
int m_f_int_enb; // floppy interrupt enable
bool m_fdc_irq;
bool m_fdc_drq;
diff --git a/src/mame/includes/vectrex.h b/src/mame/includes/vectrex.h
index 351e76c3f87..b76cdd6cdd4 100644
--- a/src/mame/includes/vectrex.h
+++ b/src/mame/includes/vectrex.h
@@ -126,7 +126,7 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<via6522_device> m_via6522_0;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<ay8910_device> m_ay8912;
required_device<vector_device> m_vector;
optional_device<vectrex_cart_slot_device> m_cart;
diff --git a/src/mame/includes/vidbrain.h b/src/mame/includes/vidbrain.h
index f9c8aa789cc..7ff38b6b57a 100644
--- a/src/mame/includes/vidbrain.h
+++ b/src/mame/includes/vidbrain.h
@@ -11,7 +11,6 @@
#include "machine/f3853.h"
#include "machine/ram.h"
#include "sound/dac.h"
-#include "sound/discrete.h"
#include "video/uv201.h"
#define F3850_TAG "cd34"
@@ -19,8 +18,6 @@
#define F3870_TAG "f3870"
#define UV201_TAG "uv201"
#define SCREEN_TAG "screen"
-#define DISCRETE_TAG "discrete"
-#define DAC_TAG "dac"
class vidbrain_state : public driver_device
{
@@ -30,8 +27,7 @@ public:
m_maincpu(*this, F3850_TAG),
m_smi(*this, F3853_TAG),
m_uv(*this, UV201_TAG),
- m_discrete(*this, DISCRETE_TAG),
- m_dac(*this, DAC_TAG),
+ m_dac(*this, "dac"),
m_exp(*this, VIDEOBRAIN_EXPANSION_SLOT_TAG),
m_io(*this, "IO%02u", 0),
m_uv201_31(*this, "UV201-31"),
@@ -49,8 +45,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<f3853_device> m_smi;
required_device<uv201_device> m_uv;
- required_device<discrete_sound_device> m_discrete;
- required_device<dac_device> m_dac;
+ required_device<dac_byte_interface> m_dac;
required_device<videobrain_expansion_slot_device> m_exp;
required_ioport_array<8> m_io;
required_ioport m_uv201_31;
diff --git a/src/mame/includes/williams.h b/src/mame/includes/williams.h
index 11096569c13..b7320461784 100644
--- a/src/mame/includes/williams.h
+++ b/src/mame/includes/williams.h
@@ -9,7 +9,6 @@
#include "cpu/m6809/m6809.h"
#include "cpu/m6800/m6800.h"
-#include "sound/dac.h"
#include "sound/hc55516.h"
#include "machine/ticket.h"
#include "machine/watchdog.h"
diff --git a/src/mame/layout/cmulti8.lay b/src/mame/layout/cmulti8.lay
new file mode 100644
index 00000000000..4f833dcd253
--- /dev/null
+++ b/src/mame/layout/cmulti8.lay
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="digit" defstate="0">
+ <led7seg><color red="0.2" green="1.0" blue="0.85" /></led7seg>
+ </element>
+
+ <element name="seg_rect" defstate="0">
+ <rect state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></rect>
+ <rect state="1"><color red="0.2" green="1.0" blue="0.85" /></rect>
+ </element>
+ <element name="seg_x1" defstate="0">
+ <text string="/" state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
+ <text string="/" state="1"><color red="0.2" green="1.0" blue="0.85" /></text>
+ </element>
+ <element name="seg_x2" defstate="0">
+ <text string="\" state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
+ <text string="\" state="1"><color red="0.2" green="1.0" blue="0.85" /></text>
+ </element>
+ <element name="seg_m" defstate="0">
+ <text string="M" state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
+ <text string="M" state="1"><color red="0.2" green="1.0" blue="0.85" /></text>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="100" top="0" bottom="35" />
+
+ <!-- upper row -->
+
+ <bezel name="digit8" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit7" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit6" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit5" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit4" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="70" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="80" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit0" element="digit"><bounds x="90" y="0" width="10" height="15" /></bezel>
+
+ <bezel name="20.a" element="seg_m"><bounds x="0" y="0" width="10" height="15" /></bezel>
+
+ <!-- lower row -->
+
+ <bezel name="digit18" element="digit"><bounds x="10" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit17" element="digit"><bounds x="20" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit16" element="digit"><bounds x="30" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit15" element="digit"><bounds x="40" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit14" element="digit"><bounds x="50" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit13" element="digit"><bounds x="60" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit12" element="digit"><bounds x="70" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit11" element="digit"><bounds x="80" y="20" width="10" height="15" /></bezel>
+ <bezel name="digit10" element="digit"><bounds x="90" y="20" width="10" height="15" /></bezel>
+
+ <!-- custom digit -->
+
+ <bezel name="19.6" element="seg_rect"><bounds x="1.5" y="27.25" width="7" height="0.5" /></bezel>
+
+ <bezel name="19.3" element="seg_x1"><bounds x="4" y="19.5" width="5" height="7.5" /></bezel>
+ <bezel name="19.3" element="seg_x1"><bounds x="1" y="27" width="5" height="7.5" /></bezel>
+
+ <bezel name="19.3" element="seg_x2"><bounds x="1" y="19.5" width="5" height="7.5" /></bezel>
+ <bezel name="19.3" element="seg_x2"><bounds x="4" y="27" width="5" height="7.5" /></bezel>
+
+ <bezel name="19.4" element="seg_rect"><bounds x="4.75" y="21.7" width="0.5" height="5" /></bezel>
+ <bezel name="19.4" element="seg_rect"><bounds x="4.75" y="28.5" width="0.5" height="5" /></bezel>
+
+ <bezel name="19.5" element="seg_rect"><bounds x="4" y="21" width="2" height="0.5" /></bezel>
+ <bezel name="19.5" element="seg_rect"><bounds x="4" y="33.7" width="2" height="0.5" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/fidel_chesster.lay b/src/mame/layout/fidel_chesster.lay
index 28a5fab7f74..cd2044bf41e 100644
--- a/src/mame/layout/fidel_chesster.lay
+++ b/src/mame/layout/fidel_chesster.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -209,9 +207,6 @@
<view name="Internal Layout">
<bounds left="-7" right="93" top="-2" bottom="103" />
- <bezel element="static_black">
- <bounds left="-7" right="93" top="-2" bottom="103" />
- </bezel>
<bezel element="white"><bounds x="-7.5" y="-2.5" width="101" height="106" /></bezel>
diff --git a/src/mame/layout/fidel_csc.lay b/src/mame/layout/fidel_csc.lay
index 55b42c34969..c4b883c3982 100644
--- a/src/mame/layout/fidel_csc.lay
+++ b/src/mame/layout/fidel_csc.lay
@@ -1,9 +1,8 @@
<?xml version="1.0"?>
<mamelayout version="2">
-<!-- other than panel button mappings, layout is identical to vsc -->
+<!-- luascript -->
-<!-- define elements -->
<script>
local layout = {}
local board
@@ -82,7 +81,10 @@
return layout, "fidel_csc"
</script>
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
+
+<!-- other than panel button mappings, layout is identical to vsc -->
+
+<!-- define elements -->
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
@@ -274,9 +276,6 @@
<view name="Internal Layout">
<bounds left="-2" right="98" top="-18" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-18" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel>
diff --git a/src/mame/layout/fidel_des2000.lay b/src/mame/layout/fidel_des2000.lay
new file mode 100644
index 00000000000..238b0b5562d
--- /dev/null
+++ b/src/mame/layout/fidel_des2000.lay
@@ -0,0 +1,456 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="led" defstate="0">
+ <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
+ <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
+ </element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+ <element name="hlb" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="1.0" green="1.0" blue="1.0" />
+ </disk>
+ </element>
+
+ <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
+ <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
+ <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
+ <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
+
+ <element name="text_1">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="1" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="2" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="3" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="4" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="5" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="6" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="7" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="8" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_9">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="9" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_10">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="10" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_11">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="11" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_12">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="12" align="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_e">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_f">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_g">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_h">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_lb">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CHECK"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_lc">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="MATE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_ld">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="WHITE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_le">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="BLACK"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_lf">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="STALEMATE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_lg">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_lh">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="I LOSE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_t81">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="NEW"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t82">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="GAME"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="VERIFY"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="OPTIONS"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="LEVEL"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t41">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="TAKE"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t42">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="BACK"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="HINT"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="MOVE"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_t1">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CLEAR"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+
+ <element name="text_tl7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265a;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tl6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265b;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tl5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265c;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tl4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265d;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tl3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265e;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+ <element name="text_tl2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="&#x265f;"><color red="0.17" green="0.15" blue="0.15" /></text>
+ </element>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-7.5" right="96" top="-2.5" bottom="93.5" />
+
+ <bezel element="white"><bounds x="-11.5" y="-3.5" width="110" height="101" /></bezel>
+
+ <!-- chessboard coords -->
+
+ <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel>
+ <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel>
+ <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel>
+
+ <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel>
+ <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel>
+
+ <!-- left side labels -->
+
+ <bezel element="text_9"><bounds x="-9.3" y="12" width="5" height="2" /></bezel>
+ <bezel element="text_10"><bounds x="-9.3" y="22" width="5" height="2" /></bezel>
+ <bezel element="text_11"><bounds x="-9.3" y="32" width="5" height="2" /></bezel>
+ <bezel element="text_12"><bounds x="-9.3" y="42" width="5" height="2" /></bezel>
+
+ <!-- bottom side labels -->
+
+ <bezel element="text_lb"><bounds x="13" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_lc"><bounds x="23" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_ld"><bounds x="33" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_le"><bounds x="43" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_lf"><bounds x="53" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_lh"><bounds x="73" y="90.4" width="10" height="2" /></bezel>
+ <bezel element="text_lg"><bounds x="62" y="90.4" width="12" height="2" /></bezel>
+
+ <!-- chessboard bezel -->
+
+ <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel>
+ <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel>
+ <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel>
+ <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel>
+
+ <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel>
+ <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel>
+
+ <!-- chessboard sensors -->
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel>
+
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel>
+
+ <!-- chessboard leds -->
+
+ <bezel name="0.7" element="led"><bounds x="-2.8" y="7.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.6" element="led"><bounds x="-2.8" y="17.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.5" element="led"><bounds x="-2.8" y="27.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.4" element="led"><bounds x="-2.8" y="37.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.3" element="led"><bounds x="-2.8" y="47.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.2" element="led"><bounds x="-2.8" y="57.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.1" element="led"><bounds x="-2.8" y="67.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="0.0" element="led"><bounds x="-2.8" y="77.25" width="1.5" height="1.5" /></bezel>
+
+ <bezel name="1.0" element="led"><bounds x="7.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.1" element="led"><bounds x="17.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.2" element="led"><bounds x="27.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.3" element="led"><bounds x="37.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.4" element="led"><bounds x="47.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.5" element="led"><bounds x="57.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.6" element="led"><bounds x="67.25" y="88" width="1.5" height="1.5" /></bezel>
+ <bezel name="1.7" element="led"><bounds x="77.25" y="88" width="1.5" height="1.5" /></bezel>
+
+ <!-- right side -->
+
+ <bezel element="white"><bounds x="87.3" y="9.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="19.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="28.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="37.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="46.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="55.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="64.3" width="7.4" height="3.4" /></bezel>
+ <bezel element="white"><bounds x="87.3" y="73.3" width="7.4" height="3.4" /></bezel>
+
+ <bezel element="text_tl7"><bounds x="87" y="11.6" width="6" height="3.5" /></bezel>
+ <bezel element="text_tl6"><bounds x="87" y="21.6" width="6" height="3.5" /></bezel>
+ <bezel element="text_tl5"><bounds x="87" y="31.6" width="6" height="3.5" /></bezel>
+ <bezel element="text_tl4"><bounds x="87" y="41.6" width="6" height="3.5" /></bezel>
+ <bezel element="text_tl3"><bounds x="87" y="51.6" width="6" height="3.5" /></bezel>
+ <bezel element="text_tl2"><bounds x="87" y="61.6" width="6" height="3.5" /></bezel>
+
+ <bezel element="disk_black"><bounds x="87" y="5" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="15" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="25" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="35" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="45" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="55" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="65" width="6" height="6" /></bezel>
+ <bezel element="disk_black"><bounds x="87" y="75" width="6" height="6" /></bezel>
+
+ <bezel element="disk_white"><bounds x="87.7" y="5.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="15.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="25.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="35.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="45.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="55.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="65.7" width="4.6" height="4.6" /></bezel>
+ <bezel element="disk_white"><bounds x="87.7" y="75.7" width="4.6" height="4.6" /></bezel>
+
+ <bezel element="text_t81"><bounds x="88.1" y="6.7" width="3.8" height="1.25" /></bezel>
+ <bezel element="text_t82"><bounds x="88.1" y="7.95" width="3.8" height="1.25" /></bezel>
+ <bezel element="text_t7"><bounds x="87.8" y="17.325" width="4.4" height="1.25" /></bezel>
+ <bezel element="text_t6"><bounds x="87.8" y="27.325" width="4.4" height="1.25" /></bezel>
+ <bezel element="text_t5"><bounds x="87.8" y="37.325" width="4.4" height="1.25" /></bezel>
+ <bezel element="text_t41"><bounds x="88.1" y="46.7" width="3.8" height="1.25" /></bezel>
+ <bezel element="text_t42"><bounds x="88.1" y="47.95" width="3.8" height="1.25" /></bezel>
+ <bezel element="text_t3"><bounds x="87.8" y="57.325" width="4.4" height="1.25" /></bezel>
+ <bezel element="text_t2"><bounds x="87.8" y="67.325" width="4.4" height="1.25" /></bezel>
+ <bezel element="text_t1"><bounds x="87.8" y="77.325" width="4.4" height="1.25" /></bezel>
+
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="5" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="15" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="25" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="35" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="45" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="55" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="65" width="6" height="6" /><color alpha="0.3" /></bezel>
+ <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="75" width="6" height="6" /><color alpha="0.3" /></bezel>
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/fidel_eag.lay b/src/mame/layout/fidel_eag.lay
index 7cb96e4c1b5..18c69c87fee 100644
--- a/src/mame/layout/fidel_eag.lay
+++ b/src/mame/layout/fidel_eag.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -141,9 +139,6 @@
<view name="Internal Layout">
<bounds left="-2" right="102" top="-2" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="102" top="-2" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="91" /></bezel>
diff --git a/src/mame/layout/fidel_eag_68k.lay b/src/mame/layout/fidel_eag_68k.lay
index e0f0506b1df..938daaa40f4 100644
--- a/src/mame/layout/fidel_eag_68k.lay
+++ b/src/mame/layout/fidel_eag_68k.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -141,9 +139,6 @@
<view name="Internal Layout">
<bounds left="-2" right="102" top="-2" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="102" top="-2" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="91" /></bezel>
diff --git a/src/mame/layout/fidel_eas.lay b/src/mame/layout/fidel_eas.lay
index 97ecd875f52..57bc6dc6f89 100644
--- a/src/mame/layout/fidel_eas.lay
+++ b/src/mame/layout/fidel_eas.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -133,9 +131,6 @@
<view name="Internal Layout">
<bounds left="-2" right="88" top="-2" bottom="100.5" />
- <bezel element="static_black">
- <bounds left="-2" right="88" top="-2" bottom="100.5" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="91" height="90.5" /></bezel>
diff --git a/src/mame/layout/fidel_ex.lay b/src/mame/layout/fidel_ex.lay
index 1750fa9e138..db62eda88ba 100644
--- a/src/mame/layout/fidel_ex.lay
+++ b/src/mame/layout/fidel_ex.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -222,9 +220,6 @@
<view name="Internal Layout">
<bounds left="-2" right="98" top="-2.5" bottom="89" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-2.5" bottom="89" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="101" height="92" /></bezel>
@@ -453,6 +448,5 @@
<bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="64" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="73" width="8" height="4" /><color alpha="0.4" /></bezel>
-
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_exd.lay b/src/mame/layout/fidel_exd.lay
index 8c5eefe0598..e72cf5b9490 100644
--- a/src/mame/layout/fidel_exd.lay
+++ b/src/mame/layout/fidel_exd.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -226,9 +224,6 @@
<view name="Internal Layout">
<bounds left="-2" right="98" top="-14.5" bottom="89" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-14.5" bottom="89" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2" width="101" height="91.5" /></bezel>
@@ -479,6 +474,5 @@
<bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="64" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="73" width="8" height="4" /><color alpha="0.4" /></bezel>
-
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_playmatic.lay b/src/mame/layout/fidel_playmatic.lay
index f14ec684b28..c288da149db 100644
--- a/src/mame/layout/fidel_playmatic.lay
+++ b/src/mame/layout/fidel_playmatic.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -121,9 +119,6 @@
<view name="Internal Layout">
<bounds left="-2" right="98" top="-2" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-2" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="90.5" /></bezel>
@@ -369,7 +364,7 @@
<bezel element="but" inputtag="IN.8" inputmask="0x02"><bounds x="91.5" y="57" width="2" height="2" /></bezel>
<bezel element="but" inputtag="IN.8" inputmask="0x01"><bounds x="91.5" y="61" width="2" height="2" /></bezel>
- <bezel name="8.7" element="led2"><bounds x="91.75" y="65.25" width="1.5" height="1.5" /></bezel>
+ <bezel name="8.0" element="led2"><bounds x="91.75" y="65.25" width="1.5" height="1.5" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/fidel_rsc_v2.lay b/src/mame/layout/fidel_rsc_v2.lay
index 51de25469e9..9e3ac0954e4 100644
--- a/src/mame/layout/fidel_rsc_v2.lay
+++ b/src/mame/layout/fidel_rsc_v2.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -157,9 +155,6 @@
<view name="Internal Layout">
<bounds left="-2" right="97" top="-2" bottom="87" />
- <bezel element="static_black">
- <bounds left="-2" right="97" top="-2" bottom="87" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="100" height="89.5" /></bezel>
diff --git a/src/mame/layout/fidel_sc12.lay b/src/mame/layout/fidel_sc12.lay
index cbcccc733a3..e296533a269 100644
--- a/src/mame/layout/fidel_sc12.lay
+++ b/src/mame/layout/fidel_sc12.lay
@@ -3,9 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
- <element name="blackl"><rect><color red="0.01" green="0.01" blue="0.01" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -32,6 +29,7 @@
</disk>
</element>
+ <element name="blackl"><rect><color red="0.01" green="0.01" blue="0.01" /></rect></element>
<element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
<element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
<element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
@@ -263,9 +261,6 @@
<view name="Internal Layout">
<bounds left="-7" right="98" top="-2" bottom="93" />
- <bezel element="static_black">
- <bounds left="-7" right="98" top="-2" bottom="93" />
- </bezel>
<bezel element="white"><bounds x="-7.5" y="-2.5" width="106" height="96" /></bezel>
diff --git a/src/mame/layout/fidel_sc9.lay b/src/mame/layout/fidel_sc9.lay
index c8e64595920..ebf037f5565 100644
--- a/src/mame/layout/fidel_sc9.lay
+++ b/src/mame/layout/fidel_sc9.lay
@@ -5,8 +5,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@@ -167,9 +165,6 @@
<view name="Internal Layout">
<bounds left="-2" right="100" top="-2" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="100" top="-2" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="103" height="90.5" /></bezel>
diff --git a/src/mame/layout/fidel_su9.lay b/src/mame/layout/fidel_su9.lay
index c6010790c9b..61e26e8a759 100644
--- a/src/mame/layout/fidel_su9.lay
+++ b/src/mame/layout/fidel_su9.lay
@@ -5,8 +5,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -206,9 +204,6 @@
<view name="Internal Layout">
<bounds left="-2" right="100" top="-18" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="100" top="-18" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2" width="103" height="90.5" /></bezel>
diff --git a/src/mame/layout/fidel_vsc.lay b/src/mame/layout/fidel_vsc.lay
index 3ac26beae1c..fcd23761d06 100644
--- a/src/mame/layout/fidel_vsc.lay
+++ b/src/mame/layout/fidel_vsc.lay
@@ -3,8 +3,6 @@
<!-- define elements -->
- <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
-
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
@@ -179,9 +177,6 @@
<view name="Internal Layout">
<bounds left="-2" right="98" top="-18" bottom="88" />
- <bezel element="static_black">
- <bounds left="-2" right="98" top="-18" bottom="88" />
- </bezel>
<bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel>
diff --git a/src/mame/layout/grobot9.lay b/src/mame/layout/grobot9.lay
new file mode 100644
index 00000000000..e9d2c61895c
--- /dev/null
+++ b/src/mame/layout/grobot9.lay
@@ -0,0 +1,314 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element>
+ <element name="static_yellow"><rect><color red="0.8" green="0.8" blue="0.35" /></rect></element>
+
+ <element name="maskd" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <element name="mask1" defstate="0">
+ <rect state="0"><color red="0" green="0" blue="0" /></rect>
+ <rect state="1"><color red="1.0" green="1.0" blue="1.0" /></rect>
+ </element>
+
+ <element name="mask2" defstate="0">
+ <rect state="0">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.94" y="0.0" width="0.06" height="1.0" />
+ </rect>
+ <rect state="0">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.0" y="0.94" width="1.0" height="0.06" />
+ </rect>
+ </element>
+
+ <element name="mask3" defstate="0">
+ <rect state="0">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.94" y="0.0" width="0.06" height="0.06" />
+ </rect>
+ <rect state="0">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.0" y="0.94" width="0.06" height="0.06" />
+ </rect>
+ </element>
+
+ <element name="mask4" defstate="0">
+ <rect state="1">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.0" y="0.0" width="0.06" height="1.0" />
+ </rect>
+ <rect state="1">
+ <color red="0" green="0" blue="0" />
+ <bounds x="0.0" y="0.0" width="1.0" height="0.06" />
+ </rect>
+ </element>
+
+ <element name="button1"><rect state="0"><color red="1.0" green="0.23" blue="0.25" /></rect></element>
+ <element name="button2"><rect state="0"><color red="0.9" green="0.9" blue="0.2" /></rect></element>
+ <element name="button3"><rect state="0"><color red="1.0" green="0.42" blue="0.2" /></rect></element>
+ <element name="button4"><rect state="0"><color red="0.1" green="0.7" blue="0.1" /></rect></element>
+ <element name="button5"><rect state="0"><color red="0.25" green="0.25" blue="1.0" /></rect></element>
+ <element name="button6"><rect state="0"><color red="0.2" green="0.9" blue="1.0" /></rect></element>
+ <element name="button7"><rect state="0"><color red="0.5" green="0.1" blue="1.0" /></rect></element>
+ <element name="button8"><rect state="0"><color red="0.53" green="1.0" blue="0.5" /></rect></element>
+ <element name="button9"><rect state="0"><color red="1.0" green="0.2" blue="0.8" /></rect></element>
+
+ <element name="text_1"><text string="1"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_2"><text string="2"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_3"><text string="3"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_4"><text string="4"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_5"><text string="5"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_6"><text string="6"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_7"><text string="7"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_8"><text string="8"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_9"><text string="9"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+
+ <element name="text_u1"><text string="[1] ELECTRONIC ORGAN [2] MUSIC MACHINE [2A] WHAT'S THAT"><color red="0.84" green="0.84" blue="0.64" /></text></element>
+ <element name="text_u2"><text string="SONG? [3] THE MEMORY GAME [4] MINDBENDER [5] SPACE ATTACK"><color red="0.84" green="0.84" blue="0.64" /></text></element>
+ <element name="text_u3"><text string="[6] SUBMARINE HUNT [7] CATCH THE COMET [8] BASEBALL [9] ROULETTE"><color red="0.84" green="0.84" blue="0.64" /></text></element>
+
+ <element name="text_r1"><text string="REPEAT"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_r2"><text string="REST"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_r3"><text string="8TH NOTE"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+
+ <element name="text_d1"><text string="START"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_d2"><text string="SELECT"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+ <element name="text_d3"><text string="HIT"><color red="0.94" green="0.94" blue="0.74" /></text></element>
+
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="1" right="50" top="2.5" bottom="63.4" />
+
+ <bezel element="text_u1"><bounds x="0" y="3.5" width="52" height="1.5" /></bezel>
+ <bezel element="text_u2"><bounds x="0" y="5.0" width="52" height="1.5" /></bezel>
+ <bezel element="text_u3"><bounds x="0" y="6.5" width="52" height="1.5" /></bezel>
+
+ <!-- misc buttons -->
+
+ <bezel element="static_yellow"><bounds x="43" y="16" width="5" height="5" /></bezel>
+ <bezel element="static_yellow"><bounds x="43" y="31" width="5" height="5" /></bezel>
+ <bezel element="static_yellow"><bounds x="43" y="46" width="5" height="5" /></bezel>
+
+ <bezel element="maskd" inputtag="IN.3" inputmask="0x08"><bounds x="43" y="16" width="5" height="5" /><color alpha="0.2" /></bezel>
+ <bezel element="maskd" inputtag="IN.2" inputmask="0x02"><bounds x="43" y="31" width="5" height="5" /><color alpha="0.2" /></bezel>
+ <bezel element="maskd" inputtag="IN.2" inputmask="0x04"><bounds x="43" y="46" width="5" height="5" /><color alpha="0.2" /></bezel>
+
+ <bezel element="text_r1"><bounds x="39" y="21.4" width="13" height="2" /></bezel>
+ <bezel element="text_r2"><bounds x="39" y="36.4" width="13" height="2" /></bezel>
+ <bezel element="text_r3"><bounds x="39" y="51.4" width="13" height="2" /></bezel>
+
+
+ <bezel element="static_white"><bounds x="18" y="55" width="5" height="5" /></bezel>
+ <bezel element="static_white"><bounds x="26" y="55" width="5" height="5" /></bezel>
+ <bezel element="static_white"><bounds x="34" y="55" width="5" height="5" /></bezel>
+
+ <bezel element="maskd" inputtag="IN.4" inputmask="0x01"><bounds x="18" y="55" width="5" height="5" /><color alpha="0.2" /></bezel>
+ <bezel element="maskd" inputtag="IN.3" inputmask="0x01"><bounds x="26" y="55" width="5" height="5" /><color alpha="0.2" /></bezel>
+ <bezel element="maskd" inputtag="IN.3" inputmask="0x04"><bounds x="34" y="55" width="5" height="5" /><color alpha="0.2" /></bezel>
+
+ <bezel element="text_d1"><bounds x="16" y="60.4" width="9" height="2" /></bezel>
+ <bezel element="text_d2"><bounds x="24" y="60.4" width="9" height="2" /></bezel>
+ <bezel element="text_d3"><bounds x="32" y="60.4" width="9" height="2" /></bezel>
+
+
+ <!-- coloured lighted buttons -->
+ <!-- row 1 2 3 -->
+
+ <bezel element="button1">
+ <bounds x="3" y="9" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp0" element="mask1">
+ <bounds x="3" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.0" inputmask="0x01">
+ <bounds x="3" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.0" inputmask="0x01">
+ <bounds x="3" y="9" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.0" inputmask="0x01">
+ <bounds x="3" y="9" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button2">
+ <bounds x="16" y="9" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp1" element="mask1">
+ <bounds x="16" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.0" inputmask="0x02">
+ <bounds x="16" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.0" inputmask="0x02">
+ <bounds x="16" y="9" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.0" inputmask="0x02">
+ <bounds x="16" y="9" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button3">
+ <bounds x="29" y="9" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp2" element="mask1">
+ <bounds x="29" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.0" inputmask="0x04">
+ <bounds x="29" y="9" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.0" inputmask="0x04">
+ <bounds x="29" y="9" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.0" inputmask="0x04">
+ <bounds x="29" y="9" width="10" height="12" />
+ </bezel>
+
+ <!-- row 8 9 4 -->
+
+ <bezel element="button8">
+ <bounds x="3" y="24" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp7" element="mask1">
+ <bounds x="3" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.1" inputmask="0x08">
+ <bounds x="3" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.1" inputmask="0x08">
+ <bounds x="3" y="24" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.1" inputmask="0x08">
+ <bounds x="3" y="24" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button9">
+ <bounds x="16" y="24" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp8" element="mask1">
+ <bounds x="16" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.2" inputmask="0x01">
+ <bounds x="16" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.2" inputmask="0x01">
+ <bounds x="16" y="24" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.2" inputmask="0x01">
+ <bounds x="16" y="24" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button4">
+ <bounds x="29" y="24" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp3" element="mask1">
+ <bounds x="29" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.0" inputmask="0x08">
+ <bounds x="29" y="24" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.0" inputmask="0x08">
+ <bounds x="29" y="24" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.0" inputmask="0x08">
+ <bounds x="29" y="24" width="10" height="12" />
+ </bezel>
+
+ <!-- row 7 6 5 -->
+
+ <bezel element="button7">
+ <bounds x="3" y="39" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp6" element="mask1">
+ <bounds x="3" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.1" inputmask="0x04">
+ <bounds x="3" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.1" inputmask="0x04">
+ <bounds x="3" y="39" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.1" inputmask="0x04">
+ <bounds x="3" y="39" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button6">
+ <bounds x="16" y="39" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp5" element="mask1">
+ <bounds x="16" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.1" inputmask="0x02">
+ <bounds x="16" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.1" inputmask="0x02">
+ <bounds x="16" y="39" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.1" inputmask="0x02">
+ <bounds x="16" y="39" width="10" height="12" />
+ </bezel>
+
+ <bezel element="button5">
+ <bounds x="29" y="39" width="10" height="12" />
+ </bezel>
+ <bezel name="lamp4" element="mask1">
+ <bounds x="29" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask2" inputtag="IN.1" inputmask="0x01">
+ <bounds x="29" y="39" width="10" height="12" />
+ <color alpha="0.4" />
+ </bezel>
+ <bezel element="mask3" inputtag="IN.1" inputmask="0x01">
+ <bounds x="29" y="39" width="10" height="12" />
+ </bezel>
+ <bezel element="mask4" inputtag="IN.1" inputmask="0x01">
+ <bounds x="29" y="39" width="10" height="12" />
+ </bezel>
+
+ <!-- number labels -->
+
+ <bezel element="text_1"><bounds x="3" y="21.4" width="9" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="16" y="21.4" width="9" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="29" y="21.4" width="9" height="2" /></bezel>
+
+ <bezel element="text_8"><bounds x="3" y="36.4" width="9" height="2" /></bezel>
+ <bezel element="text_9"><bounds x="16" y="36.4" width="9" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="29" y="36.4" width="9" height="2" /></bezel>
+
+ <bezel element="text_7"><bounds x="3" y="51.4" width="9" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="16" y="51.4" width="9" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="29" y="51.4" width="9" height="2" /></bezel>
+
+
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/sfrush.lay b/src/mame/layout/sfrush.lay
new file mode 100644
index 00000000000..71fd0b81289
--- /dev/null
+++ b/src/mame/layout/sfrush.lay
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <element name="abort" defstate="0">
+ <rect state="0">
+ <bounds x="0" y="0" width="2.0" height="1.15" />
+ <color red="0.25" green="0.0145" blue="0.03425" />
+ </rect>
+ <rect state="1">
+ <bounds x="0" y="0" width="2.0" height="1.15" />
+ <color red="1.0" green="0.058" blue="0.137" />
+ </rect>
+ <text string="ABORT">
+ <color red="0.1" green="0.0058" blue="0.0137" />
+ <bounds x="0.34" y="0.185" width="1.29" height="0.78" />
+ </text>
+ </element>
+
+ <element name="music" defstate="0">
+ <rect state="0">
+ <bounds x="0" y="0" width="2.0" height="2.0" />
+ <color red="0.0375" green="0.25" blue="0.25" />
+ </rect>
+ <rect state="1">
+ <bounds x="0" y="0" width="2.0" height="2.0" />
+ <color red="0.15" green="1.0" blue="1.0" />
+ </rect>
+ <rect>
+ <bounds x="0.1" y="0.1" width="1.8" height="1.8" />
+ <color red="0.015" green="0.1" blue="0.1" />
+ </rect>
+ <text string="MUSIC" state="0">
+ <color red="0.0375" green="0.25" blue="0.25" />
+ <bounds x="0.25" y="0.5" width="1.5" height="1.0" />
+ </text>
+ <text string="MUSIC" state="1">
+ <color red="0.15" green="1.0" blue="1.0" />
+ <bounds x="0.25" y="0.5" width="1.5" height="1.0" />
+ </text>
+ </element>
+
+ <element name="view1" defstate="0">
+ <rect state="0">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="0.25" green="0.16667" blue="0.0" />
+ </rect>
+ <rect state="1">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="1.0" green="0.6667" blue="0.0" />
+ </rect>
+ <rect>
+ <bounds x="0.1" y="0.1" width="1.8" height="1.8" />
+ <color red="0.1" green="0.06667" blue="0.0" />
+ </rect>
+ <text string="VIEW" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#1" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ <text string="VIEW" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#1" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ </element>
+
+ <element name="view2" defstate="0">
+ <rect state="0">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="0.25" green="0.16667" blue="0.0" />
+ </rect>
+ <rect state="1">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="1.0" green="0.6667" blue="0.0" />
+ </rect>
+ <rect>
+ <bounds x="0.1" y="0.1" width="1.8" height="1.8" />
+ <color red="0.1" green="0.06667" blue="0.0" />
+ </rect>
+ <text string="VIEW" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#2" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ <text string="VIEW" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#2" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ </element>
+
+ <element name="view3" defstate="0">
+ <rect state="0">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="0.25" green="0.16667" blue="0.0" />
+ </rect>
+ <rect state="1">
+ <bounds x="0.0" y="0.0" width="2.0" height="2.0" />
+ <color red="1.0" green="0.6667" blue="0.0" />
+ </rect>
+ <rect>
+ <bounds x="0.1" y="0.1" width="1.8" height="1.8" />
+ <color red="0.1" green="0.06667" blue="0.0" />
+ </rect>
+ <text string="VIEW" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#3" state="0">
+ <color red="0.25" green="0.16667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ <text string="VIEW" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="0.1" width="1.6" height="0.8" />
+ </text>
+ <text string="#3" state="1">
+ <color red="1.0" green="0.6667" blue="0.0" />
+ <bounds x="0.2" y="1.0" width="1.6" height="0.8" />
+ </text>
+ </element>
+
+ <element name="leader" defstate="0">
+ <rect>
+ <bounds x="0" y="0" width="3.0" height="1.75" />
+ <color red="0.05" green="0.05" blue="0.05" />
+ </rect>
+ <text string="LEADER" state="0">
+ <color red="0.1" green="0.1" blue="0.0" />
+ <bounds x="0.5" y="0.3" width="2.0" height="1.15" />
+ </text>
+ <text string="LEADER" state="1">
+ <color red="1.0" green="1.0" blue="0.0" />
+ <bounds x="0.5" y="0.3" width="2.0" height="1.15" />
+ </text>
+ </element>
+
+ <element name="winner" defstate="0">
+ <rect>
+ <bounds x="0" y="0" width="3.0" height="1.4" />
+ <color red="0.05" green="0.05" blue="0.05" />
+ </rect>
+ <text string="WINNER" state="0">
+ <color red="0.1" green="0.1" blue="0.0" />
+ <bounds x="0.5" y="0.24" width="2.0" height="0.94" />
+ </text>
+ <text string="WINNER" state="1">
+ <color red="1.0" green="1.0" blue="0.0" />
+ <bounds x="0.5" y="0.24" width="2.0" height="0.94" />
+ </text>
+ </element>
+
+ <view name="Dashboard">
+ <bounds left="0" top="0" right="4" bottom="3.472" />
+
+ <screen index="0">
+ <bounds left="0" top="0" right="4" bottom="3" />
+ </screen>
+
+ <bezel name="lamp3" element="abort" inputtag="SYSTEM" inputmask="0x04">
+ <bounds x="3.63" y="3.248" width="0.346" height="0.2" />
+ </bezel>
+ <bezel name="lamp4" element="music" inputtag="IN1" inputmask="0x08">
+ <bounds x="0.248" y="3.024" width="0.2" height="0.2" />
+ </bezel>
+ <bezel name="lamp5" element="view3" inputtag="IN1" inputmask="0x04">
+ <bounds x="0.472" y="3.248" width="0.2" height="0.2" />
+ </bezel>
+ <bezel name="lamp6" element="view2" inputtag="IN1" inputmask="0x02">
+ <bounds x="0.248" y="3.248" width="0.2" height="0.2" />
+ </bezel>
+ <bezel name="lamp7" element="view1" inputtag="IN1" inputmask="0x01">
+ <bounds x="0.024" y="3.248" width="0.2" height="0.2" />
+ </bezel>
+
+ <bezel name="lamp8" element="leader">
+ <bounds x="1.45" y="3.1" width="0.5" height="0.23" />
+ </bezel>
+
+ <bezel name="lamp9" element="winner">
+ <bounds x="2.05" y="3.1" width="0.5" height="0.23" />
+ </bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/layout/tranz330.lay b/src/mame/layout/tranz330.lay
new file mode 100644
index 00000000000..94c06a1d7ee
--- /dev/null
+++ b/src/mame/layout/tranz330.lay
@@ -0,0 +1,227 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <element name="vfd0"><led16segsc><color red="0" green="0.6" blue="1.0" /></led16segsc></element>
+
+ <element name="front"><rect><color red="0.15" green="0.15" blue="0.15" /></rect></element>
+ <element name="vfd_back"><rect><color red="0.03" green="0.03" blue="0.03" /></rect></element>
+ <element name="button_digit_back"><rect><color red="0.75" green="0.75" blue="0.75" /></rect></element>
+ <element name="button_aux_back"><rect><color red="0.57" green="0.57" blue="0.57" /></rect></element>
+ <element name="button_enter_back"><rect><color red="0.25" green="0.625" blue="0.875" /></rect></element>
+
+ <element name="hl" defstate="0">
+ <text string=" ">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </text>
+ <rect state="1">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+
+ <element name="button_1_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="QZ."><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_1_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="1"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_2_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="ABC"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_2_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="2"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_3_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="DEF"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_3_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="3"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_4_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="GHI"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_4_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="4"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_5_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="JKL"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_5_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="5"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_6_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="MNO"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_6_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="6"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_7_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="PRS"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_7_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="7"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_8_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="TUV"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_8_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="8"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_9_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="WXY"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_9_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="9"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_0_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="-SP"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_0_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="0"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_star_text">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string=",'&quot;"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_star_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="*"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_hash_num">
+ <rect><color red="0.75" green="0.75" blue="0.75" /></rect>
+ <text string="#"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_clear_text">
+ <rect><color red="0.57" green="0.57" blue="0.57" /></rect>
+ <text string="CLEAR"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_back_text">
+ <rect><color red="0.57" green="0.57" blue="0.57" /></rect>
+ <text string="BACK"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_space_text">
+ <rect><color red="0.57" green="0.57" blue="0.57" /></rect>
+ <text string="SPACE"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_alpha_text">
+ <rect><color red="0.57" green="0.57" blue="0.57" /></rect>
+ <text string="ALPHA"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_func_text">
+ <rect><color red="0.25" green="0.625" blue="0.875" /></rect>
+ <text string="FUNC"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+ <element name="button_enter_text">
+ <rect><color red="0.25" green="0.625" blue="0.875" /></rect>
+ <text string="ENTER"><color red="0.0" green="0.0" blue="0.0" /></text>
+ </element>
+
+ <element name="button_enter_line"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
+
+ <view name="Internal Layout">
+ <backdrop name="case_bg" element="front"> <bounds x=" 0" y=" 0" width="162" height="190"/></backdrop>
+ <backdrop name="button_1" element="button_digit_back"><bounds x=" 18" y=" 50" width="25" height="25"/></backdrop>
+ <backdrop name="button_2" element="button_digit_back"><bounds x=" 52" y=" 50" width="25" height="25"/></backdrop>
+ <backdrop name="button_3" element="button_digit_back"><bounds x=" 86" y=" 50" width="25" height="25"/></backdrop>
+ <backdrop name="button_4" element="button_digit_back"><bounds x=" 18" y=" 84" width="25" height="25"/></backdrop>
+ <backdrop name="button_5" element="button_digit_back"><bounds x=" 52" y=" 84" width="25" height="25"/></backdrop>
+ <backdrop name="button_6" element="button_digit_back"><bounds x=" 86" y=" 84" width="25" height="25"/></backdrop>
+ <backdrop name="button_7" element="button_digit_back"><bounds x=" 18" y="118" width="25" height="25"/></backdrop>
+ <backdrop name="button_8" element="button_digit_back"><bounds x=" 52" y="118" width="25" height="25"/></backdrop>
+ <backdrop name="button_9" element="button_digit_back"><bounds x=" 86" y="118" width="25" height="25"/></backdrop>
+ <backdrop name="button_0" element="button_digit_back"><bounds x=" 52" y="152" width="25" height="25"/></backdrop>
+ <backdrop name="button_star" element="button_digit_back"><bounds x=" 18" y="152" width="25" height="25"/></backdrop>
+ <backdrop name="button_hash" element="button_digit_back"><bounds x=" 86" y="152" width="25" height="25"/></backdrop>
+ <backdrop name="button_clear" element="button_aux_back"> <bounds x="120" y=" 50" width="25" height="25"/></backdrop>
+ <backdrop name="button_back" element="button_aux_back"> <bounds x="120" y=" 84" width="25" height="25"/></backdrop>
+ <backdrop name="button_alpha" element="button_aux_back"> <bounds x="120" y="118" width="25" height="25"/></backdrop>
+ <backdrop name="button_enter" element="button_enter_back"><bounds x="120" y="152" width="25" height="25"/></backdrop>
+
+ <backdrop name="vfd_backdrop" element="vfd_back"> <bounds x=" 0" y=" 0" width="162" height="32"/></backdrop>
+
+ <bezel name="vfd0" element="vfd0" state="0"><bounds x=" 9" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd1" element="vfd0" state="0"><bounds x=" 18" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd2" element="vfd0" state="0"><bounds x=" 27" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd3" element="vfd0" state="0"><bounds x=" 36" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd4" element="vfd0" state="0"><bounds x=" 45" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd5" element="vfd0" state="0"><bounds x=" 54" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd6" element="vfd0" state="0"><bounds x=" 63" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd7" element="vfd0" state="0"><bounds x=" 72" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd8" element="vfd0" state="0"><bounds x=" 81" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd9" element="vfd0" state="0"><bounds x=" 90" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd10" element="vfd0" state="0"><bounds x=" 99" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd11" element="vfd0" state="0"><bounds x="108" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd12" element="vfd0" state="0"><bounds x="117" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd13" element="vfd0" state="0"><bounds x="126" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd14" element="vfd0" state="0"><bounds x="135" y="9" width="9" height="14"/></bezel>
+ <bezel name="vfd15" element="vfd0" state="0"><bounds x="144" y="9" width="9" height="14"/></bezel>
+
+ <bezel name="button_1_text1" element="button_1_text"> <bounds x=" 18" y=" 54" width="25" height="8"/></bezel>
+ <bezel name="button_1_text2" element="button_1_num"> <bounds x=" 18" y=" 64" width="25" height="8"/></bezel>
+ <bezel name="button_2_text1" element="button_2_text"> <bounds x=" 52" y=" 54" width="25" height="8"/></bezel>
+ <bezel name="button_2_text2" element="button_2_num"> <bounds x=" 52" y=" 64" width="25" height="8"/></bezel>
+ <bezel name="button_3_text1" element="button_3_text"> <bounds x=" 86" y=" 54" width="25" height="8"/></bezel>
+ <bezel name="button_3_text2" element="button_3_num"> <bounds x=" 86" y=" 64" width="25" height="8"/></bezel>
+ <bezel name="button_4_text1" element="button_4_text"> <bounds x=" 18" y=" 88" width="25" height="8"/></bezel>
+ <bezel name="button_4_text2" element="button_4_num"> <bounds x=" 18" y=" 98" width="25" height="8"/></bezel>
+ <bezel name="button_5_text1" element="button_5_text"> <bounds x=" 52" y=" 88" width="25" height="8"/></bezel>
+ <bezel name="button_5_text2" element="button_5_num"> <bounds x=" 52" y=" 98" width="25" height="8"/></bezel>
+ <bezel name="button_6_text1" element="button_6_text"> <bounds x=" 86" y=" 88" width="25" height="8"/></bezel>
+ <bezel name="button_6_text2" element="button_6_num"> <bounds x=" 86" y=" 98" width="25" height="8"/></bezel>
+ <bezel name="button_7_text1" element="button_7_text"> <bounds x=" 18" y="122" width="25" height="8"/></bezel>
+ <bezel name="button_7_text2" element="button_7_num"> <bounds x=" 18" y="132" width="25" height="8"/></bezel>
+ <bezel name="button_8_text1" element="button_8_text"> <bounds x=" 52" y="122" width="25" height="8"/></bezel>
+ <bezel name="button_8_text2" element="button_8_num"> <bounds x=" 52" y="132" width="25" height="8"/></bezel>
+ <bezel name="button_9_text1" element="button_9_text"> <bounds x=" 86" y="122" width="25" height="8"/></bezel>
+ <bezel name="button_9_text2" element="button_9_num"> <bounds x=" 86" y="132" width="25" height="8"/></bezel>
+ <bezel name="button_star_text1" element="button_star_text"> <bounds x=" 18" y="156" width="25" height="8"/></bezel>
+ <bezel name="button_star_text2" element="button_star_num"> <bounds x=" 18" y="166" width="25" height="8"/></bezel>
+ <bezel name="button_0_text1" element="button_0_text"> <bounds x=" 52" y="156" width="25" height="8"/></bezel>
+ <bezel name="button_0_text2" element="button_0_num"> <bounds x=" 52" y="166" width="25" height="8"/></bezel>
+ <bezel name="button_hash_text" element="button_hash_num"> <bounds x=" 86" y="161" width="25" height="8"/></bezel>
+ <bezel name="button_clear_text1" element="button_clear_text"><bounds x="120" y=" 59" width="25" height="7"/></bezel>
+ <bezel name="button_back_text1" element="button_back_text"> <bounds x="120" y=" 88" width="25" height="7"/></bezel>
+ <bezel name="button_space_text1" element="button_space_text"><bounds x="120" y=" 98" width="25" height="7"/></bezel>
+ <bezel name="button_alpha_text1" element="button_alpha_text"><bounds x="120" y="127" width="25" height="7"/></bezel>
+ <bezel name="button_func_text1" element="button_func_text"> <bounds x="120" y="156" width="25" height="7"/></bezel>
+ <bezel name="button_enter_text1" element="button_enter_text"><bounds x="120" y="166" width="25" height="7"/></bezel>
+ <bezel name="enter_line_strike" element="button_enter_line"><bounds x="122.5" y="164" width="20" height="1"/></bezel>
+
+ <bezel element="hl" inputtag="COL.0" inputmask="0x01"><bounds x=" 20" y=" 52" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.0" inputmask="0x02"><bounds x=" 20" y=" 86" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.0" inputmask="0x04"><bounds x=" 20" y="120" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.0" inputmask="0x08"><bounds x=" 20" y="154" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.1" inputmask="0x01"><bounds x=" 54" y=" 52" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.1" inputmask="0x02"><bounds x=" 54" y=" 86" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.1" inputmask="0x04"><bounds x=" 54" y="120" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.1" inputmask="0x08"><bounds x=" 54" y="154" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.2" inputmask="0x01"><bounds x=" 88" y=" 52" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.2" inputmask="0x02"><bounds x=" 88" y=" 86" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.2" inputmask="0x04"><bounds x=" 88" y="120" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.2" inputmask="0x08"><bounds x=" 88" y="154" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.3" inputmask="0x01"><bounds x="122" y=" 52" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.3" inputmask="0x02"><bounds x="122" y=" 86" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.3" inputmask="0x04"><bounds x="122" y="120" width="21" height="21" /><color alpha="0.2" /></bezel>
+ <bezel element="hl" inputtag="COL.3" inputmask="0x08"><bounds x="122" y="154" width="21" height="21" /><color alpha="0.2" /></bezel>
+ </view>
+</mamelayout>
diff --git a/src/mame/machine/advision.cpp b/src/mame/machine/advision.cpp
index c41aaeff84d..792cf6b0719 100644
--- a/src/mame/machine/advision.cpp
+++ b/src/mame/machine/advision.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "includes/advision.h"
#include "cpu/mcs48/mcs48.h"
-#include "sound/dac.h"
/*
8048 Ports:
@@ -117,12 +116,8 @@ READ8_MEMBER( advision_state::sound_cmd_r )
void advision_state::update_dac()
{
- if (m_sound_g == 0 && m_sound_d == 0)
- m_dac->write_unsigned8(0xff);
- else if (m_sound_g == 1 && m_sound_d == 1)
- m_dac->write_unsigned8(0x80);
- else
- m_dac->write_unsigned8(0x00);
+ int translate[] = { 2, 0, 0, 1 };
+ m_dac->write(translate[(m_sound_g << 1) | m_sound_d]);
}
WRITE8_MEMBER( advision_state::sound_g_w )
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index 3fab6018d37..8a8b111de72 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -396,7 +396,7 @@ UINT16 amiga_state::joy1dat_r()
CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
{
- UINT8 bits = m_joy_ports[(int)(FPTR)param].read_safe(0xff);
+ UINT8 bits = m_joy_ports[(int)(uintptr_t)param].read_safe(0xff);
int up = (bits >> 0) & 1;
int down = (bits >> 1) & 1;
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index 07c5d060fe9..1cda012e914 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -3262,7 +3262,7 @@ MACHINE_RESET_MEMBER(amstrad_state,aleste)
/* load snapshot */
SNAPSHOT_LOAD_MEMBER( amstrad_state,amstrad)
{
- dynamic_buffer snapshot;
+ std::vector<UINT8> snapshot;
/* get file size */
if (snapshot_size < 8)
@@ -3338,7 +3338,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
UINT32 offset = 0;
UINT8 *crt = m_cart->get_rom_base();
- dynamic_buffer temp_copy;
+ std::vector<UINT8> temp_copy;
temp_copy.resize(size);
image.fread(&temp_copy[0], size);
diff --git a/src/mame/machine/apple3.cpp b/src/mame/machine/apple3.cpp
index f5e4ebb2fdc..1edd8fdbbd8 100644
--- a/src/mame/machine/apple3.cpp
+++ b/src/mame/machine/apple3.cpp
@@ -128,8 +128,8 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3A: case 0x3B:
case 0x3C: case 0x3D: case 0x3E: case 0x3F:
- m_speaker_state ^= 1;
- m_speaker->level_w(m_speaker_state);
+ m_bell_state ^= 1;
+ m_bell->write(m_bell_state);
break;
case 0x40: case 0x41: case 0x42: case 0x43:
@@ -332,8 +332,8 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
case 0x34: case 0x35: case 0x36: case 0x37:
case 0x38: case 0x39: case 0x3A: case 0x3B:
case 0x3C: case 0x3D: case 0x3E: case 0x3F:
- m_speaker_state ^= 1;
- m_speaker->level_w(m_speaker_state);
+ m_bell_state ^= 1;
+ m_bell->write(m_bell_state);
break;
case 0x40: case 0x41: case 0x42: case 0x43:
@@ -617,7 +617,7 @@ WRITE8_MEMBER(apple3_state::apple3_via_1_out_a)
WRITE8_MEMBER(apple3_state::apple3_via_1_out_b)
{
- m_dac->write_unsigned8(data<<2);
+ m_dac->write(data);
apple3_via_out(&m_via_1_b, data);
}
@@ -663,8 +663,8 @@ MACHINE_RESET_MEMBER(apple3_state,apple3)
{
m_indir_bank = 0;
m_sync = false;
- m_speaker_state = 0;
- m_speaker->level_w(0);
+ m_bell_state = 0;
+ m_bell->write(m_bell_state);
m_c040_time = 0;
m_strobe = 0;
m_lastchar = 0x0d;
@@ -759,7 +759,7 @@ DRIVER_INIT_MEMBER(apple3_state,apple3)
save_item(NAME(m_sync));
save_item(NAME(m_indir_bank));
save_item(NAME(m_cnxx_slot));
- save_item(NAME(m_speaker_state));
+ save_item(NAME(m_bell_state));
save_item(NAME(m_c040_time));
save_item(NAME(m_lastchar));
save_item(NAME(m_strobe));
@@ -1085,8 +1085,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::apple3_c040_tick)
{
if (m_c040_time > 0)
{
- m_speaker_state ^= 1;
- m_speaker->level_w(m_speaker_state);
+ m_bell_state ^= 1;
+ m_bell->write(m_bell_state);
m_c040_time--;
}
}
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index 38b6785b307..a82c38c91c9 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -212,7 +212,7 @@ void archimedes_state::vidc_audio_tick()
res = mulawTable[ulaw_comp];
- m_dac[ch & 7]->write_signed16(res^0x8000);
+ m_dac[ch & 7]->write(res);
}
m_vidc_sndcur+=8;
@@ -227,7 +227,7 @@ void archimedes_state::vidc_audio_tick()
m_snd_timer->adjust(attotime::never);
for(ch=0;ch<8;ch++)
{
- m_dac[ch & 7]->write_signed16(0x8000);
+ m_dac[ch & 7]->write(0);
}
}
}
@@ -293,8 +293,6 @@ void archimedes_state::archimedes_reset()
void archimedes_state::archimedes_init()
{
- static const char *const dac_names[8] = { "dac0", "dac1", "dac2", "dac3", "dac4", "dac5", "dac6", "dac7" };
-
m_memc_pagesize = 0;
m_vbl_timer = timer_alloc(TIMER_VBLANK);
@@ -312,11 +310,6 @@ void archimedes_state::archimedes_init()
m_vid_timer = timer_alloc(TIMER_VIDEO);
m_snd_timer = timer_alloc(TIMER_AUDIO);
m_snd_timer->adjust(attotime::never);
-
- for ( int i = 0; i < 8; i++ )
- {
- m_dac[i] = machine().device<dac_device>(dac_names[i]);
- }
}
READ32_MEMBER(archimedes_state::archimedes_memc_logical_r)
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index a3c903e8b56..fe5e4bf790b 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -11,7 +11,6 @@
#include "cpu/i386/i386.h"
#include "machine/at_keybc.h"
#include "bus/pc_kbd/pc_kbdc.h"
-#include "sound/dac.h"
#include "softlist_dev.h"
#define LOG_PORT80 0
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index ea8bc30a681..b73eb42dd50 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -391,7 +391,7 @@ public:
UINT8 m_slapstic_num;
UINT16 * m_slapstic;
UINT8 m_slapstic_bank;
- dynamic_buffer m_slapstic_bank0;
+ std::vector<UINT8> m_slapstic_bank0;
offs_t m_slapstic_last_pc;
offs_t m_slapstic_last_address;
offs_t m_slapstic_base;
diff --git a/src/mame/machine/bfm_comn.cpp b/src/mame/machine/bfm_comn.cpp
index 9b917a75914..1faa709b40a 100644
--- a/src/mame/machine/bfm_comn.cpp
+++ b/src/mame/machine/bfm_comn.cpp
@@ -26,7 +26,7 @@ void bfm_decode_mainrom(running_machine &machine, const char *rom_region, UINT8*
rom = machine.root_device().memregion(rom_region)->base();
{
- dynamic_buffer tmp(0x10000);
+ std::vector<UINT8> tmp(0x10000);
int i;
memcpy(&tmp[0], rom, 0x10000);
diff --git a/src/mame/machine/cbm_snqk.cpp b/src/mame/machine/cbm_snqk.cpp
index f8a481a6143..988575ae54e 100644
--- a/src/mame/machine/cbm_snqk.cpp
+++ b/src/mame/machine/cbm_snqk.cpp
@@ -28,7 +28,7 @@ image_init_result general_cbm_loadsnap( device_image_interface &image, const cha
address_space &space, offs_t offset, void (*cbm_sethiaddress)(address_space &space, UINT16 hiaddress) )
{
char buffer[7];
- dynamic_buffer data;
+ std::vector<UINT8> data;
UINT32 bytesread;
UINT16 address = 0;
int i;
diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp
index 8cdf9d4a686..beb835077ef 100644
--- a/src/mame/machine/coco.cpp
+++ b/src/mame/machine/coco.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Nathan Woods
/***************************************************************************
- coco.c
+ coco.cpp
TRS-80 Radio Shack Color Computer Family
@@ -83,7 +83,7 @@ coco_state::coco_state(const machine_config &mconfig, device_type type, const ch
m_maincpu(*this, MAINCPU_TAG),
m_pia_0(*this, PIA0_TAG),
m_pia_1(*this, PIA1_TAG),
- m_dac(*this, DAC_TAG),
+ m_dac(*this, "dac"),
m_wave(*this, WAVE_TAG),
m_cococart(*this, CARTRIDGE_TAG),
m_ram(*this, RAM_TAG),
@@ -92,7 +92,10 @@ coco_state::coco_state(const machine_config &mconfig, device_type type, const ch
m_vhd_0(*this, VHD0_TAG),
m_vhd_1(*this, VHD1_TAG),
m_beckerport(*this, DWSOCK_TAG),
- m_beckerportconfig(*this, BECKERPORT_TAG)
+ m_beckerportconfig(*this, BECKERPORT_TAG),
+ m_keyboard(*this, "row%u", 0),
+ m_joystick_type_control(*this, CTRL_SEL_TAG),
+ m_joystick_hires_control(*this, HIRES_INTF_TAG)
{
}
@@ -121,14 +124,6 @@ void coco_state::device_start()
/* call base device_start */
driver_device::device_start();
- /* look up keyboard ports */
- for (int i = 0; i < ARRAY_LENGTH(m_keyboard); i++)
- {
- char name[32];
- snprintf(name, ARRAY_LENGTH(name), "row%d", i);
- m_keyboard[i] = ioport(name);
- }
-
/* look up analog ports */
analog_port_start(&m_joystick, JOYSTICK_RX_TAG, JOYSTICK_RY_TAG,
JOYSTICK_LX_TAG, JOYSTICK_LY_TAG, JOYSTICK_BUTTONS_TAG);
@@ -137,10 +132,6 @@ void coco_state::device_start()
analog_port_start(&m_diecom_lightgun, DIECOM_LIGHTGUN_RX_TAG, DIECOM_LIGHTGUN_RY_TAG,
DIECOM_LIGHTGUN_LX_TAG, DIECOM_LIGHTGUN_LY_TAG, DIECOM_LIGHTGUN_BUTTONS_TAG);
- /* look up miscellaneous controls */
- m_joystick_type_control = ioport(CTRL_SEL_TAG);
- m_joystick_hires_control = ioport(HIRES_INTF_TAG);
-
/* timers */
m_hiresjoy_transition_timer[0] = timer_alloc(TIMER_HIRES_JOYSTICK_X);
m_hiresjoy_transition_timer[1] = timer_alloc(TIMER_HIRES_JOYSTICK_Y);
@@ -701,7 +692,7 @@ void coco_state::update_sound(void)
m_analog_audio_level = dac_sound + cassette_sound + cart_sound;
}
- m_dac->write_unsigned8(single_bit_sound + m_analog_audio_level);
+ m_dac->write(single_bit_sound + m_analog_audio_level);
/* determine the cassette sound status */
cassette_state cas_sound = bCassSoundEnable ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED;
@@ -723,7 +714,7 @@ void coco_state::update_sound(void)
coco_state::joystick_type_t coco_state::joystick_type(int index)
{
assert((index == 0) || (index == 1));
- return (m_joystick_type_control != nullptr)
+ return m_joystick_type_control
? (joystick_type_t) ((m_joystick_type_control->read() >> (index * 4)) & 0x0F)
: JOYSTICK_NONE;
}
@@ -736,7 +727,7 @@ coco_state::joystick_type_t coco_state::joystick_type(int index)
coco_state::hires_type_t coco_state::hires_interface_type(void)
{
- return (m_joystick_hires_control != nullptr)
+ return m_joystick_hires_control
? (hires_type_t) m_joystick_hires_control->read()
: HIRES_NONE;
}
@@ -866,7 +857,7 @@ void coco_state::poll_keyboard(void)
UINT8 pia0_pa_z = 0x7F;
/* poll the keyboard, and update PA6-PA0 accordingly*/
- for (int i = 0; i < ARRAY_LENGTH(m_keyboard); i++)
+ for (unsigned i = 0; i < m_keyboard.size(); i++)
{
int value = m_keyboard[i]->read();
if ((value | pia0_pb) != 0xFF)
diff --git a/src/mame/machine/cybiko.cpp b/src/mame/machine/cybiko.cpp
index bd28cdfd9ee..aa0d116b6dd 100644
--- a/src/mame/machine/cybiko.cpp
+++ b/src/mame/machine/cybiko.cpp
@@ -48,7 +48,7 @@ QUICKLOAD_LOAD_MEMBER( cybiko_state, cybikoxt )
address_space &dest = m_maincpu->space(AS_PROGRAM);
UINT32 size = std::min(image.length(), UINT64(RAMDISK_SIZE));
- dynamic_buffer buffer(size);
+ std::vector<UINT8> buffer(size);
image.fread(&buffer[0], size);
for (int byte = 0; byte < size; byte++)
dest.write_byte(0x400000 + byte, buffer[byte]);
diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp
index 2b308efe486..c0bb1c642e9 100644
--- a/src/mame/machine/decocass.cpp
+++ b/src/mame/machine/decocass.cpp
@@ -401,6 +401,38 @@ static UINT8 type1_latch_16_pass_3_inv_1_table[8] = { T1PROM,T1LATCHINV,T1PROM,T
/***************************************************************************
*
+ * TYPE1 DONGLE DP-1100/DP-2100 map for Ocean to Ocean
+ *
+ * Latched bits = $44 (2 latch bits)
+ * Input bits that are passed uninverted = $10 (1 true bits)
+ * Input bits that are passed inverted = $00 (0 inverted bits)
+ * Remaining bits for addressing PROM = $AB (5 bits)
+ * Latched bit #0:
+ * Input bit position = 2
+ * Output bit position = 2
+ * Type = Inverting latch
+ * Latched bit #1:
+ * Input bit position = 6
+ * Output bit position = 6
+ * Type = Non-inverting latch
+ *
+ ***************************************************************************/
+
+static UINT8 type1_map1100[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1LATCH,T1PROM };
+
+MACHINE_RESET_MEMBER(decocass_state,cocean1a) /* 10 */
+{
+ decocass_state::machine_reset();
+ LOG(0,("dongle type #1 (DP-1100 map)\n"));
+ m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this);
+ m_type1_map = type1_map1100;
+ m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7);
+ m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7);
+}
+
+
+/***************************************************************************
+ *
* TYPE2 DONGLE (CS82-007)
* - Disco No 1
* - Tornado
diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp
index 44ce021c4d2..3ce329ca8fe 100644
--- a/src/mame/machine/dgn_beta.cpp
+++ b/src/mame/machine/dgn_beta.cpp
@@ -202,7 +202,7 @@ void dgn_beta_state::UpdateBanks(int first, int last)
m_PageRegs[m_TaskReg][Page].memory=readbank;
membank(page_num)->set_base(readbank);
- LOG_BANK_UPDATE(("UpdateBanks:MapPage=$%02X readbank=$%X\n",MapPage,(int)(FPTR)readbank));
+ LOG_BANK_UPDATE(("UpdateBanks:MapPage=$%02X readbank=$%X\n",MapPage,(int)(uintptr_t)readbank));
LOG_BANK_UPDATE(("PageRegsSet Task=%X Page=%x\n",m_TaskReg,Page));
//LOG_BANK_UPDATE(("%X)\n",membank(Page+1)));
LOG_BANK_UPDATE(("memory_install_write8_handler CPU=0\n"));
diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp
index 099520b2813..1b6700caf24 100644
--- a/src/mame/machine/gaelco2.cpp
+++ b/src/mame/machine/gaelco2.cpp
@@ -221,7 +221,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bang_state::bang_irq)
CUSTOM_INPUT_MEMBER(wrally2_state::wrally2_analog_bit_r)
{
- int which = (FPTR)param;
+ int which = (uintptr_t)param;
return (m_analog_ports[which] >> 7) & 0x01;
}
diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp
index 1414e4c3cb2..0aa0eec1673 100644
--- a/src/mame/machine/galaxold.cpp
+++ b/src/mame/machine/galaxold.cpp
@@ -146,7 +146,7 @@ WRITE8_MEMBER(galaxold_state::_4in1_bank_w)
CUSTOM_INPUT_MEMBER(galaxold_state::_4in1_fake_port_r)
{
static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
- int bit_mask = (FPTR)param;
+ int bit_mask = (uintptr_t)param;
return (ioport(portnames[m__4in1_bank])->read() & bit_mask) ? 0x01 : 0x00;
}
diff --git a/src/mame/machine/gamecom.cpp b/src/mame/machine/gamecom.cpp
index 03cf2786152..24e9a238ada 100644
--- a/src/mame/machine/gamecom.cpp
+++ b/src/mame/machine/gamecom.cpp
@@ -27,9 +27,7 @@ TIMER_CALLBACK_MEMBER(gamecom_state::gamecom_sound0_timer_callback)
}
if (m_sound0_cnt < 0x40)
{
- bool which_half = BIT(m_sound0_cnt, 0);
- UINT8 sb = m_sound.sg0w[m_sound0_cnt >> 1];
- m_dac0->write_signed8(which_half ? sb & 0xf0 : sb << 4);
+ m_dac0->write((m_sound.sg0w[m_sound0_cnt >> 1] >> (BIT(m_sound0_cnt, 0) * 4)) & 0xf);
m_sound0_cnt++;
}
}
@@ -47,9 +45,7 @@ TIMER_CALLBACK_MEMBER(gamecom_state::gamecom_sound1_timer_callback)
}
if (m_sound1_cnt < 0x40)
{
- bool which_half = BIT(m_sound1_cnt, 0);
- UINT8 sb = m_sound.sg1w[m_sound1_cnt >> 1];
- m_dac1->write_signed8(which_half ? sb & 0xf0 : sb << 4);
+ m_dac1->write((m_sound.sg1w[m_sound1_cnt >> 1] >> (BIT(m_sound1_cnt, 0) * 4)) & 0xf);
m_sound1_cnt++;
}
}
@@ -402,7 +398,7 @@ WRITE8_MEMBER( gamecom_state::gamecom_internal_w )
case SM8521_SGDA:
m_sound.sgda = data;
if((m_sound.sgc & 0x88) == 0x88)
- m_dac->write_unsigned8(data);
+ m_dac->write(data);
break;
case SM8521_SG0W0:
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index 50b3124e585..46e075d1414 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -7,7 +7,6 @@
****************************************************************************/
#include "emu.h"
-#include "sound/dac.h"
#include "includes/slapstic.h"
#include "includes/harddriv.h"
@@ -269,15 +268,15 @@ READ16_MEMBER( harddriv_state::hda68k_port1_r )
READ16_MEMBER( harddriv_state::hdc68k_wheel_r )
{
- /* grab the new wheel value and upconvert to 12 bits */
- UINT16 new_wheel = m_12badc[0].read_safe(0xffff) << 4;
+ /* grab the new wheel value */
+ UINT16 new_wheel = m_12badc[0].read_safe(0xffff);
/* hack to display the wheel position */
if (space.machine().input().code_pressed(KEYCODE_LSHIFT))
popmessage("%04X", new_wheel);
/* if we crossed the center line, latch the edge bit */
- if ((m_hdc68k_last_wheel / 0xf0) != (new_wheel / 0xf0))
+ if ((m_hdc68k_last_wheel / 0xf00) != (new_wheel / 0xf00))
m_hdc68k_wheel_edge = 1;
/* remember the last value and return the low 8 bits */
@@ -328,7 +327,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_adc_control_w )
if (m_adc_control & 0x40)
{
m_adc12_select = (m_adc_control >> 4) & 0x03;
- m_adc12_data = m_12badc[m_adc12_select].read_safe(0xffff) << 4;
+ m_adc12_data = m_12badc[m_adc12_select].read_safe(0xffff);
}
/* bit 7 selects which byte of the 12 bit data to read */
@@ -1123,11 +1122,11 @@ WRITE16_MEMBER( harddriv_state::hdds3_sdsp_special_w )
break;
case 4:
- m_ds3dac1->write_signed16(data);
+ m_ldac->write(data);
break;
case 5:
- m_ds3dac2->write_signed16(data);
+ m_rdac->write(data);
break;
case 6:
diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp
index 106e6a5f01b..21b5be8c42d 100644
--- a/src/mame/machine/hp48.cpp
+++ b/src/mame/machine/hp48.cpp
@@ -9,7 +9,6 @@
**********************************************************************/
#include "emu.h"
-#include "sound/dac.h"
#include "cpu/saturn/saturn.h"
#include "machine/nvram.h"
@@ -169,7 +168,7 @@ WRITE32_MEMBER( hp48_state::hp48_reg_out )
/* bits 9-10: unused */
/* bit 11: beeper */
- m_dac->write_unsigned8((data & 0x800) ? 0x80 : 00 );
+ m_dac->write(BIT(data, 11));
}
int hp48_state::hp48_get_in( )
diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp
index bd5cbd170a1..daddc97e6f4 100644
--- a/src/mame/machine/inder_sb.cpp
+++ b/src/mame/machine/inder_sb.cpp
@@ -5,7 +5,7 @@
#include "emu.h"
#include "machine/inder_sb.h"
-
+#include "sound/volt_reg.h"
extern const device_type INDER_AUDIO = &device_creator<inder_sb_device>;
@@ -15,11 +15,7 @@ inder_sb_device::inder_sb_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, INDER_AUDIO, "Inder 4xDAC Sound Board", tag, owner, clock, "indersb", __FILE__),
device_mixer_interface(mconfig, *this, 2),
m_audiocpu(*this, "audiocpu"),
- m_ctc(*this, "ctc"),
- m_dac0(*this, "dac0" ),
- m_dac1(*this, "dac1" ),
- m_dac2(*this, "dac2" ),
- m_dac3(*this, "dac3" )
+ m_ctc(*this, "ctc")
{
}
@@ -153,54 +149,6 @@ WRITE8_MEMBER(inder_sb_device::megaphx_sound_to_68k_w)
m_soundback = data;
}
-WRITE8_MEMBER(inder_sb_device::dac0_value_write)
-{
-// printf("dac0_data_write %02x\n", data);
- m_dac0->write_unsigned8(data);
-}
-
-WRITE8_MEMBER(inder_sb_device::dac0_gain_write)
-{
-// printf("dac0_gain_write %02x\n", data);
- dac_gain[0] = data;
-}
-
-WRITE8_MEMBER(inder_sb_device::dac1_value_write)
-{
-// printf("dac1_data_write %02x\n", data);
- m_dac1->write_unsigned8(data);
-}
-
-WRITE8_MEMBER(inder_sb_device::dac1_gain_write)
-{
-// printf("dac1_gain_write %02x\n", data);
- dac_gain[1] = data;
-}
-
-WRITE8_MEMBER(inder_sb_device::dac2_value_write)
-{
-// printf("dac2_data_write %02x\n", data);
- m_dac2->write_unsigned8(data);
-}
-
-WRITE8_MEMBER(inder_sb_device::dac2_gain_write)
-{
-// printf("dac2_gain_write %02x\n", data);
- dac_gain[2] = data;
-}
-
-WRITE8_MEMBER(inder_sb_device::dac3_value_write)
-{
-// printf("dac3_data_write %02x\n", data);
- m_dac3->write_unsigned8(data);
-}
-
-WRITE8_MEMBER(inder_sb_device::dac3_gain_write)
-{
-// printf("dac3_gain_write %02x\n", data);
- dac_gain[3] = data;
-}
-
WRITE8_MEMBER(inder_sb_device::dac0_rombank_write)
{
m_soundbank[0] = data;
@@ -231,14 +179,14 @@ WRITE8_MEMBER(inder_sb_device::dac3_rombank_write)
static ADDRESS_MAP_START( sound_io, AS_IO, 8, inder_sb_device )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x00) AM_WRITE(dac0_value_write)
- AM_RANGE(0x01, 0x01) AM_WRITE(dac0_gain_write)
- AM_RANGE(0x02, 0x02) AM_WRITE(dac1_value_write)
- AM_RANGE(0x03, 0x03) AM_WRITE(dac1_gain_write)
- AM_RANGE(0x04, 0x04) AM_WRITE(dac2_value_write)
- AM_RANGE(0x05, 0x05) AM_WRITE(dac2_gain_write)
- AM_RANGE(0x06, 0x06) AM_WRITE(dac3_value_write)
- AM_RANGE(0x07, 0x07) AM_WRITE(dac3_gain_write)
+ AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac0", dac_byte_interface, write)
+ AM_RANGE(0x01, 0x01) AM_DEVWRITE("dac0vol", dac_byte_interface, write)
+ AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_byte_interface, write)
+ AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac1vol", dac_byte_interface, write)
+ AM_RANGE(0x04, 0x04) AM_DEVWRITE("dac2", dac_byte_interface, write)
+ AM_RANGE(0x05, 0x05) AM_DEVWRITE("dac2vol", dac_byte_interface, write)
+ AM_RANGE(0x06, 0x06) AM_DEVWRITE("dac3", dac_byte_interface, write)
+ AM_RANGE(0x07, 0x07) AM_DEVWRITE("dac3vol", dac_byte_interface, write)
// not 100% sure how rom banking works.. but each channel can specify a different bank for the 0x8000 range. Maybe the bank happens when the interrupt triggers so each channel reads the correct data? (so we'd need to put the actual functions in the CTC callbacks)
AM_RANGE(0x10, 0x10) AM_WRITE(dac0_rombank_write)
@@ -271,15 +219,20 @@ static MACHINE_CONFIG_FRAGMENT( inder_sb )
MCFG_Z80CTC_ZC2_CB(WRITELINE(inder_sb_device, z80ctc_ch3))
// was this correct?!?
- MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_DAC_ADD("dac0")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_DAC_ADD("dac1")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_DAC_ADD("dac2")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_DAC_ADD("dac3")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ MCFG_SPEAKER_STANDARD_MONO("speaker")
+ MCFG_SOUND_ADD("dac0", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac1", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac2", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac3", DAC_8BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_SOUND_ADD("dac0vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac0", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac0", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac1vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac2vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_SOUND_ADD("dac3vol", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE_EX(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "dac0vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
MACHINE_CONFIG_END
machine_config_constructor inder_sb_device::device_mconfig_additions() const
diff --git a/src/mame/machine/inder_sb.h b/src/mame/machine/inder_sb.h
index 83cf035c652..fab1b67ce30 100644
--- a/src/mame/machine/inder_sb.h
+++ b/src/mame/machine/inder_sb.h
@@ -29,25 +29,11 @@ public:
required_device<cpu_device> m_audiocpu;
required_device<z80ctc_device> m_ctc;
- required_device<dac_device> m_dac0;
- required_device<dac_device> m_dac1;
- required_device<dac_device> m_dac2;
- required_device<dac_device> m_dac3;
DECLARE_READ8_MEMBER(megaphx_sound_sent_r);
DECLARE_READ8_MEMBER(megaphx_sound_cmd_r);
DECLARE_WRITE8_MEMBER(megaphx_sound_to_68k_w);
-
- DECLARE_WRITE8_MEMBER(dac0_value_write);
- DECLARE_WRITE8_MEMBER(dac0_gain_write);
- DECLARE_WRITE8_MEMBER(dac1_value_write);
- DECLARE_WRITE8_MEMBER(dac1_gain_write);
- DECLARE_WRITE8_MEMBER(dac2_value_write);
- DECLARE_WRITE8_MEMBER(dac2_gain_write);
- DECLARE_WRITE8_MEMBER(dac3_value_write);
- DECLARE_WRITE8_MEMBER(dac3_gain_write);
-
DECLARE_WRITE8_MEMBER(dac0_rombank_write);
DECLARE_WRITE8_MEMBER(dac1_rombank_write);
DECLARE_WRITE8_MEMBER(dac2_rombank_write);
@@ -67,7 +53,6 @@ public:
DECLARE_READ16_MEMBER(megaphx_0x050002_r);
DECLARE_WRITE16_MEMBER(megaphx_0x050000_w);
- UINT8 dac_gain[4];
UINT8 m_soundbank[4];
int m_soundsent;
diff --git a/src/mame/machine/jalcrpt.cpp b/src/mame/machine/jalcrpt.cpp
index e8e35f33c20..25efbd60f86 100644
--- a/src/mame/machine/jalcrpt.cpp
+++ b/src/mame/machine/jalcrpt.cpp
@@ -128,7 +128,7 @@ void ms32_rearrange_sprites(running_machine &machine, const char *region)
source_data = machine.root_device().memregion ( region )->base();
source_size = machine.root_device().memregion( region )->bytes();
- dynamic_buffer result_data(source_size);
+ std::vector<UINT8> result_data(source_size);
for(i=0; i<source_size; i++)
{
@@ -150,7 +150,7 @@ void decrypt_ms32_tx(running_machine &machine, int addr_xor,int data_xor, const
source_data = machine.root_device().memregion ( region )->base();
source_size = machine.root_device().memregion( region )->bytes();
- dynamic_buffer result_data(source_size);
+ std::vector<UINT8> result_data(source_size);
addr_xor ^= 0x1005d;
@@ -201,7 +201,7 @@ void decrypt_ms32_bg(running_machine &machine, int addr_xor,int data_xor, const
source_data = machine.root_device().memregion ( region )->base();
source_size = machine.root_device().memregion( region )->bytes();
- dynamic_buffer result_data(source_size);
+ std::vector<UINT8> result_data(source_size);
addr_xor ^= 0xc1c5b;
diff --git a/src/mame/machine/kaneko_calc3.cpp b/src/mame/machine/kaneko_calc3.cpp
index 48969f7d3ef..dc5014df5cb 100644
--- a/src/mame/machine/kaneko_calc3.cpp
+++ b/src/mame/machine/kaneko_calc3.cpp
@@ -1552,7 +1552,7 @@ void kaneko_calc3_device::initial_scan_tables()
for (x=0;x<numregions;x++)
{
- dynamic_buffer tmpdstram(0x2000);
+ std::vector<UINT8> tmpdstram(0x2000);
#if VERBOSE_OUTPUT
int length;
#endif
diff --git a/src/mame/machine/kc.cpp b/src/mame/machine/kc.cpp
index a097690cc75..81c3dee8c34 100644
--- a/src/mame/machine/kc.cpp
+++ b/src/mame/machine/kc.cpp
@@ -40,7 +40,7 @@ QUICKLOAD_LOAD_MEMBER( kc_state,kc)
if (size == 0)
return image_init_result::FAIL;
- dynamic_buffer data(size);
+ std::vector<UINT8> data(size);
image.fread( &data[0], size);
header = (struct kcc_header *) &data[0];
diff --git a/src/mame/machine/leland.cpp b/src/mame/machine/leland.cpp
index 95d43339ecb..ba0ce34ec38 100644
--- a/src/mame/machine/leland.cpp
+++ b/src/mame/machine/leland.cpp
@@ -13,7 +13,6 @@
#include "machine/eepromser.h"
#include "cpu/z80/z80.h"
#include "includes/leland.h"
-#include "sound/ay8910.h"
/*************************************
@@ -1093,7 +1092,11 @@ READ8_MEMBER(leland_state::leland_master_input_r)
case 0x03: /* /IGID */
case 0x13:
- result = machine().device<ay8910_device>("ay8910.1")->data_r(space, offset);
+ if (m_ay8910)
+ result &= m_ay8910->data_r(space, 0);
+
+ if (m_ay8912)
+ result &= m_ay8912->data_r(space, 0);
break;
case 0x10: /* /GIN0 */
@@ -1132,7 +1135,11 @@ WRITE8_MEMBER(leland_state::leland_master_output_w)
case 0x0a: /* /OGIA */
case 0x0b: /* /OGID */
- machine().device<ay8910_device>("ay8910.1")->address_data_w(space, offset, data);
+ if (m_ay8910)
+ m_ay8910->address_data_w(space, offset - 0x0a, data);
+
+ if (m_ay8912)
+ m_ay8912->address_data_w(space, offset - 0x0a, data);
break;
case 0x0c: /* /BKXL */
diff --git a/src/mame/machine/lviv.cpp b/src/mame/machine/lviv.cpp
index 54d48c39058..51674216119 100644
--- a/src/mame/machine/lviv.cpp
+++ b/src/mame/machine/lviv.cpp
@@ -303,7 +303,7 @@ image_verify_result lviv_state::lviv_verify_snapshot(UINT8 * data, UINT32 size)
SNAPSHOT_LOAD_MEMBER( lviv_state, lviv )
{
- dynamic_buffer lviv_snapshot_data(LVIV_SNAPSHOT_SIZE);
+ std::vector<UINT8> lviv_snapshot_data(LVIV_SNAPSHOT_SIZE);
image.fread( &lviv_snapshot_data[0], LVIV_SNAPSHOT_SIZE);
diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp
index ea4bf0d2eb4..97ee0339c42 100644
--- a/src/mame/machine/mac.cpp
+++ b/src/mame/machine/mac.cpp
@@ -1440,6 +1440,7 @@ WRITE8_MEMBER(mac_state::mac_via_out_a)
if (m_model < MODEL_MAC_II)
{
m_snd_vol = data & 0x07;
+ update_volume();
}
/* Early Mac models had VIA A4 control overlaying. In the Mac SE (and
@@ -1468,7 +1469,8 @@ WRITE8_MEMBER(mac_state::mac_via_out_b)
if (AUDIO_IS_CLASSIC)
{
- m_snd_enable = ((data & 0x80) == 0) ? true : false;
+ m_snd_enable = (data & 0x80) == 0;
+ update_volume();
}
m_rtc->ce_w((data & 0x04)>>2);
@@ -1476,6 +1478,26 @@ WRITE8_MEMBER(mac_state::mac_via_out_b)
m_rtc->clk_w((data >> 1) & 0x01);
}
+void mac_state::update_volume(void)
+{
+ if (AUDIO_IS_CLASSIC)
+ {
+ if (!m_snd_enable)
+ {
+ // ls161 clear input
+ m_dac->set_output_gain(ALL_OUTPUTS, 0);
+ }
+ else
+ {
+ // sound -> r13 (470k)
+ // sound -> r12 (470k) -> 4016 (pa0 != 0)
+ // sound -> r17 (150k) -> 4016 (pa1 != 0)
+ // sound -> r16 (68k) -> 4016 (pa2 != 0)
+ m_dac->set_output_gain(ALL_OUTPUTS, 8.0 / (m_snd_vol + 1));
+ }
+ }
+}
+
WRITE8_MEMBER(mac_state::mac_via_out_b_bbadb)
{
// printf("VIA1 OUT B: %02x (PC %x)\n", data, m_maincpu->safe_pc());
@@ -1989,10 +2011,6 @@ void mac_state::machine_reset()
m_pm_data_send = m_pm_data_recv = m_pm_ack = m_pm_req = m_pm_dptr = 0;
m_pm_state = 0;
m_last_taken_interrupt = 0;
-
- m_snd_enable = false;
- m_main_buffer = true;
- m_snd_vol = 3;
}
WRITE_LINE_MEMBER(mac_state::cuda_reset_w)
diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp
index 0e7dfecccd9..3cab44e8d1b 100644
--- a/src/mame/machine/mega32x.cpp
+++ b/src/mame/machine/mega32x.cpp
@@ -199,6 +199,7 @@ GFX check (these don't explicitly fails):
*/
#include "emu.h"
#include "machine/mega32x.h"
+#include "sound/volt_reg.h"
const device_type SEGA_32X_NTSC = &device_creator<sega_32x_ntsc_device>;
@@ -208,8 +209,8 @@ sega_32x_device::sega_32x_device(const machine_config &mconfig, device_type type
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, m_master_cpu(*this, "32x_master_sh2")
, m_slave_cpu(*this, "32x_slave_sh2")
- , m_lch_pwm(*this, "lch_pwm")
- , m_rch_pwm(*this, "rch_pwm")
+ , m_ldac(*this, "ldac")
+ , m_rdac(*this, "rdac")
, m_sh2_shared(*this, "sh2_shared")
, m_palette(*this, finder_base::DUMMY_TAG)
{
@@ -821,8 +822,8 @@ TIMER_CALLBACK_MEMBER(sega_32x_device::handle_pwm_callback)
switch(m_pwm_ctrl & 3)
{
case 0: m_lch_index_r++; /*Speaker OFF*/ break;
- case 1: m_lch_pwm->write_signed16(m_cur_lch[m_lch_index_r++]); break;
- case 2: m_rch_pwm->write_signed16(m_cur_lch[m_lch_index_r++]); break;
+ case 1: m_ldac->write(m_cur_lch[m_lch_index_r++]); break;
+ case 2: m_rdac->write(m_cur_lch[m_lch_index_r++]); break;
case 3: popmessage("Undefined PWM Lch value 3, contact MESSdev"); break;
}
@@ -836,8 +837,8 @@ TIMER_CALLBACK_MEMBER(sega_32x_device::handle_pwm_callback)
switch((m_pwm_ctrl & 0xc) >> 2)
{
case 0: m_rch_index_r++; /*Speaker OFF*/ break;
- case 1: m_rch_pwm->write_signed16(m_cur_rch[m_rch_index_r++]); break;
- case 2: m_lch_pwm->write_signed16(m_cur_rch[m_rch_index_r++]); break;
+ case 1: m_rdac->write(m_cur_rch[m_rch_index_r++]); break;
+ case 2: m_ldac->write(m_cur_rch[m_rch_index_r++]); break;
case 3: popmessage("Undefined PWM Rch value 3, contact MESSdev"); break;
}
@@ -1769,11 +1770,11 @@ static MACHINE_CONFIG_FRAGMENT( _32x_ntsc )
MCFG_SH2_FIFO_DATA_AVAIL_CB(sega_32x_device, _32x_fifo_available_callback)
#endif
- MCFG_DAC_ADD("lch_pwm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.40)
-
- MCFG_DAC_ADD("rch_pwm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.40)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
_32X_INTERLEAVE_LEVEL
MACHINE_CONFIG_END
@@ -1799,11 +1800,11 @@ static MACHINE_CONFIG_FRAGMENT( _32x_pal )
MCFG_SH2_FIFO_DATA_AVAIL_CB(sega_32x_device, _32x_fifo_available_callback)
#endif
- MCFG_DAC_ADD("lch_pwm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.40)
-
- MCFG_DAC_ADD("rch_pwm")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.40)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":lspeaker", 0.4) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":rspeaker", 0.4) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
_32X_INTERLEAVE_LEVEL
MACHINE_CONFIG_END
diff --git a/src/mame/machine/mega32x.h b/src/mame/machine/mega32x.h
index 80940755726..92e51c20187 100644
--- a/src/mame/machine/mega32x.h
+++ b/src/mame/machine/mega32x.h
@@ -35,8 +35,8 @@ public:
required_device<sh2_device> m_master_cpu;
required_device<sh2_device> m_slave_cpu;
- required_device<dac_device> m_lch_pwm;
- required_device<dac_device> m_rch_pwm;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
required_shared_ptr<UINT32> m_sh2_shared;
diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp
index 17a20fde8cc..25449375a16 100644
--- a/src/mame/machine/megadriv.cpp
+++ b/src/mame/machine/megadriv.cpp
@@ -93,7 +93,7 @@ WRITE8_MEMBER(md_base_state::megadriv_68k_YM2612_write)
// this is used by 6 button pads and gets installed in machine_start for drivers requiring it
TIMER_CALLBACK_MEMBER(md_base_state::io_timeout_timer_callback)
{
- m_io_stage[(int)(FPTR)ptr] = -1;
+ m_io_stage[(int)(uintptr_t)ptr] = -1;
}
diff --git a/src/mame/machine/microtan.cpp b/src/mame/machine/microtan.cpp
index a4d1503aa35..70e50fa87d5 100644
--- a/src/mame/machine/microtan.cpp
+++ b/src/mame/machine/microtan.cpp
@@ -837,7 +837,7 @@ SNAPSHOT_LOAD_MEMBER( microtan_state, microtan )
QUICKLOAD_LOAD_MEMBER( microtan_state, microtan )
{
int snapshot_size = 8263; /* magic size */
- dynamic_buffer snapshot_buff(snapshot_size, 0);
+ std::vector<UINT8> snapshot_buff(snapshot_size, 0);
std::vector<char> buff(quickload_size + 1);
image_init_result rc;
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index 2816992b3e0..92c1e4cbc77 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -558,7 +558,7 @@ enum
IOASIC_UARTCONTROL, /* 4: controls some UART behavior */
IOASIC_UARTOUT, /* 5: UART output */
IOASIC_UARTIN, /* 6: UART input */
- IOASIC_UNKNOWN7, /* 7: ??? */
+ IOASIC_COIN, /* 7: triggered on coin insertion */
IOASIC_SOUNDCTL, /* 8: sound communications control */
IOASIC_SOUNDOUT, /* 9: sound output port */
IOASIC_SOUNDSTAT, /* a: sound status port */
@@ -876,6 +876,46 @@ void midway_ioasic_device::fifo_full_w(UINT16 data)
}
+/* need to check if device callback is required instead of hardcode here */
+void midway_ioasic_device::output_w(UINT32 data)
+{
+ /* two writes in pairs. flag off first, on second. arg remains the same. */
+ UINT8 flag = (data >> 8) & 0x8;
+ UINT8 op = (data >> 8) & 0x7;
+ UINT8 arg = data & 0xFF;
+
+ switch (op)
+ {
+ default:
+ logerror("Unknown output (%02X) = %02X\n", flag | op, arg);
+ break;
+
+ case 0x0:
+ if (flag)
+ {
+ machine().output().set_value("wheel", arg); // wheel motor delta. signed byte.
+ }
+ break;
+
+ case 0x4:
+ if (flag)
+ {
+ for (UINT8 bit = 0; bit < 8; bit++)
+ machine().output().set_lamp_value(bit, (arg >> bit) & 0x1);
+ }
+ break;
+
+ case 0x5:
+ if (flag)
+ {
+ for (UINT8 bit = 0; bit < 8; bit++)
+ machine().output().set_lamp_value(8 + bit, (arg >> bit) & 0x1);
+ }
+ break;
+ }
+}
+
+
/*************************************
*
@@ -1072,6 +1112,10 @@ WRITE32_MEMBER( midway_ioasic_device::write )
else
midway_serial_pic2_device::write(space, 0, newreg);
break;
+
+ case IOASIC_PICIN:
+ output_w(data);
+ break;
case IOASIC_INTCTL:
/* interrupt enables */
diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h
index 385234c5a66..d815cd1ab4f 100644
--- a/src/mame/machine/midwayic.h
+++ b/src/mame/machine/midwayic.h
@@ -129,6 +129,7 @@ public:
void set_shuffle_state(int state);
void fifo_w(UINT16 data);
void fifo_full_w(UINT16 data);
+ void output_w(UINT32 data);
DECLARE_WRITE_LINE_MEMBER(fifo_reset_w);
DECLARE_READ16_MEMBER(fifo_r);
diff --git a/src/mame/machine/mikro80.cpp b/src/mame/machine/mikro80.cpp
index 30eea2124bf..0d0b6d927ff 100644
--- a/src/mame/machine/mikro80.cpp
+++ b/src/mame/machine/mikro80.cpp
@@ -103,3 +103,8 @@ READ8_MEMBER(mikro80_state::mikro80_tape_r)
}
return 0xff;
}
+
+WRITE8_MEMBER(mikro80_state::radio99_sound_w)
+{
+ m_dac->write(BIT(data, 1));
+}
diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp
index 0936a2b94f4..f55a90394f3 100644
--- a/src/mame/machine/msx.cpp
+++ b/src/mame/machine/msx.cpp
@@ -344,7 +344,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_c_w )
/* key click */
if ( BIT(m_port_c_old ^ data, 7) )
- m_dac->write_signed8(BIT(data, 7) ? 0x7f : 0);
+ m_dac->write(BIT(data, 7));
/* cassette motor on/off */
if ( BIT(m_port_c_old ^ data, 4) )
diff --git a/src/mame/machine/msx_matsushita.h b/src/mame/machine/msx_matsushita.h
index 70a30d705a6..8f9d6a3479c 100644
--- a/src/mame/machine/msx_matsushita.h
+++ b/src/mame/machine/msx_matsushita.h
@@ -39,7 +39,7 @@ private:
required_device<nvram_device> m_nvram;
devcb_write_line m_turbo_out_cb;
UINT16 m_address;
- dynamic_buffer m_sram;
+ std::vector<UINT8> m_sram;
UINT8 m_nibble1;
UINT8 m_nibble2;
UINT8 m_pattern;
diff --git a/src/mame/machine/namcos1.cpp b/src/mame/machine/namcos1.cpp
index 9d7fa409421..2e35f03beae 100644
--- a/src/mame/machine/namcos1.cpp
+++ b/src/mame/machine/namcos1.cpp
@@ -513,10 +513,6 @@ void namcos1_state::machine_start()
m_soundbank->configure_entries(0, 8, memregion("audiocpu")->base(), 0x4000);
m_mcubank->configure_entries(0, 24, memregion("voice")->base(), 0x8000);
- save_item(NAME(m_dac0_value));
- save_item(NAME(m_dac1_value));
- save_item(NAME(m_dac0_gain));
- save_item(NAME(m_dac1_gain));
save_item(NAME(m_key));
save_item(NAME(m_mcu_patch_data));
save_item(NAME(m_reset));
@@ -527,7 +523,6 @@ void namcos1_state::machine_reset()
/* mcu patch data clear */
m_mcu_patch_data = 0;
- init_DACs();
memset(m_key, 0, sizeof(m_key));
m_key_quotient = 0;
m_key_reminder = 0;
diff --git a/src/mame/machine/nextkbd.cpp b/src/mame/machine/nextkbd.cpp
index 7ff946b7916..0fc545050ca 100644
--- a/src/mame/machine/nextkbd.cpp
+++ b/src/mame/machine/nextkbd.cpp
@@ -246,7 +246,7 @@ WRITE32_MEMBER( nextkbd_device::kmdata_w )
INPUT_CHANGED_MEMBER( nextkbd_device::update )
{
- int bank = (int)(FPTR)param;
+ int bank = (int)(uintptr_t)param;
switch(bank) {
case 0: case 1: case 2: {
int index;
diff --git a/src/mame/machine/orao.cpp b/src/mame/machine/orao.cpp
index 5540d9092fb..db7c097103f 100644
--- a/src/mame/machine/orao.cpp
+++ b/src/mame/machine/orao.cpp
@@ -10,7 +10,6 @@
****************************************************************************/
#include "emu.h"
-#include "sound/dac.h"
#include "imagedev/cassette.h"
#include "includes/orao.h"
diff --git a/src/mame/machine/pc9801_86.cpp b/src/mame/machine/pc9801_86.cpp
index b0580a67c70..3a354dcdb92 100644
--- a/src/mame/machine/pc9801_86.cpp
+++ b/src/mame/machine/pc9801_86.cpp
@@ -17,6 +17,7 @@
#include "emu.h"
#include "machine/pc9801_86.h"
+#include "sound/volt_reg.h"
#define MAIN_CLOCK_X1 XTAL_1_9968MHz
#define QUEUE_SIZE 32768
@@ -56,10 +57,11 @@ static MACHINE_CONFIG_FRAGMENT( pc9801_86_config )
MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(pc9801_86_device, opn_portb_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
- MCFG_SOUND_ADD("dacl", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ADD("dacr", DAC, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ MCFG_SOUND_ADD("ldac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) // unknown DAC
+ MCFG_SOUND_ADD("rdac", DAC_16BIT_R2R_TWOS_COMPLEMENT, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE_EX(0, "ldac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "ldac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE_EX(0, "rdac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "rdac", -1.0, DAC_VREF_NEG_INPUT)
MACHINE_CONFIG_END
//-------------------------------------------------
@@ -128,8 +130,8 @@ ioport_constructor pc9801_86_device::device_input_ports() const
pc9801_86_device::pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC9801_86, "pc9801_86", tag, owner, clock, "pc9801_86", __FILE__),
m_opna(*this, "opna"),
- m_dacl(*this, "dacl"),
- m_dacr(*this, "dacr"),
+ m_ldac(*this, "ldac"),
+ m_rdac(*this, "rdac"),
m_queue(QUEUE_SIZE)
{
}
@@ -323,32 +325,32 @@ void pc9801_86_device::device_timer(emu_timer& timer, device_timer_id id, int pa
switch(m_pcm_mode & 0x70)
{
case 0x70: // 8bit stereo
- m_dacl->write(queue_pop() << 8);
- m_dacr->write(queue_pop() << 8);
+ m_ldac->write(queue_pop() << 8);
+ m_rdac->write(queue_pop() << 8);
break;
case 0x60: // 8bit left only
- m_dacl->write(queue_pop() << 8);
+ m_ldac->write(queue_pop() << 8);
break;
case 0x50: // 8bit right only
- m_dacr->write(queue_pop() << 8);
+ m_rdac->write(queue_pop() << 8);
break;
case 0x30: // 16bit stereo
lsample = queue_pop();
lsample |= queue_pop() << 8;
rsample = queue_pop();
rsample |= queue_pop() << 8;
- m_dacl->write(lsample);
- m_dacr->write(rsample);
+ m_ldac->write(lsample);
+ m_rdac->write(rsample);
break;
case 0x20: // 16bit left only
lsample = queue_pop();
lsample |= queue_pop() << 8;
- m_dacl->write(lsample);
+ m_ldac->write(lsample);
break;
case 0x10: // 16bit right only
rsample = queue_pop();
rsample |= queue_pop() << 8;
- m_dacr->write(rsample);
+ m_rdac->write(rsample);
break;
}
if((queue_count() < m_irq_rate) && (m_pcm_ctrl & 0x20))
diff --git a/src/mame/machine/pc9801_86.h b/src/mame/machine/pc9801_86.h
index 9597760b85e..b29e74f43af 100644
--- a/src/mame/machine/pc9801_86.h
+++ b/src/mame/machine/pc9801_86.h
@@ -58,9 +58,9 @@ private:
UINT16 m_head, m_tail, m_count, m_irq_rate;
bool m_pcmirq, m_fmirq;
required_device<ym2608_device> m_opna;
- required_device<dac_device> m_dacl;
- required_device<dac_device> m_dacr;
- dynamic_buffer m_queue;
+ required_device<dac_word_interface> m_ldac;
+ required_device<dac_word_interface> m_rdac;
+ std::vector<UINT8> m_queue;
emu_timer *m_dac_timer;
};
diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp
index 3e4cd4373f8..520b73c31e4 100644
--- a/src/mame/machine/pc9801_kbd.cpp
+++ b/src/mame/machine/pc9801_kbd.cpp
@@ -47,10 +47,10 @@ pc9801_kbd_device::pc9801_kbd_device(const machine_config &mconfig, const char *
INPUT_CHANGED_MEMBER(pc9801_kbd_device::key_stroke)
{
if(newval && !oldval)
- m_rx_buf[(UINT8)(FPTR)(param) & 0x7f] = 1;
+ m_rx_buf[(UINT8)(uintptr_t)(param) & 0x7f] = 1;
if(oldval && !newval)
- m_rx_buf[(UINT8)(FPTR)(param) & 0x7f] = 2;
+ m_rx_buf[(UINT8)(uintptr_t)(param) & 0x7f] = 2;
}
static INPUT_PORTS_START( pc9801_kbd )
diff --git a/src/mame/machine/pgmprot_igs027a_type1.cpp b/src/mame/machine/pgmprot_igs027a_type1.cpp
index 4d5b1f93638..46f642d80b6 100644
--- a/src/mame/machine/pgmprot_igs027a_type1.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type1.cpp
@@ -384,7 +384,7 @@ void pgm_arm_type1_state::pgm_decode_kovlsqh2_tiles()
void pgm_arm_type1_state::pgm_decode_kovlsqh2_sprites( UINT8 *src )
{
int i, j;
- dynamic_buffer dst(0x800000);
+ std::vector<UINT8> dst(0x800000);
for (i = 0; i < 0x800000; i++)
{
diff --git a/src/mame/machine/pgmprot_igs027a_type3.cpp b/src/mame/machine/pgmprot_igs027a_type3.cpp
index 5ed8e9f41e7..3c86c76cbd1 100644
--- a/src/mame/machine/pgmprot_igs027a_type3.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type3.cpp
@@ -733,7 +733,7 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,dmnfrnt)
// todo, collapse these to an address swap
void pgm_arm_type3_state::pgm_descramble_happy6(UINT8* src)
{
- dynamic_buffer buffer(0x800000);
+ std::vector<UINT8> buffer(0x800000);
int writeaddress = 0;
for (int j = 0; j < 0x800; j += 0x200)
@@ -751,7 +751,7 @@ void pgm_arm_type3_state::pgm_descramble_happy6(UINT8* src)
void pgm_arm_type3_state::pgm_descramble_happy6_2(UINT8* src)
{
- dynamic_buffer buffer(0x800000);
+ std::vector<UINT8> buffer(0x800000);
int writeaddress = 0;
for (int k = 0; k < 0x800000; k += 0x100000)
{
diff --git a/src/mame/machine/primo.cpp b/src/mame/machine/primo.cpp
index a7dbf859fc6..4820a9a92a4 100644
--- a/src/mame/machine/primo.cpp
+++ b/src/mame/machine/primo.cpp
@@ -303,7 +303,7 @@ void primo_state::primo_setup_pss (UINT8* snapshot_data, UINT32 snapshot_size)
SNAPSHOT_LOAD_MEMBER( primo_state, primo )
{
- dynamic_buffer snapshot_data(snapshot_size);
+ std::vector<UINT8> snapshot_data(snapshot_size);
if (image.fread(&snapshot_data[0], snapshot_size) != snapshot_size)
{
@@ -345,7 +345,7 @@ void primo_state::primo_setup_pp(UINT8* quickload_data, UINT32 quickload_size)
QUICKLOAD_LOAD_MEMBER( primo_state, primo )
{
- dynamic_buffer quickload_data(quickload_size);
+ std::vector<UINT8> quickload_data(quickload_size);
if (image.fread(&quickload_data[0], quickload_size) != quickload_size)
{
diff --git a/src/mame/machine/scramble.cpp b/src/mame/machine/scramble.cpp
index f304742d5f2..820d82399a8 100644
--- a/src/mame/machine/scramble.cpp
+++ b/src/mame/machine/scramble.cpp
@@ -376,7 +376,7 @@ DRIVER_INIT_MEMBER(scramble_state,rescue)
RAM = memregion("gfx1")->base();
len = memregion("gfx1")->bytes();
- dynamic_buffer scratch(len);
+ std::vector<UINT8> scratch(len);
memcpy(&scratch[0], RAM, len);
@@ -409,7 +409,7 @@ DRIVER_INIT_MEMBER(scramble_state,minefld)
RAM = memregion("gfx1")->base();
len = memregion("gfx1")->bytes();
- dynamic_buffer scratch(len);
+ std::vector<UINT8> scratch(len);
memcpy(&scratch[0], RAM, len);
diff --git a/src/mame/machine/segas32.cpp b/src/mame/machine/segas32.cpp
index f2124c8c996..61db4618073 100644
--- a/src/mame/machine/segas32.cpp
+++ b/src/mame/machine/segas32.cpp
@@ -39,7 +39,7 @@ void segas32_state::decrypt_ga2_protrom()
{
int i;
UINT8 *rom = memregion("mcu")->base();
- dynamic_buffer temp(0x100000);
+ std::vector<UINT8> temp(0x100000);
// make copy of ROM so original can be overwritten
memcpy(&temp[0], rom, 0x10000);
diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp
index 6d27552641d..1f8f770eae4 100644
--- a/src/mame/machine/sms.cpp
+++ b/src/mame/machine/sms.cpp
@@ -466,14 +466,14 @@ WRITE8_MEMBER(sms_state::smsj_audio_control_w)
1,1 : Both PSG and FM enabled
*/
if (m_smsj_audio_control == 0x00 || m_smsj_audio_control == 0x03)
- m_psg_sms->set_output_gain(0, 1.0);
+ m_psg_sms->set_output_gain(ALL_OUTPUTS, 1.0);
else
- m_psg_sms->set_output_gain(0, 0.0);
+ m_psg_sms->set_output_gain(ALL_OUTPUTS, 0.0);
if (m_smsj_audio_control == 0x01 || m_smsj_audio_control == 0x03)
- m_ym->set_output_gain(0, 1.0);
+ m_ym->set_output_gain(ALL_OUTPUTS, 1.0);
else
- m_ym->set_output_gain(0, 0.0);
+ m_ym->set_output_gain(ALL_OUTPUTS, 0.0);
}
diff --git a/src/mame/machine/spec_snqk.cpp b/src/mame/machine/spec_snqk.cpp
index f95165c2c55..2ed7490c811 100644
--- a/src/mame/machine/spec_snqk.cpp
+++ b/src/mame/machine/spec_snqk.cpp
@@ -118,7 +118,7 @@ static void spectrum_page_basicrom(running_machine &machine)
SNAPSHOT_LOAD_MEMBER( spectrum_state,spectrum)
{
- dynamic_buffer snapshot_data(snapshot_size);
+ std::vector<UINT8> snapshot_data(snapshot_size);
image.fread(&snapshot_data[0], snapshot_size);
@@ -2450,7 +2450,7 @@ void spectrum_setup_z80(running_machine &machine, UINT8 *snapdata, UINT32 snapsi
QUICKLOAD_LOAD_MEMBER( spectrum_state,spectrum)
{
- dynamic_buffer quickload_data(quickload_size);
+ std::vector<UINT8> quickload_data(quickload_size);
image.fread(&quickload_data[0], quickload_size);
diff --git a/src/mame/machine/special.cpp b/src/mame/machine/special.cpp
index e85bb7d4240..23db4ddcd67 100644
--- a/src/mame/machine/special.cpp
+++ b/src/mame/machine/special.cpp
@@ -121,7 +121,7 @@ WRITE8_MEMBER( special_state::specialist_8255_portc_w )
m_cassette->output(BIT(data, 7) ? 1 : -1);
- m_dac->write_unsigned8(BIT(data, 5)); //beeper
+ m_dac->write(BIT(data, 5)); //beeper
}
void special_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index 938b3952c13..1dae4a1b972 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -120,9 +120,9 @@ int thomson_state::to7_get_cassette()
/* 1-bit cassette output */
-void thomson_state::to7_set_cassette( int data )
+WRITE_LINE_MEMBER(thomson_state::to7_set_cassette)
{
- m_cassette->output(data ? 1. : -1. );
+ m_cassette->output(state ? 1. : -1. );
}
@@ -487,13 +487,6 @@ WRITE8_MEMBER( thomson_state::to7_timer_port_out )
-WRITE8_MEMBER( thomson_state::to7_timer_cp2_out )
-{
- m_buzzer->write_unsigned8(data ? 0x80 : 0); /* 1-bit buzzer */
-}
-
-
-
READ8_MEMBER( thomson_state::to7_timer_port_in )
{
int lightpen = (m_io_lightpen_button->read() & 1) ? 2 : 0;
@@ -503,13 +496,6 @@ READ8_MEMBER( thomson_state::to7_timer_port_in )
-WRITE8_MEMBER( thomson_state::to7_timer_tco_out )
-{
- /* 1-bit cassette output */
- to7_set_cassette( data );
-}
-
-
/* ------------ lightpen automaton ------------ */
@@ -863,7 +849,7 @@ UINT8 thomson_state::to7_get_mouse_signal()
void thomson_state::to7_game_sound_update()
{
- m_dac->write_unsigned8(m_to7_game_mute ? 0 : (m_to7_game_sound << 2) );
+ m_dac->write(m_to7_game_mute ? 0 : m_to7_game_sound );
}
@@ -1426,13 +1412,6 @@ READ8_MEMBER( thomson_state::mo5_sys_porta_in )
-WRITE8_MEMBER( thomson_state::mo5_sys_portb_out )
-{
- m_buzzer->write_unsigned8((data & 1) ? 0x80 : 0); /* 1-bit buzzer */
-}
-
-
-
READ8_MEMBER( thomson_state::mo5_sys_portb_in )
{
UINT8 portb = m_pia_sys->b_output();
@@ -3587,10 +3566,10 @@ WRITE8_MEMBER( thomson_state::to8_timer_port_out )
-WRITE8_MEMBER( thomson_state::to8_timer_cp2_out )
+WRITE_LINE_MEMBER( thomson_state::to8_timer_cp2_out )
{
/* mute */
- m_to7_game_mute = data;
+ m_to7_game_mute = state;
to7_game_sound_update();
}
@@ -4273,13 +4252,6 @@ WRITE8_MEMBER( thomson_state::mo6_sys_porta_out )
-WRITE8_MEMBER( thomson_state::mo6_sys_portb_out )
-{
- m_buzzer->write_unsigned8((data & 1) ? 0x80 : 0); /* bit 0: buzzer */
-}
-
-
-
WRITE_LINE_MEMBER( thomson_state::mo6_sys_cb2_out )
{
/* SCART pin 8 = slow switch (?) */
diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp
index 08eddb1db02..fdda0145f5d 100644
--- a/src/mame/machine/ti85.cpp
+++ b/src/mame/machine/ti85.cpp
@@ -1164,7 +1164,7 @@ void ti85_state::ti86_setup_snapshot (UINT8 * data)
SNAPSHOT_LOAD_MEMBER( ti85_state, ti8x )
{
int expected_snapshot_size = 0;
- dynamic_buffer ti8x_snapshot_data;
+ std::vector<UINT8> ti8x_snapshot_data;
if (!strncmp(machine().system().name, "ti85", 4))
expected_snapshot_size = TI85_SNAPSHOT_SIZE;
diff --git a/src/mame/machine/ut88.cpp b/src/mame/machine/ut88.cpp
index 43d76bbd904..ee30eced952 100644
--- a/src/mame/machine/ut88.cpp
+++ b/src/mame/machine/ut88.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "cpu/i8085/i8085.h"
-#include "sound/dac.h"
#include "imagedev/cassette.h"
#include "machine/i8255.h"
#include "includes/ut88.h"
@@ -109,7 +108,7 @@ WRITE8_MEMBER( ut88_state::ut88_keyboard_w )
WRITE8_MEMBER( ut88_state::ut88_sound_w )
{
- m_dac->write_unsigned8(data); //beeper
+ m_dac->write(BIT(data, 0));
m_cassette->output(BIT(data, 0) ? 1 : -1);
}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 1c03938a64c..4c92e70c3f6 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -4,9 +4,9 @@
mame.lst
- This is not automatically generated file, and should be manually updated when
- new driver is added. From time to time we will auto update comments
- according to meta-data from source files.
+ This is not an automatically generated file, and it should be manually
+ updated when new driver is added. From time to time, we will auto-update
+ comments according to metadata from source files.
******************************************************************************/
@@ -274,6 +274,9 @@ ac1 // 1984 Amateurcomputer AC1
ac1_32 // 1984 Amateurcomputer AC1 (32 lines)
ac1scch // 1984 Amateurcomputer AC1 SCCH
+@source:aceex.cpp
+aceex2814
+
@source:ace.cpp
ace // [1976 Allied Leisure]
@@ -1163,6 +1166,9 @@ amust //
angelkds // 833-6599 (c) 1988 Sega / Nasco?
spcpostn // (c) 1986 Sega / Nasco"
+@source:anzterm.cpp
+anzterm // Burroughs EF315-I220
+
@source:apc.cpp
apc //
@@ -10320,7 +10326,8 @@ wizzard //
@source:crystal.cpp
crysbios //
crysking // 2001 Brezzasoft. Crystal of the kings
-ddz // (c) 200?
+crzyddz2 // 2006 Sealy
+ddz // 200?
donghaer //
evosocc // 2001 Evoga. Evolution Soccer
officeye //
@@ -10915,6 +10922,8 @@ cmanhat // 03 1981.01 Manhattan
cmissnx // 21 1982.04 Mission-X/Zoar
cnightst // 32 1983.04 Night Star
cnightst2 // 32
+cocean1a // DT-1[10]1-A 1981.03.17 Ocean to Ocean (Slot) (Japan) (DECO Cassette MD) (Ver 1) // version verified, no lever used
+cocean6b // DT-1[10]6-B 1981 Ocean to Ocean (Slot) (US) (DECO Cassette MD) (Ver 6) // version not verified, labeled as 10 but might be the game number, set as 6, lever is used to stop the slot
coozumou // 41 1984.05 Oozumou/The Grand Sumo
cppicf // 39 1984.02 Peter Pepper's Ice Cream Factory
cppicf2 // 39
@@ -11813,9 +11822,6 @@ einst256 //
einstei2 //
einstein //
-@source:elecbowl.cpp
-elecbowl // Marx
-
@source:electra.cpp
avenger // (c) 1975 Electra
@@ -11899,7 +11905,10 @@ equitess // (c) 1984 Alpha Denshi Co./Sega
gekisou // (c) 1985 Eastern
hvoltage // (c) 1985 Alpha Denshi Co.
kouyakyu // (c) 1985 Alpha Denshi Co.
+splendorblast2 // (c) 1985 Alpha Denshi Co.
splndrbt // (c) 1985 Alpha Denshi Co.
+splndrbta // (c) 1985 Alpha Denshi Co.
+splndrbtb // (c) 1985 Alpha Denshi Co.
@source:ertictac.cpp
ertictac // (c) 1992 Sisteme
@@ -12208,6 +12217,7 @@ csc // CSC: Champion Sensory Chess Challenger (Engli
cscfr // * French
cscg // * German
cscsp // * Spanish
+fdes2000 //
feasbu // EAS: Elite A/S Challenger (Budapest program, English)
feasbufr // * French
feasbug // * German
@@ -14113,6 +14123,9 @@ victor //
hexion // GX122 (c) 1992
hexionb // bootleg
+@source:hh_amis2k.cpp
+wildfire // Parker Bros
+
@source:hh_cop400.cpp
bship82 // Milton Bradley
ctstein // Castle Toy
@@ -14197,6 +14210,7 @@ ebball2 // Entex
ebball3 // Entex
efootb4 // Entex
einvader // Entex
+elecbowl // Marx
elecdet // Ideal
esoccer // Entex
fxmcr165 // Gakken
@@ -14208,6 +14222,7 @@ h2hfootb // Coleco
lostreas // Parker Bros
matchnum // A-One
mathmagi // APF
+mbdtower // Milton Bradley
mdndclab // Mattel
merlin // Parker Bros
mmerlin // Parker Bros
@@ -14239,6 +14254,7 @@ edracula // Epoch
efball // Epoch
galaxy2 // Epoch
galaxy2b // Epoch
+grobot9 // Gakken
invspace // Epoch
mcompgin // Mattel
mvbfree // Mego
@@ -14590,8 +14606,9 @@ sdmg2 // (c) 1997
slqz2 // (c) 1998
spkrform // (c) ????
starzan // (c) 2000?
-tarzan // (c) 1999?
-tarzana // (c) 1999?
+tarzan // (c) 1999
+tarzana // (c) 1999
+tarzanc // (c) 1999
tjsb // (c) 1997
@source:igspc.cpp
@@ -19566,9 +19583,6 @@ mbc200 //
@source:mbc55x.cpp
mbc55x // Sanyo MBC-550, MBC-555
-@source:mbdtower.cpp
-mbdtower // Milton Bradley
-
@source:mbee.cpp
mbee // Microbee 16 Standard or Plus
mbee128 // Microbee 128K standard (CP/M)
@@ -27663,6 +27677,7 @@ viostormub // GX168 (c) 1993 (US)
myvision //
@source:mz2000.cpp
+mz80b // 1981 Sharp MZ80B
mz2000 // 1981 Sharp MZ2000
mz2200 // 1981 Sharp MZ2200
@@ -27684,7 +27699,6 @@ mz800 // 1984 Sharp MZ800
@source:mz80.cpp
mz80a // 1982 Sharp MZ80A
-mz80b // 1981 Sharp MZ80B
mz80k // 1979 Sharp MZ80K
mz80kj // 1979 Sharp MZ80K
@@ -28157,7 +28171,8 @@ derbyoc // 1999.10 Derby Owners Club (Japan) (Rev B)
derbyoc2 // 2001.10 Derby Owners Club II Ver.2.1 (Japan) (Rev B)
derbyocw // 2005.?? Derby Owners Club World Edition EX (Rev D)
dirtypig // 2004.09 Dirty Pig Skin Football
-doa2 // 1999.11 Dead or Alive 2
+doa2 // 1999.12? Dead or Alive 2
+doa2a // 1999.11 Dead or Alive 2 (Rev A)
doa2m // 2000.01 Dead or Alive 2 Millennium
dolphin // 2003.08 Dolphin Blue
dragntr2 // 2004.?? Dragon Treasure 2 (Rev A)
@@ -28302,7 +28317,7 @@ sl2007 // 2007.07 Shooting Love
slasho // 2000.07 Slashout
slashout // 2000.?? Slashout
smarinef // 2000.03 Sega Marine Fishing
-smlg99 // 1999.09 Super Major League 99
+smlg99 // 1999.09 World Series 99 / Super Major League 99
soulsurf // 2002.07 Soul Surfer
spawn // 1999.?? Spawn In the Demon's Hand
spkrbtl // 2001.07 Spikers Battle
@@ -28372,7 +28387,7 @@ wldkicksj // 2000.03 World Kicks PCB (Japan, WKC1 Ver.A)
wldrider // 2001.05 Wild Riders
wrungp // 2001.08 Wave Runner GP
wrungpo // 2001.?? Wave Runner GP (USA, Rev A)
-wsbbgd // 2001.06 Super Major League / World Series Baseball
+wsbbgd // 2001.06 World Series Baseball / Super Major League
wwfroyal // 2000.11 WWF Royal Rumble
xtrmhnt2 // 2006.09 Extreme Hunting 2 Tournament Edition
xtrmhunt // 2004.09 Extreme Hunting
@@ -28957,6 +28972,7 @@ bioship // UPL-90062 (c) 1990 UPL + American Sammy licen
bjtwin // UPL-93087 (c) 1993 NMK
bjtwina // UPL-93087 (c) 1993 NMK
bjtwinp // UPL-93087 (c) 1993 NMK
+bjtwinpa
blkheart // UPL-91069
blkheartj // UPL-91069
bubl2000 // (c) 1998 Tuning
@@ -32169,6 +32185,7 @@ hustler // GX343 (c) 1981 Konami
hustlerb // bootleg
hustlerb2 // bootleg
hustlerb4 // bootleg
+hustlerb5 // bootleg
hustlerd // GX343 (c) 1981 Konami + Dynamo Games license
mimonkey // (c) 1982 Universal Video Games (US Copyright Office info - http://cocatalog.loc.gov)
mimonsco // (c) 1982 bootleg
@@ -34127,6 +34144,7 @@ stuntair // (c) 1983 Nuova Videotron
astrass // 1998.06 Astra Super Stars (Sunsoft)
bakubaku // 1995.04 Bakubaku Animal
batmanfr // 1996.02 Batman Forever (Acclaim)
+choroqhr // 1998.12 Choro Q Hyper Racing Five (Takara)
colmns97 // 1997.01 Columns 97
cotton2 // 1997.11 Cotton 2 (Success)
cottonbm // 1998.09 Cotton Boomerang (Success)
@@ -35373,6 +35391,7 @@ gorodki // (c) 1988 Terminal
kot // (c) 1988 Terminal
@source:ticalc1x.cpp
+cmulti8 // Canon
dataman //
lilprof //
lilprof78 //
@@ -35629,6 +35648,7 @@ demonwld // TP-O16 (c) 1990 Toaplan (+ Taito license when
demonwld1 // TP-O16 (c) 1989 Toaplan + Taito license
demonwld2 // TP-O16 (c) 1989 Toaplan
demonwld3 // TP-O16 (c) 1989 Toaplan
+demonwld4 // TP-O16 (c) 1989 Toaplan
fireshrk // TP-O17 (c) 1990 Toaplan
fireshrka // TP-O17 (c) 1989 Toaplan
fireshrkd // TP-O17 (c) 1990 Toaplan
@@ -35793,6 +35813,9 @@ wizzquiz // (c) 1985 Konami
wizzquiza // (c) 1985 Zilec-Zenitone
yieartf // GX361 (c) 1985
+@source:tranz330.cpp
+tranz330 // (c) 1985 VeriFone
+
@source:travrusa.cpp
motorace // (c) 1983 Williams license
mototour // (c) 1983 Tecfri
@@ -37012,9 +37035,6 @@ wicat //
@source:wico.cpp
aftor //
-@source:wildfire.cpp
-wildfire // Parker Bros
-
@source:wildpkr.cpp
tabpkr // 199?, TAB Austira
wildpkr // 199?, TAB Austria.
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index 2f54062e3f2..6f860baeba3 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -13,6 +13,7 @@ abc1600.cpp
abc80.cpp
abc80x.cpp
ac1.cpp
+aceex.cpp
acrnsys1.cpp
adam.cpp
advision.cpp
@@ -33,6 +34,7 @@ ampro.cpp
amstr_pc.cpp
amstrad.cpp
amust.cpp
+anzterm.cpp
apc.cpp
apexc.cpp
apf.cpp
@@ -162,7 +164,6 @@ eacc.cpp
ec184x.cpp
ec65.cpp
einstein.cpp
-elecbowl.cpp
electron.cpp
elekscmp.cpp
elf.cpp
@@ -223,6 +224,7 @@ h8.cpp
h89.cpp
harriet.cpp
hec2hrp.cpp
+hh_amis2k.cpp
hh_cop400.cpp
hh_hmcs40.cpp
hh_melps4.cpp
@@ -314,7 +316,6 @@ mac.cpp
macpci.cpp
mbc200.cpp
mbc55x.cpp
-mbdtower.cpp
mbee.cpp
mc10.cpp
mc1000.cpp
@@ -616,6 +617,7 @@ tmc1800.cpp
tmc2000e.cpp
tmc600.cpp
tr606.cpp
+tranz330.cpp
tricep.cpp
trs80.cpp
trs80m2.cpp
@@ -669,7 +671,6 @@ vtech1.cpp
vtech2.cpp
wangpc.cpp
wicat.cpp
-wildfire.cpp
wswan.cpp
x07.cpp
x1.cpp
diff --git a/src/mame/video/aeroboto.cpp b/src/mame/video/aeroboto.cpp
index 8f8ab9629b3..88b62582929 100644
--- a/src/mame/video/aeroboto.cpp
+++ b/src/mame/video/aeroboto.cpp
@@ -57,7 +57,7 @@ void aeroboto_state::video_start()
{
int i;
- dynamic_buffer temp(m_stars_length);
+ std::vector<UINT8> temp(m_stars_length);
memcpy(&temp[0], m_stars_rom, m_stars_length);
for (i = 0; i < m_stars_length; i++)
diff --git a/src/mame/video/bfm_adr2.cpp b/src/mame/video/bfm_adr2.cpp
index 1bc4615fd69..814afe1f294 100644
--- a/src/mame/video/bfm_adr2.cpp
+++ b/src/mame/video/bfm_adr2.cpp
@@ -482,7 +482,7 @@ void bfm_adder2_device::adder2_decode_char_roms()
if ( p )
{
- dynamic_buffer s( 0x40000 );
+ std::vector<UINT8> s( 0x40000 );
{
int x, y;
diff --git a/src/mame/video/cheekyms.cpp b/src/mame/video/cheekyms.cpp
index a042a8cbe14..7b1f960b4ff 100644
--- a/src/mame/video/cheekyms.cpp
+++ b/src/mame/video/cheekyms.cpp
@@ -9,7 +9,6 @@ Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "emu.h"
-#include "sound/dac.h"
#include "includes/cheekyms.h"
/* bit 3 and 7 of the char color PROMs are used for something -- not currently emulated -
@@ -39,11 +38,16 @@ PALETTE_INIT_MEMBER(cheekyms_state, cheekyms)
}
}
-
WRITE8_MEMBER(cheekyms_state::port_40_w)
{
- /* the lower bits probably trigger sound samples */
- m_dac->write_unsigned8(data ? 0x80 : 0);
+ m_dac0->write(BIT(data, 7)); // tune
+ m_dac1->write(BIT(data, 6)); // mouse eating cheese
+ m_dac2->write(BIT(data, 5)); // hammer
+ m_dac3->write(BIT(data, 4)); // mouse died
+ m_dac4->write(BIT(data, 3)); // mystery died
+ m_dac5->write(BIT(data, 2)); // mouse appears
+ m_dac6->write(BIT(data, 1)); // mystery appears
+ m_dac7->write(BIT(data, 0));
}
diff --git a/src/mame/video/exterm.cpp b/src/mame/video/exterm.cpp
index a22cc152b77..a80abd0747f 100644
--- a/src/mame/video/exterm.cpp
+++ b/src/mame/video/exterm.cpp
@@ -7,7 +7,6 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/tms34010/tms34010.h"
#include "includes/exterm.h"
diff --git a/src/mame/video/k053250.h b/src/mame/video/k053250.h
index 2e5e956aa4b..cf657f301a8 100644
--- a/src/mame/video/k053250.h
+++ b/src/mame/video/k053250.h
@@ -43,7 +43,7 @@ private:
// internal state
required_region_ptr<UINT8> m_rom;
- dynamic_buffer m_unpacked_rom;
+ std::vector<UINT8> m_unpacked_rom;
std::vector<UINT16> m_ram;
UINT16 *m_buffer[2];
UINT8 m_regs[8];
diff --git a/src/mame/video/leland.cpp b/src/mame/video/leland.cpp
index 928a1e9ab78..8d0d64df9cd 100644
--- a/src/mame/video/leland.cpp
+++ b/src/mame/video/leland.cpp
@@ -35,10 +35,10 @@ TIMER_CALLBACK_MEMBER(leland_state::scanline_callback)
/* update the DACs */
if (!(m_dac_control & 0x01))
- m_dac0->write_unsigned8(m_video_ram[(m_last_scanline) * 256 + 160]);
+ m_dac0->write(m_video_ram[(m_last_scanline) * 256 + 160]);
if (!(m_dac_control & 0x02))
- m_dac1->write_unsigned8(m_video_ram[(m_last_scanline) * 256 + 161]);
+ m_dac1->write(m_video_ram[(m_last_scanline) * 256 + 161]);
m_last_scanline = scanline;
diff --git a/src/mame/video/pcd.h b/src/mame/video/pcd.h
index 8976776d4d1..db3be8df6d0 100644
--- a/src/mame/video/pcd.h
+++ b/src/mame/video/pcd.h
@@ -54,8 +54,8 @@ private:
required_ioport m_mouse_x;
required_ioport m_mouse_y;
- dynamic_buffer m_vram;
- dynamic_buffer m_charram;
+ std::vector<UINT8> m_vram;
+ std::vector<UINT8> m_charram;
UINT8 m_vram_sw, m_t1, m_p2;
struct
@@ -103,7 +103,7 @@ protected:
void rcv_complete() override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
private:
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
required_region_ptr<UINT8> m_charrom;
devcb_write_line m_txd_handler;
UINT8 m_term_key, m_term_char, m_term_stat, m_vram_latch_r[2], m_vram_latch_w[2], m_p1;
diff --git a/src/mame/video/rungun.cpp b/src/mame/video/rungun.cpp
index 47de04f887b..514f52c1345 100644
--- a/src/mame/video/rungun.cpp
+++ b/src/mame/video/rungun.cpp
@@ -18,7 +18,7 @@
/* TTL text plane stuff */
TILE_GET_INFO_MEMBER(rungun_state::ttl_get_tile_info)
{
- UINT32 base_addr = (FPTR)tilemap.user_data();
+ UINT32 base_addr = (uintptr_t)tilemap.user_data();
UINT8 *lvram = (UINT8 *)m_ttl_vram.get() + base_addr;
int attr, code;
@@ -58,7 +58,7 @@ WRITE16_MEMBER(rungun_state::rng_psac2_videoram_w)
TILE_GET_INFO_MEMBER(rungun_state::get_rng_936_tile_info)
{
- UINT32 base_addr = (FPTR)tilemap.user_data();
+ UINT32 base_addr = (uintptr_t)tilemap.user_data();
int tileno, colour, flipx;
tileno = m_psac2_vram[tile_index * 2 + 1 + base_addr] & 0x3fff;
@@ -102,11 +102,11 @@ void rungun_state::video_start()
for(UINT32 screen_num = 0;screen_num < 2;screen_num++)
{
m_ttl_tilemap[screen_num] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::ttl_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
- m_ttl_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x2000));
+ m_ttl_tilemap[screen_num]->set_user_data((void *)(uintptr_t)(screen_num * 0x2000));
m_ttl_tilemap[screen_num]->set_transparent_pen(0);
m_936_tilemap[screen_num] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::get_rng_936_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 128, 128);
- m_936_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x80000));
+ m_936_tilemap[screen_num]->set_user_data((void *)(uintptr_t)(screen_num * 0x80000));
m_936_tilemap[screen_num]->set_transparent_pen(0);
}
diff --git a/src/mame/video/tceptor.cpp b/src/mame/video/tceptor.cpp
index efb4bdd6580..cb0c4596413 100644
--- a/src/mame/video/tceptor.cpp
+++ b/src/mame/video/tceptor.cpp
@@ -240,7 +240,7 @@ void tceptor_state::decode_bg(const char * region)
int len = 0x8000;
int i;
- dynamic_buffer buffer(len);
+ std::vector<UINT8> buffer(len);
/* expand rom tc2-19.10d */
for (i = 0; i < len / 2; i++)
diff --git a/src/mame/video/vectrex.cpp b/src/mame/video/vectrex.cpp
index b78c096e343..092f22c5ffe 100644
--- a/src/mame/video/vectrex.cpp
+++ b/src/mame/video/vectrex.cpp
@@ -265,7 +265,7 @@ void vectrex_state::vectrex_multiplexer(int mux)
timer_set(attotime::from_nsec(ANALOG_DELAY), TIMER_UPDATE_SIGNAL, m_via_out[PORTA], &m_analog[mux]);
if (mux == A_AUDIO)
- m_dac->write_unsigned8(m_via_out[PORTA]);
+ m_dac->write(m_via_out[PORTA] ^ 0x80); // not gate shown on schematic
}
diff --git a/src/mame/video/wswan.h b/src/mame/video/wswan.h
index 3cad1155075..4c632fdf808 100644
--- a/src/mame/video/wswan.h
+++ b/src/mame/video/wswan.h
@@ -122,7 +122,7 @@ protected:
int m_main_palette[8];
emu_timer *m_timer;
- dynamic_buffer m_vram;
+ std::vector<UINT8> m_vram;
UINT8 *m_palette_vram;
UINT8 m_palette_port[0x20];
int m_pal[16][16];
diff --git a/src/osd/modules/debugger/win/debugviewinfo.cpp b/src/osd/modules/debugger/win/debugviewinfo.cpp
index be786b33fa2..122e5649858 100644
--- a/src/osd/modules/debugger/win/debugviewinfo.cpp
+++ b/src/osd/modules/debugger/win/debugviewinfo.cpp
@@ -773,7 +773,7 @@ LRESULT CALLBACK debugview_info::static_view_proc(HWND wnd, UINT message, WPARAM
return 0;
}
- debugview_info *const info = (debugview_info *)(FPTR)GetWindowLongPtr(wnd, GWLP_USERDATA);
+ debugview_info *const info = (debugview_info *)(uintptr_t)GetWindowLongPtr(wnd, GWLP_USERDATA);
if (info == nullptr)
return DefWindowProc(wnd, message, wparam, lparam);
diff --git a/src/osd/modules/debugger/win/debugwininfo.cpp b/src/osd/modules/debugger/win/debugwininfo.cpp
index fda0a1144fc..3b2e9ed9689 100644
--- a/src/osd/modules/debugger/win/debugwininfo.cpp
+++ b/src/osd/modules/debugger/win/debugwininfo.cpp
@@ -563,7 +563,7 @@ LRESULT CALLBACK debugwin_info::static_window_proc(HWND wnd, UINT message, WPARA
return 0;
}
- debugwin_info *const info = (debugwin_info *)(FPTR)GetWindowLongPtr(wnd, GWLP_USERDATA);
+ debugwin_info *const info = (debugwin_info *)(uintptr_t)GetWindowLongPtr(wnd, GWLP_USERDATA);
if (info == nullptr)
return DefWindowProc(wnd, message, wparam, lparam);
diff --git a/src/osd/modules/debugger/win/editwininfo.cpp b/src/osd/modules/debugger/win/editwininfo.cpp
index e7c3ba4f54d..6dc4954a796 100644
--- a/src/osd/modules/debugger/win/editwininfo.cpp
+++ b/src/osd/modules/debugger/win/editwininfo.cpp
@@ -35,7 +35,7 @@ editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_co
// create an edit box and override its key handling
m_editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), nullptr, EDIT_BOX_STYLE,
0, 0, 100, 100, window(), nullptr, GetModuleHandleUni(), nullptr);
- m_original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(m_editwnd, GWLP_WNDPROC);
+ m_original_editproc = (WNDPROC)(uintptr_t)GetWindowLongPtr(m_editwnd, GWLP_WNDPROC);
SetWindowLongPtr(m_editwnd, GWLP_USERDATA, (LONG_PTR)this);
SetWindowLongPtr(m_editwnd, GWLP_WNDPROC, (LONG_PTR)&editwin_info::static_edit_proc);
SendMessage(m_editwnd, WM_SETFONT, (WPARAM)metrics().debug_font(), (LPARAM)FALSE);
@@ -226,7 +226,7 @@ LRESULT editwin_info::edit_proc(UINT message, WPARAM wparam, LPARAM lparam)
LRESULT CALLBACK editwin_info::static_edit_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
{
- editwin_info *const info = (editwin_info *)(FPTR)GetWindowLongPtr(wnd, GWLP_USERDATA);
+ editwin_info *const info = (editwin_info *)(uintptr_t)GetWindowLongPtr(wnd, GWLP_USERDATA);
assert(info->m_editwnd == wnd);
return info->edit_proc(message, wparam, lparam);
}
diff --git a/src/osd/modules/diagnostics/diagnostics_win32.cpp b/src/osd/modules/diagnostics/diagnostics_win32.cpp
index cdacba72ceb..aa74e60adc4 100644
--- a/src/osd/modules/diagnostics/diagnostics_win32.cpp
+++ b/src/osd/modules/diagnostics/diagnostics_win32.cpp
@@ -46,9 +46,9 @@ class stack_walker
public:
stack_walker();
- FPTR ip() const { return m_stackframe.AddrPC.Offset; }
- FPTR sp() const { return m_stackframe.AddrStack.Offset; }
- FPTR frame() const { return m_stackframe.AddrFrame.Offset; }
+ uintptr_t ip() const { return m_stackframe.AddrPC.Offset; }
+ uintptr_t sp() const { return m_stackframe.AddrStack.Offset; }
+ uintptr_t frame() const { return m_stackframe.AddrFrame.Offset; }
bool reset();
void reset(CONTEXT &context, HANDLE thread);
@@ -82,11 +82,11 @@ public:
~symbol_manager();
// getters
- FPTR last_base() const { return m_last_base; }
+ uintptr_t last_base() const { return m_last_base; }
// core symbol lookup
- const char *symbol_for_address(FPTR address);
- const char *symbol_for_address(PVOID address) { return symbol_for_address(reinterpret_cast<FPTR>(address)); }
+ const char *symbol_for_address(uintptr_t address);
+ const char *symbol_for_address(PVOID address) { return symbol_for_address(reinterpret_cast<uintptr_t>(address)); }
// force symbols to be cached
void cache_symbols() { scan_file_for_address(0, true); }
@@ -94,21 +94,21 @@ public:
void reset_cache() { m_cache.clear(); }
private:
// internal helpers
- bool query_system_for_address(FPTR address);
- void scan_file_for_address(FPTR address, bool create_cache);
- bool parse_sym_line(const char *line, FPTR &address, std::string &symbol);
- bool parse_map_line(const char *line, FPTR &address, std::string &symbol);
- void scan_cache_for_address(FPTR address);
+ bool query_system_for_address(uintptr_t address);
+ void scan_file_for_address(uintptr_t address, bool create_cache);
+ bool parse_sym_line(const char *line, uintptr_t &address, std::string &symbol);
+ bool parse_map_line(const char *line, uintptr_t &address, std::string &symbol);
+ void scan_cache_for_address(uintptr_t address);
void format_symbol(const char *name, UINT32 displacement, const char *filename = nullptr, int linenumber = 0);
- static FPTR get_text_section_base();
+ static uintptr_t get_text_section_base();
struct cache_entry
{
- cache_entry(FPTR address, const char *symbol) :
+ cache_entry(uintptr_t address, const char *symbol) :
m_address(address), m_name(symbol) { }
- FPTR m_address;
+ uintptr_t m_address;
std::string m_name;
};
std::vector<std::unique_ptr<cache_entry>> m_cache;
@@ -117,8 +117,8 @@ private:
std::string m_symfile;
std::string m_buffer;
HANDLE m_process;
- FPTR m_last_base;
- FPTR m_text_base;
+ uintptr_t m_last_base;
+ uintptr_t m_text_base;
osd::dynamic_module::ptr m_dbghelp_dll;
@@ -153,9 +153,9 @@ private:
UINT8 m_stack_depth;
UINT8 m_entry_stride;
- std::vector<FPTR> m_buffer;
- FPTR * m_buffer_ptr;
- FPTR * m_buffer_end;
+ std::vector<uintptr_t> m_buffer;
+ uintptr_t * m_buffer_ptr;
+ uintptr_t * m_buffer_end;
};
@@ -338,7 +338,7 @@ symbol_manager::~symbol_manager()
// file
//-------------------------------------------------
-const char *symbol_manager::symbol_for_address(FPTR address)
+const char *symbol_manager::symbol_for_address(uintptr_t address)
{
// default the buffer
m_buffer.assign(" (not found)");
@@ -364,7 +364,7 @@ const char *symbol_manager::symbol_for_address(FPTR address)
// look up our address
//-------------------------------------------------
-bool symbol_manager::query_system_for_address(FPTR address)
+bool symbol_manager::query_system_for_address(uintptr_t address)
{
// need at least the sym_from_addr API
if (!m_sym_from_addr)
@@ -402,7 +402,7 @@ bool symbol_manager::query_system_for_address(FPTR address)
// along the way
//-------------------------------------------------
-void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
+void symbol_manager::scan_file_for_address(uintptr_t address, bool create_cache)
{
bool is_symfile = false;
FILE *srcfile = nullptr;
@@ -423,7 +423,7 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
// reset the best info
std::string best_symbol;
- FPTR best_addr = 0;
+ uintptr_t best_addr = 0;
// parse the file, looking for valid entries
std::string symbol;
@@ -431,7 +431,7 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
while (fgets(line, sizeof(line) - 1, srcfile))
{
// parse the line looking for an interesting symbol
- FPTR addr = 0;
+ uintptr_t addr = 0;
bool valid = is_symfile ? parse_sym_line(line, addr, symbol) : parse_map_line(line, addr, symbol);
// if we got one, see if this is the best
@@ -464,11 +464,11 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
// find the best match for the given address
//-------------------------------------------------
-void symbol_manager::scan_cache_for_address(FPTR address)
+void symbol_manager::scan_cache_for_address(uintptr_t address)
{
// reset the best info
std::string best_symbol;
- FPTR best_addr = 0;
+ uintptr_t best_addr = 0;
// walk the cache, looking for valid entries
for (auto &entry : m_cache)
@@ -491,7 +491,7 @@ void symbol_manager::scan_cache_for_address(FPTR address)
// which is just the output of objdump
//-------------------------------------------------
-bool symbol_manager::parse_sym_line(const char *line, FPTR &address, std::string &symbol)
+bool symbol_manager::parse_sym_line(const char *line, uintptr_t &address, std::string &symbol)
{
#ifdef __GNUC__
/*
@@ -524,7 +524,7 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, std::string
void *temp;
if (sscanf(chptr, "0x%p", &temp) != 1)
return false;
- address = m_text_base + reinterpret_cast<FPTR>(temp);
+ address = m_text_base + reinterpret_cast<uintptr_t>(temp);
// skip forward until we're past the space
while (*chptr != 0 && !isspace(*chptr))
@@ -545,7 +545,7 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, std::string
// generated map file
//-------------------------------------------------
-bool symbol_manager::parse_map_line(const char *line, FPTR &address, std::string &symbol)
+bool symbol_manager::parse_map_line(const char *line, uintptr_t &address, std::string &symbol)
{
#ifdef __GNUC__
/*
@@ -563,7 +563,7 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, std::string
void *temp;
if (sscanf(&line[16], "0x%p", &temp) != 1)
return false;
- address = reinterpret_cast<FPTR>(temp);
+ address = reinterpret_cast<uintptr_t>(temp);
// skip forward until we're past the space
const char *chptr = &line[16];
@@ -604,7 +604,7 @@ void symbol_manager::format_symbol(const char *name, UINT32 displacement, const
// of the .text section
//-------------------------------------------------
-FPTR symbol_manager::get_text_section_base()
+uintptr_t symbol_manager::get_text_section_base()
{
osd::dynamic_module::ptr m_dbghelp_dll = osd::dynamic_module::open({ "dbghelp.dll" });
@@ -623,13 +623,13 @@ FPTR symbol_manager::get_text_section_base()
assert(headers != nullptr);
// look ourself up (assuming we are in the .text section)
- PIMAGE_SECTION_HEADER section = (*image_rva_to_section)(headers, base, reinterpret_cast<FPTR>(get_text_section_base) - reinterpret_cast<FPTR>(base));
+ PIMAGE_SECTION_HEADER section = (*image_rva_to_section)(headers, base, reinterpret_cast<uintptr_t>(get_text_section_base) - reinterpret_cast<uintptr_t>(base));
if (section != nullptr)
- return reinterpret_cast<FPTR>(base) + section->VirtualAddress;
+ return reinterpret_cast<uintptr_t>(base) + section->VirtualAddress;
}
// fallback to returning the image base (wrong)
- return reinterpret_cast<FPTR>(base);
+ return reinterpret_cast<uintptr_t>(base);
}
@@ -710,8 +710,8 @@ void sampling_profiler::stop()
int CLIB_DECL sampling_profiler::compare_address(const void *item1, const void *item2)
{
- const FPTR *entry1 = reinterpret_cast<const FPTR *>(item1);
- const FPTR *entry2 = reinterpret_cast<const FPTR *>(item2);
+ const uintptr_t *entry1 = reinterpret_cast<const uintptr_t *>(item1);
+ const uintptr_t *entry2 = reinterpret_cast<const uintptr_t *>(item2);
int mincount = std::min(entry1[0], entry2[0]);
// sort in order of: bucket, caller, caller's caller, etc.
@@ -731,8 +731,8 @@ int CLIB_DECL sampling_profiler::compare_address(const void *item1, const void *
int CLIB_DECL sampling_profiler::compare_frequency(const void *item1, const void *item2)
{
- const FPTR *entry1 = reinterpret_cast<const FPTR *>(item1);
- const FPTR *entry2 = reinterpret_cast<const FPTR *>(item2);
+ const uintptr_t *entry1 = reinterpret_cast<const uintptr_t *>(item1);
+ const uintptr_t *entry2 = reinterpret_cast<const uintptr_t *>(item2);
// sort by frequency, then by address
if (entry1[0] != entry2[0])
@@ -751,7 +751,7 @@ void sampling_profiler::print_results(symbol_manager &symbols)
symbols.cache_symbols();
// step 1: find the base of each entry
- for (FPTR *current = &m_buffer[0]; current < m_buffer_ptr; current += m_entry_stride)
+ for (uintptr_t *current = &m_buffer[0]; current < m_buffer_ptr; current += m_entry_stride)
{
assert(current[0] >= 1 && current[0] < m_entry_stride);
@@ -761,14 +761,14 @@ void sampling_profiler::print_results(symbol_manager &symbols)
}
// step 2: sort the results
- qsort(&m_buffer[0], (m_buffer_ptr - &m_buffer[0]) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_address);
+ qsort(&m_buffer[0], (m_buffer_ptr - &m_buffer[0]) / m_entry_stride, m_entry_stride * sizeof(uintptr_t), compare_address);
// step 3: count and collapse unique entries
UINT32 total_count = 0;
- for (FPTR *current = &m_buffer[0]; current < m_buffer_ptr; )
+ for (uintptr_t *current = &m_buffer[0]; current < m_buffer_ptr; )
{
int count = 1;
- FPTR *scan;
+ uintptr_t *scan;
for (scan = current + m_entry_stride; scan < m_buffer_ptr; scan += m_entry_stride)
{
if (compare_address(current, scan) != 0)
@@ -782,11 +782,11 @@ void sampling_profiler::print_results(symbol_manager &symbols)
}
// step 4: sort the results again, this time by frequency
- qsort(&m_buffer[0], (m_buffer_ptr - &m_buffer[0]) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_frequency);
+ qsort(&m_buffer[0], (m_buffer_ptr - &m_buffer[0]) / m_entry_stride, m_entry_stride * sizeof(uintptr_t), compare_frequency);
// step 5: print the results
UINT32 num_printed = 0;
- for (FPTR *current = &m_buffer[0]; current < m_buffer_ptr && num_printed < 30; current += m_entry_stride)
+ for (uintptr_t *current = &m_buffer[0]; current < m_buffer_ptr && num_printed < 30; current += m_entry_stride)
{
// once we hit 0 frequency, we're done
if (current[0] == 0)
@@ -837,7 +837,7 @@ void sampling_profiler::thread_run()
GetThreadContext(m_target_thread, &context);
// first entry is a count
- FPTR *count = m_buffer_ptr++;
+ uintptr_t *count = m_buffer_ptr++;
*count = 0;
// iterate over the frames until we run out or hit an error
@@ -972,7 +972,7 @@ private:
auto diagnostics = downcast<diagnostics_win32 *>(get_instance());
fprintf(stderr, "Exception at EIP=%p%s: %s\n", info->ExceptionRecord->ExceptionAddress,
- diagnostics->m_symbols->symbol_for_address((FPTR)info->ExceptionRecord->ExceptionAddress), exception_table[i].string);
+ diagnostics->m_symbols->symbol_for_address((uintptr_t)info->ExceptionRecord->ExceptionAddress), exception_table[i].string);
// for access violations, print more info
if (info->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp
index 09ed0ac7984..940acef38d5 100644
--- a/src/osd/modules/file/posixfile.cpp
+++ b/src/osd/modules/file/posixfile.cpp
@@ -474,7 +474,7 @@ const char *osd_get_volume_name(int idx)
// osd_is_valid_filename_char
//============================================================
-bool osd_is_valid_filename_char(unicode_char uchar)
+bool osd_is_valid_filename_char(char32_t uchar)
{
// The only one that's actually invalid is the slash
// The other two are just problematic because they're the escape character and path separator
@@ -494,7 +494,7 @@ bool osd_is_valid_filename_char(unicode_char uchar)
// osd_is_valid_filepath_char
//============================================================
-bool osd_is_valid_filepath_char(unicode_char uchar)
+bool osd_is_valid_filepath_char(char32_t uchar)
{
// One could argue that colon should be in here too because it functions as path separator
return uchar >= 0x20
diff --git a/src/osd/modules/file/stdfile.cpp b/src/osd/modules/file/stdfile.cpp
index 92920bba495..74cd6abc0c3 100644
--- a/src/osd/modules/file/stdfile.cpp
+++ b/src/osd/modules/file/stdfile.cpp
@@ -179,7 +179,7 @@ int osd_get_physical_drive_geometry(const char *filename, UINT32 *cylinders, UIN
// osd_uchar_from_osdchar
//============================================================
-int osd_uchar_from_osdchar(UINT32 /* unicode_char */ *uchar, const char *osdchar, size_t count)
+int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count)
{
// we assume a standard 1:1 mapping of characters to the first 256 unicode characters
*uchar = (UINT8)*osdchar;
diff --git a/src/osd/modules/file/winfile.cpp b/src/osd/modules/file/winfile.cpp
index 656ce36eadc..3d61374e8c8 100644
--- a/src/osd/modules/file/winfile.cpp
+++ b/src/osd/modules/file/winfile.cpp
@@ -434,7 +434,7 @@ const char *osd_get_volume_name(int idx)
// osd_is_valid_filename_char
//============================================================
-bool osd_is_valid_filename_char(unicode_char uchar)
+bool osd_is_valid_filename_char(char32_t uchar)
{
return osd_is_valid_filepath_char(uchar)
&& uchar != '/'
@@ -448,7 +448,7 @@ bool osd_is_valid_filename_char(unicode_char uchar)
// osd_is_valid_filepath_char
//============================================================
-bool osd_is_valid_filepath_char(unicode_char uchar)
+bool osd_is_valid_filepath_char(char32_t uchar)
{
return uchar >= 0x20
&& uchar != '<'
diff --git a/src/osd/modules/font/font_dwrite.cpp b/src/osd/modules/font/font_dwrite.cpp
index af9f83bdf89..643c1f9b522 100644
--- a/src/osd/modules/font/font_dwrite.cpp
+++ b/src/osd/modules/font/font_dwrite.cpp
@@ -400,7 +400,7 @@ public:
// pixel of a black & white font
//-------------------------------------------------
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override
{
const int MEM_ALIGN_CONST = 31;
const int BITMAP_PAD = 50;
diff --git a/src/osd/modules/font/font_none.cpp b/src/osd/modules/font/font_none.cpp
index 2716b52cf8e..dc6116625a8 100644
--- a/src/osd/modules/font/font_none.cpp
+++ b/src/osd/modules/font/font_none.cpp
@@ -15,7 +15,7 @@ public:
virtual bool open(std::string const &font_path, std::string const &name, int &height) override { return false; }
virtual void close() override { }
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override { return false; }
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override { return false; }
};
class font_none : public osd_module, public font_module
diff --git a/src/osd/modules/font/font_osx.cpp b/src/osd/modules/font/font_osx.cpp
index 22662d3b8d3..e0ec07be502 100644
--- a/src/osd/modules/font/font_osx.cpp
+++ b/src/osd/modules/font/font_osx.cpp
@@ -30,7 +30,7 @@ public:
virtual bool open(std::string const &font_path, std::string const &name, int &height);
virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
osd_font_osx &operator=(osd_font_osx &&obj)
{
@@ -122,7 +122,7 @@ void osd_font_osx::close()
// pixel of a black & white font
//-------------------------------------------------
-bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
+bool osd_font_osx::get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
{
UniChar uni_char;
CGGlyph glyph;
diff --git a/src/osd/modules/font/font_sdl.cpp b/src/osd/modules/font/font_sdl.cpp
index 629bc9046a8..668fd2d5778 100644
--- a/src/osd/modules/font/font_sdl.cpp
+++ b/src/osd/modules/font/font_sdl.cpp
@@ -39,7 +39,7 @@ public:
virtual bool open(std::string const &font_path, std::string const &name, int &height);
virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs);
osd_font_sdl & operator=(osd_font_sdl &&obj)
{
@@ -158,7 +158,7 @@ void osd_font_sdl::close()
// pixel of a black & white font
//-------------------------------------------------
-bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
+bool osd_font_sdl::get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs)
{
SDL_Color const fcol = { 0xff, 0xff, 0xff };
char ustr[16];
diff --git a/src/osd/modules/font/font_windows.cpp b/src/osd/modules/font/font_windows.cpp
index 9fd326f8c57..e6de2ef693d 100644
--- a/src/osd/modules/font/font_windows.cpp
+++ b/src/osd/modules/font/font_windows.cpp
@@ -38,7 +38,7 @@ public:
virtual bool open(std::string const &font_path, std::string const &name, int &height) override;
virtual void close() override;
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override;
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) override;
osd_font_windows &operator=(osd_font_windows &&obj)
{
@@ -144,7 +144,7 @@ void osd_font_windows::close()
// pixel of a black & white font
//-------------------------------------------------
-bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
+bool osd_font_windows::get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
// create a dummy DC to work with
HDC dummyDC = CreateCompatibleDC(nullptr);
@@ -200,7 +200,7 @@ bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT
memset(bits, 0, rowbytes * bmheight);
// now draw the character
- utf16_char tempchar[UTF16_CHAR_MAX];
+ char16_t tempchar[UTF16_CHAR_MAX];
UINT const count = INT(utf16_from_uchar(tempchar, ARRAY_LENGTH(tempchar), chnum));
SetTextColor(dummyDC, RGB(0xff, 0xff, 0xff));
SetBkColor(dummyDC, RGB(0x00, 0x00, 0x00));
diff --git a/src/osd/modules/input/input_dinput.cpp b/src/osd/modules/input/input_dinput.cpp
index c4a62cd0d2f..694bf80b984 100644
--- a/src/osd/modules/input/input_dinput.cpp
+++ b/src/osd/modules/input/input_dinput.cpp
@@ -406,7 +406,7 @@ public:
// populate the buttons
for (butnum = 0; butnum < devinfo->dinput.caps.dwButtons; butnum++)
{
- FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIMOUSESTATE *>(nullptr)->rgbButtons[butnum]);
+ uintptr_t offset = reinterpret_cast<uintptr_t>(&static_cast<DIMOUSESTATE *>(nullptr)->rgbButtons[butnum]);
// add to the mouse device
std::string name = device_item_name(devinfo, offset, default_button_name(butnum), nullptr);
@@ -520,25 +520,25 @@ int dinput_joystick_device::configure()
// left
name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("L"));
- device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_LEFT)));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_LEFT)));
// right
name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("R"));
- device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_RIGHT)));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_RIGHT)));
// up
name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("U"));
- device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_UP)));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_UP)));
// down
name = dinput_module::device_item_name(this, offsetof(DIJOYSTATE2, rgdwPOV) + povnum * sizeof(DWORD), default_pov_name(povnum), TEXT("D"));
- device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<FPTR>(povnum * 4 + POVDIR_DOWN)));
+ device()->add_item(name.c_str(), ITEM_ID_OTHER_SWITCH, dinput_joystick_pov_get_state, reinterpret_cast<void *>(static_cast<uintptr_t>(povnum * 4 + POVDIR_DOWN)));
}
// populate the buttons
for (UINT32 butnum = 0; butnum < dinput.caps.dwButtons; butnum++)
{
- FPTR offset = reinterpret_cast<FPTR>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]);
+ uintptr_t offset = reinterpret_cast<uintptr_t>(&static_cast<DIJOYSTATE2 *>(nullptr)->rgbButtons[butnum]);
std::string name = dinput_module::device_item_name(this, offset, default_button_name(butnum), nullptr);
input_item_id itemid;
@@ -606,8 +606,8 @@ public:
static INT32 dinput_joystick_pov_get_state(void *device_internal, void *item_internal)
{
dinput_joystick_device *devinfo = static_cast<dinput_joystick_device *>(device_internal);
- int povnum = reinterpret_cast<FPTR>(item_internal) / 4;
- int povdir = reinterpret_cast<FPTR>(item_internal) % 4;
+ int povnum = reinterpret_cast<uintptr_t>(item_internal) / 4;
+ int povdir = reinterpret_cast<uintptr_t>(item_internal) % 4;
INT32 result = 0;
DWORD pov;
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index 9a8180b7088..d42e17274eb 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -163,7 +163,7 @@ public:
auto len = std::strlen(sdlevent.text.text);
while (len)
{
- unicode_char ch;
+ char32_t ch;
auto chlen = uchar_from_utf8(&ch, ptr, len);
if (0 > chlen)
{
diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp
index 503aaec9b7a..89e0cacf37d 100644
--- a/src/osd/modules/lib/osdlib_win32.cpp
+++ b/src/osd/modules/lib/osdlib_win32.cpp
@@ -123,7 +123,7 @@ void *osd_malloc(size_t size)
UINT8 *const block = reinterpret_cast<UINT8 *>(HeapAlloc(GetProcessHeap(), 0, size));
if (block == nullptr)
return nullptr;
- UINT8 *const result = reinterpret_cast<UINT8 *>(reinterpret_cast<FPTR>(block + sizeof(size_t) + MAX_ALIGNMENT) & ~(FPTR(MAX_ALIGNMENT) - 1));
+ UINT8 *const result = reinterpret_cast<UINT8 *>(reinterpret_cast<uintptr_t>(block + sizeof(size_t) + MAX_ALIGNMENT) & ~(uintptr_t(MAX_ALIGNMENT) - 1));
// store the size and return and pointer to the data afterward
*reinterpret_cast<size_t *>(block) = size;
@@ -161,7 +161,7 @@ void *osd_malloc_array(size_t size)
// work backwards from the page base to get to the block base
UINT8 *const block = GUARD_ALIGN_START ? reinterpret_cast<UINT8 *>(page_base) : (reinterpret_cast<UINT8 *>(page_base) + rounded_size - size);
- UINT8 *const result = reinterpret_cast<UINT8 *>(reinterpret_cast<FPTR>(block + sizeof(size_t) + MAX_ALIGNMENT) & ~(FPTR(MAX_ALIGNMENT) - 1));
+ UINT8 *const result = reinterpret_cast<UINT8 *>(reinterpret_cast<uintptr_t>(block + sizeof(size_t) + MAX_ALIGNMENT) & ~(uintptr_t(MAX_ALIGNMENT) - 1));
// store the size at the start with a flag indicating it has a guard page
*reinterpret_cast<size_t *>(block) = size | 1;
diff --git a/src/osd/modules/opengl/gl_shader_tool.cpp b/src/osd/modules/opengl/gl_shader_tool.cpp
index 5ee07661aa9..33cbac2d129 100644
--- a/src/osd/modules/opengl/gl_shader_tool.cpp
+++ b/src/osd/modules/opengl/gl_shader_tool.cpp
@@ -152,57 +152,57 @@ int gl_shader_check_error(GLhandleARB obj, GLenum obj_query, GLSLCheckMode m, co
if( param!=GL_PROGRAM_OBJECT_ARB && param!=GL_SHADER_OBJECT_ARB )
{
if ( CHECK_VERBOSE <= m )
- osd_printf_warning("%s:%d: GL Error: object type 0x%X generation failed\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Error: object type 0x%X generation failed\n", file, line, (unsigned int)(uintptr_t)obj);
res=-1;
} else if ( CHECK_ALWAYS_VERBOSE <= m )
{
if(param==GL_PROGRAM_OBJECT_ARB)
- osd_printf_warning("%s:%d: GL Error: object type 0x%X is PROGRAM, successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Error: object type 0x%X is PROGRAM, successful\n", file, line, (unsigned int)(uintptr_t)obj);
else
- osd_printf_warning("%s:%d: GL Info: object type 0x%X is SHADER, successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object type 0x%X is SHADER, successful\n", file, line, (unsigned int)(uintptr_t)obj);
}
break;
case GL_OBJECT_DELETE_STATUS_ARB:
if(param!=1)
{
if ( CHECK_ALWAYS_VERBOSE <= m )
- osd_printf_warning("%s:%d: GL Info: object 0x%X not yet marked for deletion\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object 0x%X not yet marked for deletion\n", file, line, (unsigned int)(uintptr_t)obj);
} else if ( CHECK_ALWAYS_VERBOSE <= m )
{
- osd_printf_warning("%s:%d: GL Info: object 0x%X deletion successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object 0x%X deletion successful\n", file, line, (unsigned int)(uintptr_t)obj);
}
break;
case GL_OBJECT_COMPILE_STATUS_ARB:
if(param!=1)
{
if ( CHECK_VERBOSE <= m )
- osd_printf_warning("%s:%d: GL Error: object 0x%X compilation failed\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Error: object 0x%X compilation failed\n", file, line, (unsigned int)(uintptr_t)obj);
res=-1;
} else if ( CHECK_ALWAYS_VERBOSE <= m )
{
- osd_printf_warning("%s:%d: GL Info: object 0x%X compiled successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object 0x%X compiled successful\n", file, line, (unsigned int)(uintptr_t)obj);
}
break;
case GL_OBJECT_LINK_STATUS_ARB:
if(param!=1)
{
if ( CHECK_VERBOSE <= m )
- osd_printf_warning("%s:%d: GL Error: object 0x%X linking failed\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Error: object 0x%X linking failed\n", file, line, (unsigned int)(uintptr_t)obj);
res=-1;
} else if ( CHECK_ALWAYS_VERBOSE <= m )
{
- osd_printf_warning("%s:%d: GL Info: object 0x%X linked successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object 0x%X linked successful\n", file, line, (unsigned int)(uintptr_t)obj);
}
break;
case GL_OBJECT_VALIDATE_STATUS_ARB:
if(param!=1)
{
if ( CHECK_VERBOSE <= m )
- osd_printf_warning("%s:%d: GL Error: object 0x%X validation failed\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Error: object 0x%X validation failed\n", file, line, (unsigned int)(uintptr_t)obj);
res=-1;
} else if ( CHECK_ALWAYS_VERBOSE <= m )
{
- osd_printf_warning("%s:%d: GL Info: object 0x%X validation successful\n", file, line, (unsigned int)(FPTR)obj);
+ osd_printf_warning("%s:%d: GL Info: object 0x%X validation successful\n", file, line, (unsigned int)(uintptr_t)obj);
}
break;
}
diff --git a/src/osd/modules/output/win32_output.cpp b/src/osd/modules/output/win32_output.cpp
index e9add1b515d..826aa3b9e04 100644
--- a/src/osd/modules/output/win32_output.cpp
+++ b/src/osd/modules/output/win32_output.cpp
@@ -303,7 +303,7 @@ LRESULT output_win32::send_id_string(HWND hwnd, LPARAM id)
// allocate memory for the message
datalen = sizeof(copydata_id_string) + strlen(name) + 1;
- dynamic_buffer buffer(datalen);
+ std::vector<UINT8> buffer(datalen);
copydata_id_string *temp = (copydata_id_string *)&buffer[0];
temp->id = id;
strcpy(temp->string, name);
diff --git a/src/osd/modules/render/blit13.h b/src/osd/modules/render/blit13.h
index 22a7a1fcea5..33daf3c5ead 100644
--- a/src/osd/modules/render/blit13.h
+++ b/src/osd/modules/render/blit13.h
@@ -35,13 +35,13 @@ inline UINT32 ycc_to_rgb(const UINT8 y, const UINT8 cb, const UINT8 cr)
inline UINT32 pixel_ycc_to_rgb(const UINT16 *pixel)
{
- const UINT32 p = *(UINT32 *)((FPTR) pixel & ~3);
+ const UINT32 p = *(UINT32 *)((uintptr_t) pixel & ~3);
return ycc_to_rgb((*pixel >> 8) & 0xff, (p) & 0xff, (p>>16) & 0xff);
}
inline UINT32 pixel_ycc_to_rgb_pal(const UINT16 *pixel, const rgb_t *palette)
{
- const UINT32 p = *(UINT32 *)((FPTR) pixel & ~3);
+ const UINT32 p = *(UINT32 *)((uintptr_t) pixel & ~3);
return ycc_to_rgb(palette[(*pixel >> 8) & 0xff], (p) & 0xff, (p>>16) & 0xff);
}
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index 43ce12174e8..70baac2ace6 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -467,7 +467,7 @@ void d3d_texture_manager::delete_resources()
UINT32 d3d_texture_manager::texture_compute_hash(const render_texinfo *texture, UINT32 flags)
{
- return (FPTR)texture->base ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
+ return (uintptr_t)texture->base ^ (flags & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK));
}
texture_info *d3d_texture_manager::find_texinfo(const render_texinfo *texinfo, UINT32 flags)
diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h
index d1d8e2158a8..814f77e73cd 100644
--- a/src/osd/osdcomm.h
+++ b/src/osd/osdcomm.h
@@ -33,12 +33,9 @@
/* Some optimizations/warnings cleanups for GCC */
#if defined(__GNUC__)
#define ATTR_UNUSED __attribute__((__unused__))
-#define ATTR_NORETURN __attribute__((noreturn))
#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y)))
#define ATTR_CONST __attribute__((const))
#define ATTR_FORCE_INLINE __attribute__((always_inline))
-#define ATTR_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
-#define ATTR_DEPRECATED __attribute__((deprecated))
#define ATTR_HOT __attribute__((hot))
#define ATTR_COLD __attribute__((cold))
#define UNEXPECTED(exp) __builtin_expect(!!(exp), 0)
@@ -46,12 +43,9 @@
#define RESTRICT __restrict__
#else
#define ATTR_UNUSED
-#define ATTR_NORETURN __declspec(noreturn)
#define ATTR_PRINTF(x,y)
#define ATTR_CONST
#define ATTR_FORCE_INLINE __forceinline
-#define ATTR_NONNULL(...)
-#define ATTR_DEPRECATED __declspec(deprecated)
#define ATTR_HOT
#define ATTR_COLD
#define UNEXPECTED(exp) (exp)
@@ -82,16 +76,6 @@ using INT32 = std::int32_t;
using UINT64 = std::uint64_t;
using INT64 = std::int64_t;
-/* pointer-sized values */
-using FPTR = uintptr_t;
-
-/* unicode types */
-using utf16_char = std::uint16_t;
-using unicode_char = std::uint32_t;
-
-
-
-
/***************************************************************************
FUNDAMENTAL CONSTANTS
***************************************************************************/
@@ -165,7 +149,6 @@ constexpr UINT64 little_endianize_int64(UINT64 x) { return flipendian_int64(x);
#endif /* LSB_FIRST */
#ifdef _MSC_VER
-#include <malloc.h>
using ssize_t = std::make_signed_t<size_t>;
#endif
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h
index 7464e076141..acc9c5b6088 100644
--- a/src/osd/osdcore.h
+++ b/src/osd/osdcore.h
@@ -290,7 +290,7 @@ int osd_get_physical_drive_geometry(const char *filename, UINT32 *cylinders, UIN
The number of characters required to form a Unicode character.
-----------------------------------------------------------------------------*/
-int osd_uchar_from_osdchar(unicode_char *uchar, const char *osdchar, size_t count);
+int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count);
/*-----------------------------------------------------------------------------
@@ -305,7 +305,7 @@ int osd_uchar_from_osdchar(unicode_char *uchar, const char *osdchar, size_t coun
Whether this character is legal in a filename
-----------------------------------------------------------------------------*/
-bool osd_is_valid_filename_char(unicode_char uchar);
+bool osd_is_valid_filename_char(char32_t uchar);
/*-----------------------------------------------------------------------------
@@ -320,7 +320,7 @@ bool osd_is_valid_filename_char(unicode_char uchar);
Whether this character is legal in a file path
-----------------------------------------------------------------------------*/
-bool osd_is_valid_filepath_char(unicode_char uchar);
+bool osd_is_valid_filepath_char(char32_t uchar);
/***************************************************************************
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h
index 3073a014d02..e16af650e17 100644
--- a/src/osd/osdepend.h
+++ b/src/osd/osdepend.h
@@ -51,7 +51,7 @@ public:
* the pixel values rgb_t(0xff,0xff,0xff,0xff) or
* rgb_t(0x00,0xff,0xff,0xff) for each pixel of a black & white font
*/
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) = 0;
+ virtual bool get_bitmap(char32_t chnum, bitmap_argb32 &bitmap, std::int32_t &width, std::int32_t &xoffs, std::int32_t &yoffs) = 0;
};
// ======================> osd_interface
diff --git a/src/osd/strconv.cpp b/src/osd/strconv.cpp
index 25d651fcf5b..8759f67cce9 100644
--- a/src/osd/strconv.cpp
+++ b/src/osd/strconv.cpp
@@ -282,7 +282,7 @@ std::string from_wstring(const WCHAR *s)
// osd_uchar_from_osdchar
//============================================================
-int osd_uchar_from_osdchar(UINT32 *uchar, const char *osdchar, size_t count)
+int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count)
{
WCHAR wch;
CPINFO cp;
@@ -311,7 +311,7 @@ error:
// osd_uchar_from_osdchar
//============================================================
-int osd_uchar_from_osdchar(unicode_char *uchar, const char *osdchar, size_t count)
+int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count)
{
wchar_t wch;
diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp
index de245a231e0..370d7b7087d 100644
--- a/src/osd/windows/window.cpp
+++ b/src/osd/windows/window.cpp
@@ -1218,7 +1218,7 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
break;
case WM_CHAR:
- window->machine().ui_input().push_char_event(window->m_target, (unicode_char) wparam);
+ window->machine().ui_input().push_char_event(window->m_target, (char32_t) wparam);
break;
case WM_MOUSEWHEEL:
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp
index da385fac5ec..44431fd44cf 100644
--- a/src/tools/chdman.cpp
+++ b/src/tools/chdman.cpp
@@ -448,7 +448,7 @@ public:
m_rawdata(info.bytes_per_frame) { }
// getters
- const dynamic_buffer &ldframedata() const { return m_ldframedata; }
+ const std::vector<UINT8> &ldframedata() const { return m_ldframedata; }
// read interface
virtual UINT32 read_data(void *_dest, UINT64 offset, UINT32 length)
@@ -529,8 +529,8 @@ private:
UINT32 m_start_frame;
UINT32 m_frame_count;
std::vector<INT16> m_audio[8];
- dynamic_buffer m_ldframedata;
- dynamic_buffer m_rawdata;
+ std::vector<UINT8> m_ldframedata;
+ std::vector<UINT8> m_rawdata;
};
@@ -1411,7 +1411,7 @@ static void do_info(parameters_t &params)
printf("Parent SHA1: %s\n", parent.as_string().c_str());
// print out metadata
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
std::vector<metadata_index_info> info;
for (int index = 0; ; index++)
{
@@ -1535,7 +1535,7 @@ static void do_verify(parameters_t &params)
report_error(0, "No verification to be done; CHD has no checksum");
// create an array to read into
- dynamic_buffer buffer((TEMP_BUFFER_SIZE / input_chd.hunk_bytes()) * input_chd.hunk_bytes());
+ std::vector<UINT8> buffer((TEMP_BUFFER_SIZE / input_chd.hunk_bytes()) * input_chd.hunk_bytes());
// read all the data and build up an SHA-1
util::sha1_creator rawsha1;
@@ -1769,7 +1769,7 @@ static void do_create_hd(parameters_t &params)
}
// process ident
- dynamic_buffer identdata;
+ std::vector<UINT8> identdata;
if (output_parent.opened())
output_parent.read_metadata(HARD_DISK_IDENT_METADATA_TAG, 0, identdata);
auto ident_str = params.find(OPTION_IDENT);
@@ -2130,7 +2130,7 @@ static void do_copy(parameters_t &params)
// process compression; we default to our current preferences using metadata to pick the type
chd_codec_type compression[4];
{
- dynamic_buffer metadata;
+ std::vector<UINT8> metadata;
if (input_chd.read_metadata(HARD_DISK_METADATA_TAG, 0, metadata) == CHDERR_NONE)
memcpy(compression, s_default_hd_compression, sizeof(compression));
else if (input_chd.read_metadata(AV_METADATA_TAG, 0, metadata) == CHDERR_NONE)
@@ -2179,7 +2179,7 @@ static void do_copy(parameters_t &params)
report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// clone all the metadata, upgrading where appropriate
- dynamic_buffer metadata;
+ std::vector<UINT8> metadata;
chd_metadata_tag metatag;
UINT8 metaflags;
UINT32 index = 0;
@@ -2278,7 +2278,7 @@ static void do_extract_raw(parameters_t &params)
report_error(1, "Unable to open file (%s)", output_file_str->second->c_str());
// copy all data
- dynamic_buffer buffer((TEMP_BUFFER_SIZE / input_chd.hunk_bytes()) * input_chd.hunk_bytes());
+ std::vector<UINT8> buffer((TEMP_BUFFER_SIZE / input_chd.hunk_bytes()) * input_chd.hunk_bytes());
for (UINT64 offset = input_start; offset < input_end; )
{
progress(false, "Extracting, %.1f%% complete... \r", 100.0 * double(offset - input_start) / double(input_end - input_start));
@@ -2404,7 +2404,7 @@ static void do_extract_cd(parameters_t &params)
// iterate over tracks and copy all data
UINT64 outputoffs = 0;
UINT32 discoffs = 0;
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
for (int tracknum = 0; tracknum < toc->numtrks; tracknum++)
{
std::string trackbin_name(basename);
@@ -2701,7 +2701,7 @@ static void do_add_metadata(parameters_t &params)
// process file input
auto file_str = params.find(OPTION_VALUE_FILE);
- dynamic_buffer file;
+ std::vector<UINT8> file;
if (file_str != params.end())
{
osd_file::error filerr = util::core_file::load(file_str->second->c_str(), file);
@@ -2816,7 +2816,7 @@ static void do_dump_metadata(parameters_t &params)
index = atoi(index_str->second->c_str());
// write the metadata
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
chd_error err = input_chd.read_metadata(tag, index, buffer);
if (err != CHDERR_NONE)
report_error(1, "Error reading metadata: %s", chd_file::error_string(err));
diff --git a/src/tools/imgtool/filtbas.cpp b/src/tools/imgtool/filtbas.cpp
index 6a23256d98a..aad1a025492 100644
--- a/src/tools/imgtool/filtbas.cpp
+++ b/src/tools/imgtool/filtbas.cpp
@@ -69,11 +69,11 @@ struct basictokens
-------------------------------------------------*/
static imgtoolerr_t basic_readfile(const basictokens *tokens,
- imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *destf)
+ imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
- imgtool_stream *mem_stream;
+ imgtool::stream *mem_stream;
UINT8 line_header[4];
UINT16 line_number; //, address;
UINT8 b, shift;
@@ -83,7 +83,7 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
const char *token;
/* open a memory stream */
- mem_stream = stream_open_mem(nullptr, 0);
+ mem_stream = imgtool::stream::open_mem(nullptr, 0);
if (mem_stream == nullptr)
{
err = IMGTOOLERR_OUTOFMEMORY;
@@ -91,15 +91,15 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
}
/* read actual file */
- err = partition->read_file(filename, fork, mem_stream, nullptr);
+ err = partition.read_file(filename, fork, *mem_stream, nullptr);
if (err)
goto done;
/* skip first few bytes */
- stream_seek(mem_stream, tokens->skip_bytes, SEEK_SET);
+ mem_stream->seek(tokens->skip_bytes, SEEK_SET);
/* keep reading line headers */
- while(stream_read(mem_stream, line_header, sizeof(line_header)) == sizeof(line_header))
+ while(mem_stream->read(line_header, sizeof(line_header)) == sizeof(line_header))
{
/* pluck the address and line number out */
if (tokens->be)
@@ -116,10 +116,10 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
}
/* write the line number */
- stream_printf(destf, "%u ", (unsigned) line_number);
+ destf.printf("%u ", (unsigned) line_number);
shift = 0x00;
- while((stream_read(mem_stream, &b, 1) > 0) && (b != 0x00))
+ while((mem_stream->read(&b, 1) > 0) && (b != 0x00))
{
if (b == 0x22)
in_string = in_string ? FALSE : TRUE;
@@ -149,20 +149,20 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
}
if (shift == 0x00)
- stream_puts(destf, token ? token : "!");
+ destf.puts(token ? token : "!");
}
else
{
- stream_putc(destf, (char) b);
+ destf.putc((char) b);
}
}
- stream_puts(destf, EOLN);
+ destf.puts(EOLN);
}
done:
if (mem_stream != nullptr)
- stream_close(mem_stream);
+ delete mem_stream;
return err;
}
@@ -174,11 +174,11 @@ done:
-------------------------------------------------*/
static imgtoolerr_t basic_writefile(const basictokens *tokens,
- imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+ imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t err;
- imgtool_stream *mem_stream;
+ imgtool::stream *mem_stream;
char buf[1024];
int eof = FALSE;
UINT32 len;
@@ -193,7 +193,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
UINT16 address;
/* open a memory stream */
- mem_stream = stream_open_mem(nullptr, 0);
+ mem_stream = imgtool::stream::open_mem(nullptr, 0);
if (mem_stream == nullptr)
{
err = IMGTOOLERR_OUTOFMEMORY;
@@ -201,14 +201,14 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
}
/* skip first few bytes */
- stream_fill(mem_stream, 0x00, tokens->skip_bytes);
+ mem_stream->fill(0x00, tokens->skip_bytes);
/* loop until the file is complete */
while(!eof)
{
/* read a line */
pos = 0;
- while((len = stream_read(sourcef, &c, 1)) > 0)
+ while((len = sourcef.read(&c, 1)) > 0)
{
/* break if at end of line */
if ((c == '\r') || (c == '\n'))
@@ -239,7 +239,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
/* determine address */
if (tokens->baseaddress != 0)
{
- address = tokens->baseaddress + (UINT16)stream_size(mem_stream) + 4;
+ address = tokens->baseaddress + (UINT16)mem_stream->size() + 4;
}
else
{
@@ -260,7 +260,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
}
/* emit line header */
- stream_write(mem_stream, line_header, sizeof(line_header));
+ mem_stream->write(line_header, sizeof(line_header));
/* skip spaces */
while(isspace(buf[pos]))
@@ -304,26 +304,26 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
{
/* emit the token */
if (token_shift != 0)
- stream_write(mem_stream, &token_shift, 1);
- stream_write(mem_stream, &token_value, 1);
+ mem_stream->write(&token_shift, 1);
+ mem_stream->write(&token_value, 1);
}
else
{
/* no token; emit the byte */
- stream_write(mem_stream, &buf[pos++], 1);
+ mem_stream->write(&buf[pos++], 1);
}
}
/* emit line terminator */
- stream_fill(mem_stream, 0x00, 1);
+ mem_stream->fill(0x00, 1);
}
}
/* emit program terminator */
- stream_fill(mem_stream, 0x00, 2);
+ mem_stream->fill(0x00, 2);
/* reset stream */
- stream_seek(mem_stream, 0, SEEK_SET);
+ mem_stream->seek(0, SEEK_SET);
/* this is somewhat gross */
if (tokens->skip_bytes >= 3)
@@ -331,25 +331,25 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
if (tokens->be)
{
place_integer_be(file_header, 0, 1, 0xFF);
- place_integer_be(file_header, 1, 2, stream_size(mem_stream));
+ place_integer_be(file_header, 1, 2, mem_stream->size());
}
else
{
place_integer_le(file_header, 0, 1, 0xFF);
- place_integer_le(file_header, 1, 2, stream_size(mem_stream));
+ place_integer_le(file_header, 1, 2, mem_stream->size());
}
- stream_write(mem_stream, file_header, 3);
- stream_seek(mem_stream, 0, SEEK_SET);
+ mem_stream->write(file_header, 3);
+ mem_stream->seek(0, SEEK_SET);
}
/* write actual file */
- err = partition->write_file(filename, fork, mem_stream, opts, nullptr);
+ err = partition.write_file(filename, fork, *mem_stream, opts, nullptr);
if (err)
goto done;
done:
if (mem_stream != nullptr)
- stream_close(mem_stream);
+ delete mem_stream;
return err;
}
@@ -2958,14 +2958,14 @@ static const basictokens cocobas_tokens =
ARRAY_LENGTH(cocobas_tokenents)
};
-static imgtoolerr_t cocobas_readfile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *destf)
+static imgtoolerr_t cocobas_readfile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &destf)
{
return basic_readfile(&cocobas_tokens, partition, filename, fork, destf);
}
-static imgtoolerr_t cocobas_writefile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t cocobas_writefile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
return basic_writefile(&cocobas_tokens, partition, filename, fork, sourcef, opts);
}
@@ -3002,14 +3002,14 @@ static const basictokens dragonbas_tokens =
ARRAY_LENGTH(dragonbas_tokenents)
};
-static imgtoolerr_t dragonbas_readfile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *destf)
+static imgtoolerr_t dragonbas_readfile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &destf)
{
return basic_readfile(&dragonbas_tokens, partition, filename, fork, destf);
}
-static imgtoolerr_t dragonbas_writefile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t dragonbas_writefile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
return basic_writefile(&dragonbas_tokens, partition, filename, fork, sourcef, opts);
}
@@ -3047,14 +3047,14 @@ static const basictokens vzbas_tokens =
ARRAY_LENGTH(vzbas_tokenents)
};
-static imgtoolerr_t vzbas_readfile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *destf)
+static imgtoolerr_t vzbas_readfile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &destf)
{
return basic_readfile(&vzbas_tokens, partition, filename, fork, destf);
}
-static imgtoolerr_t vzbas_writefile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t vzbas_writefile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
return basic_writefile(&vzbas_tokens, partition, filename, fork, sourcef, opts);
}
@@ -3091,14 +3091,14 @@ static const basictokens bml3bas_tokens =
ARRAY_LENGTH(bml3bas_tokenents)
};
-static imgtoolerr_t bml3bas_readfile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *destf)
+static imgtoolerr_t bml3bas_readfile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &destf)
{
return basic_readfile(&bml3bas_tokens, partition, filename, fork, destf);
}
-static imgtoolerr_t bml3bas_writefile(imgtool::partition *partition, const char *filename,
- const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t bml3bas_writefile(imgtool::partition &partition, const char *filename,
+ const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
return basic_writefile(&bml3bas_tokens, partition, filename, fork, sourcef, opts);
}
diff --git a/src/tools/imgtool/filteoln.cpp b/src/tools/imgtool/filteoln.cpp
index 1b4026c3af0..55d38970452 100644
--- a/src/tools/imgtool/filteoln.cpp
+++ b/src/tools/imgtool/filteoln.cpp
@@ -16,13 +16,13 @@
-static imgtoolerr_t convert_stream_eolns(imgtool_stream *source, imgtool_stream *dest, const char *eoln)
+static imgtoolerr_t convert_stream_eolns(imgtool::stream &source, imgtool::stream &dest, const char *eoln)
{
size_t len, i, pos;
char buffer[2000];
int hit_cr = FALSE;
- while((len = stream_read(source, buffer, sizeof(buffer))) > 0)
+ while((len = source.read(buffer, sizeof(buffer))) > 0)
{
pos = 0;
@@ -35,8 +35,8 @@ static imgtoolerr_t convert_stream_eolns(imgtool_stream *source, imgtool_stream
if (!hit_cr || (buffer[i] != '\n'))
{
if (i > pos)
- stream_write(dest, buffer + pos, i - pos);
- stream_write(dest, eoln, strlen(eoln));
+ dest.write(buffer + pos, i - pos);
+ dest.write(eoln, strlen(eoln));
}
pos = i + 1;
break;
@@ -45,7 +45,7 @@ static imgtoolerr_t convert_stream_eolns(imgtool_stream *source, imgtool_stream
}
if (i > pos)
- stream_write(dest, buffer + pos, i - pos);
+ dest.write(buffer + pos, i - pos);
}
return IMGTOOLERR_SUCCESS;
@@ -53,63 +53,63 @@ static imgtoolerr_t convert_stream_eolns(imgtool_stream *source, imgtool_stream
-static imgtoolerr_t ascii_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t ascii_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
- imgtool_stream *mem_stream;
+ imgtool::stream *mem_stream;
- mem_stream = stream_open_mem(nullptr, 0);
+ mem_stream = imgtool::stream::open_mem(nullptr, 0);
if (!mem_stream)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
}
- err = partition->read_file(filename, fork, mem_stream, nullptr);
+ err = partition.read_file(filename, fork, *mem_stream, nullptr);
if (err)
goto done;
- stream_seek(mem_stream, SEEK_SET, 0);
- err = convert_stream_eolns(mem_stream, destf, EOLN);
+ mem_stream->seek(SEEK_SET, 0);
+ err = convert_stream_eolns(*mem_stream, destf, EOLN);
if (err)
goto done;
done:
if (mem_stream)
- stream_close(mem_stream);
+ delete mem_stream;
return err;
}
-static imgtoolerr_t ascii_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t ascii_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t err;
- imgtool_stream *mem_stream = nullptr;
+ imgtool::stream *mem_stream = nullptr;
const char *eoln;
/* create a stream */
- mem_stream = stream_open_mem(nullptr, 0);
+ mem_stream = imgtool::stream::open_mem(nullptr, 0);
if (!mem_stream)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
}
- eoln = partition->get_info_string(IMGTOOLINFO_STR_EOLN);
+ eoln = partition.get_info_string(IMGTOOLINFO_STR_EOLN);
- err = convert_stream_eolns(sourcef, mem_stream, eoln);
+ err = convert_stream_eolns(sourcef, *mem_stream, eoln);
if (err)
goto done;
- stream_seek(mem_stream, SEEK_SET, 0);
+ mem_stream->seek(SEEK_SET, 0);
- err = partition->write_file(filename, fork, mem_stream, opts, nullptr);
+ err = partition.write_file(filename, fork, *mem_stream, opts, nullptr);
if (err)
goto done;
done:
if (mem_stream)
- stream_close(mem_stream);
+ delete mem_stream;
return err;
}
diff --git a/src/tools/imgtool/iflopimg.cpp b/src/tools/imgtool/iflopimg.cpp
index fc0ca620a6e..d5bcd0af483 100644
--- a/src/tools/imgtool/iflopimg.cpp
+++ b/src/tools/imgtool/iflopimg.cpp
@@ -45,29 +45,29 @@ imgtoolerr_t imgtool_floppy_error(floperr_t err)
static void imgtool_floppy_closeproc(void *file)
{
- stream_close((imgtool_stream *) file);
+ delete reinterpret_cast<imgtool::stream *>(file);
}
static int imgtool_floppy_seekproc(void *file, INT64 offset, int whence)
{
- stream_seek((imgtool_stream *) file, offset, whence);
+ reinterpret_cast<imgtool::stream *>(file)->seek(offset, whence);
return 0;
}
static size_t imgtool_floppy_readproc(void *file, void *buffer, size_t length)
{
- return stream_read((imgtool_stream *) file, buffer, length);
+ return reinterpret_cast<imgtool::stream *>(file)->read(buffer, length);
}
static size_t imgtool_floppy_writeproc(void *file, const void *buffer, size_t length)
{
- stream_write((imgtool_stream *) file, buffer, length);
+ reinterpret_cast<imgtool::stream *>(file)->write(buffer, length);
return length;
}
static UINT64 imgtool_floppy_filesizeproc(void *file)
{
- return stream_size((imgtool_stream *) file);
+ return reinterpret_cast<imgtool::stream *>(file)->size();
}
static const struct io_procs imgtool_ioprocs =
@@ -102,73 +102,86 @@ struct imgtool_floppy_image
-static imgtoolerr_t imgtool_floppy_open_internal(imgtool::image *image, imgtool_stream *f, int noclose)
+static imgtoolerr_t imgtool_floppy_open_internal(imgtool::image &image, imgtool::stream::ptr &&stream, int noclose)
{
floperr_t ferr;
- imgtoolerr_t err;
+ imgtoolerr_t err = IMGTOOLERR_SUCCESS;
+ imgtool::stream *f = nullptr;
struct imgtool_floppy_image *fimg;
const imgtool_class *imgclass;
const struct FloppyFormat *format;
- imgtoolerr_t (*open)(imgtool::image *image, imgtool_stream *f);
+ imgtoolerr_t (*open)(imgtool::image &image, imgtool::stream *f);
- fimg = (struct imgtool_floppy_image *) image->extra_bytes();
- imgclass = &image->module().imgclass;
+ fimg = (struct imgtool_floppy_image *) image.extra_bytes();
+ imgclass = &image.module().imgclass;
format = (const struct FloppyFormat *) imgclass->derived_param;
- open = (imgtoolerr_t (*)(imgtool::image *, imgtool_stream *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_OPEN);
+ open = (imgtoolerr_t (*)(imgtool::image &, imgtool::stream *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_OPEN);
+
+ // extract the pointer
+ f = stream.release();
- /* open up the floppy */
+ // open up the floppy
ferr = floppy_open(f, noclose ? &imgtool_noclose_ioprocs : &imgtool_ioprocs,
"", format, FLOPPY_FLAGS_READWRITE, &fimg->floppy);
if (ferr)
{
err = imgtool_floppy_error(ferr);
- return err;
+ goto done;
}
+ f = nullptr; // the floppy object has the stream now
if (open)
{
err = open(image, nullptr);
if (err)
- return err;
+ goto done;
}
- return IMGTOOLERR_SUCCESS;
+done:
+ if (f)
+ delete f;
+ return err;
}
-static imgtoolerr_t imgtool_floppy_open(imgtool::image *image, imgtool_stream *f)
+static imgtoolerr_t imgtool_floppy_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- return imgtool_floppy_open_internal(image, f, FALSE);
+ return imgtool_floppy_open_internal(image, std::move(stream), FALSE);
}
-static imgtoolerr_t imgtool_floppy_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *opts)
+static imgtoolerr_t imgtool_floppy_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
floperr_t ferr;
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
+ imgtool::stream *f = nullptr;
struct imgtool_floppy_image *fimg;
const imgtool_class *imgclass;
const struct FloppyFormat *format;
- imgtoolerr_t (*create)(imgtool::image *, imgtool_stream *, util::option_resolution *);
- imgtoolerr_t (*open)(imgtool::image *image, imgtool_stream *f);
+ imgtoolerr_t (*create)(imgtool::image &, imgtool::stream *, util::option_resolution *);
+ imgtoolerr_t (*open)(imgtool::image &, imgtool::stream *f);
- fimg = (struct imgtool_floppy_image *) image->extra_bytes();
- imgclass = &image->module().imgclass;
+ fimg = (struct imgtool_floppy_image *) image.extra_bytes();
+ imgclass = &image.module().imgclass;
format = (const struct FloppyFormat *) imgclass->derived_param;
- create = (imgtoolerr_t (*)(imgtool::image *, imgtool_stream *, util::option_resolution *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_CREATE);
- open = (imgtoolerr_t (*)(imgtool::image *, imgtool_stream *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_OPEN);
+ create = (imgtoolerr_t (*)(imgtool::image &, imgtool::stream *, util::option_resolution *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_CREATE);
+ open = (imgtoolerr_t (*)(imgtool::image &, imgtool::stream *)) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_FLOPPY_OPEN);
+
+ // extract the pointer
+ f = stream.release();
- /* open up the floppy */
+ // open up the floppy
ferr = floppy_create(f, &imgtool_ioprocs, format, opts, &fimg->floppy);
if (ferr)
{
err = imgtool_floppy_error(ferr);
goto done;
}
+ f = nullptr; // the floppy object has the stream now
- /* do we have to do extra stuff when creating the image? */
+ // do we have to do extra stuff when creating the image?
if (create)
{
err = create(image, nullptr, opts);
@@ -176,7 +189,7 @@ static imgtoolerr_t imgtool_floppy_create(imgtool::image *image, imgtool_stream
goto done;
}
- /* do we have to do extra stuff when opening the image? */
+ // do we have to do extra stuff when opening the image?
if (open)
{
err = open(image, nullptr);
@@ -185,19 +198,21 @@ static imgtoolerr_t imgtool_floppy_create(imgtool::image *image, imgtool_stream
}
done:
+ if (f)
+ delete f;
return err;
}
-static void imgtool_floppy_close(imgtool::image *img)
+static void imgtool_floppy_close(imgtool::image &img)
{
floppy_close(imgtool_floppy(img));
}
-static imgtoolerr_t imgtool_floppy_read_sector(imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
+static imgtoolerr_t imgtool_floppy_read_sector(imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
{
floperr_t ferr;
UINT32 sector_size;
@@ -221,7 +236,7 @@ static imgtoolerr_t imgtool_floppy_read_sector(imgtool::image *image, UINT32 tra
-static imgtoolerr_t imgtool_floppy_write_sector(imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam)
+static imgtoolerr_t imgtool_floppy_write_sector(imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam)
{
floperr_t ferr;
@@ -296,20 +311,20 @@ int imgtool_floppy_make_class(int index, imgtool_class *imgclass)
-floppy_image_legacy *imgtool_floppy(imgtool::image *img)
+floppy_image_legacy *imgtool_floppy(imgtool::image &img)
{
struct imgtool_floppy_image *fimg;
- fimg = (struct imgtool_floppy_image *) img->extra_bytes();
+ fimg = (struct imgtool_floppy_image *) img.extra_bytes();
return fimg->floppy;
}
-static imgtoolerr_t imgtool_floppy_transfer_sector_tofrom_stream(imgtool::image *img, int head, int track, int sector, int offset, size_t length, imgtool_stream *f, int direction)
+static imgtoolerr_t imgtool_floppy_transfer_sector_tofrom_stream(imgtool::image &img, int head, int track, int sector, int offset, size_t length, imgtool::stream &f, int direction)
{
floperr_t err;
floppy_image_legacy *floppy;
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
floppy = imgtool_floppy(img);
@@ -320,11 +335,11 @@ static imgtoolerr_t imgtool_floppy_transfer_sector_tofrom_stream(imgtool::image
err = floppy_read_sector(floppy, head, track, sector, offset, &buffer[0], length);
if (err)
goto done;
- stream_write(f, &buffer[0], length);
+ f.write(&buffer[0], length);
}
else
{
- stream_read(f, &buffer[0], length);
+ f.read(&buffer[0], length);
err = floppy_write_sector(floppy, head, track, sector, offset, &buffer[0], length, 0); /* TODO: pass ddam argument from imgtool */
if (err)
goto done;
@@ -338,23 +353,23 @@ done:
-imgtoolerr_t imgtool_floppy_read_sector_to_stream(imgtool::image *img, int head, int track, int sector, int offset, size_t length, imgtool_stream *f)
+imgtoolerr_t imgtool_floppy_read_sector_to_stream(imgtool::image &img, int head, int track, int sector, int offset, size_t length, imgtool::stream &f)
{
return imgtool_floppy_transfer_sector_tofrom_stream(img, head, track, sector, offset, length, f, 1);
}
-imgtoolerr_t imgtool_floppy_write_sector_from_stream(imgtool::image *img, int head, int track, int sector, int offset, size_t length, imgtool_stream *f)
+imgtoolerr_t imgtool_floppy_write_sector_from_stream(imgtool::image &img, int head, int track, int sector, int offset, size_t length, imgtool::stream &f)
{
return imgtool_floppy_transfer_sector_tofrom_stream(img, head, track, sector, offset, length, f, 0);
}
-void *imgtool_floppy_extrabytes(imgtool::image *img)
+void *imgtool_floppy_extrabytes(imgtool::image &img)
{
struct imgtool_floppy_image *fimg;
- fimg = (struct imgtool_floppy_image *) img->extra_bytes();
+ fimg = (struct imgtool_floppy_image *) img.extra_bytes();
return fimg + 1;
}
diff --git a/src/tools/imgtool/iflopimg.h b/src/tools/imgtool/iflopimg.h
index ba916dccf6e..078a1247ae3 100644
--- a/src/tools/imgtool/iflopimg.h
+++ b/src/tools/imgtool/iflopimg.h
@@ -29,13 +29,13 @@ enum
int imgtool_floppy_make_class(int index, imgtool_class *imgclass);
-floppy_image_legacy *imgtool_floppy(imgtool::image *img);
+floppy_image_legacy *imgtool_floppy(imgtool::image &img);
imgtoolerr_t imgtool_floppy_error(floperr_t err);
-imgtoolerr_t imgtool_floppy_read_sector_to_stream(imgtool::image *img, int head, int track, int sector, int offset, size_t length, imgtool_stream *f);
-imgtoolerr_t imgtool_floppy_write_sector_from_stream(imgtool::image *img, int head, int track, int sector, int offset, size_t length, imgtool_stream *f);
+imgtoolerr_t imgtool_floppy_read_sector_to_stream(imgtool::image &img, int head, int track, int sector, int offset, size_t length, imgtool::stream &f);
+imgtoolerr_t imgtool_floppy_write_sector_from_stream(imgtool::image &img, int head, int track, int sector, int offset, size_t length, imgtool::stream &f);
-void *imgtool_floppy_extrabytes(imgtool::image *img);
+void *imgtool_floppy_extrabytes(imgtool::image &img);
#endif /* IFLOPIMG_H */
diff --git a/src/tools/imgtool/imghd.cpp b/src/tools/imgtool/imghd.cpp
index 685774f7107..af55a235e61 100644
--- a/src/tools/imgtool/imghd.cpp
+++ b/src/tools/imgtool/imghd.cpp
@@ -46,7 +46,7 @@ static imgtoolerr_t map_chd_error(chd_error chderr)
Create a MAME HD image
*/
-imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylinders, UINT32 heads, UINT32 sectors, UINT32 seclen)
+imgtoolerr_t imghd_create(imgtool::stream &stream, UINT32 hunksize, UINT32 cylinders, UINT32 heads, UINT32 sectors, UINT32 seclen)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
chd_file chd;
@@ -63,7 +63,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind
hunksize = 1024; /* default value */
/* bail if we are read only */
- if (stream_isreadonly(stream))
+ if (stream.is_read_only())
{
err = IMGTOOLERR_READONLY;
return err;
@@ -73,7 +73,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind
const UINT64 logicalbytes = (UINT64)cylinders * heads * sectors * seclen;
/* create the new hard drive */
- rc = chd.create(*stream_core_file(stream), logicalbytes, hunksize, seclen, compression);
+ rc = chd.create(*stream.core_file(), logicalbytes, hunksize, seclen, compression);
if (rc != CHDERR_NONE)
{
err = map_chd_error(rc);
@@ -81,7 +81,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind
}
/* open the new hard drive */
- rc = chd.open(*stream_core_file(stream));
+ rc = chd.open(*stream.core_file());
if (rc != CHDERR_NONE)
{
@@ -99,7 +99,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind
}
/* alloc and zero buffer */
- dynamic_buffer cache;
+ std::vector<UINT8> cache;
cache.resize(hunksize);
memset(&cache[0], 0, hunksize);
@@ -125,7 +125,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind
Open stream as a MAME HD image
*/
-imgtoolerr_t imghd_open(imgtool_stream *stream, struct mess_hard_disk_file *hard_disk)
+imgtoolerr_t imghd_open(imgtool::stream &stream, struct mess_hard_disk_file *hard_disk)
{
chd_error chderr;
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
@@ -133,7 +133,7 @@ imgtoolerr_t imghd_open(imgtool_stream *stream, struct mess_hard_disk_file *hard
hard_disk->hard_disk = nullptr;
hard_disk->chd = nullptr;
- chderr = hard_disk->chd->open(*stream_core_file(stream), stream_isreadonly(stream));
+ chderr = hard_disk->chd->open(*stream.core_file(), stream.is_read_only());
if (chderr)
{
err = map_chd_error(chderr);
@@ -146,7 +146,7 @@ imgtoolerr_t imghd_open(imgtool_stream *stream, struct mess_hard_disk_file *hard
err = IMGTOOLERR_UNEXPECTED;
goto done;
}
- hard_disk->stream = stream;
+ hard_disk->stream = &stream;
done:
if (err)
@@ -169,7 +169,10 @@ void imghd_close(struct mess_hard_disk_file *disk)
disk->hard_disk = nullptr;
}
if (disk->stream)
- stream_close(disk->stream);
+ {
+ delete disk->stream;
+ disk->stream = nullptr;
+ }
}
@@ -215,7 +218,7 @@ const hard_disk_info *imghd_get_header(struct mess_hard_disk_file *disk)
}
-static imgtoolerr_t mess_hd_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions);
+static imgtoolerr_t mess_hd_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions);
enum
{
@@ -254,7 +257,7 @@ void hd_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinfo
-static imgtoolerr_t mess_hd_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions)
+static imgtoolerr_t mess_hd_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions)
{
UINT32 blocksize, cylinders, heads, sectors, seclen;
@@ -265,5 +268,5 @@ static imgtoolerr_t mess_hd_image_create(imgtool::image *image, imgtool_stream *
sectors = createoptions->lookup_int(mess_hd_createopts_sectors);
seclen = createoptions->lookup_int(mess_hd_createopts_seclen);
- return imghd_create(f, blocksize, cylinders, heads, sectors, seclen);
+ return imghd_create(*stream.get(), blocksize, cylinders, heads, sectors, seclen);
}
diff --git a/src/tools/imgtool/imghd.h b/src/tools/imgtool/imghd.h
index 3dba7d40d4f..984451c4883 100644
--- a/src/tools/imgtool/imghd.h
+++ b/src/tools/imgtool/imghd.h
@@ -15,17 +15,17 @@
struct mess_hard_disk_file
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
hard_disk_file *hard_disk;
chd_file *chd;
};
/* create a new hard disk */
-imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 blocksize, UINT32 cylinders, UINT32 heads, UINT32 sectors, UINT32 seclen);
+imgtoolerr_t imghd_create(imgtool::stream &stream, UINT32 blocksize, UINT32 cylinders, UINT32 heads, UINT32 sectors, UINT32 seclen);
/* opens a hard disk given an Imgtool stream */
-imgtoolerr_t imghd_open(imgtool_stream *stream, struct mess_hard_disk_file *hard_disk);
+imgtoolerr_t imghd_open(imgtool::stream &stream, struct mess_hard_disk_file *hard_disk);
/* close a hard disk */
void imghd_close(struct mess_hard_disk_file *disk);
diff --git a/src/tools/imgtool/imgtool.cpp b/src/tools/imgtool/imgtool.cpp
index 25b116c86e3..38a6a12f848 100644
--- a/src/tools/imgtool/imgtool.cpp
+++ b/src/tools/imgtool/imgtool.cpp
@@ -382,7 +382,7 @@ imgtoolerr_t imgtool::image::get_geometry(UINT32 *tracks, UINT32 *heads, UINT32
if (!module().get_geometry)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- return module().get_geometry(this, tracks, heads, sectors);
+ return module().get_geometry(*this, tracks, heads, sectors);
}
@@ -398,7 +398,7 @@ imgtoolerr_t imgtool::image::read_sector(UINT32 track, UINT32 head,
if (!module().read_sector)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- return module().read_sector(this, track, head, sector, buffer);
+ return module().read_sector(*this, track, head, sector, buffer);
}
@@ -414,7 +414,7 @@ imgtoolerr_t imgtool::image::write_sector(UINT32 track, UINT32 head,
if (!module().write_sector)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- return module().write_sector(this, track, head, sector, buffer, len);
+ return module().write_sector(*this, track, head, sector, buffer, len);
}
@@ -445,7 +445,7 @@ imgtoolerr_t imgtool::image::read_block(UINT64 block, void *buffer)
if (!module().read_block)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- return module().read_block(this, buffer, block);
+ return module().read_block(*this, buffer, block);
}
@@ -459,7 +459,7 @@ imgtoolerr_t imgtool::image::write_block(UINT64 block, const void *buffer)
if (!module().write_block)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- return module().write_block(this, buffer, block);
+ return module().write_block(*this, buffer, block);
}
@@ -500,14 +500,14 @@ done:
// list_partitions - lists the partitions on an image
//-------------------------------------------------
-imgtoolerr_t imgtool::image::list_partitions(imgtool_partition_info *partitions, size_t len)
+imgtoolerr_t imgtool::image::list_partitions(std::vector<imgtool::partition_info> &partitions)
{
/* implemented? */
if (!module().list_partitions)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- memset(partitions, '\0', sizeof(*partitions) * len);
- return module().list_partitions(this, partitions, len);
+ partitions.clear();
+ return module().list_partitions(*this, partitions);
}
@@ -549,7 +549,7 @@ UINT64 imgtool::image::rand()
imgtool::partition::partition(imgtool::image &image, imgtool_class &imgclass, int partition_index, UINT64 base_block, UINT64 block_count)
: m_image(image)
- , m_partition_index(partition_index)
+ //, m_partition_index(partition_index)
, m_base_block(base_block)
, m_block_count(block_count)
, m_imgclass(imgclass)
@@ -569,23 +569,23 @@ imgtool::partition::partition(imgtool::image &image, imgtool_class &imgclass, in
m_supports_creation_time = imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_SUPPORTS_CREATION_TIME) ? 1 : 0;
m_supports_lastmodified_time = imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_SUPPORTS_LASTMODIFIED_TIME) ? 1 : 0;
m_supports_bootblock = imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_SUPPORTS_BOOTBLOCK) ? 1 : 0;
- m_begin_enum = (imgtoolerr_t(*)(imgtool::directory *, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_BEGIN_ENUM);
- m_next_enum = (imgtoolerr_t(*)(imgtool::directory *, imgtool_dirent *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_NEXT_ENUM);
- m_close_enum = (void(*)(imgtool::directory *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CLOSE_ENUM);
- m_free_space = (imgtoolerr_t(*)(imgtool::partition *, UINT64 *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_FREE_SPACE);
- m_read_file = (imgtoolerr_t(*)(imgtool::partition *, const char *, const char *, imgtool_stream *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_READ_FILE);
- m_write_file = (imgtoolerr_t(*)(imgtool::partition *, const char *, const char *, imgtool_stream *, util::option_resolution *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_WRITE_FILE);
- m_delete_file = (imgtoolerr_t(*)(imgtool::partition *, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_DELETE_FILE);
- m_list_forks = (imgtoolerr_t(*)(imgtool::partition *, const char *, imgtool_forkent *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_LIST_FORKS);
- m_create_dir = (imgtoolerr_t(*)(imgtool::partition *, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CREATE_DIR);
- m_delete_dir = (imgtoolerr_t(*)(imgtool::partition *, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_DELETE_DIR);
- m_list_attrs = (imgtoolerr_t(*)(imgtool::partition *, const char *, UINT32 *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_LIST_ATTRS);
- m_get_attrs = (imgtoolerr_t(*)(imgtool::partition *, const char *, const UINT32 *, imgtool_attribute *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_ATTRS);
- m_set_attrs = (imgtoolerr_t(*)(imgtool::partition *, const char *, const UINT32 *, const imgtool_attribute *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_SET_ATTRS);
+ m_begin_enum = (imgtoolerr_t(*)(imgtool::directory &, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_BEGIN_ENUM);
+ m_next_enum = (imgtoolerr_t(*)(imgtool::directory &, imgtool_dirent &)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_NEXT_ENUM);
+ m_close_enum = (void(*)(imgtool::directory &)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CLOSE_ENUM);
+ m_free_space = (imgtoolerr_t(*)(imgtool::partition &, UINT64 *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_FREE_SPACE);
+ m_read_file = (imgtoolerr_t(*)(imgtool::partition &, const char *, const char *, imgtool::stream &)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_READ_FILE);
+ m_write_file = (imgtoolerr_t(*)(imgtool::partition &, const char *, const char *, imgtool::stream &, util::option_resolution *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_WRITE_FILE);
+ m_delete_file = (imgtoolerr_t(*)(imgtool::partition &, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_DELETE_FILE);
+ m_list_forks = (imgtoolerr_t(*)(imgtool::partition &, const char *, imgtool_forkent *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_LIST_FORKS);
+ m_create_dir = (imgtoolerr_t(*)(imgtool::partition &, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CREATE_DIR);
+ m_delete_dir = (imgtoolerr_t(*)(imgtool::partition &, const char *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_DELETE_DIR);
+ m_list_attrs = (imgtoolerr_t(*)(imgtool::partition &, const char *, UINT32 *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_LIST_ATTRS);
+ m_get_attrs = (imgtoolerr_t(*)(imgtool::partition &, const char *, const UINT32 *, imgtool_attribute *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_ATTRS);
+ m_set_attrs = (imgtoolerr_t(*)(imgtool::partition &, const char *, const UINT32 *, const imgtool_attribute *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_SET_ATTRS);
m_attr_name = (imgtoolerr_t(*)(UINT32, const imgtool_attribute *, char *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_ATTR_NAME);
- m_get_iconinfo = (imgtoolerr_t(*)(imgtool::partition *, const char *, imgtool_iconinfo *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_ICON_INFO);
- m_suggest_transfer = (imgtoolerr_t(*)(imgtool::partition *, const char *, imgtool_transfer_suggestion *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_SUGGEST_TRANSFER);
- m_get_chain = (imgtoolerr_t(*)(imgtool::partition *, const char *, imgtool_chainent *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_CHAIN);
+ m_get_iconinfo = (imgtoolerr_t(*)(imgtool::partition &, const char *, imgtool_iconinfo *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_ICON_INFO);
+ m_suggest_transfer = (imgtoolerr_t(*)(imgtool::partition &, const char *, imgtool_transfer_suggestion *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_SUGGEST_TRANSFER);
+ m_get_chain = (imgtoolerr_t(*)(imgtool::partition &, const char *, imgtool_chainent *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_CHAIN);
m_writefile_optguide = (const util::option_guide *) imgtool_get_info_ptr(&imgclass, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE);
const char *writefile_optspec = (const char *)imgtool_get_info_ptr(&imgclass, IMGTOOLINFO_STR_WRITEFILE_OPTSPEC);
@@ -623,31 +623,26 @@ imgtoolerr_t imgtool::partition::open(imgtool::image &image, int partition_index
imgtoolerr_t err = (imgtoolerr_t)IMGTOOLERR_SUCCESS;
imgtool::partition::ptr p;
imgtool_class imgclass;
- imgtool_partition_info partition_info[32];
+ std::vector<imgtool::partition_info> partitions;
UINT64 base_block, block_count;
- imgtoolerr_t (*open_partition)(imgtool::partition *partition, UINT64 first_block, UINT64 block_count);
+ imgtoolerr_t (*open_partition)(imgtool::partition &partition, UINT64 first_block, UINT64 block_count);
if (image.module().list_partitions)
{
- // this image supports partitions
- if ((partition_index < 0) || (partition_index >= ARRAY_LENGTH(partition_info)))
- return IMGTOOLERR_INVALIDPARTITION;
-
- // retrieve the info on the partitions
- memset(partition_info, '\0', sizeof(partition_info));
- err = image.module().list_partitions(&image, partition_info, ARRAY_LENGTH(partition_info));
+ // this image supports partitions - retrieve the info on the partitions
+ err = image.module().list_partitions(image, partitions);
if (err)
return err;
- // is this a valid partition
- if (!partition_info[partition_index].get_info)
+ // is this an invalid index?
+ if ((partition_index < 0) || (partition_index >= partitions.size()) || !partitions[partition_index].get_info())
return IMGTOOLERR_INVALIDPARTITION;
// use this partition
memset(&imgclass, 0, sizeof(imgclass));
- imgclass.get_info = partition_info[partition_index].get_info;
- base_block = partition_info[partition_index].base_block;
- block_count = partition_info[partition_index].block_count;
+ imgclass.get_info = partitions[partition_index].get_info();
+ base_block = partitions[partition_index].base_block();
+ block_count = partitions[partition_index].block_count();
}
else
{
@@ -671,11 +666,11 @@ imgtoolerr_t imgtool::partition::open(imgtool::image &image, int partition_index
// call the partition open function, if present
- open_partition = (imgtoolerr_t (*)(imgtool::partition *, UINT64, UINT64)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_OPEN_PARTITION);
+ open_partition = (imgtoolerr_t (*)(imgtool::partition &, UINT64, UINT64)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_OPEN_PARTITION);
if (open_partition)
{
/* we have an open partition function */
- err = (*open_partition)(p.get(), base_block, block_count);
+ err = (*open_partition)(*p, base_block, block_count);
if (err)
goto done;
}
@@ -896,7 +891,7 @@ imgtoolerr_t imgtool::image::internal_open(const imgtool_module *module, const c
int read_or_write, util::option_resolution *createopts, imgtool::image::ptr &outimg)
{
imgtoolerr_t err;
- imgtool_stream *f = nullptr;
+ imgtool::stream::ptr stream;
imgtool::image::ptr image;
object_pool *pool = nullptr;
void *extra_bytes = nullptr;
@@ -919,8 +914,8 @@ imgtoolerr_t imgtool::image::internal_open(const imgtool_module *module, const c
}
// open the stream
- f = stream_open(fname, read_or_write);
- if (!f)
+ stream = imgtool::stream::ptr(imgtool::stream::open(fname, read_or_write));
+ if (!stream)
{
err = (imgtoolerr_t)(IMGTOOLERR_FILENOTFOUND | IMGTOOLERR_SRC_IMAGEFILE);
goto done;
@@ -951,8 +946,8 @@ imgtoolerr_t imgtool::image::internal_open(const imgtool_module *module, const c
// actually call create or open
err = (read_or_write == OSD_FOPEN_RW_CREATE)
- ? module->create(image.get(), f, createopts)
- : module->open(image.get(), f);
+ ? module->create(*image, std::move(stream), createopts)
+ : module->open(*image, std::move(stream));
if (err)
{
err = markerrorsource(err);
@@ -965,9 +960,6 @@ imgtoolerr_t imgtool::image::internal_open(const imgtool_module *module, const c
outimg = std::move(image);
done:
- if (err && f)
- stream_close(f);
-
if (pool)
pool_free_lib(pool);
return err;
@@ -1021,7 +1013,7 @@ imgtool::image::image(const imgtool_module &module, object_pool *pool, void *ext
imgtool::image::~image()
{
if (m_okay_to_close && module().close)
- module().close(this);
+ module().close(*this);
pool_free_lib(m_pool);
}
@@ -1094,15 +1086,16 @@ imgtoolerr_t imgtool::image::create(const std::string &modulename, const char *f
// info - returns format specific information about an image
//-------------------------------------------------
-imgtoolerr_t imgtool::image::info(char *string, size_t len)
+std::string imgtool::image::info()
{
- if (len > 0)
+ std::string string;
+ if (module().info)
{
- string[0] = '\0';
- if (module().info)
- module().info(this, string, len);
+ std::stringstream stream;
+ module().info(*this, stream);
+ string = stream.str();
}
- return IMGTOOLERR_SUCCESS;
+ return string;
}
@@ -1333,7 +1326,7 @@ imgtoolerr_t imgtool::partition::list_file_attributes(const char *path, UINT32 *
if (err)
goto done;
- err = m_list_attrs(this, path, attrs, len);
+ err = m_list_attrs(*this, path, attrs, len);
if (err)
goto done;
@@ -1377,7 +1370,7 @@ imgtoolerr_t imgtool::partition::get_file_attributes(const char *path, const UIN
if (err)
goto done;
- err = m_get_attrs(this, path, attrs, values);
+ err = m_get_attrs(*this, path, attrs, values);
if (err)
goto done;
@@ -1411,7 +1404,7 @@ imgtoolerr_t imgtool::partition::put_file_attributes(const char *path, const UIN
if (err)
goto done;
- err = m_set_attrs(this, path, attrs, values);
+ err = m_set_attrs(*this, path, attrs, values);
if (err)
goto done;
@@ -1482,7 +1475,7 @@ imgtoolerr_t imgtool::partition::get_icon_info(const char *path, imgtool_iconinf
goto done;
memset(iconinfo, 0, sizeof(*iconinfo));
- err = m_get_iconinfo(this, path, iconinfo);
+ err = m_get_iconinfo(*this, path, iconinfo);
if (err)
goto done;
@@ -1502,12 +1495,12 @@ done:
//-------------------------------------------------
imgtoolerr_t imgtool::partition::suggest_file_filters(const char *path,
- imgtool_stream *stream, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+ imgtool::stream *stream, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t err;
int i, j;
char *alloc_path = nullptr;
- imgtoolerr_t (*check_stream)(imgtool_stream *stream, imgtool_suggestion_viability_t *viability);
+ imgtoolerr_t (*check_stream)(imgtool::stream &stream, imgtool_suggestion_viability_t *viability);
size_t position;
// clear out buffer
@@ -1525,7 +1518,7 @@ imgtoolerr_t imgtool::partition::suggest_file_filters(const char *path,
goto done;
// invoke the module's suggest call
- err = m_suggest_transfer(this, path, suggestions, suggestions_length);
+ err = m_suggest_transfer(*this, path, suggestions, suggestions_length);
if (err)
goto done;
@@ -1537,12 +1530,12 @@ imgtoolerr_t imgtool::partition::suggest_file_filters(const char *path,
{
if (stream && suggestions[i].filter)
{
- check_stream = (imgtoolerr_t (*)(imgtool_stream *, imgtool_suggestion_viability_t *)) filter_get_info_fct(suggestions[i].filter, FILTINFO_PTR_CHECKSTREAM);
+ check_stream = (imgtoolerr_t (*)(imgtool::stream &, imgtool_suggestion_viability_t *)) filter_get_info_fct(suggestions[i].filter, FILTINFO_PTR_CHECKSTREAM);
if (check_stream)
{
- position = stream_tell(stream);
- err = check_stream(stream, &suggestions[i].viability);
- stream_seek(stream, position, SEEK_SET);
+ position = stream->tell();
+ err = check_stream(*stream, &suggestions[i].viability);
+ stream->seek(position, SEEK_SET);
if (err)
goto done;
}
@@ -1598,7 +1591,7 @@ imgtoolerr_t imgtool::partition::get_chain(const char *path, imgtool_chainent *c
chain[i].block = ~0;
}
- return m_get_chain(this, path, chain, chain_size - 1);
+ return m_get_chain(*this, path, chain, chain_size - 1);
}
@@ -1684,7 +1677,7 @@ imgtoolerr_t imgtool::partition::get_free_space(UINT64 &sz)
if (!m_free_space)
return (imgtoolerr_t)(IMGTOOLERR_UNIMPLEMENTED | IMGTOOLERR_SRC_FUNCTIONALITY);
- err = m_free_space(this, &sz);
+ err = m_free_space(*this, &sz);
if (err)
return (imgtoolerr_t)(err | IMGTOOLERR_SRC_IMAGEFILE);
@@ -1697,7 +1690,7 @@ imgtoolerr_t imgtool::partition::get_free_space(UINT64 &sz)
// from a file on a partition with a stream
//-------------------------------------------------
-imgtoolerr_t imgtool::partition::read_file(const char *filename, const char *fork, imgtool_stream *destf, filter_getinfoproc filter)
+imgtoolerr_t imgtool::partition::read_file(const char *filename, const char *fork, imgtool::stream &destf, filter_getinfoproc filter)
{
imgtoolerr_t err;
char *alloc_path = nullptr;
@@ -1719,7 +1712,7 @@ imgtoolerr_t imgtool::partition::read_file(const char *filename, const char *for
goto done;
}
- err = u.read_file(this, filename, fork, destf);
+ err = u.read_file(*this, filename, fork, destf);
if (err)
{
err = markerrorsource(err);
@@ -1738,7 +1731,7 @@ imgtoolerr_t imgtool::partition::read_file(const char *filename, const char *for
goto done;
// invoke the actual module
- err = m_read_file(this, filename, fork, destf);
+ err = m_read_file(*this, filename, fork, destf);
if (err)
{
err = markerrorsource(err);
@@ -1758,7 +1751,7 @@ done:
// to a new file on an image with a stream
//-------------------------------------------------
-imgtoolerr_t imgtool::partition::write_file(const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts, filter_getinfoproc filter)
+imgtoolerr_t imgtool::partition::write_file(const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts, filter_getinfoproc filter)
{
imgtoolerr_t err;
char *buf = nullptr;
@@ -1785,7 +1778,7 @@ imgtoolerr_t imgtool::partition::write_file(const char *filename, const char *fo
goto done;
}
- err = u.write_file(this, filename, fork, sourcef, opts);
+ err = u.write_file(*this, filename, fork, sourcef, opts);
if (err)
{
err = markerrorsource(err);
@@ -1835,14 +1828,14 @@ imgtoolerr_t imgtool::partition::write_file(const char *filename, const char *fo
// if free_space is implemented; do a quick check to see if space is available
if (m_free_space)
{
- err = m_free_space(this, &free_space);
+ err = m_free_space(*this, &free_space);
if (err)
{
err = markerrorsource(err);
goto done;
}
- file_size = stream_size(sourcef);
+ file_size = sourcef.size();
if (file_size > free_space)
{
@@ -1852,7 +1845,7 @@ imgtoolerr_t imgtool::partition::write_file(const char *filename, const char *fo
}
// actually invoke the write file handler
- err = m_write_file(this, filename, fork, sourcef, opts);
+ err = m_write_file(*this, filename, fork, sourcef, opts);
if (err)
{
err = markerrorsource(err);
@@ -1878,7 +1871,7 @@ imgtoolerr_t imgtool::partition::get_file(const char *filename, const char *fork
const char *dest, filter_getinfoproc filter)
{
imgtoolerr_t err;
- imgtool_stream *f;
+ imgtool::stream *f;
char *new_fname = nullptr;
char *alloc_dest = nullptr;
const char *filter_extension = nullptr;
@@ -1907,7 +1900,7 @@ imgtoolerr_t imgtool::partition::get_file(const char *filename, const char *fork
}
}
- f = stream_open(dest, OSD_FOPEN_WRITE);
+ f = imgtool::stream::open(dest, OSD_FOPEN_WRITE);
if (!f)
{
err = (imgtoolerr_t)(IMGTOOLERR_FILENOTFOUND | IMGTOOLERR_SRC_NATIVEFILE);
@@ -1921,13 +1914,13 @@ imgtoolerr_t imgtool::partition::get_file(const char *filename, const char *fork
goto done;
}
- err = read_file(new_fname, fork, f, filter);
+ err = read_file(new_fname, fork, *f, filter);
if (err)
goto done;
done:
if (f != nullptr)
- stream_close(f);
+ delete f;
if (alloc_dest != nullptr)
free(alloc_dest);
if (new_fname != nullptr)
@@ -1945,7 +1938,7 @@ imgtoolerr_t imgtool::partition::put_file(const char *newfname, const char *fork
const char *source, util::option_resolution *opts, filter_getinfoproc filter)
{
imgtoolerr_t err;
- imgtool_stream *f = nullptr;
+ imgtool::stream *f = nullptr;
imgtool_charset charset;
char *alloc_newfname = nullptr;
std::string basename;
@@ -1970,16 +1963,16 @@ imgtoolerr_t imgtool::partition::put_file(const char *newfname, const char *fork
newfname = alloc_newfname;
}
- f = stream_open(source, OSD_FOPEN_READ);
+ f = imgtool::stream::open(source, OSD_FOPEN_READ);
if (f)
- err = write_file(newfname, fork, f, opts, filter);
+ err = write_file(newfname, fork, *f, opts, filter);
else
err = (imgtoolerr_t)(IMGTOOLERR_FILENOTFOUND | IMGTOOLERR_SRC_NATIVEFILE);
done:
/* clean up */
if (f != nullptr)
- stream_close(f);
+ delete f;
if (alloc_newfname != nullptr)
osd_free(alloc_newfname);
return err;
@@ -2018,7 +2011,7 @@ imgtoolerr_t imgtool::partition::delete_file(const char *fname)
if (err)
goto done;
- err = m_delete_file(this, fname);
+ err = m_delete_file(*this, fname);
if (err)
{
err = markerrorsource(err);
@@ -2065,7 +2058,7 @@ imgtoolerr_t imgtool::partition::list_file_forks(const char *path, imgtool_forke
if (err)
goto done;
- err = m_list_forks(this, path, ents, len);
+ err = m_list_forks(*this, path, ents, len);
if (err)
goto done;
@@ -2110,7 +2103,7 @@ imgtoolerr_t imgtool::partition::create_directory(const char *path)
if (err)
goto done;
- err = m_create_dir(this, path);
+ err = m_create_dir(*this, path);
if (err)
goto done;
@@ -2155,7 +2148,7 @@ imgtoolerr_t imgtool::partition::delete_directory(const char *path)
if (err)
goto done;
- err = m_delete_dir(this, path);
+ err = m_delete_dir(*this, path);
if (err)
goto done;
@@ -2464,7 +2457,7 @@ imgtoolerr_t imgtool::directory::open(imgtool::partition &partition, const char
if (partition.m_begin_enum)
{
- err = partition.m_begin_enum(enumeration.get(), path);
+ err = partition.m_begin_enum(*enumeration, path);
if (err)
{
err = markerrorsource(err);
@@ -2491,7 +2484,7 @@ done:
imgtool::directory::~directory()
{
if (m_okay_to_close && m_partition.m_close_enum)
- m_partition.m_close_enum(this);
+ m_partition.m_close_enum(*this);
}
@@ -2508,7 +2501,7 @@ imgtoolerr_t imgtool::directory::get_next(imgtool_dirent &ent)
// the attributes if they don't apply
memset(&ent, 0, sizeof(ent));
- err = m_partition.m_next_enum(this, &ent);
+ err = m_partition.m_next_enum(*this, ent);
if (err)
return markerrorsource(err);
diff --git a/src/tools/imgtool/imgtool.h b/src/tools/imgtool/imgtool.h
index 3d6e9a675eb..76838767784 100644
--- a/src/tools/imgtool/imgtool.h
+++ b/src/tools/imgtool/imgtool.h
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#include <functional>
#include "corestr.h"
#include "formats/flopimg.h"
@@ -105,7 +106,7 @@ namespace imgtool
static imgtoolerr_t create(const std::string &modulename, const char *fname, util::option_resolution *opts);
static UINT64 rand();
- imgtoolerr_t info(char *string, size_t len);
+ std::string info();
imgtoolerr_t get_geometry(UINT32 *tracks, UINT32 *heads, UINT32 *sectors);
imgtoolerr_t read_sector(UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
imgtoolerr_t write_sector(UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len);
@@ -113,7 +114,7 @@ namespace imgtool
imgtoolerr_t read_block(UINT64 block, void *buffer);
imgtoolerr_t write_block(UINT64 block, const void *buffer);
imgtoolerr_t clear_block(UINT64 block, UINT8 data);
- imgtoolerr_t list_partitions(imgtool_partition_info *partitions, size_t len);
+ imgtoolerr_t list_partitions(std::vector<imgtool::partition_info> &partitions);
void *malloc(size_t size);
const imgtool_module &module() { return m_module; }
void *extra_bytes() { return m_extra_bytes; }
@@ -147,14 +148,14 @@ namespace imgtool
~partition();
static imgtoolerr_t open(imgtool::image &image, int partition_index, ptr &partition);
- image &image() { return m_image; }
+ imgtool::image &image() { return m_image; }
// ----- partition operations -----
imgtoolerr_t get_directory_entry(const char *path, int index, imgtool_dirent &ent);
imgtoolerr_t get_file_size(const char *filename, UINT64 &filesize);
imgtoolerr_t get_free_space(UINT64 &sz);
- imgtoolerr_t read_file(const char *filename, const char *fork, imgtool_stream *destf, filter_getinfoproc filter);
- imgtoolerr_t write_file(const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *resolution, filter_getinfoproc filter);
+ imgtoolerr_t read_file(const char *filename, const char *fork, imgtool::stream &destf, filter_getinfoproc filter);
+ imgtoolerr_t write_file(const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *resolution, filter_getinfoproc filter);
imgtoolerr_t get_file(const char *filename, const char *fork, const char *dest, filter_getinfoproc filter);
imgtoolerr_t put_file(const char *newfname, const char *fork, const char *source, util::option_resolution *opts, filter_getinfoproc filter);
imgtoolerr_t delete_file(const char *fname);
@@ -168,7 +169,7 @@ namespace imgtool
imgtoolerr_t put_file_attribute(const char *path, UINT32 attr, const imgtool_attribute &value);
void get_attribute_name(UINT32 attribute, const imgtool_attribute *attr_value, char *buffer, size_t buffer_len);
imgtoolerr_t get_icon_info(const char *path, imgtool_iconinfo *iconinfo);
- imgtoolerr_t suggest_file_filters(const char *path, imgtool_stream *stream, imgtool_transfer_suggestion *suggestions, size_t suggestions_length);
+ imgtoolerr_t suggest_file_filters(const char *path, imgtool::stream *stream, imgtool_transfer_suggestion *suggestions, size_t suggestions_length);
imgtoolerr_t get_block_size(UINT32 &length);
imgtoolerr_t read_block(UINT64 block, void *buffer);
imgtoolerr_t write_block(UINT64 block, const void *buffer);
@@ -187,12 +188,11 @@ namespace imgtool
private:
imgtool::image &m_image;
- int m_partition_index;
+ //int m_partition_index;
UINT64 m_base_block;
UINT64 m_block_count;
imgtool_class m_imgclass;
- size_t m_partition_extra_bytes;
size_t m_directory_extra_bytes;
char m_path_separator;
@@ -203,23 +203,23 @@ namespace imgtool
unsigned int m_supports_lastmodified_time : 1;
unsigned int m_supports_bootblock : 1; /* this module supports loading/storing the boot block */
- imgtoolerr_t(*m_begin_enum) (imgtool::directory *enumeration, const char *path);
- imgtoolerr_t(*m_next_enum) (imgtool::directory *enumeration, imgtool_dirent *ent);
- void(*m_close_enum) (imgtool::directory *enumeration);
- imgtoolerr_t(*m_free_space) (imgtool::partition *partition, UINT64 *size);
- imgtoolerr_t(*m_read_file) (imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf);
- imgtoolerr_t(*m_write_file) (imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts);
- imgtoolerr_t(*m_delete_file) (imgtool::partition *partition, const char *filename);
- imgtoolerr_t(*m_list_forks) (imgtool::partition *partition, const char *path, imgtool_forkent *ents, size_t len);
- imgtoolerr_t(*m_create_dir) (imgtool::partition *partition, const char *path);
- imgtoolerr_t(*m_delete_dir) (imgtool::partition *partition, const char *path);
- imgtoolerr_t(*m_list_attrs) (imgtool::partition *partition, const char *path, UINT32 *attrs, size_t len);
- imgtoolerr_t(*m_get_attrs) (imgtool::partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values);
- imgtoolerr_t(*m_set_attrs) (imgtool::partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values);
- imgtoolerr_t(*m_attr_name) (UINT32 attribute, const imgtool_attribute *attr, char *buffer, size_t buffer_len);
- imgtoolerr_t(*m_get_iconinfo) (imgtool::partition *partition, const char *path, imgtool_iconinfo *iconinfo);
- imgtoolerr_t(*m_suggest_transfer)(imgtool::partition *partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length);
- imgtoolerr_t(*m_get_chain) (imgtool::partition *partition, const char *path, imgtool_chainent *chain, size_t chain_size);
+ std::function<imgtoolerr_t(imgtool::directory &enumeration, const char *path)> m_begin_enum;
+ std::function<imgtoolerr_t(imgtool::directory &enumeration, imgtool_dirent &ent)> m_next_enum;
+ std::function<void(imgtool::directory &enumeration)> m_close_enum;
+ std::function<imgtoolerr_t(imgtool::partition &partition, UINT64 *size)> m_free_space;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)> m_read_file;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)> m_write_file;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *filename)> m_delete_file;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, imgtool_forkent *ents, size_t len)> m_list_forks;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path)> m_create_dir;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path)> m_delete_dir;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, UINT32 *attrs, size_t len)> m_list_attrs;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)> m_get_attrs;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)> m_set_attrs;
+ std::function<imgtoolerr_t(UINT32 attribute, const imgtool_attribute *attr, char *buffer, size_t buffer_len)> m_attr_name;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, imgtool_iconinfo *iconinfo)> m_get_iconinfo;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)> m_suggest_transfer;
+ std::function<imgtoolerr_t(imgtool::partition &partition, const char *path, imgtool_chainent *chain, size_t chain_size)> m_get_chain;
const util::option_guide *m_writefile_optguide;
std::string m_writefile_optspec;
diff --git a/src/tools/imgtool/library.cpp b/src/tools/imgtool/library.cpp
index 30e84fefb08..0a606317241 100644
--- a/src/tools/imgtool/library.cpp
+++ b/src/tools/imgtool/library.cpp
@@ -69,16 +69,16 @@ void library::add_class(const imgtool_class *imgclass)
module->tracks_are_called_cylinders = imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_TRACKS_ARE_CALLED_CYLINDERS) ? 1 : 0;
module->writing_untested = imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_WRITING_UNTESTED) ? 1 : 0;
module->creation_untested = imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_CREATION_UNTESTED) ? 1 : 0;
- module->open = (imgtoolerr_t (*)(imgtool::image *, imgtool_stream *)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_OPEN);
- module->create = (imgtoolerr_t (*)(imgtool::image *, imgtool_stream *, util::option_resolution *)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_CREATE);
- module->close = (void (*)(imgtool::image *)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_CLOSE);
- module->info = (void (*)(imgtool::image *, char *, size_t)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_INFO);
- module->read_sector = (imgtoolerr_t (*)(imgtool::image *, UINT32, UINT32, UINT32, std::vector<UINT8> &)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_READ_SECTOR);
- module->write_sector = (imgtoolerr_t (*)(imgtool::image *, UINT32, UINT32, UINT32, const void *, size_t)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_WRITE_SECTOR);
- module->get_geometry = (imgtoolerr_t (*)(imgtool::image *, UINT32 *, UINT32 *, UINT32 *))imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_GET_GEOMETRY);
- module->read_block = (imgtoolerr_t (*)(imgtool::image *, void *, UINT64)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_READ_BLOCK);
- module->write_block = (imgtoolerr_t (*)(imgtool::image *, const void *, UINT64)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_WRITE_BLOCK);
- module->list_partitions = (imgtoolerr_t (*)(imgtool::image *, imgtool_partition_info *, size_t)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_LIST_PARTITIONS);
+ module->open = (imgtoolerr_t (*)(imgtool::image &, imgtool::stream::ptr &&)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_OPEN);
+ module->create = (imgtoolerr_t (*)(imgtool::image &, imgtool::stream::ptr &&, util::option_resolution *)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_CREATE);
+ module->close = (void (*)(imgtool::image &)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_CLOSE);
+ module->info = (void (*)(imgtool::image &, std::ostream &)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_INFO);
+ module->read_sector = (imgtoolerr_t (*)(imgtool::image &, UINT32, UINT32, UINT32, std::vector<UINT8> &)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_READ_SECTOR);
+ module->write_sector = (imgtoolerr_t (*)(imgtool::image &, UINT32, UINT32, UINT32, const void *, size_t)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_WRITE_SECTOR);
+ module->get_geometry = (imgtoolerr_t (*)(imgtool::image &, UINT32 *, UINT32 *, UINT32 *))imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_GET_GEOMETRY);
+ module->read_block = (imgtoolerr_t (*)(imgtool::image &, void *, UINT64)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_READ_BLOCK);
+ module->write_block = (imgtoolerr_t (*)(imgtool::image &, const void *, UINT64)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_WRITE_BLOCK);
+ module->list_partitions = (imgtoolerr_t (*)(imgtool::image &, std::vector<imgtool::partition_info> &)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_LIST_PARTITIONS);
module->block_size = imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_BLOCK_SIZE);
module->createimage_optguide = (const util::option_guide *) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_CREATEIMAGE_OPTGUIDE);
module->createimage_optspec = imgtool_library_strdup_allow_null((const char*)imgtool_get_info_ptr(imgclass, IMGTOOLINFO_STR_CREATEIMAGE_OPTSPEC));
diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h
index dc55cb41e67..235603eb85b 100644
--- a/src/tools/imgtool/library.h
+++ b/src/tools/imgtool/library.h
@@ -48,9 +48,9 @@ union filterinfo
void * f; /* generic function pointers */
const char *s; /* generic strings */
- imgtoolerr_t (*read_file)(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf);
- imgtoolerr_t (*write_file)(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts);
- imgtoolerr_t (*check_stream)(imgtool_stream *stream, imgtool_suggestion_viability_t *viability);
+ imgtoolerr_t (*read_file)(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf);
+ imgtoolerr_t (*write_file)(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts);
+ imgtoolerr_t (*check_stream)(imgtool::stream &stream, imgtool_suggestion_viability_t *viability);
};
typedef void (*filter_getinfoproc)(UINT32 state, union filterinfo *info);
@@ -238,15 +238,30 @@ struct imgtool_class
-struct imgtool_partition_info
+namespace imgtool
{
- imgtool_get_info get_info;
- UINT64 base_block;
- UINT64 block_count;
+ class partition_info
+ {
+ public:
+ partition_info(imgtool_get_info get_info, UINT64 base_block, UINT64 block_count)
+ : m_get_info(get_info)
+ , m_base_block(base_block)
+ , m_block_count(block_count)
+ {
+ }
+
+ imgtool_get_info get_info() const { return m_get_info; }
+ UINT64 base_block() const { return m_base_block; }
+ UINT64 block_count() const { return m_block_count; }
+
+ private:
+ imgtool_get_info m_get_info;
+ UINT64 m_base_block;
+ UINT64 m_block_count;
+ };
};
-
union imgtoolinfo
{
INT64 i; /* generic integers */
@@ -254,36 +269,36 @@ union imgtoolinfo
void * f; /* generic function pointers */
char * s; /* generic strings */
- imgtoolerr_t (*open) (imgtool::image *image, imgtool_stream *stream);
- void (*close) (imgtool::image *image);
- imgtoolerr_t (*create) (imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts);
- imgtoolerr_t (*create_partition) (imgtool::image *image, UINT64 first_block, UINT64 block_count);
- void (*info) (imgtool::image *image, char *string, size_t len);
- imgtoolerr_t (*begin_enum) (imgtool::directory *enumeration, const char *path);
- imgtoolerr_t (*next_enum) (imgtool::directory *enumeration, imgtool_dirent *ent);
- void (*close_enum) (imgtool::directory *enumeration);
- imgtoolerr_t (*open_partition) (imgtool::partition *partition, UINT64 first_block, UINT64 block_count);
- imgtoolerr_t (*free_space) (imgtool::partition *partition, UINT64 *size);
- imgtoolerr_t (*read_file) (imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf);
- imgtoolerr_t (*write_file) (imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts);
- imgtoolerr_t (*delete_file) (imgtool::partition *partition, const char *filename);
- imgtoolerr_t (*list_forks) (imgtool::partition *partition, const char *path, imgtool_forkent *ents, size_t len);
- imgtoolerr_t (*create_dir) (imgtool::partition *partition, const char *path);
- imgtoolerr_t (*delete_dir) (imgtool::partition *partition, const char *path);
- imgtoolerr_t (*list_attrs) (imgtool::partition *partition, const char *path, UINT32 *attrs, size_t len);
- imgtoolerr_t (*get_attrs) (imgtool::partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values);
- imgtoolerr_t (*set_attrs) (imgtool::partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values);
+ imgtoolerr_t (*open) (imgtool::image &image, imgtool::stream::ptr &&stream);
+ void (*close) (imgtool::image &image);
+ imgtoolerr_t (*create) (imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts);
+ imgtoolerr_t (*create_partition) (imgtool::image &image, UINT64 first_block, UINT64 block_count);
+ void (*info) (imgtool::image &image, std::ostream &stream);
+ imgtoolerr_t (*begin_enum) (imgtool::directory &enumeration, const char *path);
+ imgtoolerr_t (*next_enum) (imgtool::directory &enumeration, imgtool_dirent &ent);
+ void (*close_enum) (imgtool::directory &enumeration);
+ imgtoolerr_t (*open_partition) (imgtool::partition &partition, UINT64 first_block, UINT64 block_count);
+ imgtoolerr_t (*free_space) (imgtool::partition &partition, UINT64 *size);
+ imgtoolerr_t (*read_file) (imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf);
+ imgtoolerr_t (*write_file) (imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts);
+ imgtoolerr_t (*delete_file) (imgtool::partition &partition, const char *filename);
+ imgtoolerr_t (*list_forks) (imgtool::partition &partition, const char *path, imgtool_forkent *ents, size_t len);
+ imgtoolerr_t (*create_dir) (imgtool::partition &partition, const char *path);
+ imgtoolerr_t (*delete_dir) (imgtool::partition &partition, const char *path);
+ imgtoolerr_t (*list_attrs) (imgtool::partition &partition, const char *path, UINT32 *attrs, size_t len);
+ imgtoolerr_t (*get_attrs) (imgtool::partition &partition, const char *path, const UINT32 *attrs, imgtool_attribute *values);
+ imgtoolerr_t (*set_attrs) (imgtool::partition &partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values);
imgtoolerr_t (*attr_name) (UINT32 attribute, const imgtool_attribute *attr, char *buffer, size_t buffer_len);
- imgtoolerr_t (*get_iconinfo) (imgtool::partition *partition, const char *path, imgtool_iconinfo *iconinfo);
- imgtoolerr_t (*suggest_transfer) (imgtool::partition *partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length);
- imgtoolerr_t (*get_chain) (imgtool::partition *partition, const char *path, imgtool_chainent *chain, size_t chain_size);
- imgtoolerr_t (*get_geometry) (imgtool::image *image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors);
- imgtoolerr_t (*read_sector) (imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
- imgtoolerr_t (*write_sector) (imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam);
- imgtoolerr_t (*read_block) (imgtool::image *image, void *buffer, UINT64 block);
- imgtoolerr_t (*write_block) (imgtool::image *image, const void *buffer, UINT64 block);
- imgtoolerr_t (*list_partitions) (imgtool::image *image, imgtool_partition_info *partitions, size_t len);
- int (*approve_filename_char)(unicode_char ch);
+ imgtoolerr_t (*get_iconinfo) (imgtool::partition &partition, const char *path, imgtool_iconinfo *iconinfo);
+ imgtoolerr_t (*suggest_transfer) (imgtool::partition &partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length);
+ imgtoolerr_t (*get_chain) (imgtool::partition &partition, const char *path, imgtool_chainent *chain, size_t chain_size);
+ imgtoolerr_t (*get_geometry) (imgtool::image &image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors);
+ imgtoolerr_t (*read_sector) (imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
+ imgtoolerr_t (*write_sector) (imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam);
+ imgtoolerr_t (*read_block) (imgtool::image &image, void *buffer, UINT64 block);
+ imgtoolerr_t (*write_block) (imgtool::image &image, const void *buffer, UINT64 block);
+ imgtoolerr_t (*list_partitions) (imgtool::image &image, std::vector<imgtool::partition_info> &partitions);
+ int (*approve_filename_char)(char32_t ch);
int (*make_class)(int index, imgtool_class *imgclass);
const util::option_guide *createimage_optguide;
@@ -347,16 +362,16 @@ struct imgtool_module
unsigned int writing_untested : 1; /* used when we support writing, but not in main build */
unsigned int creation_untested : 1; /* used when we support creation, but not in main build */
- imgtoolerr_t (*open) (imgtool::image *image, imgtool_stream *f);
- void (*close) (imgtool::image *image);
- void (*info) (imgtool::image *image, char *string, size_t len);
- imgtoolerr_t (*create) (imgtool::image *image, imgtool_stream *f, util::option_resolution *opts);
- imgtoolerr_t (*get_geometry) (imgtool::image *image, UINT32 *track, UINT32 *heads, UINT32 *sectors);
- imgtoolerr_t (*read_sector) (imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
- imgtoolerr_t (*write_sector) (imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len);
- imgtoolerr_t (*read_block) (imgtool::image *image, void *buffer, UINT64 block);
- imgtoolerr_t (*write_block) (imgtool::image *image, const void *buffer, UINT64 block);
- imgtoolerr_t (*list_partitions)(imgtool::image *image, imgtool_partition_info *partitions, size_t len);
+ imgtoolerr_t (*open) (imgtool::image &image, imgtool::stream::ptr &&stream);
+ void (*close) (imgtool::image &image);
+ void (*info) (imgtool::image &image, std::ostream &stream);
+ imgtoolerr_t (*create) (imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts);
+ imgtoolerr_t (*get_geometry) (imgtool::image &image, UINT32 *track, UINT32 *heads, UINT32 *sectors);
+ imgtoolerr_t (*read_sector) (imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
+ imgtoolerr_t (*write_sector) (imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len);
+ imgtoolerr_t (*read_block) (imgtool::image &image, void *buffer, UINT64 block);
+ imgtoolerr_t (*write_block) (imgtool::image &image, const void *buffer, UINT64 block);
+ imgtoolerr_t (*list_partitions)(imgtool::image &image, std::vector<imgtool::partition_info> &partitions);
UINT32 block_size;
diff --git a/src/tools/imgtool/main.cpp b/src/tools/imgtool/main.cpp
index 40ebf0d9f9d..a202e7a72a1 100644
--- a/src/tools/imgtool/main.cpp
+++ b/src/tools/imgtool/main.cpp
@@ -181,6 +181,7 @@ static int cmd_dir(const struct command *c, int argc, char *argv[])
char last_modified[19];
const char *path;
int partition_index = 0;
+ std::string info;
// attempt to open image
err = imgtool::image::open(argv[0], argv[1], OSD_FOPEN_READ, image);
@@ -205,9 +206,9 @@ static int cmd_dir(const struct command *c, int argc, char *argv[])
fprintf(stdout, "Contents of %s:%s\n", argv[1], path ? path : "");
- image->info(buf, sizeof(buf));
- if (buf[0])
- fprintf(stdout, "%s\n", buf);
+ info = image->info();
+ if (!info.empty())
+ fprintf(stdout, "%s\n", info.c_str());
fprintf(stdout, "------------------------------ -------- --------------- ------------------\n");
while (((err = imgenum->get_next(ent)) == 0) && !ent.eof)
@@ -587,7 +588,7 @@ static int cmd_readsector(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
std::unique_ptr<imgtool::image> img;
- imgtool_stream *stream = nullptr;
+ imgtool::stream *stream = nullptr;
std::vector<UINT8> buffer;
UINT32 track, head, sector;
@@ -604,18 +605,18 @@ static int cmd_readsector(const struct command *c, int argc, char *argv[])
if (err)
goto done;
- stream = stream_open(argv[5], OSD_FOPEN_WRITE);
+ stream = imgtool::stream::open(argv[5], OSD_FOPEN_WRITE);
if (!stream)
{
err = (imgtoolerr_t)(IMGTOOLERR_FILENOTFOUND | IMGTOOLERR_SRC_NATIVEFILE);
goto done;
}
- stream_write(stream, &buffer[0], buffer.size());
+ stream->write(&buffer[0], buffer.size());
done:
if (stream)
- stream_close(stream);
+ delete stream;
if (err)
reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
@@ -627,8 +628,8 @@ static int cmd_writesector(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
std::unique_ptr<imgtool::image> img;
- imgtool_stream *stream = nullptr;
- dynamic_buffer buffer;
+ imgtool::stream *stream = nullptr;
+ std::vector<UINT8> buffer;
UINT32 size, track, head, sector;
// attempt to open image
@@ -640,18 +641,18 @@ static int cmd_writesector(const struct command *c, int argc, char *argv[])
head = atoi(argv[3]);
sector = atoi(argv[4]);
- stream = stream_open(argv[5], OSD_FOPEN_READ);
+ stream = imgtool::stream::open(argv[5], OSD_FOPEN_READ);
if (!stream)
{
err = (imgtoolerr_t)(IMGTOOLERR_FILENOTFOUND | IMGTOOLERR_SRC_NATIVEFILE);
goto done;
}
- size = (UINT32) stream_size(stream);
+ size = (UINT32) stream->size();
buffer.resize(size);
- stream_read(stream, &buffer[0], size);
+ stream->read(&buffer[0], size);
err = img->write_sector(track, head, sector, &buffer[0], size);
if (err)
@@ -659,7 +660,7 @@ static int cmd_writesector(const struct command *c, int argc, char *argv[])
done:
if (stream)
- stream_close(stream);
+ delete stream;
if (err)
reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
diff --git a/src/tools/imgtool/modules/amiga.cpp b/src/tools/imgtool/modules/amiga.cpp
index 12a168e5256..b360c4c22d8 100644
--- a/src/tools/imgtool/modules/amiga.cpp
+++ b/src/tools/imgtool/modules/amiga.cpp
@@ -209,7 +209,7 @@ struct softlink_block
/* Basic Amiga floppy disk image info */
struct amiga_floppy
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
UINT8 sectors;
};
@@ -230,11 +230,11 @@ struct amiga_iterator
*****************************************************************************/
-static imgtoolerr_t amiga_image_read_sector(imgtool::image* img,
+static imgtoolerr_t amiga_image_read_sector(imgtool::image &img,
UINT32 track, UINT32 head, UINT32 sector, void *buf, size_t len);
-static imgtoolerr_t amiga_image_read_sector(imgtool::image* img,
+static imgtoolerr_t amiga_image_read_sector(imgtool::image &img,
UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer);
-static imgtoolerr_t amiga_image_write_sector(imgtool::image* img,
+static imgtoolerr_t amiga_image_write_sector(imgtool::image &img,
UINT32 track, UINT32 head, UINT32 sector, const void *buf, size_t len, int ddam);
@@ -398,10 +398,17 @@ static UINT32 block_checksum(UINT8 *buffer, int length)
}
+/* Get Amiga floppy data */
+static amiga_floppy *get_amiga_floppy(imgtool::image &image)
+{
+ return (amiga_floppy *)image.extra_bytes();
+}
+
+
/* Returns the total number of blocks in the image */
-static int get_total_blocks(imgtool::image *img)
+static int get_total_blocks(imgtool::image &img)
{
- amiga_floppy *f = (amiga_floppy *)img->extra_bytes();
+ amiga_floppy *f = get_amiga_floppy(img);
return 2 * 80 * f->sectors;
}
@@ -418,12 +425,12 @@ static void find_block(amiga_floppy *f, int block, int *track,
/* Generic read block */
-static imgtoolerr_t read_block(imgtool::image *img, int block, UINT8 *buffer)
+static imgtoolerr_t read_block(imgtool::image &img, int block, UINT8 *buffer)
{
imgtoolerr_t ret;
int track, head, sector;
- find_block((amiga_floppy *) img->extra_bytes(), block, &track, &head, &sector);
+ find_block(get_amiga_floppy(img), block, &track, &head, &sector);
/* get block from image */
ret = amiga_image_read_sector(img, track, head, sector, buffer, BSIZE);
@@ -434,12 +441,12 @@ static imgtoolerr_t read_block(imgtool::image *img, int block, UINT8 *buffer)
/* Generic write block */
-static imgtoolerr_t write_block(imgtool::image *img, int block, const UINT8 *buffer)
+static imgtoolerr_t write_block(imgtool::image &img, int block, const UINT8 *buffer)
{
imgtoolerr_t ret;
int track, head, sector;
- find_block((amiga_floppy *)img->extra_bytes(), block, &track, &head, &sector);
+ find_block(get_amiga_floppy(img), block, &track, &head, &sector);
/* write block to image */
ret = amiga_image_write_sector(img, track, head, sector, buffer, BSIZE, 0);
@@ -450,7 +457,7 @@ static imgtoolerr_t write_block(imgtool::image *img, int block, const UINT8 *buf
/* Return the type a block */
-static sec_type get_block_type(imgtool::image *img, int block)
+static sec_type get_block_type(imgtool::image &img, int block)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -474,7 +481,7 @@ static sec_type get_block_type(imgtool::image *img, int block)
/* Read a bitmap block */
-static imgtoolerr_t read_bitmap_block(imgtool::image *img, int block, bitmap_block *bm)
+static imgtoolerr_t read_bitmap_block(imgtool::image &img, int block, bitmap_block *bm)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -492,7 +499,7 @@ static imgtoolerr_t read_bitmap_block(imgtool::image *img, int block, bitmap_blo
/* Write a bitmap block */
-static imgtoolerr_t write_bitmap_block(imgtool::image *img, int block, const bitmap_block *bm)
+static imgtoolerr_t write_bitmap_block(imgtool::image &img, int block, const bitmap_block *bm)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -530,7 +537,7 @@ static imgtoolerr_t read_bitmap_ext_block(imgtool::image *img, int block, bitmap
/* Read the root block */
-static imgtoolerr_t read_root_block(imgtool::image *img, root_block *root)
+static imgtoolerr_t read_root_block(imgtool::image &img, root_block *root)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -558,7 +565,7 @@ static imgtoolerr_t read_root_block(imgtool::image *img, root_block *root)
}
-static imgtoolerr_t write_root_block(imgtool::image *img, const root_block *root)
+static imgtoolerr_t write_root_block(imgtool::image &img, const root_block *root)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -595,7 +602,7 @@ static imgtoolerr_t write_root_block(imgtool::image *img, const root_block *root
/* Read a file block */
-static imgtoolerr_t read_file_block(imgtool::image *img, int block, file_block *fb)
+static imgtoolerr_t read_file_block(imgtool::image &img, int block, file_block *fb)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -629,7 +636,7 @@ static imgtoolerr_t read_file_block(imgtool::image *img, int block, file_block *
}
-static imgtoolerr_t read_file_ext_block(imgtool::image *img, int block, file_ext_block *fe)
+static imgtoolerr_t read_file_ext_block(imgtool::image &img, int block, file_ext_block *fe)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -650,7 +657,7 @@ static imgtoolerr_t read_file_ext_block(imgtool::image *img, int block, file_ext
}
-static imgtoolerr_t read_data_block(imgtool::image *img, int block, data_block *d)
+static imgtoolerr_t read_data_block(imgtool::image &img, int block, data_block *d)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -672,7 +679,7 @@ static imgtoolerr_t read_data_block(imgtool::image *img, int block, data_block *
/* Read a directory block */
-static imgtoolerr_t read_dir_block(imgtool::image *img, int block, dir_block *db)
+static imgtoolerr_t read_dir_block(imgtool::image &img, int block, dir_block *db)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -702,7 +709,7 @@ static imgtoolerr_t read_dir_block(imgtool::image *img, int block, dir_block *db
}
-static imgtoolerr_t write_dir_block(imgtool::image *img, int block, const dir_block *db)
+static imgtoolerr_t write_dir_block(imgtool::image &img, int block, const dir_block *db)
{
UINT8 buffer[BSIZE];
@@ -735,7 +742,7 @@ static imgtoolerr_t write_dir_block(imgtool::image *img, int block, const dir_bl
}
-static imgtoolerr_t read_hardlink_block(imgtool::image *img, int block, hardlink_block *hl)
+static imgtoolerr_t read_hardlink_block(imgtool::image &img, int block, hardlink_block *hl)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -763,7 +770,7 @@ static imgtoolerr_t read_hardlink_block(imgtool::image *img, int block, hardlink
}
-static imgtoolerr_t read_softlink_block(imgtool::image *img, int block, softlink_block *sl)
+static imgtoolerr_t read_softlink_block(imgtool::image &img, int block, softlink_block *sl)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -790,7 +797,7 @@ static imgtoolerr_t read_softlink_block(imgtool::image *img, int block, softlink
/* Returns the disk type */
-static disk_type get_disk_type(imgtool::image *img)
+static disk_type get_disk_type(imgtool::image &img)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -812,7 +819,7 @@ static disk_type get_disk_type(imgtool::image *img)
/* Returns TRUE if the disk is formatted with the FastFileSystem */
-static int is_ffs(imgtool::image *img)
+static int is_ffs(imgtool::image &img)
{
disk_type t = get_disk_type(img);
@@ -823,7 +830,7 @@ static int is_ffs(imgtool::image *img)
/* Returns TRUE if the disk uses the international mode */
-static int is_intl(imgtool::image *img)
+static int is_intl(imgtool::image &img)
{
disk_type t = get_disk_type(img);
@@ -844,7 +851,7 @@ static int is_dirc(imgtool::image *img)
}
#endif
-static imgtoolerr_t get_hash_table(imgtool::image *img, int block, UINT32 *ht)
+static imgtoolerr_t get_hash_table(imgtool::image &img, int block, UINT32 *ht)
{
imgtoolerr_t ret;
@@ -884,7 +891,7 @@ static imgtoolerr_t get_hash_table(imgtool::image *img, int block, UINT32 *ht)
}
-static imgtoolerr_t set_hash_table(imgtool::image *img, int block, const UINT32 *ht)
+static imgtoolerr_t set_hash_table(imgtool::image &img, int block, const UINT32 *ht)
{
UINT8 buffer[BSIZE];
imgtoolerr_t ret;
@@ -910,7 +917,7 @@ static imgtoolerr_t get_root_hash_table(imgtool::image *img, UINT32 *ht)
}
#endif
-static imgtoolerr_t get_blockname(imgtool::image *img, int block, char *dest)
+static imgtoolerr_t get_blockname(imgtool::image &img, int block, char *dest)
{
UINT8 buffer[BSIZE];
imgtoolerr_t ret;
@@ -927,7 +934,7 @@ static imgtoolerr_t get_blockname(imgtool::image *img, int block, char *dest)
}
-static imgtoolerr_t get_hash_chain(imgtool::image *img, int block, UINT32 *chain)
+static imgtoolerr_t get_hash_chain(imgtool::image &img, int block, UINT32 *chain)
{
UINT8 buffer[BSIZE];
imgtoolerr_t ret;
@@ -943,7 +950,7 @@ static imgtoolerr_t get_hash_chain(imgtool::image *img, int block, UINT32 *chain
}
-static imgtoolerr_t set_hash_chain(imgtool::image *img, int block, UINT32 chain)
+static imgtoolerr_t set_hash_chain(imgtool::image &img, int block, UINT32 chain)
{
UINT8 buffer[BSIZE];
imgtoolerr_t ret;
@@ -963,7 +970,7 @@ static imgtoolerr_t set_hash_chain(imgtool::image *img, int block, UINT32 chain)
}
-static imgtoolerr_t walk_hash_chain(imgtool::image *img, const char *path, int start_block, int *prev_block, int *block)
+static imgtoolerr_t walk_hash_chain(imgtool::image &img, const char *path, int start_block, int *prev_block, int *block)
{
imgtoolerr_t err;
UINT32 hash_chain;
@@ -1065,7 +1072,7 @@ static imgtoolerr_t walk_hash_chain(imgtool::image *img, const char *path, int s
/* Returns the block number for a dir/file/link entry given as NUL delimited
* list of path parts, for example "dir1\0dir2\0dir3" returns the block number
* for directory "dir3" */
-static imgtoolerr_t find_entry(imgtool::image *img, const char *path, int start_block, int *block)
+static imgtoolerr_t find_entry(imgtool::image &img, const char *path, int start_block, int *block)
{
imgtoolerr_t ret;
const char *next_path;
@@ -1127,7 +1134,7 @@ static imgtoolerr_t find_entry(imgtool::image *img, const char *path, int start_
}
-static imgtoolerr_t get_block_chksum(imgtool::image *img, int block, UINT32 *chksum, int bitmap)
+static imgtoolerr_t get_block_chksum(imgtool::image &img, int block, UINT32 *chksum, int bitmap)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -1153,7 +1160,7 @@ static imgtoolerr_t get_block_chksum(imgtool::image *img, int block, UINT32 *chk
}
-static imgtoolerr_t fix_chksum(imgtool::image *img, int block, int bitmap)
+static imgtoolerr_t fix_chksum(imgtool::image &img, int block, int bitmap)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -1185,20 +1192,20 @@ static imgtoolerr_t fix_chksum(imgtool::image *img, int block, int bitmap)
}
-static imgtoolerr_t fix_block_chksum(imgtool::image *img, int block)
+static imgtoolerr_t fix_block_chksum(imgtool::image &img, int block)
{
return fix_chksum(img, block, FALSE);
}
-static imgtoolerr_t fix_bitmap_chksum(imgtool::image *img, int block)
+static imgtoolerr_t fix_bitmap_chksum(imgtool::image &img, int block)
{
return fix_chksum(img, block, TRUE);
}
/* Set a block as used */
-static imgtoolerr_t bitmap_mark(imgtool::image *img, int block, int used)
+static imgtoolerr_t bitmap_mark(imgtool::image &img, int block, int used)
{
imgtoolerr_t ret;
bitmap_block bm;
@@ -1242,19 +1249,19 @@ static imgtoolerr_t bitmap_mark(imgtool::image *img, int block, int used)
}
-static imgtoolerr_t bitmap_mark_used(imgtool::image *img, int block)
+static imgtoolerr_t bitmap_mark_used(imgtool::image &img, int block)
{
return bitmap_mark(img, block, TRUE);
}
-static imgtoolerr_t bitmap_mark_free(imgtool::image *img, int block)
+static imgtoolerr_t bitmap_mark_free(imgtool::image &img, int block)
{
return bitmap_mark(img, block, FALSE);
}
-static imgtoolerr_t update_block_modified_date(imgtool::image *img, int block)
+static imgtoolerr_t update_block_modified_date(imgtool::image &img, int block)
{
UINT8 buffer[BSIZE];
imgtoolerr_t ret;
@@ -1281,7 +1288,7 @@ static imgtoolerr_t update_block_modified_date(imgtool::image *img, int block)
}
-static imgtoolerr_t clear_hash_table_entry(imgtool::image *img, int parent, char *filename)
+static imgtoolerr_t clear_hash_table_entry(imgtool::image &img, int parent, char *filename)
{
imgtoolerr_t ret;
UINT32 ht[TSIZE], chain;
@@ -1401,7 +1408,7 @@ static imgtoolerr_t walk_bitmap_ext_blocks(imgtool::image *img, int start, int *
/* Searches for a block marked as free
* TODO: bm_ext support for HDs */
-static imgtoolerr_t find_free_block(imgtool::image *img, int *block)
+static imgtoolerr_t find_free_block(imgtool::image &img, int *block)
{
imgtoolerr_t ret;
root_block root;
@@ -1434,7 +1441,7 @@ static imgtoolerr_t find_free_block(imgtool::image *img, int *block)
}
-static imgtoolerr_t add_entry(imgtool::image *img, int parent, int block)
+static imgtoolerr_t add_entry(imgtool::image &img, int parent, int block)
{
imgtoolerr_t ret;
UINT32 ht[TSIZE];
@@ -1469,7 +1476,7 @@ static imgtoolerr_t add_entry(imgtool::image *img, int parent, int block)
/* Recursively create new directory entries */
-static imgtoolerr_t makedir(imgtool::image *img, const char *path, int parent)
+static imgtoolerr_t makedir(imgtool::image &img, const char *path, int parent)
{
imgtoolerr_t ret;
dir_block dir;
@@ -1523,7 +1530,7 @@ static imgtoolerr_t makedir(imgtool::image *img, const char *path, int parent)
/* Recursively checks the path parts and creates directories for them */
-static imgtoolerr_t checkdir(imgtool::image *img, const char *path, int parent)
+static imgtoolerr_t checkdir(imgtool::image &img, const char *path, int parent)
{
imgtoolerr_t ret;
int block;
@@ -1567,7 +1574,7 @@ static imgtoolerr_t checkdir(imgtool::image *img, const char *path, int parent)
/* Writes the file data from the specified block into the stream */
-static imgtoolerr_t write_file_block_data(imgtool::image *img, int block, int size, imgtool_stream *destf)
+static imgtoolerr_t write_file_block_data(imgtool::image &img, int block, int size, imgtool::stream &destf)
{
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -1606,7 +1613,7 @@ static imgtoolerr_t write_file_block_data(imgtool::image *img, int block, int si
}
/* Write data to stream */
- if (stream_write (destf, buffer, size) != size)
+ if (destf.write(buffer, size) != size)
{
return IMGTOOLERR_WRITEERROR;
}
@@ -1615,7 +1622,7 @@ static imgtoolerr_t write_file_block_data(imgtool::image *img, int block, int si
}
-static imgtoolerr_t walk_data_block_ptr(imgtool::image *img, UINT32 *ptr, int *filesize, imgtool_stream *destf, int write)
+static imgtoolerr_t walk_data_block_ptr(imgtool::image &img, UINT32 *ptr, int *filesize, imgtool::stream *destf, bool write)
{
int i, blocksize = is_ffs(img) ? BSIZE : BSIZE-24;
imgtoolerr_t ret;
@@ -1627,7 +1634,7 @@ static imgtoolerr_t walk_data_block_ptr(imgtool::image *img, UINT32 *ptr, int *f
if (write)
{
- ret = write_file_block_data(img, ptr[i], bytes_left, destf);
+ ret = write_file_block_data(img, ptr[i], bytes_left, *destf);
if (ret) return ret;
}
else
@@ -1646,20 +1653,20 @@ static imgtoolerr_t walk_data_block_ptr(imgtool::image *img, UINT32 *ptr, int *f
}
-static imgtoolerr_t write_data_block_ptr(imgtool::image *img, UINT32 *ptr, int *filesize, imgtool_stream *destf)
+static imgtoolerr_t write_data_block_ptr(imgtool::image &img, UINT32 *ptr, int *filesize, imgtool::stream &destf)
{
- return walk_data_block_ptr(img, ptr, filesize, destf, TRUE);
+ return walk_data_block_ptr(img, ptr, filesize, &destf, true);
}
/* Marks all blocks pointed to by the data block pointers as free */
-static imgtoolerr_t clear_data_block_ptr(imgtool::image *img, UINT32 *ptr, int *filesize)
+static imgtoolerr_t clear_data_block_ptr(imgtool::image &img, UINT32 *ptr, int *filesize)
{
- return walk_data_block_ptr(img, ptr, filesize, NULL, FALSE);
+ return walk_data_block_ptr(img, ptr, filesize, nullptr, false);
}
-static imgtoolerr_t walk_file_ext_data(imgtool::image *img, int block, int *filesize, imgtool_stream *destf, int write)
+static imgtoolerr_t walk_file_ext_data(imgtool::image &img, int block, int *filesize, imgtool::stream *destf, int write)
{
file_ext_block file_ext;
imgtoolerr_t ret;
@@ -1698,20 +1705,20 @@ static imgtoolerr_t walk_file_ext_data(imgtool::image *img, int block, int *file
}
-static imgtoolerr_t write_file_ext_data(imgtool::image *img, int block, int *filesize, imgtool_stream *destf)
+static imgtoolerr_t write_file_ext_data(imgtool::image &img, int block, int *filesize, imgtool::stream *destf)
{
return walk_file_ext_data(img, block, filesize, destf, TRUE);
}
-static imgtoolerr_t clear_file_ext_data(imgtool::image *img, int block, int *filesize)
+static imgtoolerr_t clear_file_ext_data(imgtool::image &img, int block, int *filesize)
{
return walk_file_ext_data(img, block, filesize, NULL, FALSE);
}
/* Updates the disk alteration date stored in the root block */
-static imgtoolerr_t update_disk_alteration_date(imgtool::image *img)
+static imgtoolerr_t update_disk_alteration_date(imgtool::image &img)
{
imgtoolerr_t ret;
root_block root;
@@ -1742,12 +1749,11 @@ static imgtoolerr_t update_disk_alteration_date(imgtool::image *img)
*****************************************************************************/
-static imgtoolerr_t amiga_image_open(imgtool::image *img, imgtool_stream *stream)
+static imgtoolerr_t amiga_image_open(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- amiga_floppy *f = (amiga_floppy *) img->extra_bytes();
- UINT64 size = stream_size(stream);
+ amiga_floppy *f = get_amiga_floppy(img);
+ UINT64 size = stream->size();
- f->stream = stream;
f->sectors = size/BSIZE/80/2;
if (f->sectors != 11 && f->sectors != 22)
@@ -1755,16 +1761,20 @@ static imgtoolerr_t amiga_image_open(imgtool::image *img, imgtool_stream *stream
return IMGTOOLERR_CORRUPTIMAGE;
}
+ f->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static void amiga_image_exit(imgtool::image *img)
+static void amiga_image_exit(imgtool::image &img)
{
+ amiga_floppy *f = get_amiga_floppy(img);
+ if (f->stream)
+ delete f->stream;
}
-static void amiga_image_info(imgtool::image *img, char *string, size_t len)
+static void amiga_image_info(imgtool::image &img, std::ostream &stream)
{
imgtoolerr_t ret;
root_block root;
@@ -1792,30 +1802,30 @@ static void amiga_image_info(imgtool::image *img, char *string, size_t len)
strcat(info, "\n Root modified: ");
strcat(info, r);
- strncpy(string, info, len);
+ stream << info;
}
-static imgtoolerr_t amiga_image_read_sector(imgtool::image* img, UINT32 track, UINT32 head, UINT32 sector, void *buf, size_t len)
+static imgtoolerr_t amiga_image_read_sector(imgtool::image &img, UINT32 track, UINT32 head, UINT32 sector, void *buf, size_t len)
{
- amiga_floppy *f = (amiga_floppy *) img->extra_bytes();
+ amiga_floppy *f = get_amiga_floppy(img);
/* skip ahead to the area we want to read */
- stream_seek(f->stream, track * (head+1) * f->sectors * BSIZE + sector * BSIZE, SEEK_CUR);
+ f->stream->seek(track * (head+1) * f->sectors * BSIZE + sector * BSIZE, SEEK_CUR);
- if (stream_read(f->stream, buf, len) != len)
+ if (f->stream->read(buf, len) != len)
{
return IMGTOOLERR_READERROR;
}
/* reset stream */
- stream_seek(f->stream, 0, 0);
+ f->stream->seek(0, 0);
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t amiga_image_read_sector(imgtool::image* img,
+static imgtoolerr_t amiga_image_read_sector(imgtool::image &img,
UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
{
try { buffer.resize(BSIZE); }
@@ -1825,33 +1835,33 @@ static imgtoolerr_t amiga_image_read_sector(imgtool::image* img,
}
-static imgtoolerr_t amiga_image_write_sector(imgtool::image* img, UINT32 track, UINT32 head, UINT32 sector, const void *buf, size_t len, int ddam)
+static imgtoolerr_t amiga_image_write_sector(imgtool::image &img, UINT32 track, UINT32 head, UINT32 sector, const void *buf, size_t len, int ddam)
{
- amiga_floppy *f = (amiga_floppy *) img->extra_bytes();
+ amiga_floppy *f = get_amiga_floppy(img);
/* skip ahead to the area we want to write */
- stream_seek(f->stream, track * (head+1) * f->sectors * BSIZE + sector * BSIZE, SEEK_CUR);
+ f->stream->seek(track * (head+1) * f->sectors * BSIZE + sector * BSIZE, SEEK_CUR);
/* write data */
- if (stream_write(f->stream, buf, len) != len)
+ if (f->stream->write(buf, len) != len)
{
return IMGTOOLERR_WRITEERROR;
}
/* reset stream */
- stream_seek(f->stream, 0, 0);
+ f->stream->seek(0, 0);
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t amiga_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t amiga_image_beginenum(imgtool::directory &enumeration, const char *path)
{
- int blocks = get_total_blocks(&enumeration->image());
+ int blocks = get_total_blocks(enumeration.image());
imgtoolerr_t ret;
amiga_iterator *iter;
- iter = (amiga_iterator *) enumeration->extra_bytes();
+ iter = (amiga_iterator *) enumeration.extra_bytes();
if (!iter) return IMGTOOLERR_OUTOFMEMORY;
iter->index = 1;
@@ -1861,7 +1871,7 @@ static imgtoolerr_t amiga_image_beginenum(imgtool::directory *enumeration, const
if (path[0])
{
/* search for the directory block, start with the root block */
- ret = find_entry(&enumeration->image(), path, blocks/2, &iter->block);
+ ret = find_entry(enumeration.image(), path, blocks/2, &iter->block);
if (ret) return ret;
}
else
@@ -1874,9 +1884,9 @@ static imgtoolerr_t amiga_image_beginenum(imgtool::directory *enumeration, const
}
-static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t amiga_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- amiga_iterator *iter = (amiga_iterator *) enumeration->extra_bytes();
+ amiga_iterator *iter = (amiga_iterator *) enumeration.extra_bytes();
imgtoolerr_t ret;
UINT32 ht[TSIZE];
int block;
@@ -1884,12 +1894,12 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
/* finished listing all entries? */
if (iter->eof == 1 || iter->ht_index == TSIZE)
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
/* get hash table */
- ret = get_hash_table(&enumeration->image(), iter->block, ht);
+ ret = get_hash_table(enumeration.image(), iter->block, ht);
if (ret) return ret;
/* skip empty hash table entries */
@@ -1899,7 +1909,7 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
/* check if we are already at the end */
if (iter->ht_index == TSIZE)
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
}
@@ -1907,22 +1917,22 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
/* get block number */
block = (iter->next_block == 0) ? ht[iter->ht_index] : iter->next_block;
- switch (get_block_type(&enumeration->image(), block))
+ switch (get_block_type(enumeration.image(), block))
{
case ST_FILE:
{
file_block file;
/* get block */
- ret = read_file_block(&enumeration->image(), block, &file);
+ ret = read_file_block(enumeration.image(), block, &file);
if (ret) return ret;
/* fill directory entry */
- strncpyz(ent->filename, (char *)file.filename, file.name_len + 1);
- ent->filesize = file.byte_size;
- ent->lastmodified_time = amiga_crack_time(&file.date);
- amiga_decode_flags(file.protect, ent->attr);
- strncpyz(ent->comment, (char *)file.comment, file.comm_len + 1);
+ strncpyz(ent.filename, (char *)file.filename, file.name_len + 1);
+ ent.filesize = file.byte_size;
+ ent.lastmodified_time = amiga_crack_time(&file.date);
+ amiga_decode_flags(file.protect, ent.attr);
+ strncpyz(ent.comment, (char *)file.comment, file.comm_len + 1);
iter->next_block = file.hash_chain;
@@ -1934,15 +1944,15 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
dir_block dir;
/* get block */
- ret = read_dir_block(&enumeration->image(), block, &dir);
+ ret = read_dir_block(enumeration.image(), block, &dir);
if (ret) return ret;
/* fill directory entry */
- strncpyz(ent->filename, (char *)dir.dirname, dir.name_len + 1);
- ent->lastmodified_time = amiga_crack_time(&dir.date);
- amiga_decode_flags(dir.protect, ent->attr);
- strncpyz(ent->comment, (char *)dir.comment, dir.comm_len + 1);
- ent->directory = 1;
+ strncpyz(ent.filename, (char *)dir.dirname, dir.name_len + 1);
+ ent.lastmodified_time = amiga_crack_time(&dir.date);
+ amiga_decode_flags(dir.protect, ent.attr);
+ strncpyz(ent.comment, (char *)dir.comment, dir.comm_len + 1);
+ ent.directory = 1;
iter->next_block = dir.hash_chain;
@@ -1954,15 +1964,15 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
softlink_block sl;
/* get block */
- ret = read_softlink_block(&enumeration->image(), block, &sl);
+ ret = read_softlink_block(enumeration.image(), block, &sl);
if (ret) return ret;
/* fill directory entry */
- strncpyz(ent->filename, (char *)sl.slname, sl.name_len + 1);
- ent->lastmodified_time = amiga_crack_time(&sl.date);
- amiga_decode_flags(sl.protect, ent->attr);
- strncpyz(ent->comment, (char *)sl.comment, sl.comm_len + 1);
- strcpy(ent->softlink, (char *)sl.symbolic_name);
+ strncpyz(ent.filename, (char *)sl.slname, sl.name_len + 1);
+ ent.lastmodified_time = amiga_crack_time(&sl.date);
+ amiga_decode_flags(sl.protect, ent.attr);
+ strncpyz(ent.comment, (char *)sl.comment, sl.comm_len + 1);
+ strcpy(ent.softlink, (char *)sl.symbolic_name);
iter->next_block = sl.hash_chain;
@@ -1971,31 +1981,31 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
case ST_LINKDIR:
- ent->directory = 1;
+ ent.directory = 1;
case ST_LINKFILE:
{
hardlink_block hl;
/* get block */
- ret = read_hardlink_block(&enumeration->image(), block, &hl);
+ ret = read_hardlink_block(enumeration.image(), block, &hl);
if (ret) return ret;
/* get filesize from linked file */
- if (!ent->directory)
+ if (!ent.directory)
{
file_block file;
- ret = read_file_block(&enumeration->image(), hl.real_entry, &file);
+ ret = read_file_block(enumeration.image(), hl.real_entry, &file);
if (ret) return ret;
- ent->filesize = file.byte_size;
+ ent.filesize = file.byte_size;
}
/* fill directory entry */
- strncpyz(ent->filename, (char *)hl.hlname, hl.name_len + 1);
- ent->lastmodified_time = amiga_crack_time(&hl.date);
- amiga_decode_flags(hl.protect, ent->attr);
- strncpyz(ent->comment, (char *)hl.comment, hl.comm_len + 1);
- ent->hardlink = 1;
+ strncpyz(ent.filename, (char *)hl.hlname, hl.name_len + 1);
+ ent.lastmodified_time = amiga_crack_time(&hl.date);
+ amiga_decode_flags(hl.protect, ent.attr);
+ strncpyz(ent.comment, (char *)hl.comment, hl.comm_len + 1);
+ ent.hardlink = 1;
iter->next_block = hl.hash_chain;
@@ -2019,16 +2029,10 @@ static imgtoolerr_t amiga_image_nextenum(imgtool::directory *enumeration, imgtoo
}
-static void amiga_image_closeenum(imgtool::directory *enumeration)
-{
- free(enumeration);
-}
-
-
-static imgtoolerr_t amiga_image_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t amiga_image_freespace(imgtool::partition &partition, UINT64 *size)
{
imgtoolerr_t ret;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
const int data_size = is_ffs(image) ? BSIZE : BSIZE-24;
root_block root;
bitmap_block bm;
@@ -2079,9 +2083,9 @@ static imgtoolerr_t amiga_image_freespace(imgtool::partition *partition, UINT64
}
-static imgtoolerr_t amiga_image_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t amiga_image_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
imgtoolerr_t ret;
file_block file;
int filesize, block;
@@ -2105,7 +2109,7 @@ static imgtoolerr_t amiga_image_readfile(imgtool::partition *partition, const ch
if (filesize == 0) return IMGTOOLERR_SUCCESS;
/* Phase 2: Follow file extension blocks */
- ret = write_file_ext_data(img, file.extension, &filesize, destf);
+ ret = write_file_ext_data(img, file.extension, &filesize, &destf);
if (ret) return ret;
return IMGTOOLERR_SUCCESS;
@@ -2116,9 +2120,9 @@ static imgtoolerr_t amiga_image_readfile(imgtool::partition *partition, const ch
* the Directory block (or from the same-hash-value list) and the bitmap is
* updated. File header block, Data blocks and File extension blocks are not
* cleared, but the bitmap blocks are updated. */
-static imgtoolerr_t amiga_image_deletefile(imgtool::partition *partition, const char *fname)
+static imgtoolerr_t amiga_image_deletefile(imgtool::partition &partition, const char *fname)
{
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
imgtoolerr_t ret;
int parent, block;
char filename[31];
@@ -2189,15 +2193,15 @@ static imgtoolerr_t amiga_image_deletefile(imgtool::partition *partition, const
}
-static imgtoolerr_t amiga_image_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t amiga_image_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
return IMGTOOLERR_UNIMPLEMENTED;
}
-static imgtoolerr_t amiga_image_create(imgtool::image *img, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t amiga_image_create(imgtool::image &img, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
- amiga_floppy *f = (amiga_floppy *) img->extra_bytes();
+ amiga_floppy *f = get_amiga_floppy(img);
const std::string &dskname = opts->lookup_string('N');
imgtoolerr_t ret;
UINT8 buffer[BSIZE];
@@ -2206,7 +2210,7 @@ static imgtoolerr_t amiga_image_create(imgtool::image *img, imgtool_stream *stre
time_t now;
int blocks;
- f->stream = stream;
+ f->stream = stream.get();
switch (opts->lookup_int('S'))
{
@@ -2296,13 +2300,14 @@ static imgtoolerr_t amiga_image_create(imgtool::image *img, imgtool_stream *stre
ret = write_block(img, blocks - 1, buffer);
if (ret) return ret;
+ f->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t amiga_image_createdir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t amiga_image_createdir(imgtool::partition &partition, const char *path)
{
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
imgtoolerr_t ret;
/* Create directories */
@@ -2317,25 +2322,25 @@ static imgtoolerr_t amiga_image_createdir(imgtool::partition *partition, const c
}
-static imgtoolerr_t amiga_image_getattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
+static imgtoolerr_t amiga_image_getattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
{
return IMGTOOLERR_UNIMPLEMENTED;
}
-static imgtoolerr_t amiga_image_setattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
+static imgtoolerr_t amiga_image_setattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
{
return IMGTOOLERR_UNIMPLEMENTED;
}
-static imgtoolerr_t amiga_image_geticoninfo(imgtool::partition *partition, const char *path, imgtool_iconinfo *iconinfo)
+static imgtoolerr_t amiga_image_geticoninfo(imgtool::partition &partition, const char *path, imgtool_iconinfo *iconinfo)
{
return IMGTOOLERR_UNIMPLEMENTED;
}
-static imgtoolerr_t amiga_image_suggesttransfer(imgtool::partition *partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t amiga_image_suggesttransfer(imgtool::partition &partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
return IMGTOOLERR_UNIMPLEMENTED;
}
@@ -2400,7 +2405,6 @@ void amiga_floppy_get_info(const imgtool_class *imgclass, UINT32 state, union im
case IMGTOOLINFO_PTR_INFO: info->info = amiga_image_info; break;
case IMGTOOLINFO_PTR_BEGIN_ENUM: info->begin_enum = amiga_image_beginenum; break;
case IMGTOOLINFO_PTR_NEXT_ENUM: info->next_enum = amiga_image_nextenum; break;
- case IMGTOOLINFO_PTR_CLOSE_ENUM: info->close_enum = amiga_image_closeenum; break;
case IMGTOOLINFO_PTR_FREE_SPACE: info->free_space = amiga_image_freespace; break;
case IMGTOOLINFO_PTR_READ_FILE: info->read_file = amiga_image_readfile; break;
case IMGTOOLINFO_PTR_WRITE_FILE: info->write_file = amiga_image_writefile; break;
diff --git a/src/tools/imgtool/modules/bml3.cpp b/src/tools/imgtool/modules/bml3.cpp
index 123d2f83bef..65609e85509 100644
--- a/src/tools/imgtool/modules/bml3.cpp
+++ b/src/tools/imgtool/modules/bml3.cpp
@@ -68,7 +68,7 @@ struct granule_list_t {
#define BML3_OPTIONS_FTYPE 'T'
#define BML3_OPTIONS_ASCII 'M'
-static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition *partition, const char *fname);
+static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition &partition, const char *fname);
@@ -76,14 +76,14 @@ static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition *partition, con
Imgtool module code
*********************************************************************/
-static bml3_diskinfo *bml3_get_diskinfo(imgtool::image *image)
+static bml3_diskinfo *bml3_get_diskinfo(imgtool::image &image)
{
return (bml3_diskinfo *) imgtool_floppy_extrabytes(image);
}
-static int max_dirents(imgtool::image *image)
+static int max_dirents(imgtool::image &image)
{
bml3_diskinfo *info = bml3_get_diskinfo(image);
return (16 * info->heads + 1 - info->dirent_start_sector)*(info->sector_size/32);
@@ -91,7 +91,7 @@ static int max_dirents(imgtool::image *image)
-static void dirent_location(imgtool::image *image, int index_loc, UINT8 *head, UINT8 *track, UINT8 *sector, UINT8 *offset)
+static void dirent_location(imgtool::image &image, int index_loc, UINT8 *head, UINT8 *track, UINT8 *sector, UINT8 *offset)
{
bml3_diskinfo *info = bml3_get_diskinfo(image);
*track = 20;
@@ -107,7 +107,7 @@ static void dirent_location(imgtool::image *image, int index_loc, UINT8 *head, U
-static floperr_t get_bml3_dirent(imgtool::image *f, int index_loc, struct bml3_dirent *ent)
+static floperr_t get_bml3_dirent(imgtool::image &f, int index_loc, struct bml3_dirent *ent)
{
floperr_t err;
UINT8 head, track, sector, offset;
@@ -139,7 +139,7 @@ static floperr_t get_bml3_dirent(imgtool::image *f, int index_loc, struct bml3_d
-static floperr_t put_bml3_dirent(imgtool::image *f, int index_loc, const struct bml3_dirent *ent)
+static floperr_t put_bml3_dirent(imgtool::image &f, int index_loc, const struct bml3_dirent *ent)
{
floperr_t err;
UINT8 head, track, sector, offset;
@@ -194,7 +194,7 @@ static void get_dirent_fname(char *fnamebuf, const struct bml3_dirent *ent)
-static imgtoolerr_t lookup_bml3_file(imgtool::image *f, const char *fname, struct bml3_dirent *ent, int *position)
+static imgtoolerr_t lookup_bml3_file(imgtool::image &f, const char *fname, struct bml3_dirent *ent, int *position)
{
int i;
floperr_t ferr;
@@ -229,7 +229,7 @@ static imgtoolerr_t lookup_bml3_file(imgtool::image *f, const char *fname, struc
-static UINT8 get_granule_count(imgtool::image *img)
+static UINT8 get_granule_count(imgtool::image &img)
{
// UINT16 tracks;
UINT16 disk_granules;
@@ -245,7 +245,7 @@ static UINT8 get_granule_count(imgtool::image *img)
}
/* granule_map must be an array of MAX_GRANULEMAP_SIZE bytes */
-static floperr_t get_granule_map(imgtool::image *img, UINT8 *granule_map, UINT8 *granule_count)
+static floperr_t get_granule_map(imgtool::image &img, UINT8 *granule_map, UINT8 *granule_count)
{
bml3_diskinfo *info = bml3_get_diskinfo(img);
UINT8 count;
@@ -260,7 +260,7 @@ static floperr_t get_granule_map(imgtool::image *img, UINT8 *granule_map, UINT8
-static floperr_t put_granule_map(imgtool::image *img, const UINT8 *granule_map, UINT8 granule_count)
+static floperr_t put_granule_map(imgtool::image &img, const UINT8 *granule_map, UINT8 granule_count)
{
bml3_diskinfo *info = bml3_get_diskinfo(img);
return floppy_write_sector(imgtool_floppy(img), 0, 20, info->fat_start_sector, info->fat_start_offset, granule_map, granule_count, 0); /* TODO: pass ddam argument from imgtool */
@@ -269,7 +269,7 @@ static floperr_t put_granule_map(imgtool::image *img, const UINT8 *granule_map,
-static void granule_location(imgtool::image *image, UINT8 granule, UINT8 *head, UINT8 *track, UINT8 *sector)
+static void granule_location(imgtool::image &image, UINT8 granule, UINT8 *head, UINT8 *track, UINT8 *sector)
{
bml3_diskinfo *info = bml3_get_diskinfo(image);
UINT16 abs_track = granule * info->granule_sectors / 16;
@@ -283,7 +283,7 @@ static void granule_location(imgtool::image *image, UINT8 granule, UINT8 *head,
-static imgtoolerr_t transfer_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *f, imgtoolerr_t (*proc)(imgtool::image *, int, int, int, int, size_t, imgtool_stream *))
+static imgtoolerr_t transfer_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &f, imgtoolerr_t (*proc)(imgtool::image &, int, int, int, int, size_t, imgtool::stream &))
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
UINT8 head, track, sector;
@@ -294,21 +294,21 @@ static imgtoolerr_t transfer_granule(imgtool::image *img, UINT8 granule, int len
}
-static imgtoolerr_t transfer_from_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *destf)
+static imgtoolerr_t transfer_from_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &destf)
{
return transfer_granule(img, granule, length, destf, imgtool_floppy_read_sector_to_stream);
}
-static imgtoolerr_t transfer_to_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *sourcef)
+static imgtoolerr_t transfer_to_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &sourcef)
{
return transfer_granule(img, granule, length, sourcef, imgtool_floppy_write_sector_from_stream);
}
-static floperr_t read_granule(imgtool::image *img, UINT8 granule, int offset, int length, UINT8 *buf)
+static floperr_t read_granule(imgtool::image &img, UINT8 granule, int offset, int length, UINT8 *buf)
{
UINT8 head, track, sector;
granule_location(img, granule, &head, &track, &sector);
@@ -317,7 +317,7 @@ static floperr_t read_granule(imgtool::image *img, UINT8 granule, int offset, in
-static floperr_t write_granule(imgtool::image *img, UINT8 granule, int offset, int length, const UINT8 *buf)
+static floperr_t write_granule(imgtool::image &img, UINT8 granule, int offset, int length, const UINT8 *buf)
{
UINT8 head, track, sector;
granule_location(img, granule, &head, &track, &sector);
@@ -326,7 +326,7 @@ static floperr_t write_granule(imgtool::image *img, UINT8 granule, int offset, i
-static imgtoolerr_t list_granules(struct bml3_dirent *ent, imgtool::image *img, struct granule_list_t *granule_list)
+static imgtoolerr_t list_granules(struct bml3_dirent *ent, imgtool::image &img, struct granule_list_t *granule_list)
{
floperr_t ferr;
UINT8 max_granules;
@@ -368,7 +368,7 @@ static imgtoolerr_t list_granules(struct bml3_dirent *ent, imgtool::image *img,
-static imgtoolerr_t get_file_size(struct bml3_dirent *ent, imgtool::image *img, const struct granule_list_t *granule_list, size_t *size)
+static imgtoolerr_t get_file_size(struct bml3_dirent *ent, imgtool::image &img, const struct granule_list_t *granule_list, size_t *size)
{
floperr_t ferr;
size_t last_sector_bytes = 0;
@@ -422,7 +422,7 @@ static imgtoolerr_t get_file_size(struct bml3_dirent *ent, imgtool::image *img,
-static imgtoolerr_t process_bml3_file(struct bml3_dirent *ent, imgtool::image *img, imgtool_stream *destf, size_t *size)
+static imgtoolerr_t process_bml3_file(struct bml3_dirent *ent, imgtool::image &img, imgtool::stream *destf, size_t *size)
{
imgtoolerr_t err;
size_t remaining_size, granule_size;
@@ -444,7 +444,7 @@ static imgtoolerr_t process_bml3_file(struct bml3_dirent *ent, imgtool::image *i
for (int c = 0; c < granule_list.granule_count; c++) {
if (granule_size >= remaining_size)
granule_size = remaining_size;
- transfer_from_granule(img, granule_list.granules[c], granule_size, destf);
+ transfer_from_granule(img, granule_list.granules[c], granule_size, *destf);
remaining_size -= granule_size;
}
}
@@ -498,7 +498,7 @@ static imgtoolerr_t prepare_dirent(UINT8 variant, struct bml3_dirent *ent, const
-static imgtoolerr_t bml3_diskimage_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t bml3_diskimage_open(imgtool::image &image, imgtool::stream::ptr &&dummy)
{
// imgtoolerr_t err;
floperr_t ferr;
@@ -548,7 +548,7 @@ static imgtoolerr_t bml3_diskimage_open(imgtool::image *image, imgtool_stream *s
-static imgtoolerr_t bml3_diskimage_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t bml3_diskimage_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
floperr_t ferr;
imgtoolerr_t err;
@@ -556,10 +556,9 @@ static imgtoolerr_t bml3_diskimage_nextenum(imgtool::directory *enumeration, img
struct bml3_direnum *rsenum;
struct bml3_dirent rsent;
char fname[13];
- imgtool::image *image;
+ imgtool::image &image(enumeration.image());
- image = &enumeration->image();
- rsenum = (struct bml3_direnum *) enumeration->extra_bytes();
+ rsenum = (struct bml3_direnum *) enumeration.extra_bytes();
/* Did we hit the end of file before? */
if (rsenum->eof)
@@ -581,46 +580,46 @@ static imgtoolerr_t bml3_diskimage_nextenum(imgtool::directory *enumeration, img
{
rsenum->eof = 1;
eof:
- ent->eof = 1;
+ ent.eof = 1;
}
else
{
/* Not the end of file */
- err = process_bml3_file(&rsent, image, NULL, &filesize);
+ err = process_bml3_file(&rsent, image, nullptr, &filesize);
if (err)
return err;
if (filesize == ((size_t) -1))
{
/* corrupt! */
- ent->filesize = 0;
- ent->corrupt = 1;
+ ent.filesize = 0;
+ ent.corrupt = 1;
}
else
{
- ent->filesize = filesize;
- ent->corrupt = 0;
+ ent.filesize = filesize;
+ ent.corrupt = 0;
}
- ent->eof = 0;
+ ent.eof = 0;
get_dirent_fname(fname, &rsent);
- snprintf(ent->filename, ARRAY_LENGTH(ent->filename), "%s", fname);
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%d %c", (int) rsent.ftype, (char) (rsent.asciiflag + 'B'));
+ snprintf(ent.filename, ARRAY_LENGTH(ent.filename), "%s", fname);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%d %c", (int) rsent.ftype, (char) (rsent.asciiflag + 'B'));
}
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t bml3_diskimage_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t bml3_diskimage_freespace(imgtool::partition &partition, UINT64 *size)
{
floperr_t ferr;
UINT8 i;
size_t s = 0;
UINT8 granule_count;
UINT8 granule_map[MAX_GRANULEMAP_SIZE];
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
bml3_diskinfo *info = bml3_get_diskinfo(image);
ferr = get_granule_map(image, granule_map, &granule_count);
@@ -638,7 +637,7 @@ static imgtoolerr_t bml3_diskimage_freespace(imgtool::partition *partition, UINT
-static imgtoolerr_t delete_entry(imgtool::image *img, struct bml3_dirent *ent, int pos)
+static imgtoolerr_t delete_entry(imgtool::image &img, struct bml3_dirent *ent, int pos)
{
floperr_t ferr;
unsigned char g, i;
@@ -673,18 +672,18 @@ static imgtoolerr_t delete_entry(imgtool::image *img, struct bml3_dirent *ent, i
-static imgtoolerr_t bml3_diskimage_readfile(imgtool::partition *partition, const char *fname, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t bml3_diskimage_readfile(imgtool::partition &partition, const char *fname, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
struct bml3_dirent ent;
size_t size;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
- err = lookup_bml3_file(img, fname, &ent, NULL);
+ err = lookup_bml3_file(img, fname, &ent, nullptr);
if (err)
return err;
- err = process_bml3_file(&ent, img, destf, &size);
+ err = process_bml3_file(&ent, img, &destf, &size);
if (err)
return err;
@@ -696,11 +695,11 @@ static imgtoolerr_t bml3_diskimage_readfile(imgtool::partition *partition, const
-static imgtoolerr_t bml3_diskimage_writefile(imgtool::partition *partition, const char *fname, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t bml3_diskimage_writefile(imgtool::partition &partition, const char *fname, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions)
{
floperr_t ferr;
imgtoolerr_t err;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
bml3_diskinfo *info = bml3_get_diskinfo(img);
struct bml3_dirent ent, ent2;
size_t i;
@@ -724,7 +723,7 @@ static imgtoolerr_t bml3_diskimage_writefile(imgtool::partition *partition, cons
return err;
/* is there enough space? */
- sz = read_sz = stream_size(sourcef);
+ sz = read_sz = sourcef.size();
if (info->variant == 0) {
// also need to write EOF
sz++;
@@ -817,10 +816,10 @@ static imgtoolerr_t bml3_diskimage_writefile(imgtool::partition *partition, cons
-static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition *partition, const char *fname)
+static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition &partition, const char *fname)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
int pos = 0;
struct bml3_dirent ent;
@@ -833,10 +832,10 @@ static imgtoolerr_t bml3_diskimage_deletefile(imgtool::partition *partition, con
-static imgtoolerr_t bml3_diskimage_suggesttransfer(imgtool::partition *partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t bml3_diskimage_suggesttransfer(imgtool::partition &partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
struct bml3_dirent ent;
int pos;
diff --git a/src/tools/imgtool/modules/concept.cpp b/src/tools/imgtool/modules/concept.cpp
index 69e1ecb987d..35446396065 100644
--- a/src/tools/imgtool/modules/concept.cpp
+++ b/src/tools/imgtool/modules/concept.cpp
@@ -112,7 +112,7 @@ struct concept_dev_dir
*/
struct concept_image
{
- imgtool_stream *file_handle; /* imgtool file handle */
+ imgtool::stream *file_handle; /* imgtool file handle */
concept_dev_dir dev_dir; /* cached copy of device directory */
};
@@ -126,18 +126,18 @@ struct concept_iterator
};
-static imgtoolerr_t concept_image_init(imgtool::image *img, imgtool_stream *f);
-static void concept_image_exit(imgtool::image *img);
-static void concept_image_info(imgtool::image *img, char *string, size_t len);
-static imgtoolerr_t concept_image_beginenum(imgtool::directory *enumeration, const char *path);
-static imgtoolerr_t concept_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent);
-static void concept_image_closeenum(imgtool::directory *enumeration);
-static imgtoolerr_t concept_image_freespace(imgtool::partition *partition, UINT64 *size);
-static imgtoolerr_t concept_image_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf);
+static imgtoolerr_t concept_image_init(imgtool::image &img, imgtool::stream::ptr &&stream);
+static void concept_image_exit(imgtool::image &img);
+static void concept_image_info(imgtool::image &img, std::ostream &stream);
+static imgtoolerr_t concept_image_beginenum(imgtool::directory &enumeration, const char *path);
+static imgtoolerr_t concept_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent);
+static void concept_image_closeenum(imgtool::directory &enumeration);
+static imgtoolerr_t concept_image_freespace(imgtool::partition &partition, UINT64 *size);
+static imgtoolerr_t concept_image_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf);
#if 0
-static imgtoolerr_t concept_image_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions);
-static imgtoolerr_t concept_image_deletefile(imgtool::partition *partition, const char *filename);
-static imgtoolerr_t concept_image_create(const imgtool_module *mod, imgtool_stream *f, util::option_resolution *createoptions);
+static imgtoolerr_t concept_image_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream *sourcef, util::option_resolution *writeoptions);
+static imgtoolerr_t concept_image_deletefile(imgtool::partition &partition, const char *filename);
+static imgtoolerr_t concept_image_create(const imgtool_module *mod, imgtool::stream *f, util::option_resolution *createoptions);
#endif
void concept_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinfo *info)
@@ -169,6 +169,11 @@ void concept_get_info(const imgtool_class *imgclass, UINT32 state, union imgtool
}
}
+static concept_image *get_concept_image(imgtool::image &image)
+{
+ return (concept_image *)image.extra_bytes();
+}
+
/*
read_physical_record
@@ -180,16 +185,16 @@ void concept_get_info(const imgtool_class *imgclass, UINT32 state, union imgtool
Return non-zero on error
*/
-static int read_physical_record(imgtool_stream *file_handle, int secnum, void *dest)
+static int read_physical_record(imgtool::stream &file_handle, int secnum, void *dest)
{
int reply;
/* seek to sector */
- reply = stream_seek(file_handle, secnum*512, SEEK_SET);
+ reply = file_handle.seek(secnum*512, SEEK_SET);
if (reply)
return 1;
/* read it */
- reply = stream_read(file_handle, dest, 512);
+ reply = file_handle.read(dest, 512);
if (reply != 512)
return 1;
@@ -208,16 +213,16 @@ static int read_physical_record(imgtool_stream *file_handle, int secnum, void *d
Return non-zero on error
*/
-static int write_physical_record(imgtool_stream *file_handle, int secnum, const void *src)
+static int write_physical_record(imgtool::stream *file_handle, int secnum, const void *src)
{
int reply;
/* seek to sector */
- reply = stream_seek(file_handle, secnum*512, SEEK_SET);
+ reply = file_handle->seek(secnum*512, SEEK_SET);
if (reply)
return 1;
/* read it */
- reply = stream_write(file_handle, src, 512);
+ reply = file_handle->write(src, 512);
if (reply != 512)
return 1;
@@ -260,19 +265,17 @@ static int get_catalog_entry(concept_image *image, const unsigned char *filename
/*
Open a file as a concept_image.
*/
-static imgtoolerr_t concept_image_init(imgtool::image *img, imgtool_stream *f)
+static imgtoolerr_t concept_image_init(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- concept_image *image = (concept_image *) img->extra_bytes();
+ concept_image *image = get_concept_image(img);
int reply;
int i;
unsigned totphysrecs;
- image->file_handle = f;
-
/* read device directory */
for (i=0; i<4; i++)
{
- reply = read_physical_record(f, i+2, ((char *) & image->dev_dir)+i*512);
+ reply = read_physical_record(*stream, i+2, ((char *) & image->dev_dir)+i*512);
if (reply)
return IMGTOOLERR_READERROR;
}
@@ -283,21 +286,22 @@ static imgtoolerr_t concept_image_init(imgtool::image *img, imgtool_stream *f)
if ((get_UINT16xE(image->dev_dir.vol_hdr.disk_flipped, image->dev_dir.vol_hdr.first_block) != 0)
|| (get_UINT16xE(image->dev_dir.vol_hdr.disk_flipped, image->dev_dir.vol_hdr.next_block) != 6)
- || (totphysrecs < 6) /*|| (stream_size(f) != totphysrecs*512)*/
+ || (totphysrecs < 6) /*|| (f->size() != totphysrecs*512)*/
|| (image->dev_dir.vol_hdr.volname[0] > 7))
{
return IMGTOOLERR_CORRUPTIMAGE;
}
+ image->file_handle = stream.release();
return IMGTOOLERR_SUCCESS;
}
/*
close a concept_image
*/
-static void concept_image_exit(imgtool::image *img)
+static void concept_image_exit(imgtool::image &img)
{
- /*concept_image *image = (concept_image *) img->extra_bytes();*/
+ /*concept_image *image = get_concept_image(img);*/
}
/*
@@ -305,26 +309,26 @@ static void concept_image_exit(imgtool::image *img)
Currently returns the volume name
*/
-static void concept_image_info(imgtool::image *img, char *string, size_t len)
+static void concept_image_info(imgtool::image &img, std::ostream &stream)
{
- concept_image *image = (concept_image *) img->extra_bytes();
+ concept_image *image = get_concept_image(img);
char vol_name[8];
memcpy(vol_name, image->dev_dir.vol_hdr.volname + 1, image->dev_dir.vol_hdr.volname[0]);
vol_name[image->dev_dir.vol_hdr.volname[0]] = 0;
- snprintf(string, len, "%s", vol_name);
+ stream << vol_name;
}
/*
Open the disk catalog for enumeration
*/
-static imgtoolerr_t concept_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t concept_image_beginenum(imgtool::directory &enumeration, const char *path)
{
concept_iterator *iter;
- iter = (concept_iterator *) enumeration->extra_bytes();
- iter->image = (concept_image *) enumeration->image().extra_bytes();
+ iter = (concept_iterator *) enumeration.extra_bytes();
+ iter->image = (concept_image *) enumeration.image().extra_bytes();
iter->index = 0;
return IMGTOOLERR_SUCCESS;
}
@@ -332,31 +336,31 @@ static imgtoolerr_t concept_image_beginenum(imgtool::directory *enumeration, con
/*
Enumerate disk catalog next entry
*/
-static imgtoolerr_t concept_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t concept_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- concept_iterator *iter = (concept_iterator *) enumeration->extra_bytes();
+ concept_iterator *iter = (concept_iterator *) enumeration.extra_bytes();
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
if ((iter->image->dev_dir.file_dir[iter->index].filename[0] == 0) || (iter->index > 77))
{
- ent->eof = 1;
+ ent.eof = 1;
}
else if (iter->image->dev_dir.file_dir[iter->index].filename[0] > 15)
{
- ent->corrupt = 1;
+ ent.corrupt = 1;
}
else
{
int len = iter->image->dev_dir.file_dir[iter->index].filename[0];
const char *type;
- if (len > ARRAY_LENGTH(ent->filename))
- len = ARRAY_LENGTH(ent->filename);
- memcpy(ent->filename, iter->image->dev_dir.file_dir[iter->index].filename + 1, len);
- ent->filename[len] = 0;
+ if (len > ARRAY_LENGTH(ent.filename))
+ len = ARRAY_LENGTH(ent.filename);
+ memcpy(ent.filename, iter->image->dev_dir.file_dir[iter->index].filename + 1, len);
+ ent.filename[len] = 0;
/* parse flags */
switch (get_UINT16xE(iter->image->dev_dir.vol_hdr.disk_flipped, iter->image->dev_dir.file_dir[iter->index].ftype) & 0xf)
@@ -378,10 +382,10 @@ static imgtoolerr_t concept_image_nextenum(imgtool::directory *enumeration, imgt
type = "???";
break;
}
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%s", type);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%s", type);
/* len in physrecs */
- ent->filesize = get_UINT16xE(iter->image->dev_dir.vol_hdr.disk_flipped, iter->image->dev_dir.file_dir[iter->index].next_block)
+ ent.filesize = get_UINT16xE(iter->image->dev_dir.vol_hdr.disk_flipped, iter->image->dev_dir.file_dir[iter->index].next_block)
- get_UINT16xE(iter->image->dev_dir.vol_hdr.disk_flipped, iter->image->dev_dir.file_dir[iter->index].first_block);
iter->index++;
@@ -393,17 +397,17 @@ static imgtoolerr_t concept_image_nextenum(imgtool::directory *enumeration, imgt
/*
Free enumerator
*/
-static void concept_image_closeenum(imgtool::directory *enumeration)
+static void concept_image_closeenum(imgtool::directory &enumeration)
{
}
/*
Compute free space on disk image
*/
-static imgtoolerr_t concept_image_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t concept_image_freespace(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *img = &partition->image();
- concept_image *image = (concept_image*) img;
+ imgtool::image &img(partition.image());
+ concept_image *image = get_concept_image(img);
int free_blocks;
int i;
@@ -426,10 +430,10 @@ static imgtoolerr_t concept_image_freespace(imgtool::partition *partition, UINT6
/*
Extract a file from a concept_image.
*/
-static imgtoolerr_t concept_image_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t concept_image_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool::image *img = &partition->image();
- concept_image *image = (concept_image *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ concept_image *image = get_concept_image(img);
size_t filename_len = strlen(filename);
unsigned char concept_fname[16];
int catalog_index;
@@ -449,10 +453,10 @@ static imgtoolerr_t concept_image_readfile(imgtool::partition *partition, const
i < get_UINT16xE(image->dev_dir.vol_hdr.disk_flipped, image->dev_dir.file_dir[catalog_index].next_block);
i++)
{
- if (read_physical_record(image->file_handle, i, buf))
+ if (read_physical_record(*image->file_handle, i, buf))
return IMGTOOLERR_READERROR;
- if (stream_write(destf, buf, 512) != 512)
+ if (destf.write(buf, 512) != 512)
return IMGTOOLERR_WRITEERROR;
}
@@ -463,7 +467,7 @@ static imgtoolerr_t concept_image_readfile(imgtool::partition *partition, const
/*
Add a file to a concept_image.
*/
-static imgtoolerr_t concept_image_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t concept_image_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream *sourcef, util::option_resolution *writeoptions)
{
/* ... */
@@ -473,7 +477,7 @@ static imgtoolerr_t concept_image_writefile(imgtool::partition *partition, const
/*
Delete a file from a concept_image.
*/
-static imgtoolerr_t concept_image_deletefile(imgtool::partition *partition, const char *filename)
+static imgtoolerr_t concept_image_deletefile(imgtool::partition &partition, const char *filename)
{
/* ... */
@@ -483,7 +487,7 @@ static imgtoolerr_t concept_image_deletefile(imgtool::partition *partition, cons
/*
Create a blank concept_image.
*/
-static imgtoolerr_t concept_image_create(const imgtool_module *mod, imgtool_stream *f, util::option_resolution *createoptions)
+static imgtoolerr_t concept_image_create(const imgtool_module *mod, imgtool::stream *f, util::option_resolution *createoptions)
{
/* ... */
diff --git a/src/tools/imgtool/modules/cybiko.cpp b/src/tools/imgtool/modules/cybiko.cpp
index a1f4a8c6129..78dd11e4951 100644
--- a/src/tools/imgtool/modules/cybiko.cpp
+++ b/src/tools/imgtool/modules/cybiko.cpp
@@ -14,7 +14,7 @@
struct cybiko_file_system
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
UINT32 page_count, page_size, block_count_boot, block_count_file;
UINT16 write_count;
};
@@ -58,6 +58,11 @@ enum
#define FILE_HEADER_SIZE 0x48
+static cybiko_file_system *get_cfs(imgtool::image &image)
+{
+ return (cybiko_file_system*)image.extra_bytes();
+}
+
// 2208988800 is the number of seconds between 1900/01/01 and 1970/01/01
static time_t time_crack( UINT32 cfs_time)
@@ -161,16 +166,16 @@ static int cfs_page_to_block( cybiko_file_system *cfs, UINT32 page, int *block_t
static int cfs_page_read( cybiko_file_system *cfs, UINT8 *buffer, UINT32 page)
{
if (page >= cfs->page_count) return FALSE;
- stream_seek( cfs->stream, page * cfs->page_size, SEEK_SET);
- stream_read( cfs->stream, buffer, cfs->page_size);
+ cfs->stream->seek(page * cfs->page_size, SEEK_SET);
+ cfs->stream->read(buffer, cfs->page_size);
return TRUE;
}
static int cfs_page_write( cybiko_file_system *cfs, UINT8 *buffer, UINT32 page)
{
if (page >= cfs->page_count) return FALSE;
- stream_seek( cfs->stream, page * cfs->page_size, SEEK_SET);
- stream_write( cfs->stream, buffer, cfs->page_size);
+ cfs->stream->seek(page * cfs->page_size, SEEK_SET);
+ cfs->stream->write(buffer, cfs->page_size);
return TRUE;
}
@@ -252,32 +257,32 @@ static int cfs_file_find( cybiko_file_system *cfs, const char *filename, UINT16
return FALSE;
}
-static int cfs_verify( cybiko_file_system *cfs)
+static int cfs_verify(cybiko_file_system &cfs)
{
UINT8 buffer[MAX_PAGE_SIZE];
int i, block_type;
- for (i=0;i<cfs->page_count;i++)
+ for (i = 0; i < cfs.page_count; i++)
{
- if (!cfs_page_read( cfs, buffer, i)) return FALSE;
- if (!cfs_page_to_block( cfs, i, &block_type, NULL)) return FALSE;
- if (!page_buffer_verify( buffer, cfs->page_size, block_type)) return FALSE;
+ if (!cfs_page_read(&cfs, buffer, i)) return FALSE;
+ if (!cfs_page_to_block(&cfs, i, &block_type, NULL)) return FALSE;
+ if (!page_buffer_verify(buffer, cfs.page_size, block_type)) return FALSE;
}
return TRUE;
}
-static int cfs_init( cybiko_file_system *cfs, imgtool_stream *stream, int flash_type)
+static int cfs_init(cybiko_file_system &cfs, imgtool::stream::ptr &&stream, int flash_type)
{
- cfs->stream = stream;
+ cfs.stream = stream.release();
switch (flash_type)
{
- case FLASH_TYPE_AT45DB041 : cfs->page_count = 2048; cfs->page_size = 264; break;
- case FLASH_TYPE_AT45DB081 : cfs->page_count = 4096; cfs->page_size = 264; break;
- case FLASH_TYPE_AT45DB161 : cfs->page_count = 4096; cfs->page_size = 528; break;
+ case FLASH_TYPE_AT45DB041 : cfs.page_count = 2048; cfs.page_size = 264; break;
+ case FLASH_TYPE_AT45DB081 : cfs.page_count = 4096; cfs.page_size = 264; break;
+ case FLASH_TYPE_AT45DB161 : cfs.page_count = 4096; cfs.page_size = 528; break;
default : return FALSE;
}
- cfs->block_count_boot = 5;
- cfs->block_count_file = cfs->page_count - cfs->block_count_boot;
- cfs->write_count = 0;
+ cfs.block_count_boot = 5;
+ cfs.block_count_file = cfs.page_count - cfs.block_count_boot;
+ cfs.write_count = 0;
return TRUE;
}
@@ -345,57 +350,57 @@ static int flash_option_to_flash_type( int option)
}
}
-static imgtoolerr_t cybiko_image_open( imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t cybiko_image_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ cybiko_file_system *cfs = get_cfs(image);
int flash_type;
// init
- flash_type = flash_size_to_flash_type( stream_size( stream));
- if (!cfs_init( cfs, stream, flash_type)) return IMGTOOLERR_CORRUPTIMAGE;
+ flash_type = flash_size_to_flash_type(stream->size());
+ if (!cfs_init(*cfs, std::move(stream), flash_type)) return IMGTOOLERR_CORRUPTIMAGE;
// verify
- if (!cfs_verify( cfs)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_verify(*cfs)) return IMGTOOLERR_CORRUPTIMAGE;
// ok
return IMGTOOLERR_SUCCESS;
}
-static void cybiko_image_close( imgtool::image *image)
+static void cybiko_image_close(imgtool::image &image)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
- stream_close( cfs->stream);
+ cybiko_file_system *cfs = get_cfs(image);
+ delete cfs->stream;
}
-static imgtoolerr_t cybiko_image_create( imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t cybiko_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ cybiko_file_system *cfs = get_cfs(image);
int flash_type;
// init
flash_type = flash_option_to_flash_type(opts->lookup_int('F'));
- if (!cfs_init( cfs, stream, flash_type)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_init(*cfs, std::move(stream), flash_type)) return IMGTOOLERR_CORRUPTIMAGE;
// format
- if (!cfs_format( cfs)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_format(cfs)) return IMGTOOLERR_CORRUPTIMAGE;
// ok
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_begin_enum( imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t cybiko_image_begin_enum(imgtool::directory &enumeration, const char *path)
{
- cybiko_iter *iter = (cybiko_iter*)enumeration->extra_bytes();
+ cybiko_iter *iter = (cybiko_iter*)enumeration.extra_bytes();
iter->block = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_next_enum( imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t cybiko_image_next_enum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- imgtool::image *image = &enumeration->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
- cybiko_iter *iter = (cybiko_iter*)enumeration->extra_bytes();
+ imgtool::image &image(enumeration.image());
+ cybiko_file_system *cfs = get_cfs(image);
+ cybiko_iter *iter = (cybiko_iter*)enumeration.extra_bytes();
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id = INVALID_FILE_ID;
cfs_file file;
// find next file
while (iter->block < cfs->block_count_file)
{
- if (!cfs_block_read( cfs, buffer, BLOCK_TYPE_FILE, iter->block++)) return IMGTOOLERR_READERROR;
+ if (!cfs_block_read(cfs, buffer, BLOCK_TYPE_FILE, iter->block++)) return IMGTOOLERR_READERROR;
if (BLOCK_USED(buffer) && (BLOCK_PART_ID(buffer) == 0))
{
file_id = BLOCK_FILE_ID(buffer);
@@ -403,38 +408,33 @@ static imgtoolerr_t cybiko_image_next_enum( imgtool::directory *enumeration, img
}
}
// get file information
- if ((file_id != INVALID_FILE_ID) && cfs_file_info( cfs, file_id, &file))
+ if ((file_id != INVALID_FILE_ID) && cfs_file_info(cfs, file_id, &file))
{
- strcpy( ent->filename, file.name);
- ent->filesize = file.size;
- ent->lastmodified_time = time_crack( file.date);
- ent->filesize = file.size;
+ strcpy(ent.filename, file.name);
+ ent.filesize = file.size;
+ ent.lastmodified_time = time_crack(file.date);
+ ent.filesize = file.size;
}
else
{
- ent->eof = 1;
+ ent.eof = 1;
}
// ok
return IMGTOOLERR_SUCCESS;
}
-static void cybiko_image_close_enum( imgtool::directory *enumeration)
-{
- // nothing
-}
-
-static imgtoolerr_t cybiko_image_free_space( imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t cybiko_image_free_space(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
if (size) *size = cfs_calc_free_space( cfs, cfs_calc_free_blocks( cfs));
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t cybiko_image_read_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id, part_id = 0, old_part_id;
int i;
@@ -449,7 +449,7 @@ static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const
if (!cfs_block_read( cfs, buffer, BLOCK_TYPE_FILE, i)) return IMGTOOLERR_READERROR;
if (BLOCK_USED(buffer) && (BLOCK_FILE_ID(buffer) == file_id) && (BLOCK_PART_ID(buffer) == part_id))
{
- stream_write( destf, buffer + 6 + ((part_id == 0) ? FILE_HEADER_SIZE : 0), buffer[1]);
+ destf.write(buffer + 6 + ((part_id == 0) ? FILE_HEADER_SIZE : 0), buffer[1]);
part_id++;
}
}
@@ -458,32 +458,32 @@ static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t cybiko_image_write_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id, part_id = 0, free_blocks;
UINT64 bytes_left;
cfs_file file;
int i;
// find file
- if (!cfs_file_find( cfs, filename, &file_id)) file_id = INVALID_FILE_ID;
+ if (!cfs_file_find(cfs, filename, &file_id)) file_id = INVALID_FILE_ID;
// check free space
free_blocks = cfs_calc_free_blocks( cfs);
if (file_id != INVALID_FILE_ID)
{
- if (!cfs_file_info( cfs, file_id, &file)) return IMGTOOLERR_UNEXPECTED;
+ if (!cfs_file_info(cfs, file_id, &file)) return IMGTOOLERR_UNEXPECTED;
free_blocks += file.blocks;
}
- if (cfs_calc_free_space( cfs, free_blocks) < stream_size( sourcef)) return IMGTOOLERR_NOSPACE;
+ if (cfs_calc_free_space(cfs, free_blocks) < sourcef.size()) return IMGTOOLERR_NOSPACE;
// delete file
if (file_id != INVALID_FILE_ID)
{
if (!cfs_file_delete( cfs, file_id)) return IMGTOOLERR_UNEXPECTED;
}
// create/write destination file
- bytes_left = stream_size( sourcef);
+ bytes_left = sourcef.size();
i = 0;
while ((bytes_left > 0) && (i < cfs->block_count_file))
{
@@ -500,13 +500,13 @@ static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, cons
if (part_id == 0)
{
buffer[6] = 0;
- strcpy( BLOCK_FILENAME(buffer), filename);
+ strcpy(BLOCK_FILENAME(buffer), filename);
buffer_write_32_be( buffer + 6 + FILE_HEADER_SIZE - 4, time_setup( time( NULL)));
- stream_read( sourcef, buffer + 6 + FILE_HEADER_SIZE, buffer[1]);
+ sourcef.read(buffer + 6 + FILE_HEADER_SIZE, buffer[1]);
}
else
{
- stream_read( sourcef, buffer + 6, buffer[1]);
+ sourcef.read(buffer + 6, buffer[1]);
}
if (!cfs_block_write( cfs, buffer, BLOCK_TYPE_FILE, i)) return IMGTOOLERR_WRITEERROR;
bytes_left -= buffer[1];
@@ -518,10 +518,10 @@ static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, cons
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_delete_file( imgtool::partition *partition, const char *filename)
+static imgtoolerr_t cybiko_image_delete_file(imgtool::partition &partition, const char *filename)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT16 file_id;
// find file
if (!cfs_file_find( cfs, filename, &file_id)) return IMGTOOLERR_FILENOTFOUND;
@@ -559,7 +559,6 @@ void cybiko_get_info( const imgtool_class *imgclass, UINT32 state, union imgtool
case IMGTOOLINFO_PTR_CLOSE : info->close = cybiko_image_close; break;
case IMGTOOLINFO_PTR_BEGIN_ENUM : info->begin_enum = cybiko_image_begin_enum; break;
case IMGTOOLINFO_PTR_NEXT_ENUM : info->next_enum = cybiko_image_next_enum; break;
- case IMGTOOLINFO_PTR_CLOSE_ENUM : info->close_enum = cybiko_image_close_enum; break;
case IMGTOOLINFO_PTR_FREE_SPACE : info->free_space = cybiko_image_free_space; break;
case IMGTOOLINFO_PTR_READ_FILE : info->read_file = cybiko_image_read_file; break;
case IMGTOOLINFO_PTR_WRITE_FILE : info->write_file = cybiko_image_write_file; break;
diff --git a/src/tools/imgtool/modules/cybikoxt.cpp b/src/tools/imgtool/modules/cybikoxt.cpp
index afbeb236bb0..d5644a708fd 100644
--- a/src/tools/imgtool/modules/cybikoxt.cpp
+++ b/src/tools/imgtool/modules/cybikoxt.cpp
@@ -14,7 +14,7 @@
struct cybiko_file_system
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
UINT32 page_count, page_size, block_count_boot, block_count_file;
UINT16 write_count;
};
@@ -50,6 +50,11 @@ enum
#define FILE_HEADER_SIZE 0x48
+static cybiko_file_system *get_cfs(imgtool::image &image)
+{
+ return (cybiko_file_system*)image.extra_bytes();
+}
+
// 2208988800 is the number of seconds between 1900/01/01 and 1970/01/01
static time_t time_crack( UINT32 cfs_time)
@@ -150,16 +155,16 @@ static int cfs_page_to_block( cybiko_file_system *cfs, UINT32 page, int *block_t
static int cfs_page_read( cybiko_file_system *cfs, UINT8 *buffer, UINT32 page)
{
if (page >= cfs->page_count) return FALSE;
- stream_seek( cfs->stream, page * cfs->page_size, SEEK_SET);
- stream_read( cfs->stream, buffer, cfs->page_size);
+ cfs->stream->seek(page * cfs->page_size, SEEK_SET);
+ cfs->stream->read(buffer, cfs->page_size);
return TRUE;
}
static int cfs_page_write( cybiko_file_system *cfs, UINT8 *buffer, UINT32 page)
{
if (page >= cfs->page_count) return FALSE;
- stream_seek( cfs->stream, page * cfs->page_size, SEEK_SET);
- stream_write( cfs->stream, buffer, cfs->page_size);
+ cfs->stream->seek(page * cfs->page_size, SEEK_SET);
+ cfs->stream->write(buffer, cfs->page_size);
return TRUE;
}
@@ -247,31 +252,31 @@ static int cfs_file_find( cybiko_file_system *cfs, const char *filename, UINT16
return FALSE;
}
-static int cfs_verify( cybiko_file_system *cfs)
+static bool cfs_verify(cybiko_file_system &cfs)
{
UINT8 buffer[MAX_PAGE_SIZE];
int i, block_type;
- for (i=0;i<cfs->page_count;i++)
+ for (i = 0; i < cfs.page_count; i++)
{
- if (!cfs_page_read( cfs, buffer, i)) return FALSE;
- if (!cfs_page_to_block( cfs, i, &block_type, NULL)) return FALSE;
- if (!page_buffer_verify( buffer, cfs->page_size, block_type)) return FALSE;
+ if (!cfs_page_read(&cfs, buffer, i)) return false;
+ if (!cfs_page_to_block(&cfs, i, &block_type, NULL)) return false;
+ if (!page_buffer_verify(buffer, cfs.page_size, block_type)) return false;
}
- return TRUE;
+ return true;
}
-static int cfs_init( cybiko_file_system *cfs, imgtool_stream *stream)
+static bool cfs_init(cybiko_file_system &cfs, imgtool::stream::ptr &&stream)
{
- cfs->stream = stream;
- cfs->page_count = 2005;
- cfs->page_size = 258;
- cfs->block_count_boot = 5;
- cfs->block_count_file = cfs->page_count - cfs->block_count_boot;
- cfs->write_count = 0;
- return TRUE;
+ cfs.stream = stream.release();
+ cfs.page_count = 2005;
+ cfs.page_size = 258;
+ cfs.block_count_boot = 5;
+ cfs.block_count_file = cfs.page_count - cfs.block_count_boot;
+ cfs.write_count = 0;
+ return true;
}
-static int cfs_format( cybiko_file_system *cfs)
+static int cfs_format(cybiko_file_system *cfs)
{
UINT8 buffer[MAX_PAGE_SIZE];
int i;
@@ -292,7 +297,7 @@ static int cfs_format( cybiko_file_system *cfs)
buffer[0] = 0xFF;
for (i=0;i<0x1B56;i++)
{
- stream_write( cfs->stream, buffer, 1);
+ cfs->stream->write(buffer, 1);
}
// ok
return TRUE;
@@ -319,53 +324,53 @@ static UINT32 cfs_calc_free_space( cybiko_file_system *cfs, UINT16 blocks)
return free_space;
}
-static imgtoolerr_t cybiko_image_open( imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t cybiko_image_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ cybiko_file_system *cfs = get_cfs(image);
// init
- if (!cfs_init( cfs, stream)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_init(*cfs, std::move(stream))) return IMGTOOLERR_CORRUPTIMAGE;
// verify
- if (!cfs_verify( cfs)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_verify(*cfs)) return IMGTOOLERR_CORRUPTIMAGE;
// ok
return IMGTOOLERR_SUCCESS;
}
-static void cybiko_image_close( imgtool::image *image)
+static void cybiko_image_close(imgtool::image &image)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
- stream_close( cfs->stream);
+ cybiko_file_system *cfs = get_cfs(image);
+ delete cfs->stream;
}
-static imgtoolerr_t cybiko_image_create( imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t cybiko_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ cybiko_file_system *cfs = get_cfs(image);
// init
- if (!cfs_init( cfs, stream)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_init(*cfs, std::move(stream))) return IMGTOOLERR_CORRUPTIMAGE;
// format
- if (!cfs_format( cfs)) return IMGTOOLERR_CORRUPTIMAGE;
+ if (!cfs_format(cfs)) return IMGTOOLERR_CORRUPTIMAGE;
// ok
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_begin_enum( imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t cybiko_image_begin_enum(imgtool::directory &enumeration, const char *path)
{
- cybiko_iter *iter = (cybiko_iter*)enumeration->extra_bytes();
+ cybiko_iter *iter = (cybiko_iter*)enumeration.extra_bytes();
iter->block = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_next_enum( imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t cybiko_image_next_enum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- imgtool::image *image = &enumeration->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
- cybiko_iter *iter = (cybiko_iter*)enumeration->extra_bytes();
+ imgtool::image &image(enumeration.image());
+ cybiko_file_system *cfs = get_cfs(image);
+ cybiko_iter *iter = (cybiko_iter*)enumeration.extra_bytes();
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id = INVALID_FILE_ID;
cfs_file file;
// find next file
while (iter->block < cfs->block_count_file)
{
- if (!cfs_block_read( cfs, buffer, BLOCK_TYPE_FILE, iter->block++)) return IMGTOOLERR_READERROR;
+ if (!cfs_block_read(cfs, buffer, BLOCK_TYPE_FILE, iter->block++)) return IMGTOOLERR_READERROR;
if (BLOCK_USED(buffer) && (BLOCK_PART_ID(buffer) == 0))
{
file_id = BLOCK_FILE_ID(buffer);
@@ -373,38 +378,33 @@ static imgtoolerr_t cybiko_image_next_enum( imgtool::directory *enumeration, img
}
}
// get file information
- if ((file_id != INVALID_FILE_ID) && cfs_file_info( cfs, file_id, &file))
+ if ((file_id != INVALID_FILE_ID) && cfs_file_info(cfs, file_id, &file))
{
- strcpy( ent->filename, file.name);
- ent->filesize = file.size;
- ent->lastmodified_time = time_crack( file.date);
- ent->filesize = file.size;
+ strcpy(ent.filename, file.name);
+ ent.filesize = file.size;
+ ent.lastmodified_time = time_crack(file.date);
+ ent.filesize = file.size;
}
else
{
- ent->eof = 1;
+ ent.eof = 1;
}
// ok
return IMGTOOLERR_SUCCESS;
}
-static void cybiko_image_close_enum( imgtool::directory *enumeration)
+static imgtoolerr_t cybiko_image_free_space(imgtool::partition &partition, UINT64 *size)
{
- // nothing
-}
-
-static imgtoolerr_t cybiko_image_free_space( imgtool::partition *partition, UINT64 *size)
-{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
if (size) *size = cfs_calc_free_space( cfs, cfs_calc_free_blocks( cfs));
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t cybiko_image_read_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id, part_id = 0, old_part_id;
int i;
@@ -421,7 +421,7 @@ static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const
if (!cfs_block_read( cfs, buffer, BLOCK_TYPE_FILE, i)) return IMGTOOLERR_READERROR;
if (BLOCK_USED(buffer) && (BLOCK_FILE_ID(buffer) == file_id) && (BLOCK_PART_ID(buffer) == part_id))
{
- stream_write( destf, buffer + 6 + ((part_id == 0) ? FILE_HEADER_SIZE : 0), buffer[1]);
+ destf.write(buffer + 6 + ((part_id == 0) ? FILE_HEADER_SIZE : 0), buffer[1]);
part_id++;
}
}
@@ -430,10 +430,10 @@ static imgtoolerr_t cybiko_image_read_file( imgtool::partition *partition, const
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t cybiko_image_write_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT8 buffer[MAX_PAGE_SIZE];
UINT16 file_id, part_id = 0, free_blocks;
UINT64 bytes_left;
@@ -444,20 +444,20 @@ static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, cons
// find file
if (!cfs_file_find( cfs, filename, &file_id)) file_id = INVALID_FILE_ID;
// check free space
- free_blocks = cfs_calc_free_blocks( cfs);
+ free_blocks = cfs_calc_free_blocks(cfs);
if (file_id != INVALID_FILE_ID)
{
- if (!cfs_file_info( cfs, file_id, &file)) return IMGTOOLERR_UNEXPECTED;
+ if (!cfs_file_info(cfs, file_id, &file)) return IMGTOOLERR_UNEXPECTED;
free_blocks += file.blocks;
}
- if (cfs_calc_free_space( cfs, free_blocks) < stream_size( sourcef)) return IMGTOOLERR_NOSPACE;
+ if (cfs_calc_free_space(cfs, free_blocks) < sourcef.size()) return IMGTOOLERR_NOSPACE;
// delete file
if (file_id != INVALID_FILE_ID)
{
- if (!cfs_file_delete( cfs, file_id)) return IMGTOOLERR_UNEXPECTED;
+ if (!cfs_file_delete(cfs, file_id)) return IMGTOOLERR_UNEXPECTED;
}
// create/write destination file
- bytes_left = stream_size( sourcef);
+ bytes_left = sourcef.size();
i = 0;
while (i < cfs->block_count_file)
{
@@ -474,13 +474,13 @@ static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, cons
if (part_id == 0)
{
buffer[6] = 0x20;
- strcpy( BLOCK_FILENAME(buffer), filename);
+ strcpy(BLOCK_FILENAME(buffer), filename);
buffer_write_32_be( buffer + 6 + FILE_HEADER_SIZE - 4, time_setup( time( NULL)));
- stream_read( sourcef, buffer + 6 + FILE_HEADER_SIZE, buffer[1]);
+ sourcef.read(buffer + 6 + FILE_HEADER_SIZE, buffer[1]);
}
else
{
- stream_read( sourcef, buffer + 6, buffer[1]);
+ sourcef.read(buffer + 6, buffer[1]);
}
if (!cfs_block_write( cfs, buffer, BLOCK_TYPE_FILE, i)) return IMGTOOLERR_WRITEERROR;
bytes_left -= buffer[1];
@@ -493,17 +493,17 @@ static imgtoolerr_t cybiko_image_write_file( imgtool::partition *partition, cons
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t cybiko_image_delete_file( imgtool::partition *partition, const char *filename)
+static imgtoolerr_t cybiko_image_delete_file(imgtool::partition &partition, const char *filename)
{
- imgtool::image *image = &partition->image();
- cybiko_file_system *cfs = (cybiko_file_system*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ cybiko_file_system *cfs = get_cfs(image);
UINT16 file_id;
// check filename
- if (strlen( filename) > 58) return IMGTOOLERR_BADFILENAME;
+ if (strlen(filename) > 58) return IMGTOOLERR_BADFILENAME;
// find file
- if (!cfs_file_find( cfs, filename, &file_id)) return IMGTOOLERR_FILENOTFOUND;
+ if (!cfs_file_find(cfs, filename, &file_id)) return IMGTOOLERR_FILENOTFOUND;
// delete file
- if (!cfs_file_delete( cfs, file_id)) return IMGTOOLERR_UNEXPECTED;
+ if (!cfs_file_delete(cfs, file_id)) return IMGTOOLERR_UNEXPECTED;
// ok
return IMGTOOLERR_SUCCESS;
}
@@ -524,7 +524,6 @@ void cybikoxt_get_info( const imgtool_class *imgclass, UINT32 state, union imgto
case IMGTOOLINFO_PTR_CLOSE : info->close = cybiko_image_close; break;
case IMGTOOLINFO_PTR_BEGIN_ENUM : info->begin_enum = cybiko_image_begin_enum; break;
case IMGTOOLINFO_PTR_NEXT_ENUM : info->next_enum = cybiko_image_next_enum; break;
- case IMGTOOLINFO_PTR_CLOSE_ENUM : info->close_enum = cybiko_image_close_enum; break;
case IMGTOOLINFO_PTR_FREE_SPACE : info->free_space = cybiko_image_free_space; break;
case IMGTOOLINFO_PTR_READ_FILE : info->read_file = cybiko_image_read_file; break;
case IMGTOOLINFO_PTR_WRITE_FILE : info->write_file = cybiko_image_write_file; break;
diff --git a/src/tools/imgtool/modules/fat.cpp b/src/tools/imgtool/modules/fat.cpp
index 37125f0004d..715b3486e61 100644
--- a/src/tools/imgtool/modules/fat.cpp
+++ b/src/tools/imgtool/modules/fat.cpp
@@ -275,14 +275,14 @@ static const char fat32_string[8] = { 'F', 'A', 'T', '3', '2', ' ', ' ', ' ' };
-static fat_partition_info *fat_get_partition_info(imgtool::partition *partition)
+static fat_partition_info *fat_get_partition_info(imgtool::partition &partition)
{
- return (fat_partition_info *)partition->extra_bytes();
+ return (fat_partition_info *)partition.extra_bytes();
}
-static imgtoolerr_t fat_read_sector(imgtool::partition *partition, UINT32 sector_index,
+static imgtoolerr_t fat_read_sector(imgtool::partition &partition, UINT32 sector_index,
int offset, void *buffer, size_t buffer_len)
{
//const fat_partition_info *disk_info;
@@ -294,14 +294,14 @@ static imgtoolerr_t fat_read_sector(imgtool::partition *partition, UINT32 sector
//disk_info = fat_get_partition_info(partition);
/* sanity check */
- err = partition->get_block_size(block_size);
+ err = partition.get_block_size(block_size);
if (err)
return err;
assert(block_size == sizeof(data));
while(buffer_len > 0)
{
- err = partition->read_block(sector_index++, data);
+ err = partition.read_block(sector_index++, data);
if (err)
return err;
@@ -317,7 +317,7 @@ static imgtoolerr_t fat_read_sector(imgtool::partition *partition, UINT32 sector
-static imgtoolerr_t fat_write_sector(imgtool::partition *partition, UINT32 sector_index,
+static imgtoolerr_t fat_write_sector(imgtool::partition &partition, UINT32 sector_index,
int offset, const void *buffer, size_t buffer_len)
{
//const fat_partition_info *disk_info;
@@ -330,7 +330,7 @@ static imgtoolerr_t fat_write_sector(imgtool::partition *partition, UINT32 secto
//disk_info = fat_get_partition_info(partition);
/* sanity check */
- err = partition->get_block_size(block_size);
+ err = partition.get_block_size(block_size);
if (err)
return err;
assert(block_size == sizeof(data));
@@ -341,7 +341,7 @@ static imgtoolerr_t fat_write_sector(imgtool::partition *partition, UINT32 secto
if ((offset != 0) || (buffer_len < sizeof(data)))
{
- err = partition->read_block(sector_index, data);
+ err = partition.read_block(sector_index, data);
if (err)
return err;
memcpy(data + offset, buffer, len);
@@ -352,7 +352,7 @@ static imgtoolerr_t fat_write_sector(imgtool::partition *partition, UINT32 secto
write_data = buffer;
}
- err = partition->write_block(sector_index++, write_data);
+ err = partition.write_block(sector_index++, write_data);
if (err)
return err;
@@ -365,7 +365,7 @@ static imgtoolerr_t fat_write_sector(imgtool::partition *partition, UINT32 secto
#ifdef UNUSED_FUNCTION
-static imgtoolerr_t fat_clear_sector(imgtool::partition *partition, UINT32 sector_index, UINT8 data)
+static imgtoolerr_t fat_clear_sector(imgtool::partition &partition, UINT32 sector_index, UINT8 data)
{
char buf[FAT_SECLEN];
memset(buf, data, sizeof(buf));
@@ -374,7 +374,7 @@ static imgtoolerr_t fat_clear_sector(imgtool::partition *partition, UINT32 secto
#endif
-static imgtoolerr_t fat_partition_open(imgtool::partition *partition, UINT64 first_block, UINT64 block_count)
+static imgtoolerr_t fat_partition_open(imgtool::partition &partition, UINT64 first_block, UINT64 block_count)
{
UINT8 header[FAT_SECLEN];
imgtoolerr_t err;
@@ -447,7 +447,7 @@ static imgtoolerr_t fat_partition_open(imgtool::partition *partition, UINT64 fir
-static imgtoolerr_t fat_partition_create(imgtool::image *image, UINT64 first_block, UINT64 block_count)
+static imgtoolerr_t fat_partition_create(imgtool::image &image, UINT64 first_block, UINT64 block_count)
{
imgtoolerr_t err;
UINT32 heads, tracks, sectors_per_track;
@@ -469,7 +469,7 @@ static imgtoolerr_t fat_partition_create(imgtool::image *image, UINT64 first_blo
return IMGTOOLERR_PARAMTOOLARGE;
/* get the geometry */
- err = image->get_geometry(&tracks, &heads, &sectors_per_track);
+ err = image.get_geometry(&tracks, &heads, &sectors_per_track);
if (err)
return err;
@@ -560,14 +560,14 @@ static imgtoolerr_t fat_partition_create(imgtool::image *image, UINT64 first_blo
header[2] = (UINT8) ((boot_sector_offset - 2) >> 8); /* (offset) */
}
- err = image->write_block(first_block, header);
+ err = image.write_block(first_block, header);
if (err)
return err;
/* clear out file allocation table */
for (i = reserved_sectors; i < (reserved_sectors + sectors_per_fat * fat_count + root_dir_sectors); i++)
{
- err = image->clear_block(first_block + i, 0);
+ err = image.clear_block(first_block + i, 0);
if (err)
return err;
}
@@ -593,7 +593,7 @@ static imgtoolerr_t fat_partition_create(imgtool::image *image, UINT64 first_blo
-static imgtoolerr_t fat_load_fat(imgtool::partition *partition, UINT8 **fat_table)
+static imgtoolerr_t fat_load_fat(imgtool::partition &partition, UINT8 **fat_table)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
const fat_partition_info *disk_info;
@@ -641,7 +641,7 @@ done:
-static imgtoolerr_t fat_save_fat(imgtool::partition *partition, const UINT8 *fat_table)
+static imgtoolerr_t fat_save_fat(imgtool::partition &partition, const UINT8 *fat_table)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
const fat_partition_info *disk_info;
@@ -673,7 +673,7 @@ done:
-static UINT32 fat_get_fat_entry(imgtool::partition *partition, const UINT8 *fat_table, UINT32 fat_entry)
+static UINT32 fat_get_fat_entry(imgtool::partition &partition, const UINT8 *fat_table, UINT32 fat_entry)
{
const fat_partition_info *disk_info;
UINT64 entry;
@@ -720,7 +720,7 @@ static UINT32 fat_get_fat_entry(imgtool::partition *partition, const UINT8 *fat_
-static void fat_set_fat_entry(imgtool::partition *partition, UINT8 *fat_table, UINT32 fat_entry, UINT32 value)
+static void fat_set_fat_entry(imgtool::partition &partition, UINT8 *fat_table, UINT32 fat_entry, UINT32 value)
{
const fat_partition_info *disk_info;
UINT64 entry;
@@ -747,7 +747,7 @@ static void fat_set_fat_entry(imgtool::partition *partition, UINT8 *fat_table, U
-static void fat_debug_integrity_check(imgtool::partition *partition, const UINT8 *fat_table, const fat_file *file)
+static void fat_debug_integrity_check(imgtool::partition &partition, const UINT8 *fat_table, const fat_file *file)
{
#ifdef MAME_DEBUG
/* debug function to test the integrity of a file */
@@ -770,7 +770,7 @@ static void fat_debug_integrity_check(imgtool::partition *partition, const UINT8
-static imgtoolerr_t fat_seek_file(imgtool::partition *partition, fat_file *file, UINT32 pos)
+static imgtoolerr_t fat_seek_file(imgtool::partition &partition, fat_file *file, UINT32 pos)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
const fat_partition_info *disk_info;
@@ -831,7 +831,7 @@ done:
-static UINT32 fat_get_filepos_sector_index(imgtool::partition *partition, fat_file *file)
+static UINT32 fat_get_filepos_sector_index(imgtool::partition &partition, fat_file *file)
{
UINT32 sector_index;
const fat_partition_info *disk_info;
@@ -873,7 +873,7 @@ static imgtoolerr_t fat_corrupt_file_error(const fat_file *file)
-static imgtoolerr_t fat_readwrite_file(imgtool::partition *partition, fat_file *file,
+static imgtoolerr_t fat_readwrite_file(imgtool::partition &partition, fat_file *file,
void *buffer, size_t buffer_len, size_t *bytes_read, int read_or_write)
{
imgtoolerr_t err;
@@ -921,7 +921,7 @@ static imgtoolerr_t fat_readwrite_file(imgtool::partition *partition, fat_file *
-static imgtoolerr_t fat_read_file(imgtool::partition *partition, fat_file *file,
+static imgtoolerr_t fat_read_file(imgtool::partition &partition, fat_file *file,
void *buffer, size_t buffer_len, size_t *bytes_read)
{
return fat_readwrite_file(partition, file, buffer, buffer_len, bytes_read, 0);
@@ -929,7 +929,7 @@ static imgtoolerr_t fat_read_file(imgtool::partition *partition, fat_file *file,
-static imgtoolerr_t fat_write_file(imgtool::partition *partition, fat_file *file,
+static imgtoolerr_t fat_write_file(imgtool::partition &partition, fat_file *file,
const void *buffer, size_t buffer_len, size_t *bytes_read)
{
return fat_readwrite_file(partition, file, (void *) buffer, buffer_len, bytes_read, 1);
@@ -937,7 +937,7 @@ static imgtoolerr_t fat_write_file(imgtool::partition *partition, fat_file *file
-static UINT32 fat_allocate_cluster(imgtool::partition *partition, UINT8 *fat_table)
+static UINT32 fat_allocate_cluster(imgtool::partition &partition, UINT8 *fat_table)
{
const fat_partition_info *disk_info;
UINT32 i, val;
@@ -959,7 +959,7 @@ static UINT32 fat_allocate_cluster(imgtool::partition *partition, UINT8 *fat_tab
/* sets the size of a file; ~0 means 'delete' */
-static imgtoolerr_t fat_set_file_size(imgtool::partition *partition, fat_file *file,
+static imgtoolerr_t fat_set_file_size(imgtool::partition &partition, fat_file *file,
UINT32 new_size)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
@@ -1152,7 +1152,7 @@ done:
-static void prepend_lfn_bytes(utf16_char *lfn_buf, size_t lfn_buflen, size_t *lfn_len,
+static void prepend_lfn_bytes(char16_t *lfn_buf, size_t lfn_buflen, size_t *lfn_len,
const UINT8 *entry, int offset, int chars)
{
UINT16 w;
@@ -1277,16 +1277,16 @@ static UINT32 fat_setup_time(time_t ansi_time)
-static imgtoolerr_t fat_read_dirent(imgtool::partition *partition, fat_file *file,
- fat_dirent *ent, fat_freeentry_info *freeent)
+static imgtoolerr_t fat_read_dirent(imgtool::partition &partition, fat_file *file,
+ fat_dirent &ent, fat_freeentry_info *freeent)
{
imgtoolerr_t err;
//const fat_partition_info *disk_info;
UINT8 entry[FAT_DIRENT_SIZE];
size_t bytes_read;
int i, j;
- unicode_char ch;
- utf16_char lfn_buf[512];
+ char32_t ch;
+ char16_t lfn_buf[512];
size_t lfn_len = 0;
int lfn_lastentry = 0;
UINT8 lfn_checksum = 0;
@@ -1294,7 +1294,7 @@ static imgtoolerr_t fat_read_dirent(imgtool::partition *partition, fat_file *fil
assert(file->directory);
lfn_buf[0] = '\0';
- memset(ent, 0, sizeof(*ent));
+ memset(&ent, 0, sizeof(ent));
//disk_info = fat_get_partition_info(partition);
/* The first eight bytes of a FAT directory entry is a blank padded name
@@ -1360,12 +1360,12 @@ static imgtoolerr_t fat_read_dirent(imgtool::partition *partition, fat_file *fil
/* no more directory entries? */
if (entry[0] == '\0')
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
/* pick apart short filename */
- fat_cannonicalize_sfn(ent->short_filename, entry);
+ fat_cannonicalize_sfn(ent.short_filename, entry);
/* and the long filename */
if (lfn_lastentry == 1)
@@ -1378,20 +1378,20 @@ static imgtoolerr_t fat_read_dirent(imgtool::partition *partition, fat_file *fil
do
{
i += uchar_from_utf16(&ch, &lfn_buf[i], ARRAY_LENGTH(lfn_buf) - i);
- j += utf8_from_uchar(&ent->long_filename[j], ARRAY_LENGTH(ent->long_filename) - j, ch);
+ j += utf8_from_uchar(&ent.long_filename[j], ARRAY_LENGTH(ent.long_filename) - j, ch);
}
while(ch != 0);
}
}
/* other attributes */
- ent->filesize = pick_integer_le(entry, 28, 4);
- ent->directory = (entry[11] & 0x10) ? 1 : 0;
- ent->first_cluster = pick_integer_le(entry, 26, 2);
- ent->dirent_sector_index = entry_sector_index;
- ent->dirent_sector_offset = entry_sector_offset;
- ent->creation_time = fat_crack_time(pick_integer_le(entry, 14, 4));
- ent->lastmodified_time = fat_crack_time(pick_integer_le(entry, 22, 4));
+ ent.filesize = pick_integer_le(entry, 28, 4);
+ ent.directory = (entry[11] & 0x10) ? 1 : 0;
+ ent.first_cluster = pick_integer_le(entry, 26, 2);
+ ent.dirent_sector_index = entry_sector_index;
+ ent.dirent_sector_offset = entry_sector_offset;
+ ent.creation_time = fat_crack_time(pick_integer_le(entry, 14, 4));
+ ent.lastmodified_time = fat_crack_time(pick_integer_le(entry, 22, 4));
return IMGTOOLERR_SUCCESS;
}
@@ -1413,11 +1413,11 @@ static imgtoolerr_t fat_construct_dirent(const char *filename, creation_policy_t
UINT32 now;
size_t created_entry_len = FAT_DIRENT_SIZE;
size_t created_entry_pos = 0;
- unicode_char ch;
+ char32_t ch;
char last_short_char = ' ';
char short_char = '\0';
char cannonical_short_char;
- utf16_char buf[UTF16_CHAR_MAX];
+ char16_t buf[UTF16_CHAR_MAX];
int i, len;
int sfn_pos = 0;
sfn_disposition_t sfn_disposition = SFN_SUFFICIENT;
@@ -1600,7 +1600,7 @@ done:
-static void fat_bump_dirent(imgtool::partition *partition, UINT8 *entry, size_t entry_len)
+static void fat_bump_dirent(imgtool::partition &partition, UINT8 *entry, size_t entry_len)
{
UINT8 *sfn_entry;
int pos, digit_count, i;
@@ -1661,7 +1661,7 @@ static void fat_bump_dirent(imgtool::partition *partition, UINT8 *entry, size_t
-static imgtoolerr_t fat_lookup_path(imgtool::partition *partition, const char *path,
+static imgtoolerr_t fat_lookup_path(imgtool::partition &partition, const char *path,
creation_policy_t create, fat_file *file)
{
imgtoolerr_t err;
@@ -1706,7 +1706,7 @@ static imgtoolerr_t fat_lookup_path(imgtool::partition *partition, const char *p
do
{
- err = fat_read_dirent(partition, file, &ent, created_entry ? &freeent : NULL);
+ err = fat_read_dirent(partition, file, ent, created_entry ? &freeent : NULL);
if (err)
goto done;
@@ -1740,7 +1740,7 @@ static imgtoolerr_t fat_lookup_path(imgtool::partition *partition, const char *p
do
{
- err = fat_read_dirent(partition, file, &ent, NULL);
+ err = fat_read_dirent(partition, file, ent, NULL);
if (err)
goto done;
@@ -1809,14 +1809,14 @@ done:
-static imgtoolerr_t fat_partition_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t fat_partition_beginenum(imgtool::directory &enumeration, const char *path)
{
imgtoolerr_t err;
fat_file *file;
- file = (fat_file *) enumeration->extra_bytes();
+ file = (fat_file *) enumeration.extra_bytes();
- err = fat_lookup_path(&enumeration->partition(), path, CREATE_NONE, file);
+ err = fat_lookup_path(enumeration.partition(), path, CREATE_NONE, file);
if (err)
return err;
if (!file->directory)
@@ -1826,31 +1826,31 @@ static imgtoolerr_t fat_partition_beginenum(imgtool::directory *enumeration, con
-static imgtoolerr_t fat_partition_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t fat_partition_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
imgtoolerr_t err;
fat_file *file;
fat_dirent fatent;
- file = (fat_file *) enumeration->extra_bytes();
- err = fat_read_dirent(&enumeration->partition(), file, &fatent, NULL);
+ file = (fat_file *) enumeration.extra_bytes();
+ err = fat_read_dirent(enumeration.partition(), file, fatent, NULL);
if (err)
return err;
/* copy stuff from the FAT dirent to the Imgtool dirent */
- snprintf(ent->filename, ARRAY_LENGTH(ent->filename), "%s", fatent.long_filename[0]
+ snprintf(ent.filename, ARRAY_LENGTH(ent.filename), "%s", fatent.long_filename[0]
? fatent.long_filename : fatent.short_filename);
- ent->filesize = fatent.filesize;
- ent->directory = fatent.directory;
- ent->eof = fatent.eof;
- ent->creation_time = fatent.creation_time;
- ent->lastmodified_time = fatent.lastmodified_time;
+ ent.filesize = fatent.filesize;
+ ent.directory = fatent.directory;
+ ent.eof = fatent.eof;
+ ent.creation_time = fatent.creation_time;
+ ent.lastmodified_time = fatent.lastmodified_time;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t fat_read_bootblock(imgtool::partition *partition, imgtool_stream *stream)
+static imgtoolerr_t fat_read_bootblock(imgtool::partition &partition, imgtool::stream &stream)
{
imgtoolerr_t err;
UINT8 block[FAT_SECLEN];
@@ -1859,21 +1859,21 @@ static imgtoolerr_t fat_read_bootblock(imgtool::partition *partition, imgtool_st
if (err)
return err;
- stream_write(stream, block, sizeof(block));
+ stream.write(block, sizeof(block));
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t fat_write_bootblock(imgtool::partition *partition, imgtool_stream *stream)
+static imgtoolerr_t fat_write_bootblock(imgtool::partition &partition, imgtool::stream &stream)
{
imgtoolerr_t err;
UINT8 block[FAT_SECLEN];
UINT8 new_block[FAT_SECLEN];
- if (stream_size(stream) != sizeof(new_block))
+ if (stream.size() != sizeof(new_block))
return IMGTOOLERR_UNEXPECTED;
- stream_read(stream, new_block, sizeof(new_block));
+ stream.read(new_block, sizeof(new_block));
if (new_block[510] != 0x55)
return IMGTOOLERR_UNEXPECTED;
@@ -1899,7 +1899,7 @@ static imgtoolerr_t fat_write_bootblock(imgtool::partition *partition, imgtool_s
-static imgtoolerr_t fat_partition_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t fat_partition_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
fat_file file;
@@ -1923,7 +1923,7 @@ static imgtoolerr_t fat_partition_readfile(imgtool::partition *partition, const
if (err)
return err;
- stream_write(destf, buffer, bytes_read);
+ destf.write(buffer, bytes_read);
}
while(bytes_read > 0);
return IMGTOOLERR_SUCCESS;
@@ -1931,7 +1931,7 @@ static imgtoolerr_t fat_partition_readfile(imgtool::partition *partition, const
-static imgtoolerr_t fat_partition_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t fat_partition_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t err;
fat_file file;
@@ -1949,7 +1949,7 @@ static imgtoolerr_t fat_partition_writefile(imgtool::partition *partition, const
if (file.directory)
return IMGTOOLERR_FILENOTFOUND;
- bytes_left = (UINT32) stream_size(sourcef);
+ bytes_left = (UINT32) sourcef.size();
err = fat_set_file_size(partition, &file, bytes_left);
if (err)
@@ -1958,7 +1958,7 @@ static imgtoolerr_t fat_partition_writefile(imgtool::partition *partition, const
while(bytes_left > 0)
{
len = (std::min<size_t>)(bytes_left, sizeof(buffer));
- stream_read(sourcef, buffer, len);
+ sourcef.read(buffer, len);
err = fat_write_file(partition, &file, buffer, len, NULL);
if (err)
@@ -1971,7 +1971,7 @@ static imgtoolerr_t fat_partition_writefile(imgtool::partition *partition, const
-static imgtoolerr_t fat_partition_delete(imgtool::partition *partition, const char *filename, unsigned int dir)
+static imgtoolerr_t fat_partition_delete(imgtool::partition &partition, const char *filename, unsigned int dir)
{
imgtoolerr_t err;
fat_file file;
@@ -1985,7 +1985,7 @@ static imgtoolerr_t fat_partition_delete(imgtool::partition *partition, const ch
if (dir)
{
- err = fat_read_dirent(partition, &file, &ent, NULL);
+ err = fat_read_dirent(partition, &file, ent, NULL);
if (err)
return err;
if (!ent.eof)
@@ -2001,14 +2001,14 @@ static imgtoolerr_t fat_partition_delete(imgtool::partition *partition, const ch
-static imgtoolerr_t fat_partition_deletefile(imgtool::partition *partition, const char *filename)
+static imgtoolerr_t fat_partition_deletefile(imgtool::partition &partition, const char *filename)
{
return fat_partition_delete(partition, filename, 0);
}
-static imgtoolerr_t fat_partition_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t fat_partition_freespace(imgtool::partition &partition, UINT64 *size)
{
imgtoolerr_t err;
const fat_partition_info *disk_info;
@@ -2036,7 +2036,7 @@ done:
-static imgtoolerr_t fat_partition_createdir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t fat_partition_createdir(imgtool::partition &partition, const char *path)
{
imgtoolerr_t err;
fat_file file;
@@ -2070,7 +2070,7 @@ static imgtoolerr_t fat_partition_createdir(imgtool::partition *partition, const
-static imgtoolerr_t fat_partition_deletedir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t fat_partition_deletedir(imgtool::partition &partition, const char *path)
{
return fat_partition_delete(partition, path, 1);
}
diff --git a/src/tools/imgtool/modules/hp48.cpp b/src/tools/imgtool/modules/hp48.cpp
index f5cde5760e7..4403708e761 100644
--- a/src/tools/imgtool/modules/hp48.cpp
+++ b/src/tools/imgtool/modules/hp48.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Antoine Mine
/****************************************************************************
- hp48.c
+ hp48.cpp
Memory cards for HP48 SX/GX
@@ -95,7 +95,7 @@
struct hp48_card
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
int modified;
/* size, in bytes of card data: from 32 KB to 4 MB */
@@ -150,6 +150,11 @@ static const char hp48_create_optionspec[] = "S32/64/[128]/256/512/1024/2048/409
*****************************************************************************/
+static hp48_card *get_hp48_card(imgtool::image &image)
+{
+ return (hp48_card*) image.extra_bytes();
+}
+
/* byes to nibbles */
static void unpack(UINT8* dst, UINT8* src, int nsize)
{
@@ -327,83 +332,85 @@ static UINT16 crc(UINT8* data, int len)
*****************************************************************************/
-static imgtoolerr_t hp48_open(imgtool::image *img, imgtool_stream *stream)
+static imgtoolerr_t hp48_open(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- hp48_card* c = (hp48_card*) img->extra_bytes();
- int size = stream_size( stream );
+ hp48_card* c = get_hp48_card(img);
+ int size = stream->size();
- /* check that size is a power of 2 between 32 KB and 4 MG */
- if ( (size < 32 * 1024) ||
- (size > 4 * 1024 * 1024) ||
- (size & (size-1)) )
- {
- return IMGTOOLERR_CORRUPTIMAGE;
- }
+ /* check that size is a power of 2 between 32 KB and 4 MG */
+ if ( (size < 32 * 1024) ||
+ (size > 4 * 1024 * 1024) ||
+ (size & (size-1)) )
+ {
+ return IMGTOOLERR_CORRUPTIMAGE;
+ }
- /* store info */
- c->stream = stream;
+ /* store info */
+ c->stream = stream.get();
c->modified = 0;
- c->size = size;
- c->data = (UINT8*) malloc( 2 * size );
- if ( !c->data )
- {
- return IMGTOOLERR_READERROR;
- }
+ c->size = size;
+ c->data = (UINT8*) malloc( 2 * size );
+ if ( !c->data )
+ {
+ return IMGTOOLERR_READERROR;
+ }
- /* fully load image */
- stream_seek( stream, 0, SEEK_SET );
- if ( stream_read( stream, c->data, size ) < size )
- {
- return IMGTOOLERR_READERROR;
- }
- unpack( c->data, c->data, 2 * size );
+ /* fully load image */
+ c->stream->seek(0, SEEK_SET);
+ if (c->stream->read(c->data, size) < size)
+ {
+ return IMGTOOLERR_READERROR;
+ }
+ unpack( c->data, c->data, 2 * size );
+ c->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp48_create(imgtool::image* img,
- imgtool_stream *stream,
+static imgtoolerr_t hp48_create(imgtool::image &img,
+ imgtool::stream::ptr &&stream,
util::option_resolution *opts)
{
- hp48_card* c = (hp48_card*) img->extra_bytes();
+ hp48_card* c = get_hp48_card(img);
int size;
- size = opts->lookup_int('S');
+ size = opts->lookup_int('S');
- c->stream = stream;
- c->modified = 1;
- c->size = size * 1024;
- c->data = (UINT8*) malloc( 2 * c->size );
- if ( !c->data )
- {
- return IMGTOOLERR_READERROR;
- }
+ c->stream = stream.get();
+ c->modified = 1;
+ c->size = size * 1024;
+ c->data = (UINT8*) malloc( 2 * c->size );
+ if ( !c->data )
+ {
+ return IMGTOOLERR_READERROR;
+ }
- /* zeroing the image seems fine */
- memset( c->data, 0, 2 * c->size );
+ /* zeroing the image seems fine */
+ memset( c->data, 0, 2 * c->size );
+ c->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static void hp48_close(imgtool::image *img)
+static void hp48_close(imgtool::image &img)
{
- hp48_card* c = (hp48_card*) img->extra_bytes();
+ hp48_card* c = get_hp48_card(img);
if ( c->modified )
{
/* save image */
pack( c->data, c->data, 2 * c->size );
- stream_seek( c->stream, 0, SEEK_SET );
- stream_write( c->stream, c->data, c->size );
+ c->stream->seek(0, SEEK_SET);
+ c->stream->write(c->data, c->size);
}
/* clean up */
free( c->data );
- stream_close( c->stream );
+ delete c->stream;
}
@@ -413,35 +420,30 @@ static void hp48_close(imgtool::image *img)
void hp48_partition_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinfo *info);
-static imgtoolerr_t hp48_list_partitions(imgtool::image *img,
- imgtool_partition_info *partitions,
- size_t len)
+static imgtoolerr_t hp48_list_partitions(imgtool::image &img, std::vector<imgtool::partition_info> &partitions)
{
- hp48_card* c = (hp48_card*) img->extra_bytes();
+ hp48_card* c = get_hp48_card(img);
- int i;
- for ( i = 0; i < len && i * MAX_PORT_SIZE < c->size ; i++ )
- {
- /* offset and size in bytes */
- partitions[i].base_block = i * MAX_PORT_SIZE;
- partitions[i].block_count = c->size - partitions[i].base_block;
- if ( partitions[i].block_count > MAX_PORT_SIZE )
- {
- partitions[i].block_count = MAX_PORT_SIZE;
- }
+ int i;
+ for (i = 0; i * MAX_PORT_SIZE < c->size ; i++)
+ {
+ // offset and size in bytes
+ UINT64 base_block = i * MAX_PORT_SIZE;
+ UINT64 block_count = std::min((UINT64)c->size - base_block, (UINT64)MAX_PORT_SIZE);
- partitions[i].get_info = hp48_partition_get_info;
- }
+ // append the partition
+ partitions.emplace_back(hp48_partition_get_info, base_block, block_count);
+ }
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp48_open_partition(imgtool::partition *part,
+static imgtoolerr_t hp48_open_partition(imgtool::partition &part,
UINT64 first_block, UINT64 block_count)
{
- imgtool::image* img = &part->image();
- hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
+ imgtool::image &img(part.image());
+ hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
if ( first_block + block_count > c->size )
return IMGTOOLERR_INVALIDPARTITION;
@@ -455,33 +457,31 @@ static imgtoolerr_t hp48_open_partition(imgtool::partition *part,
-static imgtoolerr_t hp48_beginenum(imgtool::directory *enumeration,
- const char *path)
+static imgtoolerr_t hp48_beginenum(imgtool::directory &enumeration, const char *path)
{
- hp48_directory* d = (hp48_directory*) enumeration->extra_bytes();
+ hp48_directory* d = (hp48_directory*) enumeration.extra_bytes();
- d->pos = 0;
+ d->pos = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp48_nextenum(imgtool::directory *enumeration,
- imgtool_dirent *ent)
+static imgtoolerr_t hp48_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- imgtool::partition *part = &enumeration->partition();
- //imgtool::image* img = &part->image();
- //hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
- hp48_directory* d = (hp48_directory*) enumeration->extra_bytes();
+ imgtool::partition &part(enumeration.partition());
+ //imgtool::image &img(part.image());
+ //hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
+ hp48_directory* d = (hp48_directory*) enumeration.extra_bytes();
UINT8* data = p->data;
int pos = d->pos;
if ( pos < 0 || pos+12 > 2*p->size )
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
@@ -496,21 +496,21 @@ static imgtoolerr_t hp48_nextenum(imgtool::directory *enumeration,
int namelen = read8( data+pos );
pos += 2;
if ( (pos + 2*namelen > 2*p->size) ||
- (namelen >= sizeof(ent->filename)) )
+ (namelen >= sizeof(ent.filename)) )
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_CORRUPTFILE;
}
- readstring( ent->filename, data+pos, namelen );
+ readstring( ent.filename, data+pos, namelen );
/* compute size in bytes, removing name, length & CRC fields */
- ent->filesize = ((totalsize - 19 - 2*namelen) + 1) / 2;
+ ent.filesize = ((totalsize - 19 - 2*namelen) + 1) / 2;
switch (prolog)
{
- case PROLOG_LIBRARY: strncpy( ent->attr, "LIB", sizeof(ent->attr) ); break;
- case PROLOG_BACKUP: strncpy( ent->attr, "BAK", sizeof(ent->attr) ); break;
- default: strncpy( ent->attr, "?", sizeof(ent->attr) );
+ case PROLOG_LIBRARY: strncpy( ent.attr, "LIB", sizeof(ent.attr) ); break;
+ case PROLOG_BACKUP: strncpy( ent.attr, "BAK", sizeof(ent.attr) ); break;
+ default: strncpy( ent.attr, "?", sizeof(ent.attr) );
}
d->pos = d->pos + totalsize + 5;
@@ -518,7 +518,7 @@ static imgtoolerr_t hp48_nextenum(imgtool::directory *enumeration,
else
{
/* 0 or unknown object => end */
- ent->eof = 1;
+ ent.eof = 1;
}
return IMGTOOLERR_SUCCESS;
@@ -526,11 +526,11 @@ static imgtoolerr_t hp48_nextenum(imgtool::directory *enumeration,
-static imgtoolerr_t hp48_freespace(imgtool::partition *part, UINT64 *size)
+static imgtoolerr_t hp48_freespace(imgtool::partition &part, UINT64 *size)
{
- //imgtool::image* img = &part->image();
- //hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
+ //imgtool::image &img(part.image());
+ //hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
*size = p->size - (find_end(p)+1)/2;
@@ -539,14 +539,14 @@ static imgtoolerr_t hp48_freespace(imgtool::partition *part, UINT64 *size)
-static imgtoolerr_t hp48_readfile(imgtool::partition *part,
+static imgtoolerr_t hp48_readfile(imgtool::partition &part,
const char *filename,
const char *fork,
- imgtool_stream *destf)
+ imgtool::stream &destf)
{
- //imgtool::image* img = &part->image();
- //hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
+ //imgtool::image &img(part.image());
+ //hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
/* find entry */
int totalsize, start, size;
@@ -566,7 +566,7 @@ static imgtoolerr_t hp48_readfile(imgtool::partition *part,
size -= 10;
/* save header */
- stream_write( destf, hp48_prefix, 8);
+ destf.write(hp48_prefix, 8);
/* save contents to host file */
int bytesize = (size + 1) / 2;
@@ -576,7 +576,7 @@ static imgtoolerr_t hp48_readfile(imgtool::partition *part,
return IMGTOOLERR_FILENOTFOUND;
}
pack( buf, p->data + start, size );
- stream_write( destf, buf, bytesize );
+ destf.write(buf, bytesize);
free( buf );
return IMGTOOLERR_SUCCESS;
@@ -584,12 +584,12 @@ static imgtoolerr_t hp48_readfile(imgtool::partition *part,
-static imgtoolerr_t hp48_deletefile(imgtool::partition *part,
+static imgtoolerr_t hp48_deletefile(imgtool::partition &part,
const char *filename)
{
- imgtool::image* img = &part->image();
- hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
+ imgtool::image &img(part.image());
+ hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
/* find entry */
int totalsize;
@@ -610,19 +610,19 @@ static imgtoolerr_t hp48_deletefile(imgtool::partition *part,
-static imgtoolerr_t hp48_writefile(imgtool::partition *part,
+static imgtoolerr_t hp48_writefile(imgtool::partition &part,
const char *filename,
const char *fork,
- imgtool_stream *sourcef,
+ imgtool::stream &sourcef,
util::option_resolution *opts)
{
- imgtool::image* img = &part->image();
- hp48_card* c = (hp48_card*) img->extra_bytes();
- hp48_partition* p = (hp48_partition*) part->extra_bytes();
+ imgtool::image &img(part.image());
+ hp48_card* c = get_hp48_card(img);
+ hp48_partition* p = (hp48_partition*) part.extra_bytes();
/* check header */
char head[8];
- stream_read( sourcef, head, 8 );
+ sourcef.read(head, 8);
if ( memcmp( head, hp48_prefix, 7) )
{
return IMGTOOLERR_READERROR;
@@ -640,7 +640,7 @@ static imgtoolerr_t hp48_writefile(imgtool::partition *part,
if ( len > 255 ) len = 255;
/* check size */
- int filesize = stream_size( sourcef ) - 8;
+ int filesize = sourcef.size() - 8;
if ( pos + 2*filesize + 24 + 2*len > 2 * p->size )
{
return IMGTOOLERR_NOSPACE;
@@ -649,7 +649,7 @@ static imgtoolerr_t hp48_writefile(imgtool::partition *part,
/* load file */
UINT8* buf = (UINT8*) malloc( filesize );
if ( !buf ) return IMGTOOLERR_NOSPACE;
- stream_read( sourcef, buf, filesize );
+ sourcef.read(buf, filesize);
/* store backup object */
int org = pos;
@@ -732,7 +732,7 @@ void hp48_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinf
case IMGTOOLINFO_PTR_OPEN: info->open = hp48_open; break;
case IMGTOOLINFO_PTR_CREATE: info->create = hp48_create; break;
case IMGTOOLINFO_PTR_CLOSE: info->close = hp48_close; break;
- case IMGTOOLINFO_PTR_LIST_PARTITIONS: info->list_partitions = hp48_list_partitions; break;
+ case IMGTOOLINFO_PTR_LIST_PARTITIONS: info->list_partitions = hp48_list_partitions; break;
case IMGTOOLINFO_INT_IMAGE_EXTRA_BYTES: info->i = sizeof(hp48_card); break;
}
diff --git a/src/tools/imgtool/modules/hp9845_tape.cpp b/src/tools/imgtool/modules/hp9845_tape.cpp
index 7bf3876cf73..41de4532f18 100644
--- a/src/tools/imgtool/modules/hp9845_tape.cpp
+++ b/src/tools/imgtool/modules/hp9845_tape.cpp
@@ -216,8 +216,8 @@ public:
void format_img(void);
- imgtoolerr_t load_from_file(imgtool_stream *stream);
- imgtoolerr_t save_to_file(imgtool_stream *stream);
+ imgtoolerr_t load_from_file(imgtool::stream *stream);
+ imgtoolerr_t save_to_file(imgtool::stream *stream);
unsigned free_sectors(void) const;
@@ -259,8 +259,8 @@ private:
bool decode_dir(void);
static tape_pos_t word_length(tape_word_t w);
static tape_pos_t block_end_pos(tape_pos_t pos , const tape_word_t *block , unsigned block_len);
- static bool save_word(imgtool_stream *stream , tape_pos_t& pos , tape_word_t w);
- static bool save_words(imgtool_stream *stream , tape_pos_t& pos , const tape_word_t *block , unsigned block_len);
+ static bool save_word(imgtool::stream *stream , tape_pos_t& pos , tape_word_t w);
+ static bool save_words(imgtool::stream *stream , tape_pos_t& pos , const tape_word_t *block , unsigned block_len);
static tape_word_t checksum(const tape_word_t *block , unsigned block_len);
};
@@ -268,7 +268,7 @@ private:
* Image state
********************************************************************************/
typedef struct {
- imgtool_stream *stream;
+ imgtool::stream *stream;
tape_image_t *img;
} tape_state_t;
@@ -298,13 +298,13 @@ void tape_image_t::format_img(void)
dirty = true;
}
-imgtoolerr_t tape_image_t::load_from_file(imgtool_stream *stream)
+imgtoolerr_t tape_image_t::load_from_file(imgtool::stream *stream)
{
- stream_seek(stream , 0 , SEEK_SET);
+ stream->seek(0 , SEEK_SET);
UINT8 tmp[ 4 ];
- if (stream_read(stream , tmp , 4) != 4) {
+ if (stream->read(tmp , 4) != 4) {
return IMGTOOLERR_READERROR;
}
@@ -323,7 +323,7 @@ imgtoolerr_t tape_image_t::load_from_file(imgtool_stream *stream)
state = 0;
while (1) {
- if (stream_read(stream , tmp , 4) != 4) {
+ if (stream->read(tmp , 4) != 4) {
return IMGTOOLERR_READERROR;
}
UINT32 words_no = pick_integer_le(tmp , 0 , 4);
@@ -331,13 +331,13 @@ imgtoolerr_t tape_image_t::load_from_file(imgtool_stream *stream)
// Track ended
break;
}
- if (stream_read(stream , tmp , 4) != 4) {
+ if (stream->read(tmp , 4) != 4) {
return IMGTOOLERR_READERROR;
}
tape_pos_t pos = pick_integer_le(tmp , 0 , 4);
tape_word_t buffer[ WORDS_PER_SECTOR_W_MARGIN ];
for (unsigned i = 0; i < words_no; i++) {
- if (stream_read(stream , tmp , 2) != 2) {
+ if (stream->read(tmp , 2) != 2) {
return IMGTOOLERR_READERROR;
}
if (i < WORDS_PER_SECTOR_W_MARGIN) {
@@ -432,12 +432,12 @@ tape_pos_t tape_image_t::block_end_pos(tape_pos_t pos , const tape_word_t *block
return pos;
}
-bool tape_image_t::save_word(imgtool_stream *stream , tape_pos_t& pos , tape_word_t w)
+bool tape_image_t::save_word(imgtool::stream *stream , tape_pos_t& pos , tape_word_t w)
{
UINT8 tmp[ 2 ];
place_integer_le(tmp , 0 , 2 , w);
- if (stream_write(stream , tmp , 2) != 2) {
+ if (stream->write(tmp , 2) != 2) {
return false;
}
@@ -446,18 +446,18 @@ bool tape_image_t::save_word(imgtool_stream *stream , tape_pos_t& pos , tape_wor
return true;
}
-bool tape_image_t::save_words(imgtool_stream *stream , tape_pos_t& pos , const tape_word_t *block , unsigned block_len)
+bool tape_image_t::save_words(imgtool::stream *stream , tape_pos_t& pos , const tape_word_t *block , unsigned block_len)
{
UINT8 tmp[ 4 ];
// Number of words (including preamble)
place_integer_le(tmp , 0 , 4 , block_len + 1);
- if (stream_write(stream , tmp , 4) != 4) {
+ if (stream->write(tmp , 4) != 4) {
return false;
}
// Start position
place_integer_le(tmp , 0 , 4 , pos);
- if (stream_write(stream , tmp , 4) != 4) {
+ if (stream->write(tmp , 4) != 4) {
return false;
}
// Preamble
@@ -483,18 +483,18 @@ tape_word_t tape_image_t::checksum(const tape_word_t *block , unsigned block_len
return csum & 0xffff;
}
-imgtoolerr_t tape_image_t::save_to_file(imgtool_stream *stream)
+imgtoolerr_t tape_image_t::save_to_file(imgtool::stream *stream)
{
// Encode copies of directory into sectors
encode_dir();
// Store sectors
- stream_seek(stream , 0 , SEEK_SET);
+ stream->seek(0 , SEEK_SET);
UINT8 tmp[ 4 ];
place_integer_be(tmp , 0 , 4 , MAGIC);
- if (stream_write(stream , tmp , 4) != 4) {
+ if (stream->write(tmp , 4) != 4) {
return IMGTOOLERR_WRITEERROR;
}
@@ -504,7 +504,7 @@ imgtoolerr_t tape_image_t::save_to_file(imgtool_stream *stream)
if (i == TOT_SECTORS / 2) {
// Track 0 -> 1
place_integer_le(tmp , 0 , 4 , (UINT32)-1);
- if (stream_write(stream , tmp , 4) != 4) {
+ if (stream->write(tmp , 4) != 4) {
return IMGTOOLERR_WRITEERROR;
}
}
@@ -574,7 +574,7 @@ imgtoolerr_t tape_image_t::save_to_file(imgtool_stream *stream)
}
place_integer_le(tmp , 0 , 4 , (UINT32)-1);
- if (stream_write(stream , tmp , 4) != 4) {
+ if (stream->write(tmp , 4) != 4) {
return IMGTOOLERR_WRITEERROR;
}
@@ -1023,9 +1023,9 @@ bool tape_image_t::decode_dir(void)
return true;
}
-static tape_state_t& get_tape_state(imgtool::image *img)
+static tape_state_t& get_tape_state(imgtool::image &img)
{
- tape_state_t *ts = (tape_state_t*)img->extra_bytes();
+ tape_state_t *ts = (tape_state_t*)img.extra_bytes();
return *ts;
}
@@ -1042,22 +1042,27 @@ static tape_image_t& get_tape_image(tape_state_t& ts)
/********************************************************************************
* Imgtool functions
********************************************************************************/
-static imgtoolerr_t hp9845_tape_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t hp9845_tape_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
tape_state_t& state = get_tape_state(image);
- state.stream = stream;
+ state.stream = stream.get();
tape_image_t& tape_image = get_tape_image(state);
- return tape_image.load_from_file(stream);
+ imgtoolerr_t err = tape_image.load_from_file(state.stream);
+ if (err)
+ return err;
+
+ state.stream = stream.release();
+ return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_create(imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t hp9845_tape_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
tape_state_t& state = get_tape_state(image);
- state.stream = stream;
+ state.stream = stream.release();
tape_image_t& tape_image = get_tape_image(state);
@@ -1066,7 +1071,7 @@ static imgtoolerr_t hp9845_tape_create(imgtool::image *image, imgtool_stream *st
return IMGTOOLERR_SUCCESS;
}
-static void hp9845_tape_close(imgtool::image *image)
+static void hp9845_tape_close(imgtool::image &image)
{
tape_state_t& state = get_tape_state(image);
tape_image_t& tape_image = get_tape_image(state);
@@ -1075,49 +1080,49 @@ static void hp9845_tape_close(imgtool::image *image)
(void)tape_image.save_to_file(state.stream);
}
- stream_close(state.stream);
+ delete state.stream;
// Free tape_image
global_free(&tape_image);
}
-static imgtoolerr_t hp9845_tape_begin_enum (imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t hp9845_tape_begin_enum (imgtool::directory &enumeration, const char *path)
{
- dir_state_t *ds = (dir_state_t*)enumeration->extra_bytes();
+ dir_state_t *ds = (dir_state_t*)enumeration.extra_bytes();
ds->dir_idx = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_next_enum (imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t hp9845_tape_next_enum (imgtool::directory &enumeration, imgtool_dirent &ent)
{
- tape_state_t& state = get_tape_state(&enumeration->image());
+ tape_state_t& state = get_tape_state(enumeration.image());
tape_image_t& tape_image = get_tape_image(state);
- dir_state_t *ds = (dir_state_t*)enumeration->extra_bytes();
+ dir_state_t *ds = (dir_state_t*)enumeration.extra_bytes();
const dir_entry_t *entry = nullptr;
if (!tape_image.get_dir_entry(ds->dir_idx, entry)) {
- ent->eof = 1;
+ ent.eof = 1;
} else {
ds->dir_idx++;
bool qmark;
- tape_image_t::get_filename_and_ext(*entry, true, ent->filename, qmark);
+ tape_image_t::get_filename_and_ext(*entry, true, ent.filename, qmark);
// "filename" and "attr" fields try to look like the output of the "CAT" command
- snprintf(ent->attr , sizeof(ent->attr) , "%c %02x%c %4u %4u %3u" , entry->protection ? '*' : ' ' , entry->filetype , qmark ? '?' : ' ' , entry->n_recs , entry->wpr * 2 , entry->filepos);
+ snprintf(ent.attr , sizeof(ent.attr) , "%c %02x%c %4u %4u %3u" , entry->protection ? '*' : ' ' , entry->filetype , qmark ? '?' : ' ' , entry->n_recs , entry->wpr * 2 , entry->filepos);
- ent->filesize = entry->n_sects * SECTOR_LEN;
+ ent.filesize = entry->n_sects * SECTOR_LEN;
}
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_free_space(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t hp9845_tape_free_space(imgtool::partition &partition, UINT64 *size)
{
- tape_state_t& state = get_tape_state(&partition->image());
+ tape_state_t& state = get_tape_state(partition.image());
tape_image_t& tape_image = get_tape_image(state);
*size = tape_image.free_sectors() * SECTOR_LEN;
@@ -1125,9 +1130,9 @@ static imgtoolerr_t hp9845_tape_free_space(imgtool::partition *partition, UINT64
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_read_file(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t hp9845_tape_read_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- tape_state_t& state = get_tape_state(&partition->image());
+ tape_state_t& state = get_tape_state(partition.image());
tape_image_t& tape_image = get_tape_image(state);
unsigned idx;
@@ -1153,15 +1158,15 @@ static imgtoolerr_t hp9845_tape_read_file(imgtool::partition *partition, const c
tape_image_t::tape_word_to_bytes(buff_w[ i ], buff_b[ i * 2 ], buff_b[ i * 2 + 1 ]);
}
- stream_write(destf , buff_b , SECTOR_LEN);
+ destf.write(buff_b , SECTOR_LEN);
}
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_write_file(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t hp9845_tape_write_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
- tape_state_t& state = get_tape_state(&partition->image());
+ tape_state_t& state = get_tape_state(partition.image());
tape_image_t& tape_image = get_tape_image(state);
unsigned idx;
@@ -1171,7 +1176,7 @@ static imgtoolerr_t hp9845_tape_write_file(imgtool::partition *partition, const
tape_image.delete_dir_entry(idx);
}
- unsigned blocks = (unsigned)((stream_size(sourcef) + SECTOR_LEN - 1) / SECTOR_LEN);
+ unsigned blocks = (unsigned)((sourcef.size() + SECTOR_LEN - 1) / SECTOR_LEN);
if (!blocks) {
fprintf(stderr , "Null file, not writing..\n");
@@ -1199,7 +1204,7 @@ static imgtoolerr_t hp9845_tape_write_file(imgtool::partition *partition, const
memset(&buff_b[ 0 ] , 0 , sizeof(buff_b));
- if (stream_read(sourcef , buff_b , SECTOR_LEN) != SECTOR_LEN && i != (blocks - 1)) {
+ if (sourcef.read(buff_b , SECTOR_LEN) != SECTOR_LEN && i != (blocks - 1)) {
return IMGTOOLERR_READERROR;
}
for (unsigned j = 0; j < WORDS_PER_SECTOR; j++) {
@@ -1245,9 +1250,9 @@ static imgtoolerr_t hp9845_tape_write_file(imgtool::partition *partition, const
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t hp9845_tape_delete_file(imgtool::partition *partition, const char *filename)
+static imgtoolerr_t hp9845_tape_delete_file(imgtool::partition &partition, const char *filename)
{
- tape_state_t& state = get_tape_state(&partition->image());
+ tape_state_t& state = get_tape_state(partition.image());
tape_image_t& tape_image = get_tape_image(state);
unsigned idx;
@@ -1354,22 +1359,22 @@ void hp9845_tape_get_info(const imgtool_class *imgclass, UINT32 state, union img
/********************************************************************************
* Filter functions
********************************************************************************/
-static unsigned len_to_eor(imgtool_stream *inp)
+static unsigned len_to_eor(imgtool::stream &inp)
{
- return SECTOR_LEN - (unsigned)(stream_tell(inp) % SECTOR_LEN);
+ return SECTOR_LEN - (unsigned)(inp.tell() % SECTOR_LEN);
}
-static bool get_record_part(imgtool_stream *inp , void *buf , unsigned len)
+static bool get_record_part(imgtool::stream &inp , void *buf , unsigned len)
{
// Reading must never cross sector boundary
if (len > len_to_eor(inp)) {
return false;
}
- return stream_read(inp , buf , len) == len;
+ return inp.read(buf, len) == len;
}
-static bool dump_string(imgtool_stream *inp, imgtool_stream *out , unsigned len , bool add_eoln)
+static bool dump_string(imgtool::stream &inp, imgtool::stream &out , unsigned len , bool add_eoln)
{
UINT8 tmp[ SECTOR_LEN ];
@@ -1384,32 +1389,32 @@ static bool dump_string(imgtool_stream *inp, imgtool_stream *out , unsigned len
}
}
- stream_write(out , tmp , len);
+ out.write(tmp , len);
if (add_eoln) {
- stream_puts(out , EOLN);
+ out.puts(EOLN);
}
return true;
}
-static imgtoolerr_t hp9845data_read_file(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t hp9845data_read_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool_stream *inp_data;
+ imgtool::stream *inp_data;
imgtoolerr_t res;
UINT8 tmp[ 2 ];
- inp_data = stream_open_mem(NULL , 0);
+ inp_data = imgtool::stream::open_mem(NULL , 0);
if (inp_data == nullptr) {
return IMGTOOLERR_OUTOFMEMORY;
}
- res = hp9845_tape_read_file(partition , filename , fork , inp_data);
+ res = hp9845_tape_read_file(partition , filename , fork , *inp_data);
if (res != IMGTOOLERR_SUCCESS) {
- stream_close(inp_data);
+ delete inp_data;
return res;
}
- stream_seek(inp_data , 0 , SEEK_SET);
+ inp_data->seek(0, SEEK_SET);
UINT16 rec_type;
unsigned rec_len;
@@ -1418,7 +1423,7 @@ static imgtoolerr_t hp9845data_read_file(imgtool::partition *partition, const ch
do {
// Get record type
- if (!get_record_part(inp_data , tmp , 2)) {
+ if (!get_record_part(*inp_data , tmp , 2)) {
return IMGTOOLERR_READERROR;
}
rec_type = (UINT16)pick_integer_be(tmp , 0 , 2);
@@ -1441,7 +1446,7 @@ static imgtoolerr_t hp9845data_read_file(imgtool::partition *partition, const ch
return IMGTOOLERR_CORRUPTFILE;
}
- if (!get_record_part(inp_data , tmp , 2)) {
+ if (!get_record_part(*inp_data , tmp , 2)) {
return IMGTOOLERR_READERROR;
}
tmp_len = (unsigned)pick_integer_be(tmp , 0 , 2);
@@ -1456,14 +1461,14 @@ static imgtoolerr_t hp9845data_read_file(imgtool::partition *partition, const ch
if (rec_type == REC_TYPE_FULLSTR || rec_type == REC_TYPE_ENDSTR) {
rec_len = accum_len;
} else {
- rec_len = std::min(accum_len , len_to_eor(inp_data));
+ rec_len = std::min(accum_len , len_to_eor(*inp_data));
}
- if (!dump_string(inp_data , destf , rec_len , rec_type == REC_TYPE_FULLSTR || rec_type == REC_TYPE_ENDSTR)) {
+ if (!dump_string(*inp_data , destf , rec_len , rec_type == REC_TYPE_FULLSTR || rec_type == REC_TYPE_ENDSTR)) {
return IMGTOOLERR_READERROR;
}
if (rec_len & 1) {
// Keep length of string pieces even
- get_record_part(inp_data , tmp , 1);
+ get_record_part(*inp_data , tmp , 1);
}
accum_len -= rec_len;
break;
@@ -1481,7 +1486,7 @@ static imgtoolerr_t hp9845data_read_file(imgtool::partition *partition, const ch
return IMGTOOLERR_SUCCESS;
}
-static bool split_string_n_dump(const char *s , imgtool_stream *dest)
+static bool split_string_n_dump(const char *s , imgtool::stream &dest)
{
unsigned s_len = strlen(s);
UINT16 rec_type = REC_TYPE_1STSTR;
@@ -1494,7 +1499,7 @@ static bool split_string_n_dump(const char *s , imgtool_stream *dest)
// Not enough free space at end of current record: fill with EORs
place_integer_be(tmp , 0 , 2 , REC_TYPE_EOR);
while (free_len) {
- if (stream_write(dest , tmp , 2) != 2) {
+ if (dest.write(tmp , 2) != 2) {
return false;
}
free_len -= 2;
@@ -1507,8 +1512,8 @@ static bool split_string_n_dump(const char *s , imgtool_stream *dest)
}
place_integer_be(tmp , 0 , 2 , rec_type);
place_integer_be(tmp , 2 , 2 , s_len);
- if (stream_write(dest , tmp , 4) != 4 ||
- stream_write(dest , s , s_part_len) != s_part_len) {
+ if (dest.write(tmp , 4) != 4 ||
+ dest.write(s, s_part_len) != s_part_len) {
return false;
}
rec_type = REC_TYPE_MIDSTR;
@@ -1520,24 +1525,24 @@ static bool split_string_n_dump(const char *s , imgtool_stream *dest)
place_integer_be(tmp , 0 , 2 , at_least_one ? REC_TYPE_ENDSTR : REC_TYPE_FULLSTR);
place_integer_be(tmp , 2 , 2 , s_len);
- if (stream_write(dest , tmp , 4) != 4 ||
- stream_write(dest , s , s_len) != s_len) {
+ if (dest.write(tmp , 4) != 4 ||
+ dest.write(s , s_len) != s_len) {
return false;
}
if (s_len & 1) {
tmp[ 0 ] = 0;
- if (stream_write(dest , tmp , 1) != 1) {
+ if (dest.write(tmp , 1) != 1) {
return false;
}
}
return true;
}
-static imgtoolerr_t hp9845data_write_file(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t hp9845data_write_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
- imgtool_stream *out_data;
+ imgtool::stream *out_data;
- out_data = stream_open_mem(NULL , 0);
+ out_data = imgtool::stream::open_mem(NULL , 0);
if (out_data == nullptr) {
return IMGTOOLERR_OUTOFMEMORY;
}
@@ -1546,7 +1551,7 @@ static imgtoolerr_t hp9845data_write_file(imgtool::partition *partition, const c
char line[ 256 ];
// Read input file one line at time
- if (stream_core_file(sourcef)->gets(line , sizeof(line)) == nullptr) {
+ if (sourcef.core_file()->gets(line , sizeof(line)) == nullptr) {
// EOF
break;
}
@@ -1568,28 +1573,28 @@ static imgtoolerr_t hp9845data_write_file(imgtool::partition *partition, const c
continue;
}
- if (!split_string_n_dump(line , out_data)) {
+ if (!split_string_n_dump(line, *out_data)) {
return IMGTOOLERR_WRITEERROR;
}
}
// Fill free space of last record with EOFs
- unsigned free_len = len_to_eor(out_data);
+ unsigned free_len = len_to_eor(*out_data);
UINT8 tmp[ 2 ];
place_integer_be(tmp , 0 , 2 , REC_TYPE_EOF);
while (free_len) {
- if (stream_write(out_data , tmp , 2 ) != 2) {
+ if (out_data->write(tmp , 2 ) != 2) {
return IMGTOOLERR_WRITEERROR;
}
free_len -= 2;
}
- stream_seek(out_data , 0 , SEEK_SET);
+ out_data->seek(0 , SEEK_SET);
- imgtoolerr_t res = hp9845_tape_write_file(partition , filename , fork , out_data , opts);
+ imgtoolerr_t res = hp9845_tape_write_file(partition, filename, fork, *out_data, opts);
- stream_close(out_data);
+ delete out_data;
return res;
}
diff --git a/src/tools/imgtool/modules/mac.cpp b/src/tools/imgtool/modules/mac.cpp
index ca1eeea32fd..649e032d928 100644
--- a/src/tools/imgtool/modules/mac.cpp
+++ b/src/tools/imgtool/modules/mac.cpp
@@ -625,15 +625,15 @@ static imgtoolerr_t mac_find_block(mac_l1_imgref *image, int block,
UINT32 *track, UINT32 *head, UINT32 *sector)
{
*track = 0;
- while(block >= (apple35_sectors_per_track(imgtool_floppy(image->image), *track) * image->heads))
+ while(block >= (apple35_sectors_per_track(imgtool_floppy(*image->image), *track) * image->heads))
{
- block -= (apple35_sectors_per_track(imgtool_floppy(image->image), (*track)++) * image->heads);
+ block -= (apple35_sectors_per_track(imgtool_floppy(*image->image), (*track)++) * image->heads);
if (*track >= 80)
return IMGTOOLERR_SEEKERROR;
}
- *head = block / apple35_sectors_per_track(imgtool_floppy(image->image), *track);
- *sector = block % apple35_sectors_per_track(imgtool_floppy(image->image), *track);
+ *head = block / apple35_sectors_per_track(imgtool_floppy(*image->image), *track);
+ *sector = block % apple35_sectors_per_track(imgtool_floppy(*image->image), *track);
return IMGTOOLERR_SUCCESS;
}
@@ -660,7 +660,7 @@ static imgtoolerr_t image_read_block(mac_l1_imgref *image, UINT32 block, void *d
if (err)
return err;
- ferr = floppy_read_sector(imgtool_floppy(image->image), head, track, sector, 0, dest, 512);
+ ferr = floppy_read_sector(imgtool_floppy(*image->image), head, track, sector, 0, dest, 512);
if (ferr)
return imgtool_floppy_error(ferr);
@@ -688,7 +688,7 @@ static imgtoolerr_t image_write_block(mac_l1_imgref *image, UINT32 block, const
if (err)
return err;
- ferr = floppy_write_sector(imgtool_floppy(image->image), head, track, sector, 0, src, 512, 0); /* TODO: pass ddam argument from imgtool */
+ ferr = floppy_write_sector(imgtool_floppy(*image->image), head, track, sector, 0, src, 512, 0); /* TODO: pass ddam argument from imgtool */
if (ferr)
return imgtool_floppy_error(ferr);
@@ -1069,7 +1069,7 @@ static imgtoolerr_t hfs_file_open(struct mac_l2_imgref *l2_img, UINT32 parID, co
static imgtoolerr_t mfs_file_setABeof(struct mac_fileref *fileref, UINT32 newABeof);
static imgtoolerr_t mfs_dir_update(struct mac_fileref *fileref);
-static struct mac_l2_imgref *get_imgref(imgtool::image *img)
+static struct mac_l2_imgref *get_imgref(imgtool::image &img)
{
return (struct mac_l2_imgref *) imgtool_floppy_extrabytes(img);
}
@@ -1542,7 +1542,7 @@ struct mfs_dirref
-static imgtoolerr_t mfs_image_create(imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t mfs_image_create(imgtool::image &image, imgtool::stream::ptr &&dummy, util::option_resolution *opts)
{
imgtoolerr_t err;
UINT8 buffer[512];
@@ -1554,7 +1554,7 @@ static imgtoolerr_t mfs_image_create(imgtool::image *image, imgtool_stream *stre
tracks = opts->lookup_int('T');
sector_bytes = opts->lookup_int('L');
- get_imgref(image)->l1_img.image = image;
+ get_imgref(image)->l1_img.image = &image;
get_imgref(image)->l1_img.heads = heads;
if (sector_bytes != 512)
@@ -1606,7 +1606,7 @@ static imgtoolerr_t mfs_image_create(imgtool::image *image, imgtool_stream *stre
Return imgtool error code
*/
-static imgtoolerr_t mfs_image_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t mfs_image_open(imgtool::image &image, imgtool::stream::ptr &&dummy)
{
imgtoolerr_t err;
struct mac_l2_imgref *l2_img;
@@ -1614,7 +1614,7 @@ static imgtoolerr_t mfs_image_open(imgtool::image *image, imgtool_stream *stream
img_open_buf *buf;
l2_img = get_imgref(image);
- l2_img->l1_img.image = image;
+ l2_img->l1_img.image = &image;
l2_img->l1_img.heads = 1;
l2_img->format = L2I_MFS;
@@ -3033,7 +3033,7 @@ static int hfs_catKey_compare(const void *p1, const void *p2)
Return imgtool error code
*/
-static imgtoolerr_t hfs_image_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t hfs_image_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
imgtoolerr_t err;
struct mac_l2_imgref *l2_img;
@@ -3041,7 +3041,7 @@ static imgtoolerr_t hfs_image_open(imgtool::image *image, imgtool_stream *stream
img_open_buf *buf;
l2_img = get_imgref(image);
- l2_img->l1_img.image = image;
+ l2_img->l1_img.image = &image;
l2_img->l1_img.heads = 2;
l2_img->format = L2I_HFS;
@@ -5273,12 +5273,12 @@ static imgtoolerr_t get_comment(struct mac_l2_imgref *l2_img, UINT16 id, mac_str
#ifdef UNUSED_FUNCTION
static void mac_image_exit(imgtool::image *img);
#endif
-static void mac_image_info(imgtool::image *img, char *string, size_t len);
-static imgtoolerr_t mac_image_beginenum(imgtool::directory *enumeration, const char *path);
-static imgtoolerr_t mac_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent);
-static imgtoolerr_t mac_image_freespace(imgtool::partition *partition, UINT64 *size);
-static imgtoolerr_t mac_image_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf);
-static imgtoolerr_t mac_image_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions);
+static void mac_image_info(imgtool::image &img, std::ostream &stream);
+static imgtoolerr_t mac_image_beginenum(imgtool::directory &enumeration, const char *path);
+static imgtoolerr_t mac_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent);
+static imgtoolerr_t mac_image_freespace(imgtool::partition &partition, UINT64 *size);
+static imgtoolerr_t mac_image_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf);
+static imgtoolerr_t mac_image_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions);
#ifdef UNUSED_FUNCTION
/*
@@ -5297,20 +5297,23 @@ static void mac_image_exit(imgtool::image *img)
Currently returns the volume name
*/
-static void mac_image_info(imgtool::image *img, char *string, size_t len)
+static void mac_image_info(imgtool::image &img, std::ostream &stream)
{
+ char buffer[256] = { 0, };
struct mac_l2_imgref *image = get_imgref(img);
switch (image->format)
{
case L2I_MFS:
- mac_to_c_strncpy(string, len, image->u.mfs.volname);
+ mac_to_c_strncpy(buffer, ARRAY_LENGTH(buffer), image->u.mfs.volname);
break;
case L2I_HFS:
- mac_to_c_strncpy(string, len, image->u.hfs.volname);
+ mac_to_c_strncpy(buffer, ARRAY_LENGTH(buffer), image->u.hfs.volname);
break;
}
+
+ stream << buffer;
}
/*
@@ -5336,10 +5339,10 @@ struct mac_iterator
/*
Open the disk catalog for enumeration
*/
-static imgtoolerr_t mac_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t mac_image_beginenum(imgtool::directory &enumeration, const char *path)
{
- struct mac_l2_imgref *image = get_imgref(&enumeration->image());
- mac_iterator *iter = (mac_iterator *) enumeration->extra_bytes();
+ struct mac_l2_imgref *image = get_imgref(enumeration.image());
+ mac_iterator *iter = (mac_iterator *) enumeration.extra_bytes();
imgtoolerr_t err = IMGTOOLERR_UNEXPECTED;
iter->format = image->format;
@@ -5365,7 +5368,7 @@ static imgtoolerr_t mac_image_beginenum(imgtool::directory *enumeration, const c
/*
Enumerate disk catalog next entry (MFS)
*/
-static imgtoolerr_t mfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
+static imgtoolerr_t mfs_image_nextenum(mac_iterator *iter, imgtool_dirent &ent)
{
mfs_dir_entry *cur_dir_entry;
imgtoolerr_t err;
@@ -5373,26 +5376,26 @@ static imgtoolerr_t mfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
assert(iter->format == L2I_MFS);
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
err = mfs_dir_read(&iter->u.mfs.dirref, &cur_dir_entry);
if (err)
{
/* error */
- ent->corrupt = 1;
+ ent.corrupt = 1;
return err;
}
else if (!cur_dir_entry)
{
/* EOF */
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
/* copy info */
- mac_to_c_strncpy(ent->filename, ARRAY_LENGTH(ent->filename), cur_dir_entry->name);
- ent->filesize = get_UINT32BE(cur_dir_entry->dataPhysicalSize)
+ mac_to_c_strncpy(ent.filename, ARRAY_LENGTH(ent.filename), cur_dir_entry->name);
+ ent.filesize = get_UINT32BE(cur_dir_entry->dataPhysicalSize)
+ get_UINT32BE(cur_dir_entry->rsrcPhysicalSize);
return IMGTOOLERR_SUCCESS;
@@ -5433,7 +5436,7 @@ static void concat_fname(char *dest, int *dest_cur_pos, int dest_max_len, const
/*
Enumerate disk catalog next entry (HFS)
*/
-static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
+static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent &ent)
{
hfs_catKey *catrec_key;
hfs_catData *catrec_data;
@@ -5445,8 +5448,8 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
assert(iter->format == L2I_HFS);
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
do
{
@@ -5454,13 +5457,13 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
if (err)
{
/* error */
- ent->corrupt = 1;
+ ent.corrupt = 1;
return err;
}
else if (!catrec_key)
{
/* EOF */
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
dataRecType = get_UINT16BE(catrec_data->dataType);
@@ -5471,28 +5474,28 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
switch (get_UINT16BE(catrec_data->dataType))
{
case hcrt_Folder:
- ent->directory = 1;
- ent->filesize = 0;
+ ent.directory = 1;
+ ent.filesize = 0;
break;
case hcrt_File:
- ent->directory = 0;
- ent->filesize = get_UINT32BE(catrec_data->file.dataPhysicalSize)
+ ent.directory = 0;
+ ent.filesize = get_UINT32BE(catrec_data->file.dataPhysicalSize)
+ get_UINT32BE(catrec_data->file.rsrcPhysicalSize);
break;
}
/* initialize file path buffer */
- cur_name_head = ARRAY_LENGTH(ent->filename);
+ cur_name_head = ARRAY_LENGTH(ent.filename);
if (cur_name_head > 0)
{
cur_name_head--;
- ent->filename[cur_name_head] = '\0';
+ ent.filename[cur_name_head] = '\0';
}
/* insert folder/file name in buffer */
- mac_to_c_strncpy(ent->filename, ARRAY_LENGTH(ent->filename), catrec_key->cName);
-// concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename) - 1, buf);
+ mac_to_c_strncpy(ent.filename, ARRAY_LENGTH(ent.filename), catrec_key->cName);
+// concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename) - 1, buf);
#if 0
/* extract parent directory ID */
@@ -5507,11 +5510,11 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
if (err)
{
/* error */
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename) - 1, ":");
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename) - 1, "???");
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename) - 1, ":");
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename) - 1, "???");
- memmove(ent->filename, ent->filename+cur_name_head, ARRAY_LENGTH(ent->filename) - cur_name_head);
- ent->corrupt = 1;
+ memmove(ent.filename, ent.filename+cur_name_head, ARRAY_LENGTH(ent.filename) - cur_name_head);
+ ent.corrupt = 1;
return err;
}
@@ -5520,24 +5523,24 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
if (dataRecType != hcrt_FolderThread)
{
/* error */
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename)-1, ":");
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename)-1, "???");
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename)-1, ":");
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename)-1, "???");
- memmove(ent->filename, ent->filename+cur_name_head, ARRAY_LENGTH(ent->filename)-cur_name_head);
- ent->corrupt = 1;
+ memmove(ent.filename, ent.filename+cur_name_head, ARRAY_LENGTH(ent.filename)-cur_name_head);
+ ent.corrupt = 1;
return IMGTOOLERR_CORRUPTIMAGE;
}
/* got folder thread record: insert the folder name at the start of
file path, then iterate */
mac_to_c_strncpy(buf, sizeof(buf), catrec_data->thread.nodeName);
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename) - 1, ":");
- concat_fname(ent->filename, &cur_name_head, ARRAY_LENGTH(ent->filename) - 1, buf);
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename) - 1, ":");
+ concat_fname(ent.filename, &cur_name_head, ARRAY_LENGTH(ent.filename) - 1, buf);
/* extract parent directory ID */
parID = get_UINT32BE(catrec_data->thread.parID);
}
- memmove(ent->filename, ent->filename+cur_name_head, ARRAY_LENGTH(ent->filename) -cur_name_head);
+ memmove(ent.filename, ent.filename+cur_name_head, ARRAY_LENGTH(ent.filename) -cur_name_head);
#endif
return IMGTOOLERR_SUCCESS;
}
@@ -5545,10 +5548,10 @@ static imgtoolerr_t hfs_image_nextenum(mac_iterator *iter, imgtool_dirent *ent)
/*
Enumerate disk catalog next entry
*/
-static imgtoolerr_t mac_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t mac_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
imgtoolerr_t err;
- mac_iterator *iter = (mac_iterator *) enumeration->extra_bytes();
+ mac_iterator *iter = (mac_iterator *) enumeration.extra_bytes();
switch (iter->format)
{
@@ -5571,9 +5574,9 @@ static imgtoolerr_t mac_image_nextenum(imgtool::directory *enumeration, imgtool_
/*
Compute free space on disk image in bytes
*/
-static imgtoolerr_t mac_image_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t mac_image_freespace(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
*size = ((UINT64) get_imgref(image)->freeABs) * 512;
return IMGTOOLERR_SUCCESS;
}
@@ -5610,10 +5613,10 @@ static imgtoolerr_t mac_get_comment(struct mac_l2_imgref *image, mac_str255 file
/*
Extract a file from a disk image.
*/
-static imgtoolerr_t mac_image_readfile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t mac_image_readfile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct mac_l2_imgref *image = get_imgref(img);
UINT32 parID;
mac_str255 filename;
@@ -5650,7 +5653,7 @@ static imgtoolerr_t mac_image_readfile(imgtool::partition *partition, const char
err = mac_file_read(&fileref, run_len, buf);
if (err)
return err;
- if (stream_write(destf, buf, run_len) != run_len)
+ if (destf.write(buf, run_len) != run_len)
return IMGTOOLERR_WRITEERROR;
i += run_len;
}
@@ -5661,9 +5664,9 @@ static imgtoolerr_t mac_image_readfile(imgtool::partition *partition, const char
/*
Add a file to a disk image.
*/
-static imgtoolerr_t mac_image_writefile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t mac_image_writefile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions)
{
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct mac_l2_imgref *image = get_imgref(img);
UINT32 parID;
mac_str255 filename;
@@ -5694,7 +5697,7 @@ static imgtoolerr_t mac_image_writefile(imgtool::partition *partition, const cha
memset(&cat_info, 0, sizeof(cat_info));
set_UINT32BE(&cat_info.flFinderInfo.type, 0x3F3F3F3F);
set_UINT32BE(&cat_info.flFinderInfo.creator, 0x3F3F3F3F);
- fork_len = stream_size(sourcef);
+ fork_len = sourcef.size();
/*comment[0] = get_UINT16BE(header.comment_len);*/ /* comment length */
/* Next two fields are set to 0 with MFS volumes. IIRC, 0 normally
means system script: I don't think MFS stores the file name script code
@@ -5726,7 +5729,7 @@ static imgtoolerr_t mac_image_writefile(imgtool::partition *partition, const cha
run_len = fork_len - i;
if (run_len > 512)
run_len = 512;
- if (stream_read(sourcef, buf, run_len) != run_len)
+ if (sourcef.read(buf, run_len) != run_len)
return IMGTOOLERR_READERROR;
err = mac_file_write(&fileref, run_len, buf);
if (err)
@@ -5738,14 +5741,14 @@ static imgtoolerr_t mac_image_writefile(imgtool::partition *partition, const cha
-static imgtoolerr_t mac_image_listforks(imgtool::partition *partition, const char *path, imgtool_forkent *ents, size_t len)
+static imgtoolerr_t mac_image_listforks(imgtool::partition &partition, const char *path, imgtool_forkent *ents, size_t len)
{
imgtoolerr_t err;
UINT32 parID;
mac_str255 filename;
mac_dirent cat_info;
int fork_num = 0;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct mac_l2_imgref *image = get_imgref(img);
/* resolve path and fetch file info from directory/catalog */
@@ -5776,10 +5779,10 @@ static imgtoolerr_t mac_image_listforks(imgtool::partition *partition, const cha
-static imgtoolerr_t mac_image_getattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
+static imgtoolerr_t mac_image_getattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
{
imgtoolerr_t err;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
UINT32 parID;
mac_str255 filename;
mac_dirent cat_info;
@@ -5844,13 +5847,13 @@ static imgtoolerr_t mac_image_getattrs(imgtool::partition *partition, const char
-static imgtoolerr_t mac_image_setattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
+static imgtoolerr_t mac_image_setattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
{
imgtoolerr_t err;
UINT32 parID;
mac_str255 filename;
mac_dirent cat_info;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct mac_l2_imgref *image = get_imgref(img);
int i;
@@ -6111,7 +6114,7 @@ static int load_icon(UINT32 *dest, const void *resource_fork, UINT64 resource_fo
-static imgtoolerr_t mac_image_geticoninfo(imgtool::partition *partition, const char *path, imgtool_iconinfo *iconinfo)
+static imgtoolerr_t mac_image_geticoninfo(imgtool::partition &partition, const char *path, imgtool_iconinfo *iconinfo)
{
static const UINT32 mac_palette_1bpp[2] = { 0xFFFFFF, 0x000000 };
@@ -6179,7 +6182,7 @@ static imgtoolerr_t mac_image_geticoninfo(imgtool::partition *partition, const c
imgtoolerr_t err;
imgtool_attribute attr_values[3];
UINT32 type_code, creator_code, finder_flags;
- imgtool_stream *stream = NULL;
+ imgtool::stream *stream = NULL;
const void *resource_fork;
UINT64 resource_fork_length;
const void *bundle;
@@ -6205,7 +6208,7 @@ static imgtoolerr_t mac_image_geticoninfo(imgtool::partition *partition, const c
if (!(finder_flags & 0x2000) && (type_code != /* APPL */ 0x4150504C))
path = "Desktop\0";
- stream = stream_open_mem(NULL, 0);
+ stream = imgtool::stream::open_mem(NULL, 0);
if (!stream)
{
err = IMGTOOLERR_SUCCESS;
@@ -6213,11 +6216,11 @@ static imgtoolerr_t mac_image_geticoninfo(imgtool::partition *partition, const c
}
/* read in the resource fork */
- err = mac_image_readfile(partition, path, "RESOURCE_FORK", stream);
+ err = mac_image_readfile(partition, path, "RESOURCE_FORK", *stream);
if (err)
goto done;
- resource_fork = stream_getptr(stream);
- resource_fork_length = stream_size(stream);
+ resource_fork = stream->getptr();
+ resource_fork_length = stream->size();
/* attempt to look up the bundle */
bundle = mac_walk_resources(resource_fork, resource_fork_length, /* BNDL */ 0x424E444C,
@@ -6305,7 +6308,7 @@ static imgtoolerr_t mac_image_geticoninfo(imgtool::partition *partition, const c
done:
if (stream)
- stream_close(stream);
+ delete stream;
return err;
}
@@ -6317,13 +6320,13 @@ done:
*
*************************************/
-static imgtoolerr_t mac_image_suggesttransfer(imgtool::partition *partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t mac_image_suggesttransfer(imgtool::partition &partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t err;
UINT32 parID;
mac_str255 filename;
mac_dirent cat_info;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct mac_l2_imgref *image = get_imgref(img);
mac_filecategory_t file_category = MAC_FILECATEGORY_DATA;
diff --git a/src/tools/imgtool/modules/macbin.cpp b/src/tools/imgtool/modules/macbin.cpp
index cebf15b6a29..24368e3320e 100644
--- a/src/tools/imgtool/modules/macbin.cpp
+++ b/src/tools/imgtool/modules/macbin.cpp
@@ -63,7 +63,7 @@ static UINT32 pad128(UINT32 length)
-static imgtoolerr_t macbinary_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t macbinary_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
static const UINT32 attrs[] =
{
@@ -101,7 +101,7 @@ static imgtoolerr_t macbinary_readfile(imgtool::partition *partition, const char
imgtool_attribute attr_values[10];
/* get the forks */
- err = partition->list_file_forks(filename, fork_entries, sizeof(fork_entries));
+ err = partition.list_file_forks(filename, fork_entries, sizeof(fork_entries));
if (err)
return err;
for (i = 0; fork_entries[i].type != FORK_END; i++)
@@ -113,7 +113,7 @@ static imgtoolerr_t macbinary_readfile(imgtool::partition *partition, const char
}
/* get the attributes */
- err = partition->get_file_attributes(filename, attrs, attr_values);
+ err = partition.get_file_attributes(filename, attrs, attr_values);
if (err && (ERRORCODE(err) != IMGTOOLERR_UNIMPLEMENTED))
return err;
if (err == IMGTOOLERR_SUCCESS)
@@ -156,24 +156,24 @@ static imgtoolerr_t macbinary_readfile(imgtool::partition *partition, const char
place_integer_be(header, 123, 1, 0x81);
place_integer_be(header, 124, 2, ccitt_crc16(0, header, 124));
- stream_write(destf, header, sizeof(header));
+ destf.write(header, sizeof(header));
if (data_fork)
{
- err = partition->read_file(filename, "", destf, NULL);
+ err = partition.read_file(filename, "", destf, NULL);
if (err)
return err;
- stream_fill(destf, 0, pad128(data_fork->size));
+ destf.fill(0, pad128(data_fork->size));
}
if (resource_fork)
{
- err = partition->read_file(filename, "RESOURCE_FORK", destf, NULL);
+ err = partition.read_file(filename, "RESOURCE_FORK", destf, NULL);
if (err)
return err;
- stream_fill(destf, 0, pad128(resource_fork->size));
+ destf.fill(0, pad128(resource_fork->size));
}
return IMGTOOLERR_SUCCESS;
@@ -181,42 +181,42 @@ static imgtoolerr_t macbinary_readfile(imgtool::partition *partition, const char
-static imgtoolerr_t write_fork(imgtool::partition *partition, const char *filename, const char *fork,
- imgtool_stream *sourcef, UINT64 pos, UINT64 fork_len, util::option_resolution *opts)
+static imgtoolerr_t write_fork(imgtool::partition &partition, const char *filename, const char *fork,
+ imgtool::stream &sourcef, UINT64 pos, UINT64 fork_len, util::option_resolution *opts)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
- imgtool_stream *mem_stream = NULL;
+ imgtool::stream *mem_stream = NULL;
size_t len;
if (fork_len > 0)
{
- mem_stream = stream_open_mem(NULL, 0);
+ mem_stream = imgtool::stream::open_mem(NULL, 0);
if (!mem_stream)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
}
- stream_seek(sourcef, pos, SEEK_SET);
- len = stream_transfer(mem_stream, sourcef, fork_len);
+ sourcef.seek(pos, SEEK_SET);
+ len = imgtool::stream::transfer(*mem_stream, sourcef, fork_len);
if (len < fork_len)
- stream_fill(mem_stream, 0, fork_len);
+ mem_stream->fill(0, fork_len);
- stream_seek(mem_stream, 0, SEEK_SET);
- err = partition->write_file(filename, fork, mem_stream, opts, NULL);
+ mem_stream->seek(0, SEEK_SET);
+ err = partition.write_file(filename, fork, *mem_stream, opts, NULL);
if (err)
goto done;
}
done:
if (mem_stream)
- stream_close(mem_stream);
+ delete mem_stream;
return err;
}
-static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t macbinary_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
static const UINT32 attrs[] =
{
@@ -233,7 +233,7 @@ static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const cha
0
};
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image *image = &partition.image();
UINT8 header[128];
UINT32 datafork_size;
UINT32 resourcefork_size;
@@ -254,7 +254,7 @@ static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const cha
/* read in the header */
memset(header, 0, sizeof(header));
- stream_read(sourcef, header, sizeof(header));
+ sourcef.read(header, sizeof(header));
/* check magic and zero fill bytes */
if (header[0] != 0x00)
@@ -266,7 +266,7 @@ static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const cha
datafork_size = pick_integer_be(header, 83, 4);
resourcefork_size = pick_integer_be(header, 87, 4);
- total_size = stream_size(sourcef);
+ total_size = sourcef.size();
/* size of a MacBinary header is always 128 bytes */
if (total_size - pad128(datafork_size) - pad128(resourcefork_size) != 128)
@@ -332,7 +332,7 @@ static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const cha
attr_values[8].i = script_code;
attr_values[9].i = extended_flags;
- err = partition->put_file_attributes(filename, attrs, attr_values);
+ err = partition.put_file_attributes(filename, attrs, attr_values);
if (err)
return err;
}
@@ -341,8 +341,9 @@ static imgtoolerr_t macbinary_writefile(imgtool::partition *partition, const cha
}
-
-static imgtoolerr_t macbinary_checkstream(imgtool_stream *stream, imgtool_suggestion_viability_t *viability)
+// this was completely broken - it was calling macbinary_writefile() with a nullptr partition
+#if 0
+static imgtoolerr_t macbinary_checkstream(imgtool::stream &stream, imgtool_suggestion_viability_t *viability)
{
imgtoolerr_t err;
@@ -360,6 +361,7 @@ static imgtoolerr_t macbinary_checkstream(imgtool_stream *stream, imgtool_sugges
}
return err;
}
+#endif
@@ -372,6 +374,6 @@ void filter_macbinary_getinfo(UINT32 state, union filterinfo *info)
case FILTINFO_STR_EXTENSION: info->s = "bin"; break;
case FILTINFO_PTR_READFILE: info->read_file = macbinary_readfile; break;
case FILTINFO_PTR_WRITEFILE: info->write_file = macbinary_writefile; break;
- case FILTINFO_PTR_CHECKSTREAM: info->check_stream = macbinary_checkstream; break;
+ //case FILTINFO_PTR_CHECKSTREAM: info->check_stream = macbinary_checkstream; break;
}
}
diff --git a/src/tools/imgtool/modules/os9.cpp b/src/tools/imgtool/modules/os9.cpp
index 7eccad34a61..2ec56b7cbc1 100644
--- a/src/tools/imgtool/modules/os9.cpp
+++ b/src/tools/imgtool/modules/os9.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Nathan Woods
/****************************************************************************
- os9.c
+ os9.cpp
CoCo OS-9 disk images
@@ -118,21 +118,21 @@ static void place_string(void *ptr, size_t offset, size_t length, const char *s)
-static os9_diskinfo *os9_get_diskinfo(imgtool::image *image)
+static os9_diskinfo *os9_get_diskinfo(imgtool::image &image)
{
return (os9_diskinfo *) imgtool_floppy_extrabytes(image);
}
-static struct os9_direnum *os9_get_dirinfo(imgtool::directory *directory)
+static struct os9_direnum *os9_get_dirinfo(imgtool::directory &directory)
{
- return (struct os9_direnum *) directory->extra_bytes();
+ return (struct os9_direnum *) directory.extra_bytes();
}
-static imgtoolerr_t os9_locate_lsn(imgtool::image *image, UINT32 lsn, UINT32 *head, UINT32 *track, UINT32 *sector)
+static imgtoolerr_t os9_locate_lsn(imgtool::image &image, UINT32 lsn, UINT32 *head, UINT32 *track, UINT32 *sector)
{
const os9_diskinfo *disk_info;
@@ -148,7 +148,7 @@ static imgtoolerr_t os9_locate_lsn(imgtool::image *image, UINT32 lsn, UINT32 *he
-static imgtoolerr_t os9_read_lsn(imgtool::image *img, UINT32 lsn, int offset, void *buffer, size_t buffer_len)
+static imgtoolerr_t os9_read_lsn(imgtool::image &img, UINT32 lsn, int offset, void *buffer, size_t buffer_len)
{
imgtoolerr_t err;
floperr_t ferr;
@@ -167,7 +167,7 @@ static imgtoolerr_t os9_read_lsn(imgtool::image *img, UINT32 lsn, int offset, vo
-static imgtoolerr_t os9_write_lsn(imgtool::image *img, UINT32 lsn, int offset, const void *buffer, size_t buffer_len)
+static imgtoolerr_t os9_write_lsn(imgtool::image &img, UINT32 lsn, int offset, const void *buffer, size_t buffer_len)
{
imgtoolerr_t err;
floperr_t ferr;
@@ -186,7 +186,7 @@ static imgtoolerr_t os9_write_lsn(imgtool::image *img, UINT32 lsn, int offset, c
-static UINT32 os9_lookup_lsn(imgtool::image *img,
+static UINT32 os9_lookup_lsn(imgtool::image &img,
const struct os9_fileinfo *file_info, UINT32 *index)
{
int i;
@@ -241,7 +241,7 @@ static int os9_interpret_dirent(void *entry, char **filename, UINT32 *lsn, int *
entry from an LSN, and decodes it
-------------------------------------------------*/
-static imgtoolerr_t os9_decode_file_header(imgtool::image *image,
+static imgtoolerr_t os9_decode_file_header(imgtool::image &image,
int lsn, struct os9_fileinfo *info)
{
imgtoolerr_t err;
@@ -293,7 +293,7 @@ static imgtoolerr_t os9_decode_file_header(imgtool::image *image,
-static imgtoolerr_t os9_allocate_lsn(imgtool::image *image, UINT32 *lsn)
+static imgtoolerr_t os9_allocate_lsn(imgtool::image &image, UINT32 *lsn)
{
UINT32 i;
os9_diskinfo *disk_info;
@@ -318,7 +318,7 @@ static imgtoolerr_t os9_allocate_lsn(imgtool::image *image, UINT32 *lsn)
-static imgtoolerr_t os9_deallocate_lsn(imgtool::image *image, UINT32 lsn)
+static imgtoolerr_t os9_deallocate_lsn(imgtool::image &image, UINT32 lsn)
{
UINT8 mask;
os9_diskinfo *disk_info;
@@ -331,7 +331,7 @@ static imgtoolerr_t os9_deallocate_lsn(imgtool::image *image, UINT32 lsn)
-static UINT32 os9_get_free_lsns(imgtool::image *image)
+static UINT32 os9_get_free_lsns(imgtool::image &image)
{
const os9_diskinfo *disk_info;
UINT32 i, free_lsns;
@@ -364,7 +364,7 @@ static imgtoolerr_t os9_corrupt_file_error(const struct os9_fileinfo *file_info)
-static imgtoolerr_t os9_set_file_size(imgtool::image *image,
+static imgtoolerr_t os9_set_file_size(imgtool::image &image,
struct os9_fileinfo *file_info, UINT32 new_size)
{
imgtoolerr_t err;
@@ -483,7 +483,7 @@ static imgtoolerr_t os9_set_file_size(imgtool::image *image,
a file
-------------------------------------------------*/
-static imgtoolerr_t os9_lookup_path(imgtool::image *img, const char *path,
+static imgtoolerr_t os9_lookup_path(imgtool::image &img, const char *path,
creation_policy_t create, struct os9_fileinfo *file_info,
UINT32 *parent_lsn, UINT32 *dirent_lsn, UINT32 *dirent_index)
{
@@ -622,7 +622,7 @@ done:
-static imgtoolerr_t os9_diskimage_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t os9_diskimage_open(imgtool::image &image, imgtool::stream::ptr &&dummy)
{
imgtoolerr_t err;
floperr_t ferr;
@@ -670,7 +670,7 @@ static imgtoolerr_t os9_diskimage_open(imgtool::image *image, imgtool_stream *st
return IMGTOOLERR_CORRUPTIMAGE;
/* is the allocation bitmap too big? */
- info->allocation_bitmap = (UINT8*)image->malloc(info->allocation_bitmap_bytes);
+ info->allocation_bitmap = (UINT8*)image.malloc(info->allocation_bitmap_bytes);
if (!info->allocation_bitmap)
return IMGTOOLERR_OUTOFMEMORY;
memset(info->allocation_bitmap, 0, info->allocation_bitmap_bytes);
@@ -710,10 +710,10 @@ static imgtoolerr_t os9_diskimage_open(imgtool::image *image, imgtool_stream *st
-static imgtoolerr_t os9_diskimage_create(imgtool::image *img, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t os9_diskimage_create(imgtool::image &img, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
imgtoolerr_t err;
- dynamic_buffer header;
+ std::vector<UINT8> header;
UINT32 heads, tracks, sectors, sector_bytes, first_sector_id;
UINT32 cluster_size, owner_id;
UINT32 allocation_bitmap_bits, allocation_bitmap_lsns;
@@ -847,13 +847,12 @@ done:
-static imgtoolerr_t os9_diskimage_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t os9_diskimage_beginenum(imgtool::directory &enumeration, const char *path)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
struct os9_direnum *os9enum;
- imgtool::image *image;
+ imgtool::image &image(enumeration.image());
- image = &enumeration->image();
os9enum = os9_get_dirinfo(enumeration);
err = os9_lookup_path(image, path, CREATE_NONE, &os9enum->dir_info, NULL, NULL, NULL);
@@ -873,7 +872,7 @@ done:
-static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
struct os9_direnum *os9enum;
UINT32 lsn, index;
@@ -881,9 +880,8 @@ static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory *enumeration, imgt
UINT8 dir_entry[32];
char filename[29];
struct os9_fileinfo file_info;
- imgtool::image *image;
+ imgtool::image &image(enumeration.image());
- image = &enumeration->image();
os9enum = os9_get_dirinfo(enumeration);
do
@@ -891,7 +889,7 @@ static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory *enumeration, imgt
/* check for EOF */
if (os9enum->index >= os9enum->dir_info.file_size)
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
@@ -949,13 +947,13 @@ static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory *enumeration, imgt
/* read file attributes */
lsn = pick_integer_be(dir_entry, 29, 3);
- err = os9_decode_file_header(&enumeration->image(), lsn, &file_info);
+ err = os9_decode_file_header(enumeration.image(), lsn, &file_info);
if (err)
return err;
/* fill out imgtool_dirent structure */
- snprintf(ent->filename, ARRAY_LENGTH(ent->filename), "%s", filename);
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%c%c%c%c%c%c%c%c",
+ snprintf(ent.filename, ARRAY_LENGTH(ent.filename), "%s", filename);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%c%c%c%c%c%c%c%c",
file_info.directory ? 'd' : '-',
file_info.non_sharable ? 's' : '-',
file_info.public_execute ? 'x' : '-',
@@ -965,17 +963,17 @@ static imgtoolerr_t os9_diskimage_nextenum(imgtool::directory *enumeration, imgt
file_info.user_write ? 'w' : '-',
file_info.user_read ? 'r' : '-');
- ent->directory = file_info.directory;
- ent->corrupt = (dir_entry[28] != 0);
- ent->filesize = file_info.file_size;
+ ent.directory = file_info.directory;
+ ent.corrupt = (dir_entry[28] != 0);
+ ent.filesize = file_info.file_size;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t os9_diskimage_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t os9_diskimage_freespace(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
const os9_diskinfo *disk_info;
UINT32 free_lsns;
@@ -988,10 +986,10 @@ static imgtoolerr_t os9_diskimage_freespace(imgtool::partition *partition, UINT6
-static imgtoolerr_t os9_diskimage_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t os9_diskimage_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
const os9_diskinfo *disk_info;
struct os9_fileinfo file_info;
UINT8 buffer[256];
@@ -1017,7 +1015,7 @@ static imgtoolerr_t os9_diskimage_readfile(imgtool::partition *partition, const
buffer, used_size);
if (err)
return err;
- stream_write(destf, buffer, used_size);
+ destf.write(buffer, used_size);
file_size -= used_size;
}
}
@@ -1026,13 +1024,13 @@ static imgtoolerr_t os9_diskimage_readfile(imgtool::partition *partition, const
-static imgtoolerr_t os9_diskimage_writefile(imgtool::partition *partition, const char *path, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t os9_diskimage_writefile(imgtool::partition &partition, const char *path, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
struct os9_fileinfo file_info;
size_t write_size;
- dynamic_buffer buf;
+ std::vector<UINT8> buf;
int i = -1;
UINT32 lsn = 0;
UINT32 count = 0;
@@ -1047,7 +1045,7 @@ static imgtoolerr_t os9_diskimage_writefile(imgtool::partition *partition, const
if (err)
goto done;
- sz = (UINT32) stream_size(sourcef);
+ sz = (UINT32) sourcef.size();
err = os9_set_file_size(image, &file_info, sz);
if (err)
@@ -1057,7 +1055,7 @@ static imgtoolerr_t os9_diskimage_writefile(imgtool::partition *partition, const
{
write_size = (std::min<UINT64>)(sz, disk_info->sector_size);
- stream_read(sourcef, &buf[0], write_size);
+ sourcef.read(&buf[0], write_size);
while(count == 0)
{
@@ -1081,12 +1079,11 @@ done:
-static imgtoolerr_t os9_diskimage_delete(imgtool::partition *partition, const char *path,
+static imgtoolerr_t os9_diskimage_delete(imgtool::partition &partition, const char *path,
unsigned int delete_directory)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
- //const os9_diskinfo *disk_info;
+ imgtool::image &image(partition.image());
struct os9_fileinfo file_info;
UINT32 dirent_lsn, dirent_index;
UINT32 entry_lsn, entry_index;
@@ -1163,17 +1160,17 @@ static imgtoolerr_t os9_diskimage_delete(imgtool::partition *partition, const ch
-static imgtoolerr_t os9_diskimage_deletefile(imgtool::partition *partition, const char *path)
+static imgtoolerr_t os9_diskimage_deletefile(imgtool::partition &partition, const char *path)
{
return os9_diskimage_delete(partition, path, 0);
}
-static imgtoolerr_t os9_diskimage_createdir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t os9_diskimage_createdir(imgtool::partition &partition, const char *path)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
struct os9_fileinfo file_info;
UINT8 dir_data[64];
UINT32 parent_lsn;
@@ -1203,7 +1200,7 @@ done:
-static imgtoolerr_t os9_diskimage_deletedir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t os9_diskimage_deletedir(imgtool::partition &partition, const char *path)
{
return os9_diskimage_delete(partition, path, 1);
}
diff --git a/src/tools/imgtool/modules/pc_flop.cpp b/src/tools/imgtool/modules/pc_flop.cpp
index 9a00e393c22..3e08760cf7c 100644
--- a/src/tools/imgtool/modules/pc_flop.cpp
+++ b/src/tools/imgtool/modules/pc_flop.cpp
@@ -17,13 +17,13 @@
#define FAT_SECLEN 512
-static imgtoolerr_t fat_image_create(imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t fat_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
imgtoolerr_t err;
UINT32 tracks, heads, sectors;
UINT8 buffer[FAT_SECLEN];
imgtool_class imgclass = { fat_get_info };
- imgtoolerr_t (*fat_partition_create)(imgtool::image *image, UINT64 first_block, UINT64 block_count);
+ imgtoolerr_t (*fat_partition_create)(imgtool::image &image, UINT64 first_block, UINT64 block_count);
tracks = opts->lookup_int('T');
heads = opts->lookup_int('H');
@@ -35,12 +35,12 @@ static imgtoolerr_t fat_image_create(imgtool::image *image, imgtool_stream *stre
place_integer_le(buffer, 26, 2, heads);
place_integer_le(buffer, 19, 2, (UINT16) (((UINT64) tracks * heads * sectors) >> 0));
place_integer_le(buffer, 32, 4, (UINT16) (((UINT64) tracks * heads * sectors) >> 16));
- err = image->write_block(0, buffer);
+ err = image.write_block(0, buffer);
if (err)
goto done;
/* load fat_partition_create */
- fat_partition_create = (imgtoolerr_t (*)(imgtool::image *, UINT64, UINT64))
+ fat_partition_create = (imgtoolerr_t (*)(imgtool::image &, UINT64, UINT64))
imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CREATE_PARTITION);
/* actually create the partition */
@@ -54,13 +54,13 @@ done:
-static imgtoolerr_t fat_image_get_geometry(imgtool::image *image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors)
+static imgtoolerr_t fat_image_get_geometry(imgtool::image &image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors)
{
imgtoolerr_t err;
UINT64 total_sectors;
UINT8 buffer[FAT_SECLEN];
- err = image->read_block(0, buffer);
+ err = image.read_block(0, buffer);
if (err)
return err;
@@ -75,7 +75,7 @@ static imgtoolerr_t fat_image_get_geometry(imgtool::image *image, UINT32 *tracks
-static imgtoolerr_t fat_get_sector_position(imgtool::image *image, UINT32 sector_index,
+static imgtoolerr_t fat_get_sector_position(imgtool::image &image, UINT32 sector_index,
UINT32 *track, UINT32 *head, UINT32 *sector)
{
imgtoolerr_t err;
@@ -90,7 +90,7 @@ static imgtoolerr_t fat_get_sector_position(imgtool::image *image, UINT32 sector
}
else
{
- err = image->get_geometry(&tracks, &heads, &sectors);
+ err = image.get_geometry(&tracks, &heads, &sectors);
if (err)
return err;
@@ -103,14 +103,14 @@ static imgtoolerr_t fat_get_sector_position(imgtool::image *image, UINT32 sector
-static imgtoolerr_t fat_image_readblock(imgtool::image *image, void *buffer, UINT64 block)
+static imgtoolerr_t fat_image_readblock(imgtool::image &image, void *buffer, UINT64 block)
{
imgtoolerr_t err;
floperr_t ferr;
UINT32 track, head, sector;
UINT32 block_size;
- err = image->get_block_size(block_size);
+ err = image.get_block_size(block_size);
if (err)
return err;
@@ -126,14 +126,14 @@ static imgtoolerr_t fat_image_readblock(imgtool::image *image, void *buffer, UIN
-static imgtoolerr_t fat_image_writeblock(imgtool::image *image, const void *buffer, UINT64 block)
+static imgtoolerr_t fat_image_writeblock(imgtool::image &image, const void *buffer, UINT64 block)
{
imgtoolerr_t err;
floperr_t ferr;
UINT32 track, head, sector;
UINT32 block_size;
- err = image->get_block_size(block_size);
+ err = image.get_block_size(block_size);
if (err)
return err;
diff --git a/src/tools/imgtool/modules/pc_hard.cpp b/src/tools/imgtool/modules/pc_hard.cpp
index 9c7eaafea33..9aad12aa319 100644
--- a/src/tools/imgtool/modules/pc_hard.cpp
+++ b/src/tools/imgtool/modules/pc_hard.cpp
@@ -94,14 +94,14 @@ struct pc_chd_image_info
-static pc_chd_image_info *pc_chd_get_image_info(imgtool::image *image)
+static pc_chd_image_info *pc_chd_get_image_info(imgtool::image &image)
{
- return (pc_chd_image_info *) image->extra_bytes();
+ return (pc_chd_image_info *) image.extra_bytes();
}
-static void pc_chd_locate_block(imgtool::image *image, UINT64 block, UINT32 *cylinder, UINT32 *head, UINT32 *sector)
+static void pc_chd_locate_block(imgtool::image &image, UINT64 block, UINT32 *cylinder, UINT32 *head, UINT32 *sector)
{
pc_chd_image_info *info;
const hard_disk_info *hd_info;
@@ -116,7 +116,7 @@ static void pc_chd_locate_block(imgtool::image *image, UINT64 block, UINT32 *cyl
-static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition_index, UINT64 first_block, UINT64 block_count)
+static imgtoolerr_t pc_chd_partition_create(imgtool::image &image, int partition_index, UINT64 first_block, UINT64 block_count)
{
imgtoolerr_t err;
UINT8 header_block[FAT_SECLEN];
@@ -127,7 +127,7 @@ static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition
UINT32 first_cylinder, first_head, first_sector;
UINT32 last_cylinder, last_head, last_sector;
imgtool_class imgclass = { fat_get_info };
- imgtoolerr_t (*fat_partition_create)(imgtool::image *image, UINT64 first_block, UINT64 block_count);
+ imgtoolerr_t (*fat_partition_create)(imgtool::image &image, UINT64 first_block, UINT64 block_count);
/* sanity checks */
assert((partition_index >= 0) && (partition_index <= 3));
@@ -137,7 +137,7 @@ static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition
pc_chd_locate_block(image, first_block + block_count - 1, &last_cylinder, &last_head, &last_sector);
/* load fat_partition_create */
- fat_partition_create = (imgtoolerr_t (*)(imgtool::image *, UINT64, UINT64))
+ fat_partition_create = (imgtoolerr_t (*)(imgtool::image &, UINT64, UINT64))
imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_CREATE_PARTITION);
/* first create the actual partition */
@@ -146,7 +146,7 @@ static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition
goto done;
/* read the first block of the partition, to determine the type of FAT */
- err = image->read_block(first_block, partition_block);
+ err = image.read_block(first_block, partition_block);
if (err)
goto done;
fat_type = &partition_block[54];
@@ -162,7 +162,7 @@ static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition
partition_type = 0x0B;
/* read the partition header */
- err = image->read_block(0, header_block);
+ err = image.read_block(0, header_block);
if (err)
goto done;
@@ -180,7 +180,7 @@ static imgtoolerr_t pc_chd_partition_create(imgtool::image *image, int partition
place_integer_le(partition_entry, 12, 4, block_count);
/* write the partition header */
- err = image->write_block(0, header_block);
+ err = image.write_block(0, header_block);
if (err)
goto done;
@@ -190,7 +190,7 @@ done:
-static imgtoolerr_t pc_chd_read_partition_header(imgtool::image *image)
+static imgtoolerr_t pc_chd_read_partition_header(imgtool::image &image)
{
imgtoolerr_t err;
int i;
@@ -201,7 +201,7 @@ static imgtoolerr_t pc_chd_read_partition_header(imgtool::image *image)
info = pc_chd_get_image_info(image);
/* read the initial block */
- err = image->read_block(0, buffer);
+ err = image.read_block(0, buffer);
if (err)
return err;
@@ -232,7 +232,7 @@ static imgtoolerr_t pc_chd_read_partition_header(imgtool::image *image)
-static imgtoolerr_t pc_chd_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *opts)
+static imgtoolerr_t pc_chd_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
imgtoolerr_t err;
UINT32 cylinders, heads, sectors;
@@ -246,11 +246,11 @@ static imgtoolerr_t pc_chd_image_create(imgtool::image *image, imgtool_stream *f
info = pc_chd_get_image_info(image);
/* create the hard disk image */
- err = imghd_create(f, 0, cylinders, heads, sectors, FAT_SECLEN);
+ err = imghd_create(*stream, 0, cylinders, heads, sectors, FAT_SECLEN);
if (err)
goto done;
- err = imghd_open(f, &info->hard_disk);
+ err = imghd_open(*stream, &info->hard_disk);
if (err)
goto done;
@@ -258,7 +258,7 @@ static imgtoolerr_t pc_chd_image_create(imgtool::image *image, imgtool_stream *f
memset(header_block, 0, sizeof(header_block));
header_block[510] = 0x55;
header_block[511] = 0xAA;
- err = image->write_block(0, header_block);
+ err = image.write_block(0, header_block);
if (err)
goto done;
@@ -278,7 +278,7 @@ done:
-static imgtoolerr_t pc_chd_image_open(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t pc_chd_image_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
imgtoolerr_t err;
pc_chd_image_info *info;
@@ -286,7 +286,7 @@ static imgtoolerr_t pc_chd_image_open(imgtool::image *image, imgtool_stream *str
info = pc_chd_get_image_info(image);
/* open the hard drive */
- err = imghd_open(stream, &info->hard_disk);
+ err = imghd_open(*stream, &info->hard_disk);
if (err)
return err;
@@ -299,7 +299,7 @@ static imgtoolerr_t pc_chd_image_open(imgtool::image *image, imgtool_stream *str
-static void pc_chd_image_close(imgtool::image *image)
+static void pc_chd_image_close(imgtool::image &image)
{
pc_chd_image_info *info;
info = pc_chd_get_image_info(image);
@@ -308,7 +308,7 @@ static void pc_chd_image_close(imgtool::image *image)
-static imgtoolerr_t pc_chd_image_get_geometry(imgtool::image *image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors)
+static imgtoolerr_t pc_chd_image_get_geometry(imgtool::image &image, UINT32 *tracks, UINT32 *heads, UINT32 *sectors)
{
pc_chd_image_info *info;
const hard_disk_info *hd_info;
@@ -324,12 +324,12 @@ static imgtoolerr_t pc_chd_image_get_geometry(imgtool::image *image, UINT32 *tra
-static UINT32 pc_chd_calc_lbasector(pc_chd_image_info *info, UINT32 track, UINT32 head, UINT32 sector)
+static UINT32 pc_chd_calc_lbasector(pc_chd_image_info &info, UINT32 track, UINT32 head, UINT32 sector)
{
UINT32 lbasector;
const hard_disk_info *hd_info;
- hd_info = imghd_get_header(&info->hard_disk);
+ hd_info = imghd_get_header(&info.hard_disk);
lbasector = track;
lbasector *= hd_info->heads;
lbasector += head;
@@ -340,7 +340,7 @@ static UINT32 pc_chd_calc_lbasector(pc_chd_image_info *info, UINT32 track, UINT3
-static imgtoolerr_t pc_chd_image_readsector(imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
+static imgtoolerr_t pc_chd_image_readsector(imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
{
pc_chd_image_info *info = pc_chd_get_image_info(image);
@@ -351,24 +351,24 @@ static imgtoolerr_t pc_chd_image_readsector(imgtool::image *image, UINT32 track,
// read the data
return imghd_read(&info->hard_disk,
- pc_chd_calc_lbasector(info, track, head, sector),
+ pc_chd_calc_lbasector(*info, track, head, sector),
&buffer[0]);
}
-static imgtoolerr_t pc_chd_image_writesector(imgtool::image *image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam)
+static imgtoolerr_t pc_chd_image_writesector(imgtool::image &image, UINT32 track, UINT32 head, UINT32 sector, const void *buffer, size_t len, int ddam)
{
pc_chd_image_info *info;
info = pc_chd_get_image_info(image);
return imghd_write(&info->hard_disk,
- pc_chd_calc_lbasector(info, track, head, sector),
+ pc_chd_calc_lbasector(*info, track, head, sector),
buffer);
}
-static imgtoolerr_t pc_chd_image_readblock(imgtool::image *image, void *buffer, UINT64 block)
+static imgtoolerr_t pc_chd_image_readblock(imgtool::image &image, void *buffer, UINT64 block)
{
pc_chd_image_info *info;
info = pc_chd_get_image_info(image);
@@ -377,7 +377,7 @@ static imgtoolerr_t pc_chd_image_readblock(imgtool::image *image, void *buffer,
-static imgtoolerr_t pc_chd_image_writeblock(imgtool::image *image, const void *buffer, UINT64 block)
+static imgtoolerr_t pc_chd_image_writeblock(imgtool::image &image, const void *buffer, UINT64 block)
{
pc_chd_image_info *info;
info = pc_chd_get_image_info(image);
@@ -386,22 +386,21 @@ static imgtoolerr_t pc_chd_image_writeblock(imgtool::image *image, const void *b
-static imgtoolerr_t pc_chd_list_partitions(imgtool::image *image, imgtool_partition_info *partitions, size_t len)
+static imgtoolerr_t pc_chd_list_partitions(imgtool::image &image, std::vector<imgtool::partition_info> &partitions)
{
pc_chd_image_info *info;
size_t i;
info = pc_chd_get_image_info(image);
- for (i = 0; i < std::min(size_t(4), len); i++)
+ for (i = 0; i < 4; i++)
{
- partitions[i].base_block = info->partitions[i].sector_index;
- partitions[i].block_count = info->partitions[i].total_sectors;
-
+ // what type of partition is this?
+ imgtool_get_info partition_get_info;
switch(info->partitions[i].partition_type)
{
case 0x00: /* Empty Partition */
- partitions[i].get_info = NULL;
+ partition_get_info = nullptr;
break;
case 0x01: /* FAT12 */
@@ -422,13 +421,18 @@ static imgtoolerr_t pc_chd_list_partitions(imgtool::image *image, imgtool_partit
case 0xD1: /* Old Multiuser DOS FAT12 */
case 0xD4: /* Old Multiuser DOS FAT16 (-32 MB) */
case 0xD6: /* Old Multiuser DOS FAT16 (32+ MB) */
- partitions[i].get_info = fat_get_info;
+ partition_get_info = fat_get_info;
break;
default:
- partitions[i].get_info = unknown_partition_get_info;
+ partition_get_info = unknown_partition_get_info;
break;
}
+
+ partitions.emplace_back(
+ partition_get_info,
+ info->partitions[i].sector_index,
+ info->partitions[i].total_sectors);
}
return IMGTOOLERR_SUCCESS;
}
diff --git a/src/tools/imgtool/modules/prodos.cpp b/src/tools/imgtool/modules/prodos.cpp
index b4783aefc3a..54ba077385b 100644
--- a/src/tools/imgtool/modules/prodos.cpp
+++ b/src/tools/imgtool/modules/prodos.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Raphael Nabet
/****************************************************************************
- prodos.c
+ prodos.cpp
Apple II ProDOS disk images
@@ -135,8 +135,8 @@
struct prodos_diskinfo
{
- imgtoolerr_t (*load_block)(imgtool::image *image, int block, void *buffer);
- imgtoolerr_t (*save_block)(imgtool::image *image, int block, const void *buffer);
+ imgtoolerr_t (*load_block)(imgtool::image &image, int block, void *buffer);
+ imgtoolerr_t (*save_block)(imgtool::image &image, int block, const void *buffer);
UINT8 dirent_size;
UINT8 dirents_per_block;
UINT16 volume_bitmap_block;
@@ -265,7 +265,7 @@ static int is_dir_storagetype(UINT8 storage_type)
-static prodos_diskinfo *get_prodos_info(imgtool::image *image)
+static prodos_diskinfo *get_prodos_info(imgtool::image &image)
{
prodos_diskinfo *info;
info = (prodos_diskinfo *) imgtool_floppy_extrabytes(image);
@@ -276,7 +276,7 @@ static prodos_diskinfo *get_prodos_info(imgtool::image *image)
/* ----------------------------------------------------------------------- */
-static void prodos_find_block_525(imgtool::image *image, int block,
+static void prodos_find_block_525(imgtool::image &image, int block,
UINT32 *track, UINT32 *head, UINT32 *sector1, UINT32 *sector2)
{
static const UINT8 skewing[] =
@@ -295,7 +295,7 @@ static void prodos_find_block_525(imgtool::image *image, int block,
-static imgtoolerr_t prodos_load_block_525(imgtool::image *image,
+static imgtoolerr_t prodos_load_block_525(imgtool::image &image,
int block, void *buffer)
{
floperr_t ferr;
@@ -320,7 +320,7 @@ static imgtoolerr_t prodos_load_block_525(imgtool::image *image,
-static imgtoolerr_t prodos_save_block_525(imgtool::image *image,
+static imgtoolerr_t prodos_save_block_525(imgtool::image &image,
int block, const void *buffer)
{
floperr_t ferr;
@@ -345,7 +345,7 @@ static imgtoolerr_t prodos_save_block_525(imgtool::image *image,
-static void prodos_setprocs_525(imgtool::image *image)
+static void prodos_setprocs_525(imgtool::image &image)
{
prodos_diskinfo *info;
info = get_prodos_info(image);
@@ -357,7 +357,7 @@ static void prodos_setprocs_525(imgtool::image *image)
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_find_block_35(imgtool::image *image, int block,
+static imgtoolerr_t prodos_find_block_35(imgtool::image &image, int block,
UINT32 *track, UINT32 *head, UINT32 *sector)
{
int sides = 2;
@@ -377,7 +377,7 @@ static imgtoolerr_t prodos_find_block_35(imgtool::image *image, int block,
-static imgtoolerr_t prodos_load_block_35(imgtool::image *image,
+static imgtoolerr_t prodos_load_block_35(imgtool::image &image,
int block, void *buffer)
{
imgtoolerr_t err;
@@ -397,7 +397,7 @@ static imgtoolerr_t prodos_load_block_35(imgtool::image *image,
-static imgtoolerr_t prodos_save_block_35(imgtool::image *image,
+static imgtoolerr_t prodos_save_block_35(imgtool::image &image,
int block, const void *buffer)
{
imgtoolerr_t err;
@@ -417,7 +417,7 @@ static imgtoolerr_t prodos_save_block_35(imgtool::image *image,
-static void prodos_setprocs_35(imgtool::image *image)
+static void prodos_setprocs_35(imgtool::image &image)
{
prodos_diskinfo *info;
info = get_prodos_info(image);
@@ -429,7 +429,7 @@ static void prodos_setprocs_35(imgtool::image *image)
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_load_block(imgtool::image *image,
+static imgtoolerr_t prodos_load_block(imgtool::image &image,
int block, void *buffer)
{
prodos_diskinfo *diskinfo;
@@ -439,7 +439,7 @@ static imgtoolerr_t prodos_load_block(imgtool::image *image,
-static imgtoolerr_t prodos_save_block(imgtool::image *image,
+static imgtoolerr_t prodos_save_block(imgtool::image &image,
int block, const void *buffer)
{
prodos_diskinfo *diskinfo;
@@ -449,7 +449,7 @@ static imgtoolerr_t prodos_save_block(imgtool::image *image,
-static imgtoolerr_t prodos_clear_block(imgtool::image *image, int block)
+static imgtoolerr_t prodos_clear_block(imgtool::image &image, int block)
{
UINT8 buffer[BLOCK_SIZE];
memset(buffer, 0, sizeof(buffer));
@@ -460,7 +460,7 @@ static imgtoolerr_t prodos_clear_block(imgtool::image *image, int block)
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_diskimage_open(imgtool::image *image)
+static imgtoolerr_t prodos_diskimage_open(imgtool::image &image)
{
imgtoolerr_t err;
UINT8 buffer[BLOCK_SIZE];
@@ -502,7 +502,7 @@ static imgtoolerr_t prodos_diskimage_open(imgtool::image *image)
-static imgtoolerr_t prodos_diskimage_open_525(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t prodos_diskimage_open_525(imgtool::image &image, imgtool::stream::ptr &&dummy)
{
prodos_setprocs_525(image);
return prodos_diskimage_open(image);
@@ -510,7 +510,7 @@ static imgtoolerr_t prodos_diskimage_open_525(imgtool::image *image, imgtool_str
-static imgtoolerr_t prodos_diskimage_open_35(imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t prodos_diskimage_open_35(imgtool::image &image, imgtool::stream::ptr &&dummy)
{
prodos_setprocs_35(image);
return prodos_diskimage_open(image);
@@ -520,7 +520,7 @@ static imgtoolerr_t prodos_diskimage_open_35(imgtool::image *image, imgtool_stre
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_load_volume_bitmap(imgtool::image *image, UINT8 **bitmap)
+static imgtoolerr_t prodos_load_volume_bitmap(imgtool::image &image, UINT8 **bitmap)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -559,7 +559,7 @@ done:
-static imgtoolerr_t prodos_save_volume_bitmap(imgtool::image *image, const UINT8 *bitmap)
+static imgtoolerr_t prodos_save_volume_bitmap(imgtool::image &image, const UINT8 *bitmap)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -604,7 +604,7 @@ static int prodos_get_volume_bitmap_bit(const UINT8 *buffer, UINT16 block)
-static imgtoolerr_t prodos_alloc_block(imgtool::image *image, UINT8 *bitmap,
+static imgtoolerr_t prodos_alloc_block(imgtool::image &image, UINT8 *bitmap,
UINT16 *block)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
@@ -660,7 +660,7 @@ done:
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_diskimage_create(imgtool::image *image, util::option_resolution *opts)
+static imgtoolerr_t prodos_diskimage_create(imgtool::image &image, util::option_resolution *opts)
{
imgtoolerr_t err;
UINT32 heads, tracks, sectors, sector_bytes;
@@ -702,7 +702,7 @@ static imgtoolerr_t prodos_diskimage_create(imgtool::image *image, util::option_
-static imgtoolerr_t prodos_diskimage_create_525(imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t prodos_diskimage_create_525(imgtool::image &image, imgtool::stream::ptr &&dummy, util::option_resolution *opts)
{
prodos_setprocs_525(image);
return prodos_diskimage_create(image, opts);
@@ -710,7 +710,7 @@ static imgtoolerr_t prodos_diskimage_create_525(imgtool::image *image, imgtool_s
-static imgtoolerr_t prodos_diskimage_create_35(imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t prodos_diskimage_create_35(imgtool::image &image, imgtool::stream::ptr &&dummy, util::option_resolution *opts)
{
prodos_setprocs_35(image);
return prodos_diskimage_create(image, opts);
@@ -720,7 +720,7 @@ static imgtoolerr_t prodos_diskimage_create_35(imgtool::image *image, imgtool_st
/* ----------------------------------------------------------------------- */
-static imgtoolerr_t prodos_enum_seek(imgtool::image *image,
+static imgtoolerr_t prodos_enum_seek(imgtool::image &image,
prodos_direnum *appleenum, UINT32 block, UINT32 index)
{
imgtoolerr_t err;
@@ -798,8 +798,8 @@ static UINT8 *alloc_info_block(UINT8 *buffer, size_t block_size, UINT8 block_typ
-static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
- prodos_direnum *appleenum, prodos_dirent *ent)
+static imgtoolerr_t prodos_get_next_dirent(imgtool::image &image,
+ prodos_direnum *appleenum, prodos_dirent &ent)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -811,7 +811,7 @@ static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
int fork_num;
di = get_prodos_info(image);
- memset(ent, 0, sizeof(*ent));
+ memset(&ent, 0, sizeof(ent));
/* have we hit the end of the file? */
if (appleenum->block == 0)
@@ -819,38 +819,38 @@ static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
/* populate the resulting dirent */
offset = appleenum->index * di->dirent_size + 4;
- ent->storage_type = appleenum->block_data[offset + 0];
- memcpy(ent->filename, &appleenum->block_data[offset + 1], 15);
- ent->filename[15] = '\0';
- ent->creation_time = pick_integer_le(appleenum->block_data, offset + 24, 4);
- ent->lastmodified_time = pick_integer_le(appleenum->block_data, offset + 33, 4);
- ent->file_type = 0x3F3F3F3F;
- ent->file_creator = 0x3F3F3F3F;
- ent->finder_flags = 0;
- ent->coord_x = 0;
- ent->coord_y = 0;
- ent->finder_folder = 0;
- ent->icon_id = 0;
- ent->script_code = 0;
- ent->extended_flags = 0;
- ent->comment_id = 0;
- ent->putaway_directory = 0;
+ ent.storage_type = appleenum->block_data[offset + 0];
+ memcpy(ent.filename, &appleenum->block_data[offset + 1], 15);
+ ent.filename[15] = '\0';
+ ent.creation_time = pick_integer_le(appleenum->block_data, offset + 24, 4);
+ ent.lastmodified_time = pick_integer_le(appleenum->block_data, offset + 33, 4);
+ ent.file_type = 0x3F3F3F3F;
+ ent.file_creator = 0x3F3F3F3F;
+ ent.finder_flags = 0;
+ ent.coord_x = 0;
+ ent.coord_y = 0;
+ ent.finder_folder = 0;
+ ent.icon_id = 0;
+ ent.script_code = 0;
+ ent.extended_flags = 0;
+ ent.comment_id = 0;
+ ent.putaway_directory = 0;
- if (is_extendedfile_storagetype(ent->storage_type))
+ if (is_extendedfile_storagetype(ent.storage_type))
{
/* this is a ProDOS extended file; we need to get the extended info
* block */
- ent->extkey_pointer = pick_integer_le(appleenum->block_data, offset + 17, 2);
+ ent.extkey_pointer = pick_integer_le(appleenum->block_data, offset + 17, 2);
- err = prodos_load_block(image, ent->extkey_pointer, buffer);
+ err = prodos_load_block(image, ent.extkey_pointer, buffer);
if (err)
return err;
for (fork_num = 0; fork_num <= 1; fork_num++)
{
- ent->key_pointer[fork_num] = pick_integer_le(buffer, 1 + (fork_num * 256), 2);
- ent->filesize[fork_num] = pick_integer_le(buffer, 5 + (fork_num * 256), 3);
- ent->depth[fork_num] = buffer[fork_num * 256] & 0x0F;
+ ent.key_pointer[fork_num] = pick_integer_le(buffer, 1 + (fork_num * 256), 2);
+ ent.filesize[fork_num] = pick_integer_le(buffer, 5 + (fork_num * 256), 3);
+ ent.depth[fork_num] = buffer[fork_num * 256] & 0x0F;
}
finfo_offset = 0;
@@ -861,20 +861,20 @@ static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
switch(*(info_ptr++))
{
case 1: /* FInfo */
- ent->file_type = pick_integer_be(info_ptr, 0, 4);
- ent->file_creator = pick_integer_be(info_ptr, 4, 4);
- ent->finder_flags = pick_integer_be(info_ptr, 8, 2);
- ent->coord_x = pick_integer_be(info_ptr, 10, 2);
- ent->coord_y = pick_integer_be(info_ptr, 12, 2);
- ent->finder_folder = pick_integer_be(info_ptr, 14, 4);
+ ent.file_type = pick_integer_be(info_ptr, 0, 4);
+ ent.file_creator = pick_integer_be(info_ptr, 4, 4);
+ ent.finder_flags = pick_integer_be(info_ptr, 8, 2);
+ ent.coord_x = pick_integer_be(info_ptr, 10, 2);
+ ent.coord_y = pick_integer_be(info_ptr, 12, 2);
+ ent.finder_folder = pick_integer_be(info_ptr, 14, 4);
break;
case 2: /* xFInfo */
- ent->icon_id = pick_integer_be(info_ptr, 0, 2);
- ent->script_code = pick_integer_be(info_ptr, 8, 1);
- ent->extended_flags = pick_integer_be(info_ptr, 9, 1);
- ent->comment_id = pick_integer_be(info_ptr, 10, 2);
- ent->putaway_directory = pick_integer_be(info_ptr, 12, 4);
+ ent.icon_id = pick_integer_be(info_ptr, 0, 2);
+ ent.script_code = pick_integer_be(info_ptr, 8, 1);
+ ent.extended_flags = pick_integer_be(info_ptr, 9, 1);
+ ent.comment_id = pick_integer_be(info_ptr, 10, 2);
+ ent.putaway_directory = pick_integer_be(info_ptr, 12, 4);
break;
}
}
@@ -883,9 +883,9 @@ static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
else
{
/* normal ProDOS files have all of the info right here */
- ent->key_pointer[0] = pick_integer_le(appleenum->block_data, offset + 17, 2);
- ent->filesize[0] = pick_integer_le(appleenum->block_data, offset + 21, 3);
- ent->depth[0] = ent->storage_type >> 4;
+ ent.key_pointer[0] = pick_integer_le(appleenum->block_data, offset + 17, 2);
+ ent.filesize[0] = pick_integer_le(appleenum->block_data, offset + 21, 3);
+ ent.depth[0] = ent.storage_type >> 4;
}
/* identify next entry */
@@ -908,7 +908,7 @@ static imgtoolerr_t prodos_get_next_dirent(imgtool::image *image,
/* changes a normal file to a ProDOS extended file */
-static imgtoolerr_t prodos_promote_file(imgtool::image *image, UINT8 *bitmap, prodos_dirent *ent)
+static imgtoolerr_t prodos_promote_file(imgtool::image &image, UINT8 *bitmap, prodos_dirent *ent)
{
imgtoolerr_t err;
UINT16 new_block;
@@ -933,7 +933,7 @@ static imgtoolerr_t prodos_promote_file(imgtool::image *image, UINT8 *bitmap, pr
-static imgtoolerr_t prodos_put_dirent(imgtool::image *image,
+static imgtoolerr_t prodos_put_dirent(imgtool::image &image,
prodos_direnum *appleenum, prodos_dirent *ent)
{
imgtoolerr_t err;
@@ -1066,7 +1066,7 @@ static imgtoolerr_t prodos_put_dirent(imgtool::image *image,
-static imgtoolerr_t prodos_lookup_path(imgtool::image *image, const char *path,
+static imgtoolerr_t prodos_lookup_path(imgtool::image &image, const char *path,
creation_policy_t create, prodos_direnum *direnum, prodos_dirent *ent)
{
imgtoolerr_t err;
@@ -1095,7 +1095,7 @@ static imgtoolerr_t prodos_lookup_path(imgtool::image *image, const char *path,
this_block = direnum->block;
this_index = direnum->index;
- err = prodos_get_next_dirent(image, direnum, ent);
+ err = prodos_get_next_dirent(image, direnum, *ent);
if (err)
goto done;
@@ -1214,7 +1214,7 @@ done:
-static imgtoolerr_t prodos_fill_file(imgtool::image *image, UINT8 *bitmap,
+static imgtoolerr_t prodos_fill_file(imgtool::image &image, UINT8 *bitmap,
UINT16 key_block, int key_block_allocated,
int depth, UINT32 blockcount, UINT32 block_index)
{
@@ -1299,7 +1299,7 @@ static imgtoolerr_t prodos_fill_file(imgtool::image *image, UINT8 *bitmap,
-static imgtoolerr_t prodos_set_file_block_count(imgtool::image *image, prodos_direnum *direnum,
+static imgtoolerr_t prodos_set_file_block_count(imgtool::image &image, prodos_direnum *direnum,
prodos_dirent *ent, UINT8 *bitmap, int fork_num, UINT32 new_blockcount)
{
imgtoolerr_t err;
@@ -1423,7 +1423,7 @@ static imgtoolerr_t prodos_set_file_block_count(imgtool::image *image, prodos_di
-static imgtoolerr_t prodos_set_file_size(imgtool::image *image, prodos_direnum *direnum,
+static imgtoolerr_t prodos_set_file_size(imgtool::image &image, prodos_direnum *direnum,
prodos_dirent *ent, int fork_num, UINT32 new_size)
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
@@ -1486,16 +1486,15 @@ static UINT32 prodos_get_storagetype_maxfilesize(UINT8 storage_type)
-static imgtoolerr_t prodos_diskimage_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t prodos_diskimage_beginenum(imgtool::directory &enumeration, const char *path)
{
imgtoolerr_t err;
- imgtool::image *image;
+ imgtool::image &image(enumeration.image());
prodos_direnum *appleenum;
prodos_dirent ent;
UINT16 block = ROOTDIR_BLOCK;
- image = &enumeration->image();
- appleenum = (prodos_direnum *) enumeration->extra_bytes();
+ appleenum = (prodos_direnum *) enumeration.extra_bytes();
/* find subdirectory, if appropriate */
if (*path)
@@ -1521,20 +1520,19 @@ static imgtoolerr_t prodos_diskimage_beginenum(imgtool::directory *enumeration,
-static imgtoolerr_t prodos_diskimage_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t prodos_diskimage_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
imgtoolerr_t err;
- imgtool::image *image;
+ imgtool::image &image(enumeration.image());
prodos_direnum *appleenum;
prodos_dirent pd_ent;
UINT32 max_filesize;
- image = &enumeration->image();
- appleenum = (prodos_direnum *) enumeration->extra_bytes();
+ appleenum = (prodos_direnum *) enumeration.extra_bytes();
do
{
- err = prodos_get_next_dirent(image, appleenum, &pd_ent);
+ err = prodos_get_next_dirent(image, appleenum, pd_ent);
if (err)
return err;
}
@@ -1545,24 +1543,24 @@ static imgtoolerr_t prodos_diskimage_nextenum(imgtool::directory *enumeration, i
/* end of file? */
if (pd_ent.storage_type == 0x00)
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
- strcpy(ent->filename, pd_ent.filename);
- ent->directory = is_dir_storagetype(pd_ent.storage_type);
- ent->creation_time = prodos_crack_time(pd_ent.creation_time);
- ent->lastmodified_time = prodos_crack_time(pd_ent.lastmodified_time);
+ strcpy(ent.filename, pd_ent.filename);
+ ent.directory = is_dir_storagetype(pd_ent.storage_type);
+ ent.creation_time = prodos_crack_time(pd_ent.creation_time);
+ ent.lastmodified_time = prodos_crack_time(pd_ent.lastmodified_time);
- if (!ent->directory)
+ if (!ent.directory)
{
- ent->filesize = pd_ent.filesize[0];
+ ent.filesize = pd_ent.filesize[0];
max_filesize = prodos_get_storagetype_maxfilesize(pd_ent.storage_type);
- if (ent->filesize > max_filesize)
+ if (ent.filesize > max_filesize)
{
- ent->corrupt = 1;
- ent->filesize = max_filesize;
+ ent.corrupt = 1;
+ ent.filesize = max_filesize;
}
}
return IMGTOOLERR_SUCCESS;
@@ -1570,8 +1568,8 @@ static imgtoolerr_t prodos_diskimage_nextenum(imgtool::directory *enumeration, i
-static imgtoolerr_t prodos_read_file_tree(imgtool::image *image, UINT32 *filesize,
- UINT32 block, int nest_level, imgtool_stream *destf)
+static imgtoolerr_t prodos_read_file_tree(imgtool::image &image, UINT32 *filesize,
+ UINT32 block, int nest_level, imgtool::stream &destf)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -1612,7 +1610,7 @@ static imgtoolerr_t prodos_read_file_tree(imgtool::image *image, UINT32 *filesiz
{
/* this is a leaf block */
bytes_to_write = std::min(size_t(*filesize), sizeof(buffer));
- stream_write(destf, buffer, bytes_to_write);
+ destf.write(buffer, bytes_to_write);
*filesize -= bytes_to_write;
}
return IMGTOOLERR_SUCCESS;
@@ -1620,8 +1618,8 @@ static imgtoolerr_t prodos_read_file_tree(imgtool::image *image, UINT32 *filesiz
-static imgtoolerr_t prodos_write_file_tree(imgtool::image *image, UINT32 *filesize,
- UINT32 block, int nest_level, imgtool_stream *sourcef)
+static imgtoolerr_t prodos_write_file_tree(imgtool::image &image, UINT32 *filesize,
+ UINT32 block, int nest_level, imgtool::stream &sourcef)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -1663,7 +1661,7 @@ static imgtoolerr_t prodos_write_file_tree(imgtool::image *image, UINT32 *filesi
{
/* this is a leaf block */
bytes_to_read = std::min(size_t(*filesize), sizeof(buffer));
- stream_read(sourcef, buffer, bytes_to_read);
+ sourcef.read(buffer, bytes_to_read);
*filesize -= bytes_to_read;
err = prodos_save_block(image, block, buffer);
@@ -1675,10 +1673,10 @@ static imgtoolerr_t prodos_write_file_tree(imgtool::image *image, UINT32 *filesi
-static imgtoolerr_t prodos_diskimage_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t prodos_diskimage_freespace(imgtool::partition &partition, UINT64 *size)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_diskinfo *di;
UINT8 *bitmap = NULL;
UINT16 i;
@@ -1704,10 +1702,10 @@ done:
-static imgtoolerr_t prodos_diskimage_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t prodos_diskimage_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
UINT16 key_pointer;
int nest_level;
@@ -1737,23 +1735,23 @@ static imgtoolerr_t prodos_diskimage_readfile(imgtool::partition *partition, con
/* have we not actually received the correct amount of bytes? if not, fill in the rest */
if (ent.filesize[fork_num] > 0)
- stream_fill(destf, 0, ent.filesize[fork_num]);
+ destf.fill(0, ent.filesize[fork_num]);
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t prodos_diskimage_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t prodos_diskimage_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
UINT64 file_size;
mac_fork_t fork_num;
- file_size = stream_size(sourcef);
+ file_size = sourcef.size();
err = prodos_lookup_path(image, filename, CREATE_FILE, &direnum, &ent);
if (err)
@@ -1782,10 +1780,10 @@ static imgtoolerr_t prodos_diskimage_writefile(imgtool::partition *partition, co
-static imgtoolerr_t prodos_diskimage_deletefile(imgtool::partition *partition, const char *path)
+static imgtoolerr_t prodos_diskimage_deletefile(imgtool::partition &partition, const char *path)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
@@ -1815,10 +1813,10 @@ static imgtoolerr_t prodos_diskimage_deletefile(imgtool::partition *partition, c
-static imgtoolerr_t prodos_diskimage_listforks(imgtool::partition *partition, const char *path, imgtool_forkent *ents, size_t len)
+static imgtoolerr_t prodos_diskimage_listforks(imgtool::partition &partition, const char *path, imgtool_forkent *ents, size_t len)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
int fork_num = 0;
@@ -1851,10 +1849,10 @@ static imgtoolerr_t prodos_diskimage_listforks(imgtool::partition *partition, co
-static imgtoolerr_t prodos_diskimage_createdir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t prodos_diskimage_createdir(imgtool::partition &partition, const char *path)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
@@ -1871,7 +1869,7 @@ static imgtoolerr_t prodos_diskimage_createdir(imgtool::partition *partition, co
-static imgtoolerr_t prodos_free_directory(imgtool::image *image, UINT8 *volume_bitmap, UINT16 key_pointer)
+static imgtoolerr_t prodos_free_directory(imgtool::image &image, UINT8 *volume_bitmap, UINT16 key_pointer)
{
imgtoolerr_t err;
prodos_diskinfo *di;
@@ -1909,10 +1907,10 @@ static imgtoolerr_t prodos_free_directory(imgtool::image *image, UINT8 *volume_b
-static imgtoolerr_t prodos_diskimage_deletedir(imgtool::partition *partition, const char *path)
+static imgtoolerr_t prodos_diskimage_deletedir(imgtool::partition &partition, const char *path)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
UINT8 *volume_bitmap = NULL;
@@ -1953,7 +1951,7 @@ done:
-static imgtoolerr_t prodos_get_file_tree(imgtool::image *image, imgtool_chainent *chain, size_t chain_size,
+static imgtoolerr_t prodos_get_file_tree(imgtool::image &image, imgtool_chainent *chain, size_t chain_size,
size_t *chain_pos, UINT16 block, UINT8 total_depth, UINT8 cur_depth)
{
imgtoolerr_t err;
@@ -1999,10 +1997,10 @@ static imgtoolerr_t prodos_get_file_tree(imgtool::image *image, imgtool_chainent
-static imgtoolerr_t prodos_diskimage_getattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
+static imgtoolerr_t prodos_diskimage_getattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
int i;
@@ -2062,10 +2060,10 @@ static imgtoolerr_t prodos_diskimage_getattrs(imgtool::partition *partition, con
-static imgtoolerr_t prodos_diskimage_setattrs(imgtool::partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
+static imgtoolerr_t prodos_diskimage_setattrs(imgtool::partition &partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
prodos_direnum direnum;
int i;
@@ -2130,10 +2128,10 @@ static imgtoolerr_t prodos_diskimage_setattrs(imgtool::partition *partition, con
-static imgtoolerr_t prodos_diskimage_suggesttransfer(imgtool::partition *partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t prodos_diskimage_suggesttransfer(imgtool::partition &partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
mac_filecategory_t file_category = MAC_FILECATEGORY_DATA;
@@ -2153,10 +2151,10 @@ static imgtoolerr_t prodos_diskimage_suggesttransfer(imgtool::partition *partiti
-static imgtoolerr_t prodos_diskimage_getchain(imgtool::partition *partition, const char *path, imgtool_chainent *chain, size_t chain_size)
+static imgtoolerr_t prodos_diskimage_getchain(imgtool::partition &partition, const char *path, imgtool_chainent *chain, size_t chain_size)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
prodos_dirent ent;
size_t chain_pos = 0;
int fork_num;
diff --git a/src/tools/imgtool/modules/psion.cpp b/src/tools/imgtool/modules/psion.cpp
index e0b5e7f5421..0b25bfdefb6 100644
--- a/src/tools/imgtool/modules/psion.cpp
+++ b/src/tools/imgtool/modules/psion.cpp
@@ -38,7 +38,7 @@ struct psion_file
struct psion_pack
{
- imgtool_stream *stream;
+ imgtool::stream *stream;
UINT16 eop;
struct psion_file pack_index[MAXFILES];
@@ -49,6 +49,11 @@ struct psion_iter
UINT16 index;
};
+static psion_pack *get_psion_pack(imgtool::image &image)
+{
+ return (psion_pack*)image.extra_bytes();
+}
+
UINT16 head_checksum(UINT8* data)
{
UINT16 checksum = 0;
@@ -59,12 +64,12 @@ UINT16 head_checksum(UINT8* data)
return checksum;
}
-UINT16 get_long_rec_size(imgtool_stream *stream)
+UINT16 get_long_rec_size(imgtool::stream &stream)
{
UINT8 size_h, size_l;
- stream_read(stream, &size_h, 1);
- stream_read(stream, &size_l, 1);
+ stream.read(&size_h, 1);
+ stream.read(&size_l, 1);
return (size_h<<8) | size_l;
}
@@ -78,88 +83,88 @@ UINT32 update_pack_index(psion_pack *pack)
memset(pack->pack_index, 0, sizeof(psion_file) * MAXFILES);
// start at the first record
- stream_seek(pack->stream, 0x10, SEEK_SET);
+ pack->stream->seek(0x10, SEEK_SET);
do
{
- stream_read(pack->stream, &data, 1);
+ pack->stream->read(&data, 1);
if(data == 0xff)
{
- pack->eop = stream_tell(pack->stream) - 1;
+ pack->eop = pack->stream->tell() - 1;
return TRUE;
}
else if (data == 0x02)
{
// long record without name are ignored
- stream_read(pack->stream, &data, 1);
- size = get_long_rec_size(pack->stream);
- stream_seek(pack->stream, size, SEEK_CUR);
+ pack->stream->read(&data, 1);
+ size = get_long_rec_size(*pack->stream);
+ pack->stream->seek(size, SEEK_CUR);
}
else
{
- stream_read(pack->stream, &type, 1);
+ pack->stream->read(&type, 1);
// deleted record are not listed
if (type < 0x90 && (type & 0x80))
{
pack->pack_index[index].type = type;
- stream_read(pack->stream, &pack->pack_index[index].filename, 8);
- stream_read(pack->stream, &pack->pack_index[index].id, 1);
- pack->pack_index[index].name_rec = stream_tell(pack->stream) - 11;
+ pack->stream->read(&pack->pack_index[index].filename, 8);
+ pack->stream->read(&pack->pack_index[index].id, 1);
+ pack->pack_index[index].name_rec = pack->stream->tell() - 11;
//check for data record
- stream_read(pack->stream, &data, 1);
+ pack->stream->read(&data, 1);
if (data == 0x02)
- pack->pack_index[index].data_rec = stream_tell(pack->stream) - 1;
+ pack->pack_index[index].data_rec = pack->stream->tell() - 1;
- stream_seek(pack->stream, -1, SEEK_CUR);
+ pack->stream->seek(-1, SEEK_CUR);
index++;
}
else
- stream_seek(pack->stream, data, SEEK_CUR);
+ pack->stream->seek(data, SEEK_CUR);
}
- } while (stream_size(pack->stream) > stream_tell(pack->stream));
+ } while (pack->stream->size() > pack->stream->tell());
// corrupted image
return FALSE;
}
-int seek_next_record(imgtool_stream *stream, UINT8 id)
+int seek_next_record(imgtool::stream &stream, UINT8 id)
{
UINT8 data, rec_id;
UINT16 size;
do
{
- stream_read(stream, &data, 1);
+ stream.read(&data, 1);
if(data == 0xff)
break;
if (data == 2)
{
- stream_read(stream, &rec_id, 1);
+ stream.read(&rec_id, 1);
size = get_long_rec_size(stream);
}
else
{
- stream_read(stream, &rec_id, 1);
+ stream.read(&rec_id, 1);
if (id == rec_id)
{
- stream_seek(stream, -2, SEEK_CUR);
+ stream.seek(-2, SEEK_CUR);
return TRUE;
}
size = data;
}
// next record
- stream_seek(stream, size, SEEK_CUR);
+ stream.seek(size, SEEK_CUR);
- } while (stream_size(stream) > stream_tell(stream));
+ } while (stream.size() > stream.tell());
return FALSE;
}
@@ -194,7 +199,7 @@ UINT8 get_free_file_id(psion_pack *pack)
return 0xff;
}
-void put_name_record(imgtool_stream *stream, const char* filename, UINT8 record_type, UINT8 record_id)
+static void put_name_record(imgtool::stream &stream, const char* filename, UINT8 record_type, UINT8 record_id)
{
char data[0x10];
int i = 0;
@@ -211,35 +216,35 @@ void put_name_record(imgtool_stream *stream, const char* filename, UINT8 record_
data[i++] = record_id;
- stream_write(stream, data, i);
+ stream.write(data, i);
}
-void update_opk_head(imgtool_stream *stream)
+static void update_opk_head(imgtool::stream &stream)
{
- UINT16 size = stream_size(stream) - 6;
+ UINT16 size = stream.size() - 6;
- stream_seek(stream, 4, SEEK_SET);
- stream_putc(stream, (size>>8) & 0xff);
- stream_putc(stream, size & 0xff);
+ stream.seek(4, SEEK_SET);
+ stream.putc((size>>8) & 0xff);
+ stream.putc(size & 0xff);
}
-char *stream_getline(imgtool_stream *source, UINT16 max_len)
+char *stream_getline(imgtool::stream &source, UINT16 max_len)
{
UINT16 pos = 0;
char data;
char *line = (char*)malloc(max_len);
memset(line, 0, max_len);
- while (pos < max_len && stream_size(source) > stream_tell(source))
+ while (pos < max_len && source.size() > source.tell())
{
- stream_read(source, &data, 1);
+ source.read(&data, 1);
switch(data)
{
case '\r':
- stream_read(source, &data, 1);
+ source.read(&data, 1);
if (data != '\n')
- stream_seek(source, -1, SEEK_CUR);
+ source.seek(-1, SEEK_CUR);
case '\n':
return line;
default:
@@ -255,21 +260,21 @@ char *stream_getline(imgtool_stream *source, UINT16 max_len)
return NULL;
}
-UINT16 put_odb(imgtool_stream *instream, imgtool_stream *outstream, UINT8 file_id)
+UINT16 put_odb(imgtool::stream &instream, imgtool::stream &outstream, UINT8 file_id)
{
char *line;
UINT16 out_size = 0;
// reset stream
- stream_seek(instream, 0, SEEK_SET);
+ instream.seek(0, SEEK_SET);
while ((line = stream_getline(instream, 256)))
{
UINT16 len = strlen(line);
- stream_putc(outstream, (UINT8)len);
- stream_putc(outstream, file_id);
- stream_write(outstream, line, len);
+ outstream.putc((UINT8)len);
+ outstream.putc(file_id);
+ outstream.write(line, len);
out_size += (len + 1);
@@ -277,37 +282,37 @@ UINT16 put_odb(imgtool_stream *instream, imgtool_stream *outstream, UINT8 file_i
}
// end of pack
- stream_fill(outstream, 0xff, 2);
+ outstream.fill(0xff, 2);
return out_size + 4;
}
-UINT16 put_ob3(imgtool_stream *instream, imgtool_stream *outstream)
+UINT16 put_ob3(imgtool::stream &instream, imgtool::stream &outstream)
{
- UINT16 size = stream_size(instream) - 6;
- dynamic_buffer buffer(size);
+ UINT16 size = instream.size() - 6;
+ std::vector<UINT8> buffer(size);
- stream_seek(instream, 6, SEEK_SET);
- stream_read(instream, &buffer[0], size);
+ instream.seek(6, SEEK_SET);
+ instream.read(&buffer[0], size);
- stream_write(outstream, &buffer[0], size);
+ outstream.write(&buffer[0], size);
// end of pack
- stream_fill(outstream, 0xff, 2);
+ outstream.fill(0xff, 2);
return size;
}
-UINT16 put_opl(imgtool_stream *instream, imgtool_stream *outstream)
+UINT16 put_opl(imgtool::stream &instream, imgtool::stream &outstream)
{
UINT16 out_size = 0;
- UINT32 rec_start = stream_tell(outstream);
+ UINT32 rec_start = outstream.tell();
char *line;
// reset stream
- stream_seek(instream, 0, SEEK_SET);
+ instream.seek(0, SEEK_SET);
- stream_fill(outstream, 0x00, 4);
+ outstream.fill(0x00, 4);
// replace all eol with 0x00
while ((line = stream_getline(instream, 256)))
@@ -316,24 +321,24 @@ UINT16 put_opl(imgtool_stream *instream, imgtool_stream *outstream)
for (int i=0; i<strlen(line); i++)
if (line[i] == '\t') line[i] = ' ';
- stream_write(outstream, line, strlen(line));
- stream_putc(outstream, 0x00);
+ outstream.write(line, strlen(line));
+ outstream.putc(0x00);
out_size += strlen(line) + 1;
free(line);
}
// end of pack
- stream_fill(outstream, 0xff, 2);
+ outstream.fill(0xff, 2);
// update the size in the head
- stream_seek(outstream, rec_start + 2, SEEK_SET);
- stream_putc(outstream, (out_size>>8) & 0xff);
- stream_putc(outstream, out_size & 0xff);
+ outstream.seek(rec_start + 2, SEEK_SET);
+ outstream.putc((out_size>>8) & 0xff);
+ outstream.putc(out_size & 0xff);
return out_size + 4;
}
-UINT16 get_odb(imgtool_stream *instream, imgtool_stream *outstream, UINT8 type, UINT8 file_id)
+UINT16 get_odb(imgtool::stream &instream, imgtool::stream &outstream, UINT8 type, UINT8 file_id)
{
UINT8 data, *buffer;
UINT16 out_size = 0;
@@ -341,13 +346,13 @@ UINT16 get_odb(imgtool_stream *instream, imgtool_stream *outstream, UINT8 type,
if (file_id >= 0x90)
while (seek_next_record(instream, file_id))
{
- stream_read(instream, &data, 1);
- stream_seek(instream, 1, SEEK_CUR);
+ instream.read(&data, 1);
+ instream.seek(1, SEEK_CUR);
buffer = (UINT8*)malloc(data);
- stream_read(instream, buffer, data);
- stream_write(outstream, buffer, data);
- stream_putc(outstream, '\r');
- stream_putc(outstream, '\n');
+ instream.read(buffer, data);
+ outstream.write(buffer, data);
+ outstream.putc('\r');
+ outstream.putc('\n');
free (buffer);
out_size += data;
}
@@ -355,57 +360,62 @@ UINT16 get_odb(imgtool_stream *instream, imgtool_stream *outstream, UINT8 type,
return out_size;
}
-UINT16 get_ob3(imgtool_stream *instream, imgtool_stream *outstream, UINT8 type, UINT8 file_id)
+UINT16 get_ob3(imgtool::stream &instream, imgtool::stream &outstream, UINT8 type, UINT8 file_id)
{
UINT8 data, *buffer = NULL;
UINT16 size = 0;
static const char ob3_magic[3] = {'O', 'R', 'G'};
- stream_read(instream, &data, 1);
+ instream.read(&data, 1);
if (data == 0x02)
{
- stream_seek(instream, 1, SEEK_CUR);
+ instream.seek(1, SEEK_CUR);
size = get_long_rec_size(instream);
buffer = (UINT8*)malloc(size);
- stream_read(instream, buffer, size);
+ instream.read(buffer, size);
}
- stream_write(outstream, ob3_magic, 3);
- stream_putc(outstream, (size>>8) & 0xff);
- stream_putc(outstream, size & 0xff);
- stream_putc(outstream, type | 0x80);
+ outstream.write(ob3_magic, 3);
+ outstream.putc((size>>8) & 0xff);
+ outstream.putc(size & 0xff);
+ outstream.putc(type | 0x80);
if (buffer)
{
- stream_write(outstream, buffer, size);
+ outstream.write(buffer, size);
free (buffer);
}
return size;
}
-static imgtoolerr_t datapack_open( imgtool::image *image, imgtool_stream *stream)
+static imgtoolerr_t datapack_open(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ psion_pack *pack = get_psion_pack(image);
char opk_magic[4];
- stream_read(stream, opk_magic, 4);
+ stream->read(opk_magic, 4);
if(strcmp(opk_magic, "OPK\0"))
return IMGTOOLERR_UNEXPECTED;
- pack->stream = stream;
+ pack->stream = stream.get();
if (update_pack_index(pack))
+ {
+ pack->stream = stream.release();
return IMGTOOLERR_SUCCESS;
+ }
else
+ {
return IMGTOOLERR_CORRUPTIMAGE;
+ }
}
-static imgtoolerr_t datapack_create( imgtool::image *image, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t datapack_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *opts)
{
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ psion_pack *pack = get_psion_pack(image);
static const UINT8 opk_magic[4] = {'O', 'P', 'K', 0x00};
UINT8 pack_head[8] = {0x40, 0x00, 0x59, 0x01, 0x01, 0x01, 0x00, 0x00};
UINT16 checksum;
@@ -419,72 +429,77 @@ static imgtoolerr_t datapack_create( imgtool::image *image, imgtool_stream *stre
checksum = head_checksum(pack_head);
- stream_write(stream, opk_magic, 4);
- stream_fill(stream, 0x00, 2);
- stream_write(stream, pack_head, 8);
+ stream->write(opk_magic, 4);
+ stream->fill(0x00, 2);
+ stream->write(pack_head, 8);
- stream_putc(stream, (checksum>>8) & 0xff);
- stream_putc(stream, checksum & 0xff);
+ stream->putc((checksum>>8) & 0xff);
+ stream->putc(checksum & 0xff);
- put_name_record(stream, "MAIN", 0x81, 0x90);
+ put_name_record(*stream, "MAIN", 0x81, 0x90);
- stream_fill(stream, 0xff, 2);
+ stream->fill(0xff, 2);
- update_opk_head(stream);
+ update_opk_head(*stream);
- pack->stream = stream;
+ pack->stream = stream.get();
if (update_pack_index(pack))
+ {
+ pack->stream = stream.release();
return IMGTOOLERR_SUCCESS;
+ }
else
+ {
return IMGTOOLERR_CORRUPTIMAGE;
+ }
}
-static void datapack_close( imgtool::image *image)
+static void datapack_close(imgtool::image &image)
{
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ psion_pack *pack = get_psion_pack(image);
- stream_close( pack->stream );
+ delete pack->stream;
}
-static imgtoolerr_t datapack_begin_enum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t datapack_begin_enum(imgtool::directory &enumeration, const char *path)
{
- psion_iter *iter = (psion_iter*)enumeration->extra_bytes();
+ psion_iter *iter = (psion_iter*)enumeration.extra_bytes();
iter->index = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t datapack_next_enum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t datapack_next_enum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- imgtool::image *image = &enumeration->image();
- psion_pack *pack = (psion_pack*)image->extra_bytes();
- psion_iter *iter = (psion_iter*)enumeration->extra_bytes();
+ imgtool::image &image(enumeration.image());
+ psion_pack *pack = get_psion_pack(image);
+ psion_iter *iter = (psion_iter*)enumeration.extra_bytes();
UINT8 data = 0;
if (!pack->pack_index[iter->index].name_rec)
{
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
- memcpy(ent->filename, pack->pack_index[iter->index].filename, 8);
- sprintf(ent->attr, "Type: %02x ID: %02x", pack->pack_index[iter->index].type, pack->pack_index[iter->index].id);
+ memcpy(ent.filename, pack->pack_index[iter->index].filename, 8);
+ sprintf(ent.attr, "Type: %02x ID: %02x", pack->pack_index[iter->index].type, pack->pack_index[iter->index].id);
if (pack->pack_index[iter->index].data_rec)
{
- stream_seek(pack->stream, pack->pack_index[iter->index].data_rec + 2, SEEK_SET);
- ent->filesize = get_long_rec_size(pack->stream);
+ pack->stream->seek(pack->pack_index[iter->index].data_rec + 2, SEEK_SET);
+ ent.filesize = get_long_rec_size(*pack->stream);
}
// seek all file's records
if (pack->pack_index[iter->index].id >= 0x90)
{
- stream_seek(pack->stream, 0x10, SEEK_SET);
- while (seek_next_record(pack->stream, pack->pack_index[iter->index].id))
+ pack->stream->seek(0x10, SEEK_SET);
+ while (seek_next_record(*pack->stream, pack->pack_index[iter->index].id))
{
- stream_read(pack->stream, &data, 1);
- stream_seek(pack->stream, data + 1, SEEK_CUR);
- ent->filesize +=data;
+ pack->stream->read(&data, 1);
+ pack->stream->seek(data + 1, SEEK_CUR);
+ ent.filesize +=data;
}
}
@@ -492,18 +507,14 @@ static imgtoolerr_t datapack_next_enum(imgtool::directory *enumeration, imgtool_
return IMGTOOLERR_SUCCESS;
}
-static void datapack_close_enum( imgtool::directory *enumeration)
-{
-}
-
-static imgtoolerr_t datapack_free_space( imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t datapack_free_space(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *image = &partition->image();
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ psion_pack *pack = get_psion_pack(image);
UINT32 pack_size = 0;
- stream_seek(pack->stream, 0x07, SEEK_SET);
- stream_read(pack->stream, &pack_size, 1);
+ pack->stream->seek(0x07, SEEK_SET);
+ pack->stream->read(&pack_size, 1);
if (size)
*size = (pack_size * 0x2000) - pack->eop;
@@ -511,10 +522,10 @@ static imgtoolerr_t datapack_free_space( imgtool::partition *partition, UINT64 *
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t datapack_read_file(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t datapack_read_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
- imgtool::image *image = &partition->image();
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ psion_pack *pack = get_psion_pack(image);
int index = seek_file_name(pack, filename);
if (index >= 0)
@@ -522,14 +533,14 @@ static imgtoolerr_t datapack_read_file(imgtool::partition *partition, const char
if ((pack->pack_index[index].type & 0x7f) == 0x01)
{
// ODB files
- stream_seek(pack->stream, 0x10, SEEK_SET);
- get_odb(pack->stream, destf, pack->pack_index[index].type, pack->pack_index[index].id);
+ pack->stream->seek(0x10, SEEK_SET);
+ get_odb(*pack->stream, destf, pack->pack_index[index].type, pack->pack_index[index].id);
}
else if ((pack->pack_index[index].type & 0x7f) == 0x03)
{
// OB3/OPL files
- stream_seek(pack->stream, pack->pack_index[index].data_rec, SEEK_SET);
- get_ob3(pack->stream, destf, pack->pack_index[index].type, pack->pack_index[index].id);
+ pack->stream->seek(pack->pack_index[index].data_rec, SEEK_SET);
+ get_ob3(*pack->stream, destf, pack->pack_index[index].type, pack->pack_index[index].id);
}
else
{
@@ -543,10 +554,10 @@ static imgtoolerr_t datapack_read_file(imgtool::partition *partition, const char
return IMGTOOLERR_FILENOTFOUND;
}
-static imgtoolerr_t datapack_write_file( imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t datapack_write_file(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
- imgtool::image *image = &partition->image();
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ psion_pack *pack = get_psion_pack(image);
static const UINT8 data_head[4] = {0x02, 0x80, 0x00, 0x00};
UINT8 head[3];
UINT16 size = 0;
@@ -565,8 +576,8 @@ static imgtoolerr_t datapack_write_file( imgtool::partition *partition, const ch
return IMGTOOLERR_NOSPACE;
}
- stream_read(sourcef, head, 3);
- stream_seek(pack->stream, pack->eop, SEEK_SET);
+ sourcef.read(head, 3);
+ pack->stream->seek(pack->eop, SEEK_SET);
if (type == 0)
type = (!strncmp((char*)head, "ORG", 3)) ? 1 : 2;
@@ -574,30 +585,30 @@ static imgtoolerr_t datapack_write_file( imgtool::partition *partition, const ch
switch (type)
{
case 1: //OB3 file
- put_name_record(pack->stream, filename, 0x83, file_id);
- stream_write(pack->stream, data_head, 4);
- size = put_ob3(sourcef, pack->stream);
+ put_name_record(*pack->stream, filename, 0x83, file_id);
+ pack->stream->write(data_head, 4);
+ size = put_ob3(sourcef, *pack->stream);
break;
case 2: //OPL file
- put_name_record(pack->stream, filename, 0x83, file_id);
- stream_write(pack->stream, data_head, 4);
- size = put_opl(sourcef, pack->stream);
+ put_name_record(*pack->stream, filename, 0x83, file_id);
+ pack->stream->write(data_head, 4);
+ size = put_opl(sourcef, *pack->stream);
break;
case 3: //ODB file
- put_name_record(pack->stream, filename, 0x81, file_id);
- size = put_odb(sourcef, pack->stream, file_id);
+ put_name_record(*pack->stream, filename, 0x81, file_id);
+ size = put_odb(sourcef, *pack->stream, file_id);
break;
}
if (type != 3)
{
// update the OB3/OPL long record size
- stream_seek(pack->stream, pack->eop + 13, SEEK_SET);
- stream_putc(pack->stream, (size>>8) & 0xff);
- stream_putc(pack->stream, size & 0xff);
+ pack->stream->seek(pack->eop + 13, SEEK_SET);
+ pack->stream->putc((size>>8) & 0xff);
+ pack->stream->putc(size & 0xff);
}
- update_opk_head(pack->stream);
+ update_opk_head(*pack->stream);
if (update_pack_index(pack))
return IMGTOOLERR_SUCCESS;
@@ -605,17 +616,17 @@ static imgtoolerr_t datapack_write_file( imgtool::partition *partition, const ch
return IMGTOOLERR_CORRUPTIMAGE;
}
-static imgtoolerr_t datapack_delete_file( imgtool::partition *partition, const char *filename)
+static imgtoolerr_t datapack_delete_file(imgtool::partition &partition, const char *filename)
{
- imgtool::image *image = &partition->image();
- psion_pack *pack = (psion_pack*)image->extra_bytes();
+ imgtool::image &image(partition.image());
+ psion_pack *pack = get_psion_pack(image);
int index = seek_file_name(pack, filename);
if (index >= 0)
{
// clear the bit 7 of the file type to mark the file as deleted
- stream_seek(pack->stream, pack->pack_index[index].name_rec + 1, SEEK_SET);
- stream_putc(pack->stream, pack->pack_index[index].type & 0x7f);
+ pack->stream->seek(pack->pack_index[index].name_rec + 1, SEEK_SET);
+ pack->stream->putc(pack->pack_index[index].type & 0x7f);
if (update_pack_index(pack))
return IMGTOOLERR_SUCCESS;
@@ -664,7 +675,6 @@ void psion_get_info( const imgtool_class *imgclass, UINT32 state, union imgtooli
case IMGTOOLINFO_PTR_CLOSE : info->close = datapack_close; break;
case IMGTOOLINFO_PTR_BEGIN_ENUM : info->begin_enum = datapack_begin_enum; break;
case IMGTOOLINFO_PTR_NEXT_ENUM : info->next_enum = datapack_next_enum; break;
- case IMGTOOLINFO_PTR_CLOSE_ENUM : info->close_enum = datapack_close_enum; break;
case IMGTOOLINFO_PTR_FREE_SPACE : info->free_space = datapack_free_space; break;
case IMGTOOLINFO_PTR_READ_FILE : info->read_file = datapack_read_file; break;
case IMGTOOLINFO_PTR_WRITE_FILE : info->write_file = datapack_write_file; break;
diff --git a/src/tools/imgtool/modules/rsdos.cpp b/src/tools/imgtool/modules/rsdos.cpp
index eb34bd45a29..7e025ebf3e2 100644
--- a/src/tools/imgtool/modules/rsdos.cpp
+++ b/src/tools/imgtool/modules/rsdos.cpp
@@ -44,14 +44,14 @@ struct rsdos_direnum
*********************************************************************/
#define MAX_DIRENTS ((18-2)*(256/32))
-static floperr_t get_rsdos_dirent(imgtool::image *f, int index_loc, struct rsdos_dirent *ent)
+static floperr_t get_rsdos_dirent(imgtool::image &f, int index_loc, struct rsdos_dirent *ent)
{
return floppy_read_sector(imgtool_floppy(f), 0, 17, 3, index_loc * 32, (void *) ent, sizeof(*ent));
}
-static floperr_t put_rsdos_dirent(imgtool::image *f, int index_loc, const struct rsdos_dirent *ent)
+static floperr_t put_rsdos_dirent(imgtool::image &f, int index_loc, const struct rsdos_dirent *ent)
{
if (index_loc >= MAX_DIRENTS)
return (floperr_t)IMGTOOLERR_FILENOTFOUND;
@@ -80,7 +80,7 @@ static void get_dirent_fname(char *fnamebuf, const struct rsdos_dirent *ent)
-static imgtoolerr_t lookup_rsdos_file(imgtool::image *f, const char *fname, struct rsdos_dirent *ent, int *position)
+static imgtoolerr_t lookup_rsdos_file(imgtool::image &f, const char *fname, struct rsdos_dirent *ent, int *position)
{
int i;
floperr_t ferr;
@@ -115,7 +115,7 @@ static imgtoolerr_t lookup_rsdos_file(imgtool::image *f, const char *fname, stru
-static UINT8 get_granule_count(imgtool::image *img)
+static UINT8 get_granule_count(imgtool::image &img)
{
UINT16 tracks;
UINT16 granules;
@@ -128,7 +128,7 @@ static UINT8 get_granule_count(imgtool::image *img)
#define MAX_GRANULEMAP_SIZE 256
/* granule_map must be an array of MAX_GRANULEMAP_SIZE bytes */
-static floperr_t get_granule_map(imgtool::image *img, UINT8 *granule_map, UINT8 *granule_count)
+static floperr_t get_granule_map(imgtool::image &img, UINT8 *granule_map, UINT8 *granule_count)
{
UINT8 count;
@@ -141,7 +141,7 @@ static floperr_t get_granule_map(imgtool::image *img, UINT8 *granule_map, UINT8
-static floperr_t put_granule_map(imgtool::image *img, const UINT8 *granule_map, UINT8 granule_count)
+static floperr_t put_granule_map(imgtool::image &img, const UINT8 *granule_map, UINT8 granule_count)
{
return floppy_write_sector(imgtool_floppy(img), 0, 17, 2, 0, granule_map, granule_count, 0); /* TODO: pass ddam argument from imgtool */
}
@@ -149,7 +149,7 @@ static floperr_t put_granule_map(imgtool::image *img, const UINT8 *granule_map,
-static imgtoolerr_t transfer_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *f, imgtoolerr_t (*proc)(imgtool::image *, int, int, int, int, size_t, imgtool_stream *))
+static imgtoolerr_t transfer_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &f, imgtoolerr_t (*proc)(imgtool::image &, int, int, int, int, size_t, imgtool::stream &))
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
UINT8 track, sector;
@@ -167,21 +167,21 @@ static imgtoolerr_t transfer_granule(imgtool::image *img, UINT8 granule, int len
-static imgtoolerr_t transfer_from_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *destf)
+static imgtoolerr_t transfer_from_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &destf)
{
return transfer_granule(img, granule, length, destf, imgtool_floppy_read_sector_to_stream);
}
-static imgtoolerr_t transfer_to_granule(imgtool::image *img, UINT8 granule, int length, imgtool_stream *sourcef)
+static imgtoolerr_t transfer_to_granule(imgtool::image &img, UINT8 granule, int length, imgtool::stream &sourcef)
{
return transfer_granule(img, granule, length, sourcef, imgtool_floppy_write_sector_from_stream);
}
-static imgtoolerr_t process_rsdos_file(struct rsdos_dirent *ent, imgtool::image *img, imgtool_stream *destf, size_t *size)
+static imgtoolerr_t process_rsdos_file(struct rsdos_dirent *ent, imgtool::image &img, imgtool::stream *destf, size_t *size)
{
floperr_t ferr;
size_t s, lastgransize;
@@ -204,7 +204,7 @@ static imgtoolerr_t process_rsdos_file(struct rsdos_dirent *ent, imgtool::image
{
usedmap[granule] = 1;
if (destf)
- transfer_from_granule(img, granule, 9*256, destf);
+ transfer_from_granule(img, granule, 9*256, *destf);
/* i is the next granule */
s += (256 * 9);
@@ -219,7 +219,7 @@ static imgtoolerr_t process_rsdos_file(struct rsdos_dirent *ent, imgtool::image
lastgransize += (256 * (i - 0xc0));
if (destf)
- transfer_from_granule(img, granule, lastgransize, destf);
+ transfer_from_granule(img, granule, lastgransize, *destf);
if (size)
*size = s + lastgransize;
@@ -262,7 +262,7 @@ static imgtoolerr_t prepare_dirent(struct rsdos_dirent *ent, const char *fname)
-static imgtoolerr_t rsdos_diskimage_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t rsdos_diskimage_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
floperr_t ferr;
imgtoolerr_t err;
@@ -270,10 +270,9 @@ static imgtoolerr_t rsdos_diskimage_nextenum(imgtool::directory *enumeration, im
struct rsdos_direnum *rsenum;
struct rsdos_dirent rsent;
char fname[13];
- imgtool::image *image;
- image = &enumeration->image();
- rsenum = (struct rsdos_direnum *) enumeration->extra_bytes();
+ imgtool::image &image(enumeration.image());
+ rsenum = (struct rsdos_direnum *) enumeration.extra_bytes();
/* Did we hit the end of file before? */
if (rsenum->eof)
@@ -295,46 +294,46 @@ static imgtoolerr_t rsdos_diskimage_nextenum(imgtool::directory *enumeration, im
{
rsenum->eof = 1;
eof:
- ent->eof = 1;
+ ent.eof = 1;
}
else
{
/* Not the end of file */
- err = process_rsdos_file(&rsent, image, NULL, &filesize);
+ err = process_rsdos_file(&rsent, image, nullptr, &filesize);
if (err)
return err;
if (filesize == ((size_t) -1))
{
/* corrupt! */
- ent->filesize = 0;
- ent->corrupt = 1;
+ ent.filesize = 0;
+ ent.corrupt = 1;
}
else
{
- ent->filesize = filesize;
- ent->corrupt = 0;
+ ent.filesize = filesize;
+ ent.corrupt = 0;
}
- ent->eof = 0;
+ ent.eof = 0;
get_dirent_fname(fname, &rsent);
- snprintf(ent->filename, ARRAY_LENGTH(ent->filename), "%s", fname);
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%d %c", (int) rsent.ftype, (char) (rsent.asciiflag + 'B'));
+ snprintf(ent.filename, ARRAY_LENGTH(ent.filename), "%s", fname);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%d %c", (int) rsent.ftype, (char) (rsent.asciiflag + 'B'));
}
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t rsdos_diskimage_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t rsdos_diskimage_freespace(imgtool::partition &partition, UINT64 *size)
{
floperr_t ferr;
UINT8 i;
size_t s = 0;
UINT8 granule_count;
UINT8 granule_map[MAX_GRANULEMAP_SIZE];
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
ferr = get_granule_map(image, granule_map, &granule_count);
if (ferr)
@@ -351,7 +350,7 @@ static imgtoolerr_t rsdos_diskimage_freespace(imgtool::partition *partition, UIN
-static imgtoolerr_t delete_entry(imgtool::image *img, struct rsdos_dirent *ent, int pos)
+static imgtoolerr_t delete_entry(imgtool::image &img, struct rsdos_dirent *ent, int pos)
{
floperr_t ferr;
unsigned char g, i;
@@ -386,18 +385,18 @@ static imgtoolerr_t delete_entry(imgtool::image *img, struct rsdos_dirent *ent,
-static imgtoolerr_t rsdos_diskimage_readfile(imgtool::partition *partition, const char *fname, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t rsdos_diskimage_readfile(imgtool::partition &partition, const char *fname, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t err;
struct rsdos_dirent ent;
size_t size;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
err = lookup_rsdos_file(img, fname, &ent, NULL);
if (err)
return err;
- err = process_rsdos_file(&ent, img, destf, &size);
+ err = process_rsdos_file(&ent, img, &destf, &size);
if (err)
return err;
@@ -409,11 +408,11 @@ static imgtoolerr_t rsdos_diskimage_readfile(imgtool::partition *partition, cons
-static imgtoolerr_t rsdos_diskimage_writefile(imgtool::partition *partition, const char *fname, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t rsdos_diskimage_writefile(imgtool::partition &partition, const char *fname, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions)
{
floperr_t ferr;
imgtoolerr_t err;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
struct rsdos_dirent ent, ent2;
size_t i;
UINT64 sz;
@@ -432,7 +431,7 @@ static imgtoolerr_t rsdos_diskimage_writefile(imgtool::partition *partition, con
return err;
/* is there enough space? */
- sz = stream_size(sourcef);
+ sz = sourcef.size();
if (sz > freespace)
return IMGTOOLERR_NOSPACE;
@@ -514,10 +513,10 @@ static imgtoolerr_t rsdos_diskimage_writefile(imgtool::partition *partition, con
-static imgtoolerr_t rsdos_diskimage_deletefile(imgtool::partition *partition, const char *fname)
+static imgtoolerr_t rsdos_diskimage_deletefile(imgtool::partition &partition, const char *fname)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
int pos;
struct rsdos_dirent ent;
@@ -530,10 +529,10 @@ static imgtoolerr_t rsdos_diskimage_deletefile(imgtool::partition *partition, co
-static imgtoolerr_t rsdos_diskimage_suggesttransfer(imgtool::partition *partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t rsdos_diskimage_suggesttransfer(imgtool::partition &partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t err;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
struct rsdos_dirent ent;
int pos;
diff --git a/src/tools/imgtool/modules/thomson.cpp b/src/tools/imgtool/modules/thomson.cpp
index 2d8c72b842f..5e98614536b 100644
--- a/src/tools/imgtool/modules/thomson.cpp
+++ b/src/tools/imgtool/modules/thomson.cpp
@@ -120,7 +120,7 @@
#define MAXSIZE 80*16*256*2 /* room for two faces, double-density, 80 tracks */
struct thom_floppy {
- imgtool_stream *stream;
+ imgtool::stream *stream;
UINT16 sector_size; /* 128 or 256 */
UINT16 sectuse_size; /* bytes used in sector: 128 or 255 */
@@ -167,6 +167,11 @@ static UINT8* thom_get_sector(thom_floppy* f, unsigned head,
unsigned track, unsigned sector);
+static thom_floppy *get_thom_floppy(imgtool::image &image)
+{
+ return (thom_floppy*)image.extra_bytes();
+}
+
/*********************** .fd / .qd format ************************/
/* .fd and .qd formats are very simple: the sectors are simply put one after
@@ -177,89 +182,90 @@ static UINT8* thom_get_sector(thom_floppy* f, unsigned head,
(.fd have 40 or 80 tracks, .qd have 25 tracks) and the file size.
*/
-static imgtoolerr_t thom_open_fd_qd(imgtool::image *img, imgtool_stream *stream)
+static imgtoolerr_t thom_open_fd_qd(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
- int size = stream_size( stream );
+ thom_floppy* f = get_thom_floppy(img);
+ int size = stream->size();
- f->stream = stream;
+ f->stream = stream.get();
f->modified = 0;
/* guess format */
switch ( size ) {
case 81920:
- f->tracks = 40;
- f->sector_size = 128;
- f->sectuse_size = 128;
- f->heads = 1;
- break;
+ f->tracks = 40;
+ f->sector_size = 128;
+ f->sectuse_size = 128;
+ f->heads = 1;
+ break;
case 163840:
- f->tracks = 40;
- f->sector_size = 256;
- f->sectuse_size = 255;
- f->heads = 1;
- /* could also be: sector_size=128, heads=2 */
- /* maight even be: tracks=80, sector_size=128 */
- break;
+ f->tracks = 40;
+ f->sector_size = 256;
+ f->sectuse_size = 255;
+ f->heads = 1;
+ /* could also be: sector_size=128, heads=2 */
+ /* maight even be: tracks=80, sector_size=128 */
+ break;
case 327680:
- f->tracks = 80;
- f->sector_size = 256;
- f->sectuse_size = 255;
- f->heads = 1;
- /* could also be: tracks=40, heads=2 */
- break;
+ f->tracks = 80;
+ f->sector_size = 256;
+ f->sectuse_size = 255;
+ f->heads = 1;
+ /* could also be: tracks=40, heads=2 */
+ break;
case 655360:
- f->tracks = 80;
- f->sector_size = 256;
- f->sectuse_size = 255;
- f->heads = 2;
- break;
+ f->tracks = 80;
+ f->sector_size = 256;
+ f->sectuse_size = 255;
+ f->heads = 2;
+ break;
case 51200:
- f->tracks = 25;
- f->sector_size = 128;
- f->sectuse_size = 128;
- f->heads = 1;
- break;
+ f->tracks = 25;
+ f->sector_size = 128;
+ f->sectuse_size = 128;
+ f->heads = 1;
+ break;
case 62400:
- f->tracks = 25;
- f->sector_size = 128;
- f->sectuse_size = 128;
- f->heads = 2;
- break;
+ f->tracks = 25;
+ f->sector_size = 128;
+ f->sectuse_size = 128;
+ f->heads = 2;
+ break;
default:
- return IMGTOOLERR_CORRUPTIMAGE;
+ return IMGTOOLERR_CORRUPTIMAGE;
}
assert( size == f->heads * f->tracks * 16 * f->sector_size );
- stream_seek( stream, 0, SEEK_SET );
- if ( stream_read( stream, f->data, size ) < size )
- return IMGTOOLERR_READERROR;
+ f->stream->seek(0, SEEK_SET);
+ if (f->stream->read(f->data, size ) < size)
+ return IMGTOOLERR_READERROR;
+ f->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static void thom_close_fd_qd(imgtool::image *img)
+static void thom_close_fd_qd(imgtool::image &img)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
/* save image */
if ( f->modified ) {
int size = f->heads * f->tracks * 16 * f->sector_size;
- stream_seek( f->stream, 0, SEEK_SET );
- if ( stream_write( f->stream, f->data, size ) < size )
+ f->stream->seek(0, SEEK_SET);
+ if (f->stream->write(f->data, size) < size)
{
/* logerror( "thom_diskimage_close_fd_qd: write error\n" ); */
}
}
- stream_close( f->stream );
+ delete f->stream;
}
@@ -308,47 +314,49 @@ static UINT16 thom_sap_crc( UINT8* data, int size )
return crc;
}
-static imgtoolerr_t thom_open_sap(imgtool::image *img, imgtool_stream *stream)
+static imgtoolerr_t thom_open_sap(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
UINT8 buf[262];
- f->stream = stream;
+ f->stream = stream.get();
f->modified = 0;
- /* check image header */
- stream_seek( stream, 0, SEEK_SET );
- stream_read( stream, buf, 66 );
+ // check image header
+ f->stream->seek(0, SEEK_SET);
+ f->stream->read(buf, 66 );
if ( memcmp( buf+1, sap_header+1, 65 ) ) return IMGTOOLERR_CORRUPTIMAGE;
/* guess format */
- stream_read( stream, buf, 1 );
- switch ( buf[0] ) {
+ f->stream->read(buf, 1 );
+ switch ( buf[0] )
+ {
case 1:
case 3:
- f->heads = 1;
- f->tracks = 40;
- f->sector_size = 128;
- f->sectuse_size = 128;
- break;
+ f->heads = 1;
+ f->tracks = 40;
+ f->sector_size = 128;
+ f->sectuse_size = 128;
+ break;
case 0:
case 2:
case 4:
- f->heads = 1;
- f->tracks = 80;
- f->sector_size = 256;
- f->sectuse_size = 255;
- break;
- default: return IMGTOOLERR_CORRUPTIMAGE;
+ f->heads = 1;
+ f->tracks = 80;
+ f->sector_size = 256;
+ f->sectuse_size = 255;
+ break;
+ default:
+ return IMGTOOLERR_CORRUPTIMAGE;
}
- stream_seek( stream, 66, SEEK_SET );
+ f->stream->seek(66, SEEK_SET);
while ( 1) {
int i, sector, track;
UINT16 crc;
/* load sector */
- if ( stream_read( stream, buf, 6 + f->sector_size ) < 6 + f->sector_size )
+ if (f->stream->read(buf, 6 + f->sector_size ) < 6 + f->sector_size )
break;
/* parse sector header */
@@ -368,12 +376,13 @@ static imgtoolerr_t thom_open_sap(imgtool::image *img, imgtool_stream *stream)
return IMGTOOLERR_CORRUPTIMAGE;
}
+ f->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
-static void thom_close_sap(imgtool::image *img)
+static void thom_close_sap(imgtool::image &img)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
if ( f->modified ) {
int i, sector, track;
@@ -381,10 +390,10 @@ static void thom_close_sap(imgtool::image *img)
UINT16 crc;
/* rewind */
- stream_seek( f->stream, 0, SEEK_SET );
+ f->stream->seek(0, SEEK_SET);
/* image header */
- if ( stream_write( f->stream, sap_header, 66 ) < 66 ) {
+ if ( f->stream->write(sap_header, 66) < 66) {
/* logerror( "thom_diskimage_close_sap: write error\n" ); */
return;
}
@@ -408,15 +417,15 @@ static void thom_close_sap(imgtool::image *img)
for ( i = 0; i < f->sector_size; i++ ) buf[ i + 4 ] ^= sap_magic_num;
/* save */
- if ( stream_write( f->stream, buf, f->sector_size + 6 ) <
- f->sector_size + 6 ) {
+ if (f->stream->write(buf, f->sector_size + 6) <
+ f->sector_size + 6) {
/* logerror( "thom_diskimage_close_sap: write error\n" ); */
return;
}
}
}
- stream_close( f->stream );
+ delete f->stream;
}
@@ -678,44 +687,50 @@ static int thom_get_free_blocks(thom_floppy* f, unsigned head)
/* dump file contents into dst */
static void thom_get_file(thom_floppy* f, unsigned head,
- thom_dirent* d, imgtool_stream *dst)
+ thom_dirent* d, imgtool::stream &dst)
{
UINT8* fat = thom_get_sector( f, head, 20, 2 );
int nbblocks = thom_nb_blocks(f);
int block = d->firstblock;
if ( block >= nbblocks ) return;
- while ( 1 ) {
- int nextblock = fat[ block + 1 ];
- int track = block / 2;
- int firstsect = (block % 2) ? 9 : 1;
- if ( nextblock < nbblocks ) {
- /* full block */
- int i;
- for ( i = 0; i < 8; i++ ) {
- UINT8* data = thom_get_sector( f, head, track, firstsect + i );
- stream_write( dst, data, f->sectuse_size );
+ while ( 1 )
+ {
+ int nextblock = fat[ block + 1 ];
+ int track = block / 2;
+ int firstsect = (block % 2) ? 9 : 1;
+ if ( nextblock < nbblocks )
+ {
+ /* full block */
+ int i;
+ for ( i = 0; i < 8; i++ )
+ {
+ UINT8* data = thom_get_sector( f, head, track, firstsect + i );
+ dst.write(data, f->sectuse_size);
+ }
+ block = fat[ block + 1 ];
}
- block = fat[ block + 1 ];
- }
- else if ( nextblock >= 0xc1 && nextblock <= 0xc8 ) {
- /* last block in file */
- int i;
- UINT8* data;
- for ( i = 0; i < nextblock - 0xc1; i++ ) {
- data = thom_get_sector( f, head, track, firstsect + i );
- stream_write( dst, data, f->sectuse_size );
+ else if ( nextblock >= 0xc1 && nextblock <= 0xc8 )
+ {
+ /* last block in file */
+ int i;
+ UINT8* data;
+ for ( i = 0; i < nextblock - 0xc1; i++ )
+ {
+ data = thom_get_sector( f, head, track, firstsect + i );
+ dst.write(data, f->sectuse_size);
+ }
+ data = thom_get_sector( f, head, track, firstsect + i );
+ dst.write(data, d->lastsectsize);
+ return;
}
- data = thom_get_sector( f, head, track, firstsect + i );
- stream_write( dst, data, d->lastsectsize );
- return;
- }
- else {
- /* invalid, assume last block */
- UINT8* data = thom_get_sector( f, head, track, firstsect );
- stream_write( dst, data, d->lastsectsize );
- return;
- }
- block = nextblock;
+ else
+ {
+ /* invalid, assume last block */
+ UINT8* data = thom_get_sector( f, head, track, firstsect );
+ dst.write(data, d->lastsectsize);
+ return;
+ }
+ block = nextblock;
}
}
@@ -739,9 +754,9 @@ static void thom_del_file(thom_floppy* f, unsigned head, thom_dirent* d)
/* create a new file or overwrite an old one, with the contents of src */
static void thom_put_file(thom_floppy* f, unsigned head,
- thom_dirent* d, imgtool_stream *src)
+ thom_dirent* d, imgtool::stream &src)
{
- int size = stream_size( src );
+ int size = src.size();
UINT8* fat = thom_get_sector( f, head, 20, 2 );
int nbblocks = thom_nb_blocks(f);
int block;
@@ -760,14 +775,14 @@ static void thom_put_file(thom_floppy* f, unsigned head,
/* store data, full sectors */
for ( i = 0; i < 8 && size > f->sectuse_size; i++ ) {
UINT8* dst = thom_get_sector( f, head, track, firstsect + i );
- stream_read( src, dst, f->sectuse_size );
+ src.read(dst, f->sectuse_size);
size -= f->sectuse_size;
}
/* store data, last sector */
if ( i < 8 ) {
UINT8* dst = thom_get_sector( f, head, track, firstsect + i );
- stream_read( src, dst, size );
+ src.read(dst, size);
fat[ block + 1 ] = 0xc1 + i;
d->lastsectsize = size;
break;
@@ -793,20 +808,20 @@ static void thom_put_file(thom_floppy* f, unsigned head,
/********************** module functions ***********************/
-static imgtoolerr_t thom_get_geometry(imgtool::image* img, UINT32* tracks,
+static imgtoolerr_t thom_get_geometry(imgtool::image &img, UINT32* tracks,
UINT32* heads, UINT32* sectors)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
if ( tracks ) *tracks = f->tracks;
if ( heads ) *heads = f->heads;
if ( sectors ) *sectors = 16;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_read_sector(imgtool::image* img, UINT32 track,
+static imgtoolerr_t thom_read_sector(imgtool::image &img, UINT32 track,
UINT32 head, UINT32 sector, std::vector<UINT8> &buffer)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
if ( head >= f->heads || sector < 1 || sector > 16 || track >= f->tracks )
return IMGTOOLERR_SEEKERROR;
@@ -818,12 +833,12 @@ static imgtoolerr_t thom_read_sector(imgtool::image* img, UINT32 track,
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_write_sector(imgtool::image *img, UINT32 track,
+static imgtoolerr_t thom_write_sector(imgtool::image &img, UINT32 track,
UINT32 head, UINT32 sector,
const void *buf, size_t len, int ddam)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
- if ( stream_isreadonly( f->stream ) ) return IMGTOOLERR_WRITEERROR;
+ thom_floppy* f = get_thom_floppy(img);
+ if ( f->stream->is_read_only() ) return IMGTOOLERR_WRITEERROR;
if ( head >= f->heads || sector < 1 || sector > 16 || track >= f->tracks )
return IMGTOOLERR_SEEKERROR;
if ( len > f->sector_size) return IMGTOOLERR_WRITEERROR;
@@ -835,65 +850,57 @@ static imgtoolerr_t thom_write_sector(imgtool::image *img, UINT32 track,
/* returns floopy name */
/* actually, each side has its own name, but we only return the one on side 0.
*/
-static void thom_info(imgtool::image *img, char *string, size_t len)
+static void thom_info(imgtool::image &img, std::ostream &stream)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
UINT8* base = thom_get_sector( f, 0, 20, 1 );
char buf[9];
memcpy( buf, base, 8 );
buf[8] = 0;
thom_stringify( buf );
- strncpy( string, buf, len );
+ stream << buf;
}
/* each side of a floppy has its own filesystem, we treat them as'partitions'
*/
-static imgtoolerr_t thom_list_partitions(imgtool::image *img,
- imgtool_partition_info *partitions,
- size_t len)
+static imgtoolerr_t thom_list_partitions(imgtool::image &img, std::vector<imgtool::partition_info> &partitions)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
- if ( len >= 1 ) {
- partitions[0].get_info = thom_basic_get_info;
- partitions[0].base_block = 0;
- partitions[0].block_count = 1;
- }
- if ( len >= 2 && f->heads >= 2 ) {
- partitions[1].get_info = thom_basic_get_info;
- partitions[1].base_block = 1;
- partitions[1].block_count = 1;
- }
+ thom_floppy* f = get_thom_floppy(img);
+
+ partitions.emplace_back(thom_basic_get_info, 0, 1);
+ if (f->heads >= 2)
+ partitions.emplace_back(thom_basic_get_info, 1, 1);
+
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_open_partition(imgtool::partition *part,
+static imgtoolerr_t thom_open_partition(imgtool::partition &part,
UINT64 first_block, UINT64 block_count)
{
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
if ( first_block >= f->heads )
return IMGTOOLERR_INVALIDPARTITION;
- * ( (int*) part->extra_bytes() ) = first_block;
+ * ( (int*) part.extra_bytes() ) = first_block;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_begin_enum(imgtool::directory *enumeration,
+static imgtoolerr_t thom_begin_enum(imgtool::directory &enumeration,
const char *path)
{
- int* n = (int*) enumeration->extra_bytes();
+ int* n = (int*) enumeration.extra_bytes();
*n = 0;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_next_enum(imgtool::directory *enumeration,
- imgtool_dirent *ent)
+static imgtoolerr_t thom_next_enum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- imgtool::partition *part = &enumeration->partition();
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
- int* n = (int*) enumeration->extra_bytes();
+ imgtool::partition &part(enumeration.partition());
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
+ int* n = (int*) enumeration.extra_bytes();
thom_dirent d;
do {
@@ -901,47 +908,47 @@ static imgtoolerr_t thom_next_enum(imgtool::directory *enumeration,
(*n) ++;
}
while ( d.type == THOM_DIRENT_FREE );
- if ( d.type == THOM_DIRENT_END ) ent->eof = 1;
+ if ( d.type == THOM_DIRENT_END ) ent.eof = 1;
else if ( d.type == THOM_DIRENT_INVALID ) {
- ent->corrupt = 1;
+ ent.corrupt = 1;
}
else {
int size;
- snprintf( ent->filename, sizeof(ent->filename), "%s.%s", d.name, d.ext );
- snprintf( ent->attr, sizeof(ent->attr), "%c %c %s",
+ snprintf( ent.filename, sizeof(ent.filename), "%s.%s", d.name, d.ext );
+ snprintf( ent.attr, sizeof(ent.attr), "%c %c %s",
(d.ftype == 0) ? 'B' : (d.ftype == 1) ? 'D' :
(d.ftype == 2) ? 'M' : (d.ftype == 3) ? 'A' : '?',
(d.format == 0) ? 'B' : (d.format == 0xff) ? 'A' : '?',
d.comment );
- ent->creation_time = thom_crack_time( &d );
+ ent.creation_time = thom_crack_time( &d );
size = thom_get_file_size( f, head, &d );
- if ( size >= 0 ) ent->filesize = size;
+ if ( size >= 0 ) ent.filesize = size;
else {
- ent->filesize = 0;
- ent->corrupt = 1;
+ ent.filesize = 0;
+ ent.corrupt = 1;
}
}
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_free_space(imgtool::partition *part, UINT64 *size)
+static imgtoolerr_t thom_free_space(imgtool::partition &part, UINT64 *size)
{
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
int nb = thom_get_free_blocks( f, head );
(*size) = nb * f->sectuse_size * 8;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_read_file(imgtool::partition *part,
+static imgtoolerr_t thom_read_file(imgtool::partition &part,
const char *filename,
const char *fork,
- imgtool_stream *destf)
+ imgtool::stream &destf)
{
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
thom_dirent d;
char name[9], ext[4], fname[14];
int size;
@@ -958,12 +965,12 @@ static imgtoolerr_t thom_read_file(imgtool::partition *part,
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_delete_file(imgtool::partition *part,
+static imgtoolerr_t thom_delete_file(imgtool::partition &part,
const char *filename)
{
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
thom_dirent d;
char name[9], ext[4], fname[14];
@@ -974,27 +981,27 @@ static imgtoolerr_t thom_delete_file(imgtool::partition *part,
if ( ! thom_find_dirent( f, head, fname, &d ) )
return IMGTOOLERR_FILENOTFOUND;
/*if ( thom_get_file_size( f, head, &d ) < 0 ) return IMGTOOLERR_CORRUPTFILE;*/
- if ( stream_isreadonly( f->stream ) ) return IMGTOOLERR_WRITEERROR;
+ if ( f->stream->is_read_only() ) return IMGTOOLERR_WRITEERROR;
thom_del_file( f, head, &d );
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_write_file(imgtool::partition *part,
+static imgtoolerr_t thom_write_file(imgtool::partition &part,
const char *filename,
const char *fork,
- imgtool_stream *sourcef,
+ imgtool::stream &sourcef,
util::option_resolution *opts)
{
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
thom_dirent d;
- int size = stream_size( sourcef );
+ int size = sourcef.size();
int blocks = thom_get_free_blocks( f, head );
char name[9], ext[4], fname[14];
int is_new = 1;
- if ( stream_isreadonly( f->stream ) ) return IMGTOOLERR_WRITEERROR;
+ if ( f->stream->is_read_only() ) return IMGTOOLERR_WRITEERROR;
/* convert filename */
thom_conv_filename( filename, name, ext );
@@ -1063,14 +1070,14 @@ static imgtoolerr_t thom_write_file(imgtool::partition *part,
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_suggest_transfer(imgtool::partition *part,
+static imgtoolerr_t thom_suggest_transfer(imgtool::partition &part,
const char *fname,
imgtool_transfer_suggestion *suggestions,
size_t suggestions_length)
{
- int head = *( (int*) part->extra_bytes() );
- imgtool::image* img = &part->image();
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ int head = *( (int*) part.extra_bytes() );
+ imgtool::image &img(part.image());
+ thom_floppy* f = get_thom_floppy(img);
thom_dirent d;
int is_basic = 0;
@@ -1106,16 +1113,16 @@ static imgtoolerr_t thom_suggest_transfer(imgtool::partition *part,
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_create(imgtool::image* img,
- imgtool_stream *stream,
+static imgtoolerr_t thom_create(imgtool::image &img,
+ imgtool::stream::ptr &&stream,
util::option_resolution *opts)
{
- thom_floppy* f = (thom_floppy*) img->extra_bytes();
+ thom_floppy* f = get_thom_floppy(img);
int i;
UINT8* buf;
const char* name;
- f->stream = stream;
+ f->stream = stream.get();
f->modified = 0;
/* get parameters */
@@ -1161,6 +1168,7 @@ static imgtoolerr_t thom_create(imgtool::image* img,
f->modified = 1;
+ f->stream = stream.release();
return IMGTOOLERR_SUCCESS;
}
@@ -1274,92 +1282,98 @@ static const UINT8 crypt2[13] = {
};
/* decrypt BASIC protected files */
-static void thom_decrypt(imgtool_stream* out, imgtool_stream* in)
+static void thom_decrypt(imgtool::stream &out, imgtool::stream &in)
{
int i1 = 11, i2 = 13;
- while ( 1 ) {
- UINT8 b;
- if ( stream_read( in, &b, 1) < 1 ) break;
- b = ( (UINT8)(b - i2) ^ crypt2[i2-1] ^ crypt1[i1-1] ) + i1;
- stream_putc( out, b );
- i1--; i2--;
- if ( !i1 ) i1 = 11;
- if ( !i2 ) i2 = 13;
+ while ( 1 )
+ {
+ UINT8 b;
+ if ( in.read(&b, 1) < 1 ) break;
+ b = ( (UINT8)(b - i2) ^ crypt2[i2-1] ^ crypt1[i1-1] ) + i1;
+ out.putc(b );
+ i1--; i2--;
+ if ( !i1 ) i1 = 11;
+ if ( !i2 ) i2 = 13;
}
}
/* encrypt BASIC protected files */
-static void thom_encrypt(imgtool_stream* out, imgtool_stream* in)
+static void thom_encrypt(imgtool::stream &out, imgtool::stream &in)
{
int i1 = 11, i2 = 13;
- while ( 1 ) {
- UINT8 b;
- if ( stream_read( in, &b, 1) < 1 ) break;
- b = ( (UINT8)(b - i1) ^ crypt2[i2-1] ^ crypt1[i1-1] ) + i2;
- stream_putc( out, b );
- i1--; i2--;
- if ( !i1 ) i1 = 11;
- if ( !i2 ) i2 = 13;
+ while ( 1 )
+ {
+ UINT8 b;
+ if ( in.read(&b, 1) < 1 ) break;
+ b = ( (UINT8)(b - i1) ^ crypt2[i2-1] ^ crypt1[i1-1] ) + i2;
+ out.putc(b );
+ i1--; i2--;
+ if ( !i1 ) i1 = 11;
+ if ( !i2 ) i2 = 13;
}
}
-static imgtoolerr_t thomcrypt_read_file(imgtool::partition *part,
+static imgtoolerr_t thomcrypt_read_file(imgtool::partition &part,
const char *name,
- const char *fork, imgtool_stream *dst)
+ const char *fork, imgtool::stream &dst)
{
UINT8 buf[3];
- imgtool_stream *org = stream_open_mem( NULL, 0 );
+ imgtool::stream *org = imgtool::stream::open_mem( NULL, 0 );
imgtoolerr_t err;
if ( !org ) return IMGTOOLERR_OUTOFMEMORY;
/* read file */
- err = thom_read_file( part, name, fork, org );
+ err = thom_read_file( part, name, fork, *org );
if ( err ) {
- stream_close( org );
+ delete org;
return err;
}
- stream_seek( org, 0, SEEK_SET );
- if ( stream_read( org, buf, 3 ) < 3 || buf[0] != 0xfe ) {
- /* regular file */
- stream_seek( org, 0, SEEK_SET );
- stream_transfer_all( dst, org );
+ org->seek(0, SEEK_SET);
+ if ( org->read(buf, 3 ) < 3 || buf[0] != 0xfe )
+ {
+ /* regular file */
+ org->seek(0, SEEK_SET);
+ imgtool::stream::transfer_all( dst, *org );
}
- else {
- /* encrypted file */
- stream_putc( dst, '\xff' );
- stream_write( dst, buf+1, 2 );
- thom_decrypt( dst, org );
+ else
+ {
+ /* encrypted file */
+ dst.putc( '\xff' );
+ dst.write(buf+1, 2);
+ thom_decrypt( dst, *org );
}
- stream_close( org );
+ delete org;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thomcrypt_write_file(imgtool::partition *part,
+static imgtoolerr_t thomcrypt_write_file(imgtool::partition &part,
const char *name,
- const char *fork, imgtool_stream *src,
+ const char *fork, imgtool::stream &src,
util::option_resolution *opts)
{
UINT8 buf[3];
- if ( stream_read( src, buf, 3 ) < 3 || buf[0] == 0xfe ) {
- /* too short or already encrypted file */
- stream_seek( src, 0, SEEK_SET );
- return thom_write_file( part, name, fork, src, opts );
+ if ( src.read(buf, 3 ) < 3 || buf[0] == 0xfe )
+ {
+ /* too short or already encrypted file */
+ src.seek(0, SEEK_SET);
+ return thom_write_file( part, name, fork, src, opts );
}
- else {
- /* regular file */
- imgtool_stream *dst = stream_open_mem( NULL, 0 );
- imgtoolerr_t err;
- if ( !dst ) return IMGTOOLERR_OUTOFMEMORY;
- stream_putc( dst, '\xfe' );
- stream_write( dst, buf+1, 2 );
- thom_encrypt( dst, src );
- stream_seek( dst, 0, SEEK_SET );
- err = thom_write_file( part, name, fork, dst, opts );
- stream_close( dst);
- return err;
+ else
+ {
+ /* regular file */
+ imgtool::stream *dst = imgtool::stream::open_mem( NULL, 0 );
+ imgtoolerr_t err;
+ if ( !dst ) return IMGTOOLERR_OUTOFMEMORY;
+ dst->putc( '\xfe' );
+ dst->write(buf+1, 2);
+ thom_encrypt( *dst, src );
+ dst->seek(0, SEEK_SET);
+ err = thom_write_file( part, name, fork, *dst, opts );
+ delete dst;
+ return err;
}
}
@@ -1382,80 +1396,87 @@ void filter_thomcrypt_getinfo(UINT32 state, union filterinfo *info)
}
/* untokenization automatically decrypt protected files */
-static imgtoolerr_t thom_basic_read_file(imgtool::partition *part,
+static imgtoolerr_t thom_basic_read_file(imgtool::partition &part,
const char *name,
const char *fork,
- imgtool_stream *dst,
+ imgtool::stream &dst,
const char *const table[2][128])
{
- imgtool_stream *org = stream_open_mem( NULL, 0 );
+ imgtool::stream *org = imgtool::stream::open_mem( NULL, 0 );
imgtoolerr_t err;
UINT8 buf[4];
int i;
if ( !org ) return IMGTOOLERR_OUTOFMEMORY;
- err = thomcrypt_read_file( part, name, fork, org );
- if ( err ) {
- stream_close( org );
- return err;
+ err = thomcrypt_read_file( part, name, fork, *org );
+ if (err)
+ {
+ delete org;
+ return err;
}
- stream_seek( org, 3, SEEK_SET ); /* skip header */
+ org->seek(3, SEEK_SET); /* skip header */
- while ( 1 ) {
- int in_str = 0, in_fun = 0;
- int linelength, linenum;
-
- /* line header: line length and line number */
- /* I am not sure this is 100% correct but it works in many cases */
- if ( stream_read( org, buf, 2 ) < 2 ) goto end;
- linelength = ((int)buf[0] << 8) + (int)buf[1] - 4;
- if ( linelength <= 0 ) goto end;
- if ( stream_read( org, buf, 2 ) < 2 ) goto end;
- linenum = ((int)buf[0] << 8) + buf[1];
- stream_printf( dst, "%u ", linenum );
-
- /* process line */
- for ( i = 0; i < linelength; i++ ) {
- UINT8 c;
- if ( stream_read( org, &c, 1 ) < 1 ) break;
- if ( c == 0 ) {
- /* Sometimes, linelength seems wrong and we must rely on the fact that
- BASIC lines are 0-terminated.
- At other times, there are 0 embedded within lines or extra stuff
- between the 0 and the following line, and so, we must rely
- on linelength to cut the line (!)
- */
- if ( linelength > 256 ) break;
- }
- else if ( c == 0xff && ! in_str ) in_fun = 1; /* function prefix */
- else {
- if ( c >= 0x80 && ! in_str ) {
- /* token */
- const char* token = table[ in_fun ][ c - 0x80 ];
- if ( token ) stream_puts( dst, token );
- else stream_puts( dst, "???" );
- }
- else {
- /* regular character */
- if ( c == '"' ) in_str = 1 - in_str;
- stream_putc( dst, c ); /* normal letter */
- }
- in_fun = 0;
+ while ( 1 )
+ {
+ int in_str = 0, in_fun = 0;
+ int linelength, linenum;
+
+ /* line header: line length and line number */
+ /* I am not sure this is 100% correct but it works in many cases */
+ if ( org->read(buf, 2 ) < 2 ) goto end;
+ linelength = ((int)buf[0] << 8) + (int)buf[1] - 4;
+ if ( linelength <= 0 ) goto end;
+ if ( org->read(buf, 2 ) < 2 ) goto end;
+ linenum = ((int)buf[0] << 8) + buf[1];
+ dst.printf( "%u ", linenum );
+
+ /* process line */
+ for ( i = 0; i < linelength; i++ )
+ {
+ UINT8 c;
+ if ( org->read(&c, 1 ) < 1 ) break;
+ if ( c == 0 )
+ {
+ /* Sometimes, linelength seems wrong and we must rely on the fact that
+ BASIC lines are 0-terminated.
+ At other times, there are 0 embedded within lines or extra stuff
+ between the 0 and the following line, and so, we must rely
+ on linelength to cut the line (!)
+ */
+ if ( linelength > 256 ) break;
+ }
+ else if ( c == 0xff && ! in_str ) in_fun = 1; /* function prefix */
+ else
+ {
+ if ( c >= 0x80 && ! in_str )
+ {
+ /* token */
+ const char* token = table[ in_fun ][ c - 0x80 ];
+ if ( token ) dst.puts(token );
+ else dst.puts("???" );
+ }
+ else
+ {
+ /* regular character */
+ if ( c == '"' ) in_str = 1 - in_str;
+ dst.putc( c ); /* normal letter */
+ }
+ in_fun = 0;
+ }
}
- }
- stream_putc( dst, '\n' );
+ dst.putc( '\n' );
}
end:
- stream_close( org );
+ delete org;
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t thom_basic_write_file(imgtool::partition *part,
+static imgtoolerr_t thom_basic_write_file(imgtool::partition &part,
const char *name,
const char *fork,
- imgtool_stream *src,
+ imgtool::stream &src,
util::option_resolution *opts,
const char *const table[2][128])
{
@@ -1464,17 +1485,17 @@ static imgtoolerr_t thom_basic_write_file(imgtool::partition *part,
#define FILTER(short,long) \
- static imgtoolerr_t short##_read_file(imgtool::partition *part, \
+ static imgtoolerr_t short##_read_file(imgtool::partition &part, \
const char *name, \
const char *fork, \
- imgtool_stream *dst) \
+ imgtool::stream &dst) \
{ \
return thom_basic_read_file( part, name, fork, dst, short ); \
} \
- static imgtoolerr_t short##_write_file(imgtool::partition *part, \
+ static imgtoolerr_t short##_write_file(imgtool::partition &part, \
const char *name, \
const char *fork, \
- imgtool_stream *src, \
+ imgtool::stream &src, \
util::option_resolution *opts) \
{ \
return thom_basic_write_file( part, name, fork, src, opts, short ); \
diff --git a/src/tools/imgtool/modules/ti99.cpp b/src/tools/imgtool/modules/ti99.cpp
index 7ca8f2ab4dd..7c914430b29 100644
--- a/src/tools/imgtool/modules/ti99.cpp
+++ b/src/tools/imgtool/modules/ti99.cpp
@@ -545,7 +545,7 @@ enum ti99_img_format
struct ti99_lvl1_imgref
{
ti99_img_format img_format; /* tells the image format */
- imgtool_stream *file_handle; /* imgtool file handle */
+ imgtool::stream *file_handle; /* imgtool file handle */
struct mess_hard_disk_file harddisk_handle; /* MAME harddisk handle (harddisk format) */
ti99_geometry geometry; /* geometry */
unsigned pc99_track_len; /* unformatted track length (pc99 format) */
@@ -597,7 +597,7 @@ static void calc_crc(UINT16 *crc, UINT8 value)
*/
#define MAX_TRACK_LEN 6872
#define DATA_OFFSET_NONE 0xffffffff
-static int parse_pc99_image(imgtool_stream *file_handle, int fm_format, int pass, dsk_vib *vib, const ti99_geometry *geometry, UINT32 *data_offset_array, unsigned *out_track_len)
+static int parse_pc99_image(imgtool::stream &file_handle, int fm_format, int pass, dsk_vib *vib, const ti99_geometry *geometry, UINT32 *data_offset_array, unsigned *out_track_len)
{
int track_len, num_tracks; /* length of a track in bytes, and number of tracks */
int phys_track;
@@ -620,10 +620,10 @@ static int parse_pc99_image(imgtool_stream *file_handle, int fm_format, int pass
if (out_track_len)
*out_track_len = track_len;
- if (stream_size(file_handle) % track_len)
+ if (file_handle.size() % track_len)
return IMGTOOLERR_CORRUPTIMAGE;
- num_tracks = stream_size(file_handle) / track_len;
+ num_tracks = file_handle.size() / track_len;
if (num_tracks <= 0)
return IMGTOOLERR_CORRUPTIMAGE;
@@ -640,12 +640,12 @@ static int parse_pc99_image(imgtool_stream *file_handle, int fm_format, int pass
data_offset_array[(head*geometry->cylinders + cylinder)*geometry->secspertrack + sector] = DATA_OFFSET_NONE;
}
/* rewind to start of file */
- stream_seek(file_handle, 0, SEEK_SET);
+ file_handle.seek(0, SEEK_SET);
/* pass 0 only looks for vib in track 0; pass 1 scans every track */
for (phys_track=0; phys_track < ((pass == 1) ? num_tracks : 1); phys_track++)
{
- if (stream_read(file_handle, track_buf, track_len) != track_len)
+ if (file_handle.read(track_buf, track_len) != track_len)
return IMGTOOLERR_READERROR;
/* we only support 40-track-per-side images */
@@ -926,7 +926,7 @@ static int parse_pc99_image(imgtool_stream *file_handle, int fm_format, int pass
Return imgtool error code
*/
-static int read_image_vib_no_geometry(imgtool_stream *file_handle, ti99_img_format img_format, dsk_vib *dest)
+static int read_image_vib_no_geometry(imgtool::stream &file_handle, ti99_img_format img_format, dsk_vib *dest)
{
int reply;
@@ -935,11 +935,11 @@ static int read_image_vib_no_geometry(imgtool_stream *file_handle, ti99_img_form
case if_mess:
case if_v9t9:
/* seek to sector */
- reply = stream_seek(file_handle, 0, SEEK_SET);
+ reply = file_handle.seek(0, SEEK_SET);
if (reply)
return IMGTOOLERR_READERROR;
/* read it */
- reply = stream_read(file_handle, dest, 256);
+ reply = file_handle.read(dest, 256);
if (reply != 256)
return IMGTOOLERR_READERROR;
return 0;
@@ -966,21 +966,19 @@ static int read_image_vib_no_geometry(imgtool_stream *file_handle, ti99_img_form
Return imgtool error code
*/
-static imgtoolerr_t open_image_lvl1(imgtool_stream *file_handle, ti99_img_format img_format, ti99_lvl1_imgref *l1_img, dsk_vib *vib)
+static imgtoolerr_t open_image_lvl1(imgtool::stream::ptr &&file_handle, ti99_img_format img_format, ti99_lvl1_imgref *l1_img, dsk_vib *vib)
{
imgtoolerr_t err;
int reply;
UINT16 totphysrecs;
-
l1_img->img_format = img_format;
- l1_img->file_handle = file_handle;
if (img_format == if_harddisk)
{
const hard_disk_info *info;
- err = imghd_open(file_handle, &l1_img->harddisk_handle);
+ err = imghd_open(*file_handle, &l1_img->harddisk_handle);
if (err)
return err;
@@ -1004,7 +1002,7 @@ static imgtoolerr_t open_image_lvl1(imgtool_stream *file_handle, ti99_img_format
else
{
/* read vib */
- reply = read_image_vib_no_geometry(file_handle, img_format, vib);
+ reply = read_image_vib_no_geometry(*file_handle, img_format, vib);
if (reply)
return (imgtoolerr_t)reply;
@@ -1032,7 +1030,7 @@ static imgtoolerr_t open_image_lvl1(imgtool_stream *file_handle, ti99_img_format
|| (totphysrecs < 2)
|| memcmp(vib->id, "DSK", 3) || (! strchr(" P", vib->protection))
|| (((img_format == if_mess) || (img_format == if_v9t9))
- && (stream_size(file_handle) != totphysrecs*256U)))
+ && (file_handle->size() != totphysrecs*256U)))
return (imgtoolerr_t)IMGTOOLERR_CORRUPTIMAGE;
if ((img_format == if_pc99_fm) || (img_format == if_pc99_mfm))
@@ -1040,7 +1038,7 @@ static imgtoolerr_t open_image_lvl1(imgtool_stream *file_handle, ti99_img_format
l1_img->pc99_data_offset_array = (UINT32*)malloc(sizeof(*l1_img->pc99_data_offset_array)*totphysrecs);
if (! l1_img->pc99_data_offset_array)
return IMGTOOLERR_OUTOFMEMORY;
- reply = parse_pc99_image(file_handle, img_format == if_pc99_fm, 1, NULL, & l1_img->geometry, l1_img->pc99_data_offset_array, &l1_img->pc99_track_len);
+ reply = parse_pc99_image(*file_handle, img_format == if_pc99_fm, 1, NULL, & l1_img->geometry, l1_img->pc99_data_offset_array, &l1_img->pc99_track_len);
if (reply)
{
free(l1_img->pc99_data_offset_array);
@@ -1049,6 +1047,8 @@ static imgtoolerr_t open_image_lvl1(imgtool_stream *file_handle, ti99_img_format
}
}
+ l1_img->file_handle = file_handle.release(); // we can only do this when we're sure we're successful
+
return (imgtoolerr_t)0;
}
@@ -1066,7 +1066,7 @@ static void close_image_lvl1(ti99_lvl1_imgref *l1_img)
imghd_close(&l1_img->harddisk_handle);
}
- stream_close(l1_img->file_handle);
+ delete l1_img->file_handle;
if ((l1_img->img_format == if_pc99_fm) || (l1_img->img_format == if_pc99_mfm))
free(l1_img->pc99_data_offset_array);
@@ -1134,11 +1134,11 @@ static int read_sector(ti99_lvl1_imgref *l1_img, const ti99_sector_address *addr
case if_v9t9:
/* V9T9 format */
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, sector_address_to_image_offset(l1_img, address), SEEK_SET);
+ reply = l1_img->file_handle->seek(sector_address_to_image_offset(l1_img, address), SEEK_SET);
if (reply)
return 1;
/* read it */
- reply = stream_read(l1_img->file_handle, dest, 256);
+ reply = l1_img->file_handle->read(dest, 256);
if (reply != 256)
return 1;
break;
@@ -1153,31 +1153,31 @@ static int read_sector(ti99_lvl1_imgref *l1_img, const ti99_sector_address *addr
if ((sector_offset + 256) <= track_len)
{
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, track_offset+sector_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset+sector_offset, SEEK_SET);
if (reply)
return 1;
/* read it */
- reply = stream_read(l1_img->file_handle, dest, 256);
+ reply = l1_img->file_handle->read(dest, 256);
if (reply != 256)
return 1;
}
else
{
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, track_offset+sector_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset+sector_offset, SEEK_SET);
if (reply)
return 1;
/* read first chunk (until end of track) */
- reply = stream_read(l1_img->file_handle, (UINT8 *)dest, track_len-sector_offset);
+ reply = l1_img->file_handle->read((UINT8 *)dest, track_len-sector_offset);
if (reply != track_len-sector_offset)
return 1;
/* wrap to start of track */
- reply = stream_seek(l1_img->file_handle, track_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset, SEEK_SET);
if (reply)
return 1;
/* read remnant of sector */
- reply = stream_read(l1_img->file_handle, (UINT8 *)dest + (track_len-sector_offset), 256-(track_len-sector_offset));
+ reply = l1_img->file_handle->read((UINT8 *)dest + (track_len-sector_offset), 256-(track_len-sector_offset));
if (reply != 256-(track_len-sector_offset))
return 1;
}
@@ -1214,11 +1214,11 @@ static int write_sector(ti99_lvl1_imgref *l1_img, const ti99_sector_address *add
case if_v9t9:
/* V9T9 format */
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, sector_address_to_image_offset(l1_img, address), SEEK_SET);
+ reply = l1_img->file_handle->seek(sector_address_to_image_offset(l1_img, address), SEEK_SET);
if (reply)
return 1;
/* write it */
- reply = stream_write(l1_img->file_handle, src, 256);
+ reply = l1_img->file_handle->write(src, 256);
if (reply != 256)
return 1;
break;
@@ -1233,31 +1233,31 @@ static int write_sector(ti99_lvl1_imgref *l1_img, const ti99_sector_address *add
if ((sector_offset + 256) <= track_len)
{
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, track_offset+sector_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset+sector_offset, SEEK_SET);
if (reply)
return 1;
/* write it */
- reply = stream_write(l1_img->file_handle, src, 256);
+ reply = l1_img->file_handle->write(src, 256);
if (reply != 256)
return 1;
}
else
{
/* seek to sector */
- reply = stream_seek(l1_img->file_handle, track_offset+sector_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset+sector_offset, SEEK_SET);
if (reply)
return 1;
/* write first chunk (until end of track) */
- reply = stream_write(l1_img->file_handle, (UINT8 *)src, track_len-sector_offset);
+ reply = l1_img->file_handle->write((UINT8 *)src, track_len-sector_offset);
if (reply != track_len-sector_offset)
return 1;
/* wrap to start of track */
- reply = stream_seek(l1_img->file_handle, track_offset, SEEK_SET);
+ reply = l1_img->file_handle->seek(track_offset, SEEK_SET);
if (reply)
return 1;
/* write remnant of sector */
- reply = stream_write(l1_img->file_handle, (UINT8 *)src + (track_len-sector_offset), 256-(track_len-sector_offset));
+ reply = l1_img->file_handle->write((UINT8 *)src + (track_len-sector_offset), 256-(track_len-sector_offset));
if (reply != 256-(track_len-sector_offset))
return 1;
}
@@ -1723,7 +1723,7 @@ struct ti99_lvl2_fileref_win
struct ti99_lvl2_fileref_tifiles
{
- imgtool_stream *file_handle;
+ imgtool::stream *file_handle;
tifile_header hdr;
};
@@ -1745,6 +1745,11 @@ struct ti99_lvl2_fileref
};
};
+static struct ti99_lvl2_imgref *get_lvl2_imgref(imgtool::image &image)
+{
+ return (struct ti99_lvl2_imgref *) image.extra_bytes();
+}
+
/*
Compare two (possibly empty) catalog entry for qsort
*/
@@ -2909,11 +2914,11 @@ static int new_file_lvl2_win(struct ti99_lvl2_imgref *l2_img, ti99_catalog *pare
/*
Allocate a new (empty) file
*/
-static int new_file_lvl2_tifiles(imgtool_stream *file_handle, struct ti99_lvl2_fileref *l2_file)
+static int new_file_lvl2_tifiles(imgtool::stream &file_handle, struct ti99_lvl2_fileref *l2_file)
{
/* set up file handle */
l2_file->type = L2F_TIFILES;
- l2_file->tifiles.file_handle = file_handle;
+ l2_file->tifiles.file_handle = &file_handle;
memset(&l2_file->tifiles.hdr, 0, sizeof(l2_file->tifiles.hdr));
l2_file->tifiles.hdr.tifiles[0] = '\7';
l2_file->tifiles.hdr.tifiles[1] = 'T';
@@ -3087,17 +3092,17 @@ static int open_file_lvl2_win(struct ti99_lvl2_imgref *l2_img, const char *fpath
/*
Open an existing file in TIFILES format
*/
-static int open_file_lvl2_tifiles(imgtool_stream *file_handle, struct ti99_lvl2_fileref *l2_file)
+static int open_file_lvl2_tifiles(imgtool::stream &file_handle, struct ti99_lvl2_fileref *l2_file)
{
/* set up file handle */
l2_file->type = L2F_TIFILES;
- l2_file->tifiles.file_handle = file_handle;
+ l2_file->tifiles.file_handle = &file_handle;
/* seek to header */
- if (stream_seek(l2_file->tifiles.file_handle, 0, SEEK_SET))
+ if (l2_file->tifiles.file_handle->seek(0, SEEK_SET))
return IMGTOOLERR_READERROR;
/* read it */
- if (stream_read(l2_file->tifiles.file_handle, &l2_file->tifiles.hdr, sizeof(l2_file->tifiles.hdr)) != sizeof(l2_file->tifiles.hdr))
+ if (l2_file->tifiles.file_handle->read(&l2_file->tifiles.hdr, sizeof(l2_file->tifiles.hdr)) != sizeof(l2_file->tifiles.hdr))
return IMGTOOLERR_READERROR;
return 0;
@@ -3242,10 +3247,10 @@ static int read_file_physrec(struct ti99_lvl2_fileref *l2_file, unsigned fphysre
case L2F_TIFILES:
/* seek to physrec */
- if (stream_seek(l2_file->tifiles.file_handle, 128+256*fphysrec, SEEK_SET))
+ if (l2_file->tifiles.file_handle->seek(128+256*fphysrec, SEEK_SET))
return IMGTOOLERR_READERROR;
/* read it */
- if (stream_read(l2_file->tifiles.file_handle, dest, 256) != 256)
+ if (l2_file->tifiles.file_handle->read(dest, 256) != 256)
return IMGTOOLERR_READERROR;
break;
}
@@ -3285,10 +3290,10 @@ static int write_file_physrec(struct ti99_lvl2_fileref *l2_file, unsigned fphysr
case L2F_TIFILES:
/* seek to physrec */
- if (stream_seek(l2_file->tifiles.file_handle, 128+256*fphysrec, SEEK_SET))
+ if (l2_file->tifiles.file_handle->seek(128+256*fphysrec, SEEK_SET))
return IMGTOOLERR_WRITEERROR;
/* write it */
- if (stream_write(l2_file->tifiles.file_handle, src, 256) != 256)
+ if (l2_file->tifiles.file_handle->write(src, 256) != 256)
return IMGTOOLERR_WRITEERROR;
break;
}
@@ -3848,24 +3853,24 @@ struct win_iterator
};
-static imgtoolerr_t dsk_image_init_mess(imgtool::image *image, imgtool_stream *f);
-static imgtoolerr_t dsk_image_init_v9t9(imgtool::image *image, imgtool_stream *f);
-static imgtoolerr_t dsk_image_init_pc99_fm(imgtool::image *image, imgtool_stream *f);
-static imgtoolerr_t dsk_image_init_pc99_mfm(imgtool::image *image, imgtool_stream *f);
-static imgtoolerr_t win_image_init(imgtool::image *image, imgtool_stream *f);
-static void ti99_image_exit(imgtool::image *img);
-static void ti99_image_info(imgtool::image *img, char *string, size_t len);
-static imgtoolerr_t dsk_image_beginenum(imgtool::directory *enumeration, const char *path);
-static imgtoolerr_t dsk_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent);
-static imgtoolerr_t win_image_beginenum(imgtool::directory *enumeration, const char *path);
-static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent);
-static imgtoolerr_t ti99_image_freespace(imgtool::partition *partition, UINT64 *size);
-static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *destf);
-static imgtoolerr_t ti99_image_writefile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions);
-static imgtoolerr_t dsk_image_deletefile(imgtool::partition *partition, const char *fpath);
-static imgtoolerr_t win_image_deletefile(imgtool::partition *partition, const char *fpath);
-static imgtoolerr_t dsk_image_create_mess(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions);
-static imgtoolerr_t dsk_image_create_v9t9(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions);
+static imgtoolerr_t dsk_image_init_mess(imgtool::image &image, imgtool::stream::ptr &&stream);
+static imgtoolerr_t dsk_image_init_v9t9(imgtool::image &image, imgtool::stream::ptr &&stream);
+static imgtoolerr_t dsk_image_init_pc99_fm(imgtool::image &image, imgtool::stream::ptr &&stream);
+static imgtoolerr_t dsk_image_init_pc99_mfm(imgtool::image &image, imgtool::stream::ptr &&stream);
+static imgtoolerr_t win_image_init(imgtool::image &image, imgtool::stream::ptr &&stream);
+static void ti99_image_exit(imgtool::image &img);
+static void ti99_image_info(imgtool::image &img, std::ostream &stream);
+static imgtoolerr_t dsk_image_beginenum(imgtool::directory &enumeration, const char *path);
+static imgtoolerr_t dsk_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent);
+static imgtoolerr_t win_image_beginenum(imgtool::directory &enumeration, const char *path);
+static imgtoolerr_t win_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent);
+static imgtoolerr_t ti99_image_freespace(imgtool::partition &partition, UINT64 *size);
+static imgtoolerr_t ti99_image_readfile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &destf);
+static imgtoolerr_t ti99_image_writefile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions);
+static imgtoolerr_t dsk_image_deletefile(imgtool::partition &partition, const char *fpath);
+static imgtoolerr_t win_image_deletefile(imgtool::partition &partition, const char *fpath);
+static imgtoolerr_t dsk_image_create_mess(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions);
+static imgtoolerr_t dsk_image_create_v9t9(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions);
enum
{
@@ -3995,17 +4000,17 @@ void ti99_ti99hd_get_info(const imgtool_class *imgclass, UINT32 state, union img
/*
Open a file as a ti99_image (common code).
*/
-static int dsk_image_init(imgtool::image *img, imgtool_stream *f, ti99_img_format img_format)
+static imgtoolerr_t dsk_image_init(imgtool::image &img, imgtool::stream::ptr &&stream, ti99_img_format img_format)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
dsk_vib vib;
- int reply;
+ imgtoolerr_t reply;
int totphysrecs;
unsigned fdir_aphysrec;
int i;
/* open disk image at level 1 */
- reply = open_image_lvl1(f, img_format, &image->l1_img, &vib);
+ reply = open_image_lvl1(std::move(stream), img_format, &image->l1_img, &vib);
if (reply)
return reply;
@@ -4029,7 +4034,7 @@ static int dsk_image_init(imgtool::image *img, imgtool_stream *f, ti99_img_forma
image->dsk.totphysrecs = get_UINT16BE(vib.totphysrecs);
/* read and check main volume catalog */
- reply = dsk_read_catalog(image, 1, &image->dsk.catalogs[0]);
+ reply = (imgtoolerr_t)dsk_read_catalog(image, 1, &image->dsk.catalogs[0]);
if (reply)
return reply;
@@ -4072,7 +4077,7 @@ static int dsk_image_init(imgtool::image *img, imgtool_stream *f, ti99_img_forma
image->dsk.fdir_aphysrec[image->dsk.catalogs[0].num_subdirs+1] = fdir_aphysrec;
/*image->dsk.catalogs[0].subdirs[image->dsk.catalogs[0].num_subdirs].dir_ptr = fdir_aphysrec;*/
memcpy(image->dsk.catalogs[0].subdirs[image->dsk.catalogs[0].num_subdirs].name, vib.subdir[i].name, 10);
- reply = dsk_read_catalog(image, fdir_aphysrec, &image->dsk.catalogs[image->dsk.catalogs[0].num_subdirs+1]);
+ reply = (imgtoolerr_t) dsk_read_catalog(image, fdir_aphysrec, &image->dsk.catalogs[image->dsk.catalogs[0].num_subdirs+1]);
if (reply)
{
/* error: invalid fdir */
@@ -4090,53 +4095,53 @@ static int dsk_image_init(imgtool::image *img, imgtool_stream *f, ti99_img_forma
/* initialize default data_offset */
image->data_offset = 32+2;
- return 0;
+ return (imgtoolerr_t)0;
}
/*
Open a file as a ti99_image (MESS format).
*/
-static imgtoolerr_t dsk_image_init_mess(imgtool::image *image, imgtool_stream *f)
+static imgtoolerr_t dsk_image_init_mess(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- return (imgtoolerr_t)dsk_image_init(image, f, if_mess);
+ return dsk_image_init(image, std::move(stream), if_mess);
}
/*
Open a file as a ti99_image (V9T9 format).
*/
-static imgtoolerr_t dsk_image_init_v9t9(imgtool::image *image, imgtool_stream *f)
+static imgtoolerr_t dsk_image_init_v9t9(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- return (imgtoolerr_t)dsk_image_init(image, f, if_v9t9);
+ return dsk_image_init(image, std::move(stream), if_v9t9);
}
/*
Open a file as a ti99_image (PC99 FM format).
*/
-static imgtoolerr_t dsk_image_init_pc99_fm(imgtool::image *image, imgtool_stream *f)
+static imgtoolerr_t dsk_image_init_pc99_fm(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- return (imgtoolerr_t)dsk_image_init(image, f, if_pc99_fm);
+ return dsk_image_init(image, std::move(stream), if_pc99_fm);
}
/*
Open a file as a ti99_image (PC99 MFM format).
*/
-static imgtoolerr_t dsk_image_init_pc99_mfm(imgtool::image *image, imgtool_stream *f)
+static imgtoolerr_t dsk_image_init_pc99_mfm(imgtool::image &image, imgtool::stream::ptr &&stream)
{
- return (imgtoolerr_t)dsk_image_init(image, f, if_pc99_mfm);
+ return dsk_image_init(image, std::move(stream), if_pc99_mfm);
}
/*
Open a file as a ti99_image (harddisk format).
*/
-static imgtoolerr_t win_image_init(imgtool::image *img, imgtool_stream *f)
+static imgtoolerr_t win_image_init(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
win_vib_ddr vib;
int reply;
int i;
/* open disk image at level 1 */
- reply = open_image_lvl1(f, if_harddisk, & image->l1_img, NULL);
+ reply = open_image_lvl1(std::move(stream), if_harddisk, & image->l1_img, NULL);
if (reply)
return (imgtoolerr_t)reply;
@@ -4184,9 +4189,9 @@ static imgtoolerr_t win_image_init(imgtool::image *img, imgtool_stream *f)
/*
close a ti99_image
*/
-static void ti99_image_exit(imgtool::image *img)
+static void ti99_image_exit(imgtool::image &img)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
close_image_lvl1(&image->l1_img);
}
@@ -4196,23 +4201,23 @@ static void ti99_image_exit(imgtool::image *img)
Currently returns the volume name
*/
-static void ti99_image_info(imgtool::image *img, char *string, size_t len)
+static void ti99_image_info(imgtool::image &img, std::ostream &stream)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
char vol_name[11];
fname_to_str(vol_name, image->vol_name, 11);
- snprintf(string, len, "%s", vol_name);
+ stream << vol_name;
}
/*
Open the disk catalog for enumeration
*/
-static imgtoolerr_t dsk_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t dsk_image_beginenum(imgtool::directory &enumeration, const char *path)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) enumeration->image().extra_bytes();
- dsk_iterator *iter = (dsk_iterator *) enumeration->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(enumeration.image());
+ dsk_iterator *iter = (dsk_iterator *) enumeration.extra_bytes();
iter->image = image;
iter->level = 0;
@@ -4226,16 +4231,16 @@ static imgtoolerr_t dsk_image_beginenum(imgtool::directory *enumeration, const c
/*
Enumerate disk catalog next entry
*/
-static imgtoolerr_t dsk_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t dsk_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- dsk_iterator *iter = (dsk_iterator*) enumeration->extra_bytes();
+ dsk_iterator *iter = (dsk_iterator*) enumeration.extra_bytes();
dsk_fdr fdr;
int reply;
unsigned fdr_aphysrec;
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
/* iterate through catalogs to next file or dir entry */
while ((iter->level >= 0)
@@ -4264,21 +4269,21 @@ static imgtoolerr_t dsk_image_nextenum(imgtool::directory *enumeration, imgtool_
if (iter->level < 0)
{
- ent->eof = 1;
+ ent.eof = 1;
}
else
{
if (iter->listing_subdirs)
{
- fname_to_str(ent->filename, iter->image->dsk.catalogs[0].subdirs[iter->index[iter->level]].name, ARRAY_LENGTH(ent->filename));
+ fname_to_str(ent.filename, iter->image->dsk.catalogs[0].subdirs[iter->index[iter->level]].name, ARRAY_LENGTH(ent.filename));
/* set type of DIR */
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "DIR");
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "DIR");
/* len in physrecs */
/* @BN@ return length in bytes */
- /* ent->filesize = 1; */
- ent->filesize = 256;
+ /* ent.filesize = 1; */
+ ent.filesize = 256;
/* recurse subdirectory */
iter->listing_subdirs = 0; /* no need to list subdirs as only the
@@ -4294,35 +4299,35 @@ static imgtoolerr_t dsk_image_nextenum(imgtool::directory *enumeration, imgtool_
if (reply)
return IMGTOOLERR_READERROR;
#if 0
- fname_to_str(ent->filename, fdr.name, ARRAY_LENGTH(ent->filename));
+ fname_to_str(ent.filename, fdr.name, ARRAY_LENGTH(ent.filename));
#else
{
char buf[11];
- ent->filename[0] = '\0';
+ ent.filename[0] = '\0';
if (iter->level)
{
- fname_to_str(ent->filename, iter->image->dsk.catalogs[0].subdirs[iter->index[0]].name, ARRAY_LENGTH(ent->filename));
- strncat(ent->filename, ".", ARRAY_LENGTH(ent->filename) - 1);
+ fname_to_str(ent.filename, iter->image->dsk.catalogs[0].subdirs[iter->index[0]].name, ARRAY_LENGTH(ent.filename));
+ strncat(ent.filename, ".", ARRAY_LENGTH(ent.filename) - 1);
}
fname_to_str(buf, fdr.name, 11);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
}
#endif
/* parse flags */
if (fdr.flags & fdr99_f_program)
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "PGM%s",
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "PGM%s",
(fdr.flags & fdr99_f_wp) ? " R/O" : "");
else
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%c/%c %d%s",
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%c/%c %d%s",
(fdr.flags & fdr99_f_int) ? 'I' : 'D',
(fdr.flags & fdr99_f_var) ? 'V' : 'F',
fdr.reclen,
(fdr.flags & fdr99_f_wp) ? " R/O" : "");
/* len in physrecs */
/* @BN@ return length in bytes */
- /* ent->filesize = get_UINT16BE(fdr.fphysrecs); */
- ent->filesize = (get_UINT16BE(fdr.fphysrecs)+1)*256;
+ /* ent.filesize = get_UINT16BE(fdr.fphysrecs); */
+ ent.filesize = (get_UINT16BE(fdr.fphysrecs)+1)*256;
iter->index[iter->level]++;
}
@@ -4334,10 +4339,10 @@ static imgtoolerr_t dsk_image_nextenum(imgtool::directory *enumeration, imgtool_
/*
Open the disk catalog for enumeration
*/
-static imgtoolerr_t win_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t win_image_beginenum(imgtool::directory &enumeration, const char *path)
{
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) enumeration->image().extra_bytes();
- win_iterator *iter = (win_iterator *) enumeration->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(enumeration.image());
+ win_iterator *iter = (win_iterator *) enumeration.extra_bytes();
imgtoolerr_t errorcode;
iter->image = image;
@@ -4354,17 +4359,17 @@ static imgtoolerr_t win_image_beginenum(imgtool::directory *enumeration, const c
/*
Enumerate disk catalog next entry
*/
-static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t win_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- win_iterator *iter = (win_iterator *) enumeration->extra_bytes();
+ win_iterator *iter = (win_iterator *) enumeration.extra_bytes();
unsigned fdr_aphysrec;
win_fdr fdr;
int reply;
int i;
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
/* iterate through catalogs to next file or dir entry */
while ((iter->level >= 0)
@@ -4387,37 +4392,37 @@ static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_
if (iter->level < 0)
{
- ent->eof = 1;
+ ent.eof = 1;
}
else
{
if (iter->listing_subdirs)
{
#if 0
- fname_to_str(ent->filename, iter->catalog[iter->level].subdirs[iter->index[iter->level]].name, ARRAY_LENGTH(ent->filename));
+ fname_to_str(ent.filename, iter->catalog[iter->level].subdirs[iter->index[iter->level]].name, ARRAY_LENGTH(ent.filename));
#else
{
char buf[11];
- ent->filename[0] = '\0';
+ ent.filename[0] = '\0';
for (i=0; i<iter->level; i++)
{
fname_to_str(buf, iter->catalog[i].subdirs[iter->index[i]].name, 11);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
- strncat(ent->filename, ".", ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
+ strncat(ent.filename, ".", ARRAY_LENGTH(ent.filename) - 1);
}
fname_to_str(buf, iter->catalog[iter->level].subdirs[iter->index[iter->level]].name, 11);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
}
#endif
/* set type of DIR */
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "DIR");
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "DIR");
/* len in physrecs */
/* @BN@ return length in bytes */
- /* ent->filesize = 2; */
- ent->filesize = 512;
+ /* ent.filesize = 2; */
+ ent.filesize = 512;
/* recurse subdirectory */
/*iter->listing_subdirs = 1;*/
@@ -4426,7 +4431,7 @@ static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_
reply = win_read_catalog(iter->image, iter->catalog[iter->level-1].subdirs[iter->index[iter->level-1]].dir_ptr, &iter->catalog[iter->level]);
if (reply)
{
- ent->corrupt = 1;
+ ent.corrupt = 1;
return (imgtoolerr_t)reply;
}
}
@@ -4437,36 +4442,36 @@ static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_
if (reply)
return IMGTOOLERR_READERROR;
#if 0
- fname_to_str(ent->filename, iter->catalog[iter->level].files[iter->index[iter->level]].name, ARRAY_LENGTH(ent->filename));
+ fname_to_str(ent.filename, iter->catalog[iter->level].files[iter->index[iter->level]].name, ARRAY_LENGTH(ent.filename));
#else
{
char buf[11];
- ent->filename[0] = '\0';
+ ent.filename[0] = '\0';
for (i=0; i<iter->level; i++)
{
fname_to_str(buf, iter->catalog[i].subdirs[iter->index[i]].name, 11);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
- strncat(ent->filename, ".", ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
+ strncat(ent.filename, ".", ARRAY_LENGTH(ent.filename) - 1);
}
fname_to_str(buf, iter->catalog[iter->level].files[iter->index[iter->level]].name, 11);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
}
#endif
/* parse flags */
if (fdr.flags & fdr99_f_program)
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "PGM%s",
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "PGM%s",
(fdr.flags & fdr99_f_wp) ? " R/O" : "");
else
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%c/%c %d%s",
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%c/%c %d%s",
(fdr.flags & fdr99_f_int) ? 'I' : 'D',
(fdr.flags & fdr99_f_var) ? 'V' : 'F',
fdr.reclen,
(fdr.flags & fdr99_f_wp) ? " R/O" : "");
/* len in physrecs */
/* @BN@ return length in bytes */
- /* ent->filesize = get_win_fdr_fphysrecs(&fdr); */
- ent->filesize = (get_win_fdr_fphysrecs(&fdr)+1)*256;
+ /* ent.filesize = get_win_fdr_fphysrecs(&fdr); */
+ ent.filesize = (get_win_fdr_fphysrecs(&fdr)+1)*256;
iter->index[iter->level]++;
}
@@ -4478,10 +4483,10 @@ static imgtoolerr_t win_image_nextenum(imgtool::directory *enumeration, imgtool_
/*
Compute free space on disk image (in AUs)
*/
-static imgtoolerr_t ti99_image_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t ti99_image_freespace(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *img = &partition->image();
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
size_t freeAUs;
int i;
@@ -4502,13 +4507,13 @@ static imgtoolerr_t ti99_image_freespace(imgtool::partition *partition, UINT64 *
/*
Extract a file from a ti99_image. The file is saved in tifile format.
*/
-static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t ti99_image_readfile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &destf)
{
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
#if 1
/* extract data as TIFILES */
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
ti99_lvl2_fileref src_file;
ti99_lvl2_fileref dst_file;
ti99_date_time date_time;
@@ -4574,7 +4579,7 @@ static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const cha
#endif
set_file_update_date(&dst_file, date_time);
- if (stream_write(destf, & dst_file.tifiles.hdr, 128) != 128)
+ if (destf.write(& dst_file.tifiles.hdr, 128) != 128)
return (imgtoolerr_t)IMGTOOLERR_WRITEERROR;
/* copy data to TIFILE */
@@ -4595,7 +4600,7 @@ static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const cha
#else
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
ti99_lvl3_fileref src_file;
UINT8 buf[256];
int reclen;
@@ -4630,9 +4635,9 @@ static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const cha
errorcode = read_next_record(& src_file, buf, & reclen);
if (errorcode)
return errorcode;
- if (stream_write(destf, buf, reclen) != reclen)
+ if (destf.write(buf, reclen) != reclen)
return IMGTOOLERR_WRITEERROR;
- if (stream_write(destf, &lineend, 1) != 1)
+ if (destf.write(&lineend, 1) != 1)
return IMGTOOLERR_WRITEERROR;
}
@@ -4644,10 +4649,10 @@ static imgtoolerr_t ti99_image_readfile(imgtool::partition *partition, const cha
/*
Add a file to a ti99_image. The file must be in tifile format.
*/
-static imgtoolerr_t ti99_image_writefile(imgtool::partition *partition, const char *fpath, const char *fork, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t ti99_image_writefile(imgtool::partition &partition, const char *fpath, const char *fork, imgtool::stream &sourcef, util::option_resolution *writeoptions)
{
- imgtool::image *img = &partition->image();
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
const char *filename;
char ti_fname[10];
ti99_lvl2_fileref src_file;
@@ -4766,7 +4771,7 @@ static imgtoolerr_t ti99_image_writefile(imgtool::partition *partition, const ch
/* copy data */
for (i=0; i<fphysrecs; i++)
{
- if (stream_read(sourcef, buf, 256) != 256)
+ if (sourcef.read(buf, 256) != 256)
return (imgtoolerr_t)IMGTOOLERR_READERROR;
errorcode = (imgtoolerr_t)write_file_physrec(& dst_file, i, buf);
@@ -4870,10 +4875,10 @@ static imgtoolerr_t ti99_image_writefile(imgtool::partition *partition, const ch
/*
Delete a file from a ti99_image.
*/
-static imgtoolerr_t dsk_image_deletefile(imgtool::partition *partition, const char *fpath)
+static imgtoolerr_t dsk_image_deletefile(imgtool::partition &partition, const char *fpath)
{
- imgtool::image *img = &partition->image();
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
dsk_fdr fdr;
int i, cluster_index;
unsigned cur_AU, cluster_lastfphysrec;
@@ -5012,10 +5017,10 @@ static imgtoolerr_t dsk_image_deletefile(imgtool::partition *partition, const ch
return (imgtoolerr_t)0;
}
-static imgtoolerr_t win_image_deletefile(imgtool::partition *partition, const char *fpath)
+static imgtoolerr_t win_image_deletefile(imgtool::partition &partition, const char *fpath)
{
- imgtool::image *img = &partition->image();
- struct ti99_lvl2_imgref *image = (struct ti99_lvl2_imgref *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ struct ti99_lvl2_imgref *image = get_lvl2_imgref(img);
int parent_ddr_AU, is_dir, catalog_index;
win_fdr fdr;
int i;
@@ -5226,7 +5231,7 @@ static imgtoolerr_t win_image_deletefile(imgtool::partition *partition, const ch
Supports MESS and V9T9 formats only
*/
-static imgtoolerr_t dsk_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions, ti99_img_format img_format)
+static imgtoolerr_t dsk_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions, ti99_img_format img_format)
{
const char *volname;
int density;
@@ -5241,7 +5246,7 @@ static imgtoolerr_t dsk_image_create(imgtool::image *image, imgtool_stream *f, u
int i;
l1_img.img_format = img_format;
- l1_img.file_handle = f;
+ l1_img.file_handle = stream.get(); // can't release here
/* read options */
volname = createoptions->lookup_string(dsk_createopts_volname).c_str();
@@ -5328,7 +5333,7 @@ static imgtoolerr_t dsk_image_create(imgtool::image *image, imgtool_stream *f, u
vib.abm[0] |= (physrecsperAU == 1) ? 3 : 1;
/* write aphysrec 0 */
- if (write_absolute_physrec(& l1_img, 0, &vib))
+ if (write_absolute_physrec(&l1_img, 0, &vib))
return IMGTOOLERR_WRITEERROR;
@@ -5340,21 +5345,21 @@ static imgtoolerr_t dsk_image_create(imgtool::image *image, imgtool_stream *f, u
return IMGTOOLERR_WRITEERROR;
- return (imgtoolerr_t)dsk_image_init(image, f, img_format);
+ return dsk_image_init(image, std::move(stream), img_format);
}
/*
Create a blank ti99_image (MESS format).
*/
-static imgtoolerr_t dsk_image_create_mess(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions)
+static imgtoolerr_t dsk_image_create_mess(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions)
{
- return dsk_image_create(image, f, createoptions, if_mess);
+ return dsk_image_create(image, std::move(stream), createoptions, if_mess);
}
/*
Create a blank ti99_image (V9T9 format).
*/
-static imgtoolerr_t dsk_image_create_v9t9(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions)
+static imgtoolerr_t dsk_image_create_v9t9(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions)
{
- return dsk_image_create(image, f, createoptions, if_v9t9);
+ return dsk_image_create(image, std::move(stream), createoptions, if_v9t9);
}
diff --git a/src/tools/imgtool/modules/ti990hd.cpp b/src/tools/imgtool/modules/ti990hd.cpp
index 87f4c668ce1..7ac0775ca2f 100644
--- a/src/tools/imgtool/modules/ti990hd.cpp
+++ b/src/tools/imgtool/modules/ti990hd.cpp
@@ -368,7 +368,7 @@ struct ti990_phys_sec_address
*/
struct ti990_image
{
- imgtool_stream *file_handle; /* imgtool file handle */
+ imgtool::stream *file_handle; /* imgtool file handle */
ti990_geometry geometry; /* geometry */
ti990_sc0 sec0; /* cached copy of sector 0 */
};
@@ -385,20 +385,25 @@ struct ti990_iterator
directory_entry xdr[MAX_DIR_LEVEL]; /* fdr records */
};
+static ti990_image *get_ti990_image(imgtool::image &image)
+{
+ return (ti990_image *)image.extra_bytes();
+}
-static imgtoolerr_t ti990_image_init(imgtool::image *img, imgtool_stream *f);
-static void ti990_image_exit(imgtool::image *img);
-static void ti990_image_info(imgtool::image *img, char *string, size_t len);
-static imgtoolerr_t ti990_image_beginenum(imgtool::directory *enumeration, const char *path);
-static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent);
-static void ti990_image_closeenum(imgtool::directory *enumeration);
-static imgtoolerr_t ti990_image_freespace(imgtool::partition *partition, UINT64 *size);
+
+static imgtoolerr_t ti990_image_init(imgtool::image &img, imgtool::stream::ptr &&stream);
+static void ti990_image_exit(imgtool::image &img);
+static void ti990_image_info(imgtool::image &img, std::ostream &stream);
+static imgtoolerr_t ti990_image_beginenum(imgtool::directory &enumeration, const char *path);
+static imgtoolerr_t ti990_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent);
+static void ti990_image_closeenum(imgtool::directory &enumeration);
+static imgtoolerr_t ti990_image_freespace(imgtool::partition &partition, UINT64 *size);
#ifdef UNUSED_FUNCTION
-static imgtoolerr_t ti990_image_readfile(imgtool::partition *partition, const char *fpath, imgtool_stream *destf);
-static imgtoolerr_t ti990_image_writefile(imgtool::partition *partition, const char *fpath, imgtool_stream *sourcef, util::option_resolution *writeoptions);
-static imgtoolerr_t ti990_image_deletefile(imgtool::partition *partition, const char *fpath);
+static imgtoolerr_t ti990_image_readfile(imgtool::partition &partition, const char *fpath, imgtool::stream *destf);
+static imgtoolerr_t ti990_image_writefile(imgtool::partition &partition, const char *fpath, imgtool::stream *sourcef, util::option_resolution *writeoptions);
+static imgtoolerr_t ti990_image_deletefile(imgtool::partition &partition, const char *fpath);
#endif
-static imgtoolerr_t ti990_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions);
+static imgtoolerr_t ti990_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions);
enum
{
@@ -531,7 +536,7 @@ static unsigned phys_address_to_offset(const ti990_phys_sec_address *address, co
dest: pointer to destination buffer
len: length of data to read
*/
-static int read_sector_physical_len(imgtool_stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, void *dest, int len)
+static int read_sector_physical_len(imgtool::stream &file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, void *dest, int len)
{
int reply;
@@ -539,11 +544,11 @@ static int read_sector_physical_len(imgtool_stream *file_handle, const ti990_phy
return 1;
/* seek to sector */
- reply = stream_seek(file_handle, phys_address_to_offset(address, geometry), SEEK_SET);
+ reply = file_handle.seek(phys_address_to_offset(address, geometry), SEEK_SET);
if (reply)
return 1;
/* read it */
- reply = stream_read(file_handle, dest, len);
+ reply = file_handle.read(dest, len);
if (reply != len)
return 1;
@@ -559,7 +564,7 @@ static int read_sector_physical_len(imgtool_stream *file_handle, const ti990_phy
geometry: disk geometry (sectors per track, tracks per side, sides)
dest: pointer to a destination buffer of geometry->bytes_per_sector bytes
*/
-static int read_sector_physical(imgtool_stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, void *dest)
+static int read_sector_physical(imgtool::stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, void *dest)
{
return read_sector_physical_len(file_handle, address, geometry, dest, geometry->bytes_per_sector);
}
@@ -574,7 +579,7 @@ static int read_sector_physical(imgtool_stream *file_handle, const ti990_phys_se
src: pointer to source buffer
len: length of source buffer
*/
-static int write_sector_physical_len(imgtool_stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, const void *src, int len)
+static int write_sector_physical_len(imgtool::stream &file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, const void *src, int len)
{
int reply;
@@ -582,17 +587,17 @@ static int write_sector_physical_len(imgtool_stream *file_handle, const ti990_ph
return 1;
/* seek to sector */
- reply = stream_seek(file_handle, phys_address_to_offset(address, geometry), SEEK_SET);
+ reply = file_handle.seek(phys_address_to_offset(address, geometry), SEEK_SET);
if (reply)
return 1;
/* write it */
- reply = stream_write(file_handle, src, len);
+ reply = file_handle.write(src, len);
if (reply != len)
return 1;
/* pad with 0s if needed */
if (len < geometry->bytes_per_sector)
{
- reply = stream_fill(file_handle, 0, geometry->bytes_per_sector - len);
+ reply = file_handle.fill(0, geometry->bytes_per_sector - len);
if (reply != geometry->bytes_per_sector - len)
return 1;
@@ -610,7 +615,7 @@ static int write_sector_physical_len(imgtool_stream *file_handle, const ti990_ph
geometry: disk geometry (sectors per track, tracks per side, sides)
dest: pointer to a source buffer of geometry->bytes_per_sector bytes
*/
-static int write_sector_physical(imgtool_stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, const void *src)
+static int write_sector_physical(imgtool::stream *file_handle, const ti990_phys_sec_address *address, const ti990_geometry *geometry, const void *src)
{
return write_sector_physical_len(file_handle, address, geometry, src, geometry->bytes_per_sector);
}
@@ -636,7 +641,7 @@ static void log_address_to_phys_address(int secnum, const ti990_geometry *geomet
dest: pointer to destination buffer
len: length of data to read
*/
-static int read_sector_logical_len(imgtool_stream *file_handle, int secnum, const ti990_geometry *geometry, void *dest, int len)
+static int read_sector_logical_len(imgtool::stream &file_handle, int secnum, const ti990_geometry *geometry, void *dest, int len)
{
ti990_phys_sec_address address;
@@ -655,7 +660,7 @@ static int read_sector_logical_len(imgtool_stream *file_handle, int secnum, cons
geometry: disk geometry (sectors per track, tracks per side, sides)
dest: pointer to a destination buffer of geometry->bytes_per_sector bytes
*/
-static int read_sector_logical(imgtool_stream *file_handle, int secnum, const ti990_geometry *geometry, void *dest)
+static int read_sector_logical(imgtool::stream *file_handle, int secnum, const ti990_geometry *geometry, void *dest)
{
return read_sector_logical_len(file_handle, secnum, geometry, dest, geometry->bytes_per_sector);
}
@@ -670,7 +675,7 @@ static int read_sector_logical(imgtool_stream *file_handle, int secnum, const ti
src: pointer to source buffer
len: length of source buffer
*/
-static int write_sector_logical_len(imgtool_stream *file_handle, int secnum, const ti990_geometry *geometry, const void *src, int len)
+static int write_sector_logical_len(imgtool::stream &file_handle, int secnum, const ti990_geometry *geometry, const void *src, int len)
{
ti990_phys_sec_address address;
@@ -688,7 +693,7 @@ static int write_sector_logical_len(imgtool_stream *file_handle, int secnum, con
geometry: disk geometry (sectors per track, tracks per side, sides)
dest: pointer to a source buffer of geometry->bytes_per_sector bytes
*/
-static int write_sector_logical(imgtool_stream *file_handle, int secnum, const ti990_geometry *geometry, const void *src)
+static int write_sector_logical(imgtool::stream &file_handle, int secnum, const ti990_geometry *geometry, const void *src)
{
return write_sector_logical_len(file_handle, secnum, geometry, src, geometry->bytes_per_sector);
}
@@ -1106,15 +1111,15 @@ static int qsort_catalog_compare(const void *p1, const void *p2)
/*
Open a file as a ti990_image.
*/
-static imgtoolerr_t ti990_image_init(imgtool::image *img, imgtool_stream *f)
+static imgtoolerr_t ti990_image_init(imgtool::image &img, imgtool::stream::ptr &&stream)
{
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ ti990_image *image = get_ti990_image(img);
disk_image_header header;
int reply;
unsigned totsecs;
- image->file_handle = f;
- reply = stream_read(f, &header, sizeof(header));
+ image->file_handle = stream.get();
+ reply = image->file_handle->read(&header, sizeof(header));
if (reply != sizeof(header))
return IMGTOOLERR_READERROR;
@@ -1131,14 +1136,14 @@ static imgtoolerr_t ti990_image_init(imgtool::image *img, imgtool_stream *f)
|| (image->geometry.heads > MAX_HEADS)
|| (image->geometry.cylinders > MAX_CYLINDERS)
|| (totsecs < 1)
- || (stream_size(f) != header_len + totsecs*image->geometry.bytes_per_sector))
+ || (image->file_handle->size() != header_len + totsecs*image->geometry.bytes_per_sector))
{
return IMGTOOLERR_CORRUPTIMAGE;
}
{
ti990_phys_sec_address address = { 0, 0, 0 };
- reply = read_sector_physical_len(f, &address, &image->geometry, & image->sec0, sizeof(image->sec0));
+ reply = read_sector_physical_len(*image->file_handle, &address, &image->geometry, & image->sec0, sizeof(image->sec0));
}
if (reply)
{
@@ -1156,16 +1161,17 @@ static imgtoolerr_t ti990_image_init(imgtool::image *img, imgtool_stream *f)
return IMGTOOLERR_CORRUPTIMAGE;
}
+ image->file_handle = stream.release();
return IMGTOOLERR_SUCCESS;
}
/*
close a ti990_image
*/
-static void ti990_image_exit(imgtool::image *img)
+static void ti990_image_exit(imgtool::image &img)
{
- ti990_image *image = (ti990_image *) img->extra_bytes();
- stream_close(image->file_handle);
+ ti990_image *image = get_ti990_image(img);
+ delete image->file_handle;
}
/*
@@ -1173,29 +1179,29 @@ static void ti990_image_exit(imgtool::image *img)
Currently returns the volume name
*/
-static void ti990_image_info(imgtool::image *img, char *string, size_t len)
+static void ti990_image_info(imgtool::image &img, std::ostream &stream)
{
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ ti990_image *image = get_ti990_image(img);
char vol_name[9];
fname_to_str(vol_name, image->sec0.vnm, 9);
- snprintf(string, len, "%s", vol_name);
+ stream << vol_name;
}
/*
Open the disk catalog for enumeration
*/
-static imgtoolerr_t ti990_image_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t ti990_image_beginenum(imgtool::directory &enumeration, const char *path)
{
- ti990_image *image = (ti990_image *) enumeration->image().extra_bytes();
- ti990_iterator *iter = (ti990_iterator *) enumeration->extra_bytes();
+ ti990_image *image = (ti990_image *) enumeration.image().extra_bytes();
+ ti990_iterator *iter = (ti990_iterator *) enumeration.extra_bytes();
ti990_dor dor;
int reply;
iter->image = image;
- reply = read_sector_logical_len(iter->image->file_handle,
+ reply = read_sector_logical_len(*iter->image->file_handle,
(unsigned) get_UINT16BE(iter->image->sec0.vda) * get_UINT16BE(iter->image->sec0.spa),
& iter->image->geometry, &dor, sizeof(dor));
@@ -1212,18 +1218,18 @@ static imgtoolerr_t ti990_image_beginenum(imgtool::directory *enumeration, const
/*
Enumerate disk catalog next entry
*/
-static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t ti990_image_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- ti990_iterator *iter = (ti990_iterator *) enumeration->extra_bytes();
+ ti990_iterator *iter = (ti990_iterator *) enumeration.extra_bytes();
int flag;
int reply = 0;
- ent->corrupt = 0;
- ent->eof = 0;
+ ent.corrupt = 0;
+ ent.eof = 0;
while ((iter->level >= 0)
- && (! (reply = read_sector_logical_len(iter->image->file_handle,
+ && (! (reply = read_sector_logical_len(*iter->image->file_handle,
iter->level ? (unsigned) get_UINT16BE(iter->xdr[iter->level-1].fdr.paa) * get_UINT16BE(iter->image->sec0.spa) + (iter->index[iter->level]+1)
: (unsigned) get_UINT16BE(iter->image->sec0.vda) * get_UINT16BE(iter->image->sec0.spa) + (iter->index[iter->level]+1),
& iter->image->geometry, &iter->xdr[iter->level],
@@ -1238,28 +1244,28 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
if (iter->level < 0)
{
- ent->eof = 1;
+ ent.eof = 1;
}
else if (reply)
return IMGTOOLERR_READERROR;
else
{
#if 0
- fname_to_str(ent->filename, iter->xdr[iter->level].fdr.fnm, ARRAY_LENGTH(ent->filename));
+ fname_to_str(ent.filename, iter->xdr[iter->level].fdr.fnm, ARRAY_LENGTH(ent.filename));
#else
{
int i;
char buf[9];
- ent->filename[0] = '\0';
+ ent.filename[0] = '\0';
for (i=0; i<iter->level; i++)
{
fname_to_str(buf, iter->xdr[i].fdr.fnm, 9);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
- strncat(ent->filename, ".", ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
+ strncat(ent.filename, ".", ARRAY_LENGTH(ent.filename) - 1);
}
fname_to_str(buf, iter->xdr[iter->level].fdr.fnm, 9);
- strncat(ent->filename, buf, ARRAY_LENGTH(ent->filename) - 1);
+ strncat(ent.filename, buf, ARRAY_LENGTH(ent.filename) - 1);
}
#endif
@@ -1267,16 +1273,16 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
flag = get_UINT16BE(iter->xdr[iter->level].fdr.flg);
if (flag & fdr_flg_cdr)
{
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "CHANNEL");
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "CHANNEL");
- ent->filesize = 0;
+ ent.filesize = 0;
}
else if (flag & fdr_flg_ali)
{
ti990_fdr target_fdr;
char buf[9];
- reply = read_sector_logical_len(iter->image->file_handle,
+ reply = read_sector_logical_len(*iter->image->file_handle,
iter->level ? ((unsigned) get_UINT16BE(iter->xdr[iter->level-1].fdr.paa) * get_UINT16BE(iter->image->sec0.spa) + get_UINT16BE(iter->xdr[iter->level].adr.raf))
: ((unsigned) get_UINT16BE(iter->image->sec0.vda) * get_UINT16BE(iter->image->sec0.spa) + get_UINT16BE(iter->xdr[iter->level].adr.raf)),
& iter->image->geometry, &target_fdr,
@@ -1285,9 +1291,9 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
fname_to_str(buf, target_fdr.fnm, 9);
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "ALIAS OF %s", buf);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "ALIAS OF %s", buf);
- ent->filesize = 0;
+ ent.filesize = 0;
}
else
{
@@ -1335,7 +1341,7 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
}
break;
}
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr),
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr),
"%s %c %s%s%s%s%s", fmt, (flag & fdr_flg_all) ? 'N' : 'C', type,
(flag & fdr_flg_blb) ? "" : " BLK",
(flag & fdr_flg_tmp) ? " TMP" : "",
@@ -1343,17 +1349,17 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
(flag & fdr_flg_dpb) ? " DPT" : "");
/* len in blocks */
- ent->filesize = get_UINT32BE(iter->xdr[iter->level].fdr.bkm);
+ ent.filesize = get_UINT32BE(iter->xdr[iter->level].fdr.bkm);
if ((((flag >> fdr_flg_ft_shift) & 3) == 3) || get_UINT16BE(iter->xdr[iter->level].fdr.ofm))
- ent->filesize++;
+ ent.filesize++;
/* convert to ADUs */
if (iter->xdr[iter->level].fdr.apb > 1)
/* more than one ADU per block */
- ent->filesize *= iter->xdr[iter->level].fdr.apb;
+ ent.filesize *= iter->xdr[iter->level].fdr.apb;
else if (iter->xdr[iter->level].fdr.bpa > 1)
/* more than one block per ADU */
- ent->filesize = (ent->filesize + iter->xdr[iter->level].fdr.bpa - 1) / iter->xdr[iter->level].fdr.bpa;
+ ent.filesize = (ent.filesize + iter->xdr[iter->level].fdr.bpa - 1) / iter->xdr[iter->level].fdr.bpa;
}
iter->index[iter->level]++;
@@ -1382,7 +1388,7 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
if (get_UINT16BE(iter->xdr[iter->level].fdr.saa) != 0)
printf("ninou");
- read_sector_logical_len(iter->image->file_handle,
+ read_sector_logical_len(*iter->image->file_handle,
get_UINT16BE(iter->xdr[iter->level].fdr.paa) * get_UINT16BE(iter->image->sec0.spa),
& iter->image->geometry, &dor, sizeof(dor));
@@ -1406,17 +1412,17 @@ static imgtoolerr_t ti990_image_nextenum(imgtool::directory *enumeration, imgtoo
/*
Free enumerator
*/
-static void ti990_image_closeenum(imgtool::directory *enumeration)
+static void ti990_image_closeenum(imgtool::directory &enumeration)
{
}
/*
Compute free space on disk image (in ADUs)
*/
-static imgtoolerr_t ti990_image_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t ti990_image_freespace(imgtool::partition &partition, UINT64 *size)
{
- imgtool::image *img = &partition->image();
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ imgtool::image &img(partition.image());
+ ti990_image *image = get_ti990_image(img);
int totadus = get_UINT16BE(image->sec0.tna);
int adu, record, sub_adu;
char buf[256];
@@ -1431,7 +1437,7 @@ static imgtoolerr_t ti990_image_freespace(imgtool::partition *partition, UINT64
sub_adu = 0;
while (adu<totadus)
{
- read_sector_logical_len(image->file_handle, image->sec0.sbm + record, &image->geometry, buf, sizeof(buf));
+ read_sector_logical_len(*image->file_handle, image->sec0.sbm + record, &image->geometry, buf, sizeof(buf));
while ((adu < totadus) && (sub_adu < 2032))
{
@@ -1453,10 +1459,10 @@ static imgtoolerr_t ti990_image_freespace(imgtool::partition *partition, UINT64
/*
Extract a file from a ti990_image.
*/
-static imgtoolerr_t ti990_image_readfile(imgtool::partition *partition, const char *fpath, imgtool_stream *destf)
+static imgtoolerr_t ti990_image_readfile(imgtool::partition &partition, const char *fpath, imgtool::stream *destf)
{
imgtool::image *img = &partition->image();
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ ti990_image *image = get_ti990_image(img);
int catalog_index, fdr_secnum, parent_fdr_secnum;
imgtoolerr_t reply;
@@ -1506,7 +1512,7 @@ static imgtoolerr_t ti990_image_readfile(imgtool::partition *partition, const ch
for (i=0; i<(128-14); i++)
dst_header.res[i] = 0;
- if (stream_write(destf, & dst_header, 128) != 128)
+ if (destf->write(& dst_header, 128) != 128)
return IMGTOOLERR_WRITEERROR;
@@ -1532,7 +1538,7 @@ static imgtoolerr_t ti990_image_readfile(imgtool::partition *partition, const ch
if (read_sector_logical(image->file_handle, cur_sec, & image->geometry, buf))
return IMGTOOLERR_READERROR;
- if (stream_write(destf, buf, 256) != 256)
+ if (destf->write(buf, 256) != 256)
return IMGTOOLERR_WRITEERROR;
i++;
@@ -1550,10 +1556,10 @@ static imgtoolerr_t ti990_image_readfile(imgtool::partition *partition, const ch
/*
Add a file to a ti990_image.
*/
-static imgtoolerr_t ti990_image_writefile(imgtool::partition *partition, const char *fpath, imgtool_stream *sourcef, util::option_resolution *writeoptions)
+static imgtoolerr_t ti990_image_writefile(imgtool::partition &partition, const char *fpath, imgtool::stream *sourcef, util::option_resolution *writeoptions)
{
imgtool::image *img = &partition->image();
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ ti990_image *image = get_ti990_image(img);
int catalog_index, fdr_secnum, parent_fdr_secnum;
imgtoolerr_t reply;
@@ -1592,7 +1598,7 @@ static imgtoolerr_t ti990_image_writefile(imgtool::partition *partition, const c
return reply;
}
- if (stream_read(sourcef, & src_header, 128) != 128)
+ if (sourcef->read(& src_header, 128) != 128)
return IMGTOOLERR_READERROR;
/* create new file */
@@ -1637,7 +1643,7 @@ static imgtoolerr_t ti990_image_writefile(imgtool::partition *partition, const c
if (cur_sec >= totsecs)
return IMGTOOLERR_CORRUPTIMAGE;
- if (stream_read(sourcef, buf, 256) != 256)
+ if (sourcef->read(buf, 256) != 256)
return IMGTOOLERR_READERROR;
if (write_sector_logical(image->file_handle, cur_sec, & image->geometry, buf))
@@ -1674,10 +1680,10 @@ static imgtoolerr_t ti990_image_writefile(imgtool::partition *partition, const c
/*
Delete a file from a ti990_image.
*/
-static imgtoolerr_t ti990_image_deletefile(imgtool::partition *partition, const char *fpath)
+static imgtoolerr_t ti990_image_deletefile(imgtool::partition &partition, const char *fpath)
{
imgtool::image *img = &partition->image();
- ti990_image *image = (ti990_image *) img->extra_bytes();
+ ti990_image *image = get_ti990_image(img);
int catalog_index, fdr_secnum, parent_fdr_secnum;
imgtoolerr_t reply;
@@ -1764,7 +1770,7 @@ static imgtoolerr_t ti990_image_deletefile(imgtool::partition *partition, const
/*
Create a blank ti990_image.
*/
-static imgtoolerr_t ti990_image_create(imgtool::image *image, imgtool_stream *f, util::option_resolution *createoptions)
+static imgtoolerr_t ti990_image_create(imgtool::image &image, imgtool::stream::ptr &&stream, util::option_resolution *createoptions)
{
//const char *volname;
ti990_geometry geometry;
@@ -1790,7 +1796,7 @@ static imgtoolerr_t ti990_image_create(imgtool::image *image, imgtool_stream *f,
set_UINT32BE(& header.sectors_per_track, geometry.sectors_per_track);
set_UINT32BE(& header.bytes_per_sector, geometry.bytes_per_sector);
- reply = stream_write(f, &header, sizeof(header));
+ reply = stream->write(&header, sizeof(header));
if (reply != sizeof(header))
{
return IMGTOOLERR_WRITEERROR;
@@ -1803,7 +1809,7 @@ static imgtoolerr_t ti990_image_create(imgtool::image *image, imgtool_stream *f,
/* write sector 0 */
- if (write_sector_logical(f, 0, & geometry, &sec0))
+ if (write_sector_logical(*stream, 0, & geometry, &sec0))
return IMGTOOLERR_WRITEERROR;
@@ -1811,7 +1817,7 @@ static imgtoolerr_t ti990_image_create(imgtool::image *image, imgtool_stream *f,
memset(empty_sec, 0, geometry.bytes_per_sector);
for (i=1; i<totsecs; i++)
- if (write_sector_logical(f, i, & geometry, empty_sec))
+ if (write_sector_logical(*stream, i, & geometry, empty_sec))
return IMGTOOLERR_WRITEERROR;
return (imgtoolerr_t)0;
diff --git a/src/tools/imgtool/modules/vzdos.cpp b/src/tools/imgtool/modules/vzdos.cpp
index 706210b9182..6fe44f4d760 100644
--- a/src/tools/imgtool/modules/vzdos.cpp
+++ b/src/tools/imgtool/modules/vzdos.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Dirk Best
/****************************************************************************
- vzdos.c
+ vzdos.cpp
Laser/VZ disk images
@@ -93,7 +93,7 @@ static UINT16 chksum16(UINT8 *buffer, int len)
}
/* returns the offset where the actual sector data starts */
-static imgtoolerr_t vzdos_get_data_start(imgtool::image *img, int track, int sector, int *start)
+static imgtoolerr_t vzdos_get_data_start(imgtool::image &img, int track, int sector, int *start)
{
imgtoolerr_t ret;
UINT8 buffer[25]; /* enough to read the sector header */
@@ -115,7 +115,7 @@ static imgtoolerr_t vzdos_get_data_start(imgtool::image *img, int track, int sec
}
/* return the actual data of a sector */
-static imgtoolerr_t vzdos_read_sector_data(imgtool::image *img, int track, int sector, UINT8 *data)
+static imgtoolerr_t vzdos_read_sector_data(imgtool::image &img, int track, int sector, UINT8 *data)
{
int ret, data_start;
UINT8 buffer[DATA_SIZE + 4]; /* data + checksum */
@@ -136,7 +136,7 @@ static imgtoolerr_t vzdos_read_sector_data(imgtool::image *img, int track, int s
}
/* write data to sector */
-static imgtoolerr_t vzdos_write_sector_data(imgtool::image *img, int track, int sector, UINT8 *data)
+static imgtoolerr_t vzdos_write_sector_data(imgtool::image &img, int track, int sector, UINT8 *data)
{
int ret, data_start;
UINT8 buffer[DATA_SIZE + 4]; /* data + checksum */
@@ -154,7 +154,7 @@ static imgtoolerr_t vzdos_write_sector_data(imgtool::image *img, int track, int
}
/* write formatted empty sector */
-static imgtoolerr_t vzdos_clear_sector(imgtool::image *img, int track, int sector)
+static imgtoolerr_t vzdos_clear_sector(imgtool::image &img, int track, int sector)
{
UINT8 data[DATA_SIZE + 2];
@@ -164,7 +164,7 @@ static imgtoolerr_t vzdos_clear_sector(imgtool::image *img, int track, int secto
}
/* return a directory entry for an index */
-static imgtoolerr_t vzdos_get_dirent(imgtool::image *img, int index, vzdos_dirent *ent)
+static imgtoolerr_t vzdos_get_dirent(imgtool::image &img, int index, vzdos_dirent *ent)
{
int ret, entry;
UINT8 buffer[DATA_SIZE + 2];
@@ -194,7 +194,7 @@ static imgtoolerr_t vzdos_get_dirent(imgtool::image *img, int index, vzdos_diren
}
/* save a directory entry to disk */
-static imgtoolerr_t vzdos_set_dirent(imgtool::image *img, int index, vzdos_dirent ent)
+static imgtoolerr_t vzdos_set_dirent(imgtool::image &img, int index, vzdos_dirent ent)
{
int ret, entry;
UINT8 buffer[DATA_SIZE + 2];
@@ -219,7 +219,7 @@ static imgtoolerr_t vzdos_set_dirent(imgtool::image *img, int index, vzdos_diren
}
/* clear a directory entry */
-static imgtoolerr_t vzdos_clear_dirent(imgtool::image *img, int index)
+static imgtoolerr_t vzdos_clear_dirent(imgtool::image &img, int index)
{
int ret;
vzdos_dirent entry;
@@ -233,7 +233,7 @@ static imgtoolerr_t vzdos_clear_dirent(imgtool::image *img, int index)
}
/* search the index for a directory entry */
-static imgtoolerr_t vzdos_searchentry(imgtool::image *image, const char *fname, int *entry) {
+static imgtoolerr_t vzdos_searchentry(imgtool::image &image, const char *fname, int *entry) {
int i, len, ret;
vzdos_dirent ent;
char filename[9];
@@ -272,7 +272,7 @@ static imgtoolerr_t vzdos_searchentry(imgtool::image *image, const char *fname,
}
/* return a directory entry for a filename */
-static imgtoolerr_t vzdos_get_dirent_fname(imgtool::image *img, const char *fname, vzdos_dirent *ent)
+static imgtoolerr_t vzdos_get_dirent_fname(imgtool::image &img, const char *fname, vzdos_dirent *ent)
{
int ret, index;
@@ -285,7 +285,7 @@ static imgtoolerr_t vzdos_get_dirent_fname(imgtool::image *img, const char *fnam
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_toggle_trackmap(imgtool::image *img, int track, int sector, int clear)
+static imgtoolerr_t vzdos_toggle_trackmap(imgtool::image &img, int track, int sector, int clear)
{
int ret, value, bit;
UINT8 buffer[DATA_SIZE + 2];
@@ -309,19 +309,19 @@ static imgtoolerr_t vzdos_toggle_trackmap(imgtool::image *img, int track, int se
}
/* clear a trackmap entry */
-static imgtoolerr_t vzdos_clear_trackmap(imgtool::image *img, int track, int sector)
+static imgtoolerr_t vzdos_clear_trackmap(imgtool::image &img, int track, int sector)
{
return vzdos_toggle_trackmap(img, track, sector, 1);
}
/* enable a trackmap entry */
-static imgtoolerr_t vzdos_set_trackmap(imgtool::image *img, int track, int sector)
+static imgtoolerr_t vzdos_set_trackmap(imgtool::image &img, int track, int sector)
{
return vzdos_toggle_trackmap(img, track, sector, 0);
}
/* return the status of a trackmap entry */
-static imgtoolerr_t vzdos_get_trackmap(imgtool::image *img, int track, int sector, int *used)
+static imgtoolerr_t vzdos_get_trackmap(imgtool::image &img, int track, int sector, int *used)
{
int ret, value, bit;
UINT8 buffer[DATA_SIZE + 2];
@@ -342,7 +342,7 @@ static imgtoolerr_t vzdos_get_trackmap(imgtool::image *img, int track, int secto
}
/* return the next free sector */
-static imgtoolerr_t vzdos_free_trackmap(imgtool::image *img, int *track, int *sector)
+static imgtoolerr_t vzdos_free_trackmap(imgtool::image &img, int *track, int *sector)
{
int ret, used = 0;
@@ -357,7 +357,7 @@ static imgtoolerr_t vzdos_free_trackmap(imgtool::image *img, int *track, int *se
return IMGTOOLERR_NOSPACE;
}
-static imgtoolerr_t vzdos_write_formatted_sector(imgtool::image *img, int track, int sector)
+static imgtoolerr_t vzdos_write_formatted_sector(imgtool::image &img, int track, int sector)
{
int ret;
UINT8 sector_data[DATA_SIZE + 4 + 24];
@@ -385,11 +385,11 @@ static imgtoolerr_t vzdos_write_formatted_sector(imgtool::image *img, int track,
Imgtool module code
*********************************************************************/
-static imgtoolerr_t vzdos_diskimage_beginenum(imgtool::directory *enumeration, const char *path)
+static imgtoolerr_t vzdos_diskimage_beginenum(imgtool::directory &enumeration, const char *path)
{
vz_iterator *iter;
- iter = (vz_iterator *) enumeration->extra_bytes();
+ iter = (vz_iterator *) enumeration.extra_bytes();
if (!iter) return IMGTOOLERR_OUTOFMEMORY;
iter->index = 1;
@@ -398,29 +398,29 @@ static imgtoolerr_t vzdos_diskimage_beginenum(imgtool::directory *enumeration, c
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_diskimage_nextenum(imgtool::directory *enumeration, imgtool_dirent *ent)
+static imgtoolerr_t vzdos_diskimage_nextenum(imgtool::directory &enumeration, imgtool_dirent &ent)
{
- vz_iterator *iter = (vz_iterator *) enumeration->extra_bytes();
+ vz_iterator *iter = (vz_iterator *) enumeration.extra_bytes();
if (iter->eof == 1 || iter->index > MAX_DIRENTS) {
- ent->eof = 1;
+ ent.eof = 1;
} else {
const char *type;
int ret, len;
vzdos_dirent dirent;
- ret = vzdos_get_dirent(&enumeration->image(), iter->index - 1, &dirent);
+ ret = vzdos_get_dirent(enumeration.image(), iter->index - 1, &dirent);
if (ret == IMGTOOLERR_FILENOTFOUND)
{
iter->eof = 1;
- ent->eof = 1;
+ ent.eof = 1;
return IMGTOOLERR_SUCCESS;
}
if (ret == IMGTOOLERR_CORRUPTFILE)
- ent->corrupt = 1;
+ ent.corrupt = 1;
/* kill trailing spaces */
for (len = 7; len > 0; len--) {
@@ -429,8 +429,8 @@ static imgtoolerr_t vzdos_diskimage_nextenum(imgtool::directory *enumeration, im
}
}
- memcpy(ent->filename, &dirent.fname, len + 1);
- ent->filesize = dirent.end_address - dirent.start_address;
+ memcpy(ent.filename, &dirent.fname, len + 1);
+ ent.filesize = dirent.end_address - dirent.start_address;
switch (dirent.ftype)
{
@@ -445,7 +445,7 @@ static imgtoolerr_t vzdos_diskimage_nextenum(imgtool::directory *enumeration, im
default: type = "Unknown";
}
- snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%s", type);
+ snprintf(ent.attr, ARRAY_LENGTH(ent.attr), "%s", type);
iter->index++;
}
@@ -455,11 +455,11 @@ static imgtoolerr_t vzdos_diskimage_nextenum(imgtool::directory *enumeration, im
/* TRK 0 sector 15 is used to hold the track map of the disk with one bit
corresponding to a sector used. */
-static imgtoolerr_t vzdos_diskimage_freespace(imgtool::partition *partition, UINT64 *size)
+static imgtoolerr_t vzdos_diskimage_freespace(imgtool::partition &partition, UINT64 *size)
{
imgtoolerr_t ret;
int i;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
UINT8 c, v, buffer[DATA_SIZE + 2];
*size = 0;
@@ -478,10 +478,10 @@ static imgtoolerr_t vzdos_diskimage_freespace(imgtool::partition *partition, UIN
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_diskimage_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t vzdos_diskimage_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t ret;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
int filesize, track, sector;
vzdos_dirent ent;
UINT8 buffer[DATA_SIZE + 2];
@@ -514,7 +514,7 @@ static imgtoolerr_t vzdos_diskimage_readfile(imgtool::partition *partition, cons
/* write either DATA_SIZE or the remaining bytes */
towrite = filesize > DATA_SIZE ? DATA_SIZE : filesize;
- if (stream_write(destf, buffer, towrite) != towrite)
+ if (destf.write(buffer, towrite) != towrite)
return IMGTOOLERR_WRITEERROR;
filesize -= DATA_SIZE;
@@ -524,10 +524,10 @@ static imgtoolerr_t vzdos_diskimage_readfile(imgtool::partition *partition, cons
}
/* deletes directory entry, clears trackmap entries and sectors */
-static imgtoolerr_t vzdos_diskimage_deletefile(imgtool::partition *partition, const char *fname)
+static imgtoolerr_t vzdos_diskimage_deletefile(imgtool::partition &partition, const char *fname)
{
imgtoolerr_t ret;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
int index, filesize, track, sector, next_track, next_sector;
vzdos_dirent entry, next_entry;
UINT8 buffer[DATA_SIZE + 2];
@@ -602,10 +602,10 @@ static imgtoolerr_t vzdos_diskimage_deletefile(imgtool::partition *partition, co
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_writefile(imgtool::partition *partition, int offset, imgtool_stream *sourcef, vzdos_dirent *entry)
+static imgtoolerr_t vzdos_writefile(imgtool::partition &partition, int offset, imgtool::stream &sourcef, vzdos_dirent *entry)
{
imgtoolerr_t ret;
- imgtool::image *img = &partition->image();
+ imgtool::image &img(partition.image());
int index, track, sector, toread, next_track, next_sector;
vzdos_dirent temp_entry;
UINT64 filesize = 0, freespace = 0;
@@ -629,11 +629,11 @@ static imgtoolerr_t vzdos_writefile(imgtool::partition *partition, int offset, i
return ret;
}
- ret = (imgtoolerr_t)stream_seek(sourcef, offset, SEEK_SET);
+ ret = (imgtoolerr_t) sourcef.seek(offset, SEEK_SET);
if (ret) return ret;
/* check if there is enough space */
- filesize = stream_size(sourcef) - offset;
+ filesize = sourcef.size() - offset;
ret = vzdos_diskimage_freespace(partition, &freespace);
if (ret) return ret;
@@ -668,7 +668,7 @@ static imgtoolerr_t vzdos_writefile(imgtool::partition *partition, int offset, i
/* write data to disk */
while (filesize > 0) {
toread = filesize > DATA_SIZE ? DATA_SIZE : filesize;
- stream_read(sourcef, buffer, toread);
+ sourcef.read(buffer, toread);
filesize -= toread;
@@ -700,7 +700,7 @@ static imgtoolerr_t vzdos_writefile(imgtool::partition *partition, int offset, i
}
/* create a new file or overwrite a file */
-static imgtoolerr_t vzdos_diskimage_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t vzdos_diskimage_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t ret;
int ftype;
@@ -741,10 +741,10 @@ static imgtoolerr_t vzdos_diskimage_writefile(imgtool::partition *partition, con
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_diskimage_suggesttransfer(imgtool::partition *partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
+static imgtoolerr_t vzdos_diskimage_suggesttransfer(imgtool::partition &partition, const char *fname, imgtool_transfer_suggestion *suggestions, size_t suggestions_length)
{
imgtoolerr_t ret;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
vzdos_dirent entry;
if (fname) {
@@ -789,7 +789,7 @@ static imgtoolerr_t vzdos_diskimage_suggesttransfer(imgtool::partition *partitio
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzdos_diskimage_create(imgtool::image *img, imgtool_stream *stream, util::option_resolution *opts)
+static imgtoolerr_t vzdos_diskimage_create(imgtool::image &img, imgtool::stream::ptr &&dummy, util::option_resolution *opts)
{
imgtoolerr_t ret;
int track, sector;
@@ -808,10 +808,10 @@ static imgtoolerr_t vzdos_diskimage_create(imgtool::image *img, imgtool_stream *
Imgtool vz filter code
*********************************************************************/
-static imgtoolerr_t vzsnapshot_readfile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *destf)
+static imgtoolerr_t vzsnapshot_readfile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &destf)
{
imgtoolerr_t ret;
- imgtool::image *image = &partition->image();
+ imgtool::image &image(partition.image());
vzdos_dirent entry;
UINT8 header[24];
@@ -843,7 +843,7 @@ static imgtoolerr_t vzsnapshot_readfile(imgtool::partition *partition, const cha
place_integer_le(header, 22, 2, entry.start_address);
/* write header to file */
- stream_write(destf, header, sizeof(header));
+ destf.write(header, sizeof(header));
/* write data to file */
ret = vzdos_diskimage_readfile(partition, filename, "", destf);
@@ -852,7 +852,7 @@ static imgtoolerr_t vzsnapshot_readfile(imgtool::partition *partition, const cha
return IMGTOOLERR_SUCCESS;
}
-static imgtoolerr_t vzsnapshot_writefile(imgtool::partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, util::option_resolution *opts)
+static imgtoolerr_t vzsnapshot_writefile(imgtool::partition &partition, const char *filename, const char *fork, imgtool::stream &sourcef, util::option_resolution *opts)
{
imgtoolerr_t ret;
int fnameopt;
@@ -860,7 +860,7 @@ static imgtoolerr_t vzsnapshot_writefile(imgtool::partition *partition, const ch
UINT8 header[24];
/* get header infos from file */
- stream_read(sourcef, header, sizeof(header));
+ sourcef.read(header, sizeof(header));
/* prepare directory entry */
entry.ftype = header[21] == 0xF1 ? 'B' : 'T';
diff --git a/src/tools/imgtool/stream.cpp b/src/tools/imgtool/stream.cpp
index 4462164eb01..e32a6a3b082 100644
--- a/src/tools/imgtool/stream.cpp
+++ b/src/tools/imgtool/stream.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Nathan Woods
/***************************************************************************
- stream.c
+ stream.cpp
Code for implementing Imgtool streams
@@ -16,80 +16,87 @@
#include "osdcore.h"
#include "imgtool.h"
-enum imgtype_t
+
+//-------------------------------------------------
+// ctor
+//-------------------------------------------------
+
+imgtool::stream::stream(bool wp)
+ : imgtype(IMG_FILE)
+ , write_protect(wp)
+ , name(nullptr)
+ , position(0)
+ , filesize(0)
+ , file()
+ , buffer(nullptr)
{
- IMG_FILE,
- IMG_MEM
-};
+}
+
+
+//-------------------------------------------------
+// ctor
+//-------------------------------------------------
-struct imgtool_stream
+imgtool::stream::stream(bool wp, util::core_file::ptr &&f)
+ : imgtype(IMG_FILE)
+ , write_protect(wp)
+ , name(nullptr)
+ , position(0)
+ , filesize(f->size())
+ , file(std::move(f))
+ , buffer(nullptr)
{
- typedef std::unique_ptr<imgtool_stream> ptr;
-
- imgtool_stream(bool wp)
- : imgtype(IMG_FILE)
- , write_protect(wp)
- , name(nullptr)
- , position(0)
- , filesize(0)
- , file()
- , buffer(nullptr)
- {
- }
+}
- imgtool_stream(
- bool wp,
- util::core_file::ptr &&f)
- : imgtype(IMG_FILE)
- , write_protect(wp)
- , name(nullptr)
- , position(0)
- , filesize(f->size())
- , file(std::move(f))
- , buffer(nullptr)
- {
- }
- imgtool_stream(bool wp, std::size_t size)
- : imgtype(IMG_MEM)
- , write_protect(wp)
- , name(nullptr)
- , position(0)
- , filesize(size)
- , file()
- , buffer(reinterpret_cast<std::uint8_t *>(malloc(size)))
- {
- }
+//-------------------------------------------------
+// ctor
+//-------------------------------------------------
- imgtool_stream(bool wp, std::size_t size, void *buf)
- : imgtype(IMG_MEM)
- , write_protect(wp)
- , name(nullptr)
- , position(0)
- , filesize(size)
- , file()
- , buffer(reinterpret_cast<std::uint8_t *>(buf))
- {
- }
+imgtool::stream::stream(bool wp, std::size_t size)
+ : imgtype(IMG_MEM)
+ , write_protect(wp)
+ , name(nullptr)
+ , position(0)
+ , filesize(size)
+ , file()
+ , buffer(reinterpret_cast<std::uint8_t *>(malloc(size)))
+{
+}
- ~imgtool_stream()
- {
- free(buffer);
- }
- imgtype_t imgtype;
- bool write_protect;
- const char *name; // needed for clear
- std::uint64_t position;
- std::uint64_t filesize;
+//-------------------------------------------------
+// ctor
+//-------------------------------------------------
+
+imgtool::stream::stream(bool wp, std::size_t size, void *buf)
+ : imgtype(IMG_MEM)
+ , write_protect(wp)
+ , name(nullptr)
+ , position(0)
+ , filesize(size)
+ , file()
+ , buffer(reinterpret_cast<std::uint8_t *>(buf))
+{
+}
+
- util::core_file::ptr file;
- std::uint8_t *buffer;
-};
+//-------------------------------------------------
+// dtor
+//-------------------------------------------------
+
+imgtool::stream::~stream()
+{
+ if (buffer)
+ free(buffer);
+}
+//-------------------------------------------------
+// open_zip
+//-------------------------------------------------
-static imgtool_stream *stream_open_zip(const char *zipname, const char *subname, int read_or_write)
+imgtool::stream *imgtool::stream::open_zip(const char *zipname, const char *subname, int read_or_write)
{
if (read_or_write)
return nullptr;
@@ -100,7 +107,7 @@ static imgtool_stream *stream_open_zip(const char *zipname, const char *subname,
return nullptr;
fclose(f);
- imgtool_stream::ptr imgfile(new imgtool_stream(true));
+ imgtool::stream::ptr imgfile(new imgtool::stream(true));
imgfile->imgtype = IMG_MEM;
@@ -128,7 +135,11 @@ static imgtool_stream *stream_open_zip(const char *zipname, const char *subname,
-imgtool_stream *stream_open(const char *fname, int read_or_write)
+//-------------------------------------------------
+// open
+//-------------------------------------------------
+
+imgtool::stream *imgtool::stream::open(const char *fname, int read_or_write)
{
static const UINT32 write_modes[] =
{
@@ -137,13 +148,13 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
OPEN_FLAG_READ | OPEN_FLAG_WRITE,
OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE
};
- imgtool_stream *s = nullptr;
+ imgtool::stream *s = nullptr;
char c;
/* maybe we are just a ZIP? */
const char *ext = strrchr(fname, '.');
if (ext && !core_stricmp(ext, ".zip"))
- return stream_open_zip(fname, nullptr, read_or_write);
+ return open_zip(fname, nullptr, read_or_write);
util::core_file::ptr f = nullptr;
auto const filerr = util::core_file::open(fname, write_modes[read_or_write], f);
@@ -163,7 +174,7 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
{
c = buf[i];
buf[i] = '\0';
- s = stream_open_zip(&buf[0], &buf[i + 1], read_or_write);
+ s = open_zip(&buf[0], &buf[i + 1], read_or_write);
buf[i] = c;
}
}
@@ -176,7 +187,7 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
return nullptr;
}
- imgtool_stream::ptr imgfile(new imgtool_stream(read_or_write ? false : true, std::move(f)));
+ imgtool::stream::ptr imgfile(new imgtool::stream(read_or_write ? false : true, std::move(f)));
/* Normal file */
imgfile->name = fname;
@@ -184,10 +195,13 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
}
+//-------------------------------------------------
+// open_write_stream
+//-------------------------------------------------
-imgtool_stream *stream_open_write_stream(int size)
+imgtool::stream *imgtool::stream::open_write_stream(int size)
{
- imgtool_stream::ptr imgfile(new imgtool_stream(false, size));
+ imgtool::stream::ptr imgfile(new imgtool::stream(false, size));
if (!imgfile->buffer)
return nullptr;
@@ -195,50 +209,50 @@ imgtool_stream *stream_open_write_stream(int size)
}
+//-------------------------------------------------
+// open_mem
+//-------------------------------------------------
-imgtool_stream *stream_open_mem(void *buf, size_t sz)
+imgtool::stream *imgtool::stream::open_mem(void *buf, size_t sz)
{
- imgtool_stream::ptr imgfile(new imgtool_stream(false, sz, buf));
+ imgtool::stream::ptr imgfile(new imgtool::stream(false, sz, buf));
return imgfile.release();
}
+//-------------------------------------------------
+// core_file
+//-------------------------------------------------
-void stream_close(imgtool_stream *s)
+util::core_file *imgtool::stream::core_file()
{
- assert(s != nullptr);
-
- delete s;
+ return (imgtype == IMG_FILE) ? file.get() : nullptr;
}
+//-------------------------------------------------
+// read
+//-------------------------------------------------
-util::core_file *stream_core_file(imgtool_stream *stream)
-{
- return (stream->imgtype == IMG_FILE) ? stream->file.get() : nullptr;
-}
-
-
-
-UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz)
+UINT32 imgtool::stream::read(void *buf, UINT32 sz)
{
UINT32 result = 0;
- switch(stream->imgtype)
+ switch(imgtype)
{
case IMG_FILE:
assert(sz == (UINT32) sz);
- stream->file->seek(stream->position, SEEK_SET);
- result = stream->file->read(buf, (UINT32) sz);
+ file->seek(position, SEEK_SET);
+ result = file->read(buf, (UINT32) sz);
break;
case IMG_MEM:
/* do we have to limit sz? */
- if (sz > (stream->filesize - stream->position))
- sz = (UINT32) (stream->filesize - stream->position);
+ if (sz > (filesize - position))
+ sz = (UINT32) (filesize - position);
- memcpy(buf, stream->buffer + stream->position, sz);
+ memcpy(buf, buffer + position, sz);
result = sz;
break;
@@ -246,46 +260,49 @@ UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz)
assert(0);
break;
}
- stream->position += result;
+ position += result;
return result;
}
+//-------------------------------------------------
+// write
+//-------------------------------------------------
-UINT32 stream_write(imgtool_stream *s, const void *buf, UINT32 sz)
+UINT32 imgtool::stream::write(const void *buf, UINT32 sz)
{
void *new_buffer;
UINT32 result = 0;
- switch(s->imgtype)
+ switch(imgtype)
{
case IMG_MEM:
- if (!s->write_protect)
+ if (!write_protect)
{
/* do we have to expand the buffer? */
- if (s->filesize < s->position + sz)
+ if (filesize < position + sz)
{
/* try to expand the buffer */
- new_buffer = realloc(s->buffer , s->position + sz);
+ new_buffer = realloc(buffer , position + sz);
if (new_buffer)
{
- s->buffer = (UINT8*)new_buffer;
- s->filesize = s->position + sz;
+ buffer = (UINT8*)new_buffer;
+ filesize = position + sz;
}
}
/* do we have to limit sz? */
- if (sz > (s->filesize - s->position))
- sz = (UINT32) (s->filesize - s->position);
+ if (sz > (filesize - position))
+ sz = (UINT32) (filesize - position);
- memcpy(s->buffer + s->position, buf, sz);
+ memcpy(buffer + position, buf, sz);
result = sz;
}
break;
case IMG_FILE:
- s->file->seek(s->position, SEEK_SET);
- result = s->file->write(buf, sz);
+ file->seek(position, SEEK_SET);
+ result = file->write(buf, sz);
break;
default:
@@ -294,31 +311,37 @@ UINT32 stream_write(imgtool_stream *s, const void *buf, UINT32 sz)
}
/* advance the file pointer */
- s->position += result;
+ position += result;
/* did we grow the file */
- if (s->position > s->filesize)
- s->filesize = s->position;
+ if (position > filesize)
+ filesize = position;
return result;
}
+//-------------------------------------------------
+// size
+//-------------------------------------------------
-UINT64 stream_size(imgtool_stream *s)
+UINT64 imgtool::stream::size() const
{
- return s->filesize;
+ return filesize;
}
+//-------------------------------------------------
+// getptr
+//-------------------------------------------------
-void *stream_getptr(imgtool_stream *f)
+void *imgtool::stream::getptr()
{
void *ptr;
- switch(f->imgtype)
+ switch(imgtype)
{
case IMG_MEM:
- ptr = f->buffer;
+ ptr = buffer;
break;
default:
@@ -329,52 +352,57 @@ void *stream_getptr(imgtool_stream *f)
}
+//-------------------------------------------------
+// seek
+//-------------------------------------------------
-int stream_seek(imgtool_stream *s, INT64 pos, int where)
+int imgtool::stream::seek(INT64 pos, int where)
{
- UINT64 size;
-
- size = stream_size(s);
-
switch(where)
{
case SEEK_CUR:
- pos += s->position;
+ pos += position;
break;
case SEEK_END:
- pos += size;
+ pos += size();
break;
}
if (pos < 0)
- s->position = 0;
+ position = 0;
else
- s->position = std::min(size, UINT64(pos));
+ position = std::min(size(), UINT64(pos));
- if (s->position < pos)
- stream_fill(s, '\0', pos - s->position);
+ if (position < pos)
+ fill('\0', pos - position);
return 0;
}
+//-------------------------------------------------
+// tell
+//-------------------------------------------------
-UINT64 stream_tell(imgtool_stream *s)
+UINT64 imgtool::stream::tell()
{
- return s->position;
+ return position;
}
+//-------------------------------------------------
+// transfer
+//-------------------------------------------------
-UINT64 stream_transfer(imgtool_stream *dest, imgtool_stream *source, UINT64 sz)
+UINT64 imgtool::stream::transfer(imgtool::stream &dest, imgtool::stream &source, UINT64 sz)
{
UINT64 result = 0;
UINT64 readsz;
char buf[1024];
- while(sz && (readsz = stream_read(source, buf, std::min(sz, UINT64(sizeof(buf))))))
+ while(sz && (readsz = source.read(buf, std::min(sz, UINT64(sizeof(buf))))))
{
- stream_write(dest, buf, readsz);
+ dest.write(buf, readsz);
sz -= readsz;
result += readsz;
}
@@ -382,32 +410,38 @@ UINT64 stream_transfer(imgtool_stream *dest, imgtool_stream *source, UINT64 sz)
}
+//-------------------------------------------------
+// transfer_all
+//-------------------------------------------------
-UINT64 stream_transfer_all(imgtool_stream *dest, imgtool_stream *source)
+UINT64 imgtool::stream::transfer_all(imgtool::stream &dest, imgtool::stream &source)
{
- return stream_transfer(dest, source, stream_size(source));
+ return transfer(dest, source, source.size());
}
+//-------------------------------------------------
+// crc
+//-------------------------------------------------
-int stream_crc(imgtool_stream *s, unsigned long *result)
+int imgtool::stream::crc(unsigned long *result)
{
size_t sz;
void *ptr;
- switch(s->imgtype)
+ switch(imgtype)
{
case IMG_MEM:
- *result = crc32(0, (unsigned char *) s->buffer, (size_t) s->filesize);
+ *result = crc32(0, (unsigned char *) buffer, (size_t) filesize);
break;
default:
- sz = stream_size(s);
+ sz = size();
ptr = malloc(sz);
if (!ptr)
return IMGTOOLERR_OUTOFMEMORY;
- stream_seek(s, 0, SEEK_SET);
- if (stream_read(s, ptr, sz) != sz)
+ seek(0, SEEK_SET);
+ if (read(ptr, sz) != sz)
{
free(ptr);
return IMGTOOLERR_READERROR;
@@ -420,24 +454,30 @@ int stream_crc(imgtool_stream *s, unsigned long *result)
}
+//-------------------------------------------------
+// file_crc
+//-------------------------------------------------
-int file_crc(const char *fname, unsigned long *result)
+int imgtool::stream::file_crc(const char *fname, unsigned long *result)
{
int err;
- imgtool_stream *f;
+ imgtool::stream *f;
- f = stream_open(fname, OSD_FOPEN_READ);
+ f = imgtool::stream::open(fname, OSD_FOPEN_READ);
if (!f)
return IMGTOOLERR_FILENOTFOUND;
- err = stream_crc(f, result);
- stream_close(f);
+ err = f->crc(result);
+ delete f;
return err;
}
+//-------------------------------------------------
+// fill
+//-------------------------------------------------
-UINT64 stream_fill(imgtool_stream *f, unsigned char b, UINT64 sz)
+UINT64 imgtool::stream::fill(unsigned char b, UINT64 sz)
{
UINT64 outsz;
char buf[1024];
@@ -447,36 +487,48 @@ UINT64 stream_fill(imgtool_stream *f, unsigned char b, UINT64 sz)
while (sz)
{
- outsz += stream_write(f, buf, (std::min<UINT64>)(sz, sizeof(buf)));
+ outsz += write(buf, (std::min<UINT64>)(sz, sizeof(buf)));
sz -= (std::min<UINT64>)(sz, sizeof(buf));
}
return outsz;
}
+//-------------------------------------------------
+// is_read_only
+//-------------------------------------------------
-int stream_isreadonly(imgtool_stream *s)
+int imgtool::stream::is_read_only()
{
- return s->write_protect;
+ return write_protect;
}
+//-------------------------------------------------
+// putc
+//-------------------------------------------------
-UINT32 stream_putc(imgtool_stream *stream, char c)
+UINT32 imgtool::stream::putc(char c)
{
- return stream_write(stream, &c, 1);
+ return write(&c, 1);
}
+//-------------------------------------------------
+// puts
+//-------------------------------------------------
-UINT32 stream_puts(imgtool_stream *stream, const char *s)
+UINT32 imgtool::stream::puts(const char *s)
{
- return stream_write(stream, s, strlen(s));
+ return write(s, strlen(s));
}
+//-------------------------------------------------
+// printf
+//-------------------------------------------------
-UINT32 stream_printf(imgtool_stream *stream, const char *fmt, ...)
+UINT32 imgtool::stream::printf(const char *fmt, ...)
{
va_list va;
char buf[256];
@@ -485,5 +537,5 @@ UINT32 stream_printf(imgtool_stream *stream, const char *fmt, ...)
vsprintf(buf, fmt, va);
va_end(va);
- return stream_puts(stream, buf);
+ return puts(buf);
}
diff --git a/src/tools/imgtool/stream.h b/src/tools/imgtool/stream.h
index ee362c9c32b..915f5dabb0b 100644
--- a/src/tools/imgtool/stream.h
+++ b/src/tools/imgtool/stream.h
@@ -14,35 +14,71 @@
#include "imgterrs.h"
#include "corefile.h"
-struct imgtool_stream;
-
-imgtool_stream *stream_open(const char *fname, int read_or_write); /* similar params to mame_fopen */
-imgtool_stream *stream_open_write_stream(int filesize);
-imgtool_stream *stream_open_mem(void *buf, size_t sz);
-void stream_close(imgtool_stream *stream);
-util::core_file *stream_core_file(imgtool_stream *stream);
-UINT32 stream_read(imgtool_stream *stream, void *buf, UINT32 sz);
-UINT32 stream_write(imgtool_stream *stream, const void *buf, UINT32 sz);
-UINT64 stream_size(imgtool_stream *stream);
-int stream_seek(imgtool_stream *stream, INT64 pos, int where);
-UINT64 stream_tell(imgtool_stream *stream);
-void *stream_getptr(imgtool_stream *stream);
-UINT32 stream_putc(imgtool_stream *stream, char c);
-UINT32 stream_puts(imgtool_stream *stream, const char *s);
-UINT32 stream_printf(imgtool_stream *stream, const char *fmt, ...) ATTR_PRINTF(2,3);
-
-/* Transfers sz bytes from source to dest */
-UINT64 stream_transfer(imgtool_stream *dest, imgtool_stream *source, UINT64 sz);
-UINT64 stream_transfer_all(imgtool_stream *dest, imgtool_stream *source);
-
-/* Fills sz bytes with b */
-UINT64 stream_fill(imgtool_stream *f, unsigned char b, UINT64 sz);
-
-/* Returns the CRC of a file */
-int stream_crc(imgtool_stream *f, unsigned long *result);
-int file_crc(const char *fname, unsigned long *result);
-
-/* Returns whether a stream is read only or not */
-int stream_isreadonly(imgtool_stream *f);
+namespace imgtool
+{
+ class stream
+ {
+ public:
+ typedef std::unique_ptr<stream> ptr;
+
+ ~stream();
+
+ static imgtool::stream *open(const char *fname, int read_or_write); /* similar params to mame_fopen */
+ static imgtool::stream *open_write_stream(int filesize);
+ static imgtool::stream *open_mem(void *buf, size_t sz);
+
+ util::core_file *core_file();
+ UINT32 read(void *buf, UINT32 sz);
+ UINT32 write(const void *buf, UINT32 sz);
+ UINT64 size() const;
+ int seek(INT64 pos, int where);
+ UINT64 tell();
+ void *getptr();
+ UINT32 putc(char c);
+ UINT32 puts(const char *s);
+ UINT32 printf(const char *fmt, ...) ATTR_PRINTF(2, 3);
+
+ // transfers sz bytes from source to dest
+ static UINT64 transfer(imgtool::stream &dest, imgtool::stream &source, UINT64 sz);
+ static UINT64 transfer_all(imgtool::stream &dest, imgtool::stream &source);
+
+ // fills sz bytes with b
+ UINT64 fill(unsigned char b, UINT64 sz);
+
+ // returns the CRC of a file
+ int crc(unsigned long *result);
+ static int file_crc(const char *fname, unsigned long *result);
+
+ // returns whether a stream is read only or not
+ int is_read_only();
+
+ private:
+ enum imgtype_t
+ {
+ IMG_FILE,
+ IMG_MEM
+ };
+
+ imgtype_t imgtype;
+ bool write_protect;
+ const char *name; // needed for clear
+ std::uint64_t position;
+ std::uint64_t filesize;
+
+ util::core_file::ptr file;
+ std::uint8_t *buffer;
+
+ // ctors
+ stream(bool wp);
+ stream(bool wp, util::core_file::ptr &&f);
+ stream(bool wp, std::size_t size);
+ stream(bool wp, std::size_t size, void *buf);
+
+ // private methods
+ static stream *open_zip(const char *zipname, const char *subname, int read_or_write);
+ };
+}
+
+
#endif /* STREAM_H */
diff --git a/src/tools/ldresample.cpp b/src/tools/ldresample.cpp
index 9cc4f264a44..812ad590e20 100644
--- a/src/tools/ldresample.cpp
+++ b/src/tools/ldresample.cpp
@@ -472,7 +472,7 @@ printf("%5d: start=%10d (%5d.%03d) end=%10d (%5d.%03d)\n",
read_chd(m_source, fieldnum, m_info, srcend - srcbegin);
// assemble the final frame
- dynamic_buffer buffer;
+ std::vector<UINT8> buffer;
INT16 *sampledata[2] = { &m_info.lsound[0], &m_info.rsound[0] };
avhuff_encoder::assemble_data(buffer, m_info.bitmap, m_info.channels, m_info.samples, sampledata);
memcpy(dest, &buffer[0], std::min(buffer.size(), size_t(datasize)));
diff --git a/src/tools/srcclean.cpp b/src/tools/srcclean.cpp
index 55ee72444fd..504392e7fa0 100644
--- a/src/tools/srcclean.cpp
+++ b/src/tools/srcclean.cpp
@@ -95,55 +95,55 @@ public:
virtual void summarise(std::ostream &os) const;
protected:
- static constexpr unicode_char HORIZONTAL_TAB = 0x0000'0009U;
- static constexpr unicode_char LINE_FEED = 0x0000'000aU;
- static constexpr unicode_char VERTICAL_TAB = 0x0000'000bU;
- static constexpr unicode_char SPACE = 0x0000'0020U;
- static constexpr unicode_char DOUBLE_QUOTE = 0x0000'0022U;
- static constexpr unicode_char SINGLE_QUOTE = 0x0000'0027U;
- static constexpr unicode_char HYPHEN_MINUS = 0x0000'002dU;
- static constexpr unicode_char QUESTION_MARK = 0x0000'003fU;
- static constexpr unicode_char BACKSLASH = 0x0000'005cU;
- static constexpr unicode_char BASIC_LATIN_LAST = 0x0000'007fU;
- static constexpr unicode_char CYRILLIC_SUPPLEMENT_LAST = 0x0000'052fU;
+ static constexpr char32_t HORIZONTAL_TAB = 0x0000'0009U;
+ static constexpr char32_t LINE_FEED = 0x0000'000aU;
+ static constexpr char32_t VERTICAL_TAB = 0x0000'000bU;
+ static constexpr char32_t SPACE = 0x0000'0020U;
+ static constexpr char32_t DOUBLE_QUOTE = 0x0000'0022U;
+ static constexpr char32_t SINGLE_QUOTE = 0x0000'0027U;
+ static constexpr char32_t HYPHEN_MINUS = 0x0000'002dU;
+ static constexpr char32_t QUESTION_MARK = 0x0000'003fU;
+ static constexpr char32_t BACKSLASH = 0x0000'005cU;
+ static constexpr char32_t BASIC_LATIN_LAST = 0x0000'007fU;
+ static constexpr char32_t CYRILLIC_SUPPLEMENT_LAST = 0x0000'052fU;
template <typename OutputIt>
cleaner_base(OutputIt &&output, newline newline_mode, unsigned tab_width);
- void output_character(unicode_char ch);
+ void output_character(char32_t ch);
void set_tab_limit();
void reset_tab_limit();
private:
- static constexpr unicode_char CARRIAGE_RETURN = 0x0000'000dU;
- static constexpr unicode_char HIGH_SURROGATE_FIRST = 0x0000'd800U;
- static constexpr unicode_char HIGH_SURROGATE_LAST = 0x0000'dbffU;
- static constexpr unicode_char LOW_SURROGATE_FIRST = 0x0000'dc00U;
- static constexpr unicode_char LOW_SURROGATE_LAST = 0x0000'dfffU;
- static constexpr unicode_char NONCHARACTER_FIRST = 0x0000'fdd0U;
- static constexpr unicode_char NONCHARACTER_LAST = 0x0000'fdefU;
- static constexpr unicode_char ZERO_WIDTH_NB_SPACE = 0x0000'feffU;
- static constexpr unicode_char REPLACEMENT_CHARACTER = 0x0000'fffdU;
- static constexpr unicode_char SUPPLEMENTARY_FIRST = 0x0001'0000U;
- static constexpr unicode_char SUPPLEMENTARY_LAST = 0x0010'ffffU;
-
- static constexpr unicode_char CODE_LENGTH_THRESHOLDS[6]{
+ static constexpr char32_t CARRIAGE_RETURN = 0x0000'000dU;
+ static constexpr char32_t HIGH_SURROGATE_FIRST = 0x0000'd800U;
+ static constexpr char32_t HIGH_SURROGATE_LAST = 0x0000'dbffU;
+ static constexpr char32_t LOW_SURROGATE_FIRST = 0x0000'dc00U;
+ static constexpr char32_t LOW_SURROGATE_LAST = 0x0000'dfffU;
+ static constexpr char32_t NONCHARACTER_FIRST = 0x0000'fdd0U;
+ static constexpr char32_t NONCHARACTER_LAST = 0x0000'fdefU;
+ static constexpr char32_t ZERO_WIDTH_NB_SPACE = 0x0000'feffU;
+ static constexpr char32_t REPLACEMENT_CHARACTER = 0x0000'fffdU;
+ static constexpr char32_t SUPPLEMENTARY_FIRST = 0x0001'0000U;
+ static constexpr char32_t SUPPLEMENTARY_LAST = 0x0010'ffffU;
+
+ static constexpr char32_t CODE_LENGTH_THRESHOLDS[6]{
0x0000'0000U, 0x0000'0080U, 0x0000'0800U, 0x0001'0000U, 0x0020'0000U, 0x0400'0000 };
typedef std::function<void (char)> output_function;
- virtual void process_characters(unicode_char const *begin, unicode_char const *end) = 0;
+ virtual void process_characters(char32_t const *begin, char32_t const *end) = 0;
virtual void input_complete() = 0;
void flush_whitespace();
- void output_utf8(unicode_char ch);
- void commit_character(unicode_char ch);
+ void output_utf8(char32_t ch);
+ void commit_character(char32_t ch);
void process_if_full();
void handle_lead_byte(std::uint8_t ch);
- void handle_codepoint(unicode_char cp);
+ void handle_codepoint(char32_t cp);
- static constexpr bool is_character(unicode_char ch)
+ static constexpr bool is_character(char32_t ch)
{
return
(ch <= SUPPLEMENTARY_LAST) &&
@@ -151,17 +151,17 @@ private:
((ch & 0x0000'fffeU) != 0x0000'fffeU);
}
- static constexpr bool is_high_surrogate(unicode_char ch)
+ static constexpr bool is_high_surrogate(char32_t ch)
{
return (ch >= HIGH_SURROGATE_FIRST) && (ch <= HIGH_SURROGATE_LAST);
}
- static constexpr bool is_low_surrogate(unicode_char ch)
+ static constexpr bool is_low_surrogate(char32_t ch)
{
return (ch >= LOW_SURROGATE_FIRST) && (ch <= LOW_SURROGATE_LAST);
}
- static constexpr unicode_char combine_surrogates(unicode_char high, unicode_char low)
+ static constexpr char32_t combine_surrogates(char32_t high, char32_t low)
{
return SUPPLEMENTARY_FIRST + (((high & 0x0000'03ffU) << 10U) | (low & 0x0000'03ffU));
}
@@ -175,16 +175,16 @@ private:
unsigned m_output_column = 0U;
unsigned m_indent;
unsigned m_tab_limit = std::numeric_limits<unsigned>::max();
- std::vector<unicode_char> m_whitespace;
+ std::vector<char32_t> m_whitespace;
// input state management
- unicode_char m_buffer[1024];
+ char32_t m_buffer[1024];
bool m_stream_start = true;
std::size_t m_position = 0U;
- unicode_char m_surrogate = 0U;
+ char32_t m_surrogate = 0U;
unsigned m_code_length = 0U;
unsigned m_required_bytes = 0U;
- unicode_char m_newline_lead = 0U;
+ char32_t m_newline_lead = 0U;
// statistics
std::uint64_t m_overlong = 0U;
@@ -207,7 +207,7 @@ private:
bool m_final_newline = false;
};
-constexpr unicode_char cleaner_base::CODE_LENGTH_THRESHOLDS[6];
+constexpr char32_t cleaner_base::CODE_LENGTH_THRESHOLDS[6];
/*--------------------------------------------------
@@ -226,7 +226,7 @@ void cleaner_base::process(InputIt begin, InputIt end)
if ((byte & 0xc0U) == 0x80U)
{
m_buffer[m_position] <<= 6U;
- m_buffer[m_position] |= unicode_char(byte & 0x3fU);
+ m_buffer[m_position] |= char32_t(byte & 0x3fU);
--m_required_bytes;
}
else
@@ -401,7 +401,7 @@ cleaner_base::cleaner_base(
normalisation and line ending translation
--------------------------------------------------*/
-void cleaner_base::output_character(unicode_char ch)
+void cleaner_base::output_character(char32_t ch)
{
switch (ch)
{
@@ -455,7 +455,7 @@ void cleaner_base::set_tab_limit()
if (!m_output_column)
{
unsigned limit(0U);
- for (unicode_char ch : m_whitespace)
+ for (char32_t ch : m_whitespace)
limit += (HORIZONTAL_TAB == ch) ? (m_tab_width - (limit % m_tab_width)) : 1U;
m_tab_limit = limit;
}
@@ -488,7 +488,7 @@ void cleaner_base::flush_whitespace()
bool const set_indent(!m_output_column);
bool expand(m_output_column);
unsigned space_count(0U);
- for (unicode_char space : m_whitespace)
+ for (char32_t space : m_whitespace)
{
assert(!expand || !space_count);
assert(space_count < m_tab_width);
@@ -562,7 +562,7 @@ void cleaner_base::flush_whitespace()
convert codepoint to UFF-8 and send to output
--------------------------------------------------*/
-void cleaner_base::output_utf8(unicode_char ch)
+void cleaner_base::output_utf8(char32_t ch)
{
if (0x0000'0080U > ch)
{
@@ -589,7 +589,7 @@ void cleaner_base::output_utf8(unicode_char ch)
replacing noncharacters
--------------------------------------------------*/
-void cleaner_base::commit_character(unicode_char ch)
+void cleaner_base::commit_character(char32_t ch)
{
assert(ARRAY_LENGTH(m_buffer) > m_position);
assert(1U <= m_code_length);
@@ -716,7 +716,7 @@ void cleaner_base::handle_lead_byte(std::uint8_t byte)
m_code_length = m_required_bytes + 1U;
if (m_required_bytes)
{
- m_buffer[m_position] = ((unicode_char(1U) << (6U - m_required_bytes)) - 1) & unicode_char(byte);
+ m_buffer[m_position] = ((char32_t(1U) << (6U - m_required_bytes)) - 1) & char32_t(byte);
}
else if ((byte & 0xc0U) == 0x80U)
{
@@ -741,7 +741,7 @@ void cleaner_base::handle_lead_byte(std::uint8_t byte)
surrogates
--------------------------------------------------*/
-void cleaner_base::handle_codepoint(unicode_char cp)
+void cleaner_base::handle_codepoint(char32_t cp)
{
if (m_surrogate)
{
@@ -790,7 +790,7 @@ public:
}
private:
- virtual void process_characters(unicode_char const *begin, unicode_char const *end) override
+ virtual void process_characters(char32_t const *begin, char32_t const *end) override
{
while (begin != end)
output_character(*begin++);
@@ -817,29 +817,29 @@ public:
virtual void summarise(std::ostream &os) const override;
protected:
- void output_character(unicode_char ch);
+ void output_character(char32_t ch);
private:
- static constexpr unicode_char ASTERISK = 0x0000'002aU;
- static constexpr unicode_char SLASH = 0x0000'002fU;
- static constexpr unicode_char UPPERCASE_FIRST = 0x0000'0041U;
- static constexpr unicode_char UPPERCASE_B = 0x0000'0042U;
- static constexpr unicode_char UPPERCASE_X = 0x0000'0058U;
- static constexpr unicode_char UPPERCASE_LAST = 0x0000'005aU;
- static constexpr unicode_char UNDERSCORE = 0x0000'005fU;
- static constexpr unicode_char LOWERCASE_FIRST = 0x0000'0061U;
- static constexpr unicode_char LOWERCASE_B = 0x0000'0062U;
- static constexpr unicode_char LOWERCASE_X = 0x0000'0078U;
- static constexpr unicode_char LOWERCASE_LAST = 0x0000'007aU;
-
- static constexpr unicode_char DIGIT_FIRST = 0x0000'0030U;
- static constexpr unicode_char DIGIT_BINARY_LAST = 0x0000'0031U;
- static constexpr unicode_char DIGIT_OCTAL_LAST = 0x0000'0037U;
- static constexpr unicode_char DIGIT_DECIMAL_LAST = 0x0000'0039U;
- static constexpr unicode_char DIGIT_HEX_UPPER_FIRST = 0x0000'0041U;
- static constexpr unicode_char DIGIT_HEX_UPPER_LAST = 0x0000'0046U;
- static constexpr unicode_char DIGIT_HEX_LOWER_FIRST = 0x0000'0061U;
- static constexpr unicode_char DIGIT_HEX_LOWER_LAST = 0x0000'0066U;
+ static constexpr char32_t ASTERISK = 0x0000'002aU;
+ static constexpr char32_t SLASH = 0x0000'002fU;
+ static constexpr char32_t UPPERCASE_FIRST = 0x0000'0041U;
+ static constexpr char32_t UPPERCASE_B = 0x0000'0042U;
+ static constexpr char32_t UPPERCASE_X = 0x0000'0058U;
+ static constexpr char32_t UPPERCASE_LAST = 0x0000'005aU;
+ static constexpr char32_t UNDERSCORE = 0x0000'005fU;
+ static constexpr char32_t LOWERCASE_FIRST = 0x0000'0061U;
+ static constexpr char32_t LOWERCASE_B = 0x0000'0062U;
+ static constexpr char32_t LOWERCASE_X = 0x0000'0078U;
+ static constexpr char32_t LOWERCASE_LAST = 0x0000'007aU;
+
+ static constexpr char32_t DIGIT_FIRST = 0x0000'0030U;
+ static constexpr char32_t DIGIT_BINARY_LAST = 0x0000'0031U;
+ static constexpr char32_t DIGIT_OCTAL_LAST = 0x0000'0037U;
+ static constexpr char32_t DIGIT_DECIMAL_LAST = 0x0000'0039U;
+ static constexpr char32_t DIGIT_HEX_UPPER_FIRST = 0x0000'0041U;
+ static constexpr char32_t DIGIT_HEX_UPPER_LAST = 0x0000'0046U;
+ static constexpr char32_t DIGIT_HEX_LOWER_FIRST = 0x0000'0061U;
+ static constexpr char32_t DIGIT_HEX_LOWER_LAST = 0x0000'0066U;
enum class parse_state
{
@@ -852,17 +852,17 @@ private:
NUMERIC_CONSTANT
};
- virtual void process_characters(unicode_char const *begin, unicode_char const *end) override;
+ virtual void process_characters(char32_t const *begin, char32_t const *end) override;
virtual void input_complete() override;
- void process_default(unicode_char ch);
- void process_comment(unicode_char ch);
- void process_line_comment(unicode_char ch);
- void process_token(unicode_char ch);
- void process_text(unicode_char ch);
- void process_numeric(unicode_char ch);
+ void process_default(char32_t ch);
+ void process_comment(char32_t ch);
+ void process_line_comment(char32_t ch);
+ void process_token(char32_t ch);
+ void process_text(char32_t ch);
+ void process_numeric(char32_t ch);
- bool tail_is(unicode_char ch) const
+ bool tail_is(char32_t ch) const
{
return !m_tail.empty() && (m_tail.front() == ch);
}
@@ -873,7 +873,7 @@ private:
m_tail.pop_front();
}
- void replace_tail(unicode_char ch)
+ void replace_tail(char32_t ch)
{
assert(!m_tail.empty());
*m_tail.begin() = ch;
@@ -881,12 +881,12 @@ private:
void flush_tail()
{
- for (unicode_char tail : m_tail)
+ for (char32_t tail : m_tail)
cleaner_base::output_character(tail);
m_tail.clear();
}
- static constexpr bool is_token_lead(unicode_char ch)
+ static constexpr bool is_token_lead(char32_t ch)
{
return
((UPPERCASE_FIRST <= ch) && (UPPERCASE_LAST >= ch)) ||
@@ -894,34 +894,34 @@ private:
(UNDERSCORE == ch);
}
- static constexpr bool is_token_continuation(unicode_char ch)
+ static constexpr bool is_token_continuation(char32_t ch)
{
return
is_token_lead(ch) ||
((DIGIT_FIRST <= ch) && (DIGIT_DECIMAL_LAST >= ch));
}
- static constexpr bool is_numeric_lead(unicode_char ch)
+ static constexpr bool is_numeric_lead(char32_t ch)
{
return (DIGIT_FIRST <= ch) && (DIGIT_DECIMAL_LAST >= ch);
}
- static constexpr bool is_binary_digit(unicode_char ch)
+ static constexpr bool is_binary_digit(char32_t ch)
{
return (DIGIT_FIRST <= ch) && (DIGIT_BINARY_LAST >= ch);
}
- static constexpr bool is_octal_digit(unicode_char ch)
+ static constexpr bool is_octal_digit(char32_t ch)
{
return (DIGIT_FIRST <= ch) && (DIGIT_OCTAL_LAST >= ch);
}
- static constexpr bool is_decimal_digit(unicode_char ch)
+ static constexpr bool is_decimal_digit(char32_t ch)
{
return (DIGIT_FIRST <= ch) && (DIGIT_DECIMAL_LAST >= ch);
}
- static constexpr bool is_hexadecimal_digit(unicode_char ch)
+ static constexpr bool is_hexadecimal_digit(char32_t ch)
{
return
((DIGIT_FIRST <= ch) && (DIGIT_DECIMAL_LAST >= ch)) ||
@@ -932,9 +932,9 @@ private:
parse_state m_parse_state;
std::uint64_t m_input_line;
bool m_escape;
- std::deque<unicode_char> m_tail;
+ std::deque<char32_t> m_tail;
std::uint64_t m_comment_line;
- unicode_char m_lead_digit;
+ char32_t m_lead_digit;
unsigned m_radix;
std::uint64_t m_tabs_escaped = 0U;
@@ -990,7 +990,7 @@ void cpp_cleaner::summarise(std::ostream &os) const
}
-void cpp_cleaner::output_character(unicode_char ch)
+void cpp_cleaner::output_character(char32_t ch)
{
switch (m_parse_state)
{
@@ -1032,11 +1032,11 @@ void cpp_cleaner::output_character(unicode_char ch)
}
-void cpp_cleaner::process_characters(unicode_char const *begin, unicode_char const *end)
+void cpp_cleaner::process_characters(char32_t const *begin, char32_t const *end)
{
while (begin != end)
{
- unicode_char const ch(*begin++);
+ char32_t const ch(*begin++);
switch (m_parse_state)
{
case parse_state::DEFAULT:
@@ -1083,7 +1083,7 @@ void cpp_cleaner::input_complete()
}
-void cpp_cleaner::process_default(unicode_char ch)
+void cpp_cleaner::process_default(char32_t ch)
{
switch (ch)
{
@@ -1123,7 +1123,7 @@ void cpp_cleaner::process_default(unicode_char ch)
}
-void cpp_cleaner::process_comment(unicode_char ch)
+void cpp_cleaner::process_comment(char32_t ch)
{
switch (ch)
{
@@ -1144,7 +1144,7 @@ void cpp_cleaner::process_comment(unicode_char ch)
}
-void cpp_cleaner::process_line_comment(unicode_char ch)
+void cpp_cleaner::process_line_comment(char32_t ch)
{
switch (ch)
{
@@ -1165,7 +1165,7 @@ void cpp_cleaner::process_line_comment(unicode_char ch)
}
-void cpp_cleaner::process_token(unicode_char ch)
+void cpp_cleaner::process_token(char32_t ch)
{
if (is_token_continuation(ch))
{
@@ -1179,7 +1179,7 @@ void cpp_cleaner::process_token(unicode_char ch)
}
-void cpp_cleaner::process_text(unicode_char ch)
+void cpp_cleaner::process_text(char32_t ch)
{
switch (ch)
{
@@ -1187,7 +1187,7 @@ void cpp_cleaner::process_text(unicode_char ch)
++m_tabs_escaped;
if (!m_escape)
output_character(BACKSLASH);
- output_character(unicode_char(std::uint8_t('t')));
+ output_character(char32_t(std::uint8_t('t')));
break;
case LINE_FEED:
if (parse_state::CHARACTER_CONSTANT == m_parse_state)
@@ -1210,7 +1210,7 @@ void cpp_cleaner::process_text(unicode_char ch)
++m_tabs_escaped;
if (!m_escape)
output_character(BACKSLASH);
- output_character(unicode_char(std::uint8_t('v')));
+ output_character(char32_t(std::uint8_t('v')));
break;
default:
output_character(ch);
@@ -1221,7 +1221,7 @@ void cpp_cleaner::process_text(unicode_char ch)
}
-void cpp_cleaner::process_numeric(unicode_char ch)
+void cpp_cleaner::process_numeric(char32_t ch)
{
if (!m_lead_digit)
{
@@ -1337,12 +1337,12 @@ public:
virtual void summarise(std::ostream &os) const override;
protected:
- void output_character(unicode_char ch);
+ void output_character(char32_t ch);
private:
- static constexpr unicode_char EQUALS = 0x0000'003dU;
- static constexpr unicode_char LEFT_BRACKET = 0x0000'005bU;
- static constexpr unicode_char RIGHT_BRACKET = 0x0000'005dU;
+ static constexpr char32_t EQUALS = 0x0000'003dU;
+ static constexpr char32_t LEFT_BRACKET = 0x0000'005bU;
+ static constexpr char32_t RIGHT_BRACKET = 0x0000'005dU;
enum class parse_state
{
@@ -1353,14 +1353,14 @@ private:
LONG_STRING_CONSTANT
};
- virtual void process_characters(unicode_char const *begin, unicode_char const *end) override;
+ virtual void process_characters(char32_t const *begin, char32_t const *end) override;
virtual void input_complete() override;
- void process_default(unicode_char ch);
- void process_short_comment(unicode_char ch);
- void process_long_comment(unicode_char ch);
- void process_string_constant(unicode_char ch);
- void process_long_string_constant(unicode_char ch);
+ void process_default(char32_t ch);
+ void process_short_comment(char32_t ch);
+ void process_long_comment(char32_t ch);
+ void process_string_constant(char32_t ch);
+ void process_long_string_constant(char32_t ch);
parse_state m_parse_state;
std::uint64_t m_input_line;
@@ -1369,7 +1369,7 @@ private:
std::uint32_t m_block_line;
int m_block_level;
bool m_comment_start;
- unicode_char m_string_quote;
+ char32_t m_string_quote;
std::uint64_t m_tabs_escaped = 0U;
std::uint64_t m_newlines_escaped = 0U;
@@ -1417,7 +1417,7 @@ void lua_cleaner::summarise(std::ostream &os) const
}
-void lua_cleaner::output_character(unicode_char ch)
+void lua_cleaner::output_character(char32_t ch)
{
switch (m_parse_state)
{
@@ -1445,11 +1445,11 @@ void lua_cleaner::output_character(unicode_char ch)
}
-void lua_cleaner::process_characters(unicode_char const *begin, unicode_char const *end)
+void lua_cleaner::process_characters(char32_t const *begin, char32_t const *end)
{
while (begin != end)
{
- unicode_char const ch(*begin++);
+ char32_t const ch(*begin++);
switch (m_parse_state)
{
case parse_state::DEFAULT:
@@ -1491,7 +1491,7 @@ void lua_cleaner::input_complete()
}
-void lua_cleaner::process_default(unicode_char ch)
+void lua_cleaner::process_default(char32_t ch)
{
switch (ch)
{
@@ -1534,7 +1534,7 @@ void lua_cleaner::process_default(unicode_char ch)
}
-void lua_cleaner::process_short_comment(unicode_char ch)
+void lua_cleaner::process_short_comment(char32_t ch)
{
if (0 <= m_long_bracket_level)
{
@@ -1565,7 +1565,7 @@ void lua_cleaner::process_short_comment(unicode_char ch)
}
-void lua_cleaner::process_long_comment(unicode_char ch)
+void lua_cleaner::process_long_comment(char32_t ch)
{
if (0 <= m_long_bracket_level)
{
@@ -1597,7 +1597,7 @@ void lua_cleaner::process_long_comment(unicode_char ch)
}
-void lua_cleaner::process_string_constant(unicode_char ch)
+void lua_cleaner::process_string_constant(char32_t ch)
{
switch (ch)
{
@@ -1605,13 +1605,13 @@ void lua_cleaner::process_string_constant(unicode_char ch)
++m_tabs_escaped;
if (!m_escape)
output_character(BACKSLASH);
- output_character(unicode_char(std::uint8_t('t')));
+ output_character(char32_t(std::uint8_t('t')));
break;
case LINE_FEED:
if (m_escape)
{
++m_newlines_escaped;
- output_character(unicode_char(std::uint8_t('n')));
+ output_character(char32_t(std::uint8_t('n')));
}
else
{
@@ -1622,7 +1622,7 @@ void lua_cleaner::process_string_constant(unicode_char ch)
++m_tabs_escaped;
if (!m_escape)
output_character(BACKSLASH);
- output_character(unicode_char(std::uint8_t('v')));
+ output_character(char32_t(std::uint8_t('v')));
break;
default:
output_character(ch);
@@ -1633,7 +1633,7 @@ void lua_cleaner::process_string_constant(unicode_char ch)
}
-void lua_cleaner::process_long_string_constant(unicode_char ch)
+void lua_cleaner::process_long_string_constant(char32_t ch)
{
// this works because they're both closed by a matching long bracket
process_long_comment(ch);
@@ -1652,9 +1652,9 @@ public:
xml_cleaner(OutputIt &&output, newline newline_mode, unsigned tab_width);
private:
- static constexpr unicode_char EXCLAMATION = 0x0000'0021U;
- static constexpr unicode_char LEFT_ANGLE_BRACKET = 0x0000'003cU;
- static constexpr unicode_char RIGHT_ANGLE_BRACKET = 0x0000'003eU;
+ static constexpr char32_t EXCLAMATION = 0x0000'0021U;
+ static constexpr char32_t LEFT_ANGLE_BRACKET = 0x0000'003cU;
+ static constexpr char32_t RIGHT_ANGLE_BRACKET = 0x0000'003eU;
enum class parse_state
{
@@ -1662,11 +1662,11 @@ private:
COMMENT
};
- virtual void process_characters(unicode_char const *begin, unicode_char const *end) override;
+ virtual void process_characters(char32_t const *begin, char32_t const *end) override;
virtual void input_complete() override;
- void process_default(unicode_char ch);
- void process_comment(unicode_char ch);
+ void process_default(char32_t ch);
+ void process_comment(char32_t ch);
parse_state m_parse_state;
std::uint64_t m_input_line;
@@ -1689,11 +1689,11 @@ xml_cleaner::xml_cleaner(
}
-void xml_cleaner::process_characters(unicode_char const *begin, unicode_char const *end)
+void xml_cleaner::process_characters(char32_t const *begin, char32_t const *end)
{
while (begin != end)
{
- unicode_char const ch(*begin++);
+ char32_t const ch(*begin++);
switch (m_parse_state)
{
case parse_state::DEFAULT:
@@ -1717,7 +1717,7 @@ void xml_cleaner::input_complete()
}
-void xml_cleaner::process_default(unicode_char ch)
+void xml_cleaner::process_default(char32_t ch)
{
assert(4U > m_escape);
@@ -1746,7 +1746,7 @@ void xml_cleaner::process_default(unicode_char ch)
}
-void xml_cleaner::process_comment(unicode_char ch)
+void xml_cleaner::process_comment(char32_t ch)
{
assert(3U > m_escape);