From 3b41606ca0c02056604a55a7b1f5165e80bc11fb Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 31 Dec 2010 21:42:55 +0000 Subject: [PATCH] running_device -> device_t They both already existed. No sense in having two names for the same object type. --- src/emu/cpu/alph8201/alph8201.c | 4 +- src/emu/cpu/am29000/am29000.c | 2 +- src/emu/cpu/apexc/apexc.c | 2 +- src/emu/cpu/arm/arm.c | 2 +- src/emu/cpu/arm7/arm7.c | 2 +- src/emu/cpu/arm7/arm7core.c | 2 +- src/emu/cpu/avr8/avr8.c | 2 +- src/emu/cpu/ccpu/ccpu.c | 6 +- src/emu/cpu/ccpu/ccpu.h | 6 +- src/emu/cpu/cop400/cop400.c | 10 +- src/emu/cpu/cosmac/cosmac.h | 4 +- src/emu/cpu/cp1610/cp1610.c | 2 +- src/emu/cpu/cubeqcpu/cubeqcpu.c | 20 +-- src/emu/cpu/cubeqcpu/cubeqcpu.h | 10 +- src/emu/cpu/drcbec.c | 6 +- src/emu/cpu/drcbex64.c | 6 +- src/emu/cpu/drcbex86.c | 6 +- src/emu/cpu/drcfe.c | 2 +- src/emu/cpu/drcfe.h | 2 +- src/emu/cpu/drcuml.c | 4 +- src/emu/cpu/drcuml.h | 4 +- src/emu/cpu/dsp32/dsp32.c | 10 +- src/emu/cpu/dsp32/dsp32.h | 6 +- src/emu/cpu/dsp56k/dsp56k.c | 4 +- src/emu/cpu/dsp56k/dsp56k.h | 8 +- src/emu/cpu/dsp56k/dsp56mem.c | 6 +- src/emu/cpu/dsp56k/dsp56pcu.c | 2 +- src/emu/cpu/dsp56k/dsp56pcu.h | 2 +- src/emu/cpu/e132xs/e132xs.c | 2 +- src/emu/cpu/esrip/esrip.c | 4 +- src/emu/cpu/esrip/esrip.h | 2 +- src/emu/cpu/f8/f8.c | 2 +- src/emu/cpu/g65816/g65816.c | 4 +- src/emu/cpu/g65816/g65816.h | 2 +- src/emu/cpu/h6280/h6280.c | 6 +- src/emu/cpu/h6280/h6280.h | 4 +- src/emu/cpu/h83002/h8priv.h | 2 +- src/emu/cpu/hcd62121/hcd62121.c | 2 +- src/emu/cpu/hd6309/hd6309.c | 4 +- src/emu/cpu/i386/i386priv.h | 2 +- src/emu/cpu/i4004/i4004.c | 4 +- src/emu/cpu/i4004/i4004.h | 2 +- src/emu/cpu/i8008/i8008.c | 2 +- src/emu/cpu/i8085/i8085.c | 2 +- src/emu/cpu/i86/i286.c | 2 +- src/emu/cpu/i86/i86.c | 4 +- src/emu/cpu/i860/i860.h | 4 +- src/emu/cpu/i860/i860dec.c | 2 +- src/emu/cpu/i960/i960.c | 6 +- src/emu/cpu/i960/i960.h | 4 +- src/emu/cpu/jaguar/jaguar.c | 10 +- src/emu/cpu/jaguar/jaguar.h | 10 +- src/emu/cpu/konami/konami.c | 4 +- src/emu/cpu/konami/konami.h | 6 +- src/emu/cpu/lh5801/lh5801.c | 2 +- src/emu/cpu/lh5801/lh5801.h | 2 +- src/emu/cpu/lr35902/lr35902.c | 2 +- src/emu/cpu/lr35902/lr35902.h | 2 +- src/emu/cpu/m37710/m37710cm.h | 2 +- src/emu/cpu/m6502/m4510.c | 2 +- src/emu/cpu/m6502/m6502.c | 4 +- src/emu/cpu/m6502/m6502.h | 6 +- src/emu/cpu/m6502/m6509.c | 2 +- src/emu/cpu/m6502/m65ce02.c | 2 +- src/emu/cpu/m6800/m6800.c | 2 +- src/emu/cpu/m68000/m68000.h | 22 +-- src/emu/cpu/m68000/m68kcpu.c | 18 +- src/emu/cpu/m6805/m6805.c | 2 +- src/emu/cpu/m6809/m6809.c | 2 +- src/emu/cpu/mb86233/mb86233.c | 2 +- src/emu/cpu/mb86233/mb86233.h | 4 +- src/emu/cpu/mb88xx/mb88xx.c | 4 +- src/emu/cpu/mb88xx/mb88xx.h | 2 +- src/emu/cpu/mc68hc11/mc68hc11.c | 2 +- src/emu/cpu/mcs48/mcs48.c | 6 +- src/emu/cpu/mcs48/mcs48.h | 4 +- src/emu/cpu/mcs48/mcs48dsm.c | 2 +- src/emu/cpu/mcs51/mcs51.c | 6 +- src/emu/cpu/mcs51/mcs51.h | 8 +- src/emu/cpu/minx/minx.c | 2 +- src/emu/cpu/mips/mips3.h | 6 +- src/emu/cpu/mips/mips3drc.c | 8 +- src/emu/cpu/mips/psx.c | 2 +- src/emu/cpu/mips/r3000.c | 2 +- src/emu/cpu/mn10200/mn10200.c | 2 +- src/emu/cpu/nec/nec.c | 2 +- src/emu/cpu/nec/v25.c | 2 +- src/emu/cpu/pdp1/pdp1.c | 18 +- src/emu/cpu/pdp1/pdp1.h | 6 +- src/emu/cpu/pdp1/tx0.c | 14 +- src/emu/cpu/pdp1/tx0.h | 6 +- src/emu/cpu/pic16c5x/pic16c5x.c | 4 +- src/emu/cpu/pic16c5x/pic16c5x.h | 2 +- src/emu/cpu/pic16c62x/pic16c62x.c | 4 +- src/emu/cpu/pic16c62x/pic16c62x.h | 2 +- src/emu/cpu/powerpc/ppc.h | 12 +- src/emu/cpu/powerpc/ppccom.c | 4 +- src/emu/cpu/powerpc/ppcdrc.c | 8 +- src/emu/cpu/rsp/rsp.c | 10 +- src/emu/cpu/rsp/rsp.h | 10 +- src/emu/cpu/rsp/rspdrc.c | 10 +- src/emu/cpu/s2650/s2650.c | 2 +- src/emu/cpu/saturn/saturn.c | 2 +- src/emu/cpu/saturn/saturn.h | 16 +- src/emu/cpu/sc61860/sc61860.c | 4 +- src/emu/cpu/sc61860/sc61860.h | 18 +- src/emu/cpu/scmp/scmp.c | 2 +- src/emu/cpu/se3208/se3208.c | 2 +- src/emu/cpu/sh2/sh2.c | 6 +- src/emu/cpu/sh2/sh2.h | 8 +- src/emu/cpu/sh2/sh2comn.c | 6 +- src/emu/cpu/sh2/sh2comn.h | 2 +- src/emu/cpu/sh2/sh2drc.c | 6 +- src/emu/cpu/sh4/sh4.c | 4 +- src/emu/cpu/sh4/sh4.h | 8 +- src/emu/cpu/sh4/sh4comn.c | 10 +- src/emu/cpu/sh4/sh4comn.h | 2 +- src/emu/cpu/sharc/sharc.c | 8 +- src/emu/cpu/sharc/sharc.h | 6 +- src/emu/cpu/sm8500/sm8500.c | 2 +- src/emu/cpu/sm8500/sm8500.h | 4 +- src/emu/cpu/spc700/spc700.c | 2 +- src/emu/cpu/ssem/ssem.c | 2 +- src/emu/cpu/ssp1601/ssp1601.c | 2 +- src/emu/cpu/superfx/superfx.c | 12 +- src/emu/cpu/superfx/superfx.h | 10 +- src/emu/cpu/t11/t11.c | 2 +- src/emu/cpu/tlcs90/tlcs90.c | 2 +- src/emu/cpu/tlcs900/tlcs900.c | 2 +- src/emu/cpu/tms0980/tms0980.c | 4 +- src/emu/cpu/tms32010/tms32010.c | 2 +- src/emu/cpu/tms32025/tms32025.c | 2 +- src/emu/cpu/tms32031/tms32031.c | 2 +- src/emu/cpu/tms32031/tms32031.h | 4 +- src/emu/cpu/tms32051/tms32051.c | 2 +- src/emu/cpu/tms34010/tms34010.c | 8 +- src/emu/cpu/tms34010/tms34010.h | 8 +- src/emu/cpu/tms57002/tms57002.c | 4 +- src/emu/cpu/tms57002/tms57002.h | 2 +- src/emu/cpu/tms7000/tms7000.c | 8 +- src/emu/cpu/tms7000/tms7000.h | 2 +- src/emu/cpu/tms9900/99xxcore.h | 4 +- src/emu/cpu/tms9900/tms9900.h | 10 +- src/emu/cpu/unsp/unsp.c | 2 +- src/emu/cpu/upd7810/upd7810.c | 2 +- src/emu/cpu/upd7810/upd7810.h | 2 +- src/emu/cpu/v30mz/v30mz.c | 2 +- src/emu/cpu/v60/v60.c | 4 +- src/emu/cpu/v60/v60.h | 2 +- src/emu/cpu/v810/v810.c | 2 +- src/emu/cpu/vtlb.c | 2 +- src/emu/cpu/vtlb.h | 2 +- src/emu/cpu/z180/z180.c | 2 +- src/emu/cpu/z180/z180.h | 4 +- src/emu/cpu/z180/z180ops.h | 4 +- src/emu/cpu/z8/z8.c | 2 +- src/emu/cpu/z80/z80.c | 4 +- src/emu/cpu/z80/z80.h | 2 +- src/emu/cpu/z8000/z8000.c | 2 +- src/emu/debugint/debugint.c | 4 +- src/emu/debugint/debugint.h | 2 +- src/emu/devintrf.h | 4 - src/emu/image.c | 2 +- src/emu/machine/6526cia.c | 2 +- src/emu/machine/6526cia.h | 2 +- src/emu/machine/6532riot.c | 12 +- src/emu/machine/6532riot.h | 12 +- src/emu/machine/6821pia.c | 22 +-- src/emu/machine/6821pia.h | 22 +-- src/emu/machine/6840ptm.c | 12 +- src/emu/machine/6840ptm.h | 10 +- src/emu/machine/6850acia.c | 10 +- src/emu/machine/6850acia.h | 10 +- src/emu/machine/68681.c | 10 +- src/emu/machine/68681.h | 10 +- src/emu/machine/74148.c | 16 +- src/emu/machine/74148.h | 14 +- src/emu/machine/74153.c | 16 +- src/emu/machine/74153.h | 14 +- src/emu/machine/8255ppi.c | 24 +-- src/emu/machine/8255ppi.h | 24 +-- src/emu/machine/adc083x.c | 8 +- src/emu/machine/adc083x.h | 2 +- src/emu/machine/adc1038.c | 4 +- src/emu/machine/adc1038.h | 2 +- src/emu/machine/adc1213x.c | 6 +- src/emu/machine/adc1213x.h | 2 +- src/emu/machine/cdp1852.c | 6 +- src/emu/machine/f3853.c | 4 +- src/emu/machine/f3853.h | 6 +- src/emu/machine/generic.c | 10 +- src/emu/machine/generic.h | 6 +- src/emu/machine/i2cmem.c | 2 +- src/emu/machine/i8255a.c | 8 +- src/emu/machine/idectrl.c | 34 ++-- src/emu/machine/idectrl.h | 18 +- src/emu/machine/ins8250.c | 16 +- src/emu/machine/ins8250.h | 20 +-- src/emu/machine/k033906.h | 2 +- src/emu/machine/k056230.h | 2 +- src/emu/machine/laserdsc.h | 36 ++-- src/emu/machine/latch8.c | 14 +- src/emu/machine/ldcore.c | 48 +++--- src/emu/machine/ldcore.h | 4 +- src/emu/machine/ldpr8210.c | 6 +- src/emu/machine/ldv1000.c | 6 +- src/emu/machine/ldvp931.c | 4 +- src/emu/machine/mb14241.c | 2 +- src/emu/machine/mb87078.c | 14 +- src/emu/machine/mb87078.h | 8 +- src/emu/machine/msm6242.c | 2 +- src/emu/machine/pci.c | 10 +- src/emu/machine/pci.h | 4 +- src/emu/machine/pd4990a.c | 24 +-- src/emu/machine/pd4990a.h | 2 +- src/emu/machine/pic8259.c | 8 +- src/emu/machine/pic8259.h | 2 +- src/emu/machine/pit8253.c | 28 ++-- src/emu/machine/pit8253.h | 4 +- src/emu/machine/rp5h01.c | 2 +- src/emu/machine/rtc65271.c | 22 +-- src/emu/machine/rtc65271.h | 6 +- src/emu/machine/s3c2400.c | 6 +- src/emu/machine/s3c2400.h | 6 +- src/emu/machine/s3c2410.c | 10 +- src/emu/machine/s3c2410.h | 10 +- src/emu/machine/s3c2440.c | 12 +- src/emu/machine/s3c2440.h | 12 +- src/emu/machine/s3c24xx.c | 224 ++++++++++++------------- src/emu/machine/scsicd.c | 4 +- src/emu/machine/smc91c9x.c | 4 +- src/emu/machine/smc91c9x.h | 2 +- src/emu/machine/tms6100.c | 4 +- src/emu/machine/upd4701.c | 2 +- src/emu/romload.c | 2 +- src/emu/romload.h | 2 +- src/emu/sound/2151intf.c | 2 +- src/emu/sound/2151intf.h | 2 +- src/emu/sound/2203intf.c | 4 +- src/emu/sound/2203intf.h | 2 +- src/emu/sound/2413intf.c | 2 +- src/emu/sound/2608intf.c | 4 +- src/emu/sound/2608intf.h | 2 +- src/emu/sound/2610intf.c | 4 +- src/emu/sound/2610intf.h | 2 +- src/emu/sound/2612intf.c | 4 +- src/emu/sound/2612intf.h | 4 +- src/emu/sound/262intf.c | 4 +- src/emu/sound/262intf.h | 2 +- src/emu/sound/3526intf.c | 4 +- src/emu/sound/3526intf.h | 2 +- src/emu/sound/3812intf.c | 4 +- src/emu/sound/3812intf.h | 2 +- src/emu/sound/8950intf.c | 4 +- src/emu/sound/8950intf.h | 2 +- src/emu/sound/aica.c | 10 +- src/emu/sound/aica.h | 4 +- src/emu/sound/asc.c | 2 +- src/emu/sound/asc.h | 6 +- src/emu/sound/astrocde.c | 4 +- src/emu/sound/ay8910.c | 10 +- src/emu/sound/ay8910.h | 4 +- src/emu/sound/beep.c | 8 +- src/emu/sound/beep.h | 6 +- src/emu/sound/bsmt2000.c | 2 +- src/emu/sound/c140.c | 4 +- src/emu/sound/c140.h | 2 +- src/emu/sound/c352.c | 4 +- src/emu/sound/c6280.c | 8 +- src/emu/sound/cdda.c | 24 +-- src/emu/sound/cdda.h | 22 +-- src/emu/sound/cdp1863.c | 8 +- src/emu/sound/cdp1863.h | 4 +- src/emu/sound/cdp1864.c | 14 +- src/emu/sound/cdp1864.h | 2 +- src/emu/sound/cdp1869.h | 12 +- src/emu/sound/cem3394.c | 10 +- src/emu/sound/cem3394.h | 6 +- src/emu/sound/dac.c | 10 +- src/emu/sound/dac.h | 8 +- src/emu/sound/digitalk.c | 12 +- src/emu/sound/digitalk.h | 8 +- src/emu/sound/disc_inp.c | 2 +- src/emu/sound/discrete.c | 4 +- src/emu/sound/discrete.h | 2 +- src/emu/sound/dmadac.c | 2 +- src/emu/sound/es5503.c | 8 +- src/emu/sound/es5503.h | 4 +- src/emu/sound/es5506.c | 12 +- src/emu/sound/es5506.h | 12 +- src/emu/sound/es8712.c | 10 +- src/emu/sound/es8712.h | 6 +- src/emu/sound/filter.c | 4 +- src/emu/sound/filter.h | 4 +- src/emu/sound/flt_rc.c | 6 +- src/emu/sound/flt_rc.h | 2 +- src/emu/sound/flt_vol.c | 4 +- src/emu/sound/flt_vol.h | 2 +- src/emu/sound/fm.c | 22 +-- src/emu/sound/fm.h | 8 +- src/emu/sound/fm2612.c | 10 +- src/emu/sound/fmopl.c | 16 +- src/emu/sound/fmopl.h | 6 +- src/emu/sound/gaelco.c | 2 +- src/emu/sound/hc55516.c | 10 +- src/emu/sound/hc55516.h | 6 +- src/emu/sound/ics2115.c | 2 +- src/emu/sound/ics2115.h | 6 +- src/emu/sound/iremga20.c | 2 +- src/emu/sound/k005289.c | 2 +- src/emu/sound/k007232.c | 6 +- src/emu/sound/k007232.h | 6 +- src/emu/sound/k051649.c | 2 +- src/emu/sound/k053260.c | 4 +- src/emu/sound/k054539.c | 10 +- src/emu/sound/k054539.h | 8 +- src/emu/sound/k056800.c | 12 +- src/emu/sound/mos6560.c | 20 +-- src/emu/sound/mos6560.h | 4 +- src/emu/sound/msm5205.c | 16 +- src/emu/sound/msm5205.h | 14 +- src/emu/sound/msm5232.c | 8 +- src/emu/sound/msm5232.h | 4 +- src/emu/sound/multipcm.c | 4 +- src/emu/sound/multipcm.h | 2 +- src/emu/sound/n63701x.c | 2 +- src/emu/sound/namco.c | 6 +- src/emu/sound/namco.h | 4 +- src/emu/sound/nes_apu.c | 2 +- src/emu/sound/nile.c | 2 +- src/emu/sound/okim6258.c | 10 +- src/emu/sound/okim6258.h | 6 +- src/emu/sound/okim6376.c | 6 +- src/emu/sound/pokey.c | 14 +- src/emu/sound/pokey.h | 8 +- src/emu/sound/psx.c | 4 +- src/emu/sound/psx.h | 2 +- src/emu/sound/qsound.c | 2 +- src/emu/sound/rf5c400.c | 4 +- src/emu/sound/rf5c68.c | 6 +- src/emu/sound/rf5c68.h | 2 +- src/emu/sound/s14001a.c | 12 +- src/emu/sound/s14001a.h | 10 +- src/emu/sound/s2636.c | 4 +- src/emu/sound/s2636.h | 2 +- src/emu/sound/saa1099.c | 4 +- src/emu/sound/samples.c | 20 +-- src/emu/sound/samples.h | 20 +-- src/emu/sound/scsp.c | 10 +- src/emu/sound/scsp.h | 4 +- src/emu/sound/segapcm.c | 2 +- src/emu/sound/sid.h | 4 +- src/emu/sound/sid6581.c | 4 +- src/emu/sound/sid6581.h | 2 +- src/emu/sound/sn76477.c | 64 ++++---- src/emu/sound/sn76477.h | 58 +++---- src/emu/sound/sn76496.c | 6 +- src/emu/sound/snkwave.c | 2 +- src/emu/sound/sp0250.c | 8 +- src/emu/sound/sp0250.h | 4 +- src/emu/sound/sp0256.c | 4 +- src/emu/sound/speaker.c | 4 +- src/emu/sound/speaker.h | 2 +- src/emu/sound/st0016.c | 2 +- src/emu/sound/t6w28.c | 4 +- src/emu/sound/tiaintf.c | 2 +- src/emu/sound/tms3615.c | 4 +- src/emu/sound/tms3615.h | 2 +- src/emu/sound/tms36xx.c | 8 +- src/emu/sound/tms36xx.h | 6 +- src/emu/sound/tms5110.c | 24 +-- src/emu/sound/tms5110.h | 8 +- src/emu/sound/tms5220.c | 8 +- src/emu/sound/tms5220.h | 10 +- src/emu/sound/upd7759.c | 16 +- src/emu/sound/upd7759.h | 10 +- src/emu/sound/vlm5030.c | 14 +- src/emu/sound/vlm5030.h | 10 +- src/emu/sound/votrax.c | 6 +- src/emu/sound/votrax.h | 2 +- src/emu/sound/vrender0.c | 4 +- src/emu/sound/vrender0.h | 2 +- src/emu/sound/x1_010.c | 4 +- src/emu/sound/x1_010.h | 2 +- src/emu/sound/ym2151.c | 12 +- src/emu/sound/ym2151.h | 4 +- src/emu/sound/ym2413.c | 12 +- src/emu/sound/ym2413.h | 2 +- src/emu/sound/ymdeltat.c | 2 +- src/emu/sound/ymdeltat.h | 2 +- src/emu/sound/ymf262.c | 8 +- src/emu/sound/ymf262.h | 2 +- src/emu/sound/ymf271.c | 10 +- src/emu/sound/ymf271.h | 2 +- src/emu/sound/ymf278b.c | 10 +- src/emu/sound/ymf278b.h | 2 +- src/emu/sound/ymz280b.c | 6 +- src/emu/sound/ymz280b.h | 2 +- src/emu/sound/zsg2.c | 2 +- src/emu/video/hd63484.c | 30 ++-- src/emu/video/mc6845.c | 36 ++-- src/emu/video/mc6845.h | 28 ++-- src/emu/video/s2636.c | 8 +- src/emu/video/s2636.h | 2 +- src/emu/video/saa5050.c | 10 +- src/emu/video/saa5050.h | 4 +- src/emu/video/tlc34076.c | 4 +- src/emu/video/tlc34076.h | 2 +- src/emu/video/tms9927.c | 10 +- src/emu/video/tms9927.h | 6 +- src/emu/video/tms9928a.c | 34 ++-- src/emu/video/vooddefs.h | 4 +- src/emu/video/voodoo.c | 12 +- src/emu/video/voodoo.h | 12 +- src/ldplayer/ldplayer.c | 20 +-- src/mame/audio/amiga.c | 6 +- src/mame/audio/blockade.c | 2 +- src/mame/audio/carnival.c | 4 +- src/mame/audio/cchasm.c | 2 +- src/mame/audio/cclimber.c | 2 +- src/mame/audio/cinemat.c | 28 ++-- src/mame/audio/cps3.c | 2 +- src/mame/audio/crbaloon.c | 6 +- src/mame/audio/cyberbal.c | 2 +- src/mame/audio/dcs.c | 6 +- src/mame/audio/dcs.h | 2 +- src/mame/audio/depthch.c | 2 +- src/mame/audio/exidy.c | 20 +-- src/mame/audio/flower.c | 4 +- src/mame/audio/geebee.c | 2 +- src/mame/audio/gomoku.c | 4 +- src/mame/audio/gorf.c | 4 +- src/mame/audio/gottlieb.c | 22 +-- src/mame/audio/gridlee.c | 6 +- src/mame/audio/hyprolyb.c | 8 +- src/mame/audio/invinco.c | 2 +- src/mame/audio/irem.c | 16 +- src/mame/audio/jaguar.c | 2 +- src/mame/audio/jedi.c | 2 +- src/mame/audio/leland.c | 18 +- src/mame/audio/m72.c | 2 +- src/mame/audio/m72.h | 2 +- src/mame/audio/mario.c | 2 +- src/mame/audio/mcr.c | 28 ++-- src/mame/audio/meadows.c | 2 +- src/mame/audio/micro3d.c | 6 +- src/mame/audio/mw8080bw.c | 2 +- src/mame/audio/n8080.c | 16 +- src/mame/audio/namco52.c | 12 +- src/mame/audio/namco54.c | 10 +- src/mame/audio/namcoc7x.c | 2 +- src/mame/audio/phoenix.c | 8 +- src/mame/audio/pleiads.c | 4 +- src/mame/audio/polepos.c | 2 +- src/mame/audio/polyplay.c | 4 +- src/mame/audio/pulsar.c | 4 +- src/mame/audio/qix.c | 2 +- src/mame/audio/redalert.c | 4 +- src/mame/audio/redbaron.c | 2 +- src/mame/audio/scramble.c | 8 +- src/mame/audio/segag80r.c | 10 +- src/mame/audio/segag80v.c | 12 +- src/mame/audio/segasnd.c | 4 +- src/mame/audio/seibu.c | 8 +- src/mame/audio/seibu.h | 6 +- src/mame/audio/senjyo.c | 2 +- src/mame/audio/snes_snd.c | 14 +- src/mame/audio/snes_snd.h | 2 +- src/mame/audio/snk6502.c | 28 ++-- src/mame/audio/spacefb.c | 2 +- src/mame/audio/starwars.c | 2 +- src/mame/audio/t5182.c | 4 +- src/mame/audio/taitosnd.c | 10 +- src/mame/audio/targ.c | 10 +- src/mame/audio/tiamc1.c | 2 +- src/mame/audio/timeplt.c | 18 +- src/mame/audio/toaplan2.c | 8 +- src/mame/audio/trackfld.c | 16 +- src/mame/audio/turbo.c | 22 +-- src/mame/audio/tx1.c | 6 +- src/mame/audio/vicdual.c | 10 +- src/mame/audio/warpwarp.c | 2 +- src/mame/audio/williams.c | 14 +- src/mame/audio/wiping.c | 4 +- src/mame/audio/wow.c | 4 +- src/mame/audio/zaxxon.c | 10 +- src/mame/drivers/2mindril.c | 4 +- src/mame/drivers/5clown.c | 2 +- src/mame/drivers/88games.c | 4 +- src/mame/drivers/actfancr.c | 2 +- src/mame/drivers/adp.c | 14 +- src/mame/drivers/aerofgt.c | 2 +- src/mame/drivers/ajax.c | 4 +- src/mame/drivers/alg.c | 2 +- src/mame/drivers/aliens.c | 2 +- src/mame/drivers/alpha68k.c | 2 +- src/mame/drivers/amspdwy.c | 2 +- src/mame/drivers/angelkds.c | 2 +- src/mame/drivers/appoooh.c | 2 +- src/mame/drivers/aquarium.c | 2 +- src/mame/drivers/argus.c | 2 +- src/mame/drivers/aristmk4.c | 2 +- src/mame/drivers/artmagic.c | 2 +- src/mame/drivers/ashnojoe.c | 4 +- src/mame/drivers/astinvad.c | 8 +- src/mame/drivers/astrocde.c | 4 +- src/mame/drivers/asuka.c | 4 +- src/mame/drivers/backfire.c | 12 +- src/mame/drivers/battlane.c | 2 +- src/mame/drivers/battlera.c | 2 +- src/mame/drivers/bbusters.c | 2 +- src/mame/drivers/beaminv.c | 2 +- src/mame/drivers/berzerk.c | 4 +- src/mame/drivers/bfm_sc2.c | 8 +- src/mame/drivers/bishi.c | 2 +- src/mame/drivers/blktiger.c | 2 +- src/mame/drivers/blockout.c | 2 +- src/mame/drivers/bmcbowl.c | 2 +- src/mame/drivers/bnstars.c | 4 +- src/mame/drivers/boogwing.c | 2 +- src/mame/drivers/bottom9.c | 4 +- src/mame/drivers/boxer.c | 2 +- src/mame/drivers/brkthru.c | 2 +- src/mame/drivers/bublbobl.c | 2 +- src/mame/drivers/cabal.c | 2 +- src/mame/drivers/calchase.c | 32 ++-- src/mame/drivers/capbowl.c | 2 +- src/mame/drivers/cave.c | 4 +- src/mame/drivers/cball.c | 2 +- src/mame/drivers/cbuster.c | 2 +- src/mame/drivers/cdi.c | 2 +- src/mame/drivers/centiped.c | 4 +- src/mame/drivers/cham24.c | 2 +- src/mame/drivers/chanbara.c | 4 +- src/mame/drivers/chihiro.c | 4 +- src/mame/drivers/chinagat.c | 4 +- src/mame/drivers/chinsan.c | 2 +- src/mame/drivers/chqflag.c | 6 +- src/mame/drivers/cinemat.c | 2 +- src/mame/drivers/clayshoo.c | 2 +- src/mame/drivers/cliffhgr.c | 2 +- src/mame/drivers/cninja.c | 4 +- src/mame/drivers/cntsteer.c | 6 +- src/mame/drivers/compgolf.c | 2 +- src/mame/drivers/cosmic.c | 2 +- src/mame/drivers/cps1.c | 6 +- src/mame/drivers/crbaloon.c | 6 +- src/mame/drivers/crgolf.c | 4 +- src/mame/drivers/crimfght.c | 2 +- src/mame/drivers/crospang.c | 2 +- src/mame/drivers/crshrace.c | 2 +- src/mame/drivers/crystal.c | 6 +- src/mame/drivers/cubeqst.c | 4 +- src/mame/drivers/cvs.c | 4 +- src/mame/drivers/cybertnk.c | 4 +- src/mame/drivers/dacholer.c | 4 +- src/mame/drivers/dai3wksi.c | 16 +- src/mame/drivers/darius.c | 8 +- src/mame/drivers/darkseal.c | 2 +- src/mame/drivers/dassault.c | 2 +- src/mame/drivers/dblewing.c | 8 +- src/mame/drivers/dbz.c | 2 +- src/mame/drivers/dcheese.c | 2 +- src/mame/drivers/ddayjlc.c | 2 +- src/mame/drivers/ddragon.c | 6 +- src/mame/drivers/ddragon3.c | 2 +- src/mame/drivers/dec0.c | 6 +- src/mame/drivers/dec8.c | 4 +- src/mame/drivers/deco156.c | 2 +- src/mame/drivers/deco32.c | 4 +- src/mame/drivers/deco_ld.c | 2 +- src/mame/drivers/deniam.c | 2 +- src/mame/drivers/destroyr.c | 2 +- src/mame/drivers/dietgo.c | 2 +- src/mame/drivers/discoboy.c | 4 +- src/mame/drivers/diverboy.c | 2 +- src/mame/drivers/djmain.c | 6 +- src/mame/drivers/dkong.c | 2 +- src/mame/drivers/dlair.c | 4 +- src/mame/drivers/docastle.c | 2 +- src/mame/drivers/dooyong.c | 2 +- src/mame/drivers/dorachan.c | 2 +- src/mame/drivers/drmicro.c | 2 +- src/mame/drivers/dynax.c | 8 +- src/mame/drivers/egghunt.c | 2 +- src/mame/drivers/enigma2.c | 4 +- src/mame/drivers/equites.c | 2 +- src/mame/drivers/esh.c | 2 +- src/mame/drivers/esripsys.c | 4 +- src/mame/drivers/exprraid.c | 2 +- src/mame/drivers/exzisus.c | 2 +- src/mame/drivers/f1gp.c | 2 +- src/mame/drivers/fantland.c | 20 +-- src/mame/drivers/fastlane.c | 4 +- src/mame/drivers/fcrash.c | 4 +- src/mame/drivers/firebeat.c | 4 +- src/mame/drivers/firefox.c | 6 +- src/mame/drivers/firetrap.c | 2 +- src/mame/drivers/firetrk.c | 10 +- src/mame/drivers/flkatck.c | 2 +- src/mame/drivers/flyball.c | 2 +- src/mame/drivers/fromanc2.c | 2 +- src/mame/drivers/fromance.c | 2 +- src/mame/drivers/funkyjet.c | 2 +- src/mame/drivers/fuukifg2.c | 2 +- src/mame/drivers/fuukifg3.c | 2 +- src/mame/drivers/gaelco3d.c | 2 +- src/mame/drivers/gaiden.c | 2 +- src/mame/drivers/galastrm.c | 2 +- src/mame/drivers/galaxia.c | 6 +- src/mame/drivers/galaxian.c | 4 +- src/mame/drivers/galpani2.c | 2 +- src/mame/drivers/galpanic.c | 6 +- src/mame/drivers/galspnbl.c | 2 +- src/mame/drivers/gamecstl.c | 32 ++-- src/mame/drivers/gaplus.c | 12 +- src/mame/drivers/gauntlet.c | 2 +- src/mame/drivers/gbusters.c | 2 +- src/mame/drivers/gcpinbal.c | 2 +- src/mame/drivers/ghosteo.c | 20 +-- src/mame/drivers/gijoe.c | 2 +- src/mame/drivers/gladiatr.c | 2 +- src/mame/drivers/go2000.c | 2 +- src/mame/drivers/goal92.c | 4 +- src/mame/drivers/gotcha.c | 2 +- src/mame/drivers/gottlieb.c | 4 +- src/mame/drivers/gpworld.c | 2 +- src/mame/drivers/gradius3.c | 2 +- src/mame/drivers/grchamp.c | 2 +- src/mame/drivers/gstriker.c | 2 +- src/mame/drivers/gticlub.c | 34 ++-- src/mame/drivers/gunbustr.c | 2 +- src/mame/drivers/gunpey.c | 2 +- src/mame/drivers/gyruss.c | 2 +- src/mame/drivers/hcastle.c | 4 +- src/mame/drivers/hnayayoi.c | 2 +- src/mame/drivers/hornet.c | 38 ++--- src/mame/drivers/hvyunit.c | 10 +- src/mame/drivers/hyprduel.c | 2 +- src/mame/drivers/igs011.c | 2 +- src/mame/drivers/imolagp.c | 2 +- src/mame/drivers/inufuku.c | 2 +- src/mame/drivers/istellar.c | 2 +- src/mame/drivers/itech32.c | 2 +- src/mame/drivers/itech8.c | 2 +- src/mame/drivers/jangou.c | 10 +- src/mame/drivers/jantotsu.c | 2 +- src/mame/drivers/jpmimpct.c | 2 +- src/mame/drivers/junofrst.c | 10 +- src/mame/drivers/kaneko16.c | 2 +- src/mame/drivers/karnov.c | 2 +- src/mame/drivers/kchamp.c | 2 +- src/mame/drivers/kinst.c | 4 +- src/mame/drivers/konamigv.c | 2 +- src/mame/drivers/konamigx.c | 4 +- src/mame/drivers/kongambl.c | 4 +- src/mame/drivers/ksys573.c | 8 +- src/mame/drivers/kungfur.c | 4 +- src/mame/drivers/laserbat.c | 2 +- src/mame/drivers/lastduel.c | 2 +- src/mame/drivers/lastfght.c | 2 +- src/mame/drivers/lemmings.c | 2 +- src/mame/drivers/lethal.c | 2 +- src/mame/drivers/lgp.c | 2 +- src/mame/drivers/lkage.c | 2 +- src/mame/drivers/lockon.c | 2 +- src/mame/drivers/lordgun.c | 6 +- src/mame/drivers/lsasquad.c | 2 +- src/mame/drivers/lucky74.c | 2 +- src/mame/drivers/m107.c | 2 +- src/mame/drivers/m14.c | 2 +- src/mame/drivers/m63.c | 8 +- src/mame/drivers/m72.c | 2 +- src/mame/drivers/m92.c | 2 +- src/mame/drivers/macrossp.c | 2 +- src/mame/drivers/madmotor.c | 2 +- src/mame/drivers/magmax.c | 6 +- src/mame/drivers/mainevt.c | 2 +- src/mame/drivers/mappy.c | 46 +++--- src/mame/drivers/mastboy.c | 6 +- src/mame/drivers/matmania.c | 2 +- src/mame/drivers/maygay1b.c | 6 +- src/mame/drivers/maygayv1.c | 10 +- src/mame/drivers/mazerbla.c | 4 +- src/mame/drivers/mcatadv.c | 2 +- src/mame/drivers/mcr.c | 4 +- src/mame/drivers/mediagx.c | 14 +- src/mame/drivers/megadriv.c | 6 +- src/mame/drivers/megasys1.c | 8 +- src/mame/drivers/megatech.c | 4 +- src/mame/drivers/merit.c | 2 +- src/mame/drivers/meritm.c | 2 +- src/mame/drivers/mermaid.c | 2 +- src/mame/drivers/metalmx.c | 2 +- src/mame/drivers/metlclsh.c | 2 +- src/mame/drivers/metro.c | 10 +- src/mame/drivers/mgolf.c | 2 +- src/mame/drivers/midas.c | 2 +- src/mame/drivers/midvunit.c | 2 +- src/mame/drivers/missb2.c | 2 +- src/mame/drivers/mitchell.c | 2 +- src/mame/drivers/mjsister.c | 4 +- src/mame/drivers/mlanding.c | 8 +- src/mame/drivers/model2.c | 8 +- src/mame/drivers/model3.c | 4 +- src/mame/drivers/mogura.c | 6 +- src/mame/drivers/mpu4.c | 34 ++-- src/mame/drivers/mpu4drvr.c | 8 +- src/mame/drivers/mugsmash.c | 2 +- src/mame/drivers/multigam.c | 8 +- src/mame/drivers/mystwarr.c | 16 +- src/mame/drivers/namcos1.c | 2 +- src/mame/drivers/naomi.c | 2 +- src/mame/drivers/nbmj9195.c | 2 +- src/mame/drivers/nemesis.c | 4 +- src/mame/drivers/neogeo.c | 2 +- src/mame/drivers/neoprint.c | 2 +- src/mame/drivers/nightgal.c | 4 +- src/mame/drivers/ninjakd2.c | 4 +- src/mame/drivers/ninjaw.c | 4 +- src/mame/drivers/nmg5.c | 6 +- src/mame/drivers/nmk16.c | 4 +- src/mame/drivers/norautp.c | 2 +- src/mame/drivers/nwk-tr.c | 12 +- src/mame/drivers/nyny.c | 14 +- src/mame/drivers/ojankohs.c | 2 +- src/mame/drivers/oneshot.c | 2 +- src/mame/drivers/onetwo.c | 6 +- src/mame/drivers/opwolf.c | 4 +- src/mame/drivers/othello.c | 10 +- src/mame/drivers/othunder.c | 2 +- src/mame/drivers/pachifev.c | 2 +- src/mame/drivers/pcat_dyn.c | 12 +- src/mame/drivers/pcktgal.c | 2 +- src/mame/drivers/pcxt.c | 16 +- src/mame/drivers/peplus.c | 4 +- src/mame/drivers/pgm.c | 2 +- src/mame/drivers/photon2.c | 2 +- src/mame/drivers/photoply.c | 12 +- src/mame/drivers/pipedrm.c | 2 +- src/mame/drivers/pkscram.c | 2 +- src/mame/drivers/plygonet.c | 4 +- src/mame/drivers/policetr.c | 4 +- src/mame/drivers/powerins.c | 2 +- src/mame/drivers/prehisle.c | 2 +- src/mame/drivers/psikyo.c | 4 +- src/mame/drivers/psikyo4.c | 2 +- src/mame/drivers/psikyosh.c | 2 +- src/mame/drivers/psychic5.c | 2 +- src/mame/drivers/pushman.c | 2 +- src/mame/drivers/qdrmfgp.c | 22 +-- src/mame/drivers/quakeat.c | 4 +- src/mame/drivers/r2dtank.c | 8 +- src/mame/drivers/rainbow.c | 2 +- src/mame/drivers/rastan.c | 4 +- src/mame/drivers/renegade.c | 2 +- src/mame/drivers/rohga.c | 2 +- src/mame/drivers/royalmah.c | 4 +- src/mame/drivers/rpunch.c | 2 +- src/mame/drivers/safarir.c | 4 +- src/mame/drivers/sandscrp.c | 4 +- src/mame/drivers/seattle.c | 16 +- src/mame/drivers/segac2.c | 8 +- src/mame/drivers/segae.c | 4 +- src/mame/drivers/segag80v.c | 2 +- src/mame/drivers/segahang.c | 2 +- src/mame/drivers/segald.c | 2 +- src/mame/drivers/segamsys.c | 2 +- src/mame/drivers/segaorun.c | 2 +- src/mame/drivers/segas16b.c | 2 +- src/mame/drivers/segas24.c | 2 +- src/mame/drivers/segas32.c | 4 +- src/mame/drivers/segaxbd.c | 4 +- src/mame/drivers/segaybd.c | 2 +- src/mame/drivers/seibuspi.c | 2 +- src/mame/drivers/seta.c | 4 +- src/mame/drivers/sf.c | 2 +- src/mame/drivers/sfkick.c | 2 +- src/mame/drivers/shadfrce.c | 2 +- src/mame/drivers/shangha3.c | 2 +- src/mame/drivers/shanghai.c | 2 +- src/mame/drivers/shootout.c | 4 +- src/mame/drivers/sidearms.c | 2 +- src/mame/drivers/sidepckt.c | 2 +- src/mame/drivers/sigmab52.c | 8 +- src/mame/drivers/skeetsht.c | 6 +- src/mame/drivers/skimaxx.c | 4 +- src/mame/drivers/skydiver.c | 2 +- src/mame/drivers/slapshot.c | 2 +- src/mame/drivers/slotcarn.c | 2 +- src/mame/drivers/snk.c | 4 +- src/mame/drivers/snk68.c | 2 +- src/mame/drivers/snowbros.c | 6 +- src/mame/drivers/sothello.c | 4 +- src/mame/drivers/spbactn.c | 2 +- src/mame/drivers/spdodgeb.c | 6 +- src/mame/drivers/spiders.c | 12 +- src/mame/drivers/splash.c | 4 +- src/mame/drivers/sprint2.c | 2 +- src/mame/drivers/spy.c | 4 +- src/mame/drivers/srmp2.c | 2 +- src/mame/drivers/sshangha.c | 2 +- src/mame/drivers/ssingles.c | 2 +- src/mame/drivers/sslam.c | 2 +- src/mame/drivers/ssv.c | 2 +- src/mame/drivers/stadhero.c | 2 +- src/mame/drivers/stv.c | 2 +- src/mame/drivers/suna16.c | 2 +- src/mame/drivers/suna8.c | 2 +- src/mame/drivers/supbtime.c | 2 +- src/mame/drivers/superchs.c | 2 +- src/mame/drivers/superdq.c | 2 +- src/mame/drivers/superqix.c | 2 +- src/mame/drivers/suprgolf.c | 4 +- src/mame/drivers/suprslam.c | 2 +- src/mame/drivers/surpratk.c | 2 +- src/mame/drivers/system1.c | 4 +- src/mame/drivers/system16.c | 6 +- src/mame/drivers/tail2nos.c | 2 +- src/mame/drivers/taito_b.c | 2 +- src/mame/drivers/taito_f2.c | 2 +- src/mame/drivers/taito_h.c | 2 +- src/mame/drivers/taito_l.c | 4 +- src/mame/drivers/taito_x.c | 2 +- src/mame/drivers/taito_z.c | 4 +- src/mame/drivers/taitoair.c | 2 +- src/mame/drivers/taitogn.c | 4 +- src/mame/drivers/taitowlf.c | 30 ++-- src/mame/drivers/tankbatt.c | 6 +- src/mame/drivers/taotaido.c | 2 +- src/mame/drivers/tatsumi.c | 4 +- src/mame/drivers/tbowl.c | 8 +- src/mame/drivers/tecmo.c | 4 +- src/mame/drivers/tecmo16.c | 2 +- src/mame/drivers/tecmosys.c | 2 +- src/mame/drivers/tehkanwc.c | 2 +- src/mame/drivers/thayers.c | 2 +- src/mame/drivers/thedeep.c | 2 +- src/mame/drivers/thief.c | 4 +- src/mame/drivers/thunderx.c | 2 +- src/mame/drivers/tigeroad.c | 2 +- src/mame/drivers/tmaster.c | 10 +- src/mame/drivers/tmmjprd.c | 4 +- src/mame/drivers/tmnt.c | 6 +- src/mame/drivers/tnzs.c | 2 +- src/mame/drivers/toaplan1.c | 2 +- src/mame/drivers/toaplan2.c | 8 +- src/mame/drivers/toki.c | 2 +- src/mame/drivers/topspeed.c | 4 +- src/mame/drivers/toratora.c | 8 +- src/mame/drivers/toypop.c | 12 +- src/mame/drivers/triplhnt.c | 4 +- src/mame/drivers/trvquest.c | 2 +- src/mame/drivers/tubep.c | 2 +- src/mame/drivers/tumbleb.c | 6 +- src/mame/drivers/tumblep.c | 2 +- src/mame/drivers/twin16.c | 2 +- src/mame/drivers/twincobr.c | 2 +- src/mame/drivers/twinkle.c | 6 +- src/mame/drivers/ultrsprt.c | 4 +- src/mame/drivers/undrfire.c | 2 +- src/mame/drivers/vaportra.c | 2 +- src/mame/drivers/vball.c | 2 +- src/mame/drivers/vcombat.c | 6 +- src/mame/drivers/vegas.c | 18 +- src/mame/drivers/videopin.c | 2 +- src/mame/drivers/viper.c | 14 +- src/mame/drivers/volfied.c | 2 +- src/mame/drivers/wardner.c | 2 +- src/mame/drivers/warriorb.c | 4 +- src/mame/drivers/wc90.c | 2 +- src/mame/drivers/wc90b.c | 4 +- src/mame/drivers/wecleman.c | 2 +- src/mame/drivers/welltris.c | 2 +- src/mame/drivers/wgp.c | 2 +- src/mame/drivers/wheelfir.c | 8 +- src/mame/drivers/williams.c | 6 +- src/mame/drivers/wiz.c | 2 +- src/mame/drivers/wolfpack.c | 2 +- src/mame/drivers/wwfsstar.c | 2 +- src/mame/drivers/wwfwfest.c | 2 +- src/mame/drivers/xain.c | 2 +- src/mame/drivers/xexex.c | 2 +- src/mame/drivers/yunsun16.c | 2 +- src/mame/drivers/yunsung8.c | 2 +- src/mame/drivers/zaccaria.c | 6 +- src/mame/drivers/zn.c | 20 +-- src/mame/drivers/zr107.c | 8 +- src/mame/includes/1942.h | 2 +- src/mame/includes/20pacgal.h | 4 +- src/mame/includes/40love.h | 2 +- src/mame/includes/88games.h | 12 +- src/mame/includes/actfancr.h | 4 +- src/mame/includes/aerofgt.h | 2 +- src/mame/includes/airbustr.h | 8 +- src/mame/includes/ajax.h | 16 +- src/mame/includes/aliens.h | 10 +- src/mame/includes/alpha68k.h | 2 +- src/mame/includes/amiga.h | 10 +- src/mame/includes/amspdwy.h | 2 +- src/mame/includes/angelkds.h | 2 +- src/mame/includes/appoooh.h | 2 +- src/mame/includes/aquarium.h | 2 +- src/mame/includes/arkanoid.h | 2 +- src/mame/includes/ashnojoe.h | 2 +- src/mame/includes/asterix.h | 12 +- src/mame/includes/astrof.h | 6 +- src/mame/includes/asuka.h | 8 +- src/mame/includes/atari.h | 2 +- src/mame/includes/atarifb.h | 2 +- src/mame/includes/balsente.h | 2 +- src/mame/includes/battlane.h | 4 +- src/mame/includes/battlnts.h | 6 +- src/mame/includes/bigevglf.h | 4 +- src/mame/includes/bishi.h | 12 +- src/mame/includes/bking.h | 2 +- src/mame/includes/bladestl.h | 6 +- src/mame/includes/blktiger.h | 4 +- src/mame/includes/blockhl.h | 8 +- src/mame/includes/blockout.h | 2 +- src/mame/includes/blueprnt.h | 2 +- src/mame/includes/bottom9.h | 14 +- src/mame/includes/brkthru.h | 4 +- src/mame/includes/btime.h | 4 +- src/mame/includes/bublbobl.h | 8 +- src/mame/includes/buggychl.h | 2 +- src/mame/includes/bwing.h | 6 +- src/mame/includes/capbowl.h | 4 +- src/mame/includes/carpolo.h | 2 +- src/mame/includes/cave.h | 4 +- src/mame/includes/cbuster.h | 6 +- src/mame/includes/champbas.h | 6 +- src/mame/includes/changela.h | 2 +- src/mame/includes/cheekyms.h | 4 +- src/mame/includes/chqflag.h | 14 +- src/mame/includes/cidelsa.h | 2 +- src/mame/includes/cinemat.h | 2 +- src/mame/includes/circus.h | 6 +- src/mame/includes/circusc.h | 8 +- src/mame/includes/citycon.h | 2 +- src/mame/includes/combatsc.h | 4 +- src/mame/includes/commando.h | 2 +- src/mame/includes/contra.h | 6 +- src/mame/includes/coolpool.h | 4 +- src/mame/includes/cosmic.h | 4 +- src/mame/includes/cps1.h | 8 +- src/mame/includes/crbaloon.h | 6 +- src/mame/includes/crgolf.h | 4 +- src/mame/includes/crimfght.h | 10 +- src/mame/includes/crospang.h | 2 +- src/mame/includes/crshrace.h | 4 +- src/mame/includes/cvs.h | 16 +- src/mame/includes/darius.h | 54 +++--- src/mame/includes/dbz.h | 14 +- src/mame/includes/dcheese.h | 6 +- src/mame/includes/dday.h | 2 +- src/mame/includes/ddragon.h | 10 +- src/mame/includes/ddragon3.h | 4 +- src/mame/includes/ddribble.h | 6 +- src/mame/includes/dec8.h | 8 +- src/mame/includes/deniam.h | 2 +- src/mame/includes/dietgo.h | 6 +- src/mame/includes/djboy.h | 10 +- src/mame/includes/dkong.h | 8 +- src/mame/includes/dogfgt.h | 2 +- src/mame/includes/dragrace.h | 2 +- src/mame/includes/dribling.h | 6 +- src/mame/includes/drmicro.h | 2 +- src/mame/includes/dynax.h | 12 +- src/mame/includes/equites.h | 10 +- src/mame/includes/esd16.h | 4 +- src/mame/includes/espial.h | 4 +- src/mame/includes/exerion.h | 2 +- src/mame/includes/exprraid.h | 4 +- src/mame/includes/f1gp.h | 4 +- src/mame/includes/fantland.h | 10 +- src/mame/includes/fastlane.h | 4 +- src/mame/includes/fcombat.h | 2 +- src/mame/includes/fgoal.h | 4 +- src/mame/includes/finalizr.h | 2 +- src/mame/includes/firetrap.h | 6 +- src/mame/includes/flkatck.h | 4 +- src/mame/includes/flstory.h | 6 +- src/mame/includes/fromanc2.h | 10 +- src/mame/includes/fromance.h | 2 +- src/mame/includes/funkyjet.h | 6 +- src/mame/includes/funybubl.h | 2 +- src/mame/includes/fuukifg2.h | 4 +- src/mame/includes/fuukifg3.h | 4 +- src/mame/includes/gaelco.h | 2 +- src/mame/includes/gaiden.h | 2 +- src/mame/includes/galspnbl.h | 2 +- src/mame/includes/gameplan.h | 6 +- src/mame/includes/gbusters.h | 10 +- src/mame/includes/gijoe.h | 12 +- src/mame/includes/ginganin.h | 2 +- src/mame/includes/goal92.h | 2 +- src/mame/includes/gotcha.h | 2 +- src/mame/includes/gotya.h | 2 +- src/mame/includes/gradius3.h | 12 +- src/mame/includes/harddriv.h | 6 +- src/mame/includes/hcastle.h | 6 +- src/mame/includes/himesiki.h | 2 +- src/mame/includes/homedata.h | 10 +- src/mame/includes/hyprduel.h | 4 +- src/mame/includes/inufuku.h | 2 +- src/mame/includes/ironhors.h | 2 +- src/mame/includes/jackal.h | 4 +- src/mame/includes/jaguar.h | 6 +- src/mame/includes/karnov.h | 4 +- src/mame/includes/kchamp.h | 2 +- src/mame/includes/kingobox.h | 6 +- src/mame/includes/kncljoe.h | 2 +- src/mame/includes/kopunch.h | 2 +- src/mame/includes/kyugo.h | 4 +- src/mame/includes/labyrunr.h | 2 +- src/mame/includes/ladybug.h | 2 +- src/mame/includes/ladyfrog.h | 2 +- src/mame/includes/laserbat.h | 20 +-- src/mame/includes/lasso.h | 8 +- src/mame/includes/lastduel.h | 2 +- src/mame/includes/lazercmd.h | 2 +- src/mame/includes/leland.h | 2 +- src/mame/includes/lemmings.h | 2 +- src/mame/includes/lethal.h | 12 +- src/mame/includes/liberate.h | 4 +- src/mame/includes/lkage.h | 6 +- src/mame/includes/lockon.h | 20 +-- src/mame/includes/lsasquad.h | 6 +- src/mame/includes/m10.h | 8 +- src/mame/includes/macrossp.h | 4 +- src/mame/includes/madmotor.h | 4 +- src/mame/includes/mainevt.h | 12 +- src/mame/includes/malzak.h | 6 +- src/mame/includes/marineb.h | 4 +- src/mame/includes/matmania.h | 6 +- src/mame/includes/mcatadv.h | 4 +- src/mame/includes/mermaid.h | 6 +- src/mame/includes/metlclsh.h | 4 +- src/mame/includes/mexico86.h | 8 +- src/mame/includes/micro3d.h | 12 +- src/mame/includes/moo.h | 14 +- src/mame/includes/mouser.h | 4 +- src/mame/includes/mrflea.h | 4 +- src/mame/includes/msisaac.h | 2 +- src/mame/includes/mugsmash.h | 4 +- src/mame/includes/munchmo.h | 4 +- src/mame/includes/mw8080bw.h | 22 +-- src/mame/includes/n8080.h | 2 +- src/mame/includes/naomibd.h | 10 +- src/mame/includes/nemesis.h | 2 +- src/mame/includes/neogeo.h | 6 +- src/mame/includes/ninjaw.h | 28 ++-- src/mame/includes/nitedrvr.h | 4 +- src/mame/includes/nycaptor.h | 8 +- src/mame/includes/ojankohs.h | 4 +- src/mame/includes/oneshot.h | 4 +- src/mame/includes/opwolf.h | 8 +- src/mame/includes/orbit.h | 4 +- src/mame/includes/othunder.h | 26 +-- src/mame/includes/overdriv.h | 18 +- src/mame/includes/parodius.h | 12 +- src/mame/includes/pbaction.h | 4 +- src/mame/includes/pgm.h | 2 +- src/mame/includes/pk8000.h | 2 +- src/mame/includes/pktgaldx.h | 4 +- src/mame/includes/playmark.h | 2 +- src/mame/includes/popper.h | 2 +- src/mame/includes/psikyo.h | 2 +- src/mame/includes/psikyo4.h | 2 +- src/mame/includes/psikyosh.h | 2 +- src/mame/includes/pushman.h | 6 +- src/mame/includes/rainbow.h | 8 +- src/mame/includes/rallyx.h | 2 +- src/mame/includes/rastan.h | 8 +- src/mame/includes/rockrage.h | 6 +- src/mame/includes/rollerg.h | 10 +- src/mame/includes/rungun.h | 14 +- src/mame/includes/segas16.h | 30 ++-- src/mame/includes/segas32.h | 2 +- src/mame/includes/sf.h | 4 +- src/mame/includes/simpsons.h | 12 +- src/mame/includes/skyfox.h | 2 +- src/mame/includes/slapshot.h | 12 +- src/mame/includes/sonson.h | 2 +- src/mame/includes/spy.h | 12 +- src/mame/includes/stfight.h | 2 +- src/mame/includes/supbtime.h | 6 +- src/mame/includes/suprslam.h | 4 +- src/mame/includes/surpratk.h | 8 +- src/mame/includes/system16.h | 4 +- src/mame/includes/tail2nos.h | 6 +- src/mame/includes/taito_b.h | 14 +- src/mame/includes/taito_f2.h | 18 +- src/mame/includes/taito_h.h | 8 +- src/mame/includes/taito_l.h | 4 +- src/mame/includes/taito_o.h | 4 +- src/mame/includes/taito_z.h | 18 +- src/mame/includes/taitoair.h | 6 +- src/mame/includes/thunderx.h | 10 +- src/mame/includes/tmnt.h | 26 +-- src/mame/includes/tnzs.h | 6 +- src/mame/includes/toaplan2.h | 10 +- src/mame/includes/topspeed.h | 12 +- src/mame/includes/tumbleb.h | 6 +- src/mame/includes/tumblep.h | 6 +- src/mame/includes/ultraman.h | 12 +- src/mame/includes/vaportra.h | 6 +- src/mame/includes/vendetta.h | 14 +- src/mame/includes/vertigo.h | 2 +- src/mame/includes/volfied.h | 6 +- src/mame/includes/warriorb.h | 22 +-- src/mame/includes/wgp.h | 10 +- src/mame/includes/xexex.h | 26 +-- src/mame/includes/xmen.h | 16 +- src/mame/includes/yunsun16.h | 2 +- src/mame/includes/yunsung8.h | 2 +- src/mame/includes/zerozone.h | 2 +- src/mame/includes/zodiack.h | 4 +- src/mame/machine/amiga.c | 18 +- src/mame/machine/archimds.c | 4 +- src/mame/machine/asic65.c | 2 +- src/mame/machine/atari.c | 10 +- src/mame/machine/atari_vg.c | 4 +- src/mame/machine/atarifb.c | 12 +- src/mame/machine/atarigen.c | 10 +- src/mame/machine/atarigen.h | 8 +- src/mame/machine/balsente.c | 2 +- src/mame/machine/buggychl.c | 4 +- src/mame/machine/carpolo.c | 34 ++-- src/mame/machine/cubocd32.c | 14 +- src/mame/machine/decocass.c | 16 +- src/mame/machine/decocass.h | 8 +- src/mame/machine/fddebug.c | 6 +- src/mame/machine/galaxold.c | 8 +- src/mame/machine/gaplus.c | 2 +- src/mame/machine/harddriv.c | 6 +- src/mame/machine/konppc.c | 18 +- src/mame/machine/leland.c | 2 +- src/mame/machine/mathbox.c | 4 +- src/mame/machine/mcr.c | 4 +- src/mame/machine/mcr68.c | 4 +- src/mame/machine/mhavoc.c | 2 +- src/mame/machine/micro3d.c | 12 +- src/mame/machine/midwayic.c | 10 +- src/mame/machine/model1.c | 4 +- src/mame/machine/n64.c | 2 +- src/mame/machine/namco06.c | 6 +- src/mame/machine/namco50.c | 14 +- src/mame/machine/namco50.h | 2 +- src/mame/machine/namco51.c | 4 +- src/mame/machine/namco53.c | 8 +- src/mame/machine/namco53.h | 2 +- src/mame/machine/namcoio.c | 14 +- src/mame/machine/namcoio.h | 8 +- src/mame/machine/namcos2.c | 2 +- src/mame/machine/naomibd.c | 14 +- src/mame/machine/nmk004.c | 4 +- src/mame/machine/nmk004.h | 2 +- src/mame/machine/nmk112.c | 4 +- src/mame/machine/pcshare.c | 2 +- src/mame/machine/playch10.c | 14 +- src/mame/machine/qix.c | 4 +- src/mame/machine/s16fd.c | 6 +- src/mame/machine/s24fd.c | 4 +- src/mame/machine/segaic16.c | 20 +-- src/mame/machine/segaic16.h | 4 +- src/mame/machine/segas32.c | 2 +- src/mame/machine/stfight.c | 2 +- src/mame/machine/taitoio.c | 12 +- src/mame/machine/ticket.c | 4 +- src/mame/machine/vertigo.c | 4 +- src/mame/machine/vsnes.c | 8 +- src/mame/machine/williams.c | 20 +-- src/mame/video/cinemat.c | 2 +- src/mame/video/combatsc.c | 4 +- src/mame/video/contra.c | 2 +- src/mame/video/cyberbal.c | 2 +- src/mame/video/deco16ic.c | 32 ++-- src/mame/video/deco16ic.h | 26 +-- src/mame/video/djmain.c | 8 +- src/mame/video/gaelco2.c | 4 +- src/mame/video/galastrm.c | 4 +- src/mame/video/galpanic.c | 2 +- src/mame/video/gameplan.c | 2 +- src/mame/video/genesis.c | 2 +- src/mame/video/gottlieb.c | 2 +- src/mame/video/gp9001.c | 2 +- src/mame/video/groundfx.c | 4 +- src/mame/video/gticlub.c | 2 +- src/mame/video/gunbustr.c | 2 +- src/mame/video/hcastle.c | 2 +- src/mame/video/jaguar.c | 4 +- src/mame/video/kan_pand.c | 14 +- src/mame/video/kan_pand.h | 8 +- src/mame/video/kaneko16.c | 2 +- src/mame/video/konamigx.c | 8 +- src/mame/video/konicdev.c | 264 +++++++++++++++--------------- src/mame/video/konicdev.h | 152 ++++++++--------- src/mame/video/leland.c | 2 +- src/mame/video/mcd212.c | 4 +- src/mame/video/micro3d.c | 2 +- src/mame/video/nbmj8688.c | 6 +- src/mame/video/ninjaw.c | 2 +- src/mame/video/pk8000.c | 2 +- src/mame/video/playch10.c | 6 +- src/mame/video/plygonet.c | 2 +- src/mame/video/ppu2c0x.c | 42 ++--- src/mame/video/ppu2c0x.h | 30 ++-- src/mame/video/psikyo4.c | 4 +- src/mame/video/punchout.c | 8 +- src/mame/video/qdrmfgp.c | 6 +- src/mame/video/qix.c | 2 +- src/mame/video/rohga.c | 2 +- src/mame/video/sega16sp.c | 44 ++--- src/mame/video/segaic16.c | 2 +- src/mame/video/segaic16.h | 30 ++-- src/mame/video/segas18.c | 2 +- src/mame/video/segas32.c | 2 +- src/mame/video/seta.c | 2 +- src/mame/video/skydiver.c | 2 +- src/mame/video/sprint4.c | 2 +- src/mame/video/starcrus.c | 8 +- src/mame/video/subs.c | 6 +- src/mame/video/superchs.c | 2 +- src/mame/video/system1.c | 2 +- src/mame/video/taito_f2.c | 2 +- src/mame/video/taitoic.c | 122 +++++++------- src/mame/video/taitoic.h | 52 +++--- src/mame/video/tbowl.c | 4 +- src/mame/video/tceptor.c | 6 +- src/mame/video/tetrisp2.c | 4 +- src/mame/video/toaplan2.c | 4 +- src/mame/video/triplhnt.c | 2 +- src/mame/video/tx1.c | 12 +- src/mame/video/ultratnk.c | 2 +- src/mame/video/undrfire.c | 8 +- src/mame/video/vrender0.c | 8 +- src/mame/video/vrender0.h | 2 +- src/mame/video/vsnes.c | 8 +- src/mame/video/warriorb.c | 2 +- src/mame/video/wecleman.c | 4 +- src/osd/sdl/debugosx.h | 10 +- src/osd/sdl/debugwin.c | 12 +- src/osd/windows/debugwin.c | 10 +- 1245 files changed, 4164 insertions(+), 4168 deletions(-) diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index 2810463dd55..d9f61810ccd 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -225,7 +225,7 @@ typedef struct { #define LP1 lp1 #define LP2 lp2 -INLINE alpha8201_state *get_safe_token(running_device *device) +INLINE alpha8201_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ALPHA8201 || @@ -730,7 +730,7 @@ static CPU_EXIT( alpha8201 ) * Execute cycles CPU cycles. Return number of cycles really executed ****************************************************************************/ -static void alpha8xxx_execute(running_device *device,const s_opcode *op_map) +static void alpha8xxx_execute(device_t *device,const s_opcode *op_map) { alpha8201_state *cpustate = get_safe_token(device); unsigned opcode; diff --git a/src/emu/cpu/am29000/am29000.c b/src/emu/cpu/am29000/am29000.c index 29086231821..d6aeba286e4 100644 --- a/src/emu/cpu/am29000/am29000.c +++ b/src/emu/cpu/am29000/am29000.c @@ -143,7 +143,7 @@ typedef struct _am29000_state STATE ACCESSORS ***************************************************************************/ -INLINE am29000_state *get_safe_token(running_device *device) +INLINE am29000_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == AM29000); diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c index a7d6bfff8c9..2da00fba36c 100644 --- a/src/emu/cpu/apexc/apexc.c +++ b/src/emu/cpu/apexc/apexc.c @@ -368,7 +368,7 @@ struct _apexc_state #define DELAY(n) {cpustate->icount -= (n); cpustate->current_word = (cpustate->current_word + (n)) & 0x1f;} -INLINE apexc_state *get_safe_token(running_device *device) +INLINE apexc_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == APEXC); diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index f02df9d32b9..420ddef7c8a 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -253,7 +253,7 @@ static void arm_check_irq_state(ARM_REGS* cpustate); /***************************************************************************/ -INLINE ARM_REGS *get_safe_token(running_device *device) +INLINE ARM_REGS *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ARM || device->type() == ARM_BE); diff --git a/src/emu/cpu/arm7/arm7.c b/src/emu/cpu/arm7/arm7.c index 044a4f30c6a..11e6f48ede7 100644 --- a/src/emu/cpu/arm7/arm7.c +++ b/src/emu/cpu/arm7/arm7.c @@ -68,7 +68,7 @@ void arm7_dt_w_callback(arm_state *cpustate, UINT32 insn, UINT32 *prn, void (*wr #define ARM7REG(reg) cpustate->sArmRegister[reg] #define ARM7_ICOUNT cpustate->iCount -INLINE arm_state *get_safe_token(running_device *device) +INLINE arm_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ARM7 || device->type() == ARM7_BE || device->type() == ARM9 || device->type() == ARM920T || device->type() == PXA255); diff --git a/src/emu/cpu/arm7/arm7core.c b/src/emu/cpu/arm7/arm7core.c index 8eb3f2095c1..4b2cd61a55a 100644 --- a/src/emu/cpu/arm7/arm7core.c +++ b/src/emu/cpu/arm7/arm7core.c @@ -556,7 +556,7 @@ static int storeDec(arm_state *cpustate, UINT32 pat, UINT32 rbv) ***************************************************************************/ // CPU INIT -static void arm7_core_init(running_device *device, const char *cpuname) +static void arm7_core_init(device_t *device, const char *cpuname) { arm_state *cpustate = get_safe_token(device); diff --git a/src/emu/cpu/avr8/avr8.c b/src/emu/cpu/avr8/avr8.c index d660561269e..bca90fde00d 100644 --- a/src/emu/cpu/avr8/avr8.c +++ b/src/emu/cpu/avr8/avr8.c @@ -75,7 +75,7 @@ enum #define ZREG ((READ_IO_8(cpustate, 31) << 8) | READ_IO_8(cpustate, 30)) #define SPREG ((READ_IO_8(cpustate, AVR8_IO_SPH) << 8) | READ_IO_8(cpustate, AVR8_IO_SPL)) -INLINE avr8_state *get_safe_token(running_device *device) +INLINE avr8_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == AVR8); diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index 87de54f9d62..939e44acc9d 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -51,7 +51,7 @@ struct _ccpu_state }; -INLINE ccpu_state *get_safe_token(running_device *device) +INLINE ccpu_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == CCPU); @@ -103,7 +103,7 @@ do { \ INITIALIZATION AND SHUTDOWN ***************************************************************************/ -static UINT8 read_jmi(running_device *device) +static UINT8 read_jmi(device_t *device) { /* this routine is called when there is no external input */ /* and the JMI jumper is present */ @@ -112,7 +112,7 @@ static UINT8 read_jmi(running_device *device) } -void ccpu_wdt_timer_trigger(running_device *device) +void ccpu_wdt_timer_trigger(device_t *device) { ccpu_state *cpustate = get_safe_token(device); cpustate->waiting = FALSE; diff --git a/src/emu/cpu/ccpu/ccpu.h b/src/emu/cpu/ccpu/ccpu.h index c59b45529cd..3f679c08bc3 100644 --- a/src/emu/cpu/ccpu/ccpu.h +++ b/src/emu/cpu/ccpu/ccpu.h @@ -38,8 +38,8 @@ enum CONFIG STRUCTURE ***************************************************************************/ -typedef UINT8 (*ccpu_input_func)(running_device *device); -typedef void (*ccpu_vector_func)(running_device *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); +typedef UINT8 (*ccpu_input_func)(device_t *device); +typedef void (*ccpu_vector_func)(device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); typedef struct _ccpu_config ccpu_config; struct _ccpu_config @@ -56,7 +56,7 @@ struct _ccpu_config DECLARE_LEGACY_CPU_DEVICE(CCPU, ccpu); -void ccpu_wdt_timer_trigger(running_device *device); +void ccpu_wdt_timer_trigger(device_t *device); CPU_DISASSEMBLE( ccpu ); diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c index 7c876cd9069..8d0b1b32e3c 100644 --- a/src/emu/cpu/cop400/cop400.c +++ b/src/emu/cpu/cop400/cop400.c @@ -200,7 +200,7 @@ struct _cop400_opcode_map { INLINE FUNCTIONS ***************************************************************************/ -INLINE cop400_state *get_safe_token(running_device *device) +INLINE cop400_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == COP401 || @@ -823,7 +823,7 @@ static TIMER_CALLBACK( microbus_tick ) INITIALIZATION ***************************************************************************/ -static void define_state_table(running_device *device) +static void define_state_table(device_t *device) { cop400_state *cpustate = get_safe_token(device); @@ -943,7 +943,7 @@ static void cop400_init(legacy_cpu_device *device, UINT8 g_mask, UINT8 d_mask, U state_save_register_device_item(device, 0, cpustate->idle); } -static void cop410_init_opcodes(running_device *device) +static void cop410_init_opcodes(device_t *device) { cop400_state *cpustate = get_safe_token(device); int i; @@ -973,7 +973,7 @@ static void cop410_init_opcodes(running_device *device) cpustate->opcode_map = COP410_OPCODE_MAP; } -static void cop420_init_opcodes(running_device *device) +static void cop420_init_opcodes(device_t *device) { cop400_state *cpustate = get_safe_token(device); int i; @@ -1007,7 +1007,7 @@ static void cop420_init_opcodes(running_device *device) cpustate->opcode_map = COP420_OPCODE_MAP; } -static void cop444_init_opcodes(running_device *device) +static void cop444_init_opcodes(device_t *device) { cop400_state *cpustate = get_safe_token(device); int i; diff --git a/src/emu/cpu/cosmac/cosmac.h b/src/emu/cpu/cosmac/cosmac.h index 042e18910a9..834fa13b4b0 100644 --- a/src/emu/cpu/cosmac/cosmac.h +++ b/src/emu/cpu/cosmac/cosmac.h @@ -114,8 +114,8 @@ extern const device_type COSMAC; // TYPE DEFINITIONS //************************************************************************** -typedef void (*cosmac_out_sc_func)(running_device *device, cosmac_state_code sc); -#define COSMAC_SC_WRITE(name) void name(running_device *device, cosmac_state_code sc) +typedef void (*cosmac_out_sc_func)(device_t *device, cosmac_state_code sc); +#define COSMAC_SC_WRITE(name) void name(device_t *device, cosmac_state_code sc) // ======================> cosmac_interface diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c index 8a6a81824a4..5e8e5d48aec 100644 --- a/src/emu/cpu/cp1610/cp1610.c +++ b/src/emu/cpu/cp1610/cp1610.c @@ -51,7 +51,7 @@ struct _cp1610_state int icount; }; -INLINE cp1610_state *get_safe_token(running_device *device) +INLINE cp1610_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == CP1610); diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.c b/src/emu/cpu/cubeqcpu/cubeqcpu.c index de507f08c32..2bb19b32160 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.c +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.c @@ -196,21 +196,21 @@ typedef struct STATE ACCESSORS ***************************************************************************/ -INLINE cquestsnd_state *get_safe_token_snd(running_device *device) +INLINE cquestsnd_state *get_safe_token_snd(device_t *device) { assert(device != NULL); assert(device->type() == CQUESTSND); return (cquestsnd_state *)downcast(device)->token(); } -INLINE cquestrot_state *get_safe_token_rot(running_device *device) +INLINE cquestrot_state *get_safe_token_rot(device_t *device) { assert(device != NULL); assert(device->type() == CQUESTROT); return (cquestrot_state *)downcast(device)->token(); } -INLINE cquestlin_state *get_safe_token_lin(running_device *device) +INLINE cquestlin_state *get_safe_token_lin(device_t *device) { assert(device != NULL); assert(device->type() == CQUESTLIN); @@ -255,7 +255,7 @@ static STATE_POSTLOAD( cquestsnd_postload ) } -static void cquestsnd_state_register(running_device *device) +static void cquestsnd_state_register(device_t *device) { cquestsnd_state *cpustate = get_safe_token_snd(device); state_save_register_device_item_array(device, 0, cpustate->ram); @@ -320,7 +320,7 @@ static STATE_POSTLOAD( cquestrot_postload ) } -static void cquestrot_state_register(running_device *device) +static void cquestrot_state_register(device_t *device) { cquestrot_state *cpustate = get_safe_token_rot(device); state_save_register_device_item_array(device, 0, cpustate->ram); @@ -399,7 +399,7 @@ static STATE_POSTLOAD( cquestlin_postload ) } -static void cquestlin_state_register(running_device *device) +static void cquestlin_state_register(device_t *device) { cquestlin_state *cpustate = get_safe_token_lin(device); @@ -1142,26 +1142,26 @@ INLINE int do_linjmp(cquestlin_state *cpustate, int jmp) -void cubeqcpu_swap_line_banks(running_device *device) +void cubeqcpu_swap_line_banks(device_t *device) { cquestlin_state *cpustate = get_safe_token_lin(device); cpustate->field = cpustate->field ^ 1; } -void cubeqcpu_clear_stack(running_device *device) +void cubeqcpu_clear_stack(device_t *device) { cquestlin_state *cpustate = get_safe_token_lin(device); memset(&cpustate->ptr_ram[cpustate->field * 256], 0, 256); } -UINT8 cubeqcpu_get_ptr_ram_val(running_device *device, int i) +UINT8 cubeqcpu_get_ptr_ram_val(device_t *device, int i) { cquestlin_state *cpustate = get_safe_token_lin(device); return cpustate->ptr_ram[(VISIBLE_FIELD * 256) + i]; } -UINT32* cubeqcpu_get_stack_ram(running_device *device) +UINT32* cubeqcpu_get_stack_ram(device_t *device) { cquestlin_state *cpustate = get_safe_token_lin(device); if (VISIBLE_FIELD == ODD_FIELD) diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.h b/src/emu/cpu/cubeqcpu/cubeqcpu.h index b3352786b88..8b0abd60e31 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.h +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.h @@ -116,7 +116,7 @@ enum CONFIGURATION STRUCTURE ***************************************************************************/ -typedef void (*cubeqst_dac_w_func)(running_device *, UINT16); +typedef void (*cubeqst_dac_w_func)(device_t *, UINT16); typedef struct _cubeqst_snd_config cubeqst_snd_config; struct _cubeqst_snd_config @@ -148,11 +148,11 @@ extern WRITE16_DEVICE_HANDLER( cubeqcpu_sndram_w ); extern READ16_DEVICE_HANDLER( cubeqcpu_rotram_r ); extern WRITE16_DEVICE_HANDLER( cubeqcpu_rotram_w ); -void cubeqcpu_swap_line_banks(running_device *device); +void cubeqcpu_swap_line_banks(device_t *device); -void cubeqcpu_clear_stack(running_device *device); -UINT8 cubeqcpu_get_ptr_ram_val(running_device *device, int i); -UINT32* cubeqcpu_get_stack_ram(running_device *device); +void cubeqcpu_clear_stack(device_t *device); +UINT8 cubeqcpu_get_ptr_ram_val(device_t *device, int i); +UINT32* cubeqcpu_get_stack_ram(device_t *device); DECLARE_LEGACY_CPU_DEVICE(CQUESTSND, cquestsnd); DECLARE_LEGACY_CPU_DEVICE(CQUESTROT, cquestrot); diff --git a/src/emu/cpu/drcbec.c b/src/emu/cpu/drcbec.c index 485ae4feb17..e5b8b9fe8df 100644 --- a/src/emu/cpu/drcbec.c +++ b/src/emu/cpu/drcbec.c @@ -212,7 +212,7 @@ enum /* internal backend-specific state */ struct _drcbe_state { - running_device * device; /* CPU device we are associated with */ + device_t * device; /* CPU device we are associated with */ address_space * space[ADDRESS_SPACES]; /* pointers to CPU's address space */ drcuml_state * drcuml; /* pointer back to our owner */ drccache * cache; /* pointer to the cache */ @@ -254,7 +254,7 @@ union _drcbec_instruction ***************************************************************************/ /* primary back-end callbacks */ -static drcbe_state *drcbec_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits); +static drcbe_state *drcbec_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits); static void drcbec_free(drcbe_state *drcbe); static void drcbec_reset(drcbe_state *drcbe); static int drcbec_execute(drcbe_state *state, drcuml_codehandle *entry); @@ -340,7 +340,7 @@ extern const drcbe_interface drcbe_c_be_interface = state -------------------------------------------------*/ -static drcbe_state *drcbec_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits) +static drcbe_state *drcbec_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits) { int spacenum; diff --git a/src/emu/cpu/drcbex64.c b/src/emu/cpu/drcbex64.c index 81c95b50bef..79d03f46824 100644 --- a/src/emu/cpu/drcbex64.c +++ b/src/emu/cpu/drcbex64.c @@ -262,7 +262,7 @@ struct _opcode_table_entry /* internal backend-specific state */ struct _drcbe_state { - running_device * device; /* CPU device we are associated with */ + device_t * device; /* CPU device we are associated with */ drcuml_state * drcuml; /* pointer back to our owner */ drccache * cache; /* pointer to the cache */ drcuml_machine_state state; /* state of the machine */ @@ -306,7 +306,7 @@ struct _drcbe_state ***************************************************************************/ /* primary back-end callbacks */ -static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits); +static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits); static void drcbex64_free(drcbe_state *drcbe); static void drcbex64_reset(drcbe_state *drcbe); static int drcbex64_execute(drcbe_state *drcbe, drcuml_codehandle *entry); @@ -684,7 +684,7 @@ INLINE void emit_smart_call_m64(drcbe_state *drcbe, x86code **dst, x86code **tar state -------------------------------------------------*/ -static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits) +static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits) { /* SSE control register mapping */ static const UINT32 sse_control[4] = diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c index ced858d1380..d0e889213eb 100644 --- a/src/emu/cpu/drcbex86.c +++ b/src/emu/cpu/drcbex86.c @@ -154,7 +154,7 @@ struct _opcode_table_entry /* internal backend-specific state */ struct _drcbe_state { - running_device * device; /* CPU device we are associated with */ + device_t * device; /* CPU device we are associated with */ drcuml_state * drcuml; /* pointer back to our owner */ drccache * cache; /* pointer to the cache */ drcuml_machine_state state; /* state of the machine */ @@ -201,7 +201,7 @@ struct _drcbe_state ***************************************************************************/ /* primary back-end callbacks */ -static drcbe_state *drcbex86_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits); +static drcbe_state *drcbex86_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits); static void drcbex86_free(drcbe_state *drcbe); static void drcbex86_reset(drcbe_state *drcbe); static int drcbex86_execute(drcbe_state *drcbe, drcuml_codehandle *entry); @@ -614,7 +614,7 @@ INLINE void track_resolve_link(drcbe_state *drcbe, x86code **destptr, const emit state -------------------------------------------------*/ -static drcbe_state *drcbex86_alloc(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits) +static drcbe_state *drcbex86_alloc(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits) { int opnum, regnum, entry, spacenum; drcbe_state *drcbe; diff --git a/src/emu/cpu/drcfe.c b/src/emu/cpu/drcfe.c index 1e9c41e5c20..c4dee7cc9aa 100644 --- a/src/emu/cpu/drcfe.c +++ b/src/emu/cpu/drcfe.c @@ -120,7 +120,7 @@ INLINE void desc_free(drcfe_state *drcfe, opcode_desc *desc) drcfe_init - initializate the drcfe state -------------------------------------------------*/ -drcfe_state *drcfe_init(running_device *cpu, const drcfe_config *config, void *param) +drcfe_state *drcfe_init(device_t *cpu, const drcfe_config *config, void *param) { drcfe_state *drcfe; diff --git a/src/emu/cpu/drcfe.h b/src/emu/cpu/drcfe.h index 6510ebf6675..38de85a6ccf 100644 --- a/src/emu/cpu/drcfe.h +++ b/src/emu/cpu/drcfe.h @@ -149,7 +149,7 @@ struct _drcfe_config ***************************************************************************/ /* initializate the drcfe state */ -drcfe_state *drcfe_init(running_device *cpu, const drcfe_config *config, void *param); +drcfe_state *drcfe_init(device_t *cpu, const drcfe_config *config, void *param); /* clean up after ourselves */ void drcfe_exit(drcfe_state *drcfe); diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c index 7d38967cb15..8f1e7f2b5fd 100644 --- a/src/emu/cpu/drcuml.c +++ b/src/emu/cpu/drcuml.c @@ -135,7 +135,7 @@ struct _drcuml_symbol /* structure describing UML generation state */ struct _drcuml_state { - running_device * device; /* CPU device we are associated with */ + device_t * device; /* CPU device we are associated with */ drccache * cache; /* pointer to the codegen cache */ drcuml_block * blocklist; /* list of active blocks */ const drcbe_interface * beintf; /* backend interface pointer */ @@ -538,7 +538,7 @@ INLINE void convert_to_mov_param(drcuml_instruction *inst, int pnum) generator and initialize the back-end -------------------------------------------------*/ -drcuml_state *drcuml_alloc(running_device *device, drccache *cache, UINT32 flags, int modes, int addrbits, int ignorebits) +drcuml_state *drcuml_alloc(device_t *device, drccache *cache, UINT32 flags, int modes, int addrbits, int ignorebits) { drcuml_state *drcuml; int opnum; diff --git a/src/emu/cpu/drcuml.h b/src/emu/cpu/drcuml.h index 6223d2f1252..5c6ad1ac563 100644 --- a/src/emu/cpu/drcuml.h +++ b/src/emu/cpu/drcuml.h @@ -417,7 +417,7 @@ struct _drcbe_info /* typedefs for back-end callback functions */ -typedef drcbe_state *(*drcbe_alloc_func)(drcuml_state *drcuml, drccache *cache, running_device *device, UINT32 flags, int modes, int addrbits, int ignorebits); +typedef drcbe_state *(*drcbe_alloc_func)(drcuml_state *drcuml, drccache *cache, device_t *device, UINT32 flags, int modes, int addrbits, int ignorebits); typedef void (*drcbe_free_func)(drcbe_state *state); typedef void (*drcbe_reset_func)(drcbe_state *state); typedef int (*drcbe_execute_func)(drcbe_state *state, drcuml_codehandle *entry); @@ -448,7 +448,7 @@ struct _drcbe_interface /* ----- initialization/teardown ----- */ /* allocate state for the code generator and initialize the back-end */ -drcuml_state *drcuml_alloc(running_device *device, drccache *cache, UINT32 flags, int modes, int addrbits, int ignorebits); +drcuml_state *drcuml_alloc(device_t *device, drccache *cache, UINT32 flags, int modes, int addrbits, int ignorebits); /* return information about the back-end */ void drcuml_get_backend_info(drcuml_state *drcuml, drcbe_info *info); diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c index 37bda3a02ae..444f8f41c22 100644 --- a/src/emu/cpu/dsp32/dsp32.c +++ b/src/emu/cpu/dsp32/dsp32.c @@ -183,7 +183,7 @@ struct _dsp32_state int icount; UINT8 lastpins; UINT32 ppc; - void (*output_pins_changed)(running_device *device, UINT32 pins); + void (*output_pins_changed)(device_t *device, UINT32 pins); legacy_cpu_device * device; address_space *program; direct_read_data *direct; @@ -203,7 +203,7 @@ static CPU_RESET( dsp32c ); STATE ACCESSORS ***************************************************************************/ -INLINE dsp32_state *get_safe_token(running_device *device) +INLINE dsp32_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DSP32C); @@ -310,7 +310,7 @@ static void update_pcr(dsp32_state *cpustate, UINT16 newval) INITIALIZATION AND SHUTDOWN ***************************************************************************/ -static void dsp32_register_save( running_device *device ) +static void dsp32_register_save( device_t *device ) { dsp32_state *cpustate = get_safe_token(device); @@ -538,7 +538,7 @@ INLINE void dma_store(dsp32_state *cpustate) } -void dsp32c_pio_w(running_device *device, int reg, int data) +void dsp32c_pio_w(device_t *device, int reg, int data) { dsp32_state *cpustate = get_safe_token(device); UINT16 mask; @@ -617,7 +617,7 @@ void dsp32c_pio_w(running_device *device, int reg, int data) PARALLEL INTERFACE READS ***************************************************************************/ -int dsp32c_pio_r(running_device *device, int reg) +int dsp32c_pio_r(device_t *device, int reg) { dsp32_state *cpustate = get_safe_token(device); UINT16 mask, result = 0xffff; diff --git a/src/emu/cpu/dsp32/dsp32.h b/src/emu/cpu/dsp32/dsp32.h index 421f9ed44fc..ff1ff36ec06 100644 --- a/src/emu/cpu/dsp32/dsp32.h +++ b/src/emu/cpu/dsp32/dsp32.h @@ -67,7 +67,7 @@ enum typedef struct _dsp32_config dsp32_config; struct _dsp32_config { - void (*output_pins_changed)(running_device *device, UINT32 pins); /* a change has occurred on an output pin */ + void (*output_pins_changed)(device_t *device, UINT32 pins); /* a change has occurred on an output pin */ }; @@ -78,7 +78,7 @@ struct _dsp32_config DECLARE_LEGACY_CPU_DEVICE(DSP32C, dsp32c); -extern void dsp32c_pio_w(running_device *device, int reg, int data); -extern int dsp32c_pio_r(running_device *device, int reg); +extern void dsp32c_pio_w(device_t *device, int reg, int data); +extern int dsp32c_pio_r(device_t *device, int reg); #endif /* __DSP32_H__ */ diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index 12a51706abd..b7b2cbd16d8 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -162,7 +162,7 @@ static void set_irq_line(dsp56k_core* cpustate, int irqline, int state) /*************************************************************************** INITIALIZATION AND SHUTDOWN ***************************************************************************/ -static void agu_init(dsp56k_core* cpustate, running_device *device) +static void agu_init(dsp56k_core* cpustate, device_t *device) { /* save states - dsp56k_agu members */ state_save_register_device_item(device, 0, cpustate->AGU.r0); @@ -180,7 +180,7 @@ static void agu_init(dsp56k_core* cpustate, running_device *device) state_save_register_device_item(device, 0, cpustate->AGU.temp); } -static void alu_init(dsp56k_core* cpustate, running_device *device) +static void alu_init(dsp56k_core* cpustate, device_t *device) { /* save states - dsp56k_alu members */ state_save_register_device_item(device, 0, cpustate->ALU.x); diff --git a/src/emu/cpu/dsp56k/dsp56k.h b/src/emu/cpu/dsp56k/dsp56k.h index 02a5ee9f0a9..16f768d8a89 100644 --- a/src/emu/cpu/dsp56k/dsp56k.h +++ b/src/emu/cpu/dsp56k/dsp56k.h @@ -200,7 +200,7 @@ typedef struct } dsp56k_core; -INLINE dsp56k_core *get_safe_token(running_device *device) +INLINE dsp56k_core *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DSP56156); @@ -211,9 +211,9 @@ INLINE dsp56k_core *get_safe_token(running_device *device) /*************************************************************************** PUBLIC FUNCTIONS - ACCESSIBLE TO DRIVERS ***************************************************************************/ -void dsp56k_host_interface_write(running_device* device, UINT8 offset, UINT8 data); -UINT8 dsp56k_host_interface_read(running_device* device, UINT8 offset); +void dsp56k_host_interface_write(device_t* device, UINT8 offset, UINT8 data); +UINT8 dsp56k_host_interface_read(device_t* device, UINT8 offset); -UINT16 dsp56k_get_peripheral_memory(running_device* device, UINT16 addr); +UINT16 dsp56k_get_peripheral_memory(device_t* device, UINT16 addr); #endif /* __DSP56K_H__ */ diff --git a/src/emu/cpu/dsp56k/dsp56mem.c b/src/emu/cpu/dsp56k/dsp56mem.c index 533ebd8caf1..64606a4f4eb 100644 --- a/src/emu/cpu/dsp56k/dsp56mem.c +++ b/src/emu/cpu/dsp56k/dsp56mem.c @@ -790,7 +790,7 @@ WRITE16_HANDLER( peripheral_register_w ) /* These two functions are exposed to the outside world */ /* They represent the host side of the dsp56k's host interface */ -void dsp56k_host_interface_write(running_device* device, UINT8 offset, UINT8 data) +void dsp56k_host_interface_write(device_t* device, UINT8 offset, UINT8 data) { dsp56k_core* cpustate = get_safe_token(device); @@ -886,7 +886,7 @@ void dsp56k_host_interface_write(running_device* device, UINT8 offset, UINT8 dat } } -UINT8 dsp56k_host_interface_read(running_device* device, UINT8 offset) +UINT8 dsp56k_host_interface_read(device_t* device, UINT8 offset) { dsp56k_core* cpustate = get_safe_token(device); @@ -953,7 +953,7 @@ UINT8 dsp56k_host_interface_read(running_device* device, UINT8 offset) } /* MISC*/ -UINT16 dsp56k_get_peripheral_memory(running_device* device, UINT16 addr) +UINT16 dsp56k_get_peripheral_memory(device_t* device, UINT16 addr) { dsp56k_core* cpustate = get_safe_token(device); return cpustate->peripheral_ram[A2O(addr)]; diff --git a/src/emu/cpu/dsp56k/dsp56pcu.c b/src/emu/cpu/dsp56k/dsp56pcu.c index cc43f6bfb32..52876ebf9db 100644 --- a/src/emu/cpu/dsp56k/dsp56pcu.c +++ b/src/emu/cpu/dsp56k/dsp56pcu.c @@ -96,7 +96,7 @@ UINT8 SE_bit(dsp56k_core* cpustate) { return ((SP & 0x0010) != 0); } /*************************************************************************** INITIALIZATION AND RESET ***************************************************************************/ -void pcu_init(dsp56k_core* cpustate, running_device *device) +void pcu_init(dsp56k_core* cpustate, device_t *device) { /* Init the irq table */ dsp56k_irq_table_init(); diff --git a/src/emu/cpu/dsp56k/dsp56pcu.h b/src/emu/cpu/dsp56k/dsp56pcu.h index ed9eca416fa..b7e72a1e5f9 100644 --- a/src/emu/cpu/dsp56k/dsp56pcu.h +++ b/src/emu/cpu/dsp56k/dsp56pcu.h @@ -10,7 +10,7 @@ namespace DSP56K PCU ***************************************************************************/ void pcu_reset(dsp56k_core* cpustate); -void pcu_init(dsp56k_core* cpustate, running_device *device); +void pcu_init(dsp56k_core* cpustate, device_t *device); #define PC (cpustate->PCU.pc) #define LA (cpustate->PCU.la) #define LC (cpustate->PCU.lc) diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index 7e2d45b8d50..d7212e22a87 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -414,7 +414,7 @@ static ADDRESS_MAP_START( e132_16k_iram_map, ADDRESS_SPACE_PROGRAM, 32 ) ADDRESS_MAP_END -INLINE hyperstone_state *get_safe_token(running_device *device) +INLINE hyperstone_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == E116T || diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c index 22ce74c4a23..3fca88e4115 100644 --- a/src/emu/cpu/esrip/esrip.c +++ b/src/emu/cpu/esrip/esrip.c @@ -121,7 +121,7 @@ typedef struct } esrip_state; -INLINE esrip_state *get_safe_token(running_device *device) +INLINE esrip_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ESRIP); @@ -133,7 +133,7 @@ INLINE esrip_state *get_safe_token(running_device *device) PUBLIC FUNCTIONS ***************************************************************************/ -UINT8 get_rip_status(running_device *cpu) +UINT8 get_rip_status(device_t *cpu) { esrip_state *cpustate = get_safe_token(cpu); return cpustate->status_out; diff --git a/src/emu/cpu/esrip/esrip.h b/src/emu/cpu/esrip/esrip.h index fd6b7569fd3..8935136b689 100644 --- a/src/emu/cpu/esrip/esrip.h +++ b/src/emu/cpu/esrip/esrip.h @@ -96,6 +96,6 @@ struct _esrip_config_ DECLARE_LEGACY_CPU_DEVICE(ESRIP, esrip); -extern UINT8 get_rip_status(running_device *cpu); +extern UINT8 get_rip_status(device_t *cpu); #endif /* _ESRIP_H */ diff --git a/src/emu/cpu/f8/f8.c b/src/emu/cpu/f8/f8.c index 84b431fd85a..7a3e0266b3e 100644 --- a/src/emu/cpu/f8/f8.c +++ b/src/emu/cpu/f8/f8.c @@ -62,7 +62,7 @@ struct _f8_Regs int irq_request; }; -INLINE f8_Regs *get_safe_token(running_device *device) +INLINE f8_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == F8); diff --git a/src/emu/cpu/g65816/g65816.c b/src/emu/cpu/g65816/g65816.c index f762741b046..a54a6c93962 100644 --- a/src/emu/cpu/g65816/g65816.c +++ b/src/emu/cpu/g65816/g65816.c @@ -95,7 +95,7 @@ TODO general: #include "emu.h" #include "g65816.h" -INLINE g65816i_cpu_struct *get_safe_token(running_device *device) +INLINE g65816i_cpu_struct *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == G65816 || device->type() == _5A22); @@ -406,7 +406,7 @@ static CPU_SET_INFO( g65816 ) -void g65816_set_read_vector_callback(running_device *device, read8_space_func read_vector) +void g65816_set_read_vector_callback(device_t *device, read8_space_func read_vector) { g65816i_cpu_struct *cpustate = get_safe_token(device); READ_VECTOR = read_vector; diff --git a/src/emu/cpu/g65816/g65816.h b/src/emu/cpu/g65816/g65816.h index 831bdafad66..941cb4faa8a 100644 --- a/src/emu/cpu/g65816/g65816.h +++ b/src/emu/cpu/g65816/g65816.h @@ -64,7 +64,7 @@ DECLARE_LEGACY_CPU_DEVICE(_5A22, _5a22); #define CPU_TYPE_5A22 1 -void g65816_set_read_vector_callback(running_device *device, read8_space_func read_vector); +void g65816_set_read_vector_callback(device_t *device, read8_space_func read_vector); /* ======================================================================== */ diff --git a/src/emu/cpu/h6280/h6280.c b/src/emu/cpu/h6280/h6280.c index 06a700e5baf..f30e49381f7 100644 --- a/src/emu/cpu/h6280/h6280.c +++ b/src/emu/cpu/h6280/h6280.c @@ -117,7 +117,7 @@ static void set_irq_line(h6280_Regs* cpustate, int irqline, int state); /* include the macros */ #include "h6280ops.h" -INLINE h6280_Regs *get_safe_token(running_device *device) +INLINE h6280_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == H6280); @@ -359,12 +359,12 @@ static CPU_TRANSLATE( h6280 ) return TRUE; } -UINT8 h6280io_get_buffer(running_device *device) +UINT8 h6280io_get_buffer(device_t *device) { h6280_Regs* cpustate = get_safe_token(device); return cpustate->io_buffer; } -void h6280io_set_buffer(running_device *device, UINT8 data) +void h6280io_set_buffer(device_t *device, UINT8 data) { h6280_Regs* cpustate = get_safe_token(device); cpustate->io_buffer=data; diff --git a/src/emu/cpu/h6280/h6280.h b/src/emu/cpu/h6280/h6280.h index e456581db6f..568d5b9a3d5 100644 --- a/src/emu/cpu/h6280/h6280.h +++ b/src/emu/cpu/h6280/h6280.h @@ -82,8 +82,8 @@ READ8_HANDLER( h6280_timer_r ); WRITE8_HANDLER( h6280_timer_w ); /* functions for use by the PSG and joypad port only! */ -UINT8 h6280io_get_buffer(running_device*); -void h6280io_set_buffer(running_device*, UINT8); +UINT8 h6280io_get_buffer(device_t*); +void h6280io_set_buffer(device_t*, UINT8); CPU_DISASSEMBLE( h6280 ); diff --git a/src/emu/cpu/h83002/h8priv.h b/src/emu/cpu/h83002/h8priv.h index 3332c6049d0..1cef76b3597 100644 --- a/src/emu/cpu/h83002/h8priv.h +++ b/src/emu/cpu/h83002/h8priv.h @@ -47,7 +47,7 @@ struct _h83xx_state int mode_8bit; }; -INLINE h83xx_state *get_safe_token(running_device *device) +INLINE h83xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == H83002 || diff --git a/src/emu/cpu/hcd62121/hcd62121.c b/src/emu/cpu/hcd62121/hcd62121.c index 446b4818985..1fda7286391 100644 --- a/src/emu/cpu/hcd62121/hcd62121.c +++ b/src/emu/cpu/hcd62121/hcd62121.c @@ -302,7 +302,7 @@ INLINE int check_cond( hcd62121_state *cpustate, UINT8 op ) } -INLINE hcd62121_state *get_safe_token(running_device *device) +INLINE hcd62121_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == HCD62121); diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c index 2afc4efe00c..74602866f5a 100644 --- a/src/emu/cpu/hd6309/hd6309.c +++ b/src/emu/cpu/hd6309/hd6309.c @@ -152,7 +152,7 @@ struct _m68_state_t UINT8 const *index_cycle; }; -INLINE m68_state_t *get_safe_token(running_device *device) +INLINE m68_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == HD6309); @@ -505,7 +505,7 @@ static void check_irq_lines( m68_state_t *m68_state ) static STATE_POSTLOAD( hd6309_postload ) { - running_device *device = (legacy_cpu_device *)param; + device_t *device = (legacy_cpu_device *)param; m68_state_t *m68_state = get_safe_token(device); UpdateState(m68_state); diff --git a/src/emu/cpu/i386/i386priv.h b/src/emu/cpu/i386/i386priv.h index 1ef65dfbd2b..56cd1701959 100644 --- a/src/emu/cpu/i386/i386priv.h +++ b/src/emu/cpu/i386/i386priv.h @@ -258,7 +258,7 @@ struct _i386_state UINT8 *cycle_table_rm; }; -INLINE i386_state *get_safe_token(running_device *device) +INLINE i386_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I386 || diff --git a/src/emu/cpu/i4004/i4004.c b/src/emu/cpu/i4004/i4004.c index cf670e261b3..3e886a5d667 100644 --- a/src/emu/cpu/i4004/i4004.c +++ b/src/emu/cpu/i4004/i4004.c @@ -52,7 +52,7 @@ struct _i4004_state INLINE FUNCTIONS ***************************************************************************/ -INLINE i4004_state *get_safe_token(running_device *device) +INLINE i4004_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I4004); @@ -155,7 +155,7 @@ INLINE void POP_STACK(i4004_state *cpustate) cpustate->pc_pos = (cpustate->pc_pos - 1) & cpustate->addr_mask; } -void i4004_set_test(running_device *device, UINT8 val) +void i4004_set_test(device_t *device, UINT8 val) { i4004_state *cpustate = get_safe_token(device); cpustate->TEST = val; diff --git a/src/emu/cpu/i4004/i4004.h b/src/emu/cpu/i4004/i4004.h index 4d0fedea8ac..4adaf7f772c 100644 --- a/src/emu/cpu/i4004/i4004.h +++ b/src/emu/cpu/i4004/i4004.h @@ -30,5 +30,5 @@ DECLARE_LEGACY_CPU_DEVICE(I4004, i4004); CPU_DISASSEMBLE( i4004 ); -void i4004_set_test(running_device *device, UINT8 val); +void i4004_set_test(device_t *device, UINT8 val); #endif diff --git a/src/emu/cpu/i8008/i8008.c b/src/emu/cpu/i8008/i8008.c index b2bea1463ee..c59f5471dc9 100644 --- a/src/emu/cpu/i8008/i8008.c +++ b/src/emu/cpu/i8008/i8008.c @@ -55,7 +55,7 @@ struct _i8008_state INLINE FUNCTIONS ***************************************************************************/ -INLINE i8008_state *get_safe_token(running_device *device) +INLINE i8008_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I8008); diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index ea5e73d0f85..c02c31cbbad 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -273,7 +273,7 @@ static void execute_one(i8085_state *cpustate, int opcode); INLINE FUNCTIONS ***************************************************************************/ -INLINE i8085_state *get_safe_token(running_device *device) +INLINE i8085_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I8080 || diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index 7ada6251f9f..2f3fefd1601 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -82,7 +82,7 @@ struct _i80286_state UINT8 ea_seg; /* effective segment of the address */ }; -INLINE i80286_state *get_safe_token(running_device *device) +INLINE i80286_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I80286); diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index f8187b4ac45..14b20478267 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -72,7 +72,7 @@ struct _i8086_state devcb_resolved_write_line out_tmrout1_func; }; -INLINE i8086_state *get_safe_token(running_device *device) +INLINE i8086_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I8086 || @@ -111,7 +111,7 @@ static UINT8 parity_table[256]; /***************************************************************************/ -static void i8086_state_register(running_device *device) +static void i8086_state_register(device_t *device) { i8086_state *cpustate = get_safe_token(device); state_save_register_device_item_array(device, 0, cpustate->regs.w); diff --git a/src/emu/cpu/i860/i860.h b/src/emu/cpu/i860/i860.h index aa5692612f6..8f3d4a8d74e 100644 --- a/src/emu/cpu/i860/i860.h +++ b/src/emu/cpu/i860/i860.h @@ -175,7 +175,7 @@ typedef struct { } i860_state_t; -INLINE i860_state_t *get_safe_token(running_device *device) +INLINE i860_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I860); @@ -193,7 +193,7 @@ extern void i860_gen_interrupt(i860_state_t*); /* This is the external interface for asserting/deasserting a pin on the i860. */ -extern void i860_set_pin(running_device *, int, int); +extern void i860_set_pin(device_t *, int, int); /* Hard or soft reset. */ extern void reset_i860(i860_state_t*); diff --git a/src/emu/cpu/i860/i860dec.c b/src/emu/cpu/i860/i860dec.c index 27dc6ab52e7..31323b2b612 100644 --- a/src/emu/cpu/i860/i860dec.c +++ b/src/emu/cpu/i860/i860dec.c @@ -309,7 +309,7 @@ static int has_delay_slot(UINT32 insn) /* This is the external interface for asserting/deasserting pins on the i860. */ -void i860_set_pin (running_device *device, int pin, int val) +void i860_set_pin (device_t *device, int pin, int val) { i860s *cpustate = get_safe_token(device); if (pin == DEC_PIN_BUS_HOLD) diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index eb97f15fea8..1d35004dcc5 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -41,7 +41,7 @@ struct _i960_state_t { int icount; }; -INLINE i960_state_t *get_safe_token(running_device *device) +INLINE i960_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I960); @@ -2217,13 +2217,13 @@ CPU_GET_INFO( i960 ) // call from any read/write handler for a memory area that can't be bursted // on the real hardware (e.g. Model 2's interrupt control registers) -void i960_noburst(running_device *device) +void i960_noburst(device_t *device) { i960_state_t *i960 = get_safe_token(device); i960->bursting = 0; } -void i960_stall(running_device *device) +void i960_stall(device_t *device) { i960_state_t *i960 = get_safe_token(device); i960->IP = i960->PIP; diff --git a/src/emu/cpu/i960/i960.h b/src/emu/cpu/i960/i960.h index d299b968560..3b06f5bf437 100644 --- a/src/emu/cpu/i960/i960.h +++ b/src/emu/cpu/i960/i960.h @@ -62,7 +62,7 @@ enum DECLARE_LEGACY_CPU_DEVICE(I960, i960); -void i960_noburst(running_device *device); -void i960_stall(running_device *device); +void i960_noburst(device_t *device); +void i960_stall(device_t *device); #endif /* __I960_H__ */ diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index aaae363a8d7..ddcf2c7df91 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -249,7 +249,7 @@ static void (*const dsp_op_table[64])(jaguar_state *jaguar, UINT16 op) = INLINE FUNCTIONS ***************************************************************************/ -INLINE jaguar_state *get_safe_token(running_device *device) +INLINE jaguar_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == JAGUARGPU || @@ -1237,7 +1237,7 @@ void xor_rn_rn(jaguar_state *jaguar, UINT16 op) I/O HANDLING ***************************************************************************/ -UINT32 jaguargpu_ctrl_r(running_device *device, offs_t offset) +UINT32 jaguargpu_ctrl_r(device_t *device, offs_t offset) { jaguar_state *jaguar = get_safe_token(device); @@ -1247,7 +1247,7 @@ UINT32 jaguargpu_ctrl_r(running_device *device, offs_t offset) } -void jaguargpu_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask) +void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask) { jaguar_state *jaguar = get_safe_token(device); UINT32 oldval, newval; @@ -1333,7 +1333,7 @@ void jaguargpu_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 I/O HANDLING ***************************************************************************/ -UINT32 jaguardsp_ctrl_r(running_device *device, offs_t offset) +UINT32 jaguardsp_ctrl_r(device_t *device, offs_t offset) { jaguar_state *jaguar = get_safe_token(device); @@ -1345,7 +1345,7 @@ UINT32 jaguardsp_ctrl_r(running_device *device, offs_t offset) } -void jaguardsp_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask) +void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask) { jaguar_state *jaguar = get_safe_token(device); UINT32 oldval, newval; diff --git a/src/emu/cpu/jaguar/jaguar.h b/src/emu/cpu/jaguar/jaguar.h index ef01031dce0..a29da2384d4 100644 --- a/src/emu/cpu/jaguar/jaguar.h +++ b/src/emu/cpu/jaguar/jaguar.h @@ -71,7 +71,7 @@ enum CONFIGURATION STRUCTURE ***************************************************************************/ -typedef void (*jaguar_int_func)(running_device *device); +typedef void (*jaguar_int_func)(device_t *device); typedef struct _jaguar_cpu_config jaguar_cpu_config; @@ -100,12 +100,12 @@ struct _jaguar_cpu_config ***************************************************************************/ DECLARE_LEGACY_CPU_DEVICE(JAGUARGPU, jaguargpu); -extern void jaguargpu_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask); -extern UINT32 jaguargpu_ctrl_r(running_device *device, offs_t offset); +extern void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask); +extern UINT32 jaguargpu_ctrl_r(device_t *device, offs_t offset); DECLARE_LEGACY_CPU_DEVICE(JAGUARDSP, jaguardsp); -extern void jaguardsp_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask); -extern UINT32 jaguardsp_ctrl_r(running_device *device, offs_t offset); +extern void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask); +extern UINT32 jaguardsp_ctrl_r(device_t *device, offs_t offset); #endif /* __JAGUAR_H__ */ diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index e2086c0e289..2d70057d391 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -67,7 +67,7 @@ struct _konami_state konami_set_lines_func setlines_callback; }; -INLINE konami_state *get_safe_token(running_device *device) +INLINE konami_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == KONAMI); @@ -502,7 +502,7 @@ static CPU_EXECUTE( konami ) } -void konami_configure_set_lines(running_device *device, konami_set_lines_func func) +void konami_configure_set_lines(device_t *device, konami_set_lines_func func) { konami_state *cpustate = get_safe_token(device); cpustate->setlines_callback = func; diff --git a/src/emu/cpu/konami/konami.h b/src/emu/cpu/konami/konami.h index c3b771103f8..cb49648d4da 100644 --- a/src/emu/cpu/konami/konami.h +++ b/src/emu/cpu/konami/konami.h @@ -6,7 +6,7 @@ #define __KONAMI_H__ -typedef void (*konami_set_lines_func)(running_device *device, int lines); +typedef void (*konami_set_lines_func)(device_t *device, int lines); enum { @@ -14,7 +14,7 @@ enum KONAMI_DP }; -#define KONAMI_SETLINES_CALLBACK(name) void name(running_device *device, int lines) +#define KONAMI_SETLINES_CALLBACK(name) void name(device_t *device, int lines) #define KONAMI_IRQ_LINE 0 /* IRQ line number */ #define KONAMI_FIRQ_LINE 1 /* FIRQ line number */ @@ -24,7 +24,7 @@ DECLARE_LEGACY_CPU_DEVICE(KONAMI, konami); CPU_DISASSEMBLE( konami ); -void konami_configure_set_lines(running_device *device, konami_set_lines_func func); +void konami_configure_set_lines(device_t *device, konami_set_lines_func func); #endif /* __KONAMI_H__ */ diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c index 47c0d16507a..19fe88a3658 100644 --- a/src/emu/cpu/lh5801/lh5801.c +++ b/src/emu/cpu/lh5801/lh5801.c @@ -69,7 +69,7 @@ struct _lh5810_state int icount; }; -INLINE lh5801_state *get_safe_token(running_device *device) +INLINE lh5801_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == LH5801); diff --git a/src/emu/cpu/lh5801/lh5801.h b/src/emu/cpu/lh5801/lh5801.h index e5075b12189..548a040fc4e 100644 --- a/src/emu/cpu/lh5801/lh5801.h +++ b/src/emu/cpu/lh5801/lh5801.h @@ -65,7 +65,7 @@ pc 8bit -typedef UINT8 (*lh5801_in_func)(running_device *device); +typedef UINT8 (*lh5801_in_func)(device_t *device); typedef struct _lh5801_cpu_core lh5801_cpu_core; struct _lh5801_cpu_core diff --git a/src/emu/cpu/lr35902/lr35902.c b/src/emu/cpu/lr35902/lr35902.c index fa5006eba31..b484a71b76d 100644 --- a/src/emu/cpu/lr35902/lr35902.c +++ b/src/emu/cpu/lr35902/lr35902.c @@ -113,7 +113,7 @@ union _lr35902_state { lr35902_8BitRegs b; }; -INLINE lr35902_state *get_safe_token(running_device *device) +INLINE lr35902_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == LR35902); diff --git a/src/emu/cpu/lr35902/lr35902.h b/src/emu/cpu/lr35902/lr35902.h index cf092327b46..54f7bd4f561 100644 --- a/src/emu/cpu/lr35902/lr35902.h +++ b/src/emu/cpu/lr35902/lr35902.h @@ -4,7 +4,7 @@ #define __LR35902_H__ -typedef void (*lr35902_timer_fired_func)(running_device *device, int cycles); +typedef void (*lr35902_timer_fired_func)(device_t *device, int cycles); typedef struct _lr35902_cpu_core lr35902_cpu_core; struct _lr35902_cpu_core diff --git a/src/emu/cpu/m37710/m37710cm.h b/src/emu/cpu/m37710/m37710cm.h index f9bacccfa86..7c2f18dc01e 100644 --- a/src/emu/cpu/m37710/m37710cm.h +++ b/src/emu/cpu/m37710/m37710cm.h @@ -127,7 +127,7 @@ struct _m37710i_cpu_struct emu_timer *timers[8]; }; -INLINE m37710i_cpu_struct *get_safe_token(running_device *device) +INLINE m37710i_cpu_struct *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M37710 || diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c index ceee36f6f1b..ee9b93284e9 100644 --- a/src/emu/cpu/m6502/m4510.c +++ b/src/emu/cpu/m6502/m4510.c @@ -157,7 +157,7 @@ struct _m4510_Regs { m6510_port_write_func port_write; }; -INLINE m4510_Regs *get_safe_token(running_device *device) +INLINE m4510_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M4510); diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index 7f1112e187d..00333f31825 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -85,7 +85,7 @@ struct _m6502_Regs m6510_port_write_func port_write; }; -INLINE m6502_Regs *get_safe_token(running_device *device) +INLINE m6502_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M6502 || @@ -330,7 +330,7 @@ static CPU_INIT( n2a03 ) Bit 7 of address $4011 (the PSG's DPCM control register), when set, causes an IRQ to be generated. This function allows the IRQ to be called from the PSG core when such an occasion arises. */ -void n2a03_irq(running_device *device) +void n2a03_irq(device_t *device) { m6502_Regs *cpustate = get_safe_token(device); diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index 3afa02361ef..edce0e64297 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -51,8 +51,8 @@ enum positiv edge sets overflow flag */ #define M6502_SET_OVERFLOW 1 -typedef UINT8 (*m6510_port_read_func)(running_device *device, UINT8 direction); -typedef void (*m6510_port_write_func)(running_device *device, UINT8 direction, UINT8 data); +typedef UINT8 (*m6510_port_read_func)(device_t *device, UINT8 direction); +typedef void (*m6510_port_write_func)(device_t *device, UINT8 direction, UINT8 data); /* Optional interface to set callbacks */ @@ -162,7 +162,7 @@ DECLARE_LEGACY_CPU_DEVICE(N2A03, n2a03); Bit 7 of address $4011 (the PSG's DPCM control register), when set, causes an IRQ to be generated. This function allows the IRQ to be called from the PSG core when such an occasion arises. */ -extern void n2a03_irq(running_device *device); +extern void n2a03_irq(device_t *device); /**************************************************************************** diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c index 4c567a19cc0..3ea7f7c3873 100644 --- a/src/emu/cpu/m6502/m6509.c +++ b/src/emu/cpu/m6502/m6509.c @@ -88,7 +88,7 @@ struct _m6509_Regs { write8_space_func wrmem_id; /* writemem callback for indexed instructions */ }; -INLINE m6509_Regs *get_safe_token(running_device *device) +INLINE m6509_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M6509); diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c index 74b781102d3..7bfe01575d9 100644 --- a/src/emu/cpu/m6502/m65ce02.c +++ b/src/emu/cpu/m6502/m65ce02.c @@ -82,7 +82,7 @@ struct _m65ce02_Regs { write8_space_func wrmem_id; /* writemem callback for indexed instructions */ }; -INLINE m65ce02_Regs *get_safe_token(running_device *device) +INLINE m65ce02_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M65CE02); diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index 99fae31bd5f..a55505a9e93 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -154,7 +154,7 @@ struct _m6800_state }; -INLINE m6800_state *get_safe_token(running_device *device) +INLINE m6800_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M6800 || diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h index 78bebaf4016..ed0848b763c 100644 --- a/src/emu/cpu/m68000/m68000.h +++ b/src/emu/cpu/m68000/m68000.h @@ -70,11 +70,11 @@ enum M68K_GENPCBASE = STATE_GENPCBASE }; -typedef void (*m68k_bkpt_ack_func)(running_device *device, UINT32 data); -typedef void (*m68k_reset_func)(running_device *device); -typedef void (*m68k_cmpild_func)(running_device *device, UINT32 data, UINT8 reg); -typedef void (*m68k_rte_func)(running_device *device); -typedef int (*m68k_tas_func)(running_device *device); +typedef void (*m68k_bkpt_ack_func)(device_t *device, UINT32 data); +typedef void (*m68k_reset_func)(device_t *device); +typedef void (*m68k_cmpild_func)(device_t *device, UINT32 data, UINT8 reg); +typedef void (*m68k_rte_func)(device_t *device); +typedef int (*m68k_tas_func)(device_t *device); DECLARE_LEGACY_CPU_DEVICE(M68000, m68000); @@ -92,15 +92,15 @@ DECLARE_LEGACY_CPU_DEVICE(M68040, m68040); DECLARE_LEGACY_CPU_DEVICE(SCC68070, scc68070); -void m68k_set_encrypted_opcode_range(running_device *device, offs_t start, offs_t end); +void m68k_set_encrypted_opcode_range(device_t *device, offs_t start, offs_t end); -void m68k_set_hmmu_enable(running_device *device, int enable); +void m68k_set_hmmu_enable(device_t *device, int enable); unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, const unsigned char* opdata, const unsigned char* argdata, unsigned int cpu_type); -void m68k_set_reset_callback(running_device *device, m68k_reset_func callback); -void m68k_set_cmpild_callback(running_device *device, m68k_cmpild_func callback); -void m68k_set_rte_callback(running_device *device, m68k_rte_func callback); -void m68k_set_tas_callback(running_device *device, m68k_tas_func callback); +void m68k_set_reset_callback(device_t *device, m68k_reset_func callback); +void m68k_set_cmpild_callback(device_t *device, m68k_cmpild_func callback); +void m68k_set_rte_callback(device_t *device, m68k_rte_func callback); +void m68k_set_tas_callback(device_t *device, m68k_tas_func callback); #endif /* __M68000_H__ */ diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index 069bf401950..4738f23dd37 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -493,7 +493,7 @@ const UINT8 m68ki_ea_idx_cycle_table[64] = #define MASK_040_OR_LATER (CPU_TYPE_040 | CPU_TYPE_EC040) -INLINE m68ki_cpu_core *get_safe_token(running_device *device) +INLINE m68ki_cpu_core *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M68000 || @@ -633,7 +633,7 @@ static CPU_EXECUTE( m68k ) debugger_instruction_hook(device, REG_PC); // FIXME: remove this -// void apollo_debug_instruction(running_device *device); +// void apollo_debug_instruction(device_t *device); // apollo_debug_instruction(device); /* Record previous program counter */ @@ -1052,14 +1052,14 @@ static CPU_GET_INFO( m68k ) /* global access */ -void m68k_set_encrypted_opcode_range(running_device *device, offs_t start, offs_t end) +void m68k_set_encrypted_opcode_range(device_t *device, offs_t start, offs_t end) { m68ki_cpu_core *m68k = get_safe_token(device); m68k->encrypted_start = start; m68k->encrypted_end = end; } -void m68k_set_hmmu_enable(running_device *device, int enable) +void m68k_set_hmmu_enable(device_t *device, int enable) { m68ki_cpu_core *m68k = get_safe_token(device); @@ -1487,25 +1487,25 @@ void m68k_memory_interface::init32hmmu(address_space &space) write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(m68k_memory_interface, writelong_d32_hmmu), *this); } -void m68k_set_reset_callback(running_device *device, m68k_reset_func callback) +void m68k_set_reset_callback(device_t *device, m68k_reset_func callback) { m68ki_cpu_core *m68k = get_safe_token(device); m68k->reset_instr_callback = callback; } -void m68k_set_cmpild_callback(running_device *device, m68k_cmpild_func callback) +void m68k_set_cmpild_callback(device_t *device, m68k_cmpild_func callback) { m68ki_cpu_core *m68k = get_safe_token(device); m68k->cmpild_instr_callback = callback; } -void m68k_set_rte_callback(running_device *device, m68k_rte_func callback) +void m68k_set_rte_callback(device_t *device, m68k_rte_func callback) { m68ki_cpu_core *m68k = get_safe_token(device); m68k->rte_instr_callback = callback; } -void m68k_set_tas_callback(running_device *device, m68k_tas_func callback) +void m68k_set_tas_callback(device_t *device, m68k_tas_func callback) { m68ki_cpu_core *m68k = get_safe_token(device); m68k->tas_instr_callback = callback; @@ -1516,7 +1516,7 @@ void m68k_set_tas_callback(running_device *device, m68k_tas_func callback) * State definition ****************************************************************************/ -static void define_state(running_device *device) +static void define_state(device_t *device) { m68ki_cpu_core *m68k = get_safe_token(device); UINT32 addrmask = (m68k->cpu_type & MASK_24BIT_SPACE) ? 0xffffff : 0xffffffff; diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index 0529e2b0f16..c1e9bd9f306 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -69,7 +69,7 @@ typedef struct int nmi_state; } m6805_Regs; -INLINE m6805_Regs *get_safe_token(running_device *device) +INLINE m6805_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M6805 || diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index b188aee9f37..f9a95fb186d 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -107,7 +107,7 @@ struct _m68_state_t UINT8 nmi_state; }; -INLINE m68_state_t *get_safe_token(running_device *device) +INLINE m68_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == M6809 || diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 75107e707fc..163c22f1a01 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -66,7 +66,7 @@ struct _mb86233_state UINT32 *Tables; }; -INLINE mb86233_state *get_safe_token(running_device *device) +INLINE mb86233_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MB86233); diff --git a/src/emu/cpu/mb86233/mb86233.h b/src/emu/cpu/mb86233/mb86233.h index 5b7924b822f..19631f900cc 100644 --- a/src/emu/cpu/mb86233/mb86233.h +++ b/src/emu/cpu/mb86233/mb86233.h @@ -42,8 +42,8 @@ enum STRUCTURES ***************************************************************************/ -typedef int (*mb86233_fifo_read_func)(running_device *device, UINT32 *data); -typedef void (*mb86233_fifo_write_func)(running_device *device, UINT32 data); +typedef int (*mb86233_fifo_read_func)(device_t *device, UINT32 *data); +typedef void (*mb86233_fifo_write_func)(device_t *device, UINT32 data); typedef struct _mb86233_cpu_core mb86233_cpu_core; struct _mb86233_cpu_core diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c index 1f9ebfa0e95..41f6e66f433 100644 --- a/src/emu/cpu/mb88xx/mb88xx.c +++ b/src/emu/cpu/mb88xx/mb88xx.c @@ -82,7 +82,7 @@ struct _mb88_state int icount; }; -INLINE mb88_state *get_safe_token(running_device *device) +INLINE mb88_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MB88 || @@ -334,7 +334,7 @@ static void update_pio( mb88_state *cpustate, int cycles ) } } -void mb88_external_clock_w(running_device *device, int state) +void mb88_external_clock_w(device_t *device, int state) { mb88_state *cpustate = get_safe_token(device); if (state != cpustate->ctr) diff --git a/src/emu/cpu/mb88xx/mb88xx.h b/src/emu/cpu/mb88xx/mb88xx.h index 4391d669d25..053806918f7 100644 --- a/src/emu/cpu/mb88xx/mb88xx.h +++ b/src/emu/cpu/mb88xx/mb88xx.h @@ -72,6 +72,6 @@ DECLARE_LEGACY_CPU_DEVICE(MB8844, mb8844); CPU_DISASSEMBLE( mb88 ); -void mb88_external_clock_w(running_device *device, int state); +void mb88_external_clock_w(device_t *device, int state); #endif /* __MB88XX_H__ */ diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index 1ba2686a667..ac8e9bbb2f7 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -79,7 +79,7 @@ struct _hc11_state UINT8 tflg1; }; -INLINE hc11_state *get_safe_token(running_device *device) +INLINE hc11_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MC68HC11); diff --git a/src/emu/cpu/mcs48/mcs48.c b/src/emu/cpu/mcs48/mcs48.c index c272c887714..a32708a1bf9 100644 --- a/src/emu/cpu/mcs48/mcs48.c +++ b/src/emu/cpu/mcs48/mcs48.c @@ -218,7 +218,7 @@ static int check_irqs(mcs48_state *cpustate); INLINE FUNCTIONS ***************************************************************************/ -INLINE mcs48_state *get_safe_token(running_device *device) +INLINE mcs48_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I8021 || @@ -1163,7 +1163,7 @@ static CPU_EXECUTE( mcs48 ) read -------------------------------------------------*/ -UINT8 upi41_master_r(running_device *device, UINT8 a0) +UINT8 upi41_master_r(device_t *device, UINT8 a0) { mcs48_state *cpustate = get_safe_token(device); @@ -1212,7 +1212,7 @@ static TIMER_CALLBACK( master_callback ) cpustate->sts |= STS_F1; } -void upi41_master_w(running_device *_device, UINT8 a0, UINT8 data) +void upi41_master_w(device_t *_device, UINT8 a0, UINT8 data) { legacy_cpu_device *device = downcast(_device); timer_call_after_resynch(device->machine, (void *)device, (a0 << 8) | data, master_callback); diff --git a/src/emu/cpu/mcs48/mcs48.h b/src/emu/cpu/mcs48/mcs48.h index 5e6b2d73f6d..a2087bba6a5 100644 --- a/src/emu/cpu/mcs48/mcs48.h +++ b/src/emu/cpu/mcs48/mcs48.h @@ -119,8 +119,8 @@ DECLARE_LEGACY_CPU_DEVICE(M58715, m58715); /* 8049 clone */ ***************************************************************************/ /* functions for talking to the input/output buffers on the UPI41-class chips */ -UINT8 upi41_master_r(running_device *device, UINT8 a0); -void upi41_master_w(running_device *device, UINT8 a0, UINT8 data); +UINT8 upi41_master_r(device_t *device, UINT8 a0); +void upi41_master_w(device_t *device, UINT8 a0, UINT8 data); /* disassemblers */ diff --git a/src/emu/cpu/mcs48/mcs48dsm.c b/src/emu/cpu/mcs48/mcs48dsm.c index 5dc76e2a5c6..d527d190ff8 100644 --- a/src/emu/cpu/mcs48/mcs48dsm.c +++ b/src/emu/cpu/mcs48/mcs48dsm.c @@ -10,7 +10,7 @@ #include "emu.h" -static UINT32 common_dasm(running_device *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int upi41) +static UINT32 common_dasm(device_t *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int upi41) { const UINT8 *startram = opram; UINT32 flags = 0; diff --git a/src/emu/cpu/mcs51/mcs51.c b/src/emu/cpu/mcs51/mcs51.c index 1604d189ff1..840bc24522e 100644 --- a/src/emu/cpu/mcs51/mcs51.c +++ b/src/emu/cpu/mcs51/mcs51.c @@ -649,7 +649,7 @@ INLINE void serial_transmit(mcs51_state_t *mcs51_state, UINT8 data); INLINE FUNCTIONS ***************************************************************************/ -INLINE mcs51_state_t *get_safe_token(running_device *device) +INLINE mcs51_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == I8031 || @@ -1282,13 +1282,13 @@ INLINE void update_irq_prio(mcs51_state_t *mcs51_state, UINT8 ipl, UINT8 iph) ***************************************************************************/ -void i8051_set_serial_tx_callback(running_device *device, mcs51_serial_tx_func tx_func) +void i8051_set_serial_tx_callback(device_t *device, mcs51_serial_tx_func tx_func) { mcs51_state_t *mcs51_state = get_safe_token(device); mcs51_state->serial_tx_callback = tx_func; } -void i8051_set_serial_rx_callback(running_device *device, mcs51_serial_rx_func rx_func) +void i8051_set_serial_rx_callback(device_t *device, mcs51_serial_rx_func rx_func) { mcs51_state_t *mcs51_state = get_safe_token(device); mcs51_state->serial_rx_callback = rx_func; diff --git a/src/emu/cpu/mcs51/mcs51.h b/src/emu/cpu/mcs51/mcs51.h index 3c2c51e55f3..dbc8ccaa7f8 100644 --- a/src/emu/cpu/mcs51/mcs51.h +++ b/src/emu/cpu/mcs51/mcs51.h @@ -89,11 +89,11 @@ struct _ds5002fp_config FUNCTION PROTOTYPES ***************************************************************************/ -typedef void (*mcs51_serial_tx_func)(running_device *device, int data); -typedef int (*mcs51_serial_rx_func)(running_device *device); +typedef void (*mcs51_serial_tx_func)(device_t *device, int data); +typedef int (*mcs51_serial_rx_func)(device_t *device); -extern void i8051_set_serial_tx_callback(running_device *device, mcs51_serial_tx_func tx_func); -extern void i8051_set_serial_rx_callback(running_device *device, mcs51_serial_rx_func rx_func); +extern void i8051_set_serial_tx_callback(device_t *device, mcs51_serial_tx_func tx_func); +extern void i8051_set_serial_rx_callback(device_t *device, mcs51_serial_rx_func rx_func); /* variants with no internal rom and 128 byte internal memory */ DECLARE_LEGACY_CPU_DEVICE(I8031, i8031); diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index 8ebff33a073..c427cb83d4a 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -93,7 +93,7 @@ typedef struct { #define WR(offset,data) minx->program->write_byte( offset, data ) #define GET_MINX_PC ( ( minx->PC & 0x8000 ) ? ( minx->V << 15 ) | (minx->PC & 0x7FFF ) : minx->PC ) -INLINE minx_state *get_safe_token(running_device *device) +INLINE minx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MINX); diff --git a/src/emu/cpu/mips/mips3.h b/src/emu/cpu/mips/mips3.h index 3fc198ee855..996cecf5a28 100644 --- a/src/emu/cpu/mips/mips3.h +++ b/src/emu/cpu/mips/mips3.h @@ -224,9 +224,9 @@ struct _mips3_config PUBLIC FUNCTIONS ***************************************************************************/ -void mips3drc_set_options(running_device *device, UINT32 options); -void mips3drc_add_fastram(running_device *device, offs_t start, offs_t end, UINT8 readonly, void *base); -void mips3drc_add_hotspot(running_device *device, offs_t pc, UINT32 opcode, UINT32 cycles); +void mips3drc_set_options(device_t *device, UINT32 options); +void mips3drc_add_fastram(device_t *device, offs_t start, offs_t end, UINT8 readonly, void *base); +void mips3drc_add_hotspot(device_t *device, offs_t pc, UINT32 opcode, UINT32 cycles); DECLARE_LEGACY_CPU_DEVICE(VR4300BE, vr4300be); DECLARE_LEGACY_CPU_DEVICE(VR4300LE, vr4300le); diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 68790e6625c..889b960711e 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -273,7 +273,7 @@ static const UINT8 fpmode_source[4] = INLINE FUNCTIONS ***************************************************************************/ -INLINE mips3_state *get_safe_token(running_device *device) +INLINE mips3_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == VR4300BE || @@ -625,7 +625,7 @@ static CPU_GET_INFO( mips3 ) mips3drc_set_options - configure DRC options -------------------------------------------------*/ -void mips3drc_set_options(running_device *device, UINT32 options) +void mips3drc_set_options(device_t *device, UINT32 options) { mips3_state *mips3 = get_safe_token(device); mips3->impstate->drcoptions = options; @@ -637,7 +637,7 @@ void mips3drc_set_options(running_device *device, UINT32 options) region -------------------------------------------------*/ -void mips3drc_add_fastram(running_device *device, offs_t start, offs_t end, UINT8 readonly, void *base) +void mips3drc_add_fastram(device_t *device, offs_t start, offs_t end, UINT8 readonly, void *base) { mips3_state *mips3 = get_safe_token(device); if (mips3->impstate->fastram_select < ARRAY_LENGTH(mips3->impstate->fastram)) @@ -655,7 +655,7 @@ void mips3drc_add_fastram(running_device *device, offs_t start, offs_t end, UINT mips3drc_add_hotspot - add a new hotspot -------------------------------------------------*/ -void mips3drc_add_hotspot(running_device *device, offs_t pc, UINT32 opcode, UINT32 cycles) +void mips3drc_add_hotspot(device_t *device, offs_t pc, UINT32 opcode, UINT32 cycles) { mips3_state *mips3 = get_safe_token(device); if (mips3->impstate->hotspot_select < ARRAY_LENGTH(mips3->impstate->hotspot)) diff --git a/src/emu/cpu/mips/psx.c b/src/emu/cpu/mips/psx.c index 842def9aa69..43c91cf853b 100644 --- a/src/emu/cpu/mips/psx.c +++ b/src/emu/cpu/mips/psx.c @@ -194,7 +194,7 @@ struct _psxcpu_state UINT32 bad_word_address_mask; }; -INLINE psxcpu_state *get_safe_token(running_device *device) +INLINE psxcpu_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PSXCPU || diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 872b4a1fa2a..f51f28e02e5 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -163,7 +163,7 @@ struct _r3000_state size_t dcache_size; }; -INLINE r3000_state *get_safe_token(running_device *device) +INLINE r3000_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == R3000BE || diff --git a/src/emu/cpu/mn10200/mn10200.c b/src/emu/cpu/mn10200/mn10200.c index 2a5f3b05c08..b728c85a420 100644 --- a/src/emu/cpu/mn10200/mn10200.c +++ b/src/emu/cpu/mn10200/mn10200.c @@ -146,7 +146,7 @@ INLINE void mn102_change_pc(mn102_info *mn102, UINT32 pc) mn102->pc = pc & 0xffffff; } -INLINE mn102_info *get_safe_token(running_device *device) +INLINE mn102_info *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MN10200); diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index 0b369139a70..25eb3e69b34 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -118,7 +118,7 @@ typedef UINT32 DWORD; extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config); -INLINE nec_state_t *get_safe_token(running_device *device) +INLINE nec_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == V20 || diff --git a/src/emu/cpu/nec/v25.c b/src/emu/cpu/nec/v25.c index 8378486bd8a..83d1a082abd 100644 --- a/src/emu/cpu/nec/v25.c +++ b/src/emu/cpu/nec/v25.c @@ -37,7 +37,7 @@ static const nec_config default_config = extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config); -INLINE v25_state_t *get_safe_token(running_device *device) +INLINE v25_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == V25 || device->type() == V35); diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index fb7594a1623..74b6fb7cbdb 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -422,7 +422,7 @@ struct _pdp1_state int icount; }; -INLINE pdp1_state *get_safe_token(running_device *device) +INLINE pdp1_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PDP1); @@ -430,10 +430,10 @@ INLINE pdp1_state *get_safe_token(running_device *device) } static void execute_instruction(pdp1_state *cpustate); -static void null_iot (running_device *device, int op2, int nac, int mb, int *io, int ac); -static void lem_eem_iot(running_device *device, int op2, int nac, int mb, int *io, int ac); -static void sbs_iot(running_device *device, int op2, int nac, int mb, int *io, int ac); -static void type_20_sbs_iot(running_device *device, int op2, int nac, int mb, int *io, int ac); +static void null_iot (device_t *device, int op2, int nac, int mb, int *io, int ac); +static void lem_eem_iot(device_t *device, int op2, int nac, int mb, int *io, int ac); +static void sbs_iot(device_t *device, int op2, int nac, int mb, int *io, int ac); +static void type_20_sbs_iot(device_t *device, int op2, int nac, int mb, int *io, int ac); static void pulse_start_clear(pdp1_state *cpustate); @@ -1698,7 +1698,7 @@ no_fetch: /* Handle unimplemented IOT */ -static void null_iot(running_device *device, int op2, int nac, int mb, int *io, int ac) +static void null_iot(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *cpustate = get_safe_token(device); /* Note that the dummy IOT 0 is used to wait for the completion pulse @@ -1721,7 +1721,7 @@ static void null_iot(running_device *device, int op2, int nac, int mb, int *io, IOT 74: LEM/EEM */ -static void lem_eem_iot(running_device *device, int op2, int nac, int mb, int *io, int ac) +static void lem_eem_iot(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *cpustate = get_safe_token(device); if (! cpustate->extend_support) /* extend mode supported? */ @@ -1745,7 +1745,7 @@ static void lem_eem_iot(running_device *device, int op2, int nac, int mb, int *i IOT 55: esm IOT 56: cbs */ -static void sbs_iot(running_device *device, int op2, int nac, int mb, int *io, int ac) +static void sbs_iot(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *cpustate = get_safe_token(device); switch (op2) @@ -1789,7 +1789,7 @@ static void sbs_iot(running_device *device, int op2, int nac, int mb, int *io, i IOT 52: isb IOT 53: cac */ -static void type_20_sbs_iot(running_device *device, int op2, int nac, int mb, int *io, int ac) +static void type_20_sbs_iot(device_t *device, int op2, int nac, int mb, int *io, int ac) { pdp1_state *cpustate = get_safe_token(device); int channel, mask; diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index 458fb5c236f..7e31766b209 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -22,9 +22,9 @@ enum #define pdp1_pulse_start_clear(cpudevice) cpu_set_reg(cpudevice, PDP1_START_CLEAR, (UINT64)0) #define pdp1_pulse_iot_done(cpudevice) cpu_set_reg(cpudevice, PDP1_IO_COMPLETE, (UINT64)0) -typedef void (*pdp1_extern_iot_func)(running_device *device, int op2, int nac, int mb, int *io, int ac); -typedef void (*pdp1_read_binary_word_func)(running_device *device); -typedef void (*pdp1_io_sc_func)(running_device *device); +typedef void (*pdp1_extern_iot_func)(device_t *device, int op2, int nac, int mb, int *io, int ac); +typedef void (*pdp1_read_binary_word_func)(device_t *device); +typedef void (*pdp1_io_sc_func)(device_t *device); typedef struct _pdp1_reset_param_t pdp1_reset_param_t; diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index bc587a19196..e65a6fe812d 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -15,9 +15,9 @@ #define LOG 0 #define LOG_EXTRA 0 -static void execute_instruction_64kw(running_device *device); -static void execute_instruction_8kw(running_device *device); -static void pulse_reset(running_device *device); +static void execute_instruction_64kw(device_t *device); +static void execute_instruction_8kw(device_t *device); +static void pulse_reset(device_t *device); /* TX-0 Registers */ @@ -68,7 +68,7 @@ struct _tx0_state address_space *program; }; -INLINE tx0_state *get_safe_token(running_device *device) +INLINE tx0_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TX0_64KW || @@ -677,7 +677,7 @@ CPU_GET_INFO( tx0_8kw ) /* execute one instruction */ -static void execute_instruction_64kw(running_device *device) +static void execute_instruction_64kw(device_t *device) { tx0_state *cpustate = get_safe_token(device); @@ -868,7 +868,7 @@ static void indexed_address_eval(tx0_state *cpustate) } /* execute one instruction */ -static void execute_instruction_8kw(running_device *device) +static void execute_instruction_8kw(device_t *device) { tx0_state *cpustate = get_safe_token(device); @@ -1274,7 +1274,7 @@ static void execute_instruction_8kw(running_device *device) reset most registers and flip-flops, and initialize a few emulator state variables. */ -static void pulse_reset(running_device *device) +static void pulse_reset(device_t *device) { tx0_state *cpustate = get_safe_token(device); diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h index 71875c3f8c6..d36c48082e0 100644 --- a/src/emu/cpu/pdp1/tx0.h +++ b/src/emu/cpu/pdp1/tx0.h @@ -35,11 +35,11 @@ struct _tx0_reset_param_t 5: reserved (for unimplemented typ instruction?) 6: p6h 7: p7h */ - void (*io_handlers[8])(running_device *device); + void (*io_handlers[8])(device_t *device); /* select instruction handler */ - void (*sel_handler)(running_device *device); + void (*sel_handler)(device_t *device); /* callback called when reset line is pulsed: IO devices should reset */ - void (*io_reset_callback)(running_device *device); + void (*io_reset_callback)(device_t *device); }; /* PUBLIC FUNCTIONS */ diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 7d8d646e545..46b295db334 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -104,7 +104,7 @@ struct _pic16c5x_state address_space *io; }; -INLINE pic16c5x_state *get_safe_token(running_device *device) +INLINE pic16c5x_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PIC16C54 || @@ -798,7 +798,7 @@ static void pic16c5x_soft_reset(pic16c5x_state *cpustate) pic16c5x_reset_regs(cpustate); } -void pic16c5x_set_config(running_device *cpu, int data) +void pic16c5x_set_config(device_t *cpu, int data) { pic16c5x_state *cpustate = get_safe_token(cpu); diff --git a/src/emu/cpu/pic16c5x/pic16c5x.h b/src/emu/cpu/pic16c5x/pic16c5x.h index 68224cb4a33..5e8937daba3 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.h +++ b/src/emu/cpu/pic16c5x/pic16c5x.h @@ -43,7 +43,7 @@ enum * the value if known (available in HEX dumps of the ROM). */ -void pic16c5x_set_config(running_device *cpu, int data); +void pic16c5x_set_config(device_t *cpu, int data); diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c index b03a570453f..c30f7066210 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.c +++ b/src/emu/cpu/pic16c62x/pic16c62x.c @@ -94,7 +94,7 @@ struct _pic16c62x_state address_space *io; }; -INLINE pic16c62x_state *get_safe_token(running_device *device) +INLINE pic16c62x_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PIC16C620 || @@ -917,7 +917,7 @@ static void pic16c62x_soft_reset(pic16c62x_state *cpustate) pic16c62x_reset_regs(cpustate); } -void pic16c62x_set_config(running_device *cpu, int data) +void pic16c62x_set_config(device_t *cpu, int data) { pic16c62x_state *cpustate = get_safe_token(cpu); diff --git a/src/emu/cpu/pic16c62x/pic16c62x.h b/src/emu/cpu/pic16c62x/pic16c62x.h index 97d54303ea3..2a5cd5c0562 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.h +++ b/src/emu/cpu/pic16c62x/pic16c62x.h @@ -46,7 +46,7 @@ enum * the value if known (available in HEX dumps of the ROM). */ -void pic16c62x_set_config(running_device *cpu, int data); +void pic16c62x_set_config(device_t *cpu, int data); diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h index c9f6489b3db..478c5a5e8c5 100644 --- a/src/emu/cpu/powerpc/ppc.h +++ b/src/emu/cpu/powerpc/ppc.h @@ -145,7 +145,7 @@ enum STRUCTURES AND TYPEDEFS ***************************************************************************/ -typedef void (*ppc4xx_spu_tx_handler)(running_device *device, UINT8 data); +typedef void (*ppc4xx_spu_tx_handler)(device_t *device, UINT8 data); typedef struct _powerpc_config powerpc_config; struct _powerpc_config @@ -159,12 +159,12 @@ struct _powerpc_config PUBLIC FUNCTIONS ***************************************************************************/ -void ppcdrc_set_options(running_device *device, UINT32 options); -void ppcdrc_add_fastram(running_device *device, offs_t start, offs_t end, UINT8 readonly, void *base); -void ppcdrc_add_hotspot(running_device *device, offs_t pc, UINT32 opcode, UINT32 cycles); +void ppcdrc_set_options(device_t *device, UINT32 options); +void ppcdrc_add_fastram(device_t *device, offs_t start, offs_t end, UINT8 readonly, void *base); +void ppcdrc_add_hotspot(device_t *device, offs_t pc, UINT32 opcode, UINT32 cycles); -void ppc4xx_spu_set_tx_handler(running_device *device, ppc4xx_spu_tx_handler handler); -void ppc4xx_spu_receive_byte(running_device *device, UINT8 byteval); +void ppc4xx_spu_set_tx_handler(device_t *device, ppc4xx_spu_tx_handler handler); +void ppc4xx_spu_receive_byte(device_t *device, UINT8 byteval); DECLARE_LEGACY_CPU_DEVICE(PPC403GA, ppc403ga); diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c index 67390187775..e336c24534f 100644 --- a/src/emu/cpu/powerpc/ppccom.c +++ b/src/emu/cpu/powerpc/ppccom.c @@ -2102,7 +2102,7 @@ ADDRESS_MAP_END specific TX handler configuration -------------------------------------------------*/ -void ppc4xx_spu_set_tx_handler(running_device *device, ppc4xx_spu_tx_handler handler) +void ppc4xx_spu_set_tx_handler(device_t *device, ppc4xx_spu_tx_handler handler) { powerpc_state *ppc = *(powerpc_state **)downcast(device)->token(); ppc->spu.tx_handler = handler; @@ -2114,7 +2114,7 @@ void ppc4xx_spu_set_tx_handler(running_device *device, ppc4xx_spu_tx_handler han specific serial byte receive -------------------------------------------------*/ -void ppc4xx_spu_receive_byte(running_device *device, UINT8 byteval) +void ppc4xx_spu_receive_byte(device_t *device, UINT8 byteval) { powerpc_state *ppc = *(powerpc_state **)downcast(device)->token(); ppc4xx_spu_rx_data(ppc, byteval); diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c index 6b52f61f424..067443a1bc8 100644 --- a/src/emu/cpu/powerpc/ppcdrc.c +++ b/src/emu/cpu/powerpc/ppcdrc.c @@ -435,7 +435,7 @@ static const UINT8 fcmp_cr_table_source[32] = INLINE FUNCTIONS ***************************************************************************/ -INLINE powerpc_state *get_safe_token(running_device *device) +INLINE powerpc_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PPC403GA || @@ -817,7 +817,7 @@ static CPU_GET_INFO( ppcdrc ) ppcdrc_set_options - configure DRC options -------------------------------------------------*/ -void ppcdrc_set_options(running_device *device, UINT32 options) +void ppcdrc_set_options(device_t *device, UINT32 options) { powerpc_state *ppc = get_safe_token(device); ppc->impstate->drcoptions = options; @@ -829,7 +829,7 @@ void ppcdrc_set_options(running_device *device, UINT32 options) region -------------------------------------------------*/ -void ppcdrc_add_fastram(running_device *device, offs_t start, offs_t end, UINT8 readonly, void *base) +void ppcdrc_add_fastram(device_t *device, offs_t start, offs_t end, UINT8 readonly, void *base) { powerpc_state *ppc = get_safe_token(device); if (ppc->impstate->fastram_select < ARRAY_LENGTH(ppc->impstate->fastram)) @@ -847,7 +847,7 @@ void ppcdrc_add_fastram(running_device *device, offs_t start, offs_t end, UINT8 ppcdrc_add_hotspot - add a new hotspot -------------------------------------------------*/ -void ppcdrc_add_hotspot(running_device *device, offs_t pc, UINT32 opcode, UINT32 cycles) +void ppcdrc_add_hotspot(device_t *device, offs_t pc, UINT32 opcode, UINT32 cycles) { powerpc_state *ppc = get_safe_token(device); if (ppc->impstate->hotspot_select < ARRAY_LENGTH(ppc->impstate->hotspot)) diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c index 6a7274ac241..8a8998b4b5e 100644 --- a/src/emu/cpu/rsp/rsp.c +++ b/src/emu/cpu/rsp/rsp.c @@ -30,7 +30,7 @@ CPU_DISASSEMBLE( rsp ); extern offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op); -INLINE rsp_state *get_safe_token(running_device *device) +INLINE rsp_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == RSP); @@ -3123,19 +3123,19 @@ CPU_GET_INFO( rsp ) } } -void rspdrc_set_options(running_device *device, UINT32 options) +void rspdrc_set_options(device_t *device, UINT32 options) { } -void rspdrc_add_imem(running_device *device, void *base) +void rspdrc_add_imem(device_t *device, void *base) { } -void rspdrc_add_dmem(running_device *device, void *base) +void rspdrc_add_dmem(device_t *device, void *base) { } -void rspdrc_flush_drc_cache(running_device *device) +void rspdrc_flush_drc_cache(device_t *device) { } diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h index 105c5f3c2c4..13e9afba965 100644 --- a/src/emu/cpu/rsp/rsp.h +++ b/src/emu/cpu/rsp/rsp.h @@ -68,7 +68,7 @@ enum STRUCTURES ***************************************************************************/ -typedef void (*rsp_set_status_func)(running_device *device, UINT32 status); +typedef void (*rsp_set_status_func)(device_t *device, UINT32 status); typedef struct _rsp_config rsp_config; struct _rsp_config @@ -86,10 +86,10 @@ struct _rsp_config PUBLIC FUNCTIONS ***************************************************************************/ -void rspdrc_flush_drc_cache(running_device *device); -void rspdrc_set_options(running_device *device, UINT32 options); -void rspdrc_add_imem(running_device *device, void *base); -void rspdrc_add_dmem(running_device *device, void *base); +void rspdrc_flush_drc_cache(device_t *device); +void rspdrc_set_options(device_t *device, UINT32 options); +void rspdrc_add_imem(device_t *device, void *base); +void rspdrc_add_dmem(device_t *device, void *base); /*************************************************************************** HELPER MACROS diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c index 1dab241ff76..e381a422f5a 100644 --- a/src/emu/cpu/rsp/rspdrc.c +++ b/src/emu/cpu/rsp/rspdrc.c @@ -238,7 +238,7 @@ static void log_add_disasm_comment(rsp_state *rsp, drcuml_block *block, UINT32 p #define SET_ZERO_FLAG(x) { rsp->flag[0] |= (0x100 << (x)); } #define CLEAR_ZERO_FLAG(x) { rsp->flag[0] &= ~(0x100 << (x)); } -INLINE rsp_state *get_safe_token(running_device *device) +INLINE rsp_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == RSP); @@ -377,7 +377,7 @@ INLINE void WRITE32(rsp_state *rsp, UINT32 address, UINT32 data) rspdrc_set_options - configure DRC options -------------------------------------------------*/ -void rspdrc_set_options(running_device *device, UINT32 options) +void rspdrc_set_options(device_t *device, UINT32 options) { rsp_state *rsp = get_safe_token(device); rsp->impstate->drcoptions = options; @@ -388,7 +388,7 @@ void rspdrc_set_options(running_device *device, UINT32 options) rspdrc_add_imem - register an imem region -------------------------------------------------*/ -void rspdrc_add_imem(running_device *device, void *base) +void rspdrc_add_imem(device_t *device, void *base) { rsp_state *rsp = get_safe_token(device); rsp->impstate->imem = base; @@ -399,7 +399,7 @@ void rspdrc_add_imem(running_device *device, void *base) rspdrc_add_dmem - register a dmem region -------------------------------------------------*/ -void rspdrc_add_dmem(running_device *device, void *base) +void rspdrc_add_dmem(device_t *device, void *base) { rsp_state *rsp = get_safe_token(device); rsp->impstate->dmem = base; @@ -3383,7 +3383,7 @@ static CPU_EXECUTE( rsp ) accessor to code_flush_cache -------------------------------------------------*/ -void rspdrc_flush_drc_cache(running_device *device) +void rspdrc_flush_drc_cache(device_t *device) { rsp_state *rsp = get_safe_token(device); rsp->impstate->cache_dirty = TRUE; diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index d0164796d8e..23acfd5b012 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -48,7 +48,7 @@ struct _s2650_regs { address_space *io; }; -INLINE s2650_regs *get_safe_token(running_device *device) +INLINE s2650_regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == S2650); diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c index 0f25352962d..8b3156c6456 100644 --- a/src/emu/cpu/saturn/saturn.c +++ b/src/emu/cpu/saturn/saturn.c @@ -88,7 +88,7 @@ struct _saturn_state int icount; }; -INLINE saturn_state *get_safe_token(running_device *device) +INLINE saturn_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SATURN); diff --git a/src/emu/cpu/saturn/saturn.h b/src/emu/cpu/saturn/saturn.h index 02a4207252a..1cb913e909b 100644 --- a/src/emu/cpu/saturn/saturn.h +++ b/src/emu/cpu/saturn/saturn.h @@ -53,14 +53,14 @@ HP38G 09/??/95 1LT8 Yorke typedef struct _saturn_cpu_core saturn_cpu_core; struct _saturn_cpu_core { - void (*out)(running_device*,int); - int (*in)(running_device*); - void (*reset)(running_device*); - void (*config)(running_device*,int v); - void (*unconfig)(running_device*,int v); - int (*id)(running_device*); - void (*crc)(running_device*,int addr, int data); - void (*rsi)(running_device*); + void (*out)(device_t*,int); + int (*in)(device_t*); + void (*reset)(device_t*); + void (*config)(device_t*,int v); + void (*unconfig)(device_t*,int v); + int (*id)(device_t*); + void (*crc)(device_t*,int addr, int data); + void (*rsi)(device_t*); }; enum diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index 1e6c1bc289b..cebc27039af 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -61,14 +61,14 @@ struct _sc61860_state int icount; }; -INLINE sc61860_state *get_safe_token(running_device *device) +INLINE sc61860_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SC61860); return (sc61860_state *)downcast(device)->token(); } -UINT8 *sc61860_internal_ram(running_device *device) +UINT8 *sc61860_internal_ram(device_t *device) { sc61860_state *cpustate = get_safe_token(device); return cpustate->ram; diff --git a/src/emu/cpu/sc61860/sc61860.h b/src/emu/cpu/sc61860/sc61860.h index e834873744d..16009bb0551 100644 --- a/src/emu/cpu/sc61860/sc61860.h +++ b/src/emu/cpu/sc61860/sc61860.h @@ -40,20 +40,20 @@ typedef struct _sc61860_cpu_core sc61860_cpu_core; struct _sc61860_cpu_core { - int (*reset)(running_device *device); - int (*brk)(running_device *device); - int (*x)(running_device *device); - int (*ina)(running_device *device); - void (*outa)(running_device *device, int); - int (*inb)(running_device *device); - void (*outb)(running_device *device, int); - void (*outc)(running_device *device, int); + int (*reset)(device_t *device); + int (*brk)(device_t *device); + int (*x)(device_t *device); + int (*ina)(device_t *device); + void (*outa)(device_t *device, int); + int (*inb)(device_t *device); + void (*outb)(device_t *device, int); + void (*outc)(device_t *device, int); }; CPU_DISASSEMBLE( sc61860 ); /* this is though for power on/off of the sharps */ -UINT8 *sc61860_internal_ram(running_device *device); +UINT8 *sc61860_internal_ram(device_t *device); DECLARE_LEGACY_CPU_DEVICE(SC61860, sc61860); diff --git a/src/emu/cpu/scmp/scmp.c b/src/emu/cpu/scmp/scmp.c index 04ba3043b3a..6ba324da679 100644 --- a/src/emu/cpu/scmp/scmp.c +++ b/src/emu/cpu/scmp/scmp.c @@ -54,7 +54,7 @@ struct _scmp_state INLINE FUNCTIONS ***************************************************************************/ -INLINE scmp_state *get_safe_token(running_device *device) +INLINE scmp_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SCMP || device->type() == INS8060); diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c index 708b6ba5f4d..5c140cbc4de 100644 --- a/src/emu/cpu/se3208/se3208.c +++ b/src/emu/cpu/se3208/se3208.c @@ -59,7 +59,7 @@ typedef void (*_OP)(se3208_state_t *se3208_state, UINT16 Opcode); #define INST(a) static void a(se3208_state_t *se3208_state, UINT16 Opcode) static _OP *OpTable=NULL; -INLINE se3208_state_t *get_safe_token(running_device *device) +INLINE se3208_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SE3208); diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c index 550a4cc744a..6df35052682 100644 --- a/src/emu/cpu/sh2/sh2.c +++ b/src/emu/cpu/sh2/sh2.c @@ -115,7 +115,7 @@ CPU_DISASSEMBLE( sh2 ); #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -INLINE sh2_state *get_safe_token(running_device *device) +INLINE sh2_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->token != NULL); @@ -2492,12 +2492,12 @@ CPU_GET_INFO( sh1 ) } } -void sh2drc_set_options(running_device *device, UINT32 options) +void sh2drc_set_options(device_t *device, UINT32 options) { /* doesn't apply here */ } -void sh2drc_add_pcflush(running_device *device, offs_t address) +void sh2drc_add_pcflush(device_t *device, offs_t address) { /* doesn't apply here */ } diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h index c437a8e8e02..873e7471f46 100644 --- a/src/emu/cpu/sh2/sh2.h +++ b/src/emu/cpu/sh2/sh2.h @@ -71,8 +71,8 @@ DECLARE_LEGACY_CPU_DEVICE(SH2, sh2); WRITE32_HANDLER( sh2_internal_w ); READ32_HANDLER( sh2_internal_r ); -void sh2_set_ftcsr_read_callback(running_device *device, void (*callback)(UINT32)); -void sh2_set_frt_input(running_device *device, int state); +void sh2_set_ftcsr_read_callback(device_t *device, void (*callback)(UINT32)); +void sh2_set_frt_input(device_t *device, int state); /*************************************************************************** COMPILER-SPECIFIC OPTIONS @@ -85,7 +85,7 @@ void sh2_set_frt_input(running_device *device, int state); #define SH2DRC_COMPATIBLE_OPTIONS (SH2DRC_STRICT_VERIFY | SH2DRC_FLUSH_PC | SH2DRC_STRICT_PCREL) #define SH2DRC_FASTEST_OPTIONS (0) -void sh2drc_set_options(running_device *device, UINT32 options); -void sh2drc_add_pcflush(running_device *device, offs_t address); +void sh2drc_set_options(device_t *device, UINT32 options); +void sh2drc_add_pcflush(device_t *device, offs_t address); #endif /* __SH2_H__ */ diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c index b1069c21637..278dcc1cd3a 100644 --- a/src/emu/cpu/sh2/sh2comn.c +++ b/src/emu/cpu/sh2/sh2comn.c @@ -159,7 +159,7 @@ static TIMER_CALLBACK( sh2_timer_callback ) -void sh2_notify_dma_data_available(running_device *device) +void sh2_notify_dma_data_available(device_t *device) { sh2_state *sh2 = GET_SH2(device); //printf("call notify\n"); @@ -719,13 +719,13 @@ READ32_HANDLER( sh2_internal_r ) return sh2->m[offset]; } -void sh2_set_ftcsr_read_callback(running_device *device, void (*callback)(UINT32)) +void sh2_set_ftcsr_read_callback(device_t *device, void (*callback)(UINT32)) { sh2_state *sh2 = GET_SH2(device); sh2->ftcsr_read_callback = callback; } -void sh2_set_frt_input(running_device *device, int state) +void sh2_set_frt_input(device_t *device, int state) { sh2_state *sh2 = GET_SH2(device); diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h index 411144ba31a..e70ea929ed0 100644 --- a/src/emu/cpu/sh2/sh2comn.h +++ b/src/emu/cpu/sh2/sh2comn.h @@ -189,6 +189,6 @@ void sh2_recalc_irq(sh2_state *sh2); void sh2_set_irq_line(sh2_state *sh2, int irqline, int state); void sh2_exception(sh2_state *sh2, const char *message, int irqline); void sh2_do_dma(sh2_state *sh2, int dma); -void sh2_notify_dma_data_available(running_device *device); +void sh2_notify_dma_data_available(device_t *device); #endif /* __SH2COMN_H__ */ diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c index 3dd1e7d3464..fa1745332e2 100644 --- a/src/emu/cpu/sh2/sh2drc.c +++ b/src/emu/cpu/sh2/sh2drc.c @@ -138,7 +138,7 @@ static void cfunc_DIV1(void *param); INLINE FUNCTIONS ***************************************************************************/ -INLINE sh2_state *get_safe_token(running_device *device) +INLINE sh2_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SH1 || @@ -3179,7 +3179,7 @@ static int generate_group_12(sh2_state *sh2, drcuml_block *block, compiler_state sh2drc_set_options - configure DRC options -------------------------------------------------*/ -void sh2drc_set_options(running_device *device, UINT32 options) +void sh2drc_set_options(device_t *device, UINT32 options) { sh2_state *sh2 = get_safe_token(device); sh2->drcoptions = options; @@ -3191,7 +3191,7 @@ void sh2drc_set_options(running_device *device, UINT32 options) the PC must be flushed for speedups to work -------------------------------------------------*/ -void sh2drc_add_pcflush(running_device *device, offs_t address) +void sh2drc_add_pcflush(device_t *device, offs_t address) { sh2_state *sh2 = get_safe_token(device); diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index 48e5775807d..f4a9d2f04c7 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -30,7 +30,7 @@ CPU_DISASSEMBLE( sh4 ); -INLINE sh4_state *get_safe_token(running_device *device) +INLINE sh4_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SH4); @@ -3606,7 +3606,7 @@ static CPU_SET_INFO( sh4 ) } } -void sh4_set_ftcsr_callback(running_device *device, sh4_ftcsr_callback callback) +void sh4_set_ftcsr_callback(device_t *device, sh4_ftcsr_callback callback) { sh4_state *sh4 = get_safe_token(device); sh4->ftcsr_read_callback = callback; diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index ce2d2845ff9..203965b11cb 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -95,10 +95,10 @@ DECLARE_LEGACY_CPU_DEVICE(SH4, sh4); WRITE32_HANDLER( sh4_internal_w ); READ32_HANDLER( sh4_internal_r ); -void sh4_set_frt_input(running_device *device, int state); -void sh4_set_irln_input(running_device *device, int value); -void sh4_set_ftcsr_callback(running_device *device, sh4_ftcsr_callback callback); -void sh4_dma_ddt(running_device *device, struct sh4_ddt_dma *s); +void sh4_set_frt_input(device_t *device, int state); +void sh4_set_irln_input(device_t *device, int value); +void sh4_set_ftcsr_callback(device_t *device, sh4_ftcsr_callback callback); +void sh4_dma_ddt(device_t *device, struct sh4_ddt_dma *s); #endif /* __SH4_H__ */ diff --git a/src/emu/cpu/sh4/sh4comn.c b/src/emu/cpu/sh4/sh4comn.c index 8d58e0b899d..438378c5a68 100644 --- a/src/emu/cpu/sh4/sh4comn.c +++ b/src/emu/cpu/sh4/sh4comn.c @@ -30,7 +30,7 @@ static const UINT16 tcnt[] = { TCNT0, TCNT1, TCNT2 }; static const UINT16 tcor[] = { TCOR0, TCOR1, TCOR2 }; static const UINT16 tcr[] = { TCR0, TCR1, TCR2 }; -INLINE sh4_state *get_safe_token(running_device *device) +INLINE sh4_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SH4); @@ -995,7 +995,7 @@ READ32_HANDLER( sh4_internal_r ) return sh4->m[offset]; } -void sh4_set_frt_input(running_device *device, int state) +void sh4_set_frt_input(device_t *device, int state) { sh4_state *sh4 = get_safe_token(device); @@ -1031,7 +1031,7 @@ void sh4_set_frt_input(running_device *device, int state) #endif } -void sh4_set_irln_input(running_device *device, int value) +void sh4_set_irln_input(device_t *device, int value) { sh4_state *sh4 = get_safe_token(device); @@ -1160,7 +1160,7 @@ void sh4_parse_configuration(sh4_state *sh4, const struct sh4_config *conf) } } -void sh4_common_init(running_device *device) +void sh4_common_init(device_t *device) { sh4_state *sh4 = get_safe_token(device); int i; @@ -1187,7 +1187,7 @@ void sh4_common_init(running_device *device) sh4->m = auto_alloc_array(device->machine, UINT32, 16384); } -void sh4_dma_ddt(running_device *device, struct sh4_ddt_dma *s) +void sh4_dma_ddt(device_t *device, struct sh4_ddt_dma *s) { sh4_state *sh4 = get_safe_token(device); UINT32 chcr; diff --git a/src/emu/cpu/sh4/sh4comn.h b/src/emu/cpu/sh4/sh4comn.h index 2e532656422..810fe094cc8 100644 --- a/src/emu/cpu/sh4/sh4comn.h +++ b/src/emu/cpu/sh4/sh4comn.h @@ -149,7 +149,7 @@ void sh4_set_irq_line(sh4_state *sh4, int irqline, int state); // set state of e #ifdef LSB_FIRST void sh4_swap_fp_couples(sh4_state *sh4); #endif -void sh4_common_init(running_device *device); +void sh4_common_init(device_t *device); INLINE void sh4_check_pending_irq(sh4_state *sh4, const char *message) // look for highest priority active exception and handle it { diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index 1255795b255..757b1206ac1 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -184,7 +184,7 @@ static void (* sharc_op[512])(SHARC_REGS *cpustate); ((UINT64)(cpustate->internal_ram[((pc-0x20000) * 3) + 1]) << 16) | \ ((UINT64)(cpustate->internal_ram[((pc-0x20000) * 3) + 2]) << 0) -INLINE SHARC_REGS *get_safe_token(running_device *device) +INLINE SHARC_REGS *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ADSP21062); @@ -369,7 +369,7 @@ static void build_opcode_table(void) /*****************************************************************************/ -void sharc_external_iop_write(running_device *device, UINT32 address, UINT32 data) +void sharc_external_iop_write(device_t *device, UINT32 address, UINT32 data) { SHARC_REGS *cpustate = get_safe_token(device); if (address == 0x1c) @@ -386,7 +386,7 @@ void sharc_external_iop_write(running_device *device, UINT32 address, UINT32 dat } } -void sharc_external_dma_write(running_device *device, UINT32 address, UINT64 data) +void sharc_external_dma_write(device_t *device, UINT32 address, UINT64 data) { SHARC_REGS *cpustate = get_safe_token(device); switch ((cpustate->dma[6].control >> 6) & 0x3) @@ -606,7 +606,7 @@ static void sharc_set_irq_line(SHARC_REGS *cpustate, int irqline, int state) } } -void sharc_set_flag_input(running_device *device, int flag_num, int state) +void sharc_set_flag_input(device_t *device, int flag_num, int state) { SHARC_REGS *cpustate = get_safe_token(device); if (flag_num >= 0 && flag_num < 4) diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h index b857a822ca0..1150c74bda4 100644 --- a/src/emu/cpu/sharc/sharc.h +++ b/src/emu/cpu/sharc/sharc.h @@ -21,10 +21,10 @@ typedef struct { SHARC_BOOT_MODE boot_mode; } sharc_config; -extern void sharc_set_flag_input(running_device *device, int flag_num, int state); +extern void sharc_set_flag_input(device_t *device, int flag_num, int state); -extern void sharc_external_iop_write(running_device *device, UINT32 address, UINT32 data); -extern void sharc_external_dma_write(running_device *device, UINT32 address, UINT64 data); +extern void sharc_external_iop_write(device_t *device, UINT32 address, UINT32 data); +extern void sharc_external_dma_write(device_t *device, UINT32 address, UINT64 data); DECLARE_LEGACY_CPU_DEVICE(ADSP21062, adsp21062); diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index 889f1ae6c07..09ff95d2c8c 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -56,7 +56,7 @@ struct _sm8500_state UINT8 register_ram[0x108]; }; -INLINE sm8500_state *get_safe_token(running_device *device) +INLINE sm8500_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SM8500); diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h index f24c5e329f0..7e942b6b68f 100644 --- a/src/emu/cpu/sm8500/sm8500.h +++ b/src/emu/cpu/sm8500/sm8500.h @@ -5,8 +5,8 @@ typedef struct { - void (*handle_dma)(running_device *device, int cycles); - void (*handle_timers)(running_device *device, int cycles); + void (*handle_dma)(device_t *device, int cycles); + void (*handle_timers)(device_t *device, int cycles); } SM8500_CONFIG; /* interrupts */ diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index d7ba987db56..9bb5e595473 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -98,7 +98,7 @@ typedef struct int spc_int32; } spc700i_cpu; -INLINE spc700i_cpu *get_safe_token(running_device *device) +INLINE spc700i_cpu *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SPC700); diff --git a/src/emu/cpu/ssem/ssem.c b/src/emu/cpu/ssem/ssem.c index 78352f52cdc..5d70ddb6f51 100644 --- a/src/emu/cpu/ssem/ssem.c +++ b/src/emu/cpu/ssem/ssem.c @@ -26,7 +26,7 @@ struct _ssem_state int icount; }; -INLINE ssem_state *get_safe_token(running_device *device) +INLINE ssem_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SSEM); diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c index afab84cbfc5..b739033f388 100644 --- a/src/emu/cpu/ssp1601/ssp1601.c +++ b/src/emu/cpu/ssp1601/ssp1601.c @@ -58,7 +58,7 @@ struct _ssp1601_state_t address_space *io; }; -INLINE ssp1601_state_t *get_safe_token(running_device *device) +INLINE ssp1601_state_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SSP1601); diff --git a/src/emu/cpu/superfx/superfx.c b/src/emu/cpu/superfx/superfx.c index 21843831c4f..7c822dfe606 100644 --- a/src/emu/cpu/superfx/superfx.c +++ b/src/emu/cpu/superfx/superfx.c @@ -66,7 +66,7 @@ struct _superfx_state int icount; }; -INLINE superfx_state *get_safe_token(running_device *device) +INLINE superfx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SUPERFX); @@ -471,7 +471,7 @@ INLINE UINT8 superfx_pipe(superfx_state *cpustate) /*****************************************************************************/ /* reads to SuperFX RAM only happen if this returns 1 */ -int superfx_access_ram(running_device *cpu) +int superfx_access_ram(device_t *cpu) { superfx_state *cpustate = get_safe_token(cpu); @@ -482,7 +482,7 @@ int superfx_access_ram(running_device *cpu) } /* reads to SuperFX ROM only happen if this returns 1 */ -int superfx_access_rom(running_device *cpu) +int superfx_access_rom(device_t *cpu) { superfx_state *cpustate = get_safe_token(cpu); @@ -492,7 +492,7 @@ int superfx_access_rom(running_device *cpu) return 1; } -UINT8 superfx_mmio_read(running_device *cpu, UINT32 addr) +UINT8 superfx_mmio_read(device_t *cpu, UINT32 addr) { superfx_state *cpustate = get_safe_token(cpu); @@ -544,7 +544,7 @@ UINT8 superfx_mmio_read(running_device *cpu, UINT32 addr) return 0; } -void superfx_mmio_write(running_device *cpu, UINT32 addr, UINT8 data) +void superfx_mmio_write(device_t *cpu, UINT32 addr, UINT8 data) { superfx_state *cpustate = get_safe_token(cpu); @@ -659,7 +659,7 @@ static void superfx_timing_reset(superfx_state *cpustate) cpustate->ramdr = 0; } -void superfx_add_clocks(running_device *cpu, INT32 clocks) +void superfx_add_clocks(device_t *cpu, INT32 clocks) { superfx_state *cpustate = get_safe_token(cpu); diff --git a/src/emu/cpu/superfx/superfx.h b/src/emu/cpu/superfx/superfx.h index 5e89882de99..a6aafe82e26 100644 --- a/src/emu/cpu/superfx/superfx.h +++ b/src/emu/cpu/superfx/superfx.h @@ -95,10 +95,10 @@ DECLARE_LEGACY_CPU_DEVICE(SUPERFX, superfx); CPU_DISASSEMBLE( superfx ); extern offs_t superfx_dasm_one(char *buffer, offs_t pc, UINT8 op, UINT8 param0, UINT8 param1, UINT16 alt); -UINT8 superfx_mmio_read(running_device *cpu, UINT32 addr); -void superfx_mmio_write(running_device *cpu, UINT32 addr, UINT8 data); -void superfx_add_clocks(running_device *cpu, INT32 clocks); -int superfx_access_ram(running_device *cpu); -int superfx_access_rom(running_device *cpu); +UINT8 superfx_mmio_read(device_t *cpu, UINT32 addr); +void superfx_mmio_write(device_t *cpu, UINT32 addr, UINT8 data); +void superfx_add_clocks(device_t *cpu, INT32 clocks); +int superfx_access_ram(device_t *cpu); +int superfx_access_rom(device_t *cpu); #endif /* __SUPERFX_H__ */ diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index fa8653b1a3d..32b0b86efcf 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -39,7 +39,7 @@ struct _t11_state }; -INLINE t11_state *get_safe_token(running_device *device) +INLINE t11_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == T11); diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c index 288cdb15a4a..2f4606dd086 100644 --- a/src/emu/cpu/tlcs90/tlcs90.c +++ b/src/emu/cpu/tlcs90/tlcs90.c @@ -60,7 +60,7 @@ typedef struct } t90_Regs; -INLINE t90_Regs *get_safe_token(running_device *device) +INLINE t90_Regs *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMP90840 || diff --git a/src/emu/cpu/tlcs900/tlcs900.c b/src/emu/cpu/tlcs900/tlcs900.c index a297651af55..9fd97935769 100644 --- a/src/emu/cpu/tlcs900/tlcs900.c +++ b/src/emu/cpu/tlcs900/tlcs900.c @@ -204,7 +204,7 @@ struct _tlcs900_state #define WRMEML(addr,data) { UINT32 dl = data; WRMEMW(addr,dl); WRMEMW(addr+2,(dl >> 16)); } -INLINE tlcs900_state *get_safe_token( running_device *device ) +INLINE tlcs900_state *get_safe_token( device_t *device ) { assert( device != NULL ); assert( device->type() == TLCS900H ); diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c index 62b5ef1dc2f..4ccda8b4c46 100644 --- a/src/emu/cpu/tms0980/tms0980.c +++ b/src/emu/cpu/tms0980/tms0980.c @@ -446,7 +446,7 @@ static const UINT32 tms1100_default_decode[256] = { }; -INLINE tms0980_state *get_safe_token(running_device *device) +INLINE tms0980_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS0980 || @@ -758,7 +758,7 @@ static const UINT8 tms1000_pc_decode[64] = }; -static void tms0980_set_cki_bus( running_device *device ) +static void tms0980_set_cki_bus( device_t *device ) { tms0980_state *cpustate = get_safe_token( device ); diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index ae7290dff9b..dd3c1039047 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -104,7 +104,7 @@ struct _tms32010_state address_space *io; }; -INLINE tms32010_state *get_safe_token(running_device *device) +INLINE tms32010_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS32010 || diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index 128e6cce0a1..65085fe2318 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -183,7 +183,7 @@ struct _tms32025_state UINT16 *datamap[0x200]; }; -INLINE tms32025_state *get_safe_token(running_device *device) +INLINE tms32025_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS32025 || diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 12014b08807..07645818154 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -124,7 +124,7 @@ struct _tms32031_state direct_read_data *direct; }; -INLINE tms32031_state *get_safe_token(running_device *device) +INLINE tms32031_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS32031 || diff --git a/src/emu/cpu/tms32031/tms32031.h b/src/emu/cpu/tms32031/tms32031.h index 39903508ad8..0e9ec2d004f 100644 --- a/src/emu/cpu/tms32031/tms32031.h +++ b/src/emu/cpu/tms32031/tms32031.h @@ -16,8 +16,8 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef void (*tms32031_xf_func)(running_device *device, UINT8 val); -typedef void (*tms32031_iack_func)(running_device *device, UINT8 val, offs_t address); +typedef void (*tms32031_xf_func)(device_t *device, UINT8 val); +typedef void (*tms32031_iack_func)(device_t *device, UINT8 val, offs_t address); typedef struct _tms32031_config tms32031_config; diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index 78d572732dd..c4ae2dde9d8 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -150,7 +150,7 @@ struct _tms32051_state int icount; }; -INLINE tms32051_state *get_safe_token(running_device *device) +INLINE tms32051_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS32051); diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index 51fb9e8397c..f4e23a2486e 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -81,7 +81,7 @@ struct _tms34010_state UINT16 IOregs[64]; }; -INLINE tms34010_state *get_safe_token(running_device *device) +INLINE tms34010_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS34010 || @@ -1044,7 +1044,7 @@ static TIMER_CALLBACK( scanline_callback ) } -void tms34010_get_display_params(running_device *cpu, tms34010_display_params *params) +void tms34010_get_display_params(device_t *cpu, tms34010_display_params *params) { tms34010_state *tms = get_safe_token(cpu); @@ -1557,7 +1557,7 @@ static STATE_POSTLOAD( tms34010_state_postload ) HOST INTERFACE WRITES ***************************************************************************/ -void tms34010_host_w(running_device *cpu, int reg, int data) +void tms34010_host_w(device_t *cpu, int reg, int data) { address_space *space; tms34010_state *tms = get_safe_token(cpu); @@ -1613,7 +1613,7 @@ void tms34010_host_w(running_device *cpu, int reg, int data) HOST INTERFACE READS ***************************************************************************/ -int tms34010_host_r(running_device *cpu, int reg) +int tms34010_host_r(device_t *cpu, int reg) { tms34010_state *tms = get_safe_token(cpu); unsigned int addr; diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 22a975778a2..f53323f34a6 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -197,7 +197,7 @@ struct _tms34010_config UINT32 pixclock; /* the pixel clock (0 means don't adjust screen size) */ int pixperclock; /* pixels per clock */ void (*scanline_callback)(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params); - void (*output_int)(running_device *device, int state); /* output interrupt callback */ + void (*output_int)(device_t *device, int state); /* output interrupt callback */ void (*to_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register write */ void (*from_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register read */ }; @@ -205,7 +205,7 @@ struct _tms34010_config /* PUBLIC FUNCTIONS - 34010 */ VIDEO_UPDATE( tms340x0 ); -void tms34010_get_display_params(running_device *cpu, tms34010_display_params *params); +void tms34010_get_display_params(device_t *cpu, tms34010_display_params *params); DECLARE_LEGACY_CPU_DEVICE(TMS34010, tms34010); DECLARE_LEGACY_CPU_DEVICE(TMS34020, tms34020); @@ -217,8 +217,8 @@ DECLARE_LEGACY_CPU_DEVICE(TMS34020, tms34020); #define TMS34010_HOST_DATA 2 #define TMS34010_HOST_CONTROL 3 -void tms34010_host_w(running_device *cpu, int reg, int data); -int tms34010_host_r(running_device *cpu, int reg); +void tms34010_host_w(device_t *cpu, int reg, int data); +int tms34010_host_r(device_t *cpu, int reg); /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */ diff --git a/src/emu/cpu/tms57002/tms57002.c b/src/emu/cpu/tms57002/tms57002.c index 90eed39f47b..cb3bcc2a60b 100644 --- a/src/emu/cpu/tms57002/tms57002.c +++ b/src/emu/cpu/tms57002/tms57002.c @@ -109,7 +109,7 @@ typedef struct { int unsupported_inst_warning; } tms57002_t; -INLINE tms57002_t *get_safe_token(running_device *device) +INLINE tms57002_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS57002); @@ -252,7 +252,7 @@ READ8_DEVICE_HANDLER(tms57002_dready_r) return s->sti & S_HOST ? 0 : 1; } -void tms57002_sync(running_device *device) +void tms57002_sync(device_t *device) { tms57002_t *s = get_safe_token(device); diff --git a/src/emu/cpu/tms57002/tms57002.h b/src/emu/cpu/tms57002/tms57002.h index f157c19cfc3..f8ea1813c16 100644 --- a/src/emu/cpu/tms57002/tms57002.h +++ b/src/emu/cpu/tms57002/tms57002.h @@ -18,7 +18,7 @@ WRITE8_DEVICE_HANDLER(tms57002_cload_w); READ8_DEVICE_HANDLER(tms57002_empty_r); READ8_DEVICE_HANDLER(tms57002_dready_r); -void tms57002_sync(running_device *cpu); +void tms57002_sync(device_t *cpu); #endif diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c index 00dd8570ff4..ed5769e7628 100644 --- a/src/emu/cpu/tms7000/tms7000.c +++ b/src/emu/cpu/tms7000/tms7000.c @@ -45,7 +45,7 @@ static void tms7000_check_IRQ_lines(tms7000_state *cpustate); static void tms7000_do_interrupt( tms7000_state *cpustate, UINT16 address, UINT8 line ); static CPU_EXECUTE( tms7000 ); static CPU_EXECUTE( tms7000_exl ); -static void tms7000_service_timer1( running_device *device ); +static void tms7000_service_timer1( device_t *device ); static UINT16 bcd_add( UINT16 a, UINT16 b ); static UINT16 bcd_tencomp( UINT16 a ); static UINT16 bcd_sub( UINT16 a, UINT16 b); @@ -86,7 +86,7 @@ struct _tms7000_state UINT8 idle_state; /* Set after the execution of an idle instruction */ }; -INLINE tms7000_state *get_safe_token(running_device *device) +INLINE tms7000_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS7000 || @@ -525,7 +525,7 @@ static CPU_EXECUTE( tms7000_exl ) /**************************************************************************** * Trigger the event counter ****************************************************************************/ -void tms7000_A6EC1( running_device *device ) +void tms7000_A6EC1( device_t *device ) { tms7000_state *cpustate = get_safe_token(device); if( (cpustate->pf[0x03] & 0x80) == 0x80 ) /* Is timer system active? */ @@ -535,7 +535,7 @@ void tms7000_A6EC1( running_device *device ) } } -static void tms7000_service_timer1( running_device *device ) +static void tms7000_service_timer1( device_t *device ) { tms7000_state *cpustate = get_safe_token(device); if( --cpustate->t1_prescaler < 0 ) /* Decrement prescaler and check for underflow */ diff --git a/src/emu/cpu/tms7000/tms7000.h b/src/emu/cpu/tms7000/tms7000.h index 5fa5c1609fb..db07f4fb36b 100644 --- a/src/emu/cpu/tms7000/tms7000.h +++ b/src/emu/cpu/tms7000/tms7000.h @@ -46,7 +46,7 @@ enum }; /* PUBLIC FUNCTIONS */ -extern void tms7000_A6EC1( running_device *device ); /* External event counter */ +extern void tms7000_A6EC1( device_t *device ); /* External event counter */ DECLARE_LEGACY_CPU_DEVICE(TMS7000, tms7000); DECLARE_LEGACY_CPU_DEVICE(TMS7000_EXL, tms7000_exl); diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h index 273fff6eab6..bf55f1eb7b3 100644 --- a/src/emu/cpu/tms9900/99xxcore.h +++ b/src/emu/cpu/tms9900/99xxcore.h @@ -509,7 +509,7 @@ struct _tms99xx_state int extra_byte; /* buffer holding the unused byte in a word read */ }; -INLINE tms99xx_state *get_safe_token(running_device *device) +INLINE tms99xx_state *get_safe_token(device_t *device) { assert(device != NULL); // assert(device->type() == TMS99XX_GET_INFO); @@ -1208,7 +1208,7 @@ static void set_flag1(tms99xx_state *cpustate, int val); /**************************************************************************/ -static void register_for_save_state(running_device *device) +static void register_for_save_state(device_t *device) { tms99xx_state *cpustate = get_safe_token(device); state_save_register_device_item(device, 0, cpustate->WP); diff --git a/src/emu/cpu/tms9900/tms9900.h b/src/emu/cpu/tms9900/tms9900.h index ecb264d990b..c6decc93378 100644 --- a/src/emu/cpu/tms9900/tms9900.h +++ b/src/emu/cpu/tms9900/tms9900.h @@ -48,11 +48,11 @@ enum TMS9900_R12, TMS9900_R13, TMS9900_R14, TMS9900_R15 }; -typedef void (*ti99xx_idle_func)(running_device *device, int state); -typedef void (*ti99xx_rset_func)(running_device *device); -typedef void (*ti99xx_lrex_func)(running_device *device); -typedef void (*ti99xx_ckon_ckof_func)(running_device *device, int state); -typedef void (*ti99xx_error_interrupt_func)(running_device *device, int state); +typedef void (*ti99xx_idle_func)(device_t *device, int state); +typedef void (*ti99xx_rset_func)(device_t *device); +typedef void (*ti99xx_lrex_func)(device_t *device); +typedef void (*ti99xx_ckon_ckof_func)(device_t *device, int state); +typedef void (*ti99xx_error_interrupt_func)(device_t *device, int state); DECLARE_LEGACY_CPU_DEVICE(TI990_10, ti990_10); diff --git a/src/emu/cpu/unsp/unsp.c b/src/emu/cpu/unsp/unsp.c index f85b443a2a1..04d3c6cffa1 100644 --- a/src/emu/cpu/unsp/unsp.c +++ b/src/emu/cpu/unsp/unsp.c @@ -10,7 +10,7 @@ #include "debugger.h" #include "unsp.h" -INLINE unsp_state *get_safe_token(running_device *device) +INLINE unsp_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == UNSP); diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index 78fba46e5c8..48101ea8963 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -506,7 +506,7 @@ struct _upd7810_state int icount; }; -INLINE upd7810_state *get_safe_token(running_device *device) +INLINE upd7810_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == UPD7810 || diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h index 3f434a54e11..4bb2ba2e062 100644 --- a/src/emu/cpu/upd7810/upd7810.h +++ b/src/emu/cpu/upd7810/upd7810.h @@ -30,7 +30,7 @@ typedef enum * It will be called whenever an output signal changes or a new * input line state is to be sampled. */ -typedef int (*upd7810_io_callback)(running_device *device, int ioline, int state); +typedef int (*upd7810_io_callback)(device_t *device, int ioline, int state); // use it as reset parameter in the Machine struct typedef struct { diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c index ed8154facd1..64d2a4dafa1 100644 --- a/src/emu/cpu/v30mz/v30mz.c +++ b/src/emu/cpu/v30mz/v30mz.c @@ -102,7 +102,7 @@ struct _v30mz_state extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config); -INLINE v30mz_state *get_safe_token(running_device *device) +INLINE v30mz_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == V30MZ); diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c index 621d0edf7cc..ca17d8afd13 100644 --- a/src/emu/cpu/v60/v60.c +++ b/src/emu/cpu/v60/v60.c @@ -125,7 +125,7 @@ struct _v60_state UINT8 moddim; }; -INLINE v60_state *get_safe_token(running_device *device) +INLINE v60_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == V60 || @@ -397,7 +397,7 @@ static CPU_EXIT( v60 ) { } -void v60_stall(running_device *device) +void v60_stall(device_t *device) { v60_state *cpustate = get_safe_token(device); cpustate->stall_io = 1; diff --git a/src/emu/cpu/v60/v60.h b/src/emu/cpu/v60/v60.h index 9ac1f69549f..35b653aed26 100644 --- a/src/emu/cpu/v60/v60.h +++ b/src/emu/cpu/v60/v60.h @@ -77,7 +77,7 @@ enum V60_REGMAX }; -void v60_stall(running_device *device); +void v60_stall(device_t *device); DECLARE_LEGACY_CPU_DEVICE(V60, v60); DECLARE_LEGACY_CPU_DEVICE(V70, v70); diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index 161832b7dfa..7c4ab5a7b20 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -39,7 +39,7 @@ struct _v810_state int icount; }; -INLINE v810_state *get_safe_token(running_device *device) +INLINE v810_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == V810); diff --git a/src/emu/cpu/vtlb.c b/src/emu/cpu/vtlb.c index cf128e5b134..a8b68d4bdda 100644 --- a/src/emu/cpu/vtlb.c +++ b/src/emu/cpu/vtlb.c @@ -54,7 +54,7 @@ struct _vtlb_state given CPU -------------------------------------------------*/ -vtlb_state *vtlb_alloc(running_device *cpu, int space, int fixed_entries, int dynamic_entries) +vtlb_state *vtlb_alloc(device_t *cpu, int space, int fixed_entries, int dynamic_entries) { vtlb_state *vtlb; diff --git a/src/emu/cpu/vtlb.h b/src/emu/cpu/vtlb.h index feb8417f597..58908a928b9 100644 --- a/src/emu/cpu/vtlb.h +++ b/src/emu/cpu/vtlb.h @@ -55,7 +55,7 @@ typedef struct _vtlb_state vtlb_state; /* ----- initialization/teardown ----- */ /* allocate a new VTLB for the given CPU */ -vtlb_state *vtlb_alloc(running_device *cpu, int space, int fixed_entries, int dynamic_entries); +vtlb_state *vtlb_alloc(device_t *cpu, int space, int fixed_entries, int dynamic_entries); /* free an allocated VTLB */ void vtlb_free(vtlb_state *vtlb); diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index 38f801ca225..f68552be1eb 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -150,7 +150,7 @@ struct _z180_state UINT8 *cc[6]; }; -INLINE z180_state *get_safe_token(running_device *device) +INLINE z180_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == Z180); diff --git a/src/emu/cpu/z180/z180.h b/src/emu/cpu/z180/z180.h index 36180a20e75..7cb62db363d 100644 --- a/src/emu/cpu/z180/z180.h +++ b/src/emu/cpu/z180/z180.h @@ -130,8 +130,8 @@ enum #ifdef UNUSED_DEFINITION /* MMU mapped memory lookup */ -extern UINT8 z180_readmem(running_device *device, offs_t offset); -extern void z180_writemem(running_device *device, offs_t offset, UINT8 data); +extern UINT8 z180_readmem(device_t *device, offs_t offset); +extern void z180_writemem(device_t *device, offs_t offset, UINT8 data); #endif DECLARE_LEGACY_CPU_DEVICE(Z180, z180); diff --git a/src/emu/cpu/z180/z180ops.h b/src/emu/cpu/z180/z180ops.h index f9245620feb..b2efef210cb 100644 --- a/src/emu/cpu/z180/z180ops.h +++ b/src/emu/cpu/z180/z180ops.h @@ -68,7 +68,7 @@ INLINE void z180_mmu(z180_state *cpustate) ***************************************************************/ #define RM(cs,addr) (cs)->program->read_byte(MMU_REMAP_ADDR(cs,addr)) #ifdef UNUSED_FUNCTION -UINT8 z180_readmem(running_device *device, offs_t offset) +UINT8 z180_readmem(device_t *device, offs_t offset) { z180_state *cpustate = get_safe_token(device); return RM(cpustate, offset); @@ -80,7 +80,7 @@ UINT8 z180_readmem(running_device *device, offs_t offset) ***************************************************************/ #define WM(cs,addr,value) (cs)->program->write_byte(MMU_REMAP_ADDR(cs,addr),value) #ifdef UNUSED_FUNCTION -void z180_writemem(running_device *device, offs_t offset, UINT8 data) +void z180_writemem(device_t *device, offs_t offset, UINT8 data) { z180_state *cpustate = get_safe_token(device); WM(cpustate, offset, data); diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c index baeb1da9f64..eb2a3042ba6 100644 --- a/src/emu/cpu/z8/z8.c +++ b/src/emu/cpu/z8/z8.c @@ -192,7 +192,7 @@ struct _z8_state INLINE FUNCTIONS ***************************************************************************/ -INLINE z8_state *get_safe_token(running_device *device) +INLINE z8_state *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == Z8601) || diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index f7262211a79..d3359479b35 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -164,7 +164,7 @@ struct _z80_state const UINT8 * cc_ex; }; -INLINE z80_state *get_safe_token(running_device *device) +INLINE z80_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == Z80 || device->type() == NSC800); @@ -3801,7 +3801,7 @@ static CPU_SET_INFO( nsc800 ) } } -void z80_set_cycle_tables(running_device *device, const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex) +void z80_set_cycle_tables(device_t *device, const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex) { z80_state *z80 = get_safe_token(device); diff --git a/src/emu/cpu/z80/z80.h b/src/emu/cpu/z80/z80.h index e500c6d670f..3353240dcaa 100644 --- a/src/emu/cpu/z80/z80.h +++ b/src/emu/cpu/z80/z80.h @@ -29,6 +29,6 @@ DECLARE_LEGACY_CPU_DEVICE(NSC800, nsc800); CPU_DISASSEMBLE( z80 ); -void z80_set_cycle_tables(running_device *device, const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex); +void z80_set_cycle_tables(device_t *device, const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex); #endif /* __Z80_H__ */ diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c index 8072c0f5dfa..7c7d546c1d1 100644 --- a/src/emu/cpu/z8000/z8000.c +++ b/src/emu/cpu/z8000/z8000.c @@ -91,7 +91,7 @@ struct _z8000_state #include "z8000cpu.h" -INLINE z8000_state *get_safe_token(running_device *device) +INLINE z8000_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == Z8001 || device->type() == Z8002); diff --git a/src/emu/debugint/debugint.c b/src/emu/debugint/debugint.c index a63b500a0b0..a6fedf61500 100644 --- a/src/emu/debugint/debugint.c +++ b/src/emu/debugint/debugint.c @@ -1384,7 +1384,7 @@ static void handle_menus(running_machine *machine) // followers_set_cpu //============================================================ -static void followers_set_cpu(running_device *device) +static void followers_set_cpu(device_t *device) { astring title; @@ -1439,7 +1439,7 @@ static void update_views(void) } -void debugint_wait_for_debugger(running_device &device, bool firststop) +void debugint_wait_for_debugger(device_t &device, bool firststop) { if (firststop && list == NULL) diff --git a/src/emu/debugint/debugint.h b/src/emu/debugint/debugint.h index 5964ee83caa..4d057e17b15 100644 --- a/src/emu/debugint/debugint.h +++ b/src/emu/debugint/debugint.h @@ -39,7 +39,7 @@ void debugint_init(running_machine *machine); /* process events for internal debugger */ -void debugint_wait_for_debugger(running_device &device, bool firststop); +void debugint_wait_for_debugger(device_t &device, bool firststop); /* update the internal debugger during a game */ void debugint_update_during_game(running_machine *machine); diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h index 6ed7bba226a..6179d23872a 100644 --- a/src/emu/devintrf.h +++ b/src/emu/devintrf.h @@ -598,10 +598,6 @@ protected: }; -// running_device is an alias for device_t for now -typedef device_t running_device; - - // ======================> device_interface diff --git a/src/emu/image.c b/src/emu/image.c index e8c28d01ee3..d3c08ef028e 100644 --- a/src/emu/image.c +++ b/src/emu/image.c @@ -515,7 +515,7 @@ void image_add_device_with_subdevices(device_t *owner, device_type type, const c machine_config *config = (machine_config *)owner->machine->config; device_config *devconfig = type(*config, owner->subtag(tempstring,tag), &owner->baseconfig(), clock); - running_device *device = device_list->append(devconfig->tag(), devconfig->alloc_device(*owner->machine)); + device_t *device = device_list->append(devconfig->tag(), devconfig->alloc_device(*owner->machine)); machine_config_constructor machconfig = device->machine_config_additions(); if (machconfig != NULL) diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c index 6c809fe1751..f4b19bbf8d3 100644 --- a/src/emu/machine/6526cia.c +++ b/src/emu/machine/6526cia.c @@ -923,7 +923,7 @@ UINT16 mos6526_device::cia_timer::get_count() TRAMPOLINES ***************************************************************************/ -void cia_set_port_mask_value(running_device *device, int port, int data) { downcast(device)->set_port_mask_value(port, data); } +void cia_set_port_mask_value(device_t *device, int port, int data) { downcast(device)->set_port_mask_value(port, data); } READ8_DEVICE_HANDLER( mos6526_r ) { return downcast(device)->reg_r(offset); } WRITE8_DEVICE_HANDLER( mos6526_w ) { downcast(device)->reg_w(offset, data); } diff --git a/src/emu/machine/6526cia.h b/src/emu/machine/6526cia.h index e79387d4917..970d9ab91c1 100644 --- a/src/emu/machine/6526cia.h +++ b/src/emu/machine/6526cia.h @@ -263,6 +263,6 @@ WRITE_LINE_DEVICE_HANDLER( mos6526_sp_w ); WRITE_LINE_DEVICE_HANDLER( mos6526_flag_w ); /* port mask */ -void cia_set_port_mask_value(running_device *device, int port, int data); +void cia_set_port_mask_value(device_t *device, int port, int data); #endif /* __6526CIA_H__ */ diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c index 87e604a1883..2402ba66985 100644 --- a/src/emu/machine/6532riot.c +++ b/src/emu/machine/6532riot.c @@ -405,7 +405,7 @@ UINT8 riot6532_device::reg_r(UINT8 offset) porta_in_set - set port A input value -------------------------------------------------*/ -void riot6532_porta_in_set(running_device *device, UINT8 data, UINT8 mask) +void riot6532_porta_in_set(device_t *device, UINT8 data, UINT8 mask) { riot6532_device *via = downcast(device); via->porta_in_set(data, mask); @@ -422,7 +422,7 @@ void riot6532_device::porta_in_set(UINT8 data, UINT8 mask) portb_in_set - set port B input value -------------------------------------------------*/ -void riot6532_portb_in_set(running_device *device, UINT8 data, UINT8 mask) +void riot6532_portb_in_set(device_t *device, UINT8 data, UINT8 mask) { riot6532_device *via = downcast(device); via->portb_in_set(data, mask); @@ -438,7 +438,7 @@ void riot6532_device::portb_in_set(UINT8 data, UINT8 mask) porta_in_get - return port A input value -------------------------------------------------*/ -UINT8 riot6532_porta_in_get(running_device *device) +UINT8 riot6532_porta_in_get(device_t *device) { riot6532_device *via = downcast(device); return via->porta_in_get(); @@ -454,7 +454,7 @@ UINT8 riot6532_device::porta_in_get() portb_in_get - return port B input value -------------------------------------------------*/ -UINT8 riot6532_portb_in_get(running_device *device) +UINT8 riot6532_portb_in_get(device_t *device) { riot6532_device *via = downcast(device); return via->portb_in_get(); @@ -470,7 +470,7 @@ UINT8 riot6532_device::portb_in_get() porta_in_get - return port A output value -------------------------------------------------*/ -UINT8 riot6532_porta_out_get(running_device *device) +UINT8 riot6532_porta_out_get(device_t *device) { riot6532_device *via = downcast(device); return via->porta_out_get(); @@ -486,7 +486,7 @@ UINT8 riot6532_device::porta_out_get() portb_in_get - return port B output value -------------------------------------------------*/ -UINT8 riot6532_portb_out_get(running_device *device) +UINT8 riot6532_portb_out_get(device_t *device) { riot6532_device *via = downcast(device); return via->portb_out_get(); diff --git a/src/emu/machine/6532riot.h b/src/emu/machine/6532riot.h index a97f0a6d3fa..adbdb9c1670 100644 --- a/src/emu/machine/6532riot.h +++ b/src/emu/machine/6532riot.h @@ -144,13 +144,13 @@ extern const device_type RIOT6532; READ8_DEVICE_HANDLER( riot6532_r ); WRITE8_DEVICE_HANDLER( riot6532_w ); -void riot6532_porta_in_set(running_device *device, UINT8 data, UINT8 mask); -void riot6532_portb_in_set(running_device *device, UINT8 data, UINT8 mask); +void riot6532_porta_in_set(device_t *device, UINT8 data, UINT8 mask); +void riot6532_portb_in_set(device_t *device, UINT8 data, UINT8 mask); -UINT8 riot6532_porta_in_get(running_device *device); -UINT8 riot6532_portb_in_get(running_device *device); +UINT8 riot6532_porta_in_get(device_t *device); +UINT8 riot6532_portb_in_get(device_t *device); -UINT8 riot6532_porta_out_get(running_device *device); -UINT8 riot6532_portb_out_get(running_device *device); +UINT8 riot6532_porta_out_get(device_t *device); +UINT8 riot6532_portb_out_get(device_t *device); #endif diff --git a/src/emu/machine/6821pia.c b/src/emu/machine/6821pia.c index b73199248d8..892ec74f8a7 100644 --- a/src/emu/machine/6821pia.c +++ b/src/emu/machine/6821pia.c @@ -699,7 +699,7 @@ READ8_DEVICE_HANDLER( pia6821_alt_r ) pia6821_get_port_b_z_mask -------------------------------------------------*/ -UINT8 pia6821_get_port_b_z_mask(running_device *device) +UINT8 pia6821_get_port_b_z_mask(device_t *device) { return downcast(device)->get_port_b_z_mask(); } @@ -994,7 +994,7 @@ WRITE8_DEVICE_HANDLER( pia6821_alt_w ) pia6821_set_port_a_z_mask -------------------------------------------------*/ -void pia6821_set_port_a_z_mask(running_device *device, UINT8 data) +void pia6821_set_port_a_z_mask(device_t *device, UINT8 data) { downcast(device)->set_port_a_z_mask(data); } @@ -1024,7 +1024,7 @@ UINT8 pia6821_device::porta_r() pia6821_set_input_a -------------------------------------------------*/ -void pia6821_set_input_a(running_device *device, UINT8 data, UINT8 z_mask) +void pia6821_set_input_a(device_t *device, UINT8 data, UINT8 z_mask) { downcast(device)->set_input_a(data, z_mask); } @@ -1060,7 +1060,7 @@ void pia6821_device::porta_w(UINT8 data) pia6821_get_output_a -------------------------------------------------*/ -UINT8 pia6821_get_output_a(running_device *device) +UINT8 pia6821_get_output_a(device_t *device) { return downcast(device)->get_output_a(); } @@ -1175,7 +1175,7 @@ void pia6821_device::ca2_w(UINT8 state) pia6821_get_output_ca2 -------------------------------------------------*/ -int pia6821_get_output_ca2(running_device *device) +int pia6821_get_output_ca2(device_t *device) { return downcast(device)->get_output_ca2(); } @@ -1194,7 +1194,7 @@ int pia6821_device::get_output_ca2() pullup resistor -------------------------------------------------*/ -int pia6821_get_output_ca2_z(running_device *device) +int pia6821_get_output_ca2_z(device_t *device) { return downcast(device)->get_output_ca2_z(); } @@ -1248,7 +1248,7 @@ void pia6821_device::portb_w(UINT8 data) pia6821_get_output_b -------------------------------------------------*/ -UINT8 pia6821_get_output_b(running_device *device) +UINT8 pia6821_get_output_b(device_t *device) { return downcast(device)->get_output_b(); } @@ -1364,7 +1364,7 @@ void pia6821_device::cb2_w(UINT8 state) pia6821_get_output_cb2 -------------------------------------------------*/ -int pia6821_get_output_cb2(running_device *device) +int pia6821_get_output_cb2(device_t *device) { return downcast(device)->get_output_cb2(); } @@ -1381,7 +1381,7 @@ int pia6821_device::get_output_cb2() pia6821_get_output_cb2_z -------------------------------------------------*/ -int pia6821_get_output_cb2_z(running_device *device) +int pia6821_get_output_cb2_z(device_t *device) { return downcast(device)->get_output_cb2_z(); } @@ -1396,7 +1396,7 @@ int pia6821_device::get_output_cb2_z() pia6821_get_irq_a -------------------------------------------------*/ -int pia6821_get_irq_a(running_device *device) +int pia6821_get_irq_a(device_t *device) { return downcast(device)->get_irq_a(); } @@ -1411,7 +1411,7 @@ int pia6821_device::get_irq_a() pia6821_get_irq_b -------------------------------------------------*/ -int pia6821_get_irq_b(running_device *device) +int pia6821_get_irq_b(device_t *device) { return downcast(device)->get_irq_b(); } diff --git a/src/emu/machine/6821pia.h b/src/emu/machine/6821pia.h index 7934a5d5f98..394ba5aec1c 100644 --- a/src/emu/machine/6821pia.h +++ b/src/emu/machine/6821pia.h @@ -258,36 +258,36 @@ WRITE8_DEVICE_HANDLER( pia6821_w ); READ8_DEVICE_HANDLER( pia6821_alt_r ); WRITE8_DEVICE_HANDLER( pia6821_alt_w ); -UINT8 pia6821_get_port_b_z_mask(running_device *device); /* see first note */ -void pia6821_set_port_a_z_mask(running_device *device, UINT8 data); /* see second note */ +UINT8 pia6821_get_port_b_z_mask(device_t *device); /* see first note */ +void pia6821_set_port_a_z_mask(device_t *device, UINT8 data); /* see second note */ READ8_DEVICE_HANDLER( pia6821_porta_r ); WRITE8_DEVICE_HANDLER( pia6821_porta_w ); -void pia6821_set_input_a(running_device *device, UINT8 data, UINT8 z_mask); -UINT8 pia6821_get_output_a(running_device *device); +void pia6821_set_input_a(device_t *device, UINT8 data, UINT8 z_mask); +UINT8 pia6821_get_output_a(device_t *device); READ_LINE_DEVICE_HANDLER( pia6821_ca1_r ); WRITE_LINE_DEVICE_HANDLER( pia6821_ca1_w ); READ_LINE_DEVICE_HANDLER( pia6821_ca2_r ); WRITE_LINE_DEVICE_HANDLER( pia6821_ca2_w ); -int pia6821_get_output_ca2(running_device *device); -int pia6821_get_output_ca2_z(running_device *device); +int pia6821_get_output_ca2(device_t *device); +int pia6821_get_output_ca2_z(device_t *device); READ8_DEVICE_HANDLER( pia6821_portb_r ); WRITE8_DEVICE_HANDLER( pia6821_portb_w ); -UINT8 pia6821_get_output_b(running_device *device); +UINT8 pia6821_get_output_b(device_t *device); READ_LINE_DEVICE_HANDLER( pia6821_cb1_r ); WRITE_LINE_DEVICE_HANDLER( pia6821_cb1_w ); READ_LINE_DEVICE_HANDLER( pia6821_cb2_r ); WRITE_LINE_DEVICE_HANDLER( pia6821_cb2_w ); -int pia6821_get_output_cb2(running_device *device); -int pia6821_get_output_cb2_z(running_device *device); +int pia6821_get_output_cb2(device_t *device); +int pia6821_get_output_cb2_z(device_t *device); -int pia6821_get_irq_a(running_device *device); -int pia6821_get_irq_b(running_device *device); +int pia6821_get_irq_a(device_t *device); +int pia6821_get_irq_b(device_t *device); #endif /* __6821PIA_H__ */ diff --git a/src/emu/machine/6840ptm.c b/src/emu/machine/6840ptm.c index 5ada3fd518a..27610fcde31 100644 --- a/src/emu/machine/6840ptm.c +++ b/src/emu/machine/6840ptm.c @@ -194,7 +194,7 @@ void ptm6840_device::device_reset() ptm6840_get_status - Get enabled status -------------------------------------------------*/ -int ptm6840_get_status( running_device *device, int clock ) +int ptm6840_get_status( device_t *device, int clock ) { return downcast(device)->ptm6840_get_status(clock); } @@ -210,7 +210,7 @@ int ptm6840_device::ptm6840_get_status( int clock ) ptm6840_get_irq - Get IRQ state -------------------------------------------------*/ -int ptm6840_get_irq( running_device *device ) +int ptm6840_get_irq( device_t *device ) { return downcast(device)->ptm6840_get_irq(); } @@ -333,7 +333,7 @@ void ptm6840_device::ptm_tick(int counter, int count) update_interrupts - Update Internal Interrupts -------------------------------------------------*/ -void update_interrupts( running_device *device ) +void update_interrupts( device_t *device ) { downcast(device)->update_interrupts(); } @@ -784,7 +784,7 @@ WRITE8_DEVICE_HANDLER( ptm6840_set_c3 ) ptm6840_get_count - get count value -------------------------------------------------*/ -UINT16 ptm6840_get_count(running_device *device, int counter) +UINT16 ptm6840_get_count(device_t *device, int counter) { return downcast(device)->ptm6840_get_count(counter); } @@ -799,7 +799,7 @@ UINT16 ptm6840_device::ptm6840_get_count(int counter) ptm6840_set_ext_clock - set external clock frequency ------------------------------------------------------------*/ -void ptm6840_set_ext_clock(running_device *device, int counter, double clock) +void ptm6840_set_ext_clock(device_t *device, int counter, double clock) { downcast(device)->ptm6840_set_ext_clock(counter, clock); } @@ -851,7 +851,7 @@ void ptm6840_device::ptm6840_set_ext_clock(int counter, double clock) ptm6840_get_ext_clock - get external clock frequency ------------------------------------------------------------*/ -int ptm6840_get_ext_clock( running_device *device, int counter ) +int ptm6840_get_ext_clock( device_t *device, int counter ) { return downcast(device)->ptm6840_get_ext_clock(counter); } diff --git a/src/emu/machine/6840ptm.h b/src/emu/machine/6840ptm.h index df77dc4bb4c..d6c337fca4f 100644 --- a/src/emu/machine/6840ptm.h +++ b/src/emu/machine/6840ptm.h @@ -171,11 +171,11 @@ extern const device_type PTM6840; PROTOTYPES ***************************************************************************/ -int ptm6840_get_status( running_device *device, int clock ); // get whether timer is enabled -int ptm6840_get_irq( running_device *device ); // get IRQ state -UINT16 ptm6840_get_count( running_device *device, int counter );// get counter value -void ptm6840_set_ext_clock( running_device *device, int counter, double clock ); // set clock frequency -int ptm6840_get_ext_clock( running_device *device, int counter );// get clock frequency +int ptm6840_get_status( device_t *device, int clock ); // get whether timer is enabled +int ptm6840_get_irq( device_t *device ); // get IRQ state +UINT16 ptm6840_get_count( device_t *device, int counter );// get counter value +void ptm6840_set_ext_clock( device_t *device, int counter, double clock ); // set clock frequency +int ptm6840_get_ext_clock( device_t *device, int counter );// get clock frequency WRITE8_DEVICE_HANDLER( ptm6840_set_g1 ); // set gate1 state WRITE8_DEVICE_HANDLER( ptm6840_set_g2 ); // set gate2 state diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c index 5721109cf8c..9ae997f8725 100644 --- a/src/emu/machine/6850acia.c +++ b/src/emu/machine/6850acia.c @@ -520,7 +520,7 @@ void acia6850_device::transmit_event() tx_clock_in - As above, but using the tx pin -------------------------------------------------*/ -void acia6850_tx_clock_in(running_device *device) { downcast(device)->tx_clock_in(); } +void acia6850_tx_clock_in(device_t *device) { downcast(device)->tx_clock_in(); } void acia6850_device::tx_clock_in() { @@ -709,7 +709,7 @@ void acia6850_device::receive_event() rx_clock_in - As above, but using the rx pin -------------------------------------------------*/ -void acia6850_rx_clock_in(running_device *device) { downcast(device)->rx_clock_in(); } +void acia6850_rx_clock_in(device_t *device) { downcast(device)->rx_clock_in(); } void acia6850_device::rx_clock_in() { @@ -756,7 +756,7 @@ void acia6850_device::set_rx_clock(int clock) dynamically -------------------------------------------------*/ -void acia6850_set_rx_clock(running_device *device, int clock) +void acia6850_set_rx_clock(device_t *device, int clock) { downcast(device)->set_rx_clock(clock); } @@ -783,7 +783,7 @@ void acia6850_device::set_tx_clock(int clock) dynamically -------------------------------------------------*/ -void acia6850_set_tx_clock(running_device *device, int clock) +void acia6850_set_tx_clock(device_t *device, int clock) { downcast(device)->set_tx_clock(clock); } @@ -805,7 +805,7 @@ void acia6850_device::receive_data(UINT8 data) acia6850_receive_data - Receive data byte -------------------------------------------------*/ -void acia6850_receive_data(running_device *device, UINT8 data) +void acia6850_receive_data(device_t *device, UINT8 data) { downcast(device)->receive_data(data); } diff --git a/src/emu/machine/6850acia.h b/src/emu/machine/6850acia.h index 8bc38b96941..76422482420 100644 --- a/src/emu/machine/6850acia.h +++ b/src/emu/machine/6850acia.h @@ -219,13 +219,13 @@ extern const device_type ACIA6850; PROTOTYPES ***************************************************************************/ -void acia6850_tx_clock_in(running_device *device) ATTR_NONNULL(1); -void acia6850_rx_clock_in(running_device *device) ATTR_NONNULL(1); +void acia6850_tx_clock_in(device_t *device) ATTR_NONNULL(1); +void acia6850_rx_clock_in(device_t *device) ATTR_NONNULL(1); -void acia6850_set_rx_clock(running_device *device, int clock) ATTR_NONNULL(1); -void acia6850_set_tx_clock(running_device *device, int clock) ATTR_NONNULL(1); +void acia6850_set_rx_clock(device_t *device, int clock) ATTR_NONNULL(1); +void acia6850_set_tx_clock(device_t *device, int clock) ATTR_NONNULL(1); -void acia6850_receive_data(running_device *device, UINT8 data) ATTR_NONNULL(1); +void acia6850_receive_data(device_t *device, UINT8 data) ATTR_NONNULL(1); WRITE8_DEVICE_HANDLER( acia6850_ctrl_w ); READ8_DEVICE_HANDLER( acia6850_stat_r ); diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index 8f649081c3f..c327a11ee94 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -74,7 +74,7 @@ typedef struct typedef struct { /* device */ - running_device *device; + device_t *device; /* config */ const duart68681_config *duart_config; @@ -99,7 +99,7 @@ typedef struct } duart68681_state; -INLINE duart68681_state *get_safe_token(running_device *device) +INLINE duart68681_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DUART68681); @@ -237,7 +237,7 @@ static void duart68681_update_interrupts(duart68681_state *duart68681) static TIMER_CALLBACK( duart_timer_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; duart68681_state *duart68681 = get_safe_token(device); duart68681->ISR |= INT_COUNTER_READY; @@ -410,7 +410,7 @@ static UINT8 duart68681_read_rx_fifo(duart68681_state *duart68681, int ch) static TIMER_CALLBACK( tx_timer_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; duart68681_state *duart68681 = get_safe_token(device); int ch = param & 1; @@ -674,7 +674,7 @@ WRITE8_DEVICE_HANDLER(duart68681_w) } } -void duart68681_rx_data( running_device* device, int ch, UINT8 data ) +void duart68681_rx_data( device_t* device, int ch, UINT8 data ) { duart68681_state *duart68681 = get_safe_token(device); diff --git a/src/emu/machine/68681.h b/src/emu/machine/68681.h index 581930a6776..25b5df8b7c0 100644 --- a/src/emu/machine/68681.h +++ b/src/emu/machine/68681.h @@ -6,10 +6,10 @@ typedef struct _duart68681_config duart68681_config; struct _duart68681_config { - void (*irq_handler)(running_device *device, UINT8 vector); - void (*tx_callback)(running_device *device, int channel, UINT8 data); - UINT8 (*input_port_read)(running_device *device); - void (*output_port_write)(running_device *device, UINT8 data); + void (*irq_handler)(device_t *device, UINT8 vector); + void (*tx_callback)(device_t *device, int channel, UINT8 data); + UINT8 (*input_port_read)(device_t *device); + void (*output_port_write)(device_t *device, UINT8 data); /* clocks for external baud rates */ INT32 ip3clk, ip4clk, ip5clk, ip6clk; @@ -25,6 +25,6 @@ DECLARE_LEGACY_DEVICE(DUART68681, duart68681); READ8_DEVICE_HANDLER(duart68681_r); WRITE8_DEVICE_HANDLER(duart68681_w); -void duart68681_rx_data( running_device* device, int ch, UINT8 data ); +void duart68681_rx_data( device_t* device, int ch, UINT8 data ); #endif //_68681_H diff --git a/src/emu/machine/74148.c b/src/emu/machine/74148.c index 14996123019..b12f471bb37 100644 --- a/src/emu/machine/74148.c +++ b/src/emu/machine/74148.c @@ -46,7 +46,7 @@ typedef struct _ttl74148_state ttl74148_state; struct _ttl74148_state { /* callback */ - void (*output_cb)(running_device *device); + void (*output_cb)(device_t *device); /* inputs */ int input_lines[8]; /* pins 1-4,10-13 */ @@ -64,7 +64,7 @@ struct _ttl74148_state }; -INLINE ttl74148_state *get_safe_token(running_device *device) +INLINE ttl74148_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TTL74148); @@ -72,7 +72,7 @@ INLINE ttl74148_state *get_safe_token(running_device *device) return (ttl74148_state *)downcast(device)->token(); } -void ttl74148_update(running_device *device) +void ttl74148_update(device_t *device) { ttl74148_state *state = get_safe_token(device); @@ -143,35 +143,35 @@ void ttl74148_update(running_device *device) } -void ttl74148_input_line_w(running_device *device, int input_line, int data) +void ttl74148_input_line_w(device_t *device, int input_line, int data) { ttl74148_state *state = get_safe_token(device); state->input_lines[input_line] = data ? 1 : 0; } -void ttl74148_enable_input_w(running_device *device, int data) +void ttl74148_enable_input_w(device_t *device, int data) { ttl74148_state *state = get_safe_token(device); state->enable_input = data ? 1 : 0; } -int ttl74148_output_r(running_device *device) +int ttl74148_output_r(device_t *device) { ttl74148_state *state = get_safe_token(device); return state->output; } -int ttl74148_output_valid_r(running_device *device) +int ttl74148_output_valid_r(device_t *device) { ttl74148_state *state = get_safe_token(device); return state->output_valid; } -int ttl74148_enable_output_r(running_device *device) +int ttl74148_enable_output_r(device_t *device) { ttl74148_state *state = get_safe_token(device); return state->enable_output; diff --git a/src/emu/machine/74148.h b/src/emu/machine/74148.h index 252a8d6205f..05dc7c28168 100644 --- a/src/emu/machine/74148.h +++ b/src/emu/machine/74148.h @@ -47,7 +47,7 @@ typedef struct _ttl74148_config ttl74148_config; struct _ttl74148_config { - void (*output_cb)(running_device *device); + void (*output_cb)(device_t *device); }; @@ -57,13 +57,13 @@ struct _ttl74148_config /* must call ttl74148_update() after setting the inputs */ -void ttl74148_update(running_device *device); +void ttl74148_update(device_t *device); -void ttl74148_input_line_w(running_device *device, int input_line, int data); -void ttl74148_enable_input_w(running_device *device, int data); -int ttl74148_output_r(running_device *device); -int ttl74148_output_valid_r(running_device *device); -int ttl74148_enable_output_r(running_device *device); +void ttl74148_input_line_w(device_t *device, int input_line, int data); +void ttl74148_enable_input_w(device_t *device, int data); +int ttl74148_output_r(device_t *device); +int ttl74148_output_valid_r(device_t *device); +int ttl74148_enable_output_r(device_t *device); DECLARE_LEGACY_DEVICE(TTL74148, ttl74148); diff --git a/src/emu/machine/74153.c b/src/emu/machine/74153.c index eca2a2d6491..037676b7aec 100644 --- a/src/emu/machine/74153.c +++ b/src/emu/machine/74153.c @@ -41,7 +41,7 @@ typedef struct _ttl74153_state ttl74153_state; struct _ttl74153_state { /* callback */ - void (*output_cb)(running_device *device); + void (*output_cb)(device_t *device); /* inputs */ int a; /* pin 14 */ @@ -56,7 +56,7 @@ struct _ttl74153_state int last_output[2]; }; -INLINE ttl74153_state *get_safe_token(running_device *device) +INLINE ttl74153_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TTL74153); @@ -66,7 +66,7 @@ INLINE ttl74153_state *get_safe_token(running_device *device) -void ttl74153_update(running_device *device) +void ttl74153_update(device_t *device) { ttl74153_state *state = get_safe_token(device); int sel; @@ -99,35 +99,35 @@ void ttl74153_update(running_device *device) } -void ttl74153_a_w(running_device *device, int data) +void ttl74153_a_w(device_t *device, int data) { ttl74153_state *state = get_safe_token(device); state->a = data ? 1 : 0; } -void ttl74153_b_w(running_device *device, int data) +void ttl74153_b_w(device_t *device, int data) { ttl74153_state *state = get_safe_token(device); state->b = data ? 1 : 0; } -void ttl74153_input_line_w(running_device *device, int section, int input_line, int data) +void ttl74153_input_line_w(device_t *device, int section, int input_line, int data) { ttl74153_state *state = get_safe_token(device); state->input_lines[section][input_line] = data ? 1 : 0; } -void ttl74153_enable_w(running_device *device, int section, int data) +void ttl74153_enable_w(device_t *device, int section, int data) { ttl74153_state *state = get_safe_token(device); state->enable[section] = data ? 1 : 0; } -int ttl74153_output_r(running_device *device, int section) +int ttl74153_output_r(device_t *device, int section) { ttl74153_state *state = get_safe_token(device); return state->output[section]; diff --git a/src/emu/machine/74153.h b/src/emu/machine/74153.h index d6e75a5b8bd..6a40c3c2619 100644 --- a/src/emu/machine/74153.h +++ b/src/emu/machine/74153.h @@ -42,7 +42,7 @@ typedef struct _ttl74153_config ttl74153_config; struct _ttl74153_config { - void (*output_cb)(running_device *device); + void (*output_cb)(device_t *device); }; @@ -53,13 +53,13 @@ struct _ttl74153_config /* must call TTL74153_update() after setting the inputs */ -void ttl74153_update(running_device *device); +void ttl74153_update(device_t *device); -void ttl74153_a_w(running_device *device, int data); -void ttl74153_b_w(running_device *device, int data); -void ttl74153_input_line_w(running_device *device, int section, int input_line, int data); -void ttl74153_enable_w(running_device *device, int section, int data); -int ttl74153_output_r(running_device *device, int section); +void ttl74153_a_w(device_t *device, int data); +void ttl74153_b_w(device_t *device, int data); +void ttl74153_input_line_w(device_t *device, int section, int input_line, int data); +void ttl74153_enable_w(device_t *device, int section, int data); +int ttl74153_output_r(device_t *device, int section); DECLARE_LEGACY_DEVICE(TTL74153, ttl74153); diff --git a/src/emu/machine/8255ppi.c b/src/emu/machine/8255ppi.c index 8fb6965b38b..3d890bd39e5 100644 --- a/src/emu/machine/8255ppi.c +++ b/src/emu/machine/8255ppi.c @@ -606,65 +606,65 @@ void ppi8255_device::set_mode(int data, int call_handlers) m_control = data; } -void ppi8255_set_port_a_read(running_device *device, const devcb_read8 *config) +void ppi8255_set_port_a_read(device_t *device, const devcb_read8 *config) { downcast(device)->ppi8255_set_port_read(0, config); } -void ppi8255_set_port_b_read(running_device *device, const devcb_read8 *config) +void ppi8255_set_port_b_read(device_t *device, const devcb_read8 *config) { downcast(device)->ppi8255_set_port_read(1, config); } -void ppi8255_set_port_c_read(running_device *device, const devcb_read8 *config) +void ppi8255_set_port_c_read(device_t *device, const devcb_read8 *config) { downcast(device)->ppi8255_set_port_read(2, config); } -void ppi8255_set_port_a_write(running_device *device, const devcb_write8 *config) +void ppi8255_set_port_a_write(device_t *device, const devcb_write8 *config) { downcast(device)->ppi8255_set_port_write(0, config); } -void ppi8255_set_port_b_write(running_device *device, const devcb_write8 *config) +void ppi8255_set_port_b_write(device_t *device, const devcb_write8 *config) { downcast(device)->ppi8255_set_port_write(1, config); } -void ppi8255_set_port_c_write(running_device *device, const devcb_write8 *config) +void ppi8255_set_port_c_write(device_t *device, const devcb_write8 *config) { downcast(device)->ppi8255_set_port_write(2, config); } -void ppi8255_set_port_a( running_device *device, UINT8 data ) +void ppi8255_set_port_a( device_t *device, UINT8 data ) { downcast(device)->ppi8255_set_port(0, data); } -void ppi8255_set_port_b( running_device *device, UINT8 data ) +void ppi8255_set_port_b( device_t *device, UINT8 data ) { downcast(device)->ppi8255_set_port(1, data); } -void ppi8255_set_port_c( running_device *device, UINT8 data ) +void ppi8255_set_port_c( device_t *device, UINT8 data ) { downcast(device)->ppi8255_set_port(2, data); } -UINT8 ppi8255_get_port_a( running_device *device ) +UINT8 ppi8255_get_port_a( device_t *device ) { return downcast(device)->ppi8255_get_port(0); } -UINT8 ppi8255_get_port_b( running_device *device ) +UINT8 ppi8255_get_port_b( device_t *device ) { return downcast(device)->ppi8255_get_port(1); } -UINT8 ppi8255_get_port_c( running_device *device ) +UINT8 ppi8255_get_port_c( device_t *device ) { return downcast(device)->ppi8255_get_port(2); } diff --git a/src/emu/machine/8255ppi.h b/src/emu/machine/8255ppi.h index c255460a826..ecd7ebe6339 100644 --- a/src/emu/machine/8255ppi.h +++ b/src/emu/machine/8255ppi.h @@ -158,20 +158,20 @@ extern const device_type PPI8255; READ8_DEVICE_HANDLER( ppi8255_r ); WRITE8_DEVICE_HANDLER( ppi8255_w ); -void ppi8255_set_port_a_read( running_device *device, const devcb_read8 *config ); -void ppi8255_set_port_b_read( running_device *device, const devcb_read8 *config ); -void ppi8255_set_port_c_read( running_device *device, const devcb_read8 *config ); +void ppi8255_set_port_a_read( device_t *device, const devcb_read8 *config ); +void ppi8255_set_port_b_read( device_t *device, const devcb_read8 *config ); +void ppi8255_set_port_c_read( device_t *device, const devcb_read8 *config ); -void ppi8255_set_port_a_write( running_device *device, const devcb_write8 *config ); -void ppi8255_set_port_b_write( running_device *device, const devcb_write8 *config ); -void ppi8255_set_port_c_write( running_device *device, const devcb_write8 *config ); +void ppi8255_set_port_a_write( device_t *device, const devcb_write8 *config ); +void ppi8255_set_port_b_write( device_t *device, const devcb_write8 *config ); +void ppi8255_set_port_c_write( device_t *device, const devcb_write8 *config ); -void ppi8255_set_port_a( running_device *device, UINT8 data ); -void ppi8255_set_port_b( running_device *device, UINT8 data ); -void ppi8255_set_port_c( running_device *device, UINT8 data ); +void ppi8255_set_port_a( device_t *device, UINT8 data ); +void ppi8255_set_port_b( device_t *device, UINT8 data ); +void ppi8255_set_port_c( device_t *device, UINT8 data ); -UINT8 ppi8255_get_port_a( running_device *device ); -UINT8 ppi8255_get_port_b( running_device *device ); -UINT8 ppi8255_get_port_c( running_device *device ); +UINT8 ppi8255_get_port_a( device_t *device ); +UINT8 ppi8255_get_port_b( device_t *device ); +UINT8 ppi8255_get_port_c( device_t *device ); #endif /* __8255PPI_H_ */ diff --git a/src/emu/machine/adc083x.c b/src/emu/machine/adc083x.c index d339826cc6b..639d8d05b87 100644 --- a/src/emu/machine/adc083x.c +++ b/src/emu/machine/adc083x.c @@ -71,14 +71,14 @@ struct _adc0831_state INLINE FUNCTIONS ***************************************************************************/ -INLINE adc0831_state *get_safe_token( running_device *device ) +INLINE adc0831_state *get_safe_token( device_t *device ) { assert( device != NULL ); assert( ( device->type() == ADC0831 ) || ( device->type() == ADC0832 ) || ( device->type() == ADC0834 ) || ( device->type() == ADC0838 ) ); return (adc0831_state *) downcast(device)->token(); } -INLINE const adc083x_interface *get_interface( running_device *device ) +INLINE const adc083x_interface *get_interface( device_t *device ) { assert( device != NULL ); assert( ( device->type() == ADC0831 ) || ( device->type() == ADC0832 ) || ( device->type() == ADC0834 ) || ( device->type() == ADC0838 ) ); @@ -94,7 +94,7 @@ INLINE const adc083x_interface *get_interface( running_device *device ) adc083x_clear_sars -------------------------------------------------*/ -static void adc083x_clear_sars( running_device *device, adc0831_state *adc083x ) +static void adc083x_clear_sars( device_t *device, adc0831_state *adc083x ) { if( device->type() == ADC0834 ||device->type() == ADC0838 ) { @@ -148,7 +148,7 @@ WRITE_LINE_DEVICE_HANDLER( adc083x_cs_write ) adc083x_conversion -------------------------------------------------*/ -static UINT8 adc083x_conversion( running_device *device ) +static UINT8 adc083x_conversion( device_t *device ) { adc0831_state *adc083x = get_safe_token( device ); int result; diff --git a/src/emu/machine/adc083x.h b/src/emu/machine/adc083x.h index 7d1f8cdc983..6528e695c76 100644 --- a/src/emu/machine/adc083x.h +++ b/src/emu/machine/adc083x.h @@ -58,7 +58,7 @@ DECLARE_LEGACY_DEVICE(ADC0838, adc0838); TYPE DEFINITIONS ***************************************************************************/ -typedef double (*adc083x_input_convert_func)(running_device *device, UINT8 input); +typedef double (*adc083x_input_convert_func)(device_t *device, UINT8 input); typedef struct _adc083x_interface adc083x_interface; struct _adc083x_interface diff --git a/src/emu/machine/adc1038.c b/src/emu/machine/adc1038.c index f2a1e7daf0d..3e58529b0d7 100644 --- a/src/emu/machine/adc1038.c +++ b/src/emu/machine/adc1038.c @@ -33,7 +33,7 @@ struct _adc1038_state INLINE FUNCTIONS *****************************************************************************/ -INLINE adc1038_state *adc1038_get_safe_token( running_device *device ) +INLINE adc1038_state *adc1038_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == ADC1038); @@ -41,7 +41,7 @@ INLINE adc1038_state *adc1038_get_safe_token( running_device *device ) return (adc1038_state *)downcast(device)->token(); } -INLINE const adc1038_interface *adc1038_get_interface( running_device *device ) +INLINE const adc1038_interface *adc1038_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == ADC1038)); diff --git a/src/emu/machine/adc1038.h b/src/emu/machine/adc1038.h index 7745b2adb13..47dcee0d862 100644 --- a/src/emu/machine/adc1038.h +++ b/src/emu/machine/adc1038.h @@ -17,7 +17,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef int (*adc1038_input_read_func)(running_device *device, int input); +typedef int (*adc1038_input_read_func)(device_t *device, int input); typedef struct _adc1038_interface adc1038_interface; struct _adc1038_interface diff --git a/src/emu/machine/adc1213x.c b/src/emu/machine/adc1213x.c index 56294b29785..96e336ecf0d 100644 --- a/src/emu/machine/adc1213x.c +++ b/src/emu/machine/adc1213x.c @@ -54,14 +54,14 @@ struct _adc12138_state INLINE FUNCTIONS ***************************************************************************/ -INLINE adc12138_state *get_safe_token(running_device *device) +INLINE adc12138_state *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == ADC12130) || (device->type() == ADC12132) || (device->type() == ADC12138)); return (adc12138_state *)downcast(device)->token(); } -INLINE const adc12138_interface *get_interface(running_device *device) +INLINE const adc12138_interface *get_interface(device_t *device) { assert(device != NULL); assert((device->type() == ADC12130) || (device->type() == ADC12132) || (device->type() == ADC12138)); @@ -87,7 +87,7 @@ WRITE8_DEVICE_HANDLER( adc1213x_di_w ) adc1213x_convert -------------------------------------------------*/ -static void adc1213x_convert(running_device *device, int channel, int bits16, int lsbfirst) +static void adc1213x_convert(device_t *device, int channel, int bits16, int lsbfirst) { adc12138_state *adc1213x = get_safe_token(device); int i; diff --git a/src/emu/machine/adc1213x.h b/src/emu/machine/adc1213x.h index b915b83a375..4bb45bb2e46 100644 --- a/src/emu/machine/adc1213x.h +++ b/src/emu/machine/adc1213x.h @@ -38,7 +38,7 @@ DECLARE_LEGACY_DEVICE(ADC12138, adc12138); TYPE DEFINITIONS ***************************************************************************/ -typedef double (*adc1213x_input_convert_func)(running_device *device, UINT8 input); +typedef double (*adc1213x_input_convert_func)(device_t *device, UINT8 input); typedef struct _adc12138_interface adc12138_interface; struct _adc12138_interface diff --git a/src/emu/machine/cdp1852.c b/src/emu/machine/cdp1852.c index a6b0ee5c8a5..c6df1a9792a 100644 --- a/src/emu/machine/cdp1852.c +++ b/src/emu/machine/cdp1852.c @@ -37,13 +37,13 @@ struct _cdp1852_t INLINE FUNCTIONS ***************************************************************************/ -INLINE cdp1852_t *get_safe_token(running_device *device) +INLINE cdp1852_t *get_safe_token(device_t *device) { assert(device != NULL); return (cdp1852_t *)downcast(device)->token(); } -INLINE const cdp1852_interface *get_interface(running_device *device) +INLINE const cdp1852_interface *get_interface(device_t *device) { assert(device != NULL); assert((device->type() == CDP1852)); @@ -74,7 +74,7 @@ static void set_sr_line(cdp1852_t *cdp1852, int level) static TIMER_CALLBACK( cdp1852_scan_tick ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; cdp1852_t *cdp1852 = get_safe_token(device); switch (cdp1852->mode) diff --git a/src/emu/machine/f3853.c b/src/emu/machine/f3853.c index 3ee448e47bf..e9aa8da6b5d 100644 --- a/src/emu/machine/f3853.c +++ b/src/emu/machine/f3853.c @@ -210,7 +210,7 @@ void f3853_device::f3853_timer() } -void f3853_set_external_interrupt_in_line(running_device *device, int level) +void f3853_set_external_interrupt_in_line(device_t *device, int level) { downcast(device)->f3853_set_external_interrupt_in_line(level); } @@ -226,7 +226,7 @@ void f3853_device::f3853_set_external_interrupt_in_line(int level) } -void f3853_set_priority_in_line(running_device *device, int level) +void f3853_set_priority_in_line(device_t *device, int level) { downcast(device)->f3853_set_priority_in_line(level); } diff --git a/src/emu/machine/f3853.h b/src/emu/machine/f3853.h index 92741cc3ffd..cc0cb3b427e 100644 --- a/src/emu/machine/f3853.h +++ b/src/emu/machine/f3853.h @@ -60,7 +60,7 @@ struct f3853_interface { - void (*m_interrupt_request)(running_device *device, UINT16 addr, int level); + void (*m_interrupt_request)(device_t *device, UINT16 addr, int level); }; @@ -147,7 +147,7 @@ extern const device_type F3853; READ8_DEVICE_HANDLER( f3853_r ); WRITE8_DEVICE_HANDLER( f3853_w ); -void f3853_set_external_interrupt_in_line(running_device *device, int level); -void f3853_set_priority_in_line(running_device *device, int level); +void f3853_set_external_interrupt_in_line(device_t *device, int level); +void f3853_set_priority_in_line(device_t *device, int level); #endif /* __F3853_H__ */ diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c index 28f84a3501c..f05ed50b004 100644 --- a/src/emu/machine/generic.c +++ b/src/emu/machine/generic.c @@ -56,7 +56,7 @@ struct _generic_machine_private are enabled for the given CPU -------------------------------------------------*/ -INLINE int interrupt_enabled(running_device *device) +INLINE int interrupt_enabled(device_t *device) { generic_machine_private *state = device->machine->generic_machine_data; for (int index = 0; index < ARRAY_LENGTH(state->interrupt_device); index++) @@ -602,7 +602,7 @@ static TIMER_CALLBACK( clear_all_lines ) static TIMER_CALLBACK( irq_pulse_clear ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; int irqline = param; cpu_set_input_line(device, irqline, CLEAR_LINE); } @@ -614,7 +614,7 @@ static TIMER_CALLBACK( irq_pulse_clear ) later -------------------------------------------------*/ -void generic_pulse_irq_line(running_device *device, int irqline) +void generic_pulse_irq_line(device_t *device, int irqline) { assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET); cpu_set_input_line(device, irqline, ASSERT_LINE); @@ -631,7 +631,7 @@ void generic_pulse_irq_line(running_device *device, int irqline) 1 cycle later, specifying a vector -------------------------------------------------*/ -void generic_pulse_irq_line_and_vector(running_device *device, int irqline, int vector) +void generic_pulse_irq_line_and_vector(device_t *device, int irqline, int vector) { assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET); cpu_set_input_line_and_vector(device, irqline, ASSERT_LINE, vector); @@ -647,7 +647,7 @@ void generic_pulse_irq_line_and_vector(running_device *device, int irqline, int disable value for global interrupts -------------------------------------------------*/ -void cpu_interrupt_enable(running_device *device, int enabled) +void cpu_interrupt_enable(device_t *device, int enabled) { cpu_device *cpudevice = downcast(device); diff --git a/src/emu/machine/generic.h b/src/emu/machine/generic.h index 4946788f96d..5ea3de5f285 100644 --- a/src/emu/machine/generic.h +++ b/src/emu/machine/generic.h @@ -109,9 +109,9 @@ void set_led_status(running_machine *machine, int num, int value); /* ----- interrupt enable and vector helpers ----- */ -void generic_pulse_irq_line(running_device *device, int irqline); -void generic_pulse_irq_line_and_vector(running_device *device, int irqline, int vector); -void cpu_interrupt_enable(running_device *device, int enabled); +void generic_pulse_irq_line(device_t *device, int irqline); +void generic_pulse_irq_line_and_vector(device_t *device, int irqline, int vector); +void cpu_interrupt_enable(device_t *device, int enabled); READ8_HANDLER( interrupt_enable_r ); WRITE8_HANDLER( interrupt_enable_w ); diff --git a/src/emu/machine/i2cmem.c b/src/emu/machine/i2cmem.c index 1c84ee5d58d..95816b61cee 100644 --- a/src/emu/machine/i2cmem.c +++ b/src/emu/machine/i2cmem.c @@ -38,7 +38,7 @@ Up to 4096 bytes can be addressed. #define VERBOSE_LEVEL ( 0 ) -INLINE void ATTR_PRINTF( 3, 4 ) verboselog( running_device *device, int n_level, const char *s_fmt, ... ) +INLINE void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level, const char *s_fmt, ... ) { if( VERBOSE_LEVEL >= n_level ) { diff --git a/src/emu/machine/i8255a.c b/src/emu/machine/i8255a.c index b9c631a92e5..fce03989390 100644 --- a/src/emu/machine/i8255a.c +++ b/src/emu/machine/i8255a.c @@ -77,14 +77,14 @@ struct _i8255a_t INLINE FUNCTIONS ***************************************************************************/ -INLINE i8255a_t *get_safe_token(running_device *device) +INLINE i8255a_t *get_safe_token(device_t *device) { assert(device != NULL); return (i8255a_t *)downcast(device)->token(); } -INLINE const i8255a_interface *get_interface(running_device *device) +INLINE const i8255a_interface *get_interface(device_t *device) { assert(device != NULL); assert((device->type() == I8255A)); @@ -573,7 +573,7 @@ static void write_pc(i8255a_t *i8255a, UINT8 data) } } -static void set_mode(running_device *device, UINT8 data) +static void set_mode(device_t *device, UINT8 data) { i8255a_t *i8255a = get_safe_token(device); @@ -628,7 +628,7 @@ static void set_mode(running_device *device, UINT8 data) output_pc(i8255a); } -static void set_pc_bit(running_device *device, int bit, int state) +static void set_pc_bit(device_t *device, int bit, int state) { i8255a_t *i8255a = get_safe_token(device); diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index 3375f107b53..1cfdd847a70 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -107,7 +107,7 @@ typedef struct _ide_state ide_state; struct _ide_state { - running_device *device; + device_t *device; UINT8 adapter_control; UINT8 status; @@ -181,8 +181,8 @@ static TIMER_CALLBACK( read_sector_done_callback ); static void read_first_sector(ide_state *ide); static void read_next_sector(ide_state *ide); -static UINT32 ide_controller_read(running_device *device, int bank, offs_t offset, int size); -static void ide_controller_write(running_device *device, int bank, offs_t offset, int size, UINT32 data); +static UINT32 ide_controller_read(device_t *device, int bank, offs_t offset, int size); +static void ide_controller_write(device_t *device, int bank, offs_t offset, int size, UINT32 data); @@ -195,7 +195,7 @@ static void ide_controller_write(running_device *device, int bank, offs_t offset in device is, in fact, an IDE controller -------------------------------------------------*/ -INLINE ide_state *get_safe_token(running_device *device) +INLINE ide_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == IDE_CONTROLLER); @@ -272,19 +272,19 @@ INLINE void signal_delayed_interrupt(ide_state *ide, attotime time, int buffer_r INITIALIZATION AND RESET ***************************************************************************/ -UINT8 *ide_get_features(running_device *device) +UINT8 *ide_get_features(device_t *device) { ide_state *ide = get_safe_token(device); return ide->features; } -void ide_set_gnet_readlock(running_device *device, const UINT8 onoff) +void ide_set_gnet_readlock(device_t *device, const UINT8 onoff) { ide_state *ide = get_safe_token(device); ide->gnetreadlock = onoff; } -void ide_set_master_password(running_device *device, const UINT8 *password) +void ide_set_master_password(device_t *device, const UINT8 *password) { ide_state *ide = get_safe_token(device); @@ -293,7 +293,7 @@ void ide_set_master_password(running_device *device, const UINT8 *password) } -void ide_set_user_password(running_device *device, const UINT8 *password) +void ide_set_user_password(device_t *device, const UINT8 *password) { ide_state *ide = get_safe_token(device); @@ -304,7 +304,7 @@ void ide_set_user_password(running_device *device, const UINT8 *password) static TIMER_CALLBACK( reset_callback ) { - reinterpret_cast(ptr)->reset(); + reinterpret_cast(ptr)->reset(); } @@ -1240,7 +1240,7 @@ static void handle_command(ide_state *ide, UINT8 command) * *************************************/ -static UINT32 ide_controller_read(running_device *device, int bank, offs_t offset, int size) +static UINT32 ide_controller_read(device_t *device, int bank, offs_t offset, int size) { ide_state *ide = get_safe_token(device); UINT32 result = 0; @@ -1349,7 +1349,7 @@ static UINT32 ide_controller_read(running_device *device, int bank, offs_t offse * *************************************/ -static void ide_controller_write(running_device *device, int bank, offs_t offset, int size, UINT32 data) +static void ide_controller_write(device_t *device, int bank, offs_t offset, int size, UINT32 data) { ide_state *ide = get_safe_token(device); @@ -1517,7 +1517,7 @@ static void ide_controller_write(running_device *device, int bank, offs_t offset * *************************************/ -static UINT32 ide_bus_master_read(running_device *device, offs_t offset, int size) +static UINT32 ide_bus_master_read(device_t *device, offs_t offset, int size) { ide_state *ide = get_safe_token(device); @@ -1546,7 +1546,7 @@ static UINT32 ide_bus_master_read(running_device *device, offs_t offset, int siz * *************************************/ -static void ide_bus_master_write(running_device *device, offs_t offset, int size, UINT32 data) +static void ide_bus_master_write(device_t *device, offs_t offset, int size, UINT32 data) { ide_state *ide = get_safe_token(device); @@ -1621,7 +1621,7 @@ static void ide_bus_master_write(running_device *device, offs_t offset, int size select: 0->CS1Fx active, 1->CS3Fx active offset: register offset (state of DA2-DA0) */ -int ide_bus_r(running_device *device, int select, int offset) +int ide_bus_r(device_t *device, int select, int offset) { return ide_controller_read(device, select ? 1 : 0, offset, select == 0 && offset == 0 ? 2 : 1); } @@ -1635,7 +1635,7 @@ int ide_bus_r(running_device *device, int select, int offset) offset: register offset (state of DA2-DA0) data: data written (state of D0-D15 or D0-D7) */ -void ide_bus_w(running_device *device, int select, int offset, int data) +void ide_bus_w(device_t *device, int select, int offset, int data) { if (select == 0 && offset == 0) ide_controller_write(device, 0, 0, 2, data); @@ -1643,7 +1643,7 @@ void ide_bus_w(running_device *device, int select, int offset, int data) ide_controller_write(device, select ? 1 : 0, offset, 1, data & 0xff); } -UINT32 ide_controller_r(running_device *device, int reg, int size) +UINT32 ide_controller_r(device_t *device, int reg, int size) { if (reg >= 0x1f0 && reg < 0x1f8) return ide_controller_read(device, 0, reg & 7, size); @@ -1654,7 +1654,7 @@ UINT32 ide_controller_r(running_device *device, int reg, int size) return 0xffffffff; } -void ide_controller_w(running_device *device, int reg, int size, UINT32 data) +void ide_controller_w(device_t *device, int reg, int size, UINT32 data) { if (reg >= 0x1f0 && reg < 0x1f8) ide_controller_write(device, 0, reg & 7, size, data); diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h index 4a0fa37acd2..4ea9f400519 100644 --- a/src/emu/machine/idectrl.h +++ b/src/emu/machine/idectrl.h @@ -26,7 +26,7 @@ typedef struct _ide_config ide_config; struct _ide_config { - void (*interrupt)(running_device *device, int state); + void (*interrupt)(device_t *device, int state); const char *master; /* name of master region (defaults to device tag) */ const char *slave; /* name of slave region (defaults to NULL) */ const char *bmcpu; /* name of bus master CPU */ @@ -57,18 +57,18 @@ struct _ide_config FUNCTION PROTOTYPES ***************************************************************************/ -UINT8 *ide_get_features(running_device *device); +UINT8 *ide_get_features(device_t *device); -void ide_set_master_password(running_device *device, const UINT8 *password); -void ide_set_user_password(running_device *device, const UINT8 *password); +void ide_set_master_password(device_t *device, const UINT8 *password); +void ide_set_user_password(device_t *device, const UINT8 *password); -void ide_set_gnet_readlock(running_device *device, const UINT8 onoff); +void ide_set_gnet_readlock(device_t *device, const UINT8 onoff); -int ide_bus_r(running_device *config, int select, int offset); -void ide_bus_w(running_device *config, int select, int offset, int data); +int ide_bus_r(device_t *config, int select, int offset); +void ide_bus_w(device_t *config, int select, int offset, int data); -UINT32 ide_controller_r(running_device *config, int reg, int size); -void ide_controller_w(running_device *config, int reg, int size, UINT32 data); +UINT32 ide_controller_r(device_t *config, int reg, int size); +void ide_controller_w(device_t *config, int reg, int size, UINT32 data); READ32_DEVICE_HANDLER( ide_controller32_r ); WRITE32_DEVICE_HANDLER( ide_controller32_w ); diff --git a/src/emu/machine/ins8250.c b/src/emu/machine/ins8250.c index 41102ebd792..406f6847108 100644 --- a/src/emu/machine/ins8250.c +++ b/src/emu/machine/ins8250.c @@ -139,7 +139,7 @@ typedef struct { #define COM_INT_PENDING_MODEM_STATUS_REGISTER 0x0008 -INLINE ins8250_t *get_safe_token(running_device *device) +INLINE ins8250_t *get_safe_token(device_t *device) { assert( device != NULL ); assert( ( device->type() == INS8250 ) || @@ -153,7 +153,7 @@ INLINE ins8250_t *get_safe_token(running_device *device) /* setup iir with the priority id */ -static void ins8250_setup_iir(running_device *device) +static void ins8250_setup_iir(device_t *device) { ins8250_t *ins8250 = get_safe_token(device); @@ -183,7 +183,7 @@ static void ins8250_setup_iir(running_device *device) /* ints will continue to be set for as long as there are ints pending */ -static void ins8250_update_interrupt(running_device *device) +static void ins8250_update_interrupt(device_t *device) { ins8250_t *ins8250 = get_safe_token(device); int state; @@ -219,7 +219,7 @@ static void ins8250_update_interrupt(running_device *device) /* set pending bit and trigger int */ -static void ins8250_trigger_int(running_device *device, int flag) +static void ins8250_trigger_int(device_t *device, int flag) { ins8250_t *ins8250 = get_safe_token(device); @@ -231,7 +231,7 @@ static void ins8250_trigger_int(running_device *device, int flag) /* clear pending bit, if any ints are pending, then int will be triggered, otherwise it will be cleared */ -static void ins8250_clear_int(running_device *device, int flag) +static void ins8250_clear_int(device_t *device, int flag) { ins8250_t *ins8250 = get_safe_token(device); @@ -481,7 +481,7 @@ READ8_DEVICE_HANDLER( ins8250_r ) -void ins8250_receive(running_device *device, int data) +void ins8250_receive(device_t *device, int data) { ins8250_t *ins8250 = get_safe_token(device); @@ -515,7 +515,7 @@ void ins8250_receive(running_device *device, int data) /************************************************************************** * change the modem status register **************************************************************************/ -void ins8250_handshake_in(running_device *device, int new_msr) +void ins8250_handshake_in(device_t *device, int new_msr) { ins8250_t *ins8250 = get_safe_token(device); @@ -540,7 +540,7 @@ void ins8250_handshake_in(running_device *device, int new_msr) } -static void common_start( running_device *device, int device_type ) +static void common_start( device_t *device, int device_type ) { ins8250_t *ins8250 = get_safe_token(device); diff --git a/src/emu/machine/ins8250.h b/src/emu/machine/ins8250.h index 93eaa4e446b..408c585a945 100644 --- a/src/emu/machine/ins8250.h +++ b/src/emu/machine/ins8250.h @@ -29,15 +29,15 @@ DECLARE_LEGACY_DEVICE(PC16550D, pc16550d); TYPE DEFINITIONS ***************************************************************************/ -typedef void (*ins8250_interrupt_func)(running_device *device, int state); -typedef void (*ins8250_transmit_func)(running_device *device, int data); -typedef void (*ins8250_handshake_out_func)(running_device *device, int data); -typedef void (*ins8250_refresh_connect_func)(running_device *device); +typedef void (*ins8250_interrupt_func)(device_t *device, int state); +typedef void (*ins8250_transmit_func)(device_t *device, int data); +typedef void (*ins8250_handshake_out_func)(device_t *device, int data); +typedef void (*ins8250_refresh_connect_func)(device_t *device); -#define INS8250_INTERRUPT(name) void name(running_device *device, int state) -#define INS8250_TRANSMIT(name) void name(running_device *device, int data) -#define INS8250_HANDSHAKE_OUT(name) void name(running_device *device, int data) -#define INS8250_REFRESH_CONNECT(name) void name(running_device *device) +#define INS8250_INTERRUPT(name) void name(device_t *device, int state) +#define INS8250_TRANSMIT(name) void name(device_t *device, int data) +#define INS8250_HANDSHAKE_OUT(name) void name(device_t *device, int data) +#define INS8250_REFRESH_CONNECT(name) void name(device_t *device) typedef struct { @@ -75,8 +75,8 @@ typedef struct FUNCTION PROTOTYPES ***************************************************************************/ -void ins8250_receive(running_device *device, int data); -void ins8250_handshake_in(running_device *device, int new_msr); +void ins8250_receive(device_t *device, int data); +void ins8250_handshake_in(device_t *device, int new_msr); READ8_DEVICE_HANDLER( ins8250_r ); WRITE8_DEVICE_HANDLER( ins8250_w ); diff --git a/src/emu/machine/k033906.h b/src/emu/machine/k033906.h index 166804a8e85..43b6e127b0e 100644 --- a/src/emu/machine/k033906.h +++ b/src/emu/machine/k033906.h @@ -91,7 +91,7 @@ private: int m_reg_set; // 1 = access reg / 0 = access ram - running_device *m_voodoo; + device_t *m_voodoo; const k033906_device_config &m_config; }; diff --git a/src/emu/machine/k056230.h b/src/emu/machine/k056230.h index 94b27dc5563..81ee41ebc96 100644 --- a/src/emu/machine/k056230.h +++ b/src/emu/machine/k056230.h @@ -92,7 +92,7 @@ private: UINT32 *m_ram; int m_is_thunderh; - running_device *m_cpu; + device_t *m_cpu; const k056230_device_config &m_config; }; diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h index 2abc19c4366..b96cdb91933 100644 --- a/src/emu/machine/laserdsc.h +++ b/src/emu/machine/laserdsc.h @@ -61,11 +61,11 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef chd_file *(*laserdisc_get_disc_func)(running_device *device); +typedef chd_file *(*laserdisc_get_disc_func)(device_t *device); -typedef void (*laserdisc_audio_func)(running_device *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1); +typedef void (*laserdisc_audio_func)(device_t *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1); -typedef void (*vp931_data_ready_func)(running_device *device, int state); +typedef void (*vp931_data_ready_func)(device_t *device, int state); typedef struct _laserdisc_config laserdisc_config; struct _laserdisc_config @@ -151,49 +151,49 @@ struct _laserdisc_config /* ----- core control and status ----- */ /* get a bitmap for the current frame; return TRUE if valid or FALSE if video off */ -int laserdisc_get_video(running_device *device, bitmap_t **bitmap); +int laserdisc_get_video(device_t *device, bitmap_t **bitmap); /* return the raw philips or white flag codes */ -UINT32 laserdisc_get_field_code(running_device *device, UINT32 code, UINT8 zero_if_squelched); +UINT32 laserdisc_get_field_code(device_t *device, UINT32 code, UINT8 zero_if_squelched); /* ----- input and output ----- */ /* write to the parallel data port of the player */ -void laserdisc_data_w(running_device *device, UINT8 data); +void laserdisc_data_w(device_t *device, UINT8 data); /* assert or clear a signal line connected to the player */ -void laserdisc_line_w(running_device *device, UINT8 line, UINT8 newstate); +void laserdisc_line_w(device_t *device, UINT8 line, UINT8 newstate); /* read from the parallel data port of the player */ -UINT8 laserdisc_data_r(running_device *device); +UINT8 laserdisc_data_r(device_t *device); /* read the state of a signal line connected to the player */ -UINT8 laserdisc_line_r(running_device *device, UINT8 line); +UINT8 laserdisc_line_r(device_t *device, UINT8 line); /* ----- player specifics ----- */ /* specify the "slow" speed of the Pioneer PR-7820 */ -void pr7820_set_slow_speed(running_device *device, double frame_rate_scaler); +void pr7820_set_slow_speed(device_t *device, double frame_rate_scaler); /* set a callback for data ready on the Phillips 22VP931 */ -void vp931_set_data_ready_callback(running_device *device, vp931_data_ready_func callback); +void vp931_set_data_ready_callback(device_t *device, vp931_data_ready_func callback); /* control the audio squelch of the Simutrek modified players */ -void simutrek_set_audio_squelch(running_device *device, int state); +void simutrek_set_audio_squelch(device_t *device, int state); /* ----- video interface ----- */ /* enable/disable the video */ -void laserdisc_video_enable(running_device *device, int enable); +void laserdisc_video_enable(device_t *device, int enable); /* enable/disable the overlay */ -void laserdisc_overlay_enable(running_device *device, int enable); +void laserdisc_overlay_enable(device_t *device, int enable); /* video update callback */ VIDEO_UPDATE( laserdisc ); @@ -203,10 +203,10 @@ VIDEO_UPDATE( laserdisc ); /* ----- configuration ----- */ /* return a copy of the current live configuration settings */ -void laserdisc_get_config(running_device *device, laserdisc_config *config); +void laserdisc_get_config(device_t *device, laserdisc_config *config); /* change the current live configuration settings */ -void laserdisc_set_config(running_device *device, const laserdisc_config *config); +void laserdisc_set_config(device_t *device, const laserdisc_config *config); @@ -219,8 +219,8 @@ DECLARE_LEGACY_DEVICE(LASERDISC, laserdisc); DECLARE_LEGACY_SOUND_DEVICE(LASERDISC_SOUND, laserdisc_sound); /* type setter */ -int laserdisc_get_type(running_device *device); -void laserdisc_set_type(running_device *device, int type); +int laserdisc_get_type(device_t *device); +void laserdisc_set_type(device_t *device, int type); #endif /* __LASERDSC_H__ */ diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index 6709424fc18..8a994f72401 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -19,18 +19,18 @@ struct _latch8_t UINT8 has_node_map; UINT8 has_devread; UINT8 has_read; - running_device *devices[8]; + device_t *devices[8]; }; /* ----------------------------------------------------------------------- */ -INLINE latch8_t *get_safe_token(running_device *device) { +INLINE latch8_t *get_safe_token(device_t *device) { assert( device != NULL ); assert( device->type() == LATCH8 ); return ( latch8_t * ) downcast(device)->token(); } -static void update(running_device *device, UINT8 new_val, UINT8 mask) +static void update(device_t *device, UINT8 new_val, UINT8 mask) { /* temporary hack until the discrete system is a device */ latch8_t *latch8 = get_safe_token(device); @@ -50,7 +50,7 @@ static void update(running_device *device, UINT8 new_val, UINT8 mask) static TIMER_CALLBACK( latch8_timerproc ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; UINT8 new_val = param & 0xFF; UINT8 mask = param >> 8; @@ -72,7 +72,7 @@ READ8_DEVICE_HANDLER( latch8_r ) int i; for (i=0; i<8; i++) { - running_device *read_dev = latch8->devices[i]; + device_t *read_dev = latch8->devices[i]; if (read_dev != NULL) { res &= ~( 1 << i); @@ -123,7 +123,7 @@ WRITE8_DEVICE_HANDLER( latch8_reset) /* read bit x */ /* return (latch >> x) & 0x01 */ -INLINE UINT8 latch8_bitx_r(running_device *device, offs_t offset, int bit) +INLINE UINT8 latch8_bitx_r(device_t *device, offs_t offset, int bit) { latch8_t *latch8 = get_safe_token(device); @@ -153,7 +153,7 @@ READ8_DEVICE_HANDLER( latch8_bit7_q_r) { return latch8_bitx_r(device, offset, 7) /* write bit x from data into bit determined by offset */ /* latch = (latch & ~(1<> x) & 0x01) << offset) */ -INLINE void latch8_bitx_w(running_device *device, int bit, offs_t offset, UINT8 data) +INLINE void latch8_bitx_w(device_t *device, int bit, offs_t offset, UINT8 data) { latch8_t *latch8 = get_safe_token(device); UINT8 mask = (1<type() == LASERDISC); @@ -290,7 +290,7 @@ static void update_slider_pos(ldcore_data *ldcore, attotime curtime) static void vblank_state_changed(screen_device &screen, void *param, bool vblank_state) { - running_device *device = (running_device *)param; + device_t *device = (device_t *)param; laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; attotime curtime = timer_get_time(screen.machine); @@ -346,7 +346,7 @@ static TIMER_CALLBACK( perform_player_update ) laserdisc player -------------------------------------------------*/ -void laserdisc_data_w(running_device *device, UINT8 data) +void laserdisc_data_w(device_t *device, UINT8 data) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -363,7 +363,7 @@ void laserdisc_data_w(running_device *device, UINT8 data) laserdisc_line_w - control an input line -------------------------------------------------*/ -void laserdisc_line_w(running_device *device, UINT8 line, UINT8 newstate) +void laserdisc_line_w(device_t *device, UINT8 line, UINT8 newstate) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -402,7 +402,7 @@ void laserdisc_line_w(running_device *device, UINT8 line, UINT8 newstate) data byte -------------------------------------------------*/ -UINT8 laserdisc_data_r(running_device *device) +UINT8 laserdisc_data_r(device_t *device) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -421,7 +421,7 @@ UINT8 laserdisc_data_r(running_device *device) of an output line -------------------------------------------------*/ -UINT8 laserdisc_line_r(running_device *device, UINT8 line) +UINT8 laserdisc_line_r(device_t *device, UINT8 line) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -444,7 +444,7 @@ UINT8 laserdisc_line_r(running_device *device, UINT8 line) if video off -------------------------------------------------*/ -int laserdisc_get_video(running_device *device, bitmap_t **bitmap) +int laserdisc_get_video(device_t *device, bitmap_t **bitmap) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -474,7 +474,7 @@ int laserdisc_get_video(running_device *device, bitmap_t **bitmap) information read from the disc -------------------------------------------------*/ -UINT32 laserdisc_get_field_code(running_device *device, UINT32 code, UINT8 zero_if_squelched) +UINT32 laserdisc_get_field_code(device_t *device, UINT32 code, UINT8 zero_if_squelched) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -516,7 +516,7 @@ UINT32 laserdisc_get_field_code(running_device *device, UINT32 code, UINT8 zero_ type checking from a device -------------------------------------------------*/ -laserdisc_state *ldcore_get_safe_token(running_device *device) +laserdisc_state *ldcore_get_safe_token(device_t *device) { return get_safe_token(device); } @@ -905,7 +905,7 @@ static void read_track_data(laserdisc_state *ld) track after it has been read -------------------------------------------------*/ -static void process_track_data(running_device *device) +static void process_track_data(device_t *device) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -1090,7 +1090,7 @@ static void configuration_load(running_machine *machine, int config_type, xml_da for (ldnode = xml_get_sibling(parentnode->child, "device"); ldnode != NULL; ldnode = xml_get_sibling(ldnode->next, "device")) { const char *devtag = xml_get_attribute_string(ldnode, "tag", ""); - running_device *device = machine->device(devtag); + device_t *device = machine->device(devtag); if (device != NULL) { laserdisc_state *ld = get_safe_token(device); @@ -1118,7 +1118,7 @@ static void configuration_load(running_machine *machine, int config_type, xml_da static void configuration_save(running_machine *machine, int config_type, xml_data_node *parentnode) { - running_device *device; + device_t *device; /* we only care about game files */ if (config_type != CONFIG_TYPE_GAME) @@ -1190,7 +1190,7 @@ static void configuration_save(running_machine *machine, int config_type, xml_da video -------------------------------------------------*/ -void laserdisc_video_enable(running_device *device, int enable) +void laserdisc_video_enable(device_t *device, int enable) { laserdisc_state *ld = get_safe_token(device); ld->core->videoenable = enable; @@ -1202,7 +1202,7 @@ void laserdisc_video_enable(running_device *device, int enable) video -------------------------------------------------*/ -void laserdisc_overlay_enable(running_device *device, int enable) +void laserdisc_overlay_enable(device_t *device, int enable) { laserdisc_state *ld = get_safe_token(device); ld->core->overenable = enable; @@ -1215,7 +1215,7 @@ void laserdisc_overlay_enable(running_device *device, int enable) VIDEO_UPDATE( laserdisc ) { - running_device *laserdisc = screen->machine->m_devicelist.first(LASERDISC); + device_t *laserdisc = screen->machine->m_devicelist.first(LASERDISC); if (laserdisc != NULL) { const rectangle &visarea = screen->visible_area(); @@ -1292,7 +1292,7 @@ VIDEO_UPDATE( laserdisc ) current live configuration settings -------------------------------------------------*/ -void laserdisc_get_config(running_device *device, laserdisc_config *config) +void laserdisc_get_config(device_t *device, laserdisc_config *config) { laserdisc_state *ld = get_safe_token(device); *config = ld->core->config; @@ -1304,7 +1304,7 @@ void laserdisc_get_config(running_device *device, laserdisc_config *config) configuration settings -------------------------------------------------*/ -void laserdisc_set_config(running_device *device, const laserdisc_config *config) +void laserdisc_set_config(device_t *device, const laserdisc_config *config) { laserdisc_state *ld = get_safe_token(device); ld->core->config = *config; @@ -1321,7 +1321,7 @@ void laserdisc_set_config(running_device *device, const laserdisc_config *config CHD disc -------------------------------------------------*/ -static void init_disc(running_device *device) +static void init_disc(device_t *device) { const laserdisc_config *config = (const laserdisc_config *)downcast(device->baseconfig()).inline_config(); laserdisc_state *ld = get_safe_token(device); @@ -1387,7 +1387,7 @@ static void init_disc(running_device *device) video rendering -------------------------------------------------*/ -static void init_video(running_device *device) +static void init_video(device_t *device) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -1447,7 +1447,7 @@ static void init_video(running_device *device) audio rendering -------------------------------------------------*/ -static void init_audio(running_device *device) +static void init_audio(device_t *device) { laserdisc_state *ld = get_safe_token(device); ldcore_data *ldcore = ld->core; @@ -1594,7 +1594,7 @@ static DEVICE_RESET( laserdisc ) device set info callback -------------------------------------------------*/ -int laserdisc_get_type(running_device *device) +int laserdisc_get_type(device_t *device) { laserdisc_state *ld = get_safe_token(device); if (ld->core != NULL) @@ -1602,7 +1602,7 @@ int laserdisc_get_type(running_device *device) return LASERDISC_TYPE_UNKNOWN; } -void laserdisc_set_type(running_device *device, int type) +void laserdisc_set_type(device_t *device, int type) { laserdisc_state *ld = get_safe_token(device); if (ld->core != NULL && ld->core->config.type != type) diff --git a/src/emu/machine/ldcore.h b/src/emu/machine/ldcore.h index 3409cc0571c..6879b0d78cf 100644 --- a/src/emu/machine/ldcore.h +++ b/src/emu/machine/ldcore.h @@ -121,7 +121,7 @@ struct _ldplayer_state typedef struct _laserdisc_state laserdisc_state; struct _laserdisc_state { - running_device * device; /* pointer to owning device */ + device_t * device; /* pointer to owning device */ screen_device * screen; /* pointer to the screen device */ ldcore_data * core; /* private core data */ ldplayer_data * player; /* private player data */ @@ -184,7 +184,7 @@ extern const ldplayer_interface vp932_interface; /* ----- player interface ----- */ /* return a token with type checking from a device */ -laserdisc_state *ldcore_get_safe_token(running_device *device); +laserdisc_state *ldcore_get_safe_token(device_t *device); /* set the left/right audio squelch states */ void ldcore_set_audio_squelch(laserdisc_state *ld, UINT8 squelchleft, UINT8 squelchright); diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c index 8ba3e7eb9c7..347ca7df977 100644 --- a/src/emu/machine/ldpr8210.c +++ b/src/emu/machine/ldpr8210.c @@ -88,7 +88,7 @@ struct _pioneer_pia typedef struct _simutrek_data simutrek_data; struct _simutrek_data { - running_device *cpu; /* 8748 CPU device */ + device_t *cpu; /* 8748 CPU device */ UINT8 audio_squelch; /* audio squelch value */ UINT8 data; /* parallel data for simutrek */ UINT8 data_ready; /* ready flag for simutrek data */ @@ -109,7 +109,7 @@ struct _ldplayer_data attotime firstbittime; /* time of first bit in command */ /* low-level emulation data */ - running_device *cpu; /* 8049 CPU device */ + device_t *cpu; /* 8049 CPU device */ attotime slowtrg; /* time of the last SLOW TRG */ pioneer_pia pia; /* PIA state */ UINT8 vsync; /* live VSYNC state */ @@ -1054,7 +1054,7 @@ const ldplayer_interface simutrek_interface = command to enable/disable audio squelch -------------------------------------------------*/ -void simutrek_set_audio_squelch(running_device *device, int state) +void simutrek_set_audio_squelch(device_t *device, int state) { laserdisc_state *ld = ldcore_get_safe_token(device); ldplayer_data *player = ld->player; diff --git a/src/emu/machine/ldv1000.c b/src/emu/machine/ldv1000.c index 15e07632a87..b0d4b25fa43 100644 --- a/src/emu/machine/ldv1000.c +++ b/src/emu/machine/ldv1000.c @@ -55,8 +55,8 @@ struct _ldplayer_data { /* low-level emulation data */ - running_device *cpu; /* CPU index of the Z80 */ - running_device *ctc; /* CTC device */ + device_t *cpu; /* CPU index of the Z80 */ + device_t *ctc; /* CTC device */ timer_device * multitimer; /* multi-jump timer device */ /* communication status */ @@ -98,7 +98,7 @@ static TIMER_CALLBACK( vsync_off ); static TIMER_CALLBACK( vbi_data_fetch ); static TIMER_DEVICE_CALLBACK( multijump_timer ); -static void ctc_interrupt(running_device *device, int state); +static void ctc_interrupt(device_t *device, int state); static WRITE8_HANDLER( decoder_display_port_w ); static READ8_HANDLER( decoder_display_port_r ); diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c index e64554c04ae..24cd7b77fd6 100644 --- a/src/emu/machine/ldvp931.c +++ b/src/emu/machine/ldvp931.c @@ -49,7 +49,7 @@ struct _ldplayer_data { /* low-level emulation data */ - running_device *cpu; /* CPU index of the 8049 */ + device_t *cpu; /* CPU index of the 8049 */ timer_device * tracktimer; /* timer device */ vp931_data_ready_func data_ready_cb; /* data ready callback */ @@ -187,7 +187,7 @@ const ldplayer_interface vp931_interface = ready callback -------------------------------------------------*/ -void vp931_set_data_ready_callback(running_device *device, vp931_data_ready_func callback) +void vp931_set_data_ready_callback(device_t *device, vp931_data_ready_func callback) { laserdisc_state *ld = ldcore_get_safe_token(device); ld->player->data_ready_cb = callback; diff --git a/src/emu/machine/mb14241.c b/src/emu/machine/mb14241.c index 593bdae58a4..b01ade4533b 100644 --- a/src/emu/machine/mb14241.c +++ b/src/emu/machine/mb14241.c @@ -18,7 +18,7 @@ struct _mb14241_state INLINE FUNCTIONS *****************************************************************************/ -INLINE mb14241_state *get_safe_token( running_device *device ) +INLINE mb14241_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == MB14241); diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c index 3d5165b735b..91a39fe69d4 100644 --- a/src/emu/machine/mb87078.c +++ b/src/emu/machine/mb87078.c @@ -111,7 +111,7 @@ static const int mb87078_gain_percent[66] = { INLINE FUNCTIONS *****************************************************************************/ -INLINE mb87078_state *get_safe_token( running_device *device ) +INLINE mb87078_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == MB87078); @@ -119,7 +119,7 @@ INLINE mb87078_state *get_safe_token( running_device *device ) return (mb87078_state *)downcast(device)->token(); } -INLINE const mb87078_interface *get_interface( running_device *device ) +INLINE const mb87078_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == MB87078)); @@ -165,7 +165,7 @@ static int calc_gain_index( int data0, int data1 ) } -static void gain_recalc( running_device *device ) +static void gain_recalc( device_t *device ) { mb87078_state *mb87078 = get_safe_token(device); int i; @@ -181,7 +181,7 @@ static void gain_recalc( running_device *device ) -void mb87078_data_w( running_device *device, int data, int dsel ) +void mb87078_data_w( device_t *device, int data, int dsel ) { mb87078_state *mb87078 = get_safe_token(device); @@ -201,20 +201,20 @@ void mb87078_data_w( running_device *device, int data, int dsel ) } -float mb87078_gain_decibel_r( running_device *device, int channel ) +float mb87078_gain_decibel_r( device_t *device, int channel ) { mb87078_state *mb87078 = get_safe_token(device); return mb87078_gain_decibel[mb87078->gain[channel]]; } -int mb87078_gain_percent_r( running_device *device, int channel ) +int mb87078_gain_percent_r( device_t *device, int channel ) { mb87078_state *mb87078 = get_safe_token(device); return mb87078_gain_percent[mb87078->gain[channel]]; } -void mb87078_reset_comp_w( running_device *device, int level ) +void mb87078_reset_comp_w( device_t *device, int level ) { mb87078_state *mb87078 = get_safe_token(device); diff --git a/src/emu/machine/mb87078.h b/src/emu/machine/mb87078.h index 8d7ffee6783..9c5397cd966 100644 --- a/src/emu/machine/mb87078.h +++ b/src/emu/machine/mb87078.h @@ -39,21 +39,21 @@ DECLARE_LEGACY_DEVICE(MB87078, mb87078); DEVICE I/O FUNCTIONS ***************************************************************************/ -void mb87078_data_w(running_device *device, int data, int dsel); -void mb87078_reset_comp_w(running_device *device, int level); +void mb87078_data_w(device_t *device, int data, int dsel); +void mb87078_reset_comp_w(device_t *device, int level); /* mb87078_gain_decibel_r will return 'channel' gain on the device. Returned value represents channel gain expressed in decibels, Range from 0 to -32.0 (or -256.0 for -infinity) */ -float mb87078_gain_decibel_r(running_device *device, int channel); +float mb87078_gain_decibel_r(device_t *device, int channel); /* mb87078_gain_percent_r will return 'channel' gain on the device. Returned value represents channel gain expressed in percents of maximum volume. Range from 100 to 0. (100 = 0dB; 50 = -6dB; 0 = -infinity) This function is designed for use with MAME mixer_xxx() functions. */ -int mb87078_gain_percent_r(running_device *device, int channel); +int mb87078_gain_percent_r(device_t *device, int channel); #endif /* __MB87078_H__ */ diff --git a/src/emu/machine/msm6242.c b/src/emu/machine/msm6242.c index 754a38f5566..86f2332de7d 100644 --- a/src/emu/machine/msm6242.c +++ b/src/emu/machine/msm6242.c @@ -38,7 +38,7 @@ struct _msm6242_t /* makes sure that the passed in device is the right type */ -INLINE msm6242_t *get_safe_token(running_device *device) +INLINE msm6242_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MSM6242); diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c index d29599a458f..a3534f3e76d 100644 --- a/src/emu/machine/pci.c +++ b/src/emu/machine/pci.c @@ -78,9 +78,9 @@ typedef struct _pci_bus_state pci_bus_state; struct _pci_bus_state { - running_device * busdevice; + device_t * busdevice; const pci_bus_config * config; - running_device * device[32]; + device_t * device[32]; pci_bus_state * siblings[8]; UINT8 siblings_busnum[8]; int siblings_count; @@ -101,7 +101,7 @@ struct _pci_bus_state in device is, in fact, a PCI bus -------------------------------------------------*/ -INLINE pci_bus_state *get_safe_token(running_device *device) +INLINE pci_bus_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PCI_BUS); @@ -224,8 +224,8 @@ WRITE64_DEVICE_HANDLER(pci_64be_w) { write64be_with_32le_device_handler(pci_32le int pci_add_sibling( running_machine *machine, char *pcitag, char *sibling ) { - running_device *device1 = machine->device(pcitag); - running_device *device2 = machine->device(sibling); + device_t *device1 = machine->device(pcitag); + device_t *device2 = machine->device(sibling); pci_bus_state *pcibus1 = get_safe_token(device1); pci_bus_state *pcibus2 = get_safe_token(device2); pci_bus_config *config2; diff --git a/src/emu/machine/pci.h b/src/emu/machine/pci.h index 6ca63042024..b88e3f1aa1f 100644 --- a/src/emu/machine/pci.h +++ b/src/emu/machine/pci.h @@ -16,8 +16,8 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef UINT32 (*pci_read_func)(running_device *pcibus, running_device *device, int function, int reg, UINT32 mem_mask); -typedef void (*pci_write_func)(running_device *pcibus, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask); +typedef UINT32 (*pci_read_func)(device_t *pcibus, device_t *device, int function, int reg, UINT32 mem_mask); +typedef void (*pci_write_func)(device_t *pcibus, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask); typedef struct _pci_device_entry pci_device_entry; struct _pci_device_entry diff --git a/src/emu/machine/pd4990a.c b/src/emu/machine/pd4990a.c index 38cdeb381b2..1c8fa7e3f1e 100644 --- a/src/emu/machine/pd4990a.c +++ b/src/emu/machine/pd4990a.c @@ -82,7 +82,7 @@ struct _upd4990a_state INLINE FUNCTIONS ***************************************************************************/ -INLINE upd4990a_state *get_safe_token(running_device *device) +INLINE upd4990a_state *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == UPD4990A)); @@ -103,7 +103,7 @@ INLINE UINT8 convert_to_bcd(int val) upd4990a_increment_month -------------------------------------------------*/ -static void upd4990a_increment_month( running_device *device ) +static void upd4990a_increment_month( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -126,7 +126,7 @@ static void upd4990a_increment_month( running_device *device ) upd4990a_increment_day -------------------------------------------------*/ -static void upd4990a_increment_day( running_device *device ) +static void upd4990a_increment_day( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); int real_year; @@ -184,7 +184,7 @@ static void upd4990a_increment_day( running_device *device ) upd4990a_addretrace -------------------------------------------------*/ -void upd4990a_addretrace( running_device *device ) +void upd4990a_addretrace( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -257,7 +257,7 @@ READ8_DEVICE_HANDLER( upd4990a_databit_r ) upd4990a_readbit -------------------------------------------------*/ -static void upd4990a_readbit( running_device *device ) +static void upd4990a_readbit( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -299,7 +299,7 @@ static void upd4990a_readbit( running_device *device ) upd4990a_resetbitstream -------------------------------------------------*/ -static void upd4990a_resetbitstream( running_device *device ) +static void upd4990a_resetbitstream( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -312,7 +312,7 @@ static void upd4990a_resetbitstream( running_device *device ) upd4990a_writebit -------------------------------------------------*/ -static void upd4990a_writebit( running_device *device , UINT8 bit ) +static void upd4990a_writebit( device_t *device , UINT8 bit ) { upd4990a_state *upd4990a = get_safe_token(device); if (upd4990a->bitno <= 31) //low part @@ -325,7 +325,7 @@ static void upd4990a_writebit( running_device *device , UINT8 bit ) upd4990a_nextbit -------------------------------------------------*/ -static void upd4990a_nextbit( running_device *device ) +static void upd4990a_nextbit( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); ++upd4990a->bitno; @@ -345,7 +345,7 @@ static void upd4990a_nextbit( running_device *device ) upd4990a_getcommand -------------------------------------------------*/ -static UINT8 upd4990a_getcommand( running_device *device ) +static UINT8 upd4990a_getcommand( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); //Warning: problems if the 4 bits are in different @@ -360,7 +360,7 @@ static UINT8 upd4990a_getcommand( running_device *device ) upd4990a_update_date -------------------------------------------------*/ -static void upd4990a_update_date( running_device *device ) +static void upd4990a_update_date( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -377,7 +377,7 @@ static void upd4990a_update_date( running_device *device ) upd4990a_process_command -------------------------------------------------*/ -static void upd4990a_process_command( running_device *device ) +static void upd4990a_process_command( device_t *device ) { upd4990a_state *upd4990a = get_safe_token(device); @@ -411,7 +411,7 @@ static void upd4990a_process_command( running_device *device ) upd4990a_serial_control -------------------------------------------------*/ -static void upd4990a_serial_control( running_device *device, UINT8 data ) +static void upd4990a_serial_control( device_t *device, UINT8 data ) { upd4990a_state *upd4990a = get_safe_token(device); diff --git a/src/emu/machine/pd4990a.h b/src/emu/machine/pd4990a.h index a7d0815521b..4dd0c1b4f0a 100644 --- a/src/emu/machine/pd4990a.h +++ b/src/emu/machine/pd4990a.h @@ -27,7 +27,7 @@ DECLARE_LEGACY_DEVICE(UPD4990A, upd4990a); ***************************************************************************/ /* this should be refactored, once RTCs get unified */ -extern void upd4990a_addretrace( running_device *device ); +extern void upd4990a_addretrace( device_t *device ); extern READ8_DEVICE_HANDLER( upd4990a_testbit_r ); extern READ8_DEVICE_HANDLER( upd4990a_databit_r ); diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c index 242fc1ac4ff..e90d6e0bb6d 100644 --- a/src/emu/machine/pic8259.c +++ b/src/emu/machine/pic8259.c @@ -70,7 +70,7 @@ struct pic8259 }; -INLINE pic8259_t *get_safe_token(running_device *device) { +INLINE pic8259_t *get_safe_token(device_t *device) { assert( device != NULL ); assert( device->type() == PIC8259 ); return ( pic8259_t *) downcast(device)->token(); @@ -79,7 +79,7 @@ INLINE pic8259_t *get_safe_token(running_device *device) { static TIMER_CALLBACK( pic8259_timerproc ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; pic8259_t *pic8259 = get_safe_token(device); int irq; UINT8 mask; @@ -118,7 +118,7 @@ INLINE void pic8259_set_timer(pic8259_t *pic8259) } -static void pic8259_set_irq_line(running_device *device, int irq, int state) +static void pic8259_set_irq_line(device_t *device, int irq, int state) { pic8259_t *pic8259 = get_safe_token(device); UINT8 old_irq_lines = pic8259->irq_lines; @@ -157,7 +157,7 @@ WRITE_LINE_DEVICE_HANDLER( pic8259_ir5_w ) { pic8259_set_irq_line(device, 5, sta WRITE_LINE_DEVICE_HANDLER( pic8259_ir6_w ) { pic8259_set_irq_line(device, 6, state); } WRITE_LINE_DEVICE_HANDLER( pic8259_ir7_w ) { pic8259_set_irq_line(device, 7, state); } -int pic8259_acknowledge(running_device *device) +int pic8259_acknowledge(device_t *device) { pic8259_t *pic8259 = get_safe_token(device); UINT8 mask; diff --git a/src/emu/machine/pic8259.h b/src/emu/machine/pic8259.h index 5a14622652f..9041cd62c22 100644 --- a/src/emu/machine/pic8259.h +++ b/src/emu/machine/pic8259.h @@ -53,7 +53,7 @@ struct pic8259_interface /* device interface */ READ8_DEVICE_HANDLER( pic8259_r ); WRITE8_DEVICE_HANDLER( pic8259_w ); -int pic8259_acknowledge(running_device *device); +int pic8259_acknowledge(device_t *device); /* interrupt requests */ WRITE_LINE_DEVICE_HANDLER( pic8259_ir0_w ); diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index b7dd4c2f44e..3ee19454f24 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -102,7 +102,7 @@ struct _pit8253_t ***************************************************************************/ /* makes sure that the passed in device is of the right type */ -INLINE pit8253_t *get_safe_token(running_device *device) +INLINE pit8253_t *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == PIT8253) || (device->type() == PIT8254)); @@ -215,7 +215,7 @@ static void decrease_counter_value(struct pit8253_timer *timer,UINT64 cycles) /* Counter loading: transfer of a count from the CR to the CE */ -static void load_counter_value(running_device *device, struct pit8253_timer *timer) +static void load_counter_value(device_t *device, struct pit8253_timer *timer) { timer->value = timer->count; timer->null_count = 1; @@ -224,7 +224,7 @@ static void load_counter_value(running_device *device, struct pit8253_timer *tim } -static void set_output(running_device *device, struct pit8253_timer *timer,int output) +static void set_output(device_t *device, struct pit8253_timer *timer,int output) { if (output != timer->output) { @@ -236,7 +236,7 @@ static void set_output(running_device *device, struct pit8253_timer *timer,int o /* This emulates timer "timer" for "elapsed_cycles" cycles and assumes no callbacks occur during that time. */ -static void simulate2(running_device *device, struct pit8253_timer *timer, INT64 elapsed_cycles) +static void simulate2(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles) { UINT32 adjusted_value; int bcd = CTRL_BCD(timer->control); @@ -639,7 +639,7 @@ static void simulate2(running_device *device, struct pit8253_timer *timer, INT64 inaccurate by more than one cycle, and the output changed multiple times during the discrepancy. In practice updates should still be O(1). */ -static void simulate(running_device *device, struct pit8253_timer *timer, INT64 elapsed_cycles) +static void simulate(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles) { if ( elapsed_cycles > 0 ) simulate2(device, timer, elapsed_cycles); @@ -650,7 +650,7 @@ static void simulate(running_device *device, struct pit8253_timer *timer, INT64 /* This brings timer "timer" up to date */ -static void update(running_device *device, struct pit8253_timer *timer) +static void update(device_t *device, struct pit8253_timer *timer) { /* With the 82C54's maximum clockin of 10MHz, 64 bits is nearly 60,000 years of time. Should be enough for now. */ @@ -675,7 +675,7 @@ static void update(running_device *device, struct pit8253_timer *timer) static TIMER_CALLBACK( update_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; pit8253_t *pit8253 = get_safe_token(device); struct pit8253_timer *timer = get_timer(pit8253,param); @@ -773,7 +773,7 @@ READ8_DEVICE_HANDLER( pit8253_r ) /* Loads a new value from the bus to the count register (CR) */ -static void load_count(running_device *device, struct pit8253_timer *timer, UINT16 newcount) +static void load_count(device_t *device, struct pit8253_timer *timer, UINT16 newcount) { int mode = CTRL_MODE(timer->control); @@ -806,7 +806,7 @@ static void load_count(running_device *device, struct pit8253_timer *timer, UINT } -static void readback(running_device *device, struct pit8253_timer *timer,int command) +static void readback(device_t *device, struct pit8253_timer *timer,int command) { UINT16 value; update(device, timer); @@ -981,7 +981,7 @@ WRITE8_DEVICE_HANDLER( pit8253_w ) } } -static void pit8253_gate_w(running_device *device, int gate, int state) +static void pit8253_gate_w(device_t *device, int gate, int state) { pit8253_t *pit8253 = get_safe_token(device); struct pit8253_timer *timer = get_timer(pit8253, gate); @@ -1019,7 +1019,7 @@ WRITE_LINE_DEVICE_HANDLER( pit8253_gate2_w ) { pit8253_gate_w(device, 2, state); /* ----------------------------------------------------------------------- */ -int pit8253_get_output(running_device *device, int timerno) +int pit8253_get_output(device_t *device, int timerno) { pit8253_t *pit8253 = get_safe_token(device); struct pit8253_timer *timer = get_timer(pit8253,timerno); @@ -1033,7 +1033,7 @@ int pit8253_get_output(running_device *device, int timerno) -void pit8253_set_clockin(running_device *device, int timerno, double new_clockin) +void pit8253_set_clockin(device_t *device, int timerno, double new_clockin) { pit8253_t *pit8253 = get_safe_token(device); struct pit8253_timer *timer = get_timer(pit8253,timerno); @@ -1046,7 +1046,7 @@ void pit8253_set_clockin(running_device *device, int timerno, double new_clockin } -static void pit8253_set_clock_signal(running_device *device, int timerno, int state) +static void pit8253_set_clock_signal(device_t *device, int timerno, int state) { pit8253_t *pit8253 = get_safe_token(device); struct pit8253_timer *timer = get_timer(pit8253,timerno); @@ -1067,7 +1067,7 @@ WRITE_LINE_DEVICE_HANDLER( pit8253_clk1_w ) { pit8253_set_clock_signal(device, 1 WRITE_LINE_DEVICE_HANDLER( pit8253_clk2_w ) { pit8253_set_clock_signal(device, 2, state); } -static void common_start( running_device *device, int device_type ) { +static void common_start( device_t *device, int device_type ) { pit8253_t *pit8253 = get_safe_token(device); int timerno; diff --git a/src/emu/machine/pit8253.h b/src/emu/machine/pit8253.h index 41445f1429d..32e05f62498 100644 --- a/src/emu/machine/pit8253.h +++ b/src/emu/machine/pit8253.h @@ -76,8 +76,8 @@ WRITE_LINE_DEVICE_HANDLER( pit8253_gate2_w ); to 0 with pit8253_set_clockin and call pit8253_clkX_w to change the state of the input CLKx signal. */ -int pit8253_get_output(running_device *device, int timer); -void pit8253_set_clockin(running_device *device, int timer, double new_clockin); +int pit8253_get_output(device_t *device, int timer); +void pit8253_set_clockin(device_t *device, int timer, double new_clockin); #endif /* __PIT8253_H__ */ diff --git a/src/emu/machine/rp5h01.c b/src/emu/machine/rp5h01.c index 504d5890967..01fabb9cf3d 100644 --- a/src/emu/machine/rp5h01.c +++ b/src/emu/machine/rp5h01.c @@ -41,7 +41,7 @@ struct _rp5h01_state INLINE FUNCTIONS ***************************************************************************/ -INLINE rp5h01_state *get_safe_token(running_device *device) +INLINE rp5h01_state *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == RP5H01)); diff --git a/src/emu/machine/rtc65271.c b/src/emu/machine/rtc65271.c index 78e21f45823..4861aa4c9b3 100644 --- a/src/emu/machine/rtc65271.c +++ b/src/emu/machine/rtc65271.c @@ -18,7 +18,7 @@ #include "emu.h" #include "rtc65271.h" -static void field_interrupts(running_device *device); +static void field_interrupts(device_t *device); static TIMER_CALLBACK( rtc_SQW_callback ); static TIMER_CALLBACK( rtc_begin_update_callback ); static TIMER_CALLBACK( rtc_end_update_callback ); @@ -50,10 +50,10 @@ struct _rtc65271_state UINT8 SQW_internal_state; /* callback called when interrupt pin state changes (may be NULL) */ - void (*interrupt_callback)(running_device *device, int state); + void (*interrupt_callback)(device_t *device, int state); }; -INLINE rtc65271_state *get_safe_token(running_device *device) +INLINE rtc65271_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == RTC65271); @@ -193,7 +193,7 @@ static UINT8 BCD_to_binary(UINT8 data) /* load the SRAM and register contents from file */ -static int rtc65271_file_load(running_device *device, mame_file *file) +static int rtc65271_file_load(device_t *device, mame_file *file) { rtc65271_state *state = get_safe_token(device); UINT8 buf; @@ -277,7 +277,7 @@ static int rtc65271_file_load(running_device *device, mame_file *file) /* save the SRAM and register contents to file */ -static int rtc65271_file_save(running_device *device, mame_file *file) +static int rtc65271_file_save(device_t *device, mame_file *file) { rtc65271_state *state = get_safe_token(device); UINT8 buf; @@ -321,7 +321,7 @@ static int rtc65271_file_save(running_device *device, mame_file *file) xramsel: select RTC register if 0, XRAM if 1 offset: address (A0-A5 pins) */ -UINT8 rtc65271_r(running_device *device, int xramsel, offs_t offset) +UINT8 rtc65271_r(device_t *device, int xramsel, offs_t offset) { rtc65271_state *state = get_safe_token(device); int reply; @@ -379,7 +379,7 @@ READ8_DEVICE_HANDLER( rtc65271_xram_r ) xramsel: select RTC register if 0, XRAM if 1 offset: address (A0-A5 pins) */ -void rtc65271_w(running_device *device, int xramsel, offs_t offset, UINT8 data) +void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data) { rtc65271_state *state = get_safe_token(device); if (xramsel) @@ -464,7 +464,7 @@ WRITE8_DEVICE_HANDLER( rtc65271_xram_w ) rtc65271_w( device, 1, offset, data ); } -static void field_interrupts(running_device *device) +static void field_interrupts(device_t *device) { rtc65271_state *state = get_safe_token(device); @@ -493,7 +493,7 @@ static void field_interrupts(running_device *device) */ static TIMER_CALLBACK( rtc_SQW_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; rtc65271_state *state = get_safe_token(device); attotime half_period; @@ -514,7 +514,7 @@ static TIMER_CALLBACK( rtc_SQW_callback ) */ static TIMER_CALLBACK( rtc_begin_update_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; rtc65271_state *state = get_safe_token(device); if (((state->regs[reg_A] & reg_A_DV) == 0x20) && ! (state->regs[reg_B] & reg_B_SET)) @@ -537,7 +537,7 @@ static TIMER_CALLBACK( rtc_end_update_callback ) 31,28,31, 30,31,30, 31,31,30, 31,30,31 }; - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; rtc65271_state *state = get_safe_token(device); UINT8 (*increment)(UINT8 data); int c59, c23, c12, c11, c29; diff --git a/src/emu/machine/rtc65271.h b/src/emu/machine/rtc65271.h index 5572d91f785..2c33a9b9a0d 100644 --- a/src/emu/machine/rtc65271.h +++ b/src/emu/machine/rtc65271.h @@ -10,7 +10,7 @@ typedef struct _rtc65271_config rtc65271_config; struct _rtc65271_config { - void (*interrupt_callback)(running_device *device, int state); + void (*interrupt_callback)(device_t *device, int state); }; @@ -19,8 +19,8 @@ struct _rtc65271_config MCFG_DEVICE_CONFIG_DATAPTR(rtc65271_config, interrupt_callback, _callback) -UINT8 rtc65271_r(running_device *device, int xramsel, offs_t offset); -void rtc65271_w(running_device *device, int xramsel, offs_t offset, UINT8 data); +UINT8 rtc65271_r(device_t *device, int xramsel, offs_t offset); +void rtc65271_w(device_t *device, int xramsel, offs_t offset, UINT8 data); READ8_DEVICE_HANDLER( rtc65271_rtc_r ); READ8_DEVICE_HANDLER( rtc65271_xram_r ); diff --git a/src/emu/machine/s3c2400.c b/src/emu/machine/s3c2400.c index 8da4a688ea6..064d65533c9 100644 --- a/src/emu/machine/s3c2400.c +++ b/src/emu/machine/s3c2400.c @@ -33,13 +33,13 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine *machine, int n_level, VIDEO_START( s3c2400 ) { - running_device *device = machine->device( S3C2400_TAG); + device_t *device = machine->device( S3C2400_TAG); s3c24xx_video_start( device, machine); } VIDEO_UPDATE( s3c2400 ) { - running_device *device = screen->machine->device( S3C2400_TAG); + device_t *device = screen->machine->device( S3C2400_TAG); return s3c24xx_video_update( device, screen, bitmap, cliprect); } @@ -84,7 +84,7 @@ DEVICE_GET_INFO( s3c2400 ) } } -void s3c2400_uart_fifo_w( running_device *device, int uart, UINT8 data) +void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data) { s3c24xx_uart_fifo_w( device, uart, data); } diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index e1d7ef93d5b..0362e51c70b 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -39,8 +39,8 @@ DECLARE_LEGACY_DEVICE(S3C2400, s3c2400); TYPE DEFINITIONS *******************************************************************************/ -typedef UINT32 (*s3c24xx_gpio_port_r_func)( running_device *device, int port); -typedef void (*s3c24xx_gpio_port_w_func)( running_device *device, int port, UINT32 data); +typedef UINT32 (*s3c24xx_gpio_port_r_func)( device_t *device, int port); +typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 data); typedef struct _s3c2400_interface_gpio s3c2400_interface_gpio; struct _s3c2400_interface_gpio @@ -94,7 +94,7 @@ DEVICE_GET_INFO( s3c2400 ); VIDEO_START( s3c2400 ); VIDEO_UPDATE( s3c2400 ); -void s3c2400_uart_fifo_w( running_device *device, int uart, UINT8 data); +void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data); /******************************************************************************* MACROS & CONSTANTS diff --git a/src/emu/machine/s3c2410.c b/src/emu/machine/s3c2410.c index 809171fab3a..41a3c4dd30f 100644 --- a/src/emu/machine/s3c2410.c +++ b/src/emu/machine/s3c2410.c @@ -33,13 +33,13 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine *machine, int n_level, VIDEO_START( s3c2410 ) { - running_device *device = machine->device( S3C2410_TAG); + device_t *device = machine->device( S3C2410_TAG); s3c24xx_video_start( device, machine); } VIDEO_UPDATE( s3c2410 ) { - running_device *device = screen->machine->device( S3C2410_TAG); + device_t *device = screen->machine->device( S3C2410_TAG); return s3c24xx_video_update( device, screen, bitmap, cliprect); } @@ -87,12 +87,12 @@ DEVICE_GET_INFO( s3c2410 ) } } -void s3c2410_uart_fifo_w( running_device *device, int uart, UINT8 data) +void s3c2410_uart_fifo_w( device_t *device, int uart, UINT8 data) { s3c24xx_uart_fifo_w( device, uart, data); } -void s3c2410_touch_screen( running_device *device, int state) +void s3c2410_touch_screen( device_t *device, int state) { s3c24xx_touch_screen( device, state); } @@ -108,7 +108,7 @@ void s3c2410_nand_calculate_mecc( UINT8 *data, UINT32 size, UINT8 *mecc) for (int i = 0; i < size; i++) nand_update_mecc( mecc, i, data[i]); } -void s3c2410_request_eint( running_device *device, UINT32 number) +void s3c2410_request_eint( device_t *device, UINT32 number) { s3c24xx_request_eint( device, number); } diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index 4fcb0923a67..de09cbd89a4 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -42,8 +42,8 @@ READ32_DEVICE_HANDLER( s3c2410_lcd_r ); TYPE DEFINITIONS *******************************************************************************/ -typedef UINT32 (*s3c24xx_gpio_port_r_func)( running_device *device, int port); -typedef void (*s3c24xx_gpio_port_w_func)( running_device *device, int port, UINT32 data); +typedef UINT32 (*s3c24xx_gpio_port_r_func)( device_t *device, int port); +typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 data); typedef struct _s3c2410_interface_gpio s3c2410_interface_gpio; struct _s3c2410_interface_gpio @@ -107,9 +107,9 @@ DEVICE_GET_INFO( s3c2410 ); VIDEO_START( s3c2410 ); VIDEO_UPDATE( s3c2410 ); -void s3c2410_uart_fifo_w( running_device *device, int uart, UINT8 data); -void s3c2410_touch_screen( running_device *device, int state); -void s3c2410_request_eint( running_device *device, UINT32 number); +void s3c2410_uart_fifo_w( device_t *device, int uart, UINT8 data); +void s3c2410_touch_screen( device_t *device, int state); +void s3c2410_request_eint( device_t *device, UINT32 number); WRITE_LINE_DEVICE_HANDLER( s3c2410_pin_frnb_w ); diff --git a/src/emu/machine/s3c2440.c b/src/emu/machine/s3c2440.c index 5c3801a4334..994d2ac85da 100644 --- a/src/emu/machine/s3c2440.c +++ b/src/emu/machine/s3c2440.c @@ -33,13 +33,13 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine *machine, int n_level, VIDEO_START( s3c2440 ) { - running_device *device = machine->device( S3C2440_TAG); + device_t *device = machine->device( S3C2440_TAG); s3c24xx_video_start( device, machine); } VIDEO_UPDATE( s3c2440 ) { - running_device *device = screen->machine->device( S3C2440_TAG); + device_t *device = screen->machine->device( S3C2440_TAG); return s3c24xx_video_update( device, screen, bitmap, cliprect); } @@ -89,22 +89,22 @@ DEVICE_GET_INFO( s3c2440 ) } } -void s3c2440_uart_fifo_w( running_device *device, int uart, UINT8 data) +void s3c2440_uart_fifo_w( device_t *device, int uart, UINT8 data) { s3c24xx_uart_fifo_w( device, uart, data); } -void s3c2440_touch_screen( running_device *device, int state) +void s3c2440_touch_screen( device_t *device, int state) { s3c24xx_touch_screen( device, state); } -void s3c2440_request_irq( running_device *device, UINT32 int_type) +void s3c2440_request_irq( device_t *device, UINT32 int_type) { s3c24xx_request_irq( device, int_type); } -void s3c2440_request_eint( running_device *device, UINT32 number) +void s3c2440_request_eint( device_t *device, UINT32 number) { s3c24xx_request_eint( device, number); } diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index ede452120c2..468336e8470 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -39,8 +39,8 @@ DECLARE_LEGACY_DEVICE(S3C2440, s3c2440); TYPE DEFINITIONS *******************************************************************************/ -typedef UINT32 (*s3c24xx_gpio_port_r_func)( running_device *device, int port); -typedef void (*s3c24xx_gpio_port_w_func)( running_device *device, int port, UINT32 data); +typedef UINT32 (*s3c24xx_gpio_port_r_func)( device_t *device, int port); +typedef void (*s3c24xx_gpio_port_w_func)( device_t *device, int port, UINT32 data); typedef struct _s3c2440_interface_gpio s3c2440_interface_gpio; struct _s3c2440_interface_gpio @@ -104,10 +104,10 @@ DEVICE_GET_INFO( s3c2440 ); VIDEO_START( s3c2440 ); VIDEO_UPDATE( s3c2440 ); -void s3c2440_uart_fifo_w( running_device *device, int uart, UINT8 data); -void s3c2440_touch_screen( running_device *device, int state); -void s3c2440_request_irq( running_device *device, UINT32 int_type); -void s3c2440_request_eint( running_device *device, UINT32 number); +void s3c2440_uart_fifo_w( device_t *device, int uart, UINT8 data); +void s3c2440_touch_screen( device_t *device, int state); +void s3c2440_request_irq( device_t *device, UINT32 int_type); +void s3c2440_request_eint( device_t *device, UINT32 number); WRITE_LINE_DEVICE_HANDLER( s3c2440_pin_frnb_w ); diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c index 88a2a9316b0..757a35c02e5 100644 --- a/src/emu/machine/s3c24xx.c +++ b/src/emu/machine/s3c24xx.c @@ -96,18 +96,18 @@ typedef s3c2440_interface s3c24xx_interface; PROTOTYPES ***************************************************************************/ -static UINT32 s3c24xx_get_fclk( running_device *device); -static UINT32 s3c24xx_get_hclk( running_device *device); -static UINT32 s3c24xx_get_pclk( running_device *device); +static UINT32 s3c24xx_get_fclk( device_t *device); +static UINT32 s3c24xx_get_hclk( device_t *device); +static UINT32 s3c24xx_get_pclk( device_t *device); -static void s3c24xx_dma_request_iis( running_device *device); -static void s3c24xx_dma_request_pwm( running_device *device); +static void s3c24xx_dma_request_iis( device_t *device); +static void s3c24xx_dma_request_pwm( device_t *device); /*************************************************************************** INLINE FUNCTIONS ***************************************************************************/ -INLINE s3c24xx_t *get_token( running_device *device) +INLINE s3c24xx_t *get_token( device_t *device) { assert(device != NULL); return (s3c24xx_t *)downcast(device)->token(); @@ -119,14 +119,14 @@ INLINE s3c24xx_t *get_token( running_device *device) /* ... */ -static void s3c24xx_reset( running_device *device) +static void s3c24xx_reset( device_t *device) { fatalerror( "s3c24xx_reset\n"); } /* LCD Controller */ -static rgb_t s3c24xx_get_color_tft_16( running_device *device, UINT16 data) +static rgb_t s3c24xx_get_color_tft_16( device_t *device, UINT16 data) { s3c24xx_t *s3c24xx = get_token( device); if ((s3c24xx->lcd.regs.lcdcon5 & (1 << 11)) == 0) @@ -150,7 +150,7 @@ static rgb_t s3c24xx_get_color_tft_16( running_device *device, UINT16 data) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) -static rgb_t s3c24xx_get_color_tft_24( running_device *device, UINT32 data) +static rgb_t s3c24xx_get_color_tft_24( device_t *device, UINT32 data) { UINT8 r, g, b; r = BITS( data, 23, 16); @@ -161,7 +161,7 @@ static rgb_t s3c24xx_get_color_tft_24( running_device *device, UINT32 data) #endif -static rgb_t s3c24xx_get_color_stn_12( running_device *device, UINT16 data) +static rgb_t s3c24xx_get_color_stn_12( device_t *device, UINT16 data) { UINT8 r, g, b; r = BITS( data, 11, 8) << 4; @@ -170,7 +170,7 @@ static rgb_t s3c24xx_get_color_stn_12( running_device *device, UINT16 data) return MAKE_RGB( r, g, b); } -static rgb_t s3c24xx_get_color_stn_08( running_device *device, UINT8 data) +static rgb_t s3c24xx_get_color_stn_08( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); UINT8 r, g, b; @@ -180,7 +180,7 @@ static rgb_t s3c24xx_get_color_stn_08( running_device *device, UINT8 data) return MAKE_RGB( r, g, b); } -static rgb_t s3c24xx_get_color_stn_01( running_device *device, UINT8 data) +static rgb_t s3c24xx_get_color_stn_01( device_t *device, UINT8 data) { if ((data & 1) == 0) { @@ -192,7 +192,7 @@ static rgb_t s3c24xx_get_color_stn_01( running_device *device, UINT8 data) } } -static rgb_t s3c24xx_get_color_stn_02( running_device *device, UINT8 data) +static rgb_t s3c24xx_get_color_stn_02( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); UINT8 r, g, b; @@ -200,14 +200,14 @@ static rgb_t s3c24xx_get_color_stn_02( running_device *device, UINT8 data) return MAKE_RGB( r, g, b); } -static rgb_t s3c24xx_get_color_stn_04( running_device *device, UINT8 data) +static rgb_t s3c24xx_get_color_stn_04( device_t *device, UINT8 data) { UINT8 r, g, b; r = g = b = BITS( data, 3, 0) << 4; return MAKE_RGB( r, g, b); } -static rgb_t s3c24xx_get_color_tpal( running_device *device) +static rgb_t s3c24xx_get_color_tpal( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); #if defined(DEVICE_S3C2400) @@ -217,7 +217,7 @@ static rgb_t s3c24xx_get_color_tpal( running_device *device) #endif } -static void s3c24xx_lcd_dma_reload( running_device *device) +static void s3c24xx_lcd_dma_reload( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx->lcd.vramaddr_cur = s3c24xx->lcd.regs.lcdsaddr1 << 1; @@ -230,7 +230,7 @@ static void s3c24xx_lcd_dma_reload( running_device *device) s3c24xx->lcd.dma_bits = 0; } -static void s3c24xx_lcd_dma_init( running_device *device) +static void s3c24xx_lcd_dma_init( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx_lcd_dma_reload( device); @@ -244,7 +244,7 @@ static void s3c24xx_lcd_dma_init( running_device *device) } #if 0 -static UINT32 s3c24xx_lcd_dma_read( running_device *device) +static UINT32 s3c24xx_lcd_dma_read( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); address_space* space = cputag_get_address_space( device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); @@ -288,7 +288,7 @@ static UINT32 s3c24xx_lcd_dma_read( running_device *device) } #endif -static UINT32 s3c24xx_lcd_dma_read( running_device *device) +static UINT32 s3c24xx_lcd_dma_read( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); address_space* space = cputag_get_address_space( device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); @@ -361,7 +361,7 @@ static UINT32 s3c24xx_lcd_dma_read( running_device *device) } } -static UINT32 s3c24xx_lcd_dma_read_bits( running_device *device, int count) +static UINT32 s3c24xx_lcd_dma_read_bits( device_t *device, int count) { s3c24xx_t *s3c24xx = get_token( device); UINT32 data; @@ -398,7 +398,7 @@ static UINT32 s3c24xx_lcd_dma_read_bits( running_device *device, int count) return data; } -static void s3c24xx_lcd_render_tpal( running_device *device) +static void s3c24xx_lcd_render_tpal( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -413,7 +413,7 @@ static void s3c24xx_lcd_render_tpal( running_device *device) } } -static void s3c24xx_lcd_render_stn_01( running_device *device) +static void s3c24xx_lcd_render_stn_01( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -445,7 +445,7 @@ static void s3c24xx_lcd_render_stn_01( running_device *device) } } -static void s3c24xx_lcd_render_stn_02( running_device *device) +static void s3c24xx_lcd_render_stn_02( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -469,7 +469,7 @@ static void s3c24xx_lcd_render_stn_02( running_device *device) } } -static void s3c24xx_lcd_render_stn_04( running_device *device) +static void s3c24xx_lcd_render_stn_04( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -493,7 +493,7 @@ static void s3c24xx_lcd_render_stn_04( running_device *device) } } -static void s3c24xx_lcd_render_stn_08( running_device *device) +static void s3c24xx_lcd_render_stn_08( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -517,7 +517,7 @@ static void s3c24xx_lcd_render_stn_08( running_device *device) } } -static void s3c24xx_lcd_render_stn_12_p( running_device *device) +static void s3c24xx_lcd_render_stn_12_p( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -536,7 +536,7 @@ static void s3c24xx_lcd_render_stn_12_p( running_device *device) } } -static void s3c24xx_lcd_render_stn_12_u( running_device *device) // not tested +static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -560,7 +560,7 @@ static void s3c24xx_lcd_render_stn_12_u( running_device *device) // not tested } } -static void s3c24xx_lcd_render_tft_01( running_device *device) +static void s3c24xx_lcd_render_tft_01( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -584,7 +584,7 @@ static void s3c24xx_lcd_render_tft_01( running_device *device) } } -static void s3c24xx_lcd_render_tft_02( running_device *device) +static void s3c24xx_lcd_render_tft_02( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -608,7 +608,7 @@ static void s3c24xx_lcd_render_tft_02( running_device *device) } } -static void s3c24xx_lcd_render_tft_04( running_device *device) +static void s3c24xx_lcd_render_tft_04( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -632,7 +632,7 @@ static void s3c24xx_lcd_render_tft_04( running_device *device) } } -static void s3c24xx_lcd_render_tft_08( running_device *device) +static void s3c24xx_lcd_render_tft_08( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -656,7 +656,7 @@ static void s3c24xx_lcd_render_tft_08( running_device *device) } } -static void s3c24xx_lcd_render_tft_16( running_device *device) +static void s3c24xx_lcd_render_tft_16( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); bitmap_t *bitmap = s3c24xx->lcd.bitmap[0]; @@ -682,7 +682,7 @@ static void s3c24xx_lcd_render_tft_16( running_device *device) static TIMER_CALLBACK( s3c24xx_lcd_timer_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; s3c24xx_t *s3c24xx = get_token( device); screen_device *screen = machine->primary_screen; UINT32 tpalen; @@ -725,7 +725,7 @@ static TIMER_CALLBACK( s3c24xx_lcd_timer_exp ) timer_adjust_oneshot( s3c24xx->lcd.timer, screen->time_until_pos( s3c24xx->lcd.vpos, s3c24xx->lcd.hpos), 0); } -static void s3c24xx_video_start( running_device *device, running_machine *machine) +static void s3c24xx_video_start( device_t *device, running_machine *machine) { s3c24xx_t *s3c24xx = get_token( device); screen_device *screen = machine->primary_screen; @@ -758,7 +758,7 @@ static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t } } -static UINT32 s3c24xx_video_update( running_device *device, screen_device *screen, bitmap_t *bitmap, const rectangle *cliprect) +static UINT32 s3c24xx_video_update( device_t *device, screen_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->lcd.framerate >= 1195) @@ -809,7 +809,7 @@ READ32_DEVICE_HANDLER( s3c2440_lcd_r ) return data; } -static void s3c24xx_lcd_configure_tft( running_device *device) +static void s3c24xx_lcd_configure_tft( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); screen_device *screen = device->machine->primary_screen; @@ -849,7 +849,7 @@ static void s3c24xx_lcd_configure_tft( running_device *device) screen->configure( width, height, visarea, HZ_TO_ATTOSECONDS( s3c24xx->lcd.framerate)); } -static void s3c24xx_lcd_configure_stn( running_device *device) +static void s3c24xx_lcd_configure_stn( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); screen_device *screen = device->machine->primary_screen; @@ -894,7 +894,7 @@ static void s3c24xx_lcd_configure_stn( running_device *device) screen->configure( width, height, visarea, HZ_TO_ATTOSECONDS( s3c24xx->lcd.framerate)); } -static void s3c24xx_lcd_configure( running_device *device) +static void s3c24xx_lcd_configure( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 bppmode; @@ -910,7 +910,7 @@ static void s3c24xx_lcd_configure( running_device *device) } } -static void s3c24xx_lcd_start( running_device *device) +static void s3c24xx_lcd_start( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); screen_device *screen = device->machine->primary_screen; @@ -920,14 +920,14 @@ static void s3c24xx_lcd_start( running_device *device) timer_adjust_oneshot( s3c24xx->lcd.timer, screen->time_until_pos( s3c24xx->lcd.vpos_min, s3c24xx->lcd.hpos_min), 0); } -static void s3c24xx_lcd_stop( running_device *device) +static void s3c24xx_lcd_stop( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "LCD stop\n"); timer_adjust_oneshot( s3c24xx->lcd.timer, attotime_never, 0); } -static void s3c24xx_lcd_recalc( running_device *device) +static void s3c24xx_lcd_recalc( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->lcd.regs.lcdcon1 & (1 << 0)) @@ -983,7 +983,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_lcd_palette_w ) /* Clock & Power Management */ -static UINT32 s3c24xx_get_fclk( running_device *device) +static UINT32 s3c24xx_get_fclk( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 data, mdiv, pdiv, sdiv; @@ -998,7 +998,7 @@ static UINT32 s3c24xx_get_fclk( running_device *device) #endif } -static UINT32 s3c24xx_get_hclk( running_device *device) +static UINT32 s3c24xx_get_hclk( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); #if defined(DEVICE_S3C2400) || defined(DEVICE_S3C2410) @@ -1015,7 +1015,7 @@ static UINT32 s3c24xx_get_hclk( running_device *device) #endif } -static UINT32 s3c24xx_get_pclk( running_device *device) +static UINT32 s3c24xx_get_pclk( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); return s3c24xx_get_hclk( device) / (1 << BIT( s3c24xx->clkpow.regs.clkdivn, 0)); @@ -1047,7 +1047,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_clkpow_w ) /* Interrupt Controller */ -static void s3c24xx_check_pending_irq( running_device *device) +static void s3c24xx_check_pending_irq( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 temp; @@ -1103,7 +1103,7 @@ static void s3c24xx_check_pending_irq( running_device *device) } } -static void s3c24xx_request_irq( running_device *device, UINT32 int_type) +static void s3c24xx_request_irq( device_t *device, UINT32 int_type) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 5, "request irq %d\n", int_type); @@ -1113,7 +1113,7 @@ static void s3c24xx_request_irq( running_device *device, UINT32 int_type) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) -static void s3c24xx_check_pending_subirq( running_device *device) +static void s3c24xx_check_pending_subirq( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 temp = s3c24xx->irq.regs.subsrcpnd & ~s3c24xx->irq.regs.intsubmsk; @@ -1129,7 +1129,7 @@ static void s3c24xx_check_pending_subirq( running_device *device) } } -ATTR_UNUSED static void s3c24xx_request_subirq( running_device *device, UINT32 int_type) +ATTR_UNUSED static void s3c24xx_request_subirq( device_t *device, UINT32 int_type) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 5, "request subirq %d\n", int_type); @@ -1137,7 +1137,7 @@ ATTR_UNUSED static void s3c24xx_request_subirq( running_device *device, UINT32 i s3c24xx_check_pending_subirq( device); } -static void s3c24xx_check_pending_eint( running_device *device) +static void s3c24xx_check_pending_eint( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 temp = s3c24xx->gpio.regs.eintpend & ~s3c24xx->gpio.regs.eintmask; @@ -1160,7 +1160,7 @@ static void s3c24xx_check_pending_eint( running_device *device) } } -ATTR_UNUSED static void s3c24xx_request_eint( running_device *device, UINT32 number) +ATTR_UNUSED static void s3c24xx_request_eint( device_t *device, UINT32 number) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 5, "request external interrupt %d\n", number); @@ -1227,7 +1227,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_irq_w ) /* PWM Timer */ -static UINT16 s3c24xx_pwm_calc_observation( running_device *device, int ch) +static UINT16 s3c24xx_pwm_calc_observation( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); double timeleft, x1, x2; @@ -1278,7 +1278,7 @@ static READ32_DEVICE_HANDLER( s3c24xx_pwm_r ) return data; } -static void s3c24xx_pwm_start( running_device *device, int timer) +static void s3c24xx_pwm_start( device_t *device, int timer) { s3c24xx_t *s3c24xx = get_token( device); const int mux_table[] = { 2, 4, 8, 16}; @@ -1365,14 +1365,14 @@ static void s3c24xx_pwm_start( running_device *device, int timer) } } -static void s3c24xx_pwm_stop( running_device *device, int timer) +static void s3c24xx_pwm_stop( device_t *device, int timer) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "PWM %d stop\n", timer); timer_adjust_oneshot( s3c24xx->pwm.timer[timer], attotime_never, 0); } -static void s3c24xx_pwm_recalc( running_device *device, int timer) +static void s3c24xx_pwm_recalc( device_t *device, int timer) { s3c24xx_t *s3c24xx = get_token( device); const int tcon_shift[] = { 0, 8, 12, 16, 20}; @@ -1423,7 +1423,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_pwm_w ) static TIMER_CALLBACK( s3c24xx_pwm_timer_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; s3c24xx_t *s3c24xx = get_token( device); int ch = param; const int ch_int[] = { S3C24XX_INT_TIMER0, S3C24XX_INT_TIMER1, S3C24XX_INT_TIMER2, S3C24XX_INT_TIMER3, S3C24XX_INT_TIMER4 }; @@ -1440,7 +1440,7 @@ static TIMER_CALLBACK( s3c24xx_pwm_timer_exp ) /* DMA */ -static void s3c24xx_dma_reload( running_device *device, int ch) +static void s3c24xx_dma_reload( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx_dma_regs_t *regs = &s3c24xx->dma[ch].regs; @@ -1449,7 +1449,7 @@ static void s3c24xx_dma_reload( running_device *device, int ch) regs->dcdst = S3C24XX_DCDST_SET_CURR_DST( regs->dcdst, S3C24XX_DIDST_GET_DADDR( regs->didst)); } -static void s3c24xx_dma_trigger( running_device *device, int ch) +static void s3c24xx_dma_trigger( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx_dma_regs_t *regs = &s3c24xx->dma[ch].regs; @@ -1508,7 +1508,7 @@ static void s3c24xx_dma_trigger( running_device *device, int ch) } } -static void s3c24xx_dma_request_iis( running_device *device) +static void s3c24xx_dma_request_iis( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx_dma_regs_t *regs = &s3c24xx->dma[2].regs; @@ -1519,7 +1519,7 @@ static void s3c24xx_dma_request_iis( running_device *device) } } -static void s3c24xx_dma_request_pwm( running_device *device) +static void s3c24xx_dma_request_pwm( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 5, "s3c24xx_dma_request_pwm\n"); @@ -1536,7 +1536,7 @@ static void s3c24xx_dma_request_pwm( running_device *device) } } -static void s3c24xx_dma_start( running_device *device, int ch) +static void s3c24xx_dma_start( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); UINT32 addr_src, addr_dst, tc; @@ -1570,12 +1570,12 @@ static void s3c24xx_dma_start( running_device *device, int ch) } } -static void s3c24xx_dma_stop( running_device *device, int ch) +static void s3c24xx_dma_stop( device_t *device, int ch) { verboselog( device->machine, 1, "DMA %d stop\n", ch); } -static void s3c24xx_dma_recalc( running_device *device, int ch) +static void s3c24xx_dma_recalc( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); if ((s3c24xx->dma[ch].regs.dmasktrig & (1 << 1)) != 0) @@ -1588,13 +1588,13 @@ static void s3c24xx_dma_recalc( running_device *device, int ch) } } -static UINT32 s3c24xx_dma_r( running_device *device, UINT32 ch, UINT32 offset) +static UINT32 s3c24xx_dma_r( device_t *device, UINT32 ch, UINT32 offset) { s3c24xx_t *s3c24xx = get_token( device); return ((UINT32*)&s3c24xx->dma[ch].regs)[offset]; } -static void s3c24xx_dma_w( running_device *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +static void s3c24xx_dma_w( device_t *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) { s3c24xx_t *s3c24xx = get_token( device); UINT32 old_value = ((UINT32*)&s3c24xx->dma[ch].regs)[offset]; @@ -1683,7 +1683,7 @@ static TIMER_CALLBACK( s3c24xx_dma_timer_exp ) /* I/O Port */ -INLINE UINT32 iface_gpio_port_r( running_device *device, int port) +INLINE UINT32 iface_gpio_port_r( device_t *device, int port) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->gpio.port_r) @@ -1696,7 +1696,7 @@ INLINE UINT32 iface_gpio_port_r( running_device *device, int port) } } -INLINE void iface_gpio_port_w( running_device *device, int port, UINT32 data) +INLINE void iface_gpio_port_w( device_t *device, int port, UINT32 data) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->gpio.port_w) @@ -1883,7 +1883,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_usb_host_w ) /* UART */ -static UINT32 s3c24xx_uart_r( running_device *device, UINT32 ch, UINT32 offset) +static UINT32 s3c24xx_uart_r( device_t *device, UINT32 ch, UINT32 offset) { s3c24xx_t *s3c24xx = get_token( device); UINT32 data = ((UINT32*)&s3c24xx->uart[ch].regs)[offset]; @@ -1905,7 +1905,7 @@ static UINT32 s3c24xx_uart_r( running_device *device, UINT32 ch, UINT32 offset) return data; } -static void s3c24xx_uart_w( running_device *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +static void s3c24xx_uart_w( device_t *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) { s3c24xx_t *s3c24xx = get_token( device); COMBINE_DATA(&((UINT32*)&s3c24xx->uart[ch].regs)[offset]); @@ -1970,7 +1970,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_uart_2_w ) #endif -static void s3c24xx_uart_fifo_w( running_device *device, int uart, UINT8 data) +static void s3c24xx_uart_fifo_w( device_t *device, int uart, UINT8 data) { // printf( "s3c24xx_uart_fifo_w (%c)\n", data); s3c24xx_t *s3c24xx = get_token( device); @@ -1999,7 +1999,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_usb_device_w ) #if defined(DEVICE_S3C2410) -static UINT16 s3c24xx_wdt_calc_current_count( running_device *device) +static UINT16 s3c24xx_wdt_calc_current_count( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); double timeleft, x1, x2; @@ -2016,7 +2016,7 @@ static UINT16 s3c24xx_wdt_calc_current_count( running_device *device) #else -static UINT16 s3c24xx_wdt_calc_current_count( running_device *device) +static UINT16 s3c24xx_wdt_calc_current_count( device_t *device) { return 0; } @@ -2043,7 +2043,7 @@ static READ32_DEVICE_HANDLER( s3c24xx_wdt_r ) return data; } -static void s3c24xx_wdt_start( running_device *device) +static void s3c24xx_wdt_start( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 pclk, prescaler, clock; @@ -2062,7 +2062,7 @@ static void s3c24xx_wdt_start( running_device *device) #endif } -static void s3c24xx_wdt_stop( running_device *device) +static void s3c24xx_wdt_stop( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "WDT stop\n"); @@ -2070,7 +2070,7 @@ static void s3c24xx_wdt_stop( running_device *device) timer_adjust_oneshot( s3c24xx->wdt.timer, attotime_never, 0); } -static void s3c24xx_wdt_recalc( running_device *device) +static void s3c24xx_wdt_recalc( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if ((s3c24xx->wdt.regs.wtcon & (1 << 5)) != 0) @@ -2104,7 +2104,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_wdt_w ) static TIMER_CALLBACK( s3c24xx_wdt_timer_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; s3c24xx_t *s3c24xx = get_token( device); verboselog( machine, 2, "WDT timer callback\n"); if ((s3c24xx->wdt.regs.wtcon & (1 << 2)) != 0) @@ -2123,7 +2123,7 @@ static TIMER_CALLBACK( s3c24xx_wdt_timer_exp ) /* IIC */ -INLINE void iface_i2c_scl_w( running_device *device, int state) +INLINE void iface_i2c_scl_w( device_t *device, int state) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->i2c.scl_w) @@ -2132,7 +2132,7 @@ INLINE void iface_i2c_scl_w( running_device *device, int state) } } -INLINE void iface_i2c_sda_w( running_device *device, int state) +INLINE void iface_i2c_sda_w( device_t *device, int state) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->i2c.sda_w) @@ -2141,7 +2141,7 @@ INLINE void iface_i2c_sda_w( running_device *device, int state) } } -INLINE int iface_i2c_sda_r( running_device *device) +INLINE int iface_i2c_sda_r( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->i2c.sda_r) @@ -2154,7 +2154,7 @@ INLINE int iface_i2c_sda_r( running_device *device) } } -static void i2c_send_start( running_device *device) +static void i2c_send_start( device_t *device) { verboselog( device->machine, 5, "i2c_send_start\n"); iface_i2c_sda_w( device, 1); @@ -2163,7 +2163,7 @@ static void i2c_send_start( running_device *device) iface_i2c_scl_w( device, 0); } -static void i2c_send_stop( running_device *device) +static void i2c_send_stop( device_t *device) { verboselog( device->machine, 5, "i2c_send_stop\n"); iface_i2c_sda_w( device, 0); @@ -2172,7 +2172,7 @@ static void i2c_send_stop( running_device *device) iface_i2c_scl_w( device, 0); } -static UINT8 i2c_receive_byte( running_device *device, int ack) +static UINT8 i2c_receive_byte( device_t *device, int ack) { UINT8 data = 0; verboselog( device->machine, 5, "i2c_receive_byte ...\n"); @@ -2191,7 +2191,7 @@ static UINT8 i2c_receive_byte( running_device *device, int ack) return data; } -static int i2c_send_byte( running_device *device, UINT8 data) +static int i2c_send_byte( device_t *device, UINT8 data) { int ack; verboselog( device->machine, 5, "i2c_send_byte ...\n"); @@ -2211,7 +2211,7 @@ static int i2c_send_byte( running_device *device, UINT8 data) return ack; } -static void iic_start( running_device *device) +static void iic_start( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); int mode_selection; @@ -2226,7 +2226,7 @@ static void iic_start( running_device *device) timer_adjust_oneshot( s3c24xx->iic.timer, ATTOTIME_IN_USEC( 1), 0); } -static void iic_stop( running_device *device) +static void iic_stop( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "IIC stop\n"); @@ -2234,7 +2234,7 @@ static void iic_stop( running_device *device) timer_adjust_oneshot( s3c24xx->iic.timer, attotime_never, 0); } -static void iic_resume( running_device *device) +static void iic_resume( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); int mode_selection; @@ -2345,7 +2345,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_iic_w ) static TIMER_CALLBACK( s3c24xx_iic_timer_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; s3c24xx_t *s3c24xx = get_token( device); int enable_interrupt; verboselog( machine, 2, "IIC timer callback\n"); @@ -2360,7 +2360,7 @@ static TIMER_CALLBACK( s3c24xx_iic_timer_exp ) /* IIS */ -INLINE void iface_i2s_data_w( running_device *device, int ch, UINT16 data) +INLINE void iface_i2s_data_w( device_t *device, int ch, UINT16 data) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->i2s.data_w) @@ -2369,7 +2369,7 @@ INLINE void iface_i2s_data_w( running_device *device, int ch, UINT16 data) } } -static void s3c24xx_iis_start( running_device *device) +static void s3c24xx_iis_start( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); const UINT32 codeclk_table[] = { 256, 384}; @@ -2386,14 +2386,14 @@ static void s3c24xx_iis_start( running_device *device) timer_adjust_periodic( s3c24xx->iis.timer, ATTOTIME_IN_HZ( freq), 0, ATTOTIME_IN_HZ( freq)); } -static void s3c24xx_iis_stop( running_device *device) +static void s3c24xx_iis_stop( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "IIS stop\n"); timer_adjust_oneshot( s3c24xx->iis.timer, attotime_never, 0); } -static void s3c24xx_iis_recalc( running_device *device) +static void s3c24xx_iis_recalc( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if ((s3c24xx->iis.regs.iiscon & (1 << 0)) != 0) @@ -2463,14 +2463,14 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_iis_w ) static TIMER_CALLBACK( s3c24xx_iis_timer_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; verboselog( machine, 2, "IIS timer callback\n"); s3c24xx_dma_request_iis( device); } /* RTC */ -static void s3c24xx_rtc_init( running_device *device) +static void s3c24xx_rtc_init( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx->rtc.regs.bcdsec = dec_2_bcd( 0); @@ -2490,7 +2490,7 @@ static READ32_DEVICE_HANDLER( s3c24xx_rtc_r ) return data; } -static void s3c24xx_rtc_recalc( running_device *device) +static void s3c24xx_rtc_recalc( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->rtc.regs.ticnt & (1 << 7)) @@ -2525,12 +2525,12 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_rtc_w ) static TIMER_CALLBACK( s3c24xx_rtc_timer_tick_count_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; verboselog( machine, 2, "RTC timer callback (tick count)\n"); s3c24xx_request_irq( device, S3C24XX_INT_TICK); } -static void s3c24xx_rtc_update( running_device *device) +static void s3c24xx_rtc_update( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); UINT32 bcdday_max; @@ -2576,7 +2576,7 @@ static void s3c24xx_rtc_update( running_device *device) verboselog( device->machine, 5, "RTC - %04d/%02d/%02d %02d:%02d:%02d\n", bcd_2_dec( s3c24xx->rtc.regs.bcdyear) + 2000, bcd_2_dec( s3c24xx->rtc.regs.bcdmon), bcd_2_dec( s3c24xx->rtc.regs.bcdday), bcd_2_dec( s3c24xx->rtc.regs.bcdhour), bcd_2_dec( s3c24xx->rtc.regs.bcdmin), bcd_2_dec( s3c24xx->rtc.regs.bcdsec)); } -static void s3c24xx_rtc_check_alarm( running_device *device) +static void s3c24xx_rtc_check_alarm( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->rtc.regs.rtcalm & 0x40) @@ -2597,7 +2597,7 @@ static void s3c24xx_rtc_check_alarm( running_device *device) static TIMER_CALLBACK( s3c24xx_rtc_timer_update_exp ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; verboselog( machine, 2, "RTC timer callback (update)\n"); s3c24xx_rtc_update( device); s3c24xx_rtc_check_alarm( device); @@ -2605,7 +2605,7 @@ static TIMER_CALLBACK( s3c24xx_rtc_timer_update_exp ) /* A/D Converter */ -static UINT32 iface_adc_data_r( running_device *device, int ch) +static UINT32 iface_adc_data_r( device_t *device, int ch) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->adc.data_r) @@ -2647,7 +2647,7 @@ static READ32_DEVICE_HANDLER( s3c24xx_adc_r ) return data; } -static void s3c24xx_adc_start( running_device *device) +static void s3c24xx_adc_start( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 1, "ADC start\n"); @@ -2676,7 +2676,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_adc_w ) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) -static void s3c24xx_touch_screen( running_device *device, int state) +static void s3c24xx_touch_screen( device_t *device, int state) { s3c24xx_t *s3c24xx = get_token( device); s3c24xx->adc.regs.adcdat0 = ((state ? 0 : 1) << 15); @@ -2688,7 +2688,7 @@ static void s3c24xx_touch_screen( running_device *device, int state) /* SPI */ -static UINT32 s3c24xx_spi_r( running_device *device, UINT32 ch, UINT32 offset) +static UINT32 s3c24xx_spi_r( device_t *device, UINT32 ch, UINT32 offset) { s3c24xx_t *s3c24xx = get_token( device); UINT32 data = ((UINT32*)&s3c24xx->spi[ch].regs)[offset]; @@ -2703,7 +2703,7 @@ static UINT32 s3c24xx_spi_r( running_device *device, UINT32 ch, UINT32 offset) return data; } -static void s3c24xx_spi_w( running_device *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) +static void s3c24xx_spi_w( device_t *device, UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask) { s3c24xx_t *s3c24xx = get_token( device); COMBINE_DATA(&((UINT32*)&s3c24xx->spi[ch].regs)[offset]); @@ -2789,7 +2789,7 @@ static WRITE32_DEVICE_HANDLER( s3c24xx_sdi_w ) #if defined(DEVICE_S3C2410) || defined(DEVICE_S3C2440) -INLINE void iface_nand_command_w( running_device *device, UINT8 data) +INLINE void iface_nand_command_w( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->nand.command_w) @@ -2798,7 +2798,7 @@ INLINE void iface_nand_command_w( running_device *device, UINT8 data) } } -INLINE void iface_nand_address_w( running_device *device, UINT8 data) +INLINE void iface_nand_address_w( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->nand.address_w) @@ -2807,7 +2807,7 @@ INLINE void iface_nand_address_w( running_device *device, UINT8 data) } } -INLINE UINT8 iface_nand_data_r( running_device *device) +INLINE UINT8 iface_nand_data_r( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->nand.data_r) @@ -2820,7 +2820,7 @@ INLINE UINT8 iface_nand_data_r( running_device *device) } } -INLINE void iface_nand_data_w( running_device *device, UINT8 data) +INLINE void iface_nand_data_w( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); if (s3c24xx->iface->nand.data_w) @@ -2894,7 +2894,7 @@ static void nand_update_secc( UINT8 *ecc, int pos, UINT8 data) #endif -static void s3c24xx_nand_update_ecc( running_device *device, UINT8 data) +static void s3c24xx_nand_update_ecc( device_t *device, UINT8 data) { s3c24xx_t *s3c24xx = get_token( device); UINT8 temp[4]; @@ -2927,19 +2927,19 @@ static void s3c24xx_nand_update_ecc( running_device *device, UINT8 data) #endif } -static void s3c24xx_nand_command_w( running_device *device, UINT8 data) +static void s3c24xx_nand_command_w( device_t *device, UINT8 data) { verboselog( device->machine, 5, "NAND write command %02X\n", data); iface_nand_command_w( device, data); } -static void s3c24xx_nand_address_w( running_device *device, UINT8 data) +static void s3c24xx_nand_address_w( device_t *device, UINT8 data) { verboselog( device->machine, 5, "NAND write address %02X\n", data); iface_nand_address_w( device, data); } -static UINT8 s3c24xx_nand_data_r( running_device *device) +static UINT8 s3c24xx_nand_data_r( device_t *device) { UINT8 data = iface_nand_data_r( device); verboselog( device->machine, 5, "NAND data read %02X\n", data); @@ -2947,7 +2947,7 @@ static UINT8 s3c24xx_nand_data_r( running_device *device) return data; } -static void s3c24xx_nand_data_w( running_device *device, UINT8 data) +static void s3c24xx_nand_data_w( device_t *device, UINT8 data) { verboselog( device->machine, 5, "NAND write data %02X\n", data); iface_nand_data_w( device, data); @@ -3005,7 +3005,7 @@ static READ32_DEVICE_HANDLER( s3c24xx_nand_r ) return data; } -static void s3c24xx_nand_init_ecc( running_device *device) +static void s3c24xx_nand_init_ecc( device_t *device) { s3c24xx_t *s3c24xx = get_token( device); verboselog( device->machine, 5, "NAND - init ecc\n"); diff --git a/src/emu/machine/scsicd.c b/src/emu/machine/scsicd.c index c9173be42a0..3a67cb33d49 100644 --- a/src/emu/machine/scsicd.c +++ b/src/emu/machine/scsicd.c @@ -45,7 +45,7 @@ static int scsicd_exec_command( SCSIInstance *scsiInstance, UINT8 *statusCode ) SCSICd *our_this = (SCSICd *)SCSIThis( &SCSIClassCDROM, scsiInstance ); cdrom_file *cdrom = our_this->cdrom; - running_device *cdda; + device_t *cdda; int trk; SCSIGetCommand( scsiInstance, &command, &commandLength ); @@ -317,7 +317,7 @@ static void scsicd_read_data( SCSIInstance *scsiInstance, UINT8 *data, int dataL cdrom_file *cdrom = our_this->cdrom; UINT32 temp; UINT8 tmp_buffer[2048]; - running_device *cdda; + device_t *cdda; SCSIGetCommand( scsiInstance, &command, &commandLength ); diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c index d04864ace2e..324e8502e85 100644 --- a/src/emu/machine/smc91c9x.c +++ b/src/emu/machine/smc91c9x.c @@ -109,7 +109,7 @@ static const char *const ethernet_regname[64] = typedef struct _smc91c9x_state smc91c9x_state; struct _smc91c9x_state { - running_device *device; + device_t *device; smc91c9x_irq_func irq_handler; /* raw register data and masks */ @@ -151,7 +151,7 @@ static void update_ethernet_irq(smc91c9x_state *smc); in device is, in fact, an IDE controller -------------------------------------------------*/ -INLINE smc91c9x_state *get_safe_token(running_device *device) +INLINE smc91c9x_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SMC91C94 || device->type() == SMC91C96); diff --git a/src/emu/machine/smc91c9x.h b/src/emu/machine/smc91c9x.h index 7fe418d9120..7a3f9de3505 100644 --- a/src/emu/machine/smc91c9x.h +++ b/src/emu/machine/smc91c9x.h @@ -16,7 +16,7 @@ TYPE DEFINITIONS ***************************************************************************/ -typedef void (*smc91c9x_irq_func)(running_device *device, int state); +typedef void (*smc91c9x_irq_func)(device_t *device, int state); typedef struct _smc91c9x_config smc91c9x_config; diff --git a/src/emu/machine/tms6100.c b/src/emu/machine/tms6100.c index 90f61c0bedb..43560e9bbf9 100644 --- a/src/emu/machine/tms6100.c +++ b/src/emu/machine/tms6100.c @@ -89,7 +89,7 @@ struct _tms6100_state const UINT8 *rom; - running_device *device; + device_t *device; #if 0 const tms5110_interface *intf; @@ -102,7 +102,7 @@ struct _tms6100_state ***********************************************************************************************/ -INLINE tms6100_state *get_safe_token(running_device *device) +INLINE tms6100_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS6100 || diff --git a/src/emu/machine/upd4701.c b/src/emu/machine/upd4701.c index e96abb52ad3..1ed68a257ca 100644 --- a/src/emu/machine/upd4701.c +++ b/src/emu/machine/upd4701.c @@ -45,7 +45,7 @@ struct _upd4701_state INLINE FUNCTIONS ***************************************************************************/ -INLINE upd4701_state *get_safe_token(running_device *device) +INLINE upd4701_state *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == UPD4701)); diff --git a/src/emu/romload.c b/src/emu/romload.c index 01f68e26f5b..ca1737caaac 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -1226,7 +1226,7 @@ static UINT32 normalize_flags_for_device(running_machine *machine, UINT32 startf more general process_region_list. -------------------------------------------------*/ -void load_software_part_region(running_device *device, char *swlist, char *swname, rom_entry *start_region) +void load_software_part_region(device_t *device, char *swlist, char *swname, rom_entry *start_region) { astring locationtag(swlist, PATH_SEPARATOR, swname); rom_load_data *romdata = device->machine->romload_data; diff --git a/src/emu/romload.h b/src/emu/romload.h index 06deed4980e..0c66ff7add9 100644 --- a/src/emu/romload.h +++ b/src/emu/romload.h @@ -324,6 +324,6 @@ chd_file *get_disk_handle(running_machine *machine, const char *region); /* set a pointer to the CHD file associated with the given region */ void set_disk_handle(running_machine *machine, const char *region, mame_file *file, chd_file *chd); -void load_software_part_region(running_device *device, char *swlist, char *swname, rom_entry *start_region); +void load_software_part_region(device_t *device, char *swlist, char *swname, rom_entry *start_region); #endif /* __ROMLOAD_H__ */ diff --git a/src/emu/sound/2151intf.c b/src/emu/sound/2151intf.c index eec6ba33362..bf3e5d95686 100644 --- a/src/emu/sound/2151intf.c +++ b/src/emu/sound/2151intf.c @@ -24,7 +24,7 @@ struct _ym2151_state }; -INLINE ym2151_state *get_safe_token(running_device *device) +INLINE ym2151_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2151); diff --git a/src/emu/sound/2151intf.h b/src/emu/sound/2151intf.h index 214e6206935..b3b0c32e069 100644 --- a/src/emu/sound/2151intf.h +++ b/src/emu/sound/2151intf.h @@ -8,7 +8,7 @@ typedef struct _ym2151_interface ym2151_interface; struct _ym2151_interface { - void (*irqhandler)(running_device *device, int irq); + void (*irqhandler)(device_t *device, int irq); write8_device_func portwritehandler; }; diff --git a/src/emu/sound/2203intf.c b/src/emu/sound/2203intf.c index 030c88862e4..85aa3d37cc9 100644 --- a/src/emu/sound/2203intf.c +++ b/src/emu/sound/2203intf.c @@ -12,11 +12,11 @@ struct _ym2203_state void * chip; void * psg; const ym2203_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym2203_state *get_safe_token(running_device *device) +INLINE ym2203_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2203); diff --git a/src/emu/sound/2203intf.h b/src/emu/sound/2203intf.h index 9c3badb48a8..1d055cbb775 100644 --- a/src/emu/sound/2203intf.h +++ b/src/emu/sound/2203intf.h @@ -13,7 +13,7 @@ typedef struct _ym2203_interface ym2203_interface; struct _ym2203_interface { const ay8910_interface ay8910_intf; - void (*handler)(running_device *device, int irq); + void (*handler)(device_t *device, int irq); }; READ8_DEVICE_HANDLER( ym2203_r ); diff --git a/src/emu/sound/2413intf.c b/src/emu/sound/2413intf.c index 042308b6814..9118561bc3e 100644 --- a/src/emu/sound/2413intf.c +++ b/src/emu/sound/2413intf.c @@ -19,7 +19,7 @@ struct _ym2413_state }; -INLINE ym2413_state *get_safe_token(running_device *device) +INLINE ym2413_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2413); diff --git a/src/emu/sound/2608intf.c b/src/emu/sound/2608intf.c index d125cb3424d..42f410b2ada 100644 --- a/src/emu/sound/2608intf.c +++ b/src/emu/sound/2608intf.c @@ -25,11 +25,11 @@ struct _ym2608_state void * chip; void * psg; const ym2608_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym2608_state *get_safe_token(running_device *device) +INLINE ym2608_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2608); diff --git a/src/emu/sound/2608intf.h b/src/emu/sound/2608intf.h index 85a8ff5c4f2..8a8fb65dc26 100644 --- a/src/emu/sound/2608intf.h +++ b/src/emu/sound/2608intf.h @@ -14,7 +14,7 @@ typedef struct _ym2608_interface ym2608_interface; struct _ym2608_interface { const ay8910_interface ay8910_intf; - void ( *handler )( running_device *device, int irq ); /* IRQ handler for the YM2608 */ + void ( *handler )( device_t *device, int irq ); /* IRQ handler for the YM2608 */ }; READ8_DEVICE_HANDLER( ym2608_r ); diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c index 5ceb59337ca..6c2ab955c7d 100644 --- a/src/emu/sound/2610intf.c +++ b/src/emu/sound/2610intf.c @@ -25,11 +25,11 @@ struct _ym2610_state void * chip; void * psg; const ym2610_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym2610_state *get_safe_token(running_device *device) +INLINE ym2610_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2610 || device->type() == YM2610B); diff --git a/src/emu/sound/2610intf.h b/src/emu/sound/2610intf.h index e38a5f3a29a..d7a02856638 100644 --- a/src/emu/sound/2610intf.h +++ b/src/emu/sound/2610intf.h @@ -12,7 +12,7 @@ void ym2610_update_request(void *param); typedef struct _ym2610_interface ym2610_interface; struct _ym2610_interface { - void ( *handler )( running_device *device, int irq ); /* IRQ handler for the YM2610 */ + void ( *handler )( device_t *device, int irq ); /* IRQ handler for the YM2610 */ }; READ8_DEVICE_HANDLER( ym2610_r ); diff --git a/src/emu/sound/2612intf.c b/src/emu/sound/2612intf.c index 14840d4f5e1..e1a86406a5e 100644 --- a/src/emu/sound/2612intf.c +++ b/src/emu/sound/2612intf.c @@ -24,11 +24,11 @@ struct _ym2612_state emu_timer * timer[2]; void * chip; const ym2612_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym2612_state *get_safe_token(running_device *device) +INLINE ym2612_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM2612 || device->type() == YM3438); diff --git a/src/emu/sound/2612intf.h b/src/emu/sound/2612intf.h index 1dad5d815d7..61a9294e484 100644 --- a/src/emu/sound/2612intf.h +++ b/src/emu/sound/2612intf.h @@ -10,7 +10,7 @@ void ym2612_update_request(void *param); typedef struct _ym2612_interface ym2612_interface; struct _ym2612_interface { - void (*handler)(running_device *device, int irq); + void (*handler)(device_t *device, int irq); }; READ8_DEVICE_HANDLER( ym2612_r ); @@ -33,7 +33,7 @@ DECLARE_LEGACY_SOUND_DEVICE(YM2612, ym2612); typedef struct _ym3438_interface ym3438_interface; struct _ym3438_interface { - void (*handler)(running_device *device, int irq); + void (*handler)(device_t *device, int irq); }; diff --git a/src/emu/sound/262intf.c b/src/emu/sound/262intf.c index ed5c4ff1ebb..c6a85147363 100644 --- a/src/emu/sound/262intf.c +++ b/src/emu/sound/262intf.c @@ -18,11 +18,11 @@ struct _ymf262_state emu_timer * timer[2]; void * chip; const ymf262_interface *intf; - running_device *device; + device_t *device; }; -INLINE ymf262_state *get_safe_token(running_device *device) +INLINE ymf262_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YMF262); diff --git a/src/emu/sound/262intf.h b/src/emu/sound/262intf.h index d1c83d9f686..a458273ae47 100644 --- a/src/emu/sound/262intf.h +++ b/src/emu/sound/262intf.h @@ -9,7 +9,7 @@ typedef struct _ymf262_interface ymf262_interface; struct _ymf262_interface { - void (*handler)(running_device *device, int irq); + void (*handler)(device_t *device, int irq); }; diff --git a/src/emu/sound/3526intf.c b/src/emu/sound/3526intf.c index 98b4010c5d0..c9d58b41bf6 100644 --- a/src/emu/sound/3526intf.c +++ b/src/emu/sound/3526intf.c @@ -30,11 +30,11 @@ struct _ym3526_state emu_timer * timer[2]; void * chip; const ym3526_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym3526_state *get_safe_token(running_device *device) +INLINE ym3526_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM3526); diff --git a/src/emu/sound/3526intf.h b/src/emu/sound/3526intf.h index 4e6ff61b000..69df7a67731 100644 --- a/src/emu/sound/3526intf.h +++ b/src/emu/sound/3526intf.h @@ -8,7 +8,7 @@ typedef struct _ym3526_interface ym3526_interface; struct _ym3526_interface { - void (*handler)(running_device *device, int linestate); + void (*handler)(device_t *device, int linestate); }; READ8_DEVICE_HANDLER( ym3526_r ); diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c index 4bec6863df6..ebedd8a4c4f 100644 --- a/src/emu/sound/3812intf.c +++ b/src/emu/sound/3812intf.c @@ -30,11 +30,11 @@ struct _ym3812_state emu_timer * timer[2]; void * chip; const ym3812_interface *intf; - running_device *device; + device_t *device; }; -INLINE ym3812_state *get_safe_token(running_device *device) +INLINE ym3812_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YM3812); diff --git a/src/emu/sound/3812intf.h b/src/emu/sound/3812intf.h index b75a10c9765..0ef383e3416 100644 --- a/src/emu/sound/3812intf.h +++ b/src/emu/sound/3812intf.h @@ -8,7 +8,7 @@ typedef struct _ym3812_interface ym3812_interface; struct _ym3812_interface { - void (*handler)(running_device *device, int linestate); + void (*handler)(device_t *device, int linestate); }; READ8_DEVICE_HANDLER( ym3812_r ); diff --git a/src/emu/sound/8950intf.c b/src/emu/sound/8950intf.c index eaf14eb1fa4..e89d4989e07 100644 --- a/src/emu/sound/8950intf.c +++ b/src/emu/sound/8950intf.c @@ -30,11 +30,11 @@ struct _y8950_state emu_timer * timer[2]; void * chip; const y8950_interface *intf; - running_device *device; + device_t *device; }; -INLINE y8950_state *get_safe_token(running_device *device) +INLINE y8950_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == Y8950); diff --git a/src/emu/sound/8950intf.h b/src/emu/sound/8950intf.h index 4487ea8a6f6..eab9d8208d7 100644 --- a/src/emu/sound/8950intf.h +++ b/src/emu/sound/8950intf.h @@ -8,7 +8,7 @@ typedef struct _y8950_interface y8950_interface; struct _y8950_interface { - void (*handler)(running_device *device, int linestate); + void (*handler)(device_t *device, int linestate); read8_device_func keyboardread; write8_device_func keyboardwrite; diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c index 1b7edd3470e..967dcb3db38 100644 --- a/src/emu/sound/aica.c +++ b/src/emu/sound/aica.c @@ -168,7 +168,7 @@ struct _AICA unsigned char *AICARAM; UINT32 AICARAM_LENGTH, RAM_MASK, RAM_MASK16; char Master; - void (*IntARMCB)(running_device *device, int irq); + void (*IntARMCB)(device_t *device, int irq); sound_stream * stream; INT32 *buffertmpl, *buffertmpr; @@ -198,7 +198,7 @@ struct _AICA int ARTABLE[64], DRTABLE[64]; struct _AICADSP DSP; - running_device *device; + device_t *device; }; static const float SDLT[16]={-1000000.0,-42.0,-39.0,-36.0,-33.0,-30.0,-27.0,-24.0,-21.0,-18.0,-15.0,-12.0,-9.0,-6.0,-3.0,0.0}; @@ -210,7 +210,7 @@ static int length; static signed short *RBUFDST; //this points to where the sample will be stored in the RingBuf -INLINE aica_state *get_safe_token(running_device *device) +INLINE aica_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == AICA); @@ -493,7 +493,7 @@ static void AICA_StopSlot(struct _SLOT *slot,int keyoff) #define log_base_2(n) (log((float) n)/log((float) 2)) -static void AICA_Init(running_device *device, aica_state *AICA, const aica_interface *intf) +static void AICA_Init(device_t *device, aica_state *AICA, const aica_interface *intf) { int i; @@ -1263,7 +1263,7 @@ static DEVICE_STOP( aica ) { } -void aica_set_ram_base(running_device *device, void *base, int size) +void aica_set_ram_base(device_t *device, void *base, int size) { aica_state *AICA = get_safe_token(device); if (AICA) diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h index e1e575c7a1e..cacee5de1cd 100644 --- a/src/emu/sound/aica.h +++ b/src/emu/sound/aica.h @@ -13,10 +13,10 @@ struct _aica_interface { int master; int roffset; /* offset in the region */ - void (*irq_callback)(running_device *device, int state); /* irq callback */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ }; -void aica_set_ram_base(running_device *device, void *base, int size); +void aica_set_ram_base(device_t *device, void *base, int size); // AICA register access READ16_DEVICE_HANDLER( aica_r ); diff --git a/src/emu/sound/asc.c b/src/emu/sound/asc.c index d591fca2548..5ce20abd0f9 100644 --- a/src/emu/sound/asc.c +++ b/src/emu/sound/asc.c @@ -60,7 +60,7 @@ void asc_device_config::static_set_type(device_config *device, int type) //------------------------------------------------- -void asc_device_config::static_set_irqf(device_config *device, void (*irqf)(running_device *device, int state)) +void asc_device_config::static_set_irqf(device_config *device, void (*irqf)(device_t *device, int state)) { asc_device_config *asc = downcast(device); asc->m_irq_func = irqf; diff --git a/src/emu/sound/asc.h b/src/emu/sound/asc.h index 93c1a95cce5..8050093ff6c 100644 --- a/src/emu/sound/asc.h +++ b/src/emu/sound/asc.h @@ -76,12 +76,12 @@ public: // inline configuration helpers static void static_set_type(device_config *device, int type); - static void static_set_irqf(device_config *device, void (*irqf)(running_device *device, int state)); + static void static_set_irqf(device_config *device, void (*irqf)(device_t *device, int state)); protected: // inline data UINT8 m_type; - void (*m_irq_func)(running_device *device, int state); + void (*m_irq_func)(device_t *device, int state); }; @@ -134,7 +134,7 @@ protected: const asc_device_config &m_config; UINT8 m_chip_type; - void (*m_irq_cb)(running_device *device, int state); + void (*m_irq_cb)(device_t *device, int state); UINT8 m_fifo_a[0x400]; UINT8 m_fifo_b[0x400]; diff --git a/src/emu/sound/astrocde.c b/src/emu/sound/astrocde.c index 1535a7bce4a..7e5edab5bc5 100644 --- a/src/emu/sound/astrocde.c +++ b/src/emu/sound/astrocde.c @@ -70,7 +70,7 @@ struct _astrocade_state }; -INLINE astrocade_state *get_safe_token(running_device *device) +INLINE astrocade_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ASTROCADE); @@ -234,7 +234,7 @@ static DEVICE_RESET( astrocade ) * *************************************/ -static void astrocade_state_save_register(astrocade_state *chip, running_device *device) +static void astrocade_state_save_register(astrocade_state *chip, device_t *device) { state_save_register_device_item_array(device, 0, chip->reg); diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index 71ba0dc161f..53333096ede 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -164,7 +164,7 @@ struct _ay_ym_param typedef struct _ay8910_context ay8910_context; struct _ay8910_context { - running_device *device; + device_t *device; int streams; int ready; sound_stream *channel; @@ -197,7 +197,7 @@ struct _ay8910_context devcb_resolved_write8 portBwrite; }; -INLINE ay8910_context *get_safe_token(running_device *device) +INLINE ay8910_context *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == AY8910 || @@ -703,7 +703,7 @@ static void build_mixer_table(ay8910_context *psg) build_3D_table(psg->intf->res_load[0], psg->par, psg->par_env, normalize, 3, psg->zero_is_off, psg->vol3d_table); } -static void ay8910_statesave(ay8910_context *psg, running_device *device) +static void ay8910_statesave(ay8910_context *psg, device_t *device) { state_save_register_device_item(device, 0, psg->register_latch); state_save_register_device_item_array(device, 0, psg->regs); @@ -734,7 +734,7 @@ static void ay8910_statesave(ay8910_context *psg, running_device *device) * *************************************/ -void *ay8910_start_ym(void *infoptr, device_type chip_type, running_device *device, int clock, const ay8910_interface *intf) +void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf) { ay8910_context *info = (ay8910_context *)infoptr; @@ -826,7 +826,7 @@ void ay8910_reset_ym(void *chip) #endif } -void ay8910_set_volume(running_device *device,int channel,int volume) +void ay8910_set_volume(device_t *device,int channel,int volume) { ay8910_context *psg = get_safe_token(device); int ch; diff --git a/src/emu/sound/ay8910.h b/src/emu/sound/ay8910.h index b89bbe1df4b..3eff1808fe3 100644 --- a/src/emu/sound/ay8910.h +++ b/src/emu/sound/ay8910.h @@ -75,7 +75,7 @@ struct _ay8910_interface }; -void ay8910_set_volume(running_device *device,int channel,int volume); +void ay8910_set_volume(device_t *device,int channel,int volume); READ8_DEVICE_HANDLER( ay8910_r ); WRITE8_DEVICE_HANDLER( ay8910_address_w ); @@ -90,7 +90,7 @@ WRITE8_DEVICE_HANDLER( ay8910_address_data_w ); /*********** An interface for SSG of YM2203 ***********/ -void *ay8910_start_ym(void *infoptr, device_type chip_type, running_device *device, int clock, const ay8910_interface *intf); +void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf); void ay8910_stop_ym(void *chip); void ay8910_reset_ym(void *chip); diff --git a/src/emu/sound/beep.c b/src/emu/sound/beep.c index ffae558f3c8..e9e1b951d4c 100644 --- a/src/emu/sound/beep.c +++ b/src/emu/sound/beep.c @@ -29,7 +29,7 @@ struct _beep_state }; -INLINE beep_state *get_safe_token(running_device *device) +INLINE beep_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == BEEP); @@ -108,7 +108,7 @@ static DEVICE_START( beep ) * *************************************/ -void beep_set_state(running_device *device, int on) +void beep_set_state(device_t *device, int on) { beep_state *info = get_safe_token(device); @@ -132,7 +132,7 @@ void beep_set_state(running_device *device, int on) * *************************************/ -void beep_set_frequency(running_device *device,int frequency) +void beep_set_frequency(device_t *device,int frequency) { beep_state *info = get_safe_token(device); @@ -153,7 +153,7 @@ void beep_set_frequency(running_device *device,int frequency) * *************************************/ -void beep_set_volume(running_device *device, int volume) +void beep_set_volume(device_t *device, int volume) { beep_state *info = get_safe_token(device); diff --git a/src/emu/sound/beep.h b/src/emu/sound/beep.h index bc9f11a7b3b..69f8571e8b7 100644 --- a/src/emu/sound/beep.h +++ b/src/emu/sound/beep.h @@ -5,9 +5,9 @@ #include "devlegcy.h" -void beep_set_state(running_device *device, int on); -void beep_set_frequency(running_device *device, int frequency); -void beep_set_volume(running_device *device, int volume); +void beep_set_state(device_t *device, int on); +void beep_set_frequency(device_t *device, int frequency); +void beep_set_volume(device_t *device, int volume); DECLARE_LEGACY_SOUND_DEVICE(BEEP, beep); diff --git a/src/emu/sound/bsmt2000.c b/src/emu/sound/bsmt2000.c index 175a88272b8..618bb040759 100644 --- a/src/emu/sound/bsmt2000.c +++ b/src/emu/sound/bsmt2000.c @@ -96,7 +96,7 @@ static void set_regmap(bsmt2000_chip *chip, UINT8 posbase, UINT8 ratebase, UINT8 INLINE FUNCTIONS ***************************************************************************/ -INLINE bsmt2000_chip *get_safe_token(running_device *device) +INLINE bsmt2000_chip *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == BSMT2000); diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index 1a911102691..30a939d5b82 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -106,7 +106,7 @@ struct _c140_state VOICE voi[MAX_VOICE]; }; -INLINE c140_state *get_safe_token(running_device *device) +INLINE c140_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == C140); @@ -254,7 +254,7 @@ WRITE8_DEVICE_HANDLER( c140_w ) } } -void c140_set_base(running_device *device, void *base) +void c140_set_base(device_t *device, void *base) { c140_state *info = get_safe_token(device); info->pRom = base; diff --git a/src/emu/sound/c140.h b/src/emu/sound/c140.h index b09acf1b4c0..05f1dbdc12a 100644 --- a/src/emu/sound/c140.h +++ b/src/emu/sound/c140.h @@ -10,7 +10,7 @@ READ8_DEVICE_HANDLER( c140_r ); WRITE8_DEVICE_HANDLER( c140_w ); -void c140_set_base(running_device *device, void *base); +void c140_set_base(device_t *device, void *base); enum { diff --git a/src/emu/sound/c352.c b/src/emu/sound/c352.c index 6b713f67bd9..bbfd1a2d224 100644 --- a/src/emu/sound/c352.c +++ b/src/emu/sound/c352.c @@ -82,7 +82,7 @@ struct _c352_state unsigned int mseq_reg; }; -INLINE c352_state *get_safe_token(running_device *device) +INLINE c352_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == C352); @@ -488,7 +488,7 @@ static void c352_write_reg16(c352_state *info, unsigned long address, unsigned s } } -static void c352_init(c352_state *info, running_device *device) +static void c352_init(c352_state *info, device_t *device) { int i; double x_max = 32752.0; diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c index f530d42a2dd..f461e5b17f8 100644 --- a/src/emu/sound/c6280.c +++ b/src/emu/sound/c6280.c @@ -71,8 +71,8 @@ typedef struct { typedef struct { sound_stream *stream; - running_device *device; - running_device *cpudevice; + device_t *device; + device_t *cpudevice; UINT8 select; UINT8 balance; UINT8 lfo_frequency; @@ -83,7 +83,7 @@ typedef struct { UINT32 wave_freq_tab[4096]; } c6280_t; -INLINE c6280_t *get_safe_token(running_device *device) +INLINE c6280_t *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == C6280); @@ -95,7 +95,7 @@ INLINE c6280_t *get_safe_token(running_device *device) #include "cpu/h6280/h6280.h" -static void c6280_init(running_device *device, c6280_t *p, double clk, double rate) +static void c6280_init(device_t *device, c6280_t *p, double clk, double rate) { const c6280_interface *intf = (const c6280_interface *)device->baseconfig().static_config(); int i; diff --git a/src/emu/sound/cdda.c b/src/emu/sound/cdda.c index 1c25d7d17ab..946a7248c23 100644 --- a/src/emu/sound/cdda.c +++ b/src/emu/sound/cdda.c @@ -22,7 +22,7 @@ struct _cdda_info UINT32 audio_bptr; }; -INLINE cdda_info *get_safe_token(running_device *device) +INLINE cdda_info *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == CDDA); @@ -77,7 +77,7 @@ static DEVICE_START( cdda ) given CDDA stream -------------------------------------------------*/ -void cdda_set_cdrom(running_device *device, void *file) +void cdda_set_cdrom(device_t *device, void *file) { cdda_info *info = get_safe_token(device); info->disc = (cdrom_file *)file; @@ -89,7 +89,7 @@ void cdda_set_cdrom(running_device *device, void *file) that references the given CD-ROM file -------------------------------------------------*/ -running_device *cdda_from_cdrom(running_machine *machine, void *file) +device_t *cdda_from_cdrom(running_machine *machine, void *file) { device_sound_interface *sound = NULL; @@ -110,7 +110,7 @@ running_device *cdda_from_cdrom(running_machine *machine, void *file) Book audio track -------------------------------------------------*/ -void cdda_start_audio(running_device *device, UINT32 startlba, UINT32 numblocks) +void cdda_start_audio(device_t *device, UINT32 startlba, UINT32 numblocks) { cdda_info *info = get_safe_token(device); @@ -128,7 +128,7 @@ void cdda_start_audio(running_device *device, UINT32 startlba, UINT32 numblocks) audio track -------------------------------------------------*/ -void cdda_stop_audio(running_device *device) +void cdda_stop_audio(device_t *device) { cdda_info *info = get_safe_token(device); @@ -143,7 +143,7 @@ void cdda_stop_audio(running_device *device) a Red Book audio track -------------------------------------------------*/ -void cdda_pause_audio(running_device *device, int pause) +void cdda_pause_audio(device_t *device, int pause) { cdda_info *info = get_safe_token(device); @@ -157,7 +157,7 @@ void cdda_pause_audio(running_device *device, int pause) (physical sector) during Red Book playback -------------------------------------------------*/ -UINT32 cdda_get_audio_lba(running_device *device) +UINT32 cdda_get_audio_lba(device_t *device) { cdda_info *info = get_safe_token(device); @@ -171,7 +171,7 @@ UINT32 cdda_get_audio_lba(running_device *device) playback status -------------------------------------------------*/ -int cdda_audio_active(running_device *device) +int cdda_audio_active(device_t *device) { cdda_info *info = get_safe_token(device); @@ -185,7 +185,7 @@ int cdda_audio_active(running_device *device) playback is paused -------------------------------------------------*/ -int cdda_audio_paused(running_device *device) +int cdda_audio_paused(device_t *device) { cdda_info *info = get_safe_token(device); return info->audio_pause; @@ -197,7 +197,7 @@ int cdda_audio_paused(running_device *device) track reached it's natural end -------------------------------------------------*/ -int cdda_audio_ended(running_device *device) +int cdda_audio_ended(device_t *device) { cdda_info *info = get_safe_token(device); return info->audio_ended_normally; @@ -295,7 +295,7 @@ static void get_audio_data(cdda_info *info, stream_sample_t *bufL, stream_sample for both speakers, used for fade in/out effects -------------------------------------------------*/ -void cdda_set_volume(running_device *device,int volume) +void cdda_set_volume(device_t *device,int volume) { cdda_info *cdda = get_safe_token(device); @@ -308,7 +308,7 @@ void cdda_set_volume(running_device *device,int volume) for either speaker, used for fade in/out effects -------------------------------------------------*/ -void cdda_set_channel_volume(running_device *device, int channel, int volume) +void cdda_set_channel_volume(device_t *device, int channel, int volume) { cdda_info *cdda = get_safe_token(device); diff --git a/src/emu/sound/cdda.h b/src/emu/sound/cdda.h index 116555596ad..3db1830e9af 100644 --- a/src/emu/sound/cdda.h +++ b/src/emu/sound/cdda.h @@ -5,19 +5,19 @@ #include "devlegcy.h" -void cdda_set_cdrom(running_device *device, void *file); -running_device *cdda_from_cdrom(running_machine *machine, void *file); +void cdda_set_cdrom(device_t *device, void *file); +device_t *cdda_from_cdrom(running_machine *machine, void *file); -void cdda_start_audio(running_device *device, UINT32 startlba, UINT32 numblocks); -void cdda_stop_audio(running_device *device); -void cdda_pause_audio(running_device *device, int pause); -void cdda_set_volume(running_device *device, int volume); -void cdda_set_channel_volume(running_device *device, int channel, int volume); +void cdda_start_audio(device_t *device, UINT32 startlba, UINT32 numblocks); +void cdda_stop_audio(device_t *device); +void cdda_pause_audio(device_t *device, int pause); +void cdda_set_volume(device_t *device, int volume); +void cdda_set_channel_volume(device_t *device, int channel, int volume); -UINT32 cdda_get_audio_lba(running_device *device); -int cdda_audio_active(running_device *device); -int cdda_audio_paused(running_device *device); -int cdda_audio_ended(running_device *device); +UINT32 cdda_get_audio_lba(device_t *device); +int cdda_audio_active(device_t *device); +int cdda_audio_paused(device_t *device); +int cdda_audio_ended(device_t *device); DECLARE_LEGACY_SOUND_DEVICE(CDDA, cdda); diff --git a/src/emu/sound/cdp1863.c b/src/emu/sound/cdp1863.c index 553aac76375..2cce4fcbc93 100644 --- a/src/emu/sound/cdp1863.c +++ b/src/emu/sound/cdp1863.c @@ -48,13 +48,13 @@ struct _cdp1863_t INLINE FUNCTIONS ***************************************************************************/ -INLINE cdp1863_t *get_safe_token(running_device *device) +INLINE cdp1863_t *get_safe_token(device_t *device) { assert(device != NULL); return (cdp1863_t *)downcast(device)->token(); } -INLINE cdp1863_config *get_safe_config(running_device *device) +INLINE cdp1863_config *get_safe_config(device_t *device) { assert(device != NULL); return (cdp1863_config *)downcast(device->baseconfig()).inline_config(); @@ -90,7 +90,7 @@ WRITE_LINE_DEVICE_HANDLER( cdp1863_oe_w ) cdp1863_set_clk1 - set clock 1 frequency ------------------------------------------------*/ -void cdp1863_set_clk1(running_device *device, int frequency) +void cdp1863_set_clk1(device_t *device, int frequency) { cdp1863_t *cdp1863 = get_safe_token(device); @@ -101,7 +101,7 @@ void cdp1863_set_clk1(running_device *device, int frequency) cdp1863_set_clk2 - set clock 2 frequency ------------------------------------------------*/ -void cdp1863_set_clk2(running_device *device, int frequency) +void cdp1863_set_clk2(device_t *device, int frequency) { cdp1863_t *cdp1863 = get_safe_token(device); diff --git a/src/emu/sound/cdp1863.h b/src/emu/sound/cdp1863.h index db00349c809..bb7eeeaebec 100644 --- a/src/emu/sound/cdp1863.h +++ b/src/emu/sound/cdp1863.h @@ -57,7 +57,7 @@ WRITE8_DEVICE_HANDLER( cdp1863_str_w ); WRITE_LINE_DEVICE_HANDLER( cdp1863_oe_w ); /* clock setters */ -void cdp1863_set_clk1(running_device *device, int frequency) ATTR_NONNULL(1); -void cdp1863_set_clk2(running_device *device, int frequency) ATTR_NONNULL(1); +void cdp1863_set_clk1(device_t *device, int frequency) ATTR_NONNULL(1); +void cdp1863_set_clk2(device_t *device, int frequency) ATTR_NONNULL(1); #endif diff --git a/src/emu/sound/cdp1864.c b/src/emu/sound/cdp1864.c index 934eaa7aea0..23b2dcd8cac 100644 --- a/src/emu/sound/cdp1864.c +++ b/src/emu/sound/cdp1864.c @@ -73,14 +73,14 @@ struct _cdp1864_t emu_timer *efx_timer; /* EFx timer */ emu_timer *dma_timer; /* DMA timer */ - running_device *cpu; + device_t *cpu; }; /*************************************************************************** INLINE FUNCTIONS ***************************************************************************/ -INLINE cdp1864_t *get_safe_token(running_device *device) +INLINE cdp1864_t *get_safe_token(device_t *device) { assert(device != NULL); return (cdp1864_t *)downcast(device)->token(); @@ -96,7 +96,7 @@ INLINE cdp1864_t *get_safe_token(running_device *device) static TIMER_CALLBACK( cdp1864_int_tick ) { - running_device *device = (running_device *) ptr; + device_t *device = (device_t *) ptr; cdp1864_t *cdp1864 = get_safe_token(device); int scanline = cdp1864->screen->vpos(); @@ -127,7 +127,7 @@ static TIMER_CALLBACK( cdp1864_int_tick ) static TIMER_CALLBACK( cdp1864_efx_tick ) { - running_device *device = (running_device *) ptr; + device_t *device = (device_t *) ptr; cdp1864_t *cdp1864 = get_safe_token(device); int scanline = cdp1864->screen->vpos(); @@ -162,7 +162,7 @@ static TIMER_CALLBACK( cdp1864_efx_tick ) static TIMER_CALLBACK( cdp1864_dma_tick ) { - running_device *device = (running_device *) ptr; + device_t *device = (device_t *) ptr; cdp1864_t *cdp1864 = get_safe_token(device); int scanline = cdp1864->screen->vpos(); @@ -201,7 +201,7 @@ static TIMER_CALLBACK( cdp1864_dma_tick ) cdp1864_init_palette - initialize palette -------------------------------------------------*/ -static void cdp1864_init_palette(running_device *device, const cdp1864_interface *intf) +static void cdp1864_init_palette(device_t *device, const cdp1864_interface *intf) { int i; @@ -400,7 +400,7 @@ static STREAM_UPDATE( cdp1864_stream_update ) cdp1864_update - update screen -------------------------------------------------*/ -void cdp1864_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void cdp1864_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { cdp1864_t *cdp1864 = get_safe_token(device); diff --git a/src/emu/sound/cdp1864.h b/src/emu/sound/cdp1864.h index d85a4fd5541..bf582c2dc51 100644 --- a/src/emu/sound/cdp1864.h +++ b/src/emu/sound/cdp1864.h @@ -152,6 +152,6 @@ WRITE_LINE_DEVICE_HANDLER( cdp1864_aoe_w ) ATTR_NONNULL(1); WRITE8_DEVICE_HANDLER( cdp1864_dma_w ) ATTR_NONNULL(1); /* screen update */ -void cdp1864_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect) ATTR_NONNULL(1) ATTR_NONNULL(2) ATTR_NONNULL(3); +void cdp1864_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect) ATTR_NONNULL(1) ATTR_NONNULL(2) ATTR_NONNULL(3); #endif diff --git a/src/emu/sound/cdp1869.h b/src/emu/sound/cdp1869.h index 0248bcdace2..71e66061850 100644 --- a/src/emu/sound/cdp1869.h +++ b/src/emu/sound/cdp1869.h @@ -157,9 +157,9 @@ #define CDP1869_INTERFACE(_name) \ const cdp1869_interface (_name) = -#define CDP1869_CHAR_RAM_READ(name) UINT8 name(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd) -#define CDP1869_CHAR_RAM_WRITE(name) void name(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data) -#define CDP1869_PCB_READ(name) int name(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd) +#define CDP1869_CHAR_RAM_READ(name) UINT8 name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd) +#define CDP1869_CHAR_RAM_WRITE(name) void name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data) +#define CDP1869_PCB_READ(name) int name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd) #define CDP1869_PAL \ DEVCB_LINE_VCC @@ -173,9 +173,9 @@ // TYPE DEFINITIONS //************************************************************************** -typedef UINT8 (*cdp1869_char_ram_read_func)(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd); -typedef void (*cdp1869_char_ram_write_func)(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data); -typedef int (*cdp1869_pcb_read_func)(running_device *device, UINT16 pma, UINT8 cma, UINT8 pmd); +typedef UINT8 (*cdp1869_char_ram_read_func)(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd); +typedef void (*cdp1869_char_ram_write_func)(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data); +typedef int (*cdp1869_pcb_read_func)(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd); // ======================> cdp1869_interface diff --git a/src/emu/sound/cem3394.c b/src/emu/sound/cem3394.c index 1e1b4fbad54..cc4baa04f43 100644 --- a/src/emu/sound/cem3394.c +++ b/src/emu/sound/cem3394.c @@ -108,7 +108,7 @@ typedef struct _cem3394_state cem3394_state; struct _cem3394_state { sound_stream * stream; /* our stream */ - void (*external)(running_device *, int, short *);/* callback to generate external samples */ + void (*external)(device_t *, int, short *);/* callback to generate external samples */ double vco_zero_freq; /* frequency of VCO at 0.0V */ double filter_zero_freq; /* frequency of filter at 0.0V */ @@ -131,14 +131,14 @@ struct _cem3394_state double inv_sample_rate; int sample_rate; - running_device *device; + device_t *device; INT16 *mixer_buffer; INT16 *external_buffer; }; -INLINE cem3394_state *get_safe_token(running_device *device) +INLINE cem3394_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == CEM3394); @@ -415,7 +415,7 @@ INLINE UINT32 compute_db_volume(double voltage) } -void cem3394_set_voltage(running_device *device, int input, double voltage) +void cem3394_set_voltage(device_t *device, int input, double voltage) { cem3394_state *chip = get_safe_token(device); double temp; @@ -509,7 +509,7 @@ void cem3394_set_voltage(running_device *device, int input, double voltage) } -double cem3394_get_parameter(running_device *device, int input) +double cem3394_get_parameter(device_t *device, int input) { cem3394_state *chip = get_safe_token(device); double voltage = chip->values[input]; diff --git a/src/emu/sound/cem3394.h b/src/emu/sound/cem3394.h index b2012bb007f..450e80ef670 100644 --- a/src/emu/sound/cem3394.h +++ b/src/emu/sound/cem3394.h @@ -15,7 +15,7 @@ struct _cem3394_interface { double vco_zero_freq; /* frequency at 0V for VCO */ double filter_zero_freq; /* frequency at 0V for filter */ - void (*external)(running_device *, int, short *);/* external input source */ + void (*external)(device_t *, int, short *);/* external input source */ }; /* inputs */ @@ -32,7 +32,7 @@ enum }; /* set the voltage going to a particular parameter */ -void cem3394_set_voltage(running_device *device, int input, double voltage); +void cem3394_set_voltage(device_t *device, int input, double voltage); /* get the translated parameter associated with the given input as follows: CEM3394_VCO_FREQUENCY: frequency in Hz @@ -43,7 +43,7 @@ void cem3394_set_voltage(running_device *device, int input, double voltage); CEM3394_FILTER_RESONANCE: resonance, from 0.0 to 1.0 CEM3394_FILTER_FREQENCY: frequency, in Hz CEM3394_FINAL_GAIN: gain, in dB */ -double cem3394_get_parameter(running_device *device, int input); +double cem3394_get_parameter(device_t *device, int input); DECLARE_LEGACY_SOUND_DEVICE(CEM3394, cem3394); diff --git a/src/emu/sound/dac.c b/src/emu/sound/dac.c index e5d5a925edd..10590b9b1c9 100644 --- a/src/emu/sound/dac.c +++ b/src/emu/sound/dac.c @@ -17,7 +17,7 @@ struct _dac_state }; -INLINE dac_state *get_safe_token(running_device *device) +INLINE dac_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DAC); @@ -35,7 +35,7 @@ static STREAM_UPDATE( DAC_update ) } -void dac_data_w(running_device *device, UINT8 data) +void dac_data_w(device_t *device, UINT8 data) { dac_state *info = get_safe_token(device); INT16 out = info->UnsignedVolTable[data]; @@ -49,7 +49,7 @@ void dac_data_w(running_device *device, UINT8 data) } -void dac_signed_data_w(running_device *device, UINT8 data) +void dac_signed_data_w(device_t *device, UINT8 data) { dac_state *info = get_safe_token(device); INT16 out = info->SignedVolTable[data]; @@ -63,7 +63,7 @@ void dac_signed_data_w(running_device *device, UINT8 data) } -void dac_data_16_w(running_device *device, UINT16 data) +void dac_data_16_w(device_t *device, UINT16 data) { dac_state *info = get_safe_token(device); INT16 out = data >> 1; /* range 0..32767 */ @@ -77,7 +77,7 @@ void dac_data_16_w(running_device *device, UINT16 data) } -void dac_signed_data_16_w(running_device *device, UINT16 data) +void dac_signed_data_16_w(device_t *device, UINT16 data) { dac_state *info = get_safe_token(device); INT16 out = (INT32)data - (INT32)0x08000; /* range -32768..32767 */ diff --git a/src/emu/sound/dac.h b/src/emu/sound/dac.h index a7c1499e4e2..1429a2e5643 100644 --- a/src/emu/sound/dac.h +++ b/src/emu/sound/dac.h @@ -5,10 +5,10 @@ #include "devlegcy.h" -void dac_data_w(running_device *device, UINT8 data) ATTR_NONNULL(1); -void dac_signed_data_w(running_device *device, UINT8 data) ATTR_NONNULL(1); -void dac_data_16_w(running_device *device, UINT16 data) ATTR_NONNULL(1); -void dac_signed_data_16_w(running_device *device, UINT16 data) ATTR_NONNULL(1); +void dac_data_w(device_t *device, UINT8 data) ATTR_NONNULL(1); +void dac_signed_data_w(device_t *device, UINT8 data) ATTR_NONNULL(1); +void dac_data_16_w(device_t *device, UINT16 data) ATTR_NONNULL(1); +void dac_signed_data_16_w(device_t *device, UINT16 data) ATTR_NONNULL(1); WRITE8_DEVICE_HANDLER( dac_w ); WRITE8_DEVICE_HANDLER( dac_signed_w ); diff --git a/src/emu/sound/digitalk.c b/src/emu/sound/digitalk.c index ba917650150..9524a8541c3 100644 --- a/src/emu/sound/digitalk.c +++ b/src/emu/sound/digitalk.c @@ -240,7 +240,7 @@ complete set of waveforms is repeated R times. typedef struct { const UINT8 *rom; - running_device *device; + device_t *device; sound_stream *stream; // Port/lines state @@ -285,7 +285,7 @@ static const int pitch_vals[32] = { }; -INLINE digitalker *get_safe_token(running_device *device) +INLINE digitalker *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DIGITALKER); @@ -675,25 +675,25 @@ DEVICE_GET_INFO(digitalker) } } -void digitalker_0_cs_w(running_device *device, int line) +void digitalker_0_cs_w(device_t *device, int line) { digitalker *dg = get_safe_token(device); digitalker_cs_w(dg, line); } -void digitalker_0_cms_w(running_device *device, int line) +void digitalker_0_cms_w(device_t *device, int line) { digitalker *dg = get_safe_token(device); digitalker_cms_w(dg, line); } -void digitalker_0_wr_w(running_device *device, int line) +void digitalker_0_wr_w(device_t *device, int line) { digitalker *dg = get_safe_token(device); digitalker_wr_w(dg, line); } -int digitalker_0_intr_r(running_device *device) +int digitalker_0_intr_r(device_t *device) { digitalker *dg = get_safe_token(device); return digitalker_intr_r(dg); diff --git a/src/emu/sound/digitalk.h b/src/emu/sound/digitalk.h index 637635cf7f6..0a5f232d5e9 100644 --- a/src/emu/sound/digitalk.h +++ b/src/emu/sound/digitalk.h @@ -3,10 +3,10 @@ #include "devlegcy.h" -void digitalker_0_cs_w(running_device *device, int line); -void digitalker_0_cms_w(running_device *device, int line); -void digitalker_0_wr_w(running_device *device, int line); -int digitalker_0_intr_r(running_device *device); +void digitalker_0_cs_w(device_t *device, int line); +void digitalker_0_cms_w(device_t *device, int line); +void digitalker_0_wr_w(device_t *device, int line); +int digitalker_0_intr_r(device_t *device); WRITE8_DEVICE_HANDLER(digitalker_data_w); DECLARE_LEGACY_SOUND_DEVICE(DIGITALKER, digitalker); diff --git a/src/emu/sound/disc_inp.c b/src/emu/sound/disc_inp.c index 8c917c105ac..831be38f880 100644 --- a/src/emu/sound/disc_inp.c +++ b/src/emu/sound/disc_inp.c @@ -44,7 +44,7 @@ struct dss_input_context sound_stream *buffer_stream; }; -INLINE discrete_info *get_safe_token(running_device *device) +INLINE discrete_info *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DISCRETE); diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 7e2a282a16d..3d499f0880d 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -81,7 +81,7 @@ * *************************************/ -static void init_nodes(discrete_info *info, const linked_list_entry *block_list, running_device *device); +static void init_nodes(discrete_info *info, const linked_list_entry *block_list, device_t *device); static void find_input_nodes(const discrete_info *info); static node_description *discrete_find_node(const discrete_info *info, int node); static DEVICE_RESET( discrete ); @@ -808,7 +808,7 @@ static STREAM_UPDATE( discrete_stream_update ) *************************************/ -static void init_nodes(discrete_info *info, const linked_list_entry *block_list, running_device *device) +static void init_nodes(discrete_info *info, const linked_list_entry *block_list, device_t *device) { const linked_list_entry *entry; linked_list_entry *task_node_list = NULL; diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index f246d125829..f5a49b8d48a 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -3874,7 +3874,7 @@ struct _discrete_source_node struct _discrete_info { - running_device *device; + device_t *device; /* emulation info */ int sample_rate; diff --git a/src/emu/sound/dmadac.c b/src/emu/sound/dmadac.c index bed3e520f67..f98fc25a4e1 100644 --- a/src/emu/sound/dmadac.c +++ b/src/emu/sound/dmadac.c @@ -56,7 +56,7 @@ struct _dmadac_state }; -INLINE dmadac_state *get_safe_token(running_device *device) +INLINE dmadac_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DMADAC); diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c index 93c5fdcdcc2..38280e74edb 100644 --- a/src/emu/sound/es5503.c +++ b/src/emu/sound/es5503.c @@ -63,7 +63,7 @@ typedef struct sound_stream * stream; - void (*irq_callback)(running_device *, int); // IRQ callback + void (*irq_callback)(device_t *, int); // IRQ callback read8_device_func adc_read; // callback for the 5503's built-in analog to digital converter @@ -73,10 +73,10 @@ typedef struct UINT32 clock; UINT32 output_rate; - running_device *device; + device_t *device; } ES5503Chip; -INLINE ES5503Chip *get_safe_token(running_device *device) +INLINE ES5503Chip *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ES5503); @@ -495,7 +495,7 @@ WRITE8_DEVICE_HANDLER( es5503_w ) } } -void es5503_set_base(running_device *device, UINT8 *wavemem) +void es5503_set_base(device_t *device, UINT8 *wavemem) { ES5503Chip *chip = get_safe_token(device); diff --git a/src/emu/sound/es5503.h b/src/emu/sound/es5503.h index c68f9f6d79c..be658f2c0aa 100644 --- a/src/emu/sound/es5503.h +++ b/src/emu/sound/es5503.h @@ -8,14 +8,14 @@ typedef struct _es5503_interface es5503_interface; struct _es5503_interface { - void (*irq_callback)(running_device *device, int state); + void (*irq_callback)(device_t *device, int state); read8_device_func adc_read; UINT8 *wave_memory; }; READ8_DEVICE_HANDLER( es5503_r ); WRITE8_DEVICE_HANDLER( es5503_w ); -void es5503_set_base(running_device *device, UINT8 *wavemem); +void es5503_set_base(device_t *device, UINT8 *wavemem); DECLARE_LEGACY_SOUND_DEVICE(ES5503, es5503); diff --git a/src/emu/sound/es5506.c b/src/emu/sound/es5506.c index 72a851ac3c5..873034cf54a 100644 --- a/src/emu/sound/es5506.c +++ b/src/emu/sound/es5506.c @@ -177,7 +177,7 @@ struct _es5506_state UINT32 write_latch; /* currently accumulated data for write */ UINT32 read_latch; /* currently accumulated data for read */ UINT32 master_clock; /* master clock frequency */ - void (*irq_callback)(running_device *, int); /* IRQ callback */ + void (*irq_callback)(device_t *, int); /* IRQ callback */ UINT16 (*port_read)(void); /* input port read */ UINT8 current_page; /* current register page */ @@ -194,7 +194,7 @@ struct _es5506_state INT16 * ulaw_lookup; UINT16 * volume_lookup; - running_device *device; + device_t *device; #if MAKE_WAVS void * wavraw; /* raw waveform */ @@ -202,7 +202,7 @@ struct _es5506_state }; -INLINE es5506_state *get_safe_token(running_device *device) +INLINE es5506_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ES5505 || device->type() == ES5506); @@ -899,7 +899,7 @@ static STREAM_UPDATE( es5506_update ) ***********************************************************************************************/ -static void es5506_start_common(running_device *device, const void *config, device_type sndtype) +static void es5506_start_common(device_t *device, const void *config, device_type sndtype) { const es5506_interface *intf = (const es5506_interface *)config; es5506_state *chip = get_safe_token(device); @@ -1540,7 +1540,7 @@ READ8_DEVICE_HANDLER( es5506_r ) -void es5506_voice_bank_w(running_device *device, int voice, int bank) +void es5506_voice_bank_w(device_t *device, int voice, int bank) { es5506_state *chip = get_safe_token(device); chip->voice[voice].exbank=bank; @@ -2142,7 +2142,7 @@ READ16_DEVICE_HANDLER( es5505_r ) -void es5505_voice_bank_w(running_device *device, int voice, int bank) +void es5505_voice_bank_w(device_t *device, int voice, int bank) { es5506_state *chip = get_safe_token(device); #if RAINE_CHECK diff --git a/src/emu/sound/es5506.h b/src/emu/sound/es5506.h index 82f5d62ae2d..502ed1e8a7a 100644 --- a/src/emu/sound/es5506.h +++ b/src/emu/sound/es5506.h @@ -17,13 +17,13 @@ struct _es5505_interface { const char * region0; /* memory region where the sample ROM lives */ const char * region1; /* memory region where the sample ROM lives */ - void (*irq_callback)(running_device *device, int state); /* irq callback */ - UINT16 (*read_port)(running_device *device); /* input port read */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ + UINT16 (*read_port)(device_t *device); /* input port read */ }; READ16_DEVICE_HANDLER( es5505_r ); WRITE16_DEVICE_HANDLER( es5505_w ); -void es5505_voice_bank_w(running_device *device, int voice, int bank); +void es5505_voice_bank_w(device_t *device, int voice, int bank); DECLARE_LEGACY_SOUND_DEVICE(ES5505, es5505); @@ -35,13 +35,13 @@ struct _es5506_interface const char * region1; /* memory region where the sample ROM lives */ const char * region2; /* memory region where the sample ROM lives */ const char * region3; /* memory region where the sample ROM lives */ - void (*irq_callback)(running_device *device, int state); /* irq callback */ - UINT16 (*read_port)(running_device *device); /* input port read */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ + UINT16 (*read_port)(device_t *device); /* input port read */ }; READ8_DEVICE_HANDLER( es5506_r ); WRITE8_DEVICE_HANDLER( es5506_w ); -void es5506_voice_bank_w(running_device *device, int voice, int bank); +void es5506_voice_bank_w(device_t *device, int voice, int bank); DECLARE_LEGACY_SOUND_DEVICE(ES5506, es5506); diff --git a/src/emu/sound/es8712.c b/src/emu/sound/es8712.c index 6f5702c79f4..59ad2d5708b 100644 --- a/src/emu/sound/es8712.c +++ b/src/emu/sound/es8712.c @@ -48,7 +48,7 @@ static const int index_shift[8] = { -1, -1, -1, -1, 2, 4, 6, 8 }; static int diff_lookup[49*16]; -INLINE es8712_state *get_safe_token(running_device *device) +INLINE es8712_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ES8712); @@ -189,7 +189,7 @@ static STREAM_UPDATE( es8712_update ) ***********************************************************************************************/ -static void es8712_state_save_register(es8712_state *chip, running_device *device) +static void es8712_state_save_register(es8712_state *chip, device_t *device) { state_save_register_device_item(device, 0, chip->bank_offset); @@ -264,7 +264,7 @@ static DEVICE_RESET( es8712 ) *****************************************************************************/ -void es8712_set_bank_base(running_device *device, int base) +void es8712_set_bank_base(device_t *device, int base) { es8712_state *chip = get_safe_token(device); stream_update(chip->stream); @@ -278,7 +278,7 @@ void es8712_set_bank_base(running_device *device, int base) *****************************************************************************/ -void es8712_set_frequency(running_device *device, int frequency) +void es8712_set_frequency(device_t *device, int frequency) { es8712_state *chip = get_safe_token(device); @@ -295,7 +295,7 @@ void es8712_set_frequency(running_device *device, int frequency) ***********************************************************************************************/ -void es8712_play(running_device *device) +void es8712_play(device_t *device) { es8712_state *chip = get_safe_token(device); diff --git a/src/emu/sound/es8712.h b/src/emu/sound/es8712.h index 1c820914e6b..e21c33e801f 100644 --- a/src/emu/sound/es8712.h +++ b/src/emu/sound/es8712.h @@ -7,9 +7,9 @@ /* An interface for the ES8712 ADPCM chip */ -void es8712_play(running_device *device); -void es8712_set_bank_base(running_device *device, int base); -void es8712_set_frequency(running_device *device, int frequency); +void es8712_play(device_t *device); +void es8712_set_bank_base(device_t *device, int base); +void es8712_set_frequency(device_t *device, int frequency); WRITE8_DEVICE_HANDLER( es8712_w ); diff --git a/src/emu/sound/filter.c b/src/emu/sound/filter.c index ecb8e9e93be..2b5e186fce2 100644 --- a/src/emu/sound/filter.c +++ b/src/emu/sound/filter.c @@ -131,7 +131,7 @@ filter* filter_lp_fir_alloc(double freq, int order) { } -void filter2_setup(running_device *device, int type, double fc, double d, double gain, +void filter2_setup(device_t *device, int type, double fc, double d, double gain, filter2_context *filter2) { int sample_rate = device->machine->sample_rate; @@ -202,7 +202,7 @@ void filter2_step(filter2_context *filter2) /* Setup a filter2 structure based on an op-amp multipole bandpass circuit. */ -void filter_opamp_m_bandpass_setup(running_device *device, double r1, double r2, double r3, double c1, double c2, +void filter_opamp_m_bandpass_setup(device_t *device, double r1, double r2, double r3, double c1, double c2, filter2_context *filter2) { double r_in, fc, d, gain; diff --git a/src/emu/sound/filter.h b/src/emu/sound/filter.h index 92c5ac9dcc4..802add09701 100644 --- a/src/emu/sound/filter.h +++ b/src/emu/sound/filter.h @@ -81,7 +81,7 @@ struct _filter2_context * d - damp = 1/Q * gain - overall filter gain. Set to 1 if not needed. */ -void filter2_setup(running_device *device, int type, double fc, double d, double gain, +void filter2_setup(device_t *device, int type, double fc, double d, double gain, filter2_context *filter2); @@ -114,7 +114,7 @@ void filter2_step(filter2_context *filter2); * gnd vRef >---' |/ * */ -void filter_opamp_m_bandpass_setup(running_device *device, double r1, double r2, double r3, double c1, double c2, +void filter_opamp_m_bandpass_setup(device_t *device, double r1, double r2, double r3, double c1, double c2, filter2_context *filter2); #endif /* __FILTER_H__ */ diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c index 377dfe32194..9369631c946 100644 --- a/src/emu/sound/flt_rc.c +++ b/src/emu/sound/flt_rc.c @@ -5,14 +5,14 @@ typedef struct _filter_rc_state filter_rc_state; struct _filter_rc_state { - running_device *device; + device_t *device; sound_stream * stream; int k; int memory; int type; }; -INLINE filter_rc_state *get_safe_token(running_device *device) +INLINE filter_rc_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == FILTER_RC); @@ -102,7 +102,7 @@ static DEVICE_START( filter_rc ) } -void filter_rc_set_RC(running_device *device, int type, double R1, double R2, double R3, double C) +void filter_rc_set_RC(device_t *device, int type, double R1, double R2, double R3, double C) { filter_rc_state *info = get_safe_token(device); diff --git a/src/emu/sound/flt_rc.h b/src/emu/sound/flt_rc.h index 56132a5684b..8b109392ad0 100644 --- a/src/emu/sound/flt_rc.h +++ b/src/emu/sound/flt_rc.h @@ -57,7 +57,7 @@ struct _flt_rc_config extern const flt_rc_config flt_rc_ac_default; -void filter_rc_set_RC(running_device *device, int type, double R1, double R2, double R3, double C); +void filter_rc_set_RC(device_t *device, int type, double R1, double R2, double R3, double C); DECLARE_LEGACY_SOUND_DEVICE(FILTER_RC, filter_rc); diff --git a/src/emu/sound/flt_vol.c b/src/emu/sound/flt_vol.c index 4c772c839b4..9f183f9dff4 100644 --- a/src/emu/sound/flt_vol.c +++ b/src/emu/sound/flt_vol.c @@ -10,7 +10,7 @@ struct _filter_volume_state int gain; }; -INLINE filter_volume_state *get_safe_token(running_device *device) +INLINE filter_volume_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == FILTER_VOLUME); @@ -39,7 +39,7 @@ static DEVICE_START( filter_volume ) } -void flt_volume_set_volume(running_device *device, float volume) +void flt_volume_set_volume(device_t *device, float volume) { filter_volume_state *info = get_safe_token(device); info->gain = (int)(volume * 256); diff --git a/src/emu/sound/flt_vol.h b/src/emu/sound/flt_vol.h index ad00f26ff9b..921148e09b3 100644 --- a/src/emu/sound/flt_vol.h +++ b/src/emu/sound/flt_vol.h @@ -6,7 +6,7 @@ #include "devlegcy.h" -void flt_volume_set_volume(running_device *device, float volume); +void flt_volume_set_volume(device_t *device, float volume); DECLARE_LEGACY_SOUND_DEVICE(FILTER_VOLUME, filter_volume); diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index 3ddc9222271..7d767c15fd7 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -587,7 +587,7 @@ typedef struct typedef struct { - running_device *device; + device_t *device; void * param; /* this chip parameter */ int clock; /* master clock (Hz) */ int rate; /* sampling rate (Hz) */ @@ -1681,7 +1681,7 @@ INLINE void CSMKeyControll(UINT8 type, FM_CH *CH) #ifdef __STATE_H__ /* FM channel save , internal state only */ -static void FMsave_state_channel(running_device *device,FM_CH *CH,int num_ch) +static void FMsave_state_channel(device_t *device,FM_CH *CH,int num_ch) { int slot , ch; @@ -1701,7 +1701,7 @@ static void FMsave_state_channel(running_device *device,FM_CH *CH,int num_ch) } } -static void FMsave_state_st(running_device *device,FM_ST *ST) +static void FMsave_state_st(device_t *device,FM_ST *ST) { #if FM_BUSY_FLAG_SUPPORT state_save_register_device_item(device, 0, ST->busy_expiry_time.seconds ); @@ -2242,7 +2242,7 @@ void ym2203_postload(void *chip) } } -static void YM2203_save_state(YM2203 *F2203, running_device *device) +static void YM2203_save_state(YM2203 *F2203, device_t *device) { state_save_register_device_item_array(device, 0, F2203->REGS); FMsave_state_st(device,&F2203->OPN.ST); @@ -2259,7 +2259,7 @@ static void YM2203_save_state(YM2203 *F2203, running_device *device) 'clock' is the chip clock in Hz 'rate' is sampling rate */ -void * ym2203_init(void *param, running_device *device, int clock, int rate, +void * ym2203_init(void *param, device_t *device, int clock, int rate, FM_TIMERHANDLER timer_handler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg) { YM2203 *F2203; @@ -2653,7 +2653,7 @@ static void FM_ADPCMAWrite(YM2610 *F2610,int r,int v) #ifdef __STATE_H__ /* FM channel save , internal state only */ -static void FMsave_state_adpcma(running_device *device,ADPCM_CH *adpcm) +static void FMsave_state_adpcma(device_t *device,ADPCM_CH *adpcm) { int ch; @@ -3452,7 +3452,7 @@ void ym2608_postload(void *chip) } } -static void YM2608_save_state(YM2608 *F2608, running_device *device) +static void YM2608_save_state(YM2608 *F2608, device_t *device) { state_save_register_device_item_array(device, 0, F2608->REGS); FMsave_state_st(device,&F2608->OPN.ST); @@ -3481,7 +3481,7 @@ static void YM2608_deltat_status_reset(void *chip, UINT8 changebits) FM_STATUS_RESET(&(F2608->OPN.ST), changebits); } /* YM2608(OPNA) */ -void * ym2608_init(void *param, running_device *device, int clock, int rate, +void * ym2608_init(void *param, device_t *device, int clock, int rate, void *pcmrom,int pcmsize, FM_TIMERHANDLER timer_handler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg) { @@ -4132,7 +4132,7 @@ void ym2610_postload(void *chip) } } -static void YM2610_save_state(YM2610 *F2610, running_device *device) +static void YM2610_save_state(YM2610 *F2610, device_t *device) { state_save_register_device_item_array(device, 0, F2610->REGS); FMsave_state_st(device,&F2610->OPN.ST); @@ -4163,7 +4163,7 @@ static void YM2610_deltat_status_reset(void *chip, UINT8 changebits) F2610->adpcm_arrivedEndAddress &= (~changebits); } -void *ym2610_init(void *param, running_device *device, int clock, int rate, +void *ym2610_init(void *param, device_t *device, int clock, int rate, void *pcmroma,int pcmsizea,void *pcmromb,int pcmsizeb, FM_TIMERHANDLER timer_handler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg) @@ -4227,7 +4227,7 @@ void ym2610_reset_chip(void *chip) YM_DELTAT *DELTAT = &F2610->deltaT; astring name; - running_device* dev = F2610->OPN.ST.device; + device_t* dev = F2610->OPN.ST.device; /* setup PCM buffers again */ name.printf("%s",dev->tag()); diff --git a/src/emu/sound/fm.h b/src/emu/sound/fm.h index 312717a839f..a49f470f2da 100644 --- a/src/emu/sound/fm.h +++ b/src/emu/sound/fm.h @@ -122,7 +122,7 @@ typedef void (*FM_IRQHANDLER)(void *param,int irq); ** 'IRQHandler' IRQ callback handler when changed IRQ level ** return 0 = success */ -void * ym2203_init(void *param, running_device *device, int baseclock, int rate, +void * ym2203_init(void *param, device_t *device, int baseclock, int rate, FM_TIMERHANDLER TimerHandler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg); /* @@ -165,7 +165,7 @@ void ym2203_postload(void *chip); #if BUILD_YM2608 /* -------------------- YM2608(OPNA) Interface -------------------- */ -void * ym2608_init(void *param, running_device *device, int baseclock, int rate, +void * ym2608_init(void *param, device_t *device, int baseclock, int rate, void *pcmroma,int pcmsizea, FM_TIMERHANDLER TimerHandler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg); void ym2608_shutdown(void *chip); @@ -180,7 +180,7 @@ void ym2608_postload(void *chip); #if (BUILD_YM2610||BUILD_YM2610B) /* -------------------- YM2610(OPNB) Interface -------------------- */ -void * ym2610_init(void *param, running_device *device, int baseclock, int rate, +void * ym2610_init(void *param, device_t *device, int baseclock, int rate, void *pcmroma,int pcmasize,void *pcmromb,int pcmbsize, FM_TIMERHANDLER TimerHandler,FM_IRQHANDLER IRQHandler, const ssg_callbacks *ssg); void ym2610_shutdown(void *chip); @@ -198,7 +198,7 @@ void ym2610_postload(void *chip); #endif /* (BUILD_YM2610||BUILD_YM2610B) */ #if (BUILD_YM2612||BUILD_YM3438) -void * ym2612_init(void *param, running_device *device, int baseclock, int rate, +void * ym2612_init(void *param, device_t *device, int baseclock, int rate, FM_TIMERHANDLER TimerHandler,FM_IRQHANDLER IRQHandler); void ym2612_shutdown(void *chip); void ym2612_reset_chip(void *chip); diff --git a/src/emu/sound/fm2612.c b/src/emu/sound/fm2612.c index 90af7f4c58a..a9bea1221bf 100644 --- a/src/emu/sound/fm2612.c +++ b/src/emu/sound/fm2612.c @@ -599,7 +599,7 @@ typedef struct typedef struct { - running_device *device; + device_t *device; void * param; /* this chip parameter */ double freqbase; /* frequency base */ int timer_prescaler; /* timer prescaler */ @@ -1684,7 +1684,7 @@ INLINE void CSMKeyControll(FM_OPN *OPN, FM_CH *CH) #ifdef __STATE_H__ /* FM channel save , internal state only */ -static void FMsave_state_channel(running_device *device,FM_CH *CH,int num_ch) +static void FMsave_state_channel(device_t *device,FM_CH *CH,int num_ch) { int slot , ch; @@ -1704,7 +1704,7 @@ static void FMsave_state_channel(running_device *device,FM_CH *CH,int num_ch) } } -static void FMsave_state_st(running_device *device,FM_ST *ST) +static void FMsave_state_st(device_t *device,FM_ST *ST) { #if FM_BUSY_FLAG_SUPPORT state_save_register_device_item(device, 0, ST->busy_expiry_time.seconds ); @@ -2349,7 +2349,7 @@ void ym2612_postload(void *chip) } } -static void YM2612_save_state(YM2612 *F2612, running_device *device) +static void YM2612_save_state(YM2612 *F2612, device_t *device) { state_save_register_device_item_array(device, 0, F2612->REGS); FMsave_state_st(device,&F2612->OPN.ST); @@ -2364,7 +2364,7 @@ static void YM2612_save_state(YM2612 *F2612, running_device *device) #endif /* _STATE_H */ /* initialize YM2612 emulator(s) */ -void * ym2612_init(void *param, running_device *device, int clock, int rate, +void * ym2612_init(void *param, device_t *device, int clock, int rate, FM_TIMERHANDLER timer_handler,FM_IRQHANDLER IRQHandler) { YM2612 *F2612; diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c index 8ab8e89287c..b5aa064534f 100644 --- a/src/emu/sound/fmopl.c +++ b/src/emu/sound/fmopl.c @@ -318,7 +318,7 @@ typedef struct UINT32 rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ attotime TimerBase; /* Timer base time (==sampling time)*/ - running_device *device; + device_t *device; signed int phase_modulation; /* phase modulation input (SLOT 2) */ signed int output[1]; @@ -1726,7 +1726,7 @@ static TIMER_CALLBACK( cymfile_callback ) } /* lock/unlock for common table */ -static int OPL_LockTable(running_device *device) +static int OPL_LockTable(device_t *device) { num_lock++; if(num_lock>1) return 0; @@ -1870,7 +1870,7 @@ static STATE_POSTLOAD( OPL_postload ) } -static void OPLsave_state_channel(running_device *device, OPL_CH *CH) +static void OPLsave_state_channel(device_t *device, OPL_CH *CH) { int slot, ch; @@ -1914,7 +1914,7 @@ static void OPLsave_state_channel(running_device *device, OPL_CH *CH) /* Register savestate for a virtual YM3812/YM3526Y8950 */ -static void OPL_save_state(FM_OPL *OPL, running_device *device) +static void OPL_save_state(FM_OPL *OPL, device_t *device) { OPLsave_state_channel(device, OPL->P_CH); @@ -1964,7 +1964,7 @@ static void OPL_save_state(FM_OPL *OPL, running_device *device) /* Create one of virtual YM3812/YM3526/Y8950 */ /* 'clock' is chip clock in Hz */ /* 'rate' is sampling rate */ -static FM_OPL *OPLCreate(running_device *device, UINT32 clock, UINT32 rate, int type) +static FM_OPL *OPLCreate(device_t *device, UINT32 clock, UINT32 rate, int type) { char *ptr; FM_OPL *OPL; @@ -2152,7 +2152,7 @@ static int OPLTimerOver(FM_OPL *OPL,int c) #if (BUILD_YM3812) -void * ym3812_init(running_device *device, UINT32 clock, UINT32 rate) +void * ym3812_init(device_t *device, UINT32 clock, UINT32 rate) { /* emulator create */ FM_OPL *YM3812 = OPLCreate(device,clock,rate,OPL_TYPE_YM3812); @@ -2280,7 +2280,7 @@ void ym3812_update_one(void *chip, OPLSAMPLE *buffer, int length) #if (BUILD_YM3526) -void *ym3526_init(running_device *device, UINT32 clock, UINT32 rate) +void *ym3526_init(device_t *device, UINT32 clock, UINT32 rate) { /* emulator create */ FM_OPL *YM3526 = OPLCreate(device,clock,rate,OPL_TYPE_YM3526); @@ -2419,7 +2419,7 @@ static void Y8950_deltat_status_reset(void *chip, UINT8 changebits) OPL_STATUS_RESET(Y8950, changebits); } -void *y8950_init(running_device *device, UINT32 clock, UINT32 rate) +void *y8950_init(device_t *device, UINT32 clock, UINT32 rate) { /* emulator create */ FM_OPL *Y8950 = OPLCreate(device,clock,rate,OPL_TYPE_Y8950); diff --git a/src/emu/sound/fmopl.h b/src/emu/sound/fmopl.h index 40be25ec77c..de0cfa82ea9 100644 --- a/src/emu/sound/fmopl.h +++ b/src/emu/sound/fmopl.h @@ -41,7 +41,7 @@ typedef unsigned char (*OPL_PORTHANDLER_R)(void *param); #if BUILD_YM3812 -void *ym3812_init(running_device *device, UINT32 clock, UINT32 rate); +void *ym3812_init(device_t *device, UINT32 clock, UINT32 rate); void ym3812_shutdown(void *chip); void ym3812_reset_chip(void *chip); int ym3812_write(void *chip, int a, int v); @@ -65,7 +65,7 @@ void ym3812_set_update_handler(void *chip, OPL_UPDATEHANDLER UpdateHandler, void ** 'clock' is the chip clock in Hz ** 'rate' is sampling rate */ -void *ym3526_init(running_device *device, UINT32 clock, UINT32 rate); +void *ym3526_init(device_t *device, UINT32 clock, UINT32 rate); /* shutdown the YM3526 emulators*/ void ym3526_shutdown(void *chip); void ym3526_reset_chip(void *chip); @@ -95,7 +95,7 @@ void y8950_set_port_handler(void *chip, OPL_PORTHANDLER_W PortHandler_w, OPL_POR void y8950_set_keyboard_handler(void *chip, OPL_PORTHANDLER_W KeyboardHandler_w, OPL_PORTHANDLER_R KeyboardHandler_r, void *param); void y8950_set_delta_t_memory(void *chip, void * deltat_mem_ptr, int deltat_mem_size ); -void * y8950_init(running_device *device, UINT32 clock, UINT32 rate); +void * y8950_init(device_t *device, UINT32 clock, UINT32 rate); void y8950_shutdown(void *chip); void y8950_reset_chip(void *chip); int y8950_write(void *chip, int a, int v); diff --git a/src/emu/sound/gaelco.c b/src/emu/sound/gaelco.c index 10f2d8db478..a0bc5ead80b 100644 --- a/src/emu/sound/gaelco.c +++ b/src/emu/sound/gaelco.c @@ -75,7 +75,7 @@ struct _gaelco_sound_state static wav_file * wavraw; /* raw waveform */ -INLINE gaelco_sound_state *get_safe_token(running_device *device) +INLINE gaelco_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == GAELCO_GAE1 || device->type() == GAELCO_CG1V); diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c index 0700181ffb3..2de7532f09d 100644 --- a/src/emu/sound/hc55516.c +++ b/src/emu/sound/hc55516.c @@ -52,7 +52,7 @@ static STREAM_UPDATE( hc55516_update ); -INLINE hc55516_state *get_safe_token(running_device *device) +INLINE hc55516_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == HC55516 || @@ -62,7 +62,7 @@ INLINE hc55516_state *get_safe_token(running_device *device) } -static void start_common(running_device *device, UINT8 _shiftreg_mask, int _active_clock_hi) +static void start_common(device_t *device, UINT8 _shiftreg_mask, int _active_clock_hi) { hc55516_state *chip = get_safe_token(device); @@ -243,7 +243,7 @@ static STREAM_UPDATE( hc55516_update ) } -void hc55516_clock_w(running_device *device, int state) +void hc55516_clock_w(device_t *device, int state) { hc55516_state *chip = get_safe_token(device); UINT8 clock_state = state ? TRUE : FALSE; @@ -268,7 +268,7 @@ void hc55516_clock_w(running_device *device, int state) } -void hc55516_digit_w(running_device *device, int digit) +void hc55516_digit_w(device_t *device, int digit) { hc55516_state *chip = get_safe_token(device); @@ -282,7 +282,7 @@ void hc55516_digit_w(running_device *device, int digit) } -int hc55516_clock_state_r(running_device *device) +int hc55516_clock_state_r(device_t *device) { hc55516_state *chip = get_safe_token(device); diff --git a/src/emu/sound/hc55516.h b/src/emu/sound/hc55516.h index 7673ef14550..402d485342a 100644 --- a/src/emu/sound/hc55516.h +++ b/src/emu/sound/hc55516.h @@ -7,13 +7,13 @@ /* sets the digit (0 or 1) */ -void hc55516_digit_w(running_device *device, int digit); +void hc55516_digit_w(device_t *device, int digit); /* sets the clock state (0 or 1, clocked on the rising edge) */ -void hc55516_clock_w(running_device *device, int state); +void hc55516_clock_w(device_t *device, int state); /* returns whether the clock is currently LO or HI */ -int hc55516_clock_state_r(running_device *device); +int hc55516_clock_state_r(device_t *device); DECLARE_LEGACY_SOUND_DEVICE(HC55516, hc55516); DECLARE_LEGACY_SOUND_DEVICE(MC3417, mc3417); diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c index dd5a9b61345..8ef525da8b4 100644 --- a/src/emu/sound/ics2115.c +++ b/src/emu/sound/ics2115.c @@ -14,7 +14,7 @@ const device_type ICS2115 = ics2115_device_config::static_alloc_device_config; -void ics2115_device_config::static_set_irqf(device_config *device, void (*irqf)(running_device *device, int state)) +void ics2115_device_config::static_set_irqf(device_config *device, void (*irqf)(device_t *device, int state)) { ics2115_device_config *ics2115 = downcast(device); ics2115->m_irq_func = irqf; diff --git a/src/emu/sound/ics2115.h b/src/emu/sound/ics2115.h index adac871d67a..41f6683270b 100644 --- a/src/emu/sound/ics2115.h +++ b/src/emu/sound/ics2115.h @@ -103,11 +103,11 @@ public: virtual device_t *alloc_device(running_machine &machine) const; // inline configuration helpers - static void static_set_irqf(device_config *device, void (*irqf)(running_device *device, int state)); + static void static_set_irqf(device_config *device, void (*irqf)(device_t *device, int state)); protected: // inline data - void (*m_irq_func)(running_device *device, int state); + void (*m_irq_func)(device_t *device, int state); }; // ======================> ics2115_device @@ -144,7 +144,7 @@ protected: // internal state const ics2115_device_config &m_config; - void (*m_irq_cb)(running_device *device, int state); + void (*m_irq_cb)(device_t *device, int state); UINT8 *m_rom; INT16 m_ulaw[256]; diff --git a/src/emu/sound/iremga20.c b/src/emu/sound/iremga20.c index 3d123fe2441..a9b3c01b75e 100644 --- a/src/emu/sound/iremga20.c +++ b/src/emu/sound/iremga20.c @@ -57,7 +57,7 @@ struct _ga20_state }; -INLINE ga20_state *get_safe_token(running_device *device) +INLINE ga20_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == IREMGA20); diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index 855ce28b399..d6b41054f00 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -61,7 +61,7 @@ struct _k005289_state int k005289_A_latch,k005289_B_latch; }; -INLINE k005289_state *get_safe_token(running_device *device) +INLINE k005289_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K005289); diff --git a/src/emu/sound/k007232.c b/src/emu/sound/k007232.c index 39d8ca08f9a..491a712a27d 100644 --- a/src/emu/sound/k007232.c +++ b/src/emu/sound/k007232.c @@ -55,7 +55,7 @@ typedef struct kdacApcm #define BASE_SHIFT (12) -INLINE KDAC_A_PCM *get_safe_token(running_device *device) +INLINE KDAC_A_PCM *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K007232); @@ -428,14 +428,14 @@ READ8_DEVICE_HANDLER( k007232_r ) /*****************************************************************************/ -void k007232_set_volume(running_device *device,int channel,int volumeA,int volumeB) +void k007232_set_volume(device_t *device,int channel,int volumeA,int volumeB) { KDAC_A_PCM *info = get_safe_token(device); info->vol[channel][0] = volumeA; info->vol[channel][1] = volumeB; } -void k007232_set_bank( running_device *device, int chABank, int chBBank ) +void k007232_set_bank( device_t *device, int chABank, int chBBank ) { KDAC_A_PCM *info = get_safe_token(device); info->bank[0] = chABank<<17; diff --git a/src/emu/sound/k007232.h b/src/emu/sound/k007232.h index 8702104dbeb..548fd866bd7 100644 --- a/src/emu/sound/k007232.h +++ b/src/emu/sound/k007232.h @@ -12,13 +12,13 @@ typedef struct _k007232_interface k007232_interface; struct _k007232_interface { - void (*portwritehandler)(running_device *, int); + void (*portwritehandler)(device_t *, int); }; WRITE8_DEVICE_HANDLER( k007232_w ); READ8_DEVICE_HANDLER( k007232_r ); -void k007232_set_bank( running_device *device, int chABank, int chBBank ); +void k007232_set_bank( device_t *device, int chABank, int chBBank ); /* The 007232 has two channels and produces two outputs. The volume control @@ -28,7 +28,7 @@ void k007232_set_bank( running_device *device, int chABank, int chBBank ); then volumeB will be 0 for channel 0, and volumeA will be 0 for channel 1. Volume is in the range 0-255. */ -void k007232_set_volume(running_device *device,int channel,int volumeA,int volumeB); +void k007232_set_volume(device_t *device,int channel,int volumeA,int volumeB); DECLARE_LEGACY_SOUND_DEVICE(K007232, k007232); diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index 875a77e91d9..9c2e85c8a6f 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -55,7 +55,7 @@ struct _k051649_state int f[10]; }; -INLINE k051649_state *get_safe_token(running_device *device) +INLINE k051649_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K051649); diff --git a/src/emu/sound/k053260.c b/src/emu/sound/k053260.c index 24c7e4ee873..b65fede549a 100644 --- a/src/emu/sound/k053260.c +++ b/src/emu/sound/k053260.c @@ -41,10 +41,10 @@ struct _k053260_state UINT32 *delta_table; k053260_channel channels[4]; const k053260_interface *intf; - running_device *device; + device_t *device; }; -INLINE k053260_state *get_safe_token(running_device *device) +INLINE k053260_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K053260); diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c index 4086e7d99b3..91839266115 100644 --- a/src/emu/sound/k054539.c +++ b/src/emu/sound/k054539.c @@ -68,7 +68,7 @@ struct _k054539_channel { typedef struct _k054539_state k054539_state; struct _k054539_state { const k054539_interface *intf; - running_device *device; + device_t *device; double voltab[256]; double pantab[0xf]; @@ -91,7 +91,7 @@ struct _k054539_state { k054539_channel channels[8]; }; -INLINE k054539_state *get_safe_token(running_device *device) +INLINE k054539_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == K054539); @@ -100,13 +100,13 @@ INLINE k054539_state *get_safe_token(running_device *device) //* -void k054539_init_flags(running_device *device, int flags) +void k054539_init_flags(device_t *device, int flags) { k054539_state *info = get_safe_token(device); info->k054539_flags = flags; } -void k054539_set_gain(running_device *device, int channel, double gain) +void k054539_set_gain(device_t *device, int channel, double gain) { k054539_state *info = get_safe_token(device); if (gain >= 0) info->k054539_gain[channel] = gain; @@ -443,7 +443,7 @@ static TIMER_CALLBACK( k054539_irq ) info->intf->irq(info->device); } -static void k054539_init_chip(running_device *device, k054539_state *info) +static void k054539_init_chip(device_t *device, k054539_state *info) { int i; diff --git a/src/emu/sound/k054539.h b/src/emu/sound/k054539.h index 9062b395ee3..f4381148508 100644 --- a/src/emu/sound/k054539.h +++ b/src/emu/sound/k054539.h @@ -15,8 +15,8 @@ typedef struct _k054539_interface k054539_interface; struct _k054539_interface { const char *rgnoverride; - void (*apan)(running_device *, double, double); /* Callback for analog output mixing levels (0..1 for each channel) */ - void (*irq)(running_device *); + void (*apan)(device_t *, double, double); /* Callback for analog output mixing levels (0..1 for each channel) */ + void (*irq)(device_t *); }; @@ -29,7 +29,7 @@ READ8_DEVICE_HANDLER( k054539_r ); #define K054539_DISABLE_REVERB 2 #define K054539_UPDATE_AT_KEYON 4 -void k054539_init_flags(running_device *device, int flags); +void k054539_init_flags(device_t *device, int flags); /* Note that the eight PCM channels of a K054539 do not have seperate @@ -43,7 +43,7 @@ void k054539_init_flags(running_device *device, int flags); channel : 0 - 7 gain : 0.0=silent, 1.0=no gain, 2.0=twice as loud, etc. */ -void k054539_set_gain(running_device *device, int channel, double gain); +void k054539_set_gain(device_t *device, int channel, double gain); DECLARE_LEGACY_SOUND_DEVICE(K054539, k054539); diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c index 1283830673b..9f4067d9a38 100644 --- a/src/emu/sound/k056800.c +++ b/src/emu/sound/k056800.c @@ -24,7 +24,7 @@ struct _k056800_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k056800_state *k056800_get_safe_token( running_device *device ) +INLINE k056800_state *k056800_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K056800); @@ -32,7 +32,7 @@ INLINE k056800_state *k056800_get_safe_token( running_device *device ) return (k056800_state *)downcast(device)->token(); } -INLINE const k056800_interface *k056800_get_interface( running_device *device ) +INLINE const k056800_interface *k056800_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K056800)); @@ -44,7 +44,7 @@ INLINE const k056800_interface *k056800_get_interface( running_device *device ) *****************************************************************************/ -static UINT8 k056800_host_reg_r( running_device *device, int reg ) +static UINT8 k056800_host_reg_r( device_t *device, int reg ) { k056800_state *k056800 = k056800_get_safe_token(device); UINT8 value = k056800->host_reg[reg]; @@ -54,7 +54,7 @@ static UINT8 k056800_host_reg_r( running_device *device, int reg ) return value; } -static void k056800_host_reg_w( running_device *device, int reg, UINT8 data ) +static void k056800_host_reg_w( device_t *device, int reg, UINT8 data ) { k056800_state *k056800 = k056800_get_safe_token(device); @@ -64,13 +64,13 @@ static void k056800_host_reg_w( running_device *device, int reg, UINT8 data ) k056800->irq_cb(device->machine, 1); } -static UINT8 k056800_sound_reg_r( running_device *device, int reg ) +static UINT8 k056800_sound_reg_r( device_t *device, int reg ) { k056800_state *k056800 = k056800_get_safe_token(device); return k056800->sound_reg[reg]; } -static void k056800_sound_reg_w( running_device *device, int reg, UINT8 data ) +static void k056800_sound_reg_w( device_t *device, int reg, UINT8 data ) { k056800_state *k056800 = k056800_get_safe_token(device); diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c index 67c742fb269..f4246227077 100644 --- a/src/emu/sound/mos6560.c +++ b/src/emu/sound/mos6560.c @@ -120,7 +120,7 @@ struct _mos6560_state INLINE FUNCTIONS *****************************************************************************/ -INLINE mos6560_state *get_safe_token( running_device *device ) +INLINE mos6560_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == MOS656X); @@ -128,7 +128,7 @@ INLINE mos6560_state *get_safe_token( running_device *device ) return (mos6560_state *)downcast(device)->token(); } -INLINE const mos6560_interface *get_interface( running_device *device ) +INLINE const mos6560_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == MOS656X)); @@ -202,13 +202,13 @@ INLINE const mos6560_interface *get_interface( running_device *device ) IMPLEMENTATION *****************************************************************************/ -static void mos6560_soundport_w( running_device *device, int offset, int data ); +static void mos6560_soundport_w( device_t *device, int offset, int data ); /*------------------------------------------------- mos6560_draw_character -------------------------------------------------*/ -static void mos6560_draw_character( running_device *device, int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color ) +static void mos6560_draw_character( device_t *device, int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color ) { mos6560_state *mos6560 = get_safe_token(device); int y, code; @@ -232,7 +232,7 @@ static void mos6560_draw_character( running_device *device, int ybegin, int yend mos6560_draw_character_multi -------------------------------------------------*/ -static void mos6560_draw_character_multi( running_device *device, int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color ) +static void mos6560_draw_character_multi( device_t *device, int ybegin, int yend, int ch, int yoff, int xoff, UINT16 *color ) { mos6560_state *mos6560 = get_safe_token(device); int y, code; @@ -256,7 +256,7 @@ static void mos6560_draw_character_multi( running_device *device, int ybegin, in mos6560_drawlines - draw a certain numer of lines -------------------------------------------------*/ -static void mos6560_drawlines( running_device *device, int first, int last ) +static void mos6560_drawlines( device_t *device, int first, int last ) { mos6560_state *mos6560 = get_safe_token(device); int line, vline; @@ -491,7 +491,7 @@ READ8_DEVICE_HANDLER( mos6560_port_r ) mos6560_raster_interrupt_gen -------------------------------------------------*/ -void mos6560_raster_interrupt_gen( running_device *device ) +void mos6560_raster_interrupt_gen( device_t *device ) { mos6560_state *mos6560 = get_safe_token(device); @@ -510,7 +510,7 @@ void mos6560_raster_interrupt_gen( running_device *device ) main screen bitmap -------------------------------------------------*/ -UINT32 mos6560_video_update( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { mos6560_state *mos6560 = get_safe_token(device); @@ -575,7 +575,7 @@ UINT32 mos6560_video_update( running_device *device, bitmap_t *bitmap, const rec mos6560_soundport_w - write to regs -------------------------------------------------*/ -static void mos6560_soundport_w( running_device *device, int offset, int data ) +static void mos6560_soundport_w( device_t *device, int offset, int data ) { mos6560_state *mos6560 = get_safe_token(device); int old = mos6560->reg[offset]; @@ -735,7 +735,7 @@ static STREAM_UPDATE( mos6560_update ) (to be called at device start) -------------------------------------------------*/ -static void mos6560_sound_start( running_device *device ) +static void mos6560_sound_start( device_t *device ) { mos6560_state *mos6560 = get_safe_token(device); int i; diff --git a/src/emu/sound/mos6560.h b/src/emu/sound/mos6560.h index 89c5fe67c20..7d1e873df3b 100644 --- a/src/emu/sound/mos6560.h +++ b/src/emu/sound/mos6560.h @@ -106,8 +106,8 @@ DECLARE_LEGACY_SOUND_DEVICE(MOS656X, mos6560); WRITE8_DEVICE_HANDLER( mos6560_port_w ); READ8_DEVICE_HANDLER( mos6560_port_r ); -void mos6560_raster_interrupt_gen( running_device *device ); -UINT32 mos6560_video_update( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ); +void mos6560_raster_interrupt_gen( device_t *device ); +UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ); #endif /* __MOS6560_H__ */ diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c index afbaf3c3e00..2032df1d535 100644 --- a/src/emu/sound/msm5205.c +++ b/src/emu/sound/msm5205.c @@ -32,7 +32,7 @@ typedef struct _msm5205_state msm5205_state; struct _msm5205_state { const msm5205_interface *intf; - running_device *device; + device_t *device; sound_stream * stream; /* number of stream system */ INT32 clock; /* clock rate */ emu_timer *timer; /* VCLK callback timer */ @@ -46,7 +46,7 @@ struct _msm5205_state int diff_lookup[49*16]; }; -INLINE msm5205_state *get_safe_token(running_device *device) +INLINE msm5205_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MSM5205); @@ -209,7 +209,7 @@ static DEVICE_START( msm5205 ) * Handle an update of the vclk status of a chip (1 is reset ON, 0 is reset OFF) * This function can use selector = MSM5205_SEX only */ -void msm5205_vclk_w (running_device *device, int vclk) +void msm5205_vclk_w (device_t *device, int vclk) { msm5205_state *voice = get_safe_token(device); @@ -231,7 +231,7 @@ void msm5205_vclk_w (running_device *device, int vclk) * Handle an update of the reset status of a chip (1 is reset ON, 0 is reset OFF) */ -void msm5205_reset_w (running_device *device, int reset) +void msm5205_reset_w (device_t *device, int reset) { msm5205_state *voice = get_safe_token(device); voice->reset = reset; @@ -241,7 +241,7 @@ void msm5205_reset_w (running_device *device, int reset) * Handle an update of the data to the chip */ -void msm5205_data_w (running_device *device, int data) +void msm5205_data_w (device_t *device, int data) { msm5205_state *voice = get_safe_token(device); if( voice->bitwidth == 4) @@ -254,7 +254,7 @@ void msm5205_data_w (running_device *device, int data) * Handle an change of the selector */ -void msm5205_playmode_w(running_device *device, int select) +void msm5205_playmode_w(device_t *device, int select) { msm5205_state *voice = get_safe_token(device); msm5205_playmode(voice,select); @@ -291,14 +291,14 @@ static void msm5205_playmode(msm5205_state *voice,int select) } -void msm5205_set_volume(running_device *device,int volume) +void msm5205_set_volume(device_t *device,int volume) { msm5205_state *voice = get_safe_token(device); stream_set_output_gain(voice->stream,0,volume / 100.0); } -void msm5205_change_clock_w(running_device *device, INT32 clock) +void msm5205_change_clock_w(device_t *device, INT32 clock) { msm5205_state *voice = get_safe_token(device); attotime period; diff --git a/src/emu/sound/msm5205.h b/src/emu/sound/msm5205.h index e89ee41cc30..2a47083b071 100644 --- a/src/emu/sound/msm5205.h +++ b/src/emu/sound/msm5205.h @@ -21,24 +21,24 @@ typedef struct _msm5205_interface msm5205_interface; struct _msm5205_interface { - void (*vclk_callback)(running_device *); /* VCLK callback */ + void (*vclk_callback)(device_t *); /* VCLK callback */ int select; /* prescaler / bit width selector */ }; /* reset signal should keep for 2cycle of VCLK */ -void msm5205_reset_w (running_device *device, int reset); +void msm5205_reset_w (device_t *device, int reset); /* adpcmata is latched after vclk_interrupt callback */ -void msm5205_data_w (running_device *device, int data); +void msm5205_data_w (device_t *device, int data); /* VCLK slave mode option */ /* if VCLK and reset or data is changed at the same time, */ /* Call msm5205_vclk_w after msm5205_data_w and msm5205_reset_w. */ -void msm5205_vclk_w (running_device *device, int reset); +void msm5205_vclk_w (device_t *device, int reset); /* option , selected pin seletor */ -void msm5205_playmode_w(running_device *device, int _select); +void msm5205_playmode_w(device_t *device, int _select); -void msm5205_set_volume(running_device *device,int volume); +void msm5205_set_volume(device_t *device,int volume); -void msm5205_change_clock_w(running_device *device, INT32 clock); +void msm5205_change_clock_w(device_t *device, INT32 clock); DECLARE_LEGACY_SOUND_DEVICE(MSM5205, msm5205); diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c index 84254ce3aca..11b8410dd7b 100644 --- a/src/emu/sound/msm5232.c +++ b/src/emu/sound/msm5232.c @@ -69,13 +69,13 @@ typedef struct { int rate; /* sample rate in Hz */ double external_capacity[8]; /* in Farads, eg 0.39e-6 = 0.36 uF (microFarads) */ - running_device *device; - void (*gate_handler)(running_device *device, int state); /* callback called when the GATE output pin changes state */ + device_t *device; + void (*gate_handler)(device_t *device, int state); /* callback called when the GATE output pin changes state */ } msm5232_state; -INLINE msm5232_state *get_safe_token(running_device *device) +INLINE msm5232_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MSM5232); @@ -838,7 +838,7 @@ static DEVICE_START( msm5232 ) } } -void msm5232_set_clock(running_device *device, int clock) +void msm5232_set_clock(device_t *device, int clock) { msm5232_state *chip = get_safe_token(device); diff --git a/src/emu/sound/msm5232.h b/src/emu/sound/msm5232.h index 2ac58f2131c..f1dfaccc08c 100644 --- a/src/emu/sound/msm5232.h +++ b/src/emu/sound/msm5232.h @@ -9,12 +9,12 @@ typedef struct _msm5232_interface msm5232_interface; struct _msm5232_interface { double capacity[8]; /* in Farads, capacitors connected to pins: 24,25,26,27 and 37,38,39,40 */ - void (*gate_handler)(running_device *device, int state); /* callback called when the GATE output pin changes state */ + void (*gate_handler)(device_t *device, int state); /* callback called when the GATE output pin changes state */ }; WRITE8_DEVICE_HANDLER( msm5232_w ); -void msm5232_set_clock(running_device *device, int clock); +void msm5232_set_clock(device_t *device, int clock); DECLARE_LEGACY_SOUND_DEVICE(MSM5232, msm5232); diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index 24bd5998d4f..6a1011e47b6 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -126,7 +126,7 @@ static const int val2chan[] = #define MULTIPCM_RATE 44100.0 -INLINE MultiPCM *get_safe_token(running_device *device) +INLINE MultiPCM *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MULTIPCM); @@ -665,7 +665,7 @@ WRITE8_DEVICE_HANDLER( multipcm_w ) /* MAME/M1 access functions */ -void multipcm_set_bank(running_device *device, UINT32 leftoffs, UINT32 rightoffs) +void multipcm_set_bank(device_t *device, UINT32 leftoffs, UINT32 rightoffs) { MultiPCM *ptChip = get_safe_token(device); ptChip->BankL = leftoffs; diff --git a/src/emu/sound/multipcm.h b/src/emu/sound/multipcm.h index e0cdae87ccf..f442aeb06ea 100644 --- a/src/emu/sound/multipcm.h +++ b/src/emu/sound/multipcm.h @@ -8,7 +8,7 @@ WRITE8_DEVICE_HANDLER( multipcm_w ); READ8_DEVICE_HANDLER( multipcm_r ); -void multipcm_set_bank(running_device *device, UINT32 leftoffs, UINT32 rightoffs); +void multipcm_set_bank(device_t *device, UINT32 leftoffs, UINT32 rightoffs); DECLARE_LEGACY_SOUND_DEVICE(MULTIPCM, multipcm); diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index 18b3a466ed7..f8ab537159e 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -47,7 +47,7 @@ struct _namco_63701x static const int vol_table[4] = { 26, 84, 200, 258 }; -INLINE namco_63701x *get_safe_token(running_device *device) +INLINE namco_63701x *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_63701X); diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index 124a64c7456..00ef7e53b34 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -75,7 +75,7 @@ struct _namco_sound }; -INLINE namco_sound *get_safe_token(running_device *device) +INLINE namco_sound *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO || @@ -551,7 +551,7 @@ it select the 54XX/52XX outputs on those channels 0x3f ch 7 */ -void polepos_sound_enable(running_device *device, int enable) +void polepos_sound_enable(device_t *device, int enable) { namco_sound *chip = get_safe_token(device); chip->sound_enable = enable; @@ -629,7 +629,7 @@ WRITE8_DEVICE_HANDLER( polepos_sound_w ) 0x3e ch 7 waveform select & frequency */ -void mappy_sound_enable(running_device *device, int enable) +void mappy_sound_enable(device_t *device, int enable) { namco_sound *chip = get_safe_token(device); chip->sound_enable = enable; diff --git a/src/emu/sound/namco.h b/src/emu/sound/namco.h index a85c16b6b96..3bdcd24dec9 100644 --- a/src/emu/sound/namco.h +++ b/src/emu/sound/namco.h @@ -15,10 +15,10 @@ struct _namco_interface WRITE8_DEVICE_HANDLER( pacman_sound_enable_w ); WRITE8_DEVICE_HANDLER( pacman_sound_w ); -void polepos_sound_enable(running_device *device, int enable); +void polepos_sound_enable(device_t *device, int enable); WRITE8_DEVICE_HANDLER( polepos_sound_w ); -void mappy_sound_enable(running_device *device, int enable); +void mappy_sound_enable(device_t *device, int enable); WRITE8_DEVICE_HANDLER( namcos1_cus30_w ); /* wavedata + sound registers + RAM */ READ8_DEVICE_HANDLER( namcos1_cus30_r ); diff --git a/src/emu/sound/nes_apu.c b/src/emu/sound/nes_apu.c index e5a56838e17..88139c3de48 100644 --- a/src/emu/sound/nes_apu.c +++ b/src/emu/sound/nes_apu.c @@ -72,7 +72,7 @@ struct _nesapu_state }; -INLINE nesapu_state *get_safe_token(running_device *device) +INLINE nesapu_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NES); diff --git a/src/emu/sound/nile.c b/src/emu/sound/nile.c index d65010c007f..98c4edacfe2 100644 --- a/src/emu/sound/nile.c +++ b/src/emu/sound/nile.c @@ -62,7 +62,7 @@ struct _nile_state UINT16 ctrl; }; -INLINE nile_state *get_safe_token(running_device *device) +INLINE nile_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NILE); diff --git a/src/emu/sound/okim6258.c b/src/emu/sound/okim6258.c index ac973841697..5924bcbd0a9 100644 --- a/src/emu/sound/okim6258.c +++ b/src/emu/sound/okim6258.c @@ -49,7 +49,7 @@ static int diff_lookup[49*16]; /* tables computed? */ static int tables_computed = 0; -INLINE okim6258_state *get_safe_token(running_device *device) +INLINE okim6258_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == OKIM6258); @@ -170,7 +170,7 @@ static STREAM_UPDATE( okim6258_update ) ***********************************************************************************************/ -static void okim6258_state_save_register(okim6258_state *info, running_device *device) +static void okim6258_state_save_register(okim6258_state *info, device_t *device) { state_save_register_device_item(device, 0, info->status); state_save_register_device_item(device, 0, info->master_clock); @@ -235,7 +235,7 @@ static DEVICE_RESET( okim6258 ) ***********************************************************************************************/ -void okim6258_set_divider(running_device *device, int val) +void okim6258_set_divider(device_t *device, int val) { okim6258_state *info = get_safe_token(device); int divider = dividers[val]; @@ -251,7 +251,7 @@ void okim6258_set_divider(running_device *device, int val) ***********************************************************************************************/ -void okim6258_set_clock(running_device *device, int val) +void okim6258_set_clock(device_t *device, int val) { okim6258_state *info = get_safe_token(device); @@ -266,7 +266,7 @@ void okim6258_set_clock(running_device *device, int val) ***********************************************************************************************/ -int okim6258_get_vclk(running_device *device) +int okim6258_get_vclk(device_t *device) { okim6258_state *info = get_safe_token(device); diff --git a/src/emu/sound/okim6258.h b/src/emu/sound/okim6258.h index 56c044871c1..37a0ef35cd3 100644 --- a/src/emu/sound/okim6258.h +++ b/src/emu/sound/okim6258.h @@ -26,9 +26,9 @@ struct _okim6258_interface #define OUTPUT_10BITS 0 #define OUTPUT_12BITS 1 -void okim6258_set_divider(running_device *device, int val); -void okim6258_set_clock(running_device *device, int val); -int okim6258_get_vclk(running_device *device); +void okim6258_set_divider(device_t *device, int val); +void okim6258_set_clock(device_t *device, int val); +int okim6258_get_vclk(device_t *device); READ8_DEVICE_HANDLER( okim6258_status_r ); WRITE8_DEVICE_HANDLER( okim6258_data_w ); diff --git a/src/emu/sound/okim6376.c b/src/emu/sound/okim6376.c index 62daa3817be..c16f70259c1 100644 --- a/src/emu/sound/okim6376.c +++ b/src/emu/sound/okim6376.c @@ -63,7 +63,7 @@ static const int volume_table[4] = static int tables_computed = 0; -INLINE okim6376_state *get_safe_token(running_device *device) +INLINE okim6376_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == OKIM6376); @@ -266,7 +266,7 @@ static STREAM_UPDATE( okim6376_update ) ***********************************************************************************************/ -static void adpcm_state_save_register(struct ADPCMVoice *voice, running_device *device, int index) +static void adpcm_state_save_register(struct ADPCMVoice *voice, device_t *device, int index) { state_save_register_device_item(device, index, voice->playing); state_save_register_device_item(device, index, voice->sample); @@ -277,7 +277,7 @@ static void adpcm_state_save_register(struct ADPCMVoice *voice, running_device * state_save_register_device_item(device, index, voice->base_offset); } -static void okim6376_state_save_register(okim6376_state *info, running_device *device) +static void okim6376_state_save_register(okim6376_state *info, device_t *device) { int j; diff --git a/src/emu/sound/pokey.c b/src/emu/sound/pokey.c index 57b2797bdea..09e9999cd6e 100644 --- a/src/emu/sound/pokey.c +++ b/src/emu/sound/pokey.c @@ -174,7 +174,7 @@ struct _pokey_state UINT32 r9; /* rand9 index */ UINT32 r17; /* rand17 index */ UINT32 clockmult; /* clock multiplier */ - running_device *device; + device_t *device; sound_stream * channel; /* streams channel */ emu_timer *timer[3]; /* timers for channel 1,2 and 4 events */ attotime timer_period[3]; /* computed periods for these timers */ @@ -185,7 +185,7 @@ struct _pokey_state devcb_resolved_read8 allpot_r; devcb_resolved_read8 serin_r; devcb_resolved_write8 serout_w; - void (*interrupt_cb)(running_device *device, int mask); + void (*interrupt_cb)(device_t *device, int mask); UINT8 AUDF[4]; /* AUDFx (D200, D202, D204, D206) */ UINT8 AUDC[4]; /* AUDCx (D201, D203, D205, D207) */ UINT8 POTx[8]; /* POTx (R/D200-D207) */ @@ -522,7 +522,7 @@ static TIMER_CALLBACK( pokey_pot_trigger ); #endif -INLINE pokey_state *get_safe_token(running_device *device) +INLINE pokey_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == POKEY); @@ -573,7 +573,7 @@ static void rand_init(UINT8 *rng, int size, int left, int right, int add) } -static void register_for_save(pokey_state *chip, running_device *device) +static void register_for_save(pokey_state *chip, device_t *device) { state_save_register_device_item_array(device, 0, chip->counter); state_save_register_device_item_array(device, 0, chip->divisor); @@ -1336,13 +1336,13 @@ WRITE8_HANDLER( quad_pokey_w ) pokey_w(space->machine->device(devname[pokey_num]), pokey_reg, data); } -void pokey_serin_ready(running_device *device, int after) +void pokey_serin_ready(device_t *device, int after) { pokey_state *p = get_safe_token(device); timer_set(device->machine, attotime_mul(p->clock_period, after), p, 0, pokey_serin_ready_cb); } -void pokey_break_w(running_device *device, int shift) +void pokey_break_w(device_t *device, int shift) { pokey_state *p = get_safe_token(device); if( shift ) /* shift code ? */ @@ -1359,7 +1359,7 @@ void pokey_break_w(running_device *device, int shift) } } -void pokey_kbcode_w(running_device *device, int kbcode, int make) +void pokey_kbcode_w(device_t *device, int kbcode, int make) { pokey_state *p = get_safe_token(device); /* make code ? */ diff --git a/src/emu/sound/pokey.h b/src/emu/sound/pokey.h index d4f114aa452..39ac7f4bcb6 100644 --- a/src/emu/sound/pokey.h +++ b/src/emu/sound/pokey.h @@ -75,7 +75,7 @@ struct _pokey_interface devcb_read8 allpot_r; devcb_read8 serin_r; devcb_write8 serout_w; - void (*interrupt_cb)(running_device *device, int mask); + void (*interrupt_cb)(device_t *device, int mask); }; @@ -86,9 +86,9 @@ WRITE8_DEVICE_HANDLER( pokey_w ); READ8_HANDLER( quad_pokey_r ); WRITE8_HANDLER( quad_pokey_w ); -void pokey_serin_ready (running_device *device, int after); -void pokey_break_w (running_device *device, int shift); -void pokey_kbcode_w (running_device *device, int kbcode, int make); +void pokey_serin_ready (device_t *device, int after); +void pokey_break_w (device_t *device, int shift); +void pokey_kbcode_w (device_t *device, int kbcode, int make); DECLARE_LEGACY_SOUND_DEVICE(POKEY, pokey); diff --git a/src/emu/sound/psx.c b/src/emu/sound/psx.c index 50b71c13e83..eee9a9fc424 100644 --- a/src/emu/sound/psx.c +++ b/src/emu/sound/psx.c @@ -37,7 +37,7 @@ typedef enum { e_attack = 0, e_decay, e_sustain, e_sustainEnd, e_release, e_rele struct psxinfo { const psx_spu_interface *intf; - running_device *device; + device_t *device; UINT32 *m_p_n_psxram; UINT16 m_n_mainvolumeleft; @@ -85,7 +85,7 @@ struct psxinfo UINT32 m_n_spu_delay; }; -INLINE struct psxinfo *get_safe_token(running_device *device) +INLINE struct psxinfo *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PSXSPU); diff --git a/src/emu/sound/psx.h b/src/emu/sound/psx.h index 828a27ac295..c3b45bc53e8 100644 --- a/src/emu/sound/psx.h +++ b/src/emu/sound/psx.h @@ -23,7 +23,7 @@ typedef void ( *spu_handler )( running_machine *, UINT32, INT32 ); typedef struct _psx_spu_interface psx_spu_interface; struct _psx_spu_interface { - void (*irq_set)(running_device *,UINT32); + void (*irq_set)(device_t *,UINT32); void (*spu_install_read_handler)(running_machine *,int,spu_handler); void (*spu_install_write_handler)(running_machine *,int,spu_handler); }; diff --git a/src/emu/sound/qsound.c b/src/emu/sound/qsound.c index 85d5c1a1a5e..0965cc86a66 100644 --- a/src/emu/sound/qsound.c +++ b/src/emu/sound/qsound.c @@ -88,7 +88,7 @@ struct _qsound_state FILE *fpRawDataR; }; -INLINE qsound_state *get_safe_token(running_device *device) +INLINE qsound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == QSOUND); diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c index 21a69bdabac..50915b5d0f1 100644 --- a/src/emu/sound/rf5c400.c +++ b/src/emu/sound/rf5c400.c @@ -94,7 +94,7 @@ enum { }; -INLINE rf5c400_state *get_safe_token(running_device *device) +INLINE rf5c400_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == RF5C400); @@ -238,7 +238,7 @@ static STREAM_UPDATE( rf5c400_update ) } } -static void rf5c400_init_chip(running_device *device, rf5c400_state *info) +static void rf5c400_init_chip(device_t *device, rf5c400_state *info) { int i; diff --git a/src/emu/sound/rf5c68.c b/src/emu/sound/rf5c68.c index a2140c6c456..5425bc4ac85 100644 --- a/src/emu/sound/rf5c68.c +++ b/src/emu/sound/rf5c68.c @@ -32,12 +32,12 @@ struct _rf5c68_state UINT8 wbank; UINT8 enable; UINT8 data[0x10000]; - void (*sample_callback)(running_device* device,int channel); - running_device* device; + void (*sample_callback)(device_t* device,int channel); + device_t* device; }; -INLINE rf5c68_state *get_safe_token(running_device *device) +INLINE rf5c68_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == RF5C68); diff --git a/src/emu/sound/rf5c68.h b/src/emu/sound/rf5c68.h index 02ef3d52ca8..3eaf3f596c6 100644 --- a/src/emu/sound/rf5c68.h +++ b/src/emu/sound/rf5c68.h @@ -18,7 +18,7 @@ WRITE8_DEVICE_HANDLER( rf5c68_mem_w ); typedef struct _rf5c68_interface rf5c68_interface; struct _rf5c68_interface { - void (*sample_end_callback)(running_device* device, int channel); + void (*sample_end_callback)(device_t* device, int channel); }; DECLARE_LEGACY_SOUND_DEVICE(RF5C68, rf5c68); diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index 966fcf293fc..a2caa40dbc2 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -265,7 +265,7 @@ typedef struct UINT8 VSU1000_amp; // amplitude setting on VSU-1000 board } S14001AChip; -INLINE S14001AChip *get_safe_token(running_device *device) +INLINE S14001AChip *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == S14001A); @@ -596,7 +596,7 @@ static DEVICE_START( s14001a ) chip->stream = stream_create(device, 0, 1, device->clock() ? device->clock() : device->machine->sample_rate, chip, s14001a_pcm_update); } -int s14001a_bsy_r(running_device *device) +int s14001a_bsy_r(device_t *device) { S14001AChip *chip = get_safe_token(device); stream_update(chip->stream); @@ -606,14 +606,14 @@ int s14001a_bsy_r(running_device *device) return (chip->machineState != 0); } -void s14001a_reg_w(running_device *device, int data) +void s14001a_reg_w(device_t *device, int data) { S14001AChip *chip = get_safe_token(device); stream_update(chip->stream); chip->WordInput = data; } -void s14001a_rst_w(running_device *device, int data) +void s14001a_rst_w(device_t *device, int data) { S14001AChip *chip = get_safe_token(device); stream_update(chip->stream); @@ -622,13 +622,13 @@ void s14001a_rst_w(running_device *device, int data) chip->machineState = chip->resetState ? 1 : chip->machineState; } -void s14001a_set_clock(running_device *device, int clock) +void s14001a_set_clock(device_t *device, int clock) { S14001AChip *chip = get_safe_token(device); stream_set_sample_rate(chip->stream, clock); } -void s14001a_set_volume(running_device *device, int volume) +void s14001a_set_volume(device_t *device, int volume) { S14001AChip *chip = get_safe_token(device); stream_update(chip->stream); diff --git a/src/emu/sound/s14001a.h b/src/emu/sound/s14001a.h index db64da9b609..92489f01daf 100644 --- a/src/emu/sound/s14001a.h +++ b/src/emu/sound/s14001a.h @@ -5,11 +5,11 @@ #include "devlegcy.h" -int s14001a_bsy_r(running_device *device); /* read BUSY pin */ -void s14001a_reg_w(running_device *device, int data); /* write to input latch */ -void s14001a_rst_w(running_device *device, int data); /* write to RESET pin */ -void s14001a_set_clock(running_device *device, int clock); /* set VSU-1000 clock */ -void s14001a_set_volume(running_device *device, int volume); /* set VSU-1000 volume control */ +int s14001a_bsy_r(device_t *device); /* read BUSY pin */ +void s14001a_reg_w(device_t *device, int data); /* write to input latch */ +void s14001a_rst_w(device_t *device, int data); /* write to RESET pin */ +void s14001a_set_clock(device_t *device, int clock); /* set VSU-1000 clock */ +void s14001a_set_volume(device_t *device, int volume); /* set VSU-1000 volume control */ DECLARE_LEGACY_SOUND_DEVICE(S14001A, s14001a); diff --git a/src/emu/sound/s2636.c b/src/emu/sound/s2636.c index 250ac93b4b0..d62fa32e627 100644 --- a/src/emu/sound/s2636.c +++ b/src/emu/sound/s2636.c @@ -19,7 +19,7 @@ struct _s2636_sound }; -static s2636_sound *get_token(running_device *device) +static s2636_sound *get_token(device_t *device) { assert(device != NULL); assert(device->type() == S2636_SOUND); @@ -27,7 +27,7 @@ static s2636_sound *get_token(running_device *device) } -void s2636_soundport_w (running_device *device, int offset, int data) +void s2636_soundport_w (device_t *device, int offset, int data) { s2636_sound *token = get_token(device); diff --git a/src/emu/sound/s2636.h b/src/emu/sound/s2636.h index 021e0aca8c9..f742660212b 100644 --- a/src/emu/sound/s2636.h +++ b/src/emu/sound/s2636.h @@ -10,7 +10,7 @@ DECLARE_LEGACY_SOUND_DEVICE(S2636_SOUND, s2636_sound); -void s2636_soundport_w (running_device *device, int mode, int data); +void s2636_soundport_w (device_t *device, int mode, int data); #endif /* VC4000_H_ */ diff --git a/src/emu/sound/saa1099.c b/src/emu/sound/saa1099.c index 0918e794e32..4e68bf6c8ae 100644 --- a/src/emu/sound/saa1099.c +++ b/src/emu/sound/saa1099.c @@ -100,7 +100,7 @@ struct saa1099_noise typedef struct _saa1099_state saa1099_state; struct _saa1099_state { - running_device *device; + device_t *device; sound_stream * stream; /* our stream */ int noise_params[2]; /* noise generators parameters */ int env_enable[2]; /* envelope generators enable */ @@ -168,7 +168,7 @@ static const UINT8 envelope[8][64] = { }; -INLINE saa1099_state *get_safe_token(running_device *device) +INLINE saa1099_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SAA1099); diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c index fe064a0dd8d..2ed29bc6427 100644 --- a/src/emu/sound/samples.c +++ b/src/emu/sound/samples.c @@ -23,14 +23,14 @@ struct _sample_channel typedef struct _samples_info samples_info; struct _samples_info { - running_device *device; + device_t *device; int numchannels; /* how many channels */ sample_channel *channel;/* array of channels */ loaded_samples *samples;/* array of samples */ }; -INLINE samples_info *get_safe_token(running_device *device) +INLINE samples_info *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SAMPLES); @@ -234,7 +234,7 @@ loaded_samples *readsamples(running_machine *machine, const char *const *samplen /* Start one of the samples loaded from disk. Note: channel must be in the range */ /* 0 .. Samplesinterface->channels-1. It is NOT the discrete channel to pass to */ /* mixer_play_sample() */ -void sample_start(running_device *device,int channel,int samplenum,int loop) +void sample_start(device_t *device,int channel,int samplenum,int loop) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -265,7 +265,7 @@ void sample_start(running_device *device,int channel,int samplenum,int loop) } -void sample_start_raw(running_device *device,int channel,const INT16 *sampledata,int samples,int frequency,int loop) +void sample_start_raw(device_t *device,int channel,const INT16 *sampledata,int samples,int frequency,int loop) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -289,7 +289,7 @@ void sample_start_raw(running_device *device,int channel,const INT16 *sampledata } -void sample_set_freq(running_device *device,int channel,int freq) +void sample_set_freq(device_t *device,int channel,int freq) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -305,7 +305,7 @@ void sample_set_freq(running_device *device,int channel,int freq) } -void sample_set_volume(running_device *device,int channel,float volume) +void sample_set_volume(device_t *device,int channel,float volume) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -318,7 +318,7 @@ void sample_set_volume(running_device *device,int channel,float volume) } -void sample_set_pause(running_device *device,int channel,int pause) +void sample_set_pause(device_t *device,int channel,int pause) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -334,7 +334,7 @@ void sample_set_pause(running_device *device,int channel,int pause) } -void sample_stop(running_device *device,int channel) +void sample_stop(device_t *device,int channel) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -350,7 +350,7 @@ void sample_stop(running_device *device,int channel) } -int sample_get_base_freq(running_device *device,int channel) +int sample_get_base_freq(device_t *device,int channel) { samples_info *info = get_safe_token(device); sample_channel *chan; @@ -365,7 +365,7 @@ int sample_get_base_freq(running_device *device,int channel) } -int sample_playing(running_device *device,int channel) +int sample_playing(device_t *device,int channel) { samples_info *info = get_safe_token(device); sample_channel *chan; diff --git a/src/emu/sound/samples.h b/src/emu/sound/samples.h index 3834d75f241..018296aec08 100644 --- a/src/emu/sound/samples.h +++ b/src/emu/sound/samples.h @@ -25,20 +25,20 @@ struct _samples_interface { int channels; /* number of discrete audio channels needed */ const char *const *samplenames; - void (*start)(running_device *device); + void (*start)(device_t *device); }; -#define SAMPLES_START(name) void name(running_device *device) +#define SAMPLES_START(name) void name(device_t *device) -void sample_start(running_device *device,int channel,int samplenum,int loop); -void sample_start_raw(running_device *device,int channel,const INT16 *sampledata,int samples,int frequency,int loop); -void sample_set_freq(running_device *device,int channel,int freq); -void sample_set_volume(running_device *device,int channel,float volume); -void sample_set_pause(running_device *device,int channel,int pause); -void sample_stop(running_device *device,int channel); -int sample_get_base_freq(running_device *device,int channel); -int sample_playing(running_device *device,int channel); +void sample_start(device_t *device,int channel,int samplenum,int loop); +void sample_start_raw(device_t *device,int channel,const INT16 *sampledata,int samples,int frequency,int loop); +void sample_set_freq(device_t *device,int channel,int freq); +void sample_set_volume(device_t *device,int channel,float volume); +void sample_set_pause(device_t *device,int channel,int pause); +void sample_stop(device_t *device,int channel); +int sample_get_base_freq(device_t *device,int channel); +int sample_playing(device_t *device,int channel); /* helper function that reads samples from disk - this can be used by other */ /* drivers as well (e.g. a sound chip emulator needing drum samples) */ diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index 70789209fc6..96900fdbe61 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -193,7 +193,7 @@ struct _scsp_state unsigned char *SCSPRAM; UINT32 SCSPRAM_LENGTH; char Master; - void (*Int68kCB)(running_device *device, int irq); + void (*Int68kCB)(device_t *device, int irq); sound_stream * stream; INT32 *buffertmpl,*buffertmpr; @@ -224,7 +224,7 @@ struct _scsp_state struct _SCSPDSP DSP; - running_device *device; + device_t *device; }; static void dma_scsp(address_space *space, scsp_state *scsp); /*state DMA transfer function*/ @@ -244,7 +244,7 @@ static int length; static signed short *RBUFDST; //this points to where the sample will be stored in the RingBuf -INLINE scsp_state *get_safe_token(running_device *device) +INLINE scsp_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SCSP); @@ -516,7 +516,7 @@ static void SCSP_StopSlot(struct _SLOT *slot,int keyoff) #define log_base_2(n) (log((double)(n))/log(2.0)) -static void SCSP_Init(running_device *device, scsp_state *scsp, const scsp_interface *intf) +static void SCSP_Init(device_t *device, scsp_state *scsp, const scsp_interface *intf) { int i; @@ -1255,7 +1255,7 @@ static DEVICE_START( scsp ) } -void scsp_set_ram_base(running_device *device, void *base) +void scsp_set_ram_base(device_t *device, void *base) { scsp_state *scsp = get_safe_token(device); if (scsp) diff --git a/src/emu/sound/scsp.h b/src/emu/sound/scsp.h index a9cc806dbed..16935e269aa 100644 --- a/src/emu/sound/scsp.h +++ b/src/emu/sound/scsp.h @@ -13,10 +13,10 @@ typedef struct _scsp_interface scsp_interface; struct _scsp_interface { int roffset; /* offset in the region */ - void (*irq_callback)(running_device *device, int state); /* irq callback */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ }; -void scsp_set_ram_base(running_device *device, void *base); +void scsp_set_ram_base(device_t *device, void *base); // SCSP register access READ16_DEVICE_HANDLER( scsp_r ); diff --git a/src/emu/sound/segapcm.c b/src/emu/sound/segapcm.c index 2cda4c2e490..f8d244e4cd9 100644 --- a/src/emu/sound/segapcm.c +++ b/src/emu/sound/segapcm.c @@ -18,7 +18,7 @@ struct _segapcm_state sound_stream * stream; }; -INLINE segapcm_state *get_safe_token(running_device *device) +INLINE segapcm_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SEGAPCM); diff --git a/src/emu/sound/sid.h b/src/emu/sound/sid.h index dc595303504..b6cd462ccf5 100644 --- a/src/emu/sound/sid.h +++ b/src/emu/sound/sid.h @@ -15,10 +15,10 @@ /* private area */ typedef struct __SID6581 { - running_device *device; + device_t *device; sound_stream *mixer_channel; // mame stream/ mixer channel - int (*ad_read) (running_device *device, int which); + int (*ad_read) (device_t *device, int which); SIDTYPE type; UINT32 clock; diff --git a/src/emu/sound/sid6581.c b/src/emu/sound/sid6581.c index fac2da82a35..06484f43d87 100644 --- a/src/emu/sound/sid6581.c +++ b/src/emu/sound/sid6581.c @@ -12,7 +12,7 @@ -static _SID6581 *get_sid(running_device *device) +static _SID6581 *get_sid(device_t *device) { assert(device != NULL); assert((device->type() == SID6581) || (device->type() == SID8580)); @@ -29,7 +29,7 @@ static STREAM_UPDATE( sid_update ) -static void sid_start(running_device *device, SIDTYPE sidtype) +static void sid_start(device_t *device, SIDTYPE sidtype) { _SID6581 *sid = get_sid(device); const sid6581_interface *iface = (const sid6581_interface*) device->baseconfig().static_config(); diff --git a/src/emu/sound/sid6581.h b/src/emu/sound/sid6581.h index 32543f07183..4b389e39674 100644 --- a/src/emu/sound/sid6581.h +++ b/src/emu/sound/sid6581.h @@ -24,7 +24,7 @@ typedef enum typedef struct _sid6581_interface sid6581_interface; struct _sid6581_interface { - int (*ad_read)(running_device *device, int channel); + int (*ad_read)(device_t *device, int channel); } ; diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c index ab45cc57b70..d881c83f7d7 100644 --- a/src/emu/sound/sn76477.c +++ b/src/emu/sound/sn76477.c @@ -255,13 +255,13 @@ struct _sn76477_state /* others */ sound_stream *channel; /* returned by stream_create() */ int sample_rate; /* from machine->sample_rate */ - running_device *device; + device_t *device; wav_file *file; /* handle of the wave file to produce */ }; -INLINE sn76477_state *get_safe_token(running_device *device) +INLINE sn76477_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SN76477); @@ -1000,7 +1000,7 @@ static void SN76477_test_enable_w(sn76477_state *sn, UINT32 data) } -void sn76477_enable_w(running_device *device, UINT32 data) +void sn76477_enable_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1025,7 +1025,7 @@ static void _SN76477_mixer_a_w(sn76477_state *sn, UINT32 data) } -void sn76477_mixer_a_w(running_device *device, UINT32 data) +void sn76477_mixer_a_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1050,7 +1050,7 @@ static void _SN76477_mixer_b_w(sn76477_state *sn, UINT32 data) } -void sn76477_mixer_b_w(running_device *device, UINT32 data) +void sn76477_mixer_b_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1075,7 +1075,7 @@ static void _SN76477_mixer_c_w(sn76477_state *sn, UINT32 data) } -void sn76477_mixer_c_w(running_device *device, UINT32 data) +void sn76477_mixer_c_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1107,7 +1107,7 @@ static void _SN76477_envelope_1_w(sn76477_state *sn, UINT32 data) } -void sn76477_envelope_1_w(running_device *device, UINT32 data) +void sn76477_envelope_1_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1132,7 +1132,7 @@ static void _SN76477_envelope_2_w(sn76477_state *sn, UINT32 data) } -void sn76477_envelope_2_w(running_device *device, UINT32 data) +void sn76477_envelope_2_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1164,7 +1164,7 @@ static void _SN76477_vco_w(sn76477_state *sn, UINT32 data) } -void sn76477_vco_w(running_device *device, UINT32 data) +void sn76477_vco_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1196,7 +1196,7 @@ static void _SN76477_one_shot_res_w(sn76477_state *sn, double data) } -void sn76477_one_shot_res_w(running_device *device, double data) +void sn76477_one_shot_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1228,7 +1228,7 @@ static void _SN76477_one_shot_cap_w(sn76477_state *sn, double data) } -void sn76477_one_shot_cap_w(running_device *device, double data) +void sn76477_one_shot_cap_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1254,7 +1254,7 @@ void sn76477_one_shot_cap_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_one_shot_cap_voltage_w(running_device *device, double data) +void sn76477_one_shot_cap_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1303,7 +1303,7 @@ static void _SN76477_slf_res_w(sn76477_state *sn, double data) } -void sn76477_slf_res_w(running_device *device, double data) +void sn76477_slf_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1335,7 +1335,7 @@ static void _SN76477_slf_cap_w(sn76477_state *sn, double data) } -void sn76477_slf_cap_w(running_device *device, double data) +void sn76477_slf_cap_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1363,7 +1363,7 @@ void sn76477_slf_cap_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_slf_cap_voltage_w(running_device *device, double data) +void sn76477_slf_cap_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1412,7 +1412,7 @@ static void _SN76477_vco_res_w(sn76477_state *sn, double data) } -void sn76477_vco_res_w(running_device *device, double data) +void sn76477_vco_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1444,7 +1444,7 @@ static void _SN76477_vco_cap_w(sn76477_state *sn, double data) } -void sn76477_vco_cap_w(running_device *device, double data) +void sn76477_vco_cap_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1470,7 +1470,7 @@ void sn76477_vco_cap_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_vco_cap_voltage_w(running_device *device, double data) +void sn76477_vco_cap_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1519,7 +1519,7 @@ static void _SN76477_vco_voltage_w(sn76477_state *sn, double data) } -void sn76477_vco_voltage_w(running_device *device, double data) +void sn76477_vco_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1552,7 +1552,7 @@ static void _SN76477_pitch_voltage_w(sn76477_state *sn, double data) } -void sn76477_pitch_voltage_w(running_device *device, double data) +void sn76477_pitch_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1579,7 +1579,7 @@ void sn76477_pitch_voltage_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_noise_clock_w(running_device *device, UINT32 data) +void sn76477_noise_clock_w(device_t *device, UINT32 data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1625,7 +1625,7 @@ static void _SN76477_noise_clock_res_w(sn76477_state *sn, double data) } -void sn76477_noise_clock_res_w(running_device *device, double data) +void sn76477_noise_clock_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1658,7 +1658,7 @@ static void _SN76477_noise_filter_res_w(sn76477_state *sn, double data) } -void sn76477_noise_filter_res_w(running_device *device, double data) +void sn76477_noise_filter_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1690,7 +1690,7 @@ static void _SN76477_noise_filter_cap_w(sn76477_state *sn, double data) } -void sn76477_noise_filter_cap_w(running_device *device, double data) +void sn76477_noise_filter_cap_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1716,7 +1716,7 @@ void sn76477_noise_filter_cap_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_noise_filter_cap_voltage_w(running_device *device, double data) +void sn76477_noise_filter_cap_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1765,7 +1765,7 @@ static void _SN76477_attack_res_w(sn76477_state *sn, double data) } -void sn76477_attack_res_w(running_device *device, double data) +void sn76477_attack_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1797,7 +1797,7 @@ static void _SN76477_decay_res_w(sn76477_state *sn, double data) } -void sn76477_decay_res_w(running_device *device, double data) +void sn76477_decay_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1829,7 +1829,7 @@ static void _SN76477_attack_decay_cap_w(sn76477_state *sn, double data) } -void sn76477_attack_decay_cap_w(running_device *device, double data) +void sn76477_attack_decay_cap_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1856,7 +1856,7 @@ void sn76477_attack_decay_cap_w(running_device *device, double data) * *****************************************************************************/ -void sn76477_attack_decay_cap_voltage_w(running_device *device, double data) +void sn76477_attack_decay_cap_voltage_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1907,7 +1907,7 @@ static void _SN76477_amplitude_res_w(sn76477_state *sn, double data) } -void sn76477_amplitude_res_w(running_device *device, double data) +void sn76477_amplitude_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -1939,7 +1939,7 @@ static void _SN76477_feedback_res_w(sn76477_state *sn, double data) } -void sn76477_feedback_res_w(running_device *device, double data) +void sn76477_feedback_res_w(device_t *device, double data) { #if TEST_MODE == 0 sn76477_state *sn = get_safe_token(device); @@ -2328,7 +2328,7 @@ static STREAM_UPDATE( SN76477_update ) * *****************************************************************************/ -static void state_save_register(running_device *device, sn76477_state *sn) +static void state_save_register(device_t *device, sn76477_state *sn) { state_save_register_device_item(device, 0, sn->enable); state_save_register_device_item(device, 0, sn->envelope_mode); diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h index 5ff843bed5c..abbb69eec78 100644 --- a/src/emu/sound/sn76477.h +++ b/src/emu/sound/sn76477.h @@ -86,44 +86,44 @@ struct _sn76477_interface *****************************************************************************/ /* these functions take 0 or 1 as a logic input */ -void sn76477_enable_w(running_device *device, UINT32 data); /* active LO, 0 = enabled, 1 = disabled */ -void sn76477_mixer_a_w(running_device *device, UINT32 data); -void sn76477_mixer_b_w(running_device *device, UINT32 data); -void sn76477_mixer_c_w(running_device *device, UINT32 data); -void sn76477_envelope_1_w(running_device *device, UINT32 data); -void sn76477_envelope_2_w(running_device *device, UINT32 data); -void sn76477_vco_w(running_device *device, UINT32 data); /* 0 = external, 1 = controlled by SLF */ -void sn76477_noise_clock_w(running_device *device, UINT32 data); /* noise clock write, if noise_clock_res = 0 */ +void sn76477_enable_w(device_t *device, UINT32 data); /* active LO, 0 = enabled, 1 = disabled */ +void sn76477_mixer_a_w(device_t *device, UINT32 data); +void sn76477_mixer_b_w(device_t *device, UINT32 data); +void sn76477_mixer_c_w(device_t *device, UINT32 data); +void sn76477_envelope_1_w(device_t *device, UINT32 data); +void sn76477_envelope_2_w(device_t *device, UINT32 data); +void sn76477_vco_w(device_t *device, UINT32 data); /* 0 = external, 1 = controlled by SLF */ +void sn76477_noise_clock_w(device_t *device, UINT32 data); /* noise clock write, if noise_clock_res = 0 */ /* these functions take a resistor value in Ohms */ -void sn76477_one_shot_res_w(running_device *device, double data); -void sn76477_slf_res_w(running_device *device, double data); -void sn76477_vco_res_w(running_device *device, double data); -void sn76477_noise_clock_res_w(running_device *device, double data); /* = 0 if the noise gen is clocked via noise_clock */ -void sn76477_noise_filter_res_w(running_device *device, double data); -void sn76477_decay_res_w(running_device *device, double data); -void sn76477_attack_res_w(running_device *device, double data); -void sn76477_amplitude_res_w(running_device *device, double data); -void sn76477_feedback_res_w(running_device *device, double data); +void sn76477_one_shot_res_w(device_t *device, double data); +void sn76477_slf_res_w(device_t *device, double data); +void sn76477_vco_res_w(device_t *device, double data); +void sn76477_noise_clock_res_w(device_t *device, double data); /* = 0 if the noise gen is clocked via noise_clock */ +void sn76477_noise_filter_res_w(device_t *device, double data); +void sn76477_decay_res_w(device_t *device, double data); +void sn76477_attack_res_w(device_t *device, double data); +void sn76477_amplitude_res_w(device_t *device, double data); +void sn76477_feedback_res_w(device_t *device, double data); /* these functions take a capacitor value in Farads or the voltage on it in Volts */ #define SN76477_EXTERNAL_VOLTAGE_DISCONNECT (-1.0) /* indicates that the voltage is internally computed, can be used in all the functions that take a voltage on a capacitor */ -void sn76477_one_shot_cap_w(running_device *device, double data); -void sn76477_one_shot_cap_voltage_w(running_device *device, double data); -void sn76477_slf_cap_w(running_device *device, double data); -void sn76477_slf_cap_voltage_w(running_device *device, double data); -void sn76477_vco_cap_w(running_device *device, double data); -void sn76477_vco_cap_voltage_w(running_device *device, double data); -void sn76477_noise_filter_cap_w(running_device *device, double data); -void sn76477_noise_filter_cap_voltage_w(running_device *device, double data); -void sn76477_attack_decay_cap_w(running_device *device, double data); -void sn76477_attack_decay_cap_voltage_w(running_device *device, double data); +void sn76477_one_shot_cap_w(device_t *device, double data); +void sn76477_one_shot_cap_voltage_w(device_t *device, double data); +void sn76477_slf_cap_w(device_t *device, double data); +void sn76477_slf_cap_voltage_w(device_t *device, double data); +void sn76477_vco_cap_w(device_t *device, double data); +void sn76477_vco_cap_voltage_w(device_t *device, double data); +void sn76477_noise_filter_cap_w(device_t *device, double data); +void sn76477_noise_filter_cap_voltage_w(device_t *device, double data); +void sn76477_attack_decay_cap_w(device_t *device, double data); +void sn76477_attack_decay_cap_voltage_w(device_t *device, double data); /* these functions take a voltage value in Volts */ -void sn76477_vco_voltage_w(running_device *device, double data); -void sn76477_pitch_voltage_w(running_device *device, double data); +void sn76477_vco_voltage_w(device_t *device, double data); +void sn76477_pitch_voltage_w(device_t *device, double data); DECLARE_LEGACY_SOUND_DEVICE(SN76477, sn76477); diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c index 5c582ec79e9..673325325e4 100644 --- a/src/emu/sound/sn76496.c +++ b/src/emu/sound/sn76496.c @@ -135,7 +135,7 @@ struct _sn76496_state }; -INLINE sn76496_state *get_safe_token(running_device *device) +INLINE sn76496_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SN76496 || @@ -342,7 +342,7 @@ static void SN76496_set_gain(sn76496_state *R,int gain) -static int SN76496_init(running_device *device, sn76496_state *R, int stereo) +static int SN76496_init(device_t *device, sn76496_state *R, int stereo) { int sample_rate = device->clock()/2; int i; @@ -380,7 +380,7 @@ static int SN76496_init(running_device *device, sn76496_state *R, int stereo) } -static void generic_start(running_device *device, int feedbackmask, int noisetap1, int noisetap2, int negate, int stereo, int clockdivider) +static void generic_start(device_t *device, int feedbackmask, int noisetap1, int noisetap2, int negate, int stereo, int clockdivider) { sn76496_state *chip = get_safe_token(device); diff --git a/src/emu/sound/snkwave.c b/src/emu/sound/snkwave.c index 1c8e9ed7204..b2e07206cfa 100644 --- a/src/emu/sound/snkwave.c +++ b/src/emu/sound/snkwave.c @@ -33,7 +33,7 @@ struct _snkwave_state INT16 waveform[WAVEFORM_LENGTH]; }; -INLINE snkwave_state *get_safe_token(running_device *device) +INLINE snkwave_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SNKWAVE); diff --git a/src/emu/sound/sp0250.c b/src/emu/sound/sp0250.c index e08903f9e22..53f2b6387e4 100644 --- a/src/emu/sound/sp0250.c +++ b/src/emu/sound/sp0250.c @@ -47,8 +47,8 @@ struct _sp0250_state UINT8 fifo[15]; int fifo_pos; - running_device *device; - void (*drq)(running_device *device, int state); + device_t *device; + void (*drq)(device_t *device, int state); struct { @@ -57,7 +57,7 @@ struct _sp0250_state } filter[6]; }; -INLINE sp0250_state *get_safe_token(running_device *device) +INLINE sp0250_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SP0250); @@ -231,7 +231,7 @@ WRITE8_DEVICE_HANDLER( sp0250_w ) } -UINT8 sp0250_drq_r(running_device *device) +UINT8 sp0250_drq_r(device_t *device) { sp0250_state *sp = get_safe_token(device); stream_update(sp->stream); diff --git a/src/emu/sound/sp0250.h b/src/emu/sound/sp0250.h index e3e9b9d1d47..4a125683d28 100644 --- a/src/emu/sound/sp0250.h +++ b/src/emu/sound/sp0250.h @@ -6,11 +6,11 @@ #include "devlegcy.h" struct sp0250_interface { - void (*drq_callback)(running_device *device, int state); + void (*drq_callback)(device_t *device, int state); }; WRITE8_DEVICE_HANDLER( sp0250_w ); -UINT8 sp0250_drq_r(running_device *device); +UINT8 sp0250_drq_r(device_t *device); DECLARE_LEGACY_SOUND_DEVICE(SP0250, sp0250); diff --git a/src/emu/sound/sp0256.c b/src/emu/sound/sp0256.c index 93b39c8e40f..85782ef2900 100644 --- a/src/emu/sound/sp0256.c +++ b/src/emu/sound/sp0256.c @@ -76,7 +76,7 @@ struct lpc12_t typedef struct _sp0256_state sp0256_state; struct _sp0256_state { - running_device *device; + device_t *device; sound_stream *stream; /* MAME core sound stream */ devcb_resolved_write_line drq; /* Data request callback */ devcb_resolved_write_line sby; /* Standby callback */ @@ -132,7 +132,7 @@ static const INT16 qtbl[128] = 504, 505, 506, 507, 508, 509, 510, 511 }; -INLINE sp0256_state *get_safe_token(running_device *device) +INLINE sp0256_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SP0256); diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c index 1d3b6caba4c..59757bf252f 100644 --- a/src/emu/sound/speaker.c +++ b/src/emu/sound/speaker.c @@ -126,7 +126,7 @@ static double make_fraction(attotime a, attotime b, double timediv); static double get_filtered_volume(speaker_state *sp); -INLINE speaker_state *get_safe_token(running_device *device) +INLINE speaker_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == SPEAKER_SOUND); @@ -260,7 +260,7 @@ static STREAM_UPDATE( speaker_sound_update ) } /* speaker_sound_update */ -void speaker_level_w(running_device *device, int new_level) +void speaker_level_w(device_t *device, int new_level) { speaker_state *sp = get_safe_token(device); int volume; diff --git a/src/emu/sound/speaker.h b/src/emu/sound/speaker.h index cd465441620..89a98108b28 100644 --- a/src/emu/sound/speaker.h +++ b/src/emu/sound/speaker.h @@ -21,7 +21,7 @@ struct _speaker_interface const INT16 *levels; /* optional: pointer to level lookup table */ }; -void speaker_level_w (running_device *device, int new_level); +void speaker_level_w (device_t *device, int new_level); DECLARE_LEGACY_SOUND_DEVICE(SPEAKER_SOUND, speaker_sound); diff --git a/src/emu/sound/st0016.c b/src/emu/sound/st0016.c index ac6c39bd6bb..3e942106a40 100644 --- a/src/emu/sound/st0016.c +++ b/src/emu/sound/st0016.c @@ -19,7 +19,7 @@ struct _st0016_state UINT8 regs[0x100]; }; -INLINE st0016_state *get_safe_token(running_device *device) +INLINE st0016_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ST0016); diff --git a/src/emu/sound/t6w28.c b/src/emu/sound/t6w28.c index 9008b657433..aa023e9204d 100644 --- a/src/emu/sound/t6w28.c +++ b/src/emu/sound/t6w28.c @@ -58,7 +58,7 @@ struct _t6w28_state }; -INLINE t6w28_state *get_safe_token(running_device *device) +INLINE t6w28_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == T6W28); @@ -305,7 +305,7 @@ static void t6w28_set_gain(t6w28_state *R,int gain) -static int t6w28_init(running_device *device, t6w28_state *R) +static int t6w28_init(device_t *device, t6w28_state *R) { int sample_rate = device->clock()/16; int i; diff --git a/src/emu/sound/tiaintf.c b/src/emu/sound/tiaintf.c index 36d8166c1dc..6f485396777 100644 --- a/src/emu/sound/tiaintf.c +++ b/src/emu/sound/tiaintf.c @@ -10,7 +10,7 @@ struct _tia_state void *chip; }; -INLINE tia_state *get_safe_token(running_device *device) +INLINE tia_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TIA); diff --git a/src/emu/sound/tms3615.c b/src/emu/sound/tms3615.c index ed598d8f0ee..afae523c58b 100644 --- a/src/emu/sound/tms3615.c +++ b/src/emu/sound/tms3615.c @@ -21,7 +21,7 @@ struct _tms_state { int enable; /* mask which tones to play */ }; -INLINE tms_state *get_safe_token(running_device *device) +INLINE tms_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS3615); @@ -80,7 +80,7 @@ static STREAM_UPDATE( tms3615_sound_update ) tms->enable = 0; } -void tms3615_enable_w(running_device *device, int enable) +void tms3615_enable_w(device_t *device, int enable) { tms_state *tms = get_safe_token(device); tms->enable = enable; diff --git a/src/emu/sound/tms3615.h b/src/emu/sound/tms3615.h index ffd5dc8db93..294ce98c22d 100644 --- a/src/emu/sound/tms3615.h +++ b/src/emu/sound/tms3615.h @@ -5,7 +5,7 @@ #include "devlegcy.h" -extern void tms3615_enable_w(running_device *device, int enable); +extern void tms3615_enable_w(device_t *device, int enable); #define TMS3615_FOOTAGE_8 0 #define TMS3615_FOOTAGE_16 1 diff --git a/src/emu/sound/tms36xx.c b/src/emu/sound/tms36xx.c index 4f856bd0640..c77a0f14747 100644 --- a/src/emu/sound/tms36xx.c +++ b/src/emu/sound/tms36xx.c @@ -341,7 +341,7 @@ static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4}; } -INLINE tms_state *get_safe_token(running_device *device) +INLINE tms_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS36XX); @@ -409,7 +409,7 @@ static void tms36xx_reset_counters(tms_state *tms) memset(tms->counter, 0, sizeof(tms->counter)); } -void mm6221aa_tune_w(running_device *device, int tune) +void mm6221aa_tune_w(device_t *device, int tune) { tms_state *tms = get_safe_token(device); @@ -428,7 +428,7 @@ void mm6221aa_tune_w(running_device *device, int tune) tms->tune_max = 96; /* fixed for now */ } -void tms36xx_note_w(running_device *device, int octave, int note) +void tms36xx_note_w(device_t *device, int octave, int note) { tms_state *tms = get_safe_token(device); @@ -487,7 +487,7 @@ static void tms3617_enable(tms_state *tms, int enable) LOG(("%s\n", bits ? "" : " none")); } -void tms3617_enable_w(running_device *device, int enable) +void tms3617_enable_w(device_t *device, int enable) { tms_state *tms = get_safe_token(device); tms3617_enable(tms, enable); diff --git a/src/emu/sound/tms36xx.h b/src/emu/sound/tms36xx.h index 2e9006d6cb1..54baad6688b 100644 --- a/src/emu/sound/tms36xx.h +++ b/src/emu/sound/tms36xx.h @@ -20,13 +20,13 @@ struct _tms36xx_interface }; /* MM6221AA interface functions */ -extern void mm6221aa_tune_w(running_device *device, int tune); +extern void mm6221aa_tune_w(device_t *device, int tune); /* TMS3615/17 interface functions */ -extern void tms36xx_note_w(running_device *device, int octave, int note); +extern void tms36xx_note_w(device_t *device, int octave, int note); /* TMS3617 interface functions */ -extern void tms3617_enable_w(running_device *device, int enable); +extern void tms3617_enable_w(device_t *device, int enable); DECLARE_LEGACY_SOUND_DEVICE(TMS36XX, tms36xx); diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index 8576e3f3884..558e8c680f6 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -114,8 +114,8 @@ struct _tms5110_state UINT8 addr_bit; /* external callback */ - int (*M0_callback)(running_device *); - void (*set_load_address)(running_device *, int); + int (*M0_callback)(device_t *); + void (*set_load_address)(device_t *, int); /* callbacks */ devcb_resolved_write_line m0_func; /* the M0 line */ @@ -125,7 +125,7 @@ struct _tms5110_state devcb_resolved_write_line romclk_func; /* rom clock - Only used to drive the data lines */ - running_device *device; + device_t *device; /* these contain data describing the current and previous voice frames */ UINT16 old_energy; @@ -184,7 +184,7 @@ struct _tmsprom_state devcb_resolved_write_line pdc_func; /* tms pdc func */ devcb_resolved_write8 ctl_func; /* tms ctl func */ - running_device *device; + device_t *device; emu_timer *romclk_timer; const tmsprom_interface *intf; @@ -195,7 +195,7 @@ struct _tmsprom_state -INLINE tms5110_state *get_safe_token(running_device *device) +INLINE tms5110_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS5110 || @@ -208,7 +208,7 @@ INLINE tms5110_state *get_safe_token(running_device *device) return (tms5110_state *)downcast(device)->token(); } -INLINE tmsprom_state *get_safe_token_prom(running_device *device) +INLINE tmsprom_state *get_safe_token_prom(device_t *device) { assert(device != NULL); assert(device->type() == TMSPROM); @@ -979,7 +979,7 @@ static const unsigned int example_word_TEN[619]={ #endif -static int speech_rom_read_bit(running_device *device) +static int speech_rom_read_bit(device_t *device) { tms5110_state *tms = get_safe_token(device); @@ -995,7 +995,7 @@ static int speech_rom_read_bit(running_device *device) return r; } -static void speech_rom_set_addr(running_device *device, int addr) +static void speech_rom_set_addr(device_t *device, int addr) { tms5110_state *tms = get_safe_token(device); @@ -1225,7 +1225,7 @@ READ8_DEVICE_HANDLER( m58817_status_r ) static TIMER_CALLBACK( romclk_hack_timer_cb ) { - tms5110_state *tms = get_safe_token((running_device *) ptr); + tms5110_state *tms = get_safe_token((device_t *) ptr); tms->romclk_hack_state = !tms->romclk_hack_state; } @@ -1253,7 +1253,7 @@ READ8_DEVICE_HANDLER( tms5110_romclk_hack_r ) ******************************************************************************/ -int tms5110_ready_r(running_device *device) +int tms5110_ready_r(device_t *device) { tms5110_state *tms = get_safe_token(device); @@ -1300,7 +1300,7 @@ static STREAM_UPDATE( tms5110_update ) ******************************************************************************/ -void tms5110_set_frequency(running_device *device, int frequency) +void tms5110_set_frequency(device_t *device, int frequency) { tms5110_state *tms = get_safe_token(device); stream_set_sample_rate(tms->stream, frequency / 80); @@ -1373,7 +1373,7 @@ static void update_prom_cnt(tmsprom_state *tms) static TIMER_CALLBACK( tmsprom_step ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; tmsprom_state *tms = get_safe_token_prom(device); /* only 16 bytes needed ... The original dump is bad. This diff --git a/src/emu/sound/tms5110.h b/src/emu/sound/tms5110.h index 0f94feb499d..6b18ee19262 100644 --- a/src/emu/sound/tms5110.h +++ b/src/emu/sound/tms5110.h @@ -25,8 +25,8 @@ typedef struct _tms5110_interface tms5110_interface; struct _tms5110_interface { /* legacy interface */ - int (*M0_callback)(running_device *device); /* function to be called when chip requests another bit */ - void (*load_address)(running_device *device, int addr); /* speech ROM load address callback */ + int (*M0_callback)(device_t *device); /* function to be called when chip requests another bit */ + void (*load_address)(device_t *device, int addr); /* speech ROM load address callback */ /* new rom controller interface */ devcb_write_line m0_func; /* the M0 line */ devcb_write_line m1_func; /* the M1 line */ @@ -52,9 +52,9 @@ READ8_DEVICE_HANDLER( tms5110_romclk_hack_r ); /* m58817 status line */ READ8_DEVICE_HANDLER( m58817_status_r ); -int tms5110_ready_r(running_device *device); +int tms5110_ready_r(device_t *device); -void tms5110_set_frequency(running_device *device, int frequency); +void tms5110_set_frequency(device_t *device, int frequency); DECLARE_LEGACY_SOUND_DEVICE(TMS5110, tms5110); DECLARE_LEGACY_SOUND_DEVICE(TMS5100, tms5100); diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index aed2eb9d35d..931843d9c2e 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -426,7 +426,7 @@ struct _tms5220_state TODO: add a way to set/reset this other than the FORCE_DIGITAL define */ UINT8 digital_select; - running_device *device; + device_t *device; const tms5220_interface *intf; sound_stream *stream; @@ -438,7 +438,7 @@ struct _tms5220_state #include "tms5110r.c" -INLINE tms5220_state *get_safe_token(running_device *device) +INLINE tms5220_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS5220 || @@ -1848,7 +1848,7 @@ READ_LINE_DEVICE_HANDLER( tms5220_readyq_r ) ***********************************************************************************************/ -double tms5220_time_to_ready(running_device *device) +double tms5220_time_to_ready(device_t *device) { tms5220_state *tms = get_safe_token(device); double cycles; @@ -1913,7 +1913,7 @@ static STREAM_UPDATE( tms5220_update ) ***********************************************************************************************/ -void tms5220_set_frequency(running_device *device, int frequency) +void tms5220_set_frequency(device_t *device, int frequency) { tms5220_state *tms = get_safe_token(device); stream_set_sample_rate(tms->stream, frequency / 80); diff --git a/src/emu/sound/tms5220.h b/src/emu/sound/tms5220.h index 3d140d1d4d7..713d02eb2f5 100644 --- a/src/emu/sound/tms5220.h +++ b/src/emu/sound/tms5220.h @@ -16,9 +16,9 @@ struct _tms5220_interface devcb_write_line irq_func; /* IRQ callback function, active low, i.e. state=0 */ devcb_write_line readyq_func; /* Ready callback function, active low, i.e. state=0 */ - int (*read)(running_device *device, int count); /* speech ROM read callback */ - void (*load_address)(running_device *device, int data); /* speech ROM load address callback */ - void (*read_and_branch)(running_device *device); /* speech ROM read and branch callback */ + int (*read)(device_t *device, int count); /* speech ROM read callback */ + void (*load_address)(device_t *device, int data); /* speech ROM load address callback */ + void (*read_and_branch)(device_t *device); /* speech ROM read and branch callback */ }; /* Control lines - once written to will switch interface into @@ -37,9 +37,9 @@ READ_LINE_DEVICE_HANDLER( tms5220_readyq_r ); READ_LINE_DEVICE_HANDLER( tms5220_intq_r ); -double tms5220_time_to_ready(running_device *device); +double tms5220_time_to_ready(device_t *device); -void tms5220_set_frequency(running_device *device, int frequency); +void tms5220_set_frequency(device_t *device, int frequency); DECLARE_LEGACY_SOUND_DEVICE(TMS5220C, tms5220c); DECLARE_LEGACY_SOUND_DEVICE(TMS5220, tms5220); diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index 21fe941523a..4bdc4ac1e60 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -147,7 +147,7 @@ enum typedef struct _upd7759_state upd7759_state; struct _upd7759_state { - running_device *device; + device_t *device; sound_stream *channel; /* stream channel for playback */ /* internal clock to output sample rate mapping */ @@ -161,7 +161,7 @@ struct _upd7759_state UINT8 reset; /* current state of the RESET line */ UINT8 start; /* current state of the START line */ UINT8 drq; /* current state of the DRQ line */ - void (*drqcallback)(running_device *device, int param); /* drq callback */ + void (*drqcallback)(device_t *device, int param); /* drq callback */ /* internal state machine */ INT8 state; /* current overall chip state */ @@ -221,7 +221,7 @@ static const int upd7759_state_table[16] = { -1, -1, 0, 0, 1, 2, 2, 3, -1, -1, 0 -INLINE upd7759_state *get_safe_token(running_device *device) +INLINE upd7759_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == UPD7759); @@ -600,7 +600,7 @@ static STATE_POSTLOAD( upd7759_postload ) } -static void register_for_save(upd7759_state *chip, running_device *device) +static void register_for_save(upd7759_state *chip, device_t *device) { state_save_register_device_item(device, 0, chip->pos); state_save_register_device_item(device, 0, chip->step); @@ -679,7 +679,7 @@ static DEVICE_START( upd7759 ) *************************************************************/ -void upd7759_reset_w(running_device *device, UINT8 data) +void upd7759_reset_w(device_t *device, UINT8 data) { /* update the reset value */ upd7759_state *chip = get_safe_token(device); @@ -694,7 +694,7 @@ void upd7759_reset_w(running_device *device, UINT8 data) upd7759_reset(chip); } -void upd7759_start_w(running_device *device, UINT8 data) +void upd7759_start_w(device_t *device, UINT8 data) { /* update the start value */ upd7759_state *chip = get_safe_token(device); @@ -726,7 +726,7 @@ WRITE8_DEVICE_HANDLER( upd7759_port_w ) } -int upd7759_busy_r(running_device *device) +int upd7759_busy_r(device_t *device) { /* return /BUSY */ upd7759_state *chip = get_safe_token(device); @@ -734,7 +734,7 @@ int upd7759_busy_r(running_device *device) } -void upd7759_set_bank_base(running_device *device, UINT32 base) +void upd7759_set_bank_base(device_t *device, UINT32 base) { upd7759_state *chip = get_safe_token(device); chip->rom = chip->rombase + base; diff --git a/src/emu/sound/upd7759.h b/src/emu/sound/upd7759.h index 435a4bbee25..6c8509f8d22 100644 --- a/src/emu/sound/upd7759.h +++ b/src/emu/sound/upd7759.h @@ -15,14 +15,14 @@ typedef struct _upd7759_interface upd7759_interface; struct _upd7759_interface { - void (*drqcallback)(running_device *device, int param); /* drq callback (per chip, slave mode only) */ + void (*drqcallback)(device_t *device, int param); /* drq callback (per chip, slave mode only) */ }; -void upd7759_set_bank_base(running_device *device, offs_t base); +void upd7759_set_bank_base(device_t *device, offs_t base); -void upd7759_reset_w(running_device *device, UINT8 data); -void upd7759_start_w(running_device *device, UINT8 data); -int upd7759_busy_r(running_device *device); +void upd7759_reset_w(device_t *device, UINT8 data); +void upd7759_start_w(device_t *device, UINT8 data); +int upd7759_busy_r(device_t *device); WRITE8_DEVICE_HANDLER( upd7759_port_w ); DECLARE_LEGACY_SOUND_DEVICE(UPD7759, upd7759); diff --git a/src/emu/sound/vlm5030.c b/src/emu/sound/vlm5030.c index 3e3f90bbebb..8da977a9359 100644 --- a/src/emu/sound/vlm5030.c +++ b/src/emu/sound/vlm5030.c @@ -123,7 +123,7 @@ chirp 12-..: vokume 0 : silent typedef struct _vlm5030_state vlm5030_state; struct _vlm5030_state { - running_device *device; + device_t *device; const vlm5030_interface *intf; sound_stream * channel; @@ -253,7 +253,7 @@ static const INT16 K5_table[] = { 0, -8127, -16384, -24511, 32638, 24511, 16254, 8127 }; -INLINE vlm5030_state *get_safe_token(running_device *device) +INLINE vlm5030_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == VLM5030); @@ -564,14 +564,14 @@ static DEVICE_RESET( vlm5030 ) /* set speech rom address */ -void vlm5030_set_rom(running_device *device, void *speech_rom) +void vlm5030_set_rom(device_t *device, void *speech_rom) { vlm5030_state *chip = get_safe_token(device); chip->rom = (UINT8 *)speech_rom; } /* get BSY pin level */ -int vlm5030_bsy(running_device *device) +int vlm5030_bsy(device_t *device) { vlm5030_state *chip = get_safe_token(device); vlm5030_update(chip); @@ -586,7 +586,7 @@ WRITE8_DEVICE_HANDLER( vlm5030_data_w ) } /* set RST pin level : reset / set table address A8-A15 */ -void vlm5030_rst (running_device *device, int pin ) +void vlm5030_rst (device_t *device, int pin ) { vlm5030_state *chip = get_safe_token(device); if( chip->pin_RST ) @@ -611,7 +611,7 @@ void vlm5030_rst (running_device *device, int pin ) } /* set VCU pin level : ?? unknown */ -void vlm5030_vcu(running_device *device, int pin) +void vlm5030_vcu(device_t *device, int pin) { vlm5030_state *chip = get_safe_token(device); /* direct mode / indirect mode */ @@ -620,7 +620,7 @@ void vlm5030_vcu(running_device *device, int pin) } /* set ST pin level : set table address A0-A7 / start speech */ -void vlm5030_st(running_device *device, int pin ) +void vlm5030_st(device_t *device, int pin ) { vlm5030_state *chip = get_safe_token(device); int table; diff --git a/src/emu/sound/vlm5030.h b/src/emu/sound/vlm5030.h index 5c0961c1ec0..2d1588f6780 100644 --- a/src/emu/sound/vlm5030.h +++ b/src/emu/sound/vlm5030.h @@ -12,18 +12,18 @@ struct _vlm5030_interface }; /* set speech rom address */ -void vlm5030_set_rom(running_device *device, void *speech_rom); +void vlm5030_set_rom(device_t *device, void *speech_rom); /* get BSY pin level */ -int vlm5030_bsy(running_device *device); +int vlm5030_bsy(device_t *device); /* latch contoll data */ WRITE8_DEVICE_HANDLER( vlm5030_data_w ); /* set RST pin level : reset / set table address A8-A15 */ -void vlm5030_rst (running_device *device, int pin ); +void vlm5030_rst (device_t *device, int pin ); /* set VCU pin level : ?? unknown */ -void vlm5030_vcu(running_device *device, int pin ); +void vlm5030_vcu(device_t *device, int pin ); /* set ST pin level : set table address A0-A7 / start speech */ -void vlm5030_st(running_device *device, int pin ); +void vlm5030_st(device_t *device, int pin ); DECLARE_LEGACY_SOUND_DEVICE(VLM5030, vlm5030); diff --git a/src/emu/sound/votrax.c b/src/emu/sound/votrax.c index bd27fd0a43b..f62e4b4ca49 100644 --- a/src/emu/sound/votrax.c +++ b/src/emu/sound/votrax.c @@ -24,7 +24,7 @@ the variable VotraxBaseFrequency, this is defaulted to 8000 typedef struct _votrax_state votrax_state; struct _votrax_state { - running_device *device; + device_t *device; int stream; int frequency; /* Some games (Qbert) change this */ int volume; @@ -38,7 +38,7 @@ struct _votrax_state loaded_samples *samples; }; -INLINE votrax_state *get_safe_token(running_device *device) +INLINE votrax_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == VOTRAX); @@ -150,7 +150,7 @@ WRITE8_DEVICE_HANDLER( votrax_w ) } } -int votrax_status_r(running_device *device) +int votrax_status_r(device_t *device) { votrax_state *info = get_safe_token(device); stream_update(info->channel); diff --git a/src/emu/sound/votrax.h b/src/emu/sound/votrax.h index e241bc26dc7..29e7e2dedb7 100644 --- a/src/emu/sound/votrax.h +++ b/src/emu/sound/votrax.h @@ -6,7 +6,7 @@ #include "devlegcy.h" WRITE8_DEVICE_HANDLER( votrax_w ); -int votrax_status_r(running_device *device); +int votrax_status_r(device_t *device); DECLARE_LEGACY_SOUND_DEVICE(VOTRAX, votrax); diff --git a/src/emu/sound/vrender0.c b/src/emu/sound/vrender0.c index 6ee4fe570b5..7a5642780b3 100644 --- a/src/emu/sound/vrender0.c +++ b/src/emu/sound/vrender0.c @@ -23,7 +23,7 @@ struct _vr0_state sound_stream * stream; }; -INLINE vr0_state *get_safe_token(running_device *device) +INLINE vr0_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == VRENDER0); @@ -94,7 +94,7 @@ static const unsigned short ULawTo16[]= #define LOOPEND(chan) (GETSOUNDREG32(chan,0x10)&0x3fffff) #define ENVVOL(chan) (GETSOUNDREG32(chan,0x04)&0xffffff) */ -void vr0_snd_set_areas(running_device *device,UINT32 *texture,UINT32 *frame) +void vr0_snd_set_areas(device_t *device,UINT32 *texture,UINT32 *frame) { vr0_state *VR0 = get_safe_token(device); VR0->TexBase=texture; diff --git a/src/emu/sound/vrender0.h b/src/emu/sound/vrender0.h index eb96852d296..a1a16fb8c1c 100644 --- a/src/emu/sound/vrender0.h +++ b/src/emu/sound/vrender0.h @@ -12,7 +12,7 @@ struct _vr0_interface UINT32 RegBase; }; -void vr0_snd_set_areas(running_device *device,UINT32 *texture,UINT32 *frame); +void vr0_snd_set_areas(device_t *device,UINT32 *texture,UINT32 *frame); READ32_DEVICE_HANDLER( vr0_snd_read ); WRITE32_DEVICE_HANDLER( vr0_snd_write ); diff --git a/src/emu/sound/x1_010.c b/src/emu/sound/x1_010.c index 235e08aadac..9803cf1aa30 100644 --- a/src/emu/sound/x1_010.c +++ b/src/emu/sound/x1_010.c @@ -98,7 +98,7 @@ struct _x1_010_state /* mixer tables and internal buffers */ //static short *mixer_buffer = NULL; -INLINE x1_010_state *get_safe_token(running_device *device) +INLINE x1_010_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == X1_010); @@ -221,7 +221,7 @@ static DEVICE_START( x1_010 ) } -void seta_sound_enable_w(running_device *device, int data) +void seta_sound_enable_w(device_t *device, int data) { x1_010_state *info = get_safe_token(device); info->sound_enable = data; diff --git a/src/emu/sound/x1_010.h b/src/emu/sound/x1_010.h index d071548fe61..06fa2600e9d 100644 --- a/src/emu/sound/x1_010.h +++ b/src/emu/sound/x1_010.h @@ -19,7 +19,7 @@ WRITE8_DEVICE_HANDLER( seta_sound_w ); READ16_DEVICE_HANDLER ( seta_sound_word_r ); WRITE16_DEVICE_HANDLER( seta_sound_word_w ); -void seta_sound_enable_w(running_device *device, int data); +void seta_sound_enable_w(device_t *device, int data); DECLARE_LEGACY_SOUND_DEVICE(X1_010, x1_010); diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c index 64aa7dfcacb..79d96dac131 100644 --- a/src/emu/sound/ym2151.c +++ b/src/emu/sound/ym2151.c @@ -163,10 +163,10 @@ typedef struct UINT32 noise_tab[32]; /* 17bit Noise Generator periods */ - void (*irqhandler)(running_device *device, int irq); /* IRQ function handler */ + void (*irqhandler)(device_t *device, int irq); /* IRQ function handler */ write8_device_func porthandler; /* port write function handler */ - running_device *device; + device_t *device; unsigned int clock; /* chip clock in Hz (passed from 2151intf.c) */ unsigned int sampfreq; /* sampling frequency in Hz (passed from 2151intf.c) */ } YM2151; @@ -1391,7 +1391,7 @@ STATE_POSTLOAD( ym2151_postload ) set_connect(YM2151_chip, &YM2151_chip->oper[j*4], j, YM2151_chip->connect[j]); } -static void ym2151_state_save_register( YM2151 *chip, running_device *device ) +static void ym2151_state_save_register( YM2151 *chip, device_t *device ) { int j; @@ -1493,7 +1493,7 @@ STATE_POSTLOAD( ym2151_postload ) { } -static void ym2151_state_save_register( YM2151 *chip, running_device *device ) +static void ym2151_state_save_register( YM2151 *chip, device_t *device ) { } #endif @@ -1506,7 +1506,7 @@ static void ym2151_state_save_register( YM2151 *chip, running_device *device ) * 'clock' is the chip clock in Hz * 'rate' is sampling rate */ -void * ym2151_init(running_device *device, int clock, int rate) +void * ym2151_init(device_t *device, int clock, int rate) { YM2151 *PSG; @@ -2488,7 +2488,7 @@ void ym2151_update_one(void *chip, SAMP **buffers, int length) } } -void ym2151_set_irq_handler(void *chip, void(*handler)(running_device *device, int irq)) +void ym2151_set_irq_handler(void *chip, void(*handler)(device_t *device, int irq)) { YM2151 *PSG = (YM2151 *)chip; PSG->irqhandler = handler; diff --git a/src/emu/sound/ym2151.h b/src/emu/sound/ym2151.h index 162a8ce3b2b..e0a1a4ae53a 100644 --- a/src/emu/sound/ym2151.h +++ b/src/emu/sound/ym2151.h @@ -54,7 +54,7 @@ typedef stream_sample_t SAMP; ** 'clock' is the chip clock in Hz ** 'rate' is sampling rate */ -void *ym2151_init(running_device *device, int clock, int rate); +void *ym2151_init(device_t *device, int clock, int rate); /* shutdown the YM2151 emulators*/ void ym2151_shutdown(void *chip); @@ -78,7 +78,7 @@ void ym2151_write_reg(void *chip, int r, int v); int ym2151_read_status(void *chip); /* set interrupt handler on YM2151 chip number 'n'*/ -void ym2151_set_irq_handler(void *chip, void (*handler)(running_device *device, int irq)); +void ym2151_set_irq_handler(void *chip, void (*handler)(device_t *device, int irq)); /* set port write handler on YM2151 chip number 'n'*/ void ym2151_set_port_write_handler(void *chip, write8_device_func handler); diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c index e0e10dd29d0..5e05cc77bd8 100644 --- a/src/emu/sound/ym2413.c +++ b/src/emu/sound/ym2413.c @@ -267,7 +267,7 @@ typedef struct int clock; /* master clock (Hz) */ int rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ - running_device *device; + device_t *device; signed int output[2]; signed int outchan; @@ -1254,7 +1254,7 @@ static void OPLCloseTable( void ) } -static void OPLL_init_save(YM2413 *chip, running_device *device) +static void OPLL_init_save(YM2413 *chip, device_t *device) { int chnum; @@ -1326,7 +1326,7 @@ static void OPLL_init_save(YM2413 *chip, running_device *device) } -static void OPLL_initalize(YM2413 *chip, running_device *device) +static void OPLL_initalize(YM2413 *chip, device_t *device) { int i; @@ -1922,7 +1922,7 @@ static TIMER_CALLBACK( cymfile_callback ) } /* lock/unlock for common table */ -static int OPLL_LockTable(running_device *device) +static int OPLL_LockTable(device_t *device) { num_lock++; if(num_lock>1) return 0; @@ -2004,7 +2004,7 @@ static void OPLLResetChip(YM2413 *chip) /* Create one of virtual YM2413 */ /* 'clock' is chip clock in Hz */ /* 'rate' is sampling rate */ -static YM2413 *OPLLCreate(running_device *device, int clock, int rate) +static YM2413 *OPLLCreate(device_t *device, int clock, int rate) { YM2413 *chip; @@ -2068,7 +2068,7 @@ static unsigned char OPLLRead(YM2413 *chip,int a) -void * ym2413_init(running_device *device, int clock, int rate) +void * ym2413_init(device_t *device, int clock, int rate) { /* emulator create */ return OPLLCreate(device, clock, rate); diff --git a/src/emu/sound/ym2413.h b/src/emu/sound/ym2413.h index 09f950b5e52..2482d35109e 100644 --- a/src/emu/sound/ym2413.h +++ b/src/emu/sound/ym2413.h @@ -29,7 +29,7 @@ typedef INT8 SAMP; -void *ym2413_init(running_device *device, int clock, int rate); +void *ym2413_init(device_t *device, int clock, int rate); void ym2413_shutdown(void *chip); void ym2413_reset_chip(void *chip); void ym2413_write(void *chip, int a, int v); diff --git a/src/emu/sound/ymdeltat.c b/src/emu/sound/ymdeltat.c index 096569b0ff3..951a9f59a88 100644 --- a/src/emu/sound/ymdeltat.c +++ b/src/emu/sound/ymdeltat.c @@ -453,7 +453,7 @@ void YM_DELTAT_postload(YM_DELTAT *DELTAT,UINT8 *regs) DELTAT->now_data = *(DELTAT->memory + (DELTAT->now_addr>>1) ); } -void YM_DELTAT_savestate(running_device *device,YM_DELTAT *DELTAT) +void YM_DELTAT_savestate(device_t *device,YM_DELTAT *DELTAT) { #ifdef __STATE_H__ state_save_register_device_item(device, 0, DELTAT->portstate); diff --git a/src/emu/sound/ymdeltat.h b/src/emu/sound/ymdeltat.h index 72b19dd4f58..6806a531f83 100644 --- a/src/emu/sound/ymdeltat.h +++ b/src/emu/sound/ymdeltat.h @@ -79,6 +79,6 @@ void YM_DELTAT_ADPCM_Reset(YM_DELTAT *DELTAT,int pan,int emulation_mode); void YM_DELTAT_ADPCM_CALC(YM_DELTAT *DELTAT); void YM_DELTAT_postload(YM_DELTAT *DELTAT,UINT8 *regs); -void YM_DELTAT_savestate(running_device *device,YM_DELTAT *DELTAT); +void YM_DELTAT_savestate(device_t *device,YM_DELTAT *DELTAT); #endif /* __YMDELTAT_H__ */ diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c index 3c14d670135..cafd3f147e0 100644 --- a/src/emu/sound/ymf262.c +++ b/src/emu/sound/ymf262.c @@ -277,7 +277,7 @@ typedef struct int rate; /* sampling rate (Hz) */ double freqbase; /* frequency base */ attotime TimerBase; /* Timer base time (==sampling time)*/ - running_device *device; + device_t *device; } OPL3; @@ -2251,7 +2251,7 @@ static TIMER_CALLBACK( cymfile_callback ) } /* lock/unlock for common table */ -static int OPL3_LockTable(running_device *device) +static int OPL3_LockTable(device_t *device) { num_lock++; if(num_lock>1) return 0; @@ -2334,7 +2334,7 @@ static void OPL3ResetChip(OPL3 *chip) /* Create one of virtual YMF262 */ /* 'clock' is chip clock in Hz */ /* 'rate' is sampling rate */ -static OPL3 *OPL3Create(running_device *device, int clock, int rate, int type) +static OPL3 *OPL3Create(device_t *device, int clock, int rate, int type) { OPL3 *chip; @@ -2461,7 +2461,7 @@ static int OPL3TimerOver(OPL3 *chip,int c) -void * ymf262_init(running_device *device, int clock, int rate) +void * ymf262_init(device_t *device, int clock, int rate) { return OPL3Create(device,clock,rate,OPL3_TYPE_YMF262); } diff --git a/src/emu/sound/ymf262.h b/src/emu/sound/ymf262.h index 4320ac957fa..e00f9799e44 100644 --- a/src/emu/sound/ymf262.h +++ b/src/emu/sound/ymf262.h @@ -32,7 +32,7 @@ typedef void (*OPL3_IRQHANDLER)(void *param,int irq); typedef void (*OPL3_UPDATEHANDLER)(void *param,int min_interval_us); -void *ymf262_init(running_device *device, int clock, int rate); +void *ymf262_init(device_t *device, int clock, int rate); void ymf262_shutdown(void *chip); void ymf262_reset_chip(void *chip); int ymf262_write(void *chip, int a, int v); diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index 493aca0a26e..75f93579d22 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -108,11 +108,11 @@ typedef struct const UINT8 *rom; devcb_resolved_read8 ext_mem_read; devcb_resolved_write8 ext_mem_write; - void (*irq_callback)(running_device *, int); + void (*irq_callback)(device_t *, int); UINT32 clock; sound_stream * stream; - running_device *device; + device_t *device; } YMF271Chip; // slot mapping assists @@ -272,7 +272,7 @@ static int channel_attenuation[16]; static int total_level[128]; static int env_volume_table[256]; -INLINE YMF271Chip *get_safe_token(running_device *device) +INLINE YMF271Chip *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YMF271); @@ -1676,7 +1676,7 @@ static void init_tables(running_machine *machine) } } -static void init_state(YMF271Chip *chip, running_device *device) +static void init_state(YMF271Chip *chip, device_t *device) { int i; @@ -1751,7 +1751,7 @@ static void init_state(YMF271Chip *chip, running_device *device) state_save_register_device_item(device, 0, chip->ext_read); } -static void ymf271_init(running_device *device, YMF271Chip *chip, UINT8 *rom, void (*cb)(running_device *,int), const devcb_read8 *ext_read, const devcb_write8 *ext_write) +static void ymf271_init(device_t *device, YMF271Chip *chip, UINT8 *rom, void (*cb)(device_t *,int), const devcb_read8 *ext_read, const devcb_write8 *ext_write) { chip->timA = timer_alloc(device->machine, ymf271_timer_a_tick, chip); chip->timB = timer_alloc(device->machine, ymf271_timer_b_tick, chip); diff --git a/src/emu/sound/ymf271.h b/src/emu/sound/ymf271.h index 284cfc9d16a..45bb20b8a53 100644 --- a/src/emu/sound/ymf271.h +++ b/src/emu/sound/ymf271.h @@ -11,7 +11,7 @@ struct _ymf271_interface { devcb_read8 ext_read; /* external memory read */ devcb_write8 ext_write; /* external memory write */ - void (*irq_callback)(running_device *device, int state); /* irq callback */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ }; READ8_DEVICE_HANDLER( ymf271_r ); diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c index 576a2bd6265..1947235d4d8 100644 --- a/src/emu/sound/ymf278b.c +++ b/src/emu/sound/ymf278b.c @@ -116,8 +116,8 @@ typedef struct int irq_line; UINT8 port_A, port_B, port_C; - void (*irq_callback)(running_device *, int); - running_device *device; + void (*irq_callback)(device_t *, int); + device_t *device; const UINT8 *rom; int clock; @@ -129,7 +129,7 @@ typedef struct sound_stream * stream; } YMF278BChip; -INLINE YMF278BChip *get_safe_token(running_device *device) +INLINE YMF278BChip *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YMF278B); @@ -663,7 +663,7 @@ WRITE8_DEVICE_HANDLER( ymf278b_w ) } } -static void ymf278b_init(running_device *device, YMF278BChip *chip, void (*cb)(running_device *, int)) +static void ymf278b_init(device_t *device, YMF278BChip *chip, void (*cb)(device_t *, int)) { chip->rom = *device->region(); chip->irq_callback = cb; @@ -673,7 +673,7 @@ static void ymf278b_init(running_device *device, YMF278BChip *chip, void (*cb)(r chip->clock = device->clock(); } -static void ymf278b_register_save_state(running_device *device, YMF278BChip *chip) +static void ymf278b_register_save_state(device_t *device, YMF278BChip *chip) { int i; diff --git a/src/emu/sound/ymf278b.h b/src/emu/sound/ymf278b.h index 9efb554c070..e7918cbe5a5 100644 --- a/src/emu/sound/ymf278b.h +++ b/src/emu/sound/ymf278b.h @@ -11,7 +11,7 @@ typedef struct _ymf278b_interface ymf278b_interface; struct _ymf278b_interface { - void (*irq_callback)(running_device *device, int state); /* irq callback */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ }; READ8_DEVICE_HANDLER( ymf278b_r ); diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c index 71d9f9d8ed1..959f8dab7b1 100644 --- a/src/emu/sound/ymz280b.c +++ b/src/emu/sound/ymz280b.c @@ -87,7 +87,7 @@ struct _ymz280b_state UINT8 irq_enable; /* current IRQ enable */ UINT8 keyon_enable; /* key on enable */ double master_clock; /* master clock frequency */ - void (*irq_callback)(running_device *, int); /* IRQ callback */ + void (*irq_callback)(device_t *, int); /* IRQ callback */ struct YMZ280BVoice voice[8]; /* the 8 voices */ UINT32 rom_readback_addr; /* where the CPU can read the ROM */ devcb_resolved_read8 ext_ram_read; /* external RAM read handler */ @@ -98,7 +98,7 @@ struct _ymz280b_state #endif INT16 *scratch; - running_device *device; + device_t *device; }; /* step size index shift table */ @@ -130,7 +130,7 @@ static const timer_fired_func update_irq_state_cb[] = }; -INLINE ymz280b_state *get_safe_token(running_device *device) +INLINE ymz280b_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == YMZ280B); diff --git a/src/emu/sound/ymz280b.h b/src/emu/sound/ymz280b.h index 9f3b06c4174..18b9eec4ef0 100644 --- a/src/emu/sound/ymz280b.h +++ b/src/emu/sound/ymz280b.h @@ -16,7 +16,7 @@ typedef struct _ymz280b_interface ymz280b_interface; struct _ymz280b_interface { - void (*irq_callback)(running_device *device, int state); /* irq callback */ + void (*irq_callback)(device_t *device, int state); /* irq callback */ devcb_read8 ext_read; /* external RAM read */ devcb_write8 ext_write; /* external RAM write */ }; diff --git a/src/emu/sound/zsg2.c b/src/emu/sound/zsg2.c index 15d5581fd11..6cc76c5bb98 100644 --- a/src/emu/sound/zsg2.c +++ b/src/emu/sound/zsg2.c @@ -66,7 +66,7 @@ struct _zsg2_state sound_stream *stream; }; -INLINE zsg2_state *get_safe_token(running_device *device) +INLINE zsg2_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ZSG2); diff --git a/src/emu/video/hd63484.c b/src/emu/video/hd63484.c index f532b3be7a4..31e024e8114 100644 --- a/src/emu/video/hd63484.c +++ b/src/emu/video/hd63484.c @@ -52,7 +52,7 @@ struct _hd63484_state INLINE FUNCTIONS *****************************************************************************/ -INLINE hd63484_state *get_safe_token( running_device *device ) +INLINE hd63484_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == HD63484); @@ -60,7 +60,7 @@ INLINE hd63484_state *get_safe_token( running_device *device ) return (hd63484_state *)downcast(device)->token(); } -INLINE const hd63484_interface *get_interface( running_device *device ) +INLINE const hd63484_interface *get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == HD63484); @@ -71,7 +71,7 @@ INLINE const hd63484_interface *get_interface( running_device *device ) IMPLEMENTATION *****************************************************************************/ -static int get_pixel(running_device *device, int x, int y); +static int get_pixel(device_t *device, int x, int y); static const int instruction_length[64] = { @@ -113,7 +113,7 @@ static const char *const instruction_name[64] = "RGCPY","RGCPY","RGCPY","RGCPY" /* Fx */ }; -static void doclr16( running_device *device, int opcode, UINT16 fill, int *dst, INT16 _ax, INT16 _ay ) +static void doclr16( device_t *device, int opcode, UINT16 fill, int *dst, INT16 _ax, INT16 _ay ) { hd63484_state *hd63484 = get_safe_token(device); INT16 ax,ay; @@ -172,7 +172,7 @@ static void doclr16( running_device *device, int opcode, UINT16 fill, int *dst, } } -static void docpy16( running_device *device, int opcode, int src, int *dst, INT16 _ax, INT16 _ay ) +static void docpy16( device_t *device, int opcode, int src, int *dst, INT16 _ax, INT16 _ay ) { hd63484_state *hd63484 = get_safe_token(device); int dstep1,dstep2; @@ -301,7 +301,7 @@ static void docpy16( running_device *device, int opcode, int src, int *dst, INT1 } } -static int org_first_pixel( running_device *device, int _org_dpd ) +static int org_first_pixel( device_t *device, int _org_dpd ) { hd63484_state *hd63484 = get_safe_token(device); int gbm = (hd63484->reg[0x02/2] & 0x700) >> 8; @@ -325,7 +325,7 @@ static int org_first_pixel( running_device *device, int _org_dpd ) } } -static void dot( running_device *device, int x, int y, int opm, UINT16 color ) +static void dot( device_t *device, int x, int y, int opm, UINT16 color ) { hd63484_state *hd63484 = get_safe_token(device); int dst, x_int, x_mod, bpp; @@ -420,7 +420,7 @@ static void dot( running_device *device, int x, int y, int opm, UINT16 color ) } } -static int get_pixel( running_device *device, int x, int y ) +static int get_pixel( device_t *device, int x, int y ) { hd63484_state *hd63484 = get_safe_token(device); int dst, x_int, x_mod, bpp; @@ -476,7 +476,7 @@ static int get_pixel( running_device *device, int x, int y ) return ((hd63484->ram[dst] & bitmask_shifted) >> (x_mod * bpp)); } -static int get_pixel_ptn( running_device *device, int x, int y ) +static int get_pixel_ptn( device_t *device, int x, int y ) { hd63484_state *hd63484 = get_safe_token(device); int dst, x_int, x_mod, bpp; @@ -510,7 +510,7 @@ static int get_pixel_ptn( running_device *device, int x, int y ) return 0; } -static void agcpy( running_device *device, int opcode, int src_x, int src_y, int dst_x, int dst_y, INT16 _ax, INT16 _ay ) +static void agcpy( device_t *device, int opcode, int src_x, int src_y, int dst_x, int dst_y, INT16 _ax, INT16 _ay ) { int dst_step1_x,dst_step1_y,dst_step2_x,dst_step2_y; int src_step1_x,src_step1_y,src_step2_x,src_step2_y; @@ -670,7 +670,7 @@ static void agcpy( running_device *device, int opcode, int src_x, int src_y, int } } -static void ptn( running_device *device, int opcode, int src_x, int src_y, INT16 _ax, INT16 _ay ) +static void ptn( device_t *device, int opcode, int src_x, int src_y, INT16 _ax, INT16 _ay ) { hd63484_state *hd63484 = get_safe_token(device); int dst_step1_x = 0,dst_step1_y = 0,dst_step2_x = 0,dst_step2_y = 0; @@ -837,7 +837,7 @@ static void ptn( running_device *device, int opcode, int src_x, int src_y, INT16 } } -static void line( running_device *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, INT16 col ) +static void line( device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, INT16 col ) { hd63484_state *hd63484 = get_safe_token(device); INT16 ax,ay; @@ -889,7 +889,7 @@ static void line( running_device *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey } -static void circle( running_device *device, INT16 sx, INT16 sy, UINT16 r, INT16 col ) +static void circle( device_t *device, INT16 sx, INT16 sy, UINT16 r, INT16 col ) { const float DEG2RAD = 3.14159f/180; hd63484_state *hd63484 = get_safe_token(device); @@ -902,7 +902,7 @@ static void circle( running_device *device, INT16 sx, INT16 sy, UINT16 r, INT16 } } -static void paint( running_device *device, int sx, int sy, int col ) +static void paint( device_t *device, int sx, int sy, int col ) { hd63484_state *hd63484 = get_safe_token(device); int getpixel; @@ -1013,7 +1013,7 @@ static void paint( running_device *device, int sx, int sy, int col ) } } -static void hd63484_command_w(running_device *device, UINT16 cmd) +static void hd63484_command_w(device_t *device, UINT16 cmd) { hd63484_state *hd63484 = get_safe_token(device); int len; diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 5d42795d214..8a6d8467f70 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -163,7 +163,7 @@ const mc6845_interface mc6845_null_interface = { 0 }; /* makes sure that the passed in device is the right type */ -INLINE mc6845_t *get_safe_token(running_device *device) +INLINE mc6845_t *get_safe_token(device_t *device) { assert(device != NULL); assert((device->type() == MC6845) || @@ -187,7 +187,7 @@ static STATE_POSTLOAD( mc6845_state_save_postload ) static TIMER_CALLBACK( on_update_address_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); int addr = (param >> 8); int strobe = (param & 0xff); @@ -203,7 +203,7 @@ static TIMER_CALLBACK( on_update_address_cb ) } } -INLINE void call_on_update_address(running_device *device, int strobe) +INLINE void call_on_update_address(device_t *device, int strobe) { mc6845_t *mc6845 = get_safe_token(device); @@ -525,7 +525,7 @@ static void update_upd_adr_timer(mc6845_t *mc6845) static TIMER_CALLBACK( upd_adr_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; /* fire a update address strobe */ call_on_update_address(device, 0); @@ -534,7 +534,7 @@ static TIMER_CALLBACK( upd_adr_timer_cb ) static TIMER_CALLBACK( de_off_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); mc6845_set_de( mc6845, FALSE ); @@ -543,7 +543,7 @@ static TIMER_CALLBACK( de_off_timer_cb ) static TIMER_CALLBACK( cur_on_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); mc6845_set_cur( mc6845, TRUE ); @@ -555,7 +555,7 @@ static TIMER_CALLBACK( cur_on_timer_cb ) static TIMER_CALLBACK( cur_off_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); mc6845_set_cur( mc6845, FALSE ); @@ -564,7 +564,7 @@ static TIMER_CALLBACK( cur_off_timer_cb ) static TIMER_CALLBACK( hsync_on_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); UINT8 hsync_width = ( mc6845->sync_width & 0x0f ) ? ( mc6845->sync_width & 0x0f ) : 0x10; @@ -578,7 +578,7 @@ static TIMER_CALLBACK( hsync_on_timer_cb ) static TIMER_CALLBACK( hsync_off_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); mc6845_set_hsync( mc6845, FALSE ); @@ -587,7 +587,7 @@ static TIMER_CALLBACK( hsync_off_timer_cb ) static TIMER_CALLBACK( line_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); int new_vsync = mc6845->vsync; @@ -696,7 +696,7 @@ static TIMER_CALLBACK( line_timer_cb ) } -UINT16 mc6845_get_ma(running_device *device) +UINT16 mc6845_get_ma(device_t *device) { mc6845_t *mc6845 = get_safe_token(device); @@ -706,7 +706,7 @@ UINT16 mc6845_get_ma(running_device *device) } -UINT8 mc6845_get_ra(running_device *device) +UINT8 mc6845_get_ra(device_t *device) { mc6845_t *mc6845 = get_safe_token(device); @@ -716,7 +716,7 @@ UINT8 mc6845_get_ra(running_device *device) static TIMER_CALLBACK( light_pen_latch_timer_cb ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; mc6845_t *mc6845 = get_safe_token(device); mc6845->light_pen_addr = mc6845_get_ma(device); @@ -724,7 +724,7 @@ static TIMER_CALLBACK( light_pen_latch_timer_cb ) } -void mc6845_assert_light_pen_input(running_device *device) +void mc6845_assert_light_pen_input(device_t *device) { mc6845_t *mc6845 = get_safe_token(device); @@ -734,7 +734,7 @@ void mc6845_assert_light_pen_input(running_device *device) } -void mc6845_set_clock(running_device *device, int clock) +void mc6845_set_clock(device_t *device, int clock) { mc6845_t *mc6845 = get_safe_token(device); @@ -749,7 +749,7 @@ void mc6845_set_clock(running_device *device, int clock) } -void mc6845_set_hpixels_per_column(running_device *device, int hpixels_per_column) +void mc6845_set_hpixels_per_column(device_t *device, int hpixels_per_column) { mc6845_t *mc6845 = get_safe_token(device); @@ -795,7 +795,7 @@ static void update_cursor_state(mc6845_t *mc6845) } -void mc6845_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void mc6845_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { mc6845_t *mc6845 = get_safe_token(device); assert(bitmap != NULL); @@ -854,7 +854,7 @@ void mc6845_update(running_device *device, bitmap_t *bitmap, const rectangle *cl /* device interface */ -static void common_start(running_device *device, int device_type) +static void common_start(device_t *device, int device_type) { mc6845_t *mc6845 = get_safe_token(device); diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index e65d6e7f5a8..b29c0a68572 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -28,21 +28,21 @@ DECLARE_LEGACY_DEVICE(SY6845E, sy6845e); /* callback definitions */ -typedef void * (*mc6845_begin_update_func)(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -#define MC6845_BEGIN_UPDATE(name) void *name(running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +typedef void * (*mc6845_begin_update_func)(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +#define MC6845_BEGIN_UPDATE(name) void *name(device_t *device, bitmap_t *bitmap, const rectangle *cliprect) -typedef void (*mc6845_update_row_func)(running_device *device, bitmap_t *bitmap, +typedef void (*mc6845_update_row_func)(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param); -#define MC6845_UPDATE_ROW(name) void name(running_device *device, bitmap_t *bitmap, \ +#define MC6845_UPDATE_ROW(name) void name(device_t *device, bitmap_t *bitmap, \ const rectangle *cliprect, UINT16 ma, UINT8 ra, \ UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) -typedef void (*mc6845_end_update_func)(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, void *param); -#define MC6845_END_UPDATE(name) void name(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, void *param) +typedef void (*mc6845_end_update_func)(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, void *param); +#define MC6845_END_UPDATE(name) void name(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, void *param) -typedef void (*mc6845_on_update_addr_changed_func)(running_device *device, int address, int strobe); -#define MC6845_ON_UPDATE_ADDR_CHANGED(name) void name(running_device *device, int address, int strobe) +typedef void (*mc6845_on_update_addr_changed_func)(device_t *device, int address, int strobe); +#define MC6845_ON_UPDATE_ADDR_CHANGED(name) void name(device_t *device, int address, int strobe) /* interface */ typedef struct _mc6845_interface mc6845_interface; @@ -100,23 +100,23 @@ READ8_DEVICE_HANDLER( mc6845_register_r ); WRITE8_DEVICE_HANDLER( mc6845_register_w ); /* return the current value on the MA0-MA13 pins */ -UINT16 mc6845_get_ma(running_device *device); +UINT16 mc6845_get_ma(device_t *device); /* return the current value on the RA0-RA4 pins */ -UINT8 mc6845_get_ra(running_device *device); +UINT8 mc6845_get_ra(device_t *device); /* simulates the LO->HI clocking of the light pen pin (pin 3) */ -void mc6845_assert_light_pen_input(running_device *device); +void mc6845_assert_light_pen_input(device_t *device); /* set the clock (pin 21) of the chip */ -void mc6845_set_clock(running_device *device, int clock); +void mc6845_set_clock(device_t *device, int clock); /* set number of pixels per video memory address */ -void mc6845_set_hpixels_per_column(running_device *device, int hpixels_per_column); +void mc6845_set_hpixels_per_column(device_t *device, int hpixels_per_column); /* updates the screen -- this will call begin_update(), followed by update_row() reapeatedly and after all row updating is complete, end_update() */ -void mc6845_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); +void mc6845_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); #endif diff --git a/src/emu/video/s2636.c b/src/emu/video/s2636.c index d3f364d0e47..9ad1cd6f5c3 100644 --- a/src/emu/video/s2636.c +++ b/src/emu/video/s2636.c @@ -114,7 +114,7 @@ struct _s2636_state * *************************************/ -INLINE s2636_state *get_safe_token( running_device *device ) +INLINE s2636_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == S2636); @@ -122,7 +122,7 @@ INLINE s2636_state *get_safe_token( running_device *device ) return (s2636_state *)downcast(device)->token(); } -INLINE const s2636_interface *get_interface( running_device *device ) +INLINE const s2636_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == S2636)); @@ -190,7 +190,7 @@ static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or * *************************************/ -static int check_collision( running_device *device, int spriteno1, int spriteno2, const rectangle *cliprect ) +static int check_collision( device_t *device, int spriteno1, int spriteno2, const rectangle *cliprect ) { s2636_state *s2636 = get_safe_token(device); int checksum = 0; @@ -254,7 +254,7 @@ static int check_collision( running_device *device, int spriteno1, int spriteno2 * *************************************/ -bitmap_t *s2636_update( running_device *device, const rectangle *cliprect ) +bitmap_t *s2636_update( device_t *device, const rectangle *cliprect ) { s2636_state *s2636 = get_safe_token(device); UINT8 collision = 0; diff --git a/src/emu/video/s2636.h b/src/emu/video/s2636.h index d46d391a6d8..fe314b17415 100644 --- a/src/emu/video/s2636.h +++ b/src/emu/video/s2636.h @@ -53,7 +53,7 @@ DECLARE_LEGACY_DEVICE(S2636, s2636); D0-D2 of each pixel is the pixel color D3 indicates whether the S2636 drew this pixel - 0 = not drawn, 1 = drawn */ -bitmap_t *s2636_update( running_device *device, const rectangle *cliprect ); +bitmap_t *s2636_update( device_t *device, const rectangle *cliprect ); WRITE8_DEVICE_HANDLER( s2636_work_ram_w ); READ8_DEVICE_HANDLER( s2636_work_ram_r ); diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c index 9c14bcf4892..0a3f7d606b3 100644 --- a/src/emu/video/saa5050.c +++ b/src/emu/video/saa5050.c @@ -34,7 +34,7 @@ typedef struct _saa5050_state saa5050_state; struct _saa5050_state { - running_device *screen; + device_t *screen; int gfxnum; int x, y; int size; @@ -56,7 +56,7 @@ struct _saa5050_state * *************************************/ -INLINE saa5050_state *get_safe_token( running_device *device ) +INLINE saa5050_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == SAA5050); @@ -64,7 +64,7 @@ INLINE saa5050_state *get_safe_token( running_device *device ) return (saa5050_state *)downcast(device)->token(); } -INLINE const saa5050_interface *get_interface( running_device *device ) +INLINE const saa5050_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == SAA5050)); @@ -197,7 +197,7 @@ READ8_DEVICE_HANDLER( saa5050_videoram_r ) /* this should probably be put at the end of saa5050 update, but p2000t in MESS does not seem to currently support it. Hence, we leave it independent for the moment */ -void saa5050_frame_advance( running_device *device ) +void saa5050_frame_advance( device_t *device ) { saa5050_state *saa5050 = get_safe_token(device); @@ -206,7 +206,7 @@ void saa5050_frame_advance( running_device *device ) saa5050->frame_count = 0; } -void saa5050_update( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void saa5050_update( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { saa5050_state *saa5050 = get_safe_token(device); int code, colour; diff --git a/src/emu/video/saa5050.h b/src/emu/video/saa5050.h index ffedce6046f..989e40ae8a8 100644 --- a/src/emu/video/saa5050.h +++ b/src/emu/video/saa5050.h @@ -41,8 +41,8 @@ DECLARE_LEGACY_DEVICE(SAA5050, saa5050); DEVICE I/O FUNCTIONS ***************************************************************************/ -void saa5050_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void saa5050_frame_advance(running_device *device); +void saa5050_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void saa5050_frame_advance(device_t *device); GFXDECODE_EXTERN( saa5050 ); PALETTE_INIT( saa5050 ); diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index 4f0d82a330a..5e36420e2a8 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -42,7 +42,7 @@ struct _tlc34076_state * *************************************/ -INLINE tlc34076_state *get_safe_token( running_device *device ) +INLINE tlc34076_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TLC34076); @@ -56,7 +56,7 @@ INLINE tlc34076_state *get_safe_token( running_device *device ) * *************************************/ -const pen_t *tlc34076_get_pens(running_device *device) +const pen_t *tlc34076_get_pens(device_t *device) { tlc34076_state *state = get_safe_token(device); offs_t i; diff --git a/src/emu/video/tlc34076.h b/src/emu/video/tlc34076.h index 8539b80b06e..618b6876893 100644 --- a/src/emu/video/tlc34076.h +++ b/src/emu/video/tlc34076.h @@ -10,7 +10,7 @@ #define TLC34076_6_BIT 0 #define TLC34076_8_BIT 1 -const pen_t *tlc34076_get_pens(running_device *device); +const pen_t *tlc34076_get_pens(device_t *device); /*************************************************************************** diff --git a/src/emu/video/tms9927.c b/src/emu/video/tms9927.c index a372c2ca69d..1dd40b516e5 100644 --- a/src/emu/video/tms9927.c +++ b/src/emu/video/tms9927.c @@ -60,7 +60,7 @@ const tms9927_interface tms9927_null_interface = { 0 }; /* makes sure that the passed in device is the right type */ -INLINE tms9927_state *get_safe_token(running_device *device) +INLINE tms9927_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TMS9927); @@ -74,7 +74,7 @@ static STATE_POSTLOAD( tms9927_state_save_postload ) } -static void generic_access(running_device *device, offs_t offset) +static void generic_access(device_t *device, offs_t offset) { tms9927_state *tms = get_safe_token(device); @@ -174,21 +174,21 @@ READ8_DEVICE_HANDLER( tms9927_r ) } -int tms9927_screen_reset(running_device *device) +int tms9927_screen_reset(device_t *device) { tms9927_state *tms = get_safe_token(device); return tms->reset; } -int tms9927_upscroll_offset(running_device *device) +int tms9927_upscroll_offset(device_t *device) { tms9927_state *tms = get_safe_token(device); return tms->start_datarow; } -int tms9927_cursor_bounds(running_device *device, rectangle *bounds) +int tms9927_cursor_bounds(device_t *device, rectangle *bounds) { tms9927_state *tms = get_safe_token(device); int cursorx = CURSOR_CHAR_ADDRESS(tms); diff --git a/src/emu/video/tms9927.h b/src/emu/video/tms9927.h index 81ae2da2bb6..17d38e6f89f 100644 --- a/src/emu/video/tms9927.h +++ b/src/emu/video/tms9927.h @@ -47,9 +47,9 @@ WRITE8_DEVICE_HANDLER( tms9927_w ); READ8_DEVICE_HANDLER( tms9927_r ); /* other queries */ -int tms9927_screen_reset(running_device *device); -int tms9927_upscroll_offset(running_device *device); -int tms9927_cursor_bounds(running_device *device, rectangle *bounds); +int tms9927_screen_reset(device_t *device); +int tms9927_upscroll_offset(device_t *device); +int tms9927_cursor_bounds(device_t *device, rectangle *bounds); diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c index 380f55c35ff..e9ff2d02e77 100644 --- a/src/emu/video/tms9928a.c +++ b/src/emu/video/tms9928a.c @@ -100,17 +100,17 @@ static const rgb_t TMS9928A_palette[16] = /* ** Forward declarations of internal functions. */ -static void draw_mode0 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_mode1 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_mode2 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_mode12 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_mode3 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_mode23 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_modebogus (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); -static void draw_sprites (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode0 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode1 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode2 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode12 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode3 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_mode23 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_modebogus (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); +static void draw_sprites (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect); static void change_register (running_machine *machine, int reg, UINT8 data); -static void (*const ModeHandlers[])(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) = { +static void (*const ModeHandlers[])(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) = { draw_mode0, draw_mode1, draw_mode2, draw_mode12, draw_mode3, draw_modebogus, draw_mode23, draw_modebogus @@ -450,7 +450,7 @@ int TMS9928A_interrupt(running_machine *machine) { return b; } -static void draw_mode1 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode1 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int pattern,x,y,yy,xx,name,charcode; UINT8 fg,bg,*patternptr; rectangle rt; @@ -485,7 +485,7 @@ static void draw_mode1 (running_device *screen, bitmap_t *bitmap, const rectangl } } -static void draw_mode12 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode12 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int pattern,x,y,yy,xx,name,charcode; UINT8 fg,bg,*patternptr; const pen_t *pens; @@ -520,7 +520,7 @@ static void draw_mode12 (running_device *screen, bitmap_t *bitmap, const rectang } } -static void draw_mode0 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode0 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int pattern,x,y,yy,xx,name,charcode,colour; UINT8 fg,bg,*patternptr; const pen_t *pens; @@ -546,7 +546,7 @@ static void draw_mode0 (running_device *screen, bitmap_t *bitmap, const rectangl } } -static void draw_mode2 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode2 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int colour,name,x,y,yy,pattern,xx,charcode; UINT8 fg,bg; const pen_t *pens; @@ -576,7 +576,7 @@ static void draw_mode2 (running_device *screen, bitmap_t *bitmap, const rectangl } } -static void draw_mode3 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode3 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int x,y,yy,yyy,name,charcode; UINT8 fg,bg,*patternptr; const pen_t *pens; @@ -606,7 +606,7 @@ static void draw_mode3 (running_device *screen, bitmap_t *bitmap, const rectangl } } -static void draw_mode23 (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_mode23 (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { int x,y,yy,yyy,name,charcode; UINT8 fg,bg,*patternptr; const pen_t *pens; @@ -637,7 +637,7 @@ static void draw_mode23 (running_device *screen, bitmap_t *bitmap, const rectang } } -static void draw_modebogus (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_modebogus (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 fg,bg; int x,y,n,xx; const pen_t *pens; @@ -666,7 +666,7 @@ static void draw_modebogus (running_device *screen, bitmap_t *bitmap, const rect ** ** This code should be optimized. One day. */ -static void draw_sprites (running_device *screen, bitmap_t *bitmap, const rectangle *cliprect) { +static void draw_sprites (device_t *screen, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 *attributeptr,*patternptr,c; int p,x,y,size,i,j,large,yy,xx,limit[192], illegalsprite,illegalspriteline; diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index 71ed33663f8..f79235bbb18 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -1700,9 +1700,9 @@ struct _banshee_info struct _voodoo_state { UINT8 index; /* index of board */ - running_device *device; /* pointer to our containing device */ + device_t *device; /* pointer to our containing device */ screen_device *screen; /* the screen we are acting on */ - running_device *cpu; /* the CPU we interact with */ + device_t *cpu; /* the CPU we interact with */ UINT8 type; /* type of system */ UINT8 chipmask; /* mask for which chips are available */ UINT32 freq; /* operating frequency */ diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index a48d1811e60..9751969338b 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -309,7 +309,7 @@ static const raster_info predef_raster_table[] = in device is, in fact, a voodoo device -------------------------------------------------*/ -INLINE voodoo_state *get_safe_token(running_device *device) +INLINE voodoo_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == VOODOO_GRAPHICS); @@ -325,7 +325,7 @@ INLINE voodoo_state *get_safe_token(running_device *device) * *************************************/ -int voodoo_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { voodoo_state *v = get_safe_token(device); int changed = v->fbi.video_changed; @@ -462,21 +462,21 @@ int voodoo_update(running_device *device, bitmap_t *bitmap, const rectangle *cli * *************************************/ -int voodoo_get_type(running_device *device) +int voodoo_get_type(device_t *device) { voodoo_state *v = get_safe_token(device); return v->type; } -int voodoo_is_stalled(running_device *device) +int voodoo_is_stalled(device_t *device) { voodoo_state *v = get_safe_token(device); return (v->pci.stall_state != NOT_STALLED); } -void voodoo_set_init_enable(running_device *device, UINT32 newval) +void voodoo_set_init_enable(device_t *device, UINT32 newval) { voodoo_state *v = get_safe_token(device); v->pci.init_enable = newval; @@ -651,7 +651,7 @@ static STATE_POSTLOAD( voodoo_postload ) } -static void init_save_state(running_device *device) +static void init_save_state(device_t *device) { voodoo_state *v = get_safe_token(device); int index, subindex; diff --git a/src/emu/video/voodoo.h b/src/emu/video/voodoo.h index 5baf04b92ee..0a2fcf6d473 100644 --- a/src/emu/video/voodoo.h +++ b/src/emu/video/voodoo.h @@ -70,8 +70,8 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef void (*voodoo_vblank_func)(running_device *device, int state); -typedef void (*voodoo_stall_func)(running_device *device, int state); +typedef void (*voodoo_vblank_func)(device_t *device, int state); +typedef void (*voodoo_stall_func)(device_t *device, int state); typedef struct _voodoo_config voodoo_config; @@ -132,10 +132,10 @@ struct _voodoo_config FUNCTION PROTOTYPES ***************************************************************************/ -int voodoo_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -int voodoo_get_type(running_device *device); -int voodoo_is_stalled(running_device *device); -void voodoo_set_init_enable(running_device *device, UINT32 newval); +int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +int voodoo_get_type(device_t *device); +int voodoo_is_stalled(device_t *device); +void voodoo_set_init_enable(device_t *device, UINT32 newval); READ32_DEVICE_HANDLER( voodoo_r ); WRITE32_DEVICE_HANDLER( voodoo_w ); diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c index 0da9410567c..5e96e99f3b6 100644 --- a/src/ldplayer/ldplayer.c +++ b/src/ldplayer/ldplayer.c @@ -72,7 +72,7 @@ static emu_timer *pr8210_bit_timer; static UINT32 pr8210_command_buffer_in, pr8210_command_buffer_out; static UINT8 pr8210_command_buffer[10]; -static void (*execute_command)(running_device *laserdisc, int command); +static void (*execute_command)(device_t *laserdisc, int command); @@ -87,7 +87,7 @@ static void free_string(running_machine &machine) } -static chd_file *get_disc(running_device *device) +static chd_file *get_disc(device_t *device) { mame_file *image_file = NULL; chd_file *image_chd = NULL; @@ -152,7 +152,7 @@ static chd_file *get_disc(running_device *device) * *************************************/ -static void process_commands(running_device *laserdisc) +static void process_commands(device_t *laserdisc) { input_port_value controls = input_port_read(laserdisc->machine, "controls"); int number; @@ -227,7 +227,7 @@ static void process_commands(running_device *laserdisc) static TIMER_CALLBACK( vsync_update ) { - running_device *laserdisc = machine->m_devicelist.first(LASERDISC); + device_t *laserdisc = machine->m_devicelist.first(LASERDISC); int vblank_scanline; attotime target; @@ -250,7 +250,7 @@ static MACHINE_START( ldplayer ) static TIMER_CALLBACK( autoplay ) { - running_device *laserdisc = machine->m_devicelist.first(LASERDISC); + device_t *laserdisc = machine->m_devicelist.first(LASERDISC); /* start playing */ (*execute_command)(laserdisc, CMD_PLAY); @@ -284,7 +284,7 @@ INLINE void pr8210_add_command(UINT8 command) static TIMER_CALLBACK( pr8210_bit_off_callback ) { - running_device *laserdisc = (running_device *)ptr; + device_t *laserdisc = (device_t *)ptr; /* deassert the control line */ laserdisc_line_w(laserdisc, LASERDISC_LINE_CONTROL, CLEAR_LINE); @@ -294,7 +294,7 @@ static TIMER_CALLBACK( pr8210_bit_off_callback ) static TIMER_CALLBACK( pr8210_bit_callback ) { attotime duration = ATTOTIME_IN_MSEC(30); - running_device *laserdisc = (running_device *)ptr; + device_t *laserdisc = (device_t *)ptr; UINT8 bitsleft = param >> 16; UINT8 data = param; @@ -323,7 +323,7 @@ static TIMER_CALLBACK( pr8210_bit_callback ) static MACHINE_START( pr8210 ) { - running_device *laserdisc = machine->m_devicelist.first(LASERDISC); + device_t *laserdisc = machine->m_devicelist.first(LASERDISC); MACHINE_START_CALL(ldplayer); pr8210_bit_timer = timer_alloc(machine, pr8210_bit_callback, (void *)laserdisc); } @@ -336,7 +336,7 @@ static MACHINE_RESET( pr8210 ) } -static void pr8210_execute(running_device *laserdisc, int command) +static void pr8210_execute(device_t *laserdisc, int command) { static const UINT8 digits[10] = { 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d, 0x03, 0x13 }; @@ -452,7 +452,7 @@ static void pr8210_execute(running_device *laserdisc, int command) * *************************************/ -static void ldv1000_execute(running_device *laserdisc, int command) +static void ldv1000_execute(device_t *laserdisc, int command) { static const UINT8 digits[10] = { 0x3f, 0x0f, 0x8f, 0x4f, 0x2f, 0xaf, 0x6f, 0x1f, 0x9f, 0x5f }; switch (command) diff --git a/src/mame/audio/amiga.c b/src/mame/audio/amiga.c index 9f94ea8f929..ec0bd6b3136 100644 --- a/src/mame/audio/amiga.c +++ b/src/mame/audio/amiga.c @@ -63,7 +63,7 @@ struct _amiga_audio }; -INLINE amiga_audio *get_safe_token( running_device *device ) +INLINE amiga_audio *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == AMIGA); @@ -99,7 +99,7 @@ static void dma_reload(amiga_state *state, audio_channel *chan) * *************************************/ -void amiga_audio_data_w(running_device *device, int which, UINT16 data) +void amiga_audio_data_w(device_t *device, int which, UINT16 data) { amiga_audio *audio_state = get_safe_token(device); @@ -114,7 +114,7 @@ void amiga_audio_data_w(running_device *device, int which, UINT16 data) * *************************************/ -void amiga_audio_update(running_device *device) +void amiga_audio_update(device_t *device) { amiga_audio *audio_state = get_safe_token(device); diff --git a/src/mame/audio/blockade.c b/src/mame/audio/blockade.c index b2133bd434c..b01097ee2a0 100644 --- a/src/mame/audio/blockade.c +++ b/src/mame/audio/blockade.c @@ -44,7 +44,7 @@ WRITE8_DEVICE_HANDLER( blockade_sound_freq_w ) WRITE8_HANDLER( blockade_env_on_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); if (BLOCKADE_LOG) mame_printf_debug("Boom Start\n"); sample_start(samples, 0,0,0); return; diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c index 996588bf8d3..02fa2ad8a6d 100644 --- a/src/mame/audio/carnival.c +++ b/src/mame/audio/carnival.c @@ -127,7 +127,7 @@ static int psgData = 0; WRITE8_HANDLER( carnival_audio_1_w ) { static int port1State = 0; - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int bitsChanged; int bitsGoneHigh; int bitsGoneLow; @@ -206,7 +206,7 @@ WRITE8_HANDLER( carnival_audio_1_w ) WRITE8_HANDLER( carnival_audio_2_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int bitsChanged; int bitsGoneHigh; int bitsGoneLow; diff --git a/src/mame/audio/cchasm.c b/src/mame/audio/cchasm.c index 885e2d07117..95bc020fb7f 100644 --- a/src/mame/audio/cchasm.c +++ b/src/mame/audio/cchasm.c @@ -14,7 +14,7 @@ static int sound_flags; static int coin_flag; -static running_device *ctc; +static device_t *ctc; WRITE8_HANDLER( cchasm_reset_coin_flag_w ) { diff --git a/src/mame/audio/cclimber.c b/src/mame/audio/cclimber.c index 14029b40b0d..e6ae8941397 100644 --- a/src/mame/audio/cclimber.c +++ b/src/mame/audio/cclimber.c @@ -27,7 +27,7 @@ static void cclimber_play_sample(running_machine *machine, int start,int freq,in int len; int romlen = memory_region_length(machine, "samples"); const UINT8 *rom = memory_region(machine, "samples"); - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); if (!rom) return; diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c index 984df30117b..31927dd04e0 100644 --- a/src/mame/audio/cinemat.c +++ b/src/mame/audio/cinemat.c @@ -165,7 +165,7 @@ static const samples_interface spacewar_samples_interface = static void spacewar_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* Explosion - rising edge */ if (SOUNDVAL_RISING_EDGE(0x01)) @@ -245,7 +245,7 @@ static const samples_interface barrier_samples_interface = static void barrier_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* Player die - rising edge */ if (SOUNDVAL_RISING_EDGE(0x01)) @@ -299,7 +299,7 @@ static const samples_interface speedfrk_samples_interface = static void speedfrk_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* on the falling edge of bit 0x08, clock the inverse of bit 0x04 into the top of the shiftreg */ if (SOUNDVAL_FALLING_EDGE(0x08)) @@ -365,7 +365,7 @@ static const samples_interface starhawk_samples_interface = static void starhawk_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* explosion - falling edge */ if (SOUNDVAL_FALLING_EDGE(0x01)) @@ -442,7 +442,7 @@ static const samples_interface sundance_samples_interface = static void sundance_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* bong - falling edge */ if (SOUNDVAL_FALLING_EDGE(0x01)) @@ -516,7 +516,7 @@ static void tailg_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_ /* the falling edge of bit 0x10 clocks bit 0x08 into the mux selected by bits 0x07 */ if (SOUNDVAL_FALLING_EDGE(0x10)) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* update the shift register (actually just a simple mux) */ current_shift = (current_shift & ~(1 << (sound_val & 7))) | (((sound_val >> 3) & 1) << (sound_val & 7)); @@ -602,7 +602,7 @@ static const samples_interface warrior_samples_interface = static void warrior_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* normal level - 0=on, 1=off */ if (SOUNDVAL_FALLING_EDGE(0x01)) @@ -674,7 +674,7 @@ static const samples_interface armora_samples_interface = static void armora_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ if (SOUNDVAL_RISING_EDGE(0x10)) @@ -776,7 +776,7 @@ static const samples_interface ripoff_samples_interface = static void ripoff_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* on the rising edge of bit 0x02, clock bit 0x01 into the shift register */ if (SOUNDVAL_RISING_EDGE(0x02)) @@ -864,7 +864,7 @@ static const samples_interface starcas_samples_interface = static void starcas_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); UINT32 target_pitch; /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ @@ -978,7 +978,7 @@ static const samples_interface solarq_samples_interface = static void solarq_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); static float target_volume, current_volume; /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ @@ -1119,7 +1119,7 @@ static const samples_interface boxingb_samples_interface = static void boxingb_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ if (SOUNDVAL_RISING_EDGE(0x10)) @@ -1251,7 +1251,7 @@ static const samples_interface wotw_samples_interface = static void wotw_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); UINT32 target_pitch; /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ @@ -1365,7 +1365,7 @@ static const samples_interface wotwc_samples_interface = static void wotwc_sound_w(running_machine *machine, UINT8 sound_val, UINT8 bits_changed) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); UINT32 target_pitch; /* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */ diff --git a/src/mame/audio/cps3.c b/src/mame/audio/cps3.c index f1369f11d0a..87c6186466d 100644 --- a/src/mame/audio/cps3.c +++ b/src/mame/audio/cps3.c @@ -26,7 +26,7 @@ struct _cps3_sound_state INT8* base; }; -INLINE cps3_sound_state *get_safe_token(running_device *device) +INLINE cps3_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == CPS3); diff --git a/src/mame/audio/crbaloon.c b/src/mame/audio/crbaloon.c index fe673803223..b2efe873dc8 100644 --- a/src/mame/audio/crbaloon.c +++ b/src/mame/audio/crbaloon.c @@ -42,13 +42,13 @@ WRITE8_DEVICE_HANDLER( crbaloon_audio_set_music_enable ) } -void crbaloon_audio_set_explosion_enable(running_device *sn, int enabled) +void crbaloon_audio_set_explosion_enable(device_t *sn, int enabled) { sn76477_enable_w(sn, enabled); } -void crbaloon_audio_set_breath_enable(running_device *sn, int enabled) +void crbaloon_audio_set_breath_enable(device_t *sn, int enabled) { /* changes slf_res to 10k (middle of two 10k resistors) it also puts a tantal capacitor against GND on the output, @@ -57,7 +57,7 @@ void crbaloon_audio_set_breath_enable(running_device *sn, int enabled) } -void crbaloon_audio_set_appear_enable(running_device *sn, int enabled) +void crbaloon_audio_set_appear_enable(device_t *sn, int enabled) { /* APPEAR is connected to MIXER B */ sn76477_mixer_b_w(sn, enabled); diff --git a/src/mame/audio/cyberbal.c b/src/mame/audio/cyberbal.c index 159799bb8c4..34f3fece438 100644 --- a/src/mame/audio/cyberbal.c +++ b/src/mame/audio/cyberbal.c @@ -154,7 +154,7 @@ WRITE16_HANDLER( cyberbal_sound_68k_w ) WRITE16_HANDLER( cyberbal_sound_68k_dac_w ) { cyberbal_state *state = space->machine->driver_data(); - running_device *dac = space->machine->device((offset & 8) ? "dac2" : "dac1"); + device_t *dac = space->machine->device((offset & 8) ? "dac2" : "dac1"); dac_data_16_w(dac, (((data >> 3) & 0x800) | ((data >> 2) & 0x7ff)) << 4); if (state->fast_68k_int) diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c index 5587ed2e3b1..34cf58260d8 100644 --- a/src/mame/audio/dcs.c +++ b/src/mame/audio/dcs.c @@ -323,8 +323,8 @@ struct _dcs_state UINT16 progflags; void (*output_full_cb)(running_machine *, int); void (*input_empty_cb)(running_machine *, int); - UINT16 (*fifo_data_r)(running_device *device); - UINT16 (*fifo_status_r)(running_device *device); + UINT16 (*fifo_data_r)(device_t *device); + UINT16 (*fifo_status_r)(device_t *device); /* timers */ UINT8 timer_enable; @@ -1491,7 +1491,7 @@ void dcs_set_io_callbacks(void (*output_full_cb)(running_machine *, int), void ( } -void dcs_set_fifo_callbacks(UINT16 (*fifo_data_r)(running_device *device), UINT16 (*fifo_status_r)(running_device *device)) +void dcs_set_fifo_callbacks(UINT16 (*fifo_data_r)(device_t *device), UINT16 (*fifo_status_r)(device_t *device)) { dcs.fifo_data_r = fifo_data_r; dcs.fifo_status_r = fifo_status_r; diff --git a/src/mame/audio/dcs.h b/src/mame/audio/dcs.h index edd08346283..0066598a7dd 100644 --- a/src/mame/audio/dcs.h +++ b/src/mame/audio/dcs.h @@ -16,7 +16,7 @@ void dcs_init(running_machine *machine); void dcs2_init(running_machine *machine, int dram_in_mb, offs_t polling_offset); void dcs_set_auto_ack(int state); -void dcs_set_fifo_callbacks(UINT16 (*fifo_data_r)(running_device *device), UINT16 (*fifo_status_r)(running_device *device)); +void dcs_set_fifo_callbacks(UINT16 (*fifo_data_r)(device_t *device), UINT16 (*fifo_status_r)(device_t *device)); void dcs_set_io_callbacks(void (*output_full_cb)(running_machine *, int), void (*input_empty_cb)(running_machine *, int)); int dcs_data_r(void); diff --git a/src/mame/audio/depthch.c b/src/mame/audio/depthch.c index 22e1e0e13d6..1ba5cac8567 100644 --- a/src/mame/audio/depthch.c +++ b/src/mame/audio/depthch.c @@ -56,7 +56,7 @@ enum WRITE8_HANDLER( depthch_audio_w ) { static int port1State = 0; - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int bitsChanged; int bitsGoneHigh; int bitsGoneLow; diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c index b38290ac28f..b80e8c3224c 100644 --- a/src/mame/audio/exidy.c +++ b/src/mame/audio/exidy.c @@ -83,7 +83,7 @@ struct _exidy_sound_state UINT8 riot_irq_state; /* 6532 variables */ - running_device *riot; + device_t *riot; struct sh6840_timer_channel sh6840_timer[3]; INT16 sh6840_volume[3]; @@ -104,9 +104,9 @@ struct _exidy_sound_state int has_sh8253; /* 5220/CVSD variables */ - running_device *cvsd; - running_device *tms; - running_device *pia1; + device_t *cvsd; + device_t *tms; + device_t *pia1; /* sound streaming variables */ sound_stream *stream; @@ -116,7 +116,7 @@ struct _exidy_sound_state }; -INLINE exidy_sound_state *get_safe_token(running_device *device) +INLINE exidy_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == EXIDY || device->type() == EXIDY_VENTURE || device->type() == EXIDY_VICTORY); @@ -241,7 +241,7 @@ INLINE int sh6840_update_noise(exidy_sound_state *state, int clocks) * *************************************/ -static void sh6840_register_state_globals(running_device *device) +static void sh6840_register_state_globals(device_t *device) { exidy_sound_state *state = get_safe_token(device); @@ -480,7 +480,7 @@ DEVICE_GET_INFO( exidy_sound ) * *************************************/ -static void r6532_irq(running_device *device, int state) +static void r6532_irq(device_t *device, int state) { exidy_sound_state *sndstate = get_safe_token(device); sndstate->riot_irq_state = (state == ASSERT_LINE) ? 1 : 0; @@ -556,7 +556,7 @@ static const riot6532_interface r6532_interface = *************************************/ -static void sh8253_register_state_globals(running_device *device) +static void sh8253_register_state_globals(device_t *device) { exidy_sound_state *state = get_safe_token(device); @@ -998,7 +998,7 @@ READ8_DEVICE_HANDLER( victory_sound_status_r ) static TIMER_CALLBACK( delayed_command_w ) { - running_device *pia1 = (running_device *)ptr; + device_t *pia1 = (device_t *)ptr; pia6821_set_input_a(pia1, param, 0); pia6821_ca1_w(pia1, 0); } @@ -1068,7 +1068,7 @@ static DEVICE_START( victory_sound ) static DEVICE_RESET( victory_sound ) { exidy_sound_state *state = get_safe_token(device); - running_device *pia1 = state->pia1; + device_t *pia1 = state->pia1; DEVICE_RESET_CALL(common_sh_reset); pia1->reset(); diff --git a/src/mame/audio/flower.c b/src/mame/audio/flower.c index d14c3e2efb8..8e31a3bf89d 100644 --- a/src/mame/audio/flower.c +++ b/src/mame/audio/flower.c @@ -53,7 +53,7 @@ struct _flower_sound_state UINT8 soundregs2[0x40]; }; -INLINE flower_sound_state *get_safe_token( running_device *device ) +INLINE flower_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == FLOWER); @@ -62,7 +62,7 @@ INLINE flower_sound_state *get_safe_token( running_device *device ) } /* build a table to divide by the number of voices; gain is specified as gain*16 */ -static void make_mixer_table(running_device *device, int voices, int gain) +static void make_mixer_table(device_t *device, int voices, int gain) { flower_sound_state *state = get_safe_token(device); int count = voices * 128; diff --git a/src/mame/audio/geebee.c b/src/mame/audio/geebee.c index 0a5974b3d31..29b62671de6 100644 --- a/src/mame/audio/geebee.c +++ b/src/mame/audio/geebee.c @@ -25,7 +25,7 @@ struct _geebee_sound_state int vcount; }; -INLINE geebee_sound_state *get_safe_token(running_device *device) +INLINE geebee_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == GEEBEE); diff --git a/src/mame/audio/gomoku.c b/src/mame/audio/gomoku.c index 646413684a2..ff3dd7de7a0 100644 --- a/src/mame/audio/gomoku.c +++ b/src/mame/audio/gomoku.c @@ -53,7 +53,7 @@ struct _gomoku_sound_state UINT8 soundregs2[0x20]; }; -INLINE gomoku_sound_state *get_safe_token( running_device *device ) +INLINE gomoku_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == GOMOKU); @@ -63,7 +63,7 @@ INLINE gomoku_sound_state *get_safe_token( running_device *device ) /* build a table to divide by the number of voices; gain is specified as gain*16 */ -static void make_mixer_table(running_device *device, int voices, int gain) +static void make_mixer_table(device_t *device, int voices, int gain) { gomoku_sound_state *state = get_safe_token(device); int count = voices * 128; diff --git a/src/mame/audio/gorf.c b/src/mame/audio/gorf.c index 48720c12af4..78c0d6b845a 100644 --- a/src/mame/audio/gorf.c +++ b/src/mame/audio/gorf.c @@ -116,7 +116,7 @@ static int plural = 0; READ8_HANDLER( gorf_speech_r ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int Phoneme,Intonation; int i = 0; @@ -182,6 +182,6 @@ READ8_HANDLER( gorf_speech_r ) CUSTOM_INPUT( gorf_speech_status_r ) { - running_device *samples = field->port->machine->device("samples"); + device_t *samples = field->port->machine->device("samples"); return !sample_playing(samples, 0); } diff --git a/src/mame/audio/gottlieb.c b/src/mame/audio/gottlieb.c index dab2c6d25c5..f24318ec137 100644 --- a/src/mame/audio/gottlieb.c +++ b/src/mame/audio/gottlieb.c @@ -41,9 +41,9 @@ static int score_sample; static int random_offset; -static void gottlieb1_sh_w(running_device *riot, UINT8 data); +static void gottlieb1_sh_w(device_t *riot, UINT8 data); static void gottlieb2_sh_w(address_space *space, UINT8 data); -static void trigger_sample(running_device *samples, UINT8 data); +static void trigger_sample(device_t *samples, UINT8 data); @@ -55,7 +55,7 @@ static void trigger_sample(running_device *samples, UINT8 data); WRITE8_HANDLER( gottlieb_sh_w ) { - running_device *riot = space->machine->device("riot"); + device_t *riot = space->machine->device("riot"); /* identify rev1 boards by the presence of a 6532 RIOT device */ if (riot != NULL) @@ -72,9 +72,9 @@ WRITE8_HANDLER( gottlieb_sh_w ) * *************************************/ -static void gottlieb1_sh_w(running_device *riot, UINT8 data) +static void gottlieb1_sh_w(device_t *riot, UINT8 data) { - running_device *samples = riot->machine->device("samples"); + device_t *samples = riot->machine->device("samples"); int pa7 = (data & 0x0f) != 0xf; int pa0_5 = ~data & 0x3f; @@ -124,7 +124,7 @@ static const riot6532_interface gottlieb_riot6532_intf = * *************************************/ -static void play_sample(running_device *samples, const char *phonemes) +static void play_sample(device_t *samples, const char *phonemes) { if (strcmp(phonemes, " HEH3LOOW AH1EH3I3YMTERI2NDAHN") == 0) /* Q-Bert - Hello, I am turned on */ sample_start(samples, 0, 42, 0); @@ -141,7 +141,7 @@ static void play_sample(running_device *samples, const char *phonemes) } -static void trigger_sample(running_device *samples, UINT8 data) +static void trigger_sample(device_t *samples, UINT8 data) { /* Reactor samples */ if (strcmp(samples->machine->gamedrv->name, "reactor") == 0) @@ -196,7 +196,7 @@ static void trigger_sample(running_device *samples, UINT8 data) #ifdef UNUSED_FUNCTION void gottlieb_knocker(running_machine *machine) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); if (!strcmp(machine->gamedrv->name,"reactor")) /* reactor */ { } @@ -244,7 +244,7 @@ logerror("Votrax: intonation %d, phoneme %02x %s\n",data >> 6,data & 0x3f,Phonem { if (votrax_queuepos > 1) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int last = -1; int i; char phonemes[200]; @@ -497,7 +497,7 @@ static WRITE8_HANDLER( speech_control_w ) { /* bit 3 selects which of the two 8913 to enable */ /* bit 4 goes to the 8913 BC1 pin */ - running_device *ay = space->machine->device((data & 0x08) ? "ay1" : "ay2"); + device_t *ay = space->machine->device((data & 0x08) ? "ay1" : "ay2"); ay8910_data_address_w(ay, data >> 4, *psg_latch); } @@ -506,7 +506,7 @@ static WRITE8_HANDLER( speech_control_w ) /* bit 6 = speech chip DATA PRESENT pin; high then low to make the chip read data */ if ((previous & 0x40) == 0 && (data & 0x40) != 0) { - running_device *sp = space->machine->device("spsnd"); + device_t *sp = space->machine->device("spsnd"); sp0250_w(sp, 0, *sp0250_latch); } diff --git a/src/mame/audio/gridlee.c b/src/mame/audio/gridlee.c index 9658d89078c..25a0dc66907 100644 --- a/src/mame/audio/gridlee.c +++ b/src/mame/audio/gridlee.c @@ -25,7 +25,7 @@ struct gridlee_sound_state /* sound streaming variables */ sound_stream *stream; - running_device *samples; + device_t *samples; double freq_to_step; }; @@ -36,7 +36,7 @@ struct gridlee_sound_state * *************************************/ -INLINE gridlee_sound_state *get_safe_token( running_device *device ) +INLINE gridlee_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == GRIDLEE); @@ -102,7 +102,7 @@ WRITE8_DEVICE_HANDLER( gridlee_sound_w ) { gridlee_sound_state *state = get_safe_token(device); static UINT8 sound_data[24]; - running_device *samples = state->samples; + device_t *samples = state->samples; stream_update(state->stream); diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index deec070a242..73397b556a2 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -6,14 +6,14 @@ typedef struct _hyprolyb_adpcm_state hyprolyb_adpcm_state; struct _hyprolyb_adpcm_state { - running_device *msm; + device_t *msm; address_space *space; UINT8 adpcm_ready; // only bootlegs UINT8 adpcm_busy; UINT8 vck_ready; }; -INLINE hyprolyb_adpcm_state *get_safe_token( running_device *device ) +INLINE hyprolyb_adpcm_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == HYPROLYB_ADPCM); @@ -111,9 +111,9 @@ static ADDRESS_MAP_START( hyprolyb_adpcm_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END -static void adpcm_vck_callback( running_device *device ) +static void adpcm_vck_callback( device_t *device ) { - running_device *adpcm = device->machine->device("hyprolyb_adpcm"); + device_t *adpcm = device->machine->device("hyprolyb_adpcm"); hyprolyb_adpcm_state *state = get_safe_token(adpcm); state->vck_ready = 0x80; diff --git a/src/mame/audio/invinco.c b/src/mame/audio/invinco.c index 64703994005..568daf8a91f 100644 --- a/src/mame/audio/invinco.c +++ b/src/mame/audio/invinco.c @@ -66,7 +66,7 @@ enum WRITE8_HANDLER( invinco_audio_w ) { static int port2State = 0; - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int bitsChanged; //int bitsGoneHigh; int bitsGoneLow; diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index 949e52d220b..277d391d2bd 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -16,13 +16,13 @@ struct _irem_audio_state { UINT8 port1, port2; - running_device *ay1; - running_device *ay2; - running_device *adpcm1; - running_device *adpcm2; + device_t *ay1; + device_t *ay2; + device_t *adpcm1; + device_t *adpcm2; }; -INLINE irem_audio_state *get_safe_token( running_device *device ) +INLINE irem_audio_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == IREM_AUDIO); @@ -204,7 +204,7 @@ static WRITE8_DEVICE_HANDLER( m62_adpcm_w ) { irem_audio_state *state = get_safe_token(device); - running_device *adpcm = (offset & 1) ? state->adpcm2 : state->adpcm1; + device_t *adpcm = (offset & 1) ? state->adpcm2 : state->adpcm1; if (adpcm != NULL) msm5205_data_w(adpcm, data); } @@ -217,9 +217,9 @@ static WRITE8_DEVICE_HANDLER( m62_adpcm_w ) * *************************************/ -static void adpcm_int(running_device *device) +static void adpcm_int(device_t *device) { - running_device *adpcm2 = device->machine->device("msm2"); + device_t *adpcm2 = device->machine->device("msm2"); cputag_set_input_line(device->machine, "iremsound", INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/audio/jaguar.c b/src/mame/audio/jaguar.c index 5645e63c291..ba63bdc99a2 100644 --- a/src/mame/audio/jaguar.c +++ b/src/mame/audio/jaguar.c @@ -212,7 +212,7 @@ static void update_gpu_irq(running_machine *machine) } -void jaguar_external_int(running_device *device, int state) +void jaguar_external_int(device_t *device, int state) { if (state != CLEAR_LINE) gpu_irq_state |= 1; diff --git a/src/mame/audio/jedi.c b/src/mame/audio/jedi.c index e256d5b616b..2ac55ff1ef9 100644 --- a/src/mame/audio/jedi.c +++ b/src/mame/audio/jedi.c @@ -147,7 +147,7 @@ static WRITE8_HANDLER( speech_strobe_w ) if ((new_speech_strobe_state != state->speech_strobe_state) && new_speech_strobe_state) { - running_device *tms = space->machine->device("tms"); + device_t *tms = space->machine->device("tms"); tms5220_data_w(tms, 0, *state->speech_data); } state->speech_strobe_state = new_speech_strobe_state; diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c index abedea874af..c414d30f99c 100644 --- a/src/mame/audio/leland.c +++ b/src/mame/audio/leland.c @@ -225,7 +225,7 @@ struct _leland_sound_state * *************************************/ -INLINE leland_sound_state *get_safe_token(running_device *device) +INLINE leland_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == LELAND || device->type() == LELAND_80186 || device->type() == REDLINE_80186); @@ -297,7 +297,7 @@ DEVICE_GET_INFO( leland_sound ) } -void leland_dac_update(running_device *device, int dacnum, UINT8 sample) +void leland_dac_update(device_t *device, int dacnum, UINT8 sample) { leland_sound_state *state = get_safe_token(device); UINT8 *buffer = state->dac_buffer[dacnum]; @@ -628,7 +628,7 @@ DEFINE_LEGACY_SOUND_DEVICE(LELAND_80186, leland_80186_sound); DEFINE_LEGACY_SOUND_DEVICE(REDLINE_80186, redline_80186_sound); -static void leland_80186_reset(running_device *device) +static void leland_80186_reset(device_t *device) { leland_sound_state *state = get_safe_token(device); struct i80186_state oldstate = state->i80186; @@ -727,7 +727,7 @@ static IRQ_CALLBACK( int_callback ) } -static void update_interrupt_state(running_device *device) +static void update_interrupt_state(device_t *device) { leland_sound_state *state = get_safe_token(device); running_machine *machine = device->machine; @@ -814,7 +814,7 @@ generate_int: } -static void handle_eoi(running_device *device, int data) +static void handle_eoi(device_t *device, int data) { leland_sound_state *state = get_safe_token(device); running_machine *machine = device->machine; @@ -885,7 +885,7 @@ static void handle_eoi(running_device *device, int data) static TIMER_CALLBACK( internal_timer_int ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; leland_sound_state *state = get_safe_token(device); int which = param; struct timer_state *t = &state->i80186.timer[which]; @@ -1081,7 +1081,7 @@ static void internal_timer_update(leland_sound_state *state, int which, int new_ static TIMER_CALLBACK( dma_timer_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; leland_sound_state *state = get_safe_token(device); int which = param; struct dma_state *d = &state->i80186.dma[which]; @@ -1806,7 +1806,7 @@ WRITE8_DEVICE_HANDLER( leland_80186_control_w ) static TIMER_CALLBACK( command_lo_sync ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; leland_sound_state *state = get_safe_token(device); if (LOG_COMM) logerror("%s:Write sound command latch lo = %02X\n", cpuexec_describe_context(machine), param); state->sound_command = (state->sound_command & 0xff00) | param; @@ -1845,7 +1845,7 @@ static READ16_DEVICE_HANDLER( main_to_sound_comm_r ) static TIMER_CALLBACK( delayed_response_r ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; leland_sound_state *state = get_safe_token(device); cpu_device *master = machine->device("master"); int checkpc = param; diff --git a/src/mame/audio/m72.c b/src/mame/audio/m72.c index 6519d0a5c01..f24624bc3e8 100644 --- a/src/mame/audio/m72.c +++ b/src/mame/audio/m72.c @@ -115,7 +115,7 @@ SOUND_RESET( m72 ) setvector_callback(machine, NULL, VECTOR_INIT); } -void m72_ym2151_irq_handler(running_device *device, int irq) +void m72_ym2151_irq_handler(device_t *device, int irq) { if (irq) timer_call_after_resynch(device->machine, NULL, YM2151_ASSERT,setvector_callback); diff --git a/src/mame/audio/m72.h b/src/mame/audio/m72.h index b06c4005813..5812eae66aa 100644 --- a/src/mame/audio/m72.h +++ b/src/mame/audio/m72.h @@ -6,7 +6,7 @@ SOUND_START( m72 ); SOUND_RESET( m72 ); -void m72_ym2151_irq_handler(running_device *device, int irq); +void m72_ym2151_irq_handler(device_t *device, int irq); WRITE8_HANDLER( m72_sound_command_byte_w ); WRITE16_HANDLER( m72_sound_command_w ); WRITE8_HANDLER( m72_sound_irq_ack_w ); diff --git a/src/mame/audio/mario.c b/src/mame/audio/mario.c index f42ff4fe1b7..6ebb2cb565f 100644 --- a/src/mame/audio/mario.c +++ b/src/mame/audio/mario.c @@ -414,7 +414,7 @@ static void set_ea(address_space *space, int ea) static SOUND_START( mario ) { mario_state *state = machine->driver_data(); - running_device *audiocpu = machine->device("audiocpu"); + device_t *audiocpu = machine->device("audiocpu"); #if USE_8039 UINT8 *SND = memory_region(machine, "audiocpu"); diff --git a/src/mame/audio/mcr.c b/src/mame/audio/mcr.c index 168c8bb62f8..9ebd895230a 100644 --- a/src/mame/audio/mcr.c +++ b/src/mame/audio/mcr.c @@ -53,7 +53,7 @@ static UINT8 mcr_sound_config; static UINT16 dacval; /* SSIO-specific globals */ -static running_device *ssio_sound_cpu; +static device_t *ssio_sound_cpu; static UINT8 ssio_data[4]; static UINT8 ssio_status; static UINT8 ssio_14024_count; @@ -67,19 +67,19 @@ static read8_space_func ssio_custom_input[5]; static write8_space_func ssio_custom_output[2]; /* Chip Squeak Deluxe-specific globals */ -static running_device *csdeluxe_sound_cpu; +static device_t *csdeluxe_sound_cpu; static UINT8 csdeluxe_status; /* Turbo Chip Squeak-specific globals */ -static running_device *turbocs_sound_cpu; +static device_t *turbocs_sound_cpu; static UINT8 turbocs_status; /* Sounds Good-specific globals */ -static running_device *soundsgood_sound_cpu; +static device_t *soundsgood_sound_cpu; static UINT8 soundsgood_status; /* Squawk n' Talk-specific globals */ -static running_device *squawkntalk_sound_cpu; +static device_t *squawkntalk_sound_cpu; static UINT8 squawkntalk_tms_command; static UINT8 squawkntalk_tms_strobes; @@ -316,8 +316,8 @@ static TIMER_CALLBACK( ssio_delayed_data_w ) static void ssio_update_volumes(running_machine *machine) { - running_device *ay0 = machine->device("ssio.1"); - running_device *ay1 = machine->device("ssio.2"); + device_t *ay0 = machine->device("ssio.1"); + device_t *ay1 = machine->device("ssio.2"); ay8910_set_volume(ay0, 0, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][0]]); ay8910_set_volume(ay0, 1, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][1]]); ay8910_set_volume(ay0, 2, ssio_mute ? 0 : ssio_ayvolume_lookup[ssio_duty_cycle[0][2]]); @@ -514,7 +514,7 @@ static WRITE_LINE_DEVICE_HANDLER( csdeluxe_irq ) static TIMER_CALLBACK( csdeluxe_delayed_data_w ) { - running_device *pia = machine->device("csdpia"); + device_t *pia = machine->device("csdpia"); pia6821_portb_w(pia, 0, param & 0x0f); pia6821_ca1_w(pia, ~param & 0x10); @@ -652,7 +652,7 @@ static WRITE_LINE_DEVICE_HANDLER( soundsgood_irq ) static TIMER_CALLBACK( soundsgood_delayed_data_w ) { - running_device *pia = machine->device("sgpia"); + device_t *pia = machine->device("sgpia"); pia6821_portb_w(pia, 0, (param >> 1) & 0x0f); pia6821_ca1_w(pia, ~param & 0x01); @@ -756,7 +756,7 @@ static WRITE_LINE_DEVICE_HANDLER( turbocs_irq ) static TIMER_CALLBACK( turbocs_delayed_data_w ) { - running_device *pia = machine->device("tcspia"); + device_t *pia = machine->device("tcspia"); pia6821_portb_w(pia, 0, (param >> 1) & 0x0f); pia6821_ca1_w(pia, ~param & 0x01); @@ -853,7 +853,7 @@ static WRITE8_DEVICE_HANDLER( squawkntalk_porta2_w ) static WRITE8_DEVICE_HANDLER( squawkntalk_portb2_w ) { - running_device *tms = device->machine->device("sntspeech"); + device_t *tms = device->machine->device("sntspeech"); /* bits 0-1 select read/write strobes on the TMS5200 */ data &= 0x03; @@ -884,8 +884,8 @@ static WRITE8_DEVICE_HANDLER( squawkntalk_portb2_w ) static WRITE_LINE_DEVICE_HANDLER( squawkntalk_irq ) { - running_device *pia0 = device->machine->device("sntpia0"); - running_device *pia1 = device->machine->device("sntpia1"); + device_t *pia0 = device->machine->device("sntpia0"); + device_t *pia1 = device->machine->device("sntpia1"); int combined_state = pia6821_get_irq_a(pia0) | pia6821_get_irq_b(pia0) | pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1); cpu_set_input_line(squawkntalk_sound_cpu, M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); @@ -893,7 +893,7 @@ static WRITE_LINE_DEVICE_HANDLER( squawkntalk_irq ) static TIMER_CALLBACK( squawkntalk_delayed_data_w ) { - running_device *pia0 = machine->device("sntpia0"); + device_t *pia0 = machine->device("sntpia0"); pia6821_porta_w(pia0, 0, ~param & 0x0f); pia6821_cb1_w(pia0, ~param & 0x10); diff --git a/src/mame/audio/meadows.c b/src/mame/audio/meadows.c index 102a86b6536..caee6c8bf83 100644 --- a/src/mame/audio/meadows.c +++ b/src/mame/audio/meadows.c @@ -60,7 +60,7 @@ SAMPLES_START( meadows_sh_start ) /************************************/ void meadows_sh_update(running_machine *machine) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); int preset, amp; if (latched_0c01 != meadows_0c01 || latched_0c03 != meadows_0c03) diff --git a/src/mame/audio/micro3d.c b/src/mame/audio/micro3d.c index e7bad7785e6..20b8c75b88b 100644 --- a/src/mame/audio/micro3d.c +++ b/src/mame/audio/micro3d.c @@ -185,7 +185,7 @@ void micro3d_noise_sh_w(running_machine *machine, UINT8 data) if (~data & 8) { - running_device *device = machine->device(data & 4 ? "noise_2" : "noise_1"); + device_t *device = machine->device(data & 4 ? "noise_2" : "noise_1"); noise_state *nstate = (noise_state *)downcast(device)->token(); if (state->dac_data != nstate->dac[data & 3]) @@ -210,7 +210,7 @@ void micro3d_noise_sh_w(running_machine *machine, UINT8 data) } } -INLINE noise_state *get_safe_token(running_device *device) +INLINE noise_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MICRO3D); @@ -397,7 +397,7 @@ WRITE8_HANDLER( micro3d_sound_io_w ) } case 0x03: { - running_device *upd = space->machine->device("upd7759"); + device_t *upd = space->machine->device("upd7759"); upd7759_set_bank_base(upd, (data & 0x4) ? 0x20000 : 0); upd7759_reset_w(upd, (data & 0x10) ? 0 : 1); break; diff --git a/src/mame/audio/mw8080bw.c b/src/mame/audio/mw8080bw.c index 77586c18e8c..83a3b07b221 100644 --- a/src/mame/audio/mw8080bw.c +++ b/src/mame/audio/mw8080bw.c @@ -577,7 +577,7 @@ MACHINE_CONFIG_FRAGMENT( maze_audio ) MACHINE_CONFIG_END -void maze_write_discrete(running_device *device, UINT8 maze_tone_timing_state) +void maze_write_discrete(device_t *device, UINT8 maze_tone_timing_state) { /* controls need to be active low */ int controls = ~input_port_read(device->machine, "IN0") & 0xff; diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c index 30fcdb78c61..9d7148ed923 100644 --- a/src/mame/audio/n8080.c +++ b/src/mame/audio/n8080.c @@ -69,7 +69,7 @@ static const sn76477_interface spacefev_sn76477_interface = }; -static void spacefev_update_SN76477_status( running_device *sn ) +static void spacefev_update_SN76477_status( device_t *sn ) { n8080_state *state = sn->machine->driver_data(); double dblR0 = RES_M(1.0); @@ -99,7 +99,7 @@ static void spacefev_update_SN76477_status( running_device *sn ) } -static void sheriff_update_SN76477_status( running_device *sn ) +static void sheriff_update_SN76477_status( device_t *sn ) { n8080_state *state = sn->machine->driver_data(); if (state->mono_flop[1]) @@ -121,7 +121,7 @@ static void sheriff_update_SN76477_status( running_device *sn ) } -static void update_SN76477_status( running_device *device ) +static void update_SN76477_status( device_t *device ) { n8080_state *state = device->machine->driver_data(); if (state->n8080_hardware == 1) @@ -135,7 +135,7 @@ static void update_SN76477_status( running_device *device ) } -static void start_mono_flop( running_device *sn, int n, attotime expire ) +static void start_mono_flop( device_t *sn, int n, attotime expire ) { n8080_state *state = sn->machine->driver_data(); state->mono_flop[n] = 1; @@ -146,7 +146,7 @@ static void start_mono_flop( running_device *sn, int n, attotime expire ) } -static void stop_mono_flop( running_device *sn, int n ) +static void stop_mono_flop( device_t *sn, int n ) { n8080_state *state = sn->machine->driver_data(); state->mono_flop[n] = 0; @@ -165,7 +165,7 @@ static TIMER_CALLBACK( stop_mono_flop_callback ) static void spacefev_sound_pins_changed( running_machine *machine ) { - running_device *sn = machine->device("snsnd"); + device_t *sn = machine->device("snsnd"); n8080_state *state = machine->driver_data(); UINT16 changes = ~state->curr_sound_pins & state->prev_sound_pins; @@ -198,7 +198,7 @@ static void spacefev_sound_pins_changed( running_machine *machine ) static void sheriff_sound_pins_changed( running_machine *machine ) { - running_device *sn = machine->device("snsnd"); + device_t *sn = machine->device("snsnd"); n8080_state *state = machine->driver_data(); UINT16 changes = ~state->curr_sound_pins & state->prev_sound_pins; @@ -437,7 +437,7 @@ static WRITE8_HANDLER( helifire_sound_ctrl_w ) static TIMER_DEVICE_CALLBACK( spacefev_vco_voltage_timer ) { - running_device *sn = timer.machine->device("snsnd"); + device_t *sn = timer.machine->device("snsnd"); n8080_state *state = timer.machine->driver_data(); double voltage = 0; diff --git a/src/mame/audio/namco52.c b/src/mame/audio/namco52.c index 71a0aaf1f6f..0991d30629a 100644 --- a/src/mame/audio/namco52.c +++ b/src/mame/audio/namco52.c @@ -52,8 +52,8 @@ typedef struct _namco_52xx_state namco_52xx_state; struct _namco_52xx_state { - running_device *cpu; - running_device *discrete; + device_t *cpu; + device_t *discrete; int basenode; devcb_resolved_read8 romread; devcb_resolved_read8 si; @@ -61,7 +61,7 @@ struct _namco_52xx_state UINT32 address; }; -INLINE namco_52xx_state *get_safe_token(running_device *device) +INLINE namco_52xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_52XX); @@ -73,7 +73,7 @@ INLINE namco_52xx_state *get_safe_token(running_device *device) static TIMER_CALLBACK( namco_52xx_latch_callback ) { - namco_52xx_state *state = get_safe_token((running_device *)ptr); + namco_52xx_state *state = get_safe_token((device_t *)ptr); state->latched_cmd = param; } @@ -134,7 +134,7 @@ static WRITE8_HANDLER( namco_52xx_O_w ) static TIMER_CALLBACK( namco_52xx_irq_clear ) { - namco_52xx_state *state = get_safe_token((running_device *)ptr); + namco_52xx_state *state = get_safe_token((device_t *)ptr); cpu_set_input_line(state->cpu, 0, CLEAR_LINE); } @@ -160,7 +160,7 @@ WRITE8_DEVICE_HANDLER( namco_52xx_write ) static TIMER_CALLBACK( external_clock_pulse ) { - namco_52xx_state *state = get_safe_token((running_device *)ptr); + namco_52xx_state *state = get_safe_token((device_t *)ptr); mb88_external_clock_w(state->cpu, 1); mb88_external_clock_w(state->cpu, 0); } diff --git a/src/mame/audio/namco54.c b/src/mame/audio/namco54.c index 390fd0a31c0..59d7dc004fc 100644 --- a/src/mame/audio/namco54.c +++ b/src/mame/audio/namco54.c @@ -54,13 +54,13 @@ typedef struct _namco_54xx_state namco_54xx_state; struct _namco_54xx_state { - running_device *cpu; - running_device *discrete; + device_t *cpu; + device_t *discrete; int basenode; UINT8 latched_cmd; }; -INLINE namco_54xx_state *get_safe_token(running_device *device) +INLINE namco_54xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_54XX); @@ -72,7 +72,7 @@ INLINE namco_54xx_state *get_safe_token(running_device *device) static TIMER_CALLBACK( namco_54xx_latch_callback ) { - namco_54xx_state *state = get_safe_token((running_device *)ptr); + namco_54xx_state *state = get_safe_token((device_t *)ptr); state->latched_cmd = param; } @@ -112,7 +112,7 @@ static WRITE8_HANDLER( namco_54xx_R1_w ) static TIMER_CALLBACK( namco_54xx_irq_clear ) { - namco_54xx_state *state = get_safe_token((running_device *)ptr); + namco_54xx_state *state = get_safe_token((device_t *)ptr); cpu_set_input_line(state->cpu, 0, CLEAR_LINE); } diff --git a/src/mame/audio/namcoc7x.c b/src/mame/audio/namcoc7x.c index 7536b9eda1f..0bb17b29f5f 100644 --- a/src/mame/audio/namcoc7x.c +++ b/src/mame/audio/namcoc7x.c @@ -80,7 +80,7 @@ void namcoc7x_sound_write16(UINT16 command, UINT32 offset) void namcoc7x_on_driver_init(running_machine *machine) { UINT8 *pROM = (UINT8 *)memory_region(machine, "c7x"); - running_device *cpu; + device_t *cpu; // clear the two 16-bits magic values at the start of the rom // (prevents external init routines from getting called - they assume a diff --git a/src/mame/audio/phoenix.c b/src/mame/audio/phoenix.c index 280a197bca9..15d049a948a 100644 --- a/src/mame/audio/phoenix.c +++ b/src/mame/audio/phoenix.c @@ -70,11 +70,11 @@ struct _phoenix_sound_state UINT8 sound_latch_a; sound_stream * channel; UINT32 * poly18; - running_device *discrete; - running_device *tms; + device_t *discrete; + device_t *tms; }; -INLINE phoenix_sound_state *get_safe_token( running_device *device ) +INLINE phoenix_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == PHOENIX); @@ -507,7 +507,7 @@ WRITE8_DEVICE_HANDLER( phoenix_sound_control_a_w ) state->sound_latch_a = data; } -static void register_state(running_device *device) +static void register_state(device_t *device) { phoenix_sound_state *state = get_safe_token(device); diff --git a/src/mame/audio/pleiads.c b/src/mame/audio/pleiads.c index 3ed158fe870..a00d2a0bc47 100644 --- a/src/mame/audio/pleiads.c +++ b/src/mame/audio/pleiads.c @@ -42,7 +42,7 @@ struct n_state typedef struct _pleiads_sound_state pleiads_sound_state; struct _pleiads_sound_state { - running_device *tms; + device_t *tms; sound_stream *channel; int sound_latch_a; @@ -71,7 +71,7 @@ struct _pleiads_sound_state int opamp_resistor; }; -INLINE pleiads_sound_state *get_safe_token(running_device *device) +INLINE pleiads_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == PLEIADS || device->type() == POPFLAME || device->type() == NAUGHTYB); diff --git a/src/mame/audio/polepos.c b/src/mame/audio/polepos.c index fa4c77fe493..7527da752f2 100644 --- a/src/mame/audio/polepos.c +++ b/src/mame/audio/polepos.c @@ -47,7 +47,7 @@ static const double volume_table[8] = static const double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)}; static const double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10)); -INLINE polepos_sound_state *get_safe_token( running_device *device ) +INLINE polepos_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == POLEPOS); diff --git a/src/mame/audio/polyplay.c b/src/mame/audio/polyplay.c index 0d7d0270564..a915308fb22 100644 --- a/src/mame/audio/polyplay.c +++ b/src/mame/audio/polyplay.c @@ -48,7 +48,7 @@ void polyplay_set_channel2(int active) void polyplay_play_channel1(running_machine *machine, int data) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); if (data) { freq1 = 2457600 / 16 / data / 8; sample_set_volume(samples, 0, channel_playing1 * 1.0); @@ -62,7 +62,7 @@ void polyplay_play_channel1(running_machine *machine, int data) void polyplay_play_channel2(running_machine *machine, int data) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); if (data) { freq2 = 2457600 / 16 / data / 8; sample_set_volume(samples, 1, channel_playing2 * 1.0); diff --git a/src/mame/audio/pulsar.c b/src/mame/audio/pulsar.c index 53ea04bbbd3..3ca90171c6e 100644 --- a/src/mame/audio/pulsar.c +++ b/src/mame/audio/pulsar.c @@ -88,7 +88,7 @@ static int port1State = 0; WRITE8_HANDLER( pulsar_audio_1_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int bitsChanged; //int bitsGoneHigh; int bitsGoneLow; @@ -139,7 +139,7 @@ WRITE8_HANDLER( pulsar_audio_1_w ) WRITE8_HANDLER( pulsar_audio_2_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); static int port2State = 0; int bitsChanged; int bitsGoneHigh; diff --git a/src/mame/audio/qix.c b/src/mame/audio/qix.c index 1f92bd3e4ef..b60f00bd03c 100644 --- a/src/mame/audio/qix.c +++ b/src/mame/audio/qix.c @@ -101,7 +101,7 @@ static WRITE8_DEVICE_HANDLER( sndpia_2_warning_w ) static TIMER_CALLBACK( deferred_sndpia1_porta_w ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; pia6821_porta_w(device, 0, param); } diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c index 98ef9ba8b75..71b24943364 100644 --- a/src/mame/audio/redalert.c +++ b/src/mame/audio/redalert.c @@ -309,8 +309,8 @@ static READ8_DEVICE_HANDLER( demoneye_ay8910_latch_2_r ) static WRITE8_DEVICE_HANDLER( demoneye_ay8910_data_w ) { - running_device *ay1 = device->machine->device("ay1"); - running_device *ay2 = device->machine->device("ay2"); + device_t *ay1 = device->machine->device("ay1"); + device_t *ay2 = device->machine->device("ay2"); switch (ay8910_latch_1 & 0x03) { diff --git a/src/mame/audio/redbaron.c b/src/mame/audio/redbaron.c index 07229b0230c..b44dc06ca91 100644 --- a/src/mame/audio/redbaron.c +++ b/src/mame/audio/redbaron.c @@ -46,7 +46,7 @@ struct _redbaron_sound_state int squeal_out; }; -INLINE redbaron_sound_state *get_safe_token(running_device *device) +INLINE redbaron_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == REDBARON); diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c index c83096b8d20..e355f45fad6 100644 --- a/src/mame/audio/scramble.c +++ b/src/mame/audio/scramble.c @@ -79,7 +79,7 @@ READ8_DEVICE_HANDLER( frogger_portB_r ) WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ) { - running_device *target = device->machine->device("konami_7474"); + device_t *target = device->machine->device("konami_7474"); /* the complement of bit 3 is connected to the flip-flop's clock */ ttl7474_clock_w(target, (~data & 0x08) >> 3); @@ -90,7 +90,7 @@ WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ) WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ) { - running_device *target = device->machine->device("konami_7474"); + device_t *target = device->machine->device("konami_7474"); /* the complement of bit 3 is connected to the flip-flop's clock */ ttl7474_clock_w(target, (~data & 0x08) >> 3); @@ -98,7 +98,7 @@ WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ) static IRQ_CALLBACK(scramble_sh_irq_callback) { - running_device *target = device->machine->device("konami_7474"); + device_t *target = device->machine->device("konami_7474"); /* interrupt acknowledge clears the flip-flop -- we need to pulse the CLR line because MAME's core never clears this @@ -128,7 +128,7 @@ READ8_DEVICE_HANDLER( hotshock_soundlatch_r ) return soundlatch_r(cputag_get_address_space(device->machine, "audiocpu", ADDRESS_SPACE_PROGRAM),0); } -static void filter_w(running_device *device, int data) +static void filter_w(device_t *device, int data) { int C; diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c index ca641101270..26b73dae9ba 100644 --- a/src/mame/audio/segag80r.c +++ b/src/mame/audio/segag80r.c @@ -246,7 +246,7 @@ WRITE8_HANDLER( astrob_sound_w ) { 120.0f, 82.0f, 62.0f, 56.0f, 47.0f, 39.0f, 33.0f, 27.0f, 24.0f, 22.0f }; - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); float freq_factor; UINT8 diff = data ^ sound_state[offset]; @@ -478,7 +478,7 @@ static SOUND_START( sega005 ) static WRITE8_DEVICE_HANDLER( sega005_sound_a_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ sound_state[0]; sound_state[0] = data; @@ -706,7 +706,7 @@ static SOUND_START( spaceod ) WRITE8_HANDLER( spaceod_sound_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 diff = data ^ sound_state[offset]; sound_state[offset] = data; @@ -891,7 +891,7 @@ static SOUND_START( monsterb ) static WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ) { - running_device *tms = device->machine->device("music"); + device_t *tms = device->machine->device("music"); int enable_val; /* Lower four data lines get decoded into 13 control lines */ @@ -912,7 +912,7 @@ static WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ) static WRITE8_DEVICE_HANDLER( monsterb_sound_b_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ sound_state[1]; sound_state[1] = data; diff --git a/src/mame/audio/segag80v.c b/src/mame/audio/segag80v.c index fb568f860ae..c18ab02adae 100644 --- a/src/mame/audio/segag80v.c +++ b/src/mame/audio/segag80v.c @@ -137,7 +137,7 @@ d0 crafts joining WRITE8_HANDLER( elim1_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; /* Play fireball sample */ @@ -171,7 +171,7 @@ WRITE8_HANDLER( elim1_sh_w ) WRITE8_HANDLER( elim2_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; /* Play thrust sample */ @@ -198,7 +198,7 @@ WRITE8_HANDLER( elim2_sh_w ) WRITE8_HANDLER( zektor1_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; @@ -233,7 +233,7 @@ WRITE8_HANDLER( zektor1_sh_w ) WRITE8_HANDLER( zektor2_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; /* Play thrust sample */ @@ -261,7 +261,7 @@ WRITE8_HANDLER( zektor2_sh_w ) WRITE8_HANDLER( spacfury1_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; /* craft growing */ @@ -298,7 +298,7 @@ WRITE8_HANDLER( spacfury1_sh_w ) WRITE8_HANDLER( spacfury2_sh_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); data ^= 0xff; /* craft joining */ diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c index 2dac64ebc8f..38ac41b1acd 100644 --- a/src/mame/audio/segasnd.c +++ b/src/mame/audio/segasnd.c @@ -80,7 +80,7 @@ typedef struct _usb_state usb_state; struct _usb_state { sound_stream * stream; /* output stream */ - running_device *cpu; /* CPU index of the 8035 */ + device_t *cpu; /* CPU index of the 8035 */ UINT8 in_latch; /* input latch */ UINT8 out_latch; /* output latch */ UINT8 last_p2_value; /* current P2 output value */ @@ -191,7 +191,7 @@ static WRITE8_HANDLER( speech_p2_w ) * *************************************/ -static void speech_drq_w(running_device *device, int level) +static void speech_drq_w(device_t *device, int level) { speech_drq = (level == ASSERT_LINE); } diff --git a/src/mame/audio/seibu.c b/src/mame/audio/seibu.c index e9986a8507f..fc7be57e920 100644 --- a/src/mame/audio/seibu.c +++ b/src/mame/audio/seibu.c @@ -253,7 +253,7 @@ WRITE8_DEVICE_HANDLER( seibu_adpcm_ctl_w ) /***************************************************************************/ -static running_device *sound_cpu; +static device_t *sound_cpu; enum { @@ -313,17 +313,17 @@ WRITE8_HANDLER( seibu_rst18_ack_w ) update_irq_lines(space->machine, RST18_CLEAR); } -void seibu_ym3812_irqhandler(running_device *device, int linestate) +void seibu_ym3812_irqhandler(device_t *device, int linestate) { update_irq_lines(device->machine, linestate ? RST10_ASSERT : RST10_CLEAR); } -void seibu_ym2151_irqhandler(running_device *device, int linestate) +void seibu_ym2151_irqhandler(device_t *device, int linestate) { update_irq_lines(device->machine, linestate ? RST10_ASSERT : RST10_CLEAR); } -void seibu_ym2203_irqhandler(running_device *device, int linestate) +void seibu_ym2203_irqhandler(device_t *device, int linestate) { update_irq_lines(device->machine, linestate ? RST10_ASSERT : RST10_CLEAR); } diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h index bc7f035205b..5bfdcf55441 100644 --- a/src/mame/audio/seibu.h +++ b/src/mame/audio/seibu.h @@ -49,9 +49,9 @@ WRITE8_HANDLER( seibu_rst10_ack_w ); WRITE8_HANDLER( seibu_rst18_ack_w ); WRITE8_HANDLER( seibu_bank_w ); WRITE8_HANDLER( seibu_coin_w ); -void seibu_ym3812_irqhandler(running_device *device, int linestate); -void seibu_ym2151_irqhandler(running_device *device, int linestate); -void seibu_ym2203_irqhandler(running_device *device, int linestate); +void seibu_ym3812_irqhandler(device_t *device, int linestate); +void seibu_ym2151_irqhandler(device_t *device, int linestate); +void seibu_ym2203_irqhandler(device_t *device, int linestate); READ8_HANDLER( seibu_soundlatch_r ); READ8_HANDLER( seibu_main_data_pending_r ); WRITE8_HANDLER( seibu_main_data_w ); diff --git a/src/mame/audio/senjyo.c b/src/mame/audio/senjyo.c index ba874392c1b..1568370f6f1 100644 --- a/src/mame/audio/senjyo.c +++ b/src/mame/audio/senjyo.c @@ -58,7 +58,7 @@ WRITE8_HANDLER( senjyo_volume_w ) static TIMER_CALLBACK( senjyo_sh_update ) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); senjyo_state *state = machine->driver_data(); /* ctc2 timer single tone generator frequency */ diff --git a/src/mame/audio/snes_snd.c b/src/mame/audio/snes_snd.c index db571710c8b..6117c3c85e1 100644 --- a/src/mame/audio/snes_snd.c +++ b/src/mame/audio/snes_snd.c @@ -152,7 +152,7 @@ static const int ENVCNT[0x20] #define MEtoLE16( x ) LITTLE_ENDIANIZE_INT16(x) -static int advance_envelope( running_device *device, int v); +static int advance_envelope( device_t *device, int v); /*************************************************************************** TYPE DEFINITIONS @@ -232,7 +232,7 @@ struct _snes_sound_state INLINE FUNCTIONS *****************************************************************************/ -INLINE snes_sound_state *get_safe_token( running_device *device ) +INLINE snes_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == SNES); @@ -251,7 +251,7 @@ INLINE snes_sound_state *get_safe_token( running_device *device ) Reset emulated DSP -------------------------------------------------*/ -static void dsp_reset( running_device *device ) +static void dsp_reset( device_t *device ) { snes_sound_state *spc700 = get_safe_token(device); int i; @@ -291,7 +291,7 @@ static void dsp_reset( running_device *device ) to mix audio into -------------------------------------------------*/ -static void dsp_update( running_device *device, short *sound_ptr ) +static void dsp_update( device_t *device, short *sound_ptr ) { snes_sound_state *spc700 = get_safe_token(device); int V; @@ -772,7 +772,7 @@ static void dsp_update( running_device *device, short *sound_ptr ) to process envelope for. -------------------------------------------------*/ -static int advance_envelope( running_device *device, int v ) +static int advance_envelope( device_t *device, int v ) { snes_sound_state *spc700 = get_safe_token(device); int envx; @@ -1246,7 +1246,7 @@ WRITE8_DEVICE_HANDLER( spc_port_in ) spc700->port_in[offset] = data; } -UINT8 *spc_get_ram( running_device *device ) +UINT8 *spc_get_ram( device_t *device ) { snes_sound_state *spc700 = get_safe_token(device); @@ -1257,7 +1257,7 @@ UINT8 *spc_get_ram( running_device *device ) DEVICE INTERFACE *****************************************************************************/ -static void state_register( running_device *device ) +static void state_register( device_t *device ) { snes_sound_state *spc700 = get_safe_token(device); int v; diff --git a/src/mame/audio/snes_snd.h b/src/mame/audio/snes_snd.h index 46459b2b361..ae0e2462ab8 100644 --- a/src/mame/audio/snes_snd.h +++ b/src/mame/audio/snes_snd.h @@ -31,6 +31,6 @@ READ8_DEVICE_HANDLER( spc_ipl_r ); READ8_DEVICE_HANDLER( spc_port_out ); WRITE8_DEVICE_HANDLER( spc_port_in ); -UINT8 *spc_get_ram(running_device *device); +UINT8 *spc_get_ram(device_t *device); #endif /* __SNES_SPC_H__ */ diff --git a/src/mame/audio/snk6502.c b/src/mame/audio/snk6502.c index 620fa7b8310..c5324351dc8 100644 --- a/src/mame/audio/snk6502.c +++ b/src/mame/audio/snk6502.c @@ -50,7 +50,7 @@ struct _snk6502_sound_state INT32 tone_clock; sound_stream * tone_stream; - running_device *samples; + device_t *samples; UINT8 *ROM; int Sound0StopOnRollover; UINT8 LastPort1; @@ -382,7 +382,7 @@ DISCRETE_SOUND_START( fantasy ) DISCRETE_OUTPUT(NODE_23, 32760.0/12) DISCRETE_SOUND_END -INLINE snk6502_sound_state *get_safe_token( running_device *device ) +INLINE snk6502_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == SNK6502); @@ -621,7 +621,7 @@ static void build_waveform(snk6502_sound_state *state, int channel, int mask) void snk6502_set_music_freq(running_machine *machine, int freq) { - running_device *device = machine->device("snk6502"); + device_t *device = machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); TONE *tone_channels = state->tone_channels; @@ -643,7 +643,7 @@ void snk6502_set_music_freq(running_machine *machine, int freq) void snk6502_set_music_clock(running_machine *machine, double clock_time) { - running_device *device = machine->device("snk6502"); + device_t *device = machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); state->tone_clock_expire = clock_time * SAMPLE_RATE * FRAC_ONE; @@ -684,7 +684,7 @@ DEVICE_GET_INFO( snk6502_sound ) int snk6502_music0_playing(running_machine *machine) { - running_device *device = machine->device("snk6502"); + device_t *device = machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); TONE *tone_channels = state->tone_channels; @@ -694,9 +694,9 @@ int snk6502_music0_playing(running_machine *machine) WRITE8_HANDLER( sasuke_sound_w ) { - running_device *device = space->machine->device("snk6502"); + device_t *device = space->machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); - running_device *samples = state->samples; + device_t *samples = state->samples; TONE *tone_channels = state->tone_channels; switch (offset) @@ -764,9 +764,9 @@ WRITE8_HANDLER( sasuke_sound_w ) WRITE8_HANDLER( satansat_sound_w ) { - running_device *device = space->machine->device("snk6502"); + device_t *device = space->machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); - running_device *samples = state->samples; + device_t *samples = state->samples; TONE *tone_channels = state->tone_channels; switch (offset) @@ -831,9 +831,9 @@ WRITE8_HANDLER( satansat_sound_w ) WRITE8_HANDLER( vanguard_sound_w ) { - running_device *device = space->machine->device("snk6502"); + device_t *device = space->machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); - running_device *samples = state->samples; + device_t *samples = state->samples; TONE *tone_channels = state->tone_channels; switch (offset) @@ -932,7 +932,7 @@ WRITE8_HANDLER( vanguard_sound_w ) WRITE8_HANDLER( fantasy_sound_w ) { - running_device *device = space->machine->device("snk6502"); + device_t *device = space->machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); TONE *tone_channels = state->tone_channels; @@ -1085,9 +1085,9 @@ static void snk6502_speech_w(running_machine *machine, UINT8 data, const UINT16 7 */ - running_device *device = machine->device("snk6502"); + device_t *device = machine->device("snk6502"); snk6502_sound_state *state = get_safe_token(device); - running_device *samples = state->samples; + device_t *samples = state->samples; if ((data & HD38880_CTP) && (data & HD38880_CMV)) { diff --git a/src/mame/audio/spacefb.c b/src/mame/audio/spacefb.c index 1d3e1e97300..31a7f1ce985 100644 --- a/src/mame/audio/spacefb.c +++ b/src/mame/audio/spacefb.c @@ -36,7 +36,7 @@ READ8_HANDLER( spacefb_audio_t1_r ) WRITE8_HANDLER( spacefb_port_1_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); cputag_set_input_line(space->machine, "audiocpu", 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/audio/starwars.c b/src/mame/audio/starwars.c index 042c0e6700d..87160a10d68 100644 --- a/src/mame/audio/starwars.c +++ b/src/mame/audio/starwars.c @@ -16,7 +16,7 @@ static UINT8 sound_data; /* data for the sound cpu */ static UINT8 main_data; /* data for the main cpu */ -static running_device *riot; +static device_t *riot; SOUND_START( starwars ) diff --git a/src/mame/audio/t5182.c b/src/mame/audio/t5182.c index 6ae283d17c6..6126a81bea0 100644 --- a/src/mame/audio/t5182.c +++ b/src/mame/audio/t5182.c @@ -166,7 +166,7 @@ static int irqstate; static TIMER_CALLBACK( setirq_callback ) { - running_device *cpu; + device_t *cpu; switch(param) { @@ -219,7 +219,7 @@ static WRITE8_HANDLER( t5182_cpu_irq_ack_w ) timer_call_after_resynch(space->machine, NULL, CPU_CLEAR,setirq_callback); } -static void t5182_ym2151_irq_handler(running_device *device, int irq) +static void t5182_ym2151_irq_handler(device_t *device, int irq) { if (irq) timer_call_after_resynch(device->machine, NULL, YM2151_ASSERT,setirq_callback); diff --git a/src/mame/audio/taitosnd.c b/src/mame/audio/taitosnd.c index b6e7924c20f..da113b3116d 100644 --- a/src/mame/audio/taitosnd.c +++ b/src/mame/audio/taitosnd.c @@ -34,15 +34,15 @@ struct _tc0140syt_state UINT8 nmi_enabled; /* 1 if slave cpu has nmi's enabled */ UINT8 nmi_req; /* 1 if slave cpu has a pending nmi */ - running_device *mastercpu; /* this is the maincpu */ - running_device *slavecpu; /* this is the audiocpu */ + device_t *mastercpu; /* this is the maincpu */ + device_t *slavecpu; /* this is the audiocpu */ }; /***************************************************************************** INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0140syt_state *get_safe_token( running_device *device ) +INLINE tc0140syt_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0140SYT); @@ -50,7 +50,7 @@ INLINE tc0140syt_state *get_safe_token( running_device *device ) return (tc0140syt_state *)downcast(device)->token(); } -INLINE const tc0140syt_interface *get_interface( running_device *device ) +INLINE const tc0140syt_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0140SYT)); @@ -61,7 +61,7 @@ INLINE const tc0140syt_interface *get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -static void interrupt_controller( running_device *device ) +static void interrupt_controller( device_t *device ) { tc0140syt_state *tc0140syt = get_safe_token(device); diff --git a/src/mame/audio/targ.c b/src/mame/audio/targ.c index 611057478d1..a6dc89650c5 100644 --- a/src/mame/audio/targ.c +++ b/src/mame/audio/targ.c @@ -45,7 +45,7 @@ static const INT16 sine_wave[32] = -static void adjust_sample(running_device *samples, UINT8 freq) +static void adjust_sample(device_t *samples, UINT8 freq) { tone_freq = freq; @@ -61,7 +61,7 @@ static void adjust_sample(running_device *samples, UINT8 freq) WRITE8_HANDLER( targ_audio_1_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); /* CPU music */ if ((data & 0x01) != (port_1_last & 0x01)) @@ -114,7 +114,7 @@ WRITE8_HANDLER( targ_audio_2_w ) { if ((data & 0x01) && !(port_2_last & 0x01)) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 *prom = memory_region(space->machine, "targ"); tone_pointer = (tone_pointer + 1) & 0x0f; @@ -128,7 +128,7 @@ WRITE8_HANDLER( targ_audio_2_w ) WRITE8_HANDLER( spectar_audio_2_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); adjust_sample(samples, data); } @@ -147,7 +147,7 @@ static const char *const sample_names[] = static void common_audio_start(running_machine *machine, int freq) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); max_freq = freq; tone_freq = 0; diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index 3c98d68c890..86d1138a468 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -71,7 +71,7 @@ struct _tiamc1_sound_state #define T8253_CWORD 3 -INLINE tiamc1_sound_state *get_safe_token(running_device *device) +INLINE tiamc1_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TIAMC1); diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c index 77ccdd89ddf..44da1ce6f6d 100644 --- a/src/mame/audio/timeplt.c +++ b/src/mame/audio/timeplt.c @@ -25,15 +25,15 @@ struct _timeplt_audio_state UINT8 last_irq_state; cpu_device *soundcpu; - running_device *filter_0_0; - running_device *filter_0_1; - running_device *filter_0_2; - running_device *filter_1_0; - running_device *filter_1_1; - running_device *filter_1_2; + device_t *filter_0_0; + device_t *filter_0_1; + device_t *filter_0_2; + device_t *filter_1_0; + device_t *filter_1_1; + device_t *filter_1_2; }; -INLINE timeplt_audio_state *get_safe_token( running_device *device ) +INLINE timeplt_audio_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TIMEPLT_AUDIO); @@ -110,7 +110,7 @@ static READ8_DEVICE_HANDLER( timeplt_portB_r ) * *************************************/ -static void filter_w( running_device *device, int data ) +static void filter_w( device_t *device, int data ) { int C = 0; @@ -145,7 +145,7 @@ static WRITE8_DEVICE_HANDLER( timeplt_filter_w ) WRITE8_HANDLER( timeplt_sh_irqtrigger_w ) { - running_device *audio = space->machine->device("timeplt_audio"); + device_t *audio = space->machine->device("timeplt_audio"); timeplt_audio_state *state = get_safe_token(audio); if (state->last_irq_state == 0 && data) diff --git a/src/mame/audio/toaplan2.c b/src/mame/audio/toaplan2.c index 55e57cf1f22..4171963ff50 100644 --- a/src/mame/audio/toaplan2.c +++ b/src/mame/audio/toaplan2.c @@ -98,13 +98,13 @@ static void play_oki_sound(okim6295_device *oki, int game_sound, int data) } } -void dogyuun_okisnd_w(running_device *device, int data) +void dogyuun_okisnd_w(device_t *device, int data) { /* Need a board to determine the sound commands */ // popmessage("Writing %04x to Sound CPU",data); } -void kbash_okisnd_w(running_device *device, int data) +void kbash_okisnd_w(device_t *device, int data) { // popmessage("Writing %04x to Sound CPU",data); @@ -119,7 +119,7 @@ void kbash_okisnd_w(running_device *device, int data) } } -void fixeight_okisnd_w(running_device *device, int data) +void fixeight_okisnd_w(device_t *device, int data) { // popmessage("Writing %04x to Sound CPU",data); @@ -134,7 +134,7 @@ void fixeight_okisnd_w(running_device *device, int data) } } -void batsugun_okisnd_w(running_device *device, int data) +void batsugun_okisnd_w(device_t *device, int data) { // popmessage("Writing %04x to Sound CPU",data); diff --git a/src/mame/audio/trackfld.c b/src/mame/audio/trackfld.c index 564325b91a0..9c6346d5b4e 100644 --- a/src/mame/audio/trackfld.c +++ b/src/mame/audio/trackfld.c @@ -18,11 +18,11 @@ struct _trackfld_audio_state int last_irq; cpu_device *audiocpu; - running_device *vlm; + device_t *vlm; }; -INLINE trackfld_audio_state *get_safe_token( running_device *device ) +INLINE trackfld_audio_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TRACKFLD_AUDIO); @@ -87,7 +87,7 @@ READ8_DEVICE_HANDLER( trackfld_speech_r ) WRITE8_DEVICE_HANDLER( trackfld_sound_w ) { - running_device *audio = device->machine->device("trackfld_audio"); + device_t *audio = device->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); int changes = offset ^ state->last_addr; @@ -108,7 +108,7 @@ WRITE8_DEVICE_HANDLER( trackfld_sound_w ) READ8_HANDLER( hyperspt_sh_timer_r ) { - running_device *audio = space->machine->device("trackfld_audio"); + device_t *audio = space->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); UINT32 clock = state->audiocpu->total_cycles() / TIMER_RATE; @@ -120,7 +120,7 @@ READ8_HANDLER( hyperspt_sh_timer_r ) WRITE8_DEVICE_HANDLER( hyperspt_sound_w ) { - running_device *audio = device->machine->device("trackfld_audio"); + device_t *audio = device->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); int changes = offset ^ state->last_addr; @@ -146,7 +146,7 @@ WRITE8_DEVICE_HANDLER( hyperspt_sound_w ) WRITE8_HANDLER( konami_sh_irqtrigger_w ) { - running_device *audio = space->machine->device("trackfld_audio"); + device_t *audio = space->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); if (state->last_irq == 0 && data) { @@ -160,7 +160,7 @@ WRITE8_HANDLER( konami_sh_irqtrigger_w ) WRITE8_HANDLER( konami_SN76496_latch_w ) { - running_device *audio = space->machine->device("trackfld_audio"); + device_t *audio = space->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); state->SN76496_latch = data; } @@ -168,7 +168,7 @@ WRITE8_HANDLER( konami_SN76496_latch_w ) WRITE8_DEVICE_HANDLER( konami_SN76496_w ) { - running_device *audio = device->machine->device("trackfld_audio"); + device_t *audio = device->machine->device("trackfld_audio"); trackfld_audio_state *state = get_safe_token(audio); sn76496_w(device, offset, state->SN76496_latch); } diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c index 5e09357bc82..daaded7f1f8 100644 --- a/src/mame/audio/turbo.c +++ b/src/mame/audio/turbo.c @@ -19,7 +19,7 @@ * *************************************/ -static void turbo_update_samples(turbo_state *state, running_device *samples) +static void turbo_update_samples(turbo_state *state, device_t *samples) { /* accelerator sounds */ /* BSEL == 3 --> off */ @@ -40,7 +40,7 @@ static int last_sound_a; static TIMER_CALLBACK( update_sound_a ) { - running_device *discrete = machine->device("discrete"); + device_t *discrete = machine->device("discrete"); int data = param; /* missing short crash sample, but I've never seen it triggered */ @@ -73,7 +73,7 @@ if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n"); WRITE8_DEVICE_HANDLER( turbo_sound_a_w ) { #if (!DISCRETE_TEST) - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); #endif turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[0]; @@ -123,7 +123,7 @@ WRITE8_DEVICE_HANDLER( turbo_sound_a_w ) WRITE8_DEVICE_HANDLER( turbo_sound_b_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[1]; state->sound_state[1] = data; @@ -146,7 +146,7 @@ WRITE8_DEVICE_HANDLER( turbo_sound_b_w ) WRITE8_DEVICE_HANDLER( turbo_sound_c_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); /* OSEL1-2 */ @@ -305,7 +305,7 @@ WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w ) } -INLINE void subroc3d_update_volume(running_device *samples, int leftchan, UINT8 dis, UINT8 dir) +INLINE void subroc3d_update_volume(device_t *samples, int leftchan, UINT8 dis, UINT8 dir) { float volume = (float)(15 - dis) / 16.0f; float lvol, rvol; @@ -327,7 +327,7 @@ INLINE void subroc3d_update_volume(running_device *samples, int leftchan, UINT8 WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[1]; state->sound_state[1] = data; @@ -383,7 +383,7 @@ WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ) WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[2]; state->sound_state[2] = data; @@ -498,7 +498,7 @@ MACHINE_CONFIG_END * *************************************/ -static void buckrog_update_samples(turbo_state *state, running_device *samples) +static void buckrog_update_samples(turbo_state *state, device_t *samples) { /* accelerator sounds */ if (sample_playing(samples, 5)) @@ -508,7 +508,7 @@ static void buckrog_update_samples(turbo_state *state, running_device *samples) WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[0]; state->sound_state[0] = data; @@ -534,7 +534,7 @@ WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ) WRITE8_DEVICE_HANDLER( buckrog_sound_b_w ) { - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); turbo_state *state = device->machine->driver_data(); UINT8 diff = data ^ state->sound_state[1]; state->sound_state[1] = data; diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index 330c52a40e8..4b6da9076db 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -66,7 +66,7 @@ struct _tx1_sound_state UINT16 eng_voltages[16]; }; -INLINE tx1_sound_state *get_safe_token(running_device *device) +INLINE tx1_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TX1 || device->type() == BUGGYBOY); @@ -433,8 +433,8 @@ WRITE8_DEVICE_HANDLER( bb_ym2_a_w ) WRITE8_DEVICE_HANDLER( bb_ym2_b_w ) { tx1_sound_state *state = get_safe_token(device); - running_device *ym1 = device->machine->device("ym1"); - running_device *ym2 = device->machine->device("ym2"); + device_t *ym1 = device->machine->device("ym1"); + device_t *ym2 = device->machine->device("ym2"); double gain; stream_update(state->stream); diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c index 3bf7960bb1d..47662441957 100644 --- a/src/mame/audio/vicdual.c +++ b/src/mame/audio/vicdual.c @@ -132,7 +132,7 @@ MACHINE_CONFIG_END static TIMER_CALLBACK( frogs_croak_callback ) { - running_device *samples = machine->device("samples"); + device_t *samples = machine->device("samples"); sample_stop(samples, 2); } @@ -145,8 +145,8 @@ MACHINE_START( frogs_audio ) WRITE8_HANDLER( frogs_audio_w ) { - running_device *samples = space->machine->device("samples"); - running_device *discrete = space->machine->device("discrete"); + device_t *samples = space->machine->device("samples"); + device_t *discrete = space->machine->device("discrete"); static int last_croak = 0; static int last_buzzz = 0; int new_croak = data & 0x08; @@ -462,7 +462,7 @@ MACHINE_CONFIG_END WRITE8_HANDLER( headon_audio_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); if (discrete == NULL) return; discrete_sound_w(discrete, HEADON_HISPEED_PC_EN, data & 0x01); @@ -477,7 +477,7 @@ WRITE8_HANDLER( headon_audio_w ) WRITE8_HANDLER( invho2_audio_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); if (discrete == NULL) return; discrete_sound_w(discrete, HEADON_HISPEED_PC_EN, data & 0x10); diff --git a/src/mame/audio/warpwarp.c b/src/mame/audio/warpwarp.c index 2e35d2ab156..976b24d4814 100644 --- a/src/mame/audio/warpwarp.c +++ b/src/mame/audio/warpwarp.c @@ -36,7 +36,7 @@ struct _warpwarp_sound_state int mcount; }; -INLINE warpwarp_sound_state *get_safe_token(running_device *device) +INLINE warpwarp_sound_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == WARPWARP); diff --git a/src/mame/audio/williams.c b/src/mame/audio/williams.c index 2a3eff21327..4dc9fbca2cb 100644 --- a/src/mame/audio/williams.c +++ b/src/mame/audio/williams.c @@ -52,8 +52,8 @@ static UINT8 williams_sound_int_state; static UINT8 audio_talkback; static UINT8 audio_sync; -static running_device *sound_cpu; -static running_device *soundalt_cpu; +static device_t *sound_cpu; +static device_t *soundalt_cpu; @@ -63,8 +63,8 @@ static running_device *soundalt_cpu; static void init_audio_state(running_machine *machine); -static void cvsd_ym2151_irq(running_device *device, int state); -static void adpcm_ym2151_irq(running_device *device, int state); +static void cvsd_ym2151_irq(device_t *device, int state); +static void adpcm_ym2151_irq(device_t *device, int state); static WRITE_LINE_DEVICE_HANDLER( cvsd_irqa ); static WRITE_LINE_DEVICE_HANDLER( cvsd_irqb ); @@ -405,7 +405,7 @@ static void init_audio_state(running_machine *machine) CVSD IRQ GENERATION CALLBACKS ****************************************************************************/ -static void cvsd_ym2151_irq(running_device *device, int state) +static void cvsd_ym2151_irq(device_t *device, int state) { pia6821_ca1_w(device->machine->device("cvsdpia"), !state); } @@ -428,7 +428,7 @@ static WRITE_LINE_DEVICE_HANDLER( cvsd_irqb ) ADPCM IRQ GENERATION CALLBACKS ****************************************************************************/ -static void adpcm_ym2151_irq(running_device *device, int state) +static void adpcm_ym2151_irq(device_t *device, int state) { cpu_set_input_line(sound_cpu, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } @@ -471,7 +471,7 @@ static WRITE8_DEVICE_HANDLER( cvsd_clock_set_w ) static TIMER_CALLBACK( williams_cvsd_delayed_data_w ) { - running_device *pia = machine->device("cvsdpia"); + device_t *pia = machine->device("cvsdpia"); pia6821_portb_w(pia, 0, param & 0xff); pia6821_cb1_w(pia, (param >> 8) & 1); pia6821_cb2_w(pia, (param >> 9) & 1); diff --git a/src/mame/audio/wiping.c b/src/mame/audio/wiping.c index fa95ad0f50a..40cf776757b 100644 --- a/src/mame/audio/wiping.c +++ b/src/mame/audio/wiping.c @@ -56,7 +56,7 @@ struct _wiping_sound_state }; -INLINE wiping_sound_state *get_safe_token( running_device *device ) +INLINE wiping_sound_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == WIPING); @@ -65,7 +65,7 @@ INLINE wiping_sound_state *get_safe_token( running_device *device ) } /* build a table to divide by the number of voices; gain is specified as gain*16 */ -static void make_mixer_table(running_device *device, int voices, int gain) +static void make_mixer_table(device_t *device, int voices, int gain) { wiping_sound_state *state = get_safe_token(device); int count = voices * 128; diff --git a/src/mame/audio/wow.c b/src/mame/audio/wow.c index e48bbe9b697..68c9cb33d3f 100644 --- a/src/mame/audio/wow.c +++ b/src/mame/audio/wow.c @@ -108,7 +108,7 @@ static int plural; READ8_HANDLER( wow_speech_r ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int Phoneme/*, Intonation*/; int i = 0; @@ -177,6 +177,6 @@ READ8_HANDLER( wow_speech_r ) CUSTOM_INPUT( wow_speech_status_r ) { - running_device *samples = field->port->machine->device("samples"); + device_t *samples = field->port->machine->device("samples"); return !sample_playing(samples, 0); } diff --git a/src/mame/audio/zaxxon.c b/src/mame/audio/zaxxon.c index 8f5c05c7e8b..577e2b9affb 100644 --- a/src/mame/audio/zaxxon.c +++ b/src/mame/audio/zaxxon.c @@ -114,7 +114,7 @@ MACHINE_CONFIG_END WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ) { zaxxon_state *state = device->machine->driver_data(); - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ state->sound_state[0]; state->sound_state[0] = data; @@ -150,7 +150,7 @@ WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ) WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ) { zaxxon_state *state = device->machine->driver_data(); - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ state->sound_state[1]; state->sound_state[1] = data; @@ -168,7 +168,7 @@ WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ) WRITE8_DEVICE_HANDLER( zaxxon_sound_c_w ) { zaxxon_state *state = device->machine->driver_data(); - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ state->sound_state[2]; state->sound_state[2] = data; @@ -226,7 +226,7 @@ MACHINE_CONFIG_END WRITE8_DEVICE_HANDLER( congo_sound_b_w ) { zaxxon_state *state = device->machine->driver_data(); - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ state->sound_state[1]; state->sound_state[1] = data; @@ -240,7 +240,7 @@ WRITE8_DEVICE_HANDLER( congo_sound_b_w ) WRITE8_DEVICE_HANDLER( congo_sound_c_w ) { zaxxon_state *state = device->machine->driver_data(); - running_device *samples = device->machine->device("samples"); + device_t *samples = device->machine->device("samples"); UINT8 diff = data ^ state->sound_state[2]; state->sound_state[2] = data; diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index 8a06246a2c6..bd33a4de925 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -70,7 +70,7 @@ public: UINT16 defender_sensor, shutter_sensor; /* devices */ - running_device *maincpu; + device_t *maincpu; }; @@ -412,7 +412,7 @@ static INTERRUPT_GEN( drill_interrupt ) } /* WRONG,it does something with 60000c & 700002,likely to be called when the player throws the ball.*/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { // _2mindril_state *state = machine->driver_data<_2mindril_state>(); // cpu_set_input_line(state->maincpu, 5, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index c6c2601401a..52e17508543 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -454,7 +454,7 @@ static UINT8 main_latch_d800; static UINT8 snd_latch_0800; static UINT8 snd_latch_0a02; static UINT8 ay8910_addr; -static running_device *ay8910; +static device_t *ay8910; /************************* diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index 7fa42a1aa57..0ad1b1adb04 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -82,7 +82,7 @@ static WRITE8_HANDLER( k88games_sh_irqtrigger_w ) static WRITE8_HANDLER( speech_control_w ) { _88games_state *state = space->machine->driver_data<_88games_state>(); - running_device *upd; + device_t *upd; state->speech_chip = (data & 4) ? 1 : 0; upd = state->speech_chip ? state->upd_2 : state->upd_1; @@ -94,7 +94,7 @@ static WRITE8_HANDLER( speech_control_w ) static WRITE8_HANDLER( speech_msg_w ) { _88games_state *state = space->machine->driver_data<_88games_state>(); - running_device *upd = state->speech_chip ? state->upd_2 : state->upd_1; + device_t *upd = state->speech_chip ? state->upd_2 : state->upd_1; upd7759_port_w(upd, 0, data); } diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c index fd5927b4252..f9790f03c11 100644 --- a/src/mame/drivers/actfancr.c +++ b/src/mame/drivers/actfancr.c @@ -263,7 +263,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int linestate) +static void sound_irq(device_t *device, int linestate) { actfancr_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); /* IRQ */ diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index f895b88d4d2..ce4168d2472 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -163,9 +163,9 @@ public: UINT8 register_active; /* devices */ - running_device *maincpu; - running_device *duart; - running_device *hd63484; + device_t *maincpu; + device_t *duart; + device_t *hd63484; }; @@ -175,13 +175,13 @@ public: ***************************************************************************/ -static void duart_irq_handler( running_device *device, UINT8 vector ) +static void duart_irq_handler( device_t *device, UINT8 vector ) { adp_state *state = device->machine->driver_data(); cpu_set_input_line_and_vector(state->maincpu, 4, HOLD_LINE, vector); }; -static void duart_tx( running_device *device, int channel, UINT8 data ) +static void duart_tx( device_t *device, int channel, UINT8 data ) { if (channel == 0) { @@ -195,7 +195,7 @@ static void microtouch_tx( running_machine *machine, UINT8 data ) duart68681_rx_data(state->duart, 0, data); } -static UINT8 duart_input( running_device *device ) +static UINT8 duart_input( device_t *device ) { return input_port_read(device->machine, "DSW1"); } @@ -226,7 +226,7 @@ static MACHINE_START( skattv ) UINT16 *rom = (UINT16*)memory_region(machine, "gfx1"); int i; - running_device *hd63484 = machine->device("hd63484"); + device_t *hd63484 = machine->device("hd63484"); for(i = 0; i < 0x40000/2; ++i) { diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index eac311fe459..2dc5fc4cf83 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -1280,7 +1280,7 @@ static GFXDECODE_START( wbbc97 ) GFXDECODE_ENTRY( "gfx2", 0, wbbc97_spritelayout, 1024, 64 ) /* colors 1024-2047 in 4 banks */ GFXDECODE_END -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { aerofgt_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c index 3168aaf3d1c..c6c55cde96e 100644 --- a/src/mame/drivers/ajax.c +++ b/src/mame/drivers/ajax.c @@ -151,7 +151,7 @@ static WRITE8_HANDLER( sound_bank_w ) k007232_set_bank(state->k007232_2, bank_A, bank_B); } -static void volume_callback0(running_device *device, int v) +static void volume_callback0(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); @@ -163,7 +163,7 @@ static WRITE8_DEVICE_HANDLER( k007232_extvol_w ) k007232_set_volume(device, 0, (data & 0x0f) * 0x11/2, (data & 0x0f) * 0x11/2); } -static void volume_callback1(running_device *device, int v) +static void volume_callback1(device_t *device, int v) { /* channel B volume/pan */ k007232_set_volume(device, 1, (v & 0x0f) * 0x11/2, (v >> 4) * 0x11/2); diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 400749b9a81..3f7df301e13 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -36,7 +36,7 @@ public: : amiga_state(machine, config) { } - running_device *laserdisc; + device_t *laserdisc; emu_timer *serial_timer; UINT8 serial_timer_active; UINT16 input_select; diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index 34b957ee885..3da802df42a 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -201,7 +201,7 @@ INPUT_PORTS_END ***************************************************************************/ -static void volume_callback( running_device *device, int v ) +static void volume_callback( device_t *device, int v ) { k007232_set_volume(device, 0, (v & 0x0f) * 0x11, 0); k007232_set_volume(device, 1, 0, (v >> 4) * 0x11); diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c index b672747022b..ecd7d4bb1e1 100644 --- a/src/mame/drivers/alpha68k.c +++ b/src/mame/drivers/alpha68k.c @@ -1839,7 +1839,7 @@ static const ym2203_interface ym2203_config = } }; -static void YM3812_irq( running_device *device, int param ) +static void YM3812_irq( device_t *device, int param ) { alpha68k_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, (param) ? HOLD_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c index 70190238cbd..bba77be6e2f 100644 --- a/src/mame/drivers/amspdwy.c +++ b/src/mame/drivers/amspdwy.c @@ -239,7 +239,7 @@ GFXDECODE_END ***************************************************************************/ -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { amspdwy_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 01f4e27775e..04099149957 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -512,7 +512,7 @@ static READ8_HANDLER( angelkds_sub_sound_r ) } -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { angelkds_state *state = device->machine->driver_data(); cpu_set_input_line(state->subcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index 2c89d87ccc9..b17e43aadfd 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -169,7 +169,7 @@ Language #include "sound/sn76496.h" -static void appoooh_adpcm_int(running_device *device) +static void appoooh_adpcm_int(device_t *device) { appoooh_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index 470af9640c4..67a9e5741dd 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -328,7 +328,7 @@ static GFXDECODE_START( aquarium ) GFXDECODE_ENTRY( "gfx4", 0, char5bpplayout, 0x400, 32 ) GFXDECODE_END -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { aquarium_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c index 5e481f82cff..2bb408d89af 100644 --- a/src/mame/drivers/argus.c +++ b/src/mame/drivers/argus.c @@ -141,7 +141,7 @@ static INTERRUPT_GEN( argus_interrupt ) } /* Handler called by the YM2203 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 743468d393c..b23e03f9618 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -110,7 +110,7 @@ int rtc_address_strobe = 0; int rtc_data_strobe = 0; -running_device *samples; +device_t *samples; UINT8 *shapeRomPtr; // pointer to tile_gfx shape roms UINT8 shapeRom[0xc000]; // shaperom restore array. diff --git a/src/mame/drivers/artmagic.c b/src/mame/drivers/artmagic.c index 21979ee71a3..d23768ec7cc 100644 --- a/src/mame/drivers/artmagic.c +++ b/src/mame/drivers/artmagic.c @@ -65,7 +65,7 @@ static void update_irq_state(running_machine *machine) } -static void m68k_gen_int(running_device *device, int state) +static void m68k_gen_int(device_t *device, int state) { tms_irq = state; update_irq_state(device->machine); diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index 144a3c8e723..bb556f6177a 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -274,7 +274,7 @@ static GFXDECODE_START( ashnojoe ) GFXDECODE_END -static void ym2203_irq_handler( running_device *device, int irq ) +static void ym2203_irq_handler( device_t *device, int irq ) { ashnojoe_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); @@ -307,7 +307,7 @@ static const ym2203_interface ym2203_config = ym2203_irq_handler }; -static void ashnojoe_vclk_cb( running_device *device ) +static void ashnojoe_vclk_cb( device_t *device ) { ashnojoe_state *state = device->machine->driver_data(); if (state->msm5205_vclk_toggle == 0) diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c index cf095cde7a7..fff375ac758 100644 --- a/src/mame/drivers/astinvad.c +++ b/src/mame/drivers/astinvad.c @@ -58,10 +58,10 @@ public: UINT8 flip_yoffs; UINT8 color_latch; - running_device *maincpu; - running_device *ppi8255_0; - running_device *ppi8255_1; - running_device *samples; + device_t *maincpu; + device_t *ppi8255_0; + device_t *ppi8255_1; + device_t *samples; }; diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c index 4385a46cd7b..b0763b27386 100644 --- a/src/mame/drivers/astrocde.c +++ b/src/mame/drivers/astrocde.c @@ -208,7 +208,7 @@ static WRITE8_HANDLER( seawolf2_lamps_w ) static WRITE8_HANDLER( seawolf2_sound_1_w ) // Port 40 { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 rising_bits = data & ~port_1_last; port_1_last = data; @@ -223,7 +223,7 @@ static WRITE8_HANDLER( seawolf2_sound_1_w ) // Port 40 static WRITE8_HANDLER( seawolf2_sound_2_w ) // Port 41 { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 rising_bits = data & ~port_2_last; port_2_last = data; diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index 9f9a6fc8c32..0e80cd77d58 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -259,7 +259,7 @@ static WRITE8_DEVICE_HANDLER( sound_bankswitch_2151_w ) -static void asuka_msm5205_vck( running_device *device ) +static void asuka_msm5205_vck( device_t *device ) { asuka_state *state = device->machine->driver_data(); @@ -769,7 +769,7 @@ GFXDECODE_END SOUND **************************************************************/ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 07b407c7a63..e9b011c0372 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -42,11 +42,11 @@ public: bitmap_t *right; /* devices */ - running_device *maincpu; - running_device *deco16ic; - running_device *lscreen; - running_device *rscreen; - running_device *eeprom; + device_t *maincpu; + device_t *deco16ic; + device_t *lscreen; + device_t *rscreen; + device_t *eeprom; }; //UINT32 *backfire_180010, *backfire_188010; @@ -427,7 +427,7 @@ static GFXDECODE_START( backfire ) GFXDECODE_END -static void sound_irq_gen(running_device *device, int state) +static void sound_irq_gen(device_t *device, int state) { logerror("sound irq\n"); } diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c index 6e7b1336c2e..b6a64612337 100644 --- a/src/mame/drivers/battlane.c +++ b/src/mame/drivers/battlane.c @@ -256,7 +256,7 @@ GFXDECODE_END * *************************************/ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { battlane_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c index 620f484e1da..832c5846116 100644 --- a/src/mame/drivers/battlera.c +++ b/src/mame/drivers/battlera.c @@ -85,7 +85,7 @@ ADDRESS_MAP_END static int msm5205next; -static void battlera_adpcm_int(running_device *device) +static void battlera_adpcm_int(device_t *device) { static int toggle; diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c index 80f9564abdd..562d0db3228 100644 --- a/src/mame/drivers/bbusters.c +++ b/src/mame/drivers/bbusters.c @@ -642,7 +642,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq( running_device *device, int irq ) +static void sound_irq( device_t *device, int irq ) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c index bf026aaccdf..0ede01a379d 100644 --- a/src/mame/drivers/beaminv.c +++ b/src/mame/drivers/beaminv.c @@ -72,7 +72,7 @@ public: UINT8 controller_select; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c index 33ec86e1b38..7dbafa76d85 100644 --- a/src/mame/drivers/berzerk.c +++ b/src/mame/drivers/berzerk.c @@ -468,7 +468,7 @@ static VIDEO_UPDATE( berzerk ) static WRITE8_HANDLER( berzerk_audio_w ) { - running_device *device; + device_t *device; int clock_divisor; switch (offset) @@ -525,7 +525,7 @@ static WRITE8_HANDLER( berzerk_audio_w ) static READ8_HANDLER( berzerk_audio_r ) { - running_device *device = space->machine->device("speech"); + device_t *device = space->machine->device("speech"); switch (offset) { /* offset 4 reads from the S14001A */ diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c index 1189bc733fd..99f157dcdb1 100644 --- a/src/mame/drivers/bfm_sc2.c +++ b/src/mame/drivers/bfm_sc2.c @@ -696,8 +696,8 @@ static WRITE8_HANDLER( volume_override_w ) if ( old != volume_override ) { - running_device *ym = space->machine->device("ymsnd"); - running_device *upd = space->machine->device("upd"); + device_t *ym = space->machine->device("ymsnd"); + device_t *upd = space->machine->device("upd"); float percent = volume_override? 1.0f : (32-global_volume)/32.0f; sound_set_output_gain(ym, 0, percent); @@ -810,8 +810,8 @@ static WRITE8_HANDLER( expansion_latch_w ) } { - running_device *ym = space->machine->device("ymsnd"); - running_device *upd = space->machine->device("upd"); + device_t *ym = space->machine->device("ymsnd"); + device_t *upd = space->machine->device("upd"); float percent = volume_override ? 1.0f : (32-global_volume)/32.0f; sound_set_output_gain(ym, 0, percent); diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c index 65a3875a28b..6ccf1c25e48 100644 --- a/src/mame/drivers/bishi.c +++ b/src/mame/drivers/bishi.c @@ -367,7 +367,7 @@ static INPUT_PORTS_START( bishi2p ) INPUT_PORTS_END -static void sound_irq_gen(running_device *device, int state) +static void sound_irq_gen(device_t *device, int state) { bishi_state *bishi = device->machine->driver_data(); if (state) diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c index 41c59eb311d..129968d2db9 100644 --- a/src/mame/drivers/blktiger.c +++ b/src/mame/drivers/blktiger.c @@ -263,7 +263,7 @@ GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { blktiger_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c index dbfc0031a94..a01d301f5fe 100644 --- a/src/mame/drivers/blockout.c +++ b/src/mame/drivers/blockout.c @@ -235,7 +235,7 @@ INPUT_PORTS_END *************************************/ /* handler called by the 2151 emulator when the internal timers cause an IRQ */ -static void blockout_irq_handler(running_device *device, int irq) +static void blockout_irq_handler(device_t *device, int irq) { blockout_state *state = device->machine->driver_data(); cpu_set_input_line_and_vector(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff); diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index a98fe2e75ca..86f855f4a1c 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -233,7 +233,7 @@ static WRITE8_DEVICE_HANDLER(via_ca2_out) } -static void via_irq(running_device *device, int state) +static void via_irq(device_t *device, int state) { //used } diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c index f033289df38..36f4a128585 100644 --- a/src/mame/drivers/bnstars.c +++ b/src/mame/drivers/bnstars.c @@ -489,8 +489,8 @@ static VIDEO_START(bnstars) static VIDEO_UPDATE(bnstars) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); bitmap_fill(screen->machine->priority_bitmap,cliprect,0); diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c index 6451a87b8ae..e46135454c3 100644 --- a/src/mame/drivers/boogwing.c +++ b/src/mame/drivers/boogwing.c @@ -274,7 +274,7 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { boogwing_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c index d4e5206adbc..43eb7c43204 100644 --- a/src/mame/drivers/bottom9.c +++ b/src/mame/drivers/bottom9.c @@ -282,13 +282,13 @@ INPUT_PORTS_END -static void volume_callback0( running_device *device, int v ) +static void volume_callback0( device_t *device, int v ) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); } -static void volume_callback1( running_device *device, int v ) +static void volume_callback1( device_t *device, int v ) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c index 9c7a782d6d0..23ce7d3c2ec 100644 --- a/src/mame/drivers/boxer.c +++ b/src/mame/drivers/boxer.c @@ -35,7 +35,7 @@ public: UINT8 pot_latch; /* devices */ - running_device *maincpu; + device_t *maincpu; }; /************************************* diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index f20e91aa9e2..e0dbbd2ea7e 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -344,7 +344,7 @@ GFXDECODE_END *************************************/ /* handler called by the 3812 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { brkthru_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, M6809_IRQ_LINE, linestate); diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index c88aa737d71..a93763eb12e 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -697,7 +697,7 @@ GFXDECODE_END *************************************/ // handler called by the 2203 emulator when the internal timers cause an IRQ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { bublbobl_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index fcf58f082f8..ae8eb136228 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -462,7 +462,7 @@ static GFXDECODE_START( cabal ) GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/calchase.c b/src/mame/drivers/calchase.c index f3e6c1eecf9..819d30dd1bd 100644 --- a/src/mame/drivers/calchase.c +++ b/src/mame/drivers/calchase.c @@ -97,17 +97,17 @@ all files across to new HDD, boots up fine. #include "machine/pckeybrd.h" #include "machine/idectrl.h" -static void ide_interrupt(running_device *device, int state); +static void ide_interrupt(device_t *device, int state); static UINT32 *bios_ram; static UINT32 *vga_vram; static struct { - running_device *pit8254; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8254; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } calchase_devices; @@ -240,7 +240,7 @@ static WRITE8_HANDLER( pc_dma_write_byte ) space->write_byte(page_offset + offset, data); } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } @@ -307,14 +307,14 @@ static WRITE32_DEVICE_HANDLER( fdc_w ) // Intel 82439TX System Controller (MXTC) static UINT8 mxtc_config_reg[256]; -static UINT8 mxtc_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("MXTC: read %d, %02X\n", function, reg); return mxtc_config_reg[reg]; } -static void mxtc_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", cpuexec_describe_context(machine), function, reg, data); @@ -347,7 +347,7 @@ static void intel82439tx_init(void) mxtc_config_reg[0x65] = 0x02; } -static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82439tx_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -369,7 +369,7 @@ static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82439tx_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -392,19 +392,19 @@ static void intel82439tx_pci_w(running_device *busdevice, running_device *device // Intel 82371AB PCI-to-ISA / IDE bridge (PIIX4) static UINT8 piix4_config_reg[4][256]; -static UINT8 piix4_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); return piix4_config_reg[function][reg]; } -static void piix4_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", cpuexec_describe_context(machine), function, reg, data); piix4_config_reg[function][reg] = data; } -static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82371ab_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -426,7 +426,7 @@ static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82371ab_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82371ab_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -629,7 +629,7 @@ static void keyboard_interrupt(running_machine *machine, int state) pic8259_ir1_w(calchase_devices.pic8259_1, state); } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { pic8259_ir6_w(calchase_devices.pic8259_2, state); } diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index 70aea9db47a..8746b6d8774 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -199,7 +199,7 @@ static WRITE8_HANDLER( capbowl_sndcmd_w ) * *************************************/ -static void firqhandler( running_device *device, int irq ) +static void firqhandler( device_t *device, int irq ) { capbowl_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 1, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index ddd0adeb138..7874c438e56 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -131,7 +131,7 @@ static INTERRUPT_GEN( cave_interrupt ) } /* Called by the YMZ280B to set the IRQ state */ -static void sound_irq_gen( running_device *device, int state ) +static void sound_irq_gen( device_t *device, int state ) { cave_state *cave = device->machine->driver_data(); cave->sound_irq = (state != 0); @@ -1824,7 +1824,7 @@ static const ymz280b_interface ymz280b_intf = sound_irq_gen }; -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c index 71a8abff1eb..d4ef51f9859 100644 --- a/src/mame/drivers/cball.c +++ b/src/mame/drivers/cball.c @@ -21,7 +21,7 @@ public: tilemap_t* bg_tilemap; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c index cf853753481..263044bba8b 100644 --- a/src/mame/drivers/cbuster.c +++ b/src/mame/drivers/cbuster.c @@ -264,7 +264,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { cbuster_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/cdi.c b/src/mame/drivers/cdi.c index 831efe760bd..90c2cb45760 100644 --- a/src/mame/drivers/cdi.c +++ b/src/mame/drivers/cdi.c @@ -196,7 +196,7 @@ static MACHINE_RESET( cdi ) cdi_state *state = machine->driver_data(); UINT16 *src = (UINT16*)memory_region(machine, "maincpu"); UINT16 *dst = state->planea; - //running_device *cdrom_dev = machine->device("cdrom"); + //device_t *cdrom_dev = machine->device("cdrom"); memcpy(dst, src, 0x8); scc68070_init(machine, &state->scc68070_regs); diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c index dd5bea4c6fc..830dc250050 100644 --- a/src/mame/drivers/centiped.c +++ b/src/mame/drivers/centiped.c @@ -1975,7 +1975,7 @@ ROM_END static DRIVER_INIT( caterplr ) { address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - running_device *device = machine->device("pokey"); + device_t *device = machine->device("pokey"); memory_install_readwrite8_device_handler(space, device, 0x1000, 0x100f, 0, 0, caterplr_AY8910_r, caterplr_AY8910_w); memory_install_read8_device_handler(space, device, 0x1780, 0x1780, 0, 0, caterplr_rand_r); } @@ -1984,7 +1984,7 @@ static DRIVER_INIT( caterplr ) static DRIVER_INIT( magworm ) { address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - running_device *device = machine->device("pokey"); + device_t *device = machine->device("pokey"); memory_install_write8_device_handler(space, device, 0x1001, 0x1001, 0, 0, ay8910_address_w); memory_install_readwrite8_device_handler(space, device, 0x1003, 0x1003, 0, 0, ay8910_r, ay8910_data_w); } diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c index 04602d1b982..834a4f69ced 100644 --- a/src/mame/drivers/cham24.c +++ b/src/mame/drivers/cham24.c @@ -251,7 +251,7 @@ static PALETTE_INIT( cham24 ) ppu2c0x_init_palette(machine, 0); } -static void ppu_irq( running_device *device, int *ppu_regs ) +static void ppu_irq( device_t *device, int *ppu_regs ) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c index 25dd54eb1ab..f908a5d68bb 100644 --- a/src/mame/drivers/chanbara.c +++ b/src/mame/drivers/chanbara.c @@ -69,7 +69,7 @@ public: UINT8 scroll, scrollhi; /* devices */ - running_device *maincpu; + device_t *maincpu; }; @@ -343,7 +343,7 @@ static WRITE8_DEVICE_HANDLER( chanbara_ay_out_1_w ) //if (data & 0xf8) printf("chanbara_ay_out_1_w unused bits set %02x\n", data & 0xf8); } -static void sound_irq( running_device *device, int linestate ) +static void sound_irq( device_t *device, int linestate ) { chanbara_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, 0, linestate); diff --git a/src/mame/drivers/chihiro.c b/src/mame/drivers/chihiro.c index cbbfcd41a66..a8fdbb5c2cb 100644 --- a/src/mame/drivers/chihiro.c +++ b/src/mame/drivers/chihiro.c @@ -187,13 +187,13 @@ static READ32_HANDLER( chihiro_jamtable ) } #endif -static UINT32 dummy_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 dummy_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { logerror(" bus:%d function:%d register:%d mask:%08X\n",((pci_bus_config *)downcast(busdevice->baseconfig()).inline_config())->busnum,function,reg,mem_mask); return 0; } -static void dummy_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void dummy_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { logerror(" bus:%d function:%d register:%d data:%08X mask:%08X\n",((pci_bus_config *)downcast(busdevice->baseconfig()).inline_config())->busnum,function,reg,data,mem_mask); } diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index 0d430fa08ce..eeec0c81dbd 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -299,7 +299,7 @@ static READ8_HANDLER( saiyugoub1_m5205_irq_r ) return 0; } -static void saiyugoub1_m5205_irq_w( running_device *device ) +static void saiyugoub1_m5205_irq_w( device_t *device ) { ddragon_state *state = device->machine->driver_data(); state->adpcm_sound_irq = 1; @@ -492,7 +492,7 @@ static GFXDECODE_START( chinagat ) GFXDECODE_END -static void chinagat_irq_handler( running_device *device, int irq ) +static void chinagat_irq_handler( device_t *device, int irq ) { ddragon_state *state = device->machine->driver_data(); cpu_set_input_line(state->snd_cpu, 0, irq ? ASSERT_LINE : CLEAR_LINE ); diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index b7c915cc4da..e5fd435590b 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -526,7 +526,7 @@ GFXDECODE_END * *************************************/ -static void chin_adpcm_int( running_device *device ) +static void chin_adpcm_int( device_t *device ) { chinsan_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c index ac59edaf8a1..561f6f736d5 100644 --- a/src/mame/drivers/chqflag.c +++ b/src/mame/drivers/chqflag.c @@ -290,7 +290,7 @@ INPUT_PORTS_END -static void chqflag_ym2151_irq_w( running_device *device, int data ) +static void chqflag_ym2151_irq_w( device_t *device, int data ) { chqflag_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, data ? ASSERT_LINE : CLEAR_LINE); @@ -302,7 +302,7 @@ static const ym2151_interface ym2151_config = chqflag_ym2151_irq_w }; -static void volume_callback0( running_device *device, int v ) +static void volume_callback0( device_t *device, int v ) { k007232_set_volume(device, 0, (v & 0x0f) * 0x11, 0); k007232_set_volume(device, 1, 0, (v >> 4) * 0x11); @@ -313,7 +313,7 @@ static WRITE8_DEVICE_HANDLER( k007232_extvolume_w ) k007232_set_volume(device, 1, (data & 0x0f) * 0x11/2, (data >> 4) * 0x11/2); } -static void volume_callback1( running_device *device, int v ) +static void volume_callback1( device_t *device, int v ) { k007232_set_volume(device, 0, (v & 0x0f) * 0x11/2, (v >> 4) * 0x11/2); } diff --git a/src/mame/drivers/cinemat.c b/src/mame/drivers/cinemat.c index 8b3f93cccdf..efe315fb256 100644 --- a/src/mame/drivers/cinemat.c +++ b/src/mame/drivers/cinemat.c @@ -150,7 +150,7 @@ static WRITE8_HANDLER( mux_select_w ) * *************************************/ -static UINT8 joystick_read(running_device *device) +static UINT8 joystick_read(device_t *device) { if (device->machine->phase() != MACHINE_PHASE_RUNNING) return 0; diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c index ffdacdef38c..f1885415e3b 100644 --- a/src/mame/drivers/clayshoo.c +++ b/src/mame/drivers/clayshoo.c @@ -99,7 +99,7 @@ static TIMER_CALLBACK( reset_analog_bit ) } -static attotime compute_duration( running_device *device, int analog_pos ) +static attotime compute_duration( device_t *device, int analog_pos ) { /* the 58 comes from the length of the loop used to read the analog position */ diff --git a/src/mame/drivers/cliffhgr.c b/src/mame/drivers/cliffhgr.c index ea0e8b76219..96093ef8ac8 100644 --- a/src/mame/drivers/cliffhgr.c +++ b/src/mame/drivers/cliffhgr.c @@ -84,7 +84,7 @@ Side 2 = 0x8F7DDD (or 0x880000 | ( 0x77 << 12 ) | 0x0DDD) #define CLIFF_ENABLE_SND_1 NODE_01 #define CLIFF_ENABLE_SND_2 NODE_02 -static running_device *laserdisc; +static device_t *laserdisc; static int port_bank = 0; static int phillips_code = 0; diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c index 80485575ad6..23c7b72efc4 100644 --- a/src/mame/drivers/cninja.c +++ b/src/mame/drivers/cninja.c @@ -719,13 +719,13 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { cninja_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ } -static void sound_irq2(running_device *device, int state) +static void sound_irq2(device_t *device, int state) { cninja_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 0, state); diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index b75d3d71c69..d3369ac4d62 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -54,9 +54,9 @@ public: int nmimask; // zerotrgt only /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; }; diff --git a/src/mame/drivers/compgolf.c b/src/mame/drivers/compgolf.c index a73ef4de738..4bbbca77054 100644 --- a/src/mame/drivers/compgolf.c +++ b/src/mame/drivers/compgolf.c @@ -201,7 +201,7 @@ GFXDECODE_END * *************************************/ -static void sound_irq(running_device *device, int linestate) +static void sound_irq(device_t *device, int linestate) { cputag_set_input_line(device->machine, "maincpu", 0, linestate); } diff --git a/src/mame/drivers/cosmic.c b/src/mame/drivers/cosmic.c index fe9abfcc204..a7da08ac6ce 100644 --- a/src/mame/drivers/cosmic.c +++ b/src/mame/drivers/cosmic.c @@ -1607,7 +1607,7 @@ static DRIVER_INIT( devzone ) static DRIVER_INIT( nomnlnd ) { - running_device *dac = machine->device("dac"); + device_t *dac = machine->device("dac"); memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x5001, 0, 0, nomnlnd_port_0_1_r); memory_nop_write(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4800, 0x4800, 0, 0); memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x4807, 0x4807, 0, 0, cosmic_background_enable_w); diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index b8d9819ce83..201aa7c4548 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -2920,7 +2920,7 @@ GFXDECODE_END -static void cps1_irq_handler_mus(running_device *device, int irq) +static void cps1_irq_handler_mus(device_t *device, int irq) { cps_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); @@ -3095,7 +3095,7 @@ static ADDRESS_MAP_START( sf2mdt_z80map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0xd000, 0xd7ff) AM_RAM ADDRESS_MAP_END -static void m5205_int1(running_device *device) +static void m5205_int1(device_t *device) { // msm5205_data_w(device, sample_buffer1 & 0x0F); // sample_buffer1 >>= 4; @@ -3104,7 +3104,7 @@ static void m5205_int1(running_device *device) // cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } -static void m5205_int2(running_device *device) +static void m5205_int2(device_t *device) { // msm5205_data_w(device, sample_buffer2 & 0x0F); // sample_buffer2 >>= 4; diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c index 3689c77f398..2bde17cd649 100644 --- a/src/mame/drivers/crbaloon.c +++ b/src/mame/drivers/crbaloon.c @@ -159,8 +159,8 @@ static READ8_HANDLER( pc3259_r ) static WRITE8_HANDLER( port_sound_w ) { - running_device *discrete = space->machine->device("discrete"); - running_device *sn = space->machine->device("snsnd"); + device_t *discrete = space->machine->device("discrete"); + device_t *sn = space->machine->device("snsnd"); /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ cpu_interrupt_enable(space->machine->device("maincpu"), (data & 0x01) ? TRUE : FALSE); @@ -343,7 +343,7 @@ GFXDECODE_END static MACHINE_RESET( crballoon ) { address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO); - running_device *discrete = machine->device("discrete"); + device_t *discrete = machine->device("discrete"); pc3092_reset(); port_sound_w(space, 0, 0); diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c index 930ca5aeeeb..6498833720e 100644 --- a/src/mame/drivers/crgolf.c +++ b/src/mame/drivers/crgolf.c @@ -190,7 +190,7 @@ static READ8_HANDLER( sound_to_main_r ) * *************************************/ -static void vck_callback( running_device *device ) +static void vck_callback( device_t *device ) { crgolf_state *state = device->machine->driver_data(); @@ -599,7 +599,7 @@ ROM_END static DRIVER_INIT( crgolfhi ) { - running_device *msm = machine->device("msm"); + device_t *msm = machine->device("msm"); memory_install_write8_device_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), msm, 0xa000, 0xa003, 0, 0, crgolfhi_sample_w); } diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c index 02144163588..2bd68c7663b 100644 --- a/src/mame/drivers/crimfght.c +++ b/src/mame/drivers/crimfght.c @@ -227,7 +227,7 @@ static const ym2151_interface ym2151_config = crimfght_snd_bankswitch_w }; -static void volume_callback( running_device *device, int v ) +static void volume_callback( device_t *device, int v ) { k007232_set_volume(device, 0, (v & 0x0f) * 0x11, 0); k007232_set_volume(device, 1, 0, (v >> 4) * 0x11); diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c index a6d905e7f13..23b41d46b71 100644 --- a/src/mame/drivers/crospang.c +++ b/src/mame/drivers/crospang.c @@ -311,7 +311,7 @@ static GFXDECODE_START( crospang ) GFXDECODE_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { crospang_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c index d5646b14265..30f6d8ba093 100644 --- a/src/mame/drivers/crshrace.c +++ b/src/mame/drivers/crshrace.c @@ -425,7 +425,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { crshrace_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index f4dc67b907b..62260c64bd2 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -152,9 +152,9 @@ public: UINT8 OldPort4; UINT32 *ResetPatch; - running_device *maincpu; - running_device *ds1302; - running_device *vr0video; + device_t *maincpu; + device_t *ds1302; + device_t *vr0video; }; static void IntReq( running_machine *machine, int num ) diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c index a594090a031..293ac727081 100644 --- a/src/mame/drivers/cubeqst.c +++ b/src/mame/drivers/cubeqst.c @@ -49,7 +49,7 @@ static int video_field; static UINT8 io_latch; static UINT8 reset_latch; -static running_device *laserdisc; +static device_t *laserdisc; static rgb_t *colormap; @@ -455,7 +455,7 @@ static MACHINE_RESET( cubeqst ) */ /* Called by the sound CPU emulation */ -static void sound_dac_w(running_device *device, UINT16 data) +static void sound_dac_w(device_t *device, UINT16 data) { static const char *const dacs[] = { diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c index a6580b0ad56..3bef86b05c3 100644 --- a/src/mame/drivers/cvs.c +++ b/src/mame/drivers/cvs.c @@ -245,7 +245,7 @@ static INTERRUPT_GEN( cvs_main_cpu_interrupt ) } -static void cvs_slave_cpu_interrupt( running_device *cpu, int state ) +static void cvs_slave_cpu_interrupt( device_t *cpu, int state ) { cpu_set_input_line_vector(cpu, 0, 0x03); //cpu_set_input_line(cpu, 0, state ? ASSERT_LINE : CLEAR_LINE); @@ -437,7 +437,7 @@ static WRITE8_DEVICE_HANDLER( cvs_tms5110_pdc_w ) } -static int speech_rom_read_bit( running_device *device ) +static int speech_rom_read_bit( device_t *device ) { cvs_state *state = device->machine->driver_data(); running_machine *machine = device->machine; diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c index c6fd512bc7c..66187f02080 100644 --- a/src/mame/drivers/cybertnk.c +++ b/src/mame/drivers/cybertnk.c @@ -200,8 +200,8 @@ static void draw_pixel( bitmap_t* bitmap, const rectangle *cliprect, int y, int static VIDEO_UPDATE( cybertnk ) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); int screen_shift = 0; if (screen==left_screen) diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index 07f3fd2145e..10e8c747d45 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -49,7 +49,7 @@ public: UINT8 snd_ack; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; @@ -410,7 +410,7 @@ static INTERRUPT_GEN( sound_irq ) } } -static void adpcm_int( running_device *device ) +static void adpcm_int( device_t *device ) { dacholer_state *state = device->machine->driver_data(); if (state->snd_interrupt_enable == 1 || (state->snd_interrupt_enable == 0 && state->msm_toggle == 1)) diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c index 68c6763c33d..dc859dc5523 100644 --- a/src/mame/drivers/dai3wksi.c +++ b/src/mame/drivers/dai3wksi.c @@ -197,7 +197,7 @@ static VIDEO_UPDATE( dai3wksi ) static WRITE8_HANDLER( dai3wksi_audio_1_w ) { dai3wksi_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 rising_bits = data & ~state->port_last1; state->enabled_sound = data & 0x80; @@ -218,7 +218,7 @@ static WRITE8_HANDLER( dai3wksi_audio_1_w ) static WRITE8_HANDLER( dai3wksi_audio_2_w ) { dai3wksi_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); UINT8 rising_bits = data & ~state->port_last2; state->dai3wksi_flipscreen = data & 0x10; @@ -247,7 +247,7 @@ static WRITE8_HANDLER( dai3wksi_audio_2_w ) static WRITE8_HANDLER( dai3wksi_audio_3_w ) { dai3wksi_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); if (state->enabled_sound) { @@ -284,7 +284,7 @@ static const samples_interface dai3wksi_samples_interface = static WRITE8_HANDLER( dai3wksi_audio_1_w ) { - running_device *ic79 = space->machine->device("ic79"); + device_t *ic79 = space->machine->device("ic79"); sound_global_enable(space->machine, data & 0x80); @@ -296,9 +296,9 @@ static WRITE8_HANDLER( dai3wksi_audio_2_w ) { dai3wksi_state *state = space->machine->driver_data(); - running_device *ic77 = space->machine->device("ic77"); - running_device *ic78 = space->machine->device("ic78"); - running_device *ic80 = space->machine->device("ic80"); + device_t *ic77 = space->machine->device("ic77"); + device_t *ic78 = space->machine->device("ic78"); + device_t *ic80 = space->machine->device("ic80"); state->dai3wksi_flipscreen = data & 0x10; state->dai3wksi_redscreen = ~data & 0x20; @@ -312,7 +312,7 @@ static WRITE8_HANDLER( dai3wksi_audio_2_w ) static WRITE8_HANDLER( dai3wksi_audio_3_w ) { - running_device *ic81 = space->machine->device("ic81"); + device_t *ic81 = space->machine->device("ic81"); sn76477_enable_w(ic81, (~data >> 2) & 0x01); /* player shoot enable */ sn76477_vco_w(ic81, (~data >> 3) & 0x01); /* player shoot vco control */ diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c index d581dfadca3..e634e7f5ad7 100644 --- a/src/mame/drivers/darius.c +++ b/src/mame/drivers/darius.c @@ -336,7 +336,7 @@ static void update_fm1( running_machine *machine ) static void update_psg0( running_machine *machine, int port ) { darius_state *state = machine->driver_data(); - running_device *lvol = NULL, *rvol = NULL; + device_t *lvol = NULL, *rvol = NULL; int left, right; switch (port) @@ -359,7 +359,7 @@ static void update_psg0( running_machine *machine, int port ) static void update_psg1( running_machine *machine, int port ) { darius_state *state = machine->driver_data(); - running_device *lvol = NULL, *rvol = NULL; + device_t *lvol = NULL, *rvol = NULL; int left, right; switch (port) @@ -513,7 +513,7 @@ static ADDRESS_MAP_START( darius_sound2_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END -static void darius_adpcm_int( running_device *device ) +static void darius_adpcm_int( device_t *device ) { darius_state *state = device->machine->driver_data(); @@ -798,7 +798,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) /* assumes Z80 sandwiched between 68Ks */ +static void irqhandler( device_t *device, int irq ) /* assumes Z80 sandwiched between 68Ks */ { darius_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c index e3a206a0f92..5cec9852a39 100644 --- a/src/mame/drivers/darkseal.c +++ b/src/mame/drivers/darkseal.c @@ -217,7 +217,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */ } diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c index 538fd318de2..e211c08dea3 100644 --- a/src/mame/drivers/dassault.c +++ b/src/mame/drivers/dassault.c @@ -511,7 +511,7 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { dassault_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index 52045b6aca8..73316bad437 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -65,9 +65,9 @@ public: UINT8 sound_irq; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; /* @@ -621,7 +621,7 @@ static INPUT_PORTS_START( dblewing ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -static void sound_irq( running_device *device, int state ) +static void sound_irq( device_t *device, int state ) { dblewing_state *driver_state = device->machine->driver_data(); diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c index f3e274b5f58..1b33549229c 100644 --- a/src/mame/drivers/dbz.c +++ b/src/mame/drivers/dbz.c @@ -113,7 +113,7 @@ static WRITE16_HANDLER( dbz_sound_cause_nmi ) cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); } -static void dbz_sound_irq( running_device *device, int irq ) +static void dbz_sound_irq( device_t *device, int irq ) { dbz_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c index 8d56dda9319..5b7f6f7042e 100644 --- a/src/mame/drivers/dcheese.c +++ b/src/mame/drivers/dcheese.c @@ -47,7 +47,7 @@ * *************************************/ -static void update_irq_state( running_device *cpu ) +static void update_irq_state( device_t *cpu ) { dcheese_state *state = cpu->machine->driver_data(); diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index cc3c036a0e1..6b31751bd62 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -81,7 +81,7 @@ public: UINT8 prot_addr; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index 06baa632cce..62fe73a5ce9 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -341,7 +341,7 @@ static WRITE8_HANDLER( ddragon2_sub_irq_w ) } -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { ddragon_state *state = device->machine->driver_data(); cpu_set_input_line(state->snd_cpu, state->ym_irq , irq ? ASSERT_LINE : CLEAR_LINE ); @@ -436,7 +436,7 @@ static WRITE8_HANDLER( ddragon_spriteram_w ) static WRITE8_HANDLER( dd_adpcm_w ) { ddragon_state *state = space->machine->driver_data(); - running_device *adpcm = (offset & 1) ? state->adpcm_2 : state->adpcm_1; + device_t *adpcm = (offset & 1) ? state->adpcm_2 : state->adpcm_1; int chip = (adpcm == state->adpcm_1) ? 0 : 1; switch (offset / 2) @@ -462,7 +462,7 @@ static WRITE8_HANDLER( dd_adpcm_w ) } -static void dd_adpcm_int( running_device *device ) +static void dd_adpcm_int( device_t *device ) { ddragon_state *state = device->machine->driver_data(); int chip = (device == state->adpcm_1) ? 0 : 1; diff --git a/src/mame/drivers/ddragon3.c b/src/mame/drivers/ddragon3.c index b8961765455..197b3020abe 100644 --- a/src/mame/drivers/ddragon3.c +++ b/src/mame/drivers/ddragon3.c @@ -514,7 +514,7 @@ GFXDECODE_END * *************************************/ -static void dd3_ymirq_handler(running_device *device, int irq) +static void dd3_ymirq_handler(device_t *device, int irq) { ddragon3_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 0719986e4e2..137de502ff1 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -1097,12 +1097,12 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int linestate) +static void sound_irq(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); /* IRQ */ } -static void sound_irq2(running_device *device, int linestate) +static void sound_irq2(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 1, linestate); /* IRQ2 */ } @@ -1120,7 +1120,7 @@ static const ym3812_interface ym3812b_interface = /******************************************************************************/ -static void automat_vclk_cb(running_device *device) +static void automat_vclk_cb(device_t *device) { if (automat_msm5205_vclk_toggle == 0) { diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c index 142177c0289..0faee4eba55 100644 --- a/src/mame/drivers/dec8.c +++ b/src/mame/drivers/dec8.c @@ -384,7 +384,7 @@ static WRITE8_HANDLER( dec8_sound_w ) cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); } -static void csilver_adpcm_int( running_device *device ) +static void csilver_adpcm_int( device_t *device ) { dec8_state *state = device->machine->driver_data(); state->toggle ^= 1; @@ -1881,7 +1881,7 @@ GFXDECODE_END /******************************************************************************/ /* handler called by the 3812 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { dec8_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); /* M6502_IRQ_LINE */ diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index 0b327923acd..158c5e01ea4 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -368,7 +368,7 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq_gen(running_device *device, int state) +static void sound_irq_gen(device_t *device, int state) { logerror("sound irq\n"); } diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index a2d967c8bcf..825af74e211 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -1597,12 +1597,12 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */ } -static void sound_irq_nslasher(running_device *device, int state) +static void sound_irq_nslasher(device_t *device, int state) { /* bit 0 of nslasher_sound_irq specifies IRQ from sound chip */ if (state) diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index 4a46c87e759..7e253e231fe 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -118,7 +118,7 @@ public: static UINT8 vram_bank; -static running_device *laserdisc; +static device_t *laserdisc; static UINT8 laserdisc_data; static VIDEO_UPDATE( rblaster ) diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c index b18de1d2a5b..19c5fd2c57e 100644 --- a/src/mame/drivers/deniam.c +++ b/src/mame/drivers/deniam.c @@ -221,7 +221,7 @@ static GFXDECODE_START( deniam ) GFXDECODE_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { deniam_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index 8b03f88dd7d..04fa495d551 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -32,7 +32,7 @@ public: int noise; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c index 6f16e98d494..479a1001408 100644 --- a/src/mame/drivers/dietgo.c +++ b/src/mame/drivers/dietgo.c @@ -159,7 +159,7 @@ static GFXDECODE_START( dietgo ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 512, 16 ) /* Sprites (16x16) */ GFXDECODE_END -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { dietgo_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 006c222cdb5..90b075b4311 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -63,7 +63,7 @@ public: int adpcm_data; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; @@ -321,7 +321,7 @@ ADDRESS_MAP_END // state->adpcm_data = data; //} -static void splash_msm5205_int( running_device *device ) +static void splash_msm5205_int( device_t *device ) { discoboy_state *state = device->machine->driver_data(); msm5205_data_w(device, state->adpcm_data >> 4); diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 273a8686744..bccaab02ccd 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -65,7 +65,7 @@ public: size_t spriteram_size; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c index 6f7e1eb8c11..3e5139ce874 100644 --- a/src/mame/drivers/djmain.c +++ b/src/mame/drivers/djmain.c @@ -239,7 +239,7 @@ static WRITE32_HANDLER( v_ctrl_w ) static READ32_HANDLER( v_rom_r ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); UINT8 *mem8 = memory_region(space->machine, "gfx2"); int bank = k056832_word_r(k056832, 0x34/2, 0xffff); @@ -440,7 +440,7 @@ static INTERRUPT_GEN( vb_interrupt ) } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { if (state != CLEAR_LINE) { @@ -1430,7 +1430,7 @@ static STATE_POSTLOAD( djmain_postload ) static MACHINE_START( djmain ) { - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); if (ide != NULL && ide_master_password != NULL) ide_set_master_password(ide, ide_master_password); diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 2cefa363b18..5003ae26de0 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -3080,7 +3080,7 @@ static DRIVER_INIT( dkongx ) { UINT8 *decrypted; address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - running_device *eeprom = machine->device("eeprom"); + device_t *eeprom = machine->device("eeprom"); decrypted = auto_alloc_array(machine, UINT8, 0x10000); diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index de6dddfbd08..bba93dfc256 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -93,7 +93,7 @@ static const UINT8 led_map[16] = * *************************************/ -static void dleuro_interrupt(running_device *device, int state) +static void dleuro_interrupt(device_t *device, int state) { cputag_set_input_line(device->machine, "maincpu", 0, state); } @@ -105,7 +105,7 @@ static WRITE8_DEVICE_HANDLER( serial_transmit ) } -static int serial_receive(running_device *device, int channel) +static int serial_receive(device_t *device, int channel) { /* if we still have data to send, do it now */ if (channel == 0 && laserdisc_line_r(laserdisc, LASERDISC_LINE_DATA_AVAIL) == ASSERT_LINE) diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c index fc4a9eb5e7a..f846a90e4db 100644 --- a/src/mame/drivers/docastle.c +++ b/src/mame/drivers/docastle.c @@ -161,7 +161,7 @@ Dip locations verified with manual for docastle, dorunrun and dowild. /* Read/Write Handlers */ -static void idsoccer_adpcm_int( running_device *device ) +static void idsoccer_adpcm_int( device_t *device ) { docastle_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c index 42e3f9f3a63..85a8499fe27 100644 --- a/src/mame/drivers/dooyong.c +++ b/src/mame/drivers/dooyong.c @@ -735,7 +735,7 @@ static GFXDECODE_START( popbingo ) GFXDECODE_ENTRY( "gfx2", 0, popbingo_tilelayout, 256, 1 ) GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c index f42aee948f2..1e515c3c595 100644 --- a/src/mame/drivers/dorachan.c +++ b/src/mame/drivers/dorachan.c @@ -30,7 +30,7 @@ public: UINT8 flip_screen; /* devices */ - running_device *main_cpu; + device_t *main_cpu; }; diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c index d54b2562219..e81c39442bb 100644 --- a/src/mame/drivers/drmicro.c +++ b/src/mame/drivers/drmicro.c @@ -43,7 +43,7 @@ static WRITE8_HANDLER( nmi_enable_w ) } -static void pcm_w(running_device *device) +static void pcm_w(device_t *device) { drmicro_state *state = device->machine->driver_data(); UINT8 *PCM = memory_region(device->machine, "adpcm"); diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index 0a11c87738a..4ca6b88ac8f 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -127,7 +127,7 @@ static INTERRUPT_GEN( sprtmtch_vblank_interrupt ) sprtmtch_update_irq(device->machine); } -static void sprtmtch_sound_callback( running_device *device, int state ) +static void sprtmtch_sound_callback( device_t *device, int state ) { dynax_state *driver_state = device->machine->driver_data(); driver_state->sound_irq = state; @@ -201,7 +201,7 @@ static WRITE8_HANDLER( jantouki_sound_vblank_ack_w ) jantouki_sound_update_irq(space->machine); } -static void jantouki_sound_callback(running_device *device, int state) +static void jantouki_sound_callback(device_t *device, int state) { dynax_state *driver_state = device->machine->driver_data(); driver_state->sound_irq = state; @@ -409,7 +409,7 @@ static WRITE8_HANDLER( nanajign_palette_w ) } -static void adpcm_int( running_device *device ) +static void adpcm_int( device_t *device ) { dynax_state *state = device->machine->driver_data(); msm5205_data_w(device, state->msm5205next >> 4); @@ -424,7 +424,7 @@ static void adpcm_int( running_device *device ) } } -static void adpcm_int_cpu1( running_device *device ) +static void adpcm_int_cpu1( device_t *device ) { dynax_state *state = device->machine->driver_data(); msm5205_data_w(device, state->msm5205next >> 4); diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index 5ad03aad6d0..6db15228276 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -66,7 +66,7 @@ public: UINT8 gfx_banking; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c index fb690b085e2..665522cd24f 100644 --- a/src/mame/drivers/enigma2.c +++ b/src/mame/drivers/enigma2.c @@ -77,8 +77,8 @@ public: emu_timer *interrupt_assert_timer; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index 92201c17d8f..d1cdc28a3ec 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -564,7 +564,7 @@ static WRITE8_HANDLER( equites_8155_portb_w ) equites_update_dac(space->machine); } -static void equites_msm5232_gate( running_device *device, int state ) +static void equites_msm5232_gate( device_t *device, int state ) { } diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c index dbe2a589973..83e9d83a0b1 100644 --- a/src/mame/drivers/esh.c +++ b/src/mame/drivers/esh.c @@ -32,7 +32,7 @@ Todo: /* Misc variables */ -static running_device *laserdisc; +static device_t *laserdisc; static UINT8 *tile_ram; static UINT8 *tile_control_ram; diff --git a/src/mame/drivers/esripsys.c b/src/mame/drivers/esripsys.c index ecb39f7486f..eb7ad7547e9 100644 --- a/src/mame/drivers/esripsys.c +++ b/src/mame/drivers/esripsys.c @@ -555,7 +555,7 @@ static READ8_HANDLER( tms5220_r ) if (offset == 0) { /* TMS5220 core returns status bits in D7-D6 */ - running_device *tms = space->machine->device("tms5220nl"); + device_t *tms = space->machine->device("tms5220nl"); UINT8 status = tms5220_status_r(tms, 0); status = ((status & 0x80) >> 5) | ((status & 0x40) >> 5) | ((status & 0x20) >> 5); @@ -568,7 +568,7 @@ static READ8_HANDLER( tms5220_r ) /* TODO: Implement correctly using the state PROM */ static WRITE8_HANDLER( tms5220_w ) { - running_device *tms = space->machine->device("tms5220nl"); + device_t *tms = space->machine->device("tms5220nl"); if (offset == 0) { tms_data = data; diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c index 70ca10a6533..d1b38675740 100644 --- a/src/mame/drivers/exprraid.c +++ b/src/mame/drivers/exprraid.c @@ -439,7 +439,7 @@ GFXDECODE_END /* handler called by the 3812 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { exprraid_state *state = device->machine->driver_data(); cpu_set_input_line_and_vector(state->slave, 0, linestate, 0xff); diff --git a/src/mame/drivers/exzisus.c b/src/mame/drivers/exzisus.c index 34d8efe3e29..2c3b37a1e68 100644 --- a/src/mame/drivers/exzisus.c +++ b/src/mame/drivers/exzisus.c @@ -263,7 +263,7 @@ GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index d56676fcd7d..e6c7dab0e34 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -409,7 +409,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { f1gp_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index 511ddd01f4f..9ebdf4539ef 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -311,7 +311,7 @@ ADDRESS_MAP_END Born To Fight ***************************************************************************/ -static void borntofi_adpcm_start( running_device *device, int voice ) +static void borntofi_adpcm_start( device_t *device, int voice ) { fantland_state *state = device->machine->driver_data(); msm5205_reset_w(device, 0); @@ -320,7 +320,7 @@ static void borntofi_adpcm_start( running_device *device, int voice ) // logerror("%s: adpcm start = %06x, stop = %06x\n", cpuexec_describe_context(device->machine), state->adpcm_addr[0][voice], state->adpcm_addr[1][voice]); } -static void borntofi_adpcm_stop( running_device *device, int voice ) +static void borntofi_adpcm_stop( device_t *device, int voice ) { fantland_state *state = device->machine->driver_data(); msm5205_reset_w(device, 1); @@ -332,7 +332,7 @@ static WRITE8_HANDLER( borntofi_msm5205_w ) fantland_state *state = space->machine->driver_data(); int voice = offset / 8; int reg = offset % 8; - running_device *msm; + device_t *msm; switch (voice) { @@ -363,7 +363,7 @@ static WRITE8_HANDLER( borntofi_msm5205_w ) } } -static void borntofi_adpcm_int( running_device *device, int voice ) +static void borntofi_adpcm_int( device_t *device, int voice ) { fantland_state *state = device->machine->driver_data(); UINT8 *rom; @@ -397,10 +397,10 @@ static void borntofi_adpcm_int( running_device *device, int voice ) } } -static void borntofi_adpcm_int_0(running_device *device) { borntofi_adpcm_int(device, 0); } -static void borntofi_adpcm_int_1(running_device *device) { borntofi_adpcm_int(device, 1); } -static void borntofi_adpcm_int_2(running_device *device) { borntofi_adpcm_int(device, 2); } -static void borntofi_adpcm_int_3(running_device *device) { borntofi_adpcm_int(device, 3); } +static void borntofi_adpcm_int_0(device_t *device) { borntofi_adpcm_int(device, 0); } +static void borntofi_adpcm_int_1(device_t *device) { borntofi_adpcm_int(device, 1); } +static void borntofi_adpcm_int_2(device_t *device) { borntofi_adpcm_int(device, 2); } +static void borntofi_adpcm_int_3(device_t *device) { borntofi_adpcm_int(device, 3); } static ADDRESS_MAP_START( borntofi_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) @@ -895,7 +895,7 @@ static MACHINE_CONFIG_START( fantland, fantland_state ) MACHINE_CONFIG_END -static void galaxygn_sound_irq( running_device *device, int line ) +static void galaxygn_sound_irq( device_t *device, int line ) { fantland_state *state = device->machine->driver_data(); cpu_set_input_line_and_vector(state->audio_cpu, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4); @@ -1053,7 +1053,7 @@ MACHINE_CONFIG_END -static void wheelrun_ym3526_irqhandler( running_device *device, int state ) +static void wheelrun_ym3526_irqhandler( device_t *device, int state ) { fantland_state *driver = device->machine->driver_data(); cpu_set_input_line(driver->audio_cpu, INPUT_LINE_IRQ0, state); diff --git a/src/mame/drivers/fastlane.c b/src/mame/drivers/fastlane.c index 7646a3924b4..d8ac72e5021 100644 --- a/src/mame/drivers/fastlane.c +++ b/src/mame/drivers/fastlane.c @@ -177,13 +177,13 @@ GFXDECODE_END ***************************************************************************/ -static void volume_callback0(running_device *device, int v) +static void volume_callback0(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); } -static void volume_callback1(running_device *device, int v) +static void volume_callback1(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 468fa48dc60..e9f026422fc 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -61,7 +61,7 @@ static WRITE8_HANDLER( fcrash_snd_bankswitch_w ) memory_set_bank(space->machine, "bank1", data & 0x07); } -static void m5205_int1( running_device *device ) +static void m5205_int1( device_t *device ) { cps_state *state = device->machine->driver_data(); @@ -72,7 +72,7 @@ static void m5205_int1( running_device *device ) cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); } -static void m5205_int2( running_device *device ) +static void m5205_int2( device_t *device ) { cps_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index 7a769ce5f48..d5ac66d7de7 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -1739,7 +1739,7 @@ static READ8_DEVICE_HANDLER( soundram_r ) return 0; } -static void sound_irq_callback(running_device *device, int state) +static void sound_irq_callback(device_t *device, int state) { } @@ -2157,7 +2157,7 @@ static int ibutton_w(UINT8 data) return r; } -static void security_w(running_device *device, UINT8 data) +static void security_w(device_t *device, UINT8 data) { int r = ibutton_w(data); if (r >= 0) diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index 7432776c495..c283da0dc0c 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -57,7 +57,7 @@ fffe=reset e7cc /* FXXXXX for first field AXXXXX for second field */ -static running_device *laserdisc; +static device_t *laserdisc; static int m_n_disc_lock; static int m_n_disc_data; static int m_n_disc_read_data; @@ -304,7 +304,7 @@ static READ8_DEVICE_HANDLER( riot_porta_r ) static WRITE8_DEVICE_HANDLER( riot_porta_w ) { - running_device *tms = device->machine->device("tms"); + device_t *tms = device->machine->device("tms"); /* handle 5220 read */ tms5220_rsq_w(tms, (data>>1) & 1); @@ -420,7 +420,7 @@ static WRITE8_HANDLER( firefox_coin_counter_w ) -static void firq_gen(running_device *device, int state) +static void firq_gen(device_t *device, int state) { if (state) cputag_set_input_line( device->machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE ); diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 7908750d9be..f123015edc6 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -325,7 +325,7 @@ static WRITE8_HANDLER( firetrap_sound_bankselect_w ) memory_set_bank(space->machine, "bank2", data & 0x01); } -static void firetrap_adpcm_int( running_device *device ) +static void firetrap_adpcm_int( device_t *device ) { firetrap_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/firetrk.c b/src/mame/drivers/firetrk.c index 963b86f4d89..404e41ee495 100644 --- a/src/mame/drivers/firetrk.c +++ b/src/mame/drivers/firetrk.c @@ -39,7 +39,7 @@ static INPUT_CHANGED( service_mode_switch_changed ) static INPUT_CHANGED( firetrk_horn_changed ) { - running_device *discrete = field->port->machine->device("discrete"); + device_t *discrete = field->port->machine->device("discrete"); discrete_sound_w(discrete, FIRETRUCK_HORN_EN, newval); } @@ -80,7 +80,7 @@ static TIMER_CALLBACK( periodic_callback ) static WRITE8_HANDLER( firetrk_output_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); /* BIT0 => START1 LAMP */ set_led_status(space->machine, 0, !(data & 0x01)); @@ -111,7 +111,7 @@ static WRITE8_HANDLER( firetrk_output_w ) static WRITE8_HANDLER( superbug_output_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); /* BIT0 => START LAMP */ set_led_status(space->machine, 0, offset & 0x01); @@ -131,7 +131,7 @@ static WRITE8_HANDLER( superbug_output_w ) static WRITE8_HANDLER( montecar_output_1_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); /* BIT0 => START LAMP */ set_led_status(space->machine, 0, !(data & 0x01)); @@ -158,7 +158,7 @@ static WRITE8_HANDLER( montecar_output_1_w ) static WRITE8_HANDLER( montecar_output_2_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); firetrk_flash = data & 0x80; diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c index 305f0b5054a..03ba0cf61b0 100644 --- a/src/mame/drivers/flkatck.c +++ b/src/mame/drivers/flkatck.c @@ -183,7 +183,7 @@ static GFXDECODE_START( flkatck ) GFXDECODE_ENTRY( "gfx1", 0, gfxlayout, 0, 32 ) GFXDECODE_END -static void volume_callback0(running_device *device, int v) +static void volume_callback0(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index 021f41550b0..3d6040d9cd7 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -34,7 +34,7 @@ public: UINT8 potsense; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index ea2cf74032e..f8907d89582 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -495,7 +495,7 @@ GFXDECODE_END * *************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { fromanc2_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c index 5ed250467be..7187ddaab09 100644 --- a/src/mame/drivers/fromance.c +++ b/src/mame/drivers/fromance.c @@ -145,7 +145,7 @@ static WRITE8_HANDLER( fromance_adpcm_w ) } -static void fromance_adpcm_int( running_device *device ) +static void fromance_adpcm_int( device_t *device ) { fromance_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c index be4115b6ebc..922e5ef12bf 100644 --- a/src/mame/drivers/funkyjet.c +++ b/src/mame/drivers/funkyjet.c @@ -275,7 +275,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq( running_device *device, int state ) +static void sound_irq( device_t *device, int state ) { funkyjet_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c index fb3a78205f1..49d5f20b717 100644 --- a/src/mame/drivers/fuukifg2.c +++ b/src/mame/drivers/fuukifg2.c @@ -374,7 +374,7 @@ GFXDECODE_END ***************************************************************************/ -static void soundirq( running_device *device, int state ) +static void soundirq( device_t *device, int state ) { fuuki16_state *fuuki16 = device->machine->driver_data(); cpu_set_input_line(fuuki16->audiocpu, 0, state); diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c index cf6eaf28433..40b40797ef0 100644 --- a/src/mame/drivers/fuukifg3.c +++ b/src/mame/drivers/fuukifg3.c @@ -536,7 +536,7 @@ static MACHINE_RESET( fuuki32 ) } -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { fuuki32_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c index 98f1c0af688..97e4fb7a69d 100644 --- a/src/mame/drivers/gaelco3d.c +++ b/src/mame/drivers/gaelco3d.c @@ -429,7 +429,7 @@ static WRITE32_HANDLER( tms_m68k_ram_w ) } -static void iack_w(running_device *device, UINT8 state, offs_t addr) +static void iack_w(device_t *device, UINT8 state, offs_t addr) { if (LOG) logerror("iack_w(%d) - %06X\n", state, addr); diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index a88625746b7..ece0dea8f27 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -748,7 +748,7 @@ static GFXDECODE_START( drgnbowl ) GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { gaiden_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c index c65e297d607..e20da5fe930 100644 --- a/src/mame/drivers/galastrm.c +++ b/src/mame/drivers/galastrm.c @@ -127,7 +127,7 @@ popmessage(t); if (ACCESSING_BITS_0_7) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); eeprom_set_clock_line(device, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); eeprom_write_bit(device, data & 0x40); eeprom_set_cs_line(device, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c index 57ecaaf0dd4..e5cd6d8481f 100644 --- a/src/mame/drivers/galaxia.c +++ b/src/mame/drivers/galaxia.c @@ -39,9 +39,9 @@ static VIDEO_UPDATE( galaxia ) bitmap_t *s2636_1_bitmap; bitmap_t *s2636_2_bitmap; - running_device *s2636_0 = screen->machine->device("s2636_0"); - running_device *s2636_1 = screen->machine->device("s2636_1"); - running_device *s2636_2 = screen->machine->device("s2636_2"); + device_t *s2636_0 = screen->machine->device("s2636_0"); + device_t *s2636_1 = screen->machine->device("s2636_1"); + device_t *s2636_2 = screen->machine->device("s2636_2"); count = 0; diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index 5c0c74b2dac..4874b996fcd 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -611,7 +611,7 @@ static READ8_DEVICE_HANDLER( konami_sound_timer_r ) static WRITE8_HANDLER( konami_sound_filter_w ) { - running_device *discrete = space->machine->device("konami"); + device_t *discrete = space->machine->device("konami"); static const char *const ayname[2] = { "8910.0", "8910.1" }; int which, chan; @@ -991,7 +991,7 @@ static WRITE8_DEVICE_HANDLER( scorpion_protection_w ) static READ8_HANDLER( scorpion_digitalker_intr_r ) { - running_device *digitalker = space->machine->device("digitalker"); + device_t *digitalker = space->machine->device("digitalker"); return digitalker_0_intr_r(digitalker); } diff --git a/src/mame/drivers/galpani2.c b/src/mame/drivers/galpani2.c index 4a6c9a55d43..776da6faa45 100644 --- a/src/mame/drivers/galpani2.c +++ b/src/mame/drivers/galpani2.c @@ -80,7 +80,7 @@ static MACHINE_RESET( galpani2 ) cpuexec_boost_interleave(machine, attotime_zero, ATTOTIME_IN_USEC(50)); //initial mcu xchk } -static void galpani2_write_kaneko(running_device *device) +static void galpani2_write_kaneko(device_t *device) { address_space *dstspace = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); int i,x,tpattidx; diff --git a/src/mame/drivers/galpanic.c b/src/mame/drivers/galpanic.c index a83a5b87b75..43e252ea96f 100644 --- a/src/mame/drivers/galpanic.c +++ b/src/mame/drivers/galpanic.c @@ -127,7 +127,7 @@ The current set of Super Model is an example of type C static VIDEO_EOF( galpanic ) { - running_device *pandora = machine->device("pandora"); + device_t *pandora = machine->device("pandora"); pandora_eof(pandora); } @@ -153,7 +153,7 @@ static INTERRUPT_GEN( galhustl_interrupt ) static WRITE16_HANDLER( galpanic_6295_bankswitch_w ) { - running_device *pandora = space->machine->device("pandora"); + device_t *pandora = space->machine->device("pandora"); if (ACCESSING_BITS_8_15) { @@ -179,7 +179,7 @@ static WRITE16_HANDLER( galpanica_6295_bankswitch_w ) #ifdef UNUSED_FUNCTION static WRITE16_HANDLER( galpanica_misc_w ) { - running_device *pandora = machine->device("pandora"); + device_t *pandora = machine->device("pandora"); if (ACCESSING_BITS_0_7) { diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c index 1a8b009bee2..767b62ab005 100644 --- a/src/mame/drivers/galspnbl.c +++ b/src/mame/drivers/galspnbl.c @@ -188,7 +188,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { galspnbl_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c index 6c2db21c690..7b95372fb38 100644 --- a/src/mame/drivers/gamecstl.c +++ b/src/mame/drivers/gamecstl.c @@ -73,17 +73,17 @@ #include "machine/pckeybrd.h" #include "machine/idectrl.h" -static void ide_interrupt(running_device *device, int state); +static void ide_interrupt(device_t *device, int state); static UINT32 *cga_ram; static UINT32 *bios_ram; static struct { - running_device *pit8254; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8254; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } gamecstl_devices; @@ -175,14 +175,14 @@ static WRITE32_DEVICE_HANDLER(at32_dma8237_2_w) // Intel 82439TX System Controller (MXTC) static UINT8 mxtc_config_reg[256]; -static UINT8 mxtc_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("MXTC: read %d, %02X\n", function, reg); return mxtc_config_reg[reg]; } -static void mxtc_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", cpuexec_describe_context(busdevice->machine), function, reg, data); @@ -215,7 +215,7 @@ static void intel82439tx_init(void) mxtc_config_reg[0x65] = 0x02; } -static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82439tx_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -237,7 +237,7 @@ static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82439tx_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -260,19 +260,19 @@ static void intel82439tx_pci_w(running_device *busdevice, running_device *device // Intel 82371AB PCI-to-ISA / IDE bridge (PIIX4) static UINT8 piix4_config_reg[4][256]; -static UINT8 piix4_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); return piix4_config_reg[function][reg]; } -static void piix4_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", cpuexec_describe_context(busdevice->machine), function, reg, data); piix4_config_reg[function][reg] = data; } -static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82371ab_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -294,7 +294,7 @@ static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82371ab_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82371ab_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -447,7 +447,7 @@ static WRITE8_HANDLER( pc_dma_write_byte ) space->write_byte(page_offset + offset, data); } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } @@ -710,7 +710,7 @@ static void keyboard_interrupt(running_machine *machine, int state) pic8259_ir1_w(gamecstl_devices.pic8259_1, state); } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { pic8259_ir6_w(gamecstl_devices.pic8259_2, state); } diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c index 7c2b4a04495..a59d5de1986 100644 --- a/src/mame/drivers/gaplus.c +++ b/src/mame/drivers/gaplus.c @@ -201,8 +201,8 @@ static WRITE8_HANDLER( gaplus_sreset_w ) static WRITE8_HANDLER( gaplus_freset_w ) { - running_device *io58xx = space->machine->device("58xx"); - running_device *io56xx = space->machine->device("56xx"); + device_t *io58xx = space->machine->device("58xx"); + device_t *io56xx = space->machine->device("56xx"); int bit = !BIT(offset, 11); logerror("%04x: freset %d\n",cpu_get_pc(space->cpu), bit); @@ -220,8 +220,8 @@ static MACHINE_RESET( gaplus ) static TIMER_CALLBACK( namcoio_run ) { - running_device *io58xx = machine->device("58xx"); - running_device *io56xx = machine->device("56xx"); + device_t *io58xx = machine->device("58xx"); + device_t *io56xx = machine->device("56xx"); switch (param) { @@ -236,8 +236,8 @@ static TIMER_CALLBACK( namcoio_run ) static INTERRUPT_GEN( gaplus_interrupt_1 ) { - running_device *io58xx = device->machine->device("58xx"); - running_device *io56xx = device->machine->device("56xx"); + device_t *io58xx = device->machine->device("58xx"); + device_t *io56xx = device->machine->device("56xx"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c index 6a38d250e23..7b0137e76a2 100644 --- a/src/mame/drivers/gauntlet.c +++ b/src/mame/drivers/gauntlet.c @@ -256,7 +256,7 @@ static READ8_HANDLER( switch_6502_r ) static WRITE8_HANDLER( sound_ctl_w ) { - running_device *tms = space->machine->device("tms"); + device_t *tms = space->machine->device("tms"); switch (offset & 7) { case 0: /* music reset, bit D7, low reset */ diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c index 823f4d53f76..f97f5f5e616 100644 --- a/src/mame/drivers/gbusters.c +++ b/src/mame/drivers/gbusters.c @@ -245,7 +245,7 @@ INPUT_PORTS_END ***************************************************************************/ -static void volume_callback( running_device *device, int v ) +static void volume_callback( device_t *device, int v ) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c index 9fca34e3604..6f40295ed82 100644 --- a/src/mame/drivers/gcpinbal.c +++ b/src/mame/drivers/gcpinbal.c @@ -202,7 +202,7 @@ static WRITE16_HANDLER( ioc_w ) /* Controlled through ioc? */ -static void gcp_adpcm_int( running_device *device ) +static void gcp_adpcm_int( device_t *device ) { gcpinbal_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c index 14af9cb5493..5049d6c1a9c 100644 --- a/src/mame/drivers/ghosteo.c +++ b/src/mame/drivers/ghosteo.c @@ -104,7 +104,7 @@ struct nand_t static struct nand_t nand; -static UINT32 s3c2410_gpio_port_r( running_device *device, int port) +static UINT32 s3c2410_gpio_port_r( device_t *device, int port) { UINT32 data = bballoon_port[port]; switch (port) @@ -124,7 +124,7 @@ static UINT32 s3c2410_gpio_port_r( running_device *device, int port) return data; } -static void s3c2410_gpio_port_w( running_device *device, int port, UINT32 data) +static void s3c2410_gpio_port_w( device_t *device, int port, UINT32 data) { UINT32 old_value = bballoon_port[port]; bballoon_port[port] = data; @@ -155,7 +155,7 @@ static void s3c2410_gpio_port_w( running_device *device, int port, UINT32 data) static WRITE8_DEVICE_HANDLER( s3c2410_nand_command_w ) { -// running_device *nand = device->machine->device( "nand"); +// device_t *nand = device->machine->device( "nand"); logerror( "s3c2410_nand_command_w %02X\n", data); switch (data) { @@ -177,7 +177,7 @@ static WRITE8_DEVICE_HANDLER( s3c2410_nand_command_w ) static WRITE8_DEVICE_HANDLER( s3c2410_nand_address_w ) { -// running_device *nand = device->machine->device( "nand"); +// device_t *nand = device->machine->device( "nand"); logerror( "s3c2410_nand_address_w %02X\n", data); switch (nand.mode) { @@ -209,7 +209,7 @@ static WRITE8_DEVICE_HANDLER( s3c2410_nand_address_w ) static READ8_DEVICE_HANDLER( s3c2410_nand_data_r ) { -// running_device *nand = device->machine->device( "nand"); +// device_t *nand = device->machine->device( "nand"); UINT8 data = 0; switch (nand.mode) { @@ -254,20 +254,20 @@ static READ8_DEVICE_HANDLER( s3c2410_nand_data_r ) static WRITE8_DEVICE_HANDLER( s3c2410_nand_data_w ) { -// running_device *nand = device->machine->device( "nand"); +// device_t *nand = device->machine->device( "nand"); logerror( "s3c2410_nand_data_w %02X\n", data); } static WRITE_LINE_DEVICE_HANDLER( s3c2410_i2c_scl_w ) { - running_device *i2cmem = device->machine->device( "i2cmem"); + device_t *i2cmem = device->machine->device( "i2cmem"); // logerror( "s3c2410_i2c_scl_w %d\n", state ? 1 : 0); i2cmem_scl_write( i2cmem, state); } static READ_LINE_DEVICE_HANDLER( s3c2410_i2c_sda_r ) { - running_device *i2cmem = device->machine->device( "i2cmem"); + device_t *i2cmem = device->machine->device( "i2cmem"); int state; state = i2cmem_sda_read( i2cmem); // logerror( "s3c2410_i2c_sda_r %d\n", state ? 1 : 0); @@ -276,7 +276,7 @@ static READ_LINE_DEVICE_HANDLER( s3c2410_i2c_sda_r ) static WRITE_LINE_DEVICE_HANDLER( s3c2410_i2c_sda_w ) { - running_device *i2cmem = device->machine->device( "i2cmem"); + device_t *i2cmem = device->machine->device( "i2cmem"); // logerror( "s3c2410_i2c_sda_w %d\n", state ? 1 : 0); i2cmem_sda_write( i2cmem, state); } @@ -391,7 +391,7 @@ static const i2cmem_interface i2cmem_interface = }; -running_device* s3c2410; +device_t* s3c2410; static READ32_HANDLER( bballoon_speedup_r ) { diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index fa32e6964cf..691f37d6bd7 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -159,7 +159,7 @@ static READ16_HANDLER( sound_status_r ) return soundlatch2_r(space, 0); } -static void sound_nmi( running_device *device ) +static void sound_nmi( device_t *device ) { gijoe_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index cdd66ee2612..aa8a655c4f4 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -270,7 +270,7 @@ static WRITE8_DEVICE_HANDLER( gladiator_int_control_w ) /* bit 0 : ?? */ } /* YM2203 IRQ */ -static void gladiator_ym_irq(running_device *device, int irq) +static void gladiator_ym_irq(device_t *device, int irq) { /* NMI IRQ is not used by gladiator sound program */ cputag_set_input_line(device->machine, "sub", INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 8ac7c8e04d8..2ddc82c8e9c 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -46,7 +46,7 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - running_device *soundcpu; + device_t *soundcpu; }; diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c index 0f71e10053b..2f01846a560 100644 --- a/src/mame/drivers/goal92.c +++ b/src/mame/drivers/goal92.c @@ -210,7 +210,7 @@ static INPUT_PORTS_START( goal92 ) INPUT_PORTS_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { /* NMI writes to MSM ports *only*! -AS */ //goal92_state *state = device->machine->driver_data(); @@ -227,7 +227,7 @@ static const ym2203_interface ym2203_config = irqhandler }; -static void goal92_adpcm_int( running_device *device ) +static void goal92_adpcm_int( device_t *device ) { goal92_state *state = device->machine->driver_data(); msm5205_data_w(device, state->msm5205next); diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c index 4de0b3cadf3..f8149b05927 100644 --- a/src/mame/drivers/gotcha.c +++ b/src/mame/drivers/gotcha.c @@ -236,7 +236,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { gotcha_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c index f94338f837f..cabc4cfc1ec 100644 --- a/src/mame/drivers/gottlieb.c +++ b/src/mame/drivers/gottlieb.c @@ -226,7 +226,7 @@ VBlank duration: 1/VSYNC * (16/256) = 1017.6 us static UINT8 joystick_select; static UINT8 track[2]; -static running_device *laserdisc; +static device_t *laserdisc; static emu_timer *laserdisc_bit_timer; static emu_timer *laserdisc_philips_timer; static UINT8 laserdisc_select; @@ -613,7 +613,7 @@ static void audio_handle_zero_crossing(attotime zerotime, int logit) } -static void laserdisc_audio_process(running_device *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1) +static void laserdisc_audio_process(device_t *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1) { int logit = LOG_AUDIO_DECODE && input_code_pressed(device->machine, KEYCODE_L); attotime time_per_sample = ATTOTIME_IN_HZ(samplerate); diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index 01cdc3482d2..3fc908e5743 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -56,7 +56,7 @@ static UINT8* tile_RAM; static UINT8* sprite_RAM; static UINT8* palette_RAM; -static running_device *laserdisc; +static device_t *laserdisc; /* VIDEO GOODS */ diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c index 3f91c15adf1..e5fe414e016 100644 --- a/src/mame/drivers/gradius3.c +++ b/src/mame/drivers/gradius3.c @@ -270,7 +270,7 @@ static INPUT_PORTS_START( gradius3 ) INPUT_PORTS_END -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c index bc7d450a2b4..63b8f6f1d20 100644 --- a/src/mame/drivers/grchamp.c +++ b/src/mame/drivers/grchamp.c @@ -244,7 +244,7 @@ static WRITE8_HANDLER( led_board_w ) static WRITE8_HANDLER( cpu1_outputs_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); grchamp_state *state = space->machine->driver_data(); UINT8 diff = data ^ state->cpu1_out[offset]; state->cpu1_out[offset] = data; diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index f8cce9e3409..d3f164d7789 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -265,7 +265,7 @@ GFXDECODE_END /*** MORE SOUND RELATED ******************************************************/ -static void gs_ym2610_irq(running_device *device, int irq) +static void gs_ym2610_irq(device_t *device, int irq) { if (irq) cputag_set_input_line(device->machine, "audiocpu", 0, ASSERT_LINE); diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index b040489d6e5..243e6d2f825 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -248,12 +248,12 @@ static WRITE32_HANDLER( paletteram32_w ) palette_set_color_rgb(space->machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); } -static void voodoo_vblank_0(running_device *device, int param) +static void voodoo_vblank_0(device_t *device, int param) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, param ? ASSERT_LINE : CLEAR_LINE); } -static void voodoo_vblank_1(running_device *device, int param) +static void voodoo_vblank_1(device_t *device, int param) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ1, param ? ASSERT_LINE : CLEAR_LINE); } @@ -264,8 +264,8 @@ static VIDEO_UPDATE( hangplt ) if (strcmp(screen->tag(), "lscreen") == 0) { - running_device *k001604 = screen->machine->device("k001604_1"); - running_device *voodoo = screen->machine->device("voodoo0"); + device_t *k001604 = screen->machine->device("k001604_1"); + device_t *voodoo = screen->machine->device("voodoo0"); // k001604_draw_back_layer(k001604, bitmap, cliprect); @@ -275,8 +275,8 @@ static VIDEO_UPDATE( hangplt ) } else if (strcmp(screen->tag(), "rscreen") == 0) { - running_device *k001604 = screen->machine->device("k001604_2"); - running_device *voodoo = screen->machine->device("voodoo1"); + device_t *k001604 = screen->machine->device("k001604_2"); + device_t *voodoo = screen->machine->device("voodoo1"); // k001604_draw_back_layer(k001604, bitmap, cliprect); @@ -293,38 +293,38 @@ static VIDEO_UPDATE( hangplt ) static READ32_HANDLER( gticlub_k001604_tile_r ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); return k001604_tile_r(k001604, offset, mem_mask); } static WRITE32_HANDLER( gticlub_k001604_tile_w ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); k001604_tile_w(k001604, offset, data, mem_mask); } static READ32_HANDLER( gticlub_k001604_char_r ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); return k001604_char_r(k001604, offset, mem_mask); } static WRITE32_HANDLER( gticlub_k001604_char_w ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); k001604_char_w(k001604, offset, data, mem_mask); } static READ32_HANDLER( gticlub_k001604_reg_r ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); return k001604_reg_r(k001604, offset, mem_mask); } static WRITE32_HANDLER( gticlub_k001604_reg_w ) { - running_device *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); + device_t *k001604 = space->machine->device(get_cgboard_id() ? "k001604_2" : "k001604_1"); k001604_reg_w(k001604, offset, data, mem_mask); } @@ -348,8 +348,8 @@ static const eeprom_interface eeprom_intf = static READ8_HANDLER( sysreg_r ) { static const char *const portnames[] = { "IN0", "IN1", "IN2", "IN3" }; - running_device *adc1038 = space->machine->device("adc1038"); - running_device *eeprom = space->machine->device("eeprom"); + device_t *adc1038 = space->machine->device("adc1038"); + device_t *eeprom = space->machine->device("eeprom"); switch (offset) { @@ -383,8 +383,8 @@ static READ8_HANDLER( sysreg_r ) static WRITE8_HANDLER( sysreg_w ) { - running_device *adc1038 = space->machine->device("adc1038"); - running_device *eeprom = space->machine->device("eeprom"); + device_t *adc1038 = space->machine->device("adc1038"); + device_t *eeprom = space->machine->device("eeprom"); switch (offset) { @@ -739,7 +739,7 @@ static const k056800_interface gticlub_k056800_interface = }; -static int adc1038_input_callback( running_device *device, int input ) +static int adc1038_input_callback( device_t *device, int input ) { int value = 0; switch (input) diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c index 555d8a3d41c..5f78bc7e640 100644 --- a/src/mame/drivers/gunbustr.c +++ b/src/mame/drivers/gunbustr.c @@ -111,7 +111,7 @@ popmessage(t); if (ACCESSING_BITS_0_7) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); eeprom_set_clock_line(device, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); eeprom_write_bit(device, data & 0x40); eeprom_set_cs_line(device, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c index a34959273e0..96b478b044c 100644 --- a/src/mame/drivers/gunpey.c +++ b/src/mame/drivers/gunpey.c @@ -189,7 +189,7 @@ ADDRESS_MAP_END /***************************************************************************************/ -static void sound_irq_gen(running_device *device, int state) +static void sound_irq_gen(device_t *device, int state) { logerror("sound irq\n"); } diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c index 0816f863346..ca25bcec5f0 100644 --- a/src/mame/drivers/gyruss.c +++ b/src/mame/drivers/gyruss.c @@ -105,7 +105,7 @@ static WRITE8_HANDLER( gyruss_irq_clear_w ) cpu_set_input_line(state->audiocpu_2, 0, CLEAR_LINE); } -static void filter_w( running_device *device, int chip, int data ) +static void filter_w( device_t *device, int chip, int data ) { int i; diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c index 6895783b287..5a75175cbf1 100644 --- a/src/mame/drivers/hcastle.c +++ b/src/mame/drivers/hcastle.c @@ -154,13 +154,13 @@ GFXDECODE_END /*****************************************************************************/ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { // hcastle_state *state = device->machine->driver_data(); // cputag_set_input_line(state->audiocpu, 0, linestate); } -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c index 576045b74b3..b73f8ba3949 100644 --- a/src/mame/drivers/hnayayoi.c +++ b/src/mame/drivers/hnayayoi.c @@ -500,7 +500,7 @@ INPUT_PORTS_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { popmessage("irq"); // cputag_set_input_line(device->machine, "maincpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index 7d8acb72a6d..dcf40cd1177 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -332,55 +332,55 @@ static emu_timer *sound_irq_timer; static READ32_HANDLER( hornet_k037122_sram_r ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); return k037122_sram_r(k037122, offset, mem_mask); } static WRITE32_HANDLER( hornet_k037122_sram_w ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); k037122_sram_w(k037122, offset, data, mem_mask); } static READ32_HANDLER( hornet_k037122_char_r ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); return k037122_char_r(k037122, offset, mem_mask); } static WRITE32_HANDLER( hornet_k037122_char_w ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); k037122_char_w(k037122, offset, data, mem_mask); } static READ32_HANDLER( hornet_k037122_reg_r ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); return k037122_reg_r(k037122, offset, mem_mask); } static WRITE32_HANDLER( hornet_k037122_reg_w ) { - running_device *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); + device_t *k037122 = space->machine->device(get_cgboard_id() ? "k037122_2" : "k037122_1"); k037122_reg_w(k037122, offset, data, mem_mask); } -static void voodoo_vblank_0(running_device *device, int param) +static void voodoo_vblank_0(device_t *device, int param) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE); } -static void voodoo_vblank_1(running_device *device, int param) +static void voodoo_vblank_1(device_t *device, int param) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ1, ASSERT_LINE); } static VIDEO_UPDATE( hornet ) { - running_device *voodoo = screen->machine->device("voodoo0"); - running_device *k037122 = screen->machine->device("k037122_1"); + device_t *voodoo = screen->machine->device("voodoo0"); + device_t *k037122 = screen->machine->device("k037122_1"); voodoo_update(voodoo, bitmap, cliprect); @@ -395,8 +395,8 @@ static VIDEO_UPDATE( hornet_2board ) { if (strcmp(screen->tag(), "lscreen") == 0) { - running_device *k037122 = screen->machine->device("k037122_1"); - running_device *voodoo = screen->machine->device("voodoo0"); + device_t *k037122 = screen->machine->device("k037122_1"); + device_t *voodoo = screen->machine->device("voodoo0"); voodoo_update(voodoo, bitmap, cliprect); /* TODO: tilemaps per screen */ @@ -404,8 +404,8 @@ static VIDEO_UPDATE( hornet_2board ) } else if (strcmp(screen->tag(), "rscreen") == 0) { - running_device *k037122 = screen->machine->device("k037122_2"); - running_device *voodoo = screen->machine->device("voodoo1"); + device_t *k037122 = screen->machine->device("k037122_2"); + device_t *voodoo = screen->machine->device("voodoo1"); voodoo_update(voodoo, bitmap, cliprect); /* TODO: tilemaps per screen */ @@ -423,8 +423,8 @@ static READ8_HANDLER( sysreg_r ) { UINT8 r = 0; static const char *const portnames[] = { "IN0", "IN1", "IN2" }; - running_device *adc12138 = space->machine->device("adc12138"); - running_device *eeprom = space->machine->device("eeprom"); + device_t *adc12138 = space->machine->device("adc12138"); + device_t *eeprom = space->machine->device("eeprom"); switch (offset) { @@ -457,7 +457,7 @@ static READ8_HANDLER( sysreg_r ) static WRITE8_HANDLER( sysreg_w ) { - running_device *adc12138 = space->machine->device("adc12138"); + device_t *adc12138 = space->machine->device("adc12138"); switch (offset) { @@ -867,7 +867,7 @@ static MACHINE_RESET( hornet ) memory_set_bankptr(machine, "bank5", usr5); } -static double adc12138_input_callback( running_device *device, UINT8 input ) +static double adc12138_input_callback( device_t *device, UINT8 input ) { return (double)0.0; } @@ -1061,7 +1061,7 @@ MACHINE_CONFIG_END static void jamma_jvs_cmd_exec(running_machine *machine); -static void jamma_jvs_w(running_device *device, UINT8 data) +static void jamma_jvs_w(device_t *device, UINT8 data) { if (jvs_sdata_ptr == 0 && data != 0xe0) return; diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index 3d9e6efa803..d021d9b6096 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -98,11 +98,11 @@ public: UINT8 mermaid_p[4]; /* Devices */ - running_device *master_cpu; - running_device *slave_cpu; - running_device *sound_cpu; - running_device *mermaid; - running_device *pandora; + device_t *master_cpu; + device_t *slave_cpu; + device_t *sound_cpu; + device_t *mermaid; + device_t *pandora; }; diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c index e46ab7eae5e..640012bd6dd 100644 --- a/src/mame/drivers/hyprduel.c +++ b/src/mame/drivers/hyprduel.c @@ -621,7 +621,7 @@ GFXDECODE_END Sound Communication ***************************************************************************/ -static void sound_irq( running_device *device, int state ) +static void sound_irq( device_t *device, int state ) { hyprduel_state *hyprduel = device->machine->driver_data(); cpu_set_input_line(hyprduel->subcpu, 1, HOLD_LINE); diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c index 1c3a43cb4f9..a686e94245f 100644 --- a/src/mame/drivers/igs011.c +++ b/src/mame/drivers/igs011.c @@ -3572,7 +3572,7 @@ MACHINE_CONFIG_END -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { // cputag_set_input_line(machine, "maincpu", 3, state); } diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index c35505bfcdd..220471a11ce 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -107,7 +107,7 @@ public: int oldsteer; /* devices */ - running_device *slavecpu; + device_t *slavecpu; }; diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index cfa579db773..a94ae8358ef 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -296,7 +296,7 @@ GFXDECODE_END ******************************************************************************/ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { inufuku_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index ecb528eab5f..c41aeac5036 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -29,7 +29,7 @@ Todo: /* Misc variables */ -static running_device *laserdisc; +static device_t *laserdisc; static UINT8 *tile_ram; static UINT8 *tile_control_ram; diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c index 3629c90288e..fbb116897ed 100644 --- a/src/mame/drivers/itech32.c +++ b/src/mame/drivers/itech32.c @@ -4073,7 +4073,7 @@ static DRIVER_INIT( wcbowln ) /* PIC 16C54 labeled as ITBWL-3 */ static void install_timekeeper(running_machine *machine) { - running_device *device = machine->device("m48t02"); + device_t *device = machine->device("m48t02"); memory_install_readwrite32_device_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), device, 0x681000, 0x6817ff, 0, 0, timekeeper_32be_r, timekeeper_32be_w); } diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c index 2efa8194839..444f9ed9228 100644 --- a/src/mame/drivers/itech8.c +++ b/src/mame/drivers/itech8.c @@ -645,7 +645,7 @@ static WRITE8_HANDLER( itech8_nmi_ack_w ) } -static void generate_sound_irq(running_device *device, int state) +static void generate_sound_irq(device_t *device, int state) { cputag_set_input_line(device->machine, "soundcpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 5192f23f698..c4e11511056 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -59,10 +59,10 @@ public: UINT8 nsc_latch, z80_latch; /* devices */ - running_device *cpu_0; - running_device *cpu_1; - running_device *cvsd; - running_device *nsc; + device_t *cpu_0; + device_t *cpu_1; + device_t *cvsd; + device_t *nsc; }; @@ -331,7 +331,7 @@ static WRITE8_HANDLER( adpcm_w ) state->adpcm_byte = data; } -static void jngolady_vclk_cb( running_device *device ) +static void jngolady_vclk_cb( device_t *device ) { jangou_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index dbfb3ccccf8..df1a30eed24 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -289,7 +289,7 @@ static WRITE8_DEVICE_HANDLER( jan_adpcm_w ) } } -static void jan_adpcm_int( running_device *device ) +static void jan_adpcm_int( device_t *device ) { jantotsu_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c index 76b4316a61a..b276cc4fc8a 100644 --- a/src/mame/drivers/jpmimpct.c +++ b/src/mame/drivers/jpmimpct.c @@ -821,7 +821,7 @@ INPUT_PORTS_END * *************************************/ -static void jpmimpct_tms_irq(running_device *device, int state) +static void jpmimpct_tms_irq(device_t *device, int state) { tms_irq = state; update_irqs(device->machine); diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index 8458a361af9..3967166e7f4 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -99,11 +99,11 @@ public: int i8039_status, last_irq; cpu_device *soundcpu; - running_device *i8039; + device_t *i8039; - running_device *filter_0_0; - running_device *filter_0_1; - running_device *filter_0_2; + device_t *filter_0_0; + device_t *filter_0_1; + device_t *filter_0_2; }; @@ -205,7 +205,7 @@ static READ8_DEVICE_HANDLER( junofrst_portA_r ) static WRITE8_DEVICE_HANDLER( junofrst_portB_w ) { junofrst_state *state = device->machine->driver_data(); - running_device *filter[3] = { state->filter_0_0, state->filter_0_1, state->filter_0_2 }; + device_t *filter[3] = { state->filter_0_0, state->filter_0_1, state->filter_0_2 }; int i; for (i = 0; i < 3; i++) diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c index 88c4dda6cd1..789acaa7034 100644 --- a/src/mame/drivers/kaneko16.c +++ b/src/mame/drivers/kaneko16.c @@ -1770,7 +1770,7 @@ static WRITE8_DEVICE_HANDLER( kaneko16_eeprom_reset_w ) { // FIXME: the device line cannot be directly put in the interface due to inverse value! // we might want to define a "reversed" set_cs_line handler - running_device *eeprom = device->machine->device("eeprom"); + device_t *eeprom = device->machine->device("eeprom"); // reset line asserted: reset. eeprom_set_cs_line(eeprom, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE ); } diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c index 968badd5312..7b29d7ebf44 100644 --- a/src/mame/drivers/karnov.c +++ b/src/mame/drivers/karnov.c @@ -755,7 +755,7 @@ static INTERRUPT_GEN( karnov_interrupt ) cpu_set_input_line(device, 7, HOLD_LINE); /* VBL */ } -static void sound_irq( running_device *device, int linestate ) +static void sound_irq( device_t *device, int linestate ) { karnov_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); /* IRQ */ diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c index 481c033e32c..b2f9795e61d 100644 --- a/src/mame/drivers/kchamp.c +++ b/src/mame/drivers/kchamp.c @@ -353,7 +353,7 @@ static INTERRUPT_GEN( kc_interrupt ) cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); } -static void msmint( running_device *device ) +static void msmint( device_t *device ) { kchamp_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c index 26b49084b0c..77fca94616f 100644 --- a/src/mame/drivers/kinst.c +++ b/src/mame/drivers/kinst.c @@ -157,7 +157,7 @@ static const UINT8 *control_map; static MACHINE_START( kinst ) { - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); UINT8 *features = ide_get_features(ide); if (strncmp(machine->gamedrv->name, "kinst2", 6) != 0) @@ -265,7 +265,7 @@ static INTERRUPT_GEN( irq0_start ) } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { cputag_set_input_line(device->machine, "maincpu", 1, state); } diff --git a/src/mame/drivers/konamigv.c b/src/mame/drivers/konamigv.c index 6d79f8b2352..b12834a953b 100644 --- a/src/mame/drivers/konamigv.c +++ b/src/mame/drivers/konamigv.c @@ -331,7 +331,7 @@ static MACHINE_RESET( konamigv ) cdda_set_cdrom(machine->device("cdda"), am53cf96_get_device(SCSI_ID_4)); } -static void spu_irq(running_device *device, UINT32 data) +static void spu_irq(device_t *device, UINT32 data) { psx_irq_set(device->machine, data); } diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index f888544d09b..bf571d073f4 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -874,7 +874,7 @@ static WRITE32_HANDLER( sound020_w ) /* National Semiconductor ADC0834 4-channel serial ADC emulation */ -static double adc0834_callback( running_device *device, UINT8 input ) +static double adc0834_callback( device_t *device, UINT8 input ) { switch (input) { @@ -3620,7 +3620,7 @@ static MACHINE_START( konamigx ) static MACHINE_RESET(konamigx) { - running_device *k054539_2 = machine->device("konami2"); + device_t *k054539_2 = machine->device("konami2"); int i; konamigx_wrport1_0 = konamigx_wrport1_1 = 0; diff --git a/src/mame/drivers/kongambl.c b/src/mame/drivers/kongambl.c index 031a8c990f5..7b16e1bb603 100644 --- a/src/mame/drivers/kongambl.c +++ b/src/mame/drivers/kongambl.c @@ -20,7 +20,7 @@ static VIDEO_START(kongambl) { - running_device *k056832 = machine->device("k056832"); + device_t *k056832 = machine->device("k056832"); k056832_set_layer_association(k056832, 0); k056832_set_layer_offs(k056832, 0, -2, 0); @@ -31,7 +31,7 @@ static VIDEO_START(kongambl) static VIDEO_UPDATE(kongambl) { - running_device *k056832 = screen->machine->device("k056832"); + device_t *k056832 = screen->machine->device("k056832"); bitmap_fill(bitmap, cliprect, 0); bitmap_fill(screen->machine->priority_bitmap, cliprect, 0); diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c index 66b9528e638..2f9c8ae002b 100644 --- a/src/mame/drivers/ksys573.c +++ b/src/mame/drivers/ksys573.c @@ -1619,7 +1619,7 @@ static MACHINE_RESET( konami573 ) state->flash_bank = -1; } -static void spu_irq(running_device *device, UINT32 data) +static void spu_irq(device_t *device, UINT32 data) { psx_irq_set(device->machine, data); } @@ -1697,7 +1697,7 @@ todo: static READ32_HANDLER( ge765pwbba_r ) { - running_device *upd4701 = space->machine->device("upd4701"); + device_t *upd4701 = space->machine->device("upd4701"); UINT32 data = 0; switch (offset) @@ -1735,7 +1735,7 @@ static READ32_HANDLER( ge765pwbba_r ) static WRITE32_HANDLER( ge765pwbba_w ) { - running_device *upd4701 = space->machine->device("upd4701"); + device_t *upd4701 = space->machine->device("upd4701"); switch (offset) { case 0x04: @@ -2899,7 +2899,7 @@ static DRIVER_INIT( mamboagg ) /* ADC0834 Interface */ -static double analogue_inputs_callback( running_device *device, UINT8 input ) +static double analogue_inputs_callback( device_t *device, UINT8 input ) { switch (input) { diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c index 8cb7549fd69..667eb2d6030 100644 --- a/src/mame/drivers/kungfur.c +++ b/src/mame/drivers/kungfur.c @@ -259,7 +259,7 @@ static const ppi8255_interface ppi8255_intf[2] = } }; -static void kfr_adpcm1_int(running_device *device) +static void kfr_adpcm1_int(device_t *device) { static UINT8 trigger,adpcm_data; @@ -285,7 +285,7 @@ static void kfr_adpcm1_int(running_device *device) } -static void kfr_adpcm2_int(running_device *device) +static void kfr_adpcm2_int(device_t *device) { static UINT8 trigger,adpcm_data; diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index 8e1cdfcf4a7..50f9720ef18 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -599,7 +599,7 @@ static WRITE_LINE_DEVICE_HANDLER( zaccaria_irq0b ) static READ8_DEVICE_HANDLER( zaccaria_port0a_r ) { laserbat_state *state = device->machine->driver_data(); - running_device *ay = (state->active_8910 == 0) ? state->ay1 : state->ay2; + device_t *ay = (state->active_8910 == 0) ? state->ay1 : state->ay2; return ay8910_r(ay, 0); } diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c index 08e2383b062..eea1969c701 100644 --- a/src/mame/drivers/lastduel.c +++ b/src/mame/drivers/lastduel.c @@ -440,7 +440,7 @@ GFXDECODE_END /******************************************************************************/ /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { lastduel_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c index 66eacb9f6ca..cacb4efb29e 100644 --- a/src/mame/drivers/lastfght.c +++ b/src/mame/drivers/lastfght.c @@ -88,7 +88,7 @@ public: UINT16 c00006; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c index 562e9ac365a..db8f47db356 100644 --- a/src/mame/drivers/lemmings.c +++ b/src/mame/drivers/lemmings.c @@ -244,7 +244,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq( running_device *device, int state ) +static void sound_irq( device_t *device, int state ) { lemmings_state *lemmings = device->machine->driver_data(); cpu_set_input_line(lemmings->audiocpu, 0, state); diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 9511011a6f2..39fe41b486e 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -241,7 +241,7 @@ static READ8_HANDLER( sound_status_r ) return 0xf; } -static void sound_nmi( running_device *device ) +static void sound_nmi( device_t *device ) { lethal_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index 41e68a59020..30c8b97bf2e 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -73,7 +73,7 @@ Dumping Notes: #define SOUND_PCB_CLOCK (6000000) /* Misc variables */ -static running_device *laserdisc; +static device_t *laserdisc; static UINT8 *tile_ram; static UINT8 *tile_control_ram; diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 7feaaccf626..4e21266fce5 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -478,7 +478,7 @@ static GFXDECODE_START( lkage ) GFXDECODE_ENTRY( "gfx1", 0x0000, sprite_layout, 0, 16 ) GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { lkage_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c index b13c01118a3..b87c1d2bd1b 100644 --- a/src/mame/drivers/lockon.c +++ b/src/mame/drivers/lockon.c @@ -426,7 +426,7 @@ static WRITE8_HANDLER( sound_vol ) flt_volume_set_volume(state->f2203_3r, rgain); } -static void ym2203_irq(running_device *device, int irq) +static void ym2203_irq(device_t *device, int irq) { lockon_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE ); diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c index b60949de8fb..16b2d718a72 100644 --- a/src/mame/drivers/lordgun.c +++ b/src/mame/drivers/lordgun.c @@ -144,7 +144,7 @@ static WRITE8_DEVICE_HANDLER(fake2_w) static WRITE8_DEVICE_HANDLER( lordgun_eeprom_w ) { - running_device *eeprom = device->machine->device("eeprom"); + device_t *eeprom = device->machine->device("eeprom"); static UINT8 old; int i; @@ -177,7 +177,7 @@ static WRITE8_DEVICE_HANDLER( lordgun_eeprom_w ) static WRITE8_DEVICE_HANDLER( aliencha_eeprom_w ) { - running_device *eeprom = device->machine->device("eeprom"); + device_t *eeprom = device->machine->device("eeprom"); if (~data & ~0xf8) { @@ -640,7 +640,7 @@ static const ppi8255_interface aliencha_ppi8255_intf[2] = } }; -static void soundirq(running_device *device, int state) +static void soundirq(device_t *device, int state) { cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_IRQ0, state); } diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c index fe60bfa4553..a3bd1b39891 100644 --- a/src/mame/drivers/lsasquad.c +++ b/src/mame/drivers/lsasquad.c @@ -538,7 +538,7 @@ GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { lsasquad_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index 9dd993418dd..a5796e47a65 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -1114,7 +1114,7 @@ static SOUND_START( lucky74 ) lucky74_adpcm_busy_line = 0x01; /* free and ready */ } -static void lucky74_adpcm_int(running_device *device) +static void lucky74_adpcm_int(device_t *device) { if (lucky74_adpcm_reg[05] == 0x01) /* register 0x05 (bit 0 activated), trigger the sample */ { diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c index f9ca948fa24..d4a6785854b 100644 --- a/src/mame/drivers/m107.c +++ b/src/mame/drivers/m107.c @@ -800,7 +800,7 @@ GFXDECODE_END /***************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { if (state) timer_call_after_resynch(device->machine, NULL, YM2151_ASSERT,setvector_callback); diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c index 1ac844a7cef..8eb557dbddd 100644 --- a/src/mame/drivers/m14.c +++ b/src/mame/drivers/m14.c @@ -68,7 +68,7 @@ public: UINT8 hop_mux; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index cf6731897d3..b6c53f40b41 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -145,10 +145,10 @@ public: INT16 *samplebuf; /* sound devices */ - running_device *soundcpu; - running_device *ay1; - running_device *ay2; - running_device *samples; + device_t *soundcpu; + device_t *ay1; + device_t *ay2; + device_t *samples; }; diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index 666c8baa2f5..2d102da9697 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -322,7 +322,7 @@ INLINE DRIVER_INIT( m72_8751 ) address_space *program = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); address_space *io = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO); address_space *sndio = cputag_get_address_space(machine, "soundcpu", ADDRESS_SPACE_IO); - running_device *dac = machine->device("dac"); + device_t *dac = machine->device("dac"); protection_ram = auto_alloc_array(machine, UINT16, 0x10000/2); memory_install_read_bank(program, 0xb0000, 0xbffff, 0, 0, "bank1"); diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index c51f5e5212f..7099cdca937 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -897,7 +897,7 @@ GFXDECODE_END /***************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { if (state) timer_call_after_resynch(device->machine, NULL, YM2151_ASSERT, setvector_callback); diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c index 85513406481..8c149ce95a4 100644 --- a/src/mame/drivers/macrossp.c +++ b/src/mame/drivers/macrossp.c @@ -582,7 +582,7 @@ GFXDECODE_END /*** MACHINE DRIVER **********************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { // macrossp_state *state = space->machine->driver_data(); logerror("ES5506 irq %d\n", irq); diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c index ea4439a461c..d0c4771ee06 100644 --- a/src/mame/drivers/madmotor.c +++ b/src/mame/drivers/madmotor.c @@ -212,7 +212,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { madmotor_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c index 1e8bd2ddaf2..8dbe7409a73 100644 --- a/src/mame/drivers/magmax.c +++ b/src/mame/drivers/magmax.c @@ -109,9 +109,9 @@ static MACHINE_RESET( magmax ) static WRITE8_DEVICE_HANDLER( ay8910_portA_0_w ) { -running_device *ay1 = device->machine->device("ay1"); -running_device *ay2 = device->machine->device("ay2"); -running_device *ay3 = device->machine->device("ay3"); +device_t *ay1 = device->machine->device("ay1"); +device_t *ay2 = device->machine->device("ay2"); +device_t *ay3 = device->machine->device("ay3"); float percent; /*There are three AY8910 chips and four(!) separate amplifiers on the board diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 838470a411d..27f9e689aa5 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -388,7 +388,7 @@ INPUT_PORTS_END /*****************************************************************************/ -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c index 30229ad43c0..0635dbf1d74 100644 --- a/src/mame/drivers/mappy.c +++ b/src/mame/drivers/mappy.c @@ -579,8 +579,8 @@ TODO: static WRITE8_HANDLER( superpac_latch_w ) { - running_device *namcoio_1 = space->machine->device("namcoio_1"); - running_device *namcoio_2 = space->machine->device("namcoio_2"); + device_t *namcoio_1 = space->machine->device("namcoio_1"); + device_t *namcoio_2 = space->machine->device("namcoio_2"); int bit = offset & 1; switch (offset & 0x0e) @@ -623,8 +623,8 @@ static WRITE8_HANDLER( superpac_latch_w ) static WRITE8_HANDLER( phozon_latch_w ) { - running_device *namcoio_1 = space->machine->device("namcoio_1"); - running_device *namcoio_2 = space->machine->device("namcoio_2"); + device_t *namcoio_1 = space->machine->device("namcoio_1"); + device_t *namcoio_2 = space->machine->device("namcoio_2"); int bit = offset & 1; switch (offset & 0x0e) @@ -671,8 +671,8 @@ static WRITE8_HANDLER( phozon_latch_w ) static WRITE8_HANDLER( mappy_latch_w ) { - running_device *namcoio_1 = space->machine->device("namcoio_1"); - running_device *namcoio_2 = space->machine->device("namcoio_2"); + device_t *namcoio_1 = space->machine->device("namcoio_1"); + device_t *namcoio_2 = space->machine->device("namcoio_2"); int bit = offset & 1; switch (offset & 0x0e) @@ -749,8 +749,8 @@ static MACHINE_RESET( mappy ) static TIMER_CALLBACK( superpac_io_run ) { - running_device *io56xx_1 = machine->device("namcoio_1"); - running_device *io56xx_2 = machine->device("namcoio_2"); + device_t *io56xx_1 = machine->device("namcoio_1"); + device_t *io56xx_2 = machine->device("namcoio_2"); switch (param) { @@ -765,8 +765,8 @@ static TIMER_CALLBACK( superpac_io_run ) static INTERRUPT_GEN( superpac_interrupt_1 ) { - running_device *namcoio_1 = device->machine->device("namcoio_1"); - running_device *namcoio_2 = device->machine->device("namcoio_2"); + device_t *namcoio_1 = device->machine->device("namcoio_1"); + device_t *namcoio_2 = device->machine->device("namcoio_2"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); @@ -780,8 +780,8 @@ static INTERRUPT_GEN( superpac_interrupt_1 ) static TIMER_CALLBACK( pacnpal_io_run ) { - running_device *io56xx = machine->device("namcoio_1"); - running_device *io59xx = machine->device("namcoio_2"); + device_t *io56xx = machine->device("namcoio_1"); + device_t *io59xx = machine->device("namcoio_2"); switch (param) { @@ -796,8 +796,8 @@ static TIMER_CALLBACK( pacnpal_io_run ) static INTERRUPT_GEN( pacnpal_interrupt_1 ) { - running_device *namcoio_1 = device->machine->device("namcoio_1"); - running_device *namcoio_2 = device->machine->device("namcoio_2"); + device_t *namcoio_1 = device->machine->device("namcoio_1"); + device_t *namcoio_2 = device->machine->device("namcoio_2"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); @@ -811,8 +811,8 @@ static INTERRUPT_GEN( pacnpal_interrupt_1 ) static TIMER_CALLBACK( phozon_io_run ) { - running_device *io58xx = machine->device("namcoio_1"); - running_device *io56xx = machine->device("namcoio_2"); + device_t *io58xx = machine->device("namcoio_1"); + device_t *io56xx = machine->device("namcoio_2"); switch (param) { @@ -827,8 +827,8 @@ static TIMER_CALLBACK( phozon_io_run ) static INTERRUPT_GEN( phozon_interrupt_1 ) { - running_device *namcoio_1 = device->machine->device("namcoio_1"); - running_device *namcoio_2 = device->machine->device("namcoio_2"); + device_t *namcoio_1 = device->machine->device("namcoio_1"); + device_t *namcoio_2 = device->machine->device("namcoio_2"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); @@ -842,8 +842,8 @@ static INTERRUPT_GEN( phozon_interrupt_1 ) static TIMER_CALLBACK( mappy_io_run ) { - running_device *io58xx_1 = machine->device("namcoio_1"); - running_device *io58xx_2 = machine->device("namcoio_2"); + device_t *io58xx_1 = machine->device("namcoio_1"); + device_t *io58xx_2 = machine->device("namcoio_2"); switch (param) { @@ -858,8 +858,8 @@ static TIMER_CALLBACK( mappy_io_run ) static INTERRUPT_GEN( mappy_interrupt_1 ) { - running_device *namcoio_1 = device->machine->device("namcoio_1"); - running_device *namcoio_2 = device->machine->device("namcoio_2"); + device_t *namcoio_1 = device->machine->device("namcoio_1"); + device_t *namcoio_2 = device->machine->device("namcoio_2"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); @@ -2239,7 +2239,7 @@ static DRIVER_INIT( grobda ) However, removing the 15XX from the board causes sound to disappear completely, so the DAC might be built-in after all. */ - running_device *dac = machine->device("dac"); + device_t *dac = machine->device("dac"); memory_install_write8_device_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), dac, 0x0002, 0x0002, 0, 0, grobda_DAC_w ); } diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 8b0af5b1c5d..551294c6c7b 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -623,7 +623,7 @@ static WRITE8_HANDLER( backupram_enable_w ) static WRITE8_HANDLER( msm5205_mastboy_m5205_sambit0_w ) { - running_device *adpcm = space->machine->device("msm"); + device_t *adpcm = space->machine->device("msm"); mastboy_m5205_sambit0 = data & 1; msm5205_playmode_w(adpcm, (1 << 2) | (mastboy_m5205_sambit1 << 1) | (mastboy_m5205_sambit0) ); @@ -633,7 +633,7 @@ static WRITE8_HANDLER( msm5205_mastboy_m5205_sambit0_w ) static WRITE8_HANDLER( msm5205_mastboy_m5205_sambit1_w ) { - running_device *adpcm = space->machine->device("msm"); + device_t *adpcm = space->machine->device("msm"); mastboy_m5205_sambit1 = data & 1; @@ -653,7 +653,7 @@ static WRITE8_HANDLER( mastboy_msm5205_data_w ) mastboy_m5205_next = data; } -static void mastboy_adpcm_int(running_device *device) +static void mastboy_adpcm_int(device_t *device) { msm5205_data_w(device, mastboy_m5205_next); mastboy_m5205_next >>= 4; diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c index b646ca2c5b0..c1bbf071cf4 100644 --- a/src/mame/drivers/matmania.c +++ b/src/mame/drivers/matmania.c @@ -354,7 +354,7 @@ MACHINE_CONFIG_END /* handler called by the 3526 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { matmania_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 1, linestate); diff --git a/src/mame/drivers/maygay1b.c b/src/mame/drivers/maygay1b.c index 623a799cd22..dc5a960dc54 100644 --- a/src/mame/drivers/maygay1b.c +++ b/src/mame/drivers/maygay1b.c @@ -31,7 +31,7 @@ static struct { - running_device *duart68681; + device_t *duart68681; } maygaym1_devices; static UINT8 lamppos; @@ -462,7 +462,7 @@ static MACHINE_RESET( m1 ) /////////////////////////////////////////////////////////////////////////// -static void duart_irq_handler(running_device *device, UINT8 state) +static void duart_irq_handler(device_t *device, UINT8 state) { cputag_set_input_line(device->machine, "maincpu", M6809_IRQ_LINE, state?ASSERT_LINE:CLEAR_LINE); LOG(("6809 irq%d \n",state)); @@ -698,7 +698,7 @@ static WRITE8_HANDLER( reel56_w ) awp_draw_reel(5); } -static UINT8 m1_duart_r (running_device *device) +static UINT8 m1_duart_r (device_t *device) { return (optic_pattern); } diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index 4f50464ae82..60050bc051b 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -194,7 +194,7 @@ static const UINT32 banks[4] = { 0, 0x40000/2, 0x20000/2, 0x60000/2 }; static struct { - running_device *duart68681; + device_t *duart68681; } maygayv1_devices; #define DRAM_BANK_SEL (banks[(VREG(DSBA) >> 7) & 3]) @@ -894,7 +894,7 @@ INPUT_PORTS_END ***************************************************************************/ -static void duart_irq_handler(running_device *device, UINT8 vector) +static void duart_irq_handler(device_t *device, UINT8 vector) { cputag_set_input_line_and_vector(device->machine, "maincpu", 5, ASSERT_LINE, vector); // cputag_set_input_line(device->machine, "maincpu", 5, state ? ASSERT_LINE : CLEAR_LINE); @@ -902,7 +902,7 @@ static void duart_irq_handler(running_device *device, UINT8 vector) static int d68681_val; -static void duart_tx(running_device *device, int channel, UINT8 data) +static void duart_tx(device_t *device, int channel, UINT8 data) { if (channel == 0) { @@ -921,12 +921,12 @@ static const duart68681_config maygayv1_duart68681_config = }; -static int data_to_i8031(running_device *device) +static int data_to_i8031(device_t *device) { return d68681_val; } -static void data_from_i8031(running_device *device, int data) +static void data_from_i8031(device_t *device, int data) { duart68681_rx_data(maygayv1_devices.duart68681, 0, data); } diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index 13c84846adc..68503af61c7 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -89,8 +89,8 @@ public: UINT8 soundlatch; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c index 86909afd18d..d0c1e482adc 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -414,7 +414,7 @@ GFXDECODE_END /* Stolen from Psikyo.c */ -static void sound_irq( running_device *device, int irq ) +static void sound_irq( device_t *device, int irq ) { mcatadv_state *state = device->machine->driver_data(); cpu_set_input_line(state->soundcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/mcr.c b/src/mame/drivers/mcr.c index 041eadcafbf..3a6f83dc0dd 100644 --- a/src/mame/drivers/mcr.c +++ b/src/mame/drivers/mcr.c @@ -414,7 +414,7 @@ static WRITE8_HANDLER( kroozr_op4_w ) static WRITE8_HANDLER( journey_op4_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); /* if we're not playing the sample yet, start it */ if (!sample_playing(samples, 0)) @@ -535,7 +535,7 @@ static READ8_HANDLER( nflfoot_ip2_r ) static WRITE8_HANDLER( nflfoot_op4_w ) { - running_device *sio = space->machine->device("ipu_sio"); + device_t *sio = space->machine->device("ipu_sio"); /* bit 7 = J3-7 on IPU board = /RXDA on SIO */ logerror("%04X:op4_w(%d%d%d)\n", cpu_get_pc(space->cpu), (data >> 7) & 1, (data >> 6) & 1, (data >> 5) & 1); diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 63916d64568..9734a2b7110 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -178,7 +178,7 @@ public: #define DC_CFIFO_DIAG 0x7c/4 -static void ide_interrupt(running_device *device, int state); +static void ide_interrupt(device_t *device, int state); @@ -485,7 +485,7 @@ static WRITE32_HANDLER(bios_ram_w) } #endif -static UINT8 mediagx_config_reg_r(running_device *device) +static UINT8 mediagx_config_reg_r(device_t *device) { mediagx_state *state = device->machine->driver_data(); @@ -493,7 +493,7 @@ static UINT8 mediagx_config_reg_r(running_device *device) return state->mediagx_config_regs[state->mediagx_config_reg_sel]; } -static void mediagx_config_reg_w(running_device *device, UINT8 data) +static void mediagx_config_reg_w(device_t *device, UINT8 data) { mediagx_state *state = device->machine->driver_data(); @@ -659,7 +659,7 @@ static WRITE32_HANDLER( parallel_port_w ) } } -static UINT32 cx5510_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 cx5510_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { mediagx_state *state = busdevice->machine->driver_data(); @@ -672,7 +672,7 @@ static UINT32 cx5510_pci_r(running_device *busdevice, running_device *device, in return state->cx5510_regs[reg/4]; } -static void cx5510_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void cx5510_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { mediagx_state *state = busdevice->machine->driver_data(); @@ -857,7 +857,7 @@ static WRITE8_HANDLER( pc_dma_write_byte ) space->write_byte(page_offset + offset, data); } -static void set_dma_channel(running_device *device, int channel, int _state) +static void set_dma_channel(device_t *device, int channel, int _state) { mediagx_state *state = device->machine->driver_data(); @@ -1162,7 +1162,7 @@ static void keyboard_interrupt(running_machine *machine, int _state) pic8259_ir1_w(state->pic8259_1, _state); } -static void ide_interrupt(running_device *device, int _state) +static void ide_interrupt(device_t *device, int _state) { mediagx_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c index 69da8046385..5147b9c2726 100644 --- a/src/mame/drivers/megadriv.c +++ b/src/mame/drivers/megadriv.c @@ -5133,7 +5133,7 @@ static MACHINE_RESET( segacd ) #ifdef MESS { - running_device *device; + device_t *device; device = machine->device("cdrom"); if ( device ) @@ -8963,7 +8963,7 @@ static IRQ_CALLBACK(genesis_int_callback) return (0x60+irqline*4)/4; // vector address } -static int megadriv_tas_callback(running_device *device) +static int megadriv_tas_callback(device_t *device) { return 0; // writeback not allowed } @@ -9161,7 +9161,7 @@ static WRITE8_HANDLER( z80_unmapped_w ) /* sets the megadrive z80 to it's normal ports / map */ void megatech_set_megadrive_z80_as_megadrive_z80(running_machine *machine, const char* tag) { - running_device *ym = machine->device("ymsnd"); + device_t *ym = machine->device("ymsnd"); /* INIT THE PORTS *********************************************************************************************/ memory_install_readwrite8_handler(cputag_get_address_space(machine, tag, ADDRESS_SPACE_IO), 0x0000, 0xffff, 0, 0, z80_unmapped_port_r, z80_unmapped_port_w); diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c index 68ae2389f04..375cd35c670 100644 --- a/src/mame/drivers/megasys1.c +++ b/src/mame/drivers/megasys1.c @@ -371,7 +371,7 @@ ADDRESS_MAP_END */ /* YM2151 IRQ */ -static void megasys1_sound_irq(running_device *device, int irq) +static void megasys1_sound_irq(device_t *device, int irq) { if (irq) cputag_set_input_line(device->machine, "soundcpu", 4, HOLD_LINE); @@ -1637,7 +1637,7 @@ MACHINE_CONFIG_END ***************************************************************************/ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } @@ -3850,8 +3850,8 @@ static WRITE16_DEVICE_HANDLER( okim6295_both_w ) static DRIVER_INIT( jitsupro ) { - running_device *oki1 = machine->device("oki1"); - running_device *oki2 = machine->device("oki2"); + device_t *oki1 = machine->device("oki1"); + device_t *oki2 = machine->device("oki2"); UINT16 *RAM = (UINT16 *) memory_region(machine, "maincpu"); astyanax_rom_decode(machine, "maincpu"); // Code diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c index 9e75d862730..c9912d00095 100644 --- a/src/mame/drivers/megatech.c +++ b/src/mame/drivers/megatech.c @@ -489,8 +489,8 @@ static VIDEO_START(mtnew) //attotime_never static VIDEO_UPDATE(mtnew) { - running_device *megadriv_screen = screen->machine->device("megadriv"); - running_device *menu_screen = screen->machine->device("menu"); + device_t *megadriv_screen = screen->machine->device("megadriv"); + device_t *menu_screen = screen->machine->device("menu"); if (screen == megadriv_screen) { diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 0a04130c334..5e2add30414 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -1149,7 +1149,7 @@ INPUT_PORTS_END static VIDEO_UPDATE( merit ) { - running_device *mc6845 = screen->machine->device("crtc"); + device_t *mc6845 = screen->machine->device("crtc"); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c index 1d8a28e73f7..2c6abaeab1c 100644 --- a/src/mame/drivers/meritm.c +++ b/src/mame/drivers/meritm.c @@ -121,7 +121,7 @@ Not all regional versions are available for each Megatouch series #define UART_CLK XTAL_18_432MHz static UINT8* meritm_ram; -static running_device *meritm_z80pio[2]; +static device_t *meritm_z80pio[2]; /************************************* diff --git a/src/mame/drivers/mermaid.c b/src/mame/drivers/mermaid.c index 6fc4379ab2d..505663393c7 100644 --- a/src/mame/drivers/mermaid.c +++ b/src/mame/drivers/mermaid.c @@ -403,7 +403,7 @@ static MACHINE_RESET( mermaid ) } /* Similar to Jantotsu, apparently the HW has three ports that controls what kind of sample should be played. Every sample size is 0x1000. */ -static void rougien_adpcm_int( running_device *device ) +static void rougien_adpcm_int( device_t *device ) { mermaid_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c index ca638009015..88beb562a0b 100644 --- a/src/mame/drivers/metalmx.c +++ b/src/mame/drivers/metalmx.c @@ -503,7 +503,7 @@ static WRITE32_HANDLER( host_vram_w ) COMBINE_DATA(state->gsp_vram + offset * 2); } -static void tms_interrupt(running_device *device, int state) +static void tms_interrupt(device_t *device, int state) { cputag_set_input_line(device->machine, "maincpu", 4, state ? HOLD_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/metlclsh.c b/src/mame/drivers/metlclsh.c index adba5f45e32..22b2d12d4f8 100644 --- a/src/mame/drivers/metlclsh.c +++ b/src/mame/drivers/metlclsh.c @@ -253,7 +253,7 @@ GFXDECODE_END ***************************************************************************/ -static void metlclsh_irqhandler(running_device *device, int linestate) +static void metlclsh_irqhandler(device_t *device, int linestate) { metlclsh_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, M6809_IRQ_LINE, linestate); diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index 0cd0c497db3..5373ca41b28 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -323,7 +323,7 @@ static INTERRUPT_GEN( dokyusei_interrupt ) } } -static void ymf278b_interrupt( running_device *device, int active ) +static void ymf278b_interrupt( device_t *device, int active ) { metro_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, 2, active); @@ -337,7 +337,7 @@ static void ymf278b_interrupt( running_device *device, int active ) ***************************************************************************/ -static int metro_io_callback( running_device *device, int ioline, int state ) +static int metro_io_callback( device_t *device, int ioline, int state ) { metro_state *driver_state = device->machine->driver_data(); address_space *space = cpu_get_address_space(driver_state->maincpu, ADDRESS_SPACE_PROGRAM); @@ -526,7 +526,7 @@ static WRITE8_HANDLER( daitorid_portb_w ) state->portb = data; } -static void metro_sound_irq_handler( running_device *device, int state ) +static void metro_sound_irq_handler( device_t *device, int state ) { metro_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE); @@ -1270,7 +1270,7 @@ ADDRESS_MAP_END Mahjong Gakuensai ***************************************************************************/ -static void gakusai_oki_bank_set(running_device *device) +static void gakusai_oki_bank_set(device_t *device) { metro_state *state = device->machine->driver_data(); int bank = (state->gakusai_oki_bank_lo & 7) + (state->gakusai_oki_bank_hi & 1) * 8; @@ -1706,7 +1706,7 @@ static WRITE8_HANDLER( blzntrnd_sh_bankswitch_w ) memory_set_bankptr(space->machine, "bank1", &RAM[bankaddress]); } -static void blzntrnd_irqhandler(running_device *device, int irq) +static void blzntrnd_irqhandler(device_t *device, int irq) { metro_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index 56ea73f713b..40a4bda2904 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -26,7 +26,7 @@ public: attotime time_released; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index 6262430d4fb..4bfa489f059 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -661,7 +661,7 @@ static INPUT_PORTS_START( hammer ) INPUT_PORTS_END -static void livequiz_irqhandler(running_device *device, int state) +static void livequiz_irqhandler(device_t *device, int state) { logerror("YMZ280 is generating an interrupt. State=%08x\n",state); } diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c index 96c42dbb56e..9bfbb2d58db 100644 --- a/src/mame/drivers/midvunit.c +++ b/src/mame/drivers/midvunit.c @@ -463,7 +463,7 @@ static WRITE32_HANDLER( midvplus_misc_w ) * *************************************/ -static void midvplus_xf1_w(running_device *device, UINT8 val) +static void midvplus_xf1_w(device_t *device, UINT8 val) { static int lastval; // mame_printf_debug("xf1_w = %d\n", val); diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index 20987e92326..4469212a48f 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -335,7 +335,7 @@ GFXDECODE_END /* Sound Interfaces */ // Handler called by the 3526 emulator when the internal timers cause an IRQ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { logerror("YM3526 firing an IRQ\n"); // cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index cb0c8f6ae61..896cca2ed93 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -1198,7 +1198,7 @@ GFXDECODE_END -static void spangbl_adpcm_int( running_device *device ) +static void spangbl_adpcm_int( device_t *device ) { mitchell_state *state = device->machine->driver_data(); msm5205_data_w(device, state->sample_buffer & 0x0f); diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c index b2331043a9e..86fbb609185 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -41,8 +41,8 @@ public: UINT32 dac_adr, dac_bank, dac_adr_s, dac_adr_e, dac_busy; /* devices */ - running_device *maincpu; - running_device *dac; + device_t *maincpu; + device_t *dac; }; diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index 574189f2da2..010347a62c0 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -235,7 +235,7 @@ static WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) memory_set_bankptr(device->machine, "bank1", memory_region(device->machine, "audiocpu") + ((data) & 0x03) * 0x4000 + 0x10000 ); } -static void ml_msm5205_vck(running_device *device) +static void ml_msm5205_vck(device_t *device) { static UINT8 trigger; @@ -301,7 +301,7 @@ static WRITE16_HANDLER( ml_sub_reset_w ) static WRITE16_HANDLER( ml_to_sound_w ) { - running_device *tc0140syt = space->machine->device("tc0140syt"); + device_t *tc0140syt = space->machine->device("tc0140syt"); if (offset == 0) tc0140syt_port_w(tc0140syt, 0, data & 0xff); else if (offset == 1) @@ -313,7 +313,7 @@ static WRITE16_HANDLER( ml_to_sound_w ) static WRITE8_HANDLER( ml_sound_to_main_w ) { - running_device *tc0140syt = space->machine->device("tc0140syt"); + device_t *tc0140syt = space->machine->device("tc0140syt"); if (offset == 0) tc0140syt_slave_port_w(tc0140syt, 0, data & 0xff); else if (offset == 1) @@ -684,7 +684,7 @@ static INPUT_PORTS_START( mlanding ) PORT_BIT( 0x0fff, 0x0000, IPT_AD_STICK_X ) PORT_MINMAX(0x0800,0x07ff) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) INPUT_PORTS_END -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index a2742a5d70c..518e2253989 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -132,7 +132,7 @@ static int dsp_type; static int copro_fifoin_rpos, copro_fifoin_wpos; static UINT32 copro_fifoin_data[COPRO_FIFOIN_SIZE]; static int copro_fifoin_num = 0; -static int copro_fifoin_pop(running_device *device, UINT32 *result) +static int copro_fifoin_pop(device_t *device, UINT32 *result) { UINT32 r; @@ -170,7 +170,7 @@ static int copro_fifoin_pop(running_device *device, UINT32 *result) return 1; } -static void copro_fifoin_push(running_device *device, UINT32 data) +static void copro_fifoin_push(device_t *device, UINT32 data) { if (copro_fifoin_num == COPRO_FIFOIN_SIZE) { @@ -242,7 +242,7 @@ static UINT32 copro_fifoout_pop(address_space *space) return r; } -static void copro_fifoout_push(running_device *device, UINT32 data) +static void copro_fifoout_push(device_t *device, UINT32 data) { //if (copro_fifoout_wpos == copro_fifoout_rpos) if (copro_fifoout_num == COPRO_FIFOOUT_SIZE) @@ -1891,7 +1891,7 @@ ADDRESS_MAP_END static int scsp_last_line = 0; -static void scsp_irq(running_device *device, int irq) +static void scsp_irq(device_t *device, int irq) { if (irq > 0) { diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c index 03463134e43..528215b6d20 100644 --- a/src/mame/drivers/model3.c +++ b/src/mame/drivers/model3.c @@ -1354,7 +1354,7 @@ static WRITE64_HANDLER( model3_ctrl_w ) case 0: if (ACCESSING_BITS_56_63) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); int reg = (data >> 56) & 0xff; eeprom_write_bit(device, (reg & 0x20) ? 1 : 0); eeprom_set_clock_line(device, (reg & 0x80) ? ASSERT_LINE : CLEAR_LINE); @@ -4905,7 +4905,7 @@ ADDRESS_MAP_END static int scsp_last_line = 0; -static void scsp_irq(running_device *device, int irq) +static void scsp_irq(device_t *device, int irq) { if (irq > 0) { diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c index 47b4bde5bb4..734bc4e281e 100644 --- a/src/mame/drivers/mogura.c +++ b/src/mame/drivers/mogura.c @@ -19,9 +19,9 @@ public: tilemap_t *tilemap; /* devices */ - running_device *maincpu; - running_device *dac1; - running_device *dac2; + device_t *maincpu; + device_t *dac1; + device_t *dac2; }; diff --git a/src/mame/drivers/mpu4.c b/src/mame/drivers/mpu4.c index df18ffefdcd..359715aca0b 100644 --- a/src/mame/drivers/mpu4.c +++ b/src/mame/drivers/mpu4.c @@ -454,13 +454,13 @@ static MACHINE_RESET( mpu4 ) /* 6809 IRQ handler */ static WRITE_LINE_DEVICE_HANDLER( cpu0_irq ) { - running_device *pia3 = device->machine->device("pia_ic3"); - running_device *pia4 = device->machine->device("pia_ic4"); - running_device *pia5 = device->machine->device("pia_ic5"); - running_device *pia6 = device->machine->device("pia_ic6"); - running_device *pia7 = device->machine->device("pia_ic7"); - running_device *pia8 = device->machine->device("pia_ic8"); - running_device *ptm6840 = device->machine->device("6840ptm"); + device_t *pia3 = device->machine->device("pia_ic3"); + device_t *pia4 = device->machine->device("pia_ic4"); + device_t *pia5 = device->machine->device("pia_ic5"); + device_t *pia6 = device->machine->device("pia_ic6"); + device_t *pia7 = device->machine->device("pia_ic7"); + device_t *pia8 = device->machine->device("pia_ic8"); + device_t *ptm6840 = device->machine->device("6840ptm"); /* The PIA and PTM IRQ lines are all connected to a common PCB track, leading directly to the 6809 IRQ line. */ int combined_state = pia6821_get_irq_a(pia3) | pia6821_get_irq_b(pia3) | @@ -514,7 +514,7 @@ static WRITE8_DEVICE_HANDLER( ic2_o1_callback ) static WRITE8_DEVICE_HANDLER( ic2_o2_callback ) { - running_device *pia = device->machine->device("pia_ic3"); + device_t *pia = device->machine->device("pia_ic3"); pia6821_ca1_w(pia, data); /* copy output value to IC3 ca1 */ /* the output from timer2 is the input clock for timer3 */ @@ -756,7 +756,7 @@ static READ8_DEVICE_HANDLER( pia_ic5_porta_r ) static READ8_DEVICE_HANDLER( pia_ic5_portb_r ) { - running_device *pia_ic5 = device->machine->device("pia_ic5"); + device_t *pia_ic5 = device->machine->device("pia_ic5"); LOG(("%s: IC5 PIA Read of Port B (coin input AUX2)\n",cpuexec_describe_context(device->machine))); coin_lockout_w(device->machine, 0, (pia6821_get_output_b(pia_ic5) & 0x01) ); coin_lockout_w(device->machine, 1, (pia6821_get_output_b(pia_ic5) & 0x02) ); @@ -796,7 +796,7 @@ BDIR BC1 | */ /* PSG function selected */ -static void update_ay(running_device *device) +static void update_ay(device_t *device) { if (!pia6821_get_output_cb2(device)) { @@ -809,14 +809,14 @@ static void update_ay(running_device *device) } case 0x01: { /* CA2 = 1 CB2 = 0? : Read from selected PSG register and make the register data available to Port A */ - running_device *pia_ic6 = device->machine->device("pia_ic6"); + device_t *pia_ic6 = device->machine->device("pia_ic6"); LOG(("AY8913 address = %d \n",pia6821_get_output_a(pia_ic6)&0x0f)); break; } case 0x02: {/* CA2 = 0 CB2 = 1? : Write to selected PSG register and write data to Port A */ - running_device *pia_ic6 = device->machine->device("pia_ic6"); - running_device *ay = device->machine->device("ay8913"); + device_t *pia_ic6 = device->machine->device("pia_ic6"); + device_t *ay = device->machine->device("ay8913"); ay8910_data_w(ay, 0, pia6821_get_output_a(pia_ic6)); LOG(("AY Chip Write \n")); break; @@ -824,8 +824,8 @@ static void update_ay(running_device *device) case 0x03: {/* CA2 = 1 CB2 = 1? : The register will now be selected and the user can read from or write to it. The register will remain selected until another is chosen.*/ - running_device *pia_ic6 = device->machine->device("pia_ic6"); - running_device *ay = device->machine->device("ay8913"); + device_t *pia_ic6 = device->machine->device("pia_ic6"); + device_t *ay = device->machine->device("ay8913"); ay8910_address_w(ay, 0, pia6821_get_output_a(pia_ic6)); LOG(("AY Chip Select \n")); break; @@ -1028,7 +1028,7 @@ static const pia6821_interface pia_ic7_intf = static READ8_DEVICE_HANDLER( pia_ic8_porta_r ) { static const char *const portnames[] = { "ORANGE1", "ORANGE2", "BLACK1", "BLACK2", "ORANGE1", "ORANGE2", "DIL1", "DIL2" }; - running_device *pia_ic5 = device->machine->device("pia_ic5"); + device_t *pia_ic5 = device->machine->device("pia_ic5"); LOG_IC8(("%s: IC8 PIA Read of Port A (MUX input data)\n", cpuexec_describe_context(device->machine))); /* The orange inputs are polled twice as often as the black ones, for reasons of efficiency. @@ -1089,7 +1089,7 @@ static const pia6821_interface pia_ic8_intf = static WRITE8_DEVICE_HANDLER( pia_gb_porta_w ) { - running_device *msm6376 = device->machine->device("msm6376"); + device_t *msm6376 = device->machine->device("msm6376"); LOG(("%s: GAMEBOARD: PIA Port A Set to %2x\n", cpuexec_describe_context(device->machine),data)); okim6376_w(msm6376, 0, data); diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c index 95ac873884a..c291928f656 100644 --- a/src/mame/drivers/mpu4drvr.c +++ b/src/mame/drivers/mpu4drvr.c @@ -365,8 +365,8 @@ static WRITE8_DEVICE_HANDLER( vid_o1_callback ) if (data) { - running_device *acia_0 = device->machine->device("acia6850_0"); - running_device *acia_1 = device->machine->device("acia6850_1"); + device_t *acia_0 = device->machine->device("acia6850_0"); + device_t *acia_1 = device->machine->device("acia6850_1"); acia6850_tx_clock_in(acia_0); acia6850_rx_clock_in(acia_0); acia6850_tx_clock_in(acia_1); @@ -1876,7 +1876,7 @@ static WRITE16_DEVICE_HANDLER( oki_w ) // 0x12: .... ...x OKIM6736 /ST } -static void video_reset(running_device *device) +static void video_reset(device_t *device) { device->machine->device("6840ptm_68k")->reset(); device->machine->device("acia6850_1")->reset(); @@ -2587,7 +2587,7 @@ static DRIVER_INIT (crmaze3a) static DRIVER_INIT (mating) { address_space *space = cputag_get_address_space(machine, "video", ADDRESS_SPACE_PROGRAM); - running_device *device = machine->device("oki"); + device_t *device = machine->device("oki"); /* The Mating Game has an extra 256kB RAM on the program card */ memory_install_ram(space, 0x600000, 0x63ffff, 0, 0, NULL); diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index 518ce4c5161..12278b22fc1 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -389,7 +389,7 @@ static GFXDECODE_START( mugsmash ) GFXDECODE_ENTRY( "gfx2", 0, mugsmash2_layout, 0x100, 256 ) /* bg tiles */ GFXDECODE_END -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { mugsmash_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c index bc4f8bcceea..3d0d7f1c498 100644 --- a/src/mame/drivers/multigam.c +++ b/src/mame/drivers/multigam.c @@ -334,7 +334,7 @@ static UINT8* multigam3_mmc3_prg_base; static int multigam3_mmc3_prg_size; static int multigam3_mmc3_chr_bank_base; -static void multigam3_mmc3_scanline_cb( running_device *device, int scanline, int vblank, int blanked ) +static void multigam3_mmc3_scanline_cb( device_t *device, int scanline, int vblank, int blanked ) { if (!vblank && !blanked) { @@ -348,7 +348,7 @@ static void multigam3_mmc3_scanline_cb( running_device *device, int scanline, in static WRITE8_HANDLER( multigam3_mmc3_rom_switch_w ) { - running_device *ppu = space->machine->device("ppu"); + device_t *ppu = space->machine->device("ppu"); /* basically, a MMC3 mapper from the nes */ static int multigam3_mmc3_command; @@ -816,7 +816,7 @@ static UINT8 supergm3_chr_bank; static void supergm3_set_bank(running_machine *machine) { - running_device *ppu = machine->device("ppu"); + device_t *ppu = machine->device("ppu"); UINT8* mem = memory_region(machine, "maincpu"); // video bank @@ -1038,7 +1038,7 @@ static PALETTE_INIT( multigam ) ppu2c0x_init_palette(machine, 0); } -static void ppu_irq( running_device *device, int *ppu_regs ) +static void ppu_irq( device_t *device, int *ppu_regs ) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); } diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index a5eb0a14c59..198626559b0 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -870,8 +870,8 @@ static MACHINE_START( mystwarr ) static MACHINE_RESET(mystwarr) { - running_device *k054539_1 = machine->device("konami1"); - running_device *k054539_2 = machine->device("konami2"); + device_t *k054539_1 = machine->device("konami1"); + device_t *k054539_2 = machine->device("konami2"); int i; // soften chorus(chip 0 channel 0-3), boost voice(chip 0 channel 4-7) @@ -887,7 +887,7 @@ static MACHINE_RESET(mystwarr) static MACHINE_RESET(dadandrn) { - running_device *k054539_1 = machine->device("konami1"); + device_t *k054539_1 = machine->device("konami1"); int i; // boost voice(chip 0 channel 4-7) @@ -896,7 +896,7 @@ static MACHINE_RESET(dadandrn) static MACHINE_RESET(viostorm) { - running_device *k054539_1 = machine->device("konami1"); + device_t *k054539_1 = machine->device("konami1"); int i; // boost voice(chip 0 channel 4-7) @@ -905,8 +905,8 @@ static MACHINE_RESET(viostorm) static MACHINE_RESET(metamrph) { - running_device *k054539_1 = machine->device("konami1"); - running_device *k054539_2 = machine->device("konami2"); + device_t *k054539_1 = machine->device("konami1"); + device_t *k054539_2 = machine->device("konami2"); int i; // boost voice(chip 0 channel 4-7) and soften other channels @@ -921,7 +921,7 @@ static MACHINE_RESET(metamrph) static MACHINE_RESET(martchmp) { - running_device *k054539_1 = machine->device("konami1"); + device_t *k054539_1 = machine->device("konami1"); int i; k054539_init_flags(k054539_1, K054539_REVERSE_STEREO); @@ -932,7 +932,7 @@ static MACHINE_RESET(martchmp) static MACHINE_RESET(gaiapols) { - running_device *k054539_1 = machine->device("konami1"); + device_t *k054539_1 = machine->device("konami1"); int i; // boost voice(chip 0 channel 5-7) diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c index 3d9d483be98..c147deda99b 100644 --- a/src/mame/drivers/namcos1.c +++ b/src/mame/drivers/namcos1.c @@ -1056,7 +1056,7 @@ GFXDECODE_END -static void namcos1_sound_interrupt( running_device *device, int irq ) +static void namcos1_sound_interrupt( device_t *device, int irq ) { cputag_set_input_line(device->machine, "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index ba2ea734e33..6ab8086a0bd 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -1663,7 +1663,7 @@ ADDRESS_MAP_END /* * Aica */ -static void aica_irq(running_device *device, int irq) +static void aica_irq(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/nbmj9195.c b/src/mame/drivers/nbmj9195.c index 9dbb059878e..5ddc0388b77 100644 --- a/src/mame/drivers/nbmj9195.c +++ b/src/mame/drivers/nbmj9195.c @@ -471,7 +471,7 @@ static WRITE8_HANDLER( tmpz84c011_1_dir_pe_w ) { pio_dir[9] = data; } /* CTC of main cpu, ch0 trigger is vblank */ static INTERRUPT_GEN( ctc0_trg1 ) { - running_device *ctc = device->machine->device("main_ctc"); + device_t *ctc = device->machine->device("main_ctc"); z80ctc_trg1_w(ctc, 1); z80ctc_trg1_w(ctc, 0); } diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 6c2fb590256..c94cfafd713 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -1614,7 +1614,7 @@ static const ay8910_interface ay8910_interface_2 = DEVCB_DEVICE_HANDLER("k007232", k005289_control_B_w) }; -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { /* Interrupts _are_ generated, I wonder where they go.. */ // nemesis_state *driver_state = device->machine->driver_data(); @@ -1631,7 +1631,7 @@ static const ym3812_interface ym3812_config = sound_irq }; -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index 7c8916150f3..40ff9740550 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -390,7 +390,7 @@ static void start_interrupt_timers( running_machine *machine ) * *************************************/ -static void audio_cpu_irq(running_device *device, int assert) +static void audio_cpu_irq(device_t *device, int assert) { neogeo_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, assert ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c index 680dda98b6e..16d003adfae 100644 --- a/src/mame/drivers/neoprint.c +++ b/src/mame/drivers/neoprint.c @@ -343,7 +343,7 @@ public: : driver_device(machine, config) { } }; -static void audio_cpu_irq(running_device *device, int assert) +static void audio_cpu_irq(device_t *device, int assert) { cputag_set_input_line(device->machine, "audiocpu", 0, assert ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index f1c53f44c5b..94c735fb105 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -49,8 +49,8 @@ public: UINT8 *comms_ram; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c index 689fe5f93c6..8f9b9f70eae 100644 --- a/src/mame/drivers/ninjakd2.c +++ b/src/mame/drivers/ninjakd2.c @@ -227,7 +227,7 @@ static SAMPLES_START( ninjakd2_init_samples ) static WRITE8_HANDLER( ninjakd2_pcm_play_w ) { - running_device *samples = space->machine->device("pcm"); + device_t *samples = space->machine->device("pcm"); const UINT8* const rom = memory_region(space->machine, "pcm"); // only Ninja Kid II uses this @@ -874,7 +874,7 @@ GFXDECODE_END * *************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c index db531c09508..b0fe643e97b 100644 --- a/src/mame/drivers/ninjaw.c +++ b/src/mame/drivers/ninjaw.c @@ -396,7 +396,7 @@ static READ16_HANDLER( ninjaw_sound_r ) static WRITE8_HANDLER( ninjaw_pancontrol ) { ninjaw_state *state = space->machine->driver_data(); - running_device *flt = NULL; + device_t *flt = NULL; offset &= 3; switch (offset) @@ -646,7 +646,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { ninjaw_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index d2c5b8af09c..396e1306275 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -248,8 +248,8 @@ public: UINT8 prot_val, input_data, priority_reg, gfx_bank; /* devices */ - running_device *maincpu; - running_device *soundcpu; + device_t *maincpu; + device_t *soundcpu; }; @@ -996,7 +996,7 @@ static GFXDECODE_START( pclubys ) GFXDECODE_END -static void soundirq( running_device *device, int state ) +static void soundirq( device_t *device, int state ) { nmg5_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->soundcpu, 0, state); diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index 9ac4b1022c8..b3acf8c7a1e 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -3502,7 +3502,7 @@ static const ym2203_interface ym2203_nmk004_interface = NMK004_irq }; -static void ym2203_irqhandler(running_device *device, int irq) +static void ym2203_irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } @@ -4824,7 +4824,7 @@ GFXDECODE_END ***************************************************************************/ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c index d6fe4cf640b..f269dadb29c 100644 --- a/src/mame/drivers/norautp.c +++ b/src/mame/drivers/norautp.c @@ -658,7 +658,7 @@ static WRITE8_DEVICE_HANDLER( soundlamps_w ) xxxx ---- * Discrete Sound Lines. */ - running_device *discrete = device->machine->device("discrete"); + device_t *discrete = device->machine->device("discrete"); output_set_lamp_value(8, (data >> 0) & 1); /* DEAL / DRAW lamp */ output_set_lamp_value(9, (data >> 1) & 1); /* BET / COLLECT lamp */ diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c index 478fb0e7453..1e4c8ba6d47 100644 --- a/src/mame/drivers/nwk-tr.c +++ b/src/mame/drivers/nwk-tr.c @@ -237,7 +237,7 @@ static WRITE32_HANDLER( paletteram32_w ) palette_set_color_rgb(space->machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); } -static void voodoo_vblank_0(running_device *device, int param) +static void voodoo_vblank_0(device_t *device, int param) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE); } @@ -245,8 +245,8 @@ static void voodoo_vblank_0(running_device *device, int param) static VIDEO_UPDATE( nwktr ) { - running_device *voodoo = screen->machine->device("voodoo"); - running_device *k001604 = screen->machine->device("k001604"); + device_t *voodoo = screen->machine->device("voodoo"); + device_t *k001604 = screen->machine->device("k001604"); bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); @@ -263,7 +263,7 @@ static VIDEO_UPDATE( nwktr ) static READ32_HANDLER( sysreg_r ) { - running_device *adc12138 = space->machine->device("adc12138"); + device_t *adc12138 = space->machine->device("adc12138"); UINT32 r = 0; if (offset == 0) { @@ -296,7 +296,7 @@ static READ32_HANDLER( sysreg_r ) static WRITE32_HANDLER( sysreg_w ) { - running_device *adc12138 = space->machine->device("adc12138"); + device_t *adc12138 = space->machine->device("adc12138"); if( offset == 0 ) { if (ACCESSING_BITS_24_31) @@ -596,7 +596,7 @@ static const sharc_config sharc_cfg = }; -static double adc12138_input_callback( running_device *device, UINT8 input ) +static double adc12138_input_callback( device_t *device, UINT8 input ) { int value = 0; switch (input) diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 4b5a015b431..28fcb451a97 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -101,13 +101,13 @@ public: UINT16 star_shift_reg; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *audiocpu2; - running_device *ic48_1; - running_device *mc6845; - running_device *pia1; - running_device *pia2; + device_t *maincpu; + device_t *audiocpu; + device_t *audiocpu2; + device_t *ic48_1; + device_t *mc6845; + device_t *pia1; + device_t *pia2; }; diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c index 3be5c99224c..d0efd645f78 100644 --- a/src/mame/drivers/ojankohs.c +++ b/src/mame/drivers/ojankohs.c @@ -73,7 +73,7 @@ static WRITE8_HANDLER( ojankohs_msm5205_w ) state->vclk_left = 2; } -static void ojankohs_adpcm_int( running_device *device ) +static void ojankohs_adpcm_int( device_t *device ) { ojankohs_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index 28aeaf3fd66..863185e0381 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -330,7 +330,7 @@ static GFXDECODE_START( oneshot ) GFXDECODE_ENTRY( "gfx1", 0, oneshot8x8_layout, 0x00, 4 ) /* sprites */ GFXDECODE_END -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { oneshot_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index 3bdfab6d073..07bdace25c8 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -61,8 +61,8 @@ public: tilemap_t *fg_tilemap; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; @@ -323,7 +323,7 @@ GFXDECODE_END * *************************************/ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { onetwo_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate); diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c index 9ce6578b3e4..7703174235e 100644 --- a/src/mame/drivers/opwolf.c +++ b/src/mame/drivers/opwolf.c @@ -467,7 +467,7 @@ static MACHINE_RESET( opwolf ) msm5205_reset_w(machine->device("msm2"), 1); } -static void opwolf_msm5205_vck( running_device *device ) +static void opwolf_msm5205_vck( device_t *device ) { opwolf_state *state = device->machine->driver_data(); int chip = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; @@ -694,7 +694,7 @@ GFXDECODE_END /* handler called by the YM2151 emulator when the internal timers cause an IRQ */ -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { opwolf_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index e24b3e5e9dc..e488058cb23 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -68,11 +68,11 @@ public: int n7751_busy; /* devices */ - running_device *maincpu; - running_device *mc6845; - running_device *n7751; - running_device *ay1; - running_device *ay2; + device_t *maincpu; + device_t *mc6845; + device_t *n7751; + device_t *ay1; + device_t *ay2; }; diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index 57873fdab72..1dae704d5ce 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -634,7 +634,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { othunder_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/pachifev.c b/src/mame/drivers/pachifev.c index f4174968b73..40c9667c564 100644 --- a/src/mame/drivers/pachifev.c +++ b/src/mame/drivers/pachifev.c @@ -247,7 +247,7 @@ INPUT_PORTS_END static UINT32 adpcm_pos; static UINT8 adpcm_idle=0; -static void pf_adpcm_int(running_device *device) +static void pf_adpcm_int(device_t *device) { static UINT8 trigger,adpcm_data; diff --git a/src/mame/drivers/pcat_dyn.c b/src/mame/drivers/pcat_dyn.c index e3d40ffacd3..7efb1c25b1e 100644 --- a/src/mame/drivers/pcat_dyn.c +++ b/src/mame/drivers/pcat_dyn.c @@ -109,11 +109,11 @@ static VIDEO_UPDATE(pcat_dyn) } static struct { - running_device *pit8253; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8253; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } pcat_dyn_devices; /****************** @@ -196,7 +196,7 @@ static WRITE8_HANDLER( pc_dma_write_byte ) space->write_byte(page_offset + offset, data); } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c index 97a79d61827..3c9d8e9add2 100644 --- a/src/mame/drivers/pcktgal.c +++ b/src/mame/drivers/pcktgal.c @@ -45,7 +45,7 @@ static WRITE8_HANDLER( pcktgal_sound_w ) static int msm5205next; -static void pcktgal_adpcm_int(running_device *device) +static void pcktgal_adpcm_int(device_t *device) { static int toggle; diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c index 2a34a670f89..e650265b5fd 100644 --- a/src/mame/drivers/pcxt.c +++ b/src/mame/drivers/pcxt.c @@ -316,11 +316,11 @@ static WRITE8_HANDLER( vga_vram_w ) /*end of Video HW file*/ static struct { - running_device *pit8253; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8253; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } filetto_devices; @@ -454,8 +454,8 @@ static READ8_DEVICE_HANDLER( port_c_r ) static WRITE8_DEVICE_HANDLER( port_b_w ) { port_b_data = data; -// running_device *beep = device->machine->device("beep"); -// running_device *cvsd = device->machine->device("cvsd"); +// device_t *beep = device->machine->device("beep"); +// device_t *cvsd = device->machine->device("cvsd"); // hc55516_digit_w(cvsd, data); // popmessage("%02x\n",data); // beep_set_state(beep, 0); @@ -617,7 +617,7 @@ static WRITE8_HANDLER(dma_page_select_w) } } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 05206a7953e..08c8d6f4092 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -321,10 +321,10 @@ static WRITE8_DEVICE_HANDLER( peplus_crtc_mode_w ) static TIMER_CALLBACK(assert_lp_cb) { - mc6845_assert_light_pen_input((running_device *) ptr); + mc6845_assert_light_pen_input((device_t *) ptr); } -static void handle_lightpen( running_device *device ) +static void handle_lightpen( device_t *device ) { int x_val = input_port_read_safe(device->machine, "TOUCH_X",0x00); int y_val = input_port_read_safe(device->machine, "TOUCH_Y",0x00); diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index c5a4c9c68b9..02c5ede7bf4 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -483,7 +483,7 @@ static WRITE8_HANDLER( z80_l3_w ) soundlatch3_w(space, 0, data); } -static void sound_irq( running_device *device, int level ) +static void sound_irq( device_t *device, int level ) { pgm_state *state = device->machine->driver_data(); cpu_set_input_line(state->soundcpu, 0, level); diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index 0628aa5e09c..0e8e300ba88 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -192,7 +192,7 @@ static READ8_HANDLER(photon2_fe_r) static WRITE8_HANDLER(photon2_fe_w) { - running_device *speaker = space->machine->device("speaker"); + device_t *speaker = space->machine->device("speaker"); spectrum_port_fe = data; speaker_level_w(speaker, BIT(data,4)); diff --git a/src/mame/drivers/photoply.c b/src/mame/drivers/photoply.c index 6151d0d7b70..299a8af5a00 100644 --- a/src/mame/drivers/photoply.c +++ b/src/mame/drivers/photoply.c @@ -103,11 +103,11 @@ static VIDEO_UPDATE(photoply) } static struct { - running_device *pit8253; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8253; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } photoply_devices; /****************** @@ -188,7 +188,7 @@ static WRITE8_HANDLER(dma_page_select_w) } } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c index 189e6a4b95f..2ab033c51be 100644 --- a/src/mame/drivers/pipedrm.c +++ b/src/mame/drivers/pipedrm.c @@ -556,7 +556,7 @@ GFXDECODE_END * *************************************/ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { fromance_state *state = device->machine->driver_data(); cpu_set_input_line(state->subcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c index fffab4019e0..444cf7d0a49 100644 --- a/src/mame/drivers/pkscram.c +++ b/src/mame/drivers/pkscram.c @@ -243,7 +243,7 @@ static GFXDECODE_START( pkscram ) GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 0x80 ) GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { if(out & 0x10) cputag_set_input_line(device->machine, "maincpu", 2, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 2ea0a9281ca..bf1f046795c 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -360,7 +360,7 @@ DIRECT_UPDATE_HANDLER( plygonet_dsp56k_direct_handler ) bit 0002 turns on *just* before this happens. */ -static UINT8 dsp56k_bank_group(running_device* cpu) +static UINT8 dsp56k_bank_group(device_t* cpu) { UINT16 portC = dsp56k_get_peripheral_memory(cpu, 0xffe3); @@ -373,7 +373,7 @@ static UINT8 dsp56k_bank_group(running_device* cpu) return INVALID_BANK_GROUP; } -static UINT8 dsp56k_bank_num(running_device* cpu, UINT8 bank_group) +static UINT8 dsp56k_bank_num(device_t* cpu, UINT8 bank_group) { UINT16 portC = dsp56k_get_peripheral_memory(cpu, 0xffe3); diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index 5dc4ad792f3..a358f4f3c74 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -155,7 +155,7 @@ static WRITE32_HANDLER( control_w ) /* handle EEPROM I/O */ if (ACCESSING_BITS_16_23) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); eeprom_write_bit(device, data & 0x00800000); eeprom_set_cs_line(device, (data & 0x00200000) ? CLEAR_LINE : ASSERT_LINE); eeprom_set_clock_line(device, (data & 0x00400000) ? ASSERT_LINE : CLEAR_LINE); @@ -164,7 +164,7 @@ static WRITE32_HANDLER( control_w ) /* toggling BSMT off then on causes a reset */ if (!(old & 0x80000000) && (control_data & 0x80000000)) { - running_device *device = space->machine->device("bsmt"); + device_t *device = space->machine->device("bsmt"); bsmt2000_data_w(device, bsmt_data_bank, 0, 0xffff); device->reset(); } diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c index 3aa8d036afc..1c7f94ff053 100644 --- a/src/mame/drivers/powerins.c +++ b/src/mame/drivers/powerins.c @@ -318,7 +318,7 @@ static MACHINE_RESET( powerins ) oki_bank = -1; // samples bank "unitialised" } -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/prehisle.c b/src/mame/drivers/prehisle.c index fdb6dee191f..d89636b2461 100644 --- a/src/mame/drivers/prehisle.c +++ b/src/mame/drivers/prehisle.c @@ -191,7 +191,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c index 9ff00e2dbcf..22e67388f2c 100644 --- a/src/mame/drivers/psikyo.c +++ b/src/mame/drivers/psikyo.c @@ -391,7 +391,7 @@ ADDRESS_MAP_END ***************************************************************************/ -static void sound_irq( running_device *device, int irq ) +static void sound_irq( device_t *device, int irq ) { psikyo_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); @@ -1192,7 +1192,7 @@ MACHINE_CONFIG_END ***************************************************************************/ -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { psikyo_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, linestate ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index ce7efa3449e..5860d6cd872 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -685,7 +685,7 @@ static INPUT_PORTS_START( hotdebut ) INPUT_PORTS_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { psikyo4_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, 12, linestate ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index 5eb8f2112fa..36304ddb410 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -786,7 +786,7 @@ static INPUT_PORTS_START( mjgtaste ) INPUT_PORTS_END -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { psikyosh_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, 12, linestate ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c index 7d815a1db67..3f60b42a08a 100644 --- a/src/mame/drivers/psychic5.c +++ b/src/mame/drivers/psychic5.c @@ -641,7 +641,7 @@ GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c index c8efe34bd4c..d89bea182aa 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -401,7 +401,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { pushman_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c index fdd44c76e46..de224b4d2f7 100644 --- a/src/mame/drivers/qdrmfgp.c +++ b/src/mame/drivers/qdrmfgp.c @@ -82,7 +82,7 @@ static WRITE16_HANDLER( gp_control_w ) int vol = state->m_nvram[0x10] & 0xff; if (vol) { - running_device *k054539 = space->machine->device("konami"); + device_t *k054539 = space->machine->device("konami"); int i; double gain = vol / 90.0; @@ -113,7 +113,7 @@ static WRITE16_HANDLER( gp2_control_w ) int vol = state->m_nvram[0x8] & 0xff; if (vol) { - running_device *k054539 = space->machine->device("konami"); + device_t *k054539 = space->machine->device("konami"); int i; double gain = vol / 90.0; @@ -126,7 +126,7 @@ static WRITE16_HANDLER( gp2_control_w ) static READ16_HANDLER( v_rom_r ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); UINT8 *mem8 = memory_region(space->machine, "gfx1"); int bank = k056832_word_r(k056832, 0x34/2, 0xffff); @@ -141,7 +141,7 @@ static READ16_HANDLER( v_rom_r ) static READ16_HANDLER( gp2_vram_r ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); if (offset < 0x1000 / 2) return k056832_ram_word_r(k056832, offset * 2 + 1, mem_mask); @@ -151,7 +151,7 @@ static READ16_HANDLER( gp2_vram_r ) static READ16_HANDLER( gp2_vram_mirror_r ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); if (offset < 0x1000 / 2) return k056832_ram_word_r(k056832, offset * 2, mem_mask); @@ -161,7 +161,7 @@ static READ16_HANDLER( gp2_vram_mirror_r ) static WRITE16_HANDLER( gp2_vram_w ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); if (offset < 0x1000 / 2) k056832_ram_word_w(k056832, offset * 2 + 1, data, mem_mask); @@ -171,7 +171,7 @@ static WRITE16_HANDLER( gp2_vram_w ) static WRITE16_HANDLER( gp2_vram_mirror_w ) { - running_device *k056832 = space->machine->device("k056832"); + device_t *k056832 = space->machine->device("k056832"); if (offset < 0x1000 / 2) k056832_ram_word_w(k056832, offset * 2, data, mem_mask); @@ -238,7 +238,7 @@ static WRITE16_DEVICE_HANDLER( ide_alt_w ) static READ16_HANDLER( gp2_ide_std_r ) { - running_device *device = space->machine->device("ide"); + device_t *device = space->machine->device("ide"); if (offset & 0x01) { if (offset == 0x07) @@ -285,7 +285,7 @@ static INTERRUPT_GEN(qdrmfgp_interrupt) } } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { if (control & 0x0008) { @@ -311,7 +311,7 @@ static INTERRUPT_GEN(qdrmfgp2_interrupt) cpu_set_input_line(device, 4, HOLD_LINE); } -static void gp2_ide_interrupt(running_device *device, int state) +static void gp2_ide_interrupt(device_t *device, int state) { if (control & 0x0010) { @@ -568,7 +568,7 @@ INPUT_PORTS_END * *************************************/ -static void sound_irq(running_device *device) +static void sound_irq(device_t *device) { if (control & 0x0001) cputag_set_input_line(device->machine, "maincpu", 1, HOLD_LINE); diff --git a/src/mame/drivers/quakeat.c b/src/mame/drivers/quakeat.c index 78ef3c1e802..a8f12c6ff2d 100644 --- a/src/mame/drivers/quakeat.c +++ b/src/mame/drivers/quakeat.c @@ -72,8 +72,8 @@ static VIDEO_UPDATE(quake) } static struct { - running_device *pic8259_1; - running_device *pic8259_2; + device_t *pic8259_1; + device_t *pic8259_2; } quakeat_devices; static ADDRESS_MAP_START( quake_map, ADDRESS_SPACE_PROGRAM, 32 ) diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index d9a58ae5f1b..30dca7eb315 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -74,8 +74,8 @@ static WRITE_LINE_DEVICE_HANDLER( flipscreen_w ); static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq ) { - running_device *pia0 = device->machine->device("pia_main"); - running_device *pia1 = device->machine->device("pia_audio"); + device_t *pia0 = device->machine->device("pia_main"); + device_t *pia1 = device->machine->device("pia_audio"); int combined_state = pia6821_get_irq_a(pia0) | pia6821_get_irq_b(pia0) | pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1); @@ -207,7 +207,7 @@ static const ay8910_interface ay8910_2_interface = static WRITE8_DEVICE_HANDLER( ttl74123_output_changed ) { - running_device *pia = device->machine->device("pia_main"); + device_t *pia = device->machine->device("pia_main"); pia6821_ca1_w(pia, data); ttl74123_output = data; } @@ -384,7 +384,7 @@ static const mc6845_interface mc6845_intf = static VIDEO_UPDATE( r2dtank ) { - running_device *mc6845 = screen->machine->device("crtc"); + device_t *mc6845 = screen->machine->device("crtc"); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c index cd1b1757558..9018b5a8aec 100644 --- a/src/mame/drivers/rainbow.c +++ b/src/mame/drivers/rainbow.c @@ -626,7 +626,7 @@ GFXDECODE_END /* handler called by the YM2151 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { rainbow_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c index 03a8370dc39..40fd1c0e6d8 100644 --- a/src/mame/drivers/rastan.c +++ b/src/mame/drivers/rastan.c @@ -172,7 +172,7 @@ static WRITE8_DEVICE_HANDLER( rastan_bankswitch_w ) } -static void rastan_msm5205_vck( running_device *device ) +static void rastan_msm5205_vck( device_t *device ) { rastan_state *state = device->machine->driver_data(); if (state->adpcm_data != -1) @@ -344,7 +344,7 @@ GFXDECODE_END /* handler called by the YM2151 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { rastan_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index 5b24e07742e..a74acb3b895 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -900,7 +900,7 @@ GFXDECODE_END /* handler called by the 3526 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", M6809_FIRQ_LINE, linestate); } diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c index 2331baf1213..79f5b4b4d71 100644 --- a/src/mame/drivers/rohga.c +++ b/src/mame/drivers/rohga.c @@ -720,7 +720,7 @@ GFXDECODE_END /**********************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { rohga_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 9e440d26317..8bddad36823 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -1126,7 +1126,7 @@ static READ8_HANDLER( mjvegasa_rom_io_r ) case 0x800e: case 0x800f: { - running_device *rtc = space->machine->device("rtc"); + device_t *rtc = space->machine->device("rtc"); return msm6242_r(rtc, offset-0x8000); } } @@ -1165,7 +1165,7 @@ static WRITE8_HANDLER( mjvegasa_rom_io_w ) case 0x800e: case 0x800f: { - running_device *rtc = space->machine->device("rtc"); + device_t *rtc = space->machine->device("rtc"); msm6242_w(rtc, offset-0x8000, data); return; } diff --git a/src/mame/drivers/rpunch.c b/src/mame/drivers/rpunch.c index f5bcdf71cdd..d42ce653c32 100644 --- a/src/mame/drivers/rpunch.c +++ b/src/mame/drivers/rpunch.c @@ -129,7 +129,7 @@ static UINT8 upd_rom_bank; * *************************************/ -static void ym2151_irq_gen(running_device *device, int state) +static void ym2151_irq_gen(device_t *device, int state) { ym2151_irq = state; cputag_set_input_line(device->machine, "audiocpu", 0, (ym2151_irq | sound_busy) ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/safarir.c b/src/mame/drivers/safarir.c index dfb09d67a39..eb04124fffb 100644 --- a/src/mame/drivers/safarir.c +++ b/src/mame/drivers/safarir.c @@ -64,7 +64,7 @@ public: UINT8 *bg_scroll; UINT8 port_last; UINT8 port_last2; - running_device *samples; + device_t *samples; }; @@ -233,7 +233,7 @@ static VIDEO_UPDATE( safarir ) static WRITE8_HANDLER( safarir_audio_w ) { safarir_state *state = space->machine->driver_data(); - running_device *samples = state->samples; + device_t *samples = state->samples; UINT8 rising_bits = data & ~state->port_last; if (rising_bits == 0x12) sample_start(samples, CHANNEL_SOUND1, SAMPLE_SOUND1_1, 0); diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c index cbe90601eec..9e4028a3add 100644 --- a/src/mame/drivers/sandscrp.c +++ b/src/mame/drivers/sandscrp.c @@ -121,7 +121,7 @@ static INTERRUPT_GEN( sandscrp_interrupt ) static VIDEO_EOF( sandscrp ) { - running_device *pandora = machine->device("pandora"); + device_t *pandora = machine->device("pandora"); sprite_irq = 1; update_irq_state(machine); pandora_eof(pandora); @@ -412,7 +412,7 @@ GFXDECODE_END /* YM3014B + YM2203C */ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c index a06e186960c..1c06bf6477d 100644 --- a/src/mame/drivers/seattle.c +++ b/src/mame/drivers/seattle.c @@ -445,7 +445,7 @@ static UINT32 *rombase; static galileo_data galileo; static widget_data widget; -static running_device *voodoo; +static device_t *voodoo; static UINT8 voodoo_stalled; static UINT8 cpu_stalled_on_voodoo; static UINT32 cpu_stalled_offset; @@ -478,12 +478,12 @@ static UINT32 cmos_write_enabled; * *************************************/ -static void vblank_assert(running_device *device, int state); +static void vblank_assert(device_t *device, int state); static void update_vblank_irq(running_machine *machine); static void galileo_reset(void); static TIMER_CALLBACK( galileo_timer_callback ); static void galileo_perform_dma(address_space *space, int which); -static void voodoo_stall(running_device *device, int stall); +static void voodoo_stall(device_t *device, int stall); static void widget_reset(running_machine *machine); static void update_widget_irq(running_machine *machine); @@ -593,7 +593,7 @@ static MACHINE_RESET( seattle ) * *************************************/ -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { cputag_set_input_line(device->machine, "maincpu", IDE_IRQ_NUM, state); } @@ -619,7 +619,7 @@ static void ethernet_interrupt_machine(running_machine *machine, int state) update_widget_irq(machine); } -static void ethernet_interrupt(running_device *device, int state) +static void ethernet_interrupt(device_t *device, int state) { ethernet_interrupt_machine(device->machine, state); } @@ -749,7 +749,7 @@ static WRITE32_HANDLER( vblank_clear_w ) } -static void vblank_assert(running_device *device, int state) +static void vblank_assert(device_t *device, int state) { /* cache the raw state */ vblank_state = state; @@ -1330,7 +1330,7 @@ static WRITE32_HANDLER( seattle_voodoo_w ) } -static void voodoo_stall(running_device *device, int stall) +static void voodoo_stall(device_t *device, int stall) { /* set the new state */ voodoo_stalled = stall; @@ -2787,7 +2787,7 @@ ROM_END static void init_common(running_machine *machine, int ioasic, int serialnum, int yearoffs, int config) { - running_device *device; + device_t *device; /* initialize the subsystems */ midway_ioasic_init(machine, ioasic, serialnum, yearoffs, ioasic_irq); diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c index c0447261ab4..040f8bef4fc 100644 --- a/src/mame/drivers/segac2.c +++ b/src/mame/drivers/segac2.c @@ -430,7 +430,7 @@ static WRITE16_HANDLER( io_chip_w ) } if (sound_banks > 1) { - running_device *upd = space->machine->device("upd"); + device_t *upd = space->machine->device("upd"); newbank = (data >> 2) & (sound_banks - 1); upd7759_set_bank_base(upd, newbank * 0x20000); } @@ -440,7 +440,7 @@ static WRITE16_HANDLER( io_chip_w ) case 0x1c/2: if (sound_banks > 1) { - running_device *upd = space->machine->device("upd"); + device_t *upd = space->machine->device("upd"); upd7759_reset_w(upd, (data >> 1) & 1); } break; @@ -1314,7 +1314,7 @@ INPUT_PORTS_END Sound interfaces ******************************************************************************/ -static void segac2_irq2_interrupt(running_device *device, int state) +static void segac2_irq2_interrupt(device_t *device, int state) { //printf("sound irq %d\n", state); cputag_set_input_line(device->machine, "maincpu", 2, state ? ASSERT_LINE : CLEAR_LINE); @@ -1834,7 +1834,7 @@ it should be, otherwise I don't see how the formula could be computed. static void segac2_common_init(running_machine* machine, int (*func)(int in)) { - running_device *upd = machine->device("upd"); + device_t *upd = machine->device("upd"); DRIVER_INIT_CALL( megadriv_c2 ); diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index 4c6ea835b75..a16e392c874 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -364,8 +364,8 @@ static void init_ports_systeme(running_machine *machine) /* INIT THE PORTS *********************************************************************************************/ address_space *io = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO); - running_device *sn1 = machine->device("sn1"); - running_device *sn2 = machine->device("sn2"); + device_t *sn1 = machine->device("sn1"); + device_t *sn2 = machine->device("sn2"); memory_install_write8_device_handler(io, sn2, 0x7b, 0x7b, 0, 0, sn76496_w); memory_install_write8_device_handler(io, sn1, 0x7e, 0x7f, 0, 0, sn76496_w); diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c index 52a2f96355f..df09fbf26c5 100644 --- a/src/mame/drivers/segag80v.c +++ b/src/mame/drivers/segag80v.c @@ -1359,7 +1359,7 @@ static DRIVER_INIT( spacfury ) static DRIVER_INIT( zektor ) { address_space *iospace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO); - running_device *ay = machine->device("aysnd"); + device_t *ay = machine->device("aysnd"); /* configure security */ sega_security(82); diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c index e7f89cc5242..3a7e24c3db2 100644 --- a/src/mame/drivers/segahang.c +++ b/src/mame/drivers/segahang.c @@ -400,7 +400,7 @@ static void sharrier_i8751_sim(running_machine *machine) * *************************************/ -static void sound_irq(running_device *device, int irq) +static void sound_irq(device_t *device, int irq) { segas1x_state *state = device->machine->driver_data(); cpu_set_input_line(state->soundcpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c index 4ecf70c2560..9a10865afba 100644 --- a/src/mame/drivers/segald.c +++ b/src/mame/drivers/segald.c @@ -37,7 +37,7 @@ public: UINT8* fix_RAM; UINT8* out_RAM; - running_device *laserdisc; + device_t *laserdisc; UINT8 ldv1000_input_latch; UINT8 ldv1000_output_latch; diff --git a/src/mame/drivers/segamsys.c b/src/mame/drivers/segamsys.c index 4322cd3327d..bb7050c7299 100644 --- a/src/mame/drivers/segamsys.c +++ b/src/mame/drivers/segamsys.c @@ -1644,7 +1644,7 @@ static void megatech_set_genz80_as_sms_standard_ports(running_machine *machine, /* INIT THE PORTS *********************************************************************************************/ address_space *io = cputag_get_address_space(machine, tag, ADDRESS_SPACE_IO); - running_device *sn = machine->device("snsnd"); + device_t *sn = machine->device("snsnd"); memory_install_readwrite8_handler(io, 0x0000, 0xffff, 0, 0, z80_unmapped_port_r, z80_unmapped_port_w); diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index 29cf665a21d..5a6588bbccf 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -516,7 +516,7 @@ static TIMER_CALLBACK( scanline_callback ) * *************************************/ -static void outrun_reset(running_device *device) +static void outrun_reset(device_t *device) { segas1x_state *state = device->machine->driver_data(); cpu_set_input_line(state->subcpu, INPUT_LINE_RESET, PULSE_LINE); diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c index a54f6bdf635..8e2f83f3431 100644 --- a/src/mame/drivers/segas16b.c +++ b/src/mame/drivers/segas16b.c @@ -1386,7 +1386,7 @@ static READ8_DEVICE_HANDLER( upd7759_status_r ) } -static void upd7759_generate_nmi(running_device *device, int state) +static void upd7759_generate_nmi(device_t *device, int state) { segas1x_state *driver = device->machine->driver_data(); diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c index 7016ad4f860..d39212526f8 100644 --- a/src/mame/drivers/segas24.c +++ b/src/mame/drivers/segas24.c @@ -935,7 +935,7 @@ static INTERRUPT_GEN(irq_vbl) } } -static void irq_ym(running_device *device, int irq) +static void irq_ym(device_t *device, int irq) { irq_yms = irq; cputag_set_input_line(device->machine, "maincpu", IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c index cea96f01bef..5d84219d803 100644 --- a/src/mame/drivers/segas32.c +++ b/src/mame/drivers/segas32.c @@ -410,7 +410,7 @@ static UINT8 sonic_last[6]; typedef void (*sys32_output_callback)(int which, UINT16 data); static sys32_output_callback segas32_sw1_output, segas32_sw2_output, segas32_sw3_output; -static void (*system32_prot_vblank)(running_device *device); +static void (*system32_prot_vblank)(device_t *device); /************************************* @@ -1147,7 +1147,7 @@ static WRITE8_HANDLER( sound_int_control_hi_w ) } -static void ym3438_irq_handler(running_device *device, int state) +static void ym3438_irq_handler(device_t *device, int state) { if (state) signal_sound_irq(device->machine, SOUND_IRQ_YM3438); diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index de6de85155d..069f5186d3f 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -392,7 +392,7 @@ static void sound_data_w(running_machine *machine, UINT8 data) } -static void sound_cpu_irq(running_device *device, int state) +static void sound_cpu_irq(device_t *device, int state) { segas1x_state *driver = device->machine->driver_data(); @@ -416,7 +416,7 @@ static READ8_HANDLER( sound_data_r ) * *************************************/ -static void xboard_reset(running_device *device) +static void xboard_reset(device_t *device) { segas1x_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c index 8271db144fb..6cd5c09a3c1 100644 --- a/src/mame/drivers/segaybd.c +++ b/src/mame/drivers/segaybd.c @@ -224,7 +224,7 @@ static MACHINE_RESET( yboard ) * *************************************/ -static void sound_cpu_irq(running_device *device, int state) +static void sound_cpu_irq(device_t *device, int state) { segas1x_state *driver = device->machine->driver_data(); diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index efac4e80497..6d4bae8739f 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -1109,7 +1109,7 @@ static WRITE8_DEVICE_HANDLER( flashrom_write ) } } -static void irqhandler(running_device *device, int state) +static void irqhandler(device_t *device, int state) { if (state) cputag_set_input_line_and_vector(device->machine, "soundcpu", 0, ASSERT_LINE, 0xd7); // IRQ is RST10 diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index fa9cbd71638..ed3397e92d1 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1326,7 +1326,7 @@ Note: on screen copyright is (c)1998 Coinmaster. /*------------------------------ update timer ------------------------------*/ -static void uPD71054_update_timer( running_machine *machine, running_device *cpu, int no ) +static void uPD71054_update_timer( running_machine *machine, device_t *cpu, int no ) { seta_state *state = machine->driver_data(); uPD71054_state *uPD71054 = &state->uPD71054; @@ -1435,7 +1435,7 @@ static const x1_010_interface seta_sound_intf2 = 0x1000, /* address */ }; -static void utoukond_ym3438_interrupt(running_device *device, int linestate) +static void utoukond_ym3438_interrupt(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, linestate); } diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 230c6220b79..51a3272de2a 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -787,7 +787,7 @@ GFXDECODE_END -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { sf_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c index 96ca985fe6a..29a987949da 100644 --- a/src/mame/drivers/sfkick.c +++ b/src/mame/drivers/sfkick.c @@ -442,7 +442,7 @@ static INTERRUPT_GEN( sfkick_interrupt ) { v9938_interrupt(device->machine, 0); } -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line_and_vector(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE, 0xff); } diff --git a/src/mame/drivers/shadfrce.c b/src/mame/drivers/shadfrce.c index 358e7c36574..bc298bc5d86 100644 --- a/src/mame/drivers/shadfrce.c +++ b/src/mame/drivers/shadfrce.c @@ -546,7 +546,7 @@ GFXDECODE_END /* Machine Driver Bits */ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE ); } diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c index c170dee2a3e..6b6d5a98850 100644 --- a/src/mame/drivers/shangha3.c +++ b/src/mame/drivers/shangha3.c @@ -456,7 +456,7 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, linestate); } diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 32eedde57dd..735e7b1fbf2 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -63,7 +63,7 @@ static VIDEO_START( shanghai ) static VIDEO_UPDATE( shanghai ) { - running_device *hd63484 = screen->machine->device("hd63484"); + device_t *hd63484 = screen->machine->device("hd63484"); int x, y, b, src; b = ((hd63484_regs_r(hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(hd63484, 0xce/2, 0xffff); diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c index 38142cf8fcb..63cdc084087 100644 --- a/src/mame/drivers/shootout.c +++ b/src/mame/drivers/shootout.c @@ -227,12 +227,12 @@ static GFXDECODE_START( shootout ) GFXDECODE_ENTRY( "gfx3", 0, tile_layout, 0, 16 ) /* tiles */ GFXDECODE_END -static void shootout_snd_irq(running_device *device, int linestate) +static void shootout_snd_irq(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } -static void shootout_snd2_irq(running_device *device, int linestate) +static void shootout_snd2_irq(device_t *device, int linestate) { cputag_set_input_line(device->machine, "maincpu", 0, linestate); } diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index 1defba66ccc..a44acab8701 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -632,7 +632,7 @@ static GFXDECODE_START( turtship ) GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/sidepckt.c b/src/mame/drivers/sidepckt.c index edfbca284a5..ddb7b531a1e 100644 --- a/src/mame/drivers/sidepckt.c +++ b/src/mame/drivers/sidepckt.c @@ -247,7 +247,7 @@ GFXDECODE_END /* handler called by the 3526 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c index f4557ec4a2b..2e17fd5d949 100644 --- a/src/mame/drivers/sigmab52.c +++ b/src/mame/drivers/sigmab52.c @@ -146,7 +146,7 @@ static VIDEO_START( jwildb52 ) static VIDEO_UPDATE( jwildb52 ) { - running_device *hd63484 = screen->machine->device("hd63484"); + device_t *hd63484 = screen->machine->device("hd63484"); int x, y, b, src; @@ -226,7 +226,7 @@ static WRITE8_HANDLER(acrtc_w) { static int latch=0; static unsigned int acrtc_data=0; - running_device *hd63484 = space->machine->device("hd63484"); + device_t *hd63484 = space->machine->device("hd63484"); if(!offset) { //address select @@ -257,7 +257,7 @@ static READ8_HANDLER(acrtc_r) { if(offset&1) { - running_device *hd63484 = space->machine->device("hd63484"); + device_t *hd63484 = space->machine->device("hd63484"); return hd63484_data_r(hd63484, 0, 0xff); } @@ -548,7 +548,7 @@ static MACHINE_START(jwildb52) UINT16 *rom = (UINT16*)memory_region(machine, "gfx1"); int i; - running_device *hd63484 = machine->device("hd63484"); + device_t *hd63484 = machine->device("hd63484"); for(i = 0; i < 0x40000/2; ++i) { diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c index b0096ab9200..3ec7ac060c4 100644 --- a/src/mame/drivers/skeetsht.c +++ b/src/mame/drivers/skeetsht.c @@ -28,8 +28,8 @@ public: UINT8 ay_sel; UINT8 lastdataw; UINT16 lastdatar; - running_device *ay; - running_device *tms; + device_t *ay; + device_t *tms; }; @@ -102,7 +102,7 @@ static WRITE16_HANDLER( ramdac_w ) * *************************************/ -static void skeetsht_tms_irq(running_device *device, int state) +static void skeetsht_tms_irq(device_t *device, int state) { cputag_set_input_line(device->machine, "68hc11", MC68HC11_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index 5114cb46f6f..957c115a877 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -274,7 +274,7 @@ static WRITE32_HANDLER( skimaxx_sub_ctrl_w ) // 7e/7f at the start. 3f/7f, related to reads from 1018xxxx if (ACCESSING_BITS_0_7) { - running_device *subcpu = space->machine->device("subcpu"); + device_t *subcpu = space->machine->device("subcpu"); cpu_set_input_line(subcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); cpu_set_input_line(subcpu, INPUT_LINE_HALT, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); @@ -468,7 +468,7 @@ INPUT_PORTS_END * *************************************/ -static void skimaxx_tms_irq(running_device *device, int state) +static void skimaxx_tms_irq(device_t *device, int state) { // TODO } diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c index f16f4a710a4..834591ba2c4 100644 --- a/src/mame/drivers/skydiver.c +++ b/src/mame/drivers/skydiver.c @@ -147,7 +147,7 @@ static WRITE8_HANDLER( skydiver_nmion_w ) static INTERRUPT_GEN( skydiver_interrupt ) { - running_device *discrete = device->machine->device("discrete"); + device_t *discrete = device->machine->device("discrete"); /* Convert range data to divide value and write to sound */ discrete_sound_w(discrete, SKYDIVER_RANGE_DATA, (0x01 << (~skydiver_videoram[0x394] & 0x07)) & 0xff); // Range 0-2 diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c index 469b53dad03..991641d282b 100644 --- a/src/mame/drivers/slapshot.c +++ b/src/mame/drivers/slapshot.c @@ -490,7 +490,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { slapshot_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index 47e5cf5ce87..dc7d35fc7bf 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -525,7 +525,7 @@ GFXDECODE_END static VIDEO_UPDATE( slotcarn ) { - running_device *mc6845 = screen->machine->device("crtc"); + device_t *mc6845 = screen->machine->device("crtc"); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c index 678f1ae20a1..f056c2be250 100644 --- a/src/mame/drivers/snk.c +++ b/src/mame/drivers/snk.c @@ -457,13 +457,13 @@ static TIMER_CALLBACK( sndirq_update_callback ) -static void ymirq_callback_1(running_device *device, int irq) +static void ymirq_callback_1(device_t *device, int irq) { if (irq) timer_call_after_resynch(device->machine, NULL, YM1IRQ_ASSERT, sndirq_update_callback); } -static void ymirq_callback_2(running_device *device, int irq) +static void ymirq_callback_2(device_t *device, int irq) { if (irq) timer_call_after_resynch(device->machine, NULL, YM2IRQ_ASSERT, sndirq_update_callback); diff --git a/src/mame/drivers/snk68.c b/src/mame/drivers/snk68.c index b37e6f94b87..c444d32a3fe 100644 --- a/src/mame/drivers/snk68.c +++ b/src/mame/drivers/snk68.c @@ -578,7 +578,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index 9865523e6d8..6b4b8f5c612 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -82,7 +82,7 @@ static WRITE16_HANDLER( snowbros_flipscreen_w ) static VIDEO_UPDATE( snowbros ) { - running_device *pandora = screen->machine->device("pandora"); + device_t *pandora = screen->machine->device("pandora"); /* This clears & redraws the entire screen each pass */ bitmap_fill(bitmap,cliprect,0xf0); @@ -93,7 +93,7 @@ static VIDEO_UPDATE( snowbros ) static VIDEO_EOF( snowbros ) { - running_device *pandora = machine->device("pandora"); + device_t *pandora = machine->device("pandora"); pandora_eof(pandora); } @@ -1401,7 +1401,7 @@ static GFXDECODE_START( hyperpac ) GFXDECODE_END /* handler called by the 3812/2151 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c index 7ee4fbe851a..c30f6c6b6a2 100644 --- a/src/mame/drivers/sothello.c +++ b/src/mame/drivers/sothello.c @@ -290,7 +290,7 @@ static INPUT_PORTS_START( sothello ) INPUT_PORTS_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "sub", 0, irq ? ASSERT_LINE : CLEAR_LINE); } @@ -305,7 +305,7 @@ static INTERRUPT_GEN( sothello_interrupt ) v9938_interrupt(device->machine, 0); } -static void adpcm_int(running_device *device) +static void adpcm_int(device_t *device) { /* only 4 bits are used */ msm5205_data_w( device, msm_data & 0x0f ); diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index 3c354f0646a..bfbfa22b377 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -323,7 +323,7 @@ static GFXDECODE_START( spbactn ) GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 0x0000, 16 + 384 ) GFXDECODE_END -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/spdodgeb.c b/src/mame/drivers/spdodgeb.c index 251ea49698e..04deebff802 100644 --- a/src/mame/drivers/spdodgeb.c +++ b/src/mame/drivers/spdodgeb.c @@ -51,7 +51,7 @@ static WRITE8_HANDLER( sound_command_w ) static WRITE8_HANDLER( spd_adpcm_w ) { int chip = offset & 1; - running_device *adpcm = space->machine->device((chip == 0) ? "msm1" : "msm2"); + device_t *adpcm = space->machine->device((chip == 0) ? "msm1" : "msm2"); switch (offset/2) { @@ -75,7 +75,7 @@ static WRITE8_HANDLER( spd_adpcm_w ) } } -static void spd_adpcm_int(running_device *device) +static void spd_adpcm_int(device_t *device) { int chip = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; if (adpcm_pos[chip] >= adpcm_end[chip] || adpcm_pos[chip] >= 0x10000) @@ -390,7 +390,7 @@ static GFXDECODE_START( spdodgeb ) GFXDECODE_END -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c index 11e2773316b..fd1a6a9ce62 100644 --- a/src/mame/drivers/spiders.c +++ b/src/mame/drivers/spiders.c @@ -232,9 +232,9 @@ static READ8_DEVICE_HANDLER( gfx_rom_r ); static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq ) { - running_device *pia1 = device->machine->device("pia1"); - running_device *pia2 = device->machine->device("pia2"); - running_device *pia3 = device->machine->device("pia3"); + device_t *pia1 = device->machine->device("pia1"); + device_t *pia2 = device->machine->device("pia2"); + device_t *pia3 = device->machine->device("pia3"); int combined_state = pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1) | pia6821_get_irq_b(pia2) | pia6821_get_irq_a(pia3) | pia6821_get_irq_b(pia3); @@ -280,7 +280,7 @@ static const pia6821_interface pia_1_intf = static INTERRUPT_GEN( update_pia_1 ) { - running_device *pia1 = device->machine->device("pia1"); + device_t *pia1 = device->machine->device("pia1"); /* update the different PIA pins from the input ports */ /* CA1 - copy of PA1 (COIN1) */ @@ -383,7 +383,7 @@ static const pia6821_interface pia_4_intf = static WRITE8_DEVICE_HANDLER( ic60_74123_output_changed) { - running_device *pia2 = device->machine->device("pia2"); + device_t *pia2 = device->machine->device("pia2"); pia6821_ca1_w(pia2, data); } @@ -531,7 +531,7 @@ static const mc6845_interface mc6845_intf = static VIDEO_UPDATE( spiders ) { - running_device *mc6845 = screen->machine->device("crtc"); + device_t *mc6845 = screen->machine->device("crtc"); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index eb178d26f58..99554324f49 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -112,7 +112,7 @@ static WRITE8_HANDLER( splash_adpcm_data_w ) state->adpcm_data = data; } -static void splash_msm5205_int(running_device *device) +static void splash_msm5205_int(device_t *device) { splash_state *state = device->machine->driver_data(); @@ -420,7 +420,7 @@ static MACHINE_CONFIG_START( splash, splash_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MACHINE_CONFIG_END -static void ym_irq(running_device *device, int state) +static void ym_irq(device_t *device, int state) { logerror("2203 IRQ: %d\n", state); } diff --git a/src/mame/drivers/sprint2.c b/src/mame/drivers/sprint2.c index 126a12bef47..d730e14b73f 100644 --- a/src/mame/drivers/sprint2.c +++ b/src/mame/drivers/sprint2.c @@ -71,7 +71,7 @@ static int service_mode(running_machine *machine) static INTERRUPT_GEN( sprint2 ) { - running_device *discrete = device->machine->device("discrete"); + device_t *discrete = device->machine->device("discrete"); static UINT8 dial[2]; /* handle steering wheels */ diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index 7a0c131b44d..53c162c977e 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -466,7 +466,7 @@ INPUT_PORTS_END -static void volume_callback( running_device *device, int v ) +static void volume_callback( device_t *device, int v ) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); @@ -478,7 +478,7 @@ static const k007232_interface spy_k007232_interface = }; -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { spy_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, linestate); diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index 7fe02b97a17..668cb8941fc 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -221,7 +221,7 @@ static WRITE8_DEVICE_HANDLER( srmp3_adpcm_code_w ) } -static void srmp2_adpcm_int(running_device *device) +static void srmp2_adpcm_int(device_t *device) { srmp2_state *state = device->machine->driver_data(); UINT8 *ROM = memory_region(device->machine, "adpcm"); diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c index d53e8de9cc2..37fb6eddc11 100644 --- a/src/mame/drivers/sshangha.c +++ b/src/mame/drivers/sshangha.c @@ -327,7 +327,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int state) +static void irqhandler(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", 0, state); } diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c index eda77fa37fc..4afc8e45b00 100644 --- a/src/mame/drivers/ssingles.c +++ b/src/mame/drivers/ssingles.c @@ -256,7 +256,7 @@ static VIDEO_START(ssingles) static VIDEO_UPDATE( ssingles ) { - running_device *mc6845 = screen->machine->device("crtc"); + device_t *mc6845 = screen->machine->device("crtc"); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c index 0d3a1c48c08..f2bdb170c76 100644 --- a/src/mame/drivers/sslam.c +++ b/src/mame/drivers/sslam.c @@ -255,7 +255,7 @@ static TIMER_CALLBACK( music_playback ) } -static void sslam_play(running_device *device, int track, int data) +static void sslam_play(device_t *device, int track, int data) { sslam_state *state = device->machine->driver_data(); okim6295_device *oki = downcast(device); diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c index 24bae27dd0a..9dbb26f76a3 100644 --- a/src/mame/drivers/ssv.c +++ b/src/mame/drivers/ssv.c @@ -765,7 +765,7 @@ static WRITE16_HANDLER( srmp7_sound_bank_w ) { if (ACCESSING_BITS_0_7) { - running_device *device = space->machine->device("ensoniq"); + device_t *device = space->machine->device("ensoniq"); int bank = 0x400000/2 * (data & 1); // UINT16 address int voice; for (voice = 0; voice < 32; voice++) diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c index 346a46b97bf..d7b5ef8cb06 100644 --- a/src/mame/drivers/stadhero.c +++ b/src/mame/drivers/stadhero.c @@ -196,7 +196,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index ff489b964c9..80a967c1e51 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -2490,7 +2490,7 @@ static const sh2_cpu_core sh2_conf_slave = { 1, NULL }; static int scsp_last_line = 0; -static void scsp_irq(running_device *device, int irq) +static void scsp_irq(device_t *device, int irq) { // don't bother the 68k if it's off if (!en_68k) diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index f660456b060..850af9d7b03 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -911,7 +911,7 @@ MACHINE_CONFIG_END Best Of Best ***************************************************************************/ -static void bestbest_ym3526_irqhandler(running_device *device, int state) +static void bestbest_ym3526_irqhandler(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_IRQ0, state); } diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index 5dc926143c0..795db1b8df1 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -1463,7 +1463,7 @@ GFXDECODE_END ***************************************************************************/ -static void soundirq(running_device *device, int state) +static void soundirq(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", 0, state); } diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index e21e2090433..e6407c72a30 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -309,7 +309,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { supbtime_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index 4aff99ab3b7..9a97ed0d4ea 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -147,7 +147,7 @@ static WRITE32_HANDLER( superchs_input_w ) if (ACCESSING_BITS_0_7) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); eeprom_set_clock_line(device, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); eeprom_write_bit(device, data & 0x40); eeprom_set_cs_line(device, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c index 3b41be64fc0..595f6227917 100644 --- a/src/mame/drivers/superdq.c +++ b/src/mame/drivers/superdq.c @@ -33,7 +33,7 @@ public: superdq_state(running_machine &machine, const driver_device_config_base &config) : driver_device(machine, config) { } - running_device *laserdisc; + device_t *laserdisc; UINT8 ld_in_latch; UINT8 ld_out_latch; diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c index a42b792f09c..a0c350d99e6 100644 --- a/src/mame/drivers/superqix.c +++ b/src/mame/drivers/superqix.c @@ -130,7 +130,7 @@ static SAMPLES_START( pbillian_sh_start ) static WRITE8_HANDLER( pbillian_sample_trigger_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); int start,end; start = data << 7; diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 77f65c2ad0c..d954c6c431f 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -416,7 +416,7 @@ static WRITE8_DEVICE_HANDLER( suprgolf_writeB ) mame_printf_debug("ymwA\n"); } -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { //cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); } @@ -434,7 +434,7 @@ static const ym2203_interface ym2203_config = irqhandler }; -static void adpcm_int(running_device *device) +static void adpcm_int(device_t *device) { suprgolf_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 4b42c951aee..df1cfebe1f9 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -278,7 +278,7 @@ GFXDECODE_END /*** MORE SOUND **************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { suprslam_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c index b8e036a330d..ce108ae6120 100644 --- a/src/mame/drivers/surpratk.c +++ b/src/mame/drivers/surpratk.c @@ -168,7 +168,7 @@ INPUT_PORTS_END -static void irqhandler( running_device *device, int linestate ) +static void irqhandler( device_t *device, int linestate ) { surpratk_state *state = device->machine->driver_data(); cpu_set_input_line(state->maincpu, KONAMI_FIRQ_LINE, linestate); diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index 1239e906e1d..dd434f70fb7 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -410,7 +410,7 @@ static void bank0c_custom_w(running_machine *machine, UINT8 data, UINT8 prevdata static WRITE8_HANDLER( videomode_w ) { - running_device *i8751 = space->machine->device("mcu"); + device_t *i8751 = space->machine->device("mcu"); /* bit 6 is connected to the 8751 IRQ */ if (i8751 != NULL) @@ -608,7 +608,7 @@ static TIMER_DEVICE_CALLBACK( mcu_t0_callback ) enough, the MCU will fail; on shtngmst this happens after 3 VBLANKs without a tick */ - running_device *mcu = timer.machine->device("mcu"); + device_t *mcu = timer.machine->device("mcu"); cpu_set_input_line(mcu, MCS51_T0_LINE, ASSERT_LINE); cpu_set_input_line(mcu, MCS51_T0_LINE, CLEAR_LINE); } diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index 87fb331082b..c8c4b237a97 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -370,7 +370,7 @@ static WRITE8_HANDLER( tturfbl_msm5205_data_w ) state->sample_buffer = data; } -static void tturfbl_msm5205_callback( running_device *device ) +static void tturfbl_msm5205_callback( device_t *device ) { segas1x_bootleg_state *state = device->machine->driver_data(); msm5205_data_w(device, (state->sample_buffer >> 4) & 0x0f); @@ -1210,7 +1210,7 @@ static WRITE8_HANDLER( shdancbl_msm5205_data_w ) state->sample_buffer = data; } -static void shdancbl_msm5205_callback(running_device *device) +static void shdancbl_msm5205_callback(device_t *device) { segas1x_bootleg_state *state = device->machine->driver_data(); msm5205_data_w(device, state->sample_buffer & 0x0f); @@ -2079,7 +2079,7 @@ static MACHINE_CONFIG_START( system16, segas1x_bootleg_state ) MACHINE_CONFIG_END -static void sound_cause_nmi( running_device *device, int chip ) +static void sound_cause_nmi( device_t *device, int chip ) { segas1x_bootleg_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c index 5e312112b4b..c7228ec27df 100644 --- a/src/mame/drivers/tail2nos.c +++ b/src/mame/drivers/tail2nos.c @@ -178,7 +178,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { tail2nos_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index 8e21ff1b6a1..8bdadded1be 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -2089,7 +2089,7 @@ GFXDECODE_END /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { taitob_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c index 86546abe559..5fd8fbeb787 100644 --- a/src/mame/drivers/taito_f2.c +++ b/src/mame/drivers/taito_f2.c @@ -3136,7 +3136,7 @@ GFXDECODE_END /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irq_handler( running_device *device, int irq ) +static void irq_handler( device_t *device, int irq ) { taitof2_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c index bf167bbb4ef..165968a3a5a 100644 --- a/src/mame/drivers/taito_h.c +++ b/src/mame/drivers/taito_h.c @@ -156,7 +156,7 @@ some kind of zoom table? ***************************************************************************/ /* Handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { taitoh_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c index dcb96bd0816..3e6abd25764 100644 --- a/src/mame/drivers/taito_l.c +++ b/src/mame/drivers/taito_l.c @@ -614,7 +614,7 @@ static WRITE8_HANDLER( mux_ctrl_w ) } -static void champwr_msm5205_vck( running_device *device ) +static void champwr_msm5205_vck( device_t *device ) { taitol_state *state = device->machine->driver_data(); @@ -1940,7 +1940,7 @@ GFXDECODE_END -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { taitol_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c index 3e9b4297348..9e5b8060a60 100644 --- a/src/mame/drivers/taito_x.c +++ b/src/mame/drivers/taito_x.c @@ -872,7 +872,7 @@ GFXDECODE_END /**************************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index 27d736d48d3..43bf9f487b9 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -2802,14 +2802,14 @@ Interface B is for games which lack a Z80 (Spacegun, Bshark). **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { taitoz_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); } /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandlerb(running_device *device, int irq) +static void irqhandlerb(device_t *device, int irq) { // DG: this is probably specific to Z80 and wrong? // taitoz_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index 1ed8d6f97a1..eec7d38fa73 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -569,7 +569,7 @@ GFXDECODE_END ************************************************************/ /* Handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { taitoair_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/taitogn.c b/src/mame/drivers/taitogn.c index 7242448c1a4..280cf667aaf 100644 --- a/src/mame/drivers/taitogn.c +++ b/src/mame/drivers/taitogn.c @@ -601,7 +601,7 @@ static WRITE32_HANDLER(control_w) // selection too, but they're always 0. UINT32 p = state->control; - running_device *mb3773 = space->machine->device("mb3773"); + device_t *mb3773 = space->machine->device("mb3773"); COMBINE_DATA(&state->control); @@ -958,7 +958,7 @@ static ADDRESS_MAP_START( zn_map, ADDRESS_SPACE_PROGRAM, 32 ) ADDRESS_MAP_END -static void psx_spu_irq(running_device *device, UINT32 data) +static void psx_spu_irq(device_t *device, UINT32 data) { psx_irq_set(device->machine, data); } diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c index 9a76413a9f5..b330cf1b420 100644 --- a/src/mame/drivers/taitowlf.c +++ b/src/mame/drivers/taitowlf.c @@ -17,17 +17,17 @@ #include "machine/pckeybrd.h" #include "machine/idectrl.h" -static void ide_interrupt(running_device *device, int state); +static void ide_interrupt(device_t *device, int state); static UINT32 *cga_ram; static UINT32 *bios_ram; static struct { - running_device *pit8254; - running_device *pic8259_1; - running_device *pic8259_2; - running_device *dma8237_1; - running_device *dma8237_2; + device_t *pit8254; + device_t *pic8259_1; + device_t *pic8259_2; + device_t *dma8237_1; + device_t *dma8237_2; } taitowlf_devices; @@ -120,14 +120,14 @@ static WRITE32_DEVICE_HANDLER(at32_dma8237_2_w) // Intel 82439TX System Controller (MXTC) static UINT8 mxtc_config_reg[256]; -static UINT8 mxtc_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 mxtc_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("MXTC: read %d, %02X\n", function, reg); return mxtc_config_reg[reg]; } -static void mxtc_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void mxtc_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:MXTC: write %d, %02X, %02X\n", cpuexec_describe_context(machine), function, reg, data); @@ -160,7 +160,7 @@ static void intel82439tx_init(void) mxtc_config_reg[0x65] = 0x02; } -static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82439tx_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -182,7 +182,7 @@ static UINT32 intel82439tx_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82439tx_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -205,19 +205,19 @@ static void intel82439tx_pci_w(running_device *busdevice, running_device *device // Intel 82371AB PCI-to-ISA / IDE bridge (PIIX4) static UINT8 piix4_config_reg[4][256]; -static UINT8 piix4_config_r(running_device *busdevice, running_device *device, int function, int reg) +static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg) { // mame_printf_debug("PIIX4: read %d, %02X\n", function, reg); return piix4_config_reg[function][reg]; } -static void piix4_config_w(running_device *busdevice, running_device *device, int function, int reg, UINT8 data) +static void piix4_config_w(device_t *busdevice, device_t *device, int function, int reg, UINT8 data) { // mame_printf_debug("%s:PIIX4: write %d, %02X, %02X\n", cpuexec_describe_context(machine), function, reg, data); piix4_config_reg[function][reg] = data; } -static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 intel82371ab_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { UINT32 r = 0; if (ACCESSING_BITS_24_31) @@ -239,7 +239,7 @@ static UINT32 intel82371ab_pci_r(running_device *busdevice, running_device *devi return r; } -static void intel82371ab_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void intel82371ab_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { if (ACCESSING_BITS_24_31) { @@ -651,7 +651,7 @@ static void keyboard_interrupt(running_machine *machine, int state) pic8259_ir1_w(taitowlf_devices.pic8259_1, state); } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { pic8259_ir6_w(taitowlf_devices.pic8259_2, state); } diff --git a/src/mame/drivers/tankbatt.c b/src/mame/drivers/tankbatt.c index 72ac36592de..47e1354cb45 100644 --- a/src/mame/drivers/tankbatt.c +++ b/src/mame/drivers/tankbatt.c @@ -113,14 +113,14 @@ static WRITE8_HANDLER( tankbatt_sh_expl_w ) { if (tankbatt_sound_enable) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); sample_start (samples, 1, 3, 0); } } static WRITE8_HANDLER( tankbatt_sh_engine_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); if (tankbatt_sound_enable) { if (data) @@ -135,7 +135,7 @@ static WRITE8_HANDLER( tankbatt_sh_fire_w ) { if (tankbatt_sound_enable) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); sample_start (samples, 0, 0, 0); } } diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index 9b07a4d69f6..ccd450d964d 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -320,7 +320,7 @@ static GFXDECODE_START( taotaido ) GFXDECODE_ENTRY( "gfx2", 0, taotaido_layout, 0x300, 256 ) /* bg tiles */ GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c index bcacdd36691..c351fa0f03c 100644 --- a/src/mame/drivers/tatsumi.c +++ b/src/mame/drivers/tatsumi.c @@ -827,7 +827,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_IRQ0, state); } @@ -842,7 +842,7 @@ static INTERRUPT_GEN( roundup5_interrupt ) cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0xc8/4); /* VBL */ } -static void apache3_68000_reset(running_device *device) +static void apache3_68000_reset(device_t *device) { cputag_set_input_line(device->machine, "sub2", INPUT_LINE_RESET, PULSE_LINE); } diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index 10de5e461ca..b73de349f0f 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -148,7 +148,7 @@ ADDRESS_MAP_END static WRITE8_HANDLER( tbowl_adpcm_start_w ) { - running_device *adpcm = space->machine->device((offset & 1) ? "msm2" : "msm1"); + device_t *adpcm = space->machine->device((offset & 1) ? "msm2" : "msm1"); adpcm_pos[offset & 1] = data << 8; msm5205_reset_w(adpcm,0); } @@ -160,11 +160,11 @@ static WRITE8_HANDLER( tbowl_adpcm_end_w ) static WRITE8_HANDLER( tbowl_adpcm_vol_w ) { - running_device *adpcm = space->machine->device((offset & 1) ? "msm2" : "msm1"); + device_t *adpcm = space->machine->device((offset & 1) ? "msm2" : "msm1"); msm5205_set_volume(adpcm, (data & 0x7f) * 100 / 0x7f); } -static void tbowl_adpcm_int(running_device *device) +static void tbowl_adpcm_int(device_t *device) { int num = (strcmp(device->tag(), "msm1") == 0) ? 0 : 1; if (adpcm_pos[num] >= adpcm_end[num] || @@ -427,7 +427,7 @@ GFXDECODE_END */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c index 1a9b2209044..23b5050f612 100644 --- a/src/mame/drivers/tecmo.c +++ b/src/mame/drivers/tecmo.c @@ -84,7 +84,7 @@ static WRITE8_DEVICE_HANDLER( tecmo_adpcm_vol_w ) { msm5205_set_volume(device,(data & 0x0f) * 100 / 15); } -static void tecmo_adpcm_int(running_device *device) +static void tecmo_adpcm_int(device_t *device) { if (adpcm_pos >= adpcm_end || adpcm_pos >= memory_region_length(device->machine, "adpcm")) @@ -638,7 +638,7 @@ GFXDECODE_END -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "soundcpu", 0, linestate); } diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c index 099fef36eae..dd1589b8813 100644 --- a/src/mame/drivers/tecmo16.c +++ b/src/mame/drivers/tecmo16.c @@ -361,7 +361,7 @@ GFXDECODE_END /******************************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c index 514a552d6d6..607de13e623 100644 --- a/src/mame/drivers/tecmosys.c +++ b/src/mame/drivers/tecmosys.c @@ -864,7 +864,7 @@ static VIDEO_UPDATE(deroon) */ -static void sound_irq(running_device *device, int irq) +static void sound_irq(device_t *device, int irq) { /* IRQ */ cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index fbfe85a3478..e671984ee60 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -191,7 +191,7 @@ static WRITE8_DEVICE_HANDLER( msm_reset_w ) msm5205_reset_w(device,data ? 0 : 1); } -static void tehkanwc_adpcm_int(running_device *device) +static void tehkanwc_adpcm_int(device_t *device) { static int toggle; diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c index f4f2bb89da7..ef1c0d43f3b 100644 --- a/src/mame/drivers/thayers.c +++ b/src/mame/drivers/thayers.c @@ -19,7 +19,7 @@ extern const char layout_dlair[]; -static running_device *laserdisc; +static device_t *laserdisc; static UINT8 laserdisc_data; static int rx_bit; diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index 698213ffdfc..98578549918 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -306,7 +306,7 @@ GFXDECODE_END ***************************************************************************/ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c index 5536e38b4d3..f37b0d0b865 100644 --- a/src/mame/drivers/thief.c +++ b/src/mame/drivers/thief.c @@ -60,12 +60,12 @@ enum kTalkTrack, kCrashTrack }; -static void tape_set_audio( running_device *samples, int track, int bOn ) +static void tape_set_audio( device_t *samples, int track, int bOn ) { sample_set_volume(samples, track, bOn ? 1.0 : 0.0 ); } -static void tape_set_motor( running_device *samples, int bOn ) +static void tape_set_motor( device_t *samples, int bOn ) { if( bOn ) { diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index e767daca888..1d6a25cf953 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -596,7 +596,7 @@ INPUT_PORTS_END ***************************************************************************/ -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c index 7f9348f290b..d809c4bc0ef 100644 --- a/src/mame/drivers/tigeroad.c +++ b/src/mame/drivers/tigeroad.c @@ -492,7 +492,7 @@ GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index d9f99bb2dc1..7da8c75a276 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -118,7 +118,7 @@ To Do: static struct { - running_device *duart68681; + device_t *duart68681; } tmaster_devices; /*************************************************************************** @@ -149,12 +149,12 @@ static WRITE16_DEVICE_HANDLER( tmaster_oki_bank_w ) ***************************************************************************/ -static void duart_irq_handler(running_device *device, UINT8 vector) +static void duart_irq_handler(device_t *device, UINT8 vector) { cputag_set_input_line_and_vector(device->machine, "maincpu", 4, HOLD_LINE, vector); }; -static void duart_tx(running_device *device, int channel, UINT8 data) +static void duart_tx(device_t *device, int channel, UINT8 data) { if ( channel == 0 ) { @@ -546,7 +546,7 @@ static const char *const galgames_eeprom_names[5] = { GALGAMES_EEPROM_BIOS, GALG static READ16_HANDLER( galgames_eeprom_r ) { - running_device *eeprom = space->machine->device(galgames_eeprom_names[galgames_cart]); + device_t *eeprom = space->machine->device(galgames_eeprom_names[galgames_cart]); return eeprom_read_bit(eeprom) ? 0x80 : 0x00; } @@ -558,7 +558,7 @@ static WRITE16_HANDLER( galgames_eeprom_w ) if ( ACCESSING_BITS_0_7 ) { - running_device *eeprom = space->machine->device(galgames_eeprom_names[galgames_cart]); + device_t *eeprom = space->machine->device(galgames_eeprom_names[galgames_cart]); // latch the bit eeprom_write_bit(eeprom, data & 0x0001); diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c index 227bdee413b..e3077e88e43 100644 --- a/src/mame/drivers/tmmjprd.c +++ b/src/mame/drivers/tmmjprd.c @@ -265,8 +265,8 @@ static void ttmjprd_draw_tilemap(running_machine *machine, bitmap_t *bitmap, con static VIDEO_UPDATE( tmmjprd ) { UINT8* gfxroms = memory_region(screen->machine,"gfx2"); - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine)); diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 03272867c03..ae46b094b6f 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -2060,7 +2060,7 @@ static INPUT_PORTS_START( prmrsocr ) INPUT_PORTS_END -static void cuebrick_irq_handler( running_device *device, int state ) +static void cuebrick_irq_handler( device_t *device, int state ) { tmnt_state *tmnt = device->machine->driver_data(); tmnt->cuebrick_snd_irqlatch = state; @@ -2071,7 +2071,7 @@ static const ym2151_interface ym2151_interface_cbj = cuebrick_irq_handler }; -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device, 0, (v >> 4) * 0x11, 0); k007232_set_volume(device, 1, 0, (v & 0x0f) * 0x11); @@ -2616,7 +2616,7 @@ static MACHINE_CONFIG_START( glfgreat, tmnt_state ) MACHINE_CONFIG_END -static void sound_nmi( running_device *device ) +static void sound_nmi( device_t *device ) { tmnt_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, PULSE_LINE); diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c index 36c68eaea4f..d7c41631e95 100644 --- a/src/mame/drivers/tnzs.c +++ b/src/mame/drivers/tnzs.c @@ -1559,7 +1559,7 @@ static const ym2203_interface ym2203_config = /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { tnzs_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c index 40d07fab148..790295a7d53 100644 --- a/src/mame/drivers/toaplan1.c +++ b/src/mame/drivers/toaplan1.c @@ -1498,7 +1498,7 @@ static GFXDECODE_START( vm ) GFXDECODE_END -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 7cf23231fed..301e496522d 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -274,7 +274,7 @@ static WRITE16_HANDLER( batsugun_share2_w ); Initialisation handlers ***************************************************************************/ -static void toaplan2_reset(running_device *device) +static void toaplan2_reset(device_t *device) { toaplan2_state *state = device->machine->driver_data(); @@ -1328,7 +1328,7 @@ static WRITE16_HANDLER( bbakraid_nvram_w ) } -static void bbakraid_irqhandler(running_device *device, int state) +static void bbakraid_irqhandler(device_t *device, int state) { /* Not used ??? Connected to a test pin (TP082) */ logerror("YMZ280 is generating an interrupt. State=%08x\n",state); @@ -3766,7 +3766,7 @@ static GFXDECODE_START( fixeighb ) GFXDECODE_ENTRY( "gfx2", 0, fixeighblayout , 0, 128 ) GFXDECODE_END -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { toaplan2_state *state = device->machine->driver_data(); @@ -4423,7 +4423,7 @@ static MACHINE_RESET(batsugun) -static void batsugun_ym2151_irqhandler(running_device *device, int linestate) +static void batsugun_ym2151_irqhandler(device_t *device, int linestate) { logerror("batsugun_ym2151_irqhandler %02x\n",linestate); // update_irq_lines(machine, linestate ? assert : clear); diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c index f7b5d97fdc0..c27dd01292c 100644 --- a/src/mame/drivers/toki.c +++ b/src/mame/drivers/toki.c @@ -57,7 +57,7 @@ static READ16_HANDLER( pip16_r ) static int msm5205next; -static void toki_adpcm_int (running_device *device) +static void toki_adpcm_int (device_t *device) { static int toggle = 0; diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c index 2668d2b9dc0..b9ae0c2f938 100644 --- a/src/mame/drivers/topspeed.c +++ b/src/mame/drivers/topspeed.c @@ -406,7 +406,7 @@ static WRITE8_DEVICE_HANDLER( sound_bankswitch_w ) /* assumes Z80 sandwiched bet reset_sound_region(device->machine); } -static void topspeed_msm5205_vck( running_device *device ) +static void topspeed_msm5205_vck( device_t *device ) { topspeed_state *state = device->machine->driver_data(); if (state->adpcm_data != -1) @@ -617,7 +617,7 @@ GFXDECODE_END /* handler called by the YM2151 emulator when the internal timers cause an IRQ */ -static void irq_handler( running_device *device, int irq ) /* assumes Z80 sandwiched between 68Ks */ +static void irq_handler( device_t *device, int irq ) /* assumes Z80 sandwiched between 68Ks */ { topspeed_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 4881048fa79..1f85e462ed5 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -39,10 +39,10 @@ public: UINT8 clear_tv; /* devices */ - running_device *maincpu; - running_device *pia_u1; - running_device *pia_u2; - running_device *pia_u3; + device_t *maincpu; + device_t *pia_u1; + device_t *pia_u2; + device_t *pia_u3; }; diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c index 834f8d6851a..1fb5d651416 100644 --- a/src/mame/drivers/toypop.c +++ b/src/mame/drivers/toypop.c @@ -82,9 +82,9 @@ static WRITE8_HANDLER( toypop_sound_interrupt_disable_w ) static TIMER_CALLBACK( namcoio_run ) { - running_device *io58xx = machine->device("58xx"); - running_device *io56xx_1 = machine->device("56xx_1"); - running_device *io56xx_2 = machine->device("56xx_2"); + device_t *io58xx = machine->device("58xx"); + device_t *io56xx_1 = machine->device("56xx_1"); + device_t *io56xx_2 = machine->device("56xx_2"); switch (param) { @@ -102,9 +102,9 @@ static TIMER_CALLBACK( namcoio_run ) static INTERRUPT_GEN( toypop_main_interrupt ) { - running_device *namcoio_0 = device->machine->device("58xx"); - running_device *namcoio_1 = device->machine->device("56xx_1"); - running_device *namcoio_2 = device->machine->device("56xx_2"); + device_t *namcoio_0 = device->machine->device("58xx"); + device_t *namcoio_1 = device->machine->device("56xx_1"); + device_t *namcoio_2 = device->machine->device("56xx_2"); irq0_line_assert(device); // this also checks if irq is enabled - IMPORTANT! // so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); diff --git a/src/mame/drivers/triplhnt.c b/src/mame/drivers/triplhnt.c index 755acb9b3a9..bc5629b7c78 100644 --- a/src/mame/drivers/triplhnt.c +++ b/src/mame/drivers/triplhnt.c @@ -38,8 +38,8 @@ void triplhnt_set_collision(running_machine *machine, int code) static void triplhnt_update_misc(running_machine *machine, int offset) { - running_device *samples = machine->device("samples"); - running_device *discrete = machine->device("discrete"); + device_t *samples = machine->device("samples"); + device_t *discrete = machine->device("discrete"); UINT8 is_witch_hunt; UINT8 bit = offset >> 1; diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c index f768aca0eda..a26f97a9741 100644 --- a/src/mame/drivers/trvquest.c +++ b/src/mame/drivers/trvquest.c @@ -153,7 +153,7 @@ static TIMER_CALLBACK( via_irq_delayed ) cpu_set_input_line(state->maincpu, 0, param); } -static void via_irq( running_device *device, int state ) +static void via_irq( device_t *device, int state ) { // from gameplan.c diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c index dc0338c035f..c8f43a5d82a 100644 --- a/src/mame/drivers/tubep.c +++ b/src/mame/drivers/tubep.c @@ -560,7 +560,7 @@ static WRITE8_DEVICE_HANDLER( rjammer_voice_frequency_select_w ) } -static void rjammer_adpcm_vck (running_device *device) +static void rjammer_adpcm_vck (device_t *device) { ls74 = (ls74 + 1) & 1; diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index 0cf8fe70df9..dcfa4671aba 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -452,7 +452,7 @@ command 1 - stop? */ -static void tumbleb2_playmusic( running_device *device ) +static void tumbleb2_playmusic( device_t *device ) { tumbleb_state *state = device->machine->driver_data(); okim6295_device *oki = downcast(device); @@ -2210,7 +2210,7 @@ MACHINE_CONFIG_END -static void semicom_irqhandler( running_device *device, int irq ) +static void semicom_irqhandler( device_t *device, int irq ) { tumbleb_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); @@ -3384,7 +3384,7 @@ static DRIVER_INIT( tumblepb ) static DRIVER_INIT( tumbleb2 ) { - running_device *oki = machine->device("oki"); + device_t *oki = machine->device("oki"); tumblepb_gfx1_rearrange(machine); diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index f924622dc51..519bc26d439 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -273,7 +273,7 @@ GFXDECODE_END /***************************************************************************/ -static void sound_irq(running_device *device, int state) +static void sound_irq(device_t *device, int state) { tumblep_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index c9e70ee3582..fd380dc59b6 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -675,7 +675,7 @@ GFXDECODE_END /* Sound Interfaces */ -static void volume_callback(running_device *device, int v) +static void volume_callback(device_t *device, int v) { k007232_set_volume(device,0,(v >> 4) * 0x11,0); k007232_set_volume(device,1,0,(v & 0x0f) * 0x11); diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c index f2589cd0e1f..a8bd219c6f2 100644 --- a/src/mame/drivers/twincobr.c +++ b/src/mame/drivers/twincobr.c @@ -544,7 +544,7 @@ GFXDECODE_END /* handler called by the 3812 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/twinkle.c b/src/mame/drivers/twinkle.c index 1ab7e7e4a23..62121f7ee34 100644 --- a/src/mame/drivers/twinkle.c +++ b/src/mame/drivers/twinkle.c @@ -672,7 +672,7 @@ ADDRESS_MAP_END /* SPU board */ -static void ide_interrupt(running_device *device, int state_) +static void ide_interrupt(device_t *device, int state_) { twinkle_state *state = device->machine->driver_data(); @@ -889,7 +889,7 @@ static DRIVER_INIT( twinkle ) psx_dma_install_read_handler(machine, 5, scsi_dma_read); psx_dma_install_write_handler(machine, 5, scsi_dma_write); - running_device *i2cmem = machine->device("security"); + device_t *i2cmem = machine->device("security"); i2cmem_e0_write( i2cmem, 0 ); i2cmem_e1_write( i2cmem, 0 ); i2cmem_e2_write( i2cmem, 0 ); @@ -904,7 +904,7 @@ static MACHINE_RESET( twinkle ) cdda_set_cdrom(machine->device("cdda"), am53cf96_get_device(SCSI_ID_4)); } -static void spu_irq(running_device *device, UINT32 data) +static void spu_irq(device_t *device, UINT32 data) { psx_irq_set(device->machine, data); } diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index c8c0460a3bd..78cb56bb4bd 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -111,7 +111,7 @@ ADDRESS_MAP_END static READ16_HANDLER( K056800_68k_r ) { - running_device *k056800 = space->machine->device("k056800"); + device_t *k056800 = space->machine->device("k056800"); UINT16 r = 0; if (ACCESSING_BITS_8_15) @@ -125,7 +125,7 @@ static READ16_HANDLER( K056800_68k_r ) static WRITE16_HANDLER( K056800_68k_w ) { - running_device *k056800 = space->machine->device("k056800"); + device_t *k056800 = space->machine->device("k056800"); if (ACCESSING_BITS_8_15) k056800_sound_w(k056800, (offset*2)+0, (data >> 8) & 0xff, 0x00ff); diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index 25bc8eafd9f..867f2afc0ca 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -293,7 +293,7 @@ static WRITE32_HANDLER( undrfire_input_w ) if (ACCESSING_BITS_0_7) { - running_device *device = space->machine->device("eeprom"); + device_t *device = space->machine->device("eeprom"); eeprom_set_clock_line(device, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); eeprom_write_bit(device, data & 0x40); eeprom_set_cs_line(device, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index fb0d3c68ec3..f0cf73a28d6 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -199,7 +199,7 @@ GFXDECODE_END /******************************************************************************/ -static void sound_irq( running_device *device, int state ) +static void sound_irq( device_t *device, int state ) { vaportra_state *driver_state = device->machine->driver_data(); cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */ diff --git a/src/mame/drivers/vball.c b/src/mame/drivers/vball.c index a08530e40c0..a3dcbd46c0a 100644 --- a/src/mame/drivers/vball.c +++ b/src/mame/drivers/vball.c @@ -404,7 +404,7 @@ static GFXDECODE_START( vb ) GFXDECODE_END -static void vball_irq_handler(running_device *device, int irq) +static void vball_irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0 , irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 7258e3cbd3d..70ccc9c5d17 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -104,7 +104,7 @@ static VIDEO_UPDATE( vcombat ) { int y; const rgb_t *const pens = tlc34076_get_pens(screen->machine->device("tlc34076")); - running_device *aux = screen->machine->device("aux"); + device_t *aux = screen->machine->device("aux"); UINT16 *m68k_buf = m68k_framebuffer[(*framebuffer_ctrl & 0x20) ? 1 : 0]; UINT16 *i860_buf = i860_framebuffer[(screen == aux) ? 1 : 0][0]; @@ -189,7 +189,7 @@ static READ16_HANDLER( control_3_r ) return (input_port_read(space->machine, "IN2") << 8); } -static void wiggle_i860_common(running_device *device, UINT16 data) +static void wiggle_i860_common(device_t *device, UINT16 data) { int bus_hold = (data & 0x03) == 0x03; int reset = data & 0x10; @@ -287,7 +287,7 @@ static WRITE64_HANDLER( v1_fb_w ) static WRITE16_HANDLER( crtc_w ) { - running_device *crtc = space->machine->device("crtc"); + device_t *crtc = space->machine->device("crtc"); if (crtc == NULL) return; diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index fd104d074dc..5fe7301d825 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -475,7 +475,7 @@ static UINT8 cmos_unlocked; static UINT32 *timekeeper_nvram; static size_t timekeeper_nvram_size; -static running_device *voodoo; +static device_t *voodoo; static UINT8 dcs_idma_cs; static int dynamic_count; @@ -487,7 +487,7 @@ static struct dynamic_address write32_space_func mwrite; read32_device_func dread; write32_device_func dwrite; - running_device *device; + device_t *device; const char * rdname; const char * wrname; } dynamic[MAX_DYNAMIC_ADDRESSES]; @@ -503,7 +503,7 @@ static struct dynamic_address static STATE_POSTLOAD( vegas_postload ); static TIMER_CALLBACK( nile_timer_callback ); -static void ide_interrupt(running_device *device, int state); +static void ide_interrupt(device_t *device, int state); static void remap_dynamic_addresses(running_machine *machine); @@ -1246,7 +1246,7 @@ static WRITE32_HANDLER( nile_w ) * *************************************/ -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { ide_irq_state = state; if (state) @@ -1274,7 +1274,7 @@ static void update_sio_irqs(running_machine *machine) } -static void vblank_assert(running_device *device, int state) +static void vblank_assert(device_t *device, int state) { if (!vblank_state && state) { @@ -1301,7 +1301,7 @@ static void ioasic_irq(running_machine *machine, int state) } -static void ethernet_interrupt(running_device *device, int state) +static void ethernet_interrupt(device_t *device, int state) { if (state) sio_irq_state |= 0x10; @@ -1534,7 +1534,7 @@ INLINE void _add_dynamic_address(offs_t start, offs_t end, read32_space_func rea dynamic_count++; } -INLINE void _add_dynamic_device_address(running_device *device, offs_t start, offs_t end, read32_device_func read, write32_device_func write, const char *rdname, const char *wrname) +INLINE void _add_dynamic_device_address(device_t *device, offs_t start, offs_t end, read32_device_func read, write32_device_func write, const char *rdname, const char *wrname) { dynamic[dynamic_count].start = start; dynamic[dynamic_count].end = end; @@ -1551,8 +1551,8 @@ INLINE void _add_dynamic_device_address(running_device *device, offs_t start, of static void remap_dynamic_addresses(running_machine *machine) { - running_device *ethernet = machine->device("ethernet"); - running_device *ide = machine->device("ide"); + device_t *ethernet = machine->device("ethernet"); + device_t *ide = machine->device("ide"); int voodoo_type = voodoo_get_type(voodoo); offs_t base; int addr; diff --git a/src/mame/drivers/videopin.c b/src/mame/drivers/videopin.c index 90ef09c156d..61a6352517d 100644 --- a/src/mame/drivers/videopin.c +++ b/src/mame/drivers/videopin.c @@ -66,7 +66,7 @@ static TIMER_CALLBACK( interrupt_callback ) static MACHINE_RESET( videopin ) { - running_device *discrete = machine->device("discrete"); + device_t *discrete = machine->device("discrete"); timer_set(machine, machine->primary_screen->time_until_pos(32), NULL, 32, interrupt_callback); diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c index f917d1926f6..884b5c4f163 100644 --- a/src/mame/drivers/viper.c +++ b/src/mame/drivers/viper.c @@ -49,7 +49,7 @@ DASM code snippets: static VIDEO_UPDATE(viper) { - running_device *device = screen->machine->device("voodoo"); + device_t *device = screen->machine->device("voodoo"); return voodoo_update(device, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } @@ -57,7 +57,7 @@ static VIDEO_UPDATE(viper) /*****************************************************************************/ static UINT32 mpc8240_regs[256/4]; -static UINT32 mpc8240_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 mpc8240_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { #ifdef VIPER_DEBUG_LOG printf("MPC8240: PCI read %d, %02X, %08X\n", function, reg, mem_mask); @@ -70,7 +70,7 @@ static UINT32 mpc8240_pci_r(running_device *busdevice, running_device *device, i return mpc8240_regs[reg/4]; } -static void mpc8240_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void mpc8240_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { #ifdef VIPER_DEBUG_LOG printf("MPC8240: PCI write %d, %02X, %08X, %08X\n", function, reg, data, mem_mask); @@ -428,7 +428,7 @@ static WRITE64_HANDLER(unk1b_w) } static UINT32 voodoo3_pci_reg[0x100]; -static UINT32 voodoo3_pci_r(running_device *busdevice, running_device *device, int function, int reg, UINT32 mem_mask) +static UINT32 voodoo3_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) { switch (reg) { @@ -467,7 +467,7 @@ static UINT32 voodoo3_pci_r(running_device *busdevice, running_device *device, i return 0; } -static void voodoo3_pci_w(running_device *busdevice, running_device *device, int function, int reg, UINT32 data, UINT32 mem_mask) +static void voodoo3_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask) { // printf("voodoo3_pci_w: %08X, %08X\n", reg, data); @@ -605,7 +605,7 @@ static INTERRUPT_GEN(viper_vblank) } -static void ide_interrupt(running_device *device, int state) +static void ide_interrupt(device_t *device, int state) { } @@ -658,7 +658,7 @@ static DRIVER_INIT(viper) static DRIVER_INIT(vipercf) { - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); DRIVER_INIT_CALL(viper); diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c index f0b76d36eea..1e49280394e 100644 --- a/src/mame/drivers/volfied.c +++ b/src/mame/drivers/volfied.c @@ -207,7 +207,7 @@ GFXDECODE_END /* handler called by the YM2203 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { volfied_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c index 55d14f55e89..a98a50c9e07 100644 --- a/src/mame/drivers/wardner.c +++ b/src/mame/drivers/wardner.c @@ -371,7 +371,7 @@ static const gfx_layout spritelayout = /* handler called by the 3812 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int linestate) +static void irqhandler(device_t *device, int linestate) { cputag_set_input_line(device->machine, "audiocpu", 0, linestate); } diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c index 97332878607..60c907663e8 100644 --- a/src/mame/drivers/warriorb.c +++ b/src/mame/drivers/warriorb.c @@ -202,7 +202,7 @@ static READ16_HANDLER( warriorb_sound_r ) static WRITE8_HANDLER( warriorb_pancontrol ) { warriorb_state *state = space->machine->driver_data(); - running_device *flt = NULL; + device_t *flt = NULL; offset &= 3; switch (offset) @@ -417,7 +417,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) +static void irqhandler( device_t *device, int irq ) { warriorb_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/wc90.c b/src/mame/drivers/wc90.c index 039133fe83a..9f497eef96d 100644 --- a/src/mame/drivers/wc90.c +++ b/src/mame/drivers/wc90.c @@ -291,7 +291,7 @@ GFXDECODE_END /* handler called by the 2608 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c index ddbb839107e..97e3f0fcabf 100644 --- a/src/mame/drivers/wc90b.c +++ b/src/mame/drivers/wc90b.c @@ -324,7 +324,7 @@ GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { /* NMI writes to MSM ports *only*! -AS */ //cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); @@ -340,7 +340,7 @@ static const ym2203_interface ym2203_config = irqhandler }; -static void adpcm_int(running_device *device) +static void adpcm_int(device_t *device) { static int toggle = 0; diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c index 10b14385115..fd2cccf0757 100644 --- a/src/mame/drivers/wecleman.c +++ b/src/mame/drivers/wecleman.c @@ -674,7 +674,7 @@ static WRITE16_HANDLER( hotchase_soundlatch_w ) static WRITE8_HANDLER( hotchase_sound_control_w ) { - running_device *sound[3]; + device_t *sound[3]; int reg[8]; diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c index d8f459d1627..174d988f982 100644 --- a/src/mame/drivers/welltris.c +++ b/src/mame/drivers/welltris.c @@ -676,7 +676,7 @@ GFXDECODE_END -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c index b24c1667aa7..89033f51e77 100644 --- a/src/mame/drivers/wgp.c +++ b/src/mame/drivers/wgp.c @@ -903,7 +903,7 @@ GFXDECODE_END **************************************************************/ /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irqhandler( running_device *device, int irq ) // assumes Z80 sandwiched between 68Ks +static void irqhandler( device_t *device, int irq ) // assumes Z80 sandwiched between 68Ks { wgp_state *state = device->machine->driver_data(); cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE); diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index 12d711a3f05..20a1de8616d 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -231,10 +231,10 @@ public: wheelfir_state(running_machine &machine, const driver_device_config_base &config) : driver_device(machine, config) { } - running_device *maincpu; - running_device *subcpu; - running_device *screen; - running_device *eeprom; + device_t *maincpu; + device_t *subcpu; + device_t *screen; + device_t *eeprom; INT32 *zoom_table; UINT16 *blitter_data; diff --git a/src/mame/drivers/williams.c b/src/mame/drivers/williams.c index dd510309858..c170f129069 100644 --- a/src/mame/drivers/williams.c +++ b/src/mame/drivers/williams.c @@ -527,8 +527,8 @@ ADDRESS_MAP_END void defender_install_io_space(address_space *space) { - running_device *pia_0 = space->machine->device("pia_0"); - running_device *pia_1 = space->machine->device("pia_1"); + device_t *pia_0 = space->machine->device("pia_0"); + device_t *pia_1 = space->machine->device("pia_1"); /* this routine dynamically installs the memory mapped above from c000-cfff */ memory_install_write_bank (space, 0xc000, 0xc00f, 0, 0x03e0, "bank4"); @@ -2795,7 +2795,7 @@ static DRIVER_INIT( blastkit ) static DRIVER_INIT( spdball ) { - running_device *pia_3 = machine->device("pia_3"); + device_t *pia_3 = machine->device("pia_3"); CONFIGURE_BLITTER(WILLIAMS_BLITTER_SC01, 0xc000); diff --git a/src/mame/drivers/wiz.c b/src/mame/drivers/wiz.c index 7b7299727d3..481fadf46d2 100644 --- a/src/mame/drivers/wiz.c +++ b/src/mame/drivers/wiz.c @@ -173,7 +173,7 @@ static int dsc0, dsc1; static WRITE8_HANDLER( sound_command_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); switch (offset) { diff --git a/src/mame/drivers/wolfpack.c b/src/mame/drivers/wolfpack.c index 9f6e1840d40..91e6526ff04 100644 --- a/src/mame/drivers/wolfpack.c +++ b/src/mame/drivers/wolfpack.c @@ -39,7 +39,7 @@ static CUSTOM_INPUT( wolfpack_dial_r ) static READ8_HANDLER( wolfpack_misc_r ) { - running_device *device = space->machine->device("speech"); + device_t *device = space->machine->device("speech"); UINT8 val = 0; /* BIT0 => SPEECH BUSY */ diff --git a/src/mame/drivers/wwfsstar.c b/src/mame/drivers/wwfsstar.c index 110f3f7a453..fb93afefd8e 100644 --- a/src/mame/drivers/wwfsstar.c +++ b/src/mame/drivers/wwfsstar.c @@ -413,7 +413,7 @@ GFXDECODE_END Straight from Ddragon 3 *******************************************************************************/ -static void wwfsstar_ymirq_handler(running_device *device, int irq) +static void wwfsstar_ymirq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0 , irq ? ASSERT_LINE : CLEAR_LINE ); } diff --git a/src/mame/drivers/wwfwfest.c b/src/mame/drivers/wwfwfest.c index 0e4db8e59e4..cc29546a160 100644 --- a/src/mame/drivers/wwfwfest.c +++ b/src/mame/drivers/wwfwfest.c @@ -369,7 +369,7 @@ static TIMER_DEVICE_CALLBACK( wwfwfest_scanline ) Straight from Ddragon 3 with some adjusted volumes *******************************************************************************/ -static void dd3_ymirq_handler(running_device *device, int irq) +static void dd3_ymirq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0 , irq ? ASSERT_LINE : CLEAR_LINE ); } diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c index a09750b153c..2d36cf9f5e1 100644 --- a/src/mame/drivers/xain.c +++ b/src/mame/drivers/xain.c @@ -560,7 +560,7 @@ GFXDECODE_END /* handler called by the 2203 emulator when the internal timers cause an IRQ */ -static void irqhandler(running_device *device, int irq) +static void irqhandler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index dd62069bd8b..77ba9feda30 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -256,7 +256,7 @@ static WRITE8_HANDLER( sound_bankswitch_w ) reset_sound_region(space->machine); } -static void ym_set_mixing(running_device *device, double left, double right) +static void ym_set_mixing(device_t *device, double left, double right) { xexex_state *state = device->machine->driver_data(); flt_volume_set_volume(state->filter1l, (71.0 * left) / 55.0); diff --git a/src/mame/drivers/yunsun16.c b/src/mame/drivers/yunsun16.c index 0e4a5505c56..d6a6253b313 100644 --- a/src/mame/drivers/yunsun16.c +++ b/src/mame/drivers/yunsun16.c @@ -577,7 +577,7 @@ static MACHINE_RESET( yunsun16 ) Magic Bubble ***************************************************************************/ -static void soundirq(running_device *device, int state) +static void soundirq(device_t *device, int state) { yunsun16_state *yunsun16 = device->machine->driver_data(); cpu_set_input_line(yunsun16->audiocpu, 0, state); diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index c411abb12f5..adbb08363be 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -446,7 +446,7 @@ GFXDECODE_END ***************************************************************************/ -static void yunsung8_adpcm_int( running_device *device ) +static void yunsung8_adpcm_int( device_t *device ) { yunsung8_state *state = device->machine->driver_data(); diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c index ff1eecdb68e..45bc1d03754 100644 --- a/src/mame/drivers/zaccaria.c +++ b/src/mame/drivers/zaccaria.c @@ -157,7 +157,7 @@ static WRITE8_DEVICE_HANDLER( zaccaria_port0b_w ) static INTERRUPT_GEN( zaccaria_cb1_toggle ) { - running_device *pia0 = device->machine->device("pia0"); + device_t *pia0 = device->machine->device("pia0"); static int toggle = 0; pia6821_cb1_w(pia0, toggle & 1); @@ -166,7 +166,7 @@ static INTERRUPT_GEN( zaccaria_cb1_toggle ) static WRITE8_DEVICE_HANDLER( zaccaria_port1b_w ) { - running_device *tms = device->machine->device("tms"); + device_t *tms = device->machine->device("tms"); // bit 0 = /RS tms5220_rsq_w(tms, (data >> 0) & 0x01); @@ -189,7 +189,7 @@ static WRITE8_HANDLER( sound_command_w ) static WRITE8_HANDLER( sound1_command_w ) { - running_device *pia0 = space->machine->device("pia0"); + device_t *pia0 = space->machine->device("pia0"); pia6821_ca1_w(pia0, data & 0x80); soundlatch2_w(space, 0, data); } diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index e5da9544f6c..77035234c91 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -485,7 +485,7 @@ static void zn_driver_init( running_machine *machine ) state->dip_timer = timer_alloc( machine, dip_timer_fired, NULL ); } -static void psx_spu_irq(running_device *device, UINT32 data) +static void psx_spu_irq(device_t *device, UINT32 data) { psx_irq_set(device->machine, data); } @@ -1187,7 +1187,7 @@ Notes: static WRITE32_HANDLER( bank_coh1000t_w ) { - running_device *mb3773 = space->machine->device("mb3773"); + device_t *mb3773 = space->machine->device("mb3773"); mb3773_set_ck(mb3773, (data & 0x20) >> 5); verboselog( space->machine, 1, "bank_coh1000t_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); memory_set_bankptr( space->machine, "bank1", memory_region( space->machine, "user2" ) + ( ( data & 3 ) * 0x800000 ) ); @@ -1200,13 +1200,13 @@ static WRITE8_HANDLER( fx1a_sound_bankswitch_w ) static READ32_HANDLER( taitofx1a_ymsound_r ) { - running_device *tc0140syt = space->machine->device("tc0140syt"); + device_t *tc0140syt = space->machine->device("tc0140syt"); return tc0140syt_comm_r(tc0140syt, 0) << 16; } static WRITE32_HANDLER( taitofx1a_ymsound_w ) { - running_device *tc0140syt = space->machine->device("tc0140syt"); + device_t *tc0140syt = space->machine->device("tc0140syt"); if (mem_mask == 0x0000ffff) { @@ -1254,7 +1254,7 @@ static ADDRESS_MAP_START( fx1a_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) ADDRESS_MAP_END /* handler called by the YM2610 emulator when the internal timers cause an IRQ */ -static void irq_handler(running_device *device, int irq) +static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } @@ -1463,7 +1463,7 @@ Notes: *2 - Unpopulated DIP28 socket */ -static void atpsx_interrupt(running_device *device, int state) +static void atpsx_interrupt(device_t *device, int state) { if (state) { @@ -1475,7 +1475,7 @@ static void atpsx_dma_read( running_machine *machine, UINT32 n_address, INT32 n_ { zn_state *state = machine->driver_data(); UINT32 *p_n_psxram = state->p_n_psxram; - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); logerror("DMA read: %d bytes (%d words) to %08x\n", n_size<<2, n_size, n_address); @@ -1503,7 +1503,7 @@ static void atpsx_dma_write( running_machine *machine, UINT32 n_address, INT32 n static DRIVER_INIT( coh1000w ) { - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); memory_install_read_bank ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f000000, 0x1f1fffff, 0, 0, "bank1" ); memory_nop_write ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f000000, 0x1f000003, 0, 0 ); @@ -2032,7 +2032,7 @@ Notes: * - Unpopulated DIP42 socket */ -static void jdredd_ide_interrupt(running_device *device, int state) +static void jdredd_ide_interrupt(device_t *device, int state) { if (state) { @@ -2177,7 +2177,7 @@ static DRIVER_INIT( coh1000a ) if( ( !strcmp( machine->gamedrv->name, "jdredd" ) ) || ( !strcmp( machine->gamedrv->name, "jdreddb" ) ) ) { - running_device *ide = machine->device("ide"); + device_t *ide = machine->device("ide"); memory_install_read32_device_handler( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), ide, 0x1fbfff8c, 0x1fbfff8f, 0, 0, jdredd_idestat_r ); memory_nop_write ( cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1fbfff8c, 0x1fbfff8f, 0, 0 ); diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index a32e96a8469..56e37fd338f 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -189,7 +189,7 @@ static VIDEO_START( jetwave ) static VIDEO_UPDATE( jetwave ) { - running_device *k001604 = screen->machine->device("k001604"); + device_t *k001604 = screen->machine->device("k001604"); bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); @@ -224,7 +224,7 @@ static void game_tile_callback(running_machine *machine, int layer, int *code, i static VIDEO_START( zr107 ) { - running_device *k056832 = machine->device("k056832"); + device_t *k056832 = machine->device("k056832"); k056832_set_layer_offs(k056832, 0, -29, -27); k056832_set_layer_offs(k056832, 1, -29, -27); @@ -241,7 +241,7 @@ static VIDEO_START( zr107 ) static VIDEO_UPDATE( zr107 ) { - running_device *k056832 = screen->machine->device("k056832"); + device_t *k056832 = screen->machine->device("k056832"); bitmap_fill(bitmap, cliprect, screen->machine->pens[0]); k056832_tilemap_draw(k056832, bitmap, cliprect, 1, 0, 0); @@ -639,7 +639,7 @@ static const sharc_config sharc_cfg = /* ADC0838 Interface */ -static double adc0838_callback( running_device *device, UINT8 input ) +static double adc0838_callback( device_t *device, UINT8 input ) { switch (input) { diff --git a/src/mame/includes/1942.h b/src/mame/includes/1942.h index 89718fe2d84..55279b4f8f3 100644 --- a/src/mame/includes/1942.h +++ b/src/mame/includes/1942.h @@ -22,7 +22,7 @@ public: UINT8 scroll[2]; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index 5b8c603b62d..b1468a5fd33 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -27,8 +27,8 @@ public: UINT8 game_selected; /* 0 = Ms. Pac-Man, 1 = Galaga */ /* devices */ - running_device *maincpu; - running_device *eeprom; + device_t *maincpu; + device_t *eeprom; /* bank support */ UINT8 *ram_48000; diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h index bef1b85e6a1..97d4e9229c4 100644 --- a/src/mame/includes/40love.h +++ b/src/mame/includes/40love.h @@ -42,7 +42,7 @@ public: UINT8 snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index 797a7194d78..30625354121 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -24,12 +24,12 @@ public: int speech_chip; /* devices */ - running_device *audiocpu; - running_device *k052109; - running_device *k051960; - running_device *k051316; - running_device *upd_1; - running_device *upd_2; + device_t *audiocpu; + device_t *k052109; + device_t *k051960; + device_t *k051316; + device_t *upd_1; + device_t *upd_2; }; diff --git a/src/mame/includes/actfancr.h b/src/mame/includes/actfancr.h index 77edfc67877..9406e7bd3d1 100644 --- a/src/mame/includes/actfancr.h +++ b/src/mame/includes/actfancr.h @@ -27,8 +27,8 @@ public: int trio_control_select; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h index e3aacfcb812..4b4c5802921 100644 --- a/src/mame/includes/aerofgt.h +++ b/src/mame/includes/aerofgt.h @@ -32,7 +32,7 @@ public: int pending_command; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/airbustr.h b/src/mame/includes/airbustr.h index 898eeaac754..77bbc04713c 100644 --- a/src/mame/includes/airbustr.h +++ b/src/mame/includes/airbustr.h @@ -29,10 +29,10 @@ public: int slave_addr; /* devices */ - running_device *master; - running_device *slave; - running_device *audiocpu; - running_device *pandora; + device_t *master; + device_t *slave; + device_t *audiocpu; + device_t *pandora; }; diff --git a/src/mame/includes/ajax.h b/src/mame/includes/ajax.h index a0e34c3d4c8..310aeefb207 100644 --- a/src/mame/includes/ajax.h +++ b/src/mame/includes/ajax.h @@ -16,14 +16,14 @@ public: int firq_enable; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *k007232_1; - running_device *k007232_2; - running_device *k052109; - running_device *k051960; - running_device *k051316; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *k007232_1; + device_t *k007232_2; + device_t *k052109; + device_t *k051960; + device_t *k051316; }; diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index 4544abd3a27..cacd11d8095 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -21,11 +21,11 @@ public: int palette_selected; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/aliens.c -----------*/ diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index 7b272467d93..a0c2e47171c 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -32,7 +32,7 @@ public: unsigned game_id; // see below /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; /* game_id - used to deal with a few game specific situations */ diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index 1d04ecd6c5d..e2ae8c574fc 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -389,7 +389,7 @@ public: autoconfig_device *cur_autoconfig; emu_timer * irq_timer; emu_timer * blitter_timer; - running_device *sound_device; + device_t *sound_device; /* sprite states */ UINT8 sprite_comparitor_enable_mask; @@ -457,8 +457,8 @@ void amiga_add_autoconfig(running_machine *machine, const amiga_autoconfig_devic READ16_HANDLER( amiga_autoconfig_r ); WRITE16_HANDLER( amiga_autoconfig_w ); -void amiga_cia_0_irq(running_device *device, int state); -void amiga_cia_1_irq(running_device *device, int state); +void amiga_cia_0_irq(device_t *device, int state); +void amiga_cia_1_irq(device_t *device, int state); const amiga_machine_interface *amiga_get_interface(running_machine *machine); @@ -467,8 +467,8 @@ const amiga_machine_interface *amiga_get_interface(running_machine *machine); DECLARE_LEGACY_SOUND_DEVICE(AMIGA, amiga_sound); -void amiga_audio_update(running_device *device); -void amiga_audio_data_w(running_device *device, int which, UINT16 data); +void amiga_audio_update(device_t *device); +void amiga_audio_data_w(device_t *device, int which, UINT16 data); /*----------- defined in video/amiga.c -----------*/ diff --git a/src/mame/includes/amspdwy.h b/src/mame/includes/amspdwy.h index f82bd3f0649..f296db2294b 100644 --- a/src/mame/includes/amspdwy.h +++ b/src/mame/includes/amspdwy.h @@ -26,7 +26,7 @@ public: UINT8 wheel_return[2]; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/angelkds.h b/src/mame/includes/angelkds.h index c4ab2197f85..50300a963db 100644 --- a/src/mame/includes/angelkds.h +++ b/src/mame/includes/angelkds.h @@ -27,7 +27,7 @@ public: UINT8 layer_ctrl; /* devices */ - running_device *subcpu; + device_t *subcpu; }; diff --git a/src/mame/includes/appoooh.h b/src/mame/includes/appoooh.h index 697b1b612f6..5db69c9517f 100644 --- a/src/mame/includes/appoooh.h +++ b/src/mame/includes/appoooh.h @@ -24,7 +24,7 @@ public: UINT32 adpcm_address; /* devices */ - running_device *adpcm; + device_t *adpcm; }; #define CHR1_OFST 0x00 /* palette page of char set #1 */ diff --git a/src/mame/includes/aquarium.h b/src/mame/includes/aquarium.h index 3f494d882ff..5ef1be2d572 100644 --- a/src/mame/includes/aquarium.h +++ b/src/mame/includes/aquarium.h @@ -23,7 +23,7 @@ public: int aquarium_snd_ack; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/arkanoid.h b/src/mame/includes/arkanoid.h index fff98988402..7c7a3fa3485 100644 --- a/src/mame/includes/arkanoid.h +++ b/src/mame/includes/arkanoid.h @@ -37,7 +37,7 @@ public: UINT8 bootleg_cmd; /* devices */ - running_device *mcu; + device_t *mcu; }; diff --git a/src/mame/includes/ashnojoe.h b/src/mame/includes/ashnojoe.h index 3c0bfc425e7..f992bc5b327 100644 --- a/src/mame/includes/ashnojoe.h +++ b/src/mame/includes/ashnojoe.h @@ -31,7 +31,7 @@ public: int msm5205_vclk_toggle; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/asterix.h b/src/mame/includes/asterix.h index aac0da640f8..62d1becb025 100644 --- a/src/mame/includes/asterix.h +++ b/src/mame/includes/asterix.h @@ -25,12 +25,12 @@ public: UINT16 prot[2]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053260; - running_device *k056832; - running_device *k053244; - running_device *k053251; + device_t *maincpu; + device_t *audiocpu; + device_t *k053260; + device_t *k056832; + device_t *k053244; + device_t *k053251; }; diff --git a/src/mame/includes/astrof.h b/src/mame/includes/astrof.h index 83caa604a95..bad5fd8dc7d 100644 --- a/src/mame/includes/astrof.h +++ b/src/mame/includes/astrof.h @@ -32,9 +32,9 @@ public: UINT8 astrof_bosskill_playing; /* devices */ - running_device *maincpu; - running_device *samples; // astrof & abattle - running_device *sn; // tomahawk + device_t *maincpu; + device_t *samples; // astrof & abattle + device_t *sn; // tomahawk }; /*----------- defined in audio/astrof.c -----------*/ diff --git a/src/mame/includes/asuka.h b/src/mame/includes/asuka.h index 52cb3c8115b..49cdb16ee6d 100644 --- a/src/mame/includes/asuka.h +++ b/src/mame/includes/asuka.h @@ -30,10 +30,10 @@ public: int adpcm_data; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *pc090oj; - running_device *tc0100scn; + device_t *maincpu; + device_t *audiocpu; + device_t *pc090oj; + device_t *tc0100scn; }; diff --git a/src/mame/includes/atari.h b/src/mame/includes/atari.h index d834ac62716..8b100bf063e 100644 --- a/src/mame/includes/atari.h +++ b/src/mame/includes/atari.h @@ -28,7 +28,7 @@ void atari_machine_start(running_machine *machine); MACHINE_START( atarixl ); -void atari_interrupt_cb(running_device *device, int mask); +void atari_interrupt_cb(device_t *device, int mask); void a800_handle_keyboard(running_machine *machine); void a5200_handle_keypads(running_machine *machine); diff --git a/src/mame/includes/atarifb.h b/src/mame/includes/atarifb.h index 6634336e74b..0d5d30c01bb 100644 --- a/src/mame/includes/atarifb.h +++ b/src/mame/includes/atarifb.h @@ -45,7 +45,7 @@ public: int counter_x_in2b, counter_y_in2b; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/balsente.h b/src/mame/includes/balsente.h index 20e155f273d..e245cdcae0b 100644 --- a/src/mame/includes/balsente.h +++ b/src/mame/includes/balsente.h @@ -132,7 +132,7 @@ TIMER_DEVICE_CALLBACK( balsente_interrupt_timer ); MACHINE_START( balsente ); MACHINE_RESET( balsente ); -void balsente_noise_gen(running_device *device, int count, short *buffer); +void balsente_noise_gen(device_t *device, int count, short *buffer); WRITE8_HANDLER( balsente_random_reset_w ); READ8_HANDLER( balsente_random_num_r ); diff --git a/src/mame/includes/battlane.h b/src/mame/includes/battlane.h index d1541a58af3..aa06b5393a2 100644 --- a/src/mame/includes/battlane.h +++ b/src/mame/includes/battlane.h @@ -21,8 +21,8 @@ public: int cpu_control; /* CPU interrupt control register */ /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h index 2134056529f..12c097f75fb 100644 --- a/src/mame/includes/battlnts.h +++ b/src/mame/includes/battlnts.h @@ -19,9 +19,9 @@ public: /* devices */ - running_device *audiocpu; - running_device *k007342; - running_device *k007420; + device_t *audiocpu; + device_t *k007342; + device_t *k007420; }; /*----------- defined in video/battlnts.c -----------*/ diff --git a/src/mame/includes/bigevglf.h b/src/mame/includes/bigevglf.h index 1ac95496bc2..fc6cc41b8d9 100644 --- a/src/mame/includes/bigevglf.h +++ b/src/mame/includes/bigevglf.h @@ -35,8 +35,8 @@ public: UINT8 port_select; /* for muxed controls */ /* devices */ - running_device *audiocpu; - running_device *mcu; + device_t *audiocpu; + device_t *mcu; }; diff --git a/src/mame/includes/bishi.h b/src/mame/includes/bishi.h index af4ab0bfe9c..c103aaa13ca 100644 --- a/src/mame/includes/bishi.h +++ b/src/mame/includes/bishi.h @@ -24,12 +24,12 @@ public: UINT16 cur_control, cur_control2; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k056832; - running_device *k054338; - running_device *k055555; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k056832; + device_t *k054338; + device_t *k055555; }; /*----------- defined in video/bishi.c -----------*/ diff --git a/src/mame/includes/bking.h b/src/mame/includes/bking.h index f928a7d7f79..14ca5d06bd1 100644 --- a/src/mame/includes/bking.h +++ b/src/mame/includes/bking.h @@ -25,7 +25,7 @@ public: int addr_h, addr_l; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index 353ba35e344..8011e018531 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -21,9 +21,9 @@ public: int last_track[4]; /* devices */ - running_device *audiocpu; - running_device *k007342; - running_device *k007420; + device_t *audiocpu; + device_t *k007342; + device_t *k007420; }; diff --git a/src/mame/includes/blktiger.h b/src/mame/includes/blktiger.h index 3d2dc8c1a7a..2c938c3d9ce 100644 --- a/src/mame/includes/blktiger.h +++ b/src/mame/includes/blktiger.h @@ -29,8 +29,8 @@ public: UINT8 z80_latch, i8751_latch; /* devices */ - running_device *mcu; - running_device *audiocpu; + device_t *mcu; + device_t *audiocpu; }; diff --git a/src/mame/includes/blockhl.h b/src/mame/includes/blockhl.h index 5ba99dbd819..16526853ce3 100644 --- a/src/mame/includes/blockhl.h +++ b/src/mame/includes/blockhl.h @@ -22,10 +22,10 @@ public: int rombank; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/blockhl.c -----------*/ diff --git a/src/mame/includes/blockout.h b/src/mame/includes/blockout.h index f2d6d168eb6..8fc6beda47b 100644 --- a/src/mame/includes/blockout.h +++ b/src/mame/includes/blockout.h @@ -20,7 +20,7 @@ public: UINT16 color; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/blueprnt.h b/src/mame/includes/blueprnt.h index 4553d5d3189..ff6c7cefe74 100644 --- a/src/mame/includes/blueprnt.h +++ b/src/mame/includes/blueprnt.h @@ -25,7 +25,7 @@ public: int dipsw; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h index 92b7d5d98c0..022784aa16c 100644 --- a/src/mame/includes/bottom9.h +++ b/src/mame/includes/bottom9.h @@ -22,13 +22,13 @@ public: int nmienable; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232_1; - running_device *k007232_2; - running_device *k052109; - running_device *k051960; - running_device *k051316; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232_1; + device_t *k007232_2; + device_t *k052109; + device_t *k051960; + device_t *k051316; }; /*----------- defined in video/bottom9.c -----------*/ diff --git a/src/mame/includes/brkthru.h b/src/mame/includes/brkthru.h index bb4d1d3680b..5083928f0ab 100644 --- a/src/mame/includes/brkthru.h +++ b/src/mame/includes/brkthru.h @@ -26,8 +26,8 @@ public: //UINT8 *brkthru_nmi_enable; /* needs to be tracked down */ /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 2c8001726c7..7f20d7e05ef 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -40,8 +40,8 @@ public: int protection_ret; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 87e3de11c1a..e2c4287616d 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -38,10 +38,10 @@ public: int ic43_a, ic43_b; /* devices */ - running_device *maincpu; - running_device *mcu; - running_device *audiocpu; - running_device *slave; + device_t *maincpu; + device_t *mcu; + device_t *audiocpu; + device_t *slave; }; diff --git a/src/mame/includes/buggychl.h b/src/mame/includes/buggychl.h index b3b0f20f74d..324b3faa04d 100644 --- a/src/mame/includes/buggychl.h +++ b/src/mame/includes/buggychl.h @@ -27,7 +27,7 @@ public: int sound_nmi_enable, pending_nmi; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/bwing.h b/src/mame/includes/bwing.h index 1c36178c028..9955055b1cb 100644 --- a/src/mame/includes/bwing.h +++ b/src/mame/includes/bwing.h @@ -37,9 +37,9 @@ public: int coin; /* device */ - running_device *maincpu; - running_device *subcpu; - running_device *audiocpu; + device_t *maincpu; + device_t *subcpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index 11b5b679117..18c17004b70 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -24,8 +24,8 @@ public: UINT8 last_trackball_val[2]; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/capbowl.c -----------*/ diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h index a63768863f3..59d07dba116 100644 --- a/src/mame/includes/carpolo.h +++ b/src/mame/includes/carpolo.h @@ -13,7 +13,7 @@ extern const pia6821_interface carpolo_pia0_intf; extern const pia6821_interface carpolo_pia1_intf; -void carpolo_74148_3s_cb(running_device *device); +void carpolo_74148_3s_cb(device_t *device); WRITE_LINE_DEVICE_HANDLER( carpolo_7474_2s_1_q_cb ); WRITE_LINE_DEVICE_HANDLER( carpolo_7474_2s_2_q_cb ); diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index f0868f09aa5..152a5e9cc66 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -110,8 +110,8 @@ public: int hopper; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/cave.c -----------*/ diff --git a/src/mame/includes/cbuster.h b/src/mame/includes/cbuster.h index 79f42a9a624..6086a0e2974 100644 --- a/src/mame/includes/cbuster.h +++ b/src/mame/includes/cbuster.h @@ -22,9 +22,9 @@ public: int pri; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h index 094c2481a03..e6e62aba70f 100644 --- a/src/mame/includes/champbas.h +++ b/src/mame/includes/champbas.h @@ -29,9 +29,9 @@ public: int watchdog_count; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; diff --git a/src/mame/includes/changela.h b/src/mame/includes/changela.h index 2ff3492d474..afdf17d012b 100644 --- a/src/mame/includes/changela.h +++ b/src/mame/includes/changela.h @@ -46,7 +46,7 @@ public: UINT8 mcu_pc_0; /* devices */ - running_device *mcu; + device_t *mcu; }; /*----------- defined in video/changela.c -----------*/ diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index 98e005fbbfa..81d47f8f09e 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -21,8 +21,8 @@ public: bitmap_t *bitmap_buffer; /* devices */ - running_device *maincpu; - running_device *dac; + device_t *maincpu; + device_t *dac; }; diff --git a/src/mame/includes/chqflag.h b/src/mame/includes/chqflag.h index 37a06656492..8aad90d545f 100644 --- a/src/mame/includes/chqflag.h +++ b/src/mame/includes/chqflag.h @@ -24,13 +24,13 @@ public: int accel, wheel; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232_1; - running_device *k007232_2; - running_device *k051960; - running_device *k051316_1; - running_device *k051316_2; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232_1; + device_t *k007232_2; + device_t *k051960; + device_t *k051316_1; + device_t *k051316_2; }; /*----------- defined in video/chqflag.c -----------*/ diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h index e24e0f1b6fa..6981b955e68 100644 --- a/src/mame/includes/cidelsa.h +++ b/src/mame/includes/cidelsa.h @@ -37,7 +37,7 @@ public: required_device m_maincpu; required_device m_vis; - optional_device m_psg; + optional_device m_psg; virtual void machine_reset(); diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h index 925ead45a27..6b7fc89ef43 100644 --- a/src/mame/includes/cinemat.h +++ b/src/mame/includes/cinemat.h @@ -34,7 +34,7 @@ MACHINE_CONFIG_EXTERN( qb3_sound ); /*----------- defined in video/cinemat.c -----------*/ -void cinemat_vector_callback(running_device *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); +void cinemat_vector_callback(device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift); WRITE8_HANDLER( cinemat_vector_control_w ); VIDEO_START( cinemat_bilevel ); diff --git a/src/mame/includes/circus.h b/src/mame/includes/circus.h index edb109a95f7..e30df351e1a 100644 --- a/src/mame/includes/circus.h +++ b/src/mame/includes/circus.h @@ -20,9 +20,9 @@ public: int clown_x, clown_y, clown_z; /* devices */ - running_device *maincpu; - running_device *samples; - running_device *discrete; + device_t *maincpu; + device_t *samples; + device_t *discrete; /* game id */ int game_id; diff --git a/src/mame/includes/circusc.h b/src/mame/includes/circusc.h index 755ba4f8273..4dbe5a5206e 100644 --- a/src/mame/includes/circusc.h +++ b/src/mame/includes/circusc.h @@ -27,10 +27,10 @@ public: /* devices */ cpu_device *audiocpu; - running_device *sn1; - running_device *sn2; - running_device *dac; - running_device *discrete; + device_t *sn1; + device_t *sn2; + device_t *dac; + device_t *discrete; }; diff --git a/src/mame/includes/citycon.h b/src/mame/includes/citycon.h index 6384ae86494..7de461ee5c2 100644 --- a/src/mame/includes/citycon.h +++ b/src/mame/includes/citycon.h @@ -23,7 +23,7 @@ public: int bg_image; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/combatsc.h b/src/mame/includes/combatsc.h index 3be223ff678..e0ed1070111 100644 --- a/src/mame/includes/combatsc.h +++ b/src/mame/includes/combatsc.h @@ -37,8 +37,8 @@ public: /* devices */ cpu_device *audiocpu; - running_device *k007121_1; - running_device *k007121_2; + device_t *k007121_1; + device_t *k007121_2; }; diff --git a/src/mame/includes/commando.h b/src/mame/includes/commando.h index 3ae0f1c2782..b3e19ff4b63 100644 --- a/src/mame/includes/commando.h +++ b/src/mame/includes/commando.h @@ -23,7 +23,7 @@ public: UINT8 scroll_y[2]; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index 42a178a97fa..bca9b339c3d 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -27,9 +27,9 @@ public: rectangle bg_clip, fg_clip, tx_clip; /* devices */ - running_device *audiocpu; - running_device *k007121_1; - running_device *k007121_2; + device_t *audiocpu; + device_t *k007121_1; + device_t *k007121_2; }; diff --git a/src/mame/includes/coolpool.h b/src/mame/includes/coolpool.h index 086909a0c04..67a9ee10d21 100644 --- a/src/mame/includes/coolpool.h +++ b/src/mame/includes/coolpool.h @@ -23,6 +23,6 @@ public: UINT16 result; UINT16 lastresult; - running_device *maincpu; - running_device *dsp; + device_t *maincpu; + device_t *dsp; }; diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h index 8a976d0f0a6..92cd77a80e6 100644 --- a/src/mame/includes/cosmic.h +++ b/src/mame/includes/cosmic.h @@ -34,8 +34,8 @@ public: UINT32 pixel_clock; /* devices */ - running_device *samples; - running_device *dac; + device_t *samples; + device_t *dac; }; diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h index f4f99ca5e3b..5fae066a9d5 100644 --- a/src/mame/includes/cps1.h +++ b/src/mame/includes/cps1.h @@ -127,10 +127,10 @@ public: int cps_version; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *msm_1; // fcrash - running_device *msm_2; // fcrash + device_t *maincpu; + device_t *audiocpu; + device_t *msm_1; // fcrash + device_t *msm_2; // fcrash }; /*----------- defined in drivers/cps1.c -----------*/ diff --git a/src/mame/includes/crbaloon.h b/src/mame/includes/crbaloon.h index ccac5d0ff7d..3b010201dfa 100644 --- a/src/mame/includes/crbaloon.h +++ b/src/mame/includes/crbaloon.h @@ -12,9 +12,9 @@ Crazy Ballooon WRITE8_DEVICE_HANDLER( crbaloon_audio_set_music_freq ); WRITE8_DEVICE_HANDLER( crbaloon_audio_set_music_enable ); -void crbaloon_audio_set_explosion_enable(running_device *sn, int enabled); -void crbaloon_audio_set_breath_enable(running_device *sn, int enabled); -void crbaloon_audio_set_appear_enable(running_device *sn, int enabled); +void crbaloon_audio_set_explosion_enable(device_t *sn, int enabled); +void crbaloon_audio_set_breath_enable(device_t *sn, int enabled); +void crbaloon_audio_set_appear_enable(device_t *sn, int enabled); WRITE8_DEVICE_HANDLER( crbaloon_audio_set_laugh_enable ); MACHINE_CONFIG_EXTERN( crbaloon_audio ); diff --git a/src/mame/includes/crgolf.h b/src/mame/includes/crgolf.h index 863b80eefe7..eae3f887c4f 100644 --- a/src/mame/includes/crgolf.h +++ b/src/mame/includes/crgolf.h @@ -29,8 +29,8 @@ public: UINT8 sample_count; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/crgolf.c -----------*/ diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index 9b634fe88a1..50be912ef51 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -17,11 +17,11 @@ public: int layer_colorbase[3], sprite_colorbase; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/crimfght.c -----------*/ diff --git a/src/mame/includes/crospang.h b/src/mame/includes/crospang.h index de5a6aff77a..25b1b19c320 100644 --- a/src/mame/includes/crospang.h +++ b/src/mame/includes/crospang.h @@ -23,7 +23,7 @@ public: int bestri_tilebank; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/crshrace.h b/src/mame/includes/crshrace.h index 14170f9eb04..1278ba64bf0 100644 --- a/src/mame/includes/crshrace.h +++ b/src/mame/includes/crshrace.h @@ -20,8 +20,8 @@ public: int pending_command; /* devices */ - running_device *audiocpu; - running_device *k053936; + device_t *audiocpu; + device_t *k053936; }; /*----------- defined in video/crshrace.c -----------*/ diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 27114d522c3..53d3b8295f3 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -57,14 +57,14 @@ public: UINT8 page, io_page; // quasar /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *speech; - running_device *dac3; - running_device *tms; - running_device *s2636_0; - running_device *s2636_1; - running_device *s2636_2; + device_t *maincpu; + device_t *audiocpu; + device_t *speech; + device_t *dac3; + device_t *tms; + device_t *s2636_0; + device_t *s2636_1; + device_t *s2636_2; }; /*----------- defined in drivers/cvs.c -----------*/ diff --git a/src/mame/includes/darius.h b/src/mame/includes/darius.h index 662f708a6e0..220ff8803a6 100644 --- a/src/mame/includes/darius.h +++ b/src/mame/includes/darius.h @@ -32,35 +32,35 @@ public: UINT8 pan[DARIUS_PAN_MAX]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *cpub; - running_device *adpcm; - running_device *tc0140syt; - running_device *pc080sn; + device_t *maincpu; + device_t *audiocpu; + device_t *cpub; + device_t *adpcm; + device_t *tc0140syt; + device_t *pc080sn; - running_device *lscreen; - running_device *mscreen; - running_device *rscreen; + device_t *lscreen; + device_t *mscreen; + device_t *rscreen; - running_device *filter0_0l; - running_device *filter0_0r; - running_device *filter0_1l; - running_device *filter0_1r; - running_device *filter0_2l; - running_device *filter0_2r; - running_device *filter0_3l; - running_device *filter0_3r; - running_device *filter1_0l; - running_device *filter1_0r; - running_device *filter1_1l; - running_device *filter1_1r; - running_device *filter1_2l; - running_device *filter1_2r; - running_device *filter1_3l; - running_device *filter1_3r; - running_device *msm5205_l; - running_device *msm5205_r; + device_t *filter0_0l; + device_t *filter0_0r; + device_t *filter0_1l; + device_t *filter0_1r; + device_t *filter0_2l; + device_t *filter0_2r; + device_t *filter0_3l; + device_t *filter0_3r; + device_t *filter1_0l; + device_t *filter1_0r; + device_t *filter1_1l; + device_t *filter1_1r; + device_t *filter1_2l; + device_t *filter1_2r; + device_t *filter1_3l; + device_t *filter1_3r; + device_t *msm5205_l; + device_t *msm5205_r; }; diff --git a/src/mame/includes/dbz.h b/src/mame/includes/dbz.h index 31a78a7900f..6fedd64f247 100644 --- a/src/mame/includes/dbz.h +++ b/src/mame/includes/dbz.h @@ -23,13 +23,13 @@ public: int control; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053246; - running_device *k053251; - running_device *k056832; - running_device *k053936_1; - running_device *k053936_2; + device_t *maincpu; + device_t *audiocpu; + device_t *k053246; + device_t *k053251; + device_t *k056832; + device_t *k053936_1; + device_t *k053936_2; }; diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h index c22f4a9a342..1955cdf2a0d 100644 --- a/src/mame/includes/dcheese.h +++ b/src/mame/includes/dcheese.h @@ -27,9 +27,9 @@ public: UINT8 sound_msb_latch; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *bsmt; + device_t *maincpu; + device_t *audiocpu; + device_t *bsmt; }; diff --git a/src/mame/includes/dday.h b/src/mame/includes/dday.h index cf4d652ebd6..eb60471b9f7 100644 --- a/src/mame/includes/dday.h +++ b/src/mame/includes/dday.h @@ -26,7 +26,7 @@ public: int timer_value; /* devices */ - running_device *ay1; + device_t *ay1; }; diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 0b44c719b05..a5c0e5bae57 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -48,11 +48,11 @@ public: #endif /* devices */ - running_device *maincpu; - running_device *snd_cpu; - running_device *sub_cpu; - running_device *adpcm_1; - running_device *adpcm_2; + device_t *maincpu; + device_t *snd_cpu; + device_t *sub_cpu; + device_t *adpcm_1; + device_t *adpcm_2; }; diff --git a/src/mame/includes/ddragon3.h b/src/mame/includes/ddragon3.h index 4cd8cb30e6c..258365da449 100644 --- a/src/mame/includes/ddragon3.h +++ b/src/mame/includes/ddragon3.h @@ -30,8 +30,8 @@ public: UINT16 io_reg[8]; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/ddribble.h b/src/mame/includes/ddribble.h index 456c1483c38..18296bc84d9 100644 --- a/src/mame/includes/ddribble.h +++ b/src/mame/includes/ddribble.h @@ -28,9 +28,9 @@ public: int int_enable_0, int_enable_1; /* devices */ - running_device *filter1; - running_device *filter2; - running_device *filter3; + device_t *filter1; + device_t *filter2; + device_t *filter3; }; /*----------- defined in video/ddribble.c -----------*/ diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index d857e2dd217..13e80036402 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -31,10 +31,10 @@ public: int toggle; /* devices */ - running_device *maincpu; - running_device *subcpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *subcpu; + device_t *audiocpu; + device_t *mcu; }; /*----------- defined in video/dec8.c -----------*/ diff --git a/src/mame/includes/deniam.h b/src/mame/includes/deniam.h index 2c7a0e0afb4..de8b73b0960 100644 --- a/src/mame/includes/deniam.h +++ b/src/mame/includes/deniam.h @@ -29,7 +29,7 @@ public: UINT16 coinctrl; /* devices */ - running_device *audio_cpu; // system 16c does not have sound CPU + device_t *audio_cpu; // system 16c does not have sound CPU }; diff --git a/src/mame/includes/dietgo.h b/src/mame/includes/dietgo.h index 9525b055ecc..0f8bc3468c0 100644 --- a/src/mame/includes/dietgo.h +++ b/src/mame/includes/dietgo.h @@ -18,9 +18,9 @@ public: size_t spriteram_size; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/djboy.h b/src/mame/includes/djboy.h index 6195f12e0dd..9b6698bd78b 100644 --- a/src/mame/includes/djboy.h +++ b/src/mame/includes/djboy.h @@ -35,11 +35,11 @@ public: UINT8 beast_p3; /* devices */ - running_device *maincpu; - running_device *cpu1; - running_device *cpu2; - running_device *pandora; - running_device *beast; + device_t *maincpu; + device_t *cpu1; + device_t *cpu2; + device_t *pandora; + device_t *beast; }; diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index 0eb8a611858..ecddf53c37d 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -81,10 +81,10 @@ public: size_t sprite_ram_size; /* devices */ - running_device *dev_n2a03a; - running_device *dev_n2a03b; - running_device *dev_vp2; /* virtual port 2 */ - running_device *dev_6h; + device_t *dev_n2a03a; + device_t *dev_n2a03b; + device_t *dev_vp2; /* virtual port 2 */ + device_t *dev_6h; #if 0 /* machine states */ diff --git a/src/mame/includes/dogfgt.h b/src/mame/includes/dogfgt.h index 63ae137507a..c87cfd44a07 100644 --- a/src/mame/includes/dogfgt.h +++ b/src/mame/includes/dogfgt.h @@ -28,7 +28,7 @@ public: int soundlatch, last_snd_ctrl; /* devices */ - running_device *subcpu; + device_t *subcpu; }; diff --git a/src/mame/includes/dragrace.h b/src/mame/includes/dragrace.h index d1af6c4fdda..3d4901c33e8 100644 --- a/src/mame/includes/dragrace.h +++ b/src/mame/includes/dragrace.h @@ -40,7 +40,7 @@ public: int gear[2]; /* devices */ - running_device *discrete; + device_t *discrete; }; diff --git a/src/mame/includes/dribling.h b/src/mame/includes/dribling.h index 530a52c5fad..341cba331c2 100644 --- a/src/mame/includes/dribling.h +++ b/src/mame/includes/dribling.h @@ -23,9 +23,9 @@ public: UINT8 di; /* devices */ - running_device *maincpu; - running_device *ppi_0; - running_device *ppi_1; + device_t *maincpu; + device_t *ppi_0; + device_t *ppi_1; }; diff --git a/src/mame/includes/drmicro.h b/src/mame/includes/drmicro.h index f87b8ec29fd..2d3b266b97b 100644 --- a/src/mame/includes/drmicro.h +++ b/src/mame/includes/drmicro.h @@ -23,7 +23,7 @@ public: int pcm_adr; /* devices */ - running_device *msm; + device_t *msm; }; diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index a410097f877..76b5cc16593 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -118,13 +118,13 @@ public: /* devices */ - running_device *maincpu; - running_device *soundcpu; - running_device *rtc; - running_device *ymsnd; + device_t *maincpu; + device_t *soundcpu; + device_t *rtc; + device_t *ymsnd; okim6295_device *oki; - running_device *top_scr; - running_device *bot_scr; + device_t *top_scr; + device_t *bot_scr; }; //----------- defined in drivers/dynax.c ----------- diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h index d7d508bb32e..e3e08f5fd87 100644 --- a/src/mame/includes/equites.h +++ b/src/mame/includes/equites.h @@ -37,11 +37,11 @@ public: #endif /* devices */ - running_device *mcu; - running_device *audio_cpu; - running_device *msm; - running_device *dac_1; - running_device *dac_2; + device_t *mcu; + device_t *audio_cpu; + device_t *msm; + device_t *dac_1; + device_t *dac_2; }; diff --git a/src/mame/includes/esd16.h b/src/mame/includes/esd16.h index 4a147644939..18164fb932a 100644 --- a/src/mame/includes/esd16.h +++ b/src/mame/includes/esd16.h @@ -28,8 +28,8 @@ public: int tilemap0_color; /* devices */ - running_device *audio_cpu; - running_device *eeprom; + device_t *audio_cpu; + device_t *eeprom; }; diff --git a/src/mame/includes/espial.h b/src/mame/includes/espial.h index b818d57db59..efa39a8f0e8 100644 --- a/src/mame/includes/espial.h +++ b/src/mame/includes/espial.h @@ -26,8 +26,8 @@ public: UINT8 sound_nmi_enabled; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/espial.c -----------*/ diff --git a/src/mame/includes/exerion.h b/src/mame/includes/exerion.h index fb34df2454e..bd2914f6846 100644 --- a/src/mame/includes/exerion.h +++ b/src/mame/includes/exerion.h @@ -44,7 +44,7 @@ public: UINT8 portb; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/exprraid.h b/src/mame/includes/exprraid.h index 8bec3cedbeb..abd90c6250d 100644 --- a/src/mame/includes/exprraid.h +++ b/src/mame/includes/exprraid.h @@ -26,8 +26,8 @@ public: //int coin; // used in the commented out INTERRUPT_GEN - can this be removed? /* devices */ - running_device *maincpu; - running_device *slave; + device_t *maincpu; + device_t *slave; }; diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h index c0b0dc42a8d..81b3a709089 100644 --- a/src/mame/includes/f1gp.h +++ b/src/mame/includes/f1gp.h @@ -32,8 +32,8 @@ public: int pending_command; /* devices */ - running_device *audiocpu; - running_device *k053936; + device_t *audiocpu; + device_t *k053936; }; /*----------- defined in video/f1gp.c -----------*/ diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h index f567e287b8b..4f9cf4e607c 100644 --- a/src/mame/includes/fantland.h +++ b/src/mame/includes/fantland.h @@ -20,11 +20,11 @@ public: int adpcm_nibble[4]; /* devices */ - running_device *audio_cpu; - running_device *msm1; - running_device *msm2; - running_device *msm3; - running_device *msm4; + device_t *audio_cpu; + device_t *msm1; + device_t *msm2; + device_t *msm3; + device_t *msm4; }; diff --git a/src/mame/includes/fastlane.h b/src/mame/includes/fastlane.h index 7dac2687110..cd1bd72882b 100644 --- a/src/mame/includes/fastlane.h +++ b/src/mame/includes/fastlane.h @@ -22,8 +22,8 @@ public: rectangle clip0, clip1; /* devices */ - running_device *konami2; - running_device *k007121; + device_t *konami2; + device_t *k007121; }; diff --git a/src/mame/includes/fcombat.h b/src/mame/includes/fcombat.h index 88d5f66dc02..bca6c634d24 100644 --- a/src/mame/includes/fcombat.h +++ b/src/mame/includes/fcombat.h @@ -46,7 +46,7 @@ public: int tx, ty; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index bfc77fa1804..fb531d50361 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -20,8 +20,8 @@ public: int prev_coin; /* devices */ - running_device *maincpu; - running_device *mb14241; + device_t *maincpu; + device_t *mb14241; }; diff --git a/src/mame/includes/finalizr.h b/src/mame/includes/finalizr.h index 59565a302de..e5d63358c1b 100644 --- a/src/mame/includes/finalizr.h +++ b/src/mame/includes/finalizr.h @@ -30,7 +30,7 @@ public: UINT8 nmi_enable, irq_enable; /* devices */ - running_device *audio_cpu; + device_t *audio_cpu; }; diff --git a/src/mame/includes/firetrap.h b/src/mame/includes/firetrap.h index 854e60b64b5..53c6c238ec5 100644 --- a/src/mame/includes/firetrap.h +++ b/src/mame/includes/firetrap.h @@ -32,9 +32,9 @@ public: int coin_command_pending; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *msm; + device_t *maincpu; + device_t *audiocpu; + device_t *msm; }; diff --git a/src/mame/includes/flkatck.h b/src/mame/includes/flkatck.h index 62709d89115..0d71d9acbec 100644 --- a/src/mame/includes/flkatck.h +++ b/src/mame/includes/flkatck.h @@ -23,8 +23,8 @@ public: int multiply_reg[2]; /* devices */ - running_device *audiocpu; - running_device *k007121; + device_t *audiocpu; + device_t *k007121; }; diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h index 05d75795b71..e4fadcb0df1 100644 --- a/src/mame/includes/flstory.h +++ b/src/mame/includes/flstory.h @@ -38,9 +38,9 @@ public: int mcu_select; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index 5d6257b9fef..dc8e307a0a3 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -21,11 +21,11 @@ public: UINT8 datalatch_2h, datalatch_2l; /* devices */ - running_device *audiocpu; - running_device *subcpu; - running_device *eeprom; - running_device *left_screen; - running_device *right_screen; + device_t *audiocpu; + device_t *subcpu; + device_t *eeprom; + device_t *left_screen; + device_t *right_screen; }; diff --git a/src/mame/includes/fromance.h b/src/mame/includes/fromance.h index ea8568ec5ab..2994e7d3498 100644 --- a/src/mame/includes/fromance.h +++ b/src/mame/includes/fromance.h @@ -40,7 +40,7 @@ public: UINT8 pending_command, sound_command; /* devices */ - running_device *subcpu; + device_t *subcpu; }; diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h index 59425373809..00ff523ef52 100644 --- a/src/mame/includes/funkyjet.h +++ b/src/mame/includes/funkyjet.h @@ -18,9 +18,9 @@ public: size_t spriteram_size; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/funybubl.h b/src/mame/includes/funybubl.h index 4980c5a21ba..8451b3f088c 100644 --- a/src/mame/includes/funybubl.h +++ b/src/mame/includes/funybubl.h @@ -11,7 +11,7 @@ public: UINT8 * paletteram; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/fuukifg2.h b/src/mame/includes/fuukifg2.h index a8eeac9b6f5..c67ddd4d5b7 100644 --- a/src/mame/includes/fuukifg2.h +++ b/src/mame/includes/fuukifg2.h @@ -25,8 +25,8 @@ public: emu_timer *raster_interrupt_timer; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/fuukifg3.h b/src/mame/includes/fuukifg3.h index bfa66e55978..0671b679e31 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -38,8 +38,8 @@ public: UINT8 shared_ram[16]; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h index 74c8f326e2d..707778a6f19 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -21,7 +21,7 @@ public: tilemap_t *tilemap[2]; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/gaiden.h b/src/mame/includes/gaiden.h index f811639fee7..1de400f7e60 100644 --- a/src/mame/includes/gaiden.h +++ b/src/mame/includes/gaiden.h @@ -31,7 +31,7 @@ public: const int *raiga_jumppoints; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/galspnbl.h b/src/mame/includes/galspnbl.h index b3d2cd73dad..c99ee3c656b 100644 --- a/src/mame/includes/galspnbl.h +++ b/src/mame/includes/galspnbl.h @@ -21,7 +21,7 @@ public: size_t spriteram_size; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/gameplan.h b/src/mame/includes/gameplan.h index 397bef9df28..f83d4bca17e 100644 --- a/src/mame/includes/gameplan.h +++ b/src/mame/includes/gameplan.h @@ -44,9 +44,9 @@ public: emu_timer *via_0_ca1_timer; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *riot; + device_t *maincpu; + device_t *audiocpu; + device_t *riot; required_device via_0; required_device via_1; required_device via_2; diff --git a/src/mame/includes/gbusters.h b/src/mame/includes/gbusters.h index 19c4d50ab6b..9da3877da54 100644 --- a/src/mame/includes/gbusters.h +++ b/src/mame/includes/gbusters.h @@ -22,11 +22,11 @@ public: int priority; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/gbusters.c -----------*/ diff --git a/src/mame/includes/gijoe.h b/src/mame/includes/gijoe.h index d366e8de12e..be4af4e86e4 100644 --- a/src/mame/includes/gijoe.h +++ b/src/mame/includes/gijoe.h @@ -25,12 +25,12 @@ public: emu_timer *dmadelay_timer; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539; - running_device *k056832; - running_device *k053246; - running_device *k053251; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539; + device_t *k056832; + device_t *k053246; + device_t *k053251; }; /*----------- defined in video/gijoe.c -----------*/ diff --git a/src/mame/includes/ginganin.h b/src/mame/includes/ginganin.h index 95a349f3e9a..3e89e108005 100644 --- a/src/mame/includes/ginganin.h +++ b/src/mame/includes/ginganin.h @@ -35,7 +35,7 @@ public: int MC6809_FLAG; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/goal92.h b/src/mame/includes/goal92.h index 12c96f89854..6878b6d45be 100644 --- a/src/mame/includes/goal92.h +++ b/src/mame/includes/goal92.h @@ -27,7 +27,7 @@ public: int adpcm_toggle; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/gotcha.h b/src/mame/includes/gotcha.h index 7647620a45f..2435da08406 100644 --- a/src/mame/includes/gotcha.h +++ b/src/mame/includes/gotcha.h @@ -23,7 +23,7 @@ public: UINT16 scroll[4]; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/gotya.h b/src/mame/includes/gotya.h index c57b1d63671..5ce5aa69041 100644 --- a/src/mame/includes/gotya.h +++ b/src/mame/includes/gotya.h @@ -20,7 +20,7 @@ public: int theme_playing; /* devices */ - running_device *samples; + device_t *samples; }; diff --git a/src/mame/includes/gradius3.h b/src/mame/includes/gradius3.h index 3584b40b55c..9f5bf403c93 100644 --- a/src/mame/includes/gradius3.h +++ b/src/mame/includes/gradius3.h @@ -22,12 +22,12 @@ public: int irqAen, irqBmask; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/gradius3.c -----------*/ diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index ae266d1cd90..b325f177342 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -180,8 +180,8 @@ MACHINE_RESET( harddriv ); INTERRUPT_GEN( hd68k_irq_gen ); WRITE16_HANDLER( hd68k_irq_ack_w ); -void hdgsp_irq_gen(running_device *device, int state); -void hdmsp_irq_gen(running_device *device, int state); +void hdgsp_irq_gen(device_t *device, int state); +void hdmsp_irq_gen(device_t *device, int state); READ16_HANDLER( hd68k_gsp_io_r ); WRITE16_HANDLER( hd68k_gsp_io_w ); @@ -254,7 +254,7 @@ READ16_HANDLER( hd68k_ds3_program_r ); WRITE16_HANDLER( hd68k_ds3_program_w ); /* DSK board */ -void hddsk_update_pif(running_device *device, UINT32 pins); +void hddsk_update_pif(device_t *device, UINT32 pins); WRITE16_HANDLER( hd68k_dsk_control_w ); READ16_HANDLER( hd68k_dsk_ram_r ); WRITE16_HANDLER( hd68k_dsk_ram_w ); diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h index d02684d3f23..9ca4dc6b8ee 100644 --- a/src/mame/includes/hcastle.h +++ b/src/mame/includes/hcastle.h @@ -24,9 +24,9 @@ public: int gfx_bank; /* devices */ - running_device *audiocpu; - running_device *k007121_1; - running_device *k007121_2; + device_t *audiocpu; + device_t *k007121_1; + device_t *k007121_2; }; diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index adeab173b10..a2cc1b5d7ff 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -21,7 +21,7 @@ public: int flipscreen; /* devices */ - running_device *subcpu; + device_t *subcpu; }; diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index 2164b571e0d..3641f02ed19 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -30,11 +30,11 @@ public: int to_cpu, from_cpu; /* device */ - running_device *maincpu; - running_device *audiocpu; - running_device *dac; - running_device *ym; - running_device *sn; + device_t *maincpu; + device_t *audiocpu; + device_t *dac; + device_t *ym; + device_t *sn; }; diff --git a/src/mame/includes/hyprduel.h b/src/mame/includes/hyprduel.h index ccf22ca828d..02c5415f086 100644 --- a/src/mame/includes/hyprduel.h +++ b/src/mame/includes/hyprduel.h @@ -43,8 +43,8 @@ public: int int_num; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/includes/inufuku.h b/src/mame/includes/inufuku.h index ef2ffd706da..d20e61cbd97 100644 --- a/src/mame/includes/inufuku.h +++ b/src/mame/includes/inufuku.h @@ -25,7 +25,7 @@ public: UINT16 pending_command; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index f2299ad1fb8..c4d152c743f 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -24,7 +24,7 @@ public: int palettebank, charbank, spriterambank; /* devices */ - running_device *soundcpu; + device_t *soundcpu; }; diff --git a/src/mame/includes/jackal.h b/src/mame/includes/jackal.h index 7d3525f0160..49c796c305d 100644 --- a/src/mame/includes/jackal.h +++ b/src/mame/includes/jackal.h @@ -24,8 +24,8 @@ public: UINT8 *spritebank; /* devices */ - running_device *mastercpu; - running_device *slavecpu; + device_t *mastercpu; + device_t *slavecpu; }; diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h index 93941ae16d8..07ec2da851e 100644 --- a/src/mame/includes/jaguar.h +++ b/src/mame/includes/jaguar.h @@ -35,7 +35,7 @@ void jaguar_dsp_resume(running_machine *machine); void cojag_sound_init(running_machine *machine); -void jaguar_external_int(running_device *device, int state); +void jaguar_external_int(device_t *device, int state); READ16_HANDLER( jaguar_jerry_regs_r ); WRITE16_HANDLER( jaguar_jerry_regs_w ); @@ -53,8 +53,8 @@ extern UINT8 blitter_status; void jaguar_gpu_suspend(running_machine *machine); void jaguar_gpu_resume(running_machine *machine); -void jaguar_gpu_cpu_int(running_device *device); -void jaguar_dsp_cpu_int(running_device *device); +void jaguar_gpu_cpu_int(device_t *device); +void jaguar_dsp_cpu_int(device_t *device); READ32_HANDLER( jaguar_blitter_r ); WRITE32_HANDLER( jaguar_blitter_w ); diff --git a/src/mame/includes/karnov.h b/src/mame/includes/karnov.h index c6af763e074..ba564fff0c8 100644 --- a/src/mame/includes/karnov.h +++ b/src/mame/includes/karnov.h @@ -29,8 +29,8 @@ public: int latch; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; enum { diff --git a/src/mame/includes/kchamp.h b/src/mame/includes/kchamp.h index 42f1dc06c33..304b2575d60 100644 --- a/src/mame/includes/kchamp.h +++ b/src/mame/includes/kchamp.h @@ -27,7 +27,7 @@ public: int counter; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/kingobox.h b/src/mame/includes/kingobox.h index 196e283c0b7..a30bf22bccb 100644 --- a/src/mame/includes/kingobox.h +++ b/src/mame/includes/kingobox.h @@ -27,9 +27,9 @@ public: int nmi_enable; /* devices */ - running_device *video_cpu; - running_device *sprite_cpu; - running_device *audio_cpu; + device_t *video_cpu; + device_t *sprite_cpu; + device_t *audio_cpu; }; diff --git a/src/mame/includes/kncljoe.h b/src/mame/includes/kncljoe.h index a4bb00e7e87..ac4de2f3442 100644 --- a/src/mame/includes/kncljoe.h +++ b/src/mame/includes/kncljoe.h @@ -25,7 +25,7 @@ public: UINT8 port1, port2; /* devices */ - running_device *soundcpu; + device_t *soundcpu; }; diff --git a/src/mame/includes/kopunch.h b/src/mame/includes/kopunch.h index ed8d33f2ac7..92e3b598e2a 100644 --- a/src/mame/includes/kopunch.h +++ b/src/mame/includes/kopunch.h @@ -22,7 +22,7 @@ public: int gfxbank; /* devices */ - running_device *maincpu; + device_t *maincpu; }; /*----------- defined in video/kopunch.c -----------*/ diff --git a/src/mame/includes/kyugo.h b/src/mame/includes/kyugo.h index 07acb4e746d..f29fc279ca6 100644 --- a/src/mame/includes/kyugo.h +++ b/src/mame/includes/kyugo.h @@ -26,8 +26,8 @@ public: const UINT8 *color_codes; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/includes/labyrunr.h b/src/mame/includes/labyrunr.h index ed157f81678..1061e61642f 100644 --- a/src/mame/includes/labyrunr.h +++ b/src/mame/includes/labyrunr.h @@ -22,7 +22,7 @@ public: rectangle clip0, clip1; /* devices */ - running_device *k007121; + device_t *k007121; }; diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h index 11914e557c1..11365909012 100644 --- a/src/mame/includes/ladybug.h +++ b/src/mame/includes/ladybug.h @@ -38,7 +38,7 @@ public: UINT8 sraider_0x30, sraider_0x38; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/ladyfrog.h b/src/mame/includes/ladyfrog.h index 2035164d234..7a3fbbe72a0 100644 --- a/src/mame/includes/ladyfrog.h +++ b/src/mame/includes/ladyfrog.h @@ -29,7 +29,7 @@ public: UINT8 snd_data; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h index 4e9e667297a..1df2b83057a 100644 --- a/src/mame/includes/laserbat.h +++ b/src/mame/includes/laserbat.h @@ -34,16 +34,16 @@ public: int degr, filt, a, us, bit14; /* device */ - running_device *audiocpu; - running_device *s2636_1; - running_device *s2636_2; - running_device *s2636_3; - running_device *pia; - running_device *sn; - running_device *tms1; - running_device *tms2; - running_device *ay1; - running_device *ay2; + device_t *audiocpu; + device_t *s2636_1; + device_t *s2636_2; + device_t *s2636_3; + device_t *pia; + device_t *sn; + device_t *tms1; + device_t *tms2; + device_t *ay1; + device_t *ay2; }; diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index 1a85ec8d2d6..c209857dbaa 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -27,10 +27,10 @@ public: UINT8 track_enable; /* used by wwjgtin */ /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *sn_1; - running_device *sn_2; + device_t *maincpu; + device_t *audiocpu; + device_t *sn_1; + device_t *sn_2; }; diff --git a/src/mame/includes/lastduel.h b/src/mame/includes/lastduel.h index a094c55aa99..3034f584b3b 100644 --- a/src/mame/includes/lastduel.h +++ b/src/mame/includes/lastduel.h @@ -23,7 +23,7 @@ public: int sprite_flipy_mask, sprite_pri_mask, tilemap_priority; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; /*----------- defined in video/lastduel.c -----------*/ diff --git a/src/mame/includes/lazercmd.h b/src/mame/includes/lazercmd.h index 1003314d13c..0e90b7d175d 100644 --- a/src/mame/includes/lazercmd.h +++ b/src/mame/includes/lazercmd.h @@ -34,7 +34,7 @@ public: int timer_count, sense_state, dac_data; /* device */ - running_device *dac; + device_t *dac; }; diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index 34d7b883790..33f61dbd524 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -103,7 +103,7 @@ DECLARE_LEGACY_SOUND_DEVICE(LELAND, leland_sound); DECLARE_LEGACY_SOUND_DEVICE(LELAND_80186, leland_80186_sound); DECLARE_LEGACY_SOUND_DEVICE(REDLINE_80186, redline_80186_sound); -void leland_dac_update(running_device *device, int dacnum, UINT8 sample); +void leland_dac_update(device_t *device, int dacnum, UINT8 sample); READ8_DEVICE_HANDLER( leland_80186_response_r ); diff --git a/src/mame/includes/lemmings.h b/src/mame/includes/lemmings.h index db6f5e8c4ab..63cd2008edc 100644 --- a/src/mame/includes/lemmings.h +++ b/src/mame/includes/lemmings.h @@ -21,7 +21,7 @@ public: UINT8 *vram_buffer; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/lethal.h b/src/mame/includes/lethal.h index 888a9bb9527..e5a593d159d 100644 --- a/src/mame/includes/lethal.h +++ b/src/mame/includes/lethal.h @@ -20,12 +20,12 @@ public: UINT8 cur_control2; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539; - running_device *k056832; - running_device *k053244; - running_device *k054000; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539; + device_t *k056832; + device_t *k053244; + device_t *k054000; }; /*----------- defined in video/lethal.c -----------*/ diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index 837fb076e75..0350b8f97f3 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -23,8 +23,8 @@ public: tilemap_t *back_tilemap; tilemap_t *fix_tilemap; - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/lkage.h b/src/mame/includes/lkage.h index efe39f87e51..cf3291aa7e8 100644 --- a/src/mame/includes/lkage.h +++ b/src/mame/includes/lkage.h @@ -32,9 +32,9 @@ public: int mcu_ready; /* cpu data/mcu ready status */ /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; /*----------- defined in machine/lkage.c -----------*/ diff --git a/src/mame/includes/lockon.h b/src/mame/includes/lockon.h index 31622ae197f..c6dec719075 100644 --- a/src/mame/includes/lockon.h +++ b/src/mame/includes/lockon.h @@ -63,16 +63,16 @@ public: UINT32 main_inten; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *ground; - running_device *object; - running_device *f2203_1l; - running_device *f2203_2l; - running_device *f2203_3l; - running_device *f2203_1r; - running_device *f2203_2r; - running_device *f2203_3r; + device_t *maincpu; + device_t *audiocpu; + device_t *ground; + device_t *object; + device_t *f2203_1l; + device_t *f2203_2l; + device_t *f2203_3l; + device_t *f2203_1r; + device_t *f2203_2r; + device_t *f2203_3r; }; diff --git a/src/mame/includes/lsasquad.h b/src/mame/includes/lsasquad.h index d78282b2701..2b5fd6134d9 100644 --- a/src/mame/includes/lsasquad.h +++ b/src/mame/includes/lsasquad.h @@ -23,9 +23,9 @@ public: UINT8 port_b_in, port_b_out, ddr_b; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; /*----------- defined in machine/lsasquad.c -----------*/ diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index c0fd5d9521f..7b227a3b3be 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -56,10 +56,10 @@ public: int last; /* devices */ - running_device *maincpu; - running_device *ic8j1; - running_device *ic8j2; - running_device *samples; + device_t *maincpu; + device_t *ic8j1; + device_t *ic8j2; + device_t *samples; }; diff --git a/src/mame/includes/macrossp.h b/src/mame/includes/macrossp.h index 0f5a611d2ed..b756a6c4cfc 100644 --- a/src/mame/includes/macrossp.h +++ b/src/mame/includes/macrossp.h @@ -35,8 +35,8 @@ public: INT32 fade_effect, old_fade; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/macrossp.c -----------*/ diff --git a/src/mame/includes/madmotor.h b/src/mame/includes/madmotor.h index 6135e5f7a5b..5ea4045bd43 100644 --- a/src/mame/includes/madmotor.h +++ b/src/mame/includes/madmotor.h @@ -27,8 +27,8 @@ public: int flipscreen; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 8137c12ff55..817ab673f04 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -20,12 +20,12 @@ public: int nmi_enable; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *upd; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *upd; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; /*----------- defined in video/mainevt.c -----------*/ diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h index 6684a279dda..c2a372403eb 100644 --- a/src/mame/includes/malzak.h +++ b/src/mame/includes/malzak.h @@ -20,9 +20,9 @@ public: int collision_counter; /* devices */ - running_device *s2636_0; - running_device *s2636_1; - running_device *saa5050; + device_t *s2636_0; + device_t *s2636_1; + device_t *saa5050; }; diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 0cc086a6bb6..c4e35ecf6cb 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -16,8 +16,8 @@ public: UINT8 marineb_active_low_flipscreen; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/matmania.h b/src/mame/includes/matmania.h index 6a8f0aa31fa..84fedf3177d 100644 --- a/src/mame/includes/matmania.h +++ b/src/mame/includes/matmania.h @@ -34,9 +34,9 @@ public: int mcu_sent, main_sent; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; /*----------- defined in machine/maniach.c -----------*/ diff --git a/src/mame/includes/mcatadv.h b/src/mame/includes/mcatadv.h index 05e6c3b492b..7293038703f 100644 --- a/src/mame/includes/mcatadv.h +++ b/src/mame/includes/mcatadv.h @@ -22,8 +22,8 @@ public: int palette_bank1, palette_bank2; /* devices */ - running_device *maincpu; - running_device *soundcpu; + device_t *maincpu; + device_t *soundcpu; }; /*----------- defined in video/mcatadv.c -----------*/ diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index b8d14d94f5a..5a9925c3c9a 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -37,9 +37,9 @@ public: UINT8 adpcm_play_reg; /* devices */ - running_device *maincpu; - running_device *ay1; - running_device *ay2; + device_t *maincpu; + device_t *ay1; + device_t *ay2; }; diff --git a/src/mame/includes/metlclsh.h b/src/mame/includes/metlclsh.h index e09e6a94647..dbcff37c864 100644 --- a/src/mame/includes/metlclsh.h +++ b/src/mame/includes/metlclsh.h @@ -25,8 +25,8 @@ public: UINT8 write_mask, gfxbank; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/includes/mexico86.h b/src/mame/includes/mexico86.h index de6248790d2..09787cdd9d5 100644 --- a/src/mame/includes/mexico86.h +++ b/src/mame/includes/mexico86.h @@ -24,10 +24,10 @@ public: int coin_last; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *mcu; }; diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h index 832ef82e063..5a6b88ff8da 100644 --- a/src/mame/includes/micro3d.h +++ b/src/mame/includes/micro3d.h @@ -56,7 +56,7 @@ public: } mc68901; UINT16 *shared_ram; - running_device *duart68681; + device_t *duart68681; UINT8 m68681_tx0; /* Sound */ @@ -154,10 +154,10 @@ WRITE32_HANDLER( micro3d_mac1_w ); WRITE32_HANDLER( micro3d_mac2_w ); READ32_HANDLER( micro3d_mac2_r ); -void micro3d_duart_irq_handler(running_device *device, UINT8 vector); -UINT8 micro3d_duart_input_r(running_device *device); -void micro3d_duart_output_w(running_device *device, UINT8 data); -void micro3d_duart_tx(running_device *device, int channel, UINT8 data); +void micro3d_duart_irq_handler(device_t *device, UINT8 vector); +UINT8 micro3d_duart_input_r(device_t *device); +void micro3d_duart_output_w(device_t *device, UINT8 data); +void micro3d_duart_tx(device_t *device, int channel, UINT8 data); MACHINE_RESET( micro3d ); DRIVER_INIT( micro3d ); @@ -182,7 +182,7 @@ DECLARE_LEGACY_SOUND_DEVICE(MICRO3D, micro3d_sound); VIDEO_START( micro3d ); VIDEO_RESET( micro3d ); -void micro3d_tms_interrupt(running_device *device, int state); +void micro3d_tms_interrupt(device_t *device, int state); void micro3d_scanline_update(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params); WRITE16_HANDLER( micro3d_clut_w ); diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index e6d40762deb..234cad3cef9 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -26,13 +26,13 @@ public: UINT16 cur_control2; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539; - running_device *k053246; - running_device *k053251; - running_device *k056832; - running_device *k054338; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539; + device_t *k053246; + device_t *k053251; + device_t *k056832; + device_t *k054338; emu_timer *dmaend_timer; }; diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index 6b41f29519e..88cb7c5a14b 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -21,8 +21,8 @@ public: UINT8 nmi_enable; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/mouser.c -----------*/ diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index d6b6e0ca0b6..2ad07a6bac3 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -25,8 +25,8 @@ public: int select1; /* devices */ - running_device *maincpu; - running_device *subcpu; + device_t *maincpu; + device_t *subcpu; }; diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index 4a0ab98446f..1889007c3f4 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -35,7 +35,7 @@ public: UINT8 snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/mugsmash.h b/src/mame/includes/mugsmash.h index 2b6a1c017f1..38b70712ce9 100644 --- a/src/mame/includes/mugsmash.h +++ b/src/mame/includes/mugsmash.h @@ -14,8 +14,8 @@ public: tilemap_t *tilemap1; tilemap_t *tilemap2; - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index 5c23ee576a1..cb8ef049fb9 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -29,8 +29,8 @@ public: UINT8 sound_nmi_enable; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/mw8080bw.h b/src/mame/includes/mw8080bw.h index 75e55032a9c..c1009b56499 100644 --- a/src/mame/includes/mw8080bw.h +++ b/src/mame/includes/mw8080bw.h @@ -81,16 +81,16 @@ public: emu_timer *interrupt_timer; /* devices */ - running_device *maincpu; - running_device *mb14241; - running_device *samples; - running_device *samples1; - running_device *samples2; - running_device *speaker; - running_device *sn1; - running_device *sn2; - running_device *sn; - running_device *discrete; + device_t *maincpu; + device_t *mb14241; + device_t *samples; + device_t *samples1; + device_t *samples2; + device_t *speaker; + device_t *sn1; + device_t *sn2; + device_t *sn; + device_t *discrete; }; @@ -171,7 +171,7 @@ WRITE8_HANDLER( zzzap_audio_1_w ); WRITE8_HANDLER( zzzap_audio_2_w ); MACHINE_CONFIG_EXTERN( maze_audio ); -void maze_write_discrete(running_device *device, UINT8 maze_tone_timing_state); +void maze_write_discrete(device_t *device, UINT8 maze_tone_timing_state); MACHINE_CONFIG_EXTERN( boothill_audio ); WRITE8_DEVICE_HANDLER( boothill_audio_w ); diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index 81f44365023..fec440889d3 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -37,7 +37,7 @@ public: int inte; /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/naomibd.h b/src/mame/includes/naomibd.h index a6cf56cd149..710652f1609 100644 --- a/src/mame/includes/naomibd.h +++ b/src/mame/includes/naomibd.h @@ -26,7 +26,7 @@ enum TYPE DEFINITIONS ***************************************************************************/ -typedef void (*naomibd_interrupt_func)(running_device *device, int state); +typedef void (*naomibd_interrupt_func)(device_t *device, int state); typedef struct _naomibd_config naomibd_config; struct _naomibd_config @@ -84,10 +84,10 @@ struct _naomibd_config FUNCTION PROTOTYPES ***************************************************************************/ -int naomibd_interrupt_callback(running_device *device, naomibd_interrupt_func callback); -int naomibd_get_type(running_device *device); -void *naomibd_get_memory(running_device *device); -offs_t naomibd_get_dmaoffset(running_device *device); +int naomibd_interrupt_callback(device_t *device, naomibd_interrupt_func callback); +int naomibd_get_type(device_t *device); +void *naomibd_get_memory(device_t *device); +offs_t naomibd_get_dmaoffset(device_t *device); READ64_DEVICE_HANDLER( naomibd_r ); WRITE64_DEVICE_HANDLER( naomibd_w ); diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index 841c69825af..b9721418499 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -41,7 +41,7 @@ public: /* devices */ cpu_device *maincpu; cpu_device *audiocpu; - running_device *vlm; + device_t *vlm; }; diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index ec60355b1a4..49902356744 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -105,9 +105,9 @@ public: int fixed_layer_bank_type; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *upd4990a; + device_t *maincpu; + device_t *audiocpu; + device_t *upd4990a; }; diff --git a/src/mame/includes/ninjaw.h b/src/mame/includes/ninjaw.h index ce071dc06e2..1487b9a2189 100644 --- a/src/mame/includes/ninjaw.h +++ b/src/mame/includes/ninjaw.h @@ -20,20 +20,20 @@ public: int pandata[4]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *tc0140syt; - running_device *tc0100scn_1; - running_device *tc0100scn_2; - running_device *tc0100scn_3; - running_device *lscreen; - running_device *mscreen; - running_device *rscreen; - running_device *_2610_1l; - running_device *_2610_1r; - running_device *_2610_2l; - running_device *_2610_2r; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *tc0140syt; + device_t *tc0100scn_1; + device_t *tc0100scn_2; + device_t *tc0100scn_3; + device_t *lscreen; + device_t *mscreen; + device_t *rscreen; + device_t *_2610_1l; + device_t *_2610_1r; + device_t *_2610_2l; + device_t *_2610_2r; }; diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h index 04e7a92fd93..1b300cf3200 100644 --- a/src/mame/includes/nitedrvr.h +++ b/src/mame/includes/nitedrvr.h @@ -40,8 +40,8 @@ public: INT32 last_steering_val; /* devices */ - running_device *maincpu; - running_device *discrete; + device_t *maincpu; + device_t *discrete; }; diff --git a/src/mame/includes/nycaptor.h b/src/mame/includes/nycaptor.h index c1c4f23cf3f..e0c5c1814ac 100644 --- a/src/mame/includes/nycaptor.h +++ b/src/mame/includes/nycaptor.h @@ -31,10 +31,10 @@ public: int gametype; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *mcu; }; diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index 170d6d9e98f..a8d7b505e95 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -30,8 +30,8 @@ public: int vclk_left; /* devices */ - running_device *maincpu; - running_device *msm; + device_t *maincpu; + device_t *msm; }; diff --git a/src/mame/includes/oneshot.h b/src/mame/includes/oneshot.h index 0aa47670316..4962e0fa9c9 100644 --- a/src/mame/includes/oneshot.h +++ b/src/mame/includes/oneshot.h @@ -21,8 +21,8 @@ public: int p1_wobble, p2_wobble; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/oneshot.c -----------*/ diff --git a/src/mame/includes/opwolf.h b/src/mame/includes/opwolf.h index d015baf87dc..16f3e4a4c0f 100644 --- a/src/mame/includes/opwolf.h +++ b/src/mame/includes/opwolf.h @@ -41,10 +41,10 @@ public: /* devices */ cpu_device *maincpu; cpu_device *audiocpu; - running_device *pc080sn; - running_device *pc090oj; - running_device *msm1; - running_device *msm2; + device_t *pc080sn; + device_t *pc090oj; + device_t *msm1; + device_t *msm2; }; diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index 1e4a10dc8db..2a891698e52 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -33,8 +33,8 @@ public: UINT8 misc_flags; /* devices */ - running_device *maincpu; - running_device *discrete; + device_t *maincpu; + device_t *discrete; }; diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h index 1a77acd3d9c..4e36e4326d9 100644 --- a/src/mame/includes/othunder.h +++ b/src/mame/includes/othunder.h @@ -34,19 +34,19 @@ public: int pan[4]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *eeprom; - running_device *tc0220ioc; - running_device *tc0100scn; - running_device *tc0110pcr; - running_device *tc0140syt; - running_device *_2610_0l; - running_device *_2610_0r; - running_device *_2610_1l; - running_device *_2610_1r; - running_device *_2610_2l; - running_device *_2610_2r; + device_t *maincpu; + device_t *audiocpu; + device_t *eeprom; + device_t *tc0220ioc; + device_t *tc0100scn; + device_t *tc0110pcr; + device_t *tc0140syt; + device_t *_2610_0l; + device_t *_2610_0r; + device_t *_2610_1l; + device_t *_2610_1r; + device_t *_2610_2l; + device_t *_2610_2r; }; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index 21912cd14fd..a378378cdf5 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -20,15 +20,15 @@ public: UINT16 cpuB_ctrl; /* devices */ - running_device *maincpu; - running_device *subcpu; - running_device *audiocpu; - running_device *k053260_1; - running_device *k053260_2; - running_device *k051316_1; - running_device *k051316_2; - running_device *k053246; - running_device *k053251; + device_t *maincpu; + device_t *subcpu; + device_t *audiocpu; + device_t *k053260_1; + device_t *k053260_2; + device_t *k051316_1; + device_t *k051316_2; + device_t *k053246; + device_t *k053251; }; /*----------- defined in video/overdriv.c -----------*/ diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index 90fc298fa77..2612a68b307 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -23,12 +23,12 @@ public: //int nmi_enabled; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053260; - running_device *k052109; - running_device *k053245; - running_device *k053251; + device_t *maincpu; + device_t *audiocpu; + device_t *k053260; + device_t *k052109; + device_t *k053245; + device_t *k053251; }; /*----------- defined in video/parodius.c -----------*/ diff --git a/src/mame/includes/pbaction.h b/src/mame/includes/pbaction.h index da0736b141f..c8564db7208 100644 --- a/src/mame/includes/pbaction.h +++ b/src/mame/includes/pbaction.h @@ -25,8 +25,8 @@ public: int scroll; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h index f8e5b98f127..f522e895032 100644 --- a/src/mame/includes/pgm.h +++ b/src/mame/includes/pgm.h @@ -67,7 +67,7 @@ public: /* devices */ cpu_device *soundcpu; cpu_device *prot; - running_device *ics; + device_t *ics; }; extern UINT16 *pgm_mainram; // used by nvram handler, we cannot move it to driver data struct diff --git a/src/mame/includes/pk8000.h b/src/mame/includes/pk8000.h index 51c8d7fe8ba..a4f7beb6694 100644 --- a/src/mame/includes/pk8000.h +++ b/src/mame/includes/pk8000.h @@ -18,4 +18,4 @@ extern UINT8 pk8000_video_enable; PALETTE_INIT( pk8000 ); -UINT32 pk8000_video_update(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem); +UINT32 pk8000_video_update(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem); diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index 5f9c5a98be4..7389c477853 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -21,8 +21,8 @@ public: UINT16* pktgaldb_sprites; /* devices */ - running_device *maincpu; - running_device *deco16ic; + device_t *maincpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index 0d1191cd172..789033f8242 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -40,7 +40,7 @@ public: /* devices */ okim6295_device *oki; - running_device *eeprom; + device_t *eeprom; }; /*----------- defined in video/playmark.c -----------*/ diff --git a/src/mame/includes/popper.h b/src/mame/includes/popper.h index 03493e3fec1..f2635dd3c6d 100644 --- a/src/mame/includes/popper.h +++ b/src/mame/includes/popper.h @@ -25,7 +25,7 @@ public: rectangle tilemap_clip; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h index b486e6c5d30..a62b7ed165e 100644 --- a/src/mame/includes/psikyo.h +++ b/src/mame/includes/psikyo.h @@ -32,7 +32,7 @@ public: int z80_nmi, mcu_status; /* devices */ - running_device *audiocpu; + device_t *audiocpu; /* game-specific */ // 1945 MCU diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index 4a6a483d4e9..44098877c9c 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -30,7 +30,7 @@ public: UINT32 sample_offs; // only used if ROMTEST = 1 /* devices */ - running_device *maincpu; + device_t *maincpu; }; diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index 2cddf4e315b..12887119316 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -40,7 +40,7 @@ public: UINT32 sample_offs; // only used if ROMTEST = 1 /* devices */ - running_device *maincpu; + device_t *maincpu; }; /*----------- defined in video/psikyosh.c -----------*/ diff --git a/src/mame/includes/pushman.h b/src/mame/includes/pushman.h index 7b1eea7f142..c6eeadb1936 100644 --- a/src/mame/includes/pushman.h +++ b/src/mame/includes/pushman.h @@ -24,9 +24,9 @@ public: UINT16 latch, new_latch; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; }; diff --git a/src/mame/includes/rainbow.h b/src/mame/includes/rainbow.h index 28425b2f571..a28711cde4d 100644 --- a/src/mame/includes/rainbow.h +++ b/src/mame/includes/rainbow.h @@ -28,10 +28,10 @@ public: UINT8 current_bank; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *pc080sn; - running_device *pc090oj; + device_t *maincpu; + device_t *audiocpu; + device_t *pc080sn; + device_t *pc090oj; }; diff --git a/src/mame/includes/rallyx.h b/src/mame/includes/rallyx.h index fb87a6feb36..51d55bbb012 100644 --- a/src/mame/includes/rallyx.h +++ b/src/mame/includes/rallyx.h @@ -31,7 +31,7 @@ public: /* devices */ cpu_device *maincpu; - running_device *samples; + device_t *samples; }; diff --git a/src/mame/includes/rastan.h b/src/mame/includes/rastan.h index c8a2e3e1f77..890d32c09c4 100644 --- a/src/mame/includes/rastan.h +++ b/src/mame/includes/rastan.h @@ -22,10 +22,10 @@ public: int adpcm_data; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *pc090oj; - running_device *pc080sn; + device_t *maincpu; + device_t *audiocpu; + device_t *pc090oj; + device_t *pc080sn; }; diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h index 41e163681fa..2df882cd395 100644 --- a/src/mame/includes/rockrage.h +++ b/src/mame/includes/rockrage.h @@ -18,9 +18,9 @@ public: int vreg; /* devices */ - running_device *audiocpu; - running_device *k007342; - running_device *k007420; + device_t *audiocpu; + device_t *k007342; + device_t *k007420; }; diff --git a/src/mame/includes/rollerg.h b/src/mame/includes/rollerg.h index 89bf1c2bd15..fc78e51dce0 100644 --- a/src/mame/includes/rollerg.h +++ b/src/mame/includes/rollerg.h @@ -20,11 +20,11 @@ public: int readzoomroms; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053260; - running_device *k053244; - running_device *k051316; + device_t *maincpu; + device_t *audiocpu; + device_t *k053260; + device_t *k053244; + device_t *k051316; }; /*----------- defined in video/rollerg.c -----------*/ diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index dd9ab587830..582f80118e7 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -25,13 +25,13 @@ public: int sound_status; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539_1; - running_device *k054539_2; - running_device *k053936; - running_device *k055673; - running_device *k053252; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539_1; + device_t *k054539_2; + device_t *k053936; + device_t *k055673; + device_t *k053252; }; diff --git a/src/mame/includes/segas16.h b/src/mame/includes/segas16.h index 327ade6faba..5bd9a54b0ed 100644 --- a/src/mame/includes/segas16.h +++ b/src/mame/includes/segas16.h @@ -81,21 +81,21 @@ public: /* devices */ - running_device *maincpu; - running_device *soundcpu; - running_device *subcpu; - running_device *subx; - running_device *suby; - running_device *mcu; - running_device *ymsnd; - running_device *ppi8255; - running_device *n7751; - running_device *ppi8255_1; - running_device *ppi8255_2; + device_t *maincpu; + device_t *soundcpu; + device_t *subcpu; + device_t *subx; + device_t *suby; + device_t *mcu; + device_t *ymsnd; + device_t *ppi8255; + device_t *n7751; + device_t *ppi8255_1; + device_t *ppi8255_2; optional_device interrupt_timer; - running_device *_315_5248_1; - running_device *_315_5250_1; - running_device *_315_5250_2; + device_t *_315_5248_1; + device_t *_315_5250_1; + device_t *_315_5250_2; }; @@ -146,5 +146,5 @@ VIDEO_UPDATE( yboard ); /*----------- defined in machine/s16fd.c -----------*/ void *fd1094_get_decrypted_base(void); -void fd1094_machine_init(running_device *device); +void fd1094_machine_init(device_t *device); void fd1094_driver_init(running_machine *machine, const char* tag, void (*set_decrypted)(running_machine *, UINT8 *)); diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index 767dd3accfc..6915170e66b 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -23,7 +23,7 @@ WRITE16_HANDLER( brival_protection_w ); READ16_HANDLER( darkedge_protection_r ); WRITE16_HANDLER( darkedge_protection_w ); -void darkedge_fd1149_vblank(running_device *device); +void darkedge_fd1149_vblank(device_t *device); WRITE16_HANDLER( jleague_protection_w ); READ16_HANDLER( dbzvrvs_protection_r ); diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h index a8af6a27863..b61fa6d3014 100644 --- a/src/mame/includes/sf.h +++ b/src/mame/includes/sf.h @@ -22,8 +22,8 @@ public: UINT16 bgscroll, fgscroll; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index 22e6e0fb930..8c364941f52 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -21,12 +21,12 @@ public: //int nmi_enabled; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053260; - running_device *k052109; - running_device *k053246; - running_device *k053251; + device_t *maincpu; + device_t *audiocpu; + device_t *k053260; + device_t *k052109; + device_t *k053246; + device_t *k053251; }; /*----------- defined in machine/simpsons.c -----------*/ diff --git a/src/mame/includes/skyfox.h b/src/mame/includes/skyfox.h index 0bf86f37fb8..91d34cd2314 100644 --- a/src/mame/includes/skyfox.h +++ b/src/mame/includes/skyfox.h @@ -22,7 +22,7 @@ public: int palette_selected; /* devices */ - running_device *maincpu; + device_t *maincpu; }; /*----------- defined in video/skyfox.c -----------*/ diff --git a/src/mame/includes/slapshot.h b/src/mame/includes/slapshot.h index 82e4e3ffee2..fc2fe272c06 100644 --- a/src/mame/includes/slapshot.h +++ b/src/mame/includes/slapshot.h @@ -41,12 +41,12 @@ public: INT32 banknum; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *tc0140syt; - running_device *tc0480scp; - running_device *tc0360pri; - running_device *tc0640fio; + device_t *maincpu; + device_t *audiocpu; + device_t *tc0140syt; + device_t *tc0480scp; + device_t *tc0360pri; + device_t *tc0640fio; }; diff --git a/src/mame/includes/sonson.h b/src/mame/includes/sonson.h index e9efced0bad..9b1df1a6aeb 100644 --- a/src/mame/includes/sonson.h +++ b/src/mame/includes/sonson.h @@ -24,7 +24,7 @@ public: int last_irq; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h index bc12d2919c7..f112687aef2 100644 --- a/src/mame/includes/spy.h +++ b/src/mame/includes/spy.h @@ -24,12 +24,12 @@ public: int old_3f90; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232_1; - running_device *k007232_2; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232_1; + device_t *k007232_2; + device_t *k052109; + device_t *k051960; }; diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index 615689e8324..b8ff13acab6 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -10,7 +10,7 @@ READ8_HANDLER( stfight_coin_r ); WRITE8_HANDLER( stfight_coin_w ); WRITE8_HANDLER( stfight_e800_w ); READ8_HANDLER( stfight_fm_r ); -void stfight_adpcm_int(running_device *device); +void stfight_adpcm_int(device_t *device); WRITE8_DEVICE_HANDLER( stfight_adpcm_control_w ); diff --git a/src/mame/includes/supbtime.h b/src/mame/includes/supbtime.h index aec2ba69ef0..dbb500687f8 100644 --- a/src/mame/includes/supbtime.h +++ b/src/mame/includes/supbtime.h @@ -20,9 +20,9 @@ public: /* video-related */ /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/suprslam.h b/src/mame/includes/suprslam.h index 5d7c63bb64e..8d039e1433d 100644 --- a/src/mame/includes/suprslam.h +++ b/src/mame/includes/suprslam.h @@ -27,8 +27,8 @@ public: int pending_command; /* devices */ - running_device *audiocpu; - running_device *k053936; + device_t *audiocpu; + device_t *k053936; }; diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index 725c493ac4e..5b814545494 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -22,10 +22,10 @@ public: int videobank; /* devices */ - running_device *maincpu; - running_device *k052109; - running_device *k053244; - running_device *k053251; + device_t *maincpu; + device_t *k052109; + device_t *k053244; + device_t *k053251; }; /*----------- defined in video/surpratk.c -----------*/ diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 008f0e742a4..b59653bcfb6 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -87,8 +87,8 @@ public: UINT8 *decrypted_region; // goldnaxeb1 & bayrouteb1 /* devices */ - running_device *maincpu; - running_device *soundcpu; + device_t *maincpu; + device_t *soundcpu; }; /*----------- defined in video/system16.c -----------*/ diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h index 3f0ade7fb55..b3660a15ec6 100644 --- a/src/mame/includes/tail2nos.h +++ b/src/mame/includes/tail2nos.h @@ -22,9 +22,9 @@ public: int charbank, charpalette, video_enable; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k051316; + device_t *maincpu; + device_t *audiocpu; + device_t *k051316; }; diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index 8f58fbd9699..690eaa7b8c6 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -24,13 +24,13 @@ public: UINT16 coin_word; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mb87078; - running_device *ym; - running_device *tc0180vcu; - running_device *tc0640fio; - running_device *tc0220ioc; + device_t *maincpu; + device_t *audiocpu; + device_t *mb87078; + device_t *ym; + device_t *tc0180vcu; + device_t *tc0640fio; + device_t *tc0220ioc; }; diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 25c2ebdce63..bdfb77023d2 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -66,16 +66,16 @@ public: INT32 oki_bank; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; optional_device oki; - running_device *tc0100scn; - running_device *tc0100scn_1; - running_device *tc0100scn_2; - running_device *tc0360pri; - running_device *tc0280grd; - running_device *tc0430grw; - running_device *tc0480scp; + device_t *tc0100scn; + device_t *tc0100scn_1; + device_t *tc0100scn_2; + device_t *tc0360pri; + device_t *tc0280grd; + device_t *tc0430grw; + device_t *tc0480scp; }; /*----------- defined in video/taito_f2.c -----------*/ diff --git a/src/mame/includes/taito_h.h b/src/mame/includes/taito_h.h index 49f33f06524..db2aef60b89 100644 --- a/src/mame/includes/taito_h.h +++ b/src/mame/includes/taito_h.h @@ -18,10 +18,10 @@ public: INT32 banknum; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *tc0080vco; - running_device *tc0220ioc; + device_t *maincpu; + device_t *audiocpu; + device_t *tc0080vco; + device_t *tc0220ioc; }; /*----------- defined in video/taito_h.c -----------*/ diff --git a/src/mame/includes/taito_l.h b/src/mame/includes/taito_l.h index 8b65bb5022a..5d52901b5b8 100644 --- a/src/mame/includes/taito_l.h +++ b/src/mame/includes/taito_l.h @@ -48,8 +48,8 @@ public: const char *portf1_tag; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/taito_l.c -----------*/ diff --git a/src/mame/includes/taito_o.h b/src/mame/includes/taito_o.h index 9b4dc572dc1..023d0a3dd32 100644 --- a/src/mame/includes/taito_o.h +++ b/src/mame/includes/taito_o.h @@ -14,8 +14,8 @@ public: // UINT16 * paletteram; // currently this uses generic palette handling /* devices */ - running_device *maincpu; - running_device *tc0080vco; + device_t *maincpu; + device_t *tc0080vco; }; /*----------- defined in video/taito_o.c -----------*/ diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index 4bd5732045a..05eaca63e94 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -32,15 +32,15 @@ public: // UINT8 pandata[4]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *eeprom; - running_device *tc0480scp; - running_device *tc0150rod; - running_device *tc0100scn; - running_device *tc0220ioc; - running_device *tc0140syt; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *eeprom; + device_t *tc0480scp; + device_t *tc0150rod; + device_t *tc0100scn; + device_t *tc0220ioc; + device_t *tc0140syt; /* dblaxle motor flag */ int dblaxle_vibration; diff --git a/src/mame/includes/taitoair.h b/src/mame/includes/taitoair.h index fe9fcc6dec8..28b3d0b3290 100644 --- a/src/mame/includes/taitoair.h +++ b/src/mame/includes/taitoair.h @@ -37,9 +37,9 @@ public: INT32 banknum; /* devices */ - running_device *audiocpu; - running_device *dsp; - running_device *tc0080vco; + device_t *audiocpu; + device_t *dsp; + device_t *tc0080vco; }; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 3e5d86456bb..18c69345d4d 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -25,11 +25,11 @@ public: int rambank, pmcbank; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k052109; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k052109; + device_t *k051960; }; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index 019a3c24d9a..f4dd16ed8b9 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -34,19 +34,19 @@ public: UINT16 m_cuebrick_nvram[0x400 * 0x20]; // 32k paged in a 1k window /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k007232; - running_device *k053260; - running_device *k054539; - running_device *k052109; - running_device *k051960; - running_device *k053245; - running_device *k053251; - running_device *k053936; - running_device *k054000; - running_device *upd; - running_device *samples; + device_t *maincpu; + device_t *audiocpu; + device_t *k007232; + device_t *k053260; + device_t *k054539; + device_t *k052109; + device_t *k051960; + device_t *k053245; + device_t *k053251; + device_t *k053936; + device_t *k054000; + device_t *upd; + device_t *samples; }; diff --git a/src/mame/includes/tnzs.h b/src/mame/includes/tnzs.h index 4ec7cea93f6..1bf1aae5eb9 100644 --- a/src/mame/includes/tnzs.h +++ b/src/mame/includes/tnzs.h @@ -57,9 +57,9 @@ public: /* devices */ - running_device *audiocpu; - running_device *subcpu; - running_device *mcu; + device_t *audiocpu; + device_t *subcpu; + device_t *mcu; }; diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 012029666da..ba40b20b55a 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -41,7 +41,7 @@ public: #endif int sub_cpu_type; - running_device *sub_cpu; + device_t *sub_cpu; UINT16 mcu_data; UINT16 video_status; @@ -75,10 +75,10 @@ public: /*----------- defined in audio/toaplan2.c -----------*/ -void dogyuun_okisnd_w(running_device *device, int data); -void kbash_okisnd_w(running_device *device, int data); -void fixeight_okisnd_w(running_device *device, int data); -void batsugun_okisnd_w(running_device *device, int data); +void dogyuun_okisnd_w(device_t *device, int data); +void kbash_okisnd_w(device_t *device, int data); +void fixeight_okisnd_w(device_t *device, int data); +void batsugun_okisnd_w(device_t *device, int data); /*----------- defined in video/toaplan2.c -----------*/ diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h index 734f7cde753..341c33e6f43 100644 --- a/src/mame/includes/topspeed.h +++ b/src/mame/includes/topspeed.h @@ -27,12 +27,12 @@ public: int adpcm_data; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *pc080sn_1; - running_device *pc080sn_2; - running_device *tc0220ioc; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *pc080sn_1; + device_t *pc080sn_2; + device_t *tc0220ioc; }; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index 4828d26f3e8..a8ebc20e377 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -28,9 +28,9 @@ public: int sprite_yoffset; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *oki; + device_t *maincpu; + device_t *audiocpu; + device_t *oki; }; /*----------- defined in video/tumbleb.c -----------*/ diff --git a/src/mame/includes/tumblep.h b/src/mame/includes/tumblep.h index 71bb8ef8728..753d0f76c61 100644 --- a/src/mame/includes/tumblep.h +++ b/src/mame/includes/tumblep.h @@ -18,9 +18,9 @@ public: size_t spriteram_size; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/ultraman.h b/src/mame/includes/ultraman.h index c330fe0ee19..a7e350141a0 100644 --- a/src/mame/includes/ultraman.h +++ b/src/mame/includes/ultraman.h @@ -18,12 +18,12 @@ public: int bank0, bank1, bank2; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k051316_1; - running_device *k051316_2; - running_device *k051316_3; - running_device *k051960; + device_t *maincpu; + device_t *audiocpu; + device_t *k051316_1; + device_t *k051316_2; + device_t *k051316_3; + device_t *k051960; }; diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h index 3517725b2c4..6b9ab905bca 100644 --- a/src/mame/includes/vaportra.h +++ b/src/mame/includes/vaportra.h @@ -20,9 +20,9 @@ public: UINT16 priority[2]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *deco16ic; + device_t *maincpu; + device_t *audiocpu; + device_t *deco16ic; }; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index 98da65b1a00..29fb8a57dd9 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -23,13 +23,13 @@ public: offs_t video_banking_base; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k053260; - running_device *k052109; - running_device *k053246; - running_device *k053251; - running_device *k054000; + device_t *maincpu; + device_t *audiocpu; + device_t *k053260; + device_t *k052109; + device_t *k053246; + device_t *k053251; + device_t *k054000; }; /*----------- defined in video/vendetta.c -----------*/ diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h index 4eed022fb46..fb7df231521 100644 --- a/src/mame/includes/vertigo.h +++ b/src/mame/includes/vertigo.h @@ -6,7 +6,7 @@ /*----------- defined in machine/vertigo.c -----------*/ -void vertigo_update_irq(running_device *device); +void vertigo_update_irq(device_t *device); extern const struct pit8253_config vertigo_pit8254_config; diff --git a/src/mame/includes/volfied.h b/src/mame/includes/volfied.h index 86b3d061f1a..5b7c993d889 100644 --- a/src/mame/includes/volfied.h +++ b/src/mame/includes/volfied.h @@ -26,9 +26,9 @@ public: UINT8 current_cmd; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *pc090oj; + device_t *maincpu; + device_t *audiocpu; + device_t *pc090oj; }; diff --git a/src/mame/includes/warriorb.h b/src/mame/includes/warriorb.h index e794d11b202..258d51f24df 100644 --- a/src/mame/includes/warriorb.h +++ b/src/mame/includes/warriorb.h @@ -19,17 +19,17 @@ public: int pandata[4]; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *tc0140syt; - running_device *tc0100scn_1; - running_device *tc0100scn_2; - running_device *lscreen; - running_device *rscreen; - running_device *_2610_1l; - running_device *_2610_1r; - running_device *_2610_2l; - running_device *_2610_2r; + device_t *maincpu; + device_t *audiocpu; + device_t *tc0140syt; + device_t *tc0100scn_1; + device_t *tc0100scn_2; + device_t *lscreen; + device_t *rscreen; + device_t *_2610_1l; + device_t *_2610_1r; + device_t *_2610_2l; + device_t *_2610_2r; }; diff --git a/src/mame/includes/wgp.h b/src/mame/includes/wgp.h index 7c048f8f178..89269963ddb 100644 --- a/src/mame/includes/wgp.h +++ b/src/mame/includes/wgp.h @@ -34,11 +34,11 @@ public: INT32 banknum; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *subcpu; - running_device *tc0100scn; - running_device *tc0140syt; + device_t *maincpu; + device_t *audiocpu; + device_t *subcpu; + device_t *tc0100scn; + device_t *tc0140syt; }; diff --git a/src/mame/includes/xexex.h b/src/mame/includes/xexex.h index 8faf340483b..64a6ea2e4ee 100644 --- a/src/mame/includes/xexex.h +++ b/src/mame/includes/xexex.h @@ -28,19 +28,19 @@ public: int frame; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539; - running_device *filter1l; - running_device *filter1r; - running_device *filter2l; - running_device *filter2r; - running_device *k056832; - running_device *k053246; - running_device *k053250; - running_device *k053251; - running_device *k053252; - running_device *k054338; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539; + device_t *filter1l; + device_t *filter1r; + device_t *filter2l; + device_t *filter2r; + device_t *k056832; + device_t *k053246; + device_t *k053250; + device_t *k053251; + device_t *k053252; + device_t *k054338; }; diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h index a9b8849e75a..f8bd55313e8 100644 --- a/src/mame/includes/xmen.h +++ b/src/mame/includes/xmen.h @@ -26,14 +26,14 @@ public: UINT8 sound_curbank; /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *k054539; - running_device *k052109; - running_device *k053246; - running_device *k053251; - running_device *lscreen; - running_device *rscreen; + device_t *maincpu; + device_t *audiocpu; + device_t *k054539; + device_t *k052109; + device_t *k053246; + device_t *k053251; + device_t *lscreen; + device_t *rscreen; }; /*----------- defined in video/xmen.c -----------*/ diff --git a/src/mame/includes/yunsun16.h b/src/mame/includes/yunsun16.h index b0fdadcc19e..8a20bd19a48 100644 --- a/src/mame/includes/yunsun16.h +++ b/src/mame/includes/yunsun16.h @@ -25,7 +25,7 @@ public: int sprites_scrolldx, sprites_scrolldy; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/yunsung8.h b/src/mame/includes/yunsung8.h index 7d74bcae67a..bfb84bc327b 100644 --- a/src/mame/includes/yunsung8.h +++ b/src/mame/includes/yunsung8.h @@ -24,7 +24,7 @@ public: int toggle; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; diff --git a/src/mame/includes/zerozone.h b/src/mame/includes/zerozone.h index 80635816f72..fe71bb91014 100644 --- a/src/mame/includes/zerozone.h +++ b/src/mame/includes/zerozone.h @@ -20,7 +20,7 @@ public: tilemap_t *zz_tilemap; /* devices */ - running_device *audiocpu; + device_t *audiocpu; }; /*----------- defined in video/zerozone.c -----------*/ diff --git a/src/mame/includes/zodiack.h b/src/mame/includes/zodiack.h index c112cfa27b4..0c7cd0dc073 100644 --- a/src/mame/includes/zodiack.h +++ b/src/mame/includes/zodiack.h @@ -23,8 +23,8 @@ public: int percuss_hardware; /* devices */ - running_device *maincpu; - running_device *audiocpu; + device_t *maincpu; + device_t *audiocpu; }; /*----------- defined in video/zodiack.c -----------*/ diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index 34733733ee9..f3aee484fa6 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -258,7 +258,7 @@ void amiga_machine_config(running_machine *machine, const amiga_machine_interfac } -static void amiga_m68k_reset(running_device *device) +static void amiga_m68k_reset(device_t *device) { amiga_state *state = device->machine->driver_data(); address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); @@ -312,8 +312,8 @@ static TIMER_CALLBACK( scanline_callback ) { amiga_state *state = machine->driver_data(); int scanline = param; - running_device *cia_0 = machine->device("cia_0"); - running_device *cia_1 = machine->device("cia_1"); + device_t *cia_0 = machine->device("cia_0"); + device_t *cia_1 = machine->device("cia_1"); /* on the first scanline, we do some extra bookkeeping */ if (scanline == 0) @@ -1017,7 +1017,7 @@ READ16_HANDLER( amiga_cia_r ) { UINT8 data; int shift; - running_device *cia; + device_t *cia; /* offsets 0000-07ff reference CIA B, and are accessed via the MSB */ if ((offset & 0x0800) == 0) @@ -1052,7 +1052,7 @@ READ16_HANDLER( amiga_cia_r ) WRITE16_HANDLER( amiga_cia_w ) { - running_device *cia; + device_t *cia; if (LOG_CIA) logerror("%06x:cia_%c_write(%03x) = %04x & %04x\n", cpu_get_pc(space->cpu), 'A' + ((~offset & 0x0800) >> 11), offset * 2, data, mem_mask); @@ -1087,13 +1087,13 @@ WRITE16_HANDLER( amiga_cia_w ) * *************************************/ -void amiga_cia_0_irq(running_device *device, int state) +void amiga_cia_0_irq(device_t *device, int state) { amiga_custom_w(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff); } -void amiga_cia_1_irq(running_device *device, int state) +void amiga_cia_1_irq(device_t *device, int state) { amiga_custom_w(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff); } @@ -1250,8 +1250,8 @@ static TIMER_CALLBACK( finish_serial_write ) WRITE16_HANDLER( amiga_custom_w ) { amiga_state *state = space->machine->driver_data(); - running_device *cia_0; - running_device *cia_1; + device_t *cia_0; + device_t *cia_1; UINT16 temp; offset &= 0xff; diff --git a/src/mame/machine/archimds.c b/src/mame/machine/archimds.c index 599ed5b8af2..482a03d51b7 100644 --- a/src/mame/machine/archimds.c +++ b/src/mame/machine/archimds.c @@ -582,7 +582,7 @@ READ32_HANDLER(archimedes_ioc_r) { UINT32 ioc_addr; #ifdef MESS - running_device *fdc = (running_device *)space->machine->device("wd1772"); + device_t *fdc = (device_t *)space->machine->device("wd1772"); #endif ioc_addr = offset*4; @@ -640,7 +640,7 @@ WRITE32_HANDLER(archimedes_ioc_w) { UINT32 ioc_addr; #ifdef MESS - running_device *fdc = (running_device *)space->machine->device("wd1772"); + device_t *fdc = (device_t *)space->machine->device("wd1772"); #endif ioc_addr = offset*4; diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c index 461b90f8034..bc5fe0440da 100644 --- a/src/mame/machine/asic65.c +++ b/src/mame/machine/asic65.c @@ -31,7 +31,7 @@ static struct _asic65_t UINT8 last_bank; /* ROM-based interface states */ - running_device *cpu; + device_t *cpu; UINT8 tfull; UINT8 _68full; UINT8 cmd; diff --git a/src/mame/machine/atari.c b/src/mame/machine/atari.c index 7e1883cc8ec..e783a8334a0 100644 --- a/src/mame/machine/atari.c +++ b/src/mame/machine/atari.c @@ -24,7 +24,7 @@ static void a600xl_mmu(running_machine *machine, UINT8 new_mmu); static void pokey_reset(running_machine &machine); -void atari_interrupt_cb(running_device *device, int mask) +void atari_interrupt_cb(device_t *device, int mask) { if (VERBOSE_POKEY) @@ -159,7 +159,7 @@ static int atari_last; void a800_handle_keyboard(running_machine *machine) { - running_device *pokey = machine->device("pokey"); + device_t *pokey = machine->device("pokey"); int atari_code, count, ipt, i; static const char *const tag[] = { "keyboard_0", "keyboard_1", "keyboard_2", "keyboard_3", @@ -244,7 +244,7 @@ void a800_handle_keyboard(running_machine *machine) void a5200_handle_keypads(running_machine *machine) { - running_device *pokey = machine->device("pokey"); + device_t *pokey = machine->device("pokey"); int atari_code, count, ipt, i; static const char *const tag[] = { "keypad_0", "keypad_1", "keypad_2", "keypad_3" }; @@ -308,7 +308,7 @@ void a5200_handle_keypads(running_machine *machine) static void pokey_reset(running_machine &machine) { - running_device *pokey = machine.device("pokey"); + device_t *pokey = machine.device("pokey"); pokey_w(pokey,15,0); atari_last = 0xff; } @@ -322,7 +322,7 @@ static UINT8 console_read(address_space *space) static void console_write(address_space *space, UINT8 data) { - running_device *dac = space->machine->device("dac"); + device_t *dac = space->machine->device("dac"); if (data & 0x08) dac_data_w(dac, (UINT8)-120); else diff --git a/src/mame/machine/atari_vg.c b/src/mame/machine/atari_vg.c index c05e660c847..a4cbe6de49b 100644 --- a/src/mame/machine/atari_vg.c +++ b/src/mame/machine/atari_vg.c @@ -13,7 +13,7 @@ typedef struct _atari_vg_earom_state atari_vg_earom_state; struct _atari_vg_earom_state { - running_device *device; + device_t *device; int offset; int data; @@ -31,7 +31,7 @@ struct _atari_vg_earom_state into a atari_vg_earom_state -------------------------------------------------*/ -INLINE atari_vg_earom_state *get_safe_token(running_device *device) +INLINE atari_vg_earom_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == ATARIVGEAROM); diff --git a/src/mame/machine/atarifb.c b/src/mame/machine/atarifb.c index 368ab929839..63cc0e52652 100644 --- a/src/mame/machine/atarifb.c +++ b/src/mame/machine/atarifb.c @@ -13,7 +13,7 @@ WRITE8_HANDLER( atarifb_out1_w ) { atarifb_state *state = space->machine->driver_data(); - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); state->CTRLD = data; @@ -27,7 +27,7 @@ WRITE8_HANDLER( atarifb_out1_w ) WRITE8_HANDLER( atarifb4_out1_w ) { atarifb_state *state = space->machine->driver_data(); - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); state->CTRLD = data; @@ -43,7 +43,7 @@ WRITE8_HANDLER( atarifb4_out1_w ) WRITE8_HANDLER( abaseb_out1_w ) { atarifb_state *state = space->machine->driver_data(); - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); state->CTRLD = data; @@ -70,7 +70,7 @@ WRITE8_HANDLER( abaseb_out1_w ) WRITE8_HANDLER( soccer_out1_w ) { atarifb_state *state = space->machine->driver_data(); - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); state->CTRLD = data; @@ -94,7 +94,7 @@ WRITE8_HANDLER( soccer_out1_w ) WRITE8_HANDLER( atarifb_out2_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); discrete_sound_w(discrete, ATARIFB_CROWD_DATA, data & 0x0f); // Crowd @@ -104,7 +104,7 @@ WRITE8_HANDLER( atarifb_out2_w ) WRITE8_HANDLER( soccer_out2_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); discrete_sound_w(discrete, ATARIFB_CROWD_DATA, data & 0x0f); // Crowd diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c index f8edcd7ff2b..eab0181dadb 100644 --- a/src/mame/machine/atarigen.c +++ b/src/mame/machine/atarigen.c @@ -481,7 +481,7 @@ DIRECT_UPDATE_HANDLER( atarigen_slapstic_setdirect ) slapstic and sets the chip number. ---------------------------------------------------------------*/ -void atarigen_slapstic_init(running_device *device, offs_t base, offs_t mirror, int chipnum) +void atarigen_slapstic_init(device_t *device, offs_t base, offs_t mirror, int chipnum) { atarigen_state *state = device->machine->driver_data(); @@ -569,7 +569,7 @@ READ16_HANDLER( atarigen_slapstic_r ) atarigen_sound_io_reset: Resets the state of the sound I/O. ---------------------------------------------------------------*/ -void atarigen_sound_io_reset(running_device *device) +void atarigen_sound_io_reset(device_t *device) { atarigen_state *state = device->machine->driver_data(); @@ -624,7 +624,7 @@ WRITE8_HANDLER( atarigen_6502_irq_ack_w ) IRQ line. ---------------------------------------------------------------*/ -void atarigen_ym2151_irq_gen(running_device *device, int irq) +void atarigen_ym2151_irq_gen(device_t *device, int irq) { atarigen_state *state = device->machine->driver_data(); state->ym2151_int = irq; @@ -1370,7 +1370,7 @@ int atarigen_get_hblank(screen_device &screen) void atarigen_halt_until_hblank_0(screen_device &screen) { - running_device *cpu = screen.machine->device("maincpu"); + device_t *cpu = screen.machine->device("maincpu"); /* halt the CPU until the next HBLANK */ int hpos = screen.hpos(); @@ -1473,7 +1473,7 @@ WRITE32_HANDLER( atarigen_666_paletteram32_w ) static TIMER_CALLBACK( unhalt_cpu ) { - running_device *cpu = (running_device *)ptr; + device_t *cpu = (device_t *)ptr; cpu_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE); } diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index f1c84f340cc..186a9270ccb 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -162,7 +162,7 @@ public: offs_t slapstic_base; offs_t slapstic_mirror; - running_device * sound_cpu; + device_t * sound_cpu; UINT8 cpu_to_sound; UINT8 sound_to_cpu; UINT8 timed_int; @@ -235,7 +235,7 @@ READ32_HANDLER( atarigen_eeprom_upper32_r ); SLAPSTIC HANDLING ---------------------------------------------------------------*/ -void atarigen_slapstic_init(running_device *device, offs_t base, offs_t mirror, int chipnum); +void atarigen_slapstic_init(device_t *device, offs_t base, offs_t mirror, int chipnum); void atarigen_slapstic_reset(atarigen_state *state); WRITE16_HANDLER( atarigen_slapstic_w ); @@ -246,13 +246,13 @@ READ16_HANDLER( atarigen_slapstic_r ); SOUND I/O ---------------------------------------------------------------*/ -void atarigen_sound_io_reset(running_device *device); +void atarigen_sound_io_reset(device_t *device); INTERRUPT_GEN( atarigen_6502_irq_gen ); READ8_HANDLER( atarigen_6502_irq_ack_r ); WRITE8_HANDLER( atarigen_6502_irq_ack_w ); -void atarigen_ym2151_irq_gen(running_device *device, int irq); +void atarigen_ym2151_irq_gen(device_t *device, int irq); WRITE16_HANDLER( atarigen_sound_w ); READ16_HANDLER( atarigen_sound_r ); diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c index 08ad2ea9223..13c07d6f4cd 100644 --- a/src/mame/machine/balsente.c +++ b/src/mame/machine/balsente.c @@ -218,7 +218,7 @@ static void poly17_init(running_machine *machine) } -void balsente_noise_gen(running_device *device, int count, short *buffer) +void balsente_noise_gen(device_t *device, int count, short *buffer) { balsente_state *state = device->machine->driver_data(); int chip; diff --git a/src/mame/machine/buggychl.c b/src/mame/machine/buggychl.c index 22e78c23d7b..0046b28e36c 100644 --- a/src/mame/machine/buggychl.c +++ b/src/mame/machine/buggychl.c @@ -10,11 +10,11 @@ struct _buggychl_mcu_state UINT8 port_c_in, port_c_out, ddr_c; UINT8 from_main, from_mcu; int mcu_sent, main_sent; - running_device *mcu; + device_t *mcu; }; -INLINE buggychl_mcu_state *get_safe_token( running_device *device ) +INLINE buggychl_mcu_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == BUGGYCHL_MCU); diff --git a/src/mame/machine/carpolo.c b/src/mame/machine/carpolo.c index c92c9c8779d..87ae2dd691e 100644 --- a/src/mame/machine/carpolo.c +++ b/src/mame/machine/carpolo.c @@ -69,25 +69,25 @@ static UINT8 car_border_collision_cause; static UINT8 priority_0_extension; static UINT8 last_wheel_value[4]; -static running_device *ttl74148_3s; +static device_t *ttl74148_3s; -static running_device *ttl74153_1k; +static device_t *ttl74153_1k; -static running_device *ttl7474_2s_1; -static running_device *ttl7474_2s_2; -static running_device *ttl7474_2u_1; -static running_device *ttl7474_2u_2; -static running_device *ttl7474_1f_1; -static running_device *ttl7474_1f_2; -static running_device *ttl7474_1d_1; -static running_device *ttl7474_1d_2; -static running_device *ttl7474_1c_1; -static running_device *ttl7474_1c_2; -static running_device *ttl7474_1a_1; -static running_device *ttl7474_1a_2; +static device_t *ttl7474_2s_1; +static device_t *ttl7474_2s_2; +static device_t *ttl7474_2u_1; +static device_t *ttl7474_2u_2; +static device_t *ttl7474_1f_1; +static device_t *ttl7474_1f_2; +static device_t *ttl7474_1d_1; +static device_t *ttl7474_1d_2; +static device_t *ttl7474_1c_1; +static device_t *ttl7474_1c_2; +static device_t *ttl7474_1a_1; +static device_t *ttl7474_1a_2; -void carpolo_74148_3s_cb(running_device *device) +void carpolo_74148_3s_cb(device_t *device) { cputag_set_input_line(device->machine, "maincpu", M6502_IRQ_LINE, ttl74148_output_valid_r(device) ? CLEAR_LINE : ASSERT_LINE); } @@ -251,8 +251,8 @@ INTERRUPT_GEN( carpolo_timer_interrupt ) for (player = 0; player < 4; player++) { static const char *const portnames[] = { "DIAL0", "DIAL1", "DIAL2", "DIAL3" }; - running_device *movement_flip_flop; - running_device *dir_flip_flop; + device_t *movement_flip_flop; + device_t *dir_flip_flop; switch (player) { diff --git a/src/mame/machine/cubocd32.c b/src/mame/machine/cubocd32.c index 51c518f1db3..ac0bcbfb062 100644 --- a/src/mame/machine/cubocd32.c +++ b/src/mame/machine/cubocd32.c @@ -64,13 +64,13 @@ struct _akiko_state UINT8 * cdrom_toc; emu_timer *dma_timer; emu_timer *frame_timer; - running_device *i2cmem; + device_t *i2cmem; }; static TIMER_CALLBACK(akiko_dma_proc); static TIMER_CALLBACK(akiko_frame_proc); -INLINE akiko_state *get_safe_token(running_device *device) +INLINE akiko_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == AKIKO); @@ -289,7 +289,7 @@ static const char* get_akiko_reg_name(int reg) static void akiko_cdda_stop(akiko_state *state) { - running_device *cdda = cdda_from_cdrom(state->machine, state->cdrom); + device_t *cdda = cdda_from_cdrom(state->machine, state->cdrom); if (cdda != NULL) { @@ -300,7 +300,7 @@ static void akiko_cdda_stop(akiko_state *state) static void akiko_cdda_play(akiko_state *state, UINT32 lba, UINT32 num_blocks) { - running_device *cdda = cdda_from_cdrom(state->machine, state->cdrom); + device_t *cdda = cdda_from_cdrom(state->machine, state->cdrom); if (cdda != NULL) { cdda_start_audio(cdda, lba, num_blocks); @@ -310,7 +310,7 @@ static void akiko_cdda_play(akiko_state *state, UINT32 lba, UINT32 num_blocks) static void akiko_cdda_pause(akiko_state *state, int pause) { - running_device *cdda = cdda_from_cdrom(state->machine, state->cdrom); + device_t *cdda = cdda_from_cdrom(state->machine, state->cdrom); if (cdda != NULL) { if (cdda_audio_active(cdda) && cdda_audio_paused(cdda) != pause ) @@ -331,7 +331,7 @@ static void akiko_cdda_pause(akiko_state *state, int pause) static UINT8 akiko_cdda_getstatus(akiko_state *state, UINT32 *lba) { - running_device *cdda = cdda_from_cdrom(state->machine, state->cdrom); + device_t *cdda = cdda_from_cdrom(state->machine, state->cdrom); if ( lba ) *lba = 0; @@ -373,7 +373,7 @@ static void akiko_set_cd_status(akiko_state *state, UINT32 status) static TIMER_CALLBACK(akiko_frame_proc) { akiko_state *state = (akiko_state *)ptr; - running_device *cdda = cdda_from_cdrom(machine, state->cdrom); + device_t *cdda = cdda_from_cdrom(machine, state->cdrom); (void)param; diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index fb47797a9d9..f61814b45ea 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -47,9 +47,9 @@ enum { -static UINT8 tape_get_status_bits(running_device *device); -static UINT8 tape_is_present(running_device *device); -static void tape_change_speed(running_device *device, INT8 newspeed); +static UINT8 tape_get_status_bits(device_t *device); +static UINT8 tape_is_present(device_t *device); +static void tape_change_speed(device_t *device, INT8 newspeed); WRITE8_HANDLER( decocass_coin_counter_w ) @@ -1906,7 +1906,7 @@ struct _tape_state in device is, in fact, an IDE controller -------------------------------------------------*/ -INLINE tape_state *get_safe_token(running_device *device) +INLINE tape_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == DECOCASS_TAPE); @@ -2013,7 +2013,7 @@ static const char *tape_describe_state(tape_state *tape) static TIMER_CALLBACK( tape_clock_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; tape_state *tape = get_safe_token(device); /* advance by one clock in the desired direction */ @@ -2070,7 +2070,7 @@ static TIMER_CALLBACK( tape_clock_callback ) bits from the tape -------------------------------------------------*/ -static UINT8 tape_get_status_bits(running_device *device) +static UINT8 tape_get_status_bits(device_t *device) { tape_state *tape = get_safe_token(device); UINT8 tape_bits = 0; @@ -2127,7 +2127,7 @@ static UINT8 tape_get_status_bits(running_device *device) present -------------------------------------------------*/ -static UINT8 tape_is_present(running_device *device) +static UINT8 tape_is_present(device_t *device) { return device->region() != NULL; } @@ -2138,7 +2138,7 @@ static UINT8 tape_is_present(running_device *device) playback -------------------------------------------------*/ -static void tape_change_speed(running_device *device, INT8 newspeed) +static void tape_change_speed(device_t *device, INT8 newspeed) { tape_state *tape = get_safe_token(device); attotime newperiod; diff --git a/src/mame/machine/decocass.h b/src/mame/machine/decocass.h index 1b0ed89fdee..f754cfe11b0 100644 --- a/src/mame/machine/decocass.h +++ b/src/mame/machine/decocass.h @@ -102,10 +102,10 @@ public: INT32 type5_latch; /* latched enable PROM (1100xxxx written to E5x1) */ /* devices */ - running_device *maincpu; - running_device *audiocpu; - running_device *mcu; - running_device *cassette; + device_t *maincpu; + device_t *audiocpu; + device_t *mcu; + device_t *cassette; }; diff --git a/src/mame/machine/fddebug.c b/src/mame/machine/fddebug.c index fb747707a6a..030f775bd42 100644 --- a/src/mame/machine/fddebug.c +++ b/src/mame/machine/fddebug.c @@ -887,7 +887,7 @@ static void execute_fdeliminate(running_machine *machine, int ref, int params, c static void execute_fdunlock(running_machine *machine, int ref, int params, const char **param) { - running_device *cpu = debug_cpu_get_visible_cpu(machine); + device_t *cpu = debug_cpu_get_visible_cpu(machine); int reps = keystatus_words / KEY_SIZE; int keyaddr, repnum; UINT64 offset; @@ -925,7 +925,7 @@ static void execute_fdunlock(running_machine *machine, int ref, int params, cons static void execute_fdignore(running_machine *machine, int ref, int params, const char **param) { - running_device *cpu = debug_cpu_get_visible_cpu(machine); + device_t *cpu = debug_cpu_get_visible_cpu(machine); UINT64 offset; /* support 0 or 1 parameters */ @@ -1030,7 +1030,7 @@ static void execute_fdstate(running_machine *machine, int ref, int params, const static void execute_fdpc(running_machine *machine, int ref, int params, const char **param) { - running_device *cpu = debug_cpu_get_visible_cpu(machine); + device_t *cpu = debug_cpu_get_visible_cpu(machine); UINT64 newpc; /* support 0 or 1 parameters */ diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index f6a526ba384..c27183891d5 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -45,14 +45,14 @@ WRITE_LINE_DEVICE_HANDLER( galaxold_7474_9m_1_callback ) WRITE8_HANDLER( galaxold_nmi_enable_w ) { - running_device *target = space->machine->device("7474_9m_1"); + device_t *target = space->machine->device("7474_9m_1"); ttl7474_preset_w(target, data ? 1 : 0); } TIMER_DEVICE_CALLBACK( galaxold_interrupt_timer ) { - running_device *target = timer.machine->device("7474_9m_2"); + device_t *target = timer.machine->device("7474_9m_2"); /* 128V, 64V and 32V go to D */ ttl7474_d_w(target, ((param & 0xe0) != 0xe0) ? 1 : 0); @@ -68,8 +68,8 @@ TIMER_DEVICE_CALLBACK( galaxold_interrupt_timer ) static void machine_reset_common(running_machine *machine, int line) { - running_device *ttl7474_9m_1 = machine->device("7474_9m_1"); - running_device *ttl7474_9m_2 = machine->device("7474_9m_2"); + device_t *ttl7474_9m_1 = machine->device("7474_9m_1"); + device_t *ttl7474_9m_2 = machine->device("7474_9m_2"); irq_line = line; /* initalize main CPU interrupt generator flip-flops */ diff --git a/src/mame/machine/gaplus.c b/src/mame/machine/gaplus.c index 42c72cbc52b..f81cbba3879 100644 --- a/src/mame/machine/gaplus.c +++ b/src/mame/machine/gaplus.c @@ -21,7 +21,7 @@ UINT8 *gaplus_customio_3; WRITE8_HANDLER( gaplus_customio_3_w ) { - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); if ((offset == 0x09) && (data >= 0x0f)) sample_start(samples,0,0,0); diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c index 777ca7536a1..d72a54383b2 100644 --- a/src/mame/machine/harddriv.c +++ b/src/mame/machine/harddriv.c @@ -137,7 +137,7 @@ WRITE16_HANDLER( hd68k_irq_ack_w ) } -void hdgsp_irq_gen(running_device *device, int irqstate) +void hdgsp_irq_gen(device_t *device, int irqstate) { harddriv_state *state = device->machine->driver_data(); state->gsp_irq_state = irqstate; @@ -145,7 +145,7 @@ void hdgsp_irq_gen(running_device *device, int irqstate) } -void hdmsp_irq_gen(running_device *device, int irqstate) +void hdmsp_irq_gen(device_t *device, int irqstate) { harddriv_state *state = device->machine->driver_data(); state->msp_irq_state = irqstate; @@ -1372,7 +1372,7 @@ WRITE16_HANDLER( hd68k_ds3_program_w ) * *************************************/ -void hddsk_update_pif(running_device *device, UINT32 pins) +void hddsk_update_pif(device_t *device, UINT32 pins) { atarigen_state *atarigen = device->machine->driver_data(); atarigen->sound_int_state = ((pins & DSP32_OUTPUT_PIF) != 0); diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index aad6c104e64..5e5dada32f0 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -142,8 +142,8 @@ WRITE32_HANDLER( cgboard_dsp_comm_w_ppc ) { const char *dsptag = (cgboard_id == 0) ? "dsp" : "dsp2"; const char *pcitag = (cgboard_id == 0) ? "k033906_1" : "k033906_2"; - running_device *dsp = space->machine->device(dsptag); - running_device *k033906 = space->machine->device(pcitag); + device_t *dsp = space->machine->device(dsptag); + device_t *k033906 = space->machine->device(pcitag); // mame_printf_debug("dsp_cmd_w: (board %d) %08X, %08X, %08X at %08X\n", cgboard_id, data, offset, mem_mask, cpu_get_pc(space->cpu)); if (cgboard_id < MAX_CG_BOARDS) @@ -239,7 +239,7 @@ static void dsp_comm_sharc_w(address_space *space, int board, int offset, UINT32 case CGBOARD_TYPE_HANGPLT: { const char *dsptag = (board == 0) ? "dsp" : "dsp2"; - running_device *device = space->machine->device(dsptag); + device_t *device = space->machine->device(dsptag); if (offset == 1) { @@ -354,7 +354,7 @@ WRITE32_HANDLER( cgboard_1_shared_sharc_w ) static UINT32 nwk_fifo_r(address_space *space, int board) { const char *dsptag = (board == 0) ? "dsp" : "dsp2"; - running_device *device = space->machine->device(dsptag); + device_t *device = space->machine->device(dsptag); UINT32 data; if (nwk_fifo_read_ptr[board] < nwk_fifo_half_full_r) @@ -385,7 +385,7 @@ static UINT32 nwk_fifo_r(address_space *space, int board) static void nwk_fifo_w(running_machine *machine, int board, UINT32 data) { const char *dsptag = (board == 0) ? "dsp" : "dsp2"; - running_device *device = machine->device(dsptag); + device_t *device = machine->device(dsptag); if (nwk_fifo_write_ptr[board] < nwk_fifo_half_full_w) { @@ -409,7 +409,7 @@ static void nwk_fifo_w(running_machine *machine, int board, UINT32 data) READ32_HANDLER( K033906_0_r ) { - running_device *k033906_1 = space->machine->device("k033906_1"); + device_t *k033906_1 = space->machine->device("k033906_1"); if (nwk_device_sel[0] & 0x01) return nwk_fifo_r(space, 0); else @@ -418,13 +418,13 @@ READ32_HANDLER( K033906_0_r ) WRITE32_HANDLER( K033906_0_w ) { - running_device *k033906_1 = space->machine->device("k033906_1"); + device_t *k033906_1 = space->machine->device("k033906_1"); k033906_w(k033906_1, offset, data, mem_mask); } READ32_HANDLER( K033906_1_r ) { - running_device *k033906_2 = space->machine->device("k033906_2"); + device_t *k033906_2 = space->machine->device("k033906_2"); if (nwk_device_sel[1] & 0x01) return nwk_fifo_r(space, 1); else @@ -433,7 +433,7 @@ READ32_HANDLER( K033906_1_r ) WRITE32_HANDLER(K033906_1_w) { - running_device *k033906_2 = space->machine->device("k033906_2"); + device_t *k033906_2 = space->machine->device("k033906_2"); k033906_w(k033906_2, offset, data, mem_mask); } diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c index e057cdc0b21..3c80e7de98d 100644 --- a/src/mame/machine/leland.c +++ b/src/mame/machine/leland.c @@ -1157,7 +1157,7 @@ READ8_HANDLER( leland_master_input_r ) WRITE8_HANDLER( leland_master_output_w ) { - running_device *eeprom; + device_t *eeprom; switch (offset) { diff --git a/src/mame/machine/mathbox.c b/src/mame/machine/mathbox.c index 47387897be2..9c911835859 100644 --- a/src/mame/machine/mathbox.c +++ b/src/mame/machine/mathbox.c @@ -32,7 +32,7 @@ typedef struct _mathbox_state mathbox_state; struct _mathbox_state { - running_device *device; + device_t *device; /* math box scratch registers */ INT16 reg[16]; @@ -51,7 +51,7 @@ struct _mathbox_state into a mathbox_state -------------------------------------------------*/ -INLINE mathbox_state *get_safe_token(running_device *device) +INLINE mathbox_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MATHBOX); diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c index c5357bbdfc1..a22946069ab 100644 --- a/src/mame/machine/mcr.c +++ b/src/mame/machine/mcr.c @@ -191,7 +191,7 @@ MACHINE_RESET( mcr ) INTERRUPT_GEN( mcr_interrupt ) { - running_device *ctc = device->machine->device("ctc"); + device_t *ctc = device->machine->device("ctc"); /* CTC line 2 is connected to VBLANK, which is once every 1/2 frame */ /* for the 30Hz interlaced display */ @@ -210,7 +210,7 @@ INTERRUPT_GEN( mcr_interrupt ) INTERRUPT_GEN( mcr_ipu_interrupt ) { - running_device *ctc = device->machine->device("ipu_ctc"); + device_t *ctc = device->machine->device("ipu_ctc"); /* CTC line 3 is connected to 493, which is signalled once every */ /* frame at 30Hz */ diff --git a/src/mame/machine/mcr68.c b/src/mame/machine/mcr68.c index f00bfdc74d1..60700f38747 100644 --- a/src/mame/machine/mcr68.c +++ b/src/mame/machine/mcr68.c @@ -341,14 +341,14 @@ static WRITE_LINE_DEVICE_HANDLER( zwackery_pia_irq ) static TIMER_CALLBACK( zwackery_493_off_callback ) { - running_device *pia = machine->device("pia0"); + device_t *pia = machine->device("pia0"); pia6821_ca1_w(pia, 0); } static TIMER_CALLBACK( zwackery_493_callback ) { - running_device *pia = machine->device("pia0"); + device_t *pia = machine->device("pia0"); pia6821_ca1_w(pia, 1); timer_set(machine, machine->primary_screen->scan_period(), NULL, 0, zwackery_493_off_callback); diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c index 56a4e2fc516..0f65d957fd8 100644 --- a/src/mame/machine/mhavoc.c +++ b/src/mame/machine/mhavoc.c @@ -327,7 +327,7 @@ static WRITE8_HANDLER( mhavocrv_speech_data_w ) static WRITE8_HANDLER( mhavocrv_speech_strobe_w ) { - running_device *tms = space->machine->device("tms"); + device_t *tms = space->machine->device("tms"); tms5220_data_w(tms, 0, speech_write_buffer); } diff --git a/src/mame/machine/micro3d.c b/src/mame/machine/micro3d.c index 40ebd295d89..cfbb2816c51 100644 --- a/src/mame/machine/micro3d.c +++ b/src/mame/machine/micro3d.c @@ -29,12 +29,12 @@ * *************************************/ -void micro3d_duart_irq_handler(running_device *device, UINT8 vector) +void micro3d_duart_irq_handler(device_t *device, UINT8 vector) { cputag_set_input_line_and_vector(device->machine, "maincpu", 3, HOLD_LINE, vector); }; -void micro3d_duart_tx(running_device *device, int channel, UINT8 data) +void micro3d_duart_tx(device_t *device, int channel, UINT8 data) { micro3d_state *state = device->machine->driver_data(); @@ -51,13 +51,13 @@ void micro3d_duart_tx(running_device *device, int channel, UINT8 data) } }; -static int data_to_i8031(running_device *device) +static int data_to_i8031(device_t *device) { micro3d_state *state = device->machine->driver_data(); return state->m68681_tx0; } -static void data_from_i8031(running_device *device, int data) +static void data_from_i8031(device_t *device, int data) { micro3d_state *state = device->machine->driver_data(); duart68681_rx_data(state->duart68681, 1, data); @@ -71,7 +71,7 @@ static void data_from_i8031(running_device *device, int data) * 4: - * 5: - */ -UINT8 micro3d_duart_input_r(running_device *device) +UINT8 micro3d_duart_input_r(device_t *device) { return 0x2; } @@ -80,7 +80,7 @@ UINT8 micro3d_duart_input_r(running_device *device) * 5: /I8051 reset * 7: Status LED */ -void micro3d_duart_output_w(running_device *device, UINT8 data) +void micro3d_duart_output_w(device_t *device, UINT8 data) { cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_RESET, data & 0x20 ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/mame/machine/midwayic.c b/src/mame/machine/midwayic.c index 9c487725800..06b3a3b713a 100644 --- a/src/mame/machine/midwayic.c +++ b/src/mame/machine/midwayic.c @@ -69,7 +69,7 @@ struct ioasic_state UINT32 reg[16]; UINT8 has_dcs; UINT8 has_cage; - running_device *dcs_cpu; + device_t *dcs_cpu; UINT8 shuffle_type; UINT8 shuffle_active; const UINT8 * shuffle_map; @@ -558,8 +558,8 @@ enum IOASIC_INTCTL /* f: interrupt control */ }; -static UINT16 ioasic_fifo_r(running_device *device); -static UINT16 ioasic_fifo_status_r(running_device *device); +static UINT16 ioasic_fifo_r(device_t *device); +static UINT16 ioasic_fifo_status_r(device_t *device); static void ioasic_input_empty(running_machine *machine, int state); static void ioasic_output_full(running_machine *machine, int state); static void update_ioasic_irq(running_machine *machine); @@ -724,7 +724,7 @@ static void ioasic_output_full(running_machine *machine, int state) * *************************************/ -static UINT16 ioasic_fifo_r(running_device *device) +static UINT16 ioasic_fifo_r(device_t *device) { UINT16 result = 0; @@ -759,7 +759,7 @@ static UINT16 ioasic_fifo_r(running_device *device) } -static UINT16 ioasic_fifo_status_r(running_device *device) +static UINT16 ioasic_fifo_status_r(device_t *device) { UINT16 result = 0; diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c index e4ff7c5ad6f..11f6a3e7550 100644 --- a/src/mame/machine/model1.c +++ b/src/mame/machine/model1.c @@ -1987,7 +1987,7 @@ void model1_vr_tgp_reset( running_machine *machine ) } /* FIFO */ -static int copro_fifoin_pop(running_device *device, UINT32 *result) +static int copro_fifoin_pop(device_t *device, UINT32 *result) { UINT32 r; @@ -2054,7 +2054,7 @@ static UINT32 copro_fifoout_pop(address_space *space) return r; } -static void copro_fifoout_push(running_device *device, UINT32 data) +static void copro_fifoout_push(device_t *device, UINT32 data) { if (copro_fifoout_num == FIFO_SIZE) { diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 177e61b44e8..27072b3068b 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -427,7 +427,7 @@ static void sp_dma(int direction) } } -static void sp_set_status(running_device *device, UINT32 status) +static void sp_set_status(device_t *device, UINT32 status) { if (status & 0x1) { diff --git a/src/mame/machine/namco06.c b/src/mame/machine/namco06.c index 06b5e0a5204..57bbfbb574f 100644 --- a/src/mame/machine/namco06.c +++ b/src/mame/machine/namco06.c @@ -101,11 +101,11 @@ struct _namco_06xx_state cpu_device *nmicpu; device_t *device[4]; read8_device_func read[4]; - void (*readreq[4])(running_device *device); + void (*readreq[4])(device_t *device); write8_device_func write[4]; }; -INLINE namco_06xx_state *get_safe_token(running_device *device) +INLINE namco_06xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_06XX); @@ -117,7 +117,7 @@ INLINE namco_06xx_state *get_safe_token(running_device *device) static TIMER_CALLBACK( nmi_generate ) { - namco_06xx_state *state = get_safe_token((running_device *)ptr); + namco_06xx_state *state = get_safe_token((device_t *)ptr); if (!state->nmicpu->suspended(SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE)) { diff --git a/src/mame/machine/namco50.c b/src/mame/machine/namco50.c index 08b00dad5c7..9c402caa822 100644 --- a/src/mame/machine/namco50.c +++ b/src/mame/machine/namco50.c @@ -138,13 +138,13 @@ Flags: 80=high score, 40=first bonus, 20=interval bonus, 10=? typedef struct _namco_50xx_state namco_50xx_state; struct _namco_50xx_state { - running_device * cpu; + device_t * cpu; UINT8 latched_cmd; UINT8 latched_rw; UINT8 portO; }; -INLINE namco_50xx_state *get_safe_token(running_device *device) +INLINE namco_50xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_50XX); @@ -156,7 +156,7 @@ INLINE namco_50xx_state *get_safe_token(running_device *device) static TIMER_CALLBACK( namco_50xx_latch_callback ) { - namco_50xx_state *state = get_safe_token((running_device *)ptr); + namco_50xx_state *state = get_safe_token((device_t *)ptr); state->latched_cmd = param; state->latched_rw = 0; } @@ -164,7 +164,7 @@ static TIMER_CALLBACK( namco_50xx_latch_callback ) static TIMER_CALLBACK( namco_50xx_readrequest_callback ) { - namco_50xx_state *state = get_safe_token((running_device *)ptr); + namco_50xx_state *state = get_safe_token((device_t *)ptr); state->latched_rw = 1; } @@ -204,11 +204,11 @@ static WRITE8_HANDLER( namco_50xx_O_w ) static TIMER_CALLBACK( namco_50xx_irq_clear ) { - namco_50xx_state *state = get_safe_token((running_device *)ptr); + namco_50xx_state *state = get_safe_token((device_t *)ptr); cpu_set_input_line(state->cpu, 0, CLEAR_LINE); } -static void namco_50xx_irq_set(running_device *device) +static void namco_50xx_irq_set(device_t *device) { namco_50xx_state *state = get_safe_token(device); @@ -230,7 +230,7 @@ WRITE8_DEVICE_HANDLER( namco_50xx_write ) } -void namco_50xx_read_request(running_device *device) +void namco_50xx_read_request(device_t *device) { timer_call_after_resynch(device->machine, (void *)device, 0, namco_50xx_readrequest_callback); diff --git a/src/mame/machine/namco50.h b/src/mame/machine/namco50.h index f3d2cf8703a..86039462639 100644 --- a/src/mame/machine/namco50.h +++ b/src/mame/machine/namco50.h @@ -9,7 +9,7 @@ READ8_DEVICE_HANDLER( namco_50xx_read ); -void namco_50xx_read_request(running_device *device); +void namco_50xx_read_request(device_t *device); WRITE8_DEVICE_HANDLER( namco_50xx_write ); diff --git a/src/mame/machine/namco51.c b/src/mame/machine/namco51.c index 0b60f965449..2cd7227bd01 100644 --- a/src/mame/machine/namco51.c +++ b/src/mame/machine/namco51.c @@ -70,7 +70,7 @@ typedef struct _namco_51xx_state namco_51xx_state; struct _namco_51xx_state { - running_device * cpu; + device_t * cpu; devcb_resolved_read8 in[4]; devcb_resolved_write8 out[2]; INT32 lastcoins,lastbuttons; @@ -82,7 +82,7 @@ struct _namco_51xx_state INT32 mode,coincred_mode,remap_joy; }; -INLINE namco_51xx_state *get_safe_token(running_device *device) +INLINE namco_51xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_51XX); diff --git a/src/mame/machine/namco53.c b/src/mame/machine/namco53.c index 2a52563c9b7..97c2265b0b7 100644 --- a/src/mame/machine/namco53.c +++ b/src/mame/machine/namco53.c @@ -64,14 +64,14 @@ typedef struct _namco_53xx_state namco_53xx_state; struct _namco_53xx_state { - running_device * cpu; + device_t * cpu; UINT8 portO; devcb_resolved_read8 k; devcb_resolved_read8 in[4]; devcb_resolved_write8 p; }; -INLINE namco_53xx_state *get_safe_token(running_device *device) +INLINE namco_53xx_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAMCO_53XX); @@ -112,11 +112,11 @@ static WRITE8_HANDLER( namco_53xx_P_w ) static TIMER_CALLBACK( namco_53xx_irq_clear ) { - namco_53xx_state *state = get_safe_token((running_device *)ptr); + namco_53xx_state *state = get_safe_token((device_t *)ptr); cpu_set_input_line(state->cpu, 0, CLEAR_LINE); } -void namco_53xx_read_request(running_device *device) +void namco_53xx_read_request(device_t *device) { namco_53xx_state *state = get_safe_token(device); cpu_set_input_line(state->cpu, 0, ASSERT_LINE); diff --git a/src/mame/machine/namco53.h b/src/mame/machine/namco53.h index 134a9c15292..d09ba4c2d20 100644 --- a/src/mame/machine/namco53.h +++ b/src/mame/machine/namco53.h @@ -18,7 +18,7 @@ struct _namco_53xx_interface MCFG_DEVICE_CONFIG(_interface) -void namco_53xx_read_request(running_device *device); +void namco_53xx_read_request(device_t *device); READ8_DEVICE_HANDLER( namco_53xx_read ); diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c index 0a61998ec31..75f56506d82 100644 --- a/src/mame/machine/namcoio.c +++ b/src/mame/machine/namcoio.c @@ -132,14 +132,14 @@ struct _namcoio_state INT32 creds_per_coin[2]; INT32 in_count; - running_device *device; + device_t *device; }; /***************************************************************************** INLINE FUNCTIONS *****************************************************************************/ -INLINE namcoio_state *get_safe_token( running_device *device ) +INLINE namcoio_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == NAMCO56XX || device->type() == NAMCO58XX || device->type() == NAMCO59XX); @@ -147,7 +147,7 @@ INLINE namcoio_state *get_safe_token( running_device *device ) return (namcoio_state *)downcast(device)->token(); } -INLINE const namcoio_interface *get_interface( running_device *device ) +INLINE const namcoio_interface *get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == NAMCO56XX || device->type() == NAMCO58XX || device->type() == NAMCO59XX); @@ -165,7 +165,7 @@ INLINE const namcoio_interface *get_interface( running_device *device ) #define IORAM_READ(offset) (namcoio->ram[offset] & 0x0f) #define IORAM_WRITE(offset,data) {namcoio->ram[offset] = (data) & 0x0f;} -static void handle_coins( running_device *device, int swap ) +static void handle_coins( device_t *device, int swap ) { namcoio_state *namcoio = get_safe_token(device); int val, toggled; @@ -240,7 +240,7 @@ static void handle_coins( running_device *device, int swap ) } -void namco_customio_56xx_run( running_device *device ) +void namco_customio_56xx_run( device_t *device ) { namcoio_state *namcoio = get_safe_token(device); @@ -322,7 +322,7 @@ void namco_customio_56xx_run( running_device *device ) -void namco_customio_59xx_run( running_device *device ) +void namco_customio_59xx_run( device_t *device ) { namcoio_state *namcoio = get_safe_token(device); @@ -347,7 +347,7 @@ void namco_customio_59xx_run( running_device *device ) -void namco_customio_58xx_run( running_device *device ) +void namco_customio_58xx_run( device_t *device ) { namcoio_state *namcoio = get_safe_token(device); diff --git a/src/mame/machine/namcoio.h b/src/mame/machine/namcoio.h index 24cac8842c3..373e41cfc0b 100644 --- a/src/mame/machine/namcoio.h +++ b/src/mame/machine/namcoio.h @@ -13,7 +13,7 @@ struct _namcoio_interface devcb_read8 in[4]; devcb_write8 out[2]; - running_device *device; + device_t *device; }; DECLARE_LEGACY_DEVICE(NAMCO56XX, namcoio); @@ -49,9 +49,9 @@ READ_LINE_DEVICE_HANDLER( namcoio_read_reset_line ); /* these must be used in the single drivers, inside a timer */ -void namco_customio_56xx_run(running_device *device); -void namco_customio_58xx_run(running_device *device); -void namco_customio_59xx_run(running_device *device); +void namco_customio_56xx_run(device_t *device); +void namco_customio_58xx_run(device_t *device); +void namco_customio_59xx_run(device_t *device); #endif /* __NAMCOIO_H__ */ diff --git a/src/mame/machine/namcos2.c b/src/mame/machine/namcos2.c index 00b4f936821..1821309c002 100644 --- a/src/mame/machine/namcos2.c +++ b/src/mame/machine/namcos2.c @@ -468,7 +468,7 @@ static UINT16 ReadWriteC148( address_space *space, offs_t offset, UINT16 data, int bWrite ) { offs_t addr = ((offset * 2) + 0x1c0000) & 0x1fe000; - running_device *altcpu = NULL; + device_t *altcpu = NULL; UINT16 *pC148Reg = NULL; UINT16 *pC148RegAlt = NULL; UINT16 result = 0; diff --git a/src/mame/machine/naomibd.c b/src/mame/machine/naomibd.c index 393f9c26ed6..9d3f0a69567 100644 --- a/src/mame/machine/naomibd.c +++ b/src/mame/machine/naomibd.c @@ -205,7 +205,7 @@ struct _naomibd_state { UINT8 index; /* index of board */ UINT8 type; - running_device *device; /* pointer to our containing device */ + device_t *device; /* pointer to our containing device */ UINT8 * memory; UINT8 * protdata; @@ -312,7 +312,7 @@ static UINT16 block_decrypt(UINT32 game_key, UINT16 sequence_key, UINT16 counter in device is, in fact, a naomibd device -------------------------------------------------*/ -INLINE naomibd_state *get_safe_token(running_device *device) +INLINE naomibd_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == NAOMI_BOARD); @@ -328,7 +328,7 @@ INLINE naomibd_state *get_safe_token(running_device *device) * *************************************/ -int naomibd_interrupt_callback(running_device *device, naomibd_interrupt_func callback) +int naomibd_interrupt_callback(device_t *device, naomibd_interrupt_func callback) { naomibd_config *config = (naomibd_config *)downcast(device->baseconfig()).inline_config(); //naomibd_state *v = get_safe_token(device); @@ -337,20 +337,20 @@ int naomibd_interrupt_callback(running_device *device, naomibd_interrupt_func ca return 0; } -int naomibd_get_type(running_device *device) +int naomibd_get_type(device_t *device) { naomibd_state *v = get_safe_token(device); return v->type; } -void *naomibd_get_memory(running_device *device) +void *naomibd_get_memory(device_t *device) { return get_safe_token(device)->memory; } -offs_t naomibd_get_dmaoffset(running_device *device) +offs_t naomibd_get_dmaoffset(device_t *device) { offs_t result = 0; @@ -409,7 +409,7 @@ static STATE_POSTLOAD( naomibd_postload ) } -static void init_save_state(running_device *device) +static void init_save_state(device_t *device) { naomibd_state *v = get_safe_token(device); diff --git a/src/mame/machine/nmk004.c b/src/mame/machine/nmk004.c index 816b17fc92c..020f74f598b 100644 --- a/src/mame/machine/nmk004.c +++ b/src/mame/machine/nmk004.c @@ -96,7 +96,7 @@ static struct int protection_check; running_machine *machine; - running_device *ymdevice; + device_t *ymdevice; okim6295_device *oki1device; okim6295_device *oki2device; @@ -988,7 +988,7 @@ static void update_music(void) -void NMK004_irq(running_device *device, int irq) +void NMK004_irq(device_t *device, int irq) { if (irq) { diff --git a/src/mame/machine/nmk004.h b/src/mame/machine/nmk004.h index 366312e814f..86ca6f95e59 100644 --- a/src/mame/machine/nmk004.h +++ b/src/mame/machine/nmk004.h @@ -1,4 +1,4 @@ void NMK004_init(running_machine *machine); -void NMK004_irq(running_device *device, int irq); +void NMK004_irq(device_t *device, int irq); READ16_HANDLER( NMK004_r ); WRITE16_HANDLER( NMK004_w ); diff --git a/src/mame/machine/nmk112.c b/src/mame/machine/nmk112.c index 99226f47e44..d8acc9149ca 100644 --- a/src/mame/machine/nmk112.c +++ b/src/mame/machine/nmk112.c @@ -30,7 +30,7 @@ struct _nmk112_state INLINE FUNCTIONS *****************************************************************************/ -INLINE nmk112_state *get_safe_token( running_device *device ) +INLINE nmk112_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == NMK112); @@ -38,7 +38,7 @@ INLINE nmk112_state *get_safe_token( running_device *device ) return (nmk112_state *)downcast(device)->token(); } -INLINE const nmk112_interface *get_interface( running_device *device ) +INLINE const nmk112_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == NMK112)); diff --git a/src/mame/machine/pcshare.c b/src/mame/machine/pcshare.c index 97a9f7d46db..533785cc333 100644 --- a/src/mame/machine/pcshare.c +++ b/src/mame/machine/pcshare.c @@ -220,7 +220,7 @@ static WRITE8_HANDLER(dma_page_select_w) } } -static void set_dma_channel(running_device *device, int channel, int state) +static void set_dma_channel(device_t *device, int channel, int state) { if (!state) dma_channel = channel; } diff --git a/src/mame/machine/playch10.c b/src/mame/machine/playch10.c index 8562f7109fb..bfeacb585f3 100644 --- a/src/mame/machine/playch10.c +++ b/src/mame/machine/playch10.c @@ -52,7 +52,7 @@ static chr_bank chr_page[8]; // Simple wrapper for ROM/RAM, since we could be ba MACHINE_RESET( pc10 ) { - running_device *rp5h01 = machine->device("rp5h01"); + device_t *rp5h01 = machine->device("rp5h01"); /* initialize latches and flip-flops */ pc10_nmi_enable = pc10_dog_di = pc10_dispmask = pc10_sdcs = pc10_int_detect = 0; @@ -197,7 +197,7 @@ WRITE8_HANDLER( pc10_CARTSEL_w ) READ8_HANDLER( pc10_prot_r ) { - running_device *rp5h01 = space->machine->device("rp5h01"); + device_t *rp5h01 = space->machine->device("rp5h01"); int data = 0xe7; /* we only support a single cart connected at slot 0 */ @@ -213,7 +213,7 @@ READ8_HANDLER( pc10_prot_r ) WRITE8_HANDLER( pc10_prot_w ) { - running_device *rp5h01 = space->machine->device("rp5h01"); + device_t *rp5h01 = space->machine->device("rp5h01"); /* we only support a single cart connected at slot 0 */ if (cart_sel == 0) { @@ -281,7 +281,7 @@ READ8_HANDLER( pc10_in1_r ) /* do the gun thing */ if (pc10_gun_controller) { - running_device *ppu = space->machine->device("ppu"); + device_t *ppu = space->machine->device("ppu"); int trigger = input_port_read(space->machine, "P1"); int x = input_port_read(space->machine, "GUNX"); int y = input_port_read(space->machine, "GUNY"); @@ -727,7 +727,7 @@ DRIVER_INIT( pcdboard_2 ) /* E Board games (Mike Tyson's Punchout) - BROKEN - FIX ME */ /* callback for the ppu_latch */ -static void mapper9_latch( running_device *ppu, offs_t offset ) +static void mapper9_latch( device_t *ppu, offs_t offset ) { if((offset & 0x1ff0) == 0x0fd0 && MMC2_bank_latch[0] != 0xfd) @@ -866,7 +866,7 @@ static int gboard_4screen; static int gboard_last_bank; static int gboard_command; -static void gboard_scanline_cb( running_device *device, int scanline, int vblank, int blanked ) +static void gboard_scanline_cb( device_t *device, int scanline, int vblank, int blanked ) { if (!vblank && !blanked) { @@ -880,7 +880,7 @@ static void gboard_scanline_cb( running_device *device, int scanline, int vblank static WRITE8_HANDLER( gboard_rom_switch_w ) { - running_device *ppu = space->machine->device("ppu"); + device_t *ppu = space->machine->device("ppu"); /* basically, a MMC3 mapper from the nes */ diff --git a/src/mame/machine/qix.c b/src/mame/machine/qix.c index 3197323a1de..d97edaa7fdc 100644 --- a/src/mame/machine/qix.c +++ b/src/mame/machine/qix.c @@ -252,7 +252,7 @@ MACHINE_START( qixmcu ) WRITE_LINE_DEVICE_HANDLER( qix_vsync_changed ) { - running_device *pia = device->machine->device("sndpia0"); + device_t *pia = device->machine->device("sndpia0"); pia6821_cb1_w(pia, state); } @@ -471,7 +471,7 @@ WRITE8_HANDLER( qix_68705_portC_w ) static TIMER_CALLBACK( pia_w_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; pia6821_w(device, param >> 8, param & 0xff); } diff --git a/src/mame/machine/s16fd.c b/src/mame/machine/s16fd.c index 285a09fac2b..2db1026924d 100644 --- a/src/mame/machine/s16fd.c +++ b/src/mame/machine/s16fd.c @@ -111,7 +111,7 @@ static void fd1094_setstate_and_decrypt(running_machine *machine, int state) } /* Callback for CMP.L instructions (state change) */ -static void fd1094_cmp_callback(running_device *device, UINT32 val, UINT8 reg) +static void fd1094_cmp_callback(device_t *device, UINT32 val, UINT8 reg) { if (reg == 0 && (val & 0x0000ffff) == 0x0000ffff) // ? { @@ -126,7 +126,7 @@ static IRQ_CALLBACK(fd1094_int_callback) return (0x60+irqline*4)/4; // vector address } -static void fd1094_rte_callback (running_device *device) +static void fd1094_rte_callback (device_t *device) { fd1094_setstate_and_decrypt(device->machine, FD1094_STATE_RTE); } @@ -143,7 +143,7 @@ static void fd1094_kludge_reset_values(void) /* function, to be called from MACHINE_RESET (every reset) */ -void fd1094_machine_init(running_device *device) +void fd1094_machine_init(device_t *device) { /* punt if no key; this allows us to be called even for non-FD1094 games */ if (!fd1094_key) diff --git a/src/mame/machine/s24fd.c b/src/mame/machine/s24fd.c index 00d527d647c..646acbf1684 100644 --- a/src/mame/machine/s24fd.c +++ b/src/mame/machine/s24fd.c @@ -89,7 +89,7 @@ static void s24_fd1094_setstate_and_decrypt(running_machine *machine, int state) } /* Callback for CMP.L instructions (state change) */ -static void s24_fd1094_cmp_callback(running_device *device, UINT32 val, UINT8 reg) +static void s24_fd1094_cmp_callback(device_t *device, UINT32 val, UINT8 reg) { if (reg == 0 && (val & 0x0000ffff) == 0x0000ffff) // ? { @@ -104,7 +104,7 @@ static IRQ_CALLBACK(s24_fd1094_int_callback) return (0x60+irqline*4)/4; // vector address } -static void s24_fd1094_rte_callback (running_device *device) +static void s24_fd1094_rte_callback (device_t *device) { s24_fd1094_setstate_and_decrypt(device->machine, FD1094_STATE_RTE); } diff --git a/src/mame/machine/segaic16.c b/src/mame/machine/segaic16.c index 1ab0e8a5c0f..67aec52a6b9 100644 --- a/src/mame/machine/segaic16.c +++ b/src/mame/machine/segaic16.c @@ -33,7 +33,7 @@ struct memory_mapper_chip { UINT8 regs[0x20]; - running_device *cpu; + device_t *cpu; const segaic16_memory_map_entry *map; void (*sound_w)(running_machine *, UINT8); UINT8 (*sound_r)(running_machine *); @@ -96,7 +96,7 @@ READ16_HANDLER( segaic16_open_bus_r ) * *************************************/ -void segaic16_memory_mapper_init(running_device *cpu, const segaic16_memory_map_entry *entrylist, void (*sound_w_callback)(running_machine *, UINT8), UINT8 (*sound_r_callback)(running_machine *)) +void segaic16_memory_mapper_init(device_t *cpu, const segaic16_memory_map_entry *entrylist, void (*sound_w_callback)(running_machine *, UINT8), UINT8 (*sound_r_callback)(running_machine *)) { struct memory_mapper_chip *chip = &memory_mapper; @@ -415,7 +415,7 @@ struct _ic_315_5248_state INLINE FUNCTIONS *****************************************************************************/ -INLINE ic_315_5248_state *_315_5248_get_safe_token( running_device *device ) +INLINE ic_315_5248_state *_315_5248_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == _315_5248); @@ -493,7 +493,7 @@ struct _ic_315_5249_state INLINE FUNCTIONS *****************************************************************************/ -INLINE ic_315_5249_state *_315_5249_get_safe_token( running_device *device ) +INLINE ic_315_5249_state *_315_5249_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == _315_5249); @@ -505,7 +505,7 @@ INLINE ic_315_5249_state *_315_5249_get_safe_token( running_device *device ) IMPLEMENTATION *****************************************************************************/ -static void update_divide( running_device *device, int mode ) +static void update_divide( device_t *device, int mode ) { ic_315_5249_state *ic_315_5249 = _315_5249_get_safe_token(device); @@ -651,7 +651,7 @@ struct _ic_315_5250_state INLINE FUNCTIONS *****************************************************************************/ -INLINE ic_315_5250_state *_315_5250_get_safe_token( running_device *device ) +INLINE ic_315_5250_state *_315_5250_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == _315_5250); @@ -659,7 +659,7 @@ INLINE ic_315_5250_state *_315_5250_get_safe_token( running_device *device ) return (ic_315_5250_state *)downcast(device)->token(); } -INLINE const ic_315_5250_interface *_315_5250_get_interface( running_device *device ) +INLINE const ic_315_5250_interface *_315_5250_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == _315_5250)); @@ -670,7 +670,7 @@ INLINE const ic_315_5250_interface *_315_5250_get_interface( running_device *dev IMPLEMENTATION *****************************************************************************/ -int segaic16_compare_timer_clock( running_device *device ) +int segaic16_compare_timer_clock( device_t *device ) { ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); int old_counter = ic_315_5250->counter; @@ -690,7 +690,7 @@ int segaic16_compare_timer_clock( running_device *device ) } -static void update_compare( running_device *device, int update_history ) +static void update_compare( device_t *device, int update_history ) { ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); int bound1 = (INT16)ic_315_5250->regs[0]; @@ -720,7 +720,7 @@ static void update_compare( running_device *device, int update_history ) } -static void timer_interrupt_ack( running_device *device ) +static void timer_interrupt_ack( device_t *device ) { ic_315_5250_state *ic_315_5250 = _315_5250_get_safe_token(device); diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h index f2bdb99a3ef..e3b105983e2 100644 --- a/src/mame/machine/segaic16.h +++ b/src/mame/machine/segaic16.h @@ -26,7 +26,7 @@ struct _segaic16_memory_map_entry const char * name; /* friendly name for debugging */ }; -void segaic16_memory_mapper_init(running_device *cpu, const segaic16_memory_map_entry *entrylist, void (*sound_w_callback)(running_machine *, UINT8), UINT8 (*sound_r_callback)(running_machine *)); +void segaic16_memory_mapper_init(device_t *cpu, const segaic16_memory_map_entry *entrylist, void (*sound_w_callback)(running_machine *, UINT8), UINT8 (*sound_r_callback)(running_machine *)); void segaic16_memory_mapper_reset(running_machine *machine); void segaic16_memory_mapper_config(running_machine *machine, const UINT8 *map_data); void segaic16_memory_mapper_set_decrypted(running_machine *machine, UINT8 *decrypted); @@ -86,6 +86,6 @@ READ16_DEVICE_HANDLER( segaic16_divide_r ); WRITE16_DEVICE_HANDLER( segaic16_divide_w ); /* compare/timer chip */ -int segaic16_compare_timer_clock( running_device *device ); +int segaic16_compare_timer_clock( device_t *device ); READ16_DEVICE_HANDLER( segaic16_compare_timer_r ); WRITE16_DEVICE_HANDLER( segaic16_compare_timer_w ); diff --git a/src/mame/machine/segas32.c b/src/mame/machine/segas32.c index dae81b3377e..0127c45f9d6 100644 --- a/src/mame/machine/segas32.c +++ b/src/mame/machine/segas32.c @@ -205,7 +205,7 @@ WRITE16_HANDLER(brival_protection_w) ****************************************************************************** ******************************************************************************/ -void darkedge_fd1149_vblank(running_device *device) +void darkedge_fd1149_vblank(device_t *device) { address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index 95dd265fd08..ebe93b82ee6 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -197,7 +197,7 @@ static const int sampleLimits[] = 0x7200 // (end of samples) }; -void stfight_adpcm_int(running_device *device) +void stfight_adpcm_int(device_t *device) { UINT8 *SAMPLES = memory_region(device->machine, "adpcm"); int adpcm_data = SAMPLES[adpcm_data_offs & 0x7fff]; diff --git a/src/mame/machine/taitoio.c b/src/mame/machine/taitoio.c index 97a104961ba..4bfa0060007 100644 --- a/src/mame/machine/taitoio.c +++ b/src/mame/machine/taitoio.c @@ -69,7 +69,7 @@ struct _tc0220ioc_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0220ioc_state *tc0220ioc_get_safe_token( running_device *device ) +INLINE tc0220ioc_state *tc0220ioc_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0220IOC); @@ -77,7 +77,7 @@ INLINE tc0220ioc_state *tc0220ioc_get_safe_token( running_device *device ) return (tc0220ioc_state *)downcast(device)->token(); } -INLINE const tc0220ioc_interface *tc0220ioc_get_interface( running_device *device ) +INLINE const tc0220ioc_interface *tc0220ioc_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0220IOC)); @@ -226,7 +226,7 @@ struct _tc0510nio_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0510nio_state *tc0510nio_get_safe_token( running_device *device ) +INLINE tc0510nio_state *tc0510nio_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0510NIO); @@ -234,7 +234,7 @@ INLINE tc0510nio_state *tc0510nio_get_safe_token( running_device *device ) return (tc0510nio_state *)downcast(device)->token(); } -INLINE const tc0510nio_interface *tc0510nio_get_interface( running_device *device ) +INLINE const tc0510nio_interface *tc0510nio_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0510NIO)); @@ -377,7 +377,7 @@ struct _tc0640fio_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0640fio_state *tc0640fio_get_safe_token( running_device *device ) +INLINE tc0640fio_state *tc0640fio_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0640FIO); @@ -385,7 +385,7 @@ INLINE tc0640fio_state *tc0640fio_get_safe_token( running_device *device ) return (tc0640fio_state *)downcast(device)->token(); } -INLINE const tc0640fio_interface *tc0640fio_get_interface( running_device *device ) +INLINE const tc0640fio_interface *tc0640fio_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0640FIO)); diff --git a/src/mame/machine/ticket.c b/src/mame/machine/ticket.c index 6f6339d36b2..bb69caf6a21 100644 --- a/src/mame/machine/ticket.c +++ b/src/mame/machine/ticket.c @@ -31,7 +31,7 @@ struct _ticket_state emu_timer *timer; }; -INLINE ticket_state *get_safe_token(running_device *device) +INLINE ticket_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == TICKET_DISPENSER); @@ -42,7 +42,7 @@ INLINE ticket_state *get_safe_token(running_device *device) static TIMER_CALLBACK( ticket_dispenser_toggle ) { - ticket_state *state = get_safe_token((running_device *)ptr); + ticket_state *state = get_safe_token((device_t *)ptr); /* If we still have power, keep toggling ticket states. */ if (state->power) diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c index d4625958985..9bc76f2c07c 100644 --- a/src/mame/machine/vertigo.c +++ b/src/mame/machine/vertigo.c @@ -11,7 +11,7 @@ #include "machine/pit8253.h" -static running_device *ttl74148; +static device_t *ttl74148; @@ -73,7 +73,7 @@ const struct pit8253_config vertigo_pit8254_config = * *************************************/ -void vertigo_update_irq(running_device *device) +void vertigo_update_irq(device_t *device) { if (irq_state < 7) cputag_set_input_line(device->machine, "maincpu", irq_state ^ 7, CLEAR_LINE); diff --git a/src/mame/machine/vsnes.c b/src/mame/machine/vsnes.c index 5d969ffe042..2b99a36aef2 100644 --- a/src/mame/machine/vsnes.c +++ b/src/mame/machine/vsnes.c @@ -362,7 +362,7 @@ DRIVER_INIT( vsnormal ) static WRITE8_HANDLER( gun_in0_w ) { - running_device *ppu1 = space->machine->device("ppu1"); + device_t *ppu1 = space->machine->device("ppu1"); static int zapstore; if (vsnes_do_vrom_bank) @@ -678,7 +678,7 @@ static void mapper4_set_chr( running_machine *machine ) #define BOTTOM_VISIBLE_SCANLINE 239 /* The bottommost visible scanline */ #define NUM_SCANLINE 262 -static void mapper4_irq( running_device *device, int scanline, int vblank, int blanked ) +static void mapper4_irq( device_t *device, int scanline, int vblank, int blanked ) { if (scanline < PPU_BOTTOM_VISIBLE_SCANLINE) { @@ -699,7 +699,7 @@ static void mapper4_irq( running_device *device, int scanline, int vblank, int b static WRITE8_HANDLER( mapper4_w ) { - running_device *ppu1 = space->machine->device("ppu1"); + device_t *ppu1 = space->machine->device("ppu1"); UINT8 MMC3_helper, cmd; switch (offset & 0x6001) @@ -1019,7 +1019,7 @@ DRIVER_INIT( bnglngby ) static WRITE8_HANDLER( vsdual_vrom_banking ) { - running_device *other_cpu = (space->cpu == space->machine->device("maincpu")) ? space->machine->device("sub") : space->machine->device("maincpu"); + device_t *other_cpu = (space->cpu == space->machine->device("maincpu")) ? space->machine->device("sub") : space->machine->device("maincpu"); /* switch vrom */ (space->cpu == space->machine->device("maincpu")) ? memory_set_bank(space->machine, "bank2", BIT(data, 2)) : memory_set_bank(space->machine, "bank3", BIT(data, 2)); diff --git a/src/mame/machine/williams.c b/src/mame/machine/williams.c index e679ee6e48f..bc873bcafad 100644 --- a/src/mame/machine/williams.c +++ b/src/mame/machine/williams.c @@ -26,9 +26,9 @@ static UINT8 vram_bank; static UINT16 joust2_current_sound_data; /* older-Williams routines */ -static void williams_main_irq(running_device *device, int state); -static void williams_main_firq(running_device *device, int state); -static void williams_snd_irq(running_device *device, int state); +static void williams_main_irq(device_t *device, int state); +static void williams_main_firq(device_t *device, int state); +static void williams_snd_irq(device_t *device, int state); static WRITE8_DEVICE_HANDLER( williams_snd_cmd_w ); static WRITE8_DEVICE_HANDLER( playball_snd_cmd_w ); @@ -40,8 +40,8 @@ static READ8_DEVICE_HANDLER( williams_49way_port_0_r ); /* newer-Williams routines */ static WRITE8_DEVICE_HANDLER( williams2_snd_cmd_w ); -static void mysticm_main_irq(running_device *device, int state); -static void tshoot_main_irq(running_device *device, int state); +static void mysticm_main_irq(device_t *device, int state); +static void tshoot_main_irq(device_t *device, int state); /* Lotto Fun-specific code */ static WRITE8_DEVICE_HANDLER( lottofun_coin_lock_w ); @@ -287,7 +287,7 @@ TIMER_DEVICE_CALLBACK( williams_count240_callback ) } -static void williams_main_irq(running_device *device, int state) +static void williams_main_irq(device_t *device, int state) { pia6821_device *pia_1 = device->machine->device("pia_1"); int combined_state = pia6821_get_irq_a(pia_1) | pia6821_get_irq_b(pia_1); @@ -297,14 +297,14 @@ static void williams_main_irq(running_device *device, int state) } -static void williams_main_firq(running_device *device, int state) +static void williams_main_firq(device_t *device, int state) { /* FIRQ to the main CPU */ cputag_set_input_line(device->machine, "maincpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); } -static void williams_snd_irq(running_device *device, int state) +static void williams_snd_irq(device_t *device, int state) { pia6821_device *pia_2 = device->machine->device("pia_2"); int combined_state = pia6821_get_irq_a(pia_2) | pia6821_get_irq_b(pia_2); @@ -321,7 +321,7 @@ static void williams_snd_irq(running_device *device, int state) * *************************************/ -static void mysticm_main_irq(running_device *device, int state) +static void mysticm_main_irq(device_t *device, int state) { pia6821_device *pia_0 = device->machine->device("pia_0"); pia6821_device *pia_1 = device->machine->device("pia_1"); @@ -332,7 +332,7 @@ static void mysticm_main_irq(running_device *device, int state) } -static void tshoot_main_irq(running_device *device, int state) +static void tshoot_main_irq(device_t *device, int state) { pia6821_device *pia_0 = device->machine->device("pia_0"); pia6821_device *pia_1 = device->machine->device("pia_1"); diff --git a/src/mame/video/cinemat.c b/src/mame/video/cinemat.c index 93648e5a754..4b4749805f8 100644 --- a/src/mame/video/cinemat.c +++ b/src/mame/video/cinemat.c @@ -46,7 +46,7 @@ static UINT8 last_control; * *************************************/ -void cinemat_vector_callback(running_device *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift) +void cinemat_vector_callback(device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift) { const rectangle &visarea = device->machine->primary_screen->visible_area(); int intensity = 0xff; diff --git a/src/mame/video/combatsc.c b/src/mame/video/combatsc.c index ee12c5479e6..83e72a8c8ac 100644 --- a/src/mame/video/combatsc.c +++ b/src/mame/video/combatsc.c @@ -358,7 +358,7 @@ WRITE8_HANDLER( combatsc_video_w ) WRITE8_HANDLER( combatsc_pf_control_w ) { combatsc_state *state = space->machine->driver_data(); - running_device *k007121 = state->video_circuit ? state->k007121_2 : state->k007121_1; + device_t *k007121 = state->video_circuit ? state->k007121_2 : state->k007121_1; k007121_ctrl_w(k007121, offset, data); if (offset == 7) @@ -396,7 +396,7 @@ WRITE8_HANDLER( combatsc_scrollram_w ) static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const UINT8 *source, int circuit, UINT32 pri_mask ) { combatsc_state *state = machine->driver_data(); - running_device *k007121 = circuit ? state->k007121_2 : state->k007121_1; + device_t *k007121 = circuit ? state->k007121_2 : state->k007121_1; int base_color = (circuit * 4) * 16 + (k007121_ctrlram_r(k007121, 6) & 0x10) * 2; k007121_sprites_draw(k007121, bitmap, cliprect, machine->gfx[circuit], machine->colortable, source, base_color, 0, 0, pri_mask); diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c index 15b6bca9989..e289fee1443 100644 --- a/src/mame/video/contra.c +++ b/src/mame/video/contra.c @@ -304,7 +304,7 @@ WRITE8_HANDLER( contra_K007121_ctrl_1_w ) static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int bank ) { contra_state *state = machine->driver_data(); - running_device *k007121 = bank ? state->k007121_2 : state->k007121_1; + device_t *k007121 = bank ? state->k007121_2 : state->k007121_1; int base_color = (k007121_ctrlram_r(k007121, 6) & 0x30) * 2; const UINT8 *source; diff --git a/src/mame/video/cyberbal.c b/src/mame/video/cyberbal.c index b2d530eef45..192ddb3b131 100644 --- a/src/mame/video/cyberbal.c +++ b/src/mame/video/cyberbal.c @@ -343,7 +343,7 @@ static void update_one_screen(screen_device &screen, bitmap_t *bitmap, const rec rectangle visarea = screen.visible_area(); /* for 2p games, the left screen is the main screen */ - running_device *left_screen = screen.machine->device("lscreen"); + device_t *left_screen = screen.machine->device("lscreen"); if (left_screen == NULL) left_screen = screen.machine->device("screen"); diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c index d47b9173a9c..e0d104b18f2 100644 --- a/src/mame/video/deco16ic.c +++ b/src/mame/video/deco16ic.c @@ -205,7 +205,7 @@ struct _deco16ic_state INLINE FUNCTIONS *****************************************************************************/ -INLINE deco16ic_state *get_safe_token( running_device *device ) +INLINE deco16ic_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == DECO16IC); @@ -213,7 +213,7 @@ INLINE deco16ic_state *get_safe_token( running_device *device ) return (deco16ic_state *)downcast(device)->token(); } -INLINE const deco16ic_interface *get_interface( running_device *device ) +INLINE const deco16ic_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == DECO16IC)); @@ -479,7 +479,7 @@ static TILE_GET_INFO_DEVICE( get_pf1_tile_info_b ) */ static void custom_tilemap_draw( - running_device *device, + device_t *device, bitmap_t *bitmap, tilemap_t *tilemap0_8x8, tilemap_t *tilemap0_16x16, @@ -588,7 +588,7 @@ static void custom_tilemap_draw( /******************************************************************************/ /* robocop 2 can switch between 2 tilemaps at 4bpp, or 1 at 8bpp */ -void deco16ic_set_tilemap_colour_mask( running_device *device, int tmap, int mask ) +void deco16ic_set_tilemap_colour_mask( device_t *device, int tmap, int mask ) { deco16ic_state *deco16ic = get_safe_token(device); @@ -601,7 +601,7 @@ void deco16ic_set_tilemap_colour_mask( running_device *device, int tmap, int mas } } -void deco16ic_pf34_set_gfxbank( running_device *device, int small, int big ) +void deco16ic_pf34_set_gfxbank( device_t *device, int small, int big ) { deco16ic_state *deco16ic = get_safe_token(device); @@ -618,7 +618,7 @@ void deco16ic_pf34_set_gfxbank( running_device *device, int small, int big ) } /* stoneage has broken scroll registers */ -void deco16ic_set_scrolldx( running_device *device, int tmap, int size, int dx, int dx_if_flipped ) +void deco16ic_set_scrolldx( device_t *device, int tmap, int size, int dx, int dx_if_flipped ) { deco16ic_state *deco16ic = get_safe_token(device); @@ -969,7 +969,7 @@ static int deco16_pf_update( return use_custom; } -void deco16ic_pf12_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr ) +void deco16ic_pf12_update( device_t *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr ) { deco16ic_state *deco16ic = get_safe_token(device); int bank1, bank2; @@ -1012,7 +1012,7 @@ void deco16ic_pf12_update( running_device *device, const UINT16 *rowscroll_1_ptr } } -void deco16ic_pf34_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr ) +void deco16ic_pf34_update( device_t *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr ) { deco16ic_state *deco16ic = get_safe_token(device); int bank1, bank2; @@ -1051,7 +1051,7 @@ void deco16ic_pf34_update( running_device *device, const UINT16 *rowscroll_1_ptr /*****************************************************************************************/ -void deco16ic_print_debug_info(running_device *device, bitmap_t *bitmap) +void deco16ic_print_debug_info(device_t *device, bitmap_t *bitmap) { deco16ic_state *deco16ic = get_safe_token(device); char buf[64*5]; @@ -1082,7 +1082,7 @@ void deco16ic_print_debug_info(running_device *device, bitmap_t *bitmap) /*****************************************************************************************/ -void deco16ic_clear_sprite_priority_bitmap( running_device *device ) +void deco16ic_clear_sprite_priority_bitmap( device_t *device ) { deco16ic_state *deco16ic = get_safe_token(device); @@ -1092,7 +1092,7 @@ void deco16ic_clear_sprite_priority_bitmap( running_device *device ) /* A special pdrawgfx z-buffered sprite renderer that is needed to properly draw multiple sprite sources with alpha */ void deco16ic_pdrawgfx( - running_device *device, + device_t *device, bitmap_t *dest, const rectangle *clip, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int transparent_color, UINT32 pri_mask, UINT32 sprite_mask, UINT8 write_pri, UINT8 alpha) @@ -1162,7 +1162,7 @@ void deco16ic_pdrawgfx( /*****************************************************************************************/ -void deco16ic_tilemap_1_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) +void deco16ic_tilemap_1_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) { deco16ic_state *deco16ic = get_safe_token(device); @@ -1179,7 +1179,7 @@ void deco16ic_tilemap_1_draw( running_device *device, bitmap_t *bitmap, const re } } -void deco16ic_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) +void deco16ic_tilemap_2_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) { deco16ic_state *deco16ic = get_safe_token(device); @@ -1196,7 +1196,7 @@ void deco16ic_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rec } } -void deco16ic_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) +void deco16ic_tilemap_3_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) { deco16ic_state *deco16ic = get_safe_token(device); @@ -1206,7 +1206,7 @@ void deco16ic_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rec tilemap_draw(bitmap, cliprect, deco16ic->pf3_tilemap_16x16, flags, priority); } -void deco16ic_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) +void deco16ic_tilemap_4_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) { deco16ic_state *deco16ic = get_safe_token(device); @@ -1219,7 +1219,7 @@ void deco16ic_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rec /*****************************************************************************************/ // Combines the output of two 4BPP tilemaps into an 8BPP tilemap -void deco16ic_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) +void deco16ic_tilemap_34_combine_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority) { deco16ic_state *deco16ic = get_safe_token(device); custom_tilemap_draw(device, bitmap, 0, deco16ic->pf3_tilemap_16x16, 0, deco16ic->pf4_tilemap_16x16, deco16ic->pf3_rowscroll_ptr, deco16ic->pf34_control[1], deco16ic->pf34_control[2], deco16ic->pf34_control[5] & 0xff, deco16ic->pf34_control[6] & 0xff, 0xf, 4, 0xff, flags, priority); diff --git a/src/mame/video/deco16ic.h b/src/mame/video/deco16ic.h index 77aa9641e92..0d288468516 100644 --- a/src/mame/video/deco16ic.h +++ b/src/mame/video/deco16ic.h @@ -92,33 +92,33 @@ READ16_DEVICE_HANDLER( deco16ic_priority_r ); READ16_DEVICE_HANDLER( deco16ic_71_r ); -void deco16ic_print_debug_info(running_device *device, bitmap_t *bitmap); +void deco16ic_print_debug_info(device_t *device, bitmap_t *bitmap); -void deco16ic_pf12_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr); -void deco16ic_pf34_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr); +void deco16ic_pf12_update(device_t *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr); +void deco16ic_pf34_update(device_t *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr); -void deco16ic_tilemap_1_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); -void deco16ic_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); -void deco16ic_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); -void deco16ic_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); +void deco16ic_tilemap_1_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); +void deco16ic_tilemap_2_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); +void deco16ic_tilemap_3_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); +void deco16ic_tilemap_4_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); /* used by boogwing, nitrobal */ -void deco16ic_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); +void deco16ic_tilemap_34_combine_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); /* used by boogwing, dassault, nitrobal */ -void deco16ic_clear_sprite_priority_bitmap(running_device *device); +void deco16ic_clear_sprite_priority_bitmap(device_t *device); void deco16ic_pdrawgfx( - running_device *device, + device_t *device, bitmap_t *dest,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha); /* used by robocop2 */ -void deco16ic_set_tilemap_colour_mask(running_device *device, int tmap, int mask); -void deco16ic_pf34_set_gfxbank(running_device *device, int small, int big); +void deco16ic_set_tilemap_colour_mask(device_t *device, int tmap, int mask); +void deco16ic_pf34_set_gfxbank(device_t *device, int small, int big); /* used by stoneage */ -void deco16ic_set_scrolldx(running_device *device, int tmap, int size, int dx, int dx_if_flipped); +void deco16ic_set_scrolldx(device_t *device, int tmap, int size, int dx, int dx_if_flipped); #endif diff --git a/src/mame/video/djmain.c b/src/mame/video/djmain.c index 50685a906a0..2042ab173f9 100644 --- a/src/mame/video/djmain.c +++ b/src/mame/video/djmain.c @@ -15,7 +15,7 @@ UINT32 *djmain_obj_ram; static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect) { - running_device *k055555 = machine->device("k055555"); + device_t *k055555 = machine->device("k055555"); int offs, pri_code; int sortedlist[NUM_SPRITES]; @@ -136,7 +136,7 @@ void djmain_tile_callback(running_machine* machine, int layer, int *code, int *c VIDEO_START( djmain ) { - running_device *k056832 = machine->device("k056832"); + device_t *k056832 = machine->device("k056832"); k056832_set_layer_offs(k056832, 0, -92, -27); // k056832_set_layer_offs(k056832, 1, -87, -27); @@ -145,8 +145,8 @@ VIDEO_START( djmain ) VIDEO_UPDATE( djmain ) { - running_device *k056832 = screen->machine->device("k056832"); - running_device *k055555 = screen->machine->device("k055555"); + device_t *k056832 = screen->machine->device("k056832"); + device_t *k055555 = screen->machine->device("k055555"); int enables = k055555_read_register(k055555, K55_INPUT_ENABLES); int pri[NUM_LAYERS + 1]; int order[NUM_LAYERS + 1]; diff --git a/src/mame/video/gaelco2.c b/src/mame/video/gaelco2.c index 04b6cce6a3d..712706b84ef 100644 --- a/src/mame/video/gaelco2.c +++ b/src/mame/video/gaelco2.c @@ -468,8 +468,8 @@ VIDEO_UPDATE( gaelco2_dual ) { int i; - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); /* read scroll values */ int scroll0x = gaelco2_videoram[0x2802/2] + 0x14; diff --git a/src/mame/video/galastrm.c b/src/mame/video/galastrm.c index 245100e37cb..208c30b35e5 100644 --- a/src/mame/video/galastrm.c +++ b/src/mame/video/galastrm.c @@ -450,8 +450,8 @@ static void tc0610_rotate_draw(running_machine *machine, bitmap_t *bitmap, bitma VIDEO_UPDATE( galastrm ) { - running_device *tc0100scn = screen->machine->device("tc0100scn"); - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0100scn = screen->machine->device("tc0100scn"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT8 pivlayer[3]; UINT16 priority; diff --git a/src/mame/video/galpanic.c b/src/mame/video/galpanic.c index e808125127e..27ef29a8fe7 100644 --- a/src/mame/video/galpanic.c +++ b/src/mame/video/galpanic.c @@ -102,7 +102,7 @@ static void draw_fgbitmap(bitmap_t *bitmap, const rectangle *cliprect) VIDEO_UPDATE( galpanic ) { - running_device *pandora = screen->machine->device("pandora"); + device_t *pandora = screen->machine->device("pandora"); /* copy the temporary bitmap to the screen */ copybitmap(bitmap,screen->machine->generic.tmpbitmap,0,0,0,0,cliprect); diff --git a/src/mame/video/gameplan.c b/src/mame/video/gameplan.c index aee709c1079..4072d0f2d85 100644 --- a/src/mame/video/gameplan.c +++ b/src/mame/video/gameplan.c @@ -218,7 +218,7 @@ static TIMER_CALLBACK( via_irq_delayed ) } -static void via_irq(running_device *device, int state) +static void via_irq(device_t *device, int state) { /* Kaos sits in a tight loop polling the VIA irq flags register, but that register is cleared by the irq handler. Therefore, I wait a bit before triggering the irq to diff --git a/src/mame/video/genesis.c b/src/mame/video/genesis.c index 8d24050f344..4008e58c3b9 100644 --- a/src/mame/video/genesis.c +++ b/src/mame/video/genesis.c @@ -292,7 +292,7 @@ READ16_HANDLER( genesis_vdp_r ) WRITE16_HANDLER( genesis_vdp_w ) { - running_device *device; + device_t *device; switch (offset) { case 0x00: /* Write data */ diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c index 3afb1a1cb73..8c4cb489d6f 100644 --- a/src/mame/video/gottlieb.c +++ b/src/mame/video/gottlieb.c @@ -84,7 +84,7 @@ WRITE8_HANDLER( gottlieb_video_control_w ) WRITE8_HANDLER( gottlieb_laserdisc_video_control_w ) { - running_device *laserdisc = space->machine->m_devicelist.first(LASERDISC); + device_t *laserdisc = space->machine->m_devicelist.first(LASERDISC); /* bit 0 works like the other games */ gottlieb_video_control_w(space, offset, data & 0x01); diff --git a/src/mame/video/gp9001.c b/src/mame/video/gp9001.c index 524b5ea30c5..69ab963ec4f 100644 --- a/src/mame/video/gp9001.c +++ b/src/mame/video/gp9001.c @@ -594,7 +594,7 @@ static void gp9001_scroll_reg_data_w(gp9001vdp_device *vdp, offs_t offset, UINT1 if ((gp9001_sub_cpu == CPU_2_Z80) && (data == 3)) { /* HACK! When tilted, sound CPU needs to be reset. */ - running_device *ym = vdp->machine->device("ymsnd"); + device_t *ym = vdp->machine->device("ymsnd"); if (ym && ym->type() == YM3812) { diff --git a/src/mame/video/groundfx.c b/src/mame/video/groundfx.c index fb67159fff2..c3abb47e8a7 100644 --- a/src/mame/video/groundfx.c +++ b/src/mame/video/groundfx.c @@ -213,8 +213,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan VIDEO_UPDATE( groundfx ) { - running_device *tc0100scn = screen->machine->device("tc0100scn"); - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0100scn = screen->machine->device("tc0100scn"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT8 pivlayer[3]; UINT16 priority; diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c index e0450b9a8b3..966a924c98d 100644 --- a/src/mame/video/gticlub.c +++ b/src/mame/video/gticlub.c @@ -977,7 +977,7 @@ VIDEO_START( gticlub ) VIDEO_UPDATE( gticlub ) { - running_device *k001604 = screen->machine->device("k001604_1"); + device_t *k001604 = screen->machine->device("k001604_1"); k001604_draw_back_layer(k001604, bitmap, cliprect); diff --git a/src/mame/video/gunbustr.c b/src/mame/video/gunbustr.c index b6e3cc050c6..45467a74b31 100644 --- a/src/mame/video/gunbustr.c +++ b/src/mame/video/gunbustr.c @@ -213,7 +213,7 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); VIDEO_UPDATE( gunbustr ) { - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT16 priority; static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; diff --git a/src/mame/video/hcastle.c b/src/mame/video/hcastle.c index a8e3b390c46..ef1ad10bf77 100644 --- a/src/mame/video/hcastle.c +++ b/src/mame/video/hcastle.c @@ -213,7 +213,7 @@ WRITE8_HANDLER( hcastle_pf2_control_w ) static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *sbank, int bank ) { hcastle_state *state = machine->driver_data(); - running_device *k007121 = bank ? state->k007121_2 : state->k007121_1; + device_t *k007121 = bank ? state->k007121_2 : state->k007121_1; int base_color = (k007121_ctrlram_r(k007121, 6) & 0x30) * 2; int bank_base = (bank == 0) ? 0x4000 * (state->gfx_bank & 1) : 0; diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c index e9e01012524..7f749ab28f6 100644 --- a/src/mame/video/jaguar.c +++ b/src/mame/video/jaguar.c @@ -335,14 +335,14 @@ static void update_cpu_irq(running_machine *machine) } -void jaguar_gpu_cpu_int(running_device *device) +void jaguar_gpu_cpu_int(device_t *device) { cpu_irq_state |= 2; update_cpu_irq(device->machine); } -void jaguar_dsp_cpu_int(running_device *device) +void jaguar_dsp_cpu_int(device_t *device) { cpu_irq_state |= 16; update_cpu_irq(device->machine); diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c index d61f492b224..665c696512b 100644 --- a/src/mame/video/kan_pand.c +++ b/src/mame/video/kan_pand.c @@ -66,7 +66,7 @@ struct _kaneko_pandora_state INLINE FUNCTIONS *****************************************************************************/ -INLINE kaneko_pandora_state *get_safe_token( running_device *device ) +INLINE kaneko_pandora_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == KANEKO_PANDORA); @@ -74,7 +74,7 @@ INLINE kaneko_pandora_state *get_safe_token( running_device *device ) return (kaneko_pandora_state *)downcast(device)->token(); } -INLINE const kaneko_pandora_interface *get_interface( running_device *device ) +INLINE const kaneko_pandora_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == KANEKO_PANDORA)); @@ -85,19 +85,19 @@ INLINE const kaneko_pandora_interface *get_interface( running_device *device ) IMPLEMENTATION *****************************************************************************/ -void pandora_set_bg_pen( running_device *device, int pen ) +void pandora_set_bg_pen( device_t *device, int pen ) { kaneko_pandora_state *pandora = get_safe_token(device); pandora->bg_pen = pen; } -void pandora_set_clear_bitmap( running_device *device, int clear ) +void pandora_set_clear_bitmap( device_t *device, int clear ) { kaneko_pandora_state *pandora = get_safe_token(device); pandora->clear_bitmap = clear; } -void pandora_update( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void pandora_update( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { kaneko_pandora_state *pandora = get_safe_token(device); @@ -111,7 +111,7 @@ void pandora_update( running_device *device, bitmap_t *bitmap, const rectangle * } -static void pandora_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +static void pandora_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { kaneko_pandora_state *pandora = get_safe_token(device); int sx = 0, sy = 0, x = 0, y = 0, offs; @@ -195,7 +195,7 @@ static void pandora_draw( running_device *device, bitmap_t *bitmap, const rectan } } -void pandora_eof( running_device *device ) +void pandora_eof( device_t *device ) { kaneko_pandora_state *pandora = get_safe_token(device); assert(pandora->spriteram != NULL); diff --git a/src/mame/video/kan_pand.h b/src/mame/video/kan_pand.h index 1abc79d2c3a..7f15797eec5 100644 --- a/src/mame/video/kan_pand.h +++ b/src/mame/video/kan_pand.h @@ -39,10 +39,10 @@ DECLARE_LEGACY_DEVICE(KANEKO_PANDORA, kaneko_pandora); DEVICE I/O FUNCTIONS ***************************************************************************/ -void pandora_update(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void pandora_eof(running_device *device); -void pandora_set_clear_bitmap(running_device *device, int clear); -void pandora_set_bg_pen( running_device *device, int pen ); +void pandora_update(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void pandora_eof(device_t *device); +void pandora_set_clear_bitmap(device_t *device, int clear); +void pandora_set_bg_pen( device_t *device, int pen ); WRITE8_DEVICE_HANDLER ( pandora_spriteram_w ); READ8_DEVICE_HANDLER( pandora_spriteram_r ); diff --git a/src/mame/video/kaneko16.c b/src/mame/video/kaneko16.c index 14867ae2b78..d96ab556fed 100644 --- a/src/mame/video/kaneko16.c +++ b/src/mame/video/kaneko16.c @@ -1121,7 +1121,7 @@ VIDEO_UPDATE( galsnew ) VIDEO_UPDATE( sandscrp ) { - running_device *pandora = screen->machine->device("pandora"); + device_t *pandora = screen->machine->device("pandora"); kaneko16_fill_bitmap(screen->machine,bitmap,cliprect); // if the display is disabled, do nothing? diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c index 3eb9206cd69..a9526cdaeb3 100644 --- a/src/mame/video/konamigx.c +++ b/src/mame/video/konamigx.c @@ -2387,8 +2387,8 @@ VIDEO_UPDATE(konamigx) if (konamigx_has_dual_screen) { - running_device *left_screen = screen->machine->device("screen"); - running_device *right_screen = screen->machine->device("screen2"); + device_t *left_screen = screen->machine->device("screen"); + device_t *right_screen = screen->machine->device("screen2"); /* the video gets demuxed by a board which plugs into the jamma connector */ if (screen==left_screen) @@ -2598,8 +2598,8 @@ VIDEO_UPDATE(konamigx) if (konamigx_has_dual_screen) { - running_device *left_screen = screen->machine->device("screen"); - running_device *right_screen = screen->machine->device("screen2"); + device_t *left_screen = screen->machine->device("screen"); + device_t *right_screen = screen->machine->device("screen2"); if (screen==left_screen) { diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index 46425c74621..8029a404ca4 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -1344,7 +1344,7 @@ struct _k007121_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k007121_state *k007121_get_safe_token( running_device *device ) +INLINE k007121_state *k007121_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K007121); @@ -1422,7 +1422,7 @@ WRITE8_DEVICE_HANDLER( k007121_ctrl_w ) * */ -void k007121_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx, colortable_t *ctable, +void k007121_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx, colortable_t *ctable, const UINT8 *source, int base_color, int global_x_offset, int bank_base, UINT32 pri_mask ) { k007121_state *k007121 = k007121_get_safe_token(device); @@ -1606,7 +1606,7 @@ struct _k007342_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k007342_state *k007342_get_safe_token( running_device *device ) +INLINE k007342_state *k007342_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K007342); @@ -1614,7 +1614,7 @@ INLINE k007342_state *k007342_get_safe_token( running_device *device ) return (k007342_state *)downcast(device)->token(); } -INLINE const k007342_interface *k007342_get_interface( running_device *device ) +INLINE const k007342_interface *k007342_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K007342)); @@ -1690,7 +1690,7 @@ WRITE8_DEVICE_HANDLER( k007342_vreg_w ) k007342->regs[offset] = data; } -void k007342_tilemap_update( running_device *device ) +void k007342_tilemap_update( device_t *device ) { k007342_state *k007342 = k007342_get_safe_token(device); int offs; @@ -1748,13 +1748,13 @@ void k007342_tilemap_update( running_device *device ) #endif } -void k007342_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int num, int flags, UINT32 priority ) +void k007342_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int num, int flags, UINT32 priority ) { k007342_state *k007342 = k007342_get_safe_token(device); tilemap_draw(bitmap, cliprect, k007342->tilemap[num], flags, priority); } -int k007342_is_int_enabled( running_device *device ) +int k007342_is_int_enabled( device_t *device ) { k007342_state *k007342 = k007342_get_safe_token(device); return k007342->int_enabled; @@ -1783,7 +1783,7 @@ static TILEMAP_MAPPER( k007342_scan ) return (col & 0x1f) + ((row & 0x1f) << 5) + ((col & 0x20) << 5); } -INLINE void k007342_get_tile_info( running_device *device, tile_data *tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram ) +INLINE void k007342_get_tile_info( device_t *device, tile_data *tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram ) { k007342_state *k007342 = k007342_get_safe_token(device); int color, code, flags; @@ -1890,7 +1890,7 @@ struct _k007420_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k007420_state *k007420_get_safe_token( running_device *device ) +INLINE k007420_state *k007420_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K007420); @@ -1898,7 +1898,7 @@ INLINE k007420_state *k007420_get_safe_token( running_device *device ) return (k007420_state *)downcast(device)->token(); } -INLINE const k007420_interface *k007420_get_interface( running_device *device ) +INLINE const k007420_interface *k007420_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K007420)); @@ -1941,7 +1941,7 @@ WRITE8_DEVICE_HANDLER( k007420_w ) * 7 | xxxxxxxx | unused */ -void k007420_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx ) +void k007420_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx ) { k007420_state *k007420 = k007420_get_safe_token(device); int offs; @@ -2167,7 +2167,7 @@ struct _k052109_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k052109_state *k052109_get_safe_token( running_device *device ) +INLINE k052109_state *k052109_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K052109); @@ -2175,7 +2175,7 @@ INLINE k052109_state *k052109_get_safe_token( running_device *device ) return (k052109_state *)downcast(device)->token(); } -INLINE const k052109_interface *k052109_get_interface( running_device *device ) +INLINE const k052109_interface *k052109_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K052109)); @@ -2387,27 +2387,27 @@ WRITE16_DEVICE_HANDLER( k052109_lsb_w ) k052109_w(device, offset, data & 0xff); } -void k052109_set_rmrd_line( running_device *device, int state ) +void k052109_set_rmrd_line( device_t *device, int state ) { k052109_state *k052109 = k052109_get_safe_token(device); k052109->rmrd_line = state; } -int k052109_get_rmrd_line(running_device *device ) +int k052109_get_rmrd_line(device_t *device ) { k052109_state *k052109 = k052109_get_safe_token(device); return k052109->rmrd_line; } -void k052109_tilemap_mark_dirty( running_device *device, int tmap_num ) +void k052109_tilemap_mark_dirty( device_t *device, int tmap_num ) { k052109_state *k052109 = k052109_get_safe_token(device); tilemap_mark_all_tiles_dirty(k052109->tilemap[tmap_num]); } -void k052109_tilemap_update( running_device *device ) +void k052109_tilemap_update( device_t *device ) { k052109_state *k052109 = k052109_get_safe_token(device); int xscroll, yscroll, offs; @@ -2560,20 +2560,20 @@ if (input_code_pressed(machine, KEYCODE_F)) #endif } -void k052109_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, UINT32 flags, UINT8 priority ) +void k052109_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, UINT32 flags, UINT8 priority ) { k052109_state *k052109 = k052109_get_safe_token(device); tilemap_draw(bitmap, cliprect, k052109->tilemap[tmap_num], flags, priority); } -int k052109_is_irq_enabled( running_device *device ) +int k052109_is_irq_enabled( device_t *device ) { k052109_state *k052109 = k052109_get_safe_token(device); return k052109->irq_enabled; } -void k052109_set_layer_offsets( running_device *device, int layer, int dx, int dy ) +void k052109_set_layer_offsets( device_t *device, int layer, int dx, int dy ) { k052109_state *k052109 = k052109_get_safe_token(device); @@ -2599,7 +2599,7 @@ void k052109_set_layer_offsets( running_device *device, int layer, int dx, int d color RAM ------xx depends on external connections (usually banking, flip) */ -INLINE void k052109_get_tile_info( running_device *device, tile_data *tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram1, UINT8 *vram2 ) +INLINE void k052109_get_tile_info( device_t *device, tile_data *tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram1, UINT8 *vram2 ) { k052109_state *k052109 = k052109_get_safe_token(device); int flipy = 0; @@ -2802,7 +2802,7 @@ struct _k051960_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k051960_state *k051960_get_safe_token( running_device *device ) +INLINE k051960_state *k051960_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K051960); @@ -2810,7 +2810,7 @@ INLINE k051960_state *k051960_get_safe_token( running_device *device ) return (k051960_state *)downcast(device)->token(); } -INLINE const k051960_interface *k051960_get_interface( running_device *device ) +INLINE const k051960_interface *k051960_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K051960)); @@ -2821,7 +2821,7 @@ INLINE const k051960_interface *k051960_get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -static int k051960_fetchromdata( running_device *device, int byte ) +static int k051960_fetchromdata( device_t *device, int byte ) { k051960_state *k051960 = k051960_get_safe_token(device); int code, color, pri, shadow, off1, addr; @@ -2938,19 +2938,19 @@ WRITE8_DEVICE_HANDLER( k051937_w ) } } -int k051960_is_irq_enabled( running_device *device ) +int k051960_is_irq_enabled( device_t *device ) { k051960_state *k051960 = k051960_get_safe_token(device); return k051960->irq_enabled; } -int k051960_is_nmi_enabled( running_device *device ) +int k051960_is_nmi_enabled( device_t *device ) { k051960_state *k051960 = k051960_get_safe_token(device); return k051960->nmi_enabled; } -void k051960_set_sprite_offsets( running_device *device, int dx, int dy ) +void k051960_set_sprite_offsets( device_t *device, int dx, int dy ) { k051960_state *k051960 = k051960_get_safe_token(device); k051960->dx = dx; @@ -3003,7 +3003,7 @@ WRITE16_DEVICE_HANDLER( k051937_word_w ) * Note that Aliens also uses the shadow bit to select the second sprite bank. */ -void k051960_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int min_priority, int max_priority ) +void k051960_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int min_priority, int max_priority ) { #define NUM_SPRITES 128 k051960_state *k051960 = k051960_get_safe_token(device); @@ -3344,7 +3344,7 @@ struct _k05324x_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k05324x_state *k05324x_get_safe_token( running_device *device ) +INLINE k05324x_state *k05324x_get_safe_token( device_t *device ) { assert(device != NULL); assert((device->type() == K053244 || device->type() == K053245)); @@ -3352,7 +3352,7 @@ INLINE k05324x_state *k05324x_get_safe_token( running_device *device ) return (k05324x_state *)downcast(device)->token(); } -INLINE const k05324x_interface *k05324x_get_interface( running_device *device ) +INLINE const k05324x_interface *k05324x_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K053244 || device->type() == K053245)); @@ -3363,7 +3363,7 @@ INLINE const k05324x_interface *k05324x_get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -void k053245_set_sprite_offs( running_device *device, int offsx, int offsy ) +void k053245_set_sprite_offs( device_t *device, int offsx, int offsy ) { k05324x_state *k053245 = k05324x_get_safe_token(device); k053245->dx = offsx; @@ -3403,7 +3403,7 @@ WRITE8_DEVICE_HANDLER( k053245_w ) k053245->ram[offset >> 1] = (k053245->ram[offset >> 1] & 0x00ff) | (data << 8); } -void k053245_clear_buffer( running_device *device ) +void k053245_clear_buffer( device_t *device ) { k05324x_state *k053245 = k05324x_get_safe_token(device); int i, e; @@ -3412,7 +3412,7 @@ void k053245_clear_buffer( running_device *device ) k053245->buffer[i] = 0; } -INLINE void k053245_update_buffer( running_device *device ) +INLINE void k053245_update_buffer( device_t *device ) { k05324x_state *k053245 = k05324x_get_safe_token(device); memcpy(k053245->buffer, k053245->ram, k053245->ramsize); @@ -3495,7 +3495,7 @@ WRITE16_DEVICE_HANDLER( k053244_word_w ) k053244_w(device, offset * 2 + 1, data & 0xff); } -void k053244_bankselect( running_device *device, int bank ) +void k053244_bankselect( device_t *device, int bank ) { k05324x_state *k053244 = k05324x_get_safe_token(device); k053244->rombank = bank; @@ -3529,7 +3529,7 @@ void k053244_bankselect( running_device *device, int bank ) * The rest of the sprite remains normal. */ -void k053245_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k053245_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { #define NUM_SPRITES 128 k05324x_state *k053245 = k05324x_get_safe_token(device); @@ -3783,7 +3783,7 @@ if (input_code_pressed(machine, KEYCODE_D)) /* Lethal Enforcers has 2 of these chips hooked up in parallel to give 6bpp gfx.. lets cheat a bit and make emulating it a little less messy by using a custom function instead */ -void k053245_sprites_draw_lethal( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k053245_sprites_draw_lethal( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { #define NUM_SPRITES 128 k05324x_state *k053245 = k05324x_get_safe_token(device); @@ -4134,7 +4134,7 @@ struct _k053247_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k053247_state *k053247_get_safe_token( running_device *device ) +INLINE k053247_state *k053247_get_safe_token( device_t *device ) { assert(device != NULL); assert((device->type() == K053246 || device->type() == K053247 || device->type() == K055673)); @@ -4142,7 +4142,7 @@ INLINE k053247_state *k053247_get_safe_token( running_device *device ) return (k053247_state *)downcast(device)->token(); } -INLINE const k053247_interface *k053247_get_interface( running_device *device ) +INLINE const k053247_interface *k053247_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K053246 || device->type() == K053247 || device->type() == K055673)); @@ -4154,13 +4154,13 @@ INLINE const k053247_interface *k053247_get_interface( running_device *device ) *****************************************************************************/ #if 0 -void k053247_get_gfx( running_device *device, gfx_element **gfx ) +void k053247_get_gfx( device_t *device, gfx_element **gfx ) { k053247_state *k053247 = k053247_get_safe_token(device); *gfx = k053247->gfx; } -void k053247_get_cb( running_device *device, void (**callback)(int *, int *, int *) ) +void k053247_get_cb( device_t *device, void (**callback)(int *, int *, int *) ) { k053247_state *k053247 = k053247_get_safe_token(device); *callback = k053247->callback; @@ -4168,44 +4168,44 @@ void k053247_get_cb( running_device *device, void (**callback)(int *, int *, int #endif -void k053247_get_ram( running_device *device, UINT16 **ram ) +void k053247_get_ram( device_t *device, UINT16 **ram ) { k053247_state *k053247 = k053247_get_safe_token(device); *ram = k053247->ram; } -int k053247_get_dx( running_device *device ) +int k053247_get_dx( device_t *device ) { k053247_state *k053247 = k053247_get_safe_token(device); return k053247->dx; } -int k053247_get_dy( running_device *device ) +int k053247_get_dy( device_t *device ) { k053247_state *k053247 = k053247_get_safe_token(device); return k053247->dy; } -int k053246_read_register( running_device *device, int regnum ) +int k053246_read_register( device_t *device, int regnum ) { k053247_state *k053247 = k053247_get_safe_token(device); return(k053247->kx46_regs[regnum]); } -int k053247_read_register( running_device *device, int regnum ) +int k053247_read_register( device_t *device, int regnum ) { k053247_state *k053247 = k053247_get_safe_token(device); return(k053247->kx47_regs[regnum]); } -void k053247_set_sprite_offs( running_device *device, int offsx, int offsy ) +void k053247_set_sprite_offs( device_t *device, int offsx, int offsy ) { k053247_state *k053247 = k053247_get_safe_token(device); k053247->dx = offsx; k053247->dy = offsy; } -void k053247_wraparound_enable( running_device *device, int status ) +void k053247_wraparound_enable( device_t *device, int status ) { k053247_state *k053247 = k053247_get_safe_token(device); k053247->wraparound = status; @@ -4408,13 +4408,13 @@ WRITE32_DEVICE_HANDLER( k053246_long_w ) k053246_word_w(device, offset + 1, data, mem_mask); } -void k053246_set_objcha_line( running_device *device, int state ) +void k053246_set_objcha_line( device_t *device, int state ) { k053247_state *k053246 = k053247_get_safe_token(device); k053246->objcha_line = state; } -int k053246_is_irq_enabled( running_device *device ) +int k053246_is_irq_enabled( device_t *device ) { k053247_state *k053247 = k053247_get_safe_token(device); // This bit enables obj DMA rather than obj IRQ even though the two functions usually coincide. @@ -4450,7 +4450,7 @@ int k053246_is_irq_enabled( running_device *device ) * The rest of the sprite remains normal. */ -void k053247_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k053247_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { #define NUM_SPRITES 256 k053247_state *k053246 = k053247_get_safe_token(device); @@ -5087,13 +5087,13 @@ static DEVICE_RESET( k053247 ) */ -void k05324x_set_z_rejection( running_device *device, int zcode ) +void k05324x_set_z_rejection( device_t *device, int zcode ) { k05324x_state *k05324x = k05324x_get_safe_token(device); k05324x->z_rejection = zcode; } -void k053247_set_z_rejection( running_device *device, int zcode ) +void k053247_set_z_rejection( device_t *device, int zcode ) { k053247_state *k053247 = k053247_get_safe_token(device); k053247->z_rejection = zcode; @@ -5125,7 +5125,7 @@ struct _k051316_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k051316_state *k051316_get_safe_token( running_device *device ) +INLINE k051316_state *k051316_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K051316); @@ -5133,7 +5133,7 @@ INLINE k051316_state *k051316_get_safe_token( running_device *device ) return (k051316_state *)downcast(device)->token(); } -INLINE const k051316_interface *k051316_get_interface( running_device *device ) +INLINE const k051316_interface *k051316_get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == K051316); @@ -5189,7 +5189,7 @@ WRITE8_DEVICE_HANDLER( k051316_ctrl_w ) } // a few games (ajax, rollerg, ultraman, etc.) can enable and disable wraparound after start -void k051316_wraparound_enable( running_device *device, int status ) +void k051316_wraparound_enable( device_t *device, int status ) { k051316_state *k051316= k051316_get_safe_token(device); k051316->wraparound = status; @@ -5201,7 +5201,7 @@ void k051316_wraparound_enable( running_device *device, int status ) ***************************************************************************/ -INLINE void k051316_get_tile_info( running_device *device, tile_data *tileinfo, int tile_index ) +INLINE void k051316_get_tile_info( device_t *device, tile_data *tileinfo, int tile_index ) { k051316_state *k051316 = k051316_get_safe_token(device); int code = k051316->ram[tile_index]; @@ -5221,7 +5221,7 @@ INLINE void k051316_get_tile_info( running_device *device, tile_data *tileinfo, static TILE_GET_INFO_DEVICE( k051316_get_tile_info0 ) { k051316_get_tile_info(device, tileinfo, tile_index); } -void k051316_zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) +void k051316_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) { k051316_state *k051316= k051316_get_safe_token(device); UINT32 startx, starty; @@ -5413,7 +5413,7 @@ struct _k053936_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k053936_state *k053936_get_safe_token( running_device *device ) +INLINE k053936_state *k053936_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K053936); @@ -5421,7 +5421,7 @@ INLINE k053936_state *k053936_get_safe_token( running_device *device ) return (k053936_state *)downcast(device)->token(); } -INLINE const k053936_interface *k053936_get_interface( running_device *device ) +INLINE const k053936_interface *k053936_get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == K053936); @@ -5459,7 +5459,7 @@ READ16_DEVICE_HANDLER( k053936_linectrl_r ) // there is another implementation of this in video/konamigx.c (!) // why? shall they be merged? -void k053936_zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack ) +void k053936_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack ) { k053936_state *k053936= k053936_get_safe_token(device); if (!tmap) @@ -5638,7 +5638,7 @@ struct _k053251_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k053251_state *k053251_get_safe_token( running_device *device ) +INLINE k053251_state *k053251_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K053251); @@ -5707,26 +5707,26 @@ WRITE16_DEVICE_HANDLER( k053251_msb_w ) k053251_w(device, offset, (data >> 8) & 0xff); } -int k053251_get_priority( running_device *device, int ci ) +int k053251_get_priority( device_t *device, int ci ) { k053251_state *k053251 = k053251_get_safe_token(device); return k053251->ram[ci]; } -int k053251_get_palette_index( running_device *device, int ci ) +int k053251_get_palette_index( device_t *device, int ci ) { k053251_state *k053251 = k053251_get_safe_token(device); return k053251->palette_index[ci]; } -int k053251_get_tmap_dirty( running_device *device, int tmap_num ) +int k053251_get_tmap_dirty( device_t *device, int tmap_num ) { k053251_state *k053251 = k053251_get_safe_token(device); assert(tmap_num < 5); return k053251->dirty_tmap[tmap_num]; } -void k053251_set_tmap_dirty( running_device *device, int tmap_num, int data ) +void k053251_set_tmap_dirty( device_t *device, int tmap_num, int data ) { k053251_state *k053251 = k053251_get_safe_token(device); assert(tmap_num < 5); @@ -5791,7 +5791,7 @@ struct _k054000_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k054000_state *k054000_get_safe_token( running_device *device ) +INLINE k054000_state *k054000_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K054000); @@ -5902,7 +5902,7 @@ struct _k051733_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k051733_state *k051733_get_safe_token( running_device *device ) +INLINE k051733_state *k051733_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K051733); @@ -6099,14 +6099,14 @@ struct _k056832_state k056832_callback callback; - running_device *k055555; /* used to choose colorbase */ + device_t *k055555; /* used to choose colorbase */ }; /***************************************************************************** INLINE FUNCTIONS *****************************************************************************/ -INLINE k056832_state *k056832_get_safe_token( running_device *device ) +INLINE k056832_state *k056832_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K056832); @@ -6114,7 +6114,7 @@ INLINE k056832_state *k056832_get_safe_token( running_device *device ) return (k056832_state *)downcast(device)->token(); } -INLINE const k056832_interface *k056832_get_interface( running_device *device ) +INLINE const k056832_interface *k056832_get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == K056832); @@ -6136,7 +6136,7 @@ static void k056832_mark_page_dirty( k056832_state *k056832, int page ) k056832_mark_all_lines_dirty(page); } -void k056832_mark_plane_dirty( running_device *device, int layer ) +void k056832_mark_plane_dirty( device_t *device, int layer ) { k056832_state *k056832 = k056832_get_safe_token(device); int tilemode, i; @@ -6168,7 +6168,7 @@ static void k056832_mark_all_tilemaps_dirty( k056832_state *k056832 ) } /* moo.c needs to call this in its VIDEO_UPDATE */ -void k056832_mark_all_tmaps_dirty( running_device *device ) +void k056832_mark_all_tmaps_dirty( device_t *device ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832_mark_all_tilemaps_dirty(k056832); @@ -6227,7 +6227,7 @@ static void k056832_update_page_layout( k056832_state *k056832 ) k056832_mark_all_tilemaps_dirty(k056832); } -int k056832_get_lookup( running_device *device, int bits ) +int k056832_get_lookup( device_t *device, int bits ) { k056832_state *k056832 = k056832_get_safe_token(device); int res; @@ -6240,7 +6240,7 @@ int k056832_get_lookup( running_device *device, int bits ) return res; } -INLINE void k056832_get_tile_info( running_device *device, tile_data *tileinfo, int tile_index, int pageIndex ) +INLINE void k056832_get_tile_info( device_t *device, tile_data *tileinfo, int tile_index, int pageIndex ) { k056832_state *k056832 = k056832_get_safe_token(device); static const struct K056832_SHIFTMASKS @@ -6321,7 +6321,7 @@ static void k056832_change_rambank( k056832_state *k056832 ) k056832_mark_all_tilemaps_dirty(k056832); } -int k056832_get_current_rambank( running_device *device ) +int k056832_get_current_rambank( device_t *device ) { k056832_state *k056832 = k056832_get_safe_token(device); int bank = k056832->regs[0x19]; @@ -6341,7 +6341,7 @@ static void k056832_change_rombank( k056832_state *k056832 ) k056832->cur_gfx_banks = bank % k056832->num_gfx_banks; } -void k056832_set_tile_bank( running_device *device, int bank ) +void k056832_set_tile_bank( device_t *device, int bank ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->uses_tile_banks = 1; @@ -6360,14 +6360,14 @@ void k056832_set_tile_bank( running_device *device, int bank ) } /* call if a game uses external linescroll */ -void k056832_SetExtLinescroll( running_device *device ) +void k056832_SetExtLinescroll( device_t *device ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->use_ext_linescroll = 1; } /* generic helper routine for ROM checksumming */ -static int k056832_rom_read_b( running_device *device, int offset, int blksize, int blksize2, int zerosec ) +static int k056832_rom_read_b( device_t *device, int offset, int blksize, int blksize2, int zerosec ) { k056832_state *k056832 = k056832_get_safe_token(device); UINT8 *rombase; @@ -6986,7 +6986,7 @@ WRITE32_DEVICE_HANDLER( k056832_b_long_w ) } } -static int k056832_update_linemap( running_device *device, bitmap_t *bitmap, int page, int flags ) +static int k056832_update_linemap( device_t *device, bitmap_t *bitmap, int page, int flags ) { k056832_state *k056832 = k056832_get_safe_token(device); @@ -7110,7 +7110,7 @@ static int k056832_update_linemap( running_device *device, bitmap_t *bitmap, int return(0); } -void k056832_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority ) +void k056832_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority ) { k056832_state *k056832 = k056832_get_safe_token(device); UINT32 last_dx, last_visible, new_colorbase, last_active; @@ -7417,7 +7417,7 @@ void k056832_tilemap_draw( running_device *device, bitmap_t *bitmap, const recta } // end of function -void k056832_tilemap_draw_dj( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority ) +void k056832_tilemap_draw_dj( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority ) { k056832_state *k056832 = k056832_get_safe_token(device); UINT32 last_dx, last_visible, new_colorbase, last_active; @@ -7692,52 +7692,52 @@ void k056832_tilemap_draw_dj( running_device *device, bitmap_t *bitmap, const re } // end of function -void k056832_set_layer_association( running_device *device, int status ) +void k056832_set_layer_association( device_t *device, int status ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->default_layer_association = status; } -int k056832_get_layer_association( running_device *device ) +int k056832_get_layer_association( device_t *device ) { k056832_state *k056832 = k056832_get_safe_token(device); return(k056832->layer_association); } -void k056832_set_layer_offs( running_device *device, int layer, int offsx, int offsy ) +void k056832_set_layer_offs( device_t *device, int layer, int offsx, int offsy ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->layer_offs[layer][0] = offsx; k056832->layer_offs[layer][1] = offsy; } -void k056832_set_lsram_page( running_device *device, int logical_page, int physical_page, int physical_offset ) +void k056832_set_lsram_page( device_t *device, int logical_page, int physical_page, int physical_offset ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->lsram_page[logical_page][0] = physical_page; k056832->lsram_page[logical_page][1] = physical_offset; } -void k056832_linemap_enable( running_device *device, int enable ) +void k056832_linemap_enable( device_t *device, int enable ) { k056832_state *k056832 = k056832_get_safe_token(device); k056832->linemap_enabled = enable; } -int k056832_is_irq_enabled( running_device *device, int irqline ) +int k056832_is_irq_enabled( device_t *device, int irqline ) { k056832_state *k056832 = k056832_get_safe_token(device); return(k056832->regs[0x06/2] & (1 << irqline & 7)); } -void k056832_read_avac( running_device *device, int *mode, int *data ) +void k056832_read_avac( device_t *device, int *mode, int *data ) { k056832_state *k056832 = k056832_get_safe_token(device); *mode = k056832->regs[0x04/2] & 7; *data = k056832->regs[0x38/2]; } -int k056832_read_register( running_device *device, int regnum ) +int k056832_read_register( device_t *device, int regnum ) { k056832_state *k056832 = k056832_get_safe_token(device); return(k056832->regs[regnum]); @@ -8025,7 +8025,7 @@ struct _k055555_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k055555_state *k055555_get_safe_token( running_device *device ) +INLINE k055555_state *k055555_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K055555); @@ -8037,7 +8037,7 @@ INLINE k055555_state *k055555_get_safe_token( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -void k055555_write_reg( running_device *device, UINT8 regnum, UINT8 regdat ) +void k055555_write_reg( device_t *device, UINT8 regnum, UINT8 regdat ) { k055555_state *k055555 = k055555_get_safe_token(device); @@ -8097,13 +8097,13 @@ WRITE16_DEVICE_HANDLER( k055555_word_w ) } } -int k055555_read_register( running_device *device, int regnum ) +int k055555_read_register( device_t *device, int regnum ) { k055555_state *k055555 = k055555_get_safe_token(device); return k055555->regs[regnum]; } -int k055555_get_palette_index( running_device *device, int idx ) +int k055555_get_palette_index( device_t *device, int idx ) { k055555_state *k055555 = k055555_get_safe_token(device); return k055555->regs[K55_PALBASE_A + idx]; @@ -8145,14 +8145,14 @@ struct _k054338_state int alphainverted; screen_device *screen; - running_device *k055555; /* used to fill BG color */ + device_t *k055555; /* used to fill BG color */ }; /***************************************************************************** INLINE FUNCTIONS *****************************************************************************/ -INLINE k054338_state *k054338_get_safe_token( running_device *device ) +INLINE k054338_state *k054338_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K054338); @@ -8160,7 +8160,7 @@ INLINE k054338_state *k054338_get_safe_token( running_device *device ) return (k054338_state *)downcast(device)->token(); } -INLINE const k054338_interface *k054338_get_interface( running_device *device ) +INLINE const k054338_interface *k054338_get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == K054338); @@ -8185,13 +8185,13 @@ WRITE32_DEVICE_HANDLER( k054338_long_w ) } // returns a 16-bit '338 register -int k054338_register_r( running_device *device, int reg ) +int k054338_register_r( device_t *device, int reg ) { k054338_state *k054338 = k054338_get_safe_token(device); return k054338->regs[reg]; } -void k054338_update_all_shadows( running_device *device, int rushingheroes_hack ) +void k054338_update_all_shadows( device_t *device, int rushingheroes_hack ) { k054338_state *k054338 = k054338_get_safe_token(device); running_machine *machine = device->machine; @@ -8221,7 +8221,7 @@ void k054338_update_all_shadows( running_device *device, int rushingheroes_hack } // k054338 BG color fill -void k054338_fill_solid_bg( running_device *device, bitmap_t *bitmap ) +void k054338_fill_solid_bg( device_t *device, bitmap_t *bitmap ) { UINT32 bgcolor; UINT32 *pLine; @@ -8241,7 +8241,7 @@ void k054338_fill_solid_bg( running_device *device, bitmap_t *bitmap ) } // Unified k054338/K055555 BG color fill -void k054338_fill_backcolor( running_device *device, bitmap_t *bitmap, int mode ) // (see p.67) +void k054338_fill_backcolor( device_t *device, bitmap_t *bitmap, int mode ) // (see p.67) { k054338_state *k054338 = k054338_get_safe_token(device); int clipx, clipy, clipw, cliph, i, dst_pitch; @@ -8340,7 +8340,7 @@ void k054338_fill_backcolor( running_device *device, bitmap_t *bitmap, int mode } // addition blending unimplemented (requires major changes to drawgfx and tilemap.c) -int k054338_set_alpha_level( running_device *device, int pblend ) +int k054338_set_alpha_level( device_t *device, int pblend ) { k054338_state *k054338 = k054338_get_safe_token(device); UINT16 *regs; @@ -8388,7 +8388,7 @@ int k054338_set_alpha_level( running_device *device, int pblend ) return mixlv; } -void k054338_invert_alpha( running_device *device, int invert ) +void k054338_invert_alpha( device_t *device, int invert ) { k054338_state *k054338 = k054338_get_safe_token(device); k054338->alphainverted = invert; @@ -8397,7 +8397,7 @@ void k054338_invert_alpha( running_device *device, int invert ) #if 0 // FIXME -void k054338->export_config( running_device *device, int **shd_rgb ) +void k054338->export_config( device_t *device, int **shd_rgb ) { k054338_state *k054338 = k054338_get_safe_token(device); *shd_rgb = k054338->shd_rgb; @@ -8455,7 +8455,7 @@ struct _k053250_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k053250_state *k053250_get_safe_token( running_device *device ) +INLINE k053250_state *k053250_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K053250); @@ -8463,7 +8463,7 @@ INLINE k053250_state *k053250_get_safe_token( running_device *device ) return (k053250_state *)downcast(device)->token(); } -INLINE const k053250_interface *k053250_get_interface( running_device *device ) +INLINE const k053250_interface *k053250_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K053250)); @@ -8477,7 +8477,7 @@ INLINE const k053250_interface *k053250_get_interface( running_device *device ) // The DMA process should be instantaneous but since rendering in MAME is performed at VIDEO_UPDATE() // the k053250 memory must be buffered to maintain visual integrity. -void k053250_dma( running_device *device, int limiter ) +void k053250_dma( device_t *device, int limiter ) { k053250_state *k053250 = k053250_get_safe_token(device); int last_frame, current_frame; @@ -8722,7 +8722,7 @@ INLINE void k053250_pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette, UIN #undef FIXPOINT_PRECISION_HALF } -void k053250_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int colorbase, int flags, int priority ) +void k053250_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int colorbase, int flags, int priority ) { k053250_state *k053250 = k053250_get_safe_token(device); UINT16 *line_ram; @@ -8998,7 +8998,7 @@ struct _k053252_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k053252_state *k053252_get_safe_token( running_device *device ) +INLINE k053252_state *k053252_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K053252); @@ -9084,7 +9084,7 @@ struct _k001006_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k001006_state *k001006_get_safe_token( running_device *device ) +INLINE k001006_state *k001006_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K001006); @@ -9092,7 +9092,7 @@ INLINE k001006_state *k001006_get_safe_token( running_device *device ) return (k001006_state *)downcast(device)->token(); } -INLINE const k001006_interface *k001006_get_interface( running_device *device ) +INLINE const k001006_interface *k001006_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K001006)); @@ -9188,7 +9188,7 @@ WRITE32_DEVICE_HANDLER( k001006_w ) } } -UINT32 k001006_get_palette( running_device *device, int index ) +UINT32 k001006_get_palette( device_t *device, int index ) { k001006_state *k001006 = k001006_get_safe_token(device); return k001006->palette[index]; @@ -9253,10 +9253,10 @@ typedef struct _k001005_state k001005_state; struct _k001005_state { screen_device *screen; - running_device *cpu; - running_device *dsp; - running_device *k001006_1; - running_device *k001006_2; + device_t *cpu; + device_t *dsp; + device_t *k001006_1; + device_t *k001006_2; UINT8 * texture; UINT16 * ram[2]; @@ -9294,7 +9294,7 @@ static const int decode_y_zr107[16] = { 0, 8, 32, 40, 4, 12, 36, 44, 64, 72, 96 INLINE FUNCTIONS *****************************************************************************/ -INLINE k001005_state *k001005_get_safe_token( running_device *device ) +INLINE k001005_state *k001005_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K001005); @@ -9302,7 +9302,7 @@ INLINE k001005_state *k001005_get_safe_token( running_device *device ) return (k001005_state *)downcast(device)->token(); } -INLINE const k001005_interface *k001005_get_interface( running_device *device ) +INLINE const k001005_interface *k001005_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K001005)); @@ -9313,7 +9313,7 @@ INLINE const k001005_interface *k001005_get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -static void k001005_render_polygons( running_device *device ); +static void k001005_render_polygons( device_t *device ); // rearranges the texture data to a more practical order void k001005_preprocess_texture_data( UINT8 *rom, int length, int gticlub ) @@ -9367,7 +9367,7 @@ void k001005_preprocess_texture_data( UINT8 *rom, int length, int gticlub ) } } -void k001005_swap_buffers( running_device *device ) +void k001005_swap_buffers( device_t *device ) { k001005_state *k001005 = k001005_get_safe_token(device); @@ -9546,7 +9546,7 @@ WRITE32_DEVICE_HANDLER( k001005_w ) #define POLY_DEVICE 0 #if POLY_DEVICE -static void draw_scanline( running_device *device, void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid ) +static void draw_scanline( device_t *device, void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid ) { k001005_state *k001005 = k001005_get_safe_token(device); const poly_extra_data *extra = (const poly_extra_data *)extradata; @@ -9577,13 +9577,13 @@ static void draw_scanline( running_device *device, void *dest, INT32 scanline, c #endif #if POLY_DEVICE -static void draw_scanline_tex( running_device *device, void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid ) +static void draw_scanline_tex( device_t *device, void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid ) { k001005_state *k001005 = k001005_get_safe_token(device); const poly_extra_data *extra = (const poly_extra_data *)extradata; bitmap_t *destmap = (bitmap_t *)dest; UINT8 *texrom = k001005->gfxrom + (extra->texture_page * 0x40000); - running_device *pal_device = (extra->texture_palette & 0x8) ? k001005->k001006_2 : k001005->k001006_1; + device_t *pal_device = (extra->texture_palette & 0x8) ? k001005->k001006_2 : k001005->k001006_1; int palette_index = (extra->texture_palette & 0x7) * 256; float z = extent->param[0].start; float u = extent->param[1].start; @@ -9639,7 +9639,7 @@ static void draw_scanline_tex( running_device *device, void *dest, INT32 scanlin #endif -static void k001005_render_polygons( running_device *device ) +static void k001005_render_polygons( device_t *device ) { k001005_state *k001005 = k001005_get_safe_token(device); int i, j; @@ -10047,7 +10047,7 @@ static void k001005_render_polygons( running_device *device ) } } -void k001005_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k001005_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { k001005_state *k001005 = k001005_get_safe_token(device); int i, j; @@ -10186,7 +10186,7 @@ struct _k001604_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k001604_state *k001604_get_safe_token( running_device *device ) +INLINE k001604_state *k001604_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K001604); @@ -10194,7 +10194,7 @@ INLINE k001604_state *k001604_get_safe_token( running_device *device ) return (k001604_state *)downcast(device)->token(); } -INLINE const k001604_interface *k001604_get_interface( running_device *device ) +INLINE const k001604_interface *k001604_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K001604)); @@ -10326,7 +10326,7 @@ static TILE_GET_INFO_DEVICE( k001604_tile_info_layer_roz ) } -void k001604_draw_back_layer( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { k001604_state *k001604 = k001604_get_safe_token(device); int layer; @@ -10361,7 +10361,7 @@ void k001604_draw_back_layer( running_device *device, bitmap_t *bitmap, const re } } -void k001604_draw_front_layer( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k001604_draw_front_layer( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { k001604_state *k001604 = k001604_get_safe_token(device); @@ -10599,7 +10599,7 @@ struct _k037122_state INLINE FUNCTIONS *****************************************************************************/ -INLINE k037122_state *k037122_get_safe_token( running_device *device ) +INLINE k037122_state *k037122_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == K037122); @@ -10607,7 +10607,7 @@ INLINE k037122_state *k037122_get_safe_token( running_device *device ) return (k037122_state *)downcast(device)->token(); } -INLINE const k037122_interface *k037122_get_interface( running_device *device ) +INLINE const k037122_interface *k037122_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == K037122)); @@ -10662,7 +10662,7 @@ static TILE_GET_INFO_DEVICE( k037122_tile_info_layer1 ) } -void k037122_tile_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ) +void k037122_tile_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ) { k037122_state *k037122 = k037122_get_safe_token(device); const rectangle &visarea = k037122->screen->visible_area(); @@ -10681,7 +10681,7 @@ void k037122_tile_draw( running_device *device, bitmap_t *bitmap, const rectangl } } -static void update_palette_color( running_device *device, UINT32 palette_base, int color ) +static void update_palette_color( device_t *device, UINT32 palette_base, int color ) { k037122_state *k037122 = k037122_get_safe_token(device); UINT32 data = k037122->tile_ram[(palette_base / 4) + color]; diff --git a/src/mame/video/konicdev.h b/src/mame/video/konicdev.h index 46894ab0e7a..12d305a5ea7 100644 --- a/src/mame/video/konicdev.h +++ b/src/mame/video/konicdev.h @@ -327,7 +327,7 @@ WRITE8_DEVICE_HANDLER( k007121_ctrl_w ); /* shall we move source in the interface? */ /* also notice that now we directly pass *gfx[chip] instead of **gfx !! */ -void k007121_sprites_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx, colortable_t *ctable, +void k007121_sprites_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx, colortable_t *ctable, const UINT8 *source, int base_color, int global_x_offset, int bank_base, UINT32 pri_mask ); @@ -338,9 +338,9 @@ READ8_DEVICE_HANDLER( k007342_scroll_r ); WRITE8_DEVICE_HANDLER( k007342_scroll_w ); WRITE8_DEVICE_HANDLER( k007342_vreg_w ); -void k007342_tilemap_update(running_device *device); -void k007342_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int num, int flags, UINT32 priority); -int k007342_is_int_enabled(running_device *device); +void k007342_tilemap_update(device_t *device); +void k007342_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int num, int flags, UINT32 priority); +int k007342_is_int_enabled(device_t *device); /** Konami 007420 **/ @@ -348,7 +348,7 @@ int k007342_is_int_enabled(running_device *device); READ8_DEVICE_HANDLER( k007420_r ); WRITE8_DEVICE_HANDLER( k007420_w ); -void k007420_sprites_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx); +void k007420_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, gfx_element *gfx); /** Konami 052109 **/ @@ -388,13 +388,13 @@ WRITE16_DEVICE_HANDLER( k052109_word_w ); READ16_DEVICE_HANDLER( k052109_lsb_r ); WRITE16_DEVICE_HANDLER( k052109_lsb_w ); -void k052109_set_rmrd_line(running_device *device, int state); -int k052109_get_rmrd_line(running_device *device); -void k052109_tilemap_update(running_device *device); -int k052109_is_irq_enabled(running_device *device); -void k052109_set_layer_offsets(running_device *device, int layer, int dx, int dy); -void k052109_tilemap_mark_dirty(running_device *device, int tmap_num); -void k052109_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, UINT32 flags, UINT8 priority); +void k052109_set_rmrd_line(device_t *device, int state); +int k052109_get_rmrd_line(device_t *device); +void k052109_tilemap_update(device_t *device); +int k052109_is_irq_enabled(device_t *device); +void k052109_set_layer_offsets(device_t *device, int layer, int dx, int dy); +void k052109_tilemap_mark_dirty(device_t *device, int tmap_num); +void k052109_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, UINT32 flags, UINT8 priority); /** Konami 051960 / 051937 **/ @@ -422,10 +422,10 @@ WRITE8_DEVICE_HANDLER( k051937_w ); READ16_DEVICE_HANDLER( k051937_word_r ); WRITE16_DEVICE_HANDLER( k051937_word_w ); -void k051960_sprites_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int min_priority, int max_priority); -int k051960_is_irq_enabled(running_device *device); -int k051960_is_nmi_enabled(running_device *device); -void k051960_set_sprite_offsets(running_device *device, int dx, int dy); +void k051960_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int min_priority, int max_priority); +int k051960_is_irq_enabled(device_t *device); +int k051960_is_nmi_enabled(device_t *device); +void k051960_set_sprite_offsets(device_t *device, int dx, int dy); #if 0 // to be moved in the specific drivers! /* special handling for the chips sharing address space */ @@ -445,11 +445,11 @@ READ16_DEVICE_HANDLER( k053244_lsb_r ); WRITE16_DEVICE_HANDLER( k053244_lsb_w ); READ16_DEVICE_HANDLER( k053244_word_r ); WRITE16_DEVICE_HANDLER( k053244_word_w ); -void k053244_bankselect(running_device *device, int bank); /* used by TMNT2, Asterix and Premier Soccer for ROM testing */ -void k053245_sprites_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void k053245_sprites_draw_lethal(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); /* for lethal enforcers */ -void k053245_clear_buffer(running_device *device); -void k053245_set_sprite_offs(running_device *device, int offsx, int offsy); +void k053244_bankselect(device_t *device, int bank); /* used by TMNT2, Asterix and Premier Soccer for ROM testing */ +void k053245_sprites_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void k053245_sprites_draw_lethal(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); /* for lethal enforcers */ +void k053245_clear_buffer(device_t *device); +void k053245_set_sprite_offs(device_t *device, int offsx, int offsy); @@ -481,15 +481,15 @@ WRITE32_DEVICE_HANDLER( k053247_long_w ); WRITE16_DEVICE_HANDLER( k053247_reg_word_w ); // "OBJSET2" registers WRITE32_DEVICE_HANDLER( k053247_reg_long_w ); -void k053247_sprites_draw(running_device *device, bitmap_t *bitmap,const rectangle *cliprect); -int k053247_read_register(running_device *device, int regnum); -void k053247_set_sprite_offs(running_device *device, int offsx, int offsy); -void k053247_wraparound_enable(running_device *device, int status); -void k05324x_set_z_rejection(running_device *device, int zcode); // common to k053244/5 -void k053247_set_z_rejection(running_device *device, int zcode); // common to k053246/7 -void k053247_get_ram(running_device *device, UINT16 **ram); -int k053247_get_dx(running_device *device); -int k053247_get_dy(running_device *device); +void k053247_sprites_draw(device_t *device, bitmap_t *bitmap,const rectangle *cliprect); +int k053247_read_register(device_t *device, int regnum); +void k053247_set_sprite_offs(device_t *device, int offsx, int offsy); +void k053247_wraparound_enable(device_t *device, int status); +void k05324x_set_z_rejection(device_t *device, int zcode); // common to k053244/5 +void k053247_set_z_rejection(device_t *device, int zcode); // common to k053246/7 +void k053247_get_ram(device_t *device, UINT16 **ram); +int k053247_get_dx(device_t *device); +int k053247_get_dy(device_t *device); READ8_DEVICE_HANDLER( k053246_r ); WRITE8_DEVICE_HANDLER( k053246_w ); @@ -498,9 +498,9 @@ WRITE16_DEVICE_HANDLER( k053246_word_w ); READ32_DEVICE_HANDLER( k053246_long_r ); WRITE32_DEVICE_HANDLER( k053246_long_w ); -void k053246_set_objcha_line(running_device *device, int state); -int k053246_is_irq_enabled(running_device *device); -int k053246_read_register(running_device *device, int regnum); +void k053246_set_objcha_line(device_t *device, int state); +int k053246_is_irq_enabled(device_t *device); +int k053246_read_register(device_t *device, int regnum); /** Konami 051316 **/ /* @@ -519,8 +519,8 @@ READ8_DEVICE_HANDLER( k051316_r ); WRITE8_DEVICE_HANDLER( k051316_w ); READ8_DEVICE_HANDLER( k051316_rom_r ); WRITE8_DEVICE_HANDLER( k051316_ctrl_w ); -void k051316_zoom_draw(running_device *device, bitmap_t *bitmap,const rectangle *cliprect,int flags,UINT32 priority); -void k051316_wraparound_enable(running_device *device, int status); +void k051316_zoom_draw(device_t *device, bitmap_t *bitmap,const rectangle *cliprect,int flags,UINT32 priority); +void k051316_wraparound_enable(device_t *device, int status); /** Konami 053936 **/ @@ -528,9 +528,9 @@ WRITE16_DEVICE_HANDLER( k053936_ctrl_w ); READ16_DEVICE_HANDLER( k053936_ctrl_r ); // FIXME: this is probably unused... to be checked! WRITE16_DEVICE_HANDLER( k053936_linectrl_w ); READ16_DEVICE_HANDLER( k053936_linectrl_r ); -void k053936_zoom_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack); -void k053936_wraparound_enable(running_device *device, int status); // shall we merge this into the configuration intf? -void k053936_set_offset(running_device *device, int xoffs, int yoffs); // shall we merge this into the configuration intf? +void k053936_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t *tmap, int flags, UINT32 priority, int glfgreat_hack); +void k053936_wraparound_enable(device_t *device, int status); // shall we merge this into the configuration intf? +void k053936_set_offset(device_t *device, int xoffs, int yoffs); // shall we merge this into the configuration intf? /** Konami 053251 **/ @@ -542,10 +542,10 @@ void k053936_set_offset(running_device *device, int xoffs, int yoffs); // shall WRITE8_DEVICE_HANDLER( k053251_w ); WRITE16_DEVICE_HANDLER( k053251_lsb_w ); WRITE16_DEVICE_HANDLER( k053251_msb_w ); -int k053251_get_priority(running_device *device, int ci); -int k053251_get_palette_index(running_device *device, int ci); -int k053251_get_tmap_dirty(running_device *device, int tmap_num); -void k053251_set_tmap_dirty(running_device *device, int tmap_num, int data); +int k053251_get_priority(device_t *device, int ci); +int k053251_get_palette_index(device_t *device, int ci); +int k053251_get_tmap_dirty(device_t *device, int tmap_num); +void k053251_set_tmap_dirty(device_t *device, int tmap_num, int data); enum { @@ -569,7 +569,7 @@ READ8_DEVICE_HANDLER( k051733_r ); /** Konami 056832 **/ -void k056832_SetExtLinescroll(running_device *device); /* Lethal Enforcers */ +void k056832_SetExtLinescroll(device_t *device); /* Lethal Enforcers */ #define K056832_DRAW_FLAG_FORCE_XYSCROLL 0x00800000 @@ -597,21 +597,21 @@ WRITE8_DEVICE_HANDLER( k056832_ram_attr_lo_w ); WRITE8_DEVICE_HANDLER( k056832_ram_attr_hi_w ); WRITE8_DEVICE_HANDLER( k056832_w ); WRITE8_DEVICE_HANDLER( k056832_b_w ); -void k056832_mark_plane_dirty(running_device *device, int num); -void k056832_mark_all_tmaps_dirty(running_device *device); -void k056832_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int num, UINT32 flags, UINT32 priority); -void k056832_tilemap_draw_dj(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority); -void k056832_set_layer_association(running_device *device, int status); -int k056832_get_layer_association(running_device *device); -void k056832_set_layer_offs(running_device *device, int layer, int offsx, int offsy); -void k056832_set_lsram_page(running_device *device, int logical_page, int physical_page, int physical_offset); -void k056832_linemap_enable(running_device *device, int enable); -int k056832_is_irq_enabled(running_device *device, int irqline); -void k056832_read_avac(running_device *device, int *mode, int *data); -int k056832_read_register(running_device *device, int regnum); -int k056832_get_current_rambank(running_device *device); -int k056832_get_lookup(running_device *device, int bits); /* Asterix */ -void k056832_set_tile_bank(running_device *device, int bank); /* Asterix */ +void k056832_mark_plane_dirty(device_t *device, int num); +void k056832_mark_all_tmaps_dirty(device_t *device); +void k056832_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int num, UINT32 flags, UINT32 priority); +void k056832_tilemap_draw_dj(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, UINT32 flags, UINT32 priority); +void k056832_set_layer_association(device_t *device, int status); +int k056832_get_layer_association(device_t *device); +void k056832_set_layer_offs(device_t *device, int layer, int offsx, int offsy); +void k056832_set_lsram_page(device_t *device, int logical_page, int physical_page, int physical_offset); +void k056832_linemap_enable(device_t *device, int enable); +int k056832_is_irq_enabled(device_t *device, int irqline); +void k056832_read_avac(device_t *device, int *mode, int *data); +int k056832_read_register(device_t *device, int regnum); +int k056832_get_current_rambank(device_t *device); +int k056832_get_lookup(device_t *device, int bits); /* Asterix */ +void k056832_set_tile_bank(device_t *device, int bank); /* Asterix */ READ32_DEVICE_HANDLER( k056832_ram_long_r ); READ32_DEVICE_HANDLER( k056832_rom_long_r ); @@ -631,11 +631,11 @@ WRITE32_DEVICE_HANDLER( k056832_b_long_w ); #define K056832_BPP_8TASMAN 6 /** Konami 055555 **/ -void k055555_write_reg(running_device *device, UINT8 regnum, UINT8 regdat); +void k055555_write_reg(device_t *device, UINT8 regnum, UINT8 regdat); WRITE16_DEVICE_HANDLER( k055555_word_w ); WRITE32_DEVICE_HANDLER( k055555_long_w ); -int k055555_read_register(running_device *device, int regnum); -int k055555_get_palette_index(running_device *device, int idx); +int k055555_read_register(device_t *device, int regnum); +int k055555_get_palette_index(device_t *device, int idx); /* K055555 registers */ @@ -709,13 +709,13 @@ int k055555_get_palette_index(running_device *device, int idx); WRITE16_DEVICE_HANDLER( k054338_word_w ); // "CLCT" registers WRITE32_DEVICE_HANDLER( k054338_long_w ); -int k054338_register_r(running_device *device, int reg); -void k054338_update_all_shadows(running_device *device, int rushingheroes_hack); // called at the beginning of VIDEO_UPDATE() -void k054338_fill_solid_bg(running_device *device, bitmap_t *bitmap); // solid backcolor fill -void k054338_fill_backcolor(running_device *device, bitmap_t *bitmap, int mode); // unified fill, 0=solid, 1=gradient (by using a k055555) -int k054338_set_alpha_level(running_device *device, int pblend); // blend style 0-2 -void k054338_invert_alpha(running_device *device, int invert); // 0=0x00(invis)-0x1f(solid), 1=0x1f(invis)-0x00(solod) -//void K054338_export_config(running_device *device, int **shdRGB); +int k054338_register_r(device_t *device, int reg); +void k054338_update_all_shadows(device_t *device, int rushingheroes_hack); // called at the beginning of VIDEO_UPDATE() +void k054338_fill_solid_bg(device_t *device, bitmap_t *bitmap); // solid backcolor fill +void k054338_fill_backcolor(device_t *device, bitmap_t *bitmap, int mode); // unified fill, 0=solid, 1=gradient (by using a k055555) +int k054338_set_alpha_level(device_t *device, int pblend); // blend style 0-2 +void k054338_invert_alpha(device_t *device, int invert); // 0=0x00(invis)-0x1f(solid), 1=0x1f(invis)-0x00(solod) +//void K054338_export_config(device_t *device, int **shdRGB); #define K338_REG_BGC_R 0 #define K338_REG_BGC_GB 1 @@ -743,8 +743,8 @@ READ16_DEVICE_HANDLER( k053250_rom_r ); #define K053250_WRAP500 0x01 #define K053250_OVERDRIVE 0x02 -void k053250_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int colorbase, int flags, int pri); -void k053250_dma(running_device *device, int limiter); +void k053250_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int colorbase, int flags, int pri); +void k053250_dma(device_t *device, int limiter); /** Konami 053252 **/ @@ -755,15 +755,15 @@ WRITE32_DEVICE_HANDLER( k053252_long_w ); /** Konami 001006 **/ -UINT32 k001006_get_palette(running_device *device, int index); +UINT32 k001006_get_palette(device_t *device, int index); READ32_DEVICE_HANDLER( k001006_r ); WRITE32_DEVICE_HANDLER( k001006_w ); /** Konami 001005 **/ -void k001005_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void k001005_swap_buffers(running_device *device); +void k001005_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void k001005_swap_buffers(device_t *device); void k001005_preprocess_texture_data(UINT8 *rom, int length, int gticlub); READ32_DEVICE_HANDLER( k001005_r ); @@ -771,8 +771,8 @@ WRITE32_DEVICE_HANDLER( k001005_w ); /** Konami 001604 **/ -void k001604_draw_back_layer( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ); -void k001604_draw_front_layer( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ); +void k001604_draw_back_layer( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ); +void k001604_draw_front_layer( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ); WRITE32_DEVICE_HANDLER( k001604_tile_w ); READ32_DEVICE_HANDLER( k001604_tile_r ); WRITE32_DEVICE_HANDLER( k001604_char_w ); @@ -782,7 +782,7 @@ READ32_DEVICE_HANDLER( k001604_reg_r ); /** Konami 037122 **/ -void k037122_tile_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect ); +void k037122_tile_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect ); READ32_DEVICE_HANDLER( k037122_sram_r ); WRITE32_DEVICE_HANDLER( k037122_sram_w ); READ32_DEVICE_HANDLER( k037122_char_r ); diff --git a/src/mame/video/leland.c b/src/mame/video/leland.c index fb79cd00bad..f1c49ec60a0 100644 --- a/src/mame/video/leland.c +++ b/src/mame/video/leland.c @@ -52,7 +52,7 @@ static emu_timer *scanline_timer; static TIMER_CALLBACK( scanline_callback ) { - running_device *audio = machine->device("custom"); + device_t *audio = machine->device("custom"); int scanline = param; /* update the DACs */ diff --git a/src/mame/video/mcd212.c b/src/mame/video/mcd212.c index 2600a383448..ea754e1cd1b 100644 --- a/src/mame/video/mcd212.c +++ b/src/mame/video/mcd212.c @@ -1664,8 +1664,8 @@ VIDEO_START( cdimono1 ) VIDEO_UPDATE( cdimono1 ) { cdi_state *state = screen->machine->driver_data(); - running_device *main_screen = screen->machine->device("screen"); - running_device *lcd_screen = screen->machine->device("lcd"); + device_t *main_screen = screen->machine->device("screen"); + device_t *lcd_screen = screen->machine->device("lcd"); if (screen == main_screen) { diff --git a/src/mame/video/micro3d.c b/src/mame/video/micro3d.c index 3b2b8833df0..fafa347003e 100644 --- a/src/mame/video/micro3d.c +++ b/src/mame/video/micro3d.c @@ -133,7 +133,7 @@ WRITE16_HANDLER( micro3d_xfer3dk_w ) state->xfer3dk = data; } -void micro3d_tms_interrupt(running_device *device, int state) +void micro3d_tms_interrupt(device_t *device, int state) { // mc68901_int_gen(device->machine, GPIP4); } diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c index dd9c009005b..ee1bf400d91 100644 --- a/src/mame/video/nbmj8688.c +++ b/src/mame/video/nbmj8688.c @@ -717,9 +717,9 @@ VIDEO_UPDATE( mbmj8688_LCD ) { int x, y, b; - running_device *main_screen = screen->machine->device("screen"); - running_device *lcd0_screen = screen->machine->device("lcd0"); - running_device *lcd1_screen = screen->machine->device("lcd1"); + device_t *main_screen = screen->machine->device("screen"); + device_t *lcd0_screen = screen->machine->device("lcd0"); + device_t *lcd1_screen = screen->machine->device("lcd1"); if (screen == main_screen) VIDEO_UPDATE_CALL(mbmj8688); diff --git a/src/mame/video/ninjaw.c b/src/mame/video/ninjaw.c index d0bdaa93548..5cf9b1c3100 100644 --- a/src/mame/video/ninjaw.c +++ b/src/mame/video/ninjaw.c @@ -102,7 +102,7 @@ VIDEO_UPDATE( ninjaw ) ninjaw_state *state = screen->machine->driver_data(); int xoffs = 0; UINT8 layer[3], nodraw; - running_device *tc0100scn = NULL; + device_t *tc0100scn = NULL; if (screen == state->lscreen) { diff --git a/src/mame/video/pk8000.c b/src/mame/video/pk8000.c index c84e836f7d9..d43d7bcf3a9 100644 --- a/src/mame/video/pk8000.c +++ b/src/mame/video/pk8000.c @@ -95,7 +95,7 @@ PALETTE_INIT( pk8000 ) palette_set_colors(machine, 0, pk8000_palette, ARRAY_LENGTH(pk8000_palette)); } -UINT32 pk8000_video_update(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem) +UINT32 pk8000_video_update(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem) { int x,y,j,b; UINT16 offset = (pk8000_video_mode & 0xc0) << 8; diff --git a/src/mame/video/playch10.c b/src/mame/video/playch10.c index be19efc71de..c3949395f47 100644 --- a/src/mame/video/playch10.c +++ b/src/mame/video/playch10.c @@ -59,7 +59,7 @@ PALETTE_INIT( playch10 ) ppu2c0x_init_palette_rgb(machine, 256 ); } -static void ppu_irq( running_device *device, int *ppu_regs ) +static void ppu_irq( device_t *device, int *ppu_regs ) { cputag_set_input_line(device->machine, "cart", INPUT_LINE_NMI, PULSE_LINE ); pc10_int_detect = 1; @@ -122,12 +122,12 @@ VIDEO_START( playch10_hboard ) VIDEO_UPDATE( playch10 ) { - running_device *ppu = screen->machine->device("ppu"); + device_t *ppu = screen->machine->device("ppu"); /* Dual monitor version */ if (pc10_bios == 1) { - running_device *top_screen = screen->machine->device("top"); + device_t *top_screen = screen->machine->device("top"); /* On Playchoice 10 single monitor, this bit toggles */ /* between PPU and BIOS display. */ diff --git a/src/mame/video/plygonet.c b/src/mame/video/plygonet.c index b7fb3be30b1..95b0586c5ef 100644 --- a/src/mame/video/plygonet.c +++ b/src/mame/video/plygonet.c @@ -126,7 +126,7 @@ VIDEO_START( polygonet ) VIDEO_UPDATE( polygonet ) { polygonet_state *state = screen->machine->driver_data(); - running_device *k053936 = screen->machine->device("k053936"); + device_t *k053936 = screen->machine->device("k053936"); bitmap_fill(screen->machine->priority_bitmap, NULL, 0); bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); diff --git a/src/mame/video/ppu2c0x.c b/src/mame/video/ppu2c0x.c index d60ab86986f..5ca67e3b889 100644 --- a/src/mame/video/ppu2c0x.c +++ b/src/mame/video/ppu2c0x.c @@ -115,13 +115,13 @@ struct _ppu2c0x_state PROTOTYPES ***************************************************************************/ -static void update_scanline( running_device *device ); +static void update_scanline( device_t *device ); static TIMER_CALLBACK( scanline_callback ); static TIMER_CALLBACK( hblank_callback ); static TIMER_CALLBACK( nmi_callback ); -void (*ppu_latch)( running_device *device, offs_t offset ); +void (*ppu_latch)( device_t *device, offs_t offset ); /* palette handlers */ static WRITE8_HANDLER( ppu2c0x_palette_write ); @@ -132,7 +132,7 @@ static READ8_HANDLER( ppu2c0x_palette_read ); INLINE FUNCTIONS ***************************************************************************/ -INLINE ppu2c0x_state *get_token( running_device *device ) +INLINE ppu2c0x_state *get_token( device_t *device ) { assert(device != NULL); assert((device->type() == PPU_2C02) || (device->type() == PPU_2C03B) @@ -143,7 +143,7 @@ INLINE ppu2c0x_state *get_token( running_device *device ) } -INLINE const ppu2c0x_interface *get_interface( running_device *device ) +INLINE const ppu2c0x_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == PPU_2C02) || (device->type() == PPU_2C03B) @@ -329,7 +329,7 @@ static const gfx_layout ppu_charlayout = static TIMER_CALLBACK( hblank_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; ppu2c0x_state *ppu2c0x = get_token(device); int *ppu_regs = &ppu2c0x->regs[0]; @@ -346,7 +346,7 @@ static TIMER_CALLBACK( hblank_callback ) static TIMER_CALLBACK( nmi_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; ppu2c0x_state *ppu2c0x = get_token(device); int *ppu_regs = &ppu2c0x->regs[0]; @@ -357,7 +357,7 @@ static TIMER_CALLBACK( nmi_callback ) timer_adjust_oneshot(ppu2c0x->nmi_timer, attotime_never, 0); } -static void draw_background( running_device *device, UINT8 *line_priority ) +static void draw_background( device_t *device, UINT8 *line_priority ) { ppu2c0x_state *ppu2c0x = get_token(device); @@ -503,7 +503,7 @@ static void draw_background( running_device *device, UINT8 *line_priority ) } } -static void draw_sprites( running_device *device, UINT8 *line_priority ) +static void draw_sprites( device_t *device, UINT8 *line_priority ) { ppu2c0x_state *ppu2c0x = get_token(device); @@ -710,7 +710,7 @@ static void draw_sprites( running_device *device, UINT8 *line_priority ) * *************************************/ -static void render_scanline( running_device *device ) +static void render_scanline( device_t *device ) { ppu2c0x_state *ppu2c0x = get_token(device); UINT8 line_priority[VISIBLE_SCREEN_WIDTH]; @@ -754,7 +754,7 @@ static void render_scanline( running_device *device ) g_profiler.stop(); } -static void update_scanline( running_device *device ) +static void update_scanline( device_t *device ) { ppu2c0x_state *ppu2c0x = get_token(device); const int scanline = ppu2c0x->scanline; @@ -834,7 +834,7 @@ static void update_scanline( running_device *device ) static TIMER_CALLBACK( scanline_callback ) { - running_device *device = (running_device *)ptr; + device_t *device = (device_t *)ptr; ppu2c0x_state *ppu2c0x = get_token(device); int *ppu_regs = &ppu2c0x->regs[0]; int blanked = (ppu_regs[PPU_CONTROL1] & (PPU_CONTROL1_BACKGROUND | PPU_CONTROL1_SPRITES)) == 0; @@ -1179,7 +1179,7 @@ WRITE8_DEVICE_HANDLER( ppu2c0x_w ) * *************************************/ -void ppu2c0x_spriteram_dma( address_space *space, running_device *device, const UINT8 page ) +void ppu2c0x_spriteram_dma( address_space *space, device_t *device, const UINT8 page ) { int i; int address = page << 8; @@ -1200,7 +1200,7 @@ void ppu2c0x_spriteram_dma( address_space *space, running_device *device, const * *************************************/ -void ppu2c0x_render( running_device *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy ) +void ppu2c0x_render( device_t *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy ) { ppu2c0x_state *ppu2c0x = get_token(device); copybitmap(bitmap, ppu2c0x->bitmap, flipx, flipy, sx, sy, 0); @@ -1212,7 +1212,7 @@ void ppu2c0x_render( running_device *device, bitmap_t *bitmap, int flipx, int fl * *************************************/ -int ppu2c0x_get_pixel( running_device *device, int x, int y ) +int ppu2c0x_get_pixel( device_t *device, int x, int y ) { ppu2c0x_state *ppu2c0x = get_token(device); @@ -1225,44 +1225,44 @@ int ppu2c0x_get_pixel( running_device *device, int x, int y ) return *BITMAP_ADDR16(ppu2c0x->bitmap, y, x); } -int ppu2c0x_get_colorbase( running_device *device ) +int ppu2c0x_get_colorbase( device_t *device ) { ppu2c0x_state *ppu2c0x = get_token(device); return ppu2c0x->color_base; } -int ppu2c0x_get_current_scanline( running_device *device ) +int ppu2c0x_get_current_scanline( device_t *device ) { ppu2c0x_state *ppu2c0x = get_token(device); return ppu2c0x->scanline; } // MMC5 has to be able to check this -int ppu2c0x_is_sprite_8x16( running_device *device ) +int ppu2c0x_is_sprite_8x16( device_t *device ) { ppu2c0x_state *ppu2c0x = get_token(device); return BIT(ppu2c0x->regs[0], 5); } -void ppu2c0x_set_scanline_callback( running_device *device, ppu2c0x_scanline_cb cb ) +void ppu2c0x_set_scanline_callback( device_t *device, ppu2c0x_scanline_cb cb ) { ppu2c0x_state *ppu2c0x = get_token(device); ppu2c0x->scanline_callback_proc = cb; } -void ppu2c0x_set_hblank_callback( running_device *device, ppu2c0x_hblank_cb cb ) +void ppu2c0x_set_hblank_callback( device_t *device, ppu2c0x_hblank_cb cb ) { ppu2c0x_state *ppu2c0x = get_token(device); ppu2c0x->hblank_callback_proc = cb; } -void ppu2c0x_set_vidaccess_callback( running_device *device, ppu2c0x_vidaccess_cb cb ) +void ppu2c0x_set_vidaccess_callback( device_t *device, ppu2c0x_vidaccess_cb cb ) { ppu2c0x_state *ppu2c0x = get_token(device); ppu2c0x->vidaccess_callback_proc = cb; } -void ppu2c0x_set_scanlines_per_frame( running_device *device, int scanlines ) +void ppu2c0x_set_scanlines_per_frame( device_t *device, int scanlines ) { ppu2c0x_state *ppu2c0x = get_token(device); ppu2c0x->scanlines_per_frame = scanlines; diff --git a/src/mame/video/ppu2c0x.h b/src/mame/video/ppu2c0x.h index 33cf925d94f..4608406482e 100644 --- a/src/mame/video/ppu2c0x.h +++ b/src/mame/video/ppu2c0x.h @@ -75,10 +75,10 @@ enum }; /* callback datatypes */ -typedef void (*ppu2c0x_scanline_cb)( running_device *device, int scanline, int vblank, int blanked ); -typedef void (*ppu2c0x_hblank_cb)( running_device *device, int scanline, int vblank, int blanked ); -typedef void (*ppu2c0x_nmi_cb)( running_device *device, int *ppu_regs ); -typedef int (*ppu2c0x_vidaccess_cb)( running_device *device, int address, int data ); +typedef void (*ppu2c0x_scanline_cb)( device_t *device, int scanline, int vblank, int blanked ); +typedef void (*ppu2c0x_hblank_cb)( device_t *device, int scanline, int vblank, int blanked ); +typedef void (*ppu2c0x_nmi_cb)( device_t *device, int *ppu_regs ); +typedef int (*ppu2c0x_vidaccess_cb)( device_t *device, int address, int data ); typedef struct _ppu2c0x_interface ppu2c0x_interface; struct _ppu2c0x_interface @@ -108,19 +108,19 @@ DECLARE_LEGACY_MEMORY_DEVICE(PPU_2C07, ppu2c07); // PAL NES void ppu2c0x_init_palette(running_machine *machine, int first_entry ) ATTR_NONNULL(1); void ppu2c0x_init_palette_rgb(running_machine *machine, int first_entry ) ATTR_NONNULL(1); -void ppu2c0x_spriteram_dma(address_space *space, running_device *device, const UINT8 page ) ATTR_NONNULL(1); -void ppu2c0x_render( running_device *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy ) ATTR_NONNULL(1); -int ppu2c0x_get_pixel( running_device *device, int x, int y ) ATTR_NONNULL(1); -int ppu2c0x_get_colorbase( running_device *device ) ATTR_NONNULL(1); -int ppu2c0x_get_current_scanline( running_device *device ) ATTR_NONNULL(1); -int ppu2c0x_is_sprite_8x16( running_device *device ) ATTR_NONNULL(1); -void ppu2c0x_set_scanline_callback( running_device *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); -void ppu2c0x_set_hblank_callback( running_device *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); -void ppu2c0x_set_vidaccess_callback( running_device *device, ppu2c0x_vidaccess_cb cb ) ATTR_NONNULL(1); -void ppu2c0x_set_scanlines_per_frame( running_device *device, int scanlines ) ATTR_NONNULL(1); +void ppu2c0x_spriteram_dma(address_space *space, device_t *device, const UINT8 page ) ATTR_NONNULL(1); +void ppu2c0x_render( device_t *device, bitmap_t *bitmap, int flipx, int flipy, int sx, int sy ) ATTR_NONNULL(1); +int ppu2c0x_get_pixel( device_t *device, int x, int y ) ATTR_NONNULL(1); +int ppu2c0x_get_colorbase( device_t *device ) ATTR_NONNULL(1); +int ppu2c0x_get_current_scanline( device_t *device ) ATTR_NONNULL(1); +int ppu2c0x_is_sprite_8x16( device_t *device ) ATTR_NONNULL(1); +void ppu2c0x_set_scanline_callback( device_t *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); +void ppu2c0x_set_hblank_callback( device_t *device, ppu2c0x_scanline_cb cb ) ATTR_NONNULL(1); +void ppu2c0x_set_vidaccess_callback( device_t *device, ppu2c0x_vidaccess_cb cb ) ATTR_NONNULL(1); +void ppu2c0x_set_scanlines_per_frame( device_t *device, int scanlines ) ATTR_NONNULL(1); //27/12/2002 (HACK!) -extern void (*ppu_latch)( running_device *device, offs_t offset ); +extern void (*ppu_latch)( device_t *device, offs_t offset ); WRITE8_DEVICE_HANDLER( ppu2c0x_w ); READ8_DEVICE_HANDLER( ppu2c0x_r ); diff --git a/src/mame/video/psikyo4.c b/src/mame/video/psikyo4.c index cdf3a8e49df..9c98d831090 100644 --- a/src/mame/video/psikyo4.c +++ b/src/mame/video/psikyo4.c @@ -129,8 +129,8 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect VIDEO_UPDATE( psikyo4 ) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); if (screen == left_screen) { diff --git a/src/mame/video/punchout.c b/src/mame/video/punchout.c index e324aaa2033..690f30a16e0 100644 --- a/src/mame/video/punchout.c +++ b/src/mame/video/punchout.c @@ -371,8 +371,8 @@ static void punchout_copy_bot_palette(running_machine *machine, int bank) VIDEO_UPDATE( punchout ) { - running_device *top_screen = screen->machine->device("top"); - running_device *bottom_screen = screen->machine->device("bottom"); + device_t *top_screen = screen->machine->device("top"); + device_t *bottom_screen = screen->machine->device("bottom"); if (screen == top_screen) { @@ -405,8 +405,8 @@ VIDEO_UPDATE( punchout ) VIDEO_UPDATE( armwrest ) { - running_device *top_screen = screen->machine->device("top"); - running_device *bottom_screen = screen->machine->device("bottom"); + device_t *top_screen = screen->machine->device("top"); + device_t *bottom_screen = screen->machine->device("bottom"); if (screen == top_screen) { diff --git a/src/mame/video/qdrmfgp.c b/src/mame/video/qdrmfgp.c index 43c77993de1..b996ca4a6ae 100644 --- a/src/mame/video/qdrmfgp.c +++ b/src/mame/video/qdrmfgp.c @@ -28,7 +28,7 @@ void qdrmfgp2_tile_callback(running_machine *machine, int layer, int *code, int VIDEO_START( qdrmfgp ) { - running_device *k056832 = machine->device("k056832"); + device_t *k056832 = machine->device("k056832"); k056832_set_layer_association(k056832, 0); @@ -40,7 +40,7 @@ VIDEO_START( qdrmfgp ) VIDEO_START( qdrmfgp2 ) { - running_device *k056832 = machine->device("k056832"); + device_t *k056832 = machine->device("k056832"); k056832_set_layer_association(k056832, 0); @@ -58,7 +58,7 @@ VIDEO_START( qdrmfgp2 ) VIDEO_UPDATE( qdrmfgp ) { - running_device *k056832 = screen->machine->device("k056832"); + device_t *k056832 = screen->machine->device("k056832"); bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine)); k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 1); diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c index 8aee9145a6f..cb5ec75f9e5 100644 --- a/src/mame/video/qix.c +++ b/src/mame/video/qix.c @@ -350,7 +350,7 @@ static MC6845_UPDATE_ROW( update_row ) static VIDEO_UPDATE( qix ) { - running_device *mc6845 = screen->machine->device(MC6845_TAG); + device_t *mc6845 = screen->machine->device(MC6845_TAG); mc6845_update(mc6845, bitmap, cliprect); return 0; diff --git a/src/mame/video/rohga.c b/src/mame/video/rohga.c index 7e1cfe3cb8d..f2475c95880 100644 --- a/src/mame/video/rohga.c +++ b/src/mame/video/rohga.c @@ -419,7 +419,7 @@ sprite 2: /******************************************************************************/ -static void update_rohga( running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int is_schmeisr ) +static void update_rohga( device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int is_schmeisr ) { rohga_state *state = screen->machine->driver_data(); UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff); diff --git a/src/mame/video/sega16sp.c b/src/mame/video/sega16sp.c index d0a7359dcef..bf54b1e0676 100644 --- a/src/mame/video/sega16sp.c +++ b/src/mame/video/sega16sp.c @@ -12,7 +12,7 @@ UINT16 *segaic16_spriteram_1; INLINE FUNCTIONS *****************************************************************************/ -INLINE sega16sp_state *get_safe_token( running_device *device ) +INLINE sega16sp_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == SEGA16SP); @@ -20,7 +20,7 @@ INLINE sega16sp_state *get_safe_token( running_device *device ) return (sega16sp_state *)downcast(device)->token(); } -INLINE const sega16sp_interface *get_interface( running_device *device ) +INLINE const sega16sp_interface *get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == SEGA16SP)); @@ -76,7 +76,7 @@ INLINE const sega16sp_interface *get_interface( running_device *device ) pri[x] = 0xff; \ } \ -void segaic16_sprites_hangon_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_hangon_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -241,7 +241,7 @@ void segaic16_sprites_hangon_draw(running_machine *machine, running_device *devi pri[x] = 0xff; \ } \ -void segaic16_sprites_sharrier_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_sharrier_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x20000; const UINT32 *spritebase = (const UINT32 *)memory_region(machine, "gfx2"); @@ -412,7 +412,7 @@ void segaic16_sprites_sharrier_draw(running_machine *machine, running_device *de pri[x] = 0xff; \ } \ -void segaic16_sprites_16a_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_16a_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -573,7 +573,7 @@ void segaic16_sprites_16a_draw(running_machine *machine, running_device *device, pri[x] = 0xff; \ } \ -void segaic16_sprites_16b_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_16b_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks; const UINT16 *spritebase; @@ -739,7 +739,7 @@ void segaic16_sprites_16b_draw(running_machine *machine, running_device *device, pri[x] = 0; \ } \ -void segaic16_sprites_yboard_16b_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_yboard_16b_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x20000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -917,7 +917,7 @@ void segaic16_sprites_yboard_16b_draw(running_machine *machine, running_device * pri[x] = 0xff; \ } \ -static void segaic16_sprites_xboard_outrun_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int type) +static void segaic16_sprites_xboard_outrun_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int type) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x40000; const UINT32 *spritebase = (const UINT32 *)memory_region(machine, "gfx2"); @@ -1043,12 +1043,12 @@ static void segaic16_sprites_xboard_outrun_draw(running_machine *machine, runnin } } -void segaic16_sprites_outrun_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_outrun_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_OUTRUN); } -void segaic16_sprites_xboard_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_xboard_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { segaic16_sprites_xboard_outrun_draw(machine, device, bitmap, cliprect, SEGAIC16_SPRITES_XBOARD); } @@ -1088,7 +1088,7 @@ void segaic16_sprites_xboard_draw(running_machine *machine, running_device *devi if (x >= minx && x <= maxx && ind < 0x1fe) \ dest[x] = ind | colorpri; \ -void segaic16_sprites_yboard_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_yboard_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx1") / 0x80000; const UINT64 *spritebase = (const UINT64 *)memory_region(machine, "gfx1"); @@ -1382,7 +1382,7 @@ void segaic16_sprites_yboard_draw(running_machine *machine, running_device *devi -void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -1405,7 +1405,7 @@ void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, running_d } /* 4 player passing shot is different to this.. */ -void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -1427,7 +1427,7 @@ void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, running } } -void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect) +void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect) { UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000; const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2"); @@ -1455,9 +1455,9 @@ void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, runnin * *************************************/ -void segaic16_sprites_draw(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int which) +void segaic16_sprites_draw(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int which) { - running_device* device = 0; + device_t* device = 0; sega16sp_state *sega16sp; if (!which) @@ -1488,7 +1488,7 @@ void segaic16_sprites_draw(running_device *screen, bitmap_t *bitmap, const recta void segaic16_sprites_set_bank(running_machine *machine, int which, int banknum, int offset) { - running_device* device = 0; + device_t* device = 0; if (!which) device = machine->device("segaspr1"); @@ -1518,7 +1518,7 @@ void segaic16_sprites_set_bank(running_machine *machine, int which, int banknum, void segaic16_sprites_set_flip(running_machine *machine, int which, int flip) { - running_device* device = 0; + device_t* device = 0; if (!which) device = machine->device("segaspr1"); @@ -1549,7 +1549,7 @@ void segaic16_sprites_set_flip(running_machine *machine, int which, int flip) void segaic16_sprites_set_shadow(running_machine *machine, int which, int shadow) { - running_device* device = 0; + device_t* device = 0; if (!which) device = machine->device("segaspr1"); @@ -1578,7 +1578,7 @@ void segaic16_sprites_set_shadow(running_machine *machine, int which, int shadow * *************************************/ -static void segaic16_sprites_buffer(running_device* device) +static void segaic16_sprites_buffer(device_t* device) { sega16sp_state *sega16sp = get_safe_token(device); @@ -1612,7 +1612,7 @@ static void segaic16_sprites_buffer(running_device* device) WRITE16_HANDLER( segaic16_sprites_draw_0_w ) { - running_device* device = 0; + device_t* device = 0; device = space->machine->device("segaspr1"); @@ -1625,7 +1625,7 @@ WRITE16_HANDLER( segaic16_sprites_draw_0_w ) WRITE16_HANDLER( segaic16_sprites_draw_1_w ) { - running_device* device = 0; + device_t* device = 0; device = space->machine->device("segaspr2"); diff --git a/src/mame/video/segaic16.c b/src/mame/video/segaic16.c index 53adb9d1166..d7e77e15d8c 100644 --- a/src/mame/video/segaic16.c +++ b/src/mame/video/segaic16.c @@ -1220,7 +1220,7 @@ void segaic16_tilemap_init(running_machine *machine, int which, int type, int co * *************************************/ -void segaic16_tilemap_draw(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int which, int map, int priority, int priority_mark) +void segaic16_tilemap_draw(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int which, int map, int priority, int priority_mark) { running_machine *machine = screen->machine; struct tilemap_info *info = &bg_tilemap[which]; diff --git a/src/mame/video/segaic16.h b/src/mame/video/segaic16.h index b86babe9751..534acd577f0 100644 --- a/src/mame/video/segaic16.h +++ b/src/mame/video/segaic16.h @@ -37,7 +37,7 @@ WRITE16_HANDLER( segaic16_paletteram_w ); void segaic16_tilemap_init(running_machine *machine, int which, int type, int colorbase, int xoffs, int numbanks); void segaic16_tilemap_reset(running_machine *machine, int which); -void segaic16_tilemap_draw(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int which, int map, int priority, int priority_mark); +void segaic16_tilemap_draw(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int which, int map, int priority, int priority_mark); void segaic16_tilemap_set_bank(running_machine *machine, int which, int banknum, int offset); void segaic16_tilemap_set_flip(running_machine *machine, int which, int flip); void segaic16_tilemap_set_rowscroll(running_machine *machine, int which, int enable); @@ -52,7 +52,7 @@ WRITE16_HANDLER( segaic16_textram_0_w ); #define SEGAIC16_SPRITES_OUTRUN 4 #define SEGAIC16_SPRITES_XBOARD 5 -void segaic16_sprites_draw(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int which); +void segaic16_sprites_draw(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int which); void segaic16_sprites_set_bank(running_machine *machine, int which, int banknum, int offset); void segaic16_sprites_set_flip(running_machine *machine, int which, int flip); void segaic16_sprites_set_shadow(running_machine *machine, int which, int shadow); @@ -164,7 +164,7 @@ struct _sega16sp_interface UINT16 colorbase; /* base color index */ INT32 ramsize; /* size of sprite RAM */ INT32 xoffs; /* X scroll offset */ - void (*draw)(running_machine *machine, running_device* device, bitmap_t *bitmap, const rectangle *cliprect); + void (*draw)(running_machine *machine, device_t* device, bitmap_t *bitmap, const rectangle *cliprect); int buffer; /* should ram be buffered? */ }; @@ -182,7 +182,7 @@ struct _sega16sp_state UINT16 colorbase; /* base color index */ INT32 ramsize; /* size of sprite RAM */ INT32 xoffs; /* X scroll offset */ - void (*draw)(running_machine *machine, running_device* device, bitmap_t *bitmap, const rectangle *cliprect); + void (*draw)(running_machine *machine, device_t* device, bitmap_t *bitmap, const rectangle *cliprect); UINT16 * spriteram; /* pointer to spriteram pointer */ UINT16 * buffer; /* buffered spriteram for those that use it */ @@ -194,17 +194,17 @@ struct _sega16sp_state DECLARE_LEGACY_DEVICE(SEGA16SP, sega16sp); -void segaic16_sprites_hangon_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_sharrier_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_16a_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_16b_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_yboard_16b_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_yboard_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_outrun_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_xboard_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); -void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, running_device *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_hangon_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_sharrier_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_16a_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_16b_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_yboard_16b_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_yboard_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_outrun_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_xboard_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); +void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, device_t *device, bitmap_t *bitmap, const rectangle *cliprect); /* the various sprite configs */ static const sega16sp_interface hangon_sega16sp_intf = diff --git a/src/mame/video/segas18.c b/src/mame/video/segas18.c index ccb35deecd6..d76d8eabf2a 100644 --- a/src/mame/video/segas18.c +++ b/src/mame/video/segas18.c @@ -116,7 +116,7 @@ void system18_set_vdp_mixing(running_machine *machine, int mixing) * *************************************/ -static void draw_vdp(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int priority) +static void draw_vdp(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, int priority) { segas1x_state *state = screen->machine->driver_data(); int x, y; diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c index 2d4f61f8328..f5a5e7abae7 100644 --- a/src/mame/video/segas32.c +++ b/src/mame/video/segas32.c @@ -2624,7 +2624,7 @@ VIDEO_UPDATE( multi32 ) { UINT8 enablemask; - running_device *left_screen = screen->machine->device("lscreen"); + device_t *left_screen = screen->machine->device("lscreen"); /* update the visible area */ if (system32_videoram[0x1ff00/2] & 0x8000) diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c index 120cc932d23..3cc9d286e4a 100644 --- a/src/mame/video/seta.c +++ b/src/mame/video/seta.c @@ -264,7 +264,7 @@ WRITE16_HANDLER( seta_vregs_w ) ---- ---- ---- ---0 Coin #0 Counter */ if (ACCESSING_BITS_0_7) { - running_device *x1_010 = space->machine->device("x1snd"); + device_t *x1_010 = space->machine->device("x1snd"); seta_coin_lockout_w (space->machine, data & 0x0f); if (x1_010 != NULL) seta_sound_enable_w (x1_010, data & 0x20); diff --git a/src/mame/video/skydiver.c b/src/mame/video/skydiver.c index 88b03e83923..a853a821b28 100644 --- a/src/mame/video/skydiver.c +++ b/src/mame/video/skydiver.c @@ -130,7 +130,7 @@ WRITE8_HANDLER( skydiver_lamp_d_w ) WRITE8_HANDLER( skydiver_2000_201F_w ) { - running_device *discrete = space->machine->device("discrete"); + device_t *discrete = space->machine->device("discrete"); int bit = offset & 0x01; watchdog_reset_w(space,0,0); diff --git a/src/mame/video/sprint4.c b/src/mame/video/sprint4.c index 4bc1eb33811..9336bf614ab 100644 --- a/src/mame/video/sprint4.c +++ b/src/mame/video/sprint4.c @@ -101,7 +101,7 @@ VIDEO_EOF( sprint4 ) /* check for sprite-playfield collisions */ - running_device *discrete = machine->device("discrete"); + device_t *discrete = machine->device("discrete"); for (i = 0; i < 4; i++) { diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c index 4aca4136c56..a213ef5ef67 100644 --- a/src/mame/video/starcrus.c +++ b/src/mame/video/starcrus.c @@ -30,7 +30,7 @@ VIDEO_START( starcrus ) WRITE8_HANDLER( starcrus_ship_parm_1_w ) { starcrus_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); state->s1_sprite = data&0x1f; state->engine1_on = ((data&0x20)>>5)^0x01; @@ -56,7 +56,7 @@ WRITE8_HANDLER( starcrus_ship_parm_1_w ) WRITE8_HANDLER( starcrus_ship_parm_2_w ) { starcrus_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); state->s2_sprite = data&0x1f; set_led_status(space->machine, 2,~data & 0x80); /* game over lamp */ @@ -85,7 +85,7 @@ WRITE8_HANDLER( starcrus_ship_parm_2_w ) WRITE8_HANDLER( starcrus_proj_parm_1_w ) { starcrus_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); state->p1_sprite = data&0x0f; state->launch1_on = ((data&0x20)>>5)^0x01; @@ -125,7 +125,7 @@ WRITE8_HANDLER( starcrus_proj_parm_1_w ) WRITE8_HANDLER( starcrus_proj_parm_2_w ) { starcrus_state *state = space->machine->driver_data(); - running_device *samples = space->machine->device("samples"); + device_t *samples = space->machine->device("samples"); state->p2_sprite = data&0x0f; state->launch2_on = ((data&0x20)>>5)^0x01; diff --git a/src/mame/video/subs.c b/src/mame/video/subs.c index 528fe9e833d..5381afef094 100644 --- a/src/mame/video/subs.c +++ b/src/mame/video/subs.c @@ -44,9 +44,9 @@ VIDEO_UPDATE( subs ) UINT8 *spriteram = screen->machine->generic.spriteram.u8; int offs; - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); - running_device *discrete = screen->machine->device("discrete"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); + device_t *discrete = screen->machine->device("discrete"); /* for every character in the Video RAM, check if it has been modified */ /* since last time and update it accordingly. */ diff --git a/src/mame/video/superchs.c b/src/mame/video/superchs.c index 2b78a2bbf88..f93ed6d4b61 100644 --- a/src/mame/video/superchs.c +++ b/src/mame/video/superchs.c @@ -210,7 +210,7 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); VIDEO_UPDATE( superchs ) { - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT16 priority; static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0}; diff --git a/src/mame/video/system1.c b/src/mame/video/system1.c index cc98c133bdf..4fe1951095f 100644 --- a/src/mame/video/system1.c +++ b/src/mame/video/system1.c @@ -491,7 +491,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta * *************************************/ -static void video_update_common(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, bitmap_t *fgpixmap, bitmap_t **bgpixmaps, const int *bgrowscroll, int bgyscroll, int spritexoffs) +static void video_update_common(device_t *screen, bitmap_t *bitmap, const rectangle *cliprect, bitmap_t *fgpixmap, bitmap_t **bgpixmaps, const int *bgrowscroll, int bgyscroll, int spritexoffs) { const UINT8 *lookup = memory_region(screen->machine, "proms"); int x, y; diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index 9e2754d342e..e5d71e28278 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -1188,7 +1188,7 @@ VIDEO_UPDATE( taitof2_thundfox ) while (drawn[0] < 2 && drawn[1] < 2) { int pick; - running_device *tc0100scn; + device_t *tc0100scn; if (tilepri[0][drawn[0]] < tilepri[1][drawn[1]]) { diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c index 1f30e52ff54..c73aa60812f 100644 --- a/src/mame/video/taitoic.c +++ b/src/mame/video/taitoic.c @@ -567,7 +567,7 @@ struct _pc080sn_state INLINE FUNCTIONS *****************************************************************************/ -INLINE pc080sn_state *pc080sn_get_safe_token( running_device *device ) +INLINE pc080sn_state *pc080sn_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == PC080SN); @@ -575,7 +575,7 @@ INLINE pc080sn_state *pc080sn_get_safe_token( running_device *device ) return (pc080sn_state *)downcast(device)->token(); } -INLINE const pc080sn_interface *pc080sn_get_interface( running_device *device ) +INLINE const pc080sn_interface *pc080sn_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == PC080SN)); @@ -586,7 +586,7 @@ INLINE const pc080sn_interface *pc080sn_get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -INLINE void common_get_pc080sn_bg_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) +INLINE void common_get_pc080sn_bg_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); UINT16 code, attr; @@ -609,7 +609,7 @@ INLINE void common_get_pc080sn_bg_tile_info( running_device *device, tile_data * TILE_FLIPYX((attr & 0xc000) >> 14)); } -INLINE void common_get_pc080sn_fg_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) +INLINE void common_get_pc080sn_fg_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); UINT16 code,attr; @@ -744,7 +744,7 @@ WRITE16_DEVICE_HANDLER( pc080sn_ctrl_word_w ) /* This routine is needed as an override by Jumping, which doesn't set proper scroll values for foreground tilemap */ -void pc080sn_set_scroll( running_device *device, int tilemap_num, int scrollx, int scrolly ) +void pc080sn_set_scroll( device_t *device, int tilemap_num, int scrollx, int scrolly ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); @@ -754,14 +754,14 @@ void pc080sn_set_scroll( running_device *device, int tilemap_num, int scrollx, i /* This routine is needed as an override by Jumping */ -void pc080sn_set_trans_pen( running_device *device, int tilemap_num, int pen ) +void pc080sn_set_trans_pen( device_t *device, int tilemap_num, int pen ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); tilemap_set_transparent_pen(pc080sn->tilemap[tilemap_num], pen); } -void pc080sn_tilemap_update( running_device *device ) +void pc080sn_tilemap_update( device_t *device ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); int j; @@ -834,7 +834,7 @@ static UINT16 topspeed_get_road_pixel_color( UINT16 pixel, UINT16 color ) } -static void topspeed_custom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, +static void topspeed_custom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, UINT16 *color_ctrl_ram ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); @@ -928,13 +928,13 @@ static void topspeed_custom_draw( running_device *device, bitmap_t *bitmap, cons while ((!machine_flip && y <= max_y) || (machine_flip && y >= min_y)); } -void pc080sn_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +void pc080sn_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); tilemap_draw(bitmap, cliprect, pc080sn->tilemap[layer], flags, priority); } -void pc080sn_tilemap_draw_offset( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs ) +void pc080sn_tilemap_draw_offset( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs ) { pc080sn_state *pc080sn = pc080sn_get_safe_token(device); int basedx = -16 - pc080sn->xoffs; @@ -949,7 +949,7 @@ void pc080sn_tilemap_draw_offset( running_device *device, bitmap_t *bitmap, cons tilemap_set_scrolldy(pc080sn->tilemap[layer], basedy, basedyflip); } -void pc080sn_tilemap_draw_special( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, UINT16 *ram ) +void pc080sn_tilemap_draw_special( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, UINT16 *ram ) { topspeed_custom_draw(device, bitmap, cliprect, layer, flags, priority, ram); } @@ -1060,7 +1060,7 @@ struct _pc090oj_state INLINE FUNCTIONS *****************************************************************************/ -INLINE pc090oj_state *pc090oj_get_safe_token( running_device *device ) +INLINE pc090oj_state *pc090oj_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == PC090OJ); @@ -1068,7 +1068,7 @@ INLINE pc090oj_state *pc090oj_get_safe_token( running_device *device ) return (pc090oj_state *)downcast(device)->token(); } -INLINE const pc090oj_interface *pc090oj_get_interface( running_device *device ) +INLINE const pc090oj_interface *pc090oj_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == PC090OJ)); @@ -1079,7 +1079,7 @@ INLINE const pc090oj_interface *pc090oj_get_interface( running_device *device ) DEVICE HANDLERS *****************************************************************************/ -void pc090oj_set_sprite_ctrl( running_device *device, UINT16 sprctrl ) +void pc090oj_set_sprite_ctrl( device_t *device, UINT16 sprctrl ) { pc090oj_state *pc090oj = pc090oj_get_safe_token(device); pc090oj->sprite_ctrl = sprctrl; @@ -1111,7 +1111,7 @@ WRITE16_DEVICE_HANDLER( pc090oj_word_w ) } } -void pc090oj_eof_callback( running_device *device ) +void pc090oj_eof_callback( device_t *device ) { pc090oj_state *pc090oj = pc090oj_get_safe_token(device); if (pc090oj->buffer) @@ -1123,7 +1123,7 @@ void pc090oj_eof_callback( running_device *device ) } -void pc090oj_draw_sprites( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int pri_type ) +void pc090oj_draw_sprites( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int pri_type ) { pc090oj_state *pc090oj = pc090oj_get_safe_token(device); int offs, priority = 0; @@ -1268,7 +1268,7 @@ struct _tc0080vco_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0080vco_state *tc0080vco_get_safe_token( running_device *device ) +INLINE tc0080vco_state *tc0080vco_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0080VCO); @@ -1276,7 +1276,7 @@ INLINE tc0080vco_state *tc0080vco_get_safe_token( running_device *device ) return (tc0080vco_state *)downcast(device)->token(); } -INLINE const tc0080vco_interface *tc0080vco_get_interface( running_device *device ) +INLINE const tc0080vco_interface *tc0080vco_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0080VCO)); @@ -1503,7 +1503,7 @@ WRITE16_DEVICE_HANDLER( tc0080vco_word_w ) tc0080vco_scrollram_w(device, offset - (0x20800 / 2), tc0080vco->ram[offset], mem_mask); } -void tc0080vco_tilemap_update( running_device *device ) +void tc0080vco_tilemap_update( device_t *device ) { tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); int j; @@ -1529,7 +1529,7 @@ void tc0080vco_tilemap_update( running_device *device ) /* NB: orientation_flipx code in following routine has not been tested */ -static void tc0080vco_bg0_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) +static void tc0080vco_bg0_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) { tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); UINT16 zoom = tc0080vco->scroll_ram[6]; @@ -1682,7 +1682,7 @@ do \ } \ while (0) \ -static void tc0080vco_bg1_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) +static void tc0080vco_bg1_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority ) { tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); UINT8 layer = 1; @@ -1768,7 +1768,7 @@ static void tc0080vco_bg1_tilemap_draw( running_device *device, bitmap_t *bitmap } -void tc0080vco_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +void tc0080vco_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); int disable = 0x00; /* possibly layer disable bits do exist ?? */ @@ -1952,7 +1952,7 @@ struct _tc0100scn_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0100scn_state *tc0100scn_get_safe_token( running_device *device ) +INLINE tc0100scn_state *tc0100scn_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0100SCN); @@ -1960,7 +1960,7 @@ INLINE tc0100scn_state *tc0100scn_get_safe_token( running_device *device ) return (tc0100scn_state *)downcast(device)->token(); } -INLINE const tc0100scn_interface *tc0100scn_get_interface( running_device *device ) +INLINE const tc0100scn_interface *tc0100scn_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0100SCN)); @@ -1971,7 +1971,7 @@ INLINE const tc0100scn_interface *tc0100scn_get_interface( running_device *devic DEVICE HANDLERS *****************************************************************************/ -INLINE void common_get_bg0_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) +INLINE void common_get_bg0_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); int code, attr; @@ -1995,7 +1995,7 @@ INLINE void common_get_bg0_tile_info( running_device *device, tile_data *tileinf TILE_FLIPYX((attr & 0xc000) >> 14)); } -INLINE void common_get_bg1_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) +INLINE void common_get_bg1_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); int code, attr; @@ -2019,7 +2019,7 @@ INLINE void common_get_bg1_tile_info( running_device *device, tile_data *tileinf TILE_FLIPYX((attr & 0xc000) >> 14)); } -INLINE void common_get_tx_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) +INLINE void common_get_tx_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); int attr = ram[tile_index]; @@ -2061,13 +2061,13 @@ static const gfx_layout tc0100scn_charlayout = }; -void tc0100scn_set_colbank( running_device *device, int col ) +void tc0100scn_set_colbank( device_t *device, int col ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); tc0100scn->colbank = col; } -void tc0100scn_set_colbanks( running_device *device, int bg0, int bg1, int tx ) +void tc0100scn_set_colbanks( device_t *device, int bg0, int bg1, int tx ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); tc0100scn->bg0_colbank = bg0; @@ -2075,7 +2075,7 @@ void tc0100scn_set_colbanks( running_device *device, int bg0, int bg1, int tx ) tc0100scn->tx_colbank = tx; } -void tc0100scn_set_bg_tilemask( running_device *device, int mask ) +void tc0100scn_set_bg_tilemask( device_t *device, int mask ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); tc0100scn->bg_tilemask = mask; @@ -2111,7 +2111,7 @@ static void tc0100scn_set_layer_ptrs( tc0100scn_state *tc0100scn ) } } -static void tc0100scn_dirty_tilemaps( running_device *device ) +static void tc0100scn_dirty_tilemaps( device_t *device ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); @@ -2316,7 +2316,7 @@ WRITE32_DEVICE_HANDLER( tc0100scn_long_w ) } -void tc0100scn_tilemap_update( running_device *device ) +void tc0100scn_tilemap_update( device_t *device ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); int j; @@ -2330,7 +2330,7 @@ void tc0100scn_tilemap_update( running_device *device ) tilemap_set_scrollx(tc0100scn->tilemap[1][tc0100scn->dblwidth], (j + tc0100scn->fgscrolly) & 0x1ff, tc0100scn->fgscrollx - tc0100scn->fgscroll_ram[j]); } -static void tc0100scn_tilemap_draw_fg( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t* tmap, int flags, UINT32 priority ) +static void tc0100scn_tilemap_draw_fg( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, tilemap_t* tmap, int flags, UINT32 priority ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); const bitmap_t *src_bitmap = tilemap_get_pixmap(tmap); @@ -2376,7 +2376,7 @@ static void tc0100scn_tilemap_draw_fg( running_device *device, bitmap_t *bitmap, } } -int tc0100scn_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +int tc0100scn_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); int disable = tc0100scn->ctrl[6] & 0xf7; @@ -2409,7 +2409,7 @@ if (disable != 0 && disable != 3 && disable != 7) return 0; } -int tc0100scn_bottomlayer( running_device *device ) +int tc0100scn_bottomlayer( device_t *device ) { tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); return (tc0100scn->ctrl[6] & 0x8) >> 3; @@ -2558,7 +2558,7 @@ struct _tc0280grd_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0280grd_state *tc0280grd_get_safe_token( running_device *device ) +INLINE tc0280grd_state *tc0280grd_get_safe_token( device_t *device ) { assert(device != NULL); assert((device->type() == TC0280GRD) || (device->type() == TC0430GRW)); @@ -2566,7 +2566,7 @@ INLINE tc0280grd_state *tc0280grd_get_safe_token( running_device *device ) return (tc0280grd_state *)downcast(device)->token(); } -INLINE const tc0280grd_interface *tc0280grd_get_interface( running_device *device ) +INLINE const tc0280grd_interface *tc0280grd_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0280GRD) || (device->type() == TC0430GRW)); @@ -2622,7 +2622,7 @@ WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w ) tc0280grd_ctrl_word_w(device, offset, data, mem_mask); } -void tc0280grd_tilemap_update( running_device *device, int base_color ) +void tc0280grd_tilemap_update( device_t *device, int base_color ) { tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device); if (tc0280grd->base_color != base_color) @@ -2632,12 +2632,12 @@ void tc0280grd_tilemap_update( running_device *device, int base_color ) } } -void tc0430grw_tilemap_update( running_device *device, int base_color ) +void tc0430grw_tilemap_update( device_t *device, int base_color ) { tc0280grd_tilemap_update(device, base_color); } -static void zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply ) +static void zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply ) { tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device); UINT32 startx, starty; @@ -2672,12 +2672,12 @@ static void zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle 0, priority); } -void tc0280grd_zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority ) +void tc0280grd_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority ) { zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 2); } -void tc0430grw_zoom_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority ) +void tc0430grw_zoom_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority ) { zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 1); } @@ -2728,7 +2728,7 @@ struct _tc0360pri_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0360pri_state *tc0360pri_get_safe_token( running_device *device ) +INLINE tc0360pri_state *tc0360pri_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0360PRI); @@ -2820,7 +2820,7 @@ struct _tc0480scp_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0480scp_state *tc0480scp_get_safe_token( running_device *device ) +INLINE tc0480scp_state *tc0480scp_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0480SCP); @@ -2828,7 +2828,7 @@ INLINE tc0480scp_state *tc0480scp_get_safe_token( running_device *device ) return (tc0480scp_state *)downcast(device)->token(); } -INLINE const tc0480scp_interface *tc0480scp_get_interface( running_device *device ) +INLINE const tc0480scp_interface *tc0480scp_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0480SCP)); @@ -2840,7 +2840,7 @@ INLINE const tc0480scp_interface *tc0480scp_get_interface( running_device *devic *****************************************************************************/ -INLINE void common_get_tc0480bg_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) +INLINE void common_get_tc0480bg_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); int code = ram[2 * tile_index + 1] & 0x7fff; @@ -2852,7 +2852,7 @@ INLINE void common_get_tc0480bg_tile_info( running_device *device, tile_data *ti TILE_FLIPYX((attr & 0xc000) >> 14)); } -INLINE void common_get_tc0480tx_tile_info( running_device *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) +INLINE void common_get_tc0480tx_tile_info( device_t *device, tile_data *tileinfo, int tile_index, UINT16 *ram, int gfxnum ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); int attr = ram[tile_index]; @@ -3173,7 +3173,7 @@ WRITE32_DEVICE_HANDLER( tc0480scp_long_w ) } -void tc0480scp_tilemap_update( running_device *device ) +void tc0480scp_tilemap_update( device_t *device ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); int layer, zoom, i, j; @@ -3240,7 +3240,7 @@ Historical Issues **********************************************************************/ -static void tc0480scp_bg01_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +static void tc0480scp_bg01_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { /* X-axis zoom offers expansion only: 0 = no zoom, 0xff = max Y-axis zoom offers expansion/compression: 0x7f = no zoom, 0xff = max @@ -3389,7 +3389,7 @@ flipscreen. ****************************************************************/ -static void tc0480scp_bg23_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +static void tc0480scp_bg23_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); bitmap_t *srcbitmap = tilemap_get_pixmap(tc0480scp->tilemap[layer][tc0480scp->dblwidth]); @@ -3511,7 +3511,7 @@ static void tc0480scp_bg23_draw( running_device *device, bitmap_t *bitmap, const } -void tc0480scp_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) +void tc0480scp_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); @@ -3550,7 +3550,7 @@ static const UINT16 tc0480scp_bg_pri_lookup[8] = 0x0321 }; -int tc0480scp_get_bg_priority( running_device *device ) +int tc0480scp_get_bg_priority( device_t *device ) { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); return tc0480scp_bg_pri_lookup[(tc0480scp->pri_reg & 0x1c) >> 2]; @@ -3762,7 +3762,7 @@ struct _tc0150rod_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0150rod_state *tc0150rod_get_safe_token( running_device *device ) +INLINE tc0150rod_state *tc0150rod_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0150ROD); @@ -3770,7 +3770,7 @@ INLINE tc0150rod_state *tc0150rod_get_safe_token( running_device *device ) return (tc0150rod_state *)downcast(device)->token(); } -INLINE const tc0150rod_interface *tc0150rod_get_interface( running_device *device ) +INLINE const tc0150rod_interface *tc0150rod_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0150ROD)); @@ -3956,7 +3956,7 @@ lookup table from rom for the TaitoZ sprites. ******************************************************************************/ -void tc0150rod_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority ) +void tc0150rod_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority ) { tc0150rod_state *tc0150rod = tc0150rod_get_safe_token(device); @@ -4572,7 +4572,7 @@ struct _tc0110pcr_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0110pcr_state *tc0110pcr_get_safe_token( running_device *device ) +INLINE tc0110pcr_state *tc0110pcr_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0110PCR); @@ -4580,7 +4580,7 @@ INLINE tc0110pcr_state *tc0110pcr_get_safe_token( running_device *device ) return (tc0110pcr_state *)downcast(device)->token(); } -INLINE const tc0110pcr_interface *tc0110pcr_get_interface( running_device *device ) +INLINE const tc0110pcr_interface *tc0110pcr_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0110PCR)); @@ -4802,7 +4802,7 @@ struct _tc0180vcu_state INLINE FUNCTIONS *****************************************************************************/ -INLINE tc0180vcu_state *tc0180vcu_get_safe_token( running_device *device ) +INLINE tc0180vcu_state *tc0180vcu_get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == TC0180VCU); @@ -4810,7 +4810,7 @@ INLINE tc0180vcu_state *tc0180vcu_get_safe_token( running_device *device ) return (tc0180vcu_state *)downcast(device)->token(); } -INLINE const tc0180vcu_interface *tc0180vcu_get_interface( running_device *device ) +INLINE const tc0180vcu_interface *tc0180vcu_get_interface( device_t *device ) { assert(device != NULL); assert((device->type() == TC0180VCU)); @@ -4882,7 +4882,7 @@ READ8_DEVICE_HANDLER( tc0180vcu_get_videoctrl ) return tc0180vcu->video_control; } -static void tc0180vcu_video_control( running_device *device, UINT8 data ) +static void tc0180vcu_video_control( device_t *device, UINT8 data ) { tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); #if 0 @@ -5016,7 +5016,7 @@ WRITE16_DEVICE_HANDLER( tc0180vcu_word_w ) tilemap_mark_tile_dirty(tc0180vcu->tilemap[2], offset & 0x7ff); } -void tc0180vcu_tilemap_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, int plane ) +void tc0180vcu_tilemap_draw( device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, int plane ) { tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); diff --git a/src/mame/video/taitoic.h b/src/mame/video/taitoic.h index ff7f2386b79..57f37612a1d 100644 --- a/src/mame/video/taitoic.h +++ b/src/mame/video/taitoic.h @@ -177,31 +177,31 @@ WRITE16_DEVICE_HANDLER( pc080sn_xscroll_word_w ); WRITE16_DEVICE_HANDLER( pc080sn_yscroll_word_w ); WRITE16_DEVICE_HANDLER( pc080sn_ctrl_word_w ); -void pc080sn_set_scroll(running_device *device, int tilemap_num, int scrollx, int scrolly); -void pc080sn_set_trans_pen(running_device *device, int tilemap_num, int pen); -void pc080sn_tilemap_update(running_device *device); -void pc080sn_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); -void pc080sn_tilemap_draw_offset(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs); +void pc080sn_set_scroll(device_t *device, int tilemap_num, int scrollx, int scrolly); +void pc080sn_set_trans_pen(device_t *device, int tilemap_num, int pen); +void pc080sn_tilemap_update(device_t *device); +void pc080sn_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); +void pc080sn_tilemap_draw_offset(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, int xoffs, int yoffs); /* For Topspeed */ -void pc080sn_tilemap_draw_special(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, UINT16 *ram); +void pc080sn_tilemap_draw_special(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority, UINT16 *ram); /** PC090OJ **/ READ16_DEVICE_HANDLER( pc090oj_word_r ); WRITE16_DEVICE_HANDLER( pc090oj_word_w ); -void pc090oj_set_sprite_ctrl(running_device *device, UINT16 sprctrl); -void pc090oj_eof_callback(running_device *device); -void pc090oj_draw_sprites(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int pri_type); +void pc090oj_set_sprite_ctrl(device_t *device, UINT16 sprctrl); +void pc090oj_eof_callback(device_t *device); +void pc090oj_draw_sprites(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int pri_type); /** TC0080VCO **/ READ16_DEVICE_HANDLER( tc0080vco_word_r ); WRITE16_DEVICE_HANDLER( tc0080vco_word_w ); -void tc0080vco_tilemap_update(running_device *device); -void tc0080vco_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); +void tc0080vco_tilemap_update(device_t *device); +void tc0080vco_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); READ16_DEVICE_HANDLER( tc0080vco_cram_0_r ); READ16_DEVICE_HANDLER( tc0080vco_cram_1_r ); @@ -215,14 +215,14 @@ READ_LINE_DEVICE_HANDLER( tc0080vco_flipscreen_r ); /* Function to set separate color banks for the three tilemapped layers. To change from the default (0,0,0) use after calling TC0100SCN_vh_start */ -void tc0100scn_set_colbanks(running_device *device, int bg0, int bg1, int tx); +void tc0100scn_set_colbanks(device_t *device, int bg0, int bg1, int tx); /* Function to set separate color banks for each TC0100SCN. To change from the default (0,0,0) use after calling TC0100SCN_vh_start */ -void tc0100scn_set_colbank(running_device *device, int colbank); +void tc0100scn_set_colbank(device_t *device, int colbank); /* Function to set bg tilemask < 0xffff */ -void tc0100scn_set_bg_tilemask(running_device *device, int mask); +void tc0100scn_set_bg_tilemask(device_t *device, int mask); /* Function to for Mjnquest to select gfx bank */ WRITE16_DEVICE_HANDLER( tc0100scn_gfxbank_w ); @@ -238,26 +238,26 @@ WRITE32_DEVICE_HANDLER( tc0100scn_long_w ); READ32_DEVICE_HANDLER( tc0100scn_ctrl_long_r ); WRITE32_DEVICE_HANDLER( tc0100scn_ctrl_long_w ); -void tc0100scn_tilemap_update(running_device *device); -int tc0100scn_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); +void tc0100scn_tilemap_update(device_t *device); +int tc0100scn_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); /* returns 0 or 1 depending on the lowest priority tilemap set in the internal register. Use this function to draw tilemaps in the correct order. */ -int tc0100scn_bottomlayer(running_device *device); +int tc0100scn_bottomlayer(device_t *device); /** TC0280GRD & TC0430GRW **/ READ16_DEVICE_HANDLER( tc0280grd_word_r ); WRITE16_DEVICE_HANDLER( tc0280grd_word_w ); WRITE16_DEVICE_HANDLER( tc0280grd_ctrl_word_w ); -void tc0280grd_tilemap_update(running_device *device, int base_color); -void tc0280grd_zoom_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); +void tc0280grd_tilemap_update(device_t *device, int base_color); +void tc0280grd_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); READ16_DEVICE_HANDLER( tc0430grw_word_r ); WRITE16_DEVICE_HANDLER( tc0430grw_word_w ); WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w ); -void tc0430grw_tilemap_update(running_device *device, int base_color); -void tc0430grw_zoom_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); +void tc0430grw_tilemap_update(device_t *device, int base_color); +void tc0430grw_zoom_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int xoffset, int yoffset, UINT32 priority); /** TC0360PRI **/ @@ -281,13 +281,13 @@ WRITE32_DEVICE_HANDLER( tc0480scp_long_w ); READ32_DEVICE_HANDLER( tc0480scp_ctrl_long_r ); WRITE32_DEVICE_HANDLER( tc0480scp_ctrl_long_w ); -void tc0480scp_tilemap_update(running_device *device); -void tc0480scp_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); +void tc0480scp_tilemap_update(device_t *device); +void tc0480scp_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int layer, int flags, UINT32 priority); /* Returns the priority order of the bg tilemaps set in the internal register. The order in which the four layers should be drawn is returned in the lowest four nibbles (msn = bottom layer; lsn = top) */ -int tc0480scp_get_bg_priority(running_device *device); +int tc0480scp_get_bg_priority(device_t *device); /* Undrfire needs to read this for a sprite/tile priority hack */ READ8_DEVICE_HANDLER( tc0480scp_pri_reg_r ); @@ -296,7 +296,7 @@ READ8_DEVICE_HANDLER( tc0480scp_pri_reg_r ); /** TC0150ROD **/ READ16_DEVICE_HANDLER( tc0150rod_word_r ); WRITE16_DEVICE_HANDLER( tc0150rod_word_w ); -void tc0150rod_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority); +void tc0150rod_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int y_offs, int palette_offs, int type, int road_trans, UINT32 low_priority, UINT32 high_priority); /** TC0110PCR **/ @@ -317,4 +317,4 @@ READ16_DEVICE_HANDLER( tc0180vcu_scroll_r ); WRITE16_DEVICE_HANDLER( tc0180vcu_scroll_w ); READ16_DEVICE_HANDLER( tc0180vcu_word_r ); WRITE16_DEVICE_HANDLER( tc0180vcu_word_w ); -void tc0180vcu_tilemap_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, int plane); +void tc0180vcu_tilemap_draw(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, int tmap_num, int plane); diff --git a/src/mame/video/tbowl.c b/src/mame/video/tbowl.c index f7b3a047a50..e26b1939d0e 100644 --- a/src/mame/video/tbowl.c +++ b/src/mame/video/tbowl.c @@ -213,8 +213,8 @@ VIDEO_START( tbowl ) VIDEO_UPDATE( tbowl ) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); if (screen == left_screen) { diff --git a/src/mame/video/tceptor.c b/src/mame/video/tceptor.c index b5153f6e371..d8bd8b0caf4 100644 --- a/src/mame/video/tceptor.c +++ b/src/mame/video/tceptor.c @@ -536,9 +536,9 @@ VIDEO_UPDATE( tceptor ) int pri; int bg_center = 144 - ((((bg1_scroll_x + bg2_scroll_x ) & 0x1ff) - 288) / 2); - running_device *_2d_screen = screen->machine->device("2dscreen"); - running_device *_3d_left_screen = screen->machine->device("3dleft"); - running_device *_3d_right_screen = screen->machine->device("3dright"); + device_t *_2d_screen = screen->machine->device("2dscreen"); + device_t *_3d_left_screen = screen->machine->device("3dleft"); + device_t *_3d_right_screen = screen->machine->device("3dright"); if (screen != _2d_screen) { diff --git a/src/mame/video/tetrisp2.c b/src/mame/video/tetrisp2.c index f392297e189..dde21410904 100644 --- a/src/mame/video/tetrisp2.c +++ b/src/mame/video/tetrisp2.c @@ -677,8 +677,8 @@ VIDEO_UPDATE( rocknms ) int scr_pri; int rot_pri; - running_device *left_screen = screen->machine->device("lscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *right_screen = screen->machine->device("rscreen"); /* Black background color */ if (screen == left_screen) diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c index 55994f77f80..62f93af52c7 100644 --- a/src/mame/video/toaplan2.c +++ b/src/mame/video/toaplan2.c @@ -466,7 +466,7 @@ VIDEO_UPDATE( toaplan2 ) if (state->vdp0) { - running_device *screen1 = screen->machine->device("screen"); + device_t *screen1 = screen->machine->device("screen"); gp9001_log_vram(state->vdp0, screen->machine); @@ -482,7 +482,7 @@ VIDEO_UPDATE( toaplan2 ) #ifdef DUAL_SCREEN_VDPS if (state->vdp1) { - running_device *screen2 = screen->machine->device("screen2"); + device_t *screen2 = screen->machine->device("screen2"); gp9001_log_vram(state->vdp1, screen->machine); diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c index 1577b303918..ee57ee6722d 100644 --- a/src/mame/video/triplhnt.c +++ b/src/mame/video/triplhnt.c @@ -130,7 +130,7 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta VIDEO_UPDATE( triplhnt ) { - running_device *discrete = screen->machine->device("discrete"); + device_t *discrete = screen->machine->device("discrete"); tilemap_mark_all_tiles_dirty(bg_tilemap); diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c index 514f922e2e2..f1136d27b08 100644 --- a/src/mame/video/tx1.c +++ b/src/mame/video/tx1.c @@ -1192,9 +1192,9 @@ static void tx1_combine_layers(running_machine *machine, bitmap_t *bitmap, int s VIDEO_UPDATE( tx1 ) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *centre_screen = screen->machine->device("cscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *centre_screen = screen->machine->device("cscreen"); + device_t *right_screen = screen->machine->device("rscreen"); if (screen == left_screen) { @@ -3079,9 +3079,9 @@ VIDEO_EOF( buggyboy ) VIDEO_UPDATE( buggyboy ) { - running_device *left_screen = screen->machine->device("lscreen"); - running_device *center_screen = screen->machine->device("cscreen"); - running_device *right_screen = screen->machine->device("rscreen"); + device_t *left_screen = screen->machine->device("lscreen"); + device_t *center_screen = screen->machine->device("cscreen"); + device_t *right_screen = screen->machine->device("rscreen"); if (screen == left_screen) { diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c index 3d650226015..2d654171af7 100644 --- a/src/mame/video/ultratnk.c +++ b/src/mame/video/ultratnk.c @@ -100,7 +100,7 @@ VIDEO_EOF( ultratnk ) ultratnk_state *state = machine->driver_data(); int i; UINT16 BG = colortable_entry_get_value(machine->colortable, 0); - running_device *discrete = machine->device("discrete"); + device_t *discrete = machine->device("discrete"); UINT8 *videoram = state->videoram; /* check for sprite-playfield collisions */ diff --git a/src/mame/video/undrfire.c b/src/mame/video/undrfire.c index f8fe6504768..1db157eebe2 100644 --- a/src/mame/video/undrfire.c +++ b/src/mame/video/undrfire.c @@ -358,8 +358,8 @@ static void draw_sprites_cbombers(running_machine *machine, bitmap_t *bitmap,con VIDEO_UPDATE( undrfire ) { - running_device *tc0100scn = screen->machine->device("tc0100scn"); - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0100scn = screen->machine->device("tc0100scn"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT8 pivlayer[3]; UINT16 priority; @@ -504,8 +504,8 @@ VIDEO_UPDATE( undrfire ) VIDEO_UPDATE( cbombers ) { - running_device *tc0100scn = screen->machine->device("tc0100scn"); - running_device *tc0480scp = screen->machine->device("tc0480scp"); + device_t *tc0100scn = screen->machine->device("tc0100scn"); + device_t *tc0480scp = screen->machine->device("tc0480scp"); UINT8 layer[5]; UINT8 pivlayer[3]; UINT16 priority; diff --git a/src/mame/video/vrender0.c b/src/mame/video/vrender0.c index 5d0f87a648a..a902a7d6364 100644 --- a/src/mame/video/vrender0.c +++ b/src/mame/video/vrender0.c @@ -77,7 +77,7 @@ typedef struct typedef struct _vr0video_state vr0video_state; struct _vr0video_state { - running_device *cpu; + device_t *cpu; UINT16 InternalPalette[256]; UINT32 LastPalUpdate; @@ -90,7 +90,7 @@ struct _vr0video_state INLINE FUNCTIONS *****************************************************************************/ -INLINE vr0video_state *get_safe_token( running_device *device ) +INLINE vr0video_state *get_safe_token( device_t *device ) { assert(device != NULL); assert(device->type() == VIDEO_VRENDER0); @@ -98,7 +98,7 @@ INLINE vr0video_state *get_safe_token( running_device *device ) return (vr0video_state *)downcast(device)->token(); } -INLINE const vr0video_interface *get_interface( running_device *device ) +INLINE const vr0video_interface *get_interface( device_t *device ) { assert(device != NULL); assert(device->type() == VIDEO_VRENDER0); @@ -400,7 +400,7 @@ static const _DrawTemplate DrawTile[]= #define Packet(i) space->read_word(PacketPtr + 2 * i) //Returns TRUE if the operation was a flip (sync or async) -int vrender0_ProcessPacket(running_device *device, UINT32 PacketPtr, UINT16 *Dest, UINT8 *TEXTURE) +int vrender0_ProcessPacket(device_t *device, UINT32 PacketPtr, UINT16 *Dest, UINT8 *TEXTURE) { vr0video_state *vr0 = get_safe_token(device); address_space *space = cpu_get_address_space(vr0->cpu, ADDRESS_SPACE_PROGRAM); diff --git a/src/mame/video/vrender0.h b/src/mame/video/vrender0.h index 0bf11fa1d85..0abc6fa35e7 100644 --- a/src/mame/video/vrender0.h +++ b/src/mame/video/vrender0.h @@ -28,6 +28,6 @@ MCFG_DEVICE_CONFIG(_interface) DEVICE I/O FUNCTIONS ***************************************************************************/ -extern int vrender0_ProcessPacket(running_device *device, UINT32 PacketPtr, UINT16 *Dest, UINT8 *TEXTURE); +extern int vrender0_ProcessPacket(device_t *device, UINT32 PacketPtr, UINT16 *Dest, UINT8 *TEXTURE); #endif /* __VR0VIDEO_H__ */ diff --git a/src/mame/video/vsnes.c b/src/mame/video/vsnes.c index 9a757de18b2..0288d471168 100644 --- a/src/mame/video/vsnes.c +++ b/src/mame/video/vsnes.c @@ -14,12 +14,12 @@ PALETTE_INIT( vsdual ) ppu2c0x_init_palette_rgb(machine, 8*4*16 ); } -static void ppu_irq_1( running_device *device, int *ppu_regs ) +static void ppu_irq_1( device_t *device, int *ppu_regs ) { cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE ); } -static void ppu_irq_2( running_device *device, int *ppu_regs ) +static void ppu_irq_2( device_t *device, int *ppu_regs ) { cputag_set_input_line(device->machine, "sub", INPUT_LINE_NMI, PULSE_LINE ); } @@ -65,8 +65,8 @@ VIDEO_UPDATE( vsnes ) VIDEO_UPDATE( vsdual ) { - running_device *top_screen = screen->machine->device("top"); - running_device *bottom_screen = screen->machine->device("bottom"); + device_t *top_screen = screen->machine->device("top"); + device_t *bottom_screen = screen->machine->device("bottom"); /* render the ppu's */ if (screen == top_screen) diff --git a/src/mame/video/warriorb.c b/src/mame/video/warriorb.c index 5f669022765..d49780cc94b 100644 --- a/src/mame/video/warriorb.c +++ b/src/mame/video/warriorb.c @@ -89,7 +89,7 @@ VIDEO_UPDATE( warriorb ) warriorb_state *state = screen->machine->driver_data(); int xoffs = 0; UINT8 layer[3], nodraw; - running_device *tc0100scn = NULL; + device_t *tc0100scn = NULL; if (screen == state->lscreen) { diff --git a/src/mame/video/wecleman.c b/src/mame/video/wecleman.c index 0d75ce4312d..33a4c61f1e2 100644 --- a/src/mame/video/wecleman.c +++ b/src/mame/video/wecleman.c @@ -1123,8 +1123,8 @@ VIDEO_UPDATE ( wecleman ) VIDEO_UPDATE( hotchase ) { - running_device *k051316_1 = screen->machine->device("k051316_1"); - running_device *k051316_2 = screen->machine->device("k051316_2"); + device_t *k051316_1 = screen->machine->device("k051316_1"); + device_t *k051316_2 = screen->machine->device("k051316_2"); int video_on; video_on = wecleman_irqctrl & 0x40; diff --git a/src/osd/sdl/debugosx.h b/src/osd/sdl/debugosx.h index 6ec7b0e90fb..23d8accb807 100644 --- a/src/osd/sdl/debugosx.h +++ b/src/osd/sdl/debugosx.h @@ -62,7 +62,7 @@ typedef float CGFloat; - (NSString *)selectedSubviewName; - (int)selectedSubviewIndex; - (void)selectSubviewAtIndex:(int)index; -- (void)selectSubviewForCPU:(running_device *)device; +- (void)selectSubviewForCPU:(device_t *)device; @end @@ -143,7 +143,7 @@ typedef float CGFloat; - (NSString *)selectedSubviewName; - (int)selectedSubviewIndex; - (void)selectSubviewAtIndex:(int)index; -- (void)selectSubviewForCPU:(running_device *)device; +- (void)selectSubviewForCPU:(device_t *)device; - (NSString *)expression; - (void)setExpression:(NSString *)exp; @@ -171,7 +171,7 @@ typedef float CGFloat; - (NSString *)selectedSubviewName; - (int)selectedSubviewIndex; - (void)selectSubviewAtIndex:(int)index; -- (void)selectSubviewForCPU:(running_device *)device; +- (void)selectSubviewForCPU:(device_t *)device; - (NSString *)expression; - (void)setExpression:(NSString *)exp; @@ -199,7 +199,7 @@ typedef float CGFloat; - (NSString *)selectedSubviewName; - (int)selectedSubviewIndex; - (void)selectSubviewAtIndex:(int)index; -- (void)selectSubviewForCPU:(running_device *)device; +- (void)selectSubviewForCPU:(device_t *)device; @end @@ -269,7 +269,7 @@ typedef float CGFloat; - (id)initWithMachine:(running_machine *)m; -- (void)setCPU:(running_device *)device; +- (void)setCPU:(device_t *)device; - (IBAction)doCommand:(id)sender; diff --git a/src/osd/sdl/debugwin.c b/src/osd/sdl/debugwin.c index 212815a49bb..218fe9e07ab 100644 --- a/src/osd/sdl/debugwin.c +++ b/src/osd/sdl/debugwin.c @@ -75,7 +75,7 @@ struct _win_i { edit ed; running_machine * machine; // machine DView * views[MAX_VIEWS]; - running_device * cpu; // current CPU + device_t * cpu; // current CPU }; struct windowState @@ -452,7 +452,7 @@ static void disasmview_update_checks(win_i *info) // debugmain_set_cpu //============================================================ -static void debugmain_set_cpu(running_device *device) +static void debugmain_set_cpu(device_t *device) { win_i *dmain = get_first_win_i(WIN_TYPE_MAIN); DView *dv; @@ -553,7 +553,7 @@ void sdl_osd_interface::init_debugger() // wait_for_debugger //============================================================ -void sdl_osd_interface::wait_for_debugger(running_device &device, bool firststop) +void sdl_osd_interface::wait_for_debugger(device_t &device, bool firststop) { win_i *dmain = get_first_win_i(WIN_TYPE_MAIN); @@ -765,7 +765,7 @@ static void memorywin_new(running_machine *machine) { win_i *mem; int item, cursel; - running_device *curcpu = debug_cpu_get_visible_cpu(machine); + device_t *curcpu = debug_cpu_get_visible_cpu(machine); GtkComboBox * zone_w; mem = add_win_i(machine, WIN_TYPE_MEMORY); @@ -859,7 +859,7 @@ static void disasmwin_new(running_machine *machine) { win_i *dis; int item, cursel; - running_device *curcpu = debug_cpu_get_visible_cpu(machine); + device_t *curcpu = debug_cpu_get_visible_cpu(machine); GtkComboBox *cpu_w; astring title; @@ -1286,7 +1286,7 @@ void sdl_osd_interface::init_debugger() { } -void sdl_osd_interface::wait_for_debugger(running_device &device, bool firststop) +void sdl_osd_interface::wait_for_debugger(device_t &device, bool firststop) { } diff --git a/src/osd/windows/debugwin.c b/src/osd/windows/debugwin.c index 3839d95ee88..e6aed7889a8 100644 --- a/src/osd/windows/debugwin.c +++ b/src/osd/windows/debugwin.c @@ -250,7 +250,7 @@ static void disasm_update_caption(running_machine *machine, HWND wnd); static void console_create_window(running_machine *machine); static void console_recompute_children(debugwin_info *info); static void console_process_string(debugwin_info *info, const char *string); -static void console_set_cpu(running_device *device); +static void console_set_cpu(device_t *device); static HMENU create_standard_menubar(void); static int global_handle_command(debugwin_info *info, WPARAM wparam, LPARAM lparam); @@ -265,7 +265,7 @@ static void smart_show_all(BOOL show); // wait_for_debugger //============================================================ -void windows_osd_interface::wait_for_debugger(running_device &device, bool firststop) +void windows_osd_interface::wait_for_debugger(device_t &device, bool firststop) { MSG message; @@ -1723,7 +1723,7 @@ static void log_create_window(running_machine *machine) static void memory_create_window(running_machine *machine) { - running_device *curcpu = debug_cpu_get_visible_cpu(machine); + device_t *curcpu = debug_cpu_get_visible_cpu(machine); debugwin_info *info; HMENU optionsmenu; @@ -2040,7 +2040,7 @@ static void memory_update_caption(running_machine *machine, HWND wnd) static void disasm_create_window(running_machine *machine) { - running_device *curcpu = debug_cpu_get_visible_cpu(machine); + device_t *curcpu = debug_cpu_get_visible_cpu(machine); debugwin_info *info; HMENU optionsmenu; @@ -2559,7 +2559,7 @@ static void console_process_string(debugwin_info *info, const char *string) // console_set_cpu //============================================================ -static void console_set_cpu(running_device *device) +static void console_set_cpu(device_t *device) { // first set all the views to the new cpu number main_console->view[0].view->set_source(*main_console->view[0].view->source_list().match_device(device));