summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-04-07 06:04:18 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-04-07 06:04:18 +0000
commitfec65e0b5766ade69e086d1c5b859d97494fce56 (patch)
treec22b07938e9ad590184f1276bc2bead6d888a78d /src/emu
parent30d94e51c53f30187a1bc565ef33e4744319790e (diff)
Cleanups and version bumpmame0153
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/bus/a2bus/a2cffa.c6
-rw-r--r--src/emu/bus/a2bus/a2corvus.c21
-rw-r--r--src/emu/bus/a2bus/a2pic.c26
-rw-r--r--src/emu/bus/a2bus/a2ssc.c2
-rw-r--r--src/emu/bus/a2bus/a2ultraterm.c64
-rw-r--r--src/emu/bus/a2bus/a2videoterm.c4
-rw-r--r--src/emu/bus/a2bus/a2videoterm.h2
-rw-r--r--src/emu/bus/a2bus/a2vulcan.c2
-rw-r--r--src/emu/bus/adam/exp.h4
-rw-r--r--src/emu/bus/adamnet/fdc.h2
-rw-r--r--src/emu/bus/adamnet/spi.c6
-rw-r--r--src/emu/bus/adamnet/spi.h2
-rw-r--r--src/emu/bus/bml3/bml3mp1805.h2
-rw-r--r--src/emu/bus/c64/magic_formel.c6
-rw-r--r--src/emu/bus/cbm2/hrg.c2
-rw-r--r--src/emu/bus/cbm2/hrg.h2
-rw-r--r--src/emu/bus/cbm2/user.h2
-rw-r--r--src/emu/bus/cbmiec/c1541.c8
-rw-r--r--src/emu/bus/cbmiec/c1541.h4
-rw-r--r--src/emu/bus/cbmiec/c1571.c4
-rw-r--r--src/emu/bus/cbmiec/c1571.h4
-rw-r--r--src/emu/bus/coco/coco_fdc.c4
-rw-r--r--src/emu/bus/coco/coco_fdc.h6
-rw-r--r--src/emu/bus/coleco/exp.h4
-rw-r--r--src/emu/bus/coleco/hand.h2
-rw-r--r--src/emu/bus/coleco/sac.h2
-rw-r--r--src/emu/bus/coleco/std.h2
-rw-r--r--src/emu/bus/compucolor/floppy.c2
-rw-r--r--src/emu/bus/comx35/exp.h2
-rw-r--r--src/emu/bus/comx35/printer.c2
-rw-r--r--src/emu/bus/ecbbus/ecbbus.h5
-rw-r--r--src/emu/bus/ecbbus/grip.c6
-rw-r--r--src/emu/bus/econet/e01.c2
-rw-r--r--src/emu/bus/econet/econet.c2
-rw-r--r--src/emu/bus/econet/econet.h3
-rw-r--r--src/emu/bus/ep64/exp.h5
-rw-r--r--src/emu/bus/gameboy/gb_slot.c4
-rw-r--r--src/emu/bus/ieee488/c2031.c2
-rw-r--r--src/emu/bus/ieee488/c2031.h2
-rw-r--r--src/emu/bus/ieee488/c2040.c22
-rw-r--r--src/emu/bus/ieee488/c2040.h2
-rw-r--r--src/emu/bus/ieee488/c2040fdc.c30
-rw-r--r--src/emu/bus/ieee488/c8050.c2
-rw-r--r--src/emu/bus/ieee488/hardbox.c8
-rw-r--r--src/emu/bus/ieee488/softbox.c2
-rw-r--r--src/emu/bus/imi7000/imi5000h.h2
-rw-r--r--src/emu/bus/isa/3c505.c7
-rw-r--r--src/emu/bus/isa/adlib.h2
-rw-r--r--src/emu/bus/isa/aga.c15
-rw-r--r--src/emu/bus/isa/aga.h20
-rw-r--r--src/emu/bus/isa/cga.c4
-rw-r--r--src/emu/bus/isa/cga.h2
-rw-r--r--src/emu/bus/isa/dectalk.c2
-rw-r--r--src/emu/bus/isa/ega.h2
-rw-r--r--src/emu/bus/isa/gblaster.h2
-rw-r--r--src/emu/bus/isa/isa.c10
-rw-r--r--src/emu/bus/isa/isa.h28
-rw-r--r--src/emu/bus/isa/mda.c2
-rw-r--r--src/emu/bus/isa/mda.h2
-rw-r--r--src/emu/bus/isa/mufdc.c2
-rw-r--r--src/emu/bus/isa/mufdc.h4
-rw-r--r--src/emu/bus/isa/omti8621.c59
-rw-r--r--src/emu/bus/isa/omti8621.h6
-rw-r--r--src/emu/bus/isa/pds.c3
-rw-r--r--src/emu/bus/isa/sblaster.c2
-rw-r--r--src/emu/bus/isa/sblaster.h10
-rw-r--r--src/emu/bus/isa/sc499.c13
-rw-r--r--src/emu/bus/isa/side116.h2
-rw-r--r--src/emu/bus/megadrive/md_carts.c2
-rw-r--r--src/emu/bus/megadrive/md_slot.c2
-rw-r--r--src/emu/bus/nes/act53.c20
-rw-r--r--src/emu/bus/nes/aladdin.c36
-rw-r--r--src/emu/bus/nes/aladdin.h30
-rw-r--r--src/emu/bus/nes/bandai.c6
-rw-r--r--src/emu/bus/nes/bandai.h6
-rw-r--r--src/emu/bus/nes/camerica.c6
-rw-r--r--src/emu/bus/nes/datach.c38
-rw-r--r--src/emu/bus/nes/datach.h16
-rw-r--r--src/emu/bus/nes/jy.c20
-rw-r--r--src/emu/bus/nes/jy.h4
-rw-r--r--src/emu/bus/nes/karastudio.c41
-rw-r--r--src/emu/bus/nes/karastudio.h28
-rw-r--r--src/emu/bus/nes/mmc5.c34
-rw-r--r--src/emu/bus/nes/mmc5.h2
-rw-r--r--src/emu/bus/nes/nes_carts.c3
-rw-r--r--src/emu/bus/nes/nes_ines.inc14
-rw-r--r--src/emu/bus/nes/nes_slot.h4
-rw-r--r--src/emu/bus/nes/nxrom.c24
-rw-r--r--src/emu/bus/nes/sunsoft_dcs.c8
-rw-r--r--src/emu/bus/nes/sunsoft_dcs.h8
-rw-r--r--src/emu/bus/nubus/nubus_specpdq.c2
-rw-r--r--src/emu/bus/nubus/nubus_specpdq.h2
-rw-r--r--src/emu/bus/plus4/c1551.c2
-rw-r--r--src/emu/bus/plus4/c1551.h2
-rw-r--r--src/emu/bus/sms_exp/smsexp.h2
-rw-r--r--src/emu/bus/vidbrain/exp.h4
-rw-r--r--src/emu/bus/wangpc/tig.c6
-rw-r--r--src/emu/bus/wangpc/tig.h2
-rw-r--r--src/emu/bus/wangpc/wangpc.h2
-rw-r--r--src/emu/clifront.h2
-rw-r--r--src/emu/cpu/avr8/avr8.c828
-rw-r--r--src/emu/cpu/avr8/avr8.h294
-rw-r--r--src/emu/cpu/avr8/avr8dasm.c186
-rw-r--r--src/emu/cpu/cosmac/cosmac.h18
-rw-r--r--src/emu/cpu/cpu.mak50
-rw-r--r--src/emu/cpu/cubeqcpu/cubeqcpu.h8
-rw-r--r--src/emu/cpu/dsp32/dsp32.c2
-rw-r--r--src/emu/cpu/esrip/esrip.h6
-rw-r--r--src/emu/cpu/g65816/g65816.h4
-rw-r--r--src/emu/cpu/h8/h8.c76
-rw-r--r--src/emu/cpu/h8/h8.h2
-rw-r--r--src/emu/cpu/h8/h8.lst10
-rw-r--r--src/emu/cpu/h8/h83002.h2
-rw-r--r--src/emu/cpu/h8/h83006.h2
-rw-r--r--src/emu/cpu/h8/h83008.h2
-rw-r--r--src/emu/cpu/h8/h83048.h2
-rw-r--r--src/emu/cpu/h8/h83337.c4
-rw-r--r--src/emu/cpu/h8/h83337.h8
-rw-r--r--src/emu/cpu/h8/h8_adc.c6
-rw-r--r--src/emu/cpu/h8/h8_adc.h2
-rw-r--r--src/emu/cpu/h8/h8_intc.c12
-rw-r--r--src/emu/cpu/h8/h8_intc.h8
-rw-r--r--src/emu/cpu/h8/h8_port.c10
-rw-r--r--src/emu/cpu/h8/h8_port.h2
-rw-r--r--src/emu/cpu/h8/h8_sci.c61
-rw-r--r--src/emu/cpu/h8/h8_sci.h2
-rw-r--r--src/emu/cpu/h8/h8_timer16.c34
-rw-r--r--src/emu/cpu/h8/h8_timer16.h14
-rw-r--r--src/emu/cpu/h8/h8_timer8.c12
-rw-r--r--src/emu/cpu/h8/h8_timer8.h6
-rw-r--r--src/emu/cpu/h8/h8s2245.c48
-rw-r--r--src/emu/cpu/h8/h8s2245.h2
-rw-r--r--src/emu/cpu/h8/h8s2320.c96
-rw-r--r--src/emu/cpu/h8/h8s2320.h2
-rw-r--r--src/emu/cpu/h8/h8s2357.c96
-rw-r--r--src/emu/cpu/h8/h8s2357.h2
-rw-r--r--src/emu/cpu/h8/h8s2655.c96
-rw-r--r--src/emu/cpu/h8/h8s2655.h2
-rw-r--r--src/emu/cpu/i386/i386.c1
-rw-r--r--src/emu/cpu/i86/i186.c2
-rw-r--r--src/emu/cpu/mn10200/mn10200.c56
-rw-r--r--src/emu/cpu/mn10200/mn10200.h6
-rw-r--r--src/emu/cpu/pdp1/pdp1.c1
-rw-r--r--src/emu/cpu/pdp1/pdp1.h2
-rw-r--r--src/emu/cpu/pdp1/tx0.c1
-rw-r--r--src/emu/cpu/pdp1/tx0.h4
-rw-r--r--src/emu/cpu/powerpc/ppccom.c4
-rw-r--r--src/emu/cpu/rsp/rsp.h2
-rw-r--r--src/emu/cpu/rsp/rspdrc.c174
-rw-r--r--src/emu/cpu/sc61860/sc61860.c1
-rw-r--r--src/emu/cpu/scmp/scmp.c1
-rw-r--r--src/emu/cpu/se3208/se3208.c2
-rw-r--r--src/emu/cpu/se3208/se3208.h1
-rw-r--r--src/emu/cpu/sh2/sh2comn.c2
-rw-r--r--src/emu/cpu/sharc/sharc.c9
-rw-r--r--src/emu/cpu/sharc/sharc.h2
-rw-r--r--src/emu/cpu/ssp1601/ssp1601.c1
-rw-r--r--src/emu/cpu/superfx/superfx.c11
-rw-r--r--src/emu/cpu/tlcs90/tlcs90.c1
-rw-r--r--src/emu/cpu/tms32010/tms32010.c13
-rw-r--r--src/emu/cpu/tms32025/tms32025.c1
-rw-r--r--src/emu/cpu/tms32025/tms32025.h4
-rw-r--r--src/emu/cpu/tms32051/tms32051.c1
-rw-r--r--src/emu/cpu/tms32051/tms32051.h2
-rw-r--r--src/emu/cpu/tms34010/34010gfx.c2
-rw-r--r--src/emu/cpu/tms34010/tms34010.c2
-rw-r--r--src/emu/cpu/tms34010/tms34010.h2
-rw-r--r--src/emu/cpu/tms7000/tms7000.c1
-rw-r--r--src/emu/cpu/unsp/unsp.c11
-rw-r--r--src/emu/cpu/upd7810/upd7810.c3
-rw-r--r--src/emu/cpu/upd7810/upd7810.h2
-rw-r--r--src/emu/cpu/v60/v60.c1
-rw-r--r--src/emu/cpu/v60/v60.h2
-rw-r--r--src/emu/cpu/v810/v810.c1
-rw-r--r--src/emu/cpu/z180/z180.c1
-rw-r--r--src/emu/cpu/z180/z180tbl.h1
-rw-r--r--src/emu/cpu/z80/tlcs_z80.c11
-rw-r--r--src/emu/cpu/z80/z80.c4
-rw-r--r--src/emu/cpu/z8000/z8000.c1
-rw-r--r--src/emu/cpu/z8000/z8000.h2
-rw-r--r--src/emu/cpu/z8000/z8000ops.inc4
-rw-r--r--src/emu/crsshair.c2
-rw-r--r--src/emu/delegate.h8
-rw-r--r--src/emu/devfind.c2
-rw-r--r--src/emu/digfx.c4
-rw-r--r--src/emu/digfx.h12
-rw-r--r--src/emu/diimage.c20
-rw-r--r--src/emu/diimage.h8
-rw-r--r--src/emu/dioutput.c2
-rw-r--r--src/emu/diserial.h2
-rw-r--r--src/emu/drawgfx.h2
-rw-r--r--src/emu/drivenum.c6
-rw-r--r--src/emu/drivers/xtal.h2
-rw-r--r--src/emu/emualloc.h2
-rw-r--r--src/emu/emuopts.c2
-rw-r--r--src/emu/emupal.c32
-rw-r--r--src/emu/emupal.h77
-rw-r--r--src/emu/imagedev/flopdrv.c7
-rw-r--r--src/emu/imagedev/harddriv.h10
-rw-r--r--src/emu/ioport.c2
-rw-r--r--src/emu/ioport.h10
-rw-r--r--src/emu/machine.h2
-rw-r--r--src/emu/machine/64h156.c12
-rw-r--r--src/emu/machine/6522via.c2
-rw-r--r--src/emu/machine/6526cia.h4
-rw-r--r--src/emu/machine/6850acia.c6
-rw-r--r--src/emu/machine/68561mpcc.c2
-rw-r--r--src/emu/machine/74145.h18
-rw-r--r--src/emu/machine/8042kbdc.h2
-rw-r--r--src/emu/machine/8530scc.c2
-rw-r--r--src/emu/machine/bcreader.c106
-rw-r--r--src/emu/machine/bcreader.h4
-rw-r--r--src/emu/machine/com8116.h2
-rw-r--r--src/emu/machine/ds75161a.h26
-rw-r--r--src/emu/machine/generic.c1
-rw-r--r--src/emu/machine/hd63450.c8
-rw-r--r--src/emu/machine/hd63450.h18
-rw-r--r--src/emu/machine/hd64610.h6
-rw-r--r--src/emu/machine/i8251.c2
-rw-r--r--src/emu/machine/i8271.c14
-rw-r--r--src/emu/machine/i8271.h8
-rw-r--r--src/emu/machine/i8355.h8
-rw-r--r--src/emu/machine/im6402.h2
-rw-r--r--src/emu/machine/ins8154.h8
-rw-r--r--src/emu/machine/k053252.h4
-rw-r--r--src/emu/machine/kb3600.c4
-rw-r--r--src/emu/machine/kb3600.h26
-rw-r--r--src/emu/machine/kr2376.c2
-rw-r--r--src/emu/machine/kr2376.h8
-rw-r--r--src/emu/machine/laserdsc.c4
-rw-r--r--src/emu/machine/latch8.c16
-rw-r--r--src/emu/machine/latch8.h20
-rw-r--r--src/emu/machine/lh5810.h10
-rw-r--r--src/emu/machine/mb87078.c2
-rw-r--r--src/emu/machine/mb87078.h4
-rw-r--r--src/emu/machine/mc2661.h2
-rw-r--r--src/emu/machine/mc68328.h54
-rw-r--r--src/emu/machine/mc6843.c4
-rw-r--r--src/emu/machine/mc6843.h10
-rw-r--r--src/emu/machine/mc6846.h4
-rw-r--r--src/emu/machine/mc68681.c42
-rw-r--r--src/emu/machine/mc68681.h2
-rw-r--r--src/emu/machine/mc68901.c2
-rw-r--r--src/emu/machine/mc68901.h10
-rw-r--r--src/emu/machine/mm58167.c75
-rw-r--r--src/emu/machine/mm58167.h6
-rw-r--r--src/emu/machine/mm74c922.h12
-rw-r--r--src/emu/machine/mos6530.h14
-rw-r--r--src/emu/machine/mos6551.c2
-rw-r--r--src/emu/machine/msm6242.h4
-rw-r--r--src/emu/machine/ncr5380.h2
-rw-r--r--src/emu/machine/netlist.c377
-rw-r--r--src/emu/machine/netlist.h534
-rw-r--r--src/emu/machine/nsc810.c1
-rw-r--r--src/emu/machine/pc_lpt.c1
-rw-r--r--src/emu/machine/pci.c1
-rw-r--r--src/emu/machine/pckeybrd.c2
-rw-r--r--src/emu/machine/pckeybrd.h6
-rw-r--r--src/emu/machine/rp5c01.h2
-rw-r--r--src/emu/machine/rp5c15.h2
-rw-r--r--src/emu/machine/rtc4543.c4
-rw-r--r--src/emu/machine/rtc65271.h2
-rw-r--r--src/emu/machine/s3c2400.c6
-rw-r--r--src/emu/machine/s3c2400.h12
-rw-r--r--src/emu/machine/s3c2410.c4
-rw-r--r--src/emu/machine/s3c2410.h16
-rw-r--r--src/emu/machine/s3c2440.c56
-rw-r--r--src/emu/machine/s3c2440.h14
-rw-r--r--src/emu/machine/s3c24xx.inc3
-rw-r--r--src/emu/machine/saturn.c4
-rw-r--r--src/emu/machine/seibu_cop.h8
-rw-r--r--src/emu/machine/smc91c9x.h4
-rw-r--r--src/emu/machine/smc92x4.c12
-rw-r--r--src/emu/machine/smc92x4.h2
-rw-r--r--src/emu/machine/tc009xlvc.h2
-rw-r--r--src/emu/machine/terminal.c1
-rw-r--r--src/emu/machine/tmp68301.h4
-rw-r--r--src/emu/machine/tms5501.c8
-rw-r--r--src/emu/machine/upd1990a.c28
-rw-r--r--src/emu/machine/upd1990a.h2
-rw-r--r--src/emu/machine/upd7002.c2
-rw-r--r--src/emu/machine/upd7002.h10
-rw-r--r--src/emu/machine/upd765.c2
-rw-r--r--src/emu/machine/wd17xx.c2
-rw-r--r--src/emu/machine/wd17xx.h4
-rw-r--r--src/emu/machine/wd33c93.h2
-rw-r--r--src/emu/machine/z80dma.c1
-rw-r--r--src/emu/machine/z8536.h2
-rw-r--r--src/emu/mame.c4
-rw-r--r--src/emu/memarray.h2
-rw-r--r--src/emu/netlist/analog/nld_bjt.c175
-rw-r--r--src/emu/netlist/analog/nld_bjt.h234
-rw-r--r--src/emu/netlist/analog/nld_fourterm.c95
-rw-r--r--src/emu/netlist/analog/nld_fourterm.h56
-rw-r--r--src/emu/netlist/analog/nld_solver.c1318
-rw-r--r--src/emu/netlist/analog/nld_solver.h112
-rw-r--r--src/emu/netlist/analog/nld_switches.c50
-rw-r--r--src/emu/netlist/analog/nld_switches.h2
-rw-r--r--src/emu/netlist/analog/nld_twoterm.c60
-rw-r--r--src/emu/netlist/analog/nld_twoterm.h124
-rw-r--r--src/emu/netlist/devices/net_lib.c86
-rw-r--r--src/emu/netlist/devices/nld_4066.c90
-rw-r--r--src/emu/netlist/devices/nld_4066.h18
-rw-r--r--src/emu/netlist/devices/nld_7400.c59
-rw-r--r--src/emu/netlist/devices/nld_7400.h2
-rw-r--r--src/emu/netlist/devices/nld_7402.c59
-rw-r--r--src/emu/netlist/devices/nld_7402.h10
-rw-r--r--src/emu/netlist/devices/nld_7404.c62
-rw-r--r--src/emu/netlist/devices/nld_7404.h14
-rw-r--r--src/emu/netlist/devices/nld_7410.c51
-rw-r--r--src/emu/netlist/devices/nld_7410.h8
-rw-r--r--src/emu/netlist/devices/nld_74107.c56
-rw-r--r--src/emu/netlist/devices/nld_74107.h6
-rw-r--r--src/emu/netlist/devices/nld_74153.c93
-rw-r--r--src/emu/netlist/devices/nld_74153.h20
-rw-r--r--src/emu/netlist/devices/nld_7420.c35
-rw-r--r--src/emu/netlist/devices/nld_7420.h6
-rw-r--r--src/emu/netlist/devices/nld_7425.c39
-rw-r--r--src/emu/netlist/devices/nld_7425.h6
-rw-r--r--src/emu/netlist/devices/nld_7427.c51
-rw-r--r--src/emu/netlist/devices/nld_7427.h8
-rw-r--r--src/emu/netlist/devices/nld_7430.c27
-rw-r--r--src/emu/netlist/devices/nld_7430.h4
-rw-r--r--src/emu/netlist/devices/nld_7448.c225
-rw-r--r--src/emu/netlist/devices/nld_7448.h54
-rw-r--r--src/emu/netlist/devices/nld_7450.c107
-rw-r--r--src/emu/netlist/devices/nld_7450.h22
-rw-r--r--src/emu/netlist/devices/nld_7474.c66
-rw-r--r--src/emu/netlist/devices/nld_7474.h6
-rw-r--r--src/emu/netlist/devices/nld_7483.c40
-rw-r--r--src/emu/netlist/devices/nld_7483.h2
-rw-r--r--src/emu/netlist/devices/nld_7486.c51
-rw-r--r--src/emu/netlist/devices/nld_7486.h10
-rw-r--r--src/emu/netlist/devices/nld_7490.c69
-rw-r--r--src/emu/netlist/devices/nld_7490.h6
-rw-r--r--src/emu/netlist/devices/nld_7493.c58
-rw-r--r--src/emu/netlist/devices/nld_7493.h2
-rw-r--r--src/emu/netlist/devices/nld_74ls629.c194
-rw-r--r--src/emu/netlist/devices/nld_74ls629.h26
-rw-r--r--src/emu/netlist/devices/nld_9316.c93
-rw-r--r--src/emu/netlist/devices/nld_9316.h14
-rw-r--r--src/emu/netlist/devices/nld_legacy.c4
-rw-r--r--src/emu/netlist/devices/nld_ne555.c40
-rw-r--r--src/emu/netlist/devices/nld_ne555.h2
-rw-r--r--src/emu/netlist/devices/nld_signal.h172
-rw-r--r--src/emu/netlist/devices/nld_system.c10
-rw-r--r--src/emu/netlist/devices/nld_system.h256
-rw-r--r--src/emu/netlist/nl_base.c590
-rw-r--r--src/emu/netlist/nl_base.h1236
-rw-r--r--src/emu/netlist/nl_dice_compat.h52
-rw-r--r--src/emu/netlist/nl_lists.h596
-rw-r--r--src/emu/netlist/nl_parser.c600
-rw-r--r--src/emu/netlist/nl_parser.h424
-rw-r--r--src/emu/netlist/nl_setup.c238
-rw-r--r--src/emu/netlist/nl_setup.h20
-rw-r--r--src/emu/netlist/pstate.c38
-rw-r--r--src/emu/netlist/pstate.h38
-rw-r--r--src/emu/netlist/pstring.h16
-rw-r--r--src/emu/output.c8
-rw-r--r--src/emu/render.c2
-rw-r--r--src/emu/rendfont.c4
-rw-r--r--src/emu/rendfont.h10
-rw-r--r--src/emu/rendlay.c14
-rw-r--r--src/emu/rendlay.h2
-rw-r--r--src/emu/screen.c8
-rw-r--r--src/emu/screen.h2
-rw-r--r--src/emu/softlist.c174
-rw-r--r--src/emu/softlist.h58
-rw-r--r--src/emu/sound/aica.c72
-rw-r--r--src/emu/sound/aica.h10
-rw-r--r--src/emu/sound/ay8910.c85
-rw-r--r--src/emu/sound/cdp1869.c2
-rw-r--r--src/emu/sound/cdp1869.h4
-rw-r--r--src/emu/sound/dmadac.c3
-rw-r--r--src/emu/sound/dmadac.h2
-rw-r--r--src/emu/sound/es5503.c2
-rw-r--r--src/emu/sound/es5503.h8
-rw-r--r--src/emu/sound/ics2115.c2
-rw-r--r--src/emu/sound/k007232.h4
-rw-r--r--src/emu/sound/mos6560.h2
-rw-r--r--src/emu/sound/msm5205.h4
-rw-r--r--src/emu/sound/msm5232.c2
-rw-r--r--src/emu/sound/msm5232.h4
-rw-r--r--src/emu/sound/qs1000.c2
-rw-r--r--src/emu/sound/qs1000.h8
-rw-r--r--src/emu/sound/qsound.c18
-rw-r--r--src/emu/sound/scsp.c12
-rw-r--r--src/emu/sound/scsp.h28
-rw-r--r--src/emu/sound/sp0256.h8
-rw-r--r--src/emu/sound/spu.c12
-rw-r--r--src/emu/sound/tc8830f.c8
-rw-r--r--src/emu/sound/upd7759.c4
-rw-r--r--src/emu/sound/upd7759.h4
-rw-r--r--src/emu/sound/votrax.h4
-rw-r--r--src/emu/sound/ymf278b.c2
-rw-r--r--src/emu/sound/ymz280b.c2
-rw-r--r--src/emu/sound/zsg2.c44
-rw-r--r--src/emu/sound/zsg2.h2
-rw-r--r--src/emu/tilemap.h2
-rw-r--r--src/emu/ui/barcode.c28
-rw-r--r--src/emu/ui/barcode.h2
-rw-r--r--src/emu/ui/devctrl.h6
-rw-r--r--src/emu/ui/filemngr.c2
-rw-r--r--src/emu/ui/filesel.c24
-rw-r--r--src/emu/ui/filesel.h40
-rw-r--r--src/emu/ui/imgcntrl.c2
-rw-r--r--src/emu/ui/imginfo.c2
-rw-r--r--src/emu/ui/mainmenu.c4
-rw-r--r--src/emu/ui/menu.c204
-rw-r--r--src/emu/ui/menu.h96
-rw-r--r--src/emu/ui/selgame.c6
-rw-r--r--src/emu/ui/selgame.h8
-rw-r--r--src/emu/ui/swlist.c2
-rw-r--r--src/emu/ui/swlist.h26
-rw-r--r--src/emu/ui/ui.c186
-rw-r--r--src/emu/ui/ui.h32
-rw-r--r--src/emu/ui/viewgfx.c54
-rw-r--r--src/emu/validity.c2
-rw-r--r--src/emu/validity.h6
-rw-r--r--src/emu/video.c4
-rw-r--r--src/emu/video/315_5124.h14
-rw-r--r--src/emu/video/315_5313.c12
-rw-r--r--src/emu/video/315_5313.h18
-rw-r--r--src/emu/video/crt9007.h4
-rw-r--r--src/emu/video/crt9021.h4
-rw-r--r--src/emu/video/crt9212.h4
-rw-r--r--src/emu/video/dl1416.h2
-rw-r--r--src/emu/video/ef9345.h6
-rw-r--r--src/emu/video/epic12.c70
-rw-r--r--src/emu/video/epic12.h47
-rw-r--r--src/emu/video/epic12_blit2.c2
-rw-r--r--src/emu/video/epic12_blit3.c2
-rw-r--r--src/emu/video/epic12_blit4.c2
-rw-r--r--src/emu/video/epic12_blit6.c2
-rw-r--r--src/emu/video/epic12_blit7.c2
-rw-r--r--src/emu/video/epic12_blit8.c3
-rw-r--r--src/emu/video/epic12in.inc10
-rw-r--r--src/emu/video/epic12pixel.inc9
-rw-r--r--src/emu/video/fixfreq.c2
-rw-r--r--src/emu/video/hd44352.h2
-rw-r--r--src/emu/video/hd44780.h2
-rw-r--r--src/emu/video/hd61830.h2
-rw-r--r--src/emu/video/huc6260.h10
-rw-r--r--src/emu/video/huc6270.h6
-rw-r--r--src/emu/video/mb_vcu.h2
-rw-r--r--src/emu/video/mc6845.c2
-rw-r--r--src/emu/video/mc6847.c39
-rw-r--r--src/emu/video/mc6847.h6
-rw-r--r--src/emu/video/pc_vga.c6
-rw-r--r--src/emu/video/ramdac.h6
-rw-r--r--src/emu/video/tms34061.c2
-rw-r--r--src/emu/video/tms34061.h12
-rw-r--r--src/emu/video/upd3301.c1
-rw-r--r--src/emu/video/upd7220.h4
-rw-r--r--src/emu/video/v9938.h2
-rw-r--r--src/emu/video/vic4567.h2
456 files changed, 7612 insertions, 7725 deletions
diff --git a/src/emu/bus/a2bus/a2cffa.c b/src/emu/bus/a2bus/a2cffa.c
index 4d892fc7d61..e3d5dfa3c09 100644
--- a/src/emu/bus/a2bus/a2cffa.c
+++ b/src/emu/bus/a2bus/a2cffa.c
@@ -153,7 +153,7 @@ UINT8 a2bus_cffa2000_device::read_c0nx(address_space &space, UINT8 offset)
// Apple /// driver uses sta $c080,x when writing, which causes spurious reads of c088
if (!m_inwritecycle)
{
- m_lastreaddata = m_ata->read_cs0(space, offset - 8, 0xffff);
+ m_lastreaddata = m_ata->read_cs0(space, offset - 8, 0xffff);
}
return m_lastreaddata & 0xff;
@@ -184,7 +184,7 @@ void a2bus_cffa2000_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 0:
m_lastdata &= 0x00ff;
m_lastdata |= data<<8;
-// printf("%02x to 0, m_lastdata = %x\n", data, m_lastdata);
+// printf("%02x to 0, m_lastdata = %x\n", data, m_lastdata);
m_inwritecycle = true;
break;
@@ -199,7 +199,7 @@ void a2bus_cffa2000_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 8:
m_lastdata &= 0xff00;
m_lastdata |= data;
-// printf("%02x to 8, m_lastdata = %x\n", data, m_lastdata);
+// printf("%02x to 8, m_lastdata = %x\n", data, m_lastdata);
m_ata->write_cs0(space, offset-8, m_lastdata, 0xffff);
break;
diff --git a/src/emu/bus/a2bus/a2corvus.c b/src/emu/bus/a2bus/a2corvus.c
index dc5ca2fc5c9..783e6fe7054 100644
--- a/src/emu/bus/a2bus/a2corvus.c
+++ b/src/emu/bus/a2bus/a2corvus.c
@@ -4,27 +4,27 @@
Implementation of the Corvus flat-cable hard disk interface
for the Apple II.
-
+
This same card was used in the Corvus Concept.
-
+
C0n0 = drive read/write
C0n1 = read status (busy in bit 7, data direction in bit 6)
-
- Reads and writes to C0n2+ happen; the contents of the reads are thrown away
+
+ Reads and writes to C0n2+ happen; the contents of the reads are thrown away
immediately by all the code I've examined, and sending the writes to the
drive's write port makes it not work so they're intended to be ignored too.
-
+
5 MB: -chs 144,4,20 -ss 512
10 MB: -chs 358,3,20 -ss 512
20 MB: -chs 388,5,20 -ss 512
-
+
To set up a disk from scratch on the Apple II:
1) Create a disk of your desired capacity using CHDMAN -c none and the parameters
listed above for each of the possible sizes.
2) Boot apple2p with the corvus in slot 2 and a diskii(ng) in slot 6 with the
"Corvus Hard Drive - Diagnostics.dsk" mounted.
3) Press F to format. Accept all the default options from now on;
- there is no "format switch" to worry about with the current emulation.
+ there is no "format switch" to worry about with the current emulation.
4) Quit MESS. Restart with the corvus in slot 6 and a diskii(ng) in slot 7
with the "Corvus Hard Drive - Utilities 1.dsk" mounted.
5) When you get the BASIC prompt, "LOAD BSYSGEN"
@@ -35,7 +35,7 @@
10) When the format completes, type "RUN APPLESOFT BOOT PREP" and press Enter.
11) Once it finishes, quit MESS. Remove the diskii(ng) from slot 7 and
the system should boot from the Corvus HD.
-
+
*********************************************************************/
#include "a2corvus.h"
@@ -53,7 +53,7 @@
const device_type A2BUS_CORVUS = &device_creator<a2bus_corvus_device>;
#define CORVUS_ROM_REGION "corvus_rom"
-#define CORVUS_HD_TAG "corvushd"
+#define CORVUS_HD_TAG "corvushd"
static MACHINE_CONFIG_FRAGMENT(corvus)
MCFG_DEVICE_ADD(CORVUS_HD_TAG, CORVUS_HDC, 0)
@@ -158,7 +158,7 @@ void a2bus_corvus_device::write_c0nx(address_space &space, UINT8 offset, UINT8 d
{
if (offset == 0)
{
- m_corvushd->write(space, 0, data);
+ m_corvushd->write(space, 0, data);
}
}
@@ -180,4 +180,3 @@ UINT8 a2bus_corvus_device::read_c800(address_space &space, UINT16 offset)
{
return m_rom[offset & 0x7ff];
}
-
diff --git a/src/emu/bus/a2bus/a2pic.c b/src/emu/bus/a2bus/a2pic.c
index bdf80257493..73d87d0b84b 100644
--- a/src/emu/bus/a2bus/a2pic.c
+++ b/src/emu/bus/a2bus/a2pic.c
@@ -32,7 +32,7 @@ MACHINE_CONFIG_END
ROM_START( pic )
ROM_REGION(0x000200, PIC_ROM_REGION, 0)
- ROM_LOAD( "341-0057.bin", 0x000000, 0x000200, CRC(0d2d84ee) SHA1(bfc5b863d37e59875a6159528eb0f2b6082063b5) )
+ ROM_LOAD( "341-0057.bin", 0x000000, 0x000200, CRC(0d2d84ee) SHA1(bfc5b863d37e59875a6159528eb0f2b6082063b5) )
ROM_END
static INPUT_PORTS_START( pic )
@@ -182,13 +182,13 @@ UINT8 a2bus_pic_device::read_c0nx(address_space &space, UINT8 offset)
{
switch (offset)
{
- case 3:
+ case 3:
return m_ctx_data_in->read();
case 4:
return m_ack;
- case 6: // does reading this really work?
+ case 6: // does reading this really work?
m_irqenable = true;
break;
@@ -211,16 +211,16 @@ void a2bus_pic_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data
{
switch (offset)
{
- case 0: // set data out and send a strobe
+ case 0: // set data out and send a strobe
m_ctx_data_out->write(data);
if (m_autostrobe)
{
start_strobe();
}
- break;
+ break;
- case 2: // send a strobe
+ case 2: // send a strobe
start_strobe();
break;
@@ -236,13 +236,13 @@ void a2bus_pic_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data
}
}
-WRITE_LINE_MEMBER( a2bus_pic_device::ack_w )
+WRITE_LINE_MEMBER( a2bus_pic_device::ack_w )
{
if (m_started)
{
- UINT8 dsw1 = m_dsw1->read();
+ UINT8 dsw1 = m_dsw1->read();
- if (dsw1 & 0x10) // negative polarity
+ if (dsw1 & 0x10) // negative polarity
{
m_ack = (state == ASSERT_LINE) ? 0x00 : 0x80;
}
@@ -251,7 +251,7 @@ WRITE_LINE_MEMBER( a2bus_pic_device::ack_w )
m_ack = (state == ASSERT_LINE) ? 0x80 : 0x00;
}
- m_ack |= 0x40; // set ACK flip-flop
+ m_ack |= 0x40; // set ACK flip-flop
if ((dsw1 & 0x40) && (m_irqenable))
{
@@ -262,9 +262,9 @@ WRITE_LINE_MEMBER( a2bus_pic_device::ack_w )
void a2bus_pic_device::start_strobe()
{
- int usec = ((m_dsw1->read() & 7) * 2) + 1; // strobe length in microseconds
+ int usec = ((m_dsw1->read() & 7) * 2) + 1; // strobe length in microseconds
- if (m_dsw1->read() & 0x8) // negative polarity
+ if (m_dsw1->read() & 0x8) // negative polarity
{
m_ctx->write_strobe(CLEAR_LINE);
}
@@ -278,7 +278,7 @@ void a2bus_pic_device::start_strobe()
void a2bus_pic_device::clear_strobe()
{
- if (m_dsw1->read() & 0x8) // negative polarity
+ if (m_dsw1->read() & 0x8) // negative polarity
{
m_ctx->write_strobe(ASSERT_LINE);
}
diff --git a/src/emu/bus/a2bus/a2ssc.c b/src/emu/bus/a2bus/a2ssc.c
index e170675e0c1..05ffd4e06e4 100644
--- a/src/emu/bus/a2bus/a2ssc.c
+++ b/src/emu/bus/a2bus/a2ssc.c
@@ -228,7 +228,7 @@ WRITE_LINE_MEMBER( a2bus_ssc_device::acia_irq_w )
{
if (m_started)
{
- if (!(m_dsw2->read() & 4))
+ if (!(m_dsw2->read() & 4))
{
if (state)
{
diff --git a/src/emu/bus/a2bus/a2ultraterm.c b/src/emu/bus/a2bus/a2ultraterm.c
index bf5ac0cf8f1..eef9e997e63 100644
--- a/src/emu/bus/a2bus/a2ultraterm.c
+++ b/src/emu/bus/a2bus/a2ultraterm.c
@@ -7,18 +7,18 @@
Notes:
C0nX: C0n0 is 6845 register address,
- C0n1 is 6845 register data.
- C0n2 is control 1: b7 = 0 to read RAM at cc00, 1 for ROM (writes always to RAM)
- b6 = 0 for Apple II video, 1 for 6845
- b5 = 0 for 17.430 MHz 6845 clock, 1 for 28.7595 MHz 6845 clock
- b4 = 0 for 512 byte RAM block addressing (VideoTerm emulation), 1 for 256-byte RAM page addressing
- b3-b0 = page select
- C0n3 is control 2: b7 = 0 for attributes software controllable, 1 for DIP switches control attributes
- b5 = 0 for normal video if bit 7 set, 1 for inverse if bit 7 set
- b4 = 0 for lowlight if bit 7 set, 1 for highlight if bit 7 set
- b2 = 0 for high-density character set, 1 for low-density character set
- b1 = same as b5
- b0 = same as b4
+ C0n1 is 6845 register data.
+ C0n2 is control 1: b7 = 0 to read RAM at cc00, 1 for ROM (writes always to RAM)
+ b6 = 0 for Apple II video, 1 for 6845
+ b5 = 0 for 17.430 MHz 6845 clock, 1 for 28.7595 MHz 6845 clock
+ b4 = 0 for 512 byte RAM block addressing (VideoTerm emulation), 1 for 256-byte RAM page addressing
+ b3-b0 = page select
+ C0n3 is control 2: b7 = 0 for attributes software controllable, 1 for DIP switches control attributes
+ b5 = 0 for normal video if bit 7 set, 1 for inverse if bit 7 set
+ b4 = 0 for lowlight if bit 7 set, 1 for highlight if bit 7 set
+ b2 = 0 for high-density character set, 1 for low-density character set
+ b1 = same as b5
+ b0 = same as b4
C800-CBFF: ROM page 1
CC00-CFEF: VRAM window or ROM page 2
@@ -46,20 +46,20 @@ const device_type A2BUS_ULTRATERMENH = &device_creator<a2bus_ultratermenh_device
#define ULTRATERM_MC6845_NAME "mc6845_uterm"
#define CLOCK_LOW 17430000
-#define CLOCK_HIGH 28759500
+#define CLOCK_HIGH 28759500
-#define CT1_MEMSEL (0x80) // 0 for read RAM at cc00, 1 for read ROM
-#define CT1_VIDSEL (0x40) // 0 for Apple video passthrough, 1 for 6845 video
-#define CT1_CLKSEL (0x20) // 0 for Videoterm clock, 1 for faster clock
-#define CT1_VTEMU (0x10) // Videoterm emulation mode if 0
+#define CT1_MEMSEL (0x80) // 0 for read RAM at cc00, 1 for read ROM
+#define CT1_VIDSEL (0x40) // 0 for Apple video passthrough, 1 for 6845 video
+#define CT1_CLKSEL (0x20) // 0 for Videoterm clock, 1 for faster clock
+#define CT1_VTEMU (0x10) // Videoterm emulation mode if 0
#define CT1_PAGEMASK (0x0f)
-#define CT2_USEDIPS (0x80) // 0 to use the rest of ctrl2's bits, 1 to use DIPs
+#define CT2_USEDIPS (0x80) // 0 to use the rest of ctrl2's bits, 1 to use DIPs
#define CT2_INVBIT7H (0x20)
-#define CT2_HLBIT7H (0x10)
+#define CT2_HLBIT7H (0x10)
#define CT2_HIDENSITY (0x04)
#define CT2_INVBIT7L (0x02)
-#define CT2_HLBIT7L (0x01)
+#define CT2_HLBIT7L (0x01)
static MC6845_UPDATE_ROW( ultraterm_update_row );
@@ -96,24 +96,24 @@ MACHINE_CONFIG_END
ROM_START( a2ultraterm )
ROM_REGION(0x1000, ULTRATERM_ROM_REGION, 0)
- ROM_LOAD( "frm_b537.bin", 0x000000, 0x001000, CRC(1e85a93e) SHA1(b4acd1775c08ae43996ab4edf6d8e28f4736346b) )
+ ROM_LOAD( "frm_b537.bin", 0x000000, 0x001000, CRC(1e85a93e) SHA1(b4acd1775c08ae43996ab4edf6d8e28f4736346b) )
ROM_REGION(0x1000, ULTRATERM_GFX_REGION, 0)
- ROM_LOAD( "chs_7859.bin", 0x000000, 0x001000, CRC(ebe8f333) SHA1(3517fa9e7a39573f1cb159b3161d6939dec199ba) )
+ ROM_LOAD( "chs_7859.bin", 0x000000, 0x001000, CRC(ebe8f333) SHA1(3517fa9e7a39573f1cb159b3161d6939dec199ba) )
ROM_REGION(0x400, "pal", 0)
- ROM_LOAD( "ult_2a313.jed", 0x000000, 0x000305, CRC(dcd51dea) SHA1(0ad0c5e802e48495da27f7bd26ee3ab1c92d74dd) )
+ ROM_LOAD( "ult_2a313.jed", 0x000000, 0x000305, CRC(dcd51dea) SHA1(0ad0c5e802e48495da27f7bd26ee3ab1c92d74dd) )
ROM_END
ROM_START( a2ultratermenh )
ROM_REGION(0x1000, ULTRATERM_ROM_REGION, 0)
- ROM_LOAD( "frm_b5c9.bin", 0x000000, 0x001000, CRC(b71e05e0) SHA1(092e3eda4644d4f465809864a7f023ac7d1d1542) )
+ ROM_LOAD( "frm_b5c9.bin", 0x000000, 0x001000, CRC(b71e05e0) SHA1(092e3eda4644d4f465809864a7f023ac7d1d1542) )
ROM_REGION(0x1000, ULTRATERM_GFX_REGION, 0)
- ROM_LOAD( "chs_5604.bin", 0x000000, 0x001000, CRC(3fb4e90a) SHA1(94ff75199232a9b613585c22f88470f73fb7dd09) )
+ ROM_LOAD( "chs_5604.bin", 0x000000, 0x001000, CRC(3fb4e90a) SHA1(94ff75199232a9b613585c22f88470f73fb7dd09) )
ROM_REGION(0x400, "pal", 0)
- ROM_LOAD( "ult_251c.jed", 0x000000, 0x000305, CRC(12fabb0d) SHA1(d4a36837cb98bb65f7ddef7455eb5a7f8e648a82) )
+ ROM_LOAD( "ult_251c.jed", 0x000000, 0x000305, CRC(12fabb0d) SHA1(d4a36837cb98bb65f7ddef7455eb5a7f8e648a82) )
ROM_END
/***************************************************************************
@@ -245,24 +245,24 @@ void a2bus_videx160_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 2:
m_ctrl1 = data;
-// printf("%02x to ctrl1\n", data);
+// printf("%02x to ctrl1\n", data);
// if disabling Videoterm emulation, change RAM banking
if (data & CT1_VTEMU)
{
m_rambank = (data & CT1_PAGEMASK) * 256;
}
- break;
+ break;
case 3:
m_ctrl2 = data;
-// printf("%02x to ctrl2\n", data);
+// printf("%02x to ctrl2\n", data);
break;
}
if (!(m_ctrl1 & CT1_VTEMU))
{
- m_rambank = ((offset >> 2) & 3) * 512;
+ m_rambank = ((offset >> 2) & 3) * 512;
}
}
@@ -298,12 +298,12 @@ UINT8 a2bus_videx160_device::read_c800(address_space &space, UINT16 offset)
}
else
{
- if (m_ctrl1 & CT1_MEMSEL) // read ROM?
+ if (m_ctrl1 & CT1_MEMSEL) // read ROM?
{
return m_rom[offset + 0x800];
}
- return m_ram[(offset - 0x400) + m_rambank];
+ return m_ram[(offset - 0x400) + m_rambank];
}
}
diff --git a/src/emu/bus/a2bus/a2videoterm.c b/src/emu/bus/a2bus/a2videoterm.c
index 5c98d1645e1..d347f42d490 100644
--- a/src/emu/bus/a2bus/a2videoterm.c
+++ b/src/emu/bus/a2bus/a2videoterm.c
@@ -125,10 +125,10 @@ ROM_END
ROM_START( a2aevm80 )
ROM_REGION(0x800, VIDEOTERM_ROM_REGION, 0)
- ROM_LOAD( "ae viewmaster 80 rom.bin", 0x000000, 0x000800, CRC(62a4b111) SHA1(159bf7c4add1435be215fddb648c0743fbcc49b5) )
+ ROM_LOAD( "ae viewmaster 80 rom.bin", 0x000000, 0x000800, CRC(62a4b111) SHA1(159bf7c4add1435be215fddb648c0743fbcc49b5) )
ROM_REGION(0x1000, VIDEOTERM_GFX_REGION, 0)
- ROM_LOAD( "ae viewmaster 80 video rom.bin", 0x000000, 0x000800, CRC(4801ab90) SHA1(f90658ffee7740f3cb30ecef2e151f7dc6098833) )
+ ROM_LOAD( "ae viewmaster 80 video rom.bin", 0x000000, 0x000800, CRC(4801ab90) SHA1(f90658ffee7740f3cb30ecef2e151f7dc6098833) )
ROM_END
/***************************************************************************
diff --git a/src/emu/bus/a2bus/a2videoterm.h b/src/emu/bus/a2bus/a2videoterm.h
index 5213f41945c..5043a6cafd8 100644
--- a/src/emu/bus/a2bus/a2videoterm.h
+++ b/src/emu/bus/a2bus/a2videoterm.h
@@ -50,7 +50,7 @@ protected:
private:
int m_rambank;
-public:
+public:
required_device<palette_device> m_palette;
};
diff --git a/src/emu/bus/a2bus/a2vulcan.c b/src/emu/bus/a2bus/a2vulcan.c
index abd7fe21c32..ea13109e70c 100644
--- a/src/emu/bus/a2bus/a2vulcan.c
+++ b/src/emu/bus/a2bus/a2vulcan.c
@@ -77,7 +77,7 @@ ROM_END
ROM_START( vulcangold )
ROM_REGION(0x4000, VULCAN_ROM_REGION, 0)
- ROM_LOAD( "ae vulcan gold rom v2.0.bin", 0x000000, 0x004000, CRC(19bc3958) SHA1(96a22c2540fa603648a4e638e176eee76523b4e1) )
+ ROM_LOAD( "ae vulcan gold rom v2.0.bin", 0x000000, 0x004000, CRC(19bc3958) SHA1(96a22c2540fa603648a4e638e176eee76523b4e1) )
ROM_END
/***************************************************************************
diff --git a/src/emu/bus/adam/exp.h b/src/emu/bus/adam/exp.h
index c298a64a719..412aafe4ba2 100644
--- a/src/emu/bus/adam/exp.h
+++ b/src/emu/bus/adam/exp.h
@@ -51,8 +51,8 @@
class device_adam_expansion_slot_card_interface;
class adam_expansion_slot_device : public device_t,
- public device_slot_interface,
- public device_image_interface
+ public device_slot_interface,
+ public device_image_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/adamnet/fdc.h b/src/emu/bus/adamnet/fdc.h
index 89b7777af31..82883d1bdc5 100644
--- a/src/emu/bus/adamnet/fdc.h
+++ b/src/emu/bus/adamnet/fdc.h
@@ -29,7 +29,7 @@
// ======================> adam_fdc_device
class adam_fdc_device : public device_t,
- public device_adamnet_card_interface
+ public device_adamnet_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/adamnet/spi.c b/src/emu/bus/adamnet/spi.c
index 45041576def..b7248b4a0c9 100644
--- a/src/emu/bus/adamnet/spi.c
+++ b/src/emu/bus/adamnet/spi.c
@@ -18,9 +18,9 @@
//**************************************************************************
#define M6801_TAG "m6801"
-#define MC2661_TAG "mc2661"
-#define RS232_TAG "rs232"
-#define CENTRONICS_TAG "centronics"
+#define MC2661_TAG "mc2661"
+#define RS232_TAG "rs232"
+#define CENTRONICS_TAG "centronics"
diff --git a/src/emu/bus/adamnet/spi.h b/src/emu/bus/adamnet/spi.h
index 819d58ddd2b..dde7a772918 100644
--- a/src/emu/bus/adamnet/spi.h
+++ b/src/emu/bus/adamnet/spi.h
@@ -30,7 +30,7 @@
// ======================> adam_spi_device
class adam_spi_device : public device_t,
- public device_adamnet_card_interface
+ public device_adamnet_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/bml3/bml3mp1805.h b/src/emu/bus/bml3/bml3mp1805.h
index 4f3ab58e9dd..be2a072ae7d 100644
--- a/src/emu/bus/bml3/bml3mp1805.h
+++ b/src/emu/bus/bml3/bml3mp1805.h
@@ -33,7 +33,7 @@ public:
DECLARE_READ8_MEMBER(bml3_mp1805_r);
DECLARE_WRITE8_MEMBER(bml3_mp1805_w);
-
+
DECLARE_WRITE_LINE_MEMBER( bml3_mc6843_intrq_w );
protected:
diff --git a/src/emu/bus/c64/magic_formel.c b/src/emu/bus/c64/magic_formel.c
index d811f472767..d645baf34d5 100644
--- a/src/emu/bus/c64/magic_formel.c
+++ b/src/emu/bus/c64/magic_formel.c
@@ -11,9 +11,9 @@
/*
- TODO:
+ TODO:
- - pia6821 port A DDR needs to reset to 0xff or this won't boot
+ - pia6821 port A DDR needs to reset to 0xff or this won't boot
*/
@@ -69,7 +69,7 @@ WRITE8_MEMBER( c64_magic_formel_cartridge_device::pia_pb_w )
PB2 RAM A9
PB3 RAM A8
PB4 RAM A12
- PB5 U9A clr
+ PB5 U9A clr
PB6
PB7 ROMH enable
diff --git a/src/emu/bus/cbm2/hrg.c b/src/emu/bus/cbm2/hrg.c
index 48968c70e9b..893b237bc5f 100644
--- a/src/emu/bus/cbm2/hrg.c
+++ b/src/emu/bus/cbm2/hrg.c
@@ -13,7 +13,7 @@
TODO:
- http://www.wfking.de/hires.htm
+ http://www.wfking.de/hires.htm
- version A (EF9365, 512x512 interlaced, 1 page)
- version B (EF9366, 512x256 non-interlaced, 2 pages)
diff --git a/src/emu/bus/cbm2/hrg.h b/src/emu/bus/cbm2/hrg.h
index 16c54a97118..78097da80e2 100644
--- a/src/emu/bus/cbm2/hrg.h
+++ b/src/emu/bus/cbm2/hrg.h
@@ -26,7 +26,7 @@
// ======================> cbm2_graphic_cartridge_device
class cbm2_graphic_cartridge_device : public device_t,
- public device_cbm2_expansion_card_interface
+ public device_cbm2_expansion_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/cbm2/user.h b/src/emu/bus/cbm2/user.h
index 7f2352047b0..842426c93da 100644
--- a/src/emu/bus/cbm2/user.h
+++ b/src/emu/bus/cbm2/user.h
@@ -104,7 +104,7 @@ protected:
// ======================> cbm2_user_port_device
class cbm2_user_port_device : public device_t,
- public device_slot_interface
+ public device_slot_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/cbmiec/c1541.c b/src/emu/bus/cbmiec/c1541.c
index ca9fb28de68..f0f8277861f 100644
--- a/src/emu/bus/cbmiec/c1541.c
+++ b/src/emu/bus/cbmiec/c1541.c
@@ -706,7 +706,7 @@ WRITE_LINE_MEMBER( base_c1541_device::byte_w )
//-------------------------------------------------
static SLOT_INTERFACE_START( c1540_floppies )
- SLOT_INTERFACE( "525ssqd", ALPS_3255190x )
+ SLOT_INTERFACE( "525ssqd", ALPS_3255190x )
SLOT_INTERFACE_END
@@ -715,8 +715,8 @@ SLOT_INTERFACE_END
//-------------------------------------------------
FLOPPY_FORMATS_MEMBER( base_c1541_device::floppy_formats )
- FLOPPY_D64_FORMAT,
- FLOPPY_G64_FORMAT
+ FLOPPY_D64_FORMAT,
+ FLOPPY_G64_FORMAT
FLOPPY_FORMATS_END
@@ -889,7 +889,7 @@ static MACHINE_CONFIG_FRAGMENT( c1541pdc )
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "image")
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(MC6821_TAG, pia6821_device, ca1_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
MACHINE_CONFIG_END
diff --git a/src/emu/bus/cbmiec/c1541.h b/src/emu/bus/cbmiec/c1541.h
index 9fac9a61968..86f05529ac2 100644
--- a/src/emu/bus/cbmiec/c1541.h
+++ b/src/emu/bus/cbmiec/c1541.h
@@ -40,8 +40,8 @@
// ======================> base_c1541_device
class base_c1541_device : public device_t,
- public device_cbm_iec_interface,
- public device_c64_floppy_parallel_interface
+ public device_cbm_iec_interface,
+ public device_c64_floppy_parallel_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/cbmiec/c1571.c b/src/emu/bus/cbmiec/c1571.c
index 3733582e77d..7a62db76330 100644
--- a/src/emu/bus/cbmiec/c1571.c
+++ b/src/emu/bus/cbmiec/c1571.c
@@ -13,7 +13,7 @@
TODO:
- - WD1770 set_floppy
+ - WD1770 set_floppy
- 1571CR
- MOS5710
- ICT Mini Chief MC-20
@@ -698,7 +698,7 @@ static MACHINE_CONFIG_FRAGMENT( c1571 )
MCFG_MOS6526_PB_INPUT_CALLBACK(READ8(c1571_device, cia_pb_r))
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c1571_device, cia_pb_w))
MCFG_MOS6526_PC_CALLBACK(WRITELINE(c1571_device, cia_pc_w))
-
+
MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2)
MCFG_DEVICE_ADD(C64H156_TAG, C64H156, XTAL_16MHz)
MCFG_64H156_BYTE_CALLBACK(WRITELINE(c1571_device, byte_w))
diff --git a/src/emu/bus/cbmiec/c1571.h b/src/emu/bus/cbmiec/c1571.h
index 519ed496fe2..4bcd01d5c2b 100644
--- a/src/emu/bus/cbmiec/c1571.h
+++ b/src/emu/bus/cbmiec/c1571.h
@@ -42,8 +42,8 @@
// ======================> c1571_device
class c1571_device : public device_t,
- public device_cbm_iec_interface,
- public device_c64_floppy_parallel_interface
+ public device_cbm_iec_interface,
+ public device_c64_floppy_parallel_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/coco/coco_fdc.c b/src/emu/bus/coco/coco_fdc.c
index 29b60b23a7c..305622c5873 100644
--- a/src/emu/bus/coco/coco_fdc.c
+++ b/src/emu/bus/coco/coco_fdc.c
@@ -80,7 +80,7 @@
#define LOG_FDC 0
#define WD_TAG "wd17xx"
-#define WD2797_TAG "wd2797"
+#define WD2797_TAG "wd2797"
#define DISTO_TAG "disto"
#define CLOUD9_TAG "cloud9"
@@ -437,7 +437,7 @@ const device_type DRAGON_FDC = &device_creator<dragon_fdc_device>;
// dragon_fdc_device - constructor
//-------------------------------------------------
dragon_fdc_device::dragon_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : coco_fdc_device(mconfig, type, name, tag, owner, clock, shortname, source)
+ : coco_fdc_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
dragon_fdc_device::dragon_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/emu/bus/coco/coco_fdc.h b/src/emu/bus/coco/coco_fdc.h
index fabfe12511a..ddbfcae868d 100644
--- a/src/emu/bus/coco/coco_fdc.h
+++ b/src/emu/bus/coco/coco_fdc.h
@@ -46,7 +46,7 @@ public:
void set_intrq(UINT8 val) { m_intrq = val; }
void set_drq(UINT8 val) { m_drq = val; }
-
+
DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
protected:
@@ -65,12 +65,12 @@ protected:
UINT8 m_intrq : 1;
optional_device<wd1773_device> m_wd17xx; /* WD17xx */
- optional_device<wd2797_device> m_wd2797; /* WD2797 */
+ optional_device<wd2797_device> m_wd2797; /* WD2797 */
optional_device<ds1315_device> m_ds1315; /* DS1315 */
/* Disto RTC */
optional_device<msm6242_device> m_disto_msm6242; /* 6242 RTC on Disto interface */
-
+
offs_t m_msm6242_rtc_address;
};
diff --git a/src/emu/bus/coleco/exp.h b/src/emu/bus/coleco/exp.h
index d86be925df3..25dcd547cf7 100644
--- a/src/emu/bus/coleco/exp.h
+++ b/src/emu/bus/coleco/exp.h
@@ -64,8 +64,8 @@
class device_colecovision_cartridge_interface;
class colecovision_cartridge_slot_device : public device_t,
- public device_slot_interface,
- public device_image_interface
+ public device_slot_interface,
+ public device_image_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/coleco/hand.h b/src/emu/bus/coleco/hand.h
index 2a8f0690349..aeab7d65683 100644
--- a/src/emu/bus/coleco/hand.h
+++ b/src/emu/bus/coleco/hand.h
@@ -26,7 +26,7 @@
// ======================> coleco_hand_controller_t
class coleco_hand_controller_t : public device_t,
- public device_colecovision_control_port_interface
+ public device_colecovision_control_port_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/coleco/sac.h b/src/emu/bus/coleco/sac.h
index f0d7fe39020..18c6ec2eb3c 100644
--- a/src/emu/bus/coleco/sac.h
+++ b/src/emu/bus/coleco/sac.h
@@ -26,7 +26,7 @@
// ======================> coleco_super_action_controller_t
class coleco_super_action_controller_t : public device_t,
- public device_colecovision_control_port_interface
+ public device_colecovision_control_port_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/coleco/std.h b/src/emu/bus/coleco/std.h
index c05e9526e6b..46b8c8b3521 100644
--- a/src/emu/bus/coleco/std.h
+++ b/src/emu/bus/coleco/std.h
@@ -25,7 +25,7 @@
// ======================> colecovision_standard_cartridge_device
class colecovision_standard_cartridge_device : public device_t,
- public device_colecovision_cartridge_interface
+ public device_colecovision_cartridge_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/compucolor/floppy.c b/src/emu/bus/compucolor/floppy.c
index 62d8d2437b8..a2c840af357 100644
--- a/src/emu/bus/compucolor/floppy.c
+++ b/src/emu/bus/compucolor/floppy.c
@@ -111,7 +111,7 @@ compucolor_floppy_device::compucolor_floppy_device(const machine_config &mconfig
//-------------------------------------------------
-// device_config_complete -
+// device_config_complete -
//-------------------------------------------------
void compucolor_floppy_port_device::device_config_complete()
diff --git a/src/emu/bus/comx35/exp.h b/src/emu/bus/comx35/exp.h
index 669d01963a2..22c9f49b028 100644
--- a/src/emu/bus/comx35/exp.h
+++ b/src/emu/bus/comx35/exp.h
@@ -74,7 +74,7 @@
class device_comx_expansion_card_interface;
class comx_expansion_slot_device : public device_t,
- public device_slot_interface
+ public device_slot_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/comx35/printer.c b/src/emu/bus/comx35/printer.c
index 0c748e2012b..568a534324b 100644
--- a/src/emu/bus/comx35/printer.c
+++ b/src/emu/bus/comx35/printer.c
@@ -73,7 +73,7 @@ static MACHINE_CONFIG_FRAGMENT( comx_prn )
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit1))
MCFG_CENTRONICS_PERROR_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit2))
MCFG_CENTRONICS_SELECT_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit3))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
MACHINE_CONFIG_END
diff --git a/src/emu/bus/ecbbus/ecbbus.h b/src/emu/bus/ecbbus/ecbbus.h
index 8989a2107ac..34d07bcd08f 100644
--- a/src/emu/bus/ecbbus/ecbbus.h
+++ b/src/emu/bus/ecbbus/ecbbus.h
@@ -69,8 +69,7 @@
//**************************************************************************
#define MCFG_ECBBUS_ADD() \
- MCFG_DEVICE_ADD(ECBBUS_TAG, ECBBUS, 0) \
-
+ MCFG_DEVICE_ADD(ECBBUS_TAG, ECBBUS, 0)
#define MCFG_ECBBUS_SLOT_ADD(_num, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, ECBBUS_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
@@ -94,7 +93,7 @@
class ecbbus_device;
class ecbbus_slot_device : public device_t,
- public device_slot_interface
+ public device_slot_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/ecbbus/grip.c b/src/emu/bus/ecbbus/grip.c
index 87799fa7ee8..3d9e77899ad 100644
--- a/src/emu/bus/ecbbus/grip.c
+++ b/src/emu/bus/ecbbus/grip.c
@@ -305,13 +305,13 @@ static MC6845_INTERFACE( crtc_intf )
static MC6845_INTERFACE( grip5_crtc_intf )
{
false,
- 0,0,0,0,
+ 0,0,0,0,
8,
NULL,
grip5_update_row,
NULL,
- DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i1_w),
- DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i2_w),
+ DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i1_w),
+ DEVCB_DEVICE_LINE_MEMBER(Z80STI_TAG, z80sti_device, i2_w),
DEVCB_NULL,
DEVCB_NULL,
grip5_update_addr_changed
diff --git a/src/emu/bus/econet/e01.c b/src/emu/bus/econet/e01.c
index 53a9a655f19..f5fed35d73b 100644
--- a/src/emu/bus/econet/e01.c
+++ b/src/emu/bus/econet/e01.c
@@ -197,7 +197,7 @@ WRITE_LINE_MEMBER( e01_device::fdc_irq_w )
update_interrupts();
}
-WRITE_LINE_MEMBER( e01_device::fdc_drq_w )
+WRITE_LINE_MEMBER( e01_device::fdc_drq_w )
{
m_fdc_drq = state;
diff --git a/src/emu/bus/econet/econet.c b/src/emu/bus/econet/econet.c
index aaf37e513df..03016e6afc0 100644
--- a/src/emu/bus/econet/econet.c
+++ b/src/emu/bus/econet/econet.c
@@ -196,7 +196,7 @@ inline int econet_device::get_signal(int signal)
// econet_device - constructor
//-------------------------------------------------
-econet_device::econet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+econet_device::econet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ECONET, "Econet", tag, owner, clock, "econet", __FILE__),
m_write_clk(*this),
m_write_data(*this)
diff --git a/src/emu/bus/econet/econet.h b/src/emu/bus/econet/econet.h
index 1ec6f3dad72..542fd910108 100644
--- a/src/emu/bus/econet/econet.h
+++ b/src/emu/bus/econet/econet.h
@@ -31,8 +31,7 @@
//**************************************************************************
#define MCFG_ECONET_ADD() \
- MCFG_DEVICE_ADD(ECONET_TAG, ECONET, 0) \
-
+ MCFG_DEVICE_ADD(ECONET_TAG, ECONET, 0)
#define MCFG_ECONET_SLOT_ADD(_tag, _num, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, ECONET_SLOT, 0) \
diff --git a/src/emu/bus/ep64/exp.h b/src/emu/bus/ep64/exp.h
index ae077f830d9..2afee455d39 100644
--- a/src/emu/bus/ep64/exp.h
+++ b/src/emu/bus/ep64/exp.h
@@ -69,8 +69,7 @@
#define MCFG_EP64_EXPANSION_BUS_SLOT_ADD(_tag, _def_slot) \
MCFG_DEVICE_ADD(_tag, EP64_EXPANSION_BUS_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(ep64_expansion_bus_cards, _def_slot, false) \
-
+ MCFG_DEVICE_SLOT_INTERFACE(ep64_expansion_bus_cards, _def_slot, false)
#define MCFG_EP64_EXPANSION_BUS_SLOT_DAVE(_tag) \
ep64_expansion_bus_slot_device::static_set_dave_tag(*device, "^"_tag);
@@ -95,7 +94,7 @@
class device_ep64_expansion_bus_card_interface;
class ep64_expansion_bus_slot_device : public device_t,
- public device_slot_interface
+ public device_slot_interface
{
friend class device_ep64_expansion_bus_card_interface;
diff --git a/src/emu/bus/gameboy/gb_slot.c b/src/emu/bus/gameboy/gb_slot.c
index dff39ce978f..b0b95912269 100644
--- a/src/emu/bus/gameboy/gb_slot.c
+++ b/src/emu/bus/gameboy/gb_slot.c
@@ -36,8 +36,8 @@ const device_type MEGADUCK_CART_SLOT = &device_creator<megaduck_cart_slot_device
device_gb_cart_interface::device_gb_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
- has_rumble(false),
- has_timer(false),
+ has_rumble(false),
+ has_timer(false),
has_battery(false)
{
}
diff --git a/src/emu/bus/ieee488/c2031.c b/src/emu/bus/ieee488/c2031.c
index 63565668586..2f88f16556a 100644
--- a/src/emu/bus/ieee488/c2031.c
+++ b/src/emu/bus/ieee488/c2031.c
@@ -286,7 +286,7 @@ WRITE_LINE_MEMBER( c2031_device::byte_w )
//-------------------------------------------------
static SLOT_INTERFACE_START( c2031_floppies )
- SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
+ SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
diff --git a/src/emu/bus/ieee488/c2031.h b/src/emu/bus/ieee488/c2031.h
index 7d20b0fb4df..15b964139d7 100644
--- a/src/emu/bus/ieee488/c2031.h
+++ b/src/emu/bus/ieee488/c2031.h
@@ -29,7 +29,7 @@
// ======================> c2031_device
class c2031_device : public device_t,
- public device_ieee488_interface
+ public device_ieee488_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/ieee488/c2040.c b/src/emu/bus/ieee488/c2040.c
index 200ef30d4c2..b49b0a8a9ac 100644
--- a/src/emu/bus/ieee488/c2040.c
+++ b/src/emu/bus/ieee488/c2040.c
@@ -36,7 +36,7 @@
#define M6504_TAG "uh3"
#define M6522_TAG "um3"
#define M6530_TAG "uk3"
-#define FDC_TAG "fdc"
+#define FDC_TAG "fdc"
@@ -385,14 +385,14 @@ READ8_MEMBER( c2040_device::miot_pb_r )
bit description
- PB0
- PB1
- PB2
+ PB0
+ PB1
+ PB2
PB3 WPS
PB4
PB5
PB6 SYNC
- PB7
+ PB7
*/
@@ -416,10 +416,10 @@ WRITE8_MEMBER( c2040_device::miot_pb_w )
PB0 DRV SEL
PB1 DS0
PB2 DS1
- PB3
+ PB3
PB4
PB5
- PB6
+ PB6
PB7 M6504 IRQ
*/
@@ -452,7 +452,7 @@ static MOS6530_INTERFACE( miot_intf )
//-------------------------------------------------
static SLOT_INTERFACE_START( c2040_floppies )
- SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
+ SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
@@ -461,9 +461,9 @@ SLOT_INTERFACE_END
//-------------------------------------------------
FLOPPY_FORMATS_MEMBER( c2040_device::floppy_formats )
- FLOPPY_D64_FORMAT,
- FLOPPY_G64_FORMAT,
- FLOPPY_D67_FORMAT
+ FLOPPY_D64_FORMAT,
+ FLOPPY_G64_FORMAT,
+ FLOPPY_D67_FORMAT
FLOPPY_FORMATS_END
diff --git a/src/emu/bus/ieee488/c2040.h b/src/emu/bus/ieee488/c2040.h
index 3daa826cb42..706183cad99 100644
--- a/src/emu/bus/ieee488/c2040.h
+++ b/src/emu/bus/ieee488/c2040.h
@@ -38,7 +38,7 @@
// ======================> c2040_device
class c2040_device : public device_t,
- public device_ieee488_interface
+ public device_ieee488_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/ieee488/c2040fdc.c b/src/emu/bus/ieee488/c2040fdc.c
index 990c37bc0aa..dfda8328f4a 100644
--- a/src/emu/bus/ieee488/c2040fdc.c
+++ b/src/emu/bus/ieee488/c2040fdc.c
@@ -11,10 +11,10 @@
/*
- TODO:
+ TODO:
- - writing starts in the middle of a byte
- - 8050 PLL
+ - writing starts in the middle of a byte
+ - 8050 PLL
*/
@@ -67,7 +67,7 @@ const rom_entry *c2040_fdc_t::device_rom_region() const
// c2040_fdc_t - constructor
//-------------------------------------------------
-c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
+c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
m_write_sync(*this),
m_write_ready(*this),
@@ -92,7 +92,7 @@ c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, device_type type, const
cur_live.write_start_time = attotime::never;
}
-c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, C2040_FDC, "C2040 FDC", tag, owner, clock, "c2040fdc", __FILE__),
m_write_sync(*this),
m_write_ready(*this),
@@ -117,7 +117,7 @@ c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_
cur_live.write_start_time = attotime::never;
}
-c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
c2040_fdc_t(mconfig, C2040_FDC, "C2040 FDC", tag, owner, clock, "c2040fdc", __FILE__) { }
@@ -242,7 +242,7 @@ void c2040_fdc_t::commit(attotime tm)
{
if(cur_live.write_start_time.is_never() || tm == cur_live.write_start_time || !cur_live.write_position)
return;
-
+
if (LOG) logerror("%s committing %u transitions since %s\n", tm.as_string(), cur_live.write_position, cur_live.write_start_time.as_string());
if(get_floppy())
@@ -336,14 +336,14 @@ void c2040_fdc_t::live_run(attotime limit)
cur_live.cell_counter++;
cur_live.cell_counter &= 0xf;
}
-
+
if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) {
// read bit
cur_live.shift_reg <<= 1;
cur_live.shift_reg |= !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2));
cur_live.shift_reg &= 0x3ff;
-
- if (LOG) logerror("%s read bit %u (%u) >> %03x, rw=%u mode=%u\n", cur_live.tm.as_string(), cur_live.bit_counter,
+
+ if (LOG) logerror("%s read bit %u (%u) >> %03x, rw=%u mode=%u\n", cur_live.tm.as_string(), cur_live.bit_counter,
!(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)), cur_live.shift_reg, cur_live.rw_sel, cur_live.mode_sel);
// write bit
@@ -375,7 +375,7 @@ void c2040_fdc_t::live_run(attotime limit)
cur_live.e = m_gcr_rom->base()[cur_live.i];
int ready = !(BIT(cell_counter, 1) && !BIT(cur_live.cell_counter, 1) && (cur_live.bit_counter == 9));
-
+
if (!ready) {
// load write shift register
// E7 E6 I7 E5 E4 E3 E2 I2 E1 E0
@@ -383,13 +383,13 @@ void c2040_fdc_t::live_run(attotime limit)
offs_t i = cur_live.i;
cur_live.shift_reg_write = BIT(e,7)<<9 | BIT(e,6)<<8 | BIT(i,7)<<7 | BIT(e,5)<<6 | BIT(e,4)<<5 | BIT(e,3)<<4 | BIT(e,2)<<3 | BIT(i,2)<<2 | (e & 0x03);
-
+
if (LOG) logerror("%s load write shift register %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write);
} else if (BIT(cell_counter, 1) && !BIT(cur_live.cell_counter, 1)) {
// clock write shift register
cur_live.shift_reg_write <<= 1;
cur_live.shift_reg_write &= 0x3ff;
-
+
if (LOG) logerror("%s write shift << %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write);
}
@@ -463,9 +463,9 @@ READ8_MEMBER( c2040_fdc_t::read )
offs_t i = checkpoint_live.i;
UINT8 data = (BIT(e, 6) << 7) | (BIT(i, 7) << 6) | (e & 0x33) | (BIT(e, 2) << 3) | (i & 0x04);
-
+
if (LOG) logerror("%s VIA reads data %02x (%03x)\n", machine().time().as_string(), data, checkpoint_live.shift_reg);
-
+
return data;
}
diff --git a/src/emu/bus/ieee488/c8050.c b/src/emu/bus/ieee488/c8050.c
index c7aeff38c0d..31e9c30dc8a 100644
--- a/src/emu/bus/ieee488/c8050.c
+++ b/src/emu/bus/ieee488/c8050.c
@@ -13,7 +13,7 @@
TODO:
- - Micropolis 8x50 stepper motor is same as 4040, except it takes 4 pulses to step a track instead of 1
+ - Micropolis 8x50 stepper motor is same as 4040, except it takes 4 pulses to step a track instead of 1
- BASIC program to set 8250/SFD-1001 to 8050 mode:
diff --git a/src/emu/bus/ieee488/hardbox.c b/src/emu/bus/ieee488/hardbox.c
index c729da65fc7..79dbc11565a 100644
--- a/src/emu/bus/ieee488/hardbox.c
+++ b/src/emu/bus/ieee488/hardbox.c
@@ -53,7 +53,7 @@
#define Z80_TAG "z80"
#define I8255_0_TAG "ic17"
#define I8255_1_TAG "ic16"
-#define CORVUS_HDC_TAG "corvus"
+#define CORVUS_HDC_TAG "corvus"
@@ -88,9 +88,9 @@ ROM_START( hardbox )
The version numbers listed are the ROM version reported by the HardBox diagnostics program.
Disassembling the ROMs showed that v2.3 and v2.4 are for Corvus Systems drives but v3.1 is
for Sunol Systems drives. Both types use the Corvus flat cable interface but there may be
- some programming differences, e.g. the v3.1 firmware for Sunol does not have the park heads
- routine in the Corvus versions. MESS emulates a Corvus drive so we default to the last
- known HardBox firmware for Corvus (v2.4). */
+ some programming differences, e.g. the v3.1 firmware for Sunol does not have the park heads
+ routine in the Corvus versions. MESS emulates a Corvus drive so we default to the last
+ known HardBox firmware for Corvus (v2.4). */
ROM_END
diff --git a/src/emu/bus/ieee488/softbox.c b/src/emu/bus/ieee488/softbox.c
index fd4f7f8558f..1fec2c0cca7 100644
--- a/src/emu/bus/ieee488/softbox.c
+++ b/src/emu/bus/ieee488/softbox.c
@@ -30,7 +30,7 @@
#define I8255_1_TAG "ic16"
#define COM8116_TAG "ic14"
#define RS232_TAG "rs232"
-#define CORVUS_HDC_TAG "corvus"
+#define CORVUS_HDC_TAG "corvus"
diff --git a/src/emu/bus/imi7000/imi5000h.h b/src/emu/bus/imi7000/imi5000h.h
index 8b313cc3a03..74405dcc2a2 100644
--- a/src/emu/bus/imi7000/imi5000h.h
+++ b/src/emu/bus/imi7000/imi5000h.h
@@ -32,7 +32,7 @@
// ======================> imi5000h_device
class imi5000h_device : public device_t,
- public device_imi7000_interface
+ public device_imi7000_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/isa/3c505.c b/src/emu/bus/isa/3c505.c
index fbe229f9e80..acc71e80ac0 100644
--- a/src/emu/bus/isa/3c505.c
+++ b/src/emu/bus/isa/3c505.c
@@ -3,8 +3,8 @@
*
* Created on: August 27, 2010
* Author: Hans Ostermeyer
- * ISA conversion by R. Belmont
- *
+ * ISA conversion by R. Belmont
+ *
* Released for general non-commercial use under the MAME license
* Visit http://mamedev.org for licensing and usage restrictions.
*
@@ -566,7 +566,7 @@ void threecom3c505_device::set_interrupt(enum line_state state)
case 5: m_isa->irq5_w(state); break;
case 6: m_isa->irq6_w(state); break;
case 7: m_isa->irq7_w(state); break;
- case 9: m_isa->irq2_w(state); break; // IRQ 9 on ISA16 goes to IRQ 2
+ case 9: m_isa->irq2_w(state); break; // IRQ 9 on ISA16 goes to IRQ 2
case 10: m_isa->irq10_w(state); break;
case 11: m_isa->irq11_w(state); break;
case 12: m_isa->irq12_w(state); break;
@@ -1579,4 +1579,3 @@ READ8_MEMBER(threecom3c505_device::read)
LOG2(("reading 3C505 Register at offset %02x = %02x", offset, data));
return data;
}
-
diff --git a/src/emu/bus/isa/adlib.h b/src/emu/bus/isa/adlib.h
index cdfe854f01b..78ad2afdfaa 100644
--- a/src/emu/bus/isa/adlib.h
+++ b/src/emu/bus/isa/adlib.h
@@ -23,7 +23,7 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
-
+
DECLARE_READ8_MEMBER(ym3812_16_r);
DECLARE_WRITE8_MEMBER(ym3812_16_w);
protected:
diff --git a/src/emu/bus/isa/aga.c b/src/emu/bus/isa/aga.c
index 8f950d382d4..ec1ac365018 100644
--- a/src/emu/bus/isa/aga.c
+++ b/src/emu/bus/isa/aga.c
@@ -92,7 +92,7 @@ void isa8_aga_device::device_start()
m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this));
m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) );
m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_cga_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_cga_w), this ) );
-
+
/* Initialise the cga palette */
int i;
@@ -113,8 +113,8 @@ void isa8_aga_device::device_start()
}
}
}
-
- UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
+
+ UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
/* just a plain bit pattern for graphics data generation */
for (i = 0; i < 256; i++)
gfx[i] = i;
@@ -179,7 +179,7 @@ void isa8_aga_pc200_device::device_start()
m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this));
m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_aga_device::pc_aga_mda_r), this ), write8_delegate( FUNC(isa8_aga_device::pc_aga_mda_w), this ) );
m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_r), this ), write8_delegate( FUNC(isa8_aga_pc200_device::pc200_cga_w), this ) );
-
+
/* Initialise the cga palette */
int i;
@@ -200,8 +200,8 @@ void isa8_aga_pc200_device::device_start()
}
}
}
-
- UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
+
+ UINT8 *gfx = &memregion("gfx1")->base()[0x8000];
/* just a plain bit pattern for graphics data generation */
for (i = 0; i < 256; i++)
gfx[i] = i;
@@ -765,7 +765,6 @@ void isa8_aga_device::set_palette_luts(void)
WRITE8_MEMBER (isa8_aga_device:: pc_aga_cga_w )
{
if ( m_mode == AGA_COLOR ) {
-
switch(offset) {
case 0: case 2: case 4: case 6:
m_mc6845->address_w( space, offset, data );
@@ -867,7 +866,7 @@ WRITE8_MEMBER ( isa8_aga_device::pc_aga_videoram_w )
}
READ8_MEMBER( isa8_aga_device::pc_aga_videoram_r )
-{
+{
switch (m_mode) {
case AGA_COLOR:
if (offset>=0x8000) return m_videoram[offset-0x8000];
diff --git a/src/emu/bus/isa/aga.h b/src/emu/bus/isa/aga.h
index baeecb13f55..12568353e3a 100644
--- a/src/emu/bus/isa/aga.h
+++ b/src/emu/bus/isa/aga.h
@@ -38,7 +38,7 @@ public:
isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
isa8_aga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
// device-level overrides
- virtual void device_start();
+ virtual void device_start();
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
virtual const rom_entry *device_rom_region() const;
@@ -46,7 +46,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( hsync_changed );
DECLARE_WRITE_LINE_MEMBER( vsync_changed );
-
+
DECLARE_READ8_MEMBER( pc_aga_mda_r );
DECLARE_WRITE8_MEMBER( pc_aga_mda_w );
DECLARE_READ8_MEMBER( pc_aga_cga_r );
@@ -56,9 +56,9 @@ public:
DECLARE_WRITE8_MEMBER( pc_aga_videoram_w );
DECLARE_READ8_MEMBER( pc_aga_videoram_r );
- required_device<palette_device> m_palette;
- required_device<mc6845_device> m_mc6845;
-
+ required_device<palette_device> m_palette;
+ required_device<mc6845_device> m_mc6845;
+
required_ioport m_cga_config;
mc6845_update_row_func m_update_row;
@@ -75,11 +75,11 @@ public:
int m_framecnt;
UINT8 m_vsync;
UINT8 m_hsync;
-
+
UINT8 m_cga_palette_lut_2bpp[4];
- UINT8 *m_videoram;
+ UINT8 *m_videoram;
};
// device type definition
@@ -94,14 +94,14 @@ public:
// construction/destruction
isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// device-level overrides
- virtual void device_start();
+ virtual void device_start();
// optional information overrides
virtual const rom_entry *device_rom_region() const;
-
+
UINT8 m_port8;
UINT8 m_portd;
UINT8 m_porte;
-
+
DECLARE_READ8_MEMBER( pc200_videoram_r );
DECLARE_WRITE8_MEMBER( pc200_videoram_w );
DECLARE_WRITE8_MEMBER( pc200_cga_w );
diff --git a/src/emu/bus/isa/cga.c b/src/emu/bus/isa/cga.c
index 753e2950142..cd5557ee6b2 100644
--- a/src/emu/bus/isa/cga.c
+++ b/src/emu/bus/isa/cga.c
@@ -285,7 +285,7 @@ void isa8_cga_device::device_start()
m_vram.resize(m_vram_size);
m_update_row = NULL;
m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_device::io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) );
- m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, 0, m_vram_size & 0x4000, "bank_cga", m_vram);
+ m_isa->install_bank(0xb8000, 0xb8000 + MIN(0x8000,m_vram_size) - 1, 0, m_vram_size & 0x4000, "bank_cga", m_vram);
/* Initialise the cga palette */
int i;
@@ -1799,7 +1799,7 @@ isa8_cga_mc1502_device::isa8_cga_mc1502_device(const machine_config &mconfig, co
ROM_START( mc1502 )
ROM_REGION(0x2000,"gfx1", 0)
// taken from mc1502
- ROM_LOAD( "symgen.rom", 0x0000, 0x2000, CRC(b2747a52) SHA1(6766d275467672436e91ac2997ac6b77700eba1e))
+ ROM_LOAD( "symgen.rom", 0x0000, 0x2000, CRC(b2747a52) SHA1(6766d275467672436e91ac2997ac6b77700eba1e))
ROM_END
const rom_entry *isa8_cga_mc1502_device::device_rom_region() const
diff --git a/src/emu/bus/isa/cga.h b/src/emu/bus/isa/cga.h
index 976fedb80e1..52f54796fdd 100644
--- a/src/emu/bus/isa/cga.h
+++ b/src/emu/bus/isa/cga.h
@@ -68,7 +68,7 @@ public:
bool m_superimpose;
UINT8 m_plantronics; /* This should be moved into the appropriate subclass */
offs_t m_start_offset;
- required_device<palette_device> m_palette;
+ required_device<palette_device> m_palette;
};
// device type definition
diff --git a/src/emu/bus/isa/dectalk.c b/src/emu/bus/isa/dectalk.c
index 1533ec7c775..34e02695bb7 100644
--- a/src/emu/bus/isa/dectalk.c
+++ b/src/emu/bus/isa/dectalk.c
@@ -143,7 +143,7 @@ ROM_START( dectalk_isa )
ROM_LOAD16_BYTE("pc_boot_hxl.am27c64.d6.e26", 0x0000, 0x2000, CRC(7492f1e3) SHA1(fe6946a227f01c94f2b99220320a616445c96ee0)) // Some cards have a different label on the chip which lists the sum16: 31AC (matches contents)
ROM_LOAD16_BYTE("pc_boot_hxh.am27c64.d8.e27", 0x0001, 0x2000, CRC(1fe7fe40) SHA1(6e89c237f01aa22e0d21ff4d6fdf8137c6ace374)) // Some cards have a different label on the chip which lists the sum16: 1A25 (matches contents)
ROM_REGION( 0x2000, "dectalk_dsp", 0 )
- ROM_LOAD("spc_034c__2-1-92.tms320p15nl.d3.bin", 0x0000, 0x2000, CRC(d8b1201e) SHA1(4b873a5e882205fcac79a27562054b5c4d1a117c))
+ ROM_LOAD("spc_034c__2-1-92.tms320p15nl.d3.bin", 0x0000, 0x2000, CRC(d8b1201e) SHA1(4b873a5e882205fcac79a27562054b5c4d1a117c))
ROM_END
const rom_entry* dectalk_isa_device::device_rom_region() const
diff --git a/src/emu/bus/isa/ega.h b/src/emu/bus/isa/ega.h
index 2914e13abbd..13ded1e31b0 100644
--- a/src/emu/bus/isa/ega.h
+++ b/src/emu/bus/isa/ega.h
@@ -96,7 +96,7 @@ public:
UINT8 m_vsync;
UINT8 m_vblank;
UINT8 m_display_enable;
- required_device<palette_device> m_palette;
+ required_device<palette_device> m_palette;
};
diff --git a/src/emu/bus/isa/gblaster.h b/src/emu/bus/isa/gblaster.h
index ba11f51f680..8bcde87342e 100644
--- a/src/emu/bus/isa/gblaster.h
+++ b/src/emu/bus/isa/gblaster.h
@@ -23,7 +23,7 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
-
+
DECLARE_READ8_MEMBER(saa1099_16_r);
DECLARE_WRITE8_MEMBER(saa1099_1_16_w);
DECLARE_WRITE8_MEMBER(saa1099_2_16_w);
diff --git a/src/emu/bus/isa/isa.c b/src/emu/bus/isa/isa.c
index 3d4a2bc898f..af6834fcbdb 100644
--- a/src/emu/bus/isa/isa.c
+++ b/src/emu/bus/isa/isa.c
@@ -243,12 +243,12 @@ void isa8_device::device_start()
m_iowidth = m_iospace->data_width();
m_prgwidth = m_prgspace->data_width();
}
- else // use host CPU's program and I/O spaces directly
+ else // use host CPU's program and I/O spaces directly
{
- m_iospace = &m_maincpu->space(AS_IO);
- m_iowidth = m_maincpu->space_config(AS_IO)->m_databus_width;
+ m_iospace = &m_maincpu->space(AS_IO);
+ m_iowidth = m_maincpu->space_config(AS_IO)->m_databus_width;
m_prgspace = &m_maincpu->space(AS_PROGRAM);
- m_prgwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
+ m_prgwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
}
}
@@ -679,5 +679,3 @@ UINT16 device_isa16_card_interface::dack16_r(int line)
void device_isa16_card_interface::dack16_w(int line,UINT16 data)
{
}
-
-
diff --git a/src/emu/bus/isa/isa.h b/src/emu/bus/isa/isa.h
index 775e8c259a3..a66cce07604 100644
--- a/src/emu/bus/isa/isa.h
+++ b/src/emu/bus/isa/isa.h
@@ -156,22 +156,22 @@ public:
template<class _iochck> void set_iochck_callback(_iochck iochck) { m_write_iochck.set_callback(iochck); }
// for ISA8, put the 8-bit configs in the primary slots and the 16-bit configs in the secondary
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const
- {
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum) const
+ {
switch (spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_DATA: return &m_program16_config;
- case AS_3: return &m_io16_config;
- default: fatalerror("isa: invalid memory space!\n");
+ case AS_IO: return &m_io_config;
+ case AS_DATA: return &m_program16_config;
+ case AS_3: return &m_io16_config;
+ default: fatalerror("isa: invalid memory space!\n");
}
}
void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler);
- template<typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map, device_t &device), int bits = 8, UINT64 unitmask = U64(0xffffffffffffffff))
+ template<typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map, device_t &device), int bits = 8, UINT64 unitmask = U64(0xffffffffffffffff))
{
- m_iospace->install_device(addrstart, addrend, device, map, bits, unitmask);
+ m_iospace->install_device(addrstart, addrend, device, map, bits, unitmask);
}
void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data);
void install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region);
@@ -331,15 +331,15 @@ public:
void install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler);
// for ISA16, put the 16-bit configs in the primary slots and the 8-bit configs in the secondary
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const
- {
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum) const
+ {
switch (spacenum)
{
case AS_PROGRAM: return &m_program16_config;
- case AS_IO: return &m_io16_config;
- case AS_DATA: return &m_program_config;
- case AS_3: return &m_io_config;
- default: fatalerror("isa: invalid memory space!\n");
+ case AS_IO: return &m_io16_config;
+ case AS_DATA: return &m_program_config;
+ case AS_3: return &m_io_config;
+ default: fatalerror("isa: invalid memory space!\n");
}
}
diff --git a/src/emu/bus/isa/mda.c b/src/emu/bus/isa/mda.c
index 9fac599f912..ce08169992c 100644
--- a/src/emu/bus/isa/mda.c
+++ b/src/emu/bus/isa/mda.c
@@ -99,7 +99,7 @@ WRITE_LINE_MEMBER(isa8_mda_device::pc_cpu_line)
MACHINE_CONFIG_FRAGMENT( pcvideo_mda )
MCFG_SCREEN_ADD( MDA_SCREEN_NAME, RASTER)
MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
- MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update )
+ MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update )
MCFG_PALETTE_ADD( "palette", 4 )
diff --git a/src/emu/bus/isa/mda.h b/src/emu/bus/isa/mda.h
index 74a4a78cbb0..2fc74d49265 100644
--- a/src/emu/bus/isa/mda.h
+++ b/src/emu/bus/isa/mda.h
@@ -39,7 +39,7 @@ public:
protected:
// device-level overrides
virtual void device_start();
- virtual void device_reset();
+ virtual void device_reset();
public:
int m_framecnt;
diff --git a/src/emu/bus/isa/mufdc.c b/src/emu/bus/isa/mufdc.c
index 7976a47f869..5ef6abc219b 100644
--- a/src/emu/bus/isa/mufdc.c
+++ b/src/emu/bus/isa/mufdc.c
@@ -1,6 +1,6 @@
/***************************************************************************
- Multi Unique FDC
+ Multi Unique FDC
license: MAME, GPL-2.0+
copyright-holders: Dirk Best
diff --git a/src/emu/bus/isa/mufdc.h b/src/emu/bus/isa/mufdc.h
index 2f1253ea529..da6ff090217 100644
--- a/src/emu/bus/isa/mufdc.h
+++ b/src/emu/bus/isa/mufdc.h
@@ -1,6 +1,6 @@
/***************************************************************************
- Multi Unique FDC
+ Multi Unique FDC
license: MAME, GPL-2.0+
copyright-holders: Dirk Best
@@ -33,7 +33,7 @@
// ======================> mufdc_device
class mufdc_device : public device_t,
- public device_isa8_card_interface
+ public device_isa8_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/isa/omti8621.c b/src/emu/bus/isa/omti8621.c
index 9cb218bc251..17b7381c492 100644
--- a/src/emu/bus/isa/omti8621.c
+++ b/src/emu/bus/isa/omti8621.c
@@ -3,9 +3,9 @@
*
* Created on: August 30, 2010
* Author: Hans Ostermeyer
- *
+ *
* Converted to ISA device by R. Belmont
- *
+ *
* Released for general non-commercial use under the MAME license
* Visit http://mamedev.org for licensing and usage restrictions.
*
@@ -72,7 +72,7 @@ protected:
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
-
+
void omti_disk_config(UINT16 disk_type);
public:
UINT16 m_type;
@@ -288,7 +288,7 @@ void omti8621_device::device_start()
sector_buffer.resize(OMTI_DISK_SECTOR_SIZE*OMTI_MAX_BLOCK_COUNT);
m_timer = timer_alloc(0, NULL);
-
+
our_disks[0] = subdevice<omti_disk_image_device>(OMTI_DISK0_TAG);
our_disks[1] = subdevice<omti_disk_image_device>(OMTI_DISK1_TAG);
}
@@ -388,7 +388,7 @@ void omti8621_device::device_config_complete()
set_interrupt - update the IRQ state
-------------------------------------------------*/
-void omti8621_device::set_interrupt(enum line_state line_state)
+void omti8621_device::set_interrupt(enum line_state line_state)
{
LOG2(("set_interrupt: status_port=%x, line_state %d", status_port, line_state));
m_isa->irq14_w(line_state);
@@ -396,7 +396,7 @@ void omti8621_device::set_interrupt(enum line_state line_state)
void omti8621_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- set_interrupt(ASSERT_LINE);
+ set_interrupt(ASSERT_LINE);
}
/***************************************************************************
@@ -525,7 +525,7 @@ UINT32 omti8621_device::get_disk_address(const UINT8 * cdb) {
set_data_transfer - setup for data transfer from/to data
***************************************************************************/
-void omti8621_device::set_data_transfer(UINT8 *data, UINT16 length)
+void omti8621_device::set_data_transfer(UINT8 *data, UINT16 length)
{
// set controller for read data transfer
omti_state = OMTI_STATE_DATA;
@@ -541,7 +541,7 @@ void omti8621_device::set_data_transfer(UINT8 *data, UINT16 length)
read_sectors_from_disk - read sectors starting at diskaddr into sector_buffer
***************************************************************************/
-void omti8621_device::read_sectors_from_disk(INT32 diskaddr, UINT8 count, UINT8 lun)
+void omti8621_device::read_sectors_from_disk(INT32 diskaddr, UINT8 count, UINT8 lun)
{
UINT8 *data_buffer = sector_buffer;
device_image_interface *image = our_disks[lun]->m_image;
@@ -561,7 +561,7 @@ void omti8621_device::read_sectors_from_disk(INT32 diskaddr, UINT8 count, UINT8
write_sectors_to_disk - write sectors starting at diskaddr from sector_buffer
***************************************************************************/
-void omti8621_device::write_sectors_to_disk(INT32 diskaddr, UINT8 count, UINT8 lun)
+void omti8621_device::write_sectors_to_disk(INT32 diskaddr, UINT8 count, UINT8 lun)
{
UINT8 *data_buffer = sector_buffer;
device_image_interface *image = our_disks[lun]->m_image;
@@ -586,7 +586,7 @@ void omti8621_device::write_sectors_to_disk(INT32 diskaddr, UINT8 count, UINT8 l
copy_sectors - copy sectors
***************************************************************************/
-void omti8621_device::copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count, UINT8 lun)
+void omti8621_device::copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count, UINT8 lun)
{
device_image_interface *image = our_disks[lun]->m_image;
@@ -613,7 +613,7 @@ void omti8621_device::copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count,
format track - format a track
***************************************************************************/
-void omti8621_device::format_track(const UINT8 * cdb)
+void omti8621_device::format_track(const UINT8 * cdb)
{
UINT8 lun = get_lun(cdb);
UINT32 disk_addr = get_disk_address(cdb);
@@ -668,7 +668,7 @@ void omti8621_device::set_esdi_defect_list(UINT8 lun, UINT8 head)
log_command - log command from a command descriptor block
***************************************************************************/
-void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
+void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
{
if (verbose > 0) {
int i;
@@ -767,7 +767,7 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length)
log_data - log data in the common data buffer
***************************************************************************/
-void omti8621_device::log_data()
+void omti8621_device::log_data()
{
if (verbose > 0) {
int i;
@@ -788,7 +788,7 @@ void omti8621_device::log_data()
do_command
***************************************************************************/
-void omti8621_device::do_command(const UINT8 cdb[], const UINT16 cdb_length)
+void omti8621_device::do_command(const UINT8 cdb[], const UINT16 cdb_length)
{
UINT8 lun = get_lun(cdb);
omti_disk_image_device *disk = our_disks[lun];
@@ -943,11 +943,11 @@ void omti8621_device::do_command(const UINT8 cdb[], const UINT16 cdb_length)
// LOG(("do_command: UNEXPECTED omti_state %02x",omti_state));
// }
status_port |= OMTI_STATUS_IREQ;
- if (command_duration == 0)
+ if (command_duration == 0)
{
set_interrupt(ASSERT_LINE);
- }
- else
+ }
+ else
{
// FIXME: should delay omti_state and status_port as well
m_timer->adjust(attotime::from_msec(command_duration), 0);
@@ -959,7 +959,7 @@ void omti8621_device::do_command(const UINT8 cdb[], const UINT16 cdb_length)
get_command_length
***************************************************************************/
-UINT8 omti8621_device::get_command_length(UINT8 command_byte)
+UINT8 omti8621_device::get_command_length(UINT8 command_byte)
{
return command_byte == OMTI_CMD_COPY ? 10 : 6;
}
@@ -968,7 +968,7 @@ UINT8 omti8621_device::get_command_length(UINT8 command_byte)
get_data
***************************************************************************/
-UINT16 omti8621_device::get_data()
+UINT16 omti8621_device::get_data()
{
UINT16 data = 0xff;
if (data_index < data_length) {
@@ -989,7 +989,7 @@ UINT16 omti8621_device::get_data()
set_data
***************************************************************************/
-void omti8621_device::set_data(UINT16 data)
+void omti8621_device::set_data(UINT16 data)
{
if (data_index < data_length) {
data_buffer[data_index++] = data >> 8;
@@ -1008,7 +1008,7 @@ void omti8621_device::set_data(UINT16 data)
WRITE16_MEMBER(omti8621_device::write)
{
- switch (mem_mask)
+ switch (mem_mask)
{
case 0x00ff:
write8(space, offset*2+1, data, mem_mask);
@@ -1026,7 +1026,7 @@ WRITE16_MEMBER(omti8621_device::write)
WRITE8_MEMBER(omti8621_device::write8)
{
- switch (offset)
+ switch (offset)
{
case OMTI_PORT_DATA_OUT: // 0x00
switch (omti_state) {
@@ -1120,7 +1120,7 @@ WRITE8_MEMBER(omti8621_device::write8)
READ16_MEMBER(omti8621_device::read)
{
- switch (mem_mask)
+ switch (mem_mask)
{
case 0x00ff:
return read8(space, offset*2+1, mem_mask);
@@ -1138,10 +1138,10 @@ READ8_MEMBER(omti8621_device::read8)
switch (offset) {
case OMTI_PORT_DATA_IN: // 0x00
- if (status_port & OMTI_STATUS_CD)
+ if (status_port & OMTI_STATUS_CD)
{
data = command_status;
- switch (omti_state)
+ switch (omti_state)
{
case OMTI_STATE_COMMAND:
LOG2(("reading OMTI 8621 Data Status Register 1 at offset %02x = %02x (omti state = %02x)", offset, data, omti_state));
@@ -1155,8 +1155,8 @@ READ8_MEMBER(omti8621_device::read8)
LOG(("UNEXPECTED reading OMTI 8621 Data Status Register 3 at offset %02x = %02x (omti state = %02x)", offset, data, omti_state));
break;
}
- }
- else
+ }
+ else
{
LOG(("UNEXPECTED reading OMTI 8621 Data Register 4 at offset %02x = %02x (status bit C/D = 0)", offset, data));
}
@@ -1165,7 +1165,7 @@ READ8_MEMBER(omti8621_device::read8)
case OMTI_PORT_STATUS: // 0x01
data = status_port;
// omit excessive logging
- if (data != last_data)
+ if (data != last_data)
{
LOG2(("reading OMTI 8621 Status Register 5 at offset %02x = %02x", offset, data));
// last_data = data;
@@ -1342,7 +1342,7 @@ void omti_disk_image_device::device_start()
-------------------------------------------------*/
void omti_disk_image_device::device_reset()
-{
+{
LOG1(("device_reset_omti_disk"));
if (exists() && fseek(0, SEEK_END) == 0)
@@ -1379,4 +1379,3 @@ bool omti_disk_image_device::call_create(int format_type, option_resolution *for
}
return IMAGE_INIT_PASS;
}
-
diff --git a/src/emu/bus/isa/omti8621.h b/src/emu/bus/isa/omti8621.h
index 3f637232d29..d6b09ea5d3a 100644
--- a/src/emu/bus/isa/omti8621.h
+++ b/src/emu/bus/isa/omti8621.h
@@ -2,8 +2,8 @@
* omti8621.h - SMS OMTI 8621 disk controller
*
* Created on: August 30, 2010
- * Author: Hans Ostermeyer
- *
+ * Author: Hans Ostermeyer
+ *
* Converted to ISA device March 3, 2014 by R. Belmont
*
* Released for general non-commercial use under the MAME license
@@ -28,7 +28,7 @@
***************************************************************************/
class omti_disk_image_device;
-
+
/* ----- device interface ----- */
class omti8621_device : public device_t, public device_isa16_card_interface
diff --git a/src/emu/bus/isa/pds.c b/src/emu/bus/isa/pds.c
index 054e4fad750..dc932cc9e46 100644
--- a/src/emu/bus/isa/pds.c
+++ b/src/emu/bus/isa/pds.c
@@ -47,12 +47,10 @@ void isa8_pds_device::device_start()
void isa8_pds_device::device_reset()
{
-
}
void isa8_pds_device::device_stop()
{
-
}
I8255_INTERFACE(pds_ppi_intf)
@@ -73,4 +71,3 @@ machine_config_constructor isa8_pds_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( pds_config );
}
-
diff --git a/src/emu/bus/isa/sblaster.c b/src/emu/bus/isa/sblaster.c
index 1d69bf31bee..e6056a27e0a 100644
--- a/src/emu/bus/isa/sblaster.c
+++ b/src/emu/bus/isa/sblaster.c
@@ -1190,7 +1190,7 @@ void isa8_sblaster1_0_device::device_start()
set_isa_device();
// 1.0 always has the SAA1099s for CMS back-compatibility
m_isa->install_device(0x0220, 0x0221, 0, 0, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_1_16_w), this ) );
- m_isa->install_device(0x0222, 0x0223, 0, 0, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_2_16_w), this ) );
+ m_isa->install_device(0x0222, 0x0223, 0, 0, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_2_16_w), this ) );
m_isa->set_dma_channel(1, this, FALSE);
m_dsp.version = 0x0105;
sb8_device::device_start();
diff --git a/src/emu/bus/isa/sblaster.h b/src/emu/bus/isa/sblaster.h
index 1666f9e667f..05f940eee2c 100644
--- a/src/emu/bus/isa/sblaster.h
+++ b/src/emu/bus/isa/sblaster.h
@@ -157,17 +157,17 @@ class sb8_device : public sb_device,
public:
// construction/destruction
sb8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, const char *name, const char *shortname, const char *source);
-
+
DECLARE_READ8_MEMBER(ym3812_16_r);
- DECLARE_WRITE8_MEMBER(ym3812_16_w);
+ DECLARE_WRITE8_MEMBER(ym3812_16_w);
protected:
virtual void device_start();
virtual void drq_w(int state) { m_isa->drq1_w(state); }
virtual void irq_w(int state, int source) { m_isa->irq5_w(state); }
virtual UINT8 dack_r(int line) { return sb_device::dack_r(line); }
virtual void dack_w(int line, UINT8 data) { sb_device::dack_w(line, data); }
-private:
- required_device<ym3812_device> m_ym3812;
+private:
+ required_device<ym3812_device> m_ym3812;
};
class isa8_sblaster1_0_device : public sb8_device
@@ -189,7 +189,7 @@ private:
// internal state
required_device<saa1099_device> m_saa1099_1;
required_device<saa1099_device> m_saa1099_2;
-
+
};
class isa8_sblaster1_5_device : public sb8_device
diff --git a/src/emu/bus/isa/sc499.c b/src/emu/bus/isa/sc499.c
index aa73cf1346b..c7cd5737b3b 100644
--- a/src/emu/bus/isa/sc499.c
+++ b/src/emu/bus/isa/sc499.c
@@ -1,8 +1,8 @@
/*
* sc499.c - ARCHIVE SC-499 cartridge tape controller (for Apollo DN3x00)
* Created on: April 17, 2011
- * Author: Hans Ostermeyer
- * ISA conversion by R. Belmont
+ * Author: Hans Ostermeyer
+ * ISA conversion by R. Belmont
*
* Released for general non-commercial use under the MAME license
* Visit http://mamedev.org for licensing and usage restrictions.
@@ -636,7 +636,7 @@ void sc499_device::set_interrupt(enum line_state state)
{
if (state != irq_state)
{
- LOG2(("set_interrupt(%d)",state));
+ LOG2(("set_interrupt(%d)",state));
switch (m_irq)
{
case 2: m_isa->irq2_w(state); break;
@@ -659,7 +659,7 @@ void sc499_device::set_dma_drq(enum line_state state)
{
if (state != dma_drq_state)
{
- LOG2(("set_dma_drq(%d)",state));
+ LOG2(("set_dma_drq(%d)",state));
switch (m_drq)
{
@@ -668,7 +668,7 @@ void sc499_device::set_dma_drq(enum line_state state)
case 3: m_isa->drq3_w(state); break;
default: logerror("sc499: invalid DRQ %d\n", m_drq); break;
}
-
+
dma_drq_state = state;
}
}
@@ -1115,7 +1115,7 @@ UINT8 sc499_device::dack_r(int line)
return data;
}
-void sc499_device::dack_w(int line, UINT8 data)
+void sc499_device::dack_w(int line, UINT8 data)
{
LOG3(("dack_write: data=%x", data));
@@ -1311,4 +1311,3 @@ void sc499_ctape_image_device::device_config_complete()
{
update_names(SC499_CTAPE, "ctape", "ct");
};
-
diff --git a/src/emu/bus/isa/side116.h b/src/emu/bus/isa/side116.h
index 588d0b2aedb..8e452a5b99e 100644
--- a/src/emu/bus/isa/side116.h
+++ b/src/emu/bus/isa/side116.h
@@ -26,7 +26,7 @@
// ======================> side116_device
class side116_device : public device_t,
- public device_isa8_card_interface
+ public device_isa8_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/megadrive/md_carts.c b/src/emu/bus/megadrive/md_carts.c
index 191c939ad7e..1fda9d88194 100644
--- a/src/emu/bus/megadrive/md_carts.c
+++ b/src/emu/bus/megadrive/md_carts.c
@@ -1,6 +1,6 @@
/**********************************************************************
- Megadrive carts
+ Megadrive carts
**********************************************************************/
diff --git a/src/emu/bus/megadrive/md_slot.c b/src/emu/bus/megadrive/md_slot.c
index f240048385a..09b61e539eb 100644
--- a/src/emu/bus/megadrive/md_slot.c
+++ b/src/emu/bus/megadrive/md_slot.c
@@ -466,7 +466,7 @@ int base_md_cart_slot_device::load_nonlist()
bool is_smd, is_md;
UINT32 tmplen = length(), offset, len;
dynamic_buffer tmpROM(tmplen);
-
+
// STEP 1: store a (possibly headered) copy of the file and determine its type (SMD? MD? BIN?)
fread(tmpROM, tmplen);
is_smd = genesis_is_SMD(&tmpROM[0x200], tmplen - 0x200);
diff --git a/src/emu/bus/nes/act53.c b/src/emu/bus/nes/act53.c
index 5ee6293ac68..6914d1137df 100644
--- a/src/emu/bus/nes/act53.c
+++ b/src/emu/bus/nes/act53.c
@@ -7,7 +7,7 @@
Visit http://mamedev.org for licensing and usage restrictions.
- Here we emulate the Multi-Discrete PCB designed by Tepples for
+ Here we emulate the Multi-Discrete PCB designed by Tepples for
this homebew multicart [mapper 28]
***********************************************************************************************************/
@@ -67,23 +67,23 @@ void nes_action53_device::pcb_reset()
Board ACTION 53
- In MESS: *VERY* preliminary support.
-
+ In MESS: *VERY* preliminary support.
+
This board uses 4 registers (reg is selected by writes to 0x5xxx)
Info from nesdev wiki
-
+
R:$00: [...M ..CC]
C = CHR Reg
M = Mirroring
This bit overwrites bit 0 of R:$80, but only if bit 1 of
R:$80 is clear
-
+
R:$01: [...M PPPP]
P = PRG Reg
M = Mirroring
This bit overwrites bit 0 of R:$80, but only if bit 1 of
R:$80 is clear
-
+
R:$80: [..GG PSMM]
G = Game Size (0=32K, 1=64K, 2=128K, 3=256K)
P = PRG Size (0=32k mode, 1=16k mode)
@@ -106,9 +106,9 @@ void nes_action53_device::pcb_reset()
void nes_action53_device::update_prg()
{
UINT8 prg_lo = 0, prg_hi = 0, helper = 0;
- UINT8 out = (m_reg[3] & 0x3f) << 1; // Outer PRG reg
- UINT8 size = (m_reg[2] & 0x30) >> 4; // Game size
- UINT8 mask = (1 << (size + 1)) - 1; // Bits to be taken from PRG reg
+ UINT8 out = (m_reg[3] & 0x3f) << 1; // Outer PRG reg
+ UINT8 size = (m_reg[2] & 0x30) >> 4; // Game size
+ UINT8 mask = (1 << (size + 1)) - 1; // Bits to be taken from PRG reg
if (!BIT(m_reg[2], 3))
{
@@ -134,7 +134,7 @@ void nes_action53_device::update_prg()
}
}
-// printf("banks : 0x%2X - 0x%2X\n", prg_lo, prg_hi);
+// printf("banks : 0x%2X - 0x%2X\n", prg_lo, prg_hi);
prg16_89ab(prg_lo);
prg16_cdef(prg_hi);
}
diff --git a/src/emu/bus/nes/aladdin.c b/src/emu/bus/nes/aladdin.c
index 9a09aba7818..ea5e3a763d3 100644
--- a/src/emu/bus/nes/aladdin.c
+++ b/src/emu/bus/nes/aladdin.c
@@ -31,7 +31,7 @@
//----------------------------------
//
-// Aladdin Cartslot implementation
+// Aladdin Cartslot implementation
//
//----------------------------------
@@ -52,7 +52,7 @@ aladdin_cart_interface::~aladdin_cart_interface()
}
READ8_MEMBER(aladdin_cart_interface::read)
-{
+{
if (offset < 0x4000)
return m_rom[(m_lobank * 0x4000) + (offset & 0x3fff)];
else
@@ -86,7 +86,7 @@ READ8_MEMBER(nes_aladdin_slot_device::read)
{
if (m_cart)
return m_cart->read(space, offset, mem_mask);
-
+
return 0xff;
}
@@ -100,18 +100,18 @@ bool nes_aladdin_slot_device::call_load()
if (!ROM)
return IMAGE_INIT_FAIL;
-
+
if (software_entry() == NULL)
{
if (length() != 0x20010 && length() != 0x40010)
return IMAGE_INIT_FAIL;
-
+
UINT8 temp[0x40010];
size = length() - 0x10;
fread(&temp, length());
memcpy(ROM, temp + 0x10, size);
-
- // double check that iNES files are really mapper 71 or 232
+
+ // double check that iNES files are really mapper 71 or 232
{
UINT8 mapper = (temp[6] & 0xf0) >> 4;
mapper |= temp[7] & 0xf0;
@@ -123,14 +123,14 @@ bool nes_aladdin_slot_device::call_load()
{
if (get_software_region_length("rom") != 0x20000 && get_software_region_length("rom") != 0x40000)
return IMAGE_INIT_FAIL;
-
+
size = get_software_region_length("rom");
memcpy(ROM, get_software_region("rom"), size);
}
m_cart->set_cart_size(size);
}
-
+
return IMAGE_INIT_PASS;
}
@@ -149,19 +149,19 @@ void nes_aladdin_slot_device::get_default_card_software(astring &result)
UINT32 len = core_fsize(m_file);
dynamic_buffer rom(len);
UINT8 mapper;
-
+
core_fread(m_file, rom, len);
mapper = (rom[6] & 0xf0) >> 4;
mapper |= rom[7] & 0xf0;
-// if (mapper == 71)
-// slot_string = "algn";
+// if (mapper == 71)
+// slot_string = "algn";
if (mapper == 232)
slot_string = "algq";
clear();
-
+
result.cpy(slot_string);
}
else
@@ -171,7 +171,7 @@ void nes_aladdin_slot_device::get_default_card_software(astring &result)
//----------------------------------
//
-// Aladdin Minicart implementation
+// Aladdin Minicart implementation
//
//----------------------------------
@@ -262,7 +262,7 @@ void nes_algq_rom_device::write_prg(UINT32 offset, UINT8 data)
//-----------------------------------------------
//
-// Camerica/Codemasters Aladdin passthru
+// Camerica/Codemasters Aladdin passthru
// implementation
//
//-----------------------------------------------
@@ -295,7 +295,7 @@ void nes_aladdin_device::pcb_reset()
/*-------------------------------------------------
Camerica/Codemasters Aladdin Deck Enhancer
-
+
iNES: mapper 71 & 232
In MESS: Supported (but timing issues in some games)
@@ -307,10 +307,10 @@ READ8_MEMBER(nes_aladdin_device::read_h)
LOG_MMC(("aladdin read_h, offset: %04x\n", offset));
// this shall be the proper code, but it's a bit slower, so we access directly the subcart below
//return m_subslot->read(space, offset, mem_mask);
-
+
if (m_subslot->m_cart)
return m_subslot->m_cart->read(space, offset, mem_mask);
- else // this is "fake" in the sense that we fill CPU space with 0xff if no Aladdin cart is loaded
+ else // this is "fake" in the sense that we fill CPU space with 0xff if no Aladdin cart is loaded
return hi_access_rom(offset);
}
diff --git a/src/emu/bus/nes/aladdin.h b/src/emu/bus/nes/aladdin.h
index 922e9778a82..fad8ac15f27 100644
--- a/src/emu/bus/nes/aladdin.h
+++ b/src/emu/bus/nes/aladdin.h
@@ -6,7 +6,7 @@
//----------------------------------
//
-// Aladdin Cartslot implementation
+// Aladdin Cartslot implementation
//
//----------------------------------
@@ -18,14 +18,14 @@ public:
// construction/destruction
aladdin_cart_interface(const machine_config &mconfig, device_t &device);
virtual ~aladdin_cart_interface();
-
+
// reading and writing
virtual DECLARE_READ8_MEMBER(read);
-
+
UINT8 *get_cart_base() { return m_rom; }
void set_cart_size(UINT32 size) { m_rom_size = size; m_rom_mask = (size / 0x4000) - 1; }
virtual void write_prg(UINT32 offset, UINT8 data) { }
-
+
protected:
// internal state
UINT8 *m_rom;
@@ -43,15 +43,15 @@ public:
// construction/destruction
nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ~nes_aladdin_slot_device();
-
+
// device-level overrides
virtual void device_start();
virtual void device_config_complete() { update_names(); }
-
+
// image-level overrides
virtual bool call_load();
virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry);
-
+
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
virtual bool is_readable() const { return 1; }
virtual bool is_writeable() const { return 0; }
@@ -61,13 +61,13 @@ public:
virtual const char *image_interface() const { return "ade_cart"; }
virtual const char *file_extensions() const { return "nes,bin"; }
virtual const option_guide *create_option_guide() const { return NULL; }
-
+
// slot interface overrides
virtual void get_default_card_software(astring &result);
-
+
virtual DECLARE_READ8_MEMBER(read);
void write_prg(UINT32 offset, UINT8 data) { if (m_cart) m_cart->write_prg(offset, data); }
-
+
aladdin_cart_interface* m_cart;
};
@@ -82,7 +82,7 @@ extern const device_type NES_ALADDIN_SLOT;
//----------------------------------
//
-// Aladdin Minicart implementation
+// Aladdin Minicart implementation
//
//----------------------------------
@@ -95,12 +95,12 @@ public:
// construction/destruction
nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// optional information overrides
virtual const rom_entry *device_rom_region() const;
virtual UINT8* get_cart_base();
virtual void write_prg(UINT32 offset, UINT8 data);
-
+
protected:
// device-level overrides
virtual void device_start();
@@ -115,7 +115,7 @@ class nes_algq_rom_device : public nes_algn_rom_device
public:
// construction/destruction
nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// optional information overrides
virtual void write_prg(UINT32 offset, UINT8 data);
@@ -134,7 +134,7 @@ extern const device_type NES_ALGQ_ROM;
//-----------------------------------------------
//
-// Codemasters Aladdin passthru implementation
+// Codemasters Aladdin passthru implementation
//
//-----------------------------------------------
diff --git a/src/emu/bus/nes/bandai.c b/src/emu/bus/nes/bandai.c
index e92b2ad33ed..4114f32896f 100644
--- a/src/emu/bus/nes/bandai.c
+++ b/src/emu/bus/nes/bandai.c
@@ -19,11 +19,11 @@
* Bandai Datach Joint ROM System [mapper 157] is emulated in a separate source file
to implement also the subslot, but the PCB is basically a Bandai LZ93D50 + 24C02 EEPROM
pcb with added barcode reader and subslot
-
+
* Bandai Karaoke Studio [mapper 188] is emulated in a separate source file
to implement also the subslot and the mic inputs
-
-
+
+
TODO:
- investigate why EEPROM does not work
- add support to the PPU for the code necessary to Oeka Kids games (also needed by UNL-DANCE2000 PCB)
diff --git a/src/emu/bus/nes/bandai.h b/src/emu/bus/nes/bandai.h
index 9fafb604c6f..2561fdfa264 100644
--- a/src/emu/bus/nes/bandai.h
+++ b/src/emu/bus/nes/bandai.h
@@ -38,7 +38,7 @@ public:
// construction/destruction
nes_fcg_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// device-level overrides
virtual void device_start();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
@@ -46,11 +46,11 @@ public:
virtual DECLARE_WRITE8_MEMBER(write_m);
virtual void pcb_reset();
-
+
protected:
UINT16 m_irq_count;
int m_irq_enable;
-
+
static const device_timer_id TIMER_IRQ = 0;
emu_timer *irq_timer;
};
diff --git a/src/emu/bus/nes/camerica.c b/src/emu/bus/nes/camerica.c
index 8b0386034d7..5c70ea8ecb9 100644
--- a/src/emu/bus/nes/camerica.c
+++ b/src/emu/bus/nes/camerica.c
@@ -13,10 +13,10 @@
* Camerica BF9096 Boards [mapper 232]
* Camerica Golden Five [mapper 104]
- Aladdin Deck Enhancer pass-thru cart and the corresponding minicarts
+ Aladdin Deck Enhancer pass-thru cart and the corresponding minicarts
(ALGNV11 & ALGQV11 PCBs) are emulated in a separate source file.
-
+
TODO:
- check what causes flickering from PPU in Fire Hawk, Poogie and Big Nose (same PPU issue as Back to
Future 2&3?)
@@ -189,7 +189,7 @@ WRITE8_MEMBER(nes_bf9096_device::write_h)
{
m_latch = data & 3;
prg16_89ab(m_bank_base | m_latch);
- }
+ }
}
/*-------------------------------------------------
diff --git a/src/emu/bus/nes/datach.c b/src/emu/bus/nes/datach.c
index b16efe9ffdf..949ae046b41 100644
--- a/src/emu/bus/nes/datach.c
+++ b/src/emu/bus/nes/datach.c
@@ -35,7 +35,7 @@
//--------------------------------
//
-// Datach Cartslot implementation
+// Datach Cartslot implementation
//
//--------------------------------
@@ -55,7 +55,7 @@ datach_cart_interface::~datach_cart_interface()
}
READ8_MEMBER(datach_cart_interface::read)
-{
+{
if (offset < 0x4000)
return m_rom[(m_bank * 0x4000) + (offset & 0x3fff)];
else
@@ -113,7 +113,7 @@ bool nes_datach_slot_device::call_load()
fread(&temp, length());
memcpy(ROM, temp + shift, 0x40000);
- // double check that iNES files are really mapper 157
+ // double check that iNES files are really mapper 157
// (or 16, since some older .nes files marked Datach as mapper 16)
if (length() == 0x40010)
{
@@ -153,7 +153,7 @@ void nes_datach_slot_device::get_default_card_software(astring &result)
//--------------------------------
//
-// Datach Minicart implementation
+// Datach Minicart implementation
//
// Two kinds of PCB exist
// * ROM only, used by most games
@@ -221,7 +221,7 @@ machine_config_constructor nes_datach_24c01_device::device_mconfig_additions() c
//---------------------------------
//
-// Datach Base Unit implementation
+// Datach Base Unit implementation
//
//---------------------------------
@@ -244,7 +244,7 @@ void nes_datach_device::device_start()
serial_timer = timer_alloc(TIMER_SERIAL);
irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1));
serial_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1000));
-
+
save_item(NAME(m_irq_enable));
save_item(NAME(m_irq_count));
save_item(NAME(m_datach_latch));
@@ -256,7 +256,7 @@ void nes_datach_device::pcb_reset()
prg16_89ab(0);
prg16_cdef(m_prg_chunks - 1);
chr8(0, m_chr_source);
-
+
m_irq_enable = 0;
m_irq_count = 0;
m_datach_latch = 0;
@@ -269,27 +269,27 @@ void nes_datach_device::pcb_reset()
-------------------------------------------------*/
/*-------------------------------------------------
-
+
Bandai LZ93D50 + Datach barcode reader emulation
-
+
Games: Datach Games
-
+
iNES: mappers 157
-
+
In MESS: Supported
-
+
TODO: Datach carts should actually be handled
separately! Original carts were minicarts to be
inserted in a smaller slot of the Barcode reader
FC cart. The Barcode reader acts as a passthrough
but it has no internal ROM (it does not work if
you don't have any minicart inserted)
-
- TODO2: This class should be derived from the
+
+ TODO2: This class should be derived from the
LZ93D50 + X24C02 class, since the main board
- has this EEPROM. Moreover, Datach - Battle Rush
+ has this EEPROM. Moreover, Datach - Battle Rush
has a second X24C01 EEPROM that we don't emulate yet...
-
+
-------------------------------------------------*/
@@ -318,14 +318,14 @@ READ8_MEMBER(nes_datach_device::read_h)
if (m_subslot->m_cart)
return m_subslot->m_cart->read(space, offset, mem_mask);
- else // this is "fake" in the sense that we fill CPU space with 0xff if no Datach cart is loaded
+ else // this is "fake" in the sense that we fill CPU space with 0xff if no Datach cart is loaded
return hi_access_rom(offset);
}
WRITE8_MEMBER(nes_datach_device::write_h)
{
LOG_MMC(("Datach write_h, offset: %04x, data: %02x\n", offset, data));
-
+
switch (offset & 0x0f)
{
case 0: case 1: case 2: case 3:
@@ -406,7 +406,7 @@ void nes_datach_device::device_timer(emu_timer &timer, device_timer_id id, int p
m_irq_count = 0xffff;
else
m_irq_count--;
-
+
if (!m_irq_count)
{
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
diff --git a/src/emu/bus/nes/datach.h b/src/emu/bus/nes/datach.h
index 6fc8cd5e0b4..76a95a06395 100644
--- a/src/emu/bus/nes/datach.h
+++ b/src/emu/bus/nes/datach.h
@@ -7,7 +7,7 @@
//--------------------------------
//
-// Datach Cartslot implementation
+// Datach Cartslot implementation
//
//--------------------------------
@@ -84,7 +84,7 @@ extern const device_type NES_DATACH_SLOT;
//--------------------------------
//
-// Datach Minicart implementation
+// Datach Minicart implementation
//
//--------------------------------
@@ -127,7 +127,7 @@ extern const device_type NES_DATACH_24C01;
//---------------------------------
//
-// Datach Base Unit implementation
+// Datach Base Unit implementation
//
//---------------------------------
@@ -138,7 +138,7 @@ class nes_datach_device : public nes_lz93d50_device
public:
// construction/destruction
nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// device-level overrides
virtual void device_start();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
@@ -146,17 +146,17 @@ public:
virtual DECLARE_READ8_MEMBER(read_m);
virtual DECLARE_READ8_MEMBER(read_h);
virtual DECLARE_WRITE8_MEMBER(write_h);
-
+
virtual void pcb_reset();
-
+
protected:
UINT8 m_datach_latch;
required_device<i2cmem_device> m_i2cmem;
- required_device<barcode_reader_device> m_reader;
+ required_device<barcode_reader_device> m_reader;
required_device<nes_datach_slot_device> m_subslot;
UINT8 m_i2c_dir;
UINT8 m_i2c_in_use;
-
+
static const device_timer_id TIMER_SERIAL = 1;
emu_timer *serial_timer;
};
diff --git a/src/emu/bus/nes/jy.c b/src/emu/bus/nes/jy.c
index 1eedc36ac9b..66caa918769 100644
--- a/src/emu/bus/nes/jy.c
+++ b/src/emu/bus/nes/jy.c
@@ -310,13 +310,13 @@ void nes_jy_typea_device::update_prg()
prg32((last & 0x0f) | (exPrg >> 2));
m_bank_6000 = (((m_mmc_prg_bank[3] * 4) + 3) & 0x3f) | (exPrg >> 2);
break;
-
+
case 1: // 16KB
prg16_89ab((m_mmc_prg_bank[1] & 0x1f) | (exPrg >> 1));
prg16_cdef((last & 0x1f) | (exPrg >> 1));
m_bank_6000 = (((m_mmc_prg_bank[3] * 2) + 1) & 0x1f) | (exPrg >> 1);
break;
-
+
case 2: // 8KB
prg8_89(m_mmc_prg_bank[0] | exPrg);
prg8_ab(m_mmc_prg_bank[1] | exPrg);
@@ -324,7 +324,7 @@ void nes_jy_typea_device::update_prg()
prg8_ef(last | exPrg);
m_bank_6000 = m_mmc_prg_bank[3] | exPrg;
break;
-
+
case 3: // 8KB Alt
prg8_89((unscramble(m_mmc_prg_bank[0]) & 0x3f) | exPrg);
prg8_ab((unscramble(m_mmc_prg_bank[1]) & 0x3f) | exPrg);
@@ -347,12 +347,12 @@ void nes_jy_typea_device::update_chr()
// Block mode enabled: in this case lower bits select a 256KB page inside CHRROM
// and the low bytes of m_mmc_vrom_bank select the banks inside such a page
- // docs suggest m_reg[3] & 0x1f for chr_page below,
+ // docs suggest m_reg[3] & 0x1f for chr_page below,
// but 45 in 1 (JY-120A) menu requires to use this (from NEStopia)
- UINT8 chr_page = (m_reg[3] & 1) | ((m_reg[3] & 0x18) >> 2);
+ UINT8 chr_page = (m_reg[3] & 1) | ((m_reg[3] & 0x18) >> 2);
UINT32 extra_chr_base = BIT(m_reg[3], 5) ? 0 : (chr_page * 0x100);
UINT32 extra_chr_mask = BIT(m_reg[3], 5) ? 0xffffff : 0xff;
-
+
switch (m_reg[0] & 0x18)
{
case 0x00: // 8KB
@@ -360,7 +360,7 @@ void nes_jy_typea_device::update_chr()
extra_chr_mask >>= 3;
chr8(extra_chr_base | (m_mmc_vrom_bank[0] & extra_chr_mask), m_chr_source);
break;
-
+
case 0x08: // 4KB
extra_chr_base >>= 2;
extra_chr_mask >>= 2;
@@ -369,7 +369,7 @@ void nes_jy_typea_device::update_chr()
chr4_0(extra_chr_base | (m_mmc_vrom_bank[m_chr_latch[0]] & extra_chr_mask), m_chr_source);
chr4_4(extra_chr_base | (m_mmc_vrom_bank[m_chr_latch[1]] & extra_chr_mask), m_chr_source);
break;
-
+
case 0x10: // 2KB
extra_chr_base >>= 1;
extra_chr_mask >>= 1;
@@ -378,7 +378,7 @@ void nes_jy_typea_device::update_chr()
chr2_4(extra_chr_base | (m_mmc_vrom_bank[4] & extra_chr_mask), m_chr_source);
chr2_6(extra_chr_base | (m_mmc_vrom_bank[6] & extra_chr_mask), m_chr_source);
break;
-
+
case 0x18: // 1KB
chr1_0(extra_chr_base | (m_mmc_vrom_bank[0] & extra_chr_mask), m_chr_source);
chr1_1(extra_chr_base | (m_mmc_vrom_bank[1] & extra_chr_mask), m_chr_source);
@@ -573,7 +573,7 @@ void nes_jy_typec_device::update_mirror_typec()
READ8_MEMBER(nes_jy_typec_device::chr_r)
{
int bank = offset >> 10;
-
+
irq_clock(0, 2);
switch (offset & 0xff0)
{
diff --git a/src/emu/bus/nes/jy.h b/src/emu/bus/nes/jy.h
index 720c3ea2e60..47e16d983c4 100644
--- a/src/emu/bus/nes/jy.h
+++ b/src/emu/bus/nes/jy.h
@@ -20,7 +20,7 @@ public:
virtual DECLARE_READ8_MEMBER(read_m);
virtual DECLARE_WRITE8_MEMBER(write_l);
virtual DECLARE_WRITE8_MEMBER(write_h);
-
+
virtual DECLARE_READ8_MEMBER(chr_r);
virtual DECLARE_READ8_MEMBER(nt_r);
@@ -39,7 +39,7 @@ protected:
UINT8 m_mul[2];
UINT8 m_latch;
UINT8 m_reg[4];
- UINT8 m_chr_latch[2]; // type C uses a more complex CHR 4K mode, and these vars are only changed for those games
+ UINT8 m_chr_latch[2]; // type C uses a more complex CHR 4K mode, and these vars are only changed for those games
UINT8 m_mmc_prg_bank[4];
UINT16 m_mmc_nt_bank[4];
UINT16 m_mmc_vrom_bank[8];
diff --git a/src/emu/bus/nes/karastudio.c b/src/emu/bus/nes/karastudio.c
index d331cbdeb4d..afb7a2b1363 100644
--- a/src/emu/bus/nes/karastudio.c
+++ b/src/emu/bus/nes/karastudio.c
@@ -8,22 +8,22 @@
Here we emulate the following PCBs Bandai Karaoke Studio [mapper 188]
-
+
The Karaoke Studio cart consist of a large connector which fits the FC cart slot, with a microphone
- connected. The game data is in the connector itself. The microphone has two buttons on it, and the
- game uses these only to navigate through the menus (the two buttons are not read through the controller
- port, which is not accessible from the cart, but from $6000-$7fff). Part of the connector body can be
+ connected. The game data is in the connector itself. The microphone has two buttons on it, and the
+ game uses these only to navigate through the menus (the two buttons are not read through the controller
+ port, which is not accessible from the cart, but from $6000-$7fff). Part of the connector body can be
removed to be replaced by an expansion cart containing new songs (we emulate this by adding a -cart2 slot).
-
+
TODO:
- verify expansion slot emulation for the Senyou Cassettes:
not much documentation exists about the expansion carts (except for few paragraphs
at Enri's FC webpage), so I implemented it based on "common sense"
* expansion carts do not contain the required game data => main PRG must be in the main cart
- so to remain connected even when an expansion is inserted (differently from Datach, where
+ so to remain connected even when an expansion is inserted (differently from Datach, where
the base unit contains no PRG)
- * bankswicth writes with bit3=0 (to access expansion) when no expansion is present should do
+ * bankswicth writes with bit3=0 (to access expansion) when no expansion is present should do
nothing
***********************************************************************************************************/
@@ -43,7 +43,7 @@
//-----------------------------------------
//
-// Karaoke Studio Cartslot implementation
+// Karaoke Studio Cartslot implementation
//
//-----------------------------------------
@@ -93,7 +93,7 @@ READ8_MEMBER(nes_kstudio_slot_device::read)
{
if (m_cart)
return m_cart->read(space, offset, mem_mask);
-
+
return 0xff;
}
@@ -102,27 +102,27 @@ bool nes_kstudio_slot_device::call_load()
if (m_cart)
{
UINT8 *ROM = m_cart->get_cart_base();
-
+
if (!ROM)
return IMAGE_INIT_FAIL;
-
+
// Existing exapnsion carts are all 128K, so we only load files of this size
if (software_entry() == NULL)
{
if (length() != 0x20000)
return IMAGE_INIT_FAIL;
-
- fread(&ROM, 0x20000);
+
+ fread(&ROM, 0x20000);
}
else
{
if (get_software_region_length("rom") != 0x20000)
return IMAGE_INIT_FAIL;
-
+
memcpy(ROM, get_software_region("rom"), 0x20000);
}
}
-
+
return IMAGE_INIT_PASS;
}
@@ -141,7 +141,7 @@ void nes_kstudio_slot_device::get_default_card_software(astring &result)
//-----------------------------------------------
//
-// Karaoke Studio Expansion cart implementation
+// Karaoke Studio Expansion cart implementation
//
//-----------------------------------------------
@@ -181,7 +181,7 @@ UINT8 *nes_kstudio_rom_device::get_cart_base()
//------------------------------------------
//
-// Karaoke Studio Base Cart implementation
+// Karaoke Studio Base Cart implementation
//
//------------------------------------------
@@ -220,7 +220,7 @@ void nes_karaokestudio_device::pcb_reset()
Bandai Karaoke Studio board emulation
- Games: Karaoke Studio + expansion carts with
+ Games: Karaoke Studio + expansion carts with
additional songs
Note: we currently do not emulate properly the
@@ -260,7 +260,7 @@ WRITE8_MEMBER(nes_karaokestudio_device::write_h)
// cart (when expansion is present, code keeps switching both from the expansion rom and from
// the main ROM)
// my guess is that writes with bit3=0 and no expansion just do nothing, but it shall be verified
-
+
if (offset >= 04000)
{
if (BIT(data, 3))
@@ -268,7 +268,7 @@ WRITE8_MEMBER(nes_karaokestudio_device::write_h)
m_exp_active = 0;
prg16_89ab(data & 7);
}
- else // expansion cart
+ else // expansion cart
{
m_exp_active = 1;
m_subslot->write_prg_bank(data & 7);
@@ -308,4 +308,3 @@ machine_config_constructor nes_karaokestudio_device::device_mconfig_additions()
{
return MACHINE_CONFIG_NAME( karaoke_studio );
}
-
diff --git a/src/emu/bus/nes/karastudio.h b/src/emu/bus/nes/karastudio.h
index d3c8f2a6568..bfa4c252ac7 100644
--- a/src/emu/bus/nes/karastudio.h
+++ b/src/emu/bus/nes/karastudio.h
@@ -6,7 +6,7 @@
//-----------------------------------------
//
-// Karaoke Studio Cartslot implementation
+// Karaoke Studio Cartslot implementation
//
//-----------------------------------------
@@ -18,13 +18,13 @@ public:
// construction/destruction
kstudio_cart_interface(const machine_config &mconfig, device_t &device);
virtual ~kstudio_cart_interface();
-
+
// reading and writing
virtual DECLARE_READ8_MEMBER(read);
-
+
UINT8 *get_cart_base() { return m_rom; }
void write_prg_bank(UINT8 bank) { m_bank = bank; }
-
+
protected:
// internal state
UINT8 *m_rom;
@@ -42,15 +42,15 @@ public:
// construction/destruction
nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ~nes_kstudio_slot_device();
-
+
// device-level overrides
virtual void device_start();
virtual void device_config_complete() { update_names(); }
-
+
// image-level overrides
virtual bool call_load();
virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry);
-
+
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
virtual bool is_readable() const { return 1; }
virtual bool is_writeable() const { return 0; }
@@ -60,13 +60,13 @@ public:
virtual const char *image_interface() const { return "ks_cart"; }
virtual const char *file_extensions() const { return "bin"; }
virtual const option_guide *create_option_guide() const { return NULL; }
-
+
// slot interface overrides
virtual void get_default_card_software(astring &result);
-
+
virtual DECLARE_READ8_MEMBER(read);
void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); }
-
+
kstudio_cart_interface* m_cart;
};
@@ -81,7 +81,7 @@ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false)
//-----------------------------------------------
//
-// Karaoke Studio Expansion cart implementation
+// Karaoke Studio Expansion cart implementation
//
//-----------------------------------------------
@@ -93,11 +93,11 @@ class nes_kstudio_rom_device : public device_t,
public:
// construction/destruction
nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// optional information overrides
virtual const rom_entry *device_rom_region() const;
virtual UINT8* get_cart_base();
-
+
protected:
// device-level overrides
virtual void device_start();
@@ -110,7 +110,7 @@ extern const device_type NES_KSEXPANSION_ROM;
//-------------------------------------------
//
-// Karaoke Studio Base Cart implementation
+// Karaoke Studio Base Cart implementation
//
//-------------------------------------------
diff --git a/src/emu/bus/nes/mmc5.c b/src/emu/bus/nes/mmc5.c
index 7601a90c914..c3aa9beeed7 100644
--- a/src/emu/bus/nes/mmc5.c
+++ b/src/emu/bus/nes/mmc5.c
@@ -117,7 +117,7 @@ void nes_exrom_device::pcb_reset()
m_split_chr = 0;
m_ex1_bank = 0;
m_vcount = 0;
-
+
memset(m_vrom_bank, 0x3ff, ARRAY_LENGTH(m_vrom_bank));
m_prg_regs[0] = 0xfc;
m_prg_regs[1] = 0xfd;
@@ -241,7 +241,7 @@ void nes_exrom_device::update_prg()
void nes_exrom_device::hblank_irq(int scanline, int vblank, int blanked )
{
m_vcount = scanline;
-
+
if (scanline == m_irq_count)
{
if (m_irq_enable)
@@ -284,7 +284,7 @@ inline bool nes_exrom_device::in_split()
{
ppu2c0x_device *ppu = machine().device<ppu2c0x_device>("ppu");
int tile = ppu->get_tilenum();
-
+
if (tile < 34)
{
if (!m_split_rev && tile < m_split_ctrl)
@@ -303,7 +303,7 @@ READ8_MEMBER(nes_exrom_device::nt_r)
{
case MMC5FILL:
if ((offset & 0x3ff) >= 0x3c0)
- return m_floodattr;
+ return m_floodattr;
return m_floodtile;
case EXRAM:
@@ -315,7 +315,7 @@ READ8_MEMBER(nes_exrom_device::nt_r)
case CIRAM:
default:
- // Uchuu Keibitai SDF uses extensively split screen for its intro,
+ // Uchuu Keibitai SDF uses extensively split screen for its intro,
// but it does not work yet
if (m_split_scr && !(m_exram_control & 0x02) && in_split())
{
@@ -338,7 +338,7 @@ READ8_MEMBER(nes_exrom_device::nt_r)
{
if ((offset & 0x3ff) >= 0x3c0)
return m_mmc5_attrib[(m_exram[offset & 0x3ff] >> 6) & 0x03];
- else // in this case, we write Ex1 CHR bank, but then access NT normally!
+ else // in this case, we write Ex1 CHR bank, but then access NT normally!
{
m_ex1_chr = 1;
m_ex1_bank = (m_exram[offset & 0x3ff] & 0x3f) | (m_high_chr << 6);
@@ -350,17 +350,17 @@ READ8_MEMBER(nes_exrom_device::nt_r)
WRITE8_MEMBER(nes_exrom_device::nt_w)
{
- int page = ((offset & 0xc00) >> 10);
-
+ int page = ((offset & 0xc00) >> 10);
+
if (!m_nt_writable[page])
return;
-
+
switch (m_nt_src[page])
{
case EXRAM:
m_exram[offset & 0x3ff] = data;
break;
-
+
case CIRAM:
default:
m_nt_access[page][offset & 0x3ff] = data;
@@ -415,10 +415,10 @@ READ8_MEMBER(nes_exrom_device::chr_r)
// However, if a game enables Ex1 but does not write a new m_ex1_bank, I'm not sure here we get the correct behavior
if (m_exram_control == 1 && ppu->get_draw_phase() == PPU_DRAW_BG && m_ex1_chr)
return bg_ex1_chr_r(offset & 0xfff);
-
+
if (m_split_scr && !(m_exram_control & 0x02) && in_split() && ppu->get_draw_phase() == PPU_DRAW_BG && m_split_chr)
return split_chr_r(offset & 0xfff);
-
+
if (ppu->is_sprite_8x16())
{
if (ppu->get_draw_phase() == PPU_DRAW_OAM)
@@ -444,9 +444,9 @@ READ8_MEMBER(nes_exrom_device::read_l)
if ((offset >= 0x1c00) && (offset <= 0x1fff))
{
// EXRAM
- if (BIT(m_exram_control, 1)) // Modes 2,3 = read
+ if (BIT(m_exram_control, 1)) // Modes 2,3 = read
return m_exram[offset - 0x1c00];
- else
+ else
return m_open_bus; // Modes 0,1 = open bus
}
@@ -486,9 +486,9 @@ WRITE8_MEMBER(nes_exrom_device::write_l)
if ((offset >= 0x1c00) && (offset <= 0x1fff))
{
// EXRAM
- if (m_exram_control == 0x02) // Mode 2 = write data
+ if (m_exram_control == 0x02) // Mode 2 = write data
m_exram[offset - 0x1c00] = data;
- else if (m_exram_control != 0x03) // Modes 0,1 = write data in frame / write 0 otherwise
+ else if (m_exram_control != 0x03) // Modes 0,1 = write data in frame / write 0 otherwise
{
if (m_irq_status & 0x40)
m_exram[offset - 0x1c00] = data;
@@ -554,7 +554,7 @@ WRITE8_MEMBER(nes_exrom_device::write_l)
case 0x1116:
case 0x1117:
m_prg_regs[offset & 3] = data & 0x7f;
- m_prg_ram_mapped[offset & 3] = !BIT(data, 7); // m_prg_ram_mapped[3] is not used, in fact!
+ m_prg_ram_mapped[offset & 3] = !BIT(data, 7); // m_prg_ram_mapped[3] is not used, in fact!
update_prg();
break;
diff --git a/src/emu/bus/nes/mmc5.h b/src/emu/bus/nes/mmc5.h
index cd15c58d817..dbd4988d839 100644
--- a/src/emu/bus/nes/mmc5.h
+++ b/src/emu/bus/nes/mmc5.h
@@ -66,7 +66,7 @@ protected:
UINT8 m_prg_ram_mapped[4];
UINT8 m_ex1_bank;
-
+
UINT8 m_high_chr; // $5130
UINT8 m_split_scr; // $5200
diff --git a/src/emu/bus/nes/nes_carts.c b/src/emu/bus/nes/nes_carts.c
index 047683d4103..27ef460b504 100644
--- a/src/emu/bus/nes/nes_carts.c
+++ b/src/emu/bus/nes/nes_carts.c
@@ -127,7 +127,7 @@ SLOT_INTERFACE_START(nes_cart)
SLOT_INTERFACE_INTERNAL("bf9093", NES_BF9093)
SLOT_INTERFACE_INTERNAL("bf9096", NES_BF9096)
SLOT_INTERFACE_INTERNAL("goldenfive", NES_GOLDEN5)
- SLOT_INTERFACE_INTERNAL("ade", NES_ALADDIN)
+ SLOT_INTERFACE_INTERNAL("ade", NES_ALADDIN)
SLOT_INTERFACE_INTERNAL("cne_decathl", NES_CNE_DECATHL)
SLOT_INTERFACE_INTERNAL("cne_fsb", NES_CNE_FSB)
SLOT_INTERFACE_INTERNAL("cne_shlz", NES_CNE_SHLZ)
@@ -354,4 +354,3 @@ SLOT_INTERFACE_INTERNAL("test", NES_NROM)
//
SLOT_INTERFACE_INTERNAL("unknown", NES_NROM) // a few pirate dumps uses the wrong mapper...
SLOT_INTERFACE_END
-
diff --git a/src/emu/bus/nes/nes_ines.inc b/src/emu/bus/nes/nes_ines.inc
index 9577fef635a..0a464506667 100644
--- a/src/emu/bus/nes/nes_ines.inc
+++ b/src/emu/bus/nes/nes_ines.inc
@@ -56,8 +56,8 @@ static const nes_mmc mmc_list[] =
{ 24, KONAMI_VRC6 },
{ 25, KONAMI_VRC4 },
{ 26, KONAMI_VRC6 },
- { 27, UNL_WORLDHERO }, // 27 World Hero board - Unsupported
- { 28, BTL_ACTION53 }, // 28 - Multi-discrete PCB designed by Tepples for Action 53
+ { 27, UNL_WORLDHERO }, // 27 World Hero board - Unsupported
+ { 28, BTL_ACTION53 }, // 28 - Multi-discrete PCB designed by Tepples for Action 53
// 29 Unused
// 30 Unused
// 31 Unused
@@ -132,7 +132,7 @@ static const nes_mmc mmc_list[] =
// 100 images hacked to work with nesticle?
// 101 Unused (Urusei Yatsura had been assigned to this mapper, but it's Mapper 87)
// 102 Unused
- { 103, UNL_2708 }, // 103 Bootleg cart 2708 (Doki Doki Panic - FDS Conversion) - Unsupported
+ { 103, UNL_2708 }, // 103 Bootleg cart 2708 (Doki Doki Panic - FDS Conversion) - Unsupported
{ 104, CAMERICA_GOLDENFIVE },
{ 105, STD_EVENT },
{ 106, BTL_SMB3 },
@@ -191,7 +191,7 @@ static const nes_mmc mmc_list[] =
{ 159, BANDAI_LZ93EX1 }, // with 24c01
{ 160, SACHEN_SA009 },
// 161 Unused
- { 162, WAIXING_FS304}, // not confirmed, but a lot of chinese releases use it like this...
+ { 162, WAIXING_FS304}, // not confirmed, but a lot of chinese releases use it like this...
{ 163, NANJING_BOARD},
{ 164, WAIXING_FFV },
{ 165, WAIXING_SH2 },
@@ -264,7 +264,7 @@ static const nes_mmc mmc_list[] =
{ 232, CAMERICA_BF9096 },
{ 233, BMC_SUPER22 },
{ 234, AVE_MAXI15 },
- { 235, BMC_GOLD150 }, // 235 Golden Game x-in-1 - Unsupported
+ { 235, BMC_GOLD150 }, // 235 Golden Game x-in-1 - Unsupported
// 236 Game 800-in-1 - Unsupported
// 237 Unused
{ 238, UNL_603_5052 },
@@ -525,7 +525,7 @@ void nes_cart_slot_device::call_load_ines()
switch (m_pcb_id)
{
case STD_NROM:
- if (prg_size == 3 * 0x4000) // NROM368 are padded with 2k empty data at start to accomplish with iNES standard
+ if (prg_size == 3 * 0x4000) // NROM368 are padded with 2k empty data at start to accomplish with iNES standard
{
m_pcb_id = STD_NROM368;
fseek(0x810, SEEK_SET);
@@ -834,7 +834,7 @@ const char * nes_cart_slot_device::get_default_card_ines(UINT8 *ROM, UINT32 len)
}
// use info from nes.hsi if available!
-// if (hashfile_extrainfo(*this, mapinfo))
+// if (hashfile_extrainfo(*this, mapinfo))
if (0)
{
if (4 == sscanf(mapinfo,"%d %d %d %d", &mapint1, &mapint2, &mapint3, &mapint4))
diff --git a/src/emu/bus/nes/nes_slot.h b/src/emu/bus/nes/nes_slot.h
index c37ccb1d88d..f93f5f76819 100644
--- a/src/emu/bus/nes/nes_slot.h
+++ b/src/emu/bus/nes/nes_slot.h
@@ -119,8 +119,8 @@ enum
WAIXING_DQ8, WAIXING_FFV, WAIXING_WXZS2, SUPERGAME_LIONKING, SUPERGAME_BOOGERMAN,
KAY_BOARD, HOSENKAN_BOARD, NITRA_TDA, GOUDER_37017, NANJING_BOARD,
WHIRLWIND_2706,
- NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM
- BTL_ACTION53, // homebrew PCB for homebrew multicarts
+ NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM
+ BTL_ACTION53, // homebrew PCB for homebrew multicarts
/* FFE boards, for mappers 6, 8, 17 */
FFE3_BOARD, FFE4_BOARD, FFE8_BOARD, TEST_BOARD,
/* Unsupported (for place-holder boards, with no working emulation) & no-board (at init) */
diff --git a/src/emu/bus/nes/nxrom.c b/src/emu/bus/nes/nxrom.c
index 68349d97f7b..8c3d56a4e6a 100644
--- a/src/emu/bus/nes/nxrom.c
+++ b/src/emu/bus/nes/nxrom.c
@@ -283,15 +283,15 @@ void nes_un1rom_device::pcb_reset()
-------------------------------------------------*/
/*-------------------------------------------------
-
+
NROM-368 board emulation
-
+
iNES: mapper 0 with 3xPRG banks
This is an homebrew extension to map linearly 46KB
or PRG in boards with no PRG bankswitch logic
-
+
In MESS: Supported
-
+
-------------------------------------------------*/
READ8_MEMBER(nes_nrom368_device::read_l)
@@ -425,7 +425,7 @@ READ8_MEMBER(nes_cnrom_device::chr_r)
// For most boards, chr_open_bus remains always zero.
if (m_chr_open_bus)
return m_open_bus;
-
+
return m_chr_access[bank][offset & 0x3ff];
}
@@ -549,16 +549,16 @@ WRITE8_MEMBER(nes_un1rom_device::write_h)
}
/*-------------------------------------------------
-
+
NoCash NOCHR board emulation
-
+
This is an homebrew PCB design on a single chip
(+possibly CIC) which uses the NTRAM as CHRRAM!
-
+
iNES: mapper 218
-
+
In MESS: Supported.
-
+
-------------------------------------------------*/
WRITE8_MEMBER(nes_nochr_device::chr_w)
@@ -569,7 +569,7 @@ WRITE8_MEMBER(nes_nochr_device::chr_w)
else if (mirr == PPU_MIRROR_LOW)
m_ciram[(offset & 0x3ff) + 0x400] = data;
else
- m_ciram[offset & 0x7ff] = data; // not sure here, since there is no software to test...
+ m_ciram[offset & 0x7ff] = data; // not sure here, since there is no software to test...
}
READ8_MEMBER(nes_nochr_device::chr_r)
@@ -580,5 +580,5 @@ READ8_MEMBER(nes_nochr_device::chr_r)
else if (mirr == PPU_MIRROR_LOW)
return m_ciram[(offset & 0x3ff) + 0x400];
else
- return m_ciram[offset & 0x7ff]; // not sure here, since there is no software to test...
+ return m_ciram[offset & 0x7ff]; // not sure here, since there is no software to test...
}
diff --git a/src/emu/bus/nes/sunsoft_dcs.c b/src/emu/bus/nes/sunsoft_dcs.c
index 93e1e67bf59..d4dd1a8e261 100644
--- a/src/emu/bus/nes/sunsoft_dcs.c
+++ b/src/emu/bus/nes/sunsoft_dcs.c
@@ -27,7 +27,7 @@
//-----------------------------------------------
//
-// Nantettate!! Baseball Cartslot implementation
+// Nantettate!! Baseball Cartslot implementation
//
//-----------------------------------------------
@@ -119,7 +119,7 @@ void nes_ntb_slot_device::get_default_card_software(astring &result)
//-----------------------------------------------
//
-// Nantettate!! Baseball Minicart implementation
+// Nantettate!! Baseball Minicart implementation
//
//-----------------------------------------------
@@ -154,8 +154,8 @@ UINT8 *nes_ntb_rom_device::get_cart_base()
//------------------------------------------------
//
-// Nantettate!! Baseball base cart implementation
-// a.k.a. Sunsoft Dual Cassette System
+// Nantettate!! Baseball base cart implementation
+// a.k.a. Sunsoft Dual Cassette System
// (variant of Sunsoft-4 PCB)
//
//------------------------------------------------
diff --git a/src/emu/bus/nes/sunsoft_dcs.h b/src/emu/bus/nes/sunsoft_dcs.h
index c11794fd640..02c32fc3f19 100644
--- a/src/emu/bus/nes/sunsoft_dcs.h
+++ b/src/emu/bus/nes/sunsoft_dcs.h
@@ -6,7 +6,7 @@
//-----------------------------------------------
//
-// Nantettate!! Baseball Cartslot implementation
+// Nantettate!! Baseball Cartslot implementation
//
//-----------------------------------------------
@@ -77,7 +77,7 @@ extern const device_type NES_NTB_SLOT;
//-----------------------------------------------
//
-// Nantettate!! Baseball Minicart implementation
+// Nantettate!! Baseball Minicart implementation
//
//-----------------------------------------------
@@ -106,8 +106,8 @@ extern const device_type NES_NTB_ROM;
//------------------------------------------------
//
-// Nantettate!! Baseball base cart implementation
-// a.k.a. Sunsoft Dual Cassette System
+// Nantettate!! Baseball base cart implementation
+// a.k.a. Sunsoft Dual Cassette System
// (variant of Sunsoft-4 PCB)
//
//------------------------------------------------
diff --git a/src/emu/bus/nubus/nubus_specpdq.c b/src/emu/bus/nubus/nubus_specpdq.c
index c0db4c01ac7..51d5ee15e8a 100644
--- a/src/emu/bus/nubus/nubus_specpdq.c
+++ b/src/emu/bus/nubus/nubus_specpdq.c
@@ -37,7 +37,7 @@ MACHINE_CONFIG_FRAGMENT( specpdq )
MCFG_SCREEN_RAW_PARAMS(25175000, 800, 0, 640, 525, 0, 480)
MCFG_SCREEN_SIZE(1280,1024)
MCFG_SCREEN_VISIBLE_AREA(0, 1152-1, 0, 844-1)
-
+
MCFG_PALETTE_ADD("palette", 256)
MACHINE_CONFIG_END
diff --git a/src/emu/bus/nubus/nubus_specpdq.h b/src/emu/bus/nubus/nubus_specpdq.h
index 4cc249ff98d..d1267ec42f3 100644
--- a/src/emu/bus/nubus/nubus_specpdq.h
+++ b/src/emu/bus/nubus/nubus_specpdq.h
@@ -51,7 +51,7 @@ private:
int m_width, m_height, m_patofsx, m_patofsy;
UINT32 m_vram_addr, m_vram_src;
UINT8 m_fillbytes[256];
- required_device<palette_device> m_palette;
+ required_device<palette_device> m_palette;
};
diff --git a/src/emu/bus/plus4/c1551.c b/src/emu/bus/plus4/c1551.c
index 7d46d56b7b0..9bf22d73819 100644
--- a/src/emu/bus/plus4/c1551.c
+++ b/src/emu/bus/plus4/c1551.c
@@ -355,7 +355,7 @@ ADDRESS_MAP_END
//-------------------------------------------------
static SLOT_INTERFACE_START( c1551_floppies )
- SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
+ SLOT_INTERFACE( "525ssqd", FLOPPY_525_SSQD )
SLOT_INTERFACE_END
diff --git a/src/emu/bus/plus4/c1551.h b/src/emu/bus/plus4/c1551.h
index da9533e1494..7f6963682fb 100644
--- a/src/emu/bus/plus4/c1551.h
+++ b/src/emu/bus/plus4/c1551.h
@@ -30,7 +30,7 @@
// ======================> c1551_device
class c1551_device : public device_t,
- public device_plus4_expansion_card_interface
+ public device_plus4_expansion_card_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/sms_exp/smsexp.h b/src/emu/bus/sms_exp/smsexp.h
index 871424aa856..5e665439b9d 100644
--- a/src/emu/bus/sms_exp/smsexp.h
+++ b/src/emu/bus/sms_exp/smsexp.h
@@ -51,7 +51,7 @@ public:
DECLARE_WRITE8_MEMBER(write_mapper);
DECLARE_READ8_MEMBER(read_ram);
DECLARE_WRITE8_MEMBER(write_ram);
-
+
int get_lphaser_xoffs();
device_sms_expansion_slot_interface *m_device;
diff --git a/src/emu/bus/vidbrain/exp.h b/src/emu/bus/vidbrain/exp.h
index c28ee41862a..2f1e7f67988 100644
--- a/src/emu/bus/vidbrain/exp.h
+++ b/src/emu/bus/vidbrain/exp.h
@@ -108,8 +108,8 @@ protected:
// ======================> videobrain_expansion_slot_device
class videobrain_expansion_slot_device : public device_t,
- public device_slot_interface,
- public device_image_interface
+ public device_slot_interface,
+ public device_image_interface
{
public:
// construction/destruction
diff --git a/src/emu/bus/wangpc/tig.c b/src/emu/bus/wangpc/tig.c
index 4c7b27dc0d9..3cefdc7614c 100644
--- a/src/emu/bus/wangpc/tig.c
+++ b/src/emu/bus/wangpc/tig.c
@@ -122,14 +122,14 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_tig )
MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
- MCFG_DEVICE_ADD(UPD7720_0_TAG, UPD7220, XTAL_52_832MHz/28)
+ MCFG_DEVICE_ADD(UPD7720_0_TAG, UPD7220, XTAL_52_832MHz/28)
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_0_map)
- MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(wangpc_tig_device, hgdc_draw_text)
+ MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(wangpc_tig_device, hgdc_draw_text)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MCFG_DEVICE_ADD(UPD7720_1_TAG, UPD7220, XTAL_52_832MHz/28)
MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_1_map)
- MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(wangpc_tig_device, hgdc_display_pixels)
+ MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(wangpc_tig_device, hgdc_display_pixels)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MACHINE_CONFIG_END
diff --git a/src/emu/bus/wangpc/tig.h b/src/emu/bus/wangpc/tig.h
index dae01f0a56d..bf73f97148a 100644
--- a/src/emu/bus/wangpc/tig.h
+++ b/src/emu/bus/wangpc/tig.h
@@ -61,7 +61,7 @@ private:
UINT8 m_option;
UINT8 m_attr[16];
UINT8 m_underline;
- required_device<palette_device> m_palette;
+ required_device<palette_device> m_palette;
};
diff --git a/src/emu/bus/wangpc/wangpc.h b/src/emu/bus/wangpc/wangpc.h
index 11af0a455ca..ea594b19413 100644
--- a/src/emu/bus/wangpc/wangpc.h
+++ b/src/emu/bus/wangpc/wangpc.h
@@ -82,7 +82,7 @@
class wangpcbus_device;
class wangpcbus_slot_device : public device_t,
- public device_slot_interface
+ public device_slot_interface
{
public:
// construction/destruction
diff --git a/src/emu/clifront.h b/src/emu/clifront.h
index dfa2bc721d9..8242f73ae40 100644
--- a/src/emu/clifront.h
+++ b/src/emu/clifront.h
@@ -114,7 +114,7 @@ private:
cli_options & m_options;
osd_interface & m_osd;
int m_result;
- UINT64 m_start_memory;
+ UINT64 m_start_memory;
};
diff --git a/src/emu/cpu/avr8/avr8.c b/src/emu/cpu/avr8/avr8.c
index d0589abfff6..730326fccd0 100644
--- a/src/emu/cpu/avr8/avr8.c
+++ b/src/emu/cpu/avr8/avr8.c
@@ -633,11 +633,11 @@ avr8_device::avr8_device(const machine_config &mconfig, const char *name, const
m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0, internal_map),
m_io_config("io", ENDIANNESS_LITTLE, 8, 4),
m_eeprom(NULL),
- m_cpu_type(cpu_type),
- m_lfuses(0x62),
- m_hfuses(0x99),
- m_efuses(0xFF),
- m_lock_bits(0xFF),
+ m_cpu_type(cpu_type),
+ m_lfuses(0x62),
+ m_hfuses(0x99),
+ m_efuses(0xFF),
+ m_lock_bits(0xFF),
m_pc(0),
m_spi_active(false),
m_spi_prescale(0),
@@ -649,12 +649,12 @@ avr8_device::avr8_device(const machine_config &mconfig, const char *name, const
{
// Allocate & setup
- for (int t=0; t<=5; t++){
+ for (int t=0; t<=5; t++){
m_timer_top[t] = 0;
m_timer_increment[t] = 1;
m_timer_prescale[t] = 0;
m_timer_prescale_count[t] = 0;
- }
+ }
}
@@ -675,7 +675,7 @@ void avr8_device::static_set_config(device_t &device, const avr8_config &config)
void avr8_device::set_low_fuses(const UINT8 byte)
{
- m_lfuses = byte;
+ m_lfuses = byte;
}
//-------------------------------------------------
@@ -684,7 +684,7 @@ void avr8_device::set_low_fuses(const UINT8 byte)
void avr8_device::set_high_fuses(const UINT8 byte)
{
- m_hfuses = byte;
+ m_hfuses = byte;
}
//-------------------------------------------------
@@ -693,7 +693,7 @@ void avr8_device::set_high_fuses(const UINT8 byte)
void avr8_device::set_extended_fuses(const UINT8 byte)
{
- m_efuses = byte;
+ m_efuses = byte;
}
//-------------------------------------------------
@@ -702,7 +702,7 @@ void avr8_device::set_extended_fuses(const UINT8 byte)
void avr8_device::set_lock_bits(const UINT8 byte)
{
- m_lock_bits = byte;
+ m_lock_bits = byte;
}
//-------------------------------------------------
@@ -841,26 +841,26 @@ void avr8_device::device_start()
void avr8_device::device_reset()
{
- logerror("AVR low fuse bits: 0x%02X\n", m_lfuses);
- logerror("AVR high fuse bits: 0x%02X\n", m_hfuses);
- logerror("AVR extended fuse bits: 0x%02X\n", m_efuses);
- logerror("AVR lock bits: 0x%02X\n", m_lock_bits);
-
- switch ((m_hfuses & (BOOTSZ1|BOOTSZ0)) >> 1){
- case 0: m_boot_size = 4096; break;
- case 1: m_boot_size = 2048; break;
- case 2: m_boot_size = 1024; break;
- case 3: m_boot_size = 512; break;
- default: break;
- }
-
- if (m_hfuses & BOOTRST){
- m_shifted_pc = 0x0000;
- logerror("Booting AVR core from address 0x0000\n");
- } else {
- m_shifted_pc = (m_addr_mask + 1) - 2*m_boot_size;
- logerror("AVR Boot loader section size: %d words\n", m_boot_size);
- }
+ logerror("AVR low fuse bits: 0x%02X\n", m_lfuses);
+ logerror("AVR high fuse bits: 0x%02X\n", m_hfuses);
+ logerror("AVR extended fuse bits: 0x%02X\n", m_efuses);
+ logerror("AVR lock bits: 0x%02X\n", m_lock_bits);
+
+ switch ((m_hfuses & (BOOTSZ1|BOOTSZ0)) >> 1){
+ case 0: m_boot_size = 4096; break;
+ case 1: m_boot_size = 2048; break;
+ case 2: m_boot_size = 1024; break;
+ case 3: m_boot_size = 512; break;
+ default: break;
+ }
+
+ if (m_hfuses & BOOTRST){
+ m_shifted_pc = 0x0000;
+ logerror("Booting AVR core from address 0x0000\n");
+ } else {
+ m_shifted_pc = (m_addr_mask + 1) - 2*m_boot_size;
+ logerror("AVR Boot loader section size: %d words\n", m_boot_size);
+ }
for (int i = 0; i < 0x200; i++)
{
@@ -871,12 +871,12 @@ void avr8_device::device_reset()
m_spi_prescale = 0;
m_spi_prescale_count = 0;
- for (int t=0; t<=5; t++){
+ for (int t=0; t<=5; t++){
m_timer_top[t] = 0;
m_timer_increment[t] = 1;
m_timer_prescale[t] = 0;
m_timer_prescale_count[t] = 0;
- }
+ }
m_interrupt_pending = false;
m_elapsed_cycles = 0;
@@ -1136,31 +1136,31 @@ void avr8_device::timer_tick(int cycles)
}
}
- for (int t=0; t<=5; t++){
- if (m_timer_prescale[t] != 0)
- {
- m_timer_prescale_count[t]++;
- if (m_timer_prescale_count[t] >= m_timer_prescale[t])
- {
- switch (t){
- case 0: timer0_tick(); break;
- case 1: timer1_tick(); break;
- case 2: timer2_tick(); break;
- case 3: timer3_tick(); break;
- case 4: timer4_tick(); break;
- case 5: timer5_tick(); break;
- }
- m_timer_prescale_count[t] -= m_timer_prescale[t];
- }
- }
- }
+ for (int t=0; t<=5; t++){
+ if (m_timer_prescale[t] != 0)
+ {
+ m_timer_prescale_count[t]++;
+ if (m_timer_prescale_count[t] >= m_timer_prescale[t])
+ {
+ switch (t){
+ case 0: timer0_tick(); break;
+ case 1: timer1_tick(); break;
+ case 2: timer2_tick(); break;
+ case 3: timer3_tick(); break;
+ case 4: timer4_tick(); break;
+ case 5: timer5_tick(); break;
+ }
+ m_timer_prescale_count[t] -= m_timer_prescale[t];
+ }
+ }
+ }
}
}
-// UINT8 ocr0[2] = { m_r[AVR8_REGIDX_OCR0A], m_r[AVR8_REGIDX_OCR0B] };
-//TODO UINT8 ocf0[2] = { (1 << AVR8_TIFR0_OCF0A_SHIFT), (1 << AVR8_TIFR4_OCF0B_SHIFT) };
-//TODO UINT8 int0[2] = { AVR8_INTIDX_OCF0A, AVR8_INTIDX_OCF0B };
+// UINT8 ocr0[2] = { m_r[AVR8_REGIDX_OCR0A], m_r[AVR8_REGIDX_OCR0B] };
+//TODO UINT8 ocf0[2] = { (1 << AVR8_TIFR0_OCF0A_SHIFT), (1 << AVR8_TIFR4_OCF0B_SHIFT) };
+//TODO UINT8 int0[2] = { AVR8_INTIDX_OCF0A, AVR8_INTIDX_OCF0B };
#define LOG_TIMER_0 0
#define LOG_TIMER_5 1
@@ -1168,8 +1168,8 @@ void avr8_device::timer_tick(int cycles)
void avr8_device::timer0_tick()
{
#if LOG_TIMER_0
- printf("AVR8_WGM0: %d\n", AVR8_WGM0);
- printf("AVR8_TCCR0A_COM0B: %d\n", AVR8_TCCR0A_COM0B);
+ printf("AVR8_WGM0: %d\n", AVR8_WGM0);
+ printf("AVR8_TCCR0A_COM0B: %d\n", AVR8_TCCR0A_COM0B);
#endif
UINT8 count = m_r[AVR8_REGIDX_TCNT0];
@@ -1178,69 +1178,69 @@ void avr8_device::timer0_tick()
switch(AVR8_WGM0)
{
case WGM02_NORMAL:
- printf("WGM02_NORMAL: Unimplemented timer#0 waveform generation mode\n");
- break;
+ printf("WGM02_NORMAL: Unimplemented timer#0 waveform generation mode\n");
+ break;
case WGM02_PWM_PC:
- printf("WGM02_PWM_PC: Unimplemented timer#0 waveform generation mode\n");
- break;
+ printf("WGM02_PWM_PC: Unimplemented timer#0 waveform generation mode\n");
+ break;
case WGM02_CTC_CMP:
- switch(AVR8_TCCR0A_COM0B){
- case 0: /* Normal Operation */
- if (count == m_timer_top[0]){
- m_timer_top[0] = 0;
- }
- break;
- case 1: /* Toggle OC0B on compare match */
- if (count == m_timer_top[0]){
- m_timer_top[0] = 0;
+ switch(AVR8_TCCR0A_COM0B){
+ case 0: /* Normal Operation */
+ if (count == m_timer_top[0]){
+ m_timer_top[0] = 0;
+ }
+ break;
+ case 1: /* Toggle OC0B on compare match */
+ if (count == m_timer_top[0]){
+ m_timer_top[0] = 0;
#if LOG_TIMER_0
- printf("[0] Toggle OC0B\n");
+ printf("[0] Toggle OC0B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) ^ (1 << 5));
- }
- break;
- case 2: /* Clear OC0B on compare match */
- if (count == m_timer_top[0]){
- m_timer_top[0] = 0;
- //Clear OC0B
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) ^ (1 << 5));
+ }
+ break;
+ case 2: /* Clear OC0B on compare match */
+ if (count == m_timer_top[0]){
+ m_timer_top[0] = 0;
+ //Clear OC0B
#if LOG_TIMER_0
- printf("[0] Clear OC0B\n");
+ printf("[0] Clear OC0B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
- }
- break;
- case 3: /* Set OC0B on compare match */
- if (count == m_timer_top[0]){
- m_timer_top[0] = 0;
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
+ }
+ break;
+ case 3: /* Set OC0B on compare match */
+ if (count == m_timer_top[0]){
+ m_timer_top[0] = 0;
#if LOG_TIMER_0
- printf("[0] Set OC0B\n");
+ printf("[0] Set OC0B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
- }
- break;
- }
- break;
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
+ }
+ break;
+ }
+ break;
case WGM02_FAST_PWM:
- printf("WGM02_FAST_PWM: Unimplemented timer#0 waveform generation mode\n");
- break;
+ printf("WGM02_FAST_PWM: Unimplemented timer#0 waveform generation mode\n");
+ break;
case WGM02_PWM_PC_CMP:
- printf("WGM02_PWM_PC_CMP: Unimplemented timer#0 waveform generation mode\n");
- break;
+ printf("WGM02_PWM_PC_CMP: Unimplemented timer#0 waveform generation mode\n");
+ break;
case WGM02_FAST_PWM_CMP:
- printf("WGM02_FAST_PWM_CMP: Unimplemented timer#0 waveform generation mode\n");
- break;
+ printf("WGM02_FAST_PWM_CMP: Unimplemented timer#0 waveform generation mode\n");
+ break;
default:
verboselog(m_pc, 0, "update_timer0_compare_mode: Unknown waveform generation mode: %02x\n", AVR8_WGM0);
break;
}
- count = count & 0xff;
+ count = count & 0xff;
count += increment;
m_r[AVR8_REGIDX_TCNT0] = count & 0xff;
@@ -1268,7 +1268,7 @@ void avr8_device::timer0_force_output_compare(int reg)
void avr8_device::changed_tccr0b(UINT8 data)
{
- if (VERBOSE_LEVEL) printf("changed_tccr0b: data=0x%02X\n", data);
+ if (VERBOSE_LEVEL) printf("changed_tccr0b: data=0x%02X\n", data);
UINT8 oldtccr = AVR8_TCCR0B;
UINT8 newtccr = data;
@@ -1415,57 +1415,57 @@ void avr8_device::timer1_tick()
void avr8_device::update_timer_waveform_gen_mode(UINT8 t, UINT8 mode)
{
- INT32 oc_val = -1, ic_val = -1;
-
- switch (t){
- case 0:
- oc_val = AVR8_OCR0A;
- ic_val = -1;
- break;
- case 1:
- oc_val = AVR8_OCR1A;
- ic_val = AVR8_ICR1;
- break;
- case 2:
- oc_val = AVR8_OCR2A;
- ic_val = -1;
- break;
- case 3:
- oc_val = AVR8_OCR3A;
- ic_val = AVR8_ICR3;
- break;
- case 4:
- oc_val = AVR8_OCR4A;
- ic_val = AVR8_ICR4;
- break;
- case 5:
- oc_val = AVR8_OCR5A;
- ic_val = AVR8_ICR5;
- break;
- }
-
- INT32 top_values_02[8] = {0xFF, 0xFF, oc_val, 0xFF, -1, oc_val, -1, oc_val}; //table 20-8
-
- INT32 top_values_1345[16] = {0xFFFF, 0x00FF, 0x01FF, 0x03FF,
- oc_val, 0x00FF, 0x01FF, 0x03FF,
- ic_val, oc_val, ic_val, oc_val,
- ic_val, -1, ic_val, oc_val}; //table 17-2
-
- switch(t){
- case 0:
- case 2:
- m_timer_top[t] = top_values_02[mode];
- break;
- case 1:
- case 3:
- case 4:
- case 5:
- m_timer_top[t] = top_values_1345[mode];
- break;
- }
-
- if (m_timer_top[t] == -1){
- m_timer_top[t] = 0;
+ INT32 oc_val = -1, ic_val = -1;
+
+ switch (t){
+ case 0:
+ oc_val = AVR8_OCR0A;
+ ic_val = -1;
+ break;
+ case 1:
+ oc_val = AVR8_OCR1A;
+ ic_val = AVR8_ICR1;
+ break;
+ case 2:
+ oc_val = AVR8_OCR2A;
+ ic_val = -1;
+ break;
+ case 3:
+ oc_val = AVR8_OCR3A;
+ ic_val = AVR8_ICR3;
+ break;
+ case 4:
+ oc_val = AVR8_OCR4A;
+ ic_val = AVR8_ICR4;
+ break;
+ case 5:
+ oc_val = AVR8_OCR5A;
+ ic_val = AVR8_ICR5;
+ break;
+ }
+
+ INT32 top_values_02[8] = {0xFF, 0xFF, oc_val, 0xFF, -1, oc_val, -1, oc_val}; //table 20-8
+
+ INT32 top_values_1345[16] = {0xFFFF, 0x00FF, 0x01FF, 0x03FF,
+ oc_val, 0x00FF, 0x01FF, 0x03FF,
+ ic_val, oc_val, ic_val, oc_val,
+ ic_val, -1, ic_val, oc_val}; //table 17-2
+
+ switch(t){
+ case 0:
+ case 2:
+ m_timer_top[t] = top_values_02[mode];
+ break;
+ case 1:
+ case 3:
+ case 4:
+ case 5:
+ m_timer_top[t] = top_values_1345[mode];
+ break;
+ }
+
+ if (m_timer_top[t] == -1){
+ m_timer_top[t] = 0;
printf("update_timer_waveform_gen_mode: Timer #%d - Unsupported waveform generation type: %d\n", t, mode);
}
}
@@ -1497,7 +1497,7 @@ void avr8_device::update_timer1_input_edge_select()
void avr8_device::changed_tccr1b(UINT8 data)
{
- if (VERBOSE_LEVEL) printf("changed_tccr1b: data=0x%02X\n", data);
+ if (VERBOSE_LEVEL) printf("changed_tccr1b: data=0x%02X\n", data);
UINT8 oldtccr = AVR8_TCCR1B;
UINT8 newtccr = data;
@@ -1651,7 +1651,7 @@ void avr8_device::timer2_force_output_compare(int reg)
void avr8_device::changed_tccr2b(UINT8 data)
{
- if (VERBOSE_LEVEL) printf("changed_tccr2b: data=0x%02X\n", data);
+ if (VERBOSE_LEVEL) printf("changed_tccr2b: data=0x%02X\n", data);
UINT8 oldtccr = AVR8_TCCR2B;
UINT8 newtccr = data;
@@ -1711,8 +1711,8 @@ void avr8_device::timer4_tick()
//(m_r[AVR8_REGIDX_TCCR1A] & AVR8_TCCR1A_COM1B_MASK) >> AVR8_TCCR1A_COM1B_SHIFT };
UINT16 ocr4[2] = { (m_r[AVR8_REGIDX_OCR4AH] << 8) | m_r[AVR8_REGIDX_OCR4AL],
(m_r[AVR8_REGIDX_OCR4BH] << 8) | m_r[AVR8_REGIDX_OCR4BL] };
-//TODO UINT8 ocf4[2] = { (1 << AVR8_TIFR4_OCF4A_SHIFT), (1 << AVR8_TIFR4_OCF4B_SHIFT) };
-//TODO UINT8 int4[2] = { AVR8_INTIDX_OCF4A, AVR8_INTIDX_OCF4B };
+//TODO UINT8 ocf4[2] = { (1 << AVR8_TIFR4_OCF4A_SHIFT), (1 << AVR8_TIFR4_OCF4B_SHIFT) };
+//TODO UINT8 int4[2] = { AVR8_INTIDX_OCF4A, AVR8_INTIDX_OCF4B };
INT32 increment = m_timer_increment[4];
switch(AVR8_WGM4)
@@ -1720,38 +1720,38 @@ void avr8_device::timer4_tick()
case WGM4_FAST_PWM_8:
case WGM4_FAST_PWM_9:
case WGM4_FAST_PWM_10:
- switch(AVR8_TCCR4A_COM4B){
- case 0: /* Normal Operation */
- break;
- case 1: /* TODO */
- break;
- case 2: /* Non-inverting mode */
- if (count == m_timer_top[4]){
- //Clear OC0B
- printf("[2] Clear OC0B\n");
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
- } else if (count == 0){
- //Set OC0B
- printf("[2] Set OC0B\n");
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
- }
- break;
- case 3: /* Inverting mode */
- if (count == m_timer_top[4]){
- //Set OC0B
- printf("[3] Set OC0B\n");
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
- } else if (count == 0){
- //Clear OC0B
- printf("[3] Clear OC0B\n");
- m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
- }
- break;
- }
- break;
+ switch(AVR8_TCCR4A_COM4B){
+ case 0: /* Normal Operation */
+ break;
+ case 1: /* TODO */
+ break;
+ case 2: /* Non-inverting mode */
+ if (count == m_timer_top[4]){
+ //Clear OC0B
+ printf("[2] Clear OC0B\n");
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
+ } else if (count == 0){
+ //Set OC0B
+ printf("[2] Set OC0B\n");
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
+ }
+ break;
+ case 3: /* Inverting mode */
+ if (count == m_timer_top[4]){
+ //Set OC0B
+ printf("[3] Set OC0B\n");
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) | (1 << 5));
+ } else if (count == 0){
+ //Clear OC0B
+ printf("[3] Clear OC0B\n");
+ m_io->write_byte(AVR8_IO_PORTG, m_io->read_byte(AVR8_IO_PORTG) & ~(1 << 5));
+ }
+ break;
+ }
+ break;
case WGM4_CTC_OCR:
- //printf("[T4] tick WGM4_CTC_OCR: %d\n", count);
+ //printf("[T4] tick WGM4_CTC_OCR: %d\n", count);
if (count == 0xffff)
{
m_r[AVR8_REGIDX_TIFR4] |= AVR8_TIFR4_TOV4_MASK;
@@ -1785,15 +1785,15 @@ void avr8_device::timer4_tick()
void avr8_device::update_timer_clock_source(UINT8 t, UINT8 clock_select)
{
- int prescale_values[8] = {0, 1, 8, 64, 256, 1024, -1, -1};
+ int prescale_values[8] = {0, 1, 8, 64, 256, 1024, -1, -1};
m_timer_prescale[t] = prescale_values[clock_select];
- if (VERBOSE_LEVEL) printf("update_timer_clock_source: t=%d cs=%d\n", t, clock_select);
+ if (VERBOSE_LEVEL) printf("update_timer_clock_source: t=%d cs=%d\n", t, clock_select);
- if (m_timer_prescale[t] == 0xFFFF){
- printf("[Timer #%d]: update_timer_clock_source: External trigger mode not implemented yet\n", t);
- m_timer_prescale[t] = 0;
- }
+ if (m_timer_prescale[t] == 0xFFFF){
+ printf("[Timer #%d]: update_timer_clock_source: External trigger mode not implemented yet\n", t);
+ m_timer_prescale[t] = 0;
+ }
if (m_timer_prescale_count[t] > m_timer_prescale[t])
m_timer_prescale_count[t] = m_timer_prescale[t] - 1;
@@ -1801,25 +1801,25 @@ void avr8_device::update_timer_clock_source(UINT8 t, UINT8 clock_select)
void avr8_device::changed_tccr3a(UINT8 data)
{
- //TODO: Implement-me
-// AVR8_TCCR3A = data;
+ //TODO: Implement-me
+// AVR8_TCCR3A = data;
}
void avr8_device::changed_tccr3b(UINT8 data)
{
- printf("IMPLEMENT-ME: changed_tccr4b: data=0x%02X\n", data);
+ printf("IMPLEMENT-ME: changed_tccr4b: data=0x%02X\n", data);
}
void avr8_device::changed_tccr3c(UINT8 data)
{
-// UINT8 oldtccr = AVR8_TCCR3C;
-// UINT8 newtccr = data;
-// UINT8 changed = newtccr ^ oldtccr;
- printf("IMPLEMENT-ME: changed_tccr3c: data=0x%02X\n", data);
+// UINT8 oldtccr = AVR8_TCCR3C;
+// UINT8 newtccr = data;
+// UINT8 changed = newtccr ^ oldtccr;
+ printf("IMPLEMENT-ME: changed_tccr3c: data=0x%02X\n", data);
-// AVR8_TCCR3C = data;
+// AVR8_TCCR3C = data;
- //TODO: Implement-me
+ //TODO: Implement-me
}
void avr8_device::changed_tccr4a(UINT8 data)
@@ -1838,7 +1838,7 @@ void avr8_device::changed_tccr4a(UINT8 data)
void avr8_device::changed_tccr4b(UINT8 data)
{
- printf("changed_tccr4b: data=0x%02X\n", data);
+ printf("changed_tccr4b: data=0x%02X\n", data);
UINT8 oldtccr = AVR8_TCCR4B;
UINT8 newtccr = data;
@@ -1849,13 +1849,13 @@ void avr8_device::changed_tccr4b(UINT8 data)
if(changed & AVR8_TCCR4B_FOC4A_MASK)
{
// TODO
-// timer4_force_output_compare(AVR8_REG_A);
+// timer4_force_output_compare(AVR8_REG_A);
}
if(changed & AVR8_TCCR4B_FOC4B_MASK)
{
// TODO
-// timer4_force_output_compare(AVR8_REG_B);
+// timer4_force_output_compare(AVR8_REG_B);
}
if(changed & AVR8_TCCR4B_WGM4_32_MASK)
@@ -1871,13 +1871,13 @@ void avr8_device::changed_tccr4b(UINT8 data)
void avr8_device::changed_tccr4c(UINT8 data)
{
-// UINT8 oldtccr = AVR8_TCCR4C;
-// UINT8 newtccr = data;
-// UINT8 changed = newtccr ^ oldtccr;
+// UINT8 oldtccr = AVR8_TCCR4C;
+// UINT8 newtccr = data;
+// UINT8 changed = newtccr ^ oldtccr;
AVR8_TCCR4C = data;
- //TODO: Implement-me
+ //TODO: Implement-me
}
/************************************************************************************************/
@@ -1886,8 +1886,8 @@ void avr8_device::changed_tccr4c(UINT8 data)
void avr8_device::timer5_tick()
{
#if LOG_TIMER_5
- printf("AVR8_WGM5: %d\n", AVR8_WGM5);
- printf("AVR8_TCCR5A_COM5B: %d\n", AVR8_TCCR5A_COM5B);
+ printf("AVR8_WGM5: %d\n", AVR8_WGM5);
+ printf("AVR8_TCCR5A_COM5B: %d\n", AVR8_TCCR5A_COM5B);
#endif
UINT16 count = (AVR8_TCNT5H << 8) + AVR8_TCNT5L;
@@ -1896,64 +1896,64 @@ void avr8_device::timer5_tick()
switch(AVR8_WGM5)
{
case WGM5_NORMAL:
- case WGM5_PWM_8_PC:
- case WGM5_PWM_9_PC:
- case WGM5_PWM_10_PC:
+ case WGM5_PWM_8_PC:
+ case WGM5_PWM_9_PC:
+ case WGM5_PWM_10_PC:
// case WGM5_CTC_OCR:
- case WGM5_FAST_PWM_8:
- case WGM5_FAST_PWM_9:
- case WGM5_FAST_PWM_10:
- case WGM5_PWM_PFC_ICR:
- case WGM5_PWM_PFC_OCR:
- case WGM5_PWM_PC_ICR:
- case WGM5_PWM_PC_OCR:
- case WGM5_CTC_ICR:
- case WGM5_FAST_PWM_ICR:
- case WGM5_FAST_PWM_OCR:
- printf("Unimplemented timer#5 waveform generation mode: WGMM5=0x%02X\n", AVR8_WGM5);
- break;
+ case WGM5_FAST_PWM_8:
+ case WGM5_FAST_PWM_9:
+ case WGM5_FAST_PWM_10:
+ case WGM5_PWM_PFC_ICR:
+ case WGM5_PWM_PFC_OCR:
+ case WGM5_PWM_PC_ICR:
+ case WGM5_PWM_PC_OCR:
+ case WGM5_CTC_ICR:
+ case WGM5_FAST_PWM_ICR:
+ case WGM5_FAST_PWM_OCR:
+ printf("Unimplemented timer#5 waveform generation mode: WGMM5=0x%02X\n", AVR8_WGM5);
+ break;
case WGM5_CTC_OCR:
- //TODO: verify this! Can be very wrong!!!
- switch(AVR8_TCCR5A_COM5B){
- case 0: /* Normal Operation */
- if (count == m_timer_top[5]){
- m_timer_top[5] = 0;
- }
- break;
- case 1: /* Toggle OC5B on compare match */
- if (count == m_timer_top[5]){
- m_timer_top[5] = 0;
+ //TODO: verify this! Can be very wrong!!!
+ switch(AVR8_TCCR5A_COM5B){
+ case 0: /* Normal Operation */
+ if (count == m_timer_top[5]){
+ m_timer_top[5] = 0;
+ }
+ break;
+ case 1: /* Toggle OC5B on compare match */
+ if (count == m_timer_top[5]){
+ m_timer_top[5] = 0;
#if LOG_TIMER_5
- printf("[5] Toggle OC5B\n");
+ printf("[5] Toggle OC5B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) ^ (1 << 4));
- }
- break;
- case 2: /* Clear OC5B on compare match */
- if (count == m_timer_top[5]){
- m_timer_top[5] = 0;
- //Clear OC5B
+ m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) ^ (1 << 4));
+ }
+ break;
+ case 2: /* Clear OC5B on compare match */
+ if (count == m_timer_top[5]){
+ m_timer_top[5] = 0;
+ //Clear OC5B
#if LOG_TIMER_5
- printf("[5] Clear OC5B\n");
+ printf("[5] Clear OC5B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) & ~(1 << 4));
- }
- break;
- case 3: /* Set OC5B on compare match */
- if (count == m_timer_top[5]){
- m_timer_top[5] = 0;
+ m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) & ~(1 << 4));
+ }
+ break;
+ case 3: /* Set OC5B on compare match */
+ if (count == m_timer_top[5]){
+ m_timer_top[5] = 0;
#if LOG_TIMER_5
- printf("[5] Set OC5B\n");
+ printf("[5] Set OC5B\n");
#endif
- m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) | (1 << 4));
- }
- break;
- }
- break;
+ m_io->write_byte(AVR8_IO_PORTL, m_io->read_byte(AVR8_IO_PORTL) | (1 << 4));
+ }
+ break;
+ }
+ break;
default:
- printf("Timer #5: Unknown waveform generation mode: %02x\n", AVR8_WGM5);
+ printf("Timer #5: Unknown waveform generation mode: %02x\n", AVR8_WGM5);
break;
}
@@ -1978,7 +1978,7 @@ void avr8_device::changed_tccr5a(UINT8 data)
void avr8_device::changed_tccr5b(UINT8 data)
{
- printf("changed_tccr5b: data=0x%02X\n", data);
+ printf("changed_tccr5b: data=0x%02X\n", data);
UINT8 oldtccr = AVR8_TCCR5B;
UINT8 newtccr = data;
@@ -1989,19 +1989,19 @@ void avr8_device::changed_tccr5b(UINT8 data)
if(changed & AVR8_TCCR5C_FOC5A_MASK)
{
// TODO
-// timer5_force_output_compare(AVR8_REG_A);
+// timer5_force_output_compare(AVR8_REG_A);
}
if(changed & AVR8_TCCR5C_FOC5B_MASK)
{
// TODO
-// timer5_force_output_compare(AVR8_REG_B);
+// timer5_force_output_compare(AVR8_REG_B);
}
if(changed & AVR8_TCCR5C_FOC5C_MASK)
{
// TODO
-// timer5_force_output_compare(AVR8_REG_C);
+// timer5_force_output_compare(AVR8_REG_C);
}
if(changed & AVR8_TCCR5B_WGM5_32_MASK)
@@ -2160,66 +2160,66 @@ WRITE8_MEMBER( avr8_device::regs_w )
break;
case AVR8_REGIDX_PORTA:
- m_io->write_byte(AVR8_IO_PORTA, data);
- m_r[AVR8_REGIDX_PORTA] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTA, data);
+ m_r[AVR8_REGIDX_PORTA] = data;
+ break;
case AVR8_REGIDX_PORTB:
- m_io->write_byte(AVR8_IO_PORTB, data);
- m_r[AVR8_REGIDX_PORTB] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTB, data);
+ m_r[AVR8_REGIDX_PORTB] = data;
+ break;
case AVR8_REGIDX_PORTC:
- m_io->write_byte(AVR8_IO_PORTC, data);
- m_r[AVR8_REGIDX_PORTC] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTC, data);
+ m_r[AVR8_REGIDX_PORTC] = data;
+ break;
case AVR8_REGIDX_PORTD:
- m_io->write_byte(AVR8_IO_PORTD, data);
- m_r[AVR8_REGIDX_PORTD] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTD, data);
+ m_r[AVR8_REGIDX_PORTD] = data;
+ break;
case AVR8_REGIDX_PORTE:
- m_io->write_byte(AVR8_IO_PORTE, data);
- m_r[AVR8_REGIDX_PORTE] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTE, data);
+ m_r[AVR8_REGIDX_PORTE] = data;
+ break;
case AVR8_REGIDX_PORTF:
- m_io->write_byte(AVR8_IO_PORTF, data);
- m_r[AVR8_REGIDX_PORTF] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTF, data);
+ m_r[AVR8_REGIDX_PORTF] = data;
+ break;
case AVR8_REGIDX_PORTG:
- m_io->write_byte(AVR8_IO_PORTG, data);
- m_r[AVR8_REGIDX_PORTG] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTG, data);
+ m_r[AVR8_REGIDX_PORTG] = data;
+ break;
case AVR8_REGIDX_PORTH:
- m_io->write_byte(AVR8_IO_PORTH, data);
- m_r[AVR8_REGIDX_PORTH] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTH, data);
+ m_r[AVR8_REGIDX_PORTH] = data;
+ break;
case AVR8_REGIDX_PORTJ:
- m_io->write_byte(AVR8_IO_PORTJ, data);
- m_r[AVR8_REGIDX_PORTJ] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTJ, data);
+ m_r[AVR8_REGIDX_PORTJ] = data;
+ break;
case AVR8_REGIDX_PORTK:
- m_io->write_byte(AVR8_IO_PORTK, data);
- m_r[AVR8_REGIDX_PORTK] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTK, data);
+ m_r[AVR8_REGIDX_PORTK] = data;
+ break;
case AVR8_REGIDX_PORTL:
- m_io->write_byte(AVR8_IO_PORTL, data);
- m_r[AVR8_REGIDX_PORTL] = data;
- break;
+ m_io->write_byte(AVR8_IO_PORTL, data);
+ m_r[AVR8_REGIDX_PORTL] = data;
+ break;
case AVR8_REGIDX_DDRA:
case AVR8_REGIDX_DDRB:
case AVR8_REGIDX_DDRC:
case AVR8_REGIDX_DDRD:
case AVR8_REGIDX_SREG:
- case AVR8_REGIDX_RAMPZ:
+ case AVR8_REGIDX_RAMPZ:
case AVR8_REGIDX_SPH:
case AVR8_REGIDX_SPL:
m_r[offset] = data;
@@ -2287,7 +2287,7 @@ WRITE8_MEMBER( avr8_device::regs_w )
case AVR8_REGIDX_EEARH:
case AVR8_REGIDX_EEDR:
m_r[offset] = data;
- break;
+ break;
case AVR8_REGIDX_EECR:
m_r[offset] = data;
@@ -2297,17 +2297,17 @@ WRITE8_MEMBER( avr8_device::regs_w )
UINT16 addr = (m_r[AVR8_REGIDX_EEARH] & AVR8_EEARH_MASK) << 8;
addr |= m_r[AVR8_REGIDX_EEARL];
m_r[AVR8_REGIDX_EEDR] = m_eeprom[addr];
- if (VERBOSE_LEVEL) printf("EEPROM read @ 0x%04x data = 0x%02x\n", addr, m_eeprom[addr]);
+ if (VERBOSE_LEVEL) printf("EEPROM read @ 0x%04x data = 0x%02x\n", addr, m_eeprom[addr]);
}
if ((data & AVR8_EECR_EEPE_MASK) && (data & AVR8_EECR_EEMPE_MASK))
{
UINT16 addr = (m_r[AVR8_REGIDX_EEARH] & AVR8_EEARH_MASK) << 8;
addr |= m_r[AVR8_REGIDX_EEARL];
m_eeprom[addr] = m_r[AVR8_REGIDX_EEDR];
- if (VERBOSE_LEVEL) printf("EEPROM write @ 0x%04x data = 0x%02x ('%c')\n", addr, m_eeprom[addr], m_eeprom[addr]);
+ if (VERBOSE_LEVEL) printf("EEPROM write @ 0x%04x data = 0x%02x ('%c')\n", addr, m_eeprom[addr], m_eeprom[addr]);
- m_r[offset] = data & ~AVR8_EECR_EEPE_MASK; //indicates that we've finished writing a value to the EEPROM.
- //TODO: shouldn't this happen only after a certain dalay?
+ m_r[offset] = data & ~AVR8_EECR_EEPE_MASK; //indicates that we've finished writing a value to the EEPROM.
+ //TODO: shouldn't this happen only after a certain dalay?
}
break;
@@ -2338,60 +2338,60 @@ WRITE8_MEMBER( avr8_device::regs_w )
break;
}
- case AVR8_REGIDX_WDTCSR:
+ case AVR8_REGIDX_WDTCSR:
verboselog(m_pc, 0, "AVR8: WDTCSR = %02x\n", data );
- //TODO: changed_wdtcsr(data);
- break;
+ //TODO: changed_wdtcsr(data);
+ break;
- case AVR8_REGIDX_CLKPR:
+ case AVR8_REGIDX_CLKPR:
verboselog(m_pc, 0, "AVR8: CLKPR = %02x\n", data );
- //TODO: changed_clkpr(data);
- break;
+ //TODO: changed_clkpr(data);
+ break;
- case AVR8_REGIDX_PRR0:
+ case AVR8_REGIDX_PRR0:
verboselog(m_pc, 0, "AVR8: PRR0 = %02x\n", data );
- //TODO: changed_prr0(data);
- break;
+ //TODO: changed_prr0(data);
+ break;
- case AVR8_REGIDX_PRR1:
+ case AVR8_REGIDX_PRR1:
verboselog(m_pc, 0, "AVR8: PRR1 = %02x\n", data );
- //TODO: changed_prr1(data);
- break;
+ //TODO: changed_prr1(data);
+ break;
- case AVR8_REGIDX_OSCCAL:
+ case AVR8_REGIDX_OSCCAL:
verboselog(m_pc, 0, "AVR8: OSCCAL = %02x\n", data );
- //TODO: changed_osccal(data);
- break;
+ //TODO: changed_osccal(data);
+ break;
- case AVR8_REGIDX_PCICR:
+ case AVR8_REGIDX_PCICR:
verboselog(m_pc, 0, "AVR8: PCICR = %02x\n", data );
- //TODO: changed_pcicr(data);
- break;
+ //TODO: changed_pcicr(data);
+ break;
- case AVR8_REGIDX_EICRA:
+ case AVR8_REGIDX_EICRA:
verboselog(m_pc, 0, "AVR8: EICRA = %02x\n", data );
- //TODO: changed_eicra(data);
- break;
+ //TODO: changed_eicra(data);
+ break;
- case AVR8_REGIDX_EICRB:
+ case AVR8_REGIDX_EICRB:
verboselog(m_pc, 0, "AVR8: EICRB = %02x\n", data );
- //TODO: changed_eicrb(data);
- break;
+ //TODO: changed_eicrb(data);
+ break;
- case AVR8_REGIDX_PCMSK0:
+ case AVR8_REGIDX_PCMSK0:
verboselog(m_pc, 0, "AVR8: PCMSK0 = %02x\n", data );
- //TODO: changed_pcmsk0(data);
- break;
+ //TODO: changed_pcmsk0(data);
+ break;
- case AVR8_REGIDX_PCMSK1:
+ case AVR8_REGIDX_PCMSK1:
verboselog(m_pc, 0, "AVR8: PCMSK1 = %02x\n", data );
- //TODO: changed_pcmsk1(data);
- break;
+ //TODO: changed_pcmsk1(data);
+ break;
- case AVR8_REGIDX_PCMSK2:
+ case AVR8_REGIDX_PCMSK2:
verboselog(m_pc, 0, "AVR8: PCMSK2 = %02x\n", data );
- //TODO: changed_pcmsk2(data);
- break;
+ //TODO: changed_pcmsk2(data);
+ break;
case AVR8_REGIDX_TIMSK0:
verboselog(m_pc, 0, "AVR8: TIMSK0 = %02x\n", data );
@@ -2442,55 +2442,55 @@ WRITE8_MEMBER( avr8_device::regs_w )
update_interrupt(AVR8_INTIDX_TOV5);
break;
- case AVR8_REGIDX_XMCRA:
+ case AVR8_REGIDX_XMCRA:
verboselog(m_pc, 0, "AVR8: XMCRA = %02x\n", data );
- //TODO: changed_xmcra(data);
- break;
+ //TODO: changed_xmcra(data);
+ break;
- case AVR8_REGIDX_XMCRB:
+ case AVR8_REGIDX_XMCRB:
verboselog(m_pc, 0, "AVR8: XMCRB = %02x\n", data );
- //TODO: changed_xmcrb(data);
- break;
+ //TODO: changed_xmcrb(data);
+ break;
- case AVR8_REGIDX_ADCL:
+ case AVR8_REGIDX_ADCL:
verboselog(m_pc, 0, "AVR8: ADCL = %02x\n", data );
- //TODO: changed_adcl(data);
- break;
+ //TODO: changed_adcl(data);
+ break;
- case AVR8_REGIDX_ADCH:
+ case AVR8_REGIDX_ADCH:
verboselog(m_pc, 0, "AVR8: ADCH = %02x\n", data );
- //TODO: changed_adch(data);
- break;
+ //TODO: changed_adch(data);
+ break;
- case AVR8_REGIDX_ADCSRA:
+ case AVR8_REGIDX_ADCSRA:
verboselog(m_pc, 0, "AVR8: ADCSRA = %02x\n", data );
- //TODO: changed_adcsra(data);
- break;
+ //TODO: changed_adcsra(data);
+ break;
- case AVR8_REGIDX_ADCSRB:
+ case AVR8_REGIDX_ADCSRB:
verboselog(m_pc, 0, "AVR8: ADCSRB = %02x\n", data );
- //TODO: changed_adcsrb(data);
- break;
+ //TODO: changed_adcsrb(data);
+ break;
- case AVR8_REGIDX_ADMUX:
+ case AVR8_REGIDX_ADMUX:
verboselog(m_pc, 0, "AVR8: ADMUX = %02x\n", data );
- //TODO: changed_admux(data);
- break;
+ //TODO: changed_admux(data);
+ break;
- case AVR8_REGIDX_DIDR0:
+ case AVR8_REGIDX_DIDR0:
verboselog(m_pc, 0, "AVR8: DIDR0 = %02x\n", data );
- //TODO: changed_didr0(data);
- break;
+ //TODO: changed_didr0(data);
+ break;
- case AVR8_REGIDX_DIDR1:
+ case AVR8_REGIDX_DIDR1:
verboselog(m_pc, 0, "AVR8: DIDR1 = %02x\n", data );
- //TODO: changed_didr1(data);
- break;
+ //TODO: changed_didr1(data);
+ break;
- case AVR8_REGIDX_DIDR2:
+ case AVR8_REGIDX_DIDR2:
verboselog(m_pc, 0, "AVR8: DIDR2 = %02x\n", data );
- //TODO: changed_didr2(data);
- break;
+ //TODO: changed_didr2(data);
+ break;
case AVR8_REGIDX_TCCR1A:
verboselog(m_pc, 0, "AVR8: TCCR1A = %02x\n", data );
@@ -2577,17 +2577,17 @@ WRITE8_MEMBER( avr8_device::regs_w )
case AVR8_REGIDX_TCCR3A:
verboselog(m_pc, 0, "AVR8: TCCR3A = %02x\n", data );
- changed_tccr3a(data);
+ changed_tccr3a(data);
break;
case AVR8_REGIDX_TCCR3B:
verboselog(m_pc, 0, "AVR8: TCCR3B = %02x\n", data );
- changed_tccr3b(data);
+ changed_tccr3b(data);
break;
case AVR8_REGIDX_TCCR3C:
verboselog(m_pc, 0, "AVR8: TCCR3C = %02x\n", data );
- changed_tccr3c(data);
+ changed_tccr3c(data);
break;
case AVR8_REGIDX_TCNT3L:
@@ -2632,17 +2632,17 @@ WRITE8_MEMBER( avr8_device::regs_w )
case AVR8_REGIDX_TCCR4A:
verboselog(m_pc, 0, "AVR8: TCCR4A = %02x\n", data );
- changed_tccr4a(data);
+ changed_tccr4a(data);
break;
case AVR8_REGIDX_TCCR4B:
verboselog(m_pc, 0, "AVR8: TCCR4B = %02x\n", data );
- changed_tccr4b(data);
+ changed_tccr4b(data);
break;
case AVR8_REGIDX_TCCR4C:
verboselog(m_pc, 0, "AVR8: TCCR4C = %02x\n", data );
- changed_tccr4c(data);
+ changed_tccr4c(data);
break;
case AVR8_REGIDX_TCNT4L:
@@ -2687,12 +2687,12 @@ WRITE8_MEMBER( avr8_device::regs_w )
case AVR8_REGIDX_TCCR5A:
verboselog(m_pc, 0, "AVR8: TCCR5A = %02x\n", data );
- changed_tccr5a(data);
+ changed_tccr5a(data);
break;
case AVR8_REGIDX_TCCR5B:
verboselog(m_pc, 0, "AVR8: TCCR5B = %02x\n", data );
- changed_tccr5b(data);
+ changed_tccr5b(data);
break;
case AVR8_REGIDX_ASSR:
@@ -2723,7 +2723,7 @@ WRITE8_MEMBER( avr8_device::regs_w )
case AVR8_REGIDX_TWCR:
verboselog(m_pc, 0, "AVR8: TWCR = %02x\n", data );
//TODO: changed_twcr(data);
- m_r[AVR8_REGIDX_TWCR] = data;
+ m_r[AVR8_REGIDX_TWCR] = data;
break;
case AVR8_REGIDX_TWAMR:
@@ -2746,10 +2746,10 @@ WRITE8_MEMBER( avr8_device::regs_w )
//TODO: changed_ucsr0c(data);
break;
/*
- case AVR8_REGIDX_:
- verboselog(m_pc, 0, "AVR8: = %02x\n", data );
- //TODO: changed_(data);
- break;
+ case AVR8_REGIDX_:
+ verboselog(m_pc, 0, "AVR8: = %02x\n", data );
+ //TODO: changed_(data);
+ break;
*/
default:
verboselog(m_pc, 0, "AVR8: Unknown Register Write: %03x = %02x\n", offset, data);
@@ -2759,7 +2759,7 @@ WRITE8_MEMBER( avr8_device::regs_w )
READ8_MEMBER( avr8_device::regs_r )
{
-// printf("--- READ offset %04x ---\n", offset);
+// printf("--- READ offset %04x ---\n", offset);
switch( offset )
{
@@ -2798,48 +2798,48 @@ READ8_MEMBER( avr8_device::regs_r )
return m_r[offset];
case AVR8_REGIDX_PINA:
- // TODO: consider the DDRA
- return m_io->read_byte(AVR8_REG_A);
+ // TODO: consider the DDRA
+ return m_io->read_byte(AVR8_REG_A);
case AVR8_REGIDX_PINB:
- // TODO: consider the DDRB
- return m_io->read_byte(AVR8_REG_B);
+ // TODO: consider the DDRB
+ return m_io->read_byte(AVR8_REG_B);
case AVR8_REGIDX_PINC:
- // TODO: consider the DDRC
- return m_io->read_byte(AVR8_REG_C);
+ // TODO: consider the DDRC
+ return m_io->read_byte(AVR8_REG_C);
case AVR8_REGIDX_PIND:
- // TODO: consider the DDRD
- return m_io->read_byte(AVR8_REG_D);
+ // TODO: consider the DDRD
+ return m_io->read_byte(AVR8_REG_D);
case AVR8_REGIDX_PINE:
- // TODO: consider the DDRE
- return m_io->read_byte(AVR8_REG_E);
+ // TODO: consider the DDRE
+ return m_io->read_byte(AVR8_REG_E);
case AVR8_REGIDX_PINF:
- // TODO: consider the DDRF
- return m_io->read_byte(AVR8_REG_F);
+ // TODO: consider the DDRF
+ return m_io->read_byte(AVR8_REG_F);
case AVR8_REGIDX_PING:
- // TODO: consider the DDRG
- return m_io->read_byte(AVR8_REG_G);
+ // TODO: consider the DDRG
+ return m_io->read_byte(AVR8_REG_G);
case AVR8_REGIDX_PINH:
- // TODO: consider the DDRH
- return m_io->read_byte(AVR8_REG_H);
+ // TODO: consider the DDRH
+ return m_io->read_byte(AVR8_REG_H);
case AVR8_REGIDX_PINJ:
- // TODO: consider the DDRJ
- return m_io->read_byte(AVR8_REG_J);
+ // TODO: consider the DDRJ
+ return m_io->read_byte(AVR8_REG_J);
case AVR8_REGIDX_PINK:
- // TODO: consider the DDRK
- return m_io->read_byte(AVR8_REG_K);
+ // TODO: consider the DDRK
+ return m_io->read_byte(AVR8_REG_K);
case AVR8_REGIDX_PINL:
- // TODO: consider the DDRL
- return m_io->read_byte(AVR8_REG_L);
+ // TODO: consider the DDRL
+ return m_io->read_byte(AVR8_REG_L);
case AVR8_REGIDX_PORTA:
case AVR8_REGIDX_PORTB:
@@ -2868,7 +2868,7 @@ READ8_MEMBER( avr8_device::regs_r )
return m_r[offset];
// EEPROM registers:
- case AVR8_REGIDX_EECR:
+ case AVR8_REGIDX_EECR:
case AVR8_REGIDX_EEDR:
return m_r[offset];
@@ -2878,7 +2878,7 @@ READ8_MEMBER( avr8_device::regs_r )
case AVR8_REGIDX_GPIOR0:
case AVR8_REGIDX_GPIOR1:
case AVR8_REGIDX_GPIOR2:
-// case AVR8_REGIDX_UCSR0B:/*TODO: needed for Replicator 1 */
+// case AVR8_REGIDX_UCSR0B:/*TODO: needed for Replicator 1 */
case AVR8_REGIDX_SPDR: /*TODO: needed for Replicator 1 */
case AVR8_REGIDX_SPSR: /*TODO: needed for Replicator 1 */
// case AVR8_REGIDX_ADCSRA: /*TODO: needed for Replicator 1 */
@@ -2886,23 +2886,23 @@ READ8_MEMBER( avr8_device::regs_r )
case AVR8_REGIDX_SPL:
case AVR8_REGIDX_SPH:
case AVR8_REGIDX_SREG:
- case AVR8_REGIDX_TIMSK0:
- case AVR8_REGIDX_TIMSK1:
- case AVR8_REGIDX_TIMSK2:
+ case AVR8_REGIDX_TIMSK0:
+ case AVR8_REGIDX_TIMSK1:
+ case AVR8_REGIDX_TIMSK2:
// case AVR8_REGIDX_TIMSK3: /*TODO: needed for Replicator 1 */
- case AVR8_REGIDX_TIMSK4:
- case AVR8_REGIDX_TIMSK5:
+ case AVR8_REGIDX_TIMSK4:
+ case AVR8_REGIDX_TIMSK5:
return m_r[offset];
/* Two-wire registers: */
case AVR8_REGIDX_TWCR:
- /*TODO: needed for Replicator 1
- BLOQUEIA PROGRESSO DA EXECUÇÃO DO FIRMWARE no endereço 105EC*/
+ /*TODO: needed for Replicator 1
+ BLOQUEIA PROGRESSO DA EXECU??O DO FIRMWARE no endere?o 105EC*/
return m_r[offset];
case AVR8_REGIDX_TWSR:
- //quick hack: by returning a value != 0x08 we induce an error state that makes the object code jump out of the wait loop and continue execution failing the 2-wire write operation.
- //TODO: implement-me!
+ //quick hack: by returning a value != 0x08 we induce an error state that makes the object code jump out of the wait loop and continue execution failing the 2-wire write operation.
+ //TODO: implement-me!
return 0x00; /*TODO: needed for Replicator 1 */
@@ -3309,12 +3309,12 @@ void avr8_device::execute_run()
break;
case 0x0007: // ELPM Rd,Z+
pd32 = (m_r[AVR8_REGIDX_RAMPZ] << 16) | ZREG;
- m_r[RD5(op)] = m_program->read_byte(pd32);
- pd32++;
- m_r[AVR8_REGIDX_RAMPZ] = (pd32 >> 16) & 0x00ff;
- m_r[31] = (pd32 >> 8) & 0x00ff;
+ m_r[RD5(op)] = m_program->read_byte(pd32);
+ pd32++;
+ m_r[AVR8_REGIDX_RAMPZ] = (pd32 >> 16) & 0x00ff;
+ m_r[31] = (pd32 >> 8) & 0x00ff;
m_r[30] = pd32 & 0x00ff;
- opcycles = 3;
+ opcycles = 3;
break;
case 0x0009: // LD Rd,Y+
pd = YREG;
@@ -3323,7 +3323,7 @@ void avr8_device::execute_run()
m_r[29] = (pd >> 8) & 0x00ff;
m_r[28] = pd & 0x00ff;
opcycles = 2;
- break;
+ break;
case 0x000a: // LD Rd,-Y
pd = YREG;
pd--;
@@ -3679,7 +3679,7 @@ void avr8_device::execute_run()
case 0x00a0: // WDR
//output += sprintf( output, "WDR" );
//unimplemented_opcode(op); //TODO: necessary for emulating the Replicator 1
- //printf("Watchdot Reset!\n");
+ //printf("Watchdot Reset!\n");
opcycles = 1;
break;
case 0x00c0: // LPM
diff --git a/src/emu/cpu/avr8/avr8.h b/src/emu/cpu/avr8/avr8.h
index 9438813c17c..2a2f2ac3b88 100644
--- a/src/emu/cpu/avr8/avr8.h
+++ b/src/emu/cpu/avr8/avr8.h
@@ -90,7 +90,7 @@ public:
// inline configuration helpers
static void static_set_config(device_t &device, const avr8_config &config);
- // fuse configs
+ // fuse configs
void set_low_fuses(UINT8 byte);
void set_high_fuses(UINT8 byte);
void set_extended_fuses(UINT8 byte);
@@ -147,15 +147,15 @@ protected:
const address_space_config m_io_config;
UINT8 *m_eeprom;
- // bootloader
+ // bootloader
UINT16 m_boot_size;
UINT8 m_cpu_type;
- // Fuses
- UINT8 m_lfuses;
- UINT8 m_hfuses;
- UINT8 m_efuses;
- UINT8 m_lock_bits;
+ // Fuses
+ UINT8 m_lfuses;
+ UINT8 m_hfuses;
+ UINT8 m_efuses;
+ UINT8 m_lock_bits;
// CPU registers
UINT32 m_pc;
@@ -241,8 +241,8 @@ protected:
void changed_tccr3a(UINT8 data);
void changed_tccr3b(UINT8 data);
void changed_tccr3c(UINT8 data);
-// void update_ocr3(UINT8 newval, UINT8 reg);
-// void timer3_force_output_compare(int reg);
+// void update_ocr3(UINT8 newval, UINT8 reg);
+// void timer3_force_output_compare(int reg);
// timer 4
void timer4_tick();
@@ -256,8 +256,8 @@ protected:
void timer5_tick();
void changed_tccr5a(UINT8 data);
void changed_tccr5b(UINT8 data);
-// void update_ocr5(UINT8 newval, UINT8 reg);
-// void timer5_force_output_compare(int reg);
+// void update_ocr5(UINT8 newval, UINT8 reg);
+// void timer5_force_output_compare(int reg);
// address spaces
address_space *m_program;
@@ -496,24 +496,24 @@ enum
AVR8_REGIDX_TCNT0,
AVR8_REGIDX_OCR0A,
AVR8_REGIDX_OCR0B,
- //0x49: Reserved
+ //0x49: Reserved
AVR8_REGIDX_GPIOR1 = 0x4A,
AVR8_REGIDX_GPIOR2,
AVR8_REGIDX_SPCR,
AVR8_REGIDX_SPSR,
AVR8_REGIDX_SPDR,
- //0x4F: Reserved
+ //0x4F: Reserved
AVR8_REGIDX_ACSR = 0x50,
AVR8_REGIDX_OCDR,
- //0x52: Reserved
+ //0x52: Reserved
AVR8_REGIDX_SMCR = 0x53,
AVR8_REGIDX_MCUSR,
AVR8_REGIDX_MCUCR,
- //0x56: Reserved
+ //0x56: Reserved
AVR8_REGIDX_SPMCSR = 0x57,
- //0x58: Reserved
- //0x59: Reserved
- //0x5A: Reserved
+ //0x58: Reserved
+ //0x59: Reserved
+ //0x5A: Reserved
AVR8_REGIDX_RAMPZ = 0x5B,
AVR8_REGIDX_EIND,
AVR8_REGIDX_SPL,
@@ -522,12 +522,12 @@ enum
//--------------------------
AVR8_REGIDX_WDTCSR = 0x60,
AVR8_REGIDX_CLKPR,
- //0x62: Reserved
- //0x63: Reserved
+ //0x62: Reserved
+ //0x63: Reserved
AVR8_REGIDX_PRR0 = 0x64,
AVR8_REGIDX_PRR1,
AVR8_REGIDX_OSCCAL,
- //0x67: Reserved
+ //0x67: Reserved
AVR8_REGIDX_PCICR = 0x68,
AVR8_REGIDX_EICRA,
AVR8_REGIDX_EICRB,
@@ -542,8 +542,8 @@ enum
AVR8_REGIDX_TIMSK5,
AVR8_REGIDX_XMCRA,
AVR8_REGIDX_XMCRB,
- //0x76: Reserved
- //0x77: Reserved
+ //0x76: Reserved
+ //0x77: Reserved
AVR8_REGIDX_ADCL = 0x78,
AVR8_REGIDX_ADCH,
AVR8_REGIDX_ADCSRA,
@@ -555,7 +555,7 @@ enum
AVR8_REGIDX_TCCR1A,
AVR8_REGIDX_TCCR1B,
AVR8_REGIDX_TCCR1C,
- //0x83: Reserved
+ //0x83: Reserved
AVR8_REGIDX_TCNT1L = 0x84,
AVR8_REGIDX_TCNT1H,
AVR8_REGIDX_ICR1L,
@@ -566,12 +566,12 @@ enum
AVR8_REGIDX_OCR1BH,
AVR8_REGIDX_OCR1CL,
AVR8_REGIDX_OCR1CH,
- //0x8E: Reserved
- //0x8F: Reserved
+ //0x8E: Reserved
+ //0x8F: Reserved
AVR8_REGIDX_TCCR3A = 0x90,
AVR8_REGIDX_TCCR3B,
AVR8_REGIDX_TCCR3C,
- //0x93: Reserved
+ //0x93: Reserved
AVR8_REGIDX_TCNT3L = 0x94,
AVR8_REGIDX_TCNT3H,
AVR8_REGIDX_ICR3L,
@@ -582,12 +582,12 @@ enum
AVR8_REGIDX_OCR3BH,
AVR8_REGIDX_OCR3CL,
AVR8_REGIDX_OCR3CH,
- //0x9E: Reserved
- //0x9F: Reserved
+ //0x9E: Reserved
+ //0x9F: Reserved
AVR8_REGIDX_TCCR4A = 0xA0,
AVR8_REGIDX_TCCR4B,
AVR8_REGIDX_TCCR4C,
- //0xA3: Reserved
+ //0xA3: Reserved
AVR8_REGIDX_TCNT4L = 0xA4,
AVR8_REGIDX_TCNT4H,
AVR8_REGIDX_ICR4L,
@@ -598,88 +598,88 @@ enum
AVR8_REGIDX_OCR4BH,
AVR8_REGIDX_OCR4CL,
AVR8_REGIDX_OCR4CH,
- //0xAE: Reserved
- //0xAF: Reserved
+ //0xAE: Reserved
+ //0xAF: Reserved
AVR8_REGIDX_TCCR2A = 0xB0,
AVR8_REGIDX_TCCR2B,
AVR8_REGIDX_TCNT2,
AVR8_REGIDX_OCR2A,
AVR8_REGIDX_OCR2B,
- //0xB5: Reserved
+ //0xB5: Reserved
AVR8_REGIDX_ASSR = 0xB6,
- //0xB7: Reserved
+ //0xB7: Reserved
AVR8_REGIDX_TWBR = 0xB8,
AVR8_REGIDX_TWSR,
AVR8_REGIDX_TWAR,
AVR8_REGIDX_TWDR,
AVR8_REGIDX_TWCR,
AVR8_REGIDX_TWAMR,
- //0xBE: Reserved
- //0xBF: Reserved
+ //0xBE: Reserved
+ //0xBF: Reserved
AVR8_REGIDX_UCSR0A = 0xC0,
AVR8_REGIDX_UCSR0B,
AVR8_REGIDX_UCSR0C,
- //0xC3: Reserved
+ //0xC3: Reserved
AVR8_REGIDX_UBRR0L = 0xC4,
AVR8_REGIDX_UBRR0H,
AVR8_REGIDX_UDR0,
- //0xC7: Reserved
+ //0xC7: Reserved
AVR8_REGIDX_UCSR1A = 0xC8,
AVR8_REGIDX_UCSR1B,
AVR8_REGIDX_UCSR1C,
- //0xCB: Reserved
+ //0xCB: Reserved
AVR8_REGIDX_UBRR1L = 0xCC,
AVR8_REGIDX_UBRR1H,
AVR8_REGIDX_UDR1,
- //0xCF: Reserved
+ //0xCF: Reserved
AVR8_REGIDX_UCSR2A = 0xD0,
AVR8_REGIDX_UCSR2B,
AVR8_REGIDX_UCSR2C,
- //0xD3: Reserved
+ //0xD3: Reserved
AVR8_REGIDX_UBRR2L = 0xD4,
AVR8_REGIDX_UBRR2H,
AVR8_REGIDX_UDR2,
- //0xD7: Reserved
- //0xD8: Reserved
- //0xD9: Reserved
- //0xDA: Reserved
- //0xDB: Reserved
- //0xDC: Reserved
- //0xDD: Reserved
- //0xDE: Reserved
- //0xDF: Reserved
- //0xE0: Reserved
- //0xE1: Reserved
- //0xE2: Reserved
- //0xE3: Reserved
- //0xE4: Reserved
- //0xE5: Reserved
- //0xE6: Reserved
- //0xE7: Reserved
- //0xE8: Reserved
- //0xE9: Reserved
- //0xEA: Reserved
- //0xEB: Reserved
- //0xEC: Reserved
- //0xED: Reserved
- //0xEE: Reserved
- //0xEF: Reserved
- //0xF0: Reserved
- //0xF1: Reserved
- //0xF2: Reserved
- //0xF3: Reserved
- //0xF4: Reserved
- //0xF5: Reserved
- //0xF6: Reserved
- //0xF7: Reserved
- //0xF8: Reserved
- //0xF9: Reserved
- //0xFA: Reserved
- //0xFB: Reserved
- //0xFC: Reserved
- //0xFD: Reserved
- //0xFE: Reserved
- //0xFF: Reserved
+ //0xD7: Reserved
+ //0xD8: Reserved
+ //0xD9: Reserved
+ //0xDA: Reserved
+ //0xDB: Reserved
+ //0xDC: Reserved
+ //0xDD: Reserved
+ //0xDE: Reserved
+ //0xDF: Reserved
+ //0xE0: Reserved
+ //0xE1: Reserved
+ //0xE2: Reserved
+ //0xE3: Reserved
+ //0xE4: Reserved
+ //0xE5: Reserved
+ //0xE6: Reserved
+ //0xE7: Reserved
+ //0xE8: Reserved
+ //0xE9: Reserved
+ //0xEA: Reserved
+ //0xEB: Reserved
+ //0xEC: Reserved
+ //0xED: Reserved
+ //0xEE: Reserved
+ //0xEF: Reserved
+ //0xF0: Reserved
+ //0xF1: Reserved
+ //0xF2: Reserved
+ //0xF3: Reserved
+ //0xF4: Reserved
+ //0xF5: Reserved
+ //0xF6: Reserved
+ //0xF7: Reserved
+ //0xF8: Reserved
+ //0xF9: Reserved
+ //0xFA: Reserved
+ //0xFB: Reserved
+ //0xFC: Reserved
+ //0xFD: Reserved
+ //0xFE: Reserved
+ //0xFF: Reserved
AVR8_REGIDX_PINH = 0x100,
AVR8_REGIDX_DDRH,
AVR8_REGIDX_PORTH,
@@ -692,30 +692,30 @@ enum
AVR8_REGIDX_PINL,
AVR8_REGIDX_DDRL,
AVR8_REGIDX_PORTL,
- //0x10C: Reserved
- //0x10D: Reserved
- //0x10E: Reserved
- //0x10F: Reserved
- //0x110: Reserved
- //0x111: Reserved
- //0x112: Reserved
- //0x113: Reserved
- //0x114: Reserved
- //0x115: Reserved
- //0x116: Reserved
- //0x117: Reserved
- //0x118: Reserved
- //0x119: Reserved
- //0x11A: Reserved
- //0x11B: Reserved
- //0x11C: Reserved
- //0x11D: Reserved
- //0x11E: Reserved
- //0x11F: Reserved
+ //0x10C: Reserved
+ //0x10D: Reserved
+ //0x10E: Reserved
+ //0x10F: Reserved
+ //0x110: Reserved
+ //0x111: Reserved
+ //0x112: Reserved
+ //0x113: Reserved
+ //0x114: Reserved
+ //0x115: Reserved
+ //0x116: Reserved
+ //0x117: Reserved
+ //0x118: Reserved
+ //0x119: Reserved
+ //0x11A: Reserved
+ //0x11B: Reserved
+ //0x11C: Reserved
+ //0x11D: Reserved
+ //0x11E: Reserved
+ //0x11F: Reserved
AVR8_REGIDX_TCCR5A,
AVR8_REGIDX_TCCR5B,
AVR8_REGIDX_TCCR5C,
- //0x123: Reserved
+ //0x123: Reserved
AVR8_REGIDX_TCNT5L,
AVR8_REGIDX_TCNT5H,
AVR8_REGIDX_ICR5L,
@@ -726,34 +726,34 @@ enum
AVR8_REGIDX_OCR5BH,
AVR8_REGIDX_OCR5CL,
AVR8_REGIDX_OCR5CH,
- //0x12E: Reserved
- //0x12F: Reserved
+ //0x12E: Reserved
+ //0x12F: Reserved
AVR8_REGIDX_UCSR3A,
AVR8_REGIDX_UCSR3B,
AVR8_REGIDX_UCSR3C,
- //0x133: Reserved
+ //0x133: Reserved
AVR8_REGIDX_UBRR3L,
AVR8_REGIDX_UBRR3H,
AVR8_REGIDX_UDR3,
- //0x137: Reserved
- // .
- // . up to
- // .
- //0x1FF: Reserved
+ //0x137: Reserved
+ // .
+ // . up to
+ // .
+ //0x1FF: Reserved
};
enum {
- AVR8_IO_PORTA = 0,
- AVR8_IO_PORTB,
- AVR8_IO_PORTC,
- AVR8_IO_PORTD,
- AVR8_IO_PORTE,
- AVR8_IO_PORTF,
- AVR8_IO_PORTG,
- AVR8_IO_PORTH,
- AVR8_IO_PORTJ,
- AVR8_IO_PORTK,
- AVR8_IO_PORTL
+ AVR8_IO_PORTA = 0,
+ AVR8_IO_PORTB,
+ AVR8_IO_PORTC,
+ AVR8_IO_PORTD,
+ AVR8_IO_PORTE,
+ AVR8_IO_PORTF,
+ AVR8_IO_PORTG,
+ AVR8_IO_PORTH,
+ AVR8_IO_PORTJ,
+ AVR8_IO_PORTK,
+ AVR8_IO_PORTL
};
//TODO: AVR8_REG_* and AVR8_IO_PORT* seem to serve the same purpose and thus should be unified. Verify this!
@@ -810,46 +810,46 @@ enum
//lock bit masks
enum
{
- LB1 = (1 << 0),
- LB2 = (1 << 1),
- BLB01 = (1 << 2),
- BLB02 = (1 << 3),
- BLB11 = (1 << 4),
- BLB12 = (1 << 5),
+ LB1 = (1 << 0),
+ LB2 = (1 << 1),
+ BLB01 = (1 << 2),
+ BLB02 = (1 << 3),
+ BLB11 = (1 << 4),
+ BLB12 = (1 << 5),
};
//extended fuses bit masks
enum
{
- BODLEVEL0 = (1 << 0),
- BODLEVEL1 = (1 << 1),
- BODLEVEL2 = (1 << 2),
+ BODLEVEL0 = (1 << 0),
+ BODLEVEL1 = (1 << 1),
+ BODLEVEL2 = (1 << 2),
};
//high fuses bit masks
enum
{
- BOOTRST = (1 << 0),
- BOOTSZ0 = (1 << 1),
- BOOTSZ1 = (1 << 2),
- EESAVE = (1 << 3),
- WDTON = (1 << 4),
- SPIEN = (1 << 5),
- JTAGEN = (1 << 6),
- OCDEN = (1 << 7),
+ BOOTRST = (1 << 0),
+ BOOTSZ0 = (1 << 1),
+ BOOTSZ1 = (1 << 2),
+ EESAVE = (1 << 3),
+ WDTON = (1 << 4),
+ SPIEN = (1 << 5),
+ JTAGEN = (1 << 6),
+ OCDEN = (1 << 7),
};
//low fuses bit masks
enum
{
- CKSEL0 = (1 << 0),
- CKSEL1 = (1 << 1),
- CKSEL2 = (1 << 2),
- CKSEL3 = (1 << 3),
- SUT0 = (1 << 4),
- SUT1 = (1 << 5),
- CKOUT = (1 << 6),
- CKDIV8 = (1 << 7),
+ CKSEL0 = (1 << 0),
+ CKSEL1 = (1 << 1),
+ CKSEL2 = (1 << 2),
+ CKSEL3 = (1 << 3),
+ SUT0 = (1 << 4),
+ SUT1 = (1 << 5),
+ CKOUT = (1 << 6),
+ CKDIV8 = (1 << 7),
};
#define AVR8_EEARH_MASK 0x01
diff --git a/src/emu/cpu/avr8/avr8dasm.c b/src/emu/cpu/avr8/avr8dasm.c
index b92daeb3dac..219488299c6 100644
--- a/src/emu/cpu/avr8/avr8dasm.c
+++ b/src/emu/cpu/avr8/avr8dasm.c
@@ -30,73 +30,73 @@ CPU_DISASSEMBLE( avr8 )
UINT32 op = oprom[pos++];
op |= oprom[pos++] << 8;
UINT32 addr = 0;
- const char* register_names[0x40] = {"PINA", "DDRA", "PORTA", "PINB", "DDRB", "PORTB", "PINC", "DDRC", "PORTC", "PIND", "DDRD", "PORTD", "PINE", "DDRE", "PORTE", "PINF", "DDRF", "PORTF", "PING", "DDRG", "PORTG", "TIFR0", "TIFR1", "TIFR2","TIFR3", "TIFR4", "TIFR5", "PCIFR", "EIFR", "EIMSK", "GPIOR0", "EECR", "EEDR", "EEARL", "EEARH", "GTCCR", "TCCR0A", "TCCR0B", "TCNT0", "OCR0A", "OCR0B", "0x29", "GPIOR1", "GPIOR2", "SPCR", "SPSR", "SPDR", "0x2F", "ACSR", "OCDR", "0x32", "SMCR", "MCUSR", "MCUCR", "0x36", "SPMCSR", "0x38", "0x39", "0x3A", "RAMPZ", "EIND", "SPL", "SPH", "SREG"};
+ const char* register_names[0x40] = {"PINA", "DDRA", "PORTA", "PINB", "DDRB", "PORTB", "PINC", "DDRC", "PORTC", "PIND", "DDRD", "PORTD", "PINE", "DDRE", "PORTE", "PINF", "DDRF", "PORTF", "PING", "DDRG", "PORTG", "TIFR0", "TIFR1", "TIFR2","TIFR3", "TIFR4", "TIFR5", "PCIFR", "EIFR", "EIMSK", "GPIOR0", "EECR", "EEDR", "EEARL", "EEARH", "GTCCR", "TCCR0A", "TCCR0B", "TCNT0", "OCR0A", "OCR0B", "0x29", "GPIOR1", "GPIOR2", "SPCR", "SPSR", "SPDR", "0x2F", "ACSR", "OCDR", "0x32", "SMCR", "MCUSR", "MCUCR", "0x36", "SPMCSR", "0x38", "0x39", "0x3A", "RAMPZ", "EIND", "SPL", "SPH", "SREG"};
- const char* register_bit_names[0x40][8] = {
- /* PINA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PINB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PINC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PIND */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRD */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTD */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PINE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PINF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PING */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* DDRG */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* PORTG */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* TIFR0 */ { "TOV0", "OCF0A", "OCF0B", "3", "4", "5", "6", "7"},
- /* TIFR1 */ { "TOV1", "OCF1A", "OCF1B", "OCF1C", "4", "ICF1", "6", "7"},
- /* TIFR2 */ { "TOV2", "OCF2A", "OCF2B", "3", "4", "5", "6", "7"},
- /* TIFR3 */ { "TOV3", "OCF3A", "OCF3B", "OCF3C", "4", "ICF3", "6", "7"},
- /* TIFR4 */ { "TOV4", "OCF4A", "OCF4B", "OCF4C", "4", "ICF4", "6", "7"},
- /* TIFR5 */ { "TOV5", "OCF5A", "OCF5B", "OCF5C", "4", "ICF5", "6", "7"},
- /* PCIFR */ {"PCIF0", "PCIF1", "PCIF2", "3", "4", "5", "6", "7"},
- /* EIFR */ {"INTF0", "INTF1", "INTF2", "INTF3", "INTF4", "INTF5", "INTF6", "INTF7"},
- /* EIMSK */ { "INT0", "INT1", "INT2", "INT3", "INT4", "INT5", "INT6", "INT7"},
- /* GPIOR0 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* EECR */ { "EERE", "EEPE", "EEMPE", "EERIE", "EEPM0", "EEPM1", "6", "7"},
- /* EEDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* EEARL */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* EEARH */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* GTCCR */ {"PSRSYNC", "PSRASY", "2", "3", "4", "5", "6", "TSM"},
- /* TCCR0A */ {"WGM00", "WGM01", "2", "3","COM0B0","COM0B1","COM0A0","COM0A1"},
- /* TCCR0B */ { "CS0", "CS1", "CS2", "WGM02", "4", "5", "FOC0B", "FOC0A"},
- /* TCNT0 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* OCR0A */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* OCR0B */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* 0x29 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* GPIOR1 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* GPIOR2 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* SPCR */ { "SPR0", "SPR1", "CPHA", "CPOL", "MSTR", "DORD", "SPE", "SPIE"},
- /* SPSR */ {"SPI2X", "1", "2", "3", "4", "5", "WCOL", "SPIF"},
- /* SPDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* 0x2F */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* ACSR */ {"ACIS0", "ACIS1", "ACIC", "ACIE", "ACI", "ACO", "ACBG", "ACD"},
- /* OCDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* 0x32 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* SMCR */ { "SE", "SM0", "SM1", "SM2", "4", "5", "6", "7"},
- /* MCUSR */ { "PORF", "EXTRF", "BORF", "WDRF", "JTRF", "5", "6", "7"},
- /* MCUCR */ { "IVCE", "IVSEL", "2", "3", "PUD", "5", "6", "JTD"},
- /* 0x36 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* SPMCSR */ {"SPMEN", "PGERS", "PGWRT","BLBSET","RWWSRE", "SIGRD", "RWWSB", "SPMIE"},
- /* 0x38 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* 0x39 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* 0x3A */ { "0", "1", "2", "3", "4", "5", "6", "7"},
- /* RAMPZ */ {"RAMPZ0","RAMPZ1", "2", "3", "4", "5", "6", "7"},
- /* EIND */ {"EIND0", "1", "2", "3", "4", "5", "6", "7"},
- /* SPL */ { "SP0", "SP1", "SP2", "SP3", "SP4", "SP5", "SP6", "SP7"},
- /* SPH */ { "SP8", "SP9", "SP10", "SP11", "SP12", "SP13", "SP14", "SP15"},
- /* SREG */ { "C", "Z", "N", "V", "S", "H", "T", "I"}};
+ const char* register_bit_names[0x40][8] = {
+ /* PINA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTA */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PINB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTB */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PINC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTC */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PIND */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRD */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTD */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PINE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTE */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PINF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTF */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PING */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* DDRG */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* PORTG */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* TIFR0 */ { "TOV0", "OCF0A", "OCF0B", "3", "4", "5", "6", "7"},
+ /* TIFR1 */ { "TOV1", "OCF1A", "OCF1B", "OCF1C", "4", "ICF1", "6", "7"},
+ /* TIFR2 */ { "TOV2", "OCF2A", "OCF2B", "3", "4", "5", "6", "7"},
+ /* TIFR3 */ { "TOV3", "OCF3A", "OCF3B", "OCF3C", "4", "ICF3", "6", "7"},
+ /* TIFR4 */ { "TOV4", "OCF4A", "OCF4B", "OCF4C", "4", "ICF4", "6", "7"},
+ /* TIFR5 */ { "TOV5", "OCF5A", "OCF5B", "OCF5C", "4", "ICF5", "6", "7"},
+ /* PCIFR */ {"PCIF0", "PCIF1", "PCIF2", "3", "4", "5", "6", "7"},
+ /* EIFR */ {"INTF0", "INTF1", "INTF2", "INTF3", "INTF4", "INTF5", "INTF6", "INTF7"},
+ /* EIMSK */ { "INT0", "INT1", "INT2", "INT3", "INT4", "INT5", "INT6", "INT7"},
+ /* GPIOR0 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* EECR */ { "EERE", "EEPE", "EEMPE", "EERIE", "EEPM0", "EEPM1", "6", "7"},
+ /* EEDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* EEARL */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* EEARH */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* GTCCR */ {"PSRSYNC", "PSRASY", "2", "3", "4", "5", "6", "TSM"},
+ /* TCCR0A */ {"WGM00", "WGM01", "2", "3","COM0B0","COM0B1","COM0A0","COM0A1"},
+ /* TCCR0B */ { "CS0", "CS1", "CS2", "WGM02", "4", "5", "FOC0B", "FOC0A"},
+ /* TCNT0 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* OCR0A */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* OCR0B */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* 0x29 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* GPIOR1 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* GPIOR2 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* SPCR */ { "SPR0", "SPR1", "CPHA", "CPOL", "MSTR", "DORD", "SPE", "SPIE"},
+ /* SPSR */ {"SPI2X", "1", "2", "3", "4", "5", "WCOL", "SPIF"},
+ /* SPDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* 0x2F */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* ACSR */ {"ACIS0", "ACIS1", "ACIC", "ACIE", "ACI", "ACO", "ACBG", "ACD"},
+ /* OCDR */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* 0x32 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* SMCR */ { "SE", "SM0", "SM1", "SM2", "4", "5", "6", "7"},
+ /* MCUSR */ { "PORF", "EXTRF", "BORF", "WDRF", "JTRF", "5", "6", "7"},
+ /* MCUCR */ { "IVCE", "IVSEL", "2", "3", "PUD", "5", "6", "JTD"},
+ /* 0x36 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* SPMCSR */ {"SPMEN", "PGERS", "PGWRT","BLBSET","RWWSRE", "SIGRD", "RWWSB", "SPMIE"},
+ /* 0x38 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* 0x39 */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* 0x3A */ { "0", "1", "2", "3", "4", "5", "6", "7"},
+ /* RAMPZ */ {"RAMPZ0","RAMPZ1", "2", "3", "4", "5", "6", "7"},
+ /* EIND */ {"EIND0", "1", "2", "3", "4", "5", "6", "7"},
+ /* SPL */ { "SP0", "SP1", "SP2", "SP3", "SP4", "SP5", "SP6", "SP7"},
+ /* SPH */ { "SP8", "SP9", "SP10", "SP11", "SP12", "SP13", "SP14", "SP15"},
+ /* SREG */ { "C", "Z", "N", "V", "S", "H", "T", "I"}};
switch(op & 0xf000)
{
@@ -524,28 +524,28 @@ CPU_DISASSEMBLE( avr8 )
output += sprintf( output, "SBIW R%d:R%d, 0x%02x", 24+(RD2(op) << 1)+1, 24+(RD2(op) << 1), KCONST6(op) );
break;
case 0x0800:
- if (ACONST5(op) < 0x20)
- output += sprintf( output, "CBI %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
- else
- output += sprintf( output, "CBI 0x%02x, %d", ACONST5(op), RR3(op) );
+ if (ACONST5(op) < 0x20)
+ output += sprintf( output, "CBI %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
+ else
+ output += sprintf( output, "CBI 0x%02x, %d", ACONST5(op), RR3(op) );
break;
case 0x0900:
- if (ACONST5(op) < 0x20)
- output += sprintf( output, "SBIC %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
- else
- output += sprintf( output, "SBIC 0x%02x, %d", ACONST5(op), RR3(op) );
+ if (ACONST5(op) < 0x20)
+ output += sprintf( output, "SBIC %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
+ else
+ output += sprintf( output, "SBIC 0x%02x, %d", ACONST5(op), RR3(op) );
break;
case 0x0a00:
- if (ACONST5(op) < 0x20)
- output += sprintf( output, "SBI %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
- else
- output += sprintf( output, "SBI 0x%02x, %d", ACONST5(op), RR3(op) );
+ if (ACONST5(op) < 0x20)
+ output += sprintf( output, "SBI %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
+ else
+ output += sprintf( output, "SBI 0x%02x, %d", ACONST5(op), RR3(op) );
break;
case 0x0b00:
- if (ACONST5(op) < 0x20)
- output += sprintf( output, "SBIS %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
- else
- output += sprintf( output, "SBIS 0x%02x, %d", ACONST5(op), RR3(op) );
+ if (ACONST5(op) < 0x20)
+ output += sprintf( output, "SBIS %s, %s", register_names[ACONST5(op)], register_bit_names[ACONST5(op)][RR3(op)] );
+ else
+ output += sprintf( output, "SBIS 0x%02x, %d", ACONST5(op), RR3(op) );
break;
case 0x0c00:
case 0x0d00:
@@ -558,23 +558,23 @@ CPU_DISASSEMBLE( avr8 )
case 0xb000:
if(op & 0x0800)
{
- if (ACONST6(op) < 0x40 ) {
- output += sprintf( output, "OUT %s, R%d", register_names[ACONST6(op)], RD5(op) );
- } else {
- output += sprintf( output, "OUT 0x%02x, R%d", ACONST6(op), RD5(op) );
- }
+ if (ACONST6(op) < 0x40 ) {
+ output += sprintf( output, "OUT %s, R%d", register_names[ACONST6(op)], RD5(op) );
+ } else {
+ output += sprintf( output, "OUT 0x%02x, R%d", ACONST6(op), RD5(op) );
+ }
}
else
{
- if (ACONST6(op) < 0x40 ) {
- output += sprintf( output, "IN R%d, %s", RD5(op), register_names[ACONST6(op)] );
- } else {
- output += sprintf( output, "IN R%d, 0x%02x", RD5(op), ACONST6(op) );
- }
+ if (ACONST6(op) < 0x40 ) {
+ output += sprintf( output, "IN R%d, %s", RD5(op), register_names[ACONST6(op)] );
+ } else {
+ output += sprintf( output, "IN R%d, 0x%02x", RD5(op), ACONST6(op) );
+ }
}
break;
case 0xc000:
- //I'm not sure if this is correct. why pc + ... : pc + 8 + ... ?
+ //I'm not sure if this is correct. why pc + ... : pc + 8 + ... ?
output += sprintf( output, "RJMP %08x", (((op & 0x0800) ? pc + ((op & 0x0fff) | 0xfffff000) : pc + 8 + (op & 0x0fff)) << 0) );
break;
case 0xd000:
diff --git a/src/emu/cpu/cosmac/cosmac.h b/src/emu/cpu/cosmac/cosmac.h
index 3903b247466..eafd8195aa2 100644
--- a/src/emu/cpu/cosmac/cosmac.h
+++ b/src/emu/cpu/cosmac/cosmac.h
@@ -374,16 +374,16 @@ protected:
const address_space_config m_io_config;
// device callbacks
- devcb2_read_line m_read_wait;
- devcb2_read_line m_read_clear;
- devcb2_read_line m_read_ef1;
- devcb2_read_line m_read_ef2;
- devcb2_read_line m_read_ef3;
- devcb2_read_line m_read_ef4;
+ devcb2_read_line m_read_wait;
+ devcb2_read_line m_read_clear;
+ devcb2_read_line m_read_ef1;
+ devcb2_read_line m_read_ef2;
+ devcb2_read_line m_read_ef3;
+ devcb2_read_line m_read_ef4;
devcb2_write_line m_write_q;
- devcb2_read8 m_read_dma;
- devcb2_write8 m_write_dma;
- devcb2_write8 m_write_sc;
+ devcb2_read8 m_read_dma;
+ devcb2_write8 m_write_dma;
+ devcb2_write8 m_write_sc;
// control modes
enum cosmac_mode
diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak
index d7a03f92931..227682e1d84 100644
--- a/src/emu/cpu/cpu.mak
+++ b/src/emu/cpu/cpu.mak
@@ -489,39 +489,39 @@ $(CPUOBJ)/g65816/g65816o4.o: $(CPUSRC)/g65816/g65816o4.c \
ifneq ($(filter H8,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/h8
CPUOBJS += $(CPUOBJ)/h8/h8.o $(CPUOBJ)/h8/h8h.o $(CPUOBJ)/h8/h8s2000.o $(CPUOBJ)/h8/h8s2600.o \
- $(CPUOBJ)/h8/h83337.o \
- $(CPUOBJ)/h8/h83002.o $(CPUOBJ)/h8/h83006.o $(CPUOBJ)/h8/h83008.o \
- $(CPUOBJ)/h8/h83048.o \
- $(CPUOBJ)/h8/h8s2245.o $(CPUOBJ)/h8/h8s2320.o $(CPUOBJ)/h8/h8s2357.o \
- $(CPUOBJ)/h8/h8s2655.o \
- $(CPUOBJ)/h8/h8_adc.o $(CPUOBJ)/h8/h8_port.o $(CPUOBJ)/h8/h8_intc.o \
- $(CPUOBJ)/h8/h8_timer8.o $(CPUOBJ)/h8/h8_timer16.o $(CPUOBJ)/h8/h8_sci.o
+ $(CPUOBJ)/h8/h83337.o \
+ $(CPUOBJ)/h8/h83002.o $(CPUOBJ)/h8/h83006.o $(CPUOBJ)/h8/h83008.o \
+ $(CPUOBJ)/h8/h83048.o \
+ $(CPUOBJ)/h8/h8s2245.o $(CPUOBJ)/h8/h8s2320.o $(CPUOBJ)/h8/h8s2357.o \
+ $(CPUOBJ)/h8/h8s2655.o \
+ $(CPUOBJ)/h8/h8_adc.o $(CPUOBJ)/h8/h8_port.o $(CPUOBJ)/h8/h8_intc.o \
+ $(CPUOBJ)/h8/h8_timer8.o $(CPUOBJ)/h8/h8_timer16.o $(CPUOBJ)/h8/h8_sci.o
DASMOBJS +=
endif
-$(CPUOBJ)/h8/h8.o: $(CPUSRC)/h8/h8.c \
+$(CPUOBJ)/h8/h8.o: $(CPUSRC)/h8/h8.c \
$(CPUOBJ)/h8/h8.inc \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8h.o: $(CPUSRC)/h8/h8h.c \
+$(CPUOBJ)/h8/h8h.o: $(CPUSRC)/h8/h8h.c \
$(CPUOBJ)/h8/h8h.inc \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8s2000.o: $(CPUSRC)/h8/h8s2000.c \
+$(CPUOBJ)/h8/h8s2000.o: $(CPUSRC)/h8/h8s2000.c \
$(CPUOBJ)/h8/h8s2000.inc \
$(CPUSRC)/h8/h8s2000.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8s2600.o: $(CPUSRC)/h8/h8s2600.c \
+$(CPUOBJ)/h8/h8s2600.o: $(CPUSRC)/h8/h8s2600.c \
$(CPUOBJ)/h8/h8s2600.inc \
$(CPUSRC)/h8/h8s2600.h \
$(CPUSRC)/h8/h8s2000.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h83337.o: $(CPUSRC)/h8/h83337.c \
+$(CPUOBJ)/h8/h83337.o: $(CPUSRC)/h8/h83337.c \
$(CPUSRC)/h8/h83337.h \
$(CPUSRC)/h8/h8.h \
$(CPUSRC)/h8/h8_intc.h \
@@ -531,7 +531,7 @@ $(CPUOBJ)/h8/h83337.o: $(CPUSRC)/h8/h83337.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h83002.o: $(CPUSRC)/h8/h83002.c \
+$(CPUOBJ)/h8/h83002.o: $(CPUSRC)/h8/h83002.c \
$(CPUSRC)/h8/h83002.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h \
@@ -541,7 +541,7 @@ $(CPUOBJ)/h8/h83002.o: $(CPUSRC)/h8/h83002.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h83006.o: $(CPUSRC)/h8/h83006.c \
+$(CPUOBJ)/h8/h83006.o: $(CPUSRC)/h8/h83006.c \
$(CPUSRC)/h8/h83006.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h \
@@ -552,7 +552,7 @@ $(CPUOBJ)/h8/h83006.o: $(CPUSRC)/h8/h83006.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h83008.o: $(CPUSRC)/h8/h83008.c \
+$(CPUOBJ)/h8/h83008.o: $(CPUSRC)/h8/h83008.c \
$(CPUSRC)/h8/h83008.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h \
@@ -563,7 +563,7 @@ $(CPUOBJ)/h8/h83008.o: $(CPUSRC)/h8/h83008.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h83048.o: $(CPUSRC)/h8/h83048.c \
+$(CPUOBJ)/h8/h83048.o: $(CPUSRC)/h8/h83048.c \
$(CPUSRC)/h8/h83048.h \
$(CPUSRC)/h8/h8h.h \
$(CPUSRC)/h8/h8.h \
@@ -573,7 +573,7 @@ $(CPUOBJ)/h8/h83048.o: $(CPUSRC)/h8/h83048.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h8s2245.o: $(CPUSRC)/h8/h8s2245.c \
+$(CPUOBJ)/h8/h8s2245.o: $(CPUSRC)/h8/h8s2245.c \
$(CPUSRC)/h8/h8s2245.h \
$(CPUSRC)/h8/h8s2000.h \
$(CPUSRC)/h8/h8h.h \
@@ -585,7 +585,7 @@ $(CPUOBJ)/h8/h8s2245.o: $(CPUSRC)/h8/h8s2245.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h8s2320.o: $(CPUSRC)/h8/h8s2320.c \
+$(CPUOBJ)/h8/h8s2320.o: $(CPUSRC)/h8/h8s2320.c \
$(CPUSRC)/h8/h8s2320.h \
$(CPUSRC)/h8/h8s2000.h \
$(CPUSRC)/h8/h8h.h \
@@ -597,7 +597,7 @@ $(CPUOBJ)/h8/h8s2320.o: $(CPUSRC)/h8/h8s2320.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h8s2357.o: $(CPUSRC)/h8/h8s2357.c \
+$(CPUOBJ)/h8/h8s2357.o: $(CPUSRC)/h8/h8s2357.c \
$(CPUSRC)/h8/h8s2357.h \
$(CPUSRC)/h8/h8s2000.h \
$(CPUSRC)/h8/h8h.h \
@@ -609,7 +609,7 @@ $(CPUOBJ)/h8/h8s2357.o: $(CPUSRC)/h8/h8s2357.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h8s2655.o: $(CPUSRC)/h8/h8s2655.c \
+$(CPUOBJ)/h8/h8s2655.o: $(CPUSRC)/h8/h8s2655.c \
$(CPUSRC)/h8/h8s2655.h \
$(CPUSRC)/h8/h8s2600.h \
$(CPUSRC)/h8/h8s2000.h \
@@ -622,25 +622,25 @@ $(CPUOBJ)/h8/h8s2655.o: $(CPUSRC)/h8/h8s2655.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_sci.h
-$(CPUOBJ)/h8/h8_intc.o: $(CPUSRC)/h8/h8_intc.c \
+$(CPUOBJ)/h8/h8_intc.o: $(CPUSRC)/h8/h8_intc.c \
$(CPUSRC)/h8/h8_intc.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8_adc.o: $(CPUSRC)/h8/h8_adc.c \
+$(CPUOBJ)/h8/h8_adc.o: $(CPUSRC)/h8/h8_adc.c \
$(CPUSRC)/h8/h8_adc.h \
$(CPUSRC)/h8/h8_intc.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8_port.o: $(CPUSRC)/h8/h8_port.c \
+$(CPUOBJ)/h8/h8_port.o: $(CPUSRC)/h8/h8_port.c \
$(CPUSRC)/h8/h8_port.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8_timer16.o: $(CPUSRC)/h8/h8_timer16.c \
+$(CPUOBJ)/h8/h8_timer16.o: $(CPUSRC)/h8/h8_timer16.c \
$(CPUSRC)/h8/h8_timer16.h \
$(CPUSRC)/h8/h8_intc.h \
$(CPUSRC)/h8/h8.h
-$(CPUOBJ)/h8/h8_sci.o: $(CPUSRC)/h8/h8_sci.c \
+$(CPUOBJ)/h8/h8_sci.o: $(CPUSRC)/h8/h8_sci.c \
$(CPUSRC)/h8/h8_sci.h \
$(CPUSRC)/h8/h8_intc.h \
$(CPUSRC)/h8/h8.h
diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.h b/src/emu/cpu/cubeqcpu/cubeqcpu.h
index 47bf5f00c87..4243fe15595 100644
--- a/src/emu/cpu/cubeqcpu/cubeqcpu.h
+++ b/src/emu/cpu/cubeqcpu/cubeqcpu.h
@@ -357,10 +357,10 @@ private:
UINT32 m_clkcnt;
/* RAM */
- UINT16 m_sram[4096]; /* Shared with rotate CPU */
- UINT8 m_ptr_ram[1024]; /* Pointer RAM */
- UINT32 m_e_stack[32768]; /* Stack DRAM: 32kx20 */
- UINT32 m_o_stack[32768]; /* Stack DRAM: 32kx20 */
+ UINT16 m_sram[4096]; /* Shared with rotate CPU */
+ UINT8 m_ptr_ram[1024]; /* Pointer RAM */
+ UINT32 m_e_stack[32768]; /* Stack DRAM: 32kx20 */
+ UINT32 m_o_stack[32768]; /* Stack DRAM: 32kx20 */
address_space *m_program;
direct_read_data *m_direct;
diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c
index f95c09463a7..13af2eed780 100644
--- a/src/emu/cpu/dsp32/dsp32.c
+++ b/src/emu/cpu/dsp32/dsp32.c
@@ -188,7 +188,7 @@ dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, dev
void dsp32c_device::device_start()
{
m_output_pins_changed.resolve_safe();
-
+
// get our address spaces
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
diff --git a/src/emu/cpu/esrip/esrip.h b/src/emu/cpu/esrip/esrip.h
index c89a20ffb40..d39a7fb047c 100644
--- a/src/emu/cpu/esrip/esrip.h
+++ b/src/emu/cpu/esrip/esrip.h
@@ -27,13 +27,13 @@
#define MCFG_ESRIP_FDT_R_CALLBACK(_read) \
devcb = &esrip_device::static_set_fdt_r_callback(*device, DEVCB2_##_read);
-
+
#define MCFG_ESRIP_FDT_W_CALLBACK(_write) \
devcb = &esrip_device::static_set_fdt_w_callback(*device, DEVCB2_##_write);
-
+
#define MCFG_ESRIP_STATUS_IN_CALLBACK(_read) \
devcb = &esrip_device::static_set_status_in_callback(*device, DEVCB2_##_read);
-
+
#define MCFG_ESRIP_DRAW_CALLBACK_OWNER(_class, _method) \
esrip_device::static_set_draw_callback(*device, esrip_draw_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
diff --git a/src/emu/cpu/g65816/g65816.h b/src/emu/cpu/g65816/g65816.h
index 5422a6749f4..0a7207730a0 100644
--- a/src/emu/cpu/g65816/g65816.h
+++ b/src/emu/cpu/g65816/g65816.h
@@ -66,7 +66,7 @@ class _5a22_device : public legacy_cpu_device
{
public:
_5a22_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
-
+
DECLARE_WRITE8_MEMBER( wrmpya_w );
DECLARE_WRITE8_MEMBER( wrmpyb_w );
DECLARE_WRITE8_MEMBER( wrdivl_w );
@@ -77,7 +77,7 @@ public:
DECLARE_READ8_MEMBER( rddivh_r );
DECLARE_READ8_MEMBER( rdmpyl_r );
DECLARE_READ8_MEMBER( rdmpyh_r );
-
+
void set_5a22_map();
};
diff --git a/src/emu/cpu/h8/h8.c b/src/emu/cpu/h8/h8.c
index 20bffeb7852..5835d911fcb 100644
--- a/src/emu/cpu/h8/h8.c
+++ b/src/emu/cpu/h8/h8.c
@@ -252,26 +252,26 @@ void h8_device::state_string_export(const device_state_entry &entry, astring &st
case STATE_GENFLAGS:
if(has_exr)
string.printf("%c%c %c%c%c%c%c%c%c%c",
- (EXR & EXR_T) ? 'T' : '-',
- '0' + (EXR & EXR_I),
- (CCR & F_I) ? 'I' : '-',
- (CCR & F_UI) ? 'u' : '-',
- (CCR & F_H) ? 'H' : '-',
- (CCR & F_U) ? 'U' : '-',
- (CCR & F_N) ? 'N' : '-',
- (CCR & F_Z) ? 'Z' : '-',
- (CCR & F_V) ? 'V' : '-',
- (CCR & F_C) ? 'C' : '-');
+ (EXR & EXR_T) ? 'T' : '-',
+ '0' + (EXR & EXR_I),
+ (CCR & F_I) ? 'I' : '-',
+ (CCR & F_UI) ? 'u' : '-',
+ (CCR & F_H) ? 'H' : '-',
+ (CCR & F_U) ? 'U' : '-',
+ (CCR & F_N) ? 'N' : '-',
+ (CCR & F_Z) ? 'Z' : '-',
+ (CCR & F_V) ? 'V' : '-',
+ (CCR & F_C) ? 'C' : '-');
else
- string.printf("%c%c%c%c%c%c%c%c",
- (CCR & F_I) ? 'I' : '-',
- (CCR & F_UI) ? 'u' : '-',
- (CCR & F_H) ? 'H' : '-',
- (CCR & F_U) ? 'U' : '-',
- (CCR & F_N) ? 'N' : '-',
- (CCR & F_Z) ? 'Z' : '-',
- (CCR & F_V) ? 'V' : '-',
- (CCR & F_C) ? 'C' : '-');
+ string.printf("%c%c%c%c%c%c%c%c",
+ (CCR & F_I) ? 'I' : '-',
+ (CCR & F_UI) ? 'u' : '-',
+ (CCR & F_H) ? 'H' : '-',
+ (CCR & F_U) ? 'U' : '-',
+ (CCR & F_N) ? 'N' : '-',
+ (CCR & F_Z) ? 'Z' : '-',
+ (CCR & F_V) ? 'V' : '-',
+ (CCR & F_C) ? 'C' : '-');
break;
case H8_R0:
case H8_R1:
@@ -554,7 +554,7 @@ UINT8 h8_device::read8(UINT32 adr)
void h8_device::write8(UINT32 adr, UINT8 data)
{
- // logerror("W %06x %02x\n", adr & 0xffffff, data);
+ // logerror("W %06x %02x\n", adr & 0xffffff, data);
icount--;
program->write_byte(adr, data);
}
@@ -567,7 +567,7 @@ UINT16 h8_device::read16(UINT32 adr)
void h8_device::write16(UINT32 adr, UINT16 data)
{
- // logerror("W %06x %04x\n", adr & 0xfffffe, data);
+ // logerror("W %06x %04x\n", adr & 0xfffffe, data);
icount--;
program->write_word(adr & ~1, data);
}
@@ -644,7 +644,7 @@ UINT8 h8_device::do_addx8(UINT8 v1, UINT8 v2)
if(res & 0x100)
CCR |= F_C;
return res;
-
+
}
UINT8 h8_device::do_subx8(UINT8 v1, UINT8 v2)
@@ -662,7 +662,7 @@ UINT8 h8_device::do_subx8(UINT8 v1, UINT8 v2)
if(res & 0x100)
CCR |= F_C;
return res;
-
+
}
UINT8 h8_device::do_inc8(UINT8 v1, UINT8 v2)
@@ -675,7 +675,7 @@ UINT8 h8_device::do_inc8(UINT8 v1, UINT8 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x80)
CCR |= F_V;
- return res;
+ return res;
}
UINT16 h8_device::do_inc16(UINT16 v1, UINT16 v2)
@@ -688,7 +688,7 @@ UINT16 h8_device::do_inc16(UINT16 v1, UINT16 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x8000)
CCR |= F_V;
- return res;
+ return res;
}
UINT32 h8_device::do_inc32(UINT32 v1, UINT32 v2)
@@ -701,7 +701,7 @@ UINT32 h8_device::do_inc32(UINT32 v1, UINT32 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x80000000)
CCR |= F_V;
- return res;
+ return res;
}
UINT8 h8_device::do_add8(UINT8 v1, UINT8 v2)
@@ -719,7 +719,7 @@ UINT8 h8_device::do_add8(UINT8 v1, UINT8 v2)
if(res & 0x100)
CCR |= F_C;
return res;
-
+
}
UINT16 h8_device::do_add16(UINT16 v1, UINT16 v2)
@@ -737,7 +737,7 @@ UINT16 h8_device::do_add16(UINT16 v1, UINT16 v2)
if(res & 0x10000)
CCR |= F_C;
return res;
-
+
}
UINT32 h8_device::do_add32(UINT32 v1, UINT32 v2)
@@ -754,7 +754,7 @@ UINT32 h8_device::do_add32(UINT32 v1, UINT32 v2)
CCR |= F_V;
if(res & U64(0x100000000))
CCR |= F_C;
- return res;
+ return res;
}
UINT8 h8_device::do_dec8(UINT8 v1, UINT8 v2)
@@ -767,7 +767,7 @@ UINT8 h8_device::do_dec8(UINT8 v1, UINT8 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x80)
CCR |= F_V;
- return res;
+ return res;
}
UINT16 h8_device::do_dec16(UINT16 v1, UINT16 v2)
@@ -780,7 +780,7 @@ UINT16 h8_device::do_dec16(UINT16 v1, UINT16 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x8000)
CCR |= F_V;
- return res;
+ return res;
}
UINT32 h8_device::do_dec32(UINT32 v1, UINT32 v2)
@@ -793,7 +793,7 @@ UINT32 h8_device::do_dec32(UINT32 v1, UINT32 v2)
CCR |= F_N;
if((v1^v2) & (v1^res) & 0x80000000)
CCR |= F_V;
- return res;
+ return res;
}
UINT8 h8_device::do_sub8(UINT8 v1, UINT8 v2)
@@ -811,7 +811,7 @@ UINT8 h8_device::do_sub8(UINT8 v1, UINT8 v2)
if(res & 0x100)
CCR |= F_C;
return res;
-
+
}
UINT16 h8_device::do_sub16(UINT16 v1, UINT16 v2)
@@ -829,7 +829,7 @@ UINT16 h8_device::do_sub16(UINT16 v1, UINT16 v2)
if(res & 0x10000)
CCR |= F_C;
return res;
-
+
}
UINT32 h8_device::do_sub32(UINT32 v1, UINT32 v2)
@@ -846,7 +846,7 @@ UINT32 h8_device::do_sub32(UINT32 v1, UINT32 v2)
CCR |= F_V;
if(res & U64(0x100000000))
CCR |= F_C;
- return res;
+ return res;
}
UINT8 h8_device::do_shal8(UINT8 v)
@@ -1017,7 +1017,7 @@ UINT8 h8_device::do_shal2_8(UINT8 v)
if(v & 0x40)
CCR |= F_C;
if((v & 0xc0) == 0x40 || (v & 0xc0) == 0x80 ||
- (v & 0x60) == 0x20 || (v & 0x60) == 0x40)
+ (v & 0x60) == 0x20 || (v & 0x60) == 0x40)
CCR |= F_V;
v <<= 2;
if(!v)
@@ -1033,7 +1033,7 @@ UINT16 h8_device::do_shal2_16(UINT16 v)
if(v & 0x4000)
CCR |= F_C;
if((v & 0xc000) == 0x4000 || (v & 0xc000) == 0x8000 ||
- (v & 0x6000) == 0x2000 || (v & 0x6000) == 0x4000)
+ (v & 0x6000) == 0x2000 || (v & 0x6000) == 0x4000)
CCR |= F_V;
v <<= 2;
if(!v)
@@ -1049,7 +1049,7 @@ UINT32 h8_device::do_shal2_32(UINT32 v)
if(v & 0x40000000)
CCR |= F_C;
if((v & 0xc0000000) == 0x40000000 || (v & 0xc0000000) == 0x80000000 ||
- (v & 0x60000000) == 0x20000000 || (v & 0x60000000) == 0x40000000)
+ (v & 0x60000000) == 0x20000000 || (v & 0x60000000) == 0x40000000)
CCR |= F_V;
v <<= 2;
if(!v)
diff --git a/src/emu/cpu/h8/h8.h b/src/emu/cpu/h8/h8.h
index b43c319809d..38d8b3b9561 100644
--- a/src/emu/cpu/h8/h8.h
+++ b/src/emu/cpu/h8/h8.h
@@ -499,7 +499,7 @@ enum {
H8_E6,
H8_E7,
H8_CCR,
- H8_EXR,
+ H8_EXR,
};
#endif
diff --git a/src/emu/cpu/h8/h8.lst b/src/emu/cpu/h8/h8.lst
index 22c3e6f994f..3ec1f46fbe4 100644
--- a/src/emu/cpu/h8/h8.lst
+++ b/src/emu/cpu/h8/h8.lst
@@ -937,7 +937,7 @@ macro jsr32 %opc %spreg
}
r8_w(IR[0], do_add8(TMP1, TMP2));
prefetch();
-
+
0f80 ff88 0 mov.l r32h r32l h
TMP1 = r32_r(IR[0] >> 4);
set_nzv32(TMP1);
@@ -1303,7 +1303,7 @@ macro jsr32 %opc %spreg
}
r8_w(IR[0], do_add8(TMP1, TMP2));
prefetch();
-
+
1f80 ff88 0 cmp.l r32h r32l h
do_sub32(r32_r(IR[0]), r32_r(IR[0] >> 4));
prefetch();
@@ -2206,19 +2206,19 @@ macro jsr32 %opc %spreg
7000 ff80 0 bset imm3 r8l
TMP1 = r8_r(IR[0]);
bset IR[0] >> 4
- r8_w(IR[0], TMP1);
+ r8_w(IR[0], TMP1);
prefetch();
7100 ff80 0 bnot imm3 r8l
TMP1 = r8_r(IR[0]);
bnot IR[0] >> 4
- r8_w(IR[0], TMP1);
+ r8_w(IR[0], TMP1);
prefetch();
7200 ff80 0 bclr imm3 r8l
TMP1 = r8_r(IR[0]);
bclr IR[0] >> 4
- r8_w(IR[0], TMP1);
+ r8_w(IR[0], TMP1);
prefetch();
7300 ff80 0 btst imm3 r8l
diff --git a/src/emu/cpu/h8/h83002.h b/src/emu/cpu/h8/h83002.h
index 010846729c3..f3d9745c321 100644
--- a/src/emu/cpu/h8/h83002.h
+++ b/src/emu/cpu/h8/h83002.h
@@ -54,7 +54,7 @@ public:
h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8h_intc_device> intc;
diff --git a/src/emu/cpu/h8/h83006.h b/src/emu/cpu/h8/h83006.h
index 4bea038b541..9d2061dcd3e 100644
--- a/src/emu/cpu/h8/h83006.h
+++ b/src/emu/cpu/h8/h83006.h
@@ -56,7 +56,7 @@ public:
h83006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8h_intc_device> intc;
diff --git a/src/emu/cpu/h8/h83008.h b/src/emu/cpu/h8/h83008.h
index 9be1b6b978f..699f7453897 100644
--- a/src/emu/cpu/h8/h83008.h
+++ b/src/emu/cpu/h8/h83008.h
@@ -56,7 +56,7 @@ public:
h83008_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8h_intc_device> intc;
diff --git a/src/emu/cpu/h8/h83048.h b/src/emu/cpu/h8/h83048.h
index 7ece527222a..d3bcf295d11 100644
--- a/src/emu/cpu/h8/h83048.h
+++ b/src/emu/cpu/h8/h83048.h
@@ -63,7 +63,7 @@ public:
h83048_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8h_intc_device> intc;
diff --git a/src/emu/cpu/h8/h83337.c b/src/emu/cpu/h8/h83337.c
index a6768de88e6..2a4f261a517 100644
--- a/src/emu/cpu/h8/h83337.c
+++ b/src/emu/cpu/h8/h83337.c
@@ -95,9 +95,9 @@ DEVICE_ADDRESS_MAP_START(map, 16, h83337_device)
AM_RANGE(0xff90, 0xff91) AM_DEVREADWRITE8("timer16:0", h8_timer16_channel_device, tier_r, tier_w, 0xff00)
AM_RANGE(0xff90, 0xff91) AM_DEVREADWRITE8("timer16:0", h8_timer16_channel_device, tsr_r, tsr_w, 0x00ff)
AM_RANGE(0xff92, 0xff93) AM_DEVREADWRITE( "timer16:0", h8_timer16_channel_device, tcnt_r, tcnt_w )
-// AM_RANGE(0xff94, 0xff95) AM_DEVREADWRITE( "timer16:0", h8_timer16_channel_device, ocr_r, ocr_w )
+// AM_RANGE(0xff94, 0xff95) AM_DEVREADWRITE( "timer16:0", h8_timer16_channel_device, ocr_r, ocr_w )
AM_RANGE(0xff96, 0xff97) AM_DEVREADWRITE8("timer16:0", h8_timer16_channel_device, tcr_r, tcr_w, 0xff00)
-// AM_RANGE(0xff96, 0xff97) AM_DEVREADWRITE8("timer16:0", h8_timer16_channel_device, tocr_r, tocr_w, 0x00ff)
+// AM_RANGE(0xff96, 0xff97) AM_DEVREADWRITE8("timer16:0", h8_timer16_channel_device, tocr_r, tocr_w, 0x00ff)
AM_RANGE(0xff98, 0xff9f) AM_DEVREAD( "timer16:0", h8_timer16_channel_device, tgr_r )
AM_RANGE(0xffac, 0xffad) AM_DEVREADWRITE8("port1", h8_port_device, pcr_r, pcr_w, 0xff00)
diff --git a/src/emu/cpu/h8/h83337.h b/src/emu/cpu/h8/h83337.h
index 393068c4da0..ed5467cd801 100644
--- a/src/emu/cpu/h8/h83337.h
+++ b/src/emu/cpu/h8/h83337.h
@@ -63,13 +63,13 @@ public:
h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(wscr_r);
- DECLARE_WRITE8_MEMBER(wscr_w);
+ DECLARE_WRITE8_MEMBER(wscr_w);
DECLARE_READ8_MEMBER(stcr_r);
- DECLARE_WRITE8_MEMBER(stcr_w);
+ DECLARE_WRITE8_MEMBER(stcr_w);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
DECLARE_READ8_MEMBER(mdcr_r);
- DECLARE_WRITE8_MEMBER(mdcr_w);
+ DECLARE_WRITE8_MEMBER(mdcr_w);
protected:
required_device<h8_intc_device> intc;
diff --git a/src/emu/cpu/h8/h8_adc.c b/src/emu/cpu/h8/h8_adc.c
index 8def493ef86..644f8608a31 100644
--- a/src/emu/cpu/h8/h8_adc.c
+++ b/src/emu/cpu/h8/h8_adc.c
@@ -124,7 +124,7 @@ void h8_adc_device::device_reset()
mode = IDLE;
channel = 0;
count = 0;
- next_event = 0;
+ next_event = 0;
mode_update();
analog_powered = !analog_power_control;
adtrg = true;
@@ -188,7 +188,7 @@ void h8_adc_device::start_conversion()
count = start_count;
sampling();
conversion_wait(true, !analog_powered);
- analog_powered = true;
+ analog_powered = true;
}
void h8_adc_device::timeout(UINT64 current_time)
@@ -450,7 +450,7 @@ void h8_adc_2655_device::mode_update()
if(adcsr & 0x03) {
mode |= BUFFER;
-
+
}
if(adcsr & 0x08) {
diff --git a/src/emu/cpu/h8/h8_adc.h b/src/emu/cpu/h8/h8_adc.h
index 6d0cef502f5..314af72c24b 100644
--- a/src/emu/cpu/h8/h8_adc.h
+++ b/src/emu/cpu/h8/h8_adc.h
@@ -43,7 +43,7 @@
#include "h8.h"
#include "h8_intc.h"
-#define MCFG_H8_ADC_GENERIC_ADD( _tag, _type, intc, vect ) \
+#define MCFG_H8_ADC_GENERIC_ADD( _tag, _type, intc, vect ) \
MCFG_DEVICE_ADD( _tag, _type, 0 ) \
downcast<h8_adc_device *>(device)->set_info(intc, vect);
diff --git a/src/emu/cpu/h8/h8_intc.c b/src/emu/cpu/h8/h8_intc.c
index 18570794a63..b563cdb63ae 100644
--- a/src/emu/cpu/h8/h8_intc.c
+++ b/src/emu/cpu/h8/h8_intc.c
@@ -280,10 +280,10 @@ void h8h_intc_device::update_irq_types()
const int h8h_intc_device::vector_to_slot[64] = {
-1, -1, -1, -1, -1, -1, -1, -1, // NMI at 7
-1, -1, -1, -1, 0, 1, 2, 2, // IRQ 0-3
- 3, 3, 3, 3, 4, 4, 4, 4, // IRQ 4-5, (reservedx2), WOVI, CMI, (reserved), ADI
- 5, 5, 5, 5, 6, 6, 6, 6, // IMIA0, IMIB0, OVI0, (reserved), IMIA1, IMIB1, OVI1, (reserved)
- 7, 7, 7, 7, 8, 8, 8, 8, // IMIA2, IMIB2, OVI2, (reserved), CMIA0, CMIB0, CMIx1, TOVI0/1
- 9, 9, 9, 9, 10, 10, 10, 10, // CMIA2, CMIB2, CMIx3, TOVI2/3, DEND0A, DEND0B, DEND1A, DEND1B
+ 3, 3, 3, 3, 4, 4, 4, 4, // IRQ 4-5, (reservedx2), WOVI, CMI, (reserved), ADI
+ 5, 5, 5, 5, 6, 6, 6, 6, // IMIA0, IMIB0, OVI0, (reserved), IMIA1, IMIB1, OVI1, (reserved)
+ 7, 7, 7, 7, 8, 8, 8, 8, // IMIA2, IMIB2, OVI2, (reserved), CMIA0, CMIB0, CMIx1, TOVI0/1
+ 9, 9, 9, 9, 10, 10, 10, 10, // CMIA2, CMIB2, CMIx3, TOVI2/3, DEND0A, DEND0B, DEND1A, DEND1B
11, 11, 11, 11, 12, 12, 12, 12, // (reservedx4), ERI0, RXI0, TXI0, TEI0
13, 13, 13, 13, 14, 14, 14, 14 // ERI1, RXI1, TXI1, TEI1, ERI2, RXI2, TXI2, TEI2
};
@@ -342,8 +342,8 @@ WRITE8_MEMBER(h8s_intc_device::iprk_w)
const int h8s_intc_device::vector_to_slot[92] = {
-1, -1, -1, -1, -1, -1, -1, -1, // NMI at 7
-1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 2, 3, 3, 4, 4, // IRQ 0-7
- 5, 6, 7, 8, 9, 9, 9, 9, // SWDTEND, WOVI, CMI, (reserved), ADI
+ 0, 1, 2, 2, 3, 3, 4, 4, // IRQ 0-7
+ 5, 6, 7, 8, 9, 9, 9, 9, // SWDTEND, WOVI, CMI, (reserved), ADI
10, 10, 10, 10, 10, 10, 10, 10, // TGI0A, TGI0B, TGI0C, TGI0D, TGI0V
11, 11, 11, 11, 12, 12, 12, 12, // TGI1A, TGI1B, TGI1V, TGI1U, TGI2A, TGI2B, TGI2V, TGI2U
13, 13, 13, 13, 13, 13, 13, 13, // TGI3A, TGI3B, TGI3C, TGI3D, TGI3V
diff --git a/src/emu/cpu/h8/h8_intc.h b/src/emu/cpu/h8/h8_intc.h
index d0b2e2420af..bc28b26d604 100644
--- a/src/emu/cpu/h8/h8_intc.h
+++ b/src/emu/cpu/h8/h8_intc.h
@@ -42,13 +42,13 @@
#include "h8.h"
-#define MCFG_H8_INTC_ADD( _tag ) \
+#define MCFG_H8_INTC_ADD( _tag ) \
MCFG_DEVICE_ADD( _tag, H8_INTC, 0 )
-#define MCFG_H8H_INTC_ADD( _tag ) \
+#define MCFG_H8H_INTC_ADD( _tag ) \
MCFG_DEVICE_ADD( _tag, H8H_INTC, 0 )
-#define MCFG_H8S_INTC_ADD( _tag ) \
+#define MCFG_H8S_INTC_ADD( _tag ) \
MCFG_DEVICE_ADD( _tag, H8S_INTC, 0 )
@@ -100,7 +100,7 @@ public:
h8h_intc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
DECLARE_READ8_MEMBER(isr_r);
- DECLARE_WRITE8_MEMBER(isr_w);
+ DECLARE_WRITE8_MEMBER(isr_w);
DECLARE_READ8_MEMBER(icr_r);
DECLARE_WRITE8_MEMBER(icr_w);
DECLARE_READ8_MEMBER(icrc_r);
diff --git a/src/emu/cpu/h8/h8_port.c b/src/emu/cpu/h8/h8_port.c
index 7694f571c7b..db78d88e589 100644
--- a/src/emu/cpu/h8/h8_port.c
+++ b/src/emu/cpu/h8/h8_port.c
@@ -18,21 +18,21 @@ void h8_port_device::set_info(int _address, UINT8 _default_ddr, UINT8 _mask)
WRITE8_MEMBER(h8_port_device::ddr_w)
{
- // logerror("%s: ddr_w %02x\n", tag(), data);
+ // logerror("%s: ddr_w %02x\n", tag(), data);
ddr = data;
update_output();
}
WRITE8_MEMBER(h8_port_device::dr_w)
{
- // logerror("%s: dr_w %02x\n", tag(), data);
+ // logerror("%s: dr_w %02x\n", tag(), data);
dr = data;
update_output();
}
READ8_MEMBER(h8_port_device::dr_r)
{
- // logerror("%s: dr_r %02x\n", tag(), (dr | mask) & 0xff);
+ // logerror("%s: dr_r %02x\n", tag(), (dr | mask) & 0xff);
return dr | mask;
}
@@ -41,8 +41,8 @@ READ8_MEMBER(h8_port_device::port_r)
UINT8 res = mask | (dr & ddr);
if((ddr & ~mask) != UINT8(~mask))
res |= io->read_word(address) & ~ddr;
-
- // logerror("%s: port_r %02x (%02x %02x)\n", tag(), res, ddr & ~mask, UINT8(~mask));
+
+ // logerror("%s: port_r %02x (%02x %02x)\n", tag(), res, ddr & ~mask, UINT8(~mask));
return res;
}
diff --git a/src/emu/cpu/h8/h8_port.h b/src/emu/cpu/h8/h8_port.h
index 2407929d14b..10df3d8a3e2 100644
--- a/src/emu/cpu/h8/h8_port.h
+++ b/src/emu/cpu/h8/h8_port.h
@@ -42,7 +42,7 @@
#include "h8.h"
-#define MCFG_H8_PORT_ADD( _tag, address, ddr, mask ) \
+#define MCFG_H8_PORT_ADD( _tag, address, ddr, mask ) \
MCFG_DEVICE_ADD( _tag, H8_PORT, 0 ) \
downcast<h8_port_device *>(device)->set_info(address, ddr, mask);
diff --git a/src/emu/cpu/h8/h8_sci.c b/src/emu/cpu/h8/h8_sci.c
index 0db62806588..e5213bc109b 100644
--- a/src/emu/cpu/h8/h8_sci.c
+++ b/src/emu/cpu/h8/h8_sci.c
@@ -32,13 +32,13 @@ WRITE8_MEMBER(h8_sci_device::smr_w)
{
smr = data;
logerror("%s: smr_w %02x %s %c%c%c%s /%d (%06x)\n", tag(), data,
- data & SMR_CA ? "sync" : "async",
- data & SMR_CHR ? '7' : '8',
- data & SMR_PE ? data & SMR_OE ? 'o' : 'e' : 'n',
- data & SMR_STOP ? '2' : '1',
- data & SMR_MP ? " mp" : "",
- 1 << 2*(data & SMR_CKS),
- cpu->pc());
+ data & SMR_CA ? "sync" : "async",
+ data & SMR_CHR ? '7' : '8',
+ data & SMR_PE ? data & SMR_OE ? 'o' : 'e' : 'n',
+ data & SMR_STOP ? '2' : '1',
+ data & SMR_MP ? " mp" : "",
+ 1 << 2*(data & SMR_CKS),
+ cpu->pc());
clock_update();
}
@@ -64,14 +64,14 @@ READ8_MEMBER(h8_sci_device::brr_r)
WRITE8_MEMBER(h8_sci_device::scr_w)
{
logerror("%s: scr_w %02x%s%s%s%s%s%s clk=%d (%06x)\n", tag(), data,
- data & SCR_TIE ? " txi" : "",
- data & SCR_RIE ? " rxi" : "",
- data & SCR_TE ? " tx" : "",
- data & SCR_RE ? " rx" : "",
- data & SCR_MPIE ? " mpi" : "",
- data & SCR_TEIE ? " tei" : "",
- data & SCR_CKE,
- cpu->pc());
+ data & SCR_TIE ? " txi" : "",
+ data & SCR_RIE ? " rxi" : "",
+ data & SCR_TE ? " tx" : "",
+ data & SCR_RE ? " rx" : "",
+ data & SCR_MPIE ? " mpi" : "",
+ data & SCR_TEIE ? " tei" : "",
+ data & SCR_CKE,
+ cpu->pc());
UINT8 delta = scr ^ data;
scr = data;
@@ -217,7 +217,7 @@ void h8_sci_device::device_start()
external_to_internal_ratio = (external_clock_period*cpu->clock()).as_double();
internal_to_external_ratio = 1/external_to_internal_ratio;
}
-
+
intc = siblingdevice<h8_intc_device>(intc_tag);
save_item(NAME(rdr));
save_item(NAME(tdr));
@@ -301,7 +301,7 @@ WRITE_LINE_MEMBER(h8_sci_device::clk_w)
case CLKM_EXTERNAL_SYNC:
if((!ext_clock_value) && (clock_state & CLK_TX))
tx_dropped_edge();
-
+
else if(ext_clock_value && (clock_state & CLK_RX))
rx_raised_edge();
break;
@@ -324,16 +324,16 @@ UINT64 h8_sci_device::internal_update(UINT64 current_time)
clock_base += fp;
}
assert(delta < fp);
-
+
bool new_clock = delta >= divider;
if(new_clock != clock_value) {
cpu->synchronize();
if((!new_clock) && (clock_state & CLK_TX))
tx_dropped_edge();
-
+
else if(new_clock && (clock_state & CLK_RX))
rx_raised_edge();
-
+
clock_value = new_clock;
if(clock_state || clock_value)
clk_cb(clock_value);
@@ -359,16 +359,16 @@ UINT64 h8_sci_device::internal_update(UINT64 current_time)
cpu->synchronize();
if((!new_clock) && (clock_state & CLK_TX))
tx_dropped_edge();
-
+
else if(new_clock && (clock_state & CLK_RX))
rx_raised_edge();
-
+
clock_value = new_clock;
if(clock_mode == CLKM_INTERNAL_ASYNC_OUT && (clock_state || !clock_value))
clk_cb(clock_value);
}
}
-
+
event = clock_base + (clock_value ? fp : divider*8);
}
break;
@@ -385,14 +385,14 @@ UINT64 h8_sci_device::internal_update(UINT64 current_time)
cpu->synchronize();
if((!new_clock) && (clock_state & CLK_TX))
tx_dropped_edge();
-
+
else if(new_clock && (clock_state & CLK_RX))
rx_raised_edge();
-
+
clock_value = new_clock;
}
}
-
+
event = UINT64((clock_base + (clock_value ? 2 : 1))*external_to_internal_ratio)+1;
}
break;
@@ -409,14 +409,14 @@ UINT64 h8_sci_device::internal_update(UINT64 current_time)
cpu->synchronize();
if((!new_clock) && (clock_state & CLK_TX))
tx_dropped_edge();
-
+
else if(new_clock && (clock_state & CLK_RX))
rx_raised_edge();
-
+
clock_value = new_clock;
}
}
-
+
event = UINT64((clock_base + (clock_value ? 16 : 8))*external_to_internal_ratio)+1;
}
break;
@@ -503,7 +503,7 @@ void h8_sci_device::tx_start()
}
clock_start(CLK_TX);
}
-
+
void h8_sci_device::tx_dropped_edge()
{
logerror("%s: tx_dropped_edge state=%s bit=%d\n", tag(), state_names[tx_state], tx_bit);
@@ -676,4 +676,3 @@ void h8_sci_device::rx_raised_edge()
}
logerror("%s: -> state=%s, bit=%d\n", tag(), state_names[rx_state], rx_bit);
}
-
diff --git a/src/emu/cpu/h8/h8_sci.h b/src/emu/cpu/h8/h8_sci.h
index e0083a87676..bd508e44061 100644
--- a/src/emu/cpu/h8/h8_sci.h
+++ b/src/emu/cpu/h8/h8_sci.h
@@ -84,7 +84,7 @@ public:
template<class _Object> static devcb2_base &set_clk_cb(device_t &device, _Object object) { return downcast<h8_sci_device &>(device).clk_cb.set_callback(object); }
UINT64 internal_update(UINT64 current_time);
-
+
protected:
enum {
ST_IDLE, ST_START, ST_BIT, ST_PARITY, ST_STOP, ST_LAST_TICK,
diff --git a/src/emu/cpu/h8/h8_timer16.c b/src/emu/cpu/h8/h8_timer16.c
index 92ec7f932b2..abf89b42c16 100644
--- a/src/emu/cpu/h8/h8_timer16.c
+++ b/src/emu/cpu/h8/h8_timer16.c
@@ -94,14 +94,14 @@ WRITE8_MEMBER(h8_timer16_channel_device::tier_w)
tier = data;
tier_update();
logerror("%s: irq %c%c%c%c%c%c trigger=%d\n",
- tag(),
- ier & IRQ_A ? 'a' : '.',
- ier & IRQ_B ? 'b' : '.',
- ier & IRQ_C ? 'c' : '.',
- ier & IRQ_D ? 'd' : '.',
- ier & IRQ_V ? 'v' : '.',
- ier & IRQ_U ? 'u' : '.',
- ier & IRQ_TRIG ? 1 : 0);
+ tag(),
+ ier & IRQ_A ? 'a' : '.',
+ ier & IRQ_B ? 'b' : '.',
+ ier & IRQ_C ? 'c' : '.',
+ ier & IRQ_D ? 'd' : '.',
+ ier & IRQ_V ? 'v' : '.',
+ ier & IRQ_U ? 'u' : '.',
+ ier & IRQ_TRIG ? 1 : 0);
recalc_event();
}
@@ -218,11 +218,11 @@ void h8_timer16_channel_device::update_counter(UINT64 cur_time)
tcnt = tt % counter_cycle;
if(0)
logerror("%s: Updating %d (%ld %ld) (%ld %ld) -> %d/%d\n",
- tag(),
- ott,
- long(last_clock_update), long(cur_time),
- long(base_time), long(new_time),
- tt, tcnt);
+ tag(),
+ ott,
+ long(last_clock_update), long(cur_time),
+ long(base_time), long(new_time),
+ tt, tcnt);
for(int i=0; i<tgr_count; i++)
if((ier & (1 << i)) && (tt == tgr[i] || tcnt == tgr[i]) && interrupt[i] != -1) {
@@ -284,7 +284,7 @@ void h8_timer16_channel_device::recalc_event(UINT64 cur_time)
if(0)
logerror("%s: tcnt=%d tgr%c=%d cycle=%d -> delay=%d\n",
- tag(), tcnt, 'a'+i, tgr[i], counter_cycle, new_delay);
+ tag(), tcnt, 'a'+i, tgr[i], counter_cycle, new_delay);
if(event_delay > new_delay)
event_delay = new_delay;
}
@@ -292,10 +292,10 @@ void h8_timer16_channel_device::recalc_event(UINT64 cur_time)
event_time = ((((cur_time + (1ULL << clock_divider) - phase) >> clock_divider) + event_delay - 1) << clock_divider) + phase;
else
event_time = 0;
-
+
if(event_time && 0)
logerror("%s: next event in %d cycles (%ld)\n", tag(), int(event_time - cpu->get_cycle()), long(event_time));
-
+
} else {
logerror("decrementing counter\n");
exit(1);
@@ -622,7 +622,7 @@ void h8s_timer16_channel_device::set_chain(const char *_chain_tag)
}
void h8s_timer16_channel_device::set_info(int _tgr_count, UINT8 _tier_mask, const char *intc, int irq_base,
- int t0, int t1, int t2, int t3, int t4, int t5, int t6, int t7)
+ int t0, int t1, int t2, int t3, int t4, int t5, int t6, int t7)
{
tgr_count = _tgr_count;
tbr_count = 0;
diff --git a/src/emu/cpu/h8/h8_timer16.h b/src/emu/cpu/h8/h8_timer16.h
index 210951ead97..2f3c581fe55 100644
--- a/src/emu/cpu/h8/h8_timer16.h
+++ b/src/emu/cpu/h8/h8_timer16.h
@@ -43,23 +43,23 @@
#include "h8.h"
#include "h8_intc.h"
-#define MCFG_H8_TIMER16_ADD( _tag, _count, _tstr ) \
- MCFG_DEVICE_ADD( _tag, H8_TIMER16, 0 ) \
+#define MCFG_H8_TIMER16_ADD( _tag, _count, _tstr ) \
+ MCFG_DEVICE_ADD( _tag, H8_TIMER16, 0 ) \
downcast<h8_timer16_device *>(device)->set_info(_count, _tstr);
#define MCFG_H8_TIMER16_CHANNEL_ADD( _tag, tgr_count, tbr_count, intc, irq_base ) \
- MCFG_DEVICE_ADD( _tag, H8_TIMER16_CHANNEL, 0 ) \
+ MCFG_DEVICE_ADD( _tag, H8_TIMER16_CHANNEL, 0 ) \
downcast<h8_timer16_channel_device *>(device)->set_info(tgr_count, tbr_count, intc, irq_base);
#define MCFG_H8H_TIMER16_CHANNEL_ADD( _tag, tgr_count, tbr_count, intc, irq_base ) \
- MCFG_DEVICE_ADD( _tag, H8H_TIMER16_CHANNEL, 0 ) \
+ MCFG_DEVICE_ADD( _tag, H8H_TIMER16_CHANNEL, 0 ) \
downcast<h8h_timer16_channel_device *>(device)->set_info(tgr_count, tbr_count, intc, irq_base);
#define MCFG_H8S_TIMER16_CHANNEL_ADD( _tag, tgr_count, tier_mask, intc, irq_base, t0, t1, t2, t3, t4, t5, t6, t7 ) \
- MCFG_DEVICE_ADD( _tag, H8S_TIMER16_CHANNEL, 0 ) \
+ MCFG_DEVICE_ADD( _tag, H8S_TIMER16_CHANNEL, 0 ) \
downcast<h8s_timer16_channel_device *>(device)->set_info(tgr_count, tier_mask, intc, irq_base, t0, t1, t2, t3, t4, t5, t6, t7);
-#define MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN( _tag ) \
+#define MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN( _tag ) \
downcast<h8s_timer16_channel_device *>(device)->set_chain(_tag);
class h8_timer16_channel_device : public device_t {
@@ -180,7 +180,7 @@ public:
virtual ~h8s_timer16_channel_device();
void set_info(int tgr_count, UINT8 _tier_mask, const char *intc, int irq_base,
- int t0, int t1, int t2, int t3, int t4, int t5, int t6, int t7);
+ int t0, int t1, int t2, int t3, int t4, int t5, int t6, int t7);
void set_chain(const char *chain_tag);
protected:
diff --git a/src/emu/cpu/h8/h8_timer8.c b/src/emu/cpu/h8/h8_timer8.c
index 7f6f7178686..074085b5f06 100644
--- a/src/emu/cpu/h8/h8_timer8.c
+++ b/src/emu/cpu/h8/h8_timer8.c
@@ -92,7 +92,7 @@ void h8_timer8_channel_device::update_tcr()
clock_type = INPUT_UPDOWN;
clock_divider = 0;
logerror("%s: clock external both edges", tag());
- break;
+ break;
}
switch(tcr & TCR_CCLR) {
@@ -118,9 +118,9 @@ void h8_timer8_channel_device::update_tcr()
}
logerror(", irq=%c%c%c\n",
- tcr & TCR_CMIEB ? 'b' : '-',
- tcr & TCR_CMIEA ? 'a' : '-',
- tcr & TCR_OVIE ? 'o' : '-');
+ tcr & TCR_CMIEB ? 'b' : '-',
+ tcr & TCR_CMIEA ? 'a' : '-',
+ tcr & TCR_OVIE ? 'o' : '-');
}
READ8_MEMBER(h8_timer8_channel_device::tcsr_r)
@@ -223,7 +223,7 @@ void h8_timer8_channel_device::update_counter(UINT64 cur_time)
if(tt == tcor[0] || tcnt == tcor[0]) {
if(chained_timer)
chained_timer->chained_timer_tcora();
-
+
if(!(tcsr & TCSR_CMFA)) {
tcsr |= TCSR_CMFA;
if(tcr & TCR_CMIEA)
@@ -317,7 +317,7 @@ void h8_timer8_channel_device::timer_tick()
if(tcnt == tcor[0]) {
if(chained_timer)
chained_timer->chained_timer_tcora();
-
+
if(!(tcsr & TCSR_CMFA)) {
tcsr |= TCSR_CMFA;
if(tcr & TCR_CMIEA)
diff --git a/src/emu/cpu/h8/h8_timer8.h b/src/emu/cpu/h8/h8_timer8.h
index 0b8915a87cf..fb73a7eb17e 100644
--- a/src/emu/cpu/h8/h8_timer8.h
+++ b/src/emu/cpu/h8/h8_timer8.h
@@ -44,11 +44,11 @@
#include "h8_intc.h"
#define MCFG_H8_TIMER8_CHANNEL_ADD( _tag, intc, irq_ca, irq_cb, irq_v, div1, div2, div3, div4, div5, div6 ) \
- MCFG_DEVICE_ADD( _tag, H8_TIMER8_CHANNEL, 0 ) \
+ MCFG_DEVICE_ADD( _tag, H8_TIMER8_CHANNEL, 0 ) \
downcast<h8_timer8_channel_device *>(device)->set_info(intc, irq_ca, irq_cb, irq_v, div1, div2, div3, div4, div5, div6);
#define MCFG_H8H_TIMER8_CHANNEL_ADD( _tag, intc, irq_ca, irq_cb, irq_v, chain, chain_mode, has_adte, has_ice ) \
- MCFG_DEVICE_ADD( _tag, H8H_TIMER8_CHANNEL, 0 ) \
+ MCFG_DEVICE_ADD( _tag, H8H_TIMER8_CHANNEL, 0 ) \
downcast<h8h_timer8_channel_device *>(device)->set_info(intc, irq_ca, irq_cb, irq_v, chain, chain_mode, has_adte, has_ice);
class h8_timer8_channel_device : public device_t {
@@ -95,7 +95,7 @@ protected:
TCSR_ADTE = 0x10,
TCSR_OVF = 0x20,
TCSR_CMFA = 0x40,
- TCSR_CMFB = 0x80
+ TCSR_CMFB = 0x80
};
enum {
diff --git a/src/emu/cpu/h8/h8s2245.c b/src/emu/cpu/h8/h8s2245.c
index ee1aefaac9f..91a0f5bead9 100644
--- a/src/emu/cpu/h8/h8s2245.c
+++ b/src/emu/cpu/h8/h8s2245.c
@@ -101,33 +101,33 @@ static MACHINE_CONFIG_FRAGMENT(h8s2245)
MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false)
MCFG_H8_TIMER16_ADD("timer16", 3, 0x00)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:1", 2, 0x4c, "intc", 40,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:2")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:2", 2, 0x4c, "intc", 44,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024)
MCFG_H8_SCI_ADD("sci0", "intc", 80, 81, 82, 83)
MCFG_H8_SCI_ADD("sci1", "intc", 84, 85, 86, 87)
MCFG_H8_SCI_ADD("sci2", "intc", 88, 89, 90, 91)
diff --git a/src/emu/cpu/h8/h8s2245.h b/src/emu/cpu/h8/h8s2245.h
index 8b1f0c2136b..d0b7108641c 100644
--- a/src/emu/cpu/h8/h8s2245.h
+++ b/src/emu/cpu/h8/h8s2245.h
@@ -63,7 +63,7 @@ public:
h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8s_intc_device> intc;
diff --git a/src/emu/cpu/h8/h8s2320.c b/src/emu/cpu/h8/h8s2320.c
index 8121b9e4fbb..83e27aaa9f3 100644
--- a/src/emu/cpu/h8/h8s2320.c
+++ b/src/emu/cpu/h8/h8s2320.c
@@ -145,61 +145,61 @@ static MACHINE_CONFIG_FRAGMENT(h8s2320)
MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false)
MCFG_H8_TIMER16_ADD("timer16", 6, 0x00)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:1", 2, 0x4c, "intc", 40,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:2")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:2", 2, 0x4c, "intc", 44,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:3", 4, 0x60, "intc", 48,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::DIV_4096)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::DIV_4096)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:4", 2, 0x4c, "intc", 56,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:5")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:5", 2, 0x4c, "intc", 60,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8_SCI_ADD("sci0", "intc", 80, 81, 82, 83)
MCFG_H8_SCI_ADD("sci1", "intc", 84, 85, 86, 87)
MCFG_H8_SCI_ADD("sci2", "intc", 88, 89, 90, 91)
diff --git a/src/emu/cpu/h8/h8s2320.h b/src/emu/cpu/h8/h8s2320.h
index 924e117150c..0df2d0761a4 100644
--- a/src/emu/cpu/h8/h8s2320.h
+++ b/src/emu/cpu/h8/h8s2320.h
@@ -68,7 +68,7 @@ public:
h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8s_intc_device> intc;
diff --git a/src/emu/cpu/h8/h8s2357.c b/src/emu/cpu/h8/h8s2357.c
index e3274ab098d..ceb04b7ebfa 100644
--- a/src/emu/cpu/h8/h8s2357.c
+++ b/src/emu/cpu/h8/h8s2357.c
@@ -123,61 +123,61 @@ static MACHINE_CONFIG_FRAGMENT(h8s2357)
MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false)
MCFG_H8_TIMER16_ADD("timer16", 6, 0x00)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:1", 2, 0x4c, "intc", 40,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:2")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:2", 2, 0x4c, "intc", 44,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:3", 4, 0x60, "intc", 48,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::DIV_4096)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::DIV_4096)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:4", 2, 0x4c, "intc", 56,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:5")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:5", 2, 0x4c, "intc", 60,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8_SCI_ADD("sci0", "intc", 80, 81, 82, 83)
MCFG_H8_SCI_ADD("sci1", "intc", 84, 85, 86, 87)
MCFG_H8_SCI_ADD("sci2", "intc", 88, 89, 90, 91)
diff --git a/src/emu/cpu/h8/h8s2357.h b/src/emu/cpu/h8/h8s2357.h
index 35a51551388..b38f90e7737 100644
--- a/src/emu/cpu/h8/h8s2357.h
+++ b/src/emu/cpu/h8/h8s2357.h
@@ -65,7 +65,7 @@ public:
h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8s_intc_device> intc;
diff --git a/src/emu/cpu/h8/h8s2655.c b/src/emu/cpu/h8/h8s2655.c
index d6775e32a01..6f3e8778bb3 100644
--- a/src/emu/cpu/h8/h8s2655.c
+++ b/src/emu/cpu/h8/h8s2655.c
@@ -96,61 +96,61 @@ static MACHINE_CONFIG_FRAGMENT(h8s2655)
MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false)
MCFG_H8_TIMER16_ADD("timer16", 6, 0x00)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:1", 2, 0x4c, "intc", 40,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:2")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:2", 2, 0x4c, "intc", 44,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_B,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_B,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:3", 4, 0x60, "intc", 48,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::DIV_4096)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::DIV_4096)
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:4", 2, 0x4c, "intc", 56,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::CHAIN)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_1024,
+ h8_timer16_channel_device::CHAIN)
MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:5")
MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:5", 2, 0x4c, "intc", 60,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- h8_timer16_channel_device::INPUT_A,
- h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::INPUT_D)
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ h8_timer16_channel_device::INPUT_A,
+ h8_timer16_channel_device::INPUT_C,
+ h8_timer16_channel_device::DIV_256,
+ h8_timer16_channel_device::INPUT_D)
MCFG_H8_SCI_ADD("sci0", "intc", 80, 81, 82, 83)
MCFG_H8_SCI_ADD("sci1", "intc", 84, 85, 86, 87)
MCFG_H8_SCI_ADD("sci2", "intc", 88, 89, 90, 91)
diff --git a/src/emu/cpu/h8/h8s2655.h b/src/emu/cpu/h8/h8s2655.h
index 52c5f9ecdcf..ca90c99d777 100644
--- a/src/emu/cpu/h8/h8s2655.h
+++ b/src/emu/cpu/h8/h8s2655.h
@@ -57,7 +57,7 @@ public:
h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
DECLARE_READ8_MEMBER(syscr_r);
- DECLARE_WRITE8_MEMBER(syscr_w);
+ DECLARE_WRITE8_MEMBER(syscr_w);
protected:
required_device<h8s_intc_device> intc;
diff --git a/src/emu/cpu/i386/i386.c b/src/emu/cpu/i386/i386.c
index e5b8a41c90f..0b8d023f3be 100644
--- a/src/emu/cpu/i386/i386.c
+++ b/src/emu/cpu/i386/i386.c
@@ -4326,4 +4326,3 @@ void pentium4_device::device_reset()
CHANGE_PC(m_eip);
}
-
diff --git a/src/emu/cpu/i86/i186.c b/src/emu/cpu/i86/i186.c
index be65922ad54..4a40b7e0b85 100644
--- a/src/emu/cpu/i86/i186.c
+++ b/src/emu/cpu/i86/i186.c
@@ -642,7 +642,7 @@ void i80186_cpu_device::device_reset()
m_timer[0].control = 0;
m_timer[1].control = 0;
m_timer[2].control = 0;
-
+
set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(i80186_cpu_device::int_callback),this));
}
diff --git a/src/emu/cpu/mn10200/mn10200.c b/src/emu/cpu/mn10200/mn10200.c
index 9e729a8696e..ba32d878630 100644
--- a/src/emu/cpu/mn10200/mn10200.c
+++ b/src/emu/cpu/mn10200/mn10200.c
@@ -74,7 +74,7 @@ void mn10200_device::device_start()
save_item(NAME(m_icrl));
save_item(NAME(m_icrh));
save_item(NAME(m_possible_irq));
-
+
// timers
m_sysclock_base = attotime::from_hz(unscaled_clock() / 2);
@@ -94,7 +94,7 @@ void mn10200_device::device_start()
save_item(NAME(m_simple_timer[i].base), i);
save_item(NAME(m_simple_timer[i].cur), i);
}
-
+
for (int i = 0; i < MN10200_NUM_PRESCALERS; i++)
{
m_prescaler[i].mode = 0;
@@ -105,7 +105,7 @@ void mn10200_device::device_start()
save_item(NAME(m_prescaler[i].base), i);
save_item(NAME(m_prescaler[i].cur), i);
}
-
+
// dma
for (int i = 0; i < 8; i++)
{
@@ -123,7 +123,7 @@ void mn10200_device::device_start()
save_item(NAME(m_dma[i].ctrlh), i);
save_item(NAME(m_dma[i].irq), i);
}
-
+
// serial
for (int i = 0; i < 2; i++)
{
@@ -135,7 +135,7 @@ void mn10200_device::device_start()
save_item(NAME(m_serial[i].ctrlh), i);
save_item(NAME(m_serial[i].buf), i);
}
-
+
// ports
m_p4 = 0xf;
@@ -211,18 +211,18 @@ void mn10200_device::device_reset()
{
change_pc(0x80000);
m_psw = 0;
-
+
// note: officially, these registers are reset to 'undefined'
memset(m_d, 0, sizeof(m_d));
memset(m_a, 0, sizeof(m_a));
m_mdr = 0;
-
+
// reset internal peripherals
m_nmicr = 0;
m_iagr = 0;
write_mem16(0xfc00, 0x8000);
write_mem16(0xfc02, 0x0737);
-
+
// need to clear them twice since some rely on the value of others
for (int i = 0; i < 2; i++)
for (int address = 0xfc04; address < 0x10000; address++)
@@ -250,10 +250,10 @@ void mn10200_device::check_irq()
{
if (!m_nmicr && !(m_psw & FLAG_IE))
return;
-
+
int level = m_psw >> 8 & 7;
int group = 0;
-
+
// find highest valid level
for (int i = 1; i < 11; i++)
{
@@ -263,7 +263,7 @@ void mn10200_device::check_irq()
group = i;
}
}
-
+
// take interrupt
if (m_nmicr && group)
take_irq(level, 0);
@@ -271,7 +271,7 @@ void mn10200_device::check_irq()
take_irq(0, 0);
else if (group)
take_irq(level, group);
-
+
return;
}
@@ -283,7 +283,7 @@ void mn10200_device::check_ext_irq()
if ((m_p4 >> i & 1) == (m_extmdl >> (i * 2) & 3))
m_icrl[8] |= (1 << (4 + i));
}
-
+
m_possible_irq = true;
}
@@ -295,33 +295,33 @@ void mn10200_device::execute_set_input(int irqnum, int state)
int pin = state ? 0 : 1;
int old = m_p4 >> irqnum & 1;
bool active = false;
-
+
switch (m_extmdl >> (irqnum * 2) & 3)
{
// 'L' level
case 0:
active = (pin == 0);
break;
-
+
// 'H' level
case 1:
active = (pin == 1);
break;
-
+
// falling edge
case 2:
active = (pin == 0 && old == 1);
break;
-
+
// rising edge
case 3:
active = (pin == 1 && old == 0);
break;
}
-
+
m_p4 &= ~(1 << irqnum);
m_p4 |= pin << irqnum;
-
+
if (active)
{
m_icrl[8] |= (1 << (4 + irqnum));
@@ -335,7 +335,7 @@ void mn10200_device::execute_set_input(int irqnum, int state)
int mn10200_device::timer_tick_simple(int tmr)
{
int next = tmr + 1;
-
+
// is it a cascaded timer, and enabled?
if (next < MN10200_NUM_TIMERS_8BIT && m_simple_timer[next].mode & 0x83 && (m_simple_timer[next].mode & 0x83) == 0x81)
{
@@ -391,13 +391,13 @@ void mn10200_device::refresh_all_timers()
TIMER_CALLBACK_MEMBER( mn10200_device::simple_timer_cb )
{
int tmr = param;
-
+
// handle our expiring and also tick our cascaded children
if (timer_tick_simple(tmr) == 2)
m_simple_timer[tmr].cur = 0xff; // cascaded and no underflow occured
else
m_simple_timer[tmr].cur = m_simple_timer[tmr].base;
-
+
// refresh this timer
refresh_timer(tmr);
}
@@ -492,7 +492,6 @@ void mn10200_device::execute_run()
{
while (m_cycles > 0)
{
-
// internal peripheral, external pin, or prev instruction may have changed irq state
while (m_possible_irq)
{
@@ -780,7 +779,6 @@ void mn10200_device::execute_run()
switch (op)
{
-
// jmp (an)
case 0x00: case 0x04: case 0x08: case 0x0c:
m_cycles -= 1;
@@ -868,7 +866,6 @@ void mn10200_device::execute_run()
switch (op & 0xc0)
{
-
// mov (di, an), am
case 0x00:
m_cycles -= 1;
@@ -903,7 +900,6 @@ void mn10200_device::execute_run()
switch (op & 0xf0)
{
-
// add dm, an
case 0x00:
m_a[op&3] = do_add(m_a[op&3], m_d[op>>2&3], 0);
@@ -999,7 +995,6 @@ void mn10200_device::execute_run()
switch (op)
{
-
// and dn, dm
case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:
case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f:
@@ -1180,7 +1175,6 @@ void mn10200_device::execute_run()
switch (op)
{
-
// mov dm, (d24, an)
case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:
case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f:
@@ -1346,7 +1340,6 @@ void mn10200_device::execute_run()
switch (op)
{
-
// and imm8, dn
case 0x00: case 0x01: case 0x02: case 0x03:
test_nz16(m_d[op&3] &= 0xff0000 | read_arg8(m_pc));
@@ -1507,7 +1500,6 @@ void mn10200_device::execute_run()
switch (op)
{
-
// and imm16, dn
case 0x00: case 0x01: case 0x02: case 0x03:
test_nz16(m_d[op&3] &= 0xff0000 | read_arg16(m_pc));
@@ -2164,7 +2156,7 @@ READ8_MEMBER(mn10200_device::io_control_r)
return (m_io->read_byte(MN10200_PORT2) & 0x0f) | m_port[2].dir;
case 0x3d3:
return (m_io->read_byte(MN10200_PORT3) & 0x1f) | m_port[3].dir;
-
+
// directions (0=input, 1=output)
case 0x3e0:
return m_port[0].dir;
@@ -2184,6 +2176,6 @@ READ8_MEMBER(mn10200_device::io_control_r)
log_event("MN102", "internal_r %04x (%03x)", offset+0xfc00, adr);
break;
}
-
+
return 0;
}
diff --git a/src/emu/cpu/mn10200/mn10200.h b/src/emu/cpu/mn10200/mn10200.h
index 51b3078ca71..fefeb4e29b9 100644
--- a/src/emu/cpu/mn10200/mn10200.h
+++ b/src/emu/cpu/mn10200/mn10200.h
@@ -43,7 +43,7 @@ enum
MN10200_IRQ1,
MN10200_IRQ2,
MN10200_IRQ3,
-
+
MN10200_MAX_EXT_IRQ
};
@@ -155,7 +155,7 @@ private:
UINT8 ctrlh;
UINT8 buf;
} m_serial[2];
-
+
// ports
UINT8 m_pplul;
UINT8 m_ppluh;
@@ -167,7 +167,7 @@ private:
UINT8 out;
UINT8 dir;
} m_port[4];
-
+
// internal read/write
inline UINT8 read_arg8(UINT32 address) { return m_program->read_byte(address); }
inline UINT16 read_arg16(UINT32 address) { return m_program->read_byte(address) | m_program->read_byte(address + 1) << 8; }
diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c
index c4a3d0f1a92..caf2db3f78e 100644
--- a/src/emu/cpu/pdp1/pdp1.c
+++ b/src/emu/cpu/pdp1/pdp1.c
@@ -1813,4 +1813,3 @@ void pdp1_device::pulse_start_clear()
if (m_io_sc_callback)
(*m_io_sc_callback)(this);
}
-
diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h
index 303f62cd465..a0550080fbc 100644
--- a/src/emu/cpu/pdp1/pdp1.h
+++ b/src/emu/cpu/pdp1/pdp1.h
@@ -73,7 +73,7 @@ struct pdp1_reset_param_t
class pdp1_device : public cpu_device
- , public pdp1_reset_param_t
+ , public pdp1_reset_param_t
{
public:
// construction/destruction
diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c
index 459b2b3ee99..8649d8620c8 100644
--- a/src/emu/cpu/pdp1/tx0.c
+++ b/src/emu/cpu/pdp1/tx0.c
@@ -1068,4 +1068,3 @@ offs_t tx0_64kw_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8
extern CPU_DISASSEMBLE( tx0_64kw );
return CPU_DISASSEMBLE_NAME(tx0_64kw)(this, buffer, pc, oprom, opram, options);
}
-
diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h
index 7c4b4d65a56..198ffa694a2 100644
--- a/src/emu/cpu/pdp1/tx0.h
+++ b/src/emu/cpu/pdp1/tx0.h
@@ -96,8 +96,8 @@ protected:
unsigned int m_run; /* processor is running */
unsigned int m_rim; /* processor is in read-in mode */
unsigned int m_cycle; /* 0 -> fetch */
- /* 1 -> execute (except for taken branches) */
- /* 2 -> extra execute cycle for SXA and ADO */
+ /* 1 -> execute (except for taken branches) */
+ /* 2 -> extra execute cycle for SXA and ADO */
unsigned int m_ioh; /* i-o halt: processor is executing an Input-Output Transfer wait */
unsigned int m_ios; /* i-o synchronizer: set on i-o operation completion */
diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c
index 7178aab06f8..4532c7a5232 100644
--- a/src/emu/cpu/powerpc/ppccom.c
+++ b/src/emu/cpu/powerpc/ppccom.c
@@ -2489,7 +2489,7 @@ void ppc4xx_set_dma_write_handler(device_t *device, int channel, ppc4xx_dma_writ
}
/*-------------------------------------------------
- ppc4xx_set_dcr_read_handler
+ ppc4xx_set_dcr_read_handler
-------------------------------------------------*/
void ppc4xx_set_dcr_read_handler(device_t *device, read32_delegate dcr_read_func)
@@ -2500,7 +2500,7 @@ void ppc4xx_set_dcr_read_handler(device_t *device, read32_delegate dcr_read_func
}
/*-------------------------------------------------
- ppc4xx_set_dcr_write_handler
+ ppc4xx_set_dcr_write_handler
-------------------------------------------------*/
void ppc4xx_set_dcr_write_handler(device_t *device, write32_delegate dcr_write_func)
diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h
index 0e13a8d2eff..da6499019b8 100644
--- a/src/emu/cpu/rsp/rsp.h
+++ b/src/emu/cpu/rsp/rsp.h
@@ -17,7 +17,7 @@
#define __RSP_H__
#define USE_SIMD (0)
-#define SIMUL_SIMD (0)
+#define SIMUL_SIMD (0)
#if USE_SIMD
#include <tmmintrin.h>
diff --git a/src/emu/cpu/rsp/rspdrc.c b/src/emu/cpu/rsp/rspdrc.c
index 8c76c2ffa35..4d99d52e480 100644
--- a/src/emu/cpu/rsp/rspdrc.c
+++ b/src/emu/cpu/rsp/rspdrc.c
@@ -3829,56 +3829,56 @@ INLINE void cfunc_rsp_vmacf_simd(void *param)
}
VEC_WRITEBACK_RESULT();
/*
- __m128i loProduct, hiProduct, unpackLo, unpackHi;
- __m128i vaccHigh;
- __m128i vdReg, vdRegLo, vdRegHi;
-
- __m128i vsReg = rsp->xv[VS1REG];
- __m128i vtReg = _mm_shuffle_epi8(rsp->xv[VS2REG], vec_shuf_inverse[EL]);
-
- __m128i vaccLow = rsp->accum_l;
-
- // Unpack to obtain for 32-bit precision.
- RSPZeroExtend16to32(vaccLow, &vaccLow, &vaccHigh);
-
- // Begin accumulating the products.
- unpackLo = _mm_mullo_epi16(vsReg, vtReg);
- unpackHi = _mm_mulhi_epi16(vsReg, vtReg);
- loProduct = _mm_unpacklo_epi16(unpackLo, unpackHi);
- hiProduct = _mm_unpackhi_epi16(unpackLo, unpackHi);
- loProduct = _mm_slli_epi32(loProduct, 1);
- hiProduct = _mm_slli_epi32(hiProduct, 1);
-
- vdRegLo = _mm_srli_epi32(loProduct, 16);
- vdRegHi = _mm_srli_epi32(hiProduct, 16);
- vdRegLo = _mm_slli_epi32(vdRegLo, 16);
- vdRegHi = _mm_slli_epi32(vdRegHi, 16);
- vdRegLo = _mm_xor_si128(vdRegLo, loProduct);
- vdRegHi = _mm_xor_si128(vdRegHi, hiProduct);
-
- vaccLow = _mm_add_epi32(vaccLow, vdRegLo);
- vaccHigh = _mm_add_epi32(vaccHigh, vdRegHi);
-
- rsp->accum_l = vdReg = RSPPackLo32to16(vaccLow, vaccHigh);
-
- // Multiply the MSB of sources, accumulate the product.
- vdRegLo = _mm_unpacklo_epi16(rsp->accum_m, rsp->accum_h);
- vdRegHi = _mm_unpackhi_epi16(rsp->accum_m, rsp->accum_h);
-
- loProduct = _mm_srai_epi32(loProduct, 16);
- hiProduct = _mm_srai_epi32(hiProduct, 16);
- vaccLow = _mm_srai_epi32(vaccLow, 16);
- vaccHigh = _mm_srai_epi32(vaccHigh, 16);
-
- vaccLow = _mm_add_epi32(loProduct, vaccLow);
- vaccHigh = _mm_add_epi32(hiProduct, vaccHigh);
- vaccLow = _mm_add_epi32(vdRegLo, vaccLow);
- vaccHigh = _mm_add_epi32(vdRegHi, vaccHigh);
-
- // Clamp the accumulator and write it all out.
- rsp->xv[VDREG] = _mm_packs_epi32(vaccLow, vaccHigh);
- rsp->accum_m = RSPPackLo32to16(vaccLow, vaccHigh);
- rsp->accum_h = RSPPackHi32to16(vaccLow, vaccHigh);
+ __m128i loProduct, hiProduct, unpackLo, unpackHi;
+ __m128i vaccHigh;
+ __m128i vdReg, vdRegLo, vdRegHi;
+
+ __m128i vsReg = rsp->xv[VS1REG];
+ __m128i vtReg = _mm_shuffle_epi8(rsp->xv[VS2REG], vec_shuf_inverse[EL]);
+
+ __m128i vaccLow = rsp->accum_l;
+
+ // Unpack to obtain for 32-bit precision.
+ RSPZeroExtend16to32(vaccLow, &vaccLow, &vaccHigh);
+
+ // Begin accumulating the products.
+ unpackLo = _mm_mullo_epi16(vsReg, vtReg);
+ unpackHi = _mm_mulhi_epi16(vsReg, vtReg);
+ loProduct = _mm_unpacklo_epi16(unpackLo, unpackHi);
+ hiProduct = _mm_unpackhi_epi16(unpackLo, unpackHi);
+ loProduct = _mm_slli_epi32(loProduct, 1);
+ hiProduct = _mm_slli_epi32(hiProduct, 1);
+
+ vdRegLo = _mm_srli_epi32(loProduct, 16);
+ vdRegHi = _mm_srli_epi32(hiProduct, 16);
+ vdRegLo = _mm_slli_epi32(vdRegLo, 16);
+ vdRegHi = _mm_slli_epi32(vdRegHi, 16);
+ vdRegLo = _mm_xor_si128(vdRegLo, loProduct);
+ vdRegHi = _mm_xor_si128(vdRegHi, hiProduct);
+
+ vaccLow = _mm_add_epi32(vaccLow, vdRegLo);
+ vaccHigh = _mm_add_epi32(vaccHigh, vdRegHi);
+
+ rsp->accum_l = vdReg = RSPPackLo32to16(vaccLow, vaccHigh);
+
+ // Multiply the MSB of sources, accumulate the product.
+ vdRegLo = _mm_unpacklo_epi16(rsp->accum_m, rsp->accum_h);
+ vdRegHi = _mm_unpackhi_epi16(rsp->accum_m, rsp->accum_h);
+
+ loProduct = _mm_srai_epi32(loProduct, 16);
+ hiProduct = _mm_srai_epi32(hiProduct, 16);
+ vaccLow = _mm_srai_epi32(vaccLow, 16);
+ vaccHigh = _mm_srai_epi32(vaccHigh, 16);
+
+ vaccLow = _mm_add_epi32(loProduct, vaccLow);
+ vaccHigh = _mm_add_epi32(hiProduct, vaccHigh);
+ vaccLow = _mm_add_epi32(vdRegLo, vaccLow);
+ vaccHigh = _mm_add_epi32(vdRegHi, vaccHigh);
+
+ // Clamp the accumulator and write it all out.
+ rsp->xv[VDREG] = _mm_packs_epi32(vaccLow, vaccHigh);
+ rsp->accum_m = RSPPackLo32to16(vaccLow, vaccHigh);
+ rsp->accum_h = RSPPackHi32to16(vaccLow, vaccHigh);
*/
}
@@ -4269,55 +4269,55 @@ INLINE void cfunc_rsp_vmadn_simd(void *param)
}
/*INLINE void cfunc_rsp_vmadn_simd(void *param)
{
- rsp_state *rsp = (rsp_state*)param;
- int op = rsp->impstate->arg0;
+ rsp_state *rsp = (rsp_state*)param;
+ int op = rsp->impstate->arg0;
- __m128i vaccLow, vaccHigh, loProduct, hiProduct;
- __m128i vsRegLo, vsRegHi, vtRegLo, vtRegHi, vdRegLo, vdRegHi;
+ __m128i vaccLow, vaccHigh, loProduct, hiProduct;
+ __m128i vsRegLo, vsRegHi, vtRegLo, vtRegHi, vdRegLo, vdRegHi;
- __m128i vsReg = rsp->xv[VS1REG];
- __m128i vtReg = _mm_shuffle_epi8(rsp->xv[VS2REG], vec_shuf_inverse[EL]);
+ __m128i vsReg = rsp->xv[VS1REG];
+ __m128i vtReg = _mm_shuffle_epi8(rsp->xv[VS2REG], vec_shuf_inverse[EL]);
- vaccLow = rsp->accum_l;
+ vaccLow = rsp->accum_l;
- RSPZeroExtend16to32(vsReg, &vsRegLo, &vsRegHi);
- RSPSignExtend16to32(vtReg, &vtRegLo, &vtRegHi);
- RSPZeroExtend16to32(vaccLow, &vaccLow, &vaccHigh);
+ RSPZeroExtend16to32(vsReg, &vsRegLo, &vsRegHi);
+ RSPSignExtend16to32(vtReg, &vtRegLo, &vtRegHi);
+ RSPZeroExtend16to32(vaccLow, &vaccLow, &vaccHigh);
- // Begin accumulating the products.
- loProduct = _mm_mullo_epi32(vsRegLo, vtRegLo);
- hiProduct = _mm_mullo_epi32(vsRegHi, vtRegHi);
+ // Begin accumulating the products.
+ loProduct = _mm_mullo_epi32(vsRegLo, vtRegLo);
+ hiProduct = _mm_mullo_epi32(vsRegHi, vtRegHi);
- vdRegLo = _mm_srli_epi32(loProduct, 16);
- vdRegHi = _mm_srli_epi32(hiProduct, 16);
- vdRegLo = _mm_slli_epi32(vdRegLo, 16);
- vdRegHi = _mm_slli_epi32(vdRegHi, 16);
- vdRegLo = _mm_xor_si128(vdRegLo, loProduct);
- vdRegHi = _mm_xor_si128(vdRegHi, hiProduct);
+ vdRegLo = _mm_srli_epi32(loProduct, 16);
+ vdRegHi = _mm_srli_epi32(hiProduct, 16);
+ vdRegLo = _mm_slli_epi32(vdRegLo, 16);
+ vdRegHi = _mm_slli_epi32(vdRegHi, 16);
+ vdRegLo = _mm_xor_si128(vdRegLo, loProduct);
+ vdRegHi = _mm_xor_si128(vdRegHi, hiProduct);
- vaccLow = _mm_add_epi32(vaccLow, vdRegLo);
- vaccHigh = _mm_add_epi32(vaccHigh, vdRegHi);
+ vaccLow = _mm_add_epi32(vaccLow, vdRegLo);
+ vaccHigh = _mm_add_epi32(vaccHigh, vdRegHi);
- rsp->accum_l = RSPPackLo32to16(vaccLow, vaccHigh);
+ rsp->accum_l = RSPPackLo32to16(vaccLow, vaccHigh);
- // Multiply the MSB of sources, accumulate the product.
- vdRegLo = _mm_unpacklo_epi16(rsp->accum_m, rsp->accum_h);
- vdRegHi = _mm_unpackhi_epi16(rsp->accum_m, rsp->accum_h);
+ // Multiply the MSB of sources, accumulate the product.
+ vdRegLo = _mm_unpacklo_epi16(rsp->accum_m, rsp->accum_h);
+ vdRegHi = _mm_unpackhi_epi16(rsp->accum_m, rsp->accum_h);
- loProduct = _mm_srai_epi32(loProduct, 16);
- hiProduct = _mm_srai_epi32(hiProduct, 16);
- vaccLow = _mm_srai_epi32(vaccLow, 16);
- vaccHigh = _mm_srai_epi32(vaccHigh, 16);
+ loProduct = _mm_srai_epi32(loProduct, 16);
+ hiProduct = _mm_srai_epi32(hiProduct, 16);
+ vaccLow = _mm_srai_epi32(vaccLow, 16);
+ vaccHigh = _mm_srai_epi32(vaccHigh, 16);
- vaccLow = _mm_add_epi32(loProduct, vaccLow);
- vaccHigh = _mm_add_epi32(hiProduct, vaccHigh);
- vaccLow = _mm_add_epi32(vdRegLo, vaccLow);
- vaccHigh = _mm_add_epi32(vdRegHi, vaccHigh);
+ vaccLow = _mm_add_epi32(loProduct, vaccLow);
+ vaccHigh = _mm_add_epi32(hiProduct, vaccHigh);
+ vaccLow = _mm_add_epi32(vdRegLo, vaccLow);
+ vaccHigh = _mm_add_epi32(vdRegHi, vaccHigh);
- // Clamp the accumulator and write it all out.
- rsp->accum_m = RSPPackLo32to16(vaccLow, vaccHigh);
- rsp->accum_h = RSPPackHi32to16(vaccLow, vaccHigh);
- rsp->xv[VDREG] = RSPClampLowToVal(rsp->accum_l, rsp->accum_m, rsp->accum_h);
+ // Clamp the accumulator and write it all out.
+ rsp->accum_m = RSPPackLo32to16(vaccLow, vaccHigh);
+ rsp->accum_h = RSPPackHi32to16(vaccLow, vaccHigh);
+ rsp->xv[VDREG] = RSPClampLowToVal(rsp->accum_l, rsp->accum_m, rsp->accum_h);
}*/
#endif
diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c
index afdcc015a74..faf440a7a9a 100644
--- a/src/emu/cpu/sc61860/sc61860.c
+++ b/src/emu/cpu/sc61860/sc61860.c
@@ -259,4 +259,3 @@ void sc61860_device::execute_run()
} while (m_icount > 0);
}
-
diff --git a/src/emu/cpu/scmp/scmp.c b/src/emu/cpu/scmp/scmp.c
index 9a3b58ea5e6..42566d9cbf3 100644
--- a/src/emu/cpu/scmp/scmp.c
+++ b/src/emu/cpu/scmp/scmp.c
@@ -564,4 +564,3 @@ void scmp_device::state_string_export(const device_state_entry &entry, astring &
break;
}
}
-
diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c
index 18bd4d48f7a..567e37f68d5 100644
--- a/src/emu/cpu/se3208/se3208.c
+++ b/src/emu/cpu/se3208/se3208.c
@@ -1830,5 +1830,3 @@ offs_t se3208_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *o
extern CPU_DISASSEMBLE( se3208 );
return CPU_DISASSEMBLE_NAME(se3208)(this, buffer, pc, oprom, opram, options);
}
-
-
diff --git a/src/emu/cpu/se3208/se3208.h b/src/emu/cpu/se3208/se3208.h
index 95ecc27a524..66dc2c544fd 100644
--- a/src/emu/cpu/se3208/se3208.h
+++ b/src/emu/cpu/se3208/se3208.h
@@ -165,4 +165,3 @@ private:
extern const device_type SE3208;
-
diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c
index 7730939caf3..14679b27aa2 100644
--- a/src/emu/cpu/sh2/sh2comn.c
+++ b/src/emu/cpu/sh2/sh2comn.c
@@ -538,7 +538,7 @@ WRITE32_HANDLER( sh2_internal_w )
{
case 0x00:
//if(mem_mask == 0xff)
- // printf("%c",data & 0xff);
+ // printf("%c",data & 0xff);
break;
case 0x01:
//printf("%08x %02x %02x\n",mem_mask,offset,data);
diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c
index 5cc76965996..65a06fb6b37 100644
--- a/src/emu/cpu/sharc/sharc.c
+++ b/src/emu/cpu/sharc/sharc.c
@@ -659,11 +659,11 @@ void adsp21062_device::execute_set_input(int irqline, int state)
{
m_irq_active &= ~(1 << (8-irqline));
}
- }
+ }
else if (irqline >= SHARC_INPUT_FLAG0 && irqline <= SHARC_INPUT_FLAG3)
- {
- set_flag_input(irqline - SHARC_INPUT_FLAG0, state);
- }
+ {
+ set_flag_input(irqline - SHARC_INPUT_FLAG0, state);
+ }
}
void adsp21062_device::set_flag_input(int flag_num, int state)
@@ -917,4 +917,3 @@ bool adsp21062_device::memory_readop(offs_t offset, int size, UINT64 &value)
return false;
}
-
diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h
index 058fe9289c8..b699fdc519d 100644
--- a/src/emu/cpu/sharc/sharc.h
+++ b/src/emu/cpu/sharc/sharc.h
@@ -212,7 +212,7 @@ private:
UINT32 m_astat_old_old;
UINT32 m_astat_old_old_old;
- UINT16 m_internal_ram[2 * 0x10000]; // 2x 128KB
+ UINT16 m_internal_ram[2 * 0x10000]; // 2x 128KB
inline void CHANGE_PC(UINT32 newpc);
inline void CHANGE_PC_DELAYED(UINT32 newpc);
diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c
index 7bc24a11499..41107e84d7f 100644
--- a/src/emu/cpu/ssp1601/ssp1601.c
+++ b/src/emu/cpu/ssp1601/ssp1601.c
@@ -780,4 +780,3 @@ void ssp1601_device::execute_set_input( int inputnum, int state )
{
fatalerror("ssp1610: execute_set_input not implemented yet!\n");
}
-
diff --git a/src/emu/cpu/superfx/superfx.c b/src/emu/cpu/superfx/superfx.c
index 4f1394e862d..314200acb0d 100644
--- a/src/emu/cpu/superfx/superfx.c
+++ b/src/emu/cpu/superfx/superfx.c
@@ -1432,11 +1432,10 @@ offs_t superfx_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *
{
extern offs_t superfx_dasm_one(char *buffer, offs_t pc, UINT8 op, UINT8 param0, UINT8 param1, UINT16 alt);
- UINT8 op = *(UINT8 *)(opram + 0);
- UINT8 param0 = *(UINT8 *)(opram + 1);
- UINT8 param1 = *(UINT8 *)(opram + 2);
- UINT16 alt = m_sfr & SUPERFX_SFR_ALT;
+ UINT8 op = *(UINT8 *)(opram + 0);
+ UINT8 param0 = *(UINT8 *)(opram + 1);
+ UINT8 param1 = *(UINT8 *)(opram + 2);
+ UINT16 alt = m_sfr & SUPERFX_SFR_ALT;
- return superfx_dasm_one(buffer, pc, op, param0, param1, alt);
+ return superfx_dasm_one(buffer, pc, op, param0, param1, alt);
}
-
diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c
index 9f9ee34383f..1fd3c4dd955 100644
--- a/src/emu/cpu/tlcs90/tlcs90.c
+++ b/src/emu/cpu/tlcs90/tlcs90.c
@@ -2788,4 +2788,3 @@ void tlcs90_device::state_string_export(const device_state_entry &entry, astring
break;
}
}
-
diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c
index d9db3924bb5..cd68283b417 100644
--- a/src/emu/cpu/tms32010/tms32010.c
+++ b/src/emu/cpu/tms32010/tms32010.c
@@ -882,12 +882,12 @@ void tms32010_device::device_start()
void tms32010_device::device_reset()
{
- m_PC = 0;
- m_ACC.d = 0;
- m_INTF = TMS32010_INT_NONE;
- /* Setup Status Register : 7efe */
- CLR((OV_FLAG | ARP_REG | DP_REG));
- SET_FLAG((OVM_FLAG | INTM_FLAG));
+ m_PC = 0;
+ m_ACC.d = 0;
+ m_INTF = TMS32010_INT_NONE;
+ /* Setup Status Register : 7efe */
+ CLR((OV_FLAG | ARP_REG | DP_REG));
+ SET_FLAG((OVM_FLAG | INTM_FLAG));
}
@@ -981,4 +981,3 @@ void tms32010_device::execute_run()
}
} while (m_icount > 0);
}
-
diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c
index 316c1e80b45..9b7d08226d9 100644
--- a/src/emu/cpu/tms32025/tms32025.c
+++ b/src/emu/cpu/tms32025/tms32025.c
@@ -2279,4 +2279,3 @@ bool tms32025_device::memory_write(address_spacenum spacenum, offs_t offset, int
return 1;
}
-
diff --git a/src/emu/cpu/tms32025/tms32025.h b/src/emu/cpu/tms32025/tms32025.h
index 8c1cb44d40e..8c7c354bc80 100644
--- a/src/emu/cpu/tms32025/tms32025.h
+++ b/src/emu/cpu/tms32025/tms32025.h
@@ -88,8 +88,8 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); }
- virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
- virtual bool memory_write(address_spacenum spacenum, offs_t offset, int size, UINT64 value);
+ virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
+ virtual bool memory_write(address_spacenum spacenum, offs_t offset, int size, UINT64 value);
virtual bool memory_readop(offs_t offset, int size, UINT64 &value);
// device_state_interface overrides
diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c
index 3d02af003b6..1febe0daf23 100644
--- a/src/emu/cpu/tms32051/tms32051.c
+++ b/src/emu/cpu/tms32051/tms32051.c
@@ -520,4 +520,3 @@ bool tms32051_device::memory_read(address_spacenum spacenum, offs_t offset, int
}
return 1;
}
-
diff --git a/src/emu/cpu/tms32051/tms32051.h b/src/emu/cpu/tms32051/tms32051.h
index 60bf9dda900..32b012f8937 100644
--- a/src/emu/cpu/tms32051/tms32051.h
+++ b/src/emu/cpu/tms32051/tms32051.h
@@ -61,7 +61,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
- virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
+ virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c
index 01546b029cb..905b9579d6d 100644
--- a/src/emu/cpu/tms34010/34010gfx.c
+++ b/src/emu/cpu/tms34010/34010gfx.c
@@ -109,7 +109,7 @@ static int apply_window(tms34010_state *tms, const char *inst_name,int srcbpp, U
/* clip Y */
diff = WSTART_Y(tms) - sy;
if (diff > 0)
- {
+ {
#if 0 // littlerb and megaphx do not work correctly with this enabled, see items dropping into playfield from top
if (srcaddr)
*srcaddr += diff * SPTCH(tms);
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index 5cfd4aabdfd..611cc1c13da 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -1659,7 +1659,7 @@ READ16_MEMBER( tms34010_device::host_r )
tms34010_state *tms = get_safe_token(this);
unsigned int addr;
int result = 0;
-
+
/* swap to the target cpu */
switch (reg)
diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h
index cc4f28de5b5..fdf06d3feae 100644
--- a/src/emu/cpu/tms34010/tms34010.h
+++ b/src/emu/cpu/tms34010/tms34010.h
@@ -216,7 +216,7 @@ public:
/* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */
DECLARE_WRITE16_MEMBER( io_register_w );
DECLARE_READ16_MEMBER( io_register_r );
-
+
DECLARE_WRITE16_MEMBER(host_w);
DECLARE_READ16_MEMBER(host_r);
};
diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c
index b6476e2223b..257d8b9e16b 100644
--- a/src/emu/cpu/tms7000/tms7000.c
+++ b/src/emu/cpu/tms7000/tms7000.c
@@ -572,4 +572,3 @@ READ8_MEMBER( tms7000_device::tms7000_internal_r )
{
return m_rf[ offset ];
}
-
diff --git a/src/emu/cpu/unsp/unsp.c b/src/emu/cpu/unsp/unsp.c
index 5c33c50ecfd..558dd49bbe1 100644
--- a/src/emu/cpu/unsp/unsp.c
+++ b/src/emu/cpu/unsp/unsp.c
@@ -162,13 +162,13 @@ void unsp_device::state_export(const device_state_entry &entry)
void unsp_device::state_import(const device_state_entry &entry)
{
- switch (entry.index())
- {
- case UNSP_PC:
+ switch (entry.index())
+ {
+ case UNSP_PC:
UNSP_REG(PC) = (m_debugger_temp & 0x0001fffe) >> 1;
UNSP_REG(SR) = (UNSP_REG(SR) & 0xffc0) | ((m_debugger_temp & 0x007e0000) >> 17);
- break;
- }
+ break;
+ }
}
void unsp_device::device_reset()
@@ -863,4 +863,3 @@ void unsp_device::execute_set_input(int irqline, int state)
UNSP_REG(PC) = READ16(irq_vector);
UNSP_REG(SR) = 0;
}
-
diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c
index 82d25445989..d4a6ccb8de0 100644
--- a/src/emu/cpu/upd7810/upd7810.c
+++ b/src/emu/cpu/upd7810/upd7810.c
@@ -487,7 +487,7 @@ upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, d
}
upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : upd7810_device(mconfig, UPD78C05, "uPD78C05", tag, owner, clock, "upd78c05", __FILE__)
+ : upd7810_device(mconfig, UPD78C05, "uPD78C05", tag, owner, clock, "upd78c05", __FILE__)
{
m_op48 = s_op48_78c05;
m_op4C = s_op4C_78c05;
@@ -2250,4 +2250,3 @@ void upd7810_device::execute_set_input(int irqline, int state)
}
/* resetting interrupt requests is done with the SKIT/SKNIT opcodes only! */
}
-
diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h
index 270152e966c..758480d4fd3 100644
--- a/src/emu/cpu/upd7810/upd7810.h
+++ b/src/emu/cpu/upd7810/upd7810.h
@@ -81,7 +81,7 @@ enum
upd7810_device::set_an7_func(*device, DEVCB2_##_devcb);
-class upd7810_device : public cpu_device
+class upd7810_device : public cpu_device
{
public:
// construction/destruction
diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c
index 959711e5029..785670bc474 100644
--- a/src/emu/cpu/v60/v60.c
+++ b/src/emu/cpu/v60/v60.c
@@ -550,4 +550,3 @@ void v60_device::execute_run()
v60_try_irq();
}
}
-
diff --git a/src/emu/cpu/v60/v60.h b/src/emu/cpu/v60/v60.h
index c9392289618..7c5b8c2e758 100644
--- a/src/emu/cpu/v60/v60.h
+++ b/src/emu/cpu/v60/v60.h
@@ -157,7 +157,7 @@ private:
UINT8 OV;
UINT8 S;
UINT8 Z;
- } m_flags;
+ } m_flags;
UINT8 m_irq_line;
UINT8 m_nmi_line;
address_space *m_program;
diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c
index 66b9c6b6fc1..462b21b9f43 100644
--- a/src/emu/cpu/v810/v810.c
+++ b/src/emu/cpu/v810/v810.c
@@ -1392,4 +1392,3 @@ void v810_device::execute_set_input( int irqline, int state)
m_irq_state = state;
m_irq_line = irqline;
}
-
diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c
index 6157b594ac0..3e939efc8ee 100644
--- a/src/emu/cpu/z180/z180.c
+++ b/src/emu/cpu/z180/z180.c
@@ -2600,4 +2600,3 @@ void z180_device::state_string_export(const device_state_entry &entry, astring &
break;
}
}
-
diff --git a/src/emu/cpu/z180/z180tbl.h b/src/emu/cpu/z180/z180tbl.h
index b3f0ff92917..c115eadc851 100644
--- a/src/emu/cpu/z180/z180tbl.h
+++ b/src/emu/cpu/z180/z180tbl.h
@@ -228,4 +228,3 @@ EXEC_PROTOTYPE(dd)
EXEC_PROTOTYPE(ed)
EXEC_PROTOTYPE(fd)
EXEC_PROTOTYPE(xycb)
-
diff --git a/src/emu/cpu/z80/tlcs_z80.c b/src/emu/cpu/z80/tlcs_z80.c
index ca88b5d3f6a..150bfff3b4d 100644
--- a/src/emu/cpu/z80/tlcs_z80.c
+++ b/src/emu/cpu/z80/tlcs_z80.c
@@ -40,7 +40,7 @@ static Z80PIO_INTERFACE( pio_intf )
static const z80sio_interface sio_intf =
{
DEVCB_CPU_INPUT_LINE(DEVICE_SELF_OWNER, INPUT_LINE_IRQ0), /* interrupt handler */
- DEVCB_NULL, /* DTR changed handler */
+ DEVCB_NULL, /* DTR changed handler */
DEVCB_NULL, /* RTS changed handler */
DEVCB_NULL, /* BREAK changed handler */
DEVCB_NULL, /* transmit handler */
@@ -63,9 +63,9 @@ static ADDRESS_MAP_START( tlcs_z80_internal_io_map, AS_IO, 8, tlcs_z80_device )
AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(TLCSZ80_INTERNAL_CTC_TAG, z80ctc_device, read, write)
AM_RANGE(0x18, 0x1B) AM_DEVREADWRITE(TLCSZ80_INTERNAL_SIO_TAG, z80sio_device, read, write)
AM_RANGE(0x1C, 0x1F) AM_DEVREADWRITE(TLCSZ80_INTERNAL_PIO_TAG, z80pio_device, read, write)
-// AM_RANGE(0xF0, 0xF0) TODO: Watchdog Timer: Stand-by mode Register
-// AM_RANGE(0xF1, 0xF1) TODO: Watchdog Timer: command Register
-// AM_RANGE(0xF4, 0xF4) TODO: Daisy chain interrupt precedence Register
+// AM_RANGE(0xF0, 0xF0) TODO: Watchdog Timer: Stand-by mode Register
+// AM_RANGE(0xF1, 0xF1) TODO: Watchdog Timer: command Register
+// AM_RANGE(0xF4, 0xF4) TODO: Daisy chain interrupt precedence Register
ADDRESS_MAP_END
//This is wrong!
@@ -79,7 +79,7 @@ static MACHINE_CONFIG_FRAGMENT( tlcs_z80 )
MACHINE_CONFIG_END
tlcs_z80_device::tlcs_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : z80_device(mconfig, TLCS_Z80, "TLCS-Z80", tag, owner, clock, "tlcs_z80", __FILE__),
+ : z80_device(mconfig, TLCS_Z80, "TLCS-Z80", tag, owner, clock, "tlcs_z80", __FILE__),
m_z80ctc(*this, TLCSZ80_INTERNAL_CTC_TAG),
m_io_space_config( "io", ENDIANNESS_LITTLE, 8, 8, 0, ADDRESS_MAP_NAME( tlcs_z80_internal_io_map ) )
{ }
@@ -97,4 +97,3 @@ machine_config_constructor tlcs_z80_device::device_mconfig_additions() const
}
const device_type TLCS_Z80 = &device_creator<tlcs_z80_device>;
-
diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c
index 6332e2d0946..0fa78455c46 100644
--- a/src/emu/cpu/z80/z80.c
+++ b/src/emu/cpu/z80/z80.c
@@ -639,7 +639,7 @@ inline void z80_device::ret_cond(bool cond, UINT8 opcode)
***************************************************************/
inline void z80_device::retn()
{
- LOG(("Z80 '%s' RETN m_iff1:%d m_iff2:%d\n",
+ LOG(("Z80 '%s' RETN m_iff1:%d m_iff2:%d\n",
tag(), m_iff1, m_iff2));
pop(m_pc);
WZ = PC;
@@ -2649,7 +2649,7 @@ OP(ed,54) { neg(); } /* NEG
OP(ed,55) { retn(); } /* RETN */
OP(ed,56) { m_im = 1; } /* IM 1 */
OP(ed,57) { ld_a_i(); } /* LD A,i */
-
+
OP(ed,58) { E = in(BC); F = (F & CF) | SZP[E]; } /* IN E,(C) */
OP(ed,59) { out(BC, E); } /* OUT (C),E */
OP(ed,5a) { adc_hl(m_de); } /* ADC HL,DE */
diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c
index 59a9449526a..be2f22a76b2 100644
--- a/src/emu/cpu/z8000/z8000.c
+++ b/src/emu/cpu/z8000/z8000.c
@@ -834,4 +834,3 @@ void z8002_device::execute_set_input(int irqline, int state)
}
}
}
-
diff --git a/src/emu/cpu/z8000/z8000.h b/src/emu/cpu/z8000/z8000.h
index 21e491f1e85..0904a71a4b4 100644
--- a/src/emu/cpu/z8000/z8000.h
+++ b/src/emu/cpu/z8000/z8000.h
@@ -655,7 +655,7 @@ protected:
virtual UINT32 PSA_ADDR();
virtual UINT32 read_irq_vector();
};
-
+
extern const device_type Z8001;
extern const device_type Z8002;
diff --git a/src/emu/cpu/z8000/z8000ops.inc b/src/emu/cpu/z8000/z8000ops.inc
index b6f8c15f733..69cbddd97aa 100644
--- a/src/emu/cpu/z8000/z8000ops.inc
+++ b/src/emu/cpu/z8000/z8000ops.inc
@@ -69,7 +69,7 @@ void z8001_device::CHANGE_FCW(UINT16 fcw)
if (fcw & F_S_N) /* new mode is system mode */
{
if (!(m_fcw & F_S_N) /* old mode was user mode */
- || ((fcw ^ m_fcw) & F_SEG)) /* or switch between segmented and non-segmented */
+ || ((fcw ^ m_fcw) & F_SEG)) /* or switch between segmented and non-segmented */
{
tmp = RW(14);
RW(14) = m_nspseg;
@@ -79,7 +79,7 @@ void z8001_device::CHANGE_FCW(UINT16 fcw)
else /* new mode is user mode */
{
if (m_fcw & F_S_N /* old mode was system mode */
- && m_fcw & F_SEG) /* and was segmented */
+ && m_fcw & F_SEG) /* and was segmented */
{
tmp = RW(14);
RW(14) = m_nspseg;
diff --git a/src/emu/crsshair.c b/src/emu/crsshair.c
index b5aa7f43d0c..74db0aa6a5e 100644
--- a/src/emu/crsshair.c
+++ b/src/emu/crsshair.c
@@ -38,7 +38,7 @@ struct crosshair_global
UINT8 visible[MAX_PLAYERS]; /* visibility per player */
bitmap_argb32 * bitmap[MAX_PLAYERS]; /* bitmap per player */
render_texture * texture[MAX_PLAYERS]; /* texture per player */
- screen_device * screen[MAX_PLAYERS]; /* the screen on which this player's crosshair is drawn */
+ screen_device * screen[MAX_PLAYERS]; /* the screen on which this player's crosshair is drawn */
float x[MAX_PLAYERS]; /* current X position */
float y[MAX_PLAYERS]; /* current Y position */
float last_x[MAX_PLAYERS]; /* last X position */
diff --git a/src/emu/delegate.h b/src/emu/delegate.h
index 4bf3573a370..029d9cb239e 100644
--- a/src/emu/delegate.h
+++ b/src/emu/delegate.h
@@ -93,14 +93,14 @@
// select which one we will be using
#if defined(__GNUC__)
- /* does not work in versions over 4.7.x of 32bit MINGW */
+ /* does not work in versions over 4.7.x of 32bit MINGW */
#if ((defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
#elif defined(SDLMAME_EMSCRIPTEN)
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
- #else
+ #else
#define USE_DELEGATE_TYPE DELEGATE_TYPE_INTERNAL
- #endif
+ #endif
#else
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
#endif
@@ -459,7 +459,7 @@ private:
return reinterpret_cast<delegate_generic_function>(funcptr);
}
-
+
struct raw_mfp_data
{
#if defined (__INTEL_COMPILER) && defined (PTR64) // needed for "Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.176 Build 20140130" at least
diff --git a/src/emu/devfind.c b/src/emu/devfind.c
index db53cb05e6d..cf07a9c73d6 100644
--- a/src/emu/devfind.c
+++ b/src/emu/devfind.c
@@ -73,7 +73,7 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
mame_printf_error("Tag not defined for required device\n");
return false;
}
-
+
// just pass through in the found case
if (found)
return true;
diff --git a/src/emu/digfx.c b/src/emu/digfx.c
index 4a32d1a9190..b345aef5cbc 100644
--- a/src/emu/digfx.c
+++ b/src/emu/digfx.c
@@ -89,10 +89,10 @@ void device_gfx_interface::interface_pre_start()
device().tag(),
(m_palette_is_sibling ? "sibling " : "sub"),
m_palette_tag);
-
+
// if palette device isn't started, wait for it
// if (!m_palette->started())
- // throw device_missing_dependencies();
+ // throw device_missing_dependencies();
}
diff --git a/src/emu/digfx.h b/src/emu/digfx.h
index fc3cc8d236b..d30831e336b 100644
--- a/src/emu/digfx.h
+++ b/src/emu/digfx.h
@@ -212,14 +212,14 @@ protected:
private:
// configuration
- const gfx_decode_entry * m_gfxdecodeinfo; // pointer to array of gfx decode information
- const char * m_palette_tag; // configured tag for palette device
- bool m_palette_is_sibling; // is palette a sibling or a subdevice?
+ const gfx_decode_entry * m_gfxdecodeinfo; // pointer to array of gfx decode information
+ const char * m_palette_tag; // configured tag for palette device
+ bool m_palette_is_sibling; // is palette a sibling or a subdevice?
// internal state
- bool m_decoded; // have we processed our decode info yet?
- palette_device * m_palette; // pointer to the palette device
- auto_pointer<gfx_element> m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets
+ bool m_decoded; // have we processed our decode info yet?
+ palette_device * m_palette; // pointer to the palette device
+ auto_pointer<gfx_element> m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets
};
// iterator
diff --git a/src/emu/diimage.c b/src/emu/diimage.c
index df97b74f06c..f5560b1d6f7 100644
--- a/src/emu/diimage.c
+++ b/src/emu/diimage.c
@@ -891,13 +891,13 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int
m_software_info_ptr = &m_software_part_ptr->info();
m_software_list_name.cpy(m_software_info_ptr->list().list_name());
m_full_software_name.cpy(m_software_part_ptr->info().shortname());
-
+
// if we had launched from softlist with a specified part, e.g. "shortname:part"
// we would have recorded the wrong name, so record it again based on software_info
if (m_software_info_ptr && m_full_software_name)
m_err = set_image_filename(m_full_software_name);
- // check if image should be read-only
+ // check if image should be read-only
const char *read_only = get_feature("read_only");
if (read_only && !strcmp(read_only, "true")) {
make_readonly();
@@ -1153,9 +1153,9 @@ void device_image_interface::update_names(const device_type device_type, const c
}
//-------------------------------------------------
-// software_name_split - helper that splits a
-// software_list:software:part string into
-// separate software_list, software, and part
+// software_name_split - helper that splits a
+// software_list:software:part string into
+// separate software_list, software, and part
// strings.
//
// str1:str2:str3 => swlist_name - str1, swname - str2, swpart - str3
@@ -1177,7 +1177,7 @@ void device_image_interface::software_name_split(const char *swlist_swname, astr
swname.cpy(swlist_swname);
return;
}
-
+
// if one colon, it is the swname and swpart alone
const char *split2 = strchr(split1 + 1, ':');
if (split2 == NULL)
@@ -1200,7 +1200,7 @@ software_part *device_image_interface::find_software_item(const char *path, bool
// Note: old code would explicitly load swlist_name if it was specified, rather than
// searching the devices.
//
- // Also if not found, old code would attempt to open <drivername>.xml and even
+ // Also if not found, old code would attempt to open <drivername>.xml and even
// <swinfo_name>.xml. Hopefully removing this won't break anything.
//
@@ -1213,7 +1213,7 @@ software_part *device_image_interface::find_software_item(const char *path, bool
const char *interface = NULL;
if (restrict_to_interface)
interface = image_interface();
-
+
// find the software list if explicitly specified
software_list_device_iterator deviter(device().mconfig().root_device());
for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next())
@@ -1227,7 +1227,7 @@ software_part *device_image_interface::find_software_item(const char *path, bool
return part;
}
}
-
+
// if explicitly specified and not found, just error here
return NULL;
}
@@ -1284,7 +1284,7 @@ bool device_image_interface::load_software_part(const char *path, software_part
{
const char *option = device().mconfig().options().value(req_image->brief_instance_name());
// mount only if not already mounted
- if (strlen(option) == 0 && !req_image->filename())
+ if (strlen(option) == 0 && !req_image->filename())
{
req_image->set_init_phase();
req_image->load(requirement);
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 5c388c8469c..a17729fe7f3 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -74,10 +74,10 @@ class image_device_format
public:
image_device_format(const char *name, const char *description, const char *extensions, const char *optspec)
: m_next(NULL),
- m_name(name),
- m_description(description),
- m_extensions(extensions),
- m_optspec(optspec) { }
+ m_name(name),
+ m_description(description),
+ m_extensions(extensions),
+ m_optspec(optspec) { }
image_device_format *next() const { return m_next; }
const char *name() const { return m_name; }
diff --git a/src/emu/dioutput.c b/src/emu/dioutput.c
index 5fffb9c90b6..08f603b8af1 100644
--- a/src/emu/dioutput.c
+++ b/src/emu/dioutput.c
@@ -40,7 +40,7 @@ void device_output_interface::set_output_value(int value)
if (m_output_name)
output_set_value(m_output_name, value);
else
- fatalerror("Output name not set!");
+ fatalerror("Output name not set!");
}
void device_output_interface::set_led_value(int value)
diff --git a/src/emu/diserial.h b/src/emu/diserial.h
index 3fd267b4ff9..0abf75699dd 100644
--- a/src/emu/diserial.h
+++ b/src/emu/diserial.h
@@ -156,7 +156,7 @@ private:
UINT8 m_rcv_bit_count;
/* the byte of data received */
UINT8 m_rcv_byte_received;
-
+
bool m_rcv_framing_error;
bool m_rcv_parity_error;
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index f2323419eae..3b397cd9052 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -87,7 +87,7 @@ public:
if (m_dirty[code]) decode(code);
return m_pen_usage[code];
}
-
+
// ----- core graphics drawing -----
// specific drawgfx implementations for each transparency type
diff --git a/src/emu/drivenum.c b/src/emu/drivenum.c
index 4d39f9d8cc4..918310fade2 100644
--- a/src/emu/drivenum.c
+++ b/src/emu/drivenum.c
@@ -244,7 +244,7 @@ void driver_enumerator::include_all()
{
memset(m_included, 1, sizeof(m_included[0]) * s_driver_count);
m_filtered_count = s_driver_count;
-
+
// always exclude the empty driver
int empty = find("___empty");
assert(empty != -1);
@@ -385,7 +385,7 @@ void driver_enumerator::find_approximate_matches(const char *string, int count,
//-------------------------------------------------
// release_current - release bulky memory
// structures from the current entry because
-// we're done with it
+// we're done with it
//-------------------------------------------------
void driver_enumerator::release_current()
@@ -393,7 +393,7 @@ void driver_enumerator::release_current()
// skip if no current entry
if (m_current < 0 || m_current >= s_driver_count)
return;
-
+
// skip if we haven't cached a config
if (m_config[m_current] == NULL)
return;
diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h
index 44daab141c3..b490b69d8cf 100644
--- a/src/emu/drivers/xtal.h
+++ b/src/emu/drivers/xtal.h
@@ -138,7 +138,7 @@ enum
XTAL_17_36MHz = 17360000, /* OMTI Series 10 SCSI controller */
XTAL_17_73447MHz = 17734470, /* (~4x PAL subcarrier) */
XTAL_17_734472MHz = 17734472, /* actually ~4x PAL subcarrier */
- XTAL_17_9712MHz = 17971200,
+ XTAL_17_9712MHz = 17971200,
XTAL_18MHz = 18000000, /* S.A.R, Ikari Warriors 3 */
XTAL_18_432MHz = 18432000, /* Extremely common, used on 100's of PCBs (48000 * 384) */
XTAL_18_720MHz = 18720000, /* Nokia MikroMikko 1 */
diff --git a/src/emu/emualloc.h b/src/emu/emualloc.h
index b39b1c10c64..e128322ac96 100644
--- a/src/emu/emualloc.h
+++ b/src/emu/emualloc.h
@@ -145,7 +145,7 @@ private:
dynamic_array<resource_pool_item *> m_hash;
resource_pool_item * m_ordered_head;
resource_pool_item * m_ordered_tail;
- static UINT64 s_id;
+ static UINT64 s_id;
};
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 5834a61a0fa..a29a878c44c 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -491,7 +491,7 @@ void emu_options::set_system_name(const char *name)
astring error;
set_value(OPTION_SYSTEMNAME, name, OPTION_PRIORITY_CMDLINE, error);
assert(!error);
-
+
// remove any existing device options and then add them afresh
remove_device_options();
if (add_slot_options(true))
diff --git a/src/emu/emupal.c b/src/emu/emupal.c
index d32691f139d..8292f0ffffe 100644
--- a/src/emu/emupal.c
+++ b/src/emu/emupal.c
@@ -87,7 +87,7 @@ void palette_device::static_enable_hilights(device_t &device)
//**************************************************************************
-// INDIRECTION (AKA COLORTABLES)
+// INDIRECTION (AKA COLORTABLES)
//**************************************************************************
//-------------------------------------------------
@@ -132,7 +132,7 @@ void palette_device::set_pen_indirect(pen_t pen, UINT16 index)
//-------------------------------------------------
// transpen_mask - return a mask of pens that
-// whose indirect values match the given
+// whose indirect values match the given
// transcolor
//-------------------------------------------------
@@ -160,7 +160,7 @@ UINT32 palette_device::transpen_mask(gfx_element &gfx, int color, int transcolor
//-------------------------------------------------
// configure_tilemap_groups - configure groups
-// within a tilemap to match the indirect masks
+// within a tilemap to match the indirect masks
//-------------------------------------------------
void palette_device::configure_tilemap_groups(tilemap_t &tmap, gfx_element &gfx, int transcolor)
@@ -227,7 +227,7 @@ void palette_device::configure_tilemap_groups(tilemap_t &tmap, gfx_element &gfx,
//-------------------------------------------------
//-------------------------------------------------
-// set_shadow_dRGB32 - configure delta RGB values
+// set_shadow_dRGB32 - configure delta RGB values
// for 1 of 4 shadow tables
//-------------------------------------------------
@@ -269,7 +269,7 @@ void palette_device::set_shadow_dRGB32(int mode, int dr, int dg, int db, bool no
g = rgb_t::clamp(g);
b = rgb_t::clamp(b);
}
- rgb_t final = rgb_t(r, g, b);
+ rgb_t final = rgb_t(r, g, b);
// store either 16 or 32 bit
if (m_format == BITMAP_FORMAT_RGB32)
@@ -282,13 +282,13 @@ void palette_device::set_shadow_dRGB32(int mode, int dr, int dg, int db, bool no
//**************************************************************************
-// GENERIC WRITE HANDLERS
+// GENERIC WRITE HANDLERS
//**************************************************************************
//-------------------------------------------------
// update_for_write - given a write of a given
-// length to a given byte offset, update all
-// potentially modified palette entries
+// length to a given byte offset, update all
+// potentially modified palette entries
//-------------------------------------------------
inline void palette_device::update_for_write(offs_t byte_offset, int bytes_modified)
@@ -319,7 +319,7 @@ WRITE8_MEMBER(palette_device::write)
m_paletteram.write8(offset, data);
update_for_write(offset, 1);
}
-
+
WRITE16_MEMBER(palette_device::write)
{
m_paletteram.write16(offset, data, mem_mask);
@@ -349,7 +349,7 @@ READ32_MEMBER(palette_device::read)
//-------------------------------------------------
-// write_ext - write a byte to the extended
+// write_ext - write a byte to the extended
// paletteram
//-------------------------------------------------
@@ -369,7 +369,7 @@ WRITE16_MEMBER(palette_device::write_ext)
//**************************************************************************
-// DEVICE MANAGEMENT
+// DEVICE MANAGEMENT
//**************************************************************************
//-------------------------------------------------
@@ -379,7 +379,7 @@ WRITE16_MEMBER(palette_device::write_ext)
void palette_device::device_start()
{
// bind the init function
- m_init.bind_relative_to(*owner());
+ m_init.bind_relative_to(*owner());
// find the memory, if present
const memory_share *share = memshare(tag());
@@ -401,7 +401,7 @@ void palette_device::device_start()
m_paletteram.set(*share, bytes_per_entry / 2);
m_paletteram_ext.set(*share_ext, bytes_per_entry / 2);
}
-
+
// override endianness if provided
if (m_endianness_supplied)
{
@@ -421,7 +421,7 @@ void palette_device::device_start()
allocate_palette();
allocate_color_tables();
allocate_shadow_tables();
-
+
// allocate indirection tables
if (m_indirect_entries > 0)
{
@@ -447,7 +447,7 @@ void palette_device::device_start()
m_save_contrast.resize(m_palette->num_colors());
save_item(NAME(m_save_pen));
save_item(NAME(m_save_contrast));
-
+
// save indirection tables if we have them
if (m_indirect_entries > 0)
{
@@ -510,7 +510,7 @@ void palette_device::device_stop()
//-------------------------------------------------
// device_validity_check - validate device
-// configuration
+// configuration
//-------------------------------------------------
void palette_device::device_validity_check(validity_checker &valid) const
diff --git a/src/emu/emupal.h b/src/emu/emupal.h
index d1f650413a1..7c416ec875f 100644
--- a/src/emu/emupal.h
+++ b/src/emu/emupal.h
@@ -159,8 +159,7 @@
#define MCFG_PALETTE_ADD(_tag, _entries) \
MCFG_DEVICE_ADD(_tag, PALETTE, 0) \
- MCFG_PALETTE_ENTRIES(_entries) \
-
+ MCFG_PALETTE_ENTRIES(_entries)
#define MCFG_PALETTE_ADD_INIT_BLACK(_tag, _entries) \
MCFG_PALETTE_ADD(_tag, _entries) \
palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_all_black), downcast<palette_device *>(device)));
@@ -262,11 +261,11 @@ public:
// constructor
raw_to_rgb_converter(int bytes_per_entry = 0, raw_to_rgb_func func = NULL)
: m_bytes_per_entry(bytes_per_entry),
- m_func(func) { }
-
+ m_func(func) { }
+
// getters
int bytes_per_entry() const { return m_bytes_per_entry; }
-
+
// helpers
rgb_t operator()(UINT32 raw) const { return (*m_func)(raw); }
@@ -297,15 +296,15 @@ public:
UINT8 b = pal4bit(((raw >> 4) & 0x0c) | i);
return rgb_t(r, g, b);
}
-
+
// other standard decoders
- static rgb_t RRRRGGGGBBBBRGBx_decoder(UINT32 raw); // bits 3/2/1 are LSb
- static rgb_t xRGBRRRRGGGGBBBB_decoder(UINT32 raw); // bits 14/13/12 are LSb
+ static rgb_t RRRRGGGGBBBBRGBx_decoder(UINT32 raw); // bits 3/2/1 are LSb
+ static rgb_t xRGBRRRRGGGGBBBB_decoder(UINT32 raw); // bits 14/13/12 are LSb
private:
// internal data
- int m_bytes_per_entry;
- raw_to_rgb_func m_func;
+ int m_bytes_per_entry;
+ raw_to_rgb_func m_func;
};
@@ -314,7 +313,7 @@ private:
// device type definition
extern const device_type PALETTE;
-class palette_device : public device_t
+class palette_device : public device_t
{
static const int MAX_SHADOW_PRESETS = 4;
@@ -330,7 +329,7 @@ public:
static void static_set_indirect_entries(device_t &device, int entries);
static void static_enable_shadows(device_t &device);
static void static_enable_hilights(device_t &device);
-
+
// getters
int entries() const { return m_entries; }
int indirect_entries() const { return m_indirect_entries; }
@@ -339,7 +338,7 @@ public:
const pen_t *pens() const { return m_pens; }
pen_t *shadow_table() const { return m_shadow_table; }
rgb_t pen_color(pen_t pen) { return m_palette->entry_color(pen); }
- double pen_contrast(pen_t pen) { return m_palette->entry_contrast(pen); }
+ double pen_contrast(pen_t pen) { return m_palette->entry_contrast(pen); }
pen_t black_pen() const { return m_black_pen; }
pen_t white_pen() const { return m_white_pen; }
memory_array &basemem() { return m_paletteram; }
@@ -365,7 +364,7 @@ public:
void set_shadow_factor(double factor) { assert(m_shadow_group != 0); m_palette->group_set_contrast(m_shadow_group, factor); }
void set_highlight_factor(double factor) { assert(m_hilight_group != 0); m_palette->group_set_contrast(m_hilight_group, factor); }
void set_shadow_mode(int mode) { assert(mode >= 0 && mode < MAX_SHADOW_PRESETS); m_shadow_table = m_shadow_tables[mode].base; }
-
+
// generic read/write handlers
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -388,7 +387,7 @@ public:
void palette_init_RRRRRGGGGGBBBBB(palette_device &palette);
void palette_init_BBBBBGGGGGRRRRR(palette_device &palette);
void palette_init_RRRRRGGGGGGBBBBB(palette_device &palette);
-
+
// helper to update palette when data changed
void update() { if (!m_init.isnull()) m_init(*this); }
protected:
@@ -402,40 +401,40 @@ protected:
void allocate_palette();
void allocate_color_tables();
void allocate_shadow_tables();
-
+
void update_for_write(offs_t byte_offset, int bytes_modified);
-public: // needed by konamigx
+public: // needed by konamigx
void set_shadow_dRGB32(int mode, int dr, int dg, int db, bool noclip);
protected:
void configure_rgb_shadows(int mode, float factor);
-
+
private:
// configuration state
- int m_entries; // number of entries in the palette
- int m_indirect_entries; // number of indirect colors in the palette
- bool m_enable_shadows; // are shadows enabled?
- bool m_enable_hilights; // are hilights enabled?
- endianness_t m_endianness; // endianness of palette RAM
- bool m_endianness_supplied; // endianness supplied in static config
+ int m_entries; // number of entries in the palette
+ int m_indirect_entries; // number of indirect colors in the palette
+ bool m_enable_shadows; // are shadows enabled?
+ bool m_enable_hilights; // are hilights enabled?
+ endianness_t m_endianness; // endianness of palette RAM
+ bool m_endianness_supplied; // endianness supplied in static config
// palette RAM
- raw_to_rgb_converter m_raw_to_rgb; // format of palette RAM
- memory_array m_paletteram; // base memory
- memory_array m_paletteram_ext; // extended memory
+ raw_to_rgb_converter m_raw_to_rgb; // format of palette RAM
+ memory_array m_paletteram; // base memory
+ memory_array m_paletteram_ext; // extended memory
// internal state
- palette_t * m_palette; // the palette itself
- const pen_t * m_pens; // remapped palette pen numbers
- bitmap_format m_format; // format assumed for palette data
- pen_t * m_shadow_table; // table for looking up a shadowed pen
- UINT32 m_shadow_group; // index of the shadow group, or 0 if none
- UINT32 m_hilight_group; // index of the hilight group, or 0 if none
- pen_t m_white_pen; // precomputed white pen value
- pen_t m_black_pen; // precomputed black pen value
-
+ palette_t * m_palette; // the palette itself
+ const pen_t * m_pens; // remapped palette pen numbers
+ bitmap_format m_format; // format assumed for palette data
+ pen_t * m_shadow_table; // table for looking up a shadowed pen
+ UINT32 m_shadow_group; // index of the shadow group, or 0 if none
+ UINT32 m_hilight_group; // index of the hilight group, or 0 if none
+ pen_t m_white_pen; // precomputed white pen value
+ pen_t m_black_pen; // precomputed black pen value
+
// indirection state
- dynamic_array<rgb_t> m_indirect_colors; // actual colors set for indirection
- dynamic_array<UINT16> m_indirect_pens; // indirection values
+ dynamic_array<rgb_t> m_indirect_colors; // actual colors set for indirection
+ dynamic_array<UINT16> m_indirect_pens; // indirection values
struct shadow_table_data
{
@@ -449,7 +448,7 @@ private:
dynamic_array<pen_t> m_save_pen; // pens for save/restore
dynamic_array<float> m_save_contrast; // brightness for save/restore
-
+
dynamic_array<pen_t> m_pen_array;
dynamic_array<pen_t> m_shadow_array;
dynamic_array<pen_t> m_hilight_array;
diff --git a/src/emu/imagedev/flopdrv.c b/src/emu/imagedev/flopdrv.c
index 5980bb9aeea..8bb9aedc535 100644
--- a/src/emu/imagedev/flopdrv.c
+++ b/src/emu/imagedev/flopdrv.c
@@ -206,7 +206,7 @@ void legacy_floppy_image_device::floppy_drive_set_flag_state(int flag, int state
a fixed set of circumstances */
/* use this to set ready state of drive */
void legacy_floppy_image_device::floppy_drive_set_ready_state(int state, int flag)
-{
+{
if (flag)
{
/* set ready only if drive is present, disk is in the drive,
@@ -252,7 +252,7 @@ int legacy_floppy_image_device::floppy_drive_get_flag_state(int flag)
void legacy_floppy_image_device::floppy_drive_seek(signed int signed_tracks)
-{
+{
LOG(("seek from: %d delta: %d\n",m_current_track, signed_tracks));
/* update position */
@@ -432,7 +432,7 @@ int legacy_floppy_image_device::internal_floppy_device_load(int create_format, o
const char *extension;
device_image_interface *image = NULL;
- interface(image); /* figure out the floppy options */
+ interface(image); /* figure out the floppy options */
floppy_options = ((floppy_interface*)static_config())->formats;
if (has_been_created())
@@ -621,7 +621,6 @@ WRITE_LINE_MEMBER( legacy_floppy_image_device::floppy_wtd_w )
/* step */
WRITE_LINE_MEMBER( legacy_floppy_image_device::floppy_stp_w )
{
-
/* move head one track when going from high to low and write gate is high */
if (m_active && m_stp && state == CLEAR_LINE && m_wtg)
{
diff --git a/src/emu/imagedev/harddriv.h b/src/emu/imagedev/harddriv.h
index 1555caea912..33f019a8460 100644
--- a/src/emu/imagedev/harddriv.h
+++ b/src/emu/imagedev/harddriv.h
@@ -36,7 +36,7 @@ public:
void set_device_load(device_image_load_delegate _load) { m_device_image_load = _load; }
void set_device_unload(device_image_func_delegate _unload) { m_device_image_unload = _unload; }
-
+
// image-level overrides
virtual bool call_load();
virtual bool call_create(int create_format, option_resolution *create_args);
@@ -71,9 +71,9 @@ protected:
chd_file m_origchd; /* handle to the original CHD */
chd_file m_diffchd; /* handle to the diff CHD */
hard_disk_file *m_hard_disk_handle;
-
+
device_image_load_delegate m_device_image_load;
- device_image_func_delegate m_device_image_unload;
+ device_image_func_delegate m_device_image_unload;
};
// device type definition
@@ -88,11 +88,11 @@ extern const device_type HARDDISK;
#define MCFG_HARDDISK_CONFIG_ADD(_tag,_config) \
MCFG_DEVICE_ADD(_tag, HARDDISK, 0) \
MCFG_DEVICE_CONFIG(_config)
-
+
#define MCFG_HARDDISK_LOAD(_class,_load) \
static_cast<harddisk_image_device *>(device)->set_device_load( DEVICE_IMAGE_LOAD_DELEGATE(_class,_load));
#define MCFG_HARDDISK_UNLOAD(_class,_unload) \
static_cast<harddisk_image_device *>(device)->set_device_unload( DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_unload));
-
+
#endif /* HARDDRIV_H */
diff --git a/src/emu/ioport.c b/src/emu/ioport.c
index 909671c8ff6..39c510c0b9a 100644
--- a/src/emu/ioport.c
+++ b/src/emu/ioport.c
@@ -706,7 +706,7 @@ void input_type_entry::configure_osd(const char *token, const char *name)
//-------------------------------------------------
// restore_default_seq - restores the sequence
-// from the default
+// from the default
//-------------------------------------------------
void input_type_entry::restore_default_seq()
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index bde61cd5249..620f1b513ec 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -1361,7 +1361,7 @@ public:
ioport_port *first_port() const { return m_portlist.first(); }
bool safe_to_read() const { return m_safe_to_read; }
natural_keyboard &natkeyboard() { return m_natkeyboard; }
-
+
// has... getters
bool has_configs() const { return m_has_configs; }
bool has_analog() const { return m_has_analog; }
@@ -1448,10 +1448,10 @@ private:
UINT32 m_playback_accumulated_frames; // accumulated frames during playback
// has...
- bool m_has_configs;
- bool m_has_analog;
- bool m_has_dips;
- bool m_has_bioses;
+ bool m_has_configs;
+ bool m_has_analog;
+ bool m_has_dips;
+ bool m_has_bioses;
};
diff --git a/src/emu/machine.h b/src/emu/machine.h
index cb09ecd90fd..764d933b9fd 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -284,7 +284,7 @@ private:
void watchdog_fired(void *ptr = NULL, INT32 param = 0);
void watchdog_vblank(screen_device &screen, bool vblank_state);
const char *image_parent_basename(device_t *device);
- astring &nvram_filename(astring &result, device_t &device);
+ astring &nvram_filename(astring &result, device_t &device);
void nvram_load();
void nvram_save();
diff --git a/src/emu/machine/64h156.c b/src/emu/machine/64h156.c
index cd511244e02..730c805c3ac 100644
--- a/src/emu/machine/64h156.c
+++ b/src/emu/machine/64h156.c
@@ -19,7 +19,7 @@
- cycle exact VIA
- get these running and we're golden
- - Bounty Bob Strikes Back (aligned halftracks)
+ - Bounty Bob Strikes Back (aligned halftracks)
- Quiwi (speed change within track)
- Defender of the Crown (V-MAX! v2, density checks)
- Test Drive / Cabal (HLS, sub-cycle jitter)
@@ -201,7 +201,7 @@ void c64h156_device::commit(attotime tm)
{
if(cur_live.write_start_time.is_never() || tm == cur_live.write_start_time || !cur_live.write_position)
return;
-
+
if (LOG) logerror("%s committing %u transitions since %s\n", tm.as_string(), cur_live.write_position, cur_live.write_start_time.as_string());
m_floppy->write_flux(cur_live.write_start_time, tm, cur_live.write_position, cur_live.write_buffer);
@@ -293,14 +293,14 @@ void c64h156_device::live_run(attotime limit)
cur_live.cell_counter++;
cur_live.cell_counter &= 0xf;
}
-
+
if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) {
// read bit
cur_live.shift_reg <<= 1;
cur_live.shift_reg |= !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2));
cur_live.shift_reg &= 0x3ff;
-
- if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter,
+
+ if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter,
!(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)), cur_live.shift_reg, cur_live.oe, cur_live.soe, cur_live.sync, cur_live.byte);
syncpoint = true;
@@ -392,7 +392,7 @@ int c64h156_device::get_next_bit(attotime &tm, attotime limit)
if (bit) {
cur_live.zero_counter = 0;
cur_live.cycles_until_random_flux = (rand() % 31) + 289;
-
+
get_next_edge(next);
}
diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c
index f879c21d500..a6316a75406 100644
--- a/src/emu/machine/6522via.c
+++ b/src/emu/machine/6522via.c
@@ -470,7 +470,7 @@ UINT8 via6522_device::input_pb()
void via6522_device::output_pb()
{
UINT8 pb = (m_out_b & m_ddr_b) | ~m_ddr_b;
-
+
if (T1_SET_PB7(m_acr))
pb = (pb & 0x7f) | (m_t1_pb7 << 7);
diff --git a/src/emu/machine/6526cia.h b/src/emu/machine/6526cia.h
index e44a36bfbe4..c3d5f8a40d1 100644
--- a/src/emu/machine/6526cia.h
+++ b/src/emu/machine/6526cia.h
@@ -1,6 +1,6 @@
/**********************************************************************
-
- WARNING: DO NOT USE! WILL BE REMOVED IN FAVOR OF machine/mos6526.h
+
+ WARNING: DO NOT USE! WILL BE REMOVED IN FAVOR OF machine/mos6526.h
**********************************************************************
diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c
index 2e52de30d57..04344c9c612 100644
--- a/src/emu/machine/6850acia.c
+++ b/src/emu/machine/6850acia.c
@@ -329,7 +329,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_rxc )
{
m_status &= ~SR_DCD;
}
-
+
m_rx_counter++;
switch (m_rx_state)
@@ -430,7 +430,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_rxc )
m_rx_counter = 0;
if (LOG) logerror("MC6850 '%s': RX STOP BIT\n", tag());
-
+
if (!m_rxd)
{
m_status |= SR_FE;
@@ -536,7 +536,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_txc )
if (m_tx_counter == m_divide)
{
m_tx_counter = 0;
-
+
m_tx_bits++;
if (LOG) logerror("MC6850 '%s': TX STOP BIT %d\n", tag(), m_tx_bits);
diff --git a/src/emu/machine/68561mpcc.c b/src/emu/machine/68561mpcc.c
index cae122bdd0f..02b0a4468a4 100644
--- a/src/emu/machine/68561mpcc.c
+++ b/src/emu/machine/68561mpcc.c
@@ -160,7 +160,7 @@ void mpcc68561_t::device_timer(emu_timer &timer, device_timer_id id, int param,
void mpcc68561_t::device_start()
{
intrq_cb.resolve_safe();
-
+
memset(channel, 0, sizeof(channel));
mode = 0;
diff --git a/src/emu/machine/74145.h b/src/emu/machine/74145.h
index 2cc52919892..7e22abf870b 100644
--- a/src/emu/machine/74145.h
+++ b/src/emu/machine/74145.h
@@ -23,25 +23,25 @@
#define MCFG_TTL74145_OUTPUT_LINE_2_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_2_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_3_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_3_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_4_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_4_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_5_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_5_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_6_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_6_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_7_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_7_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_8_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_8_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_TTL74145_OUTPUT_LINE_9_CB(_devcb) \
devcb = &ttl74145_device::set_output_line_9_callback(*device, DEVCB2_##_devcb);
@@ -56,7 +56,7 @@ class ttl74145_device : public device_t
public:
// construction/destruction
ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_output_line_0_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_0_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_output_line_1_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_1_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_output_line_2_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_2_cb.set_callback(object); }
@@ -67,7 +67,7 @@ public:
template<class _Object> static devcb2_base &set_output_line_7_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_7_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_output_line_8_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_8_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_output_line_9_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_9_cb.set_callback(object); }
-
+
UINT16 read();
void write(UINT8 data);
protected:
diff --git a/src/emu/machine/8042kbdc.h b/src/emu/machine/8042kbdc.h
index c89a07dcb00..81f2d63a323 100644
--- a/src/emu/machine/8042kbdc.h
+++ b/src/emu/machine/8042kbdc.h
@@ -101,7 +101,7 @@ protected:
int m_offset1;
int m_poll_delay;
-
+
required_device<at_keyboard_device> m_keyboard_dev;
devcb_resolved_write_line m_system_reset_func;
diff --git a/src/emu/machine/8530scc.c b/src/emu/machine/8530scc.c
index 56ffbd30365..2c6497dc6df 100644
--- a/src/emu/machine/8530scc.c
+++ b/src/emu/machine/8530scc.c
@@ -23,7 +23,7 @@ const device_type SCC8530 = &device_creator<scc8530_t>;
IMPLEMENTATION
***************************************************************************/
-scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SCC8530, "Zilog 8530 SCC", tag, owner, clock, "scc8530", __FILE__),
intrq_cb(*this)
{
diff --git a/src/emu/machine/bcreader.c b/src/emu/machine/bcreader.c
index 6583a7625b3..e9589c05a00 100644
--- a/src/emu/machine/bcreader.c
+++ b/src/emu/machine/bcreader.c
@@ -4,46 +4,46 @@
Generic barcode reader emulation.
- This device only provides the storage of the actual barcode, entered
- by the user via Internal UI, both as a raw strip of pixels (up to 95,
- for an EAN-13 barcode) and as an array of 0-9 digits.
-
- It is up to the driver to handle the serial transfer of the data to
- the emulated machine, depending on the used protocol
-
- E.g. Bandai Datach games directly read the raw pixel sequence of
- black/white bars;
- OTOH Barcode Battle (used by Barcode World for NES and a few SNES
- titles) sends the digits as sequences of 20 bytes (13 for the code,
- suitably padded for shorted codes, followed by a signature) and the
- actual serial transmission to the console is up to the slot device
- connected to the NES/SNES controller port (yet to be emulated, in this
- case)
+ This device only provides the storage of the actual barcode, entered
+ by the user via Internal UI, both as a raw strip of pixels (up to 95,
+ for an EAN-13 barcode) and as an array of 0-9 digits.
+
+ It is up to the driver to handle the serial transfer of the data to
+ the emulated machine, depending on the used protocol
+
+ E.g. Bandai Datach games directly read the raw pixel sequence of
+ black/white bars;
+ OTOH Barcode Battle (used by Barcode World for NES and a few SNES
+ titles) sends the digits as sequences of 20 bytes (13 for the code,
+ suitably padded for shorted codes, followed by a signature) and the
+ actual serial transmission to the console is up to the slot device
+ connected to the NES/SNES controller port (yet to be emulated, in this
+ case)
Note: we currently support the following barcode formats
* UPC-A: 12 digits
* EAN-13: 13 digits (extension of the former)
- * EAN-8: 8 digits (same encoding as UPC-A, but 4-digits blocks instead
- of 6-digits blocks)
+ * EAN-8: 8 digits (same encoding as UPC-A, but 4-digits blocks instead
+ of 6-digits blocks)
Notice that since EAN-13 is an extension of UPC-A, we just treat UPC-A
- as an EAN-13 code with leading '0'. If any barcode reader shall be found
- which supports the older format only, this shall be changed
-
-
- TODO: add support for UPC-E barcodes? these are 8 digits barcodes with 17
- black stripes (they are compressed UPC-A codes). Datach reader does not
- support these, so it is low priority
-
-
- TODO 2: verify barcode checksum in is_valid() and not only length, so
- that we can then use the actual last digit in the decode function below,
- rather than replacing it with the checksum value
-
-
- TODO 3: possibly the white spaces before the actual barcode (see the
- 61 white pixels sent by read_pixel() before and after the code), shall
- be moved to the specific implementations to emulate different "sensitivity"
- of the readers? Bandai Datach seems to need at least 32 pixels...
+ as an EAN-13 code with leading '0'. If any barcode reader shall be found
+ which supports the older format only, this shall be changed
+
+
+ TODO: add support for UPC-E barcodes? these are 8 digits barcodes with 17
+ black stripes (they are compressed UPC-A codes). Datach reader does not
+ support these, so it is low priority
+
+
+ TODO 2: verify barcode checksum in is_valid() and not only length, so
+ that we can then use the actual last digit in the decode function below,
+ rather than replacing it with the checksum value
+
+
+ TODO 3: possibly the white spaces before the actual barcode (see the
+ 61 white pixels sent by read_pixel() before and after the code), shall
+ be moved to the specific implementations to emulate different "sensitivity"
+ of the readers? Bandai Datach seems to need at least 32 pixels...
***************************************************************************/
@@ -85,7 +85,7 @@ void barcode_reader_device::device_start()
//-------------------------------------------------
// Barcode Decoding - convert the entered sequence
-// of digits into a sequence of B/W pixels (the
+// of digits into a sequence of B/W pixels (the
// actual bars) - each digit corresponds to 7 pixels
// 0 is black, 1 is white
//-------------------------------------------------
@@ -140,11 +140,11 @@ void barcode_reader_device::decode(int len)
if (len == 13)
{
// UPC-A and EAN-13
-
+
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
-
+
for (int i = 1; i < 7; i++)
{
if (bcread_parity_type[m_byte_data[0]][i - 1])
@@ -158,13 +158,13 @@ void barcode_reader_device::decode(int len)
m_pixel_data[output++] = bcread_data_LE[m_byte_data[i]][j];
}
}
-
+
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
-
+
for (int i = 7; i < 12; i++)
{
for (int j = 0; j < 7; j++)
@@ -178,59 +178,59 @@ void barcode_reader_device::decode(int len)
else if (len == 8)
{
// EAN-8 (same encoding as UPC-A, but only 4+4 digits, instead of 6+6)
-
+
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
-
+
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 7; j++)
m_pixel_data[output++] = bcread_data_LO[m_byte_data[i]][j];
}
-
+
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
-
+
for (int i = 4; i < 7; i++)
{
for (int j = 0; j < 7; j++)
m_pixel_data[output++] = bcread_data_RE[m_byte_data[i]][j];
}
-
+
// ignore the last digit and compute it as checksum of the first 12
for (int i = 0; i < 7; i++)
sum += (i & 1) ? (m_byte_data[i] * 1) : (m_byte_data[i] * 3);
}
-
+
if (m_pixel_data)
{
sum = (10 - (sum % 10)) % 10;
if (sum != m_byte_data[len - 1])
- logerror("WARNING: wrong checksum detected in the barcode! chksum %d last digit %d\n",
+ logerror("WARNING: wrong checksum detected in the barcode! chksum %d last digit %d\n",
sum, m_byte_data[len - 1]);
-
+
for (int i = 0; i < 7; i++)
m_pixel_data[output++] = bcread_data_RE[sum][i];
-
+
m_pixel_data[output++] = 0;
m_pixel_data[output++] = 1;
m_pixel_data[output++] = 0;
}
-
+
m_byte_length = len;
m_pixel_length = output;
-// printf("byte len %d - pixel len\n", m_byte_length, m_pixel_length);
+// printf("byte len %d - pixel len\n", m_byte_length, m_pixel_length);
}
//-------------------------------------------------
// write_code - invoked by UI, stores the barcode
-// both as an array of digits and as a sequence
+// both as an array of digits and as a sequence
// of B/W pixels (the actual bars)
//-------------------------------------------------
@@ -322,7 +322,7 @@ int barcode_reader_device::read_pixel()
return 0;
}
}
-
+
// no pending transfer = black pixel = 0
return 0;
}
diff --git a/src/emu/machine/bcreader.h b/src/emu/machine/bcreader.h
index 26e55a3d05c..4cb25404bc2 100644
--- a/src/emu/machine/bcreader.h
+++ b/src/emu/machine/bcreader.h
@@ -31,11 +31,11 @@ public:
// TODO: add checksum validation!
bool is_valid(int len) { return (len != 12 && len != 13 && len != 8) ? FALSE : TRUE; }
void decode(int len);
-
+
protected:
// device-level overrides
virtual void device_start();
-
+
UINT8 m_byte_data[13];
UINT8 m_pixel_data[100];
int m_byte_length;
diff --git a/src/emu/machine/com8116.h b/src/emu/machine/com8116.h
index dc34c7438e8..43eb1b21856 100644
--- a/src/emu/machine/com8116.h
+++ b/src/emu/machine/com8116.h
@@ -90,7 +90,7 @@ private:
int m_fx4;
int m_fr;
int m_ft;
-
+
const int *m_fr_divisors;
const int *m_ft_divisors;
diff --git a/src/emu/machine/ds75161a.h b/src/emu/machine/ds75161a.h
index bd0e3df7142..e5241ecb085 100644
--- a/src/emu/machine/ds75161a.h
+++ b/src/emu/machine/ds75161a.h
@@ -37,22 +37,22 @@
#define MCFG_DS75161A_IN_REN_CB(_devcb) \
devcb = &ds75161a_device::set_in_ren_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_IFC_CB(_devcb) \
devcb = &ds75161a_device::set_in_ifc_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_NDAC_CB(_devcb) \
devcb = &ds75161a_device::set_in_ndac_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_NRFD_CB(_devcb) \
devcb = &ds75161a_device::set_in_nrfd_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_DAV_CB(_devcb) \
devcb = &ds75161a_device::set_in_dav_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_EOI_CB(_devcb) \
devcb = &ds75161a_device::set_in_eoi_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_IN_ATN_CB(_devcb) \
devcb = &ds75161a_device::set_in_atn_callback(*device, DEVCB2_##_devcb);
@@ -61,22 +61,22 @@
#define MCFG_DS75161A_OUT_REN_CB(_devcb) \
devcb = &ds75161a_device::set_out_ren_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_IFC_CB(_devcb) \
devcb = &ds75161a_device::set_out_ifc_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_NDAC_CB(_devcb) \
devcb = &ds75161a_device::set_out_ndac_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_NRFD_CB(_devcb) \
devcb = &ds75161a_device::set_out_nrfd_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_DAV_CB(_devcb) \
devcb = &ds75161a_device::set_out_dav_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_EOI_CB(_devcb) \
devcb = &ds75161a_device::set_out_eoi_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_DS75161A_OUT_ATN_CB(_devcb) \
devcb = &ds75161a_device::set_out_atn_callback(*device, DEVCB2_##_devcb);
@@ -94,7 +94,7 @@ class ds75161a_device : public device_t
public:
// construction/destruction
ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_in_ren_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ren_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_ifc_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ifc_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_ndac_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ndac_cb.set_callback(object); }
diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c
index 1d3bb1cfa17..c958855f5cc 100644
--- a/src/emu/machine/generic.c
+++ b/src/emu/machine/generic.c
@@ -433,4 +433,3 @@ CUSTOM_INPUT_MEMBER( driver_device::custom_port_read )
const char *tag = (const char *)param;
return ioport(tag)->read();
}
-
diff --git a/src/emu/machine/hd63450.c b/src/emu/machine/hd63450.c
index a95a3ba9d5d..07babdadddd 100644
--- a/src/emu/machine/hd63450.c
+++ b/src/emu/machine/hd63450.c
@@ -61,7 +61,7 @@ void hd63450_device::device_start()
// get the CPU device
m_cpu = machine().device<cpu_device>(m_cpu_tag);
assert(m_cpu != NULL);
-
+
// resolve callbacks
m_dma_end.resolve();
m_dma_error.resolve_safe();
@@ -73,7 +73,7 @@ void hd63450_device::device_start()
m_dma_write_1.resolve();
m_dma_write_2.resolve();
m_dma_write_3.resolve();
-
+
// Initialise timers and registers
for (int x = 0; x < 4 ; x++)
{
@@ -86,7 +86,7 @@ void hd63450_device::device_start()
READ16_MEMBER(hd63450_device::read)
{
int channel,reg;
-
+
channel = (offset & 0x60) >> 5;
reg = offset & 0x1f;
@@ -321,7 +321,7 @@ void hd63450_device::single_transfer(int x)
address_space &space = m_cpu->space(AS_PROGRAM);
int data;
int datasize = 1;
-
+
if(m_in_progress[x] != 0) // DMA in progress in channel x
{
if(m_reg[x].ocr & 0x80) // direction: 1 = device -> memory
diff --git a/src/emu/machine/hd63450.h b/src/emu/machine/hd63450.h
index 3c9061776a4..297481e9048 100644
--- a/src/emu/machine/hd63450.h
+++ b/src/emu/machine/hd63450.h
@@ -16,25 +16,25 @@
#define MCFG_HD63450_DMA_READ_1_CB(_devcb) \
devcb = &hd63450_device::set_dma_read_1_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HD63450_DMA_READ_2_CB(_devcb) \
devcb = &hd63450_device::set_dma_read_2_callback(*device, DEVCB2_##_devcb);
#define MCFG_HD63450_DMA_READ_3_CB(_devcb) \
devcb = &hd63450_device::set_dma_read_3_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HD63450_DMA_WRITE_0_CB(_devcb) \
devcb = &hd63450_device::set_dma_write_0_callback(*device, DEVCB2_##_devcb);
#define MCFG_HD63450_DMA_WRITE_1_CB(_devcb) \
devcb = &hd63450_device::set_dma_write_1_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HD63450_DMA_WRITE_2_CB(_devcb) \
devcb = &hd63450_device::set_dma_write_2_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HD63450_DMA_WRITE_3_CB(_devcb) \
devcb = &hd63450_device::set_dma_write_3_callback(*device, DEVCB2_##_devcb);
-
+
struct hd63450_regs
{ // offsets in bytes
@@ -81,16 +81,16 @@ public:
template<class _Object> static devcb2_base &set_dma_write_0_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_0.set_callback(object); }
template<class _Object> static devcb2_base &set_dma_write_1_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_1.set_callback(object); }
template<class _Object> static devcb2_base &set_dma_write_2_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_2.set_callback(object); }
- template<class _Object> static devcb2_base &set_dma_write_3_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_3.set_callback(object); }
+ template<class _Object> static devcb2_base &set_dma_write_3_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_3.set_callback(object); }
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
-
+
void single_transfer(int x);
void set_timer(int channel, attotime tm);
int get_vector(int channel);
int get_error_vector(int channel);
-
+
protected:
// device-level overrides
virtual void device_config_complete();
@@ -107,7 +107,7 @@ private:
devcb2_write8 m_dma_write_1;
devcb2_write8 m_dma_write_2;
devcb2_write8 m_dma_write_3;
-
+
// internal state
hd63450_regs m_reg[4];
emu_timer* m_timer[4]; // for timing data reading/writing each channel
diff --git a/src/emu/machine/hd64610.h b/src/emu/machine/hd64610.h
index 4d25cef9a7a..da8856f3d7f 100644
--- a/src/emu/machine/hd64610.h
+++ b/src/emu/machine/hd64610.h
@@ -36,10 +36,10 @@
#define MCFG_HD64610_OUT_IRQ_CB(_devcb) \
devcb = &hd64610_device::set_out_irq_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HD64610_OUT_1HZ_CB(_devcb) \
devcb = &hd64610_device::set_out_1hz_callback(*device, DEVCB2_##_devcb);
-
+
//**************************************************************************
// TYPE DEFINITIONS
@@ -54,7 +54,7 @@ class hd64610_device : public device_t,
public:
// construction/destruction
hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_irq_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_1hz_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_1hz_cb.set_callback(object); }
diff --git a/src/emu/machine/i8251.c b/src/emu/machine/i8251.c
index 3d82f7876a4..4a8860db4b6 100644
--- a/src/emu/machine/i8251.c
+++ b/src/emu/machine/i8251.c
@@ -686,7 +686,7 @@ void i8251_device::device_timer(emu_timer &timer, device_timer_id id, int param,
WRITE_LINE_MEMBER(i8251_device::write_rxd)
{
m_rxd = state;
-// device_serial_interface::rx_w(state);
+// device_serial_interface::rx_w(state);
}
WRITE_LINE_MEMBER(i8251_device::write_cts)
diff --git a/src/emu/machine/i8271.c b/src/emu/machine/i8271.c
index f446d87862c..cf53c4c6768 100644
--- a/src/emu/machine/i8271.c
+++ b/src/emu/machine/i8271.c
@@ -133,12 +133,12 @@ i8271_device::i8271_device(const machine_config &mconfig, const char *tag, devic
{
m_CommandParameters[i] = 0;
}
-
+
for (int i = 0; i < 2; i++ )
{
m_CurrentTrack[i] = 0;
}
-
+
for (int i = 0; i < 4; i++ )
{
m_BadTracks[i] = 0;
@@ -313,19 +313,19 @@ void i8271_device::device_timer(emu_timer &timer, device_timer_id id, int param,
/* stop it */
m_data_timer->reset();
break;
-
+
case TIMER_TIMED_COMMAND_COMPLETE:
command_complete(1,1);
/* stop it, but don't allow it to be free'd */
m_command_complete_timer->reset();
break;
-
+
default:
break;
}
}
-
+
/* setup a timed data request - data request will be triggered in a few usecs time */
void i8271_device::timed_data_request()
{
@@ -345,7 +345,7 @@ command completion. Required for read data and write data, where last byte could
void i8271_device::timed_command_complete()
{
int usecs;
-
+
/* 64 for single density - 2 crc bytes later*/
usecs = 64*2;
@@ -669,7 +669,7 @@ void i8271_device::do_read()
void i8271_device::do_read_id()
{
chrn_id id;
-
+
/* get next id from disc */
current_image()->floppy_drive_get_next_id(m_side,&id);
diff --git a/src/emu/machine/i8271.h b/src/emu/machine/i8271.h
index 52e5c5ac7fd..496d655c9c5 100644
--- a/src/emu/machine/i8271.h
+++ b/src/emu/machine/i8271.h
@@ -46,14 +46,14 @@ public:
DECLARE_READ8_MEMBER(data_r);
DECLARE_WRITE8_MEMBER(data_w);
-
+
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
+
private:
// internal state
enum
@@ -64,7 +64,7 @@ private:
devcb2_write_line m_write_irq;
devcb2_write_line m_write_drq;
-
+
int m_flags;
int m_state;
unsigned char m_Command;
@@ -127,7 +127,7 @@ private:
emu_timer *m_data_timer;
emu_timer *m_command_complete_timer;
-
+
legacy_floppy_image_device *current_image();
void seek_to_track(int track);
void load_bad_tracks(int surface);
diff --git a/src/emu/machine/i8355.h b/src/emu/machine/i8355.h
index ab2cfbb827b..1316c2ffa21 100644
--- a/src/emu/machine/i8355.h
+++ b/src/emu/machine/i8355.h
@@ -57,13 +57,13 @@
#define MCFG_I8355_OUT_PA_CB(_devcb) \
devcb = &i8355_device::set_out_pa_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_I8355_IN_PB_CB(_devcb) \
devcb = &i8355_device::set_in_pb_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_I8355_OUT_PB_CB(_devcb) \
devcb = &i8355_device::set_out_pb_callback(*device, DEVCB2_##_devcb);
-
+
///*************************************************************************
// TYPE DEFINITIONS
@@ -82,7 +82,7 @@ public:
template<class _Object> static devcb2_base &set_out_pa_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pa_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_in_pb_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pb_cb.set_callback(object); }
-
+
DECLARE_READ8_MEMBER( io_r );
DECLARE_WRITE8_MEMBER( io_w );
diff --git a/src/emu/machine/im6402.h b/src/emu/machine/im6402.h
index 3779ad7a99e..7c45743bbf7 100644
--- a/src/emu/machine/im6402.h
+++ b/src/emu/machine/im6402.h
@@ -78,7 +78,7 @@
// ======================> im6402_device
class im6402_device : public device_t,
- public device_serial_interface
+ public device_serial_interface
{
public:
// construction/destruction
diff --git a/src/emu/machine/ins8154.h b/src/emu/machine/ins8154.h
index 4c836c9e6c6..238685582f7 100644
--- a/src/emu/machine/ins8154.h
+++ b/src/emu/machine/ins8154.h
@@ -46,13 +46,13 @@
#define MCFG_INS8154_IN_A_CB(_devcb) \
devcb = &ins8154_device::set_in_a_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_INS8154_OUT_A_CB(_devcb) \
devcb = &ins8154_device::set_out_a_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_INS8154_IN_B_CB(_devcb) \
devcb = &ins8154_device::set_in_b_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_INS8154_OUT_B_CB(_devcb) \
devcb = &ins8154_device::set_out_b_callback(*device, DEVCB2_##_devcb);
@@ -76,7 +76,7 @@ public:
template<class _Object> static devcb2_base &set_in_b_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_in_b_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_b_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_out_b_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_out_irq_cb.set_callback(object); }
-
+
DECLARE_READ8_MEMBER( ins8154_r );
DECLARE_WRITE8_MEMBER( ins8154_w );
diff --git a/src/emu/machine/k053252.h b/src/emu/machine/k053252.h
index c1ecccbf657..027c2144f03 100644
--- a/src/emu/machine/k053252.h
+++ b/src/emu/machine/k053252.h
@@ -19,7 +19,7 @@
devcb = &k053252_device::set_int2_ack_callback(*device, DEVCB2_##_devcb);
/*#define MCFG_K053252_INT_TIME_CB(_devcb) \
- devcb = &k053252_device::set_int_time_callback(*device, DEVCB2_##_devcb); */
+ devcb = &k053252_device::set_int_time_callback(*device, DEVCB2_##_devcb); */
#define MCFG_K053252_OFFSETS(_offsx, _offsy) \
k053252_device::set_offsets(*device, _offsx, _offsy);
@@ -38,7 +38,7 @@ public:
template<class _Object> static devcb2_base &set_int2_ack_callback(device_t &device, _Object object) { return downcast<k053252_device &>(device).m_int2_ack_cb.set_callback(object); }
//template<class _Object> static devcb2_base &set_int_time_callback(device_t &device, _Object object) { return downcast<k053252_device &>(device).m_int_time_cb.set_callback(object); }
static void set_offsets(device_t &device, int offsx, int offsy) { downcast<k053252_device &>(device).m_offsx = offsx; downcast<k053252_device &>(device).m_offsy = offsy;}
-
+
DECLARE_READ8_MEMBER( read ); // CCU registers
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/emu/machine/kb3600.c b/src/emu/machine/kb3600.c
index de24bd3f822..62d961ba51a 100644
--- a/src/emu/machine/kb3600.c
+++ b/src/emu/machine/kb3600.c
@@ -160,7 +160,7 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param
if (!found)
{
- ako = 1;
+ ako = 1;
if (m_b != b)
{
@@ -181,7 +181,7 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param
}
}
}
- else // key released, unmark it from the keys_down table
+ else // key released, unmark it from the keys_down table
{
for (int k = 0; k < MAX_KEYS_DOWN; k++)
{
diff --git a/src/emu/machine/kb3600.h b/src/emu/machine/kb3600.h
index 003424ea8bf..47b40f976ac 100644
--- a/src/emu/machine/kb3600.h
+++ b/src/emu/machine/kb3600.h
@@ -65,31 +65,31 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_AY3600_MATRIX_X0(_cb) \
+#define MCFG_AY3600_MATRIX_X0(_cb) \
devcb = &ay3600_device::set_x0_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X1(_cb) \
+#define MCFG_AY3600_MATRIX_X1(_cb) \
devcb = &ay3600_device::set_x1_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X2(_cb) \
+#define MCFG_AY3600_MATRIX_X2(_cb) \
devcb = &ay3600_device::set_x2_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X3(_cb) \
+#define MCFG_AY3600_MATRIX_X3(_cb) \
devcb = &ay3600_device::set_x3_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X4(_cb) \
+#define MCFG_AY3600_MATRIX_X4(_cb) \
devcb = &ay3600_device::set_x4_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X5(_cb) \
+#define MCFG_AY3600_MATRIX_X5(_cb) \
devcb = &ay3600_device::set_x5_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X6(_cb) \
+#define MCFG_AY3600_MATRIX_X6(_cb) \
devcb = &ay3600_device::set_x6_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X7(_cb) \
+#define MCFG_AY3600_MATRIX_X7(_cb) \
devcb = &ay3600_device::set_x7_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_MATRIX_X8(_cb) \
+#define MCFG_AY3600_MATRIX_X8(_cb) \
devcb = &ay3600_device::set_x8_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_SHIFT_CB(_cb) \
+#define MCFG_AY3600_SHIFT_CB(_cb) \
devcb = &ay3600_device::set_shift_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_CONTROL_CB(_cb) \
+#define MCFG_AY3600_CONTROL_CB(_cb) \
devcb = &ay3600_device::set_control_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_DATA_READY_CB(_cb) \
+#define MCFG_AY3600_DATA_READY_CB(_cb) \
devcb = &ay3600_device::set_data_ready_cb(*device, DEVCB2_##_cb);
-#define MCFG_AY3600_AKO_CB(_cb) \
+#define MCFG_AY3600_AKO_CB(_cb) \
devcb = &ay3600_device::set_ako_cb(*device, DEVCB2_##_cb);
//**************************************************************************
diff --git a/src/emu/machine/kr2376.c b/src/emu/machine/kr2376.c
index 8829e2ede0b..b58885a87fe 100644
--- a/src/emu/machine/kr2376.c
+++ b/src/emu/machine/kr2376.c
@@ -346,4 +346,4 @@ INPUT_PORTS_END
ioport_constructor kr2376_device::device_input_ports() const
{
return INPUT_PORTS_NAME( kr2376 );
-} \ No newline at end of file
+}
diff --git a/src/emu/machine/kr2376.h b/src/emu/machine/kr2376.h
index 3f7d9fe696c..dad802f94e6 100644
--- a/src/emu/machine/kr2376.h
+++ b/src/emu/machine/kr2376.h
@@ -59,7 +59,7 @@ public:
~kr2376_device() {}
template<class _Object> static devcb2_base &set_strobe_wr_callback(device_t &device, _Object object) { return downcast<kr2376_device &>(device).m_write_strobe.set_callback(object); }
-
+
/* keyboard data */
DECLARE_READ8_MEMBER( data_r );
@@ -74,7 +74,7 @@ protected:
virtual void device_start();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
virtual ioport_constructor device_input_ports() const;
-
+
private:
// internal state
int m_pins[41];
@@ -91,12 +91,12 @@ private:
/* timers */
emu_timer *m_scan_timer; /* keyboard scan timer */
devcb2_write_line m_write_strobe;
-
+
enum
{
TIMER_SCAN_TICK
};
-
+
void change_output_lines();
void clock_scan_counters();
void detect_keypress();
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index 0337f28147a..cc0c46e8461 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -314,7 +314,7 @@ void laserdisc_device::device_start()
// if we have a palette and it's not started, wait for it
if (m_overlay_palette != NULL && !m_overlay_palette->started())
throw device_missing_dependencies();
-
+
// initialize the various pieces
init_disc();
init_video();
@@ -373,7 +373,7 @@ void laserdisc_device::device_validity_check(validity_checker &valid) const
{
texture_format texformat = !m_overupdate_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
if (m_overlay_palette == NULL && texformat == TEXFORMAT_PALETTE16)
- mame_printf_error("Overlay screen does not have palette defined\n");
+ mame_printf_error("Overlay screen does not have palette defined\n");
}
//-------------------------------------------------
diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c
index ae82c8f7b4f..5d8444b6a0a 100644
--- a/src/emu/machine/latch8.c
+++ b/src/emu/machine/latch8.c
@@ -54,7 +54,7 @@ READ8_MEMBER( latch8_device::read )
{
int i;
for (i=0; i<8; i++)
- {
+ {
if (i==0 && !m_read_0.isnull()) { res &= ~( 1 << i); res |= ((m_read_0(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
if (i==1 && !m_read_1.isnull()) { res &= ~( 1 << i); res |= ((m_read_1(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
if (i==2 && !m_read_2.isnull()) { res &= ~( 1 << i); res |= ((m_read_2(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
@@ -62,7 +62,7 @@ READ8_MEMBER( latch8_device::read )
if (i==4 && !m_read_4.isnull()) { res &= ~( 1 << i); res |= ((m_read_4(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
if (i==5 && !m_read_5.isnull()) { res &= ~( 1 << i); res |= ((m_read_5(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
if (i==6 && !m_read_6.isnull()) { res &= ~( 1 << i); res |= ((m_read_6(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; }
- if (i==7 && !m_read_7.isnull()) { res &= ~( 1 << i); res |= ((m_read_7(space, 0, 0xff) >> m_offset[i]) & 0x01) << i;}
+ if (i==7 && !m_read_7.isnull()) { res &= ~( 1 << i); res |= ((m_read_7(space, 0, 0xff) >> m_offset[i]) & 0x01) << i;}
}
}
return (res & ~m_maskout) ^ m_xorvalue;
@@ -150,7 +150,7 @@ latch8_device::latch8_device(const machine_config &mconfig, const char *tag, dev
m_has_read(0),
m_maskout(0),
m_xorvalue(0),
- m_nosync(0),
+ m_nosync(0),
m_write_0(*this),
m_write_1(*this),
m_write_2(*this),
@@ -168,13 +168,13 @@ latch8_device::latch8_device(const machine_config &mconfig, const char *tag, dev
m_read_6(*this),
m_read_7(*this)
{
- memset(m_offset, 0, sizeof(m_offset));
+ memset(m_offset, 0, sizeof(m_offset));
}
//-------------------------------------------------
// device_validity_check - validate device
-// configuration
+// configuration
//-------------------------------------------------
void latch8_device::device_validity_check(validity_checker &valid) const
@@ -202,7 +202,7 @@ void latch8_device::device_start()
m_write_5.resolve();
m_write_6.resolve();
m_write_7.resolve();
-
+
m_read_0.resolve();
m_read_1.resolve();
m_read_2.resolve();
@@ -211,7 +211,7 @@ void latch8_device::device_start()
m_read_5.resolve();
m_read_6.resolve();
m_read_7.resolve();
-
+
/* setup nodemap */
if (!m_write_0.isnull()) m_has_write = 1;
if (!m_write_1.isnull()) m_has_write = 1;
@@ -221,7 +221,7 @@ void latch8_device::device_start()
if (!m_write_5.isnull()) m_has_write = 1;
if (!m_write_6.isnull()) m_has_write = 1;
if (!m_write_7.isnull()) m_has_write = 1;
-
+
/* setup device read handlers */
if (!m_read_0.isnull()) m_has_read = 1;
if (!m_read_1.isnull()) m_has_read = 1;
diff --git a/src/emu/machine/latch8.h b/src/emu/machine/latch8.h
index 3b195732c2f..50048dfb246 100644
--- a/src/emu/machine/latch8.h
+++ b/src/emu/machine/latch8.h
@@ -26,8 +26,8 @@ class latch8_device : public device_t
{
public:
latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-
+
+
/* write & read full byte */
DECLARE_READ8_MEMBER( read );
@@ -76,7 +76,7 @@ public:
static void set_maskout(device_t &device, UINT32 maskout) { downcast<latch8_device &>(device).m_maskout = maskout; }
static void set_xorvalue(device_t &device, UINT32 xorvalue) { downcast<latch8_device &>(device).m_xorvalue = xorvalue; }
static void set_nosync(device_t &device, UINT32 nosync) { downcast<latch8_device &>(device).m_nosync = nosync; }
-
+
template<class _Object> static devcb2_base &set_write_0(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[0] = offset; return downcast<latch8_device &>(device).m_write_0.set_callback(object); }
template<class _Object> static devcb2_base &set_write_1(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[1] = offset; return downcast<latch8_device &>(device).m_write_1.set_callback(object); }
template<class _Object> static devcb2_base &set_write_2(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[2] = offset; return downcast<latch8_device &>(device).m_write_2.set_callback(object); }
@@ -85,7 +85,7 @@ public:
template<class _Object> static devcb2_base &set_write_5(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[5] = offset; return downcast<latch8_device &>(device).m_write_5.set_callback(object); }
template<class _Object> static devcb2_base &set_write_6(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[6] = offset; return downcast<latch8_device &>(device).m_write_6.set_callback(object); }
template<class _Object> static devcb2_base &set_write_7(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[7] = offset; return downcast<latch8_device &>(device).m_write_7.set_callback(object); }
-
+
template<class _Object> static devcb2_base &set_read_0(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[0] = offset; return downcast<latch8_device &>(device).m_read_0.set_callback(object); }
template<class _Object> static devcb2_base &set_read_1(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[1] = offset; return downcast<latch8_device &>(device).m_read_1.set_callback(object); }
template<class _Object> static devcb2_base &set_read_2(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[2] = offset; return downcast<latch8_device &>(device).m_read_2.set_callback(object); }
@@ -94,13 +94,13 @@ public:
template<class _Object> static devcb2_base &set_read_5(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[5] = offset; return downcast<latch8_device &>(device).m_read_5.set_callback(object); }
template<class _Object> static devcb2_base &set_read_6(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[6] = offset; return downcast<latch8_device &>(device).m_read_6.set_callback(object); }
template<class _Object> static devcb2_base &set_read_7(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[7] = offset; return downcast<latch8_device &>(device).m_read_7.set_callback(object); }
-
+
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual void device_validity_check(validity_checker &valid) const;
-
+
TIMER_CALLBACK_MEMBER( timerproc );
void update(UINT8 new_val, UINT8 mask);
inline UINT8 bitx_r( offs_t offset, int bit);
@@ -110,12 +110,12 @@ private:
UINT8 m_value;
UINT8 m_has_write;
UINT8 m_has_read;
-
+
/* only for byte reads, does not affect bit reads and node_map */
UINT32 m_maskout;
UINT32 m_xorvalue; /* after mask */
UINT32 m_nosync;
-
+
devcb2_write8 m_write_0;
devcb2_write8 m_write_1;
devcb2_write8 m_write_2;
@@ -133,7 +133,7 @@ private:
devcb2_read8 m_read_5;
devcb2_read8 m_read_6;
devcb2_read8 m_read_7;
-
+
UINT32 m_offset[8];
};
@@ -186,7 +186,7 @@ extern const device_type LATCH8;
/* Upon read, replace bits by reading from another device handler */
#define MCFG_LATCH8_READ_0(_devcb, _from_bit) \
devcb = &latch8_device::set_read_0(*device, DEVCB2_##_devcb, _from_bit);
-
+
#define MCFG_LATCH8_READ_1(_devcb, _from_bit) \
devcb = &latch8_device::set_read_1(*device, DEVCB2_##_devcb, _from_bit);
diff --git a/src/emu/machine/lh5810.h b/src/emu/machine/lh5810.h
index 4f70a48db84..901740dc510 100644
--- a/src/emu/machine/lh5810.h
+++ b/src/emu/machine/lh5810.h
@@ -43,16 +43,16 @@ enum
#define MCFG_LH5810_PORTA_W_CB(_devcb) \
devcb = &lh5810_device::set_porta_w_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_LH5810_PORTB_R_CB(_devcb) \
devcb = &lh5810_device::set_portb_r_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_LH5810_PORTB_W_CB(_devcb) \
devcb = &lh5810_device::set_portb_w_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_LH5810_PORTC_W_CB(_devcb) \
devcb = &lh5810_device::set_portc_w_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_LH5810_OUT_INT_CB(_devcb) \
devcb = &lh5810_device::set_out_int_callback(*device, DEVCB2_##_devcb); //currently unused
@@ -76,7 +76,7 @@ public:
template<class _Object> static devcb2_base &set_portb_w_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_portb_w_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_portc_w_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_portc_w_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_int_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_out_int_cb.set_callback(object); }
-
+
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c
index 7e06e38685e..5552e44e245 100644
--- a/src/emu/machine/mb87078.c
+++ b/src/emu/machine/mb87078.c
@@ -119,7 +119,7 @@ mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, d
void mb87078_device::device_start()
{
m_gain_changed_cb.resolve_safe();
-
+
save_item(NAME(m_channel_latch));
save_item(NAME(m_reset_comp));
save_item(NAME(m_latch[0]));
diff --git a/src/emu/machine/mb87078.h b/src/emu/machine/mb87078.h
index 2e8ef88ddd3..3b578ebd961 100644
--- a/src/emu/machine/mb87078.h
+++ b/src/emu/machine/mb87078.h
@@ -25,7 +25,7 @@ class mb87078_device : public device_t
public:
mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~mb87078_device() {}
-
+
template<class _Object> static devcb2_base &set_gain_changed_callback(device_t &device, _Object object) { return downcast<mb87078_device &>(device).m_gain_changed_cb.set_callback(object); }
void data_w(int data, int dsel);
@@ -57,7 +57,7 @@ private:
int m_channel_latch; /* current channel */
UINT8 m_latch[2][4]; /* 6bit+3bit 4 data latches */
UINT8 m_reset_comp;
-
+
devcb2_write8 m_gain_changed_cb;
};
diff --git a/src/emu/machine/mc2661.h b/src/emu/machine/mc2661.h
index 36d78fe62f7..3994adc94a5 100644
--- a/src/emu/machine/mc2661.h
+++ b/src/emu/machine/mc2661.h
@@ -78,7 +78,7 @@
// ======================> mc2661_device
class mc2661_device : public device_t,
- public device_serial_interface
+ public device_serial_interface
{
public:
// construction/destruction
diff --git a/src/emu/machine/mc68328.h b/src/emu/machine/mc68328.h
index 64e7385f439..f8198250a44 100644
--- a/src/emu/machine/mc68328.h
+++ b/src/emu/machine/mc68328.h
@@ -633,8 +633,8 @@ public:
template<class _Object> static devcb2_base &set_out_spim_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_out_spim_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_spim_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_in_spim_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_spim_xch_trigger_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_spim_xch_trigger_cb.set_callback(object); }
-
-
+
+
DECLARE_WRITE16_MEMBER(write);
DECLARE_READ16_MEMBER(read);
DECLARE_WRITE_LINE_MEMBER(set_penirq_line);
@@ -699,82 +699,82 @@ private:
required_device<cpu_device> m_cpu;
};
-
+
extern const device_type MC68328;
#define MCFG_MC68328_CPU(_tag) \
mc68328_device::static_set_cpu_tag(*device, "^"_tag);
-
+
#define MCFG_MC68328_OUT_PORT_A_CB(_devcb) \
devcb = &mc68328_device::set_out_port_a_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_B_CB(_devcb) \
devcb = &mc68328_device::set_out_port_b_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_C_CB(_devcb) \
devcb = &mc68328_device::set_out_port_c_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_D_CB(_devcb) \
devcb = &mc68328_device::set_out_port_d_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_E_CB(_devcb) \
devcb = &mc68328_device::set_out_port_e_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_F_CB(_devcb) \
devcb = &mc68328_device::set_out_port_f_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_G_CB(_devcb) \
devcb = &mc68328_device::set_out_port_g_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_J_CB(_devcb) \
devcb = &mc68328_device::set_out_port_j_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_K_CB(_devcb) \
devcb = &mc68328_device::set_out_port_k_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PORT_M_CB(_devcb) \
devcb = &mc68328_device::set_out_port_m_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_A_CB(_devcb) \
devcb = &mc68328_device::set_in_port_a_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_B_CB(_devcb) \
devcb = &mc68328_device::set_in_port_b_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_C_CB(_devcb) \
devcb = &mc68328_device::set_in_port_c_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_D_CB(_devcb) \
devcb = &mc68328_device::set_in_port_d_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_E_CB(_devcb) \
devcb = &mc68328_device::set_in_port_e_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_F_CB(_devcb) \
devcb = &mc68328_device::set_in_port_f_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_G_CB(_devcb) \
devcb = &mc68328_device::set_in_port_g_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_J_CB(_devcb) \
devcb = &mc68328_device::set_in_port_j_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_K_CB(_devcb) \
devcb = &mc68328_device::set_in_port_k_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_PORT_M_CB(_devcb) \
devcb = &mc68328_device::set_in_port_m_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_PWM_CB(_devcb) \
devcb = &mc68328_device::set_out_pwm_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_OUT_SPIM_CB(_devcb) \
devcb = &mc68328_device::set_out_spim_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_IN_SPIM_CB(_devcb) \
devcb = &mc68328_device::set_in_spim_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68328_SPIM_XCH_TRIGGER_CB(_devcb) \
devcb = &mc68328_device::set_spim_xch_trigger_callback(*device, DEVCB2_##_devcb);
diff --git a/src/emu/machine/mc6843.c b/src/emu/machine/mc6843.c
index b7e678603c3..afc9c6a2423 100644
--- a/src/emu/machine/mc6843.c
+++ b/src/emu/machine/mc6843.c
@@ -144,7 +144,7 @@ void mc6843_device::device_reset()
img->floppy_drive_set_ready_state(FLOPPY_DRIVE_READY, 0 );
img->floppy_drive_set_rpm( 300. );
}
-
+
/* reset registers */
m_CMR &= 0xf0; /* zero only command */
m_ISR = 0;
@@ -464,7 +464,7 @@ void mc6843_device::device_timer(emu_timer &timer, device_timer_id id, int param
}
}
break;
-
+
default:
break;
}
diff --git a/src/emu/machine/mc6843.h b/src/emu/machine/mc6843.h
index 5c66033c1a6..b86ffa5e05b 100644
--- a/src/emu/machine/mc6843.h
+++ b/src/emu/machine/mc6843.h
@@ -19,7 +19,7 @@ class mc6843_device : public device_t
public:
mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~mc6843_device() {}
-
+
template<class _Object> static devcb2_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<mc6843_device &>(device).m_write_irq.set_callback(object); }
DECLARE_READ8_MEMBER(read);
@@ -34,13 +34,13 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
+
private:
enum
{
TIMER_CONT
};
-
+
devcb2_write_line m_write_irq;
/* registers */
@@ -66,7 +66,7 @@ private:
/* trigger delayed actions (bottom halves) */
emu_timer* m_timer_cont;
-
+
legacy_floppy_image_device* floppy_image(UINT8 drive);
legacy_floppy_image_device* floppy_image();
void status_update();
@@ -78,7 +78,7 @@ private:
void finish_RCR();
void cont_SR();
void cont_SW();
-
+
};
extern const device_type MC6843;
diff --git a/src/emu/machine/mc6846.h b/src/emu/machine/mc6846.h
index da7974db557..8e420ecaa81 100644
--- a/src/emu/machine/mc6846.h
+++ b/src/emu/machine/mc6846.h
@@ -18,7 +18,7 @@
#define MCFG_MC6846_OUT_CP2_CB(_devcb) \
devcb = &mc6846_device::set_out_cp2_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC6846_IN_PORT_CB(_devcb) \
devcb = &mc6846_device::set_in_port_callback(*device, DEVCB2_##_devcb);
@@ -41,7 +41,7 @@ public:
template<class _Object> static devcb2_base &set_in_port_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_in_port_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_cto_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_out_cto_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_irq_cb.set_callback(object); }
-
+
/* interface to CPU via address/data bus*/
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/emu/machine/mc68681.c b/src/emu/machine/mc68681.c
index 39961a519a0..accc5bda7e4 100644
--- a/src/emu/machine/mc68681.c
+++ b/src/emu/machine/mc68681.c
@@ -167,7 +167,7 @@ void mc68681_device::update_interrupts()
{
LOG(( "68681: Interrupt line not active (IMR & ISR = %02X)\n", ISR & IMR));
write_irq(CLEAR_LINE);
- m_read_vector = false; // clear IACK too
+ m_read_vector = false; // clear IACK too
}
};
@@ -235,7 +235,7 @@ TIMER_CALLBACK_MEMBER( mc68681_device::duart_timer_callback )
// timer output to bit 3?
if ((OPCR & 0xc) == 0x4)
{
- OPR ^= 0x8;
+ OPR ^= 0x8;
write_outport(OPR ^ 0xff);
}
@@ -280,7 +280,7 @@ READ8_MEMBER( mc68681_device::read )
// reading this clears all the input change bits
IPCR &= 0x0f;
- ISR &= ~INT_INPUT_PORT_CHANGE;
+ ISR &= ~INT_INPUT_PORT_CHANGE;
update_interrupts();
}
break;
@@ -304,20 +304,20 @@ READ8_MEMBER( mc68681_device::read )
break;
case 0x0a: /* 1X/16X Test */
- r = 0x61; // the old 68681 returned this and it makes Apollo happy
+ r = 0x61; // the old 68681 returned this and it makes Apollo happy
break;
case 0x0d: /* IP */
if (!read_inport.isnull())
{
- r = read_inport(); // TODO: go away
+ r = read_inport(); // TODO: go away
}
else
{
r = IP_last_state;
}
- r |= 0x80; // bit 7 is always set
+ r |= 0x80; // bit 7 is always set
// bit 6 is /IACK (note the active-low)
if (m_read_vector)
@@ -328,7 +328,7 @@ READ8_MEMBER( mc68681_device::read )
{
r |= 0x40;
}
- break;
+ break;
case 0x0e: /* Start counter command */
{
@@ -402,7 +402,7 @@ WRITE8_MEMBER( mc68681_device::write )
// check for pending input port delta interrupts
if ((((IPCR>>4) & data) & 0x0f) != 0)
{
- ISR |= INT_INPUT_PORT_CHANGE;
+ ISR |= INT_INPUT_PORT_CHANGE;
}
m_chanA->ACR_updated();
@@ -466,7 +466,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip0_w )
if (ACR & 1)
{
- ISR |= INT_INPUT_PORT_CHANGE;
+ ISR |= INT_INPUT_PORT_CHANGE;
update_interrupts();
}
}
@@ -486,7 +486,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip1_w )
if (ACR & 2)
{
- ISR |= INT_INPUT_PORT_CHANGE;
+ ISR |= INT_INPUT_PORT_CHANGE;
update_interrupts();
}
}
@@ -506,7 +506,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip2_w )
if (ACR & 4)
{
- ISR |= INT_INPUT_PORT_CHANGE;
+ ISR |= INT_INPUT_PORT_CHANGE;
update_interrupts();
}
}
@@ -526,7 +526,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip3_w )
if (ACR & 8)
{
- ISR |= INT_INPUT_PORT_CHANGE;
+ ISR |= INT_INPUT_PORT_CHANGE;
update_interrupts();
}
}
@@ -671,7 +671,7 @@ void mc68681_channel::rcv_complete()
{
receive_register_extract();
-// printf("%s ch %d rcv complete\n", tag(), m_ch);
+// printf("%s ch %d rcv complete\n", tag(), m_ch);
if ( rx_enabled )
{
@@ -693,7 +693,7 @@ void mc68681_channel::rcv_complete()
void mc68681_channel::tra_complete()
{
-// printf("%s ch %d Tx complete\n", tag(), m_ch);
+// printf("%s ch %d Tx complete\n", tag(), m_ch);
tx_ready = 1;
SR |= STATUS_TRANSMITTER_READY;
@@ -730,7 +730,7 @@ void mc68681_channel::tra_callback()
if ((MR2&0xC0) != 0x80)
{
int bit = transmit_register_get_data_bit();
-// printf("%s ch %d transmit %d\n", tag(), m_ch, bit);
+// printf("%s ch %d transmit %d\n", tag(), m_ch, bit);
if (m_ch == 0)
{
m_uart->write_a_tx(bit);
@@ -740,7 +740,7 @@ void mc68681_channel::tra_callback()
m_uart->write_b_tx(bit);
}
}
- else // must call this to advance the transmitter
+ else // must call this to advance the transmitter
{
transmit_register_get_data_bit();
}
@@ -750,7 +750,7 @@ void mc68681_channel::update_interrupts()
{
if (rx_enabled)
{
- if (rx_fifo_num > 0)
+ if (rx_fifo_num > 0)
{
SR |= STATUS_RECEIVER_READY;
}
@@ -867,7 +867,7 @@ UINT8 mc68681_channel::read_rx_fifo()
rx_fifo_num--;
update_interrupts();
-// printf("Rx read %02x\n", rv);
+// printf("Rx read %02x\n", rv);
return rv;
};
@@ -917,7 +917,7 @@ void mc68681_channel::write_chan_reg(int reg, UINT8 data)
CSR = data;
tx_baud_rate = m_uart->calc_baud(m_ch, data & 0xf);
rx_baud_rate = m_uart->calc_baud(m_ch, (data>>4) & 0xf);
-// printf("%s ch %d CSR %02x Tx baud %d Rx baud %d\n", tag(), m_ch, data, tx_baud_rate, rx_baud_rate);
+// printf("%s ch %d CSR %02x Tx baud %d Rx baud %d\n", tag(), m_ch, data, tx_baud_rate, rx_baud_rate);
set_rcv_rate(rx_baud_rate);
set_tra_rate(tx_baud_rate);
break;
@@ -1000,7 +1000,7 @@ void mc68681_channel::recalc_framing()
break;
}
-// printf("%s ch %d MR1 %02x MR2 %02x => %d bits / char, %d stop bits, parity %d\n", tag(), m_ch, MR1, MR2, (MR1 & 3)+5, stopbits, parity);
+// printf("%s ch %d MR1 %02x MR2 %02x => %d bits / char, %d stop bits, parity %d\n", tag(), m_ch, MR1, MR2, (MR1 & 3)+5, stopbits, parity);
set_data_frame(1, (MR1 & 3)+5, parity, stopbits);
}
@@ -1092,7 +1092,7 @@ void mc68681_channel::write_TX(UINT8 data)
printf("Write %02x to TX when TX not ready!\n", data);
}*/
-// printf("%s ch %d Tx %02x\n", tag(), m_ch, data);
+// printf("%s ch %d Tx %02x\n", tag(), m_ch, data);
tx_ready = 0;
SR &= ~STATUS_TRANSMITTER_READY;
diff --git a/src/emu/machine/mc68681.h b/src/emu/machine/mc68681.h
index e56ad90041c..5fa87b31042 100644
--- a/src/emu/machine/mc68681.h
+++ b/src/emu/machine/mc68681.h
@@ -149,7 +149,7 @@ private:
PAIR CTR; /* Counter/Timer Preset Value */
UINT8 IPCR; /* Input Port Control Register */
- bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK
+ bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK
/* state */
UINT8 IP_last_state; /* last state of IP bits */
diff --git a/src/emu/machine/mc68901.c b/src/emu/machine/mc68901.c
index 40e499a8654..80b40357dac 100644
--- a/src/emu/machine/mc68901.c
+++ b/src/emu/machine/mc68901.c
@@ -530,7 +530,7 @@ void mc68901_device::rcv_complete()
receive_register_extract();
m_receive_buffer = get_received_char();
//if (m_receive_pending) TODO: error?
-
+
m_receive_pending = 1;
rx_buffer_full();
}
diff --git a/src/emu/machine/mc68901.h b/src/emu/machine/mc68901.h
index e4b52ed31ed..d3612c6d111 100644
--- a/src/emu/machine/mc68901.h
+++ b/src/emu/machine/mc68901.h
@@ -74,16 +74,16 @@
#define MCFG_MC68901_OUT_TDO_CB(_devcb) \
devcb = &mc68901_device::set_out_tdo_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_MC68901_OUT_SO_CB(_devcb) \
devcb = &mc68901_device::set_out_so_callback(*device, DEVCB2_##_devcb);
/*#define MCFG_MC68901_OUT_RR_CB(_devcb) \
- devcb = &mc68901_device::set_out_rr_callback(*device, DEVCB2_##_devcb);
+ devcb = &mc68901_device::set_out_rr_callback(*device, DEVCB2_##_devcb);
#define MCFG_MC68901_OUT_TR_CB(_devcb) \
- devcb = &mc68901_device::set_out_tr_callback(*device, DEVCB2_##_devcb);*/
-
+ devcb = &mc68901_device::set_out_tr_callback(*device, DEVCB2_##_devcb);*/
+
//**************************************************************************
// TYPE DEFINITIONS
@@ -98,7 +98,7 @@ class mc68901_device : public device_t,
public:
// construction/destruction
mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void set_timer_clock(device_t &device, int timer_clock) { downcast<mc68901_device &>(device).m_timer_clock = timer_clock; }
static void set_rx_clock(device_t &device, int rx_clock) { downcast<mc68901_device &>(device).m_rx_clock = rx_clock; }
static void set_tx_clock(device_t &device, int tx_clock) { downcast<mc68901_device &>(device).m_tx_clock = tx_clock; }
diff --git a/src/emu/machine/mm58167.c b/src/emu/machine/mm58167.c
index 4cfdfe74070..40a93285480 100644
--- a/src/emu/machine/mm58167.c
+++ b/src/emu/machine/mm58167.c
@@ -1,9 +1,9 @@
/**********************************************************************
mm58167.c - National Semiconductor MM58167 real-time clock emulation
-
+
TODO: alarms and IRQs not used by the Apple /// and aren't implemented.
-
+
**********************************************************************/
#include "mm58167.h"
@@ -18,30 +18,30 @@ const device_type MM58167 = &device_creator<mm58167_device>;
// registers (0-7 are the live data, 8-f are the setting for the compare IRQ)
typedef enum
{
- R_CNT_MILLISECONDS = 0, // 0 = milliseconds
- R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds
- R_CNT_SECONDS, // 2 = seconds
- R_CNT_MINUTES, // 3 = minutes
- R_CNT_HOURS, // 4 = hours
- R_CNT_DAYOFWEEK, // 5 = day of the week
- R_CNT_DAYOFMONTH, // 6 = day of the month
- R_CNT_MONTH, // 7 = month
- R_RAM_MILLISECONDS, // 8 = milliseconds
- R_RAM_HUNDTENTHS, // 9 = hundreds and tenths of seconds
- R_RAM_SECONDS, // a = seconds
- R_RAM_MINUTES, // b = minutes
- R_RAM_HOURS, // c = hours
- R_RAM_DAYOFWEEK, // d = day of the week
- R_RAM_DAYOFMONTH, // e = day of the month
- R_RAM_MONTH, // f = month
- R_CTL_IRQSTATUS, // 10 = IRQ status (b7 = compare, b6 = 10th sec, b5 = sec, b4 = min, b3 = hour, b2 = day, b1 = week, b0 = month)
- R_CTL_IRQCONTROL, // 11 = IRQ control (same bit layout as status, but write here to enable/disable/clear)
- R_CTL_RESETCOUNTERS, // 12 = reset counters
- R_CTL_RESETRAM, // 13 = reset RAM
- R_CTL_STATUS, // 14 = status bit
- R_CTL_GOCMD, // 15 = GO Command
- R_CTL_STANDBYIRQ, // 16 = standby IRQ
- R_CTL_TESTMODE // 17 = test mode
+ R_CNT_MILLISECONDS = 0, // 0 = milliseconds
+ R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds
+ R_CNT_SECONDS, // 2 = seconds
+ R_CNT_MINUTES, // 3 = minutes
+ R_CNT_HOURS, // 4 = hours
+ R_CNT_DAYOFWEEK, // 5 = day of the week
+ R_CNT_DAYOFMONTH, // 6 = day of the month
+ R_CNT_MONTH, // 7 = month
+ R_RAM_MILLISECONDS, // 8 = milliseconds
+ R_RAM_HUNDTENTHS, // 9 = hundreds and tenths of seconds
+ R_RAM_SECONDS, // a = seconds
+ R_RAM_MINUTES, // b = minutes
+ R_RAM_HOURS, // c = hours
+ R_RAM_DAYOFWEEK, // d = day of the week
+ R_RAM_DAYOFMONTH, // e = day of the month
+ R_RAM_MONTH, // f = month
+ R_CTL_IRQSTATUS, // 10 = IRQ status (b7 = compare, b6 = 10th sec, b5 = sec, b4 = min, b3 = hour, b2 = day, b1 = week, b0 = month)
+ R_CTL_IRQCONTROL, // 11 = IRQ control (same bit layout as status, but write here to enable/disable/clear)
+ R_CTL_RESETCOUNTERS, // 12 = reset counters
+ R_CTL_RESETRAM, // 13 = reset RAM
+ R_CTL_STATUS, // 14 = status bit
+ R_CTL_GOCMD, // 15 = GO Command
+ R_CTL_STANDBYIRQ, // 16 = standby IRQ
+ R_CTL_TESTMODE // 17 = test mode
} mm58167_regs_t;
//-------------------------------------------------
@@ -81,7 +81,7 @@ void mm58167_device::device_reset()
{
set_current_time(machine());
- m_regs[R_CTL_STATUS] = 0; // not busy
+ m_regs[R_CTL_STATUS] = 0; // not busy
m_milliseconds = 0;
}
@@ -116,23 +116,23 @@ void mm58167_device::device_timer(emu_timer &timer, device_timer_id id, int para
void mm58167_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second)
{
- m_regs[R_CNT_SECONDS] = make_bcd(second); // seconds (BCD)
- m_regs[R_CNT_MINUTES] = make_bcd(minute); // minutes (BCD)
- m_regs[R_CNT_HOURS] = make_bcd(hour); // hour (BCD)
- m_regs[R_CNT_DAYOFWEEK] = make_bcd(day_of_week); // day of the week (BCD)
- m_regs[R_CNT_DAYOFMONTH] = make_bcd(day); // day of the month (BCD)
- m_regs[R_CNT_MONTH] = make_bcd(month); // month (BCD)
+ m_regs[R_CNT_SECONDS] = make_bcd(second); // seconds (BCD)
+ m_regs[R_CNT_MINUTES] = make_bcd(minute); // minutes (BCD)
+ m_regs[R_CNT_HOURS] = make_bcd(hour); // hour (BCD)
+ m_regs[R_CNT_DAYOFWEEK] = make_bcd(day_of_week); // day of the week (BCD)
+ m_regs[R_CNT_DAYOFMONTH] = make_bcd(day); // day of the month (BCD)
+ m_regs[R_CNT_MONTH] = make_bcd(month); // month (BCD)
}
READ8_MEMBER(mm58167_device::read)
{
-// printf("read reg %x = %02x\n", offset, m_regs[offset]);
+// printf("read reg %x = %02x\n", offset, m_regs[offset]);
return m_regs[offset];
}
WRITE8_MEMBER(mm58167_device::write)
{
-// printf("%02x to reg %x\n", data, offset);
+// printf("%02x to reg %x\n", data, offset);
if ((offset >= R_RAM_MILLISECONDS) && (offset != R_CTL_IRQSTATUS))
{
@@ -149,7 +149,7 @@ WRITE8_MEMBER(mm58167_device::write)
case R_CTL_RESETRAM:
if (data == 0xff)
{
- for (int i = R_RAM_MILLISECONDS; i < R_CTL_IRQSTATUS; i++)
+ for (int i = R_RAM_MILLISECONDS; i < R_CTL_IRQSTATUS; i++)
{
m_regs[i] = 0;
}
@@ -159,9 +159,8 @@ WRITE8_MEMBER(mm58167_device::write)
case R_CTL_IRQCONTROL:
if (data != 0)
{
- logerror("MM58167: IRQs not implemented\n");
+ logerror("MM58167: IRQs not implemented\n");
}
break;
}
}
-
diff --git a/src/emu/machine/mm58167.h b/src/emu/machine/mm58167.h
index 5605afb680d..830209bffa0 100644
--- a/src/emu/machine/mm58167.h
+++ b/src/emu/machine/mm58167.h
@@ -1,9 +1,9 @@
/**********************************************************************
mm58167.h - National Semiconductor MM58167 real-time clock emulation
-
- license: MAME, BSD-3-Clause, LGPL v2
- copyright-holders: R. Belmont
+
+ license: MAME, BSD-3-Clause, LGPL v2
+ copyright-holders: R. Belmont
**********************************************************************/
diff --git a/src/emu/machine/mm74c922.h b/src/emu/machine/mm74c922.h
index 477738e0dd6..d30f5ac9314 100644
--- a/src/emu/machine/mm74c922.h
+++ b/src/emu/machine/mm74c922.h
@@ -106,12 +106,12 @@ private:
void clock_scan_counters();
void detect_keypress();
- devcb2_write_line m_write_da;
- devcb2_read8 m_read_x1;
- devcb2_read8 m_read_x2;
- devcb2_read8 m_read_x3;
- devcb2_read8 m_read_x4;
- devcb2_read8 m_read_x5;
+ devcb2_write_line m_write_da;
+ devcb2_read8 m_read_x1;
+ devcb2_read8 m_read_x2;
+ devcb2_read8 m_read_x3;
+ devcb2_read8 m_read_x4;
+ devcb2_read8 m_read_x5;
double m_cap_osc;
double m_cap_debounce;
diff --git a/src/emu/machine/mos6530.h b/src/emu/machine/mos6530.h
index 6f05a1e29ec..24477172bc2 100644
--- a/src/emu/machine/mos6530.h
+++ b/src/emu/machine/mos6530.h
@@ -70,20 +70,20 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
-
+
UINT8 porta_in_get();
UINT8 portb_in_get();
UINT8 porta_out_get();
UINT8 portb_out_get();
-
+
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
+
private:
// internal state
@@ -99,13 +99,13 @@ private:
emu_timer * m_timer;
UINT32 m_clock;
-
- void update_irqstate();
+
+ void update_irqstate();
UINT8 get_timer();
-
+
void porta_in_set(UINT8 data, UINT8 mask);
void portb_in_set(UINT8 data, UINT8 mask);
-
+
enum
{
TIMER_END_CALLBACK
diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c
index a103b6072e2..9c777bcf6e8 100644
--- a/src/emu/machine/mos6551.c
+++ b/src/emu/machine/mos6551.c
@@ -577,7 +577,7 @@ WRITE_LINE_MEMBER(mos6551_device::receiver_clock)
m_rx_counter = 0;
if (LOG) logerror("MOS6551 '%s': RX STOP BIT\n", tag());
-
+
if (!(m_status & SR_RDRF))
{
if (!m_rxd)
diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h
index 7f3adec9cf4..4a3deb6639c 100644
--- a/src/emu/machine/msm6242.h
+++ b/src/emu/machine/msm6242.h
@@ -27,8 +27,8 @@ class msm6242_device : public device_t,
public:
// construction/destruction
msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
-
+
+
template<class _Object> static devcb2_base &set_out_int_handler(device_t &device, _Object object) { return downcast<msm6242_device &>(device).m_out_int_handler.set_callback(object); }
// I/O operations
diff --git a/src/emu/machine/ncr5380.h b/src/emu/machine/ncr5380.h
index 3c649fe11b3..b2d1e8e8f44 100644
--- a/src/emu/machine/ncr5380.h
+++ b/src/emu/machine/ncr5380.h
@@ -40,7 +40,7 @@ class ncr5380_device : public device_t
public:
// construction/destruction
ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<ncr5380_device &>(device).m_irq_cb.set_callback(object); }
// our API
diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c
index 3526753df08..52f6769ebba 100644
--- a/src/emu/machine/netlist.c
+++ b/src/emu/machine/netlist.c
@@ -73,9 +73,9 @@ const device_type NETLIST_STREAM_OUTPUT = &device_creator<netlist_mame_stream_ou
void netlist_mame_sub_interface::static_set_mult_offset(device_t &device, const double mult, const double offset)
{
- netlist_mame_sub_interface &netlist = dynamic_cast<netlist_mame_sub_interface &>(device);
- netlist.m_mult = mult;
- netlist.m_offset = offset;
+ netlist_mame_sub_interface &netlist = dynamic_cast<netlist_mame_sub_interface &>(device);
+ netlist.m_mult = mult;
+ netlist.m_offset = offset;
}
@@ -105,8 +105,8 @@ void netlist_mame_analog_input_t::device_start()
}
if (m_mult != 1.0 || m_offset != 0.0)
{
- // disable automatic scaling for ioports
- m_auto_port = false;
+ // disable automatic scaling for ioports
+ m_auto_port = false;
}
}
@@ -116,34 +116,34 @@ void netlist_mame_analog_input_t::device_start()
// ----------------------------------------------------------------------------------------
netlist_mame_analog_output_t::netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog output", tag, owner, clock, "netlist_analog_output", __FILE__),
- netlist_mame_sub_interface(*owner),
- m_in("")
+ : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog output", tag, owner, clock, "netlist_analog_output", __FILE__),
+ netlist_mame_sub_interface(*owner),
+ m_in("")
{
}
void netlist_mame_analog_output_t::static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate)
{
- netlist_mame_analog_output_t &netlist = downcast<netlist_mame_analog_output_t &>(device);
- netlist.m_in = in_name;
- netlist.m_delegate = adelegate;
+ netlist_mame_analog_output_t &netlist = downcast<netlist_mame_analog_output_t &>(device);
+ netlist.m_in = in_name;
+ netlist.m_delegate = adelegate;
}
void netlist_mame_analog_output_t::custom_netlist_additions(netlist_setup_t &setup)
{
- pstring dname = "OUT_" + m_in;
- m_delegate.bind_relative_to(owner()->machine().root_device());
- NETLIB_NAME(analog_callback) *dev = downcast<NETLIB_NAME(analog_callback) *>(
- setup.factory().new_device_by_classname("nld_analog_callback", setup));
+ pstring dname = "OUT_" + m_in;
+ m_delegate.bind_relative_to(owner()->machine().root_device());
+ NETLIB_NAME(analog_callback) *dev = downcast<NETLIB_NAME(analog_callback) *>(
+ setup.factory().new_device_by_classname("nld_analog_callback", setup));
- setup.register_dev(dev, dname);
- dev->register_callback(m_delegate);
- setup.register_link(dname + ".IN", m_in);
+ setup.register_dev(dev, dname);
+ dev->register_callback(m_delegate);
+ setup.register_link(dname + ".IN", m_in);
}
void netlist_mame_analog_output_t::device_start()
{
- LOG_DEV_CALLS(("start %s\n", tag()));
+ LOG_DEV_CALLS(("start %s\n", tag()));
}
@@ -185,40 +185,40 @@ void netlist_mame_logic_input_t::device_start()
// ----------------------------------------------------------------------------------------
netlist_mame_stream_input_t::netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__),
- netlist_mame_sub_interface(*owner),
- m_channel(0),
- m_param_name("")
+ : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__),
+ netlist_mame_sub_interface(*owner),
+ m_channel(0),
+ m_param_name("")
{
}
void netlist_mame_stream_input_t::static_set_params(device_t &device, int channel, const char *param_name)
{
- netlist_mame_stream_input_t &netlist = downcast<netlist_mame_stream_input_t &>(device);
- netlist.m_param_name = param_name;
- netlist.m_channel = channel;
+ netlist_mame_stream_input_t &netlist = downcast<netlist_mame_stream_input_t &>(device);
+ netlist.m_param_name = param_name;
+ netlist.m_channel = channel;
}
void netlist_mame_stream_input_t::device_start()
{
- LOG_DEV_CALLS(("start %s\n", tag()));
+ LOG_DEV_CALLS(("start %s\n", tag()));
}
void netlist_mame_stream_input_t::custom_netlist_additions(netlist_setup_t &setup)
{
- NETLIB_NAME(sound_in) *snd_in = setup.netlist().get_first_device<NETLIB_NAME(sound_in)>();
- if (snd_in == NULL)
- {
- snd_in = dynamic_cast<NETLIB_NAME(sound_in) *>(setup.factory().new_device_by_classname("nld_sound_in", setup));
- setup.register_dev(snd_in, "STREAM_INPUT");
- }
+ NETLIB_NAME(sound_in) *snd_in = setup.netlist().get_first_device<NETLIB_NAME(sound_in)>();
+ if (snd_in == NULL)
+ {
+ snd_in = dynamic_cast<NETLIB_NAME(sound_in) *>(setup.factory().new_device_by_classname("nld_sound_in", setup));
+ setup.register_dev(snd_in, "STREAM_INPUT");
+ }
- pstring sparam = pstring::sprintf("STREAM_INPUT.CHAN%d", m_channel);
- setup.register_param(sparam, m_param_name);
- sparam = pstring::sprintf("STREAM_INPUT.MULT%d", m_channel);
- setup.register_param(sparam, m_mult);
- sparam = pstring::sprintf("STREAM_INPUT.OFFSET%d", m_channel);
- setup.register_param(sparam, m_offset);
+ pstring sparam = pstring::sprintf("STREAM_INPUT.CHAN%d", m_channel);
+ setup.register_param(sparam, m_param_name);
+ sparam = pstring::sprintf("STREAM_INPUT.MULT%d", m_channel);
+ setup.register_param(sparam, m_mult);
+ sparam = pstring::sprintf("STREAM_INPUT.OFFSET%d", m_channel);
+ setup.register_param(sparam, m_offset);
}
// ----------------------------------------------------------------------------------------
@@ -226,37 +226,37 @@ void netlist_mame_stream_input_t::custom_netlist_additions(netlist_setup_t &setu
// ----------------------------------------------------------------------------------------
netlist_mame_stream_output_t::netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__),
- netlist_mame_sub_interface(*owner),
- m_channel(0),
- m_out_name("")
+ : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__),
+ netlist_mame_sub_interface(*owner),
+ m_channel(0),
+ m_out_name("")
{
}
void netlist_mame_stream_output_t::static_set_params(device_t &device, int channel, const char *out_name)
{
- netlist_mame_stream_output_t &netlist = downcast<netlist_mame_stream_output_t &>(device);
- netlist.m_out_name = out_name;
- netlist.m_channel = channel;
+ netlist_mame_stream_output_t &netlist = downcast<netlist_mame_stream_output_t &>(device);
+ netlist.m_out_name = out_name;
+ netlist.m_channel = channel;
}
void netlist_mame_stream_output_t::device_start()
{
- LOG_DEV_CALLS(("start %s\n", tag()));
+ LOG_DEV_CALLS(("start %s\n", tag()));
}
void netlist_mame_stream_output_t::custom_netlist_additions(netlist_setup_t &setup)
{
- NETLIB_NAME(sound_out) *snd_out;
- pstring sname = pstring::sprintf("STREAM_OUT_%d", m_channel);
+ NETLIB_NAME(sound_out) *snd_out;
+ pstring sname = pstring::sprintf("STREAM_OUT_%d", m_channel);
- snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.factory().new_device_by_classname("nld_sound_out", setup));
- setup.register_dev(snd_out, sname);
+ snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.factory().new_device_by_classname("nld_sound_out", setup));
+ setup.register_dev(snd_out, sname);
- setup.register_param(sname + ".CHAN" , m_channel);
- setup.register_param(sname + ".MULT", m_mult);
- setup.register_param(sname + ".OFFSET", m_offset);
- setup.register_link(sname + ".IN", m_out_name);
+ setup.register_param(sname + ".CHAN" , m_channel);
+ setup.register_param(sname + ".MULT", m_mult);
+ setup.register_param(sname + ".OFFSET", m_offset);
+ setup.register_link(sname + ".IN", m_out_name);
}
@@ -266,21 +266,21 @@ void netlist_mame_stream_output_t::custom_netlist_additions(netlist_setup_t &set
void netlist_mame_t::verror(const loglevel_e level, const char *format, va_list ap) const
{
- pstring errstr = pstring(format).vprintf(ap);
+ pstring errstr = pstring(format).vprintf(ap);
- switch (level)
- {
- case NL_WARNING:
- logerror("netlist WARNING: %s\n", errstr.cstr());
- break;
- case NL_LOG:
- logerror("netlist LOG: %s\n", errstr.cstr());
- break;
- case NL_ERROR:
- emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr());
- throw error;
- break;
- }
+ switch (level)
+ {
+ case NL_WARNING:
+ logerror("netlist WARNING: %s\n", errstr.cstr());
+ break;
+ case NL_LOG:
+ logerror("netlist LOG: %s\n", errstr.cstr());
+ break;
+ case NL_ERROR:
+ emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr());
+ throw error;
+ break;
+ }
}
// ----------------------------------------------------------------------------------------
@@ -293,25 +293,25 @@ ADDRESS_MAP_END
netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NETLIST_CORE, "Netlist core device", tag, owner, clock, "netlist_core", __FILE__),
- m_icount(0),
- m_div(0),
- m_rem(0),
- m_old(netlist_time::zero),
- m_netlist(NULL),
- m_setup(NULL),
- m_setup_func(NULL)
+ m_icount(0),
+ m_div(0),
+ m_rem(0),
+ m_old(netlist_time::zero),
+ m_netlist(NULL),
+ m_setup(NULL),
+ m_setup_func(NULL)
{
}
netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *file)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, file),
- m_icount(0),
- m_div(0),
- m_rem(0),
- m_old(netlist_time::zero),
- m_netlist(NULL),
- m_setup(NULL),
- m_setup_func(NULL)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, file),
+ m_icount(0),
+ m_div(0),
+ m_rem(0),
+ m_old(netlist_time::zero),
+ m_netlist(NULL),
+ m_setup(NULL),
+ m_setup_func(NULL)
{
}
@@ -358,32 +358,32 @@ void netlist_mame_device_t::device_start()
m_setup->start_devices();
m_setup->resolve_inputs();
- netlist().save(NAME(m_rem));
- netlist().save(NAME(m_div));
- netlist().save(NAME(m_old));
+ netlist().save(NAME(m_rem));
+ netlist().save(NAME(m_div));
+ netlist().save(NAME(m_old));
save_state();
- m_old = netlist_time::zero;
- m_rem = 0;
+ m_old = netlist_time::zero;
+ m_rem = 0;
}
void netlist_mame_device_t::device_clock_changed()
{
- //printf("device_clock_changed\n");
- m_div = netlist_time::from_hz(clock()).as_raw();
- //m_rem = 0;
- NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div));
- //printf("Setting clock %d and divisor %d\n", clock(), m_div);
+ //printf("device_clock_changed\n");
+ m_div = netlist_time::from_hz(clock()).as_raw();
+ //m_rem = 0;
+ NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div));
+ //printf("Setting clock %d and divisor %d\n", clock(), m_div);
}
void netlist_mame_device_t::device_reset()
{
LOG_DEV_CALLS(("device_reset\n"));
- m_old = netlist_time::zero;
- m_rem = 0;
+ m_old = netlist_time::zero;
+ m_rem = 0;
netlist().do_reset();
}
@@ -419,15 +419,15 @@ void netlist_mame_device_t::device_timer(emu_timer &timer, device_timer_id id, i
ATTR_HOT ATTR_ALIGN void netlist_mame_device_t::update_time_x()
{
- const netlist_time delta = netlist().time() - m_old + netlist_time::from_raw(m_rem);
- m_old = netlist().time();
- m_icount -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem);
+ const netlist_time delta = netlist().time() - m_old + netlist_time::from_raw(m_rem);
+ m_old = netlist().time();
+ m_icount -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem);
}
ATTR_HOT ATTR_ALIGN void netlist_mame_device_t::check_mame_abort_slice()
{
- if (m_icount <= 0)
- netlist().abort_current_queue_slice();
+ if (m_icount <= 0)
+ netlist().abort_current_queue_slice();
}
ATTR_COLD void netlist_mame_device_t::save_state()
@@ -444,9 +444,9 @@ ATTR_COLD void netlist_mame_device_t::save_state()
case DT_INT64:
save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count);
break;
- case DT_INT16:
- save_pointer((INT16 *) s->m_ptr, s->m_name, s->m_count);
- break;
+ case DT_INT16:
+ save_pointer((INT16 *) s->m_ptr, s->m_name, s->m_count);
+ break;
case DT_INT8:
save_pointer((INT8 *) s->m_ptr, s->m_name, s->m_count);
break;
@@ -457,7 +457,7 @@ ATTR_COLD void netlist_mame_device_t::save_state()
save_pointer((bool *) s->m_ptr, s->m_name, s->m_count);
break;
case DT_CUSTOM:
- break;
+ break;
case NOT_SUPPORTED:
default:
netlist().error("found unsupported save element %s\n", s->m_name.cstr());
@@ -472,47 +472,47 @@ ATTR_COLD void netlist_mame_device_t::save_state()
// ----------------------------------------------------------------------------------------
netlist_mame_cpu_device_t::netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist cpu device", tag, owner, clock, "netlist_cpu", __FILE__),
- device_execute_interface(mconfig, *this),
- device_state_interface(mconfig, *this),
- device_disasm_interface(mconfig, *this),
- device_memory_interface(mconfig, *this),
- m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, ADDRESS_MAP_NAME(program_dummy))
+ : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist cpu device", tag, owner, clock, "netlist_cpu", __FILE__),
+ device_execute_interface(mconfig, *this),
+ device_state_interface(mconfig, *this),
+ device_disasm_interface(mconfig, *this),
+ device_memory_interface(mconfig, *this),
+ m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, ADDRESS_MAP_NAME(program_dummy))
{
}
void netlist_mame_cpu_device_t::device_start()
{
- netlist_mame_device_t::device_start();
+ netlist_mame_device_t::device_start();
- LOG_DEV_CALLS(("device_start %s\n", tag()));
+ LOG_DEV_CALLS(("device_start %s\n", tag()));
- // State support
+ // State support
- state_add(STATE_GENPC, "curpc", m_genPC).noshow();
+ state_add(STATE_GENPC, "curpc", m_genPC).noshow();
- for (int i=0; i < netlist().m_nets.count(); i++)
- {
- netlist_net_t *n = netlist().m_nets[i];
- if (n->isFamily(netlist_object_t::LOGIC))
- {
- state_add(i*2, n->name(), n->Q_state_ptr());
- }
- else
- {
- state_add(i*2+1, n->name(), n->Q_Analog_state_ptr()).formatstr("%20s");
- }
- }
+ for (int i=0; i < netlist().m_nets.count(); i++)
+ {
+ netlist_net_t *n = netlist().m_nets[i];
+ if (n->isFamily(netlist_object_t::LOGIC))
+ {
+ state_add(i*2, n->name(), n->Q_state_ptr());
+ }
+ else
+ {
+ state_add(i*2+1, n->name(), n->Q_Analog_state_ptr()).formatstr("%20s");
+ }
+ }
- // set our instruction counter
- m_icountptr = &m_icount;
+ // set our instruction counter
+ m_icountptr = &m_icount;
}
void netlist_mame_cpu_device_t::nl_register_devices()
{
- setup().factory().register_device<nld_analog_callback>( "NETDEV_CALLBACK", "nld_analog_callback", "-");
+ setup().factory().register_device<nld_analog_callback>( "NETDEV_CALLBACK", "nld_analog_callback", "-");
}
ATTR_COLD UINT64 netlist_mame_cpu_device_t::execute_clocks_to_cycles(UINT64 clocks) const
@@ -559,13 +559,13 @@ ATTR_HOT void netlist_mame_cpu_device_t::execute_run()
m_genPC &= 255;
debugger_instruction_hook(this, m_genPC);
netlist().process_queue(netlist_time::from_raw(m_div));
- update_time_x();
+ update_time_x();
}
}
else
{
- netlist().process_queue(netlist_time::from_raw(m_div) * m_icount);
- update_time_x();
+ netlist().process_queue(netlist_time::from_raw(m_div) * m_icount);
+ update_time_x();
}
}
@@ -574,93 +574,92 @@ ATTR_HOT void netlist_mame_cpu_device_t::execute_run()
// ----------------------------------------------------------------------------------------
netlist_mame_sound_device_t::netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist sound device", tag, owner, clock, "netlist_sound", __FILE__),
- device_sound_interface(mconfig, *this)
+ : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist sound device", tag, owner, clock, "netlist_sound", __FILE__),
+ device_sound_interface(mconfig, *this)
{
}
void netlist_mame_sound_device_t::device_start()
{
- netlist_mame_device_t::device_start();
+ netlist_mame_device_t::device_start();
- LOG_DEV_CALLS(("device_start %s\n", tag()));
+ LOG_DEV_CALLS(("device_start %s\n", tag()));
- // Configure outputs
+ // Configure outputs
- netlist_list_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>();
- if (outdevs.count() == 0)
- fatalerror("No output devices");
+ netlist_list_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>();
+ if (outdevs.count() == 0)
+ fatalerror("No output devices");
- m_num_outputs = outdevs.count();
+ m_num_outputs = outdevs.count();
- /* resort channels */
- for (int i=0; i < MAX_OUT; i++) m_out[i] = NULL;
- for (int i=0; i < m_num_outputs; i++)
- {
- int chan = outdevs[i]->m_channel.Value();
+ /* resort channels */
+ for (int i=0; i < MAX_OUT; i++) m_out[i] = NULL;
+ for (int i=0; i < m_num_outputs; i++)
+ {
+ int chan = outdevs[i]->m_channel.Value();
- netlist().log("Output %d on channel %d", i, chan);
+ netlist().log("Output %d on channel %d", i, chan);
- if (chan < 0 || chan >= MAX_OUT || chan >= outdevs.count())
- fatalerror("illegal channel number");
- m_out[chan] = outdevs[i];
- m_out[chan]->m_sample = netlist_time::from_hz(clock());
- m_out[chan]->m_buffer = NULL;
- }
+ if (chan < 0 || chan >= MAX_OUT || chan >= outdevs.count())
+ fatalerror("illegal channel number");
+ m_out[chan] = outdevs[i];
+ m_out[chan]->m_sample = netlist_time::from_hz(clock());
+ m_out[chan]->m_buffer = NULL;
+ }
- // Configure inputs
+ // Configure inputs
- m_num_inputs = 0;
- m_in = NULL;
+ m_num_inputs = 0;
+ m_in = NULL;
- netlist_list_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
- if (indevs.count() > 1)
- fatalerror("A maximum of one input device is allowed!");
- if (indevs.count() == 1)
- {
- m_in = indevs[0];
- m_num_inputs = m_in->resolve();
- m_in->m_inc = netlist_time::from_hz(clock());
- }
+ netlist_list_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
+ if (indevs.count() > 1)
+ fatalerror("A maximum of one input device is allowed!");
+ if (indevs.count() == 1)
+ {
+ m_in = indevs[0];
+ m_num_inputs = m_in->resolve();
+ m_in->m_inc = netlist_time::from_hz(clock());
+ }
- /* initialize the stream(s) */
- m_stream = machine().sound().stream_alloc(*this, m_num_inputs, m_num_outputs, clock());
+ /* initialize the stream(s) */
+ m_stream = machine().sound().stream_alloc(*this, m_num_inputs, m_num_outputs, clock());
}
void netlist_mame_sound_device_t::nl_register_devices()
{
- setup().factory().register_device<nld_sound_out>("NETDEV_SOUND_OUT", "nld_sound_out", "+CHAN");
- setup().factory().register_device<nld_sound_in>("NETDEV_SOUND_IN", "nld_sound_in", "-");
+ setup().factory().register_device<nld_sound_out>("NETDEV_SOUND_OUT", "nld_sound_out", "+CHAN");
+ setup().factory().register_device<nld_sound_in>("NETDEV_SOUND_IN", "nld_sound_in", "-");
}
void netlist_mame_sound_device_t::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
- for (int i=0; i < m_num_outputs; i++)
- {
- m_out[i]->m_buffer = outputs[i];
- }
+ for (int i=0; i < m_num_outputs; i++)
+ {
+ m_out[i]->m_buffer = outputs[i];
+ }
- if (m_num_inputs)
- m_in->buffer_reset();
+ if (m_num_inputs)
+ m_in->buffer_reset();
- for (int i=0; i < m_num_inputs; i++)
- {
- m_in->m_buffer[i] = inputs[i];
- }
+ for (int i=0; i < m_num_inputs; i++)
+ {
+ m_in->m_buffer[i] = inputs[i];
+ }
- netlist_time cur = netlist().time();
+ netlist_time cur = netlist().time();
- netlist().process_queue(netlist_time::from_raw(m_div) * samples);
+ netlist().process_queue(netlist_time::from_raw(m_div) * samples);
- cur += (netlist_time::from_raw(m_div) * samples);
+ cur += (netlist_time::from_raw(m_div) * samples);
- for (int i=0; i < m_num_outputs; i++)
- {
- m_out[i]->sound_update(cur);
- m_out[i]->buffer_reset(cur);
- }
+ for (int i=0; i < m_num_outputs; i++)
+ {
+ m_out[i]->sound_update(cur);
+ m_out[i]->buffer_reset(cur);
+ }
}
-
diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h
index 957fbd55c38..181d37e3873 100644
--- a/src/emu/machine/netlist.h
+++ b/src/emu/machine/netlist.h
@@ -68,29 +68,29 @@
netlist_mame_analog_input_t::static_set_mult_offset(*device, _mult, _offset);
#define MCFG_NETLIST_ANALOG_OUTPUT(_basetag, _tag, _IN, _class, _member, _class_tag) \
- MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \
- netlist_mame_analog_output_t::static_set_params(*device, _IN, \
- netlist_analog_output_delegate(& _class :: _member, \
- # _class "::" # _member, _class_tag, (_class *) 0) );
+ MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \
+ netlist_mame_analog_output_t::static_set_params(*device, _IN, \
+ netlist_analog_output_delegate(& _class :: _member, \
+ # _class "::" # _member, _class_tag, (_class *) 0) );
#define MCFG_NETLIST_LOGIC_INPUT(_basetag, _tag, _name, _shift, _mask) \
MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_LOGIC_INPUT, 0) \
netlist_mame_logic_input_t::static_set_params(*device, _name, _mask, _shift);
#define MCFG_NETLIST_STREAM_INPUT(_basetag, _chan, _name) \
- MCFG_DEVICE_ADD(_basetag ":cin" # _chan, NETLIST_STREAM_INPUT, 0) \
- netlist_mame_stream_input_t::static_set_params(*device, _chan, _name);
+ MCFG_DEVICE_ADD(_basetag ":cin" # _chan, NETLIST_STREAM_INPUT, 0) \
+ netlist_mame_stream_input_t::static_set_params(*device, _chan, _name);
#define MCFG_NETLIST_STREAM_OUTPUT(_basetag, _chan, _name) \
- MCFG_DEVICE_ADD(_basetag ":cout" # _chan, NETLIST_STREAM_OUTPUT, 0) \
- netlist_mame_stream_output_t::static_set_params(*device, _chan, _name);
+ MCFG_DEVICE_ADD(_basetag ":cout" # _chan, NETLIST_STREAM_OUTPUT, 0) \
+ netlist_mame_stream_output_t::static_set_params(*device, _chan, _name);
#define NETLIST_LOGIC_PORT_CHANGED(_base, _tag) \
PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_logic_input_t, input_changed, 0)
#define NETLIST_ANALOG_PORT_CHANGED(_base, _tag) \
- PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_analog_input_t, input_changed, 0)
+ PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_analog_input_t, input_changed, 0)
// ----------------------------------------------------------------------------------------
@@ -101,7 +101,7 @@
setup.parse((char *)downcast<netlist_mame_t &>(setup.netlist()).machine().root_device().memregion(_name)->base());
#define NETDEV_ANALOG_CALLBACK_MEMBER(_name) \
- void _name(const double data, const attotime &time)
+ void _name(const double data, const attotime &time)
#if 0
@@ -116,12 +116,12 @@
#if 0
#define NETDEV_SOUND_OUT(_name, _v, _m) \
- NET_REGISTER_DEV(sound_out, _name) \
- PARAM(_name.CHAN, _v) \
- PARAM(_name.MULT, _m)
+ NET_REGISTER_DEV(sound_out, _name) \
+ PARAM(_name.CHAN, _v) \
+ PARAM(_name.MULT, _m)
#define NETDEV_SOUND_IN(_name) \
- NET_REGISTER_DEV(sound_in, _name)
+ NET_REGISTER_DEV(sound_in, _name)
#endif
class netlist_mame_device_t;
@@ -166,18 +166,18 @@ public:
ATTR_HOT inline netlist_setup_t &setup() { return *m_setup; }
ATTR_HOT inline netlist_mame_t &netlist() { return *m_netlist; }
- ATTR_HOT inline netlist_time last_time_update() { return m_old; }
+ ATTR_HOT inline netlist_time last_time_update() { return m_old; }
ATTR_HOT void update_time_x();
ATTR_HOT void check_mame_abort_slice();
- int m_icount;
+ int m_icount;
protected:
- // Custom to netlist ...
+ // Custom to netlist ...
- virtual void nl_register_devices() { };
+ virtual void nl_register_devices() { };
- // device_t overrides
+ // device_t overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_stop();
@@ -185,20 +185,20 @@ protected:
virtual void device_post_load();
virtual void device_pre_save();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
- //virtual void device_debug_setup();
- virtual void device_clock_changed();
+ //virtual void device_debug_setup();
+ virtual void device_clock_changed();
- UINT32 m_div;
+ UINT32 m_div;
private:
- void save_state();
+ void save_state();
- /* timing support here - so sound can hijack it ... */
- UINT32 m_rem;
- netlist_time m_old;
+ /* timing support here - so sound can hijack it ... */
+ UINT32 m_rem;
+ netlist_time m_old;
netlist_mame_t * m_netlist;
- netlist_setup_t * m_setup;
+ netlist_setup_t * m_setup;
void (*m_setup_func)(netlist_setup_t &);
};
@@ -213,75 +213,75 @@ inline running_machine &netlist_mame_t::machine()
// ----------------------------------------------------------------------------------------
class netlist_mame_cpu_device_t : public netlist_mame_device_t,
- public device_execute_interface,
- public device_state_interface,
- public device_disasm_interface,
- public device_memory_interface
+ public device_execute_interface,
+ public device_state_interface,
+ public device_disasm_interface,
+ public device_memory_interface
{
public:
- // construction/destruction
- netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~netlist_mame_cpu_device_t() {}
+ // construction/destruction
+ netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~netlist_mame_cpu_device_t() {}
- static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &));
+ static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &));
protected:
- // netlist_mame_device_t
- virtual void nl_register_devices();
-
- // device_t overrides
-
- //virtual void device_config_complete();
- virtual void device_start();
- //virtual void device_stop();
- //virtual void device_reset();
- //virtual void device_post_load();
- //virtual void device_pre_save();
- //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
- // device_execute_interface overrides
-
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const;
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const;
-
- ATTR_HOT virtual void execute_run();
-
- // device_disasm_interface overrides
- ATTR_COLD virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
- ATTR_COLD virtual UINT32 disasm_max_opcode_bytes() const { return 1; }
- ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
-
- // device_memory_interface overrides
-
- address_space_config m_program_config;
-
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return NULL;
- default: return NULL;
- }
- }
-
- // device_state_interface overrides
-
- virtual void state_string_export(const device_state_entry &entry, astring &string)
- {
- if (entry.index() >= 0)
- {
- if (entry.index() & 1)
- string.format("%10.6f", *((double *) entry.dataptr()));
- else
- string.format("%d", *((netlist_sig_t *) entry.dataptr()));
- }
- }
+ // netlist_mame_device_t
+ virtual void nl_register_devices();
+
+ // device_t overrides
+
+ //virtual void device_config_complete();
+ virtual void device_start();
+ //virtual void device_stop();
+ //virtual void device_reset();
+ //virtual void device_post_load();
+ //virtual void device_pre_save();
+ //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+
+ // device_execute_interface overrides
+
+ virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const;
+ virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const;
+
+ ATTR_HOT virtual void execute_run();
+
+ // device_disasm_interface overrides
+ ATTR_COLD virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
+ ATTR_COLD virtual UINT32 disasm_max_opcode_bytes() const { return 1; }
+ ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
+
+ // device_memory_interface overrides
+
+ address_space_config m_program_config;
+
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
+ {
+ switch (spacenum)
+ {
+ case AS_PROGRAM: return &m_program_config;
+ case AS_IO: return NULL;
+ default: return NULL;
+ }
+ }
+
+ // device_state_interface overrides
+
+ virtual void state_string_export(const device_state_entry &entry, astring &string)
+ {
+ if (entry.index() >= 0)
+ {
+ if (entry.index() & 1)
+ string.format("%10.6f", *((double *) entry.dataptr()));
+ else
+ string.format("%d", *((netlist_sig_t *) entry.dataptr()));
+ }
+ }
private:
- int m_genPC;
+ int m_genPC;
};
@@ -293,45 +293,45 @@ class nld_sound_in;
// ----------------------------------------------------------------------------------------
class netlist_mame_sound_device_t : public netlist_mame_device_t,
- public device_sound_interface
+ public device_sound_interface
{
public:
- // construction/destruction
- netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~netlist_mame_sound_device_t() {}
+ // construction/destruction
+ netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~netlist_mame_sound_device_t() {}
- static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &));
+ static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &));
- inline sound_stream *get_stream() { return m_stream; }
+ inline sound_stream *get_stream() { return m_stream; }
- // device_sound_interface overrides
+ // device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
protected:
- // netlist_mame_device_t
- virtual void nl_register_devices();
+ // netlist_mame_device_t
+ virtual void nl_register_devices();
- // device_t overrides
+ // device_t overrides
- //virtual void device_config_complete();
- virtual void device_start();
- //virtual void device_stop();
- //virtual void device_reset();
- //virtual void device_post_load();
- //virtual void device_pre_save();
- //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ //virtual void device_config_complete();
+ virtual void device_start();
+ //virtual void device_stop();
+ //virtual void device_reset();
+ //virtual void device_post_load();
+ //virtual void device_pre_save();
+ //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- static const int MAX_OUT = 10;
- nld_sound_out *m_out[MAX_OUT];
- nld_sound_in *m_in;
- sound_stream *m_stream;
- int m_num_inputs;
- int m_num_outputs;
+ static const int MAX_OUT = 10;
+ nld_sound_out *m_out[MAX_OUT];
+ nld_sound_in *m_in;
+ sound_stream *m_stream;
+ int m_num_inputs;
+ int m_num_outputs;
};
@@ -344,11 +344,11 @@ class netlist_mame_sub_interface
public:
// construction/destruction
netlist_mame_sub_interface(device_t &aowner)
- : m_offset(0.0), m_mult(1.0)
- {
- m_owner = dynamic_cast<netlist_mame_device_t *>(&aowner);
- m_sound = dynamic_cast<netlist_mame_sound_device_t *>(&aowner);
- }
+ : m_offset(0.0), m_mult(1.0)
+ {
+ m_owner = dynamic_cast<netlist_mame_device_t *>(&aowner);
+ m_sound = dynamic_cast<netlist_mame_sound_device_t *>(&aowner);
+ }
virtual ~netlist_mame_sub_interface() { }
virtual void custom_netlist_additions(netlist_setup_t &setup) { }
@@ -359,14 +359,14 @@ public:
inline void update_to_current_time()
{
- m_sound->get_stream()->update();
+ m_sound->get_stream()->update();
}
- static void static_set_mult_offset(device_t &device, const double mult, const double offset);
+ static void static_set_mult_offset(device_t &device, const double mult, const double offset);
protected:
- double m_offset;
- double m_mult;
+ double m_offset;
+ double m_mult;
private:
netlist_mame_device_t *m_owner;
@@ -390,16 +390,16 @@ public:
inline void write(const double val)
{
- if (is_sound_device())
- {
- update_to_current_time();
- m_param->setTo(val * m_mult + m_offset);
- }
- else
- {
- // FIXME: use device timer ....
- m_param->setTo(val * m_mult + m_offset);
- }
+ if (is_sound_device())
+ {
+ update_to_current_time();
+ m_param->setTo(val * m_mult + m_offset);
+ }
+ else
+ {
+ // FIXME: use device timer ....
+ m_param->setTo(val * m_mult + m_offset);
+ }
}
inline DECLARE_INPUT_CHANGED_MEMBER(input_changed)
@@ -432,24 +432,24 @@ private:
typedef device_delegate<void (const double, const attotime &)> netlist_analog_output_delegate;
class netlist_mame_analog_output_t : public device_t,
- public netlist_mame_sub_interface
+ public netlist_mame_sub_interface
{
public:
- // construction/destruction
- netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~netlist_mame_analog_output_t() { }
+ // construction/destruction
+ netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~netlist_mame_analog_output_t() { }
- static void static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate);
+ static void static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate);
protected:
- // device-level overrides
- virtual void device_start();
- virtual void custom_netlist_additions(netlist_setup_t &setup);
+ // device-level overrides
+ virtual void device_start();
+ virtual void custom_netlist_additions(netlist_setup_t &setup);
private:
- pstring m_in;
- netlist_analog_output_delegate m_delegate;
+ pstring m_in;
+ netlist_analog_output_delegate m_delegate;
};
@@ -470,16 +470,16 @@ public:
inline void write(const UINT32 val)
{
- if (is_sound_device())
- {
- update_to_current_time();
- m_param->setTo((val >> m_shift) & m_mask);
- }
- else
- {
- // FIXME: use device timer ....
- m_param->setTo((val >> m_shift) & m_mask);
- }
+ if (is_sound_device())
+ {
+ update_to_current_time();
+ m_param->setTo((val >> m_shift) & m_mask);
+ }
+ else
+ {
+ // FIXME: use device timer ....
+ m_param->setTo((val >> m_shift) & m_mask);
+ }
}
inline DECLARE_INPUT_CHANGED_MEMBER(input_changed) { write(newval); }
@@ -505,23 +505,23 @@ private:
// ----------------------------------------------------------------------------------------
class netlist_mame_stream_input_t : public device_t,
- public netlist_mame_sub_interface
+ public netlist_mame_sub_interface
{
public:
- // construction/destruction
- netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~netlist_mame_stream_input_t() { }
+ // construction/destruction
+ netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~netlist_mame_stream_input_t() { }
- static void static_set_params(device_t &device, int channel, const char *param_name);
+ static void static_set_params(device_t &device, int channel, const char *param_name);
protected:
- // device-level overrides
- virtual void device_start();
- virtual void custom_netlist_additions(netlist_setup_t &setup);
+ // device-level overrides
+ virtual void device_start();
+ virtual void custom_netlist_additions(netlist_setup_t &setup);
private:
- UINT32 m_channel;
- pstring m_param_name;
+ UINT32 m_channel;
+ pstring m_param_name;
};
// ----------------------------------------------------------------------------------------
@@ -529,23 +529,23 @@ private:
// ----------------------------------------------------------------------------------------
class netlist_mame_stream_output_t : public device_t,
- public netlist_mame_sub_interface
+ public netlist_mame_sub_interface
{
public:
- // construction/destruction
- netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- virtual ~netlist_mame_stream_output_t() { }
+ // construction/destruction
+ netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~netlist_mame_stream_output_t() { }
- static void static_set_params(device_t &device, int channel, const char *out_name);
+ static void static_set_params(device_t &device, int channel, const char *out_name);
protected:
- // device-level overrides
- virtual void device_start();
- virtual void custom_netlist_additions(netlist_setup_t &setup);
+ // device-level overrides
+ virtual void device_start();
+ virtual void custom_netlist_additions(netlist_setup_t &setup);
private:
- UINT32 m_channel;
- pstring m_out_name;
+ UINT32 m_channel;
+ pstring m_out_name;
};
// ----------------------------------------------------------------------------------------
// netdev_callback
@@ -563,9 +563,9 @@ public:
m_cpu_device = downcast<netlist_mame_cpu_device_t *>(&downcast<netlist_mame_t &>(netlist()).parent());
}
- ATTR_COLD void reset()
- {
- }
+ ATTR_COLD void reset()
+ {
+ }
ATTR_COLD void register_callback(netlist_analog_output_delegate callback)
{
@@ -574,9 +574,9 @@ public:
ATTR_HOT void update()
{
- m_cpu_device->update_time_x();
- m_callback(INPANALOG(m_in), m_cpu_device->local_time());
- m_cpu_device->check_mame_abort_slice();
+ m_cpu_device->update_time_x();
+ m_callback(INPANALOG(m_in), m_cpu_device->local_time());
+ m_cpu_device->check_mame_abort_slice();
}
private:
@@ -601,18 +601,18 @@ public:
{
register_input("IN", m_in);
register_param("CHAN", m_channel, 0);
- register_param("MULT", m_mult, 1000.0);
- register_param("OFFSET", m_offset, 0.0);
- m_sample = netlist_time::from_hz(1); //sufficiently big enough
- save(NAME(m_last_buffer));
+ register_param("MULT", m_mult, 1000.0);
+ register_param("OFFSET", m_offset, 0.0);
+ m_sample = netlist_time::from_hz(1); //sufficiently big enough
+ save(NAME(m_last_buffer));
}
- ATTR_COLD void reset()
- {
- m_cur = 0;
- m_last_pos = 0;
- m_last_buffer = netlist_time::zero;
- }
+ ATTR_COLD void reset()
+ {
+ m_cur = 0;
+ m_last_pos = 0;
+ m_last_buffer = netlist_time::zero;
+ }
ATTR_HOT void sound_update(const netlist_time upto)
{
@@ -634,15 +634,15 @@ public:
ATTR_HOT void buffer_reset(netlist_time upto)
{
- m_last_pos = 0;
- m_last_buffer = upto;
+ m_last_pos = 0;
+ m_last_buffer = upto;
}
netlist_param_int_t m_channel;
- netlist_param_double_t m_mult;
- netlist_param_double_t m_offset;
- stream_sample_t *m_buffer;
- netlist_time m_sample;
+ netlist_param_double_t m_mult;
+ netlist_param_double_t m_offset;
+ stream_sample_t *m_buffer;
+ netlist_time m_sample;
private:
netlist_analog_input_t m_in;
@@ -658,84 +658,84 @@ private:
class NETLIB_NAME(sound_in) : public netlist_device_t
{
public:
- NETLIB_NAME(sound_in)()
- : netlist_device_t() { }
-
- static const int MAX_INPUT_CHANNELS = 10;
-
- ATTR_COLD void start()
- {
- // clock part
- register_output("Q", m_Q);
- register_input("FB", m_feedback);
-
- connect(m_feedback, m_Q);
- m_inc = netlist_time::from_nsec(1);
-
-
- for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
- {
- register_param(pstring::sprintf("CHAN%d", i), m_param_name[i], "");
- register_param(pstring::sprintf("MULT%d", i), m_param_mult[i], 1.0);
- register_param(pstring::sprintf("OFFSET%d", i), m_param_offset[i], 0.0);
- }
- m_num_channel = 0;
- }
-
- ATTR_COLD void reset()
- {
- m_pos = 0;
- for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
- m_buffer[i] = NULL;
- }
-
- ATTR_COLD int resolve()
- {
- m_pos = 0;
- for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
- {
- if (m_param_name[i].Value() != "")
- {
- if (i != m_num_channel)
- netlist().error("sound input numbering has to be sequential!");
- m_num_channel++;
- m_param[i] = dynamic_cast<netlist_param_double_t *>(setup().find_param(m_param_name[i].Value(), true));
- }
- }
- return m_num_channel;
- }
-
- ATTR_HOT void update()
- {
- for (int i=0; i<m_num_channel; i++)
- {
- if (m_buffer[i] == NULL)
- break; // stop, called outside of stream_update
- double v = m_buffer[i][m_pos];
- m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value());
- }
- m_pos++;
- OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc );
- }
-
- ATTR_HOT void buffer_reset()
- {
- m_pos = 0;
- }
-
- netlist_param_str_t m_param_name[MAX_INPUT_CHANNELS];
- netlist_param_double_t *m_param[MAX_INPUT_CHANNELS];
- stream_sample_t *m_buffer[MAX_INPUT_CHANNELS];
- netlist_param_double_t m_param_mult[MAX_INPUT_CHANNELS];
- netlist_param_double_t m_param_offset[MAX_INPUT_CHANNELS];
- netlist_time m_inc;
+ NETLIB_NAME(sound_in)()
+ : netlist_device_t() { }
+
+ static const int MAX_INPUT_CHANNELS = 10;
+
+ ATTR_COLD void start()
+ {
+ // clock part
+ register_output("Q", m_Q);
+ register_input("FB", m_feedback);
+
+ connect(m_feedback, m_Q);
+ m_inc = netlist_time::from_nsec(1);
+
+
+ for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
+ {
+ register_param(pstring::sprintf("CHAN%d", i), m_param_name[i], "");
+ register_param(pstring::sprintf("MULT%d", i), m_param_mult[i], 1.0);
+ register_param(pstring::sprintf("OFFSET%d", i), m_param_offset[i], 0.0);
+ }
+ m_num_channel = 0;
+ }
+
+ ATTR_COLD void reset()
+ {
+ m_pos = 0;
+ for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
+ m_buffer[i] = NULL;
+ }
+
+ ATTR_COLD int resolve()
+ {
+ m_pos = 0;
+ for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
+ {
+ if (m_param_name[i].Value() != "")
+ {
+ if (i != m_num_channel)
+ netlist().error("sound input numbering has to be sequential!");
+ m_num_channel++;
+ m_param[i] = dynamic_cast<netlist_param_double_t *>(setup().find_param(m_param_name[i].Value(), true));
+ }
+ }
+ return m_num_channel;
+ }
+
+ ATTR_HOT void update()
+ {
+ for (int i=0; i<m_num_channel; i++)
+ {
+ if (m_buffer[i] == NULL)
+ break; // stop, called outside of stream_update
+ double v = m_buffer[i][m_pos];
+ m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value());
+ }
+ m_pos++;
+ OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc );
+ }
+
+ ATTR_HOT void buffer_reset()
+ {
+ m_pos = 0;
+ }
+
+ netlist_param_str_t m_param_name[MAX_INPUT_CHANNELS];
+ netlist_param_double_t *m_param[MAX_INPUT_CHANNELS];
+ stream_sample_t *m_buffer[MAX_INPUT_CHANNELS];
+ netlist_param_double_t m_param_mult[MAX_INPUT_CHANNELS];
+ netlist_param_double_t m_param_offset[MAX_INPUT_CHANNELS];
+ netlist_time m_inc;
private:
- netlist_ttl_input_t m_feedback;
- netlist_ttl_output_t m_Q;
+ netlist_ttl_input_t m_feedback;
+ netlist_ttl_output_t m_Q;
- int m_pos;
- int m_num_channel;
+ int m_pos;
+ int m_num_channel;
};
// device type definition
diff --git a/src/emu/machine/nsc810.c b/src/emu/machine/nsc810.c
index c88e53181f5..2161a867378 100644
--- a/src/emu/machine/nsc810.c
+++ b/src/emu/machine/nsc810.c
@@ -308,4 +308,3 @@ WRITE8_MEMBER(nsc810_device::write)
}
}
}
-
diff --git a/src/emu/machine/pc_lpt.c b/src/emu/machine/pc_lpt.c
index e5558835e21..266ad2aa992 100644
--- a/src/emu/machine/pc_lpt.c
+++ b/src/emu/machine/pc_lpt.c
@@ -167,4 +167,3 @@ WRITE_LINE_MEMBER( pc_lpt_device::write_centronics_ack )
m_cent_status_in->write_bit6(state);
update_irq();
}
-
diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c
index abb59481aa9..ae611d67cae 100644
--- a/src/emu/machine/pci.c
+++ b/src/emu/machine/pci.c
@@ -287,4 +287,3 @@ void pci_bus_legacy_device::device_reset()
m_devicenum = -1;
m_address = 0;
}
-
diff --git a/src/emu/machine/pckeybrd.c b/src/emu/machine/pckeybrd.c
index 3801c6a20ff..12aefd6086f 100644
--- a/src/emu/machine/pckeybrd.c
+++ b/src/emu/machine/pckeybrd.c
@@ -336,7 +336,7 @@ void pc_keyboard_device::device_start()
ioport_queue_chars_delegate(FUNC(pc_keyboard_device::queue_chars), this),
ioport_accept_char_delegate(FUNC(pc_keyboard_device::accept_char), this),
ioport_charqueue_empty_delegate(FUNC(pc_keyboard_device::charqueue_empty), this));
-
+
m_out_keypress_func.resolve_safe();
m_keyboard_timer = timer_alloc();
}
diff --git a/src/emu/machine/pckeybrd.h b/src/emu/machine/pckeybrd.h
index e04f94f7d5a..cf65ed85c2c 100644
--- a/src/emu/machine/pckeybrd.h
+++ b/src/emu/machine/pckeybrd.h
@@ -73,7 +73,7 @@ private:
optional_ioport m_ioport_5;
optional_ioport m_ioport_6;
optional_ioport m_ioport_7;
-
+
devcb2_write_line m_out_keypress_func;
emu_timer *m_keyboard_timer;
};
@@ -85,9 +85,9 @@ public:
DECLARE_WRITE8_MEMBER( write );
- static void static_set_type(device_t &device, KEYBOARD_TYPE type, int default_set)
+ static void static_set_type(device_t &device, KEYBOARD_TYPE type, int default_set)
{ downcast<at_keyboard_device &>(device).m_scan_code_set = default_set; downcast<at_keyboard_device &>(device).m_type = type; }
-
+
protected:
virtual void device_reset();
virtual void device_start();
diff --git a/src/emu/machine/rp5c01.h b/src/emu/machine/rp5c01.h
index 7497e3b7f9c..d201b8c82bf 100644
--- a/src/emu/machine/rp5c01.h
+++ b/src/emu/machine/rp5c01.h
@@ -51,7 +51,7 @@ class rp5c01_device : public device_t,
public:
// construction/destruction
rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast<rp5c01_device &>(device).m_out_alarm_cb.set_callback(object); }
DECLARE_READ8_MEMBER( read );
diff --git a/src/emu/machine/rp5c15.h b/src/emu/machine/rp5c15.h
index 18daeb562d4..37a57b9a61c 100644
--- a/src/emu/machine/rp5c15.h
+++ b/src/emu/machine/rp5c15.h
@@ -52,7 +52,7 @@ class rp5c15_device : public device_t,
public:
// construction/destruction
rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast<rp5c15_device &>(device).m_out_alarm_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_clkout_callback(device_t &device, _Object object) { return downcast<rp5c15_device &>(device).m_out_clkout_cb.set_callback(object); }
diff --git a/src/emu/machine/rtc4543.c b/src/emu/machine/rtc4543.c
index dd751d42a44..ab6fb21555c 100644
--- a/src/emu/machine/rtc4543.c
+++ b/src/emu/machine/rtc4543.c
@@ -29,8 +29,8 @@ const device_type RTC4543 = &device_creator<rtc4543_device>;
rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, RTC4543, "Epson R4543", tag, owner, clock, "rtc4543", __FILE__),
- device_rtc_interface(mconfig, *this),
- data_cb(*this)
+ device_rtc_interface(mconfig, *this),
+ data_cb(*this)
{
}
diff --git a/src/emu/machine/rtc65271.h b/src/emu/machine/rtc65271.h
index 6836bda4a62..8f496897459 100644
--- a/src/emu/machine/rtc65271.h
+++ b/src/emu/machine/rtc65271.h
@@ -31,7 +31,7 @@ protected:
public:
template<class _Object> static devcb2_base &set_interrupt_callback(device_t &device, _Object object) { return downcast<rtc65271_device &>(device).m_interrupt_cb.set_callback(object); }
-
+
DECLARE_READ8_MEMBER( rtc_r );
DECLARE_READ8_MEMBER( xram_r );
DECLARE_WRITE8_MEMBER( rtc_w );
diff --git a/src/emu/machine/s3c2400.c b/src/emu/machine/s3c2400.c
index 4ed4c77a073..ca008fd36fb 100644
--- a/src/emu/machine/s3c2400.c
+++ b/src/emu/machine/s3c2400.c
@@ -67,7 +67,7 @@ s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, d
s3c2400_device::~s3c2400_device()
{
}
-
+
//-------------------------------------------------
// static_set_palette_tag: Set the tag of the
// palette device
@@ -99,8 +99,8 @@ void s3c2400_device::device_config_complete()
void s3c2400_device::device_start()
{
s3c24xx_device_start();
-
- address_space &space = m_cpu->memory().space( AS_PROGRAM);
+
+ address_space &space = m_cpu->memory().space( AS_PROGRAM);
space.install_readwrite_handler(0x14000000, 0x1400003b, read32_delegate(FUNC(s3c2400_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_memcon_w), this));
space.install_readwrite_handler(0x14200000, 0x1420005b, read32_delegate(FUNC(s3c2400_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_usb_host_w), this));
space.install_readwrite_handler(0x14400000, 0x14400017, read32_delegate(FUNC(s3c2400_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_irq_w), this));
diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h
index c9d335bdd90..578b3dd4668 100644
--- a/src/emu/machine/s3c2400.h
+++ b/src/emu/machine/s3c2400.h
@@ -16,7 +16,7 @@
#define MCFG_S3C2400_ADD(_tag, _clock, _config, _palette_tag) \
MCFG_DEVICE_ADD(_tag, S3C2400, _clock) \
- MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_CONFIG(_config) \
s3c2400_device::static_set_palette_tag(*device, "^" _palette_tag);
#define S3C2400_INTERFACE(name) \
@@ -369,7 +369,7 @@ struct s3c2400_interface
#define S3C24XX_DMA_COUNT 4
#define S3C24XX_SPI_COUNT 1
-class s3c2400_device : public device_t,
+class s3c2400_device : public device_t,
public s3c2400_interface
{
public:
@@ -536,19 +536,19 @@ public:
void s3c24xx_spi_reset();
UINT32 s3c24xx_spi_r(UINT32 ch, UINT32 offset);
void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask);
- READ32_MEMBER( s3c24xx_spi_0_r );
+ READ32_MEMBER( s3c24xx_spi_0_r );
WRITE32_MEMBER( s3c24xx_spi_0_w );
void s3c24xx_mmc_reset();
READ32_MEMBER( s3c24xx_mmc_r );
WRITE32_MEMBER( s3c24xx_mmc_w );
void s3c24xx_device_reset();
void s3c24xx_device_start();
-
+
void s3c2400_uart_fifo_w(int uart, UINT8 data);
/*******************************************************************************
- TYPE DEFINITIONS
+ TYPE DEFINITIONS
*******************************************************************************/
struct s3c24xx_memcon_regs_t
@@ -901,7 +901,7 @@ public:
devcb_resolved_write8 m_address_w;
devcb_resolved_read8 m_nand_data_r;
devcb_resolved_write8 m_nand_data_w;
-
+
};
extern const device_type S3C2400;
diff --git a/src/emu/machine/s3c2410.c b/src/emu/machine/s3c2410.c
index 0bba6bd3022..140e2620c13 100644
--- a/src/emu/machine/s3c2410.c
+++ b/src/emu/machine/s3c2410.c
@@ -101,8 +101,8 @@ void s3c2410_device::device_config_complete()
void s3c2410_device::device_start()
{
s3c24xx_device_start();
-
- address_space &space = m_cpu->memory().space( AS_PROGRAM);
+
+ address_space &space = m_cpu->memory().space( AS_PROGRAM);
space.install_readwrite_handler( 0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2410_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_memcon_w), this));
space.install_readwrite_handler( 0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2410_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_usb_host_w), this));
space.install_readwrite_handler( 0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2410_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_irq_w), this));
diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h
index 0a90287060a..29a356d4435 100644
--- a/src/emu/machine/s3c2410.h
+++ b/src/emu/machine/s3c2410.h
@@ -16,7 +16,7 @@
#define MCFG_S3C2410_ADD(_tag, _clock, _config, _palette_tag) \
MCFG_DEVICE_ADD(_tag, S3C2410, _clock) \
- MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_CONFIG(_config) \
s3c2410_device::static_set_palette_tag(*device, "^" _palette_tag);
#define S3C2410_INTERFACE(name) \
@@ -454,7 +454,7 @@ static const UINT32 MAP_SUBINT_TO_INT[11] =
#define S3C24XX_DMA_COUNT 4
#define S3C24XX_SPI_COUNT 2
-class s3c2410_device : public device_t,
+class s3c2410_device : public device_t,
public s3c2410_interface
{
public:
@@ -465,7 +465,7 @@ public:
static void static_set_palette_tag(device_t &device, const char *tag);
DECLARE_WRITE_LINE_MEMBER( frnb_w );
-
+
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
@@ -475,7 +475,7 @@ private:
required_device<palette_device> m_palette;
public:
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
-
+
void s3c24xx_reset();
inline int iface_core_pin_r(int pin);
void s3c24xx_lcd_reset();
@@ -633,7 +633,7 @@ public:
void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask);
READ32_MEMBER( s3c24xx_spi_0_r );
READ32_MEMBER( s3c24xx_spi_1_r );
- WRITE32_MEMBER( s3c24xx_spi_0_w );
+ WRITE32_MEMBER( s3c24xx_spi_0_w );
WRITE32_MEMBER( s3c24xx_spi_1_w );
void s3c24xx_sdi_reset();
READ32_MEMBER( s3c24xx_sdi_r );
@@ -661,9 +661,9 @@ public:
void s3c2410_touch_screen( int state);
void s3c2410_request_eint( UINT32 number);
void s3c2410_nand_calculate_mecc( UINT8 *data, UINT32 size, UINT8 *mecc);
-
+
/*******************************************************************************
- TYPE DEFINITIONS
+ TYPE DEFINITIONS
*******************************************************************************/
struct s3c24xx_memcon_regs_t
@@ -1070,7 +1070,7 @@ public:
devcb_resolved_write8 m_command_w;
devcb_resolved_write8 m_address_w;
devcb_resolved_read8 m_nand_data_r;
- devcb_resolved_write8 m_nand_data_w;
+ devcb_resolved_write8 m_nand_data_w;
};
extern const device_type S3C2410;
diff --git a/src/emu/machine/s3c2440.c b/src/emu/machine/s3c2440.c
index d9482a4fab8..bfa4388ed4f 100644
--- a/src/emu/machine/s3c2440.c
+++ b/src/emu/machine/s3c2440.c
@@ -104,36 +104,36 @@ void s3c2440_device::device_config_complete()
void s3c2440_device::device_start()
{
address_space &space = m_cpu->memory().space( AS_PROGRAM);
- space.install_readwrite_handler(0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_w), this));
- space.install_readwrite_handler(0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_w), this));
- space.install_readwrite_handler(0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_irq_w), this));
- space.install_readwrite_handler(0x4b000000, 0x4b000023, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_w), this));
- space.install_readwrite_handler(0x4b000040, 0x4b000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_w), this));
- space.install_readwrite_handler(0x4b000080, 0x4b0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_w), this));
- space.install_readwrite_handler(0x4b0000c0, 0x4b0000e3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_w), this));
- space.install_readwrite_handler(0x4c000000, 0x4c00001b, read32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_w), this));
- space.install_readwrite_handler(0x4d000000, 0x4d000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_w), this));
- space.install_readwrite_handler(0x4d000400, 0x4d0007ff, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_w), this));
- space.install_readwrite_handler(0x4e000000, 0x4e00003f, read32_delegate(FUNC(s3c2440_device::s3c24xx_nand_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_nand_w), this));
- space.install_readwrite_handler(0x4f000000, 0x4f0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_cam_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_cam_w), this));
- space.install_readwrite_handler(0x50000000, 0x5000002b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_w), this));
- space.install_readwrite_handler(0x50004000, 0x5000402b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_w), this));
- space.install_readwrite_handler(0x50008000, 0x5000802b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_w), this));
- space.install_readwrite_handler(0x51000000, 0x51000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_w), this));
- space.install_readwrite_handler(0x52000140, 0x5200026f, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_w), this));
- space.install_readwrite_handler(0x53000000, 0x5300000b, read32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_w), this));
- space.install_readwrite_handler(0x54000000, 0x54000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iic_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iic_w), this));
- space.install_readwrite_handler(0x55000000, 0x55000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iis_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iis_w), this));
- space.install_readwrite_handler(0x56000000, 0x560000df, read32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_w), this));
- space.install_readwrite_handler(0x57000040, 0x5700008b, read32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_w), this));
- space.install_readwrite_handler(0x58000000, 0x58000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_adc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_adc_w), this));
- space.install_readwrite_handler(0x59000000, 0x59000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_w), this));
- space.install_readwrite_handler(0x59000020, 0x59000037, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_w), this));
- space.install_readwrite_handler(0x5a000000, 0x5a000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_w), this));
- space.install_readwrite_handler(0x5b000000, 0x5b00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_w), this));
+ space.install_readwrite_handler(0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_w), this));
+ space.install_readwrite_handler(0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_w), this));
+ space.install_readwrite_handler(0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_irq_w), this));
+ space.install_readwrite_handler(0x4b000000, 0x4b000023, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_w), this));
+ space.install_readwrite_handler(0x4b000040, 0x4b000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_w), this));
+ space.install_readwrite_handler(0x4b000080, 0x4b0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_w), this));
+ space.install_readwrite_handler(0x4b0000c0, 0x4b0000e3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_w), this));
+ space.install_readwrite_handler(0x4c000000, 0x4c00001b, read32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_w), this));
+ space.install_readwrite_handler(0x4d000000, 0x4d000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_w), this));
+ space.install_readwrite_handler(0x4d000400, 0x4d0007ff, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_w), this));
+ space.install_readwrite_handler(0x4e000000, 0x4e00003f, read32_delegate(FUNC(s3c2440_device::s3c24xx_nand_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_nand_w), this));
+ space.install_readwrite_handler(0x4f000000, 0x4f0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_cam_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_cam_w), this));
+ space.install_readwrite_handler(0x50000000, 0x5000002b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_w), this));
+ space.install_readwrite_handler(0x50004000, 0x5000402b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_w), this));
+ space.install_readwrite_handler(0x50008000, 0x5000802b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_w), this));
+ space.install_readwrite_handler(0x51000000, 0x51000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_w), this));
+ space.install_readwrite_handler(0x52000140, 0x5200026f, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_w), this));
+ space.install_readwrite_handler(0x53000000, 0x5300000b, read32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_w), this));
+ space.install_readwrite_handler(0x54000000, 0x54000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iic_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iic_w), this));
+ space.install_readwrite_handler(0x55000000, 0x55000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iis_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iis_w), this));
+ space.install_readwrite_handler(0x56000000, 0x560000df, read32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_w), this));
+ space.install_readwrite_handler(0x57000040, 0x5700008b, read32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_w), this));
+ space.install_readwrite_handler(0x58000000, 0x58000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_adc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_adc_w), this));
+ space.install_readwrite_handler(0x59000000, 0x59000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_w), this));
+ space.install_readwrite_handler(0x59000020, 0x59000037, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_w), this));
+ space.install_readwrite_handler(0x5a000000, 0x5a000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_w), this));
+ space.install_readwrite_handler(0x5b000000, 0x5b00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_w), this));
s3c24xx_device_start();
-
+
s3c24xx_video_start();
}
diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h
index b3e74134ee3..288d0b16441 100644
--- a/src/emu/machine/s3c2440.h
+++ b/src/emu/machine/s3c2440.h
@@ -15,7 +15,7 @@
#define MCFG_S3C2440_ADD(_tag, _clock, _config, _palette_tag) \
MCFG_DEVICE_ADD(_tag, S3C2440, _clock) \
- MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_CONFIG(_config) \
s3c2440_device::static_set_palette_tag(*device, "^" _palette_tag);
#define S3C2440_INTERFACE(name) \
@@ -486,7 +486,7 @@ static const UINT32 MAP_SUBINT_TO_INT[15] =
#define S3C24XX_DMA_COUNT 4
#define S3C24XX_SPI_COUNT 2
-class s3c2440_device : public device_t,
+class s3c2440_device : public device_t,
public s3c2440_interface
{
public:
@@ -508,7 +508,7 @@ private:
required_device<palette_device> m_palette;
public:
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
-
+
void s3c24xx_reset();
inline int iface_core_pin_r(int pin);
void s3c24xx_lcd_reset();
@@ -696,7 +696,7 @@ public:
void s3c24xx_nand_auto_boot();
void s3c24xx_device_reset();
void s3c24xx_device_start();
-
+
void s3c2440_uart_fifo_w( int uart, UINT8 data);
void s3c2440_touch_screen( int state);
@@ -705,7 +705,7 @@ public:
/*******************************************************************************
- TYPE DEFINITIONS
+ TYPE DEFINITIONS
*******************************************************************************/
struct s3c24xx_memcon_regs_t
@@ -1119,7 +1119,7 @@ public:
s3c24xx_ac97_regs_t regs;
};
-
+
UINT8 m_steppingstone[4*1024];
s3c24xx_memcon_t m_memcon;
s3c24xx_usbhost_t m_usbhost;
@@ -1156,7 +1156,7 @@ public:
devcb_resolved_write8 m_address_w;
devcb_resolved_read8 m_nand_data_r;
devcb_resolved_write8 m_nand_data_w;
-
+
};
extern const device_type S3C2440;
diff --git a/src/emu/machine/s3c24xx.inc b/src/emu/machine/s3c24xx.inc
index 5f99ffee5d3..fa6d4a1fe91 100644
--- a/src/emu/machine/s3c24xx.inc
+++ b/src/emu/machine/s3c24xx.inc
@@ -86,7 +86,7 @@
/* ... */
void S3C24_CLASS_NAME::s3c24xx_reset()
-{
+{
verboselog( machine(), 1, "reset\n");
m_cpu->reset();
this->reset();
@@ -3472,7 +3472,6 @@ void S3C24_CLASS_NAME::s3c24xx_device_reset()
void S3C24_CLASS_NAME::s3c24xx_device_start()
{
-
verboselog( machine(), 1, "s3c24xx device start\n");
m_pin_r.resolve(m_iface_core.pin_r, *this);
m_pin_w.resolve(m_iface_core.pin_w, *this);
diff --git a/src/emu/machine/saturn.c b/src/emu/machine/saturn.c
index 143bb913477..ea08344ccb1 100644
--- a/src/emu/machine/saturn.c
+++ b/src/emu/machine/saturn.c
@@ -762,9 +762,9 @@ WRITE8_MEMBER(saturn_state::scsp_irq)
if (offset != 0)
{
- if (data == ASSERT_LINE) m_scsp_last_line = offset;
+ if (data == ASSERT_LINE) m_scsp_last_line = offset;
m_audiocpu->set_input_line(offset, data);
- }
+ }
else
{
m_audiocpu->set_input_line(m_scsp_last_line, data);
diff --git a/src/emu/machine/seibu_cop.h b/src/emu/machine/seibu_cop.h
index 1d62a5048bd..5c1a22cf64a 100644
--- a/src/emu/machine/seibu_cop.h
+++ b/src/emu/machine/seibu_cop.h
@@ -1,6 +1,6 @@
/***************************************************************************
- Seibu COP device
+ Seibu COP device
***************************************************************************/
@@ -20,7 +20,7 @@
#define MCFG_SEIBU_COP_IN_WORD_CB(_devcb) \
devcb = &seibu_cop_device::set_in_word_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_SEIBU_COP_IN_DWORD_CB(_devcb) \
devcb = &seibu_cop_device::set_in_dword_callback(*device, DEVCB2_##_devcb);
@@ -32,7 +32,7 @@
#define MCFG_SEIBU_COP_OUT_DWORD_CB(_devcb) \
devcb = &seibu_cop_device::set_out_dword_callback(*device, DEVCB2_##_devcb);
-
+
//**************************************************************************
@@ -47,7 +47,7 @@ class seibu_cop_device : public device_t,
public:
// construction/destruction
seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_in_byte_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_byte_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_word_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_word_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_in_dword_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_dword_cb.set_callback(object); }
diff --git a/src/emu/machine/smc91c9x.h b/src/emu/machine/smc91c9x.h
index 56fa75a4a0f..f3ca0eefc9e 100644
--- a/src/emu/machine/smc91c9x.h
+++ b/src/emu/machine/smc91c9x.h
@@ -25,7 +25,7 @@ public:
~smc91c9x_device() {}
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<smc91c9x_device &>(device).m_irq_handler.set_callback(object); }
-
+
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
@@ -86,7 +86,7 @@ extern const device_type SMC91C96;
#define MCFG_SMC91C94_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SMC91C94, 0)
-
+
#define MCFG_SMC91C94_IRQ_CALLBACK(_write) \
devcb = &smc91c94_device::set_irq_callback(*device, DEVCB2_##_write);
diff --git a/src/emu/machine/smc92x4.c b/src/emu/machine/smc92x4.c
index 516c6eef019..72a663e8736 100644
--- a/src/emu/machine/smc92x4.c
+++ b/src/emu/machine/smc92x4.c
@@ -189,12 +189,12 @@ enum
smc92x4_device::smc92x4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SMC92X4, "SMC 9224/9234 Hard/Floppy Disk Controller", tag, owner, clock, "smc92x4", __FILE__),
- m_out_intrq(*this),
- m_out_dip(*this),
- m_out_auxbus(*this),
- m_in_auxbus(*this),
- m_in_dma(*this),
- m_out_dma(*this)
+ m_out_intrq(*this),
+ m_out_dip(*this),
+ m_out_auxbus(*this),
+ m_in_auxbus(*this),
+ m_in_dma(*this),
+ m_out_dma(*this)
{
}
diff --git a/src/emu/machine/smc92x4.h b/src/emu/machine/smc92x4.h
index 4b06c14dd1d..48e774e289b 100644
--- a/src/emu/machine/smc92x4.h
+++ b/src/emu/machine/smc92x4.h
@@ -223,7 +223,7 @@ private:
// We expect the embedding board to replace the drive according to the
// select lines.
legacy_floppy_image_device *m_drive;
- mfm_harddisk_device *m_harddisk;
+ mfm_harddisk_device *m_harddisk;
};
#define MCFG_SMC92X4_ADD(_tag, _intrf) \
diff --git a/src/emu/machine/tc009xlvc.h b/src/emu/machine/tc009xlvc.h
index 66c57c3cdf5..6ea809b8e8a 100644
--- a/src/emu/machine/tc009xlvc.h
+++ b/src/emu/machine/tc009xlvc.h
@@ -20,7 +20,7 @@ public:
// static configuration
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_palette_tag(device_t &device, const char *tag);
-
+
DECLARE_READ8_MEMBER( vregs_r );
DECLARE_WRITE8_MEMBER( vregs_w );
diff --git a/src/emu/machine/terminal.c b/src/emu/machine/terminal.c
index 5c4d8e5c924..cb5c494ca14 100644
--- a/src/emu/machine/terminal.c
+++ b/src/emu/machine/terminal.c
@@ -418,4 +418,3 @@ ioport_constructor generic_terminal_device::device_input_ports() const
}
const device_type GENERIC_TERMINAL = &device_creator<generic_terminal_device>;
-
diff --git a/src/emu/machine/tmp68301.h b/src/emu/machine/tmp68301.h
index f227cacbd9f..a870279b28c 100644
--- a/src/emu/machine/tmp68301.h
+++ b/src/emu/machine/tmp68301.h
@@ -28,7 +28,7 @@ public:
template<class _Object> static devcb2_base &set_in_parallel_callback(device_t &device, _Object object) { return downcast<tmp68301_device &>(device).m_in_parallel_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_parallel_callback(device_t &device, _Object object) { return downcast<tmp68301_device &>(device).m_out_parallel_cb.set_callback(object); }
-
+
// Hardware Registers
DECLARE_READ16_MEMBER( regs_r );
DECLARE_WRITE16_MEMBER( regs_w );
@@ -58,7 +58,7 @@ protected:
private:
devcb2_read16 m_in_parallel_cb;
devcb2_write16 m_out_parallel_cb;
-
+
// internal state
UINT16 m_regs[0x400];
diff --git a/src/emu/machine/tms5501.c b/src/emu/machine/tms5501.c
index 03ca513aad7..09f2e01509f 100644
--- a/src/emu/machine/tms5501.c
+++ b/src/emu/machine/tms5501.c
@@ -443,7 +443,7 @@ WRITE_LINE_MEMBER( tms5501_device::xi7_w )
}
}
- m_xi7 = state;
+ m_xi7 = state;
}
@@ -458,7 +458,7 @@ WRITE_LINE_MEMBER( tms5501_device::sens_w )
set_interrupt(IRQ_SENS);
}
- m_sens = state;
+ m_sens = state;
}
@@ -501,7 +501,7 @@ void tms5501_device::check_interrupt()
}
else
{
- m_write_irq(CLEAR_LINE);
+ m_write_irq(CLEAR_LINE);
}
}
@@ -522,7 +522,7 @@ UINT8 tms5501_device::get_vector()
m_irq &= ~(1 << i);
check_interrupt();
-
+
if (LOG) logerror("%s: TMS5501 '%s' Interrupt Acknowledge %02x\n", machine().describe_context(), tag(), rst);
break;
}
diff --git a/src/emu/machine/upd1990a.c b/src/emu/machine/upd1990a.c
index 7e79f88d697..0f3145f1f3b 100644
--- a/src/emu/machine/upd1990a.c
+++ b/src/emu/machine/upd1990a.c
@@ -171,7 +171,7 @@ void upd1990a_device::device_timer(emu_timer &timer, device_timer_id id, int par
int max_shift = is_serial_mode() ? 6 : 5;
m_data_out = (m_time_counter[max_shift - 1] == 0);
m_write_data(get_data_out());
-
+
for (int i = 0; i < max_shift; i++)
{
m_time_counter[i]++;
@@ -219,11 +219,11 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
{
m_c = m_c_unlatched;
if (m_c == 7)
- m_c = MODE_TEST;
+ m_c = MODE_TEST;
}
-
+
if (LOG) logerror("uPD1990A '%s' Command %x\n", tag(), m_c);
-
+
// common functions
if (m_c == MODE_REGISTER_HOLD || (m_c >= MODE_TP_64HZ && m_c < MODE_TEST))
{
@@ -234,7 +234,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
m_testmode = false;
m_timer_test_mode->enable(0);
}
-
+
switch (m_c)
{
case MODE_REGISTER_HOLD:
@@ -285,10 +285,10 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
bcd_to_integer(m_time_counter[1]),
bcd_to_integer(m_time_counter[0])
);
-
+
// reset stage 10-15 of clock divider
m_timer_clock->adjust(attotime::from_ticks(m_timer_clock->remaining().as_ticks(clock()) % (clock() / 512), clock()), 0, attotime::from_hz(clock() / 32768.0));
-
+
// disable(low) time pulse in testmode
if (m_testmode)
{
@@ -336,7 +336,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
// set timer pulse
const float div[4] = { 512.0, 128.0, 16.0, 8.0 };
m_timer_tp->adjust(attotime::zero, 0, attotime::from_hz((clock() / div[m_c - MODE_TP_64HZ]) * 2.0));
-
+
break;
}
@@ -349,7 +349,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
attotime one_second = attotime::from_hz(clock() / 32768.0);
const float mul[4] = { 1.0, 10.0, 30.0, 60.0 };
m_timer_tp->adjust(attotime::zero, 0, one_second * mul[m_c - MODE_TP_1S_INT] / 2.0);
-
+
break;
}
@@ -374,7 +374,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
m_timer_test_mode->adjust(attotime::zero, 0, attotime::from_hz(clock() / div));
break;
}
-
+
default:
break;
}
@@ -399,7 +399,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w )
if (!m_clk && state)
{
int in = m_data_in;
-
+
if (is_serial_mode())
{
// always clock serial command register
@@ -407,7 +407,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w )
m_shift_reg[6] >>= 1;
m_shift_reg[6] |= (m_data_in << 3);
}
-
+
if (m_c == MODE_SHIFT)
{
// clock shift register
@@ -420,7 +420,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w )
else
m_shift_reg[i] |= (m_shift_reg[i + 1] << 7 & 0x80);
}
-
+
// data out LSB of shift register
m_data_out = m_shift_reg[0] & 1;
m_write_data(get_data_out());
@@ -449,7 +449,7 @@ WRITE_LINE_MEMBER( upd1990a_device::oe_w )
int prev_oe = m_oe;
m_oe = state;
-
+
if (m_oe != prev_oe && m_c != MODE_TEST)
m_write_data(get_data_out());
}
diff --git a/src/emu/machine/upd1990a.h b/src/emu/machine/upd1990a.h
index 47d636e7656..4bd421521d9 100644
--- a/src/emu/machine/upd1990a.h
+++ b/src/emu/machine/upd1990a.h
@@ -134,7 +134,7 @@ private:
bool m_testmode; // testmode active
int m_variant;
-
+
// timers
emu_timer *m_timer_clock;
emu_timer *m_timer_tp;
diff --git a/src/emu/machine/upd7002.c b/src/emu/machine/upd7002.c
index 5358062f57c..0c26131b1a0 100644
--- a/src/emu/machine/upd7002.c
+++ b/src/emu/machine/upd7002.c
@@ -17,7 +17,7 @@
const device_type UPD7002 = &device_creator<upd7002_device>;
upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__)
+ : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__)
{
}
diff --git a/src/emu/machine/upd7002.h b/src/emu/machine/upd7002.h
index aa6f83e400d..da991fe6a79 100644
--- a/src/emu/machine/upd7002.h
+++ b/src/emu/machine/upd7002.h
@@ -33,7 +33,7 @@ struct upd7002_interface
***************************************************************************/
class upd7002_device : public device_t,
- public upd7002_interface
+ public upd7002_interface
{
public:
upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -42,17 +42,17 @@ public:
DECLARE_READ8_MEMBER ( eoc_r );
DECLARE_READ8_MEMBER ( read );
DECLARE_WRITE8_MEMBER ( write );
-
+
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
+
private:
// internal state
-
+
/* Status Register
D0 and D1 define the currently selected input channel
D2 flag output
@@ -83,7 +83,7 @@ private:
the counter at the end of the first conversion will not match and not be processed
only then at the end of the second conversion will the conversion complete function run */
int m_conversion_counter;
-
+
enum
{
TIMER_CONVERSION_COMPLETE
diff --git a/src/emu/machine/upd765.c b/src/emu/machine/upd765.c
index aaefd4be4f9..801ec5b7d0b 100644
--- a/src/emu/machine/upd765.c
+++ b/src/emu/machine/upd765.c
@@ -133,7 +133,7 @@ void upd765_family_device::device_start()
intrq_cb.resolve_safe();
drq_cb.resolve_safe();
hdl_cb.resolve_safe();
-
+
for(int i=0; i != 4; i++) {
char name[2];
flopi[i].tm = timer_alloc(i);
diff --git a/src/emu/machine/wd17xx.c b/src/emu/machine/wd17xx.c
index 57352f7ab87..386c110b780 100644
--- a/src/emu/machine/wd17xx.c
+++ b/src/emu/machine/wd17xx.c
@@ -376,7 +376,7 @@ void wd1770_device::wd17xx_set_intrq()
/* set intrq after delay */
TIMER_CALLBACK_MEMBER( wd1770_device::wd17xx_command_callback )
-{
+{
if (m_last_command_data != FDC_FORCE_INT)
{
wd17xx_set_intrq();
diff --git a/src/emu/machine/wd17xx.h b/src/emu/machine/wd17xx.h
index beb2f7a710a..6fd5a7f446f 100644
--- a/src/emu/machine/wd17xx.h
+++ b/src/emu/machine/wd17xx.h
@@ -68,7 +68,7 @@ public:
WRITE_LINE_MEMBER( wprt_w );
WRITE_LINE_MEMBER( dden_w );
READ_LINE_MEMBER( drq_r );
- READ_LINE_MEMBER( intrq_r );
+ READ_LINE_MEMBER( intrq_r );
protected:
// device-level overrides
virtual void device_config_complete();
@@ -179,7 +179,7 @@ protected:
UINT8 m_was_busy;
/* Pointer to interface */
- const wd17xx_interface *m_intf;
+ const wd17xx_interface *m_intf;
};
extern ATTR_DEPRECATED const device_type WD1770;
diff --git a/src/emu/machine/wd33c93.h b/src/emu/machine/wd33c93.h
index ce1e4f6b0e4..f89671b4c1e 100644
--- a/src/emu/machine/wd33c93.h
+++ b/src/emu/machine/wd33c93.h
@@ -53,7 +53,7 @@ class wd33c93_device : public device_t
public:
// construction/destruction
wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<wd33c93_device &>(device).m_irq_cb.set_callback(object); }
DECLARE_READ8_MEMBER(read);
diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c
index 342ae1ea560..af022b3e8ee 100644
--- a/src/emu/machine/z80dma.c
+++ b/src/emu/machine/z80dma.c
@@ -897,4 +897,3 @@ WRITE_LINE_MEMBER(z80dma_device::wait_w)
WRITE_LINE_MEMBER(z80dma_device::bai_w)
{
}
-
diff --git a/src/emu/machine/z8536.h b/src/emu/machine/z8536.h
index 765b5398780..6136385455b 100644
--- a/src/emu/machine/z8536.h
+++ b/src/emu/machine/z8536.h
@@ -76,7 +76,7 @@
// ======================> z8536_device
class z8536_device : public device_t,
- public device_z80daisy_interface
+ public device_z80daisy_interface
{
public:
// construction/destruction
diff --git a/src/emu/mame.c b/src/emu/mame.c
index ab55609f2e2..98062b14877 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -170,7 +170,7 @@ int mame_execute(emu_options &options, osd_interface &osd)
astring errors;
options.parse_standard_inis(errors);
}
-
+
// otherwise, perform validity checks before anything else
if (system != NULL)
{
@@ -189,7 +189,7 @@ int mame_execute(emu_options &options, osd_interface &osd)
web.set_machine(machine);
web.push_message("update_machine");
-
+
// run the machine
error = machine.run(firstrun);
firstrun = false;
diff --git a/src/emu/memarray.h b/src/emu/memarray.h
index 14b70217276..173af39955d 100644
--- a/src/emu/memarray.h
+++ b/src/emu/memarray.h
@@ -70,7 +70,7 @@ public:
// entry-level readers and writers
UINT32 read(int index) { return (this->*m_read_entry)(index); }
void write(int index, UINT32 data) { (this->*m_write_entry)(index, data); }
-
+
// byte/word/dword-level readers and writers
UINT8 read8(offs_t offset) { return reinterpret_cast<UINT8 *>(m_base)[offset]; }
UINT16 read16(offs_t offset) { return reinterpret_cast<UINT16 *>(m_base)[offset]; }
diff --git a/src/emu/netlist/analog/nld_bjt.c b/src/emu/netlist/analog/nld_bjt.c
index 93893a97d10..c5feca26848 100644
--- a/src/emu/netlist/analog/nld_bjt.c
+++ b/src/emu/netlist/analog/nld_bjt.c
@@ -10,28 +10,28 @@
class diode
{
public:
- diode() : m_Is(1e-15), m_VT(0.0258), m_VT_inv(1.0 / m_VT) {}
- diode(const double Is, const double n)
- {
- m_Is = Is;
- m_VT = 0.0258 * n;
- m_VT_inv = 1.0 / m_VT;
- }
- void set(const double Is, const double n)
- {
- m_Is = Is;
- m_VT = 0.0258 * n;
- m_VT_inv = 1.0 / m_VT;
- }
- double I(const double V) const { return m_Is * exp(V * m_VT_inv) - m_Is; }
- double g(const double V) const { return m_Is * m_VT_inv * exp(V * m_VT_inv); }
- double V(const double I) const { return log(1.0 + I / m_Is) * m_VT; }
- double gI(const double I) const { return m_VT_inv * (I + m_Is); }
+ diode() : m_Is(1e-15), m_VT(0.0258), m_VT_inv(1.0 / m_VT) {}
+ diode(const double Is, const double n)
+ {
+ m_Is = Is;
+ m_VT = 0.0258 * n;
+ m_VT_inv = 1.0 / m_VT;
+ }
+ void set(const double Is, const double n)
+ {
+ m_Is = Is;
+ m_VT = 0.0258 * n;
+ m_VT_inv = 1.0 / m_VT;
+ }
+ double I(const double V) const { return m_Is * exp(V * m_VT_inv) - m_Is; }
+ double g(const double V) const { return m_Is * m_VT_inv * exp(V * m_VT_inv); }
+ double V(const double I) const { return log(1.0 + I / m_Is) * m_VT; }
+ double gI(const double I) const { return m_VT_inv * (I + m_Is); }
private:
- double m_Is;
- double m_VT;
- double m_VT_inv;
+ double m_Is;
+ double m_VT;
+ double m_VT_inv;
};
@@ -42,7 +42,7 @@ private:
NETLIB_START(Q)
{
- register_param("model", m_model, "");
+ register_param("model", m_model, "");
}
NETLIB_RESET(Q)
@@ -60,56 +60,56 @@ NETLIB_UPDATE(Q)
NETLIB_START(QBJT_switch)
{
- NETLIB_NAME(Q)::start();
+ NETLIB_NAME(Q)::start();
- register_terminal("B", m_RB.m_P);
- register_terminal("E", m_RB.m_N);
- register_terminal("C", m_RC.m_P);
- register_terminal("_E1", m_RC.m_N);
+ register_terminal("B", m_RB.m_P);
+ register_terminal("E", m_RB.m_N);
+ register_terminal("C", m_RC.m_P);
+ register_terminal("_E1", m_RC.m_N);
- register_terminal("_B1", m_BC_dummy.m_P);
- register_terminal("_C1", m_BC_dummy.m_N);
+ register_terminal("_B1", m_BC_dummy.m_P);
+ register_terminal("_C1", m_BC_dummy.m_N);
- connect(m_RB.m_N, m_RC.m_N);
+ connect(m_RB.m_N, m_RC.m_N);
- connect(m_RB.m_P, m_BC_dummy.m_P);
- connect(m_RC.m_P, m_BC_dummy.m_N);
+ connect(m_RB.m_P, m_BC_dummy.m_P);
+ connect(m_RC.m_P, m_BC_dummy.m_N);
- save(NAME(m_state_on));
+ save(NAME(m_state_on));
- m_RB.set(netlist().gmin(), 0.0, 0.0);
- m_RC.set(netlist().gmin(), 0.0, 0.0);
+ m_RB.set(netlist().gmin(), 0.0, 0.0);
+ m_RC.set(netlist().gmin(), 0.0, 0.0);
- m_BC_dummy.set(netlist().gmin(), 0.0, 0.0);
+ m_BC_dummy.set(netlist().gmin(), 0.0, 0.0);
- m_state_on = 0;
+ m_state_on = 0;
- {
- double IS = m_model.model_value("IS", 1e-15);
- double BF = m_model.model_value("BF", 100);
- double NF = m_model.model_value("NF", 1);
- //double VJE = m_model.dValue("VJE", 0.75);
+ {
+ double IS = m_model.model_value("IS", 1e-15);
+ double BF = m_model.model_value("BF", 100);
+ double NF = m_model.model_value("NF", 1);
+ //double VJE = m_model.dValue("VJE", 0.75);
- set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
+ set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
- double alpha = BF / (1.0 + BF);
+ double alpha = BF / (1.0 + BF);
- diode d(IS, NF);
+ diode d(IS, NF);
- // Assume 5mA Collector current for switch operation
+ // Assume 5mA Collector current for switch operation
- m_V = d.V(0.005 / alpha);
+ m_V = d.V(0.005 / alpha);
- /* Base current is 0.005 / beta
- * as a rough estimate, we just scale the conductance down */
+ /* Base current is 0.005 / beta
+ * as a rough estimate, we just scale the conductance down */
- m_gB = d.gI(0.005 / alpha);
+ m_gB = d.gI(0.005 / alpha);
- if (m_gB < netlist().gmin())
- m_gB = netlist().gmin();
- m_gC = d.gI(0.005); // very rough estimate
- //printf("%f %f \n", m_V, m_gB);
- }
+ if (m_gB < netlist().gmin())
+ m_gB = netlist().gmin();
+ m_gC = d.gI(0.005); // very rough estimate
+ //printf("%f %f \n", m_V, m_gB);
+ }
}
@@ -125,56 +125,56 @@ NETLIB_UPDATE_PARAM(QBJT_switch)
NETLIB_START(QBJT_EB)
{
- NETLIB_NAME(Q)::start();
+ NETLIB_NAME(Q)::start();
- register_terminal("E", m_D_EB.m_P); // Cathode
- register_terminal("B", m_D_EB.m_N); // Anode
+ register_terminal("E", m_D_EB.m_P); // Cathode
+ register_terminal("B", m_D_EB.m_N); // Anode
- register_terminal("C", m_D_CB.m_P); // Cathode
- register_terminal("_B1", m_D_CB.m_N); // Anode
+ register_terminal("C", m_D_CB.m_P); // Cathode
+ register_terminal("_B1", m_D_CB.m_N); // Anode
- register_terminal("_E1", m_D_EC.m_P);
- register_terminal("_C1", m_D_EC.m_N);
+ register_terminal("_E1", m_D_EC.m_P);
+ register_terminal("_C1", m_D_EC.m_N);
- connect(m_D_EB.m_P, m_D_EC.m_P);
- connect(m_D_EB.m_N, m_D_CB.m_N);
- connect(m_D_CB.m_P, m_D_EC.m_N);
+ connect(m_D_EB.m_P, m_D_EC.m_P);
+ connect(m_D_EB.m_N, m_D_CB.m_N);
+ connect(m_D_CB.m_P, m_D_EC.m_N);
- m_gD_BE.save("m_D_BE", *this);
- m_gD_BC.save("m_D_BC", *this);
+ m_gD_BE.save("m_D_BE", *this);
+ m_gD_BC.save("m_D_BC", *this);
- {
- double IS = m_model.model_value("IS", 1e-15);
- double BF = m_model.model_value("BF", 100);
- double NF = m_model.model_value("NF", 1);
- double BR = m_model.model_value("BR", 1);
- double NR = m_model.model_value("NR", 1);
- //double VJE = m_model.dValue("VJE", 0.75);
+ {
+ double IS = m_model.model_value("IS", 1e-15);
+ double BF = m_model.model_value("BF", 100);
+ double NF = m_model.model_value("NF", 1);
+ double BR = m_model.model_value("BR", 1);
+ double NR = m_model.model_value("NR", 1);
+ //double VJE = m_model.dValue("VJE", 0.75);
- set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
- //printf("type %s\n", m_model.model_type().cstr());
+ set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
+ //printf("type %s\n", m_model.model_type().cstr());
- m_alpha_f = BF / (1.0 + BF);
- m_alpha_r = BR / (1.0 + BR);
+ m_alpha_f = BF / (1.0 + BF);
+ m_alpha_r = BR / (1.0 + BR);
- m_gD_BE.set_param(IS / m_alpha_f, NF, netlist().gmin());
- m_gD_BC.set_param(IS / m_alpha_r, NR, netlist().gmin());
- }
+ m_gD_BE.set_param(IS / m_alpha_f, NF, netlist().gmin());
+ m_gD_BC.set_param(IS / m_alpha_r, NR, netlist().gmin());
+ }
}
NETLIB_UPDATE(QBJT_EB)
{
- if (!m_D_EB.m_P.net().isRailNet())
- m_D_EB.m_P.net().solve(); // Basis
- else if (!m_D_EB.m_N.net().isRailNet())
- m_D_EB.m_N.net().solve(); // Emitter
- else
- m_D_CB.m_N.net().solve(); // Collector
+ if (!m_D_EB.m_P.net().isRailNet())
+ m_D_EB.m_P.net().solve(); // Basis
+ else if (!m_D_EB.m_N.net().isRailNet())
+ m_D_EB.m_N.net().solve(); // Emitter
+ else
+ m_D_CB.m_N.net().solve(); // Collector
}
NETLIB_RESET(QBJT_EB)
{
- NETLIB_NAME(Q)::reset();
+ NETLIB_NAME(Q)::reset();
}
@@ -182,4 +182,3 @@ NETLIB_RESET(QBJT_EB)
NETLIB_UPDATE_PARAM(QBJT_EB)
{
}
-
diff --git a/src/emu/netlist/analog/nld_bjt.h b/src/emu/netlist/analog/nld_bjt.h
index 317a390bef4..78306f80ad9 100644
--- a/src/emu/netlist/analog/nld_bjt.h
+++ b/src/emu/netlist/analog/nld_bjt.h
@@ -14,12 +14,12 @@
// ----------------------------------------------------------------------------------------
#define QBJT_SW(_name, _model) \
- NET_REGISTER_DEV(QBJT_switch, _name) \
- NETDEV_PARAMI(_name, model, _model)
+ NET_REGISTER_DEV(QBJT_switch, _name) \
+ NETDEV_PARAMI(_name, model, _model)
#define QBJT_EB(_name, _model) \
- NET_REGISTER_DEV(QBJT_EB, _name) \
- NETDEV_PARAMI(_name, model, _model)
+ NET_REGISTER_DEV(QBJT_EB, _name) \
+ NETDEV_PARAMI(_name, model, _model)
// ----------------------------------------------------------------------------------------
@@ -31,34 +31,34 @@
class NETLIB_NAME(Q) : public netlist_device_t
{
public:
- enum q_type {
- BJT_NPN,
- BJT_PNP
- };
-
- ATTR_COLD NETLIB_NAME(Q)(const family_t afamily)
- : netlist_device_t(afamily)
- , m_qtype(BJT_NPN) { }
-
- inline q_type qtype() const { return m_qtype; }
- inline bool is_qtype(q_type atype) const { return m_qtype == atype; }
- inline void set_qtype(q_type atype) { m_qtype = atype; }
+ enum q_type {
+ BJT_NPN,
+ BJT_PNP
+ };
+
+ ATTR_COLD NETLIB_NAME(Q)(const family_t afamily)
+ : netlist_device_t(afamily)
+ , m_qtype(BJT_NPN) { }
+
+ inline q_type qtype() const { return m_qtype; }
+ inline bool is_qtype(q_type atype) const { return m_qtype == atype; }
+ inline void set_qtype(q_type atype) { m_qtype = atype; }
protected:
- ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
- ATTR_HOT ATTR_ALIGN void update();
+ ATTR_COLD virtual void start();
+ ATTR_COLD virtual void reset();
+ ATTR_HOT ATTR_ALIGN void update();
- netlist_param_model_t m_model;
+ netlist_param_model_t m_model;
private:
- q_type m_qtype;
+ q_type m_qtype;
};
class NETLIB_NAME(QBJT) : public NETLIB_NAME(Q)
{
public:
- ATTR_COLD NETLIB_NAME(QBJT)(const family_t afamily)
- : NETLIB_NAME(Q)(afamily) { }
+ ATTR_COLD NETLIB_NAME(QBJT)(const family_t afamily)
+ : NETLIB_NAME(Q)(afamily) { }
protected:
@@ -89,63 +89,63 @@ private:
class NETLIB_NAME(QBJT_switch) : public NETLIB_NAME(QBJT)
{
public:
- ATTR_COLD NETLIB_NAME(QBJT_switch)()
- : NETLIB_NAME(QBJT)(BJT_SWITCH),
- m_RB(netlist_object_t::ANALOG),
- m_RC(netlist_object_t::ANALOG),
- m_BC_dummy(netlist_object_t::ANALOG),
- m_gB(NETLIST_GMIN_DEFAULT), m_gC(NETLIST_GMIN_DEFAULT), m_V(0.0), m_state_on(0) { }
-
- NETLIB_UPDATE_TERMINALS()
- {
- double m = (is_qtype( BJT_NPN) ? 1 : -1);
-
- int new_state = (m_RB.deltaV() * m > m_V ) ? 1 : 0;
- if (m_state_on ^ new_state)
- {
- double gb = m_gB;
- double gc = m_gC;
- double v = m_V * m;
- if (!new_state )
- {
- // not conducting
- gb = netlist().gmin();
- v = 0;
- gc = netlist().gmin();
- }
- m_RB.set(gb, v, 0.0);
- m_RC.set(gc, 0.0, 0.0);
- m_state_on = new_state;
- }
- }
-
- ATTR_HOT ATTR_ALIGN void virtual update()
- {
- if (!m_RB.m_P.net().isRailNet())
- m_RB.m_P.net().solve(); // Basis
- else if (!m_RB.m_N.net().isRailNet())
- m_RB.m_N.net().solve(); // Emitter
- else if (!m_RC.m_P.net().isRailNet())
- m_RB.m_P.net().solve(); // Collector
- }
-
- nld_twoterm m_RB;
- nld_twoterm m_RC;
-
- // FIXME: the matrix solvers should be devices so we can properly
- // schedule them. This is a workaround and blows netgroup size
-
- nld_twoterm m_BC_dummy;
+ ATTR_COLD NETLIB_NAME(QBJT_switch)()
+ : NETLIB_NAME(QBJT)(BJT_SWITCH),
+ m_RB(netlist_object_t::ANALOG),
+ m_RC(netlist_object_t::ANALOG),
+ m_BC_dummy(netlist_object_t::ANALOG),
+ m_gB(NETLIST_GMIN_DEFAULT), m_gC(NETLIST_GMIN_DEFAULT), m_V(0.0), m_state_on(0) { }
+
+ NETLIB_UPDATE_TERMINALS()
+ {
+ double m = (is_qtype( BJT_NPN) ? 1 : -1);
+
+ int new_state = (m_RB.deltaV() * m > m_V ) ? 1 : 0;
+ if (m_state_on ^ new_state)
+ {
+ double gb = m_gB;
+ double gc = m_gC;
+ double v = m_V * m;
+ if (!new_state )
+ {
+ // not conducting
+ gb = netlist().gmin();
+ v = 0;
+ gc = netlist().gmin();
+ }
+ m_RB.set(gb, v, 0.0);
+ m_RC.set(gc, 0.0, 0.0);
+ m_state_on = new_state;
+ }
+ }
+
+ ATTR_HOT ATTR_ALIGN void virtual update()
+ {
+ if (!m_RB.m_P.net().isRailNet())
+ m_RB.m_P.net().solve(); // Basis
+ else if (!m_RB.m_N.net().isRailNet())
+ m_RB.m_N.net().solve(); // Emitter
+ else if (!m_RC.m_P.net().isRailNet())
+ m_RB.m_P.net().solve(); // Collector
+ }
+
+ nld_twoterm m_RB;
+ nld_twoterm m_RC;
+
+ // FIXME: the matrix solvers should be devices so we can properly
+ // schedule them. This is a workaround and blows netgroup size
+
+ nld_twoterm m_BC_dummy;
protected:
- ATTR_COLD virtual void start();
- ATTR_HOT void update_param();
+ ATTR_COLD virtual void start();
+ ATTR_HOT void update_param();
- double m_gB; // base conductance / switch on
- double m_gC; // collector conductance / switch on
- double m_V; // internal voltage source
- UINT8 m_state_on;
+ double m_gB; // base conductance / switch on
+ double m_gC; // collector conductance / switch on
+ double m_V; // internal voltage source
+ UINT8 m_state_on;
private:
};
@@ -158,53 +158,53 @@ private:
class NETLIB_NAME(QBJT_EB) : public NETLIB_NAME(QBJT)
{
public:
- ATTR_COLD NETLIB_NAME(QBJT_EB)()
- : NETLIB_NAME(QBJT)(BJT_EB),
- m_D_CB(netlist_object_t::ANALOG),
- m_D_EB(netlist_object_t::ANALOG),
- m_D_EC(netlist_object_t::ANALOG)
- { }
-
- NETLIB_UPDATE_TERMINALS()
- {
- double polarity = (qtype() == BJT_NPN ? 1.0 : -1.0);
-
- m_gD_BE.update_diode(-m_D_EB.deltaV() * polarity);
- m_gD_BC.update_diode(-m_D_CB.deltaV() * polarity);
-
- double gee = m_gD_BE.G();
- double gcc = m_gD_BC.G();
- double gec = m_alpha_r * gcc;
- double gce = m_alpha_f * gee;
- double sIe = -m_gD_BE.I() + m_alpha_r * m_gD_BC.I();
- double sIc = m_alpha_f * m_gD_BE.I() - m_gD_BC.I();
- double Ie = (sIe + gee * m_gD_BE.Vd() - gec * m_gD_BC.Vd()) * polarity;
- double Ic = (sIc - gce * m_gD_BE.Vd() + gcc * m_gD_BC.Vd()) * polarity;
- //double Ie = sIe + gee * -m_D_EB.deltaV() - gec * -m_D_CB.deltaV();
- //double Ic = sIc - gce * -m_D_EB.deltaV() + gcc * -m_D_CB.deltaV();
- //printf("EB %f sIe %f sIc %f\n", m_D_BE.deltaV(), sIe, sIc);
-
- m_D_EB.set_mat(gee, gec - gee, gce - gee, gee - gec, Ie, -Ie);
- m_D_CB.set_mat(gcc, gce - gcc, gec - gcc, gcc - gce, Ic, -Ic);
- m_D_EC.set_mat( 0, -gec, -gce, 0, 0, 0);
- }
+ ATTR_COLD NETLIB_NAME(QBJT_EB)()
+ : NETLIB_NAME(QBJT)(BJT_EB),
+ m_D_CB(netlist_object_t::ANALOG),
+ m_D_EB(netlist_object_t::ANALOG),
+ m_D_EC(netlist_object_t::ANALOG)
+ { }
+
+ NETLIB_UPDATE_TERMINALS()
+ {
+ double polarity = (qtype() == BJT_NPN ? 1.0 : -1.0);
+
+ m_gD_BE.update_diode(-m_D_EB.deltaV() * polarity);
+ m_gD_BC.update_diode(-m_D_CB.deltaV() * polarity);
+
+ double gee = m_gD_BE.G();
+ double gcc = m_gD_BC.G();
+ double gec = m_alpha_r * gcc;
+ double gce = m_alpha_f * gee;
+ double sIe = -m_gD_BE.I() + m_alpha_r * m_gD_BC.I();
+ double sIc = m_alpha_f * m_gD_BE.I() - m_gD_BC.I();
+ double Ie = (sIe + gee * m_gD_BE.Vd() - gec * m_gD_BC.Vd()) * polarity;
+ double Ic = (sIc - gce * m_gD_BE.Vd() + gcc * m_gD_BC.Vd()) * polarity;
+ //double Ie = sIe + gee * -m_D_EB.deltaV() - gec * -m_D_CB.deltaV();
+ //double Ic = sIc - gce * -m_D_EB.deltaV() + gcc * -m_D_CB.deltaV();
+ //printf("EB %f sIe %f sIc %f\n", m_D_BE.deltaV(), sIe, sIc);
+
+ m_D_EB.set_mat(gee, gec - gee, gce - gee, gee - gec, Ie, -Ie);
+ m_D_CB.set_mat(gcc, gce - gcc, gec - gcc, gcc - gce, Ic, -Ic);
+ m_D_EC.set_mat( 0, -gec, -gce, 0, 0, 0);
+ }
protected:
- ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
- ATTR_HOT void update_param();
- ATTR_HOT ATTR_ALIGN void virtual update();
+ ATTR_COLD virtual void start();
+ ATTR_COLD virtual void reset();
+ ATTR_HOT void update_param();
+ ATTR_HOT ATTR_ALIGN void virtual update();
- netlist_generic_diode m_gD_BC;
- netlist_generic_diode m_gD_BE;
+ netlist_generic_diode m_gD_BC;
+ netlist_generic_diode m_gD_BE;
- nld_twoterm m_D_CB; // gcc, gce - gcc, gec - gcc, gcc - gce | Ic
- nld_twoterm m_D_EB; // gee, gec - gee, gce - gee, gee - gec | Ie
- nld_twoterm m_D_EC; // 0, -gec, -gcc, 0 | 0
+ nld_twoterm m_D_CB; // gcc, gce - gcc, gec - gcc, gcc - gce | Ic
+ nld_twoterm m_D_EB; // gee, gec - gee, gce - gee, gee - gec | Ie
+ nld_twoterm m_D_EC; // 0, -gec, -gcc, 0 | 0
- double m_alpha_f;
- double m_alpha_r;
+ double m_alpha_f;
+ double m_alpha_r;
private:
};
diff --git a/src/emu/netlist/analog/nld_fourterm.c b/src/emu/netlist/analog/nld_fourterm.c
index 301aca9a4e7..61579e50bfb 100644
--- a/src/emu/netlist/analog/nld_fourterm.c
+++ b/src/emu/netlist/analog/nld_fourterm.c
@@ -13,45 +13,45 @@
NETLIB_START(VCCS)
{
- register_param("G", m_G, 1.0);
- register_param("RI", m_RI, 1.0 / netlist().gmin());
+ register_param("G", m_G, 1.0);
+ register_param("RI", m_RI, 1.0 / netlist().gmin());
- register_terminal("IP", m_IP);
- register_terminal("IN", m_IN);
- register_terminal("OP", m_OP);
- register_terminal("ON", m_ON);
+ register_terminal("IP", m_IP);
+ register_terminal("IN", m_IN);
+ register_terminal("OP", m_OP);
+ register_terminal("ON", m_ON);
- register_terminal("_OP1", m_OP1);
- register_terminal("_ON1", m_ON1);
+ register_terminal("_OP1", m_OP1);
+ register_terminal("_ON1", m_ON1);
- m_IP.m_otherterm = &m_IN; // <= this should be NULL and terminal be filtered out prior to solving...
- m_IN.m_otherterm = &m_IP; // <= this should be NULL and terminal be filtered out prior to solving...
+ m_IP.m_otherterm = &m_IN; // <= this should be NULL and terminal be filtered out prior to solving...
+ m_IN.m_otherterm = &m_IP; // <= this should be NULL and terminal be filtered out prior to solving...
- m_OP.m_otherterm = &m_IP;
- m_OP1.m_otherterm = &m_IN;
+ m_OP.m_otherterm = &m_IP;
+ m_OP1.m_otherterm = &m_IN;
- m_ON.m_otherterm = &m_IP;
- m_ON1.m_otherterm = &m_IN;
+ m_ON.m_otherterm = &m_IP;
+ m_ON1.m_otherterm = &m_IN;
- connect(m_OP, m_OP1);
- connect(m_ON, m_ON1);
+ connect(m_OP, m_OP1);
+ connect(m_ON, m_ON1);
- m_gfac = 1.0;
+ m_gfac = 1.0;
}
NETLIB_RESET(VCCS)
{
- const double m_mult = m_G.Value() * m_gfac; // 1.0 ==> 1V ==> 1A
- const double GI = 1.0 / m_RI.Value();
+ const double m_mult = m_G.Value() * m_gfac; // 1.0 ==> 1V ==> 1A
+ const double GI = 1.0 / m_RI.Value();
- m_IP.set(GI);
- m_IN.set(GI);
+ m_IP.set(GI);
+ m_IN.set(GI);
- m_OP.set(m_mult, 0.0);
- m_OP1.set(-m_mult, 0.0);
+ m_OP.set(m_mult, 0.0);
+ m_OP1.set(-m_mult, 0.0);
- m_ON.set(-m_mult, 0.0);
- m_ON1.set(m_mult, 0.0);
+ m_ON.set(-m_mult, 0.0);
+ m_ON1.set(m_mult, 0.0);
}
NETLIB_UPDATE_PARAM(VCCS)
@@ -60,16 +60,16 @@ NETLIB_UPDATE_PARAM(VCCS)
NETLIB_UPDATE(VCCS)
{
- /* only called if connected to a rail net ==> notify the solver to recalculate */
- /* Big FIXME ... */
- if (!m_IP.net().isRailNet())
- m_IP.net().solve();
- else if (!m_IN.net().isRailNet())
- m_IN.net().solve();
- else if (!m_OP.net().isRailNet())
- m_OP.net().solve();
- else if (!m_ON.net().isRailNet())
- m_ON.net().solve();
+ /* only called if connected to a rail net ==> notify the solver to recalculate */
+ /* Big FIXME ... */
+ if (!m_IP.net().isRailNet())
+ m_IP.net().solve();
+ else if (!m_IN.net().isRailNet())
+ m_IN.net().solve();
+ else if (!m_OP.net().isRailNet())
+ m_OP.net().solve();
+ else if (!m_ON.net().isRailNet())
+ m_ON.net().solve();
}
// ----------------------------------------------------------------------------------------
@@ -78,30 +78,29 @@ NETLIB_UPDATE(VCCS)
NETLIB_START(VCVS)
{
- NETLIB_NAME(VCCS)::start();
+ NETLIB_NAME(VCCS)::start();
- register_param("RO", m_RO, 1.0);
+ register_param("RO", m_RO, 1.0);
- register_terminal("_OP2", m_OP2);
- register_terminal("_ON2", m_ON2);
+ register_terminal("_OP2", m_OP2);
+ register_terminal("_ON2", m_ON2);
- m_OP2.m_otherterm = &m_ON2;
- m_ON2.m_otherterm = &m_OP2;
+ m_OP2.m_otherterm = &m_ON2;
+ m_ON2.m_otherterm = &m_OP2;
- connect(m_OP2, m_OP1);
- connect(m_ON2, m_ON1);
+ connect(m_OP2, m_OP1);
+ connect(m_ON2, m_ON1);
}
NETLIB_RESET(VCVS)
{
- m_gfac = 1.0 / m_RO.Value();
- NETLIB_NAME(VCCS)::reset();
+ m_gfac = 1.0 / m_RO.Value();
+ NETLIB_NAME(VCCS)::reset();
- m_OP2.set(1.0 / m_RO.Value());
- m_ON2.set(1.0 / m_RO.Value());
+ m_OP2.set(1.0 / m_RO.Value());
+ m_ON2.set(1.0 / m_RO.Value());
}
NETLIB_UPDATE_PARAM(VCVS)
{
}
-
diff --git a/src/emu/netlist/analog/nld_fourterm.h b/src/emu/netlist/analog/nld_fourterm.h
index 0f330333bcd..56d307a653f 100644
--- a/src/emu/netlist/analog/nld_fourterm.h
+++ b/src/emu/netlist/analog/nld_fourterm.h
@@ -15,10 +15,10 @@
// ----------------------------------------------------------------------------------------
#define VCCS(_name) \
- NET_REGISTER_DEV(VCCS, _name)
+ NET_REGISTER_DEV(VCCS, _name)
#define VCVS(_name) \
- NET_REGISTER_DEV(VCVS, _name)
+ NET_REGISTER_DEV(VCVS, _name)
// ----------------------------------------------------------------------------------------
// nld_CCCS
@@ -70,30 +70,30 @@
class NETLIB_NAME(VCCS) : public netlist_device_t
{
public:
- ATTR_COLD NETLIB_NAME(VCCS)()
- : netlist_device_t(VCCS) { }
- ATTR_COLD NETLIB_NAME(VCCS)(const family_t afamily)
- : netlist_device_t(afamily) { }
+ ATTR_COLD NETLIB_NAME(VCCS)()
+ : netlist_device_t(VCCS) { }
+ ATTR_COLD NETLIB_NAME(VCCS)(const family_t afamily)
+ : netlist_device_t(afamily) { }
protected:
- ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
- ATTR_COLD virtual void update_param();
- ATTR_HOT ATTR_ALIGN void update();
+ ATTR_COLD virtual void start();
+ ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void update_param();
+ ATTR_HOT ATTR_ALIGN void update();
- netlist_terminal_t m_OP;
- netlist_terminal_t m_ON;
+ netlist_terminal_t m_OP;
+ netlist_terminal_t m_ON;
- netlist_terminal_t m_IP;
- netlist_terminal_t m_IN;
+ netlist_terminal_t m_IP;
+ netlist_terminal_t m_IN;
- netlist_terminal_t m_OP1;
- netlist_terminal_t m_ON1;
+ netlist_terminal_t m_OP1;
+ netlist_terminal_t m_ON1;
- netlist_param_double_t m_G;
- netlist_param_double_t m_RI;
+ netlist_param_double_t m_G;
+ netlist_param_double_t m_RI;
- double m_gfac;
+ double m_gfac;
};
// ----------------------------------------------------------------------------------------
@@ -127,19 +127,19 @@ protected:
class NETLIB_NAME(VCVS) : public NETLIB_NAME(VCCS)
{
public:
- ATTR_COLD NETLIB_NAME(VCVS)()
- : NETLIB_NAME(VCCS)(VCVS) { }
+ ATTR_COLD NETLIB_NAME(VCVS)()
+ : NETLIB_NAME(VCCS)(VCVS) { }
protected:
- ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
- ATTR_COLD virtual void update_param();
- //ATTR_HOT ATTR_ALIGN void update();
+ ATTR_COLD virtual void start();
+ ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void update_param();
+ //ATTR_HOT ATTR_ALIGN void update();
- netlist_terminal_t m_OP2;
- netlist_terminal_t m_ON2;
+ netlist_terminal_t m_OP2;
+ netlist_terminal_t m_ON2;
- netlist_param_double_t m_RO;
+ netlist_param_double_t m_RO;
};
diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c
index df70766d589..6e4d02c9667 100644
--- a/src/emu/netlist/analog/nld_solver.c
+++ b/src/emu/netlist/analog/nld_solver.c
@@ -20,157 +20,157 @@
ATTR_COLD void netlist_matrix_solver_t::setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &aowner)
{
- m_owner = &aowner;
-
- NL_VERBOSE_OUT(("New solver setup\n"));
-
- for (netlist_net_t * const * pn = nets.first(); pn != NULL; pn = nets.next(pn))
- {
- NL_VERBOSE_OUT(("setting up net\n"));
-
- m_nets.add(*pn);
-
- (*pn)->m_solver = this;
-
- for (netlist_core_terminal_t *p = (*pn)->m_list.first(); p != NULL; p = (*pn)->m_list.next(p))
- {
- NL_VERBOSE_OUT(("%s %s %d\n", p->name().cstr(), (*pn)->name().cstr(), (int) (*pn)->isRailNet()));
- switch (p->type())
- {
- case netlist_terminal_t::TERMINAL:
- switch (p->netdev().family())
- {
- case netlist_device_t::CAPACITOR:
- if (!m_steps.contains(&p->netdev()))
- m_steps.add(&p->netdev());
- break;
- case netlist_device_t::BJT_EB:
- case netlist_device_t::DIODE:
- //case netlist_device_t::VCVS:
- case netlist_device_t::BJT_SWITCH:
- NL_VERBOSE_OUT(("found BJT/Diode\n"));
- if (!m_dynamic.contains(&p->netdev()))
- m_dynamic.add(&p->netdev());
- break;
- default:
- break;
- }
- {
- netlist_terminal_t *pterm = static_cast<netlist_terminal_t *>(p);
- if (pterm->m_otherterm->net().isRailNet())
- (*pn)->m_rails.add(pterm);
- else
- (*pn)->m_terms.add(pterm);
- }
- NL_VERBOSE_OUT(("Added terminal\n"));
- break;
- case netlist_terminal_t::INPUT:
- if (!m_inps.contains(p))
- m_inps.add(p);
- NL_VERBOSE_OUT(("Added input\n"));
- break;
- default:
- owner().netlist().error("unhandled element found\n");
- break;
- }
- }
- NL_VERBOSE_OUT(("added net with %d populated connections (%d railnets)\n", (*pn)->m_terms.count(), (*pn)->m_rails.count()));
- }
+ m_owner = &aowner;
+
+ NL_VERBOSE_OUT(("New solver setup\n"));
+
+ for (netlist_net_t * const * pn = nets.first(); pn != NULL; pn = nets.next(pn))
+ {
+ NL_VERBOSE_OUT(("setting up net\n"));
+
+ m_nets.add(*pn);
+
+ (*pn)->m_solver = this;
+
+ for (netlist_core_terminal_t *p = (*pn)->m_list.first(); p != NULL; p = (*pn)->m_list.next(p))
+ {
+ NL_VERBOSE_OUT(("%s %s %d\n", p->name().cstr(), (*pn)->name().cstr(), (int) (*pn)->isRailNet()));
+ switch (p->type())
+ {
+ case netlist_terminal_t::TERMINAL:
+ switch (p->netdev().family())
+ {
+ case netlist_device_t::CAPACITOR:
+ if (!m_steps.contains(&p->netdev()))
+ m_steps.add(&p->netdev());
+ break;
+ case netlist_device_t::BJT_EB:
+ case netlist_device_t::DIODE:
+ //case netlist_device_t::VCVS:
+ case netlist_device_t::BJT_SWITCH:
+ NL_VERBOSE_OUT(("found BJT/Diode\n"));
+ if (!m_dynamic.contains(&p->netdev()))
+ m_dynamic.add(&p->netdev());
+ break;
+ default:
+ break;
+ }
+ {
+ netlist_terminal_t *pterm = static_cast<netlist_terminal_t *>(p);
+ if (pterm->m_otherterm->net().isRailNet())
+ (*pn)->m_rails.add(pterm);
+ else
+ (*pn)->m_terms.add(pterm);
+ }
+ NL_VERBOSE_OUT(("Added terminal\n"));
+ break;
+ case netlist_terminal_t::INPUT:
+ if (!m_inps.contains(p))
+ m_inps.add(p);
+ NL_VERBOSE_OUT(("Added input\n"));
+ break;
+ default:
+ owner().netlist().error("unhandled element found\n");
+ break;
+ }
+ }
+ NL_VERBOSE_OUT(("added net with %d populated connections (%d railnets)\n", (*pn)->m_terms.count(), (*pn)->m_rails.count()));
+ }
}
ATTR_HOT void netlist_matrix_solver_t::update_inputs()
{
- for (netlist_core_terminal_t * const *p = m_inps.first(); p != NULL; p = m_inps.next(p))
- {
- if ((*p)->net().m_last_Analog != (*p)->net().m_cur_Analog)
- {
- (*p)->netdev().update_dev();
- }
- }
- for (netlist_core_terminal_t * const *p = m_inps.first(); p != NULL; p = m_inps.next(p))
- {
- (*p)->net().m_last_Analog = (*p)->net().m_cur_Analog;
- }
+ for (netlist_core_terminal_t * const *p = m_inps.first(); p != NULL; p = m_inps.next(p))
+ {
+ if ((*p)->net().m_last_Analog != (*p)->net().m_cur_Analog)
+ {
+ (*p)->netdev().update_dev();
+ }
+ }
+ for (netlist_core_terminal_t * const *p = m_inps.first(); p != NULL; p = m_inps.next(p))
+ {
+ (*p)->net().m_last_Analog = (*p)->net().m_cur_Analog;
+ }
}
ATTR_HOT void netlist_matrix_solver_t::update_dynamic()
{
- /* update all non-linear devices */
- for (netlist_core_device_t * const *p = m_dynamic.first(); p != NULL; p = m_dynamic.next(p))
- switch ((*p)->family())
- {
- case netlist_device_t::DIODE:
- static_cast<NETLIB_NAME(D) *>((*p))->update_terminals();
- break;
- default:
- (*p)->update_terminals();
- break;
- }
+ /* update all non-linear devices */
+ for (netlist_core_device_t * const *p = m_dynamic.first(); p != NULL; p = m_dynamic.next(p))
+ switch ((*p)->family())
+ {
+ case netlist_device_t::DIODE:
+ static_cast<NETLIB_NAME(D) *>((*p))->update_terminals();
+ break;
+ default:
+ (*p)->update_terminals();
+ break;
+ }
}
ATTR_HOT void netlist_matrix_solver_t::schedule()
{
- if (!solve())
- {
- // NL_VERBOSE_OUT(("update_inputs\n");
- update_inputs();
- }
- else
- {
- m_owner->netlist().warning("Matrix solver reschedule .. Consider increasing RESCHED_LOOPS");
- if (m_owner != NULL)
- this->m_owner->schedule();
- }
- //solve();
- // update_inputs();
+ if (!solve())
+ {
+ // NL_VERBOSE_OUT(("update_inputs\n");
+ update_inputs();
+ }
+ else
+ {
+ m_owner->netlist().warning("Matrix solver reschedule .. Consider increasing RESCHED_LOOPS");
+ if (m_owner != NULL)
+ this->m_owner->schedule();
+ }
+ //solve();
+ // update_inputs();
}
ATTR_COLD void netlist_matrix_solver_t::reset()
{
- m_last_step = netlist_time::zero;
+ m_last_step = netlist_time::zero;
}
ATTR_HOT void netlist_matrix_solver_t::step(const netlist_time delta)
{
- const double dd = delta.as_double();
- for (int k=0; k < m_steps.count(); k++)
- m_steps[k]->step_time(dd);
+ const double dd = delta.as_double();
+ for (int k=0; k < m_steps.count(); k++)
+ m_steps[k]->step_time(dd);
}
ATTR_HOT bool netlist_matrix_solver_t::solve()
{
- int resched_cnt = 0;
-
- netlist_time now = owner().netlist().time();
- netlist_time delta = now - m_last_step;
-
- if (delta < netlist_time::from_nsec(1)) // always update capacitors
- delta = netlist_time::from_nsec(1);
- {
- NL_VERBOSE_OUT(("Step!\n"));
- /* update all terminals for new time step */
- m_last_step = now;
- step(delta);
- }
-
- if (is_dynamic())
- {
- int this_resched;
- do
- {
- update_dynamic();
- this_resched = solve_non_dynamic();
- resched_cnt += this_resched;
- } while (this_resched > 1 && resched_cnt < m_params.m_resched_loops);
- }
- else
- {
- resched_cnt = solve_non_dynamic();
- //printf("resched_cnt %d %d\n", resched_cnt, m_resched_loops);
- }
- return (resched_cnt >= m_params.m_resched_loops);
+ int resched_cnt = 0;
+
+ netlist_time now = owner().netlist().time();
+ netlist_time delta = now - m_last_step;
+
+ if (delta < netlist_time::from_nsec(1)) // always update capacitors
+ delta = netlist_time::from_nsec(1);
+ {
+ NL_VERBOSE_OUT(("Step!\n"));
+ /* update all terminals for new time step */
+ m_last_step = now;
+ step(delta);
+ }
+
+ if (is_dynamic())
+ {
+ int this_resched;
+ do
+ {
+ update_dynamic();
+ this_resched = solve_non_dynamic();
+ resched_cnt += this_resched;
+ } while (this_resched > 1 && resched_cnt < m_params.m_resched_loops);
+ }
+ else
+ {
+ resched_cnt = solve_non_dynamic();
+ //printf("resched_cnt %d %d\n", resched_cnt, m_resched_loops);
+ }
+ return (resched_cnt >= m_params.m_resched_loops);
}
// ----------------------------------------------------------------------------------------
@@ -181,241 +181,239 @@ ATTR_HOT bool netlist_matrix_solver_t::solve()
template <int m_N, int _storage_N>
ATTR_COLD int netlist_matrix_solver_direct_t<m_N, _storage_N>::get_net_idx(netlist_net_t *net)
{
- for (int k = 0; k < N(); k++)
- if (m_nets[k] == net)
- return k;
- return -1;
+ for (int k = 0; k < N(); k++)
+ if (m_nets[k] == net)
+ return k;
+ return -1;
}
template <int m_N, int _storage_N>
ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner)
{
- netlist_matrix_solver_t::setup(nets, owner);
-
- m_term_num = 0;
- m_rail_start = 0;
- for (int k = 0; k < N(); k++)
- {
- netlist_net_t *net = m_nets[k];
- const netlist_net_t::terminal_list_t &terms = net->m_terms;
- for (int i = 0; i < terms.count(); i++)
- {
- m_terms[m_term_num].net_this = k;
- int ot = get_net_idx(&terms[i]->m_otherterm->net());
- m_terms[m_term_num].net_other = ot;
- m_terms[m_term_num].term = terms[i];
- if (ot>=0)
- {
- m_term_num++;
- SOLVER_VERBOSE_OUT(("Net %d Term %s %f %f\n", k, terms[i]->name().cstr(), terms[i]->m_gt, terms[i]->m_go));
- }
- }
- }
- m_rail_start = m_term_num;
- for (int k = 0; k < N(); k++)
- {
- netlist_net_t *net = m_nets[k];
- const netlist_net_t::terminal_list_t &terms = net->m_terms;
- const netlist_net_t::terminal_list_t &rails = net->m_rails;
- for (int i = 0; i < terms.count(); i++)
- {
- m_terms[m_term_num].net_this = k;
- int ot = get_net_idx(&terms[i]->m_otherterm->net());
- m_terms[m_term_num].net_other = ot;
- m_terms[m_term_num].term = terms[i];
- if (ot<0)
- {
- m_term_num++;
- SOLVER_VERBOSE_OUT(("found term with missing othernet %s\n", terms[i]->name().cstr()));
- }
- }
- for (int i = 0; i < rails.count(); i++)
- {
- m_terms[m_term_num].net_this = k;
- m_terms[m_term_num].net_other = -1; //get_net_idx(&rails[i]->m_otherterm->net());
- m_terms[m_term_num].term = rails[i];
- m_term_num++;
- SOLVER_VERBOSE_OUT(("Net %d Rail %s %f %f\n", k, rails[i]->name().cstr(), rails[i]->m_gt, rails[i]->m_go));
- }
- }
+ netlist_matrix_solver_t::setup(nets, owner);
+
+ m_term_num = 0;
+ m_rail_start = 0;
+ for (int k = 0; k < N(); k++)
+ {
+ netlist_net_t *net = m_nets[k];
+ const netlist_net_t::terminal_list_t &terms = net->m_terms;
+ for (int i = 0; i < terms.count(); i++)
+ {
+ m_terms[m_term_num].net_this = k;
+ int ot = get_net_idx(&terms[i]->m_otherterm->net());
+ m_terms[m_term_num].net_other = ot;
+ m_terms[m_term_num].term = terms[i];
+ if (ot>=0)
+ {
+ m_term_num++;
+ SOLVER_VERBOSE_OUT(("Net %d Term %s %f %f\n", k, terms[i]->name().cstr(), terms[i]->m_gt, terms[i]->m_go));
+ }
+ }
+ }
+ m_rail_start = m_term_num;
+ for (int k = 0; k < N(); k++)
+ {
+ netlist_net_t *net = m_nets[k];
+ const netlist_net_t::terminal_list_t &terms = net->m_terms;
+ const netlist_net_t::terminal_list_t &rails = net->m_rails;
+ for (int i = 0; i < terms.count(); i++)
+ {
+ m_terms[m_term_num].net_this = k;
+ int ot = get_net_idx(&terms[i]->m_otherterm->net());
+ m_terms[m_term_num].net_other = ot;
+ m_terms[m_term_num].term = terms[i];
+ if (ot<0)
+ {
+ m_term_num++;
+ SOLVER_VERBOSE_OUT(("found term with missing othernet %s\n", terms[i]->name().cstr()));
+ }
+ }
+ for (int i = 0; i < rails.count(); i++)
+ {
+ m_terms[m_term_num].net_this = k;
+ m_terms[m_term_num].net_other = -1; //get_net_idx(&rails[i]->m_otherterm->net());
+ m_terms[m_term_num].term = rails[i];
+ m_term_num++;
+ SOLVER_VERBOSE_OUT(("Net %d Rail %s %f %f\n", k, rails[i]->name().cstr(), rails[i]->m_gt, rails[i]->m_go));
+ }
+ }
}
template <int m_N, int _storage_N>
ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::build_LE(
- double (* RESTRICT A)[_storage_N],
- double (* RESTRICT RHS))
+ double (* RESTRICT A)[_storage_N],
+ double (* RESTRICT RHS))
{
-
#if 0
- for (int i = 0; i < m_term_num; i++)
- {
- terms_t &t = m_terms[i];
- m_RHS[t.net_this] += t.term->m_Idr;
- m_A[t.net_this][t.net_this] += t.term->m_gt;
- if (t.net_other >= 0)
- {
- //m_A[t.net_other][t.net_other] += t.term->m_otherterm->m_gt;
- m_A[t.net_this][t.net_other] += -t.term->m_go;
- //m_A[t.net_other][t.net_this] += -t.term->m_otherterm->m_go;
- }
- else
- m_RHS[t.net_this] += t.term->m_go * t.term->m_otherterm->net().Q_Analog();
- }
+ for (int i = 0; i < m_term_num; i++)
+ {
+ terms_t &t = m_terms[i];
+ m_RHS[t.net_this] += t.term->m_Idr;
+ m_A[t.net_this][t.net_this] += t.term->m_gt;
+ if (t.net_other >= 0)
+ {
+ //m_A[t.net_other][t.net_other] += t.term->m_otherterm->m_gt;
+ m_A[t.net_this][t.net_other] += -t.term->m_go;
+ //m_A[t.net_other][t.net_this] += -t.term->m_otherterm->m_go;
+ }
+ else
+ m_RHS[t.net_this] += t.term->m_go * t.term->m_otherterm->net().Q_Analog();
+ }
#else
- for (int i = 0; i < m_rail_start; i++)
- {
- terms_t &t = m_terms[i];
- //printf("A %d %d %s %f %f\n",t.net_this, t.net_other, t.term->name().cstr(), t.term->m_gt, t.term->m_go);
- RHS[t.net_this] += t.term->m_Idr;
- A[t.net_this][t.net_this] += t.term->m_gt;
-
- A[t.net_this][t.net_other] += -t.term->m_go;
- }
- for (int i = m_rail_start; i < m_term_num; i++)
- {
- terms_t &t = m_terms[i];
- RHS[t.net_this] += t.term->m_Idr;
- A[t.net_this][t.net_this] += t.term->m_gt;
-
- RHS[t.net_this] += t.term->m_go * t.term->m_otherterm->net().Q_Analog();
- }
+ for (int i = 0; i < m_rail_start; i++)
+ {
+ terms_t &t = m_terms[i];
+ //printf("A %d %d %s %f %f\n",t.net_this, t.net_other, t.term->name().cstr(), t.term->m_gt, t.term->m_go);
+ RHS[t.net_this] += t.term->m_Idr;
+ A[t.net_this][t.net_this] += t.term->m_gt;
+
+ A[t.net_this][t.net_other] += -t.term->m_go;
+ }
+ for (int i = m_rail_start; i < m_term_num; i++)
+ {
+ terms_t &t = m_terms[i];
+ RHS[t.net_this] += t.term->m_Idr;
+ A[t.net_this][t.net_this] += t.term->m_gt;
+
+ RHS[t.net_this] += t.term->m_go * t.term->m_otherterm->net().Q_Analog();
+ }
#endif
}
template <int m_N, int _storage_N>
ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::gauss_LE(
- double (* RESTRICT A)[_storage_N],
- double (* RESTRICT RHS),
- double (* RESTRICT x))
+ double (* RESTRICT A)[_storage_N],
+ double (* RESTRICT RHS),
+ double (* RESTRICT x))
{
#if 0
- for (int i = 0; i < N(); i++)
- {
- for (int k = 0; k < N(); k++)
- printf("%f ", A[i][k]);
- printf("| %f = %f \n", x[i], RHS[i]);
- }
- printf("\n");
+ for (int i = 0; i < N(); i++)
+ {
+ for (int k = 0; k < N(); k++)
+ printf("%f ", A[i][k]);
+ printf("| %f = %f \n", x[i], RHS[i]);
+ }
+ printf("\n");
#endif
- for (int i = 0; i < N(); i++) {
-
+ for (int i = 0; i < N(); i++) {
#if 0
- /* Find the row with the largest first value */
- maxrow = i;
- for (j=i+1;j<n;j++) {
- if (ABS(a[i][j]) > ABS(a[i][maxrow]))
- maxrow = j;
- }
-
- /* Swap the maxrow and ith row */
- for (k=i;k<n+1;k++) {
- tmp = a[k][i];
- a[k][i] = a[k][maxrow];
- a[k][maxrow] = tmp;
- }
+ /* Find the row with the largest first value */
+ maxrow = i;
+ for (j=i+1;j<n;j++) {
+ if (ABS(a[i][j]) > ABS(a[i][maxrow]))
+ maxrow = j;
+ }
+
+ /* Swap the maxrow and ith row */
+ for (k=i;k<n+1;k++) {
+ tmp = a[k][i];
+ a[k][i] = a[k][maxrow];
+ a[k][maxrow] = tmp;
+ }
#endif
- /* Singular matrix? */
- double f = A[i][i];
- //if (fabs(f) < 1e-20) printf("Singular!");
- f = 1.0 / f;
-
- /* Eliminate column i from row j */
- for (int j = i + 1; j < N(); j++)
- {
- double f1 = A[j][i] * f;
-
- if (f1 != 0.0)
- {
- for (int k = i; k < N(); k++)
- {
- A[j][k] -= A[i][k] * f1;
- }
- RHS[j] -= RHS[i] * f1;
- }
- }
- }
- /* back substitution */
- for (int j = N() - 1; j >= 0; j--)
- {
- double tmp = 0;
- for (int k = j + 1; k < N(); k++)
- tmp += A[j][k] * x[k];
- x[j] = (RHS[j] - tmp) / A[j][j];
- }
+ /* Singular matrix? */
+ double f = A[i][i];
+ //if (fabs(f) < 1e-20) printf("Singular!");
+ f = 1.0 / f;
+
+ /* Eliminate column i from row j */
+ for (int j = i + 1; j < N(); j++)
+ {
+ double f1 = A[j][i] * f;
+
+ if (f1 != 0.0)
+ {
+ for (int k = i; k < N(); k++)
+ {
+ A[j][k] -= A[i][k] * f1;
+ }
+ RHS[j] -= RHS[i] * f1;
+ }
+ }
+ }
+ /* back substitution */
+ for (int j = N() - 1; j >= 0; j--)
+ {
+ double tmp = 0;
+ for (int k = j + 1; k < N(); k++)
+ tmp += A[j][k] * x[k];
+ x[j] = (RHS[j] - tmp) / A[j][j];
+ }
#if 0
- printf("Solution:\n");
- for (int i = 0; i < N(); i++)
- {
- for (int k = 0; k < N(); k++)
- printf("%f ", A[i][k]);
- printf("| %f = %f \n", x[i], RHS[i]);
- }
- printf("\n");
+ printf("Solution:\n");
+ for (int i = 0; i < N(); i++)
+ {
+ for (int k = 0; k < N(); k++)
+ printf("%f ", A[i][k]);
+ printf("| %f = %f \n", x[i], RHS[i]);
+ }
+ printf("\n");
#endif
}
template <int m_N, int _storage_N>
ATTR_HOT double netlist_matrix_solver_direct_t<m_N, _storage_N>::delta(
- const double (* RESTRICT RHS),
- const double (* RESTRICT V))
+ const double (* RESTRICT RHS),
+ const double (* RESTRICT V))
{
- double cerr = 0;
- double cerr2 = 0;
- for (int i = 0; i < this->N(); i++)
- {
- double e = (V[i] - this->m_nets[i]->m_cur_Analog);
- double e2 = (RHS[i] - this->m_RHS[i]);
- cerr += e * e;
- cerr2 += e2 * e2;
- }
- return (cerr + cerr2*(100000.0 * 100000.0)) / this->N();
+ double cerr = 0;
+ double cerr2 = 0;
+ for (int i = 0; i < this->N(); i++)
+ {
+ double e = (V[i] - this->m_nets[i]->m_cur_Analog);
+ double e2 = (RHS[i] - this->m_RHS[i]);
+ cerr += e * e;
+ cerr2 += e2 * e2;
+ }
+ return (cerr + cerr2*(100000.0 * 100000.0)) / this->N();
}
template <int m_N, int _storage_N>
ATTR_HOT void netlist_matrix_solver_direct_t<m_N, _storage_N>::store(
- const double (* RESTRICT RHS),
- const double (* RESTRICT V))
+ const double (* RESTRICT RHS),
+ const double (* RESTRICT V))
{
- for (int i = 0; i < this->N(); i++)
- {
- this->m_nets[i]->m_cur_Analog = this->m_nets[i]->m_new_Analog = V[i];
- }
- if (RHS != NULL)
- {
- for (int i = 0; i < this->N(); i++)
- {
- this->m_RHS[i] = RHS[i];
- }
- }
+ for (int i = 0; i < this->N(); i++)
+ {
+ this->m_nets[i]->m_cur_Analog = this->m_nets[i]->m_new_Analog = V[i];
+ }
+ if (RHS != NULL)
+ {
+ for (int i = 0; i < this->N(); i++)
+ {
+ this->m_RHS[i] = RHS[i];
+ }
+ }
}
template <int m_N, int _storage_N>
ATTR_HOT int netlist_matrix_solver_direct_t<m_N, _storage_N>::solve_non_dynamic()
{
- double A[_storage_N][_storage_N] = { { 0.0 } };
- double RHS[_storage_N] = { 0.0 };
- double new_v[_storage_N] = { 0.0 };
+ double A[_storage_N][_storage_N] = { { 0.0 } };
+ double RHS[_storage_N] = { 0.0 };
+ double new_v[_storage_N] = { 0.0 };
- this->build_LE(A, RHS);
+ this->build_LE(A, RHS);
- this->gauss_LE(A, RHS, new_v);
+ this->gauss_LE(A, RHS, new_v);
- if (this->is_dynamic())
- {
- double err = delta(RHS, new_v);
+ if (this->is_dynamic())
+ {
+ double err = delta(RHS, new_v);
- store(RHS, new_v);
+ store(RHS, new_v);
- if (err > this->m_params.m_accuracy * this->m_params.m_accuracy)
- {
- return 2;
- }
- return 1;
- }
- store(NULL, new_v); // ==> No need to store RHS
- return 1;
+ if (err > this->m_params.m_accuracy * this->m_params.m_accuracy)
+ {
+ return 2;
+ }
+ return 1;
+ }
+ store(NULL, new_v); // ==> No need to store RHS
+ return 1;
}
@@ -427,43 +425,43 @@ ATTR_HOT int netlist_matrix_solver_direct1_t::solve_non_dynamic()
{
#if 1
- double gtot_t = 0.0;
- double RHS_t = 0.0;
+ double gtot_t = 0.0;
+ double RHS_t = 0.0;
- netlist_net_t *net = m_nets[0];
- const netlist_net_t::terminal_list_t &rails = net->m_rails;
- int rail_count = rails.count();
+ netlist_net_t *net = m_nets[0];
+ const netlist_net_t::terminal_list_t &rails = net->m_rails;
+ int rail_count = rails.count();
- for (int i = 0; i < rail_count; i++)
- {
- gtot_t += rails[i]->m_gt;
- RHS_t += rails[i]->m_Idr;
- RHS_t += rails[i]->m_go * rails[i]->m_otherterm->net().Q_Analog();
- }
+ for (int i = 0; i < rail_count; i++)
+ {
+ gtot_t += rails[i]->m_gt;
+ RHS_t += rails[i]->m_Idr;
+ RHS_t += rails[i]->m_go * rails[i]->m_otherterm->net().Q_Analog();
+ }
- double iIdr = RHS_t;
- double new_val = iIdr / gtot_t;
+ double iIdr = RHS_t;
+ double new_val = iIdr / gtot_t;
#else
- netlist_net_t *net = m_nets[0];
- double m_A[1][1] = { {0.0} };
- double m_RHS[1] = { 0.0 };
- build_LE(m_A, m_RHS);
- //NL_VERBOSE_OUT(("%f %f\n", new_val, m_RHS[0] / m_A[0][0]);
+ netlist_net_t *net = m_nets[0];
+ double m_A[1][1] = { {0.0} };
+ double m_RHS[1] = { 0.0 };
+ build_LE(m_A, m_RHS);
+ //NL_VERBOSE_OUT(("%f %f\n", new_val, m_RHS[0] / m_A[0][0]);
- double new_val = m_RHS[0] / m_A[0][0];
+ double new_val = m_RHS[0] / m_A[0][0];
#endif
- double e = (new_val - net->m_cur_Analog);
- double cerr = e * e;
+ double e = (new_val - net->m_cur_Analog);
+ double cerr = e * e;
- net->m_cur_Analog = net->m_new_Analog = new_val;
+ net->m_cur_Analog = net->m_new_Analog = new_val;
- if (is_dynamic() && (cerr > m_params.m_accuracy * m_params.m_accuracy))
- {
- return 2;
- }
- else
- return 1;
+ if (is_dynamic() && (cerr > m_params.m_accuracy * m_params.m_accuracy))
+ {
+ return 2;
+ }
+ else
+ return 1;
}
@@ -475,33 +473,33 @@ ATTR_HOT int netlist_matrix_solver_direct1_t::solve_non_dynamic()
ATTR_HOT int netlist_matrix_solver_direct2_t::solve_non_dynamic()
{
- double A[2][2] = { { 0.0 } };
- double RHS[2] = { 0.0 };
-
- build_LE(A, RHS);
-
- //NL_VERBOSE_OUT(("%f %f\n", new_val, m_RHS[0] / m_A[0][0]);
-
- const double a = A[0][0];
- const double b = A[0][1];
- const double c = A[1][0];
- const double d = A[1][1];
-
- double new_val[2];
- new_val[1] = a / (a*d - b*c) * (RHS[1] - c / a * RHS[0]);
- new_val[0] = (RHS[0] - b * new_val[1]) / a;
-
- if (is_dynamic())
- {
- double err = delta(RHS, new_val);
- store(RHS, new_val);
- if (err > m_params.m_accuracy * m_params.m_accuracy)
- return 2;
- else
- return 1;
- }
- store(NULL, new_val);
- return 1;
+ double A[2][2] = { { 0.0 } };
+ double RHS[2] = { 0.0 };
+
+ build_LE(A, RHS);
+
+ //NL_VERBOSE_OUT(("%f %f\n", new_val, m_RHS[0] / m_A[0][0]);
+
+ const double a = A[0][0];
+ const double b = A[0][1];
+ const double c = A[1][0];
+ const double d = A[1][1];
+
+ double new_val[2];
+ new_val[1] = a / (a*d - b*c) * (RHS[1] - c / a * RHS[0]);
+ new_val[0] = (RHS[0] - b * new_val[1]) / a;
+
+ if (is_dynamic())
+ {
+ double err = delta(RHS, new_val);
+ store(RHS, new_val);
+ if (err > m_params.m_accuracy * m_params.m_accuracy)
+ return 2;
+ else
+ return 1;
+ }
+ store(NULL, new_val);
+ return 1;
}
// ----------------------------------------------------------------------------------------
@@ -511,100 +509,100 @@ ATTR_HOT int netlist_matrix_solver_direct2_t::solve_non_dynamic()
template <int m_N, int _storage_N>
ATTR_HOT int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::solve_non_dynamic()
{
- bool resched = false;
-
- int resched_cnt = 0;
- ATTR_UNUSED netlist_net_t *last_resched_net = NULL;
-
- /* over-relaxation not really works on these matrices */
- //const double w = 1.0; //2.0 / (1.0 + sin(3.14159 / (m_nets.count()+1)));
- //const double w1 = 1.0 - w;
-
- double w[_storage_N];
- double one_m_w[_storage_N];
- double RHS[_storage_N];
-
- for (int k = 0; k < N(); k++)
- {
- double gtot_t = 0.0;
- double gabs_t = 0.0;
- double RHS_t = 0.0;
-
- netlist_net_t *net = m_nets[k];
- const netlist_net_t::terminal_list_t &terms = net->m_terms;
- const netlist_net_t::terminal_list_t &rails = net->m_rails;
- const int term_count = terms.count();
- const int rail_count = rails.count();
-
- for (int i = 0; i < rail_count; i++)
- {
- gtot_t += rails[i]->m_gt;
- gabs_t += fabs(rails[i]->m_go);
- RHS_t += rails[i]->m_Idr;
- RHS_t += rails[i]->m_go * rails[i]->m_otherterm->net().Q_Analog();
- }
-
- for (int i = 0; i < term_count; i++)
- {
- gtot_t += terms[i]->m_gt;
- gabs_t += fabs(terms[i]->m_go);
- RHS_t += terms[i]->m_Idr;
- }
-
- gabs_t *= m_params.m_convergence_factor;
- if (gabs_t > gtot_t)
- {
- // Actually 1.0 / g_tot * g_tot / (gtot_t + gabs_t)
- w[k] = 1.0 / (gtot_t + gabs_t);
- one_m_w[k] = gabs_t / (gtot_t + gabs_t);
- }
- else
- {
- w[k] = 1.0 / gtot_t;
- one_m_w[k] = 0.0;
- }
-
- RHS[k] = RHS_t;
- }
-
- //NL_VERBOSE_OUT(("%f %d\n", w, m_nets.count());
- do {
- resched = false;
- double cerr = 0.0;
-
- for (int k = 0; k < N(); k++)
- {
- netlist_net_t *net = m_nets[k];
- const netlist_net_t::terminal_list_t &terms = net->m_terms;
- const int term_count = terms.count();
-
- double iIdr = RHS[k];
-
- for (int i = 0; i < term_count; i++)
- {
- iIdr += terms[i]->m_go * terms[i]->m_otherterm->net().Q_Analog();
- }
-
- //double new_val = (net->m_cur_Analog * gabs[k] + iIdr) / (gtot[k]);
- double new_val = net->m_cur_Analog * one_m_w[k] + iIdr * w[k];
-
- double e = (new_val - net->m_cur_Analog);
- cerr += e * e;
-
- net->m_cur_Analog = net->m_new_Analog = new_val;
- }
- if (resched || cerr / m_nets.count() > m_params.m_accuracy * m_params.m_accuracy)
- {
- resched = true;
- //last_resched_net = net;
- }
- resched_cnt++;
- } while (resched && (resched_cnt < m_params.m_resched_loops / 3 ));
-
- if (resched)
- return m_fallback.solve_non_dynamic();
-
- return resched_cnt;
+ bool resched = false;
+
+ int resched_cnt = 0;
+ ATTR_UNUSED netlist_net_t *last_resched_net = NULL;
+
+ /* over-relaxation not really works on these matrices */
+ //const double w = 1.0; //2.0 / (1.0 + sin(3.14159 / (m_nets.count()+1)));
+ //const double w1 = 1.0 - w;
+
+ double w[_storage_N];
+ double one_m_w[_storage_N];
+ double RHS[_storage_N];
+
+ for (int k = 0; k < N(); k++)
+ {
+ double gtot_t = 0.0;
+ double gabs_t = 0.0;
+ double RHS_t = 0.0;
+
+ netlist_net_t *net = m_nets[k];
+ const netlist_net_t::terminal_list_t &terms = net->m_terms;
+ const netlist_net_t::terminal_list_t &rails = net->m_rails;
+ const int term_count = terms.count();
+ const int rail_count = rails.count();
+
+ for (int i = 0; i < rail_count; i++)
+ {
+ gtot_t += rails[i]->m_gt;
+ gabs_t += fabs(rails[i]->m_go);
+ RHS_t += rails[i]->m_Idr;
+ RHS_t += rails[i]->m_go * rails[i]->m_otherterm->net().Q_Analog();
+ }
+
+ for (int i = 0; i < term_count; i++)
+ {
+ gtot_t += terms[i]->m_gt;
+ gabs_t += fabs(terms[i]->m_go);
+ RHS_t += terms[i]->m_Idr;
+ }
+
+ gabs_t *= m_params.m_convergence_factor;
+ if (gabs_t > gtot_t)
+ {
+ // Actually 1.0 / g_tot * g_tot / (gtot_t + gabs_t)
+ w[k] = 1.0 / (gtot_t + gabs_t);
+ one_m_w[k] = gabs_t / (gtot_t + gabs_t);
+ }
+ else
+ {
+ w[k] = 1.0 / gtot_t;
+ one_m_w[k] = 0.0;
+ }
+
+ RHS[k] = RHS_t;
+ }
+
+ //NL_VERBOSE_OUT(("%f %d\n", w, m_nets.count());
+ do {
+ resched = false;
+ double cerr = 0.0;
+
+ for (int k = 0; k < N(); k++)
+ {
+ netlist_net_t *net = m_nets[k];
+ const netlist_net_t::terminal_list_t &terms = net->m_terms;
+ const int term_count = terms.count();
+
+ double iIdr = RHS[k];
+
+ for (int i = 0; i < term_count; i++)
+ {
+ iIdr += terms[i]->m_go * terms[i]->m_otherterm->net().Q_Analog();
+ }
+
+ //double new_val = (net->m_cur_Analog * gabs[k] + iIdr) / (gtot[k]);
+ double new_val = net->m_cur_Analog * one_m_w[k] + iIdr * w[k];
+
+ double e = (new_val - net->m_cur_Analog);
+ cerr += e * e;
+
+ net->m_cur_Analog = net->m_new_Analog = new_val;
+ }
+ if (resched || cerr / m_nets.count() > m_params.m_accuracy * m_params.m_accuracy)
+ {
+ resched = true;
+ //last_resched_net = net;
+ }
+ resched_cnt++;
+ } while (resched && (resched_cnt < m_params.m_resched_loops / 3 ));
+
+ if (resched)
+ return m_fallback.solve_non_dynamic();
+
+ return resched_cnt;
}
// ----------------------------------------------------------------------------------------
@@ -615,251 +613,251 @@ typedef netlist_net_t::list_t *net_groups_t;
ATTR_COLD static bool already_processed(net_groups_t groups, int &cur_group, netlist_net_t *net)
{
- if (net->isRailNet())
- return true;
- for (int i = 0; i <= cur_group; i++)
- {
- if (groups[i].contains(net))
- return true;
- }
- return false;
+ if (net->isRailNet())
+ return true;
+ for (int i = 0; i <= cur_group; i++)
+ {
+ if (groups[i].contains(net))
+ return true;
+ }
+ return false;
}
ATTR_COLD static void process_net(net_groups_t groups, int &cur_group, netlist_net_t *net)
{
- if (net->m_list.is_empty())
- return;
- /* add the net */
- SOLVER_VERBOSE_OUT(("add %d - %s\n", cur_group, net->name().cstr()));
- groups[cur_group].add(net);
- for (netlist_core_terminal_t *p = net->m_list.first(); p != NULL; p = net->m_list.next(p))
- {
- SOLVER_VERBOSE_OUT(("terminal %s\n", p->name().cstr()));
- if (p->isType(netlist_terminal_t::TERMINAL))
- {
- SOLVER_VERBOSE_OUT(("isterminal\n"));
- netlist_terminal_t *pt = static_cast<netlist_terminal_t *>(p);
- netlist_net_t *other_net = &pt->m_otherterm->net();
- if (!already_processed(groups, cur_group, other_net))
- process_net(groups, cur_group, other_net);
- }
- }
+ if (net->m_list.is_empty())
+ return;
+ /* add the net */
+ SOLVER_VERBOSE_OUT(("add %d - %s\n", cur_group, net->name().cstr()));
+ groups[cur_group].add(net);
+ for (netlist_core_terminal_t *p = net->m_list.first(); p != NULL; p = net->m_list.next(p))
+ {
+ SOLVER_VERBOSE_OUT(("terminal %s\n", p->name().cstr()));
+ if (p->isType(netlist_terminal_t::TERMINAL))
+ {
+ SOLVER_VERBOSE_OUT(("isterminal\n"));
+ netlist_terminal_t *pt = static_cast<netlist_terminal_t *>(p);
+ netlist_net_t *other_net = &pt->m_otherterm->net();
+ if (!already_processed(groups, cur_group, other_net))
+ process_net(groups, cur_group, other_net);
+ }
+ }
}
NETLIB_START(solver)
{
- register_output("Q_sync", m_Q_sync);
- register_output("Q_step", m_Q_step);
- //register_input("FB", m_feedback);
+ register_output("Q_sync", m_Q_sync);
+ register_output("Q_step", m_Q_step);
+ //register_input("FB", m_feedback);
- register_param("SYNC_DELAY", m_sync_delay, NLTIME_FROM_NS(5).as_double());
- m_nt_sync_delay = m_sync_delay.Value();
+ register_param("SYNC_DELAY", m_sync_delay, NLTIME_FROM_NS(5).as_double());
+ m_nt_sync_delay = m_sync_delay.Value();
- register_param("FREQ", m_freq, 48000.0);
- m_inc = netlist_time::from_hz(m_freq.Value());
+ register_param("FREQ", m_freq, 48000.0);
+ m_inc = netlist_time::from_hz(m_freq.Value());
- register_param("ACCURACY", m_accuracy, 1e-7);
- register_param("CONVERG", m_convergence, 0.3);
- register_param("RESCHED_LOOPS", m_resched_loops, 35);
- register_param("PARALLEL", m_parallel, 0);
- register_param("GMIN", m_gmin, NETLIST_GMIN_DEFAULT);
+ register_param("ACCURACY", m_accuracy, 1e-7);
+ register_param("CONVERG", m_convergence, 0.3);
+ register_param("RESCHED_LOOPS", m_resched_loops, 35);
+ register_param("PARALLEL", m_parallel, 0);
+ register_param("GMIN", m_gmin, NETLIST_GMIN_DEFAULT);
- // internal staff
+ // internal staff
- register_input("FB_sync", m_fb_sync);
- register_input("FB_step", m_fb_step);
+ register_input("FB_sync", m_fb_sync);
+ register_input("FB_step", m_fb_step);
- connect(m_fb_sync, m_Q_sync);
- connect(m_fb_step, m_Q_step);
+ connect(m_fb_sync, m_Q_sync);
+ connect(m_fb_step, m_Q_step);
- save(NAME(m_last_step));
+ save(NAME(m_last_step));
}
NETLIB_RESET(solver)
{
- m_last_step = netlist_time::zero;
- for (int i = 0; i < m_mat_solvers.count(); i++)
- m_mat_solvers[i]->reset();
+ m_last_step = netlist_time::zero;
+ for (int i = 0; i < m_mat_solvers.count(); i++)
+ m_mat_solvers[i]->reset();
}
NETLIB_UPDATE_PARAM(solver)
{
- m_inc = netlist_time::from_hz(m_freq.Value());
+ m_inc = netlist_time::from_hz(m_freq.Value());
}
NETLIB_NAME(solver)::~NETLIB_NAME(solver)()
{
- netlist_matrix_solver_t * const *e = m_mat_solvers.first();
- while (e != NULL)
- {
- netlist_matrix_solver_t * const *en = m_mat_solvers.next(e);
- delete *e;
- e = en;
- }
+ netlist_matrix_solver_t * const *e = m_mat_solvers.first();
+ while (e != NULL)
+ {
+ netlist_matrix_solver_t * const *en = m_mat_solvers.next(e);
+ delete *e;
+ e = en;
+ }
}
NETLIB_UPDATE(solver)
{
- netlist_time now = netlist().time();
- netlist_time delta = now - m_last_step;
- bool do_full = false;
- bool global_resched = false;
- bool this_resched[100];
- int t_cnt = m_mat_solvers.count();
+ netlist_time now = netlist().time();
+ netlist_time delta = now - m_last_step;
+ bool do_full = false;
+ bool global_resched = false;
+ bool this_resched[100];
+ int t_cnt = m_mat_solvers.count();
- if (delta < m_inc)
- do_full = true; // we have been called between updates
+ if (delta < m_inc)
+ do_full = true; // we have been called between updates
- m_last_step = now;
+ m_last_step = now;
#if HAS_OPENMP && USE_OPENMP
- if (m_parallel.Value())
- {
- omp_set_num_threads(4);
- omp_set_dynamic(0);
- #pragma omp parallel
- {
- #pragma omp for nowait
- for (int i = 0; i < t_cnt; i++)
- {
- this_resched[i] = m_mat_solvers[i]->solve();
- }
- }
- }
- else
- for (int i = 0; i < t_cnt; i++)
- {
- if (do_full || (m_mat_solvers[i]->is_timestep()))
- this_resched[i] = m_mat_solvers[i]->solve();
- }
+ if (m_parallel.Value())
+ {
+ omp_set_num_threads(4);
+ omp_set_dynamic(0);
+ #pragma omp parallel
+ {
+ #pragma omp for nowait
+ for (int i = 0; i < t_cnt; i++)
+ {
+ this_resched[i] = m_mat_solvers[i]->solve();
+ }
+ }
+ }
+ else
+ for (int i = 0; i < t_cnt; i++)
+ {
+ if (do_full || (m_mat_solvers[i]->is_timestep()))
+ this_resched[i] = m_mat_solvers[i]->solve();
+ }
#else
- for (int i = 0; i < t_cnt; i++)
- {
- if (do_full || (m_mat_solvers[i]->is_timestep()))
- this_resched[i] = m_mat_solvers[i]->solve();
- }
+ for (int i = 0; i < t_cnt; i++)
+ {
+ if (do_full || (m_mat_solvers[i]->is_timestep()))
+ this_resched[i] = m_mat_solvers[i]->solve();
+ }
#endif
- for (int i = 0; i < t_cnt; i++)
- {
- if (do_full || m_mat_solvers[i]->is_timestep())
- {
- global_resched = global_resched || this_resched[i];
- if (!this_resched[i])
- m_mat_solvers[i]->update_inputs();
- }
- }
-
- if (global_resched)
- {
- netlist().warning("Gobal reschedule .. Consider increasing RESCHED_LOOPS");
- schedule();
- }
- else
- {
- /* step circuit */
- if (!m_Q_step.net().is_queued())
- m_Q_step.net().push_to_queue(m_inc);
- }
+ for (int i = 0; i < t_cnt; i++)
+ {
+ if (do_full || m_mat_solvers[i]->is_timestep())
+ {
+ global_resched = global_resched || this_resched[i];
+ if (!this_resched[i])
+ m_mat_solvers[i]->update_inputs();
+ }
+ }
+
+ if (global_resched)
+ {
+ netlist().warning("Gobal reschedule .. Consider increasing RESCHED_LOOPS");
+ schedule();
+ }
+ else
+ {
+ /* step circuit */
+ if (!m_Q_step.net().is_queued())
+ m_Q_step.net().push_to_queue(m_inc);
+ }
}
ATTR_COLD void NETLIB_NAME(solver)::post_start()
{
- netlist_net_t::list_t groups[100];
- int cur_group = -1;
-
- SOLVER_VERBOSE_OUT(("Scanning net groups ...\n"));
- // determine net groups
- for (netlist_net_t * const *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn))
- {
- NL_VERBOSE_OUT(("proc %s\n", (*pn)->name().cstr()));
- if (!already_processed(groups, cur_group, *pn))
- {
- cur_group++;
- process_net(groups, cur_group, *pn);
- }
- }
-
- // setup the solvers
- SOLVER_VERBOSE_OUT(("Found %d net groups in %d nets\n", cur_group + 1, netlist().m_nets.count()));
- for (int i = 0; i <= cur_group; i++)
- {
- netlist_matrix_solver_t *ms;
- int net_count = groups[i].count();
-
- switch (net_count)
- {
- case 1:
- ms = new netlist_matrix_solver_direct1_t();
- break;
- case 2:
- ms = new netlist_matrix_solver_direct2_t();
- break;
- case 3:
- ms = new netlist_matrix_solver_direct_t<3,3>();
- //ms = new netlist_matrix_solver_gauss_seidel_t<3,3>();
- break;
- case 4:
- ms = new netlist_matrix_solver_direct_t<4,4>();
- //ms = new netlist_matrix_solver_gauss_seidel_t<4,4>();
- break;
+ netlist_net_t::list_t groups[100];
+ int cur_group = -1;
+
+ SOLVER_VERBOSE_OUT(("Scanning net groups ...\n"));
+ // determine net groups
+ for (netlist_net_t * const *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn))
+ {
+ NL_VERBOSE_OUT(("proc %s\n", (*pn)->name().cstr()));
+ if (!already_processed(groups, cur_group, *pn))
+ {
+ cur_group++;
+ process_net(groups, cur_group, *pn);
+ }
+ }
+
+ // setup the solvers
+ SOLVER_VERBOSE_OUT(("Found %d net groups in %d nets\n", cur_group + 1, netlist().m_nets.count()));
+ for (int i = 0; i <= cur_group; i++)
+ {
+ netlist_matrix_solver_t *ms;
+ int net_count = groups[i].count();
+
+ switch (net_count)
+ {
+ case 1:
+ ms = new netlist_matrix_solver_direct1_t();
+ break;
+ case 2:
+ ms = new netlist_matrix_solver_direct2_t();
+ break;
+ case 3:
+ ms = new netlist_matrix_solver_direct_t<3,3>();
+ //ms = new netlist_matrix_solver_gauss_seidel_t<3,3>();
+ break;
+ case 4:
+ ms = new netlist_matrix_solver_direct_t<4,4>();
+ //ms = new netlist_matrix_solver_gauss_seidel_t<4,4>();
+ break;
#if 0
- case 5:
- //ms = new netlist_matrix_solver_direct_t<5,5>();
- ms = new netlist_matrix_solver_gauss_seidel_t<5,5>();
- break;
- case 6:
- //ms = new netlist_matrix_solver_direct_t<6,6>();
- ms = new netlist_matrix_solver_gauss_seidel_t<6,6>();
- break;
+ case 5:
+ //ms = new netlist_matrix_solver_direct_t<5,5>();
+ ms = new netlist_matrix_solver_gauss_seidel_t<5,5>();
+ break;
+ case 6:
+ //ms = new netlist_matrix_solver_direct_t<6,6>();
+ ms = new netlist_matrix_solver_gauss_seidel_t<6,6>();
+ break;
#endif
- default:
- if (net_count <= 16)
- {
- //ms = new netlist_matrix_solver_direct_t<0,16>();
- ms = new netlist_matrix_solver_gauss_seidel_t<0,16>();
- }
- else if (net_count <= 32)
- {
- //ms = new netlist_matrix_solver_direct_t<0,16>();
- ms = new netlist_matrix_solver_gauss_seidel_t<0,32>();
- }
- else if (net_count <= 64)
- {
- //ms = new netlist_matrix_solver_direct_t<0,16>();
- ms = new netlist_matrix_solver_gauss_seidel_t<0,64>();
- }
- else
- {
- netlist().error("Encountered netgroup with > 64 nets");
- ms = NULL; /* tease compilers */
- }
-
- break;
- }
-
- ms->m_params.m_accuracy = m_accuracy.Value();
- ms->m_params.m_convergence_factor = m_convergence.Value();
- ms->m_params.m_resched_loops = m_resched_loops.Value();
- ms->setup(groups[i], *this);
- m_mat_solvers.add(ms);
- SOLVER_VERBOSE_OUT(("%d ==> %d nets %s\n", i, groups[i].count(), (*groups[i].first())->m_head->name().cstr()));
- SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_dynamic() ? "dynamic" : "no dynamic"));
- SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_timestep() ? "timestep" : "no timestep"));
- for (int j=0; j<groups[i].count(); j++)
- {
- SOLVER_VERBOSE_OUT(("Net %d: %s\n", j, groups[i][j]->name().cstr()));
- netlist_net_t *n = groups[i][j];
- for (netlist_core_terminal_t *p = n->m_list.first(); p != NULL; p = n->m_list.next(p))
- {
- SOLVER_VERBOSE_OUT((" %s\n", p->name().cstr()));
- }
- }
- }
+ default:
+ if (net_count <= 16)
+ {
+ //ms = new netlist_matrix_solver_direct_t<0,16>();
+ ms = new netlist_matrix_solver_gauss_seidel_t<0,16>();
+ }
+ else if (net_count <= 32)
+ {
+ //ms = new netlist_matrix_solver_direct_t<0,16>();
+ ms = new netlist_matrix_solver_gauss_seidel_t<0,32>();
+ }
+ else if (net_count <= 64)
+ {
+ //ms = new netlist_matrix_solver_direct_t<0,16>();
+ ms = new netlist_matrix_solver_gauss_seidel_t<0,64>();
+ }
+ else
+ {
+ netlist().error("Encountered netgroup with > 64 nets");
+ ms = NULL; /* tease compilers */
+ }
+
+ break;
+ }
+
+ ms->m_params.m_accuracy = m_accuracy.Value();
+ ms->m_params.m_convergence_factor = m_convergence.Value();
+ ms->m_params.m_resched_loops = m_resched_loops.Value();
+ ms->setup(groups[i], *this);
+ m_mat_solvers.add(ms);
+ SOLVER_VERBOSE_OUT(("%d ==> %d nets %s\n", i, groups[i].count(), (*groups[i].first())->m_head->name().cstr()));
+ SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_dynamic() ? "dynamic" : "no dynamic"));
+ SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_timestep() ? "timestep" : "no timestep"));
+ for (int j=0; j<groups[i].count(); j++)
+ {
+ SOLVER_VERBOSE_OUT(("Net %d: %s\n", j, groups[i][j]->name().cstr()));
+ netlist_net_t *n = groups[i][j];
+ for (netlist_core_terminal_t *p = n->m_list.first(); p != NULL; p = n->m_list.next(p))
+ {
+ SOLVER_VERBOSE_OUT((" %s\n", p->name().cstr()));
+ }
+ }
+ }
}
diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h
index 99bb45d7e5b..ca8129bf207 100644
--- a/src/emu/netlist/analog/nld_solver.h
+++ b/src/emu/netlist/analog/nld_solver.h
@@ -15,7 +15,7 @@
#define SOLVER(_name, _freq) \
NET_REGISTER_DEV(solver, _name) \
- PARAM(_name.FREQ, _freq)
+ PARAM(_name.FREQ, _freq)
// ----------------------------------------------------------------------------------------
// solver
@@ -27,9 +27,9 @@ class NETLIB_NAME(solver);
struct netlist_solver_parameters_t
{
- double m_accuracy;
- double m_convergence_factor;
- int m_resched_loops;
+ double m_accuracy;
+ double m_convergence_factor;
+ int m_resched_loops;
};
class netlist_matrix_solver_t
@@ -39,23 +39,23 @@ public:
typedef netlist_core_device_t::list_t dev_list_t;
netlist_matrix_solver_t() : m_owner(NULL) {}
- virtual ~netlist_matrix_solver_t() {}
+ virtual ~netlist_matrix_solver_t() {}
ATTR_COLD virtual void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner);
// return true if a reschedule is needed ...
- ATTR_HOT virtual int solve_non_dynamic() = 0;
+ ATTR_HOT virtual int solve_non_dynamic() = 0;
ATTR_HOT virtual void step(const netlist_time delta);
- ATTR_HOT bool solve();
+ ATTR_HOT bool solve();
ATTR_HOT void update_inputs();
- ATTR_HOT void update_dynamic();
+ ATTR_HOT void update_dynamic();
ATTR_HOT void schedule();
ATTR_HOT inline bool is_dynamic() { return m_dynamic.count() > 0; }
- ATTR_HOT inline bool is_timestep() { return m_steps.count() > 0; }
+ ATTR_HOT inline bool is_timestep() { return m_steps.count() > 0; }
ATTR_HOT inline const NETLIB_NAME(solver) &owner() const;
ATTR_COLD virtual void reset();
@@ -67,9 +67,9 @@ protected:
dev_list_t m_dynamic;
netlist_core_terminal_t::list_t m_inps;
dev_list_t m_steps;
- netlist_time m_last_step;
+ netlist_time m_last_step;
- NETLIB_NAME(solver) *m_owner;
+ NETLIB_NAME(solver) *m_owner;
};
template <int m_N, int _storage_N>
@@ -77,40 +77,40 @@ class netlist_matrix_solver_direct_t: public netlist_matrix_solver_t
{
public:
- netlist_matrix_solver_direct_t() : netlist_matrix_solver_t() {}
+ netlist_matrix_solver_direct_t() : netlist_matrix_solver_t() {}
- virtual ~netlist_matrix_solver_direct_t() {}
+ virtual ~netlist_matrix_solver_direct_t() {}
- ATTR_COLD virtual void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner);
- ATTR_COLD virtual void reset() { netlist_matrix_solver_t::reset(); }
- ATTR_HOT virtual int solve_non_dynamic();
+ ATTR_COLD virtual void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner);
+ ATTR_COLD virtual void reset() { netlist_matrix_solver_t::reset(); }
+ ATTR_HOT virtual int solve_non_dynamic();
- ATTR_HOT inline const int N() const { return (m_N == 0) ? m_nets.count() : m_N; }
+ ATTR_HOT inline const int N() const { return (m_N == 0) ? m_nets.count() : m_N; }
protected:
- ATTR_HOT inline void build_LE(double (* RESTRICT A)[_storage_N], double (* RESTRICT RHS));
- ATTR_HOT inline void gauss_LE(double (* RESTRICT A)[_storage_N],
- double (* RESTRICT RHS),
- double (* RESTRICT x));
- ATTR_HOT inline double delta(
- const double (* RESTRICT RHS),
- const double (* RESTRICT V));
- ATTR_HOT inline void store(const double (* RESTRICT RHS), const double (* RESTRICT V));
+ ATTR_HOT inline void build_LE(double (* RESTRICT A)[_storage_N], double (* RESTRICT RHS));
+ ATTR_HOT inline void gauss_LE(double (* RESTRICT A)[_storage_N],
+ double (* RESTRICT RHS),
+ double (* RESTRICT x));
+ ATTR_HOT inline double delta(
+ const double (* RESTRICT RHS),
+ const double (* RESTRICT V));
+ ATTR_HOT inline void store(const double (* RESTRICT RHS), const double (* RESTRICT V));
- double m_RHS[_storage_N]; // right hand side - contains currents
+ double m_RHS[_storage_N]; // right hand side - contains currents
private:
- ATTR_COLD int get_net_idx(netlist_net_t *net);
+ ATTR_COLD int get_net_idx(netlist_net_t *net);
- struct terms_t{
- int net_this;
- int net_other;
- netlist_terminal_t *term;
- };
- int m_term_num;
- int m_rail_start;
- terms_t m_terms[100];
+ struct terms_t{
+ int net_this;
+ int net_other;
+ netlist_terminal_t *term;
+ };
+ int m_term_num;
+ int m_rail_start;
+ terms_t m_terms[100];
};
template <int m_N, int _storage_N>
@@ -118,42 +118,42 @@ class netlist_matrix_solver_gauss_seidel_t: public netlist_matrix_solver_t
{
public:
- netlist_matrix_solver_gauss_seidel_t() : netlist_matrix_solver_t() {}
+ netlist_matrix_solver_gauss_seidel_t() : netlist_matrix_solver_t() {}
- virtual ~netlist_matrix_solver_gauss_seidel_t() {}
+ virtual ~netlist_matrix_solver_gauss_seidel_t() {}
- ATTR_COLD virtual void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner)
- {
- netlist_matrix_solver_t::setup(nets, owner);
- m_fallback.m_params = m_params;
- m_fallback.setup(nets, owner);
- }
+ ATTR_COLD virtual void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner)
+ {
+ netlist_matrix_solver_t::setup(nets, owner);
+ m_fallback.m_params = m_params;
+ m_fallback.setup(nets, owner);
+ }
- ATTR_HOT int solve_non_dynamic();
+ ATTR_HOT int solve_non_dynamic();
- ATTR_HOT inline const int N() const { if (m_N == 0) return m_nets.count(); else return m_N; }
+ ATTR_HOT inline const int N() const { if (m_N == 0) return m_nets.count(); else return m_N; }
- ATTR_COLD virtual void reset()
- {
- netlist_matrix_solver_t::reset();
- m_fallback.reset();
- }
+ ATTR_COLD virtual void reset()
+ {
+ netlist_matrix_solver_t::reset();
+ m_fallback.reset();
+ }
private:
- netlist_matrix_solver_direct_t<m_N, _storage_N> m_fallback;
+ netlist_matrix_solver_direct_t<m_N, _storage_N> m_fallback;
};
class netlist_matrix_solver_direct1_t: public netlist_matrix_solver_direct_t<1,1>
{
public:
- ATTR_HOT int solve_non_dynamic();
+ ATTR_HOT int solve_non_dynamic();
private:
};
class netlist_matrix_solver_direct2_t: public netlist_matrix_solver_direct_t<2,2>
{
public:
- ATTR_HOT int solve_non_dynamic();
+ ATTR_HOT int solve_non_dynamic();
private:
};
@@ -170,9 +170,9 @@ NETLIB_DEVICE_WITH_PARAMS(solver,
netlist_param_double_t m_sync_delay;
netlist_param_double_t m_accuracy;
netlist_param_double_t m_convergence;
- netlist_param_double_t m_gmin;
- netlist_param_int_t m_resched_loops;
- netlist_param_int_t m_parallel;
+ netlist_param_double_t m_gmin;
+ netlist_param_int_t m_resched_loops;
+ netlist_param_int_t m_parallel;
netlist_time m_inc;
netlist_time m_last_step;
diff --git a/src/emu/netlist/analog/nld_switches.c b/src/emu/netlist/analog/nld_switches.c
index e1f5bf0c0b0..340808c3c46 100644
--- a/src/emu/netlist/analog/nld_switches.c
+++ b/src/emu/netlist/analog/nld_switches.c
@@ -11,46 +11,46 @@
NETLIB_START(switch2)
{
- register_sub(m_R[0], "R1");
- register_sub(m_R[1], "R2");
+ register_sub(m_R[0], "R1");
+ register_sub(m_R[1], "R2");
- register_param("POS", m_POS, 0);
+ register_param("POS", m_POS, 0);
- connect(m_R[0].m_N, m_R[1].m_N);
+ connect(m_R[0].m_N, m_R[1].m_N);
- register_subalias("1", m_R[0].m_P);
- register_subalias("2", m_R[1].m_P);
+ register_subalias("1", m_R[0].m_P);
+ register_subalias("2", m_R[1].m_P);
- register_subalias("Q", m_R[0].m_N);
+ register_subalias("Q", m_R[0].m_N);
}
NETLIB_RESET(switch2)
{
- m_R[0].do_reset();
- m_R[1].do_reset();
+ m_R[0].do_reset();
+ m_R[1].do_reset();
- m_R[0].set_R(R_ON);
- m_R[1].set_R(R_OFF);
+ m_R[0].set_R(R_ON);
+ m_R[1].set_R(R_OFF);
}
NETLIB_UPDATE(switch2)
{
- if (m_POS.Value() == 0)
- {
- m_R[0].set_R(R_ON);
- m_R[1].set_R(R_OFF);
- }
- else
- {
- m_R[0].set_R(R_OFF);
- m_R[1].set_R(R_ON);
- }
-
- m_R[0].update_dev();
- m_R[1].update_dev();
+ if (m_POS.Value() == 0)
+ {
+ m_R[0].set_R(R_ON);
+ m_R[1].set_R(R_OFF);
+ }
+ else
+ {
+ m_R[0].set_R(R_OFF);
+ m_R[1].set_R(R_ON);
+ }
+
+ m_R[0].update_dev();
+ m_R[1].update_dev();
}
NETLIB_UPDATE_PARAM(switch2)
{
- update();
+ update();
}
diff --git a/src/emu/netlist/analog/nld_switches.h b/src/emu/netlist/analog/nld_switches.h
index df98738f470..5d8cf535379 100644
--- a/src/emu/netlist/analog/nld_switches.h
+++ b/src/emu/netlist/analog/nld_switches.h
@@ -25,7 +25,7 @@
// ----------------------------------------------------------------------------------------
NETLIB_DEVICE_WITH_PARAMS(switch2,
- NETLIB_NAME(R_base) m_R[2];
+ NETLIB_NAME(R_base) m_R[2];
netlist_param_int_t m_POS;
);
diff --git a/src/emu/netlist/analog/nld_twoterm.c b/src/emu/netlist/analog/nld_twoterm.c
index 0e55f4a39de..fa06c784cdf 100644
--- a/src/emu/netlist/analog/nld_twoterm.c
+++ b/src/emu/netlist/analog/nld_twoterm.c
@@ -12,26 +12,26 @@
ATTR_COLD netlist_generic_diode::netlist_generic_diode()
{
- m_Vd = 0.7;
+ m_Vd = 0.7;
}
ATTR_COLD void netlist_generic_diode::set_param(const double Is, const double n, double gmin)
{
- m_Is = Is;
- m_n = n;
- m_gmin = gmin;
+ m_Is = Is;
+ m_n = n;
+ m_gmin = gmin;
- m_Vt = 0.0258 * m_n;
+ m_Vt = 0.0258 * m_n;
- m_Vcrit = m_Vt * log(m_Vt / m_Is / sqrt(2.0));
- m_VtInv = 1.0 / m_Vt;
+ m_Vcrit = m_Vt * log(m_Vt / m_Is / sqrt(2.0));
+ m_VtInv = 1.0 / m_Vt;
}
ATTR_COLD void netlist_generic_diode::save(pstring name, netlist_object_t &parent)
{
- parent.save(m_Vd, name + ".m_Vd");
- parent.save(m_Id, name + ".m_Id");
- parent.save(m_G, name + ".m_G");
+ parent.save(m_Vd, name + ".m_Vd");
+ parent.save(m_Id, name + ".m_Id");
+ parent.save(m_G, name + ".m_G");
}
// ----------------------------------------------------------------------------------------
@@ -57,11 +57,11 @@ NETLIB_RESET(twoterm)
NETLIB_UPDATE(twoterm)
{
/* only called if connected to a rail net ==> notify the solver to recalculate */
- /* we only need to call the non-rail terminal */
- if (!m_P.net().isRailNet())
- m_P.net().solve();
- else
- m_N.net().solve();
+ /* we only need to call the non-rail terminal */
+ if (!m_P.net().isRailNet())
+ m_P.net().solve();
+ else
+ m_N.net().solve();
}
// ----------------------------------------------------------------------------------------
@@ -76,8 +76,8 @@ NETLIB_START(R_base)
NETLIB_RESET(R_base)
{
- NETLIB_NAME(twoterm)::reset();
- set_R(1.0 / netlist().gmin());
+ NETLIB_NAME(twoterm)::reset();
+ set_R(1.0 / netlist().gmin());
}
NETLIB_UPDATE(R_base)
@@ -93,7 +93,7 @@ NETLIB_START(R)
NETLIB_RESET(R)
{
- NETLIB_NAME(R_base)::reset();
+ NETLIB_NAME(R_base)::reset();
}
NETLIB_UPDATE(R)
@@ -105,10 +105,10 @@ NETLIB_UPDATE_PARAM(R)
{
//printf("updating %s to %f\n", name().cstr(), m_R.Value());
if (m_R.Value() > 1e-9)
- set_R(m_R.Value());
+ set_R(m_R.Value());
else
- set_R(1e-9);
- update_dev();
+ set_R(1e-9);
+ update_dev();
}
// ----------------------------------------------------------------------------------------
@@ -134,8 +134,8 @@ NETLIB_START(POT)
NETLIB_RESET(POT)
{
- m_R1.do_reset();
- m_R2.do_reset();
+ m_R1.do_reset();
+ m_R2.do_reset();
}
NETLIB_UPDATE(POT)
@@ -152,8 +152,8 @@ NETLIB_UPDATE_PARAM(POT)
m_R1.set_R(MAX(m_R.Value() * v, netlist().gmin()));
m_R2.set_R(MAX(m_R.Value() * (1.0 - v), netlist().gmin()));
// force a schedule all
- m_R1.update_dev();
- m_R2.update_dev();
+ m_R1.update_dev();
+ m_R2.update_dev();
}
// ----------------------------------------------------------------------------------------
@@ -168,14 +168,14 @@ NETLIB_START(C)
register_param("C", m_C, 1e-6);
// set up the element
- set(netlist().gmin(), 0.0, -5.0 / netlist().gmin());
- //set(1.0/NETLIST_GMIN, 0.0, -5.0 * NETLIST_GMIN);
+ set(netlist().gmin(), 0.0, -5.0 / netlist().gmin());
+ //set(1.0/NETLIST_GMIN, 0.0, -5.0 * NETLIST_GMIN);
}
NETLIB_RESET(C)
{
- set(netlist().gmin(), 0.0, -5.0 / netlist().gmin());
- //set(1.0/NETLIST_GMIN, 0.0, -5.0 * NETLIST_GMIN);
+ set(netlist().gmin(), 0.0, -5.0 / netlist().gmin());
+ //set(1.0/NETLIST_GMIN, 0.0, -5.0 * NETLIST_GMIN);
}
NETLIB_UPDATE_PARAM(C)
@@ -215,5 +215,3 @@ NETLIB_UPDATE(D)
{
NETLIB_NAME(twoterm)::update();
}
-
-
diff --git a/src/emu/netlist/analog/nld_twoterm.h b/src/emu/netlist/analog/nld_twoterm.h
index 59f95c9983a..d5a2bf7d6f4 100644
--- a/src/emu/netlist/analog/nld_twoterm.h
+++ b/src/emu/netlist/analog/nld_twoterm.h
@@ -84,23 +84,23 @@ public:
m_P.m_Idr = ( V) * G - I;
}
- ATTR_HOT inline double deltaV() { return m_P.net().Q_Analog()- m_N.net().Q_Analog(); }
+ ATTR_HOT inline double deltaV() { return m_P.net().Q_Analog()- m_N.net().Q_Analog(); }
- ATTR_HOT void set_mat(double a11, double a12, double a21, double a22, double r1, double r2)
- {
- m_P.m_gt = a11;
- m_P.m_go = -a12;
- m_N.m_gt = a22;
- m_N.m_go = -a21;
+ ATTR_HOT void set_mat(double a11, double a12, double a21, double a22, double r1, double r2)
+ {
+ m_P.m_gt = a11;
+ m_P.m_go = -a12;
+ m_N.m_gt = a22;
+ m_N.m_go = -a21;
- m_P.m_Idr = -r1;
- m_N.m_Idr = -r2;
+ m_P.m_Idr = -r1;
+ m_N.m_Idr = -r2;
- }
+ }
protected:
ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void reset();
ATTR_HOT ATTR_ALIGN void update();
private:
@@ -119,7 +119,7 @@ public:
protected:
ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void reset();
ATTR_HOT ATTR_ALIGN void update();
};
@@ -159,7 +159,7 @@ public:
protected:
ATTR_COLD virtual void start();
- ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void reset();
ATTR_COLD virtual void update_param();
ATTR_HOT ATTR_ALIGN void update();
@@ -175,67 +175,67 @@ protected:
class netlist_generic_diode
{
public:
- ATTR_COLD netlist_generic_diode();
-
- ATTR_HOT inline void update_diode(const double nVd)
- {
- //FIXME: Optimize cutoff case
-
- if (nVd < -5.0 * m_Vt)
- {
- m_Vd = nVd;
- m_G = m_gmin;
- m_Id = - m_Is;
- }
- else if (nVd < m_Vcrit)
- {
- m_Vd = nVd;
-
- const double eVDVt = exp(m_Vd * m_VtInv);
- m_Id = m_Is * (eVDVt - 1.0);
- m_G = m_Is * m_VtInv * eVDVt + m_gmin;
- }
- else
- {
+ ATTR_COLD netlist_generic_diode();
+
+ ATTR_HOT inline void update_diode(const double nVd)
+ {
+ //FIXME: Optimize cutoff case
+
+ if (nVd < -5.0 * m_Vt)
+ {
+ m_Vd = nVd;
+ m_G = m_gmin;
+ m_Id = - m_Is;
+ }
+ else if (nVd < m_Vcrit)
+ {
+ m_Vd = nVd;
+
+ const double eVDVt = exp(m_Vd * m_VtInv);
+ m_Id = m_Is * (eVDVt - 1.0);
+ m_G = m_Is * m_VtInv * eVDVt + m_gmin;
+ }
+ else
+ {
#if defined(_MSC_VER) && _MSC_VER < 1800
- m_Vd = m_Vd + log((nVd - m_Vd) * m_VtInv + 1.0) * m_Vt;
+ m_Vd = m_Vd + log((nVd - m_Vd) * m_VtInv + 1.0) * m_Vt;
#else
- double a = (nVd - m_Vd) * m_VtInv;
- if (a<1e-12 - 1.0) a = 1e-12 - 1.0;
- m_Vd = m_Vd + log1p(a) * m_Vt;
+ double a = (nVd - m_Vd) * m_VtInv;
+ if (a<1e-12 - 1.0) a = 1e-12 - 1.0;
+ m_Vd = m_Vd + log1p(a) * m_Vt;
#endif
- const double eVDVt = exp(m_Vd * m_VtInv);
- m_Id = m_Is * (eVDVt - 1.0);
+ const double eVDVt = exp(m_Vd * m_VtInv);
+ m_Id = m_Is * (eVDVt - 1.0);
- m_G = m_Is * m_VtInv * eVDVt + m_gmin;
- }
+ m_G = m_Is * m_VtInv * eVDVt + m_gmin;
+ }
- //printf("nVd %f m_Vd %f Vcrit %f\n", nVd, m_Vd, m_Vcrit);
- }
+ //printf("nVd %f m_Vd %f Vcrit %f\n", nVd, m_Vd, m_Vcrit);
+ }
- ATTR_COLD void set_param(const double Is, const double n, double gmin);
+ ATTR_COLD void set_param(const double Is, const double n, double gmin);
- ATTR_HOT inline double I() const { return m_Id; }
- ATTR_HOT inline double G() const { return m_G; }
- ATTR_HOT inline double Ieq() const { return (m_Id - m_Vd * m_G); }
- ATTR_HOT inline double Vd() const { return m_Vd; }
+ ATTR_HOT inline double I() const { return m_Id; }
+ ATTR_HOT inline double G() const { return m_G; }
+ ATTR_HOT inline double Ieq() const { return (m_Id - m_Vd * m_G); }
+ ATTR_HOT inline double Vd() const { return m_Vd; }
- /* owning object must save those ... */
+ /* owning object must save those ... */
- ATTR_COLD void save(pstring name, netlist_object_t &parent);
+ ATTR_COLD void save(pstring name, netlist_object_t &parent);
private:
- double m_Vd;
- double m_Id;
- double m_G;
+ double m_Vd;
+ double m_Id;
+ double m_G;
- double m_Vt;
- double m_Is;
- double m_n;
- double m_gmin;
+ double m_Vt;
+ double m_Is;
+ double m_n;
+ double m_gmin;
- double m_VtInv;
- double m_Vcrit;
+ double m_VtInv;
+ double m_Vcrit;
};
// ----------------------------------------------------------------------------------------
@@ -278,7 +278,7 @@ public:
NETLIB_UPDATE_TERMINALS()
{
- m_D.update_diode(deltaV());
+ m_D.update_diode(deltaV());
set(m_D.G(), 0.0, m_D.Ieq());
}
diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c
index ecc27fc13ab..7834386df31 100644
--- a/src/emu/netlist/devices/net_lib.c
+++ b/src/emu/netlist/devices/net_lib.c
@@ -51,15 +51,15 @@
#include "nld_system.h"
NETLIST_START(diode_models)
- NET_MODEL(".model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
- NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
+ NET_MODEL(".model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
+ NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
NETLIST_END()
NETLIST_START(bjt_models)
- NET_MODEL(".MODEL BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)")
- NET_MODEL(".model BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)")
- NET_MODEL(".model 2SA1015 PNP(Is=295.1E-18 Xti=3 Eg=1.11 Vaf=100 Bf=110 Xtb=1.5 Br=10.45 Rc=15 Cjc=66.2p Mjc=1.054 Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=10n Tf=1.661n VCEO=45V ICrating=150M MFG=Toshiba)")
- NET_MODEL(".model 2SC1815 NPN(Is=2.04f Xti=3 Eg=1.11 Vaf=6 Bf=400 Ikf=20m Xtb=1.5 Br=3.377 Rc=1 Cjc=1p Mjc=.3333 Vjc=.75 Fc=.5 Cje=25p Mje=.3333 Vje=.75 Tr=450n Tf=20n Itf=0 Vtf=0 Xtf=0 VCEO=45V ICrating=150M MFG=Toshiba)")
+ NET_MODEL(".MODEL BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)")
+ NET_MODEL(".model BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)")
+ NET_MODEL(".model 2SA1015 PNP(Is=295.1E-18 Xti=3 Eg=1.11 Vaf=100 Bf=110 Xtb=1.5 Br=10.45 Rc=15 Cjc=66.2p Mjc=1.054 Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=10n Tf=1.661n VCEO=45V ICrating=150M MFG=Toshiba)")
+ NET_MODEL(".model 2SC1815 NPN(Is=2.04f Xti=3 Eg=1.11 Vaf=6 Bf=400 Ikf=20m Xtb=1.5 Br=3.377 Rc=1 Cjc=1p Mjc=.3333 Vjc=.75 Fc=.5 Cje=25p Mje=.3333 Vje=.75 Tr=450n Tf=20n Itf=0 Vtf=0 Xtf=0 VCEO=45V ICrating=150M MFG=Toshiba)")
NETLIST_END()
@@ -89,7 +89,7 @@ void netlist_factory_t::initialize()
ENTRY(D, DIODE, "model")
ENTRY(VCVS, VCVS, "-") // FIXME: STD parameters ?
ENTRY(VCCS, VCCS, "-")
- ENTRY(QBJT_EB, QBJT_EB, "model")
+ ENTRY(QBJT_EB, QBJT_EB, "model")
ENTRY(QBJT_switch, QBJT_SW, "model")
ENTRY(ttl_input, TTL_INPUT, "IN")
ENTRY(analog_input, ANALOG_INPUT, "IN")
@@ -98,7 +98,7 @@ void netlist_factory_t::initialize()
ENTRY(clock, CLOCK, "FREQ")
ENTRY(mainclock, MAINCLOCK, "FREQ")
ENTRY(solver, SOLVER, "FREQ")
- ENTRY(gnd, GND, "-")
+ ENTRY(gnd, GND, "-")
ENTRY(switch2, SWITCH2, "-")
ENTRY(nicRSFF, NETDEV_RSFF, "+S,R")
ENTRY(7400, TTL_7400_NAND, "+A,B")
@@ -119,30 +119,30 @@ void netlist_factory_t::initialize()
ENTRY(74107, TTL_74107, "+CLK,J,K,CLRQ")
ENTRY(74107A, TTL_74107A, "+CLK,J,K,CLRQ")
ENTRY(74153, TTL_74153, "+C0,C1,C2,C3,A,B,G")
- ENTRY(SN74LS629, SN74LS629, "CAP")
+ ENTRY(SN74LS629, SN74LS629, "CAP")
ENTRY(9316, TTL_9316, "+CLK,ENP,ENT,CLRQ,LOADQ,A,B,C,D")
ENTRY(NE555, NE555, "-")
- ENTRY(4066_dip, CD_4066_DIP, "-")
- ENTRY(7400_dip, TTL_7400_DIP, "-")
- ENTRY(7402_dip, TTL_7402_DIP, "-")
- ENTRY(7404_dip, TTL_7404_DIP, "-")
- ENTRY(7410_dip, TTL_7410_DIP, "-")
- ENTRY(7420_dip, TTL_7420_DIP, "-")
- ENTRY(7425_dip, TTL_7425_DIP, "-")
- ENTRY(7427_dip, TTL_7427_DIP, "-")
- ENTRY(7430_dip, TTL_7430_DIP, "-")
- ENTRY(7448_dip, TTL_7448_DIP, "-")
- ENTRY(7450_dip, TTL_7450_DIP, "-")
- ENTRY(7474_dip, TTL_7474_DIP, "-")
- ENTRY(7483_dip, TTL_7483_DIP, "-")
- ENTRY(7486_dip, TTL_7486_DIP, "-")
- ENTRY(7490_dip, TTL_7490_DIP, "-")
- ENTRY(7493_dip, TTL_7493_DIP, "-")
- ENTRY(74107_dip, TTL_74107_DIP, "-")
- ENTRY(74153_dip, TTL_74153_DIP, "-")
- ENTRY(9316_dip, TTL_9316_DIP, "-")
- ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2")
- ENTRY(NE555_dip, NE555_DIP, "-")
+ ENTRY(4066_dip, CD_4066_DIP, "-")
+ ENTRY(7400_dip, TTL_7400_DIP, "-")
+ ENTRY(7402_dip, TTL_7402_DIP, "-")
+ ENTRY(7404_dip, TTL_7404_DIP, "-")
+ ENTRY(7410_dip, TTL_7410_DIP, "-")
+ ENTRY(7420_dip, TTL_7420_DIP, "-")
+ ENTRY(7425_dip, TTL_7425_DIP, "-")
+ ENTRY(7427_dip, TTL_7427_DIP, "-")
+ ENTRY(7430_dip, TTL_7430_DIP, "-")
+ ENTRY(7448_dip, TTL_7448_DIP, "-")
+ ENTRY(7450_dip, TTL_7450_DIP, "-")
+ ENTRY(7474_dip, TTL_7474_DIP, "-")
+ ENTRY(7483_dip, TTL_7483_DIP, "-")
+ ENTRY(7486_dip, TTL_7486_DIP, "-")
+ ENTRY(7490_dip, TTL_7490_DIP, "-")
+ ENTRY(7493_dip, TTL_7493_DIP, "-")
+ ENTRY(74107_dip, TTL_74107_DIP, "-")
+ ENTRY(74153_dip, TTL_74153_DIP, "-")
+ ENTRY(9316_dip, TTL_9316_DIP, "-")
+ ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2")
+ ENTRY(NE555_dip, NE555_DIP, "-")
}
netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const
@@ -163,21 +163,21 @@ netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &clas
netlist_device_t *netlist_factory_t::new_device_by_name(const pstring &name, netlist_setup_t &setup) const
{
- net_device_t_base_factory *f = factory_by_name(name, setup);
- return f->Create();
+ net_device_t_base_factory *f = factory_by_name(name, setup);
+ return f->Create();
}
net_device_t_base_factory * netlist_factory_t::factory_by_name(const pstring &name, netlist_setup_t &setup) const
{
- for (net_device_t_base_factory * const *e = m_list.first(); e != NULL; e = m_list.next(e))
- {
- net_device_t_base_factory *p = *e;
- if (strcmp(p->name(), name) == 0)
- {
- return p;
- }
- p++;
- }
- setup.netlist().error("Class %s not found!\n", name.cstr());
- return NULL; // appease code analysis
+ for (net_device_t_base_factory * const *e = m_list.first(); e != NULL; e = m_list.next(e))
+ {
+ net_device_t_base_factory *p = *e;
+ if (strcmp(p->name(), name) == 0)
+ {
+ return p;
+ }
+ p++;
+ }
+ setup.netlist().error("Class %s not found!\n", name.cstr());
+ return NULL; // appease code analysis
}
diff --git a/src/emu/netlist/devices/nld_4066.c b/src/emu/netlist/devices/nld_4066.c
index 9a3b05f55cd..19f67543516 100644
--- a/src/emu/netlist/devices/nld_4066.c
+++ b/src/emu/netlist/devices/nld_4066.c
@@ -25,70 +25,70 @@ NETLIB_START(4066)
NETLIB_RESET(4066)
{
- m_R.do_reset();
+ m_R.do_reset();
}
NETLIB_UPDATE(4066)
{
- double sup = (m_supply->vdd() - m_supply->vss());
- double low = 0.45 * sup;
- double high = 0.55 * sup;
- double in = INPANALOG(m_control) - m_supply->vss();
- double rON = 270.0 * 5.0 / sup;
+ double sup = (m_supply->vdd() - m_supply->vss());
+ double low = 0.45 * sup;
+ double high = 0.55 * sup;
+ double in = INPANALOG(m_control) - m_supply->vss();
+ double rON = 270.0 * 5.0 / sup;
- if (in < low)
- {
- m_R.set_R(1.0 / netlist().gmin());
- m_R.update_dev();
- }
- else if (in > high)
- {
- m_R.set_R(rON);
- m_R.update_dev();
- }
+ if (in < low)
+ {
+ m_R.set_R(1.0 / netlist().gmin());
+ m_R.update_dev();
+ }
+ else if (in > high)
+ {
+ m_R.set_R(rON);
+ m_R.update_dev();
+ }
}
NETLIB_START(4066_dip)
{
- register_sub(m_supply, "supply");
- m_A.m_supply = m_B.m_supply = m_C.m_supply = m_D.m_supply = &m_supply;
- register_sub(m_A, "A");
- register_sub(m_B, "B");
- register_sub(m_C, "C");
- register_sub(m_D, "D");
+ register_sub(m_supply, "supply");
+ m_A.m_supply = m_B.m_supply = m_C.m_supply = m_D.m_supply = &m_supply;
+ register_sub(m_A, "A");
+ register_sub(m_B, "B");
+ register_sub(m_C, "C");
+ register_sub(m_D, "D");
- register_subalias("1", m_A.m_R.m_P);
- register_subalias("2", m_A.m_R.m_N);
- register_subalias("3", m_B.m_R.m_P);
- register_subalias("4", m_B.m_R.m_N);
- register_subalias("5", m_B.m_control);
- register_subalias("6", m_C.m_control);
- register_input("7", m_supply.m_vss);
+ register_subalias("1", m_A.m_R.m_P);
+ register_subalias("2", m_A.m_R.m_N);
+ register_subalias("3", m_B.m_R.m_P);
+ register_subalias("4", m_B.m_R.m_N);
+ register_subalias("5", m_B.m_control);
+ register_subalias("6", m_C.m_control);
+ register_input("7", m_supply.m_vss);
- register_subalias("8", m_C.m_R.m_P);
- register_subalias("9", m_C.m_R.m_N);
- register_subalias("10", m_D.m_R.m_P);
- register_subalias("11", m_D.m_R.m_N);
- register_subalias("12", m_D.m_control);
- register_subalias("13", m_A.m_control);
- register_input("14", m_supply.m_vdd);
+ register_subalias("8", m_C.m_R.m_P);
+ register_subalias("9", m_C.m_R.m_N);
+ register_subalias("10", m_D.m_R.m_P);
+ register_subalias("11", m_D.m_R.m_N);
+ register_subalias("12", m_D.m_control);
+ register_subalias("13", m_A.m_control);
+ register_input("14", m_supply.m_vdd);
}
NETLIB_RESET(4066_dip)
{
- m_A.do_reset();
- m_B.do_reset();
- m_C.do_reset();
- m_D.do_reset();
+ m_A.do_reset();
+ m_B.do_reset();
+ m_C.do_reset();
+ m_D.do_reset();
}
NETLIB_UPDATE(4066_dip)
{
- /* only called during startup */
- m_A.update_dev();
- m_B.update_dev();
- m_C.update_dev();
- m_D.update_dev();
+ /* only called during startup */
+ m_A.update_dev();
+ m_B.update_dev();
+ m_C.update_dev();
+ m_D.update_dev();
}
diff --git a/src/emu/netlist/devices/nld_4066.h b/src/emu/netlist/devices/nld_4066.h
index a2bfff2c3c6..ddd12ef0a50 100644
--- a/src/emu/netlist/devices/nld_4066.h
+++ b/src/emu/netlist/devices/nld_4066.h
@@ -28,15 +28,15 @@
#include "../analog/nld_twoterm.h"
#define CD_4066_DIP(_name) \
- NET_REGISTER_DEV(4066_dip, _name)
+ NET_REGISTER_DEV(4066_dip, _name)
NETLIB_SUBDEVICE(vdd_vss,
netlist_analog_input_t m_vdd;
- netlist_analog_input_t m_vss;
+ netlist_analog_input_t m_vss;
public:
- ATTR_HOT inline double vdd() { return INPANALOG(m_vdd); }
- ATTR_HOT inline double vss() { return INPANALOG(m_vss); }
+ ATTR_HOT inline double vdd() { return INPANALOG(m_vdd); }
+ ATTR_HOT inline double vss() { return INPANALOG(m_vss); }
);
NETLIB_SUBDEVICE(4066,
@@ -50,11 +50,11 @@ public:
NETLIB_DEVICE(4066_dip,
- NETLIB_NAME(4066) m_A;
- NETLIB_NAME(4066) m_B;
- NETLIB_NAME(4066) m_C;
- NETLIB_NAME(4066) m_D;
- NETLIB_NAME(vdd_vss) m_supply;
+ NETLIB_NAME(4066) m_A;
+ NETLIB_NAME(4066) m_B;
+ NETLIB_NAME(4066) m_C;
+ NETLIB_NAME(4066) m_D;
+ NETLIB_NAME(vdd_vss) m_supply;
);
#endif /* NLD_4066_H_ */
diff --git a/src/emu/netlist/devices/nld_7400.c b/src/emu/netlist/devices/nld_7400.c
index e4a3731cd49..e6025c3bdcb 100644
--- a/src/emu/netlist/devices/nld_7400.c
+++ b/src/emu/netlist/devices/nld_7400.c
@@ -7,42 +7,41 @@
NETLIB_START(7400_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
- register_sub(m_4, "4");
-
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
- register_subalias("3", m_1.m_Q);
-
- register_subalias("4", m_2.m_i[0]);
- register_subalias("5", m_2.m_i[1]);
- register_subalias("6", m_2.m_Q);
-
- register_subalias("9", m_3.m_i[0]);
- register_subalias("10", m_3.m_i[1]);
- register_subalias("8", m_3.m_Q);
-
- register_subalias("12", m_4.m_i[0]);
- register_subalias("13", m_4.m_i[1]);
- register_subalias("11", m_4.m_Q);
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+ register_sub(m_4, "4");
+
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
+ register_subalias("3", m_1.m_Q);
+
+ register_subalias("4", m_2.m_i[0]);
+ register_subalias("5", m_2.m_i[1]);
+ register_subalias("6", m_2.m_Q);
+
+ register_subalias("9", m_3.m_i[0]);
+ register_subalias("10", m_3.m_i[1]);
+ register_subalias("8", m_3.m_Q);
+
+ register_subalias("12", m_4.m_i[0]);
+ register_subalias("13", m_4.m_i[1]);
+ register_subalias("11", m_4.m_Q);
}
NETLIB_UPDATE(7400_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
- m_4.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
+ m_4.update_dev();
}
NETLIB_RESET(7400_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
- m_4.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
+ m_4.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7400.h b/src/emu/netlist/devices/nld_7400.h
index e5b356eecb2..3e30bba7c58 100644
--- a/src/emu/netlist/devices/nld_7400.h
+++ b/src/emu/netlist/devices/nld_7400.h
@@ -42,7 +42,7 @@
NETLIB_SIGNAL(7400, 2, 0, 0);
#define TTL_7400_DIP(_name) \
- NET_REGISTER_DEV(7400_dip, _name)
+ NET_REGISTER_DEV(7400_dip, _name)
NETLIB_DEVICE(7400_dip,
diff --git a/src/emu/netlist/devices/nld_7402.c b/src/emu/netlist/devices/nld_7402.c
index cf744f70ba2..3a01e083336 100644
--- a/src/emu/netlist/devices/nld_7402.c
+++ b/src/emu/netlist/devices/nld_7402.c
@@ -7,42 +7,41 @@
NETLIB_START(7402_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
- register_sub(m_4, "4");
-
- register_subalias("1", m_1.m_Q);
- register_subalias("2", m_1.m_i[0]);
- register_subalias("3", m_1.m_i[1]);
-
- register_subalias("4", m_2.m_Q);
- register_subalias("5", m_2.m_i[0]);
- register_subalias("6", m_2.m_i[1]);
-
- register_subalias("8", m_3.m_i[0]);
- register_subalias("9", m_3.m_i[1]);
- register_subalias("10", m_3.m_Q);
-
- register_subalias("11", m_4.m_i[0]);
- register_subalias("12", m_4.m_i[1]);
- register_subalias("13", m_4.m_Q);
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+ register_sub(m_4, "4");
+
+ register_subalias("1", m_1.m_Q);
+ register_subalias("2", m_1.m_i[0]);
+ register_subalias("3", m_1.m_i[1]);
+
+ register_subalias("4", m_2.m_Q);
+ register_subalias("5", m_2.m_i[0]);
+ register_subalias("6", m_2.m_i[1]);
+
+ register_subalias("8", m_3.m_i[0]);
+ register_subalias("9", m_3.m_i[1]);
+ register_subalias("10", m_3.m_Q);
+
+ register_subalias("11", m_4.m_i[0]);
+ register_subalias("12", m_4.m_i[1]);
+ register_subalias("13", m_4.m_Q);
}
NETLIB_UPDATE(7402_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
- m_4.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
+ m_4.update_dev();
}
NETLIB_RESET(7402_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
- m_4.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
+ m_4.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7402.h b/src/emu/netlist/devices/nld_7402.h
index 4f050514633..c8e45c7f59b 100644
--- a/src/emu/netlist/devices/nld_7402.h
+++ b/src/emu/netlist/devices/nld_7402.h
@@ -40,17 +40,17 @@
NET_CONNECT(_name, B, _I2)
#define TTL_7402_DIP(_name) \
- NET_REGISTER_DEV(7402_dip, _name)
+ NET_REGISTER_DEV(7402_dip, _name)
NETLIB_SIGNAL(7402, 2, 1, 0);
NETLIB_DEVICE(7402_dip,
- NETLIB_NAME(7402) m_1;
- NETLIB_NAME(7402) m_2;
- NETLIB_NAME(7402) m_3;
- NETLIB_NAME(7402) m_4;
+ NETLIB_NAME(7402) m_1;
+ NETLIB_NAME(7402) m_2;
+ NETLIB_NAME(7402) m_3;
+ NETLIB_NAME(7402) m_4;
);
#endif /* NLD_7402_H_ */
diff --git a/src/emu/netlist/devices/nld_7404.c b/src/emu/netlist/devices/nld_7404.c
index 99591d961f8..e0f1dd59e19 100644
--- a/src/emu/netlist/devices/nld_7404.c
+++ b/src/emu/netlist/devices/nld_7404.c
@@ -24,50 +24,50 @@ NETLIB_UPDATE(7404)
NETLIB_START(7404_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
- register_sub(m_4, "4");
- register_sub(m_5, "5");
- register_sub(m_6, "6");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+ register_sub(m_4, "4");
+ register_sub(m_5, "5");
+ register_sub(m_6, "6");
- register_subalias("1", m_1.m_I);
- register_subalias("2", m_1.m_Q);
+ register_subalias("1", m_1.m_I);
+ register_subalias("2", m_1.m_Q);
- register_subalias("3", m_2.m_I);
- register_subalias("4", m_2.m_Q);
+ register_subalias("3", m_2.m_I);
+ register_subalias("4", m_2.m_Q);
- register_subalias("5", m_3.m_I);
- register_subalias("6", m_3.m_Q);
+ register_subalias("5", m_3.m_I);
+ register_subalias("6", m_3.m_Q);
- register_subalias("8", m_4.m_Q);
- register_subalias("9", m_4.m_I);
+ register_subalias("8", m_4.m_Q);
+ register_subalias("9", m_4.m_I);
- register_subalias("10", m_5.m_Q);
- register_subalias("11", m_5.m_I);
+ register_subalias("10", m_5.m_Q);
+ register_subalias("11", m_5.m_I);
- register_subalias("12", m_6.m_Q);
- register_subalias("13", m_6.m_I);
+ register_subalias("12", m_6.m_Q);
+ register_subalias("13", m_6.m_I);
}
NETLIB_UPDATE(7404_dip)
{
- /* only called during startup */
+ /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
- m_4.update_dev();
- m_5.update_dev();
- m_6.update_dev();
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
+ m_4.update_dev();
+ m_5.update_dev();
+ m_6.update_dev();
}
NETLIB_RESET(7404_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
- m_4.do_reset();
- m_5.do_reset();
- m_6.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
+ m_4.do_reset();
+ m_5.do_reset();
+ m_6.do_reset();
}
diff --git a/src/emu/netlist/devices/nld_7404.h b/src/emu/netlist/devices/nld_7404.h
index 88151503f8a..f96eb355251 100644
--- a/src/emu/netlist/devices/nld_7404.h
+++ b/src/emu/netlist/devices/nld_7404.h
@@ -43,15 +43,15 @@ public:
NET_CONNECT(_name, A, _A)
#define TTL_7404_DIP(_name) \
- NET_REGISTER_DEV(7402_dip, _name)
+ NET_REGISTER_DEV(7402_dip, _name)
NETLIB_DEVICE(7404_dip,
- NETLIB_NAME(7404) m_1;
- NETLIB_NAME(7404) m_2;
- NETLIB_NAME(7404) m_3;
- NETLIB_NAME(7404) m_4;
- NETLIB_NAME(7404) m_5;
- NETLIB_NAME(7404) m_6;
+ NETLIB_NAME(7404) m_1;
+ NETLIB_NAME(7404) m_2;
+ NETLIB_NAME(7404) m_3;
+ NETLIB_NAME(7404) m_4;
+ NETLIB_NAME(7404) m_5;
+ NETLIB_NAME(7404) m_6;
);
#endif /* NLD_7404_H_ */
diff --git a/src/emu/netlist/devices/nld_7410.c b/src/emu/netlist/devices/nld_7410.c
index 933a2b0fb07..95f477a2b4a 100644
--- a/src/emu/netlist/devices/nld_7410.c
+++ b/src/emu/netlist/devices/nld_7410.c
@@ -7,38 +7,37 @@
NETLIB_START(7410_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
-
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
- register_subalias("3", m_2.m_i[0]);
- register_subalias("4", m_2.m_i[1]);
- register_subalias("5", m_2.m_i[2]);
- register_subalias("6", m_2.m_Q);
-
- register_subalias("8", m_3.m_Q);
- register_subalias("9", m_3.m_i[0]);
- register_subalias("10", m_3.m_i[1]);
- register_subalias("11", m_3.m_i[2]);
-
- register_subalias("12", m_1.m_Q);
- register_subalias("13", m_1.m_i[2]);
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
+ register_subalias("3", m_2.m_i[0]);
+ register_subalias("4", m_2.m_i[1]);
+ register_subalias("5", m_2.m_i[2]);
+ register_subalias("6", m_2.m_Q);
+
+ register_subalias("8", m_3.m_Q);
+ register_subalias("9", m_3.m_i[0]);
+ register_subalias("10", m_3.m_i[1]);
+ register_subalias("11", m_3.m_i[2]);
+
+ register_subalias("12", m_1.m_Q);
+ register_subalias("13", m_1.m_i[2]);
}
NETLIB_UPDATE(7410_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
}
NETLIB_RESET(7410_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7410.h b/src/emu/netlist/devices/nld_7410.h
index 098ca903fff..82c6c194476 100644
--- a/src/emu/netlist/devices/nld_7410.h
+++ b/src/emu/netlist/devices/nld_7410.h
@@ -43,13 +43,13 @@
NETLIB_SIGNAL(7410, 3, 0, 0);
#define TTL_7410_DIP(_name) \
- NET_REGISTER_DEV(7410_dip, _name)
+ NET_REGISTER_DEV(7410_dip, _name)
NETLIB_DEVICE(7410_dip,
- NETLIB_NAME(7410) m_1;
- NETLIB_NAME(7410) m_2;
- NETLIB_NAME(7410) m_3;
+ NETLIB_NAME(7410) m_1;
+ NETLIB_NAME(7410) m_2;
+ NETLIB_NAME(7410) m_3;
);
#endif /* NLD_7410_H_ */
diff --git a/src/emu/netlist/devices/nld_74107.c b/src/emu/netlist/devices/nld_74107.c
index 7480b9fcd74..b679b2125d7 100644
--- a/src/emu/netlist/devices/nld_74107.c
+++ b/src/emu/netlist/devices/nld_74107.c
@@ -18,13 +18,13 @@ NETLIB_START(74107Asub)
NETLIB_RESET(74107Asub)
{
- m_clk.set_state(netlist_input_t::STATE_INP_HL);
- m_Q.initial(0);
- m_QQ.initial(1);
+ m_clk.set_state(netlist_input_t::STATE_INP_HL);
+ m_Q.initial(0);
+ m_QQ.initial(1);
- m_Q1 = 0;
- m_Q2 = 0;
- m_F = 0;
+ m_Q1 = 0;
+ m_Q2 = 0;
+ m_F = 0;
}
NETLIB_START(74107A)
@@ -42,7 +42,7 @@ NETLIB_START(74107A)
NETLIB_RESET(74107A)
{
- sub.reset();
+ sub.reset();
}
ATTR_HOT inline void NETLIB_NAME(74107Asub)::newstate(const netlist_sig_t state)
@@ -103,39 +103,39 @@ NETLIB_UPDATE(74107A)
NETLIB_START(74107_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
- register_subalias("1", m_1.m_J);
- register_subalias("2", m_1.sub.m_QQ);
- register_subalias("3", m_1.sub.m_Q);
+ register_subalias("1", m_1.m_J);
+ register_subalias("2", m_1.sub.m_QQ);
+ register_subalias("3", m_1.sub.m_Q);
- register_subalias("4", m_1.m_K);
- register_subalias("5", m_2.sub.m_Q);
- register_subalias("6", m_2.sub.m_QQ);
+ register_subalias("4", m_1.m_K);
+ register_subalias("5", m_2.sub.m_Q);
+ register_subalias("6", m_2.sub.m_QQ);
- // register_subalias("7", ); ==> GND
+ // register_subalias("7", ); ==> GND
- register_subalias("8", m_2.m_J);
- register_subalias("9", m_2.sub.m_clk);
- register_subalias("10", m_2.m_clrQ);
+ register_subalias("8", m_2.m_J);
+ register_subalias("9", m_2.sub.m_clk);
+ register_subalias("10", m_2.m_clrQ);
- register_subalias("11", m_2.m_K);
- register_subalias("12", m_1.sub.m_clk);
- register_subalias("13", m_1.m_clrQ);
+ register_subalias("11", m_2.m_K);
+ register_subalias("12", m_1.sub.m_clk);
+ register_subalias("13", m_1.m_clrQ);
- // register_subalias("14", ); ==> VCC
+ // register_subalias("14", ); ==> VCC
}
NETLIB_RESET(74107_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
NETLIB_UPDATE(74107_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
}
diff --git a/src/emu/netlist/devices/nld_74107.h b/src/emu/netlist/devices/nld_74107.h
index 44b0b766372..150516a00c3 100644
--- a/src/emu/netlist/devices/nld_74107.h
+++ b/src/emu/netlist/devices/nld_74107.h
@@ -72,7 +72,7 @@
TTL_74107A(_name, _CLK, _J, _K, _CLRQ)
#define TTL_74107_DIP(_name) \
- NET_REGISTER_DEV(74107_dip, _name)
+ NET_REGISTER_DEV(74107_dip, _name)
NETLIB_SUBDEVICE(74107Asub,
netlist_ttl_input_t m_clk;
@@ -108,8 +108,8 @@ public:
NETLIB_DEVICE(74107_dip,
- NETLIB_NAME(74107) m_1;
- NETLIB_NAME(74107) m_2;
+ NETLIB_NAME(74107) m_1;
+ NETLIB_NAME(74107) m_2;
);
#endif /* NLD_74107_H_ */
diff --git a/src/emu/netlist/devices/nld_74153.c b/src/emu/netlist/devices/nld_74153.c
index f8e16408009..94c51fa85a8 100644
--- a/src/emu/netlist/devices/nld_74153.c
+++ b/src/emu/netlist/devices/nld_74153.c
@@ -12,42 +12,42 @@
NETLIB_START(74153sub)
{
- register_input("C0", m_C[0]);
- register_input("C1", m_C[1]);
- register_input("C2", m_C[2]);
- register_input("C3", m_C[3]);
- register_input("G", m_G);
+ register_input("C0", m_C[0]);
+ register_input("C1", m_C[1]);
+ register_input("C2", m_C[2]);
+ register_input("C3", m_C[3]);
+ register_input("G", m_G);
- register_output("AY", m_Y); //FIXME: Change netlists
+ register_output("AY", m_Y); //FIXME: Change netlists
- m_chan = 0;
+ m_chan = 0;
- save(NAME(m_chan));
+ save(NAME(m_chan));
}
NETLIB_RESET(74153sub)
{
- m_chan = 0;
+ m_chan = 0;
}
NETLIB_UPDATE(74153sub)
{
- const netlist_time delay[2] = { NLTIME_FROM_NS(23), NLTIME_FROM_NS(18) };
- if (!INPLOGIC(m_G))
- {
- UINT8 t = INPLOGIC(m_C[m_chan]);
- OUTLOGIC(m_Y, t, delay[t] );
- }
- else
- {
- OUTLOGIC(m_Y, 0, delay[0]);
- }
+ const netlist_time delay[2] = { NLTIME_FROM_NS(23), NLTIME_FROM_NS(18) };
+ if (!INPLOGIC(m_G))
+ {
+ UINT8 t = INPLOGIC(m_C[m_chan]);
+ OUTLOGIC(m_Y, t, delay[t] );
+ }
+ else
+ {
+ OUTLOGIC(m_Y, 0, delay[0]);
+ }
}
NETLIB_START(74153)
{
- register_sub(m_sub, "SUB");
+ register_sub(m_sub, "SUB");
register_subalias("C0", m_sub.m_C[0]);
register_subalias("C1", m_sub.m_C[1]);
@@ -68,44 +68,43 @@ NETLIB_RESET(74153)
NETLIB_UPDATE(74153)
{
- m_sub.m_chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1));
- m_sub.update();
+ m_sub.m_chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1));
+ m_sub.update();
}
NETLIB_START(74153_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
-
- register_subalias("1", m_1.m_G);
- register_input("2", m_B); // m_2.m_B
- register_subalias("3", m_1.m_C[3]);
- register_subalias("4", m_1.m_C[2]);
- register_subalias("5", m_1.m_C[1]);
- register_subalias("6", m_1.m_C[0]);
- register_subalias("7", m_1.m_Y);
-
- register_subalias("9", m_2.m_Y);
- register_subalias("10", m_2.m_C[0]);
- register_subalias("11", m_2.m_C[1]);
- register_subalias("12", m_2.m_C[2]);
- register_subalias("13", m_2.m_C[3]);
-
- register_input("14", m_A); // m_2.m_B
- register_subalias("15", m_2.m_G);
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+
+ register_subalias("1", m_1.m_G);
+ register_input("2", m_B); // m_2.m_B
+ register_subalias("3", m_1.m_C[3]);
+ register_subalias("4", m_1.m_C[2]);
+ register_subalias("5", m_1.m_C[1]);
+ register_subalias("6", m_1.m_C[0]);
+ register_subalias("7", m_1.m_Y);
+
+ register_subalias("9", m_2.m_Y);
+ register_subalias("10", m_2.m_C[0]);
+ register_subalias("11", m_2.m_C[1]);
+ register_subalias("12", m_2.m_C[2]);
+ register_subalias("13", m_2.m_C[3]);
+
+ register_input("14", m_A); // m_2.m_B
+ register_subalias("15", m_2.m_G);
}
NETLIB_UPDATE(74153_dip)
{
- m_2.m_chan = m_1.m_chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1));
- m_1.update();
- m_2.update();
+ m_2.m_chan = m_1.m_chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1));
+ m_1.update();
+ m_2.update();
}
NETLIB_RESET(74153_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_74153.h b/src/emu/netlist/devices/nld_74153.h
index 8252dcebabf..03c942f9a70 100644
--- a/src/emu/netlist/devices/nld_74153.h
+++ b/src/emu/netlist/devices/nld_74153.h
@@ -58,30 +58,30 @@
NET_CONNECT(_name, G, _G)
#define TTL_74153_DIP(_name) \
- NET_REGISTER_DEV(74153_dip, _name)
+ NET_REGISTER_DEV(74153_dip, _name)
NETLIB_SUBDEVICE(74153sub,
- netlist_ttl_input_t m_C[4];
- netlist_ttl_input_t m_G;
+ netlist_ttl_input_t m_C[4];
+ netlist_ttl_input_t m_G;
- netlist_ttl_output_t m_Y;
+ netlist_ttl_output_t m_Y;
- int m_chan;
+ int m_chan;
);
NETLIB_DEVICE(74153,
public:
- NETLIB_NAME(74153sub) m_sub;
+ NETLIB_NAME(74153sub) m_sub;
netlist_ttl_input_t m_A;
netlist_ttl_input_t m_B;
);
NETLIB_DEVICE(74153_dip,
- NETLIB_NAME(74153sub) m_1;
- NETLIB_NAME(74153sub) m_2;
- netlist_ttl_input_t m_A;
- netlist_ttl_input_t m_B;
+ NETLIB_NAME(74153sub) m_1;
+ NETLIB_NAME(74153sub) m_2;
+ netlist_ttl_input_t m_A;
+ netlist_ttl_input_t m_B;
);
#endif /* NLD_74153_H_ */
diff --git a/src/emu/netlist/devices/nld_7420.c b/src/emu/netlist/devices/nld_7420.c
index edfb536d3a8..b4bb3f77a1b 100644
--- a/src/emu/netlist/devices/nld_7420.c
+++ b/src/emu/netlist/devices/nld_7420.c
@@ -7,35 +7,34 @@
NETLIB_START(7420_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
- register_subalias("4", m_1.m_i[2]);
- register_subalias("5", m_1.m_i[3]);
- register_subalias("6", m_1.m_Q);
+ register_subalias("4", m_1.m_i[2]);
+ register_subalias("5", m_1.m_i[3]);
+ register_subalias("6", m_1.m_Q);
- register_subalias("8", m_2.m_Q);
- register_subalias("9", m_2.m_i[0]);
- register_subalias("10", m_2.m_i[1]);
+ register_subalias("8", m_2.m_Q);
+ register_subalias("9", m_2.m_i[0]);
+ register_subalias("10", m_2.m_i[1]);
- register_subalias("12", m_2.m_i[2]);
- register_subalias("13", m_2.m_i[3]);
+ register_subalias("12", m_2.m_i[2]);
+ register_subalias("13", m_2.m_i[3]);
}
NETLIB_UPDATE(7420_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
}
NETLIB_RESET(7420_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7420.h b/src/emu/netlist/devices/nld_7420.h
index 3b359fb91d1..04f74c1d91c 100644
--- a/src/emu/netlist/devices/nld_7420.h
+++ b/src/emu/netlist/devices/nld_7420.h
@@ -46,12 +46,12 @@
NETLIB_SIGNAL(7420, 4, 0, 0);
#define TTL_7420_DIP(_name) \
- NET_REGISTER_DEV(7420_dip, _name)
+ NET_REGISTER_DEV(7420_dip, _name)
NETLIB_DEVICE(7420_dip,
- NETLIB_NAME(7420) m_1;
- NETLIB_NAME(7420) m_2;
+ NETLIB_NAME(7420) m_1;
+ NETLIB_NAME(7420) m_2;
);
#endif /* NLD_7420_H_ */
diff --git a/src/emu/netlist/devices/nld_7425.c b/src/emu/netlist/devices/nld_7425.c
index bb903544485..30262a1f181 100644
--- a/src/emu/netlist/devices/nld_7425.c
+++ b/src/emu/netlist/devices/nld_7425.c
@@ -7,39 +7,38 @@
NETLIB_START(7425_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
- //register_subalias("3", ); X1 ==> NC
+ //register_subalias("3", ); X1 ==> NC
- register_subalias("4", m_1.m_i[2]);
- register_subalias("5", m_1.m_i[3]);
- register_subalias("6", m_1.m_Q);
+ register_subalias("4", m_1.m_i[2]);
+ register_subalias("5", m_1.m_i[3]);
+ register_subalias("6", m_1.m_Q);
- register_subalias("8", m_2.m_Q);
- register_subalias("9", m_2.m_i[0]);
- register_subalias("10", m_2.m_i[1]);
+ register_subalias("8", m_2.m_Q);
+ register_subalias("9", m_2.m_i[0]);
+ register_subalias("10", m_2.m_i[1]);
- //register_subalias("11", ); X2 ==> NC
+ //register_subalias("11", ); X2 ==> NC
- register_subalias("12", m_2.m_i[2]);
- register_subalias("13", m_2.m_i[3]);
+ register_subalias("12", m_2.m_i[2]);
+ register_subalias("13", m_2.m_i[3]);
}
NETLIB_UPDATE(7425_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
}
NETLIB_RESET(7425_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7425.h b/src/emu/netlist/devices/nld_7425.h
index 271e59ee49b..f7df8442851 100644
--- a/src/emu/netlist/devices/nld_7425.h
+++ b/src/emu/netlist/devices/nld_7425.h
@@ -49,11 +49,11 @@
NETLIB_SIGNAL(7425, 4, 1, 0);
#define TTL_7425_DIP(_name) \
- NET_REGISTER_DEV(7425_dip, _name)
+ NET_REGISTER_DEV(7425_dip, _name)
NETLIB_DEVICE(7425_dip,
- NETLIB_NAME(7425) m_1;
- NETLIB_NAME(7425) m_2;
+ NETLIB_NAME(7425) m_1;
+ NETLIB_NAME(7425) m_2;
);
#endif /* NLD_7425_H_ */
diff --git a/src/emu/netlist/devices/nld_7427.c b/src/emu/netlist/devices/nld_7427.c
index 7867aa5bad2..49904334d07 100644
--- a/src/emu/netlist/devices/nld_7427.c
+++ b/src/emu/netlist/devices/nld_7427.c
@@ -7,38 +7,37 @@
NETLIB_START(7427_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
-
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
- register_subalias("3", m_2.m_i[0]);
- register_subalias("4", m_2.m_i[1]);
- register_subalias("5", m_2.m_i[2]);
- register_subalias("6", m_2.m_Q);
-
- register_subalias("8", m_3.m_Q);
- register_subalias("9", m_3.m_i[0]);
- register_subalias("10", m_3.m_i[1]);
- register_subalias("11", m_3.m_i[2]);
-
- register_subalias("12", m_1.m_Q);
- register_subalias("13", m_1.m_i[2]);
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
+ register_subalias("3", m_2.m_i[0]);
+ register_subalias("4", m_2.m_i[1]);
+ register_subalias("5", m_2.m_i[2]);
+ register_subalias("6", m_2.m_Q);
+
+ register_subalias("8", m_3.m_Q);
+ register_subalias("9", m_3.m_i[0]);
+ register_subalias("10", m_3.m_i[1]);
+ register_subalias("11", m_3.m_i[2]);
+
+ register_subalias("12", m_1.m_Q);
+ register_subalias("13", m_1.m_i[2]);
}
NETLIB_UPDATE(7427_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
}
NETLIB_RESET(7427_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7427.h b/src/emu/netlist/devices/nld_7427.h
index ae5f7e65a75..88dc344ea16 100644
--- a/src/emu/netlist/devices/nld_7427.h
+++ b/src/emu/netlist/devices/nld_7427.h
@@ -43,12 +43,12 @@
NETLIB_SIGNAL(7427, 3, 1, 0);
#define TTL_7427_DIP(_name) \
- NET_REGISTER_DEV(7427_dip, _name)
+ NET_REGISTER_DEV(7427_dip, _name)
NETLIB_DEVICE(7427_dip,
- NETLIB_NAME(7427) m_1;
- NETLIB_NAME(7427) m_2;
- NETLIB_NAME(7427) m_3;
+ NETLIB_NAME(7427) m_1;
+ NETLIB_NAME(7427) m_2;
+ NETLIB_NAME(7427) m_3;
);
#endif /* NLD_7427_H_ */
diff --git a/src/emu/netlist/devices/nld_7430.c b/src/emu/netlist/devices/nld_7430.c
index e6ef3624b8b..b9079846325 100644
--- a/src/emu/netlist/devices/nld_7430.c
+++ b/src/emu/netlist/devices/nld_7430.c
@@ -7,29 +7,28 @@
NETLIB_START(7430_dip)
{
- register_sub(m_1, "1");
+ register_sub(m_1, "1");
- register_subalias("1", m_1.m_i[0]);
- register_subalias("2", m_1.m_i[1]);
- register_subalias("3", m_1.m_i[2]);
- register_subalias("4", m_1.m_i[3]);
- register_subalias("5", m_1.m_i[4]);
- register_subalias("6", m_1.m_i[5]);
+ register_subalias("1", m_1.m_i[0]);
+ register_subalias("2", m_1.m_i[1]);
+ register_subalias("3", m_1.m_i[2]);
+ register_subalias("4", m_1.m_i[3]);
+ register_subalias("5", m_1.m_i[4]);
+ register_subalias("6", m_1.m_i[5]);
- register_subalias("8", m_1.m_Q);
+ register_subalias("8", m_1.m_Q);
- register_subalias("11", m_1.m_i[6]);
- register_subalias("12", m_1.m_i[7]);
+ register_subalias("11", m_1.m_i[6]);
+ register_subalias("12", m_1.m_i[7]);
}
NETLIB_UPDATE(7430_dip)
{
- /* only called during startup */
- m_1.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
}
NETLIB_RESET(7430_dip)
{
- m_1.do_reset();
+ m_1.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7430.h b/src/emu/netlist/devices/nld_7430.h
index daba75e4d96..7530380d216 100644
--- a/src/emu/netlist/devices/nld_7430.h
+++ b/src/emu/netlist/devices/nld_7430.h
@@ -54,10 +54,10 @@
NETLIB_SIGNAL(7430, 8, 0, 0);
#define TTL_7430_DIP(_name) \
- NET_REGISTER_DEV(7430_dip, _name)
+ NET_REGISTER_DEV(7430_dip, _name)
NETLIB_DEVICE(7430_dip,
- NETLIB_NAME(7430) m_1;
+ NETLIB_NAME(7430) m_1;
);
#endif /* NLD_7430_H_ */
diff --git a/src/emu/netlist/devices/nld_7448.c b/src/emu/netlist/devices/nld_7448.c
index dfa2a226135..59b00935240 100644
--- a/src/emu/netlist/devices/nld_7448.c
+++ b/src/emu/netlist/devices/nld_7448.c
@@ -9,160 +9,159 @@
NETLIB_START(7448)
{
- register_sub(sub, "sub");
-
- register_subalias("A", sub.m_A);
- register_subalias("B", sub.m_B);
- register_subalias("C", sub.m_C);
- register_subalias("D", sub.m_D);
- register_input("LTQ", m_LTQ);
- register_input("BIQ", m_BIQ);
- register_subalias("RBIQ",sub.m_RBIQ);
-
- register_subalias("a", sub.m_a);
- register_subalias("b", sub.m_b);
- register_subalias("c", sub.m_c);
- register_subalias("d", sub.m_d);
- register_subalias("e", sub.m_e);
- register_subalias("f", sub.m_f);
- register_subalias("g", sub.m_g);
+ register_sub(sub, "sub");
+
+ register_subalias("A", sub.m_A);
+ register_subalias("B", sub.m_B);
+ register_subalias("C", sub.m_C);
+ register_subalias("D", sub.m_D);
+ register_input("LTQ", m_LTQ);
+ register_input("BIQ", m_BIQ);
+ register_subalias("RBIQ",sub.m_RBIQ);
+
+ register_subalias("a", sub.m_a);
+ register_subalias("b", sub.m_b);
+ register_subalias("c", sub.m_c);
+ register_subalias("d", sub.m_d);
+ register_subalias("e", sub.m_e);
+ register_subalias("f", sub.m_f);
+ register_subalias("g", sub.m_g);
}
NETLIB_RESET(7448)
{
- sub.do_reset();
+ sub.do_reset();
}
NETLIB_UPDATE(7448)
{
- if (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ))
- {
- sub.update_outputs(8);
- }
- else if (!INPLOGIC(m_BIQ))
- {
- sub.update_outputs(15);
- }
-
- if (!INPLOGIC(m_BIQ) || (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ)))
- {
- sub.m_A.inactivate();
- sub.m_B.inactivate();
- sub.m_C.inactivate();
- sub.m_D.inactivate();
- sub.m_RBIQ.inactivate();
- } else {
- sub.m_RBIQ.activate();
- sub.m_D.activate();
- sub.m_C.activate();
- sub.m_B.activate();
- sub.m_A.activate();
- sub.update();
- }
+ if (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ))
+ {
+ sub.update_outputs(8);
+ }
+ else if (!INPLOGIC(m_BIQ))
+ {
+ sub.update_outputs(15);
+ }
+
+ if (!INPLOGIC(m_BIQ) || (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ)))
+ {
+ sub.m_A.inactivate();
+ sub.m_B.inactivate();
+ sub.m_C.inactivate();
+ sub.m_D.inactivate();
+ sub.m_RBIQ.inactivate();
+ } else {
+ sub.m_RBIQ.activate();
+ sub.m_D.activate();
+ sub.m_C.activate();
+ sub.m_B.activate();
+ sub.m_A.activate();
+ sub.update();
+ }
}
NETLIB_START(7448_sub)
{
- register_input("A0", m_A);
- register_input("A1", m_B);
- register_input("A2", m_C);
- register_input("A3", m_D);
- register_input("RBIQ", m_RBIQ);
-
- register_output("a", m_a);
- register_output("b", m_b);
- register_output("c", m_c);
- register_output("d", m_d);
- register_output("e", m_e);
- register_output("f", m_f);
- register_output("g", m_g);
-
- save(NAME(m_state));
+ register_input("A0", m_A);
+ register_input("A1", m_B);
+ register_input("A2", m_C);
+ register_input("A3", m_D);
+ register_input("RBIQ", m_RBIQ);
+
+ register_output("a", m_a);
+ register_output("b", m_b);
+ register_output("c", m_c);
+ register_output("d", m_d);
+ register_output("e", m_e);
+ register_output("f", m_f);
+ register_output("g", m_g);
+
+ save(NAME(m_state));
}
NETLIB_RESET(7448_sub)
{
- m_state = 0;
+ m_state = 0;
}
NETLIB_UPDATE(7448_sub)
{
- UINT8 v;
+ UINT8 v;
- v = (INPLOGIC(m_A) << 0) | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_C) << 2) | (INPLOGIC(m_D) << 3);
- if ((!INPLOGIC(m_RBIQ) && (v==0)))
- v = 15;
- update_outputs(v);
+ v = (INPLOGIC(m_A) << 0) | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_C) << 2) | (INPLOGIC(m_D) << 3);
+ if ((!INPLOGIC(m_RBIQ) && (v==0)))
+ v = 15;
+ update_outputs(v);
}
NETLIB_FUNC_VOID(7448_sub, update_outputs, (UINT8 v))
{
- assert(v<16);
- if (v != m_state)
- {
- // max transfer time is 100 NS */
-
- OUTLOGIC(m_a, tab7448[v][0], NLTIME_FROM_NS(100));
- OUTLOGIC(m_b, tab7448[v][1], NLTIME_FROM_NS(100));
- OUTLOGIC(m_c, tab7448[v][2], NLTIME_FROM_NS(100));
- OUTLOGIC(m_d, tab7448[v][3], NLTIME_FROM_NS(100));
- OUTLOGIC(m_e, tab7448[v][4], NLTIME_FROM_NS(100));
- OUTLOGIC(m_f, tab7448[v][5], NLTIME_FROM_NS(100));
- OUTLOGIC(m_g, tab7448[v][6], NLTIME_FROM_NS(100));
- m_state = v;
- }
+ assert(v<16);
+ if (v != m_state)
+ {
+ // max transfer time is 100 NS */
+
+ OUTLOGIC(m_a, tab7448[v][0], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_b, tab7448[v][1], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_c, tab7448[v][2], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_d, tab7448[v][3], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_e, tab7448[v][4], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_f, tab7448[v][5], NLTIME_FROM_NS(100));
+ OUTLOGIC(m_g, tab7448[v][6], NLTIME_FROM_NS(100));
+ m_state = v;
+ }
}
const UINT8 NETLIB_NAME(7448_sub)::tab7448[16][7] =
{
- { 1, 1, 1, 1, 1, 1, 0 }, /* 00 - not blanked ! */
- { 0, 1, 1, 0, 0, 0, 0 }, /* 01 */
- { 1, 1, 0, 1, 1, 0, 1 }, /* 02 */
- { 1, 1, 1, 1, 0, 0, 1 }, /* 03 */
- { 0, 1, 1, 0, 0, 1, 1 }, /* 04 */
- { 1, 0, 1, 1, 0, 1, 1 }, /* 05 */
- { 0, 0, 1, 1, 1, 1, 1 }, /* 06 */
- { 1, 1, 1, 0, 0, 0, 0 }, /* 07 */
- { 1, 1, 1, 1, 1, 1, 1 }, /* 08 */
- { 1, 1, 1, 0, 0, 1, 1 }, /* 09 */
- { 0, 0, 0, 1, 1, 0, 1 }, /* 10 */
- { 0, 0, 1, 1, 0, 0, 1 }, /* 11 */
- { 0, 1, 0, 0, 0, 1, 1 }, /* 12 */
- { 1, 0, 0, 1, 0, 1, 1 }, /* 13 */
- { 0, 0, 0, 1, 1, 1, 1 }, /* 14 */
- { 0, 0, 0, 0, 0, 0, 0 }, /* 15 */
+ { 1, 1, 1, 1, 1, 1, 0 }, /* 00 - not blanked ! */
+ { 0, 1, 1, 0, 0, 0, 0 }, /* 01 */
+ { 1, 1, 0, 1, 1, 0, 1 }, /* 02 */
+ { 1, 1, 1, 1, 0, 0, 1 }, /* 03 */
+ { 0, 1, 1, 0, 0, 1, 1 }, /* 04 */
+ { 1, 0, 1, 1, 0, 1, 1 }, /* 05 */
+ { 0, 0, 1, 1, 1, 1, 1 }, /* 06 */
+ { 1, 1, 1, 0, 0, 0, 0 }, /* 07 */
+ { 1, 1, 1, 1, 1, 1, 1 }, /* 08 */
+ { 1, 1, 1, 0, 0, 1, 1 }, /* 09 */
+ { 0, 0, 0, 1, 1, 0, 1 }, /* 10 */
+ { 0, 0, 1, 1, 0, 0, 1 }, /* 11 */
+ { 0, 1, 0, 0, 0, 1, 1 }, /* 12 */
+ { 1, 0, 0, 1, 0, 1, 1 }, /* 13 */
+ { 0, 0, 0, 1, 1, 1, 1 }, /* 14 */
+ { 0, 0, 0, 0, 0, 0, 0 }, /* 15 */
};
NETLIB_START(7448_dip)
{
- NETLIB_NAME(7448)::start();
-
- register_subalias("1", sub.m_B);
- register_subalias("2", sub.m_C);
- register_subalias("3", m_LTQ);
- register_subalias("4", m_BIQ);
- register_subalias("5",sub.m_RBIQ);
- register_subalias("6", sub.m_D);
- register_subalias("7", sub.m_A);
-
- register_subalias("9", sub.m_e);
- register_subalias("10", sub.m_d);
- register_subalias("11", sub.m_c);
- register_subalias("12", sub.m_b);
- register_subalias("13", sub.m_a);
- register_subalias("14", sub.m_g);
- register_subalias("15", sub.m_f);
+ NETLIB_NAME(7448)::start();
+
+ register_subalias("1", sub.m_B);
+ register_subalias("2", sub.m_C);
+ register_subalias("3", m_LTQ);
+ register_subalias("4", m_BIQ);
+ register_subalias("5",sub.m_RBIQ);
+ register_subalias("6", sub.m_D);
+ register_subalias("7", sub.m_A);
+
+ register_subalias("9", sub.m_e);
+ register_subalias("10", sub.m_d);
+ register_subalias("11", sub.m_c);
+ register_subalias("12", sub.m_b);
+ register_subalias("13", sub.m_a);
+ register_subalias("14", sub.m_g);
+ register_subalias("15", sub.m_f);
}
NETLIB_UPDATE(7448_dip)
{
- NETLIB_NAME(7448)::update();
+ NETLIB_NAME(7448)::update();
}
NETLIB_RESET(7448_dip)
{
- NETLIB_NAME(7448)::reset();
+ NETLIB_NAME(7448)::reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7448.h b/src/emu/netlist/devices/nld_7448.h
index a6e47418b62..2c06638f93a 100644
--- a/src/emu/netlist/devices/nld_7448.h
+++ b/src/emu/netlist/devices/nld_7448.h
@@ -27,45 +27,45 @@
#include "../nl_base.h"
#define TTL_7448(_name, _A0, _A1, _A2, _A3, _LTQ, _BIQ, _RBIQ) \
- NET_REGISTER_DEV(7448, _name) \
- NET_CONNECT(_name, A, _A0) \
- NET_CONNECT(_name, B, _A1) \
- NET_CONNECT(_name, C, _A2) \
- NET_CONNECT(_name, D, _A3) \
- NET_CONNECT(_name, LTQ, _LTQ) \
- NET_CONNECT(_name, BIQ, _BIQ) \
- NET_CONNECT(_name, RBIQ, _RBIQ)
+ NET_REGISTER_DEV(7448, _name) \
+ NET_CONNECT(_name, A, _A0) \
+ NET_CONNECT(_name, B, _A1) \
+ NET_CONNECT(_name, C, _A2) \
+ NET_CONNECT(_name, D, _A3) \
+ NET_CONNECT(_name, LTQ, _LTQ) \
+ NET_CONNECT(_name, BIQ, _BIQ) \
+ NET_CONNECT(_name, RBIQ, _RBIQ)
#define TTL_7448_DIP(_name) \
- NET_REGISTER_DEV(7448_dip, _name)
+ NET_REGISTER_DEV(7448_dip, _name)
NETLIB_SUBDEVICE(7448_sub,
- ATTR_HOT void update_outputs(UINT8 v);
- static const UINT8 tab7448[16][7];
+ ATTR_HOT void update_outputs(UINT8 v);
+ static const UINT8 tab7448[16][7];
- netlist_ttl_input_t m_A;
- netlist_ttl_input_t m_B;
- netlist_ttl_input_t m_C;
- netlist_ttl_input_t m_D;
- netlist_ttl_input_t m_RBIQ;
+ netlist_ttl_input_t m_A;
+ netlist_ttl_input_t m_B;
+ netlist_ttl_input_t m_C;
+ netlist_ttl_input_t m_D;
+ netlist_ttl_input_t m_RBIQ;
- UINT8 m_state;
+ UINT8 m_state;
- netlist_ttl_output_t m_a;
- netlist_ttl_output_t m_b;
- netlist_ttl_output_t m_c;
- netlist_ttl_output_t m_d;
- netlist_ttl_output_t m_e;
- netlist_ttl_output_t m_f;
- netlist_ttl_output_t m_g;
+ netlist_ttl_output_t m_a;
+ netlist_ttl_output_t m_b;
+ netlist_ttl_output_t m_c;
+ netlist_ttl_output_t m_d;
+ netlist_ttl_output_t m_e;
+ netlist_ttl_output_t m_f;
+ netlist_ttl_output_t m_g;
);
NETLIB_DEVICE(7448,
public:
- NETLIB_NAME(7448_sub) sub;
+ NETLIB_NAME(7448_sub) sub;
- netlist_ttl_input_t m_LTQ;
- netlist_ttl_input_t m_BIQ;
+ netlist_ttl_input_t m_LTQ;
+ netlist_ttl_input_t m_BIQ;
);
NETLIB_DEVICE_DERIVED(7448_dip, 7448,
diff --git a/src/emu/netlist/devices/nld_7450.c b/src/emu/netlist/devices/nld_7450.c
index bcd1000d43a..9c16cd0537a 100644
--- a/src/emu/netlist/devices/nld_7450.c
+++ b/src/emu/netlist/devices/nld_7450.c
@@ -7,11 +7,11 @@
NETLIB_START(7450)
{
- register_input("A", m_A);
- register_input("B", m_B);
- register_input("C", m_C);
- register_input("D", m_D);
- register_output("Q", m_Q);
+ register_input("A", m_A);
+ register_input("B", m_B);
+ register_input("C", m_C);
+ register_input("D", m_D);
+ register_output("Q", m_Q);
}
NETLIB_RESET(7450)
@@ -20,70 +20,69 @@ NETLIB_RESET(7450)
NETLIB_UPDATE(7450)
{
- m_A.activate();
- m_B.activate();
- m_C.activate();
- m_D.activate();
- UINT8 t1 = INPLOGIC(m_A) & INPLOGIC(m_B);
- UINT8 t2 = INPLOGIC(m_C) & INPLOGIC(m_D);
+ m_A.activate();
+ m_B.activate();
+ m_C.activate();
+ m_D.activate();
+ UINT8 t1 = INPLOGIC(m_A) & INPLOGIC(m_B);
+ UINT8 t2 = INPLOGIC(m_C) & INPLOGIC(m_D);
- const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
+ const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
- UINT8 res = 0;
- if (t1 ^ 1)
- {
- if (t2 ^ 1)
- {
- res = 1;
- }
- else
- {
- m_A.inactivate();
- m_B.inactivate();
- }
- } else {
- if (t2 ^ 1)
- {
- m_C.inactivate();
- m_D.inactivate();
- }
- }
- OUTLOGIC(m_Q, res, times[1 - res]);// ? 22000 : 15000);
+ UINT8 res = 0;
+ if (t1 ^ 1)
+ {
+ if (t2 ^ 1)
+ {
+ res = 1;
+ }
+ else
+ {
+ m_A.inactivate();
+ m_B.inactivate();
+ }
+ } else {
+ if (t2 ^ 1)
+ {
+ m_C.inactivate();
+ m_D.inactivate();
+ }
+ }
+ OUTLOGIC(m_Q, res, times[1 - res]);// ? 22000 : 15000);
}
NETLIB_START(7450_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
- register_subalias("1", m_1.m_A);
- register_subalias("2", m_2.m_A);
- register_subalias("3", m_2.m_B);
- register_subalias("4", m_2.m_C);
- register_subalias("5", m_2.m_D);
- register_subalias("6", m_2.m_Q);
- //register_subalias("7",); GND
+ register_subalias("1", m_1.m_A);
+ register_subalias("2", m_2.m_A);
+ register_subalias("3", m_2.m_B);
+ register_subalias("4", m_2.m_C);
+ register_subalias("5", m_2.m_D);
+ register_subalias("6", m_2.m_Q);
+ //register_subalias("7",); GND
- register_subalias("8", m_1.m_Q);
- register_subalias("9", m_1.m_C);
- register_subalias("10", m_1.m_D);
- //register_subalias("11", m_1.m_X1);
- //register_subalias("12", m_1.m_X1Q);
- register_subalias("13", m_1.m_B);
- //register_subalias("14",); VCC
+ register_subalias("8", m_1.m_Q);
+ register_subalias("9", m_1.m_C);
+ register_subalias("10", m_1.m_D);
+ //register_subalias("11", m_1.m_X1);
+ //register_subalias("12", m_1.m_X1Q);
+ register_subalias("13", m_1.m_B);
+ //register_subalias("14",); VCC
}
NETLIB_UPDATE(7450_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
}
NETLIB_RESET(7450_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7450.h b/src/emu/netlist/devices/nld_7450.h
index 72deaebb508..bb15005ad10 100644
--- a/src/emu/netlist/devices/nld_7450.h
+++ b/src/emu/netlist/devices/nld_7450.h
@@ -27,22 +27,22 @@
#include "nld_signal.h"
#define TTL_7450_ANDORINVERT(_name, _I1, _I2, _I3, _I4) \
- NET_REGISTER_DEV(7450, _name) \
- NET_CONNECT(_name, A, _I1) \
- NET_CONNECT(_name, B, _I2) \
- NET_CONNECT(_name, C, _I3) \
- NET_CONNECT(_name, D, _I4)
+ NET_REGISTER_DEV(7450, _name) \
+ NET_CONNECT(_name, A, _I1) \
+ NET_CONNECT(_name, B, _I2) \
+ NET_CONNECT(_name, C, _I3) \
+ NET_CONNECT(_name, D, _I4)
#define TTL_7450_DIP(_name) \
- NET_REGISTER_DEV(7450_dip, _name)
+ NET_REGISTER_DEV(7450_dip, _name)
NETLIB_DEVICE(7450,
public:
- netlist_ttl_input_t m_A;
- netlist_ttl_input_t m_B;
- netlist_ttl_input_t m_C;
- netlist_ttl_input_t m_D;
- netlist_ttl_output_t m_Q;
+ netlist_ttl_input_t m_A;
+ netlist_ttl_input_t m_B;
+ netlist_ttl_input_t m_C;
+ netlist_ttl_input_t m_D;
+ netlist_ttl_output_t m_Q;
);
NETLIB_DEVICE(7450_dip,
diff --git a/src/emu/netlist/devices/nld_7474.c b/src/emu/netlist/devices/nld_7474.c
index 7ac8aa60ff5..b6bb5f78b9c 100644
--- a/src/emu/netlist/devices/nld_7474.c
+++ b/src/emu/netlist/devices/nld_7474.c
@@ -23,11 +23,11 @@ NETLIB_UPDATE(7474sub)
NETLIB_UPDATE(7474)
{
- if (!INPLOGIC(m_PREQ) && !INPLOGIC(m_CLRQ))
- {
- sub.newstate(1, 1);
- sub.m_CLK.inactivate();
- }
+ if (!INPLOGIC(m_PREQ) && !INPLOGIC(m_CLRQ))
+ {
+ sub.newstate(1, 1);
+ sub.m_CLK.inactivate();
+ }
if (!INPLOGIC(m_PREQ))
{
sub.newstate(1, 0);
@@ -64,7 +64,7 @@ NETLIB_START(7474)
NETLIB_RESET(7474)
{
- sub.do_reset();
+ sub.do_reset();
}
NETLIB_START(7474sub)
@@ -79,44 +79,44 @@ NETLIB_START(7474sub)
NETLIB_RESET(7474sub)
{
- m_CLK.set_state(netlist_input_t::STATE_INP_LH);
+ m_CLK.set_state(netlist_input_t::STATE_INP_LH);
- m_nextD = 0;
- /* FIXME: required by pong doubles - need a mechanism to set this from netlist */
- m_Q.initial(1);
- m_QQ.initial(0);
+ m_nextD = 0;
+ /* FIXME: required by pong doubles - need a mechanism to set this from netlist */
+ m_Q.initial(1);
+ m_QQ.initial(0);
}
NETLIB_START(7474_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
-
- register_subalias("1", m_1.m_CLRQ);
- register_subalias("2", m_1.m_D);
- register_subalias("3", m_1.sub.m_CLK);
- register_subalias("4", m_1.m_PREQ);
- register_subalias("5", m_1.sub.m_Q);
- register_subalias("6", m_1.sub.m_QQ);
- // register_subalias("7", ); ==> GND
-
- register_subalias("8", m_2.sub.m_QQ);
- register_subalias("9", m_2.sub.m_Q);
- register_subalias("10", m_2.m_PREQ);
- register_subalias("11", m_2.sub.m_CLK);
- register_subalias("12", m_2.m_D);
- register_subalias("13", m_2.m_CLRQ);
- // register_subalias("14", ); ==> VCC
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+
+ register_subalias("1", m_1.m_CLRQ);
+ register_subalias("2", m_1.m_D);
+ register_subalias("3", m_1.sub.m_CLK);
+ register_subalias("4", m_1.m_PREQ);
+ register_subalias("5", m_1.sub.m_Q);
+ register_subalias("6", m_1.sub.m_QQ);
+ // register_subalias("7", ); ==> GND
+
+ register_subalias("8", m_2.sub.m_QQ);
+ register_subalias("9", m_2.sub.m_Q);
+ register_subalias("10", m_2.m_PREQ);
+ register_subalias("11", m_2.sub.m_CLK);
+ register_subalias("12", m_2.m_D);
+ register_subalias("13", m_2.m_CLRQ);
+ // register_subalias("14", ); ==> VCC
}
NETLIB_RESET(7474_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
NETLIB_UPDATE(7474_dip)
{
- m_1.update_dev();
- m_2.update_dev();
+ m_1.update_dev();
+ m_2.update_dev();
}
diff --git a/src/emu/netlist/devices/nld_7474.h b/src/emu/netlist/devices/nld_7474.h
index 7dab3f673e9..c72a1e91069 100644
--- a/src/emu/netlist/devices/nld_7474.h
+++ b/src/emu/netlist/devices/nld_7474.h
@@ -52,7 +52,7 @@
NET_CONNECT(_name, PREQ, _PREQ)
#define TTL_7474_DIP(_name) \
- NET_REGISTER_DEV(7474_dip, _name)
+ NET_REGISTER_DEV(7474_dip, _name)
NETLIB_SUBDEVICE(7474sub,
netlist_ttl_input_t m_CLK;
@@ -75,8 +75,8 @@ public:
NETLIB_DEVICE(7474_dip,
- NETLIB_NAME(7474) m_1;
- NETLIB_NAME(7474) m_2;
+ NETLIB_NAME(7474) m_1;
+ NETLIB_NAME(7474) m_2;
);
#endif /* NLD_7474_H_ */
diff --git a/src/emu/netlist/devices/nld_7483.c b/src/emu/netlist/devices/nld_7483.c
index baa01fe41ba..8aa36e80b17 100644
--- a/src/emu/netlist/devices/nld_7483.c
+++ b/src/emu/netlist/devices/nld_7483.c
@@ -28,7 +28,7 @@ NETLIB_START(7483)
NETLIB_RESET(7483)
{
- m_lastr = 0;
+ m_lastr = 0;
}
NETLIB_UPDATE(7483)
@@ -51,33 +51,33 @@ NETLIB_UPDATE(7483)
NETLIB_START(7483_dip)
{
- NETLIB_NAME(7483)::start();
- register_subalias("1", m_A4);
- register_subalias("2", m_S3);
- register_subalias("3", m_A3);
- register_subalias("4", m_B3);
- // register_subalias("5", ); --> VCC
- register_subalias("6", m_S2);
- register_subalias("7", m_B2);
- register_subalias("8", m_A2);
+ NETLIB_NAME(7483)::start();
+ register_subalias("1", m_A4);
+ register_subalias("2", m_S3);
+ register_subalias("3", m_A3);
+ register_subalias("4", m_B3);
+ // register_subalias("5", ); --> VCC
+ register_subalias("6", m_S2);
+ register_subalias("7", m_B2);
+ register_subalias("8", m_A2);
- register_subalias("9", m_S1);
- register_subalias("10", m_A1);
- register_subalias("11", m_B1);
- // register_subalias("12", ); --> GND
- register_subalias("13", m_C0);
- register_subalias("14", m_C4);
- register_subalias("15", m_S4);
- register_subalias("16", m_B4);
+ register_subalias("9", m_S1);
+ register_subalias("10", m_A1);
+ register_subalias("11", m_B1);
+ // register_subalias("12", ); --> GND
+ register_subalias("13", m_C0);
+ register_subalias("14", m_C4);
+ register_subalias("15", m_S4);
+ register_subalias("16", m_B4);
}
NETLIB_UPDATE(7483_dip)
{
- NETLIB_NAME(7483)::update();
+ NETLIB_NAME(7483)::update();
}
NETLIB_RESET(7483_dip)
{
- NETLIB_NAME(7483)::reset();
+ NETLIB_NAME(7483)::reset();
}
diff --git a/src/emu/netlist/devices/nld_7483.h b/src/emu/netlist/devices/nld_7483.h
index b76c68efbbc..d2da6ecc517 100644
--- a/src/emu/netlist/devices/nld_7483.h
+++ b/src/emu/netlist/devices/nld_7483.h
@@ -42,7 +42,7 @@
NET_CONNECT(_name, C0, _CI)
#define TTL_7483_DIP(_name) \
- NET_REGISTER_DEV(7483_dip, _name)
+ NET_REGISTER_DEV(7483_dip, _name)
NETLIB_DEVICE(7483,
netlist_ttl_input_t m_C0;
diff --git a/src/emu/netlist/devices/nld_7486.c b/src/emu/netlist/devices/nld_7486.c
index 4234e1e5400..4eddfb828ef 100644
--- a/src/emu/netlist/devices/nld_7486.c
+++ b/src/emu/netlist/devices/nld_7486.c
@@ -25,42 +25,41 @@ NETLIB_UPDATE(7486)
NETLIB_START(7486_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
- register_sub(m_3, "3");
- register_sub(m_4, "4");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
+ register_sub(m_3, "3");
+ register_sub(m_4, "4");
- register_subalias("1", m_1.m_A);
- register_subalias("2", m_1.m_B);
- register_subalias("3", m_1.m_Q);
+ register_subalias("1", m_1.m_A);
+ register_subalias("2", m_1.m_B);
+ register_subalias("3", m_1.m_Q);
- register_subalias("4", m_2.m_A);
- register_subalias("5", m_2.m_B);
- register_subalias("6", m_2.m_Q);
+ register_subalias("4", m_2.m_A);
+ register_subalias("5", m_2.m_B);
+ register_subalias("6", m_2.m_Q);
- register_subalias("9", m_3.m_A);
- register_subalias("10", m_3.m_B);
- register_subalias("8", m_3.m_Q);
+ register_subalias("9", m_3.m_A);
+ register_subalias("10", m_3.m_B);
+ register_subalias("8", m_3.m_Q);
- register_subalias("12", m_4.m_A);
- register_subalias("13", m_4.m_B);
- register_subalias("11", m_4.m_Q);
+ register_subalias("12", m_4.m_A);
+ register_subalias("13", m_4.m_B);
+ register_subalias("11", m_4.m_Q);
}
NETLIB_UPDATE(7486_dip)
{
- /* only called during startup */
- m_1.update_dev();
- m_2.update_dev();
- m_3.update_dev();
- m_4.update_dev();
+ /* only called during startup */
+ m_1.update_dev();
+ m_2.update_dev();
+ m_3.update_dev();
+ m_4.update_dev();
}
NETLIB_RESET(7486_dip)
{
- m_1.do_reset();
- m_2.do_reset();
- m_3.do_reset();
- m_4.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
+ m_3.do_reset();
+ m_4.do_reset();
}
-
diff --git a/src/emu/netlist/devices/nld_7486.h b/src/emu/netlist/devices/nld_7486.h
index ed8bdbf37b4..d9f8608be6f 100644
--- a/src/emu/netlist/devices/nld_7486.h
+++ b/src/emu/netlist/devices/nld_7486.h
@@ -47,14 +47,14 @@ public:
);
#define TTL_7486_DIP(_name) \
- NET_REGISTER_DEV(7486_dip, _name)
+ NET_REGISTER_DEV(7486_dip, _name)
NETLIB_DEVICE(7486_dip,
- NETLIB_NAME(7486) m_1;
- NETLIB_NAME(7486) m_2;
- NETLIB_NAME(7486) m_3;
- NETLIB_NAME(7486) m_4;
+ NETLIB_NAME(7486) m_1;
+ NETLIB_NAME(7486) m_2;
+ NETLIB_NAME(7486) m_3;
+ NETLIB_NAME(7486) m_4;
);
#endif /* NLD_7486_H_ */
diff --git a/src/emu/netlist/devices/nld_7490.c b/src/emu/netlist/devices/nld_7490.c
index 00a4b1e3c6a..623ee0bf982 100644
--- a/src/emu/netlist/devices/nld_7490.c
+++ b/src/emu/netlist/devices/nld_7490.c
@@ -7,8 +7,8 @@
NETLIB_START(7490)
{
- register_input("A", m_A);
- register_input("B", m_B);
+ register_input("A", m_A);
+ register_input("B", m_B);
register_input("R1", m_R1);
register_input("R2", m_R2);
register_input("R91", m_R91);
@@ -25,15 +25,15 @@ NETLIB_START(7490)
NETLIB_RESET(7490)
{
- m_cnt = 0;
+ m_cnt = 0;
}
static const netlist_time delay[4] =
{
- NLTIME_FROM_NS(18),
- NLTIME_FROM_NS(36) - NLTIME_FROM_NS(18),
- NLTIME_FROM_NS(54) - NLTIME_FROM_NS(18),
- NLTIME_FROM_NS(72) - NLTIME_FROM_NS(18)};
+ NLTIME_FROM_NS(18),
+ NLTIME_FROM_NS(36) - NLTIME_FROM_NS(18),
+ NLTIME_FROM_NS(54) - NLTIME_FROM_NS(18),
+ NLTIME_FROM_NS(72) - NLTIME_FROM_NS(18)};
NETLIB_UPDATE(7490)
{
@@ -50,52 +50,51 @@ NETLIB_UPDATE(7490)
else if (INP_HL(m_A))
{
m_cnt ^= 1;
- OUTLOGIC(m_Q[0], m_cnt & 1, delay[0]);
+ OUTLOGIC(m_Q[0], m_cnt & 1, delay[0]);
+ }
+ else if (INP_HL(m_B))
+ {
+ m_cnt += 2;
+ if (m_cnt >= 10)
+ m_cnt = 0;
+ update_outputs();
}
- else if (INP_HL(m_B))
- {
- m_cnt += 2;
- if (m_cnt >= 10)
- m_cnt = 0;
- update_outputs();
- }
}
NETLIB_FUNC_VOID(7490, update_outputs, (void))
{
-
for (int i=0; i<4; i++)
OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]);
}
NETLIB_START(7490_dip)
{
- NETLIB_NAME(7490)::start();
- register_subalias("1", m_B);
- register_subalias("2", m_R1);
- register_subalias("3", m_R2);
-
- // register_subalias("4", ); --> NC
- // register_subalias("5", ); --> VCC
- register_subalias("6", m_R91);
- register_subalias("7", m_R92);
-
- register_subalias("8", m_Q[2]);
- register_subalias("9", m_Q[1]);
- // register_subalias("10", ); --> GND
- register_subalias("11", m_Q[3]);
- register_subalias("12", m_Q[0]);
- // register_subalias("13", ); --> NC
- register_subalias("14", m_A);
+ NETLIB_NAME(7490)::start();
+ register_subalias("1", m_B);
+ register_subalias("2", m_R1);
+ register_subalias("3", m_R2);
+
+ // register_subalias("4", ); --> NC
+ // register_subalias("5", ); --> VCC
+ register_subalias("6", m_R91);
+ register_subalias("7", m_R92);
+
+ register_subalias("8", m_Q[2]);
+ register_subalias("9", m_Q[1]);
+ // register_subalias("10", ); --> GND
+ register_subalias("11", m_Q[3]);
+ register_subalias("12", m_Q[0]);
+ // register_subalias("13", ); --> NC
+ register_subalias("14", m_A);
}
NETLIB_UPDATE(7490_dip)
{
- NETLIB_NAME(7490)::update();
+ NETLIB_NAME(7490)::update();
}
NETLIB_RESET(7490_dip)
{
- NETLIB_NAME(7490)::reset();
+ NETLIB_NAME(7490)::reset();
}
diff --git a/src/emu/netlist/devices/nld_7490.h b/src/emu/netlist/devices/nld_7490.h
index 29ca2a19716..f54c299fe8b 100644
--- a/src/emu/netlist/devices/nld_7490.h
+++ b/src/emu/netlist/devices/nld_7490.h
@@ -60,14 +60,14 @@
#define TTL_7490(_name, _A, _B, _R1, _R2, _R91, _R92) \
NET_REGISTER_DEV(7490, _name) \
NET_CONNECT(_name, A, _A) \
- NET_CONNECT(_name, B, _B) \
+ NET_CONNECT(_name, B, _B) \
NET_CONNECT(_name, R1, _R1) \
NET_CONNECT(_name, R2, _R2) \
NET_CONNECT(_name, R91, _R91) \
NET_CONNECT(_name, R92, _R92)
#define TTL_7490_DIP(_name) \
- NET_REGISTER_DEV(7490_dip, _name)
+ NET_REGISTER_DEV(7490_dip, _name)
NETLIB_DEVICE(7490,
@@ -78,7 +78,7 @@ NETLIB_DEVICE(7490,
netlist_ttl_input_t m_R91;
netlist_ttl_input_t m_R92;
netlist_ttl_input_t m_A;
- netlist_ttl_input_t m_B;
+ netlist_ttl_input_t m_B;
UINT8 m_cnt;
diff --git a/src/emu/netlist/devices/nld_7493.c b/src/emu/netlist/devices/nld_7493.c
index dcc08776cff..c2b51558c4b 100644
--- a/src/emu/netlist/devices/nld_7493.c
+++ b/src/emu/netlist/devices/nld_7493.c
@@ -29,10 +29,10 @@ NETLIB_START(7493)
NETLIB_RESET(7493)
{
- A.do_reset();
- B.do_reset();
- C.do_reset();
- D.do_reset();
+ A.do_reset();
+ B.do_reset();
+ C.do_reset();
+ D.do_reset();
}
NETLIB_START(7493ff)
@@ -45,13 +45,13 @@ NETLIB_START(7493ff)
NETLIB_RESET(7493ff)
{
- m_reset = 1;
- m_I.set_state(netlist_input_t::STATE_INP_HL);
+ m_reset = 1;
+ m_I.set_state(netlist_input_t::STATE_INP_HL);
}
NETLIB_UPDATE(7493ff)
{
- const netlist_time out_delay = NLTIME_FROM_NS(18);
+ const netlist_time out_delay = NLTIME_FROM_NS(18);
//if (m_reset == 0)
OUTLOGIC(m_Q, (!m_Q.net().new_Q()) & m_reset, out_delay);
}
@@ -68,45 +68,45 @@ NETLIB_UPDATE(7493)
OUTLOGIC(B.m_Q, 0, NLTIME_FROM_NS(40));
OUTLOGIC(C.m_Q, 0, NLTIME_FROM_NS(40));
OUTLOGIC(D.m_Q, 0, NLTIME_FROM_NS(40));
- A.m_reset = B.m_reset = C.m_reset = D.m_reset = 0;
+ A.m_reset = B.m_reset = C.m_reset = D.m_reset = 0;
}
else
{
A.m_I.activate_hl();
B.m_I.activate_hl();
- A.m_reset = B.m_reset = C.m_reset = D.m_reset = 1;
+ A.m_reset = B.m_reset = C.m_reset = D.m_reset = 1;
}
}
NETLIB_START(7493_dip)
{
- NETLIB_NAME(7493)::start();
-
- register_subalias("1", B.m_I);
- register_subalias("2", m_R1);
- register_subalias("3", m_R2);
-
- // register_subalias("4", ); --> NC
- // register_subalias("5", ); --> VCC
- // register_subalias("6", ); --> NC
- // register_subalias("7", ); --> NC
-
- register_subalias("8", C.m_Q);
- register_subalias("9", B.m_Q);
- // register_subalias("10", ); --> GND
- register_subalias("11", D.m_Q);
- register_subalias("12", A.m_Q);
- // register_subalias("13", ); --> NC
- register_subalias("14", A.m_I);
+ NETLIB_NAME(7493)::start();
+
+ register_subalias("1", B.m_I);
+ register_subalias("2", m_R1);
+ register_subalias("3", m_R2);
+
+ // register_subalias("4", ); --> NC
+ // register_subalias("5", ); --> VCC
+ // register_subalias("6", ); --> NC
+ // register_subalias("7", ); --> NC
+
+ register_subalias("8", C.m_Q);
+ register_subalias("9", B.m_Q);
+ // register_subalias("10", ); --> GND
+ register_subalias("11", D.m_Q);
+ register_subalias("12", A.m_Q);
+ // register_subalias("13", ); --> NC
+ register_subalias("14", A.m_I);
}
NETLIB_UPDATE(7493_dip)
{
- NETLIB_NAME(7493)::update();
+ NETLIB_NAME(7493)::update();
}
NETLIB_RESET(7493_dip)
{
- NETLIB_NAME(7493)::reset();
+ NETLIB_NAME(7493)::reset();
}
diff --git a/src/emu/netlist/devices/nld_7493.h b/src/emu/netlist/devices/nld_7493.h
index 0bf182e27c0..8c856048a7c 100644
--- a/src/emu/netlist/devices/nld_7493.h
+++ b/src/emu/netlist/devices/nld_7493.h
@@ -67,7 +67,7 @@
NET_CONNECT(_name, R2, _R2)
#define TTL_7493_DIP(_name) \
- NET_REGISTER_DEV(7493_dip, _name)
+ NET_REGISTER_DEV(7493_dip, _name)
NETLIB_SUBDEVICE(7493ff,
netlist_ttl_input_t m_I;
diff --git a/src/emu/netlist/devices/nld_74ls629.c b/src/emu/netlist/devices/nld_74ls629.c
index 09c12d2d98c..42d10263858 100644
--- a/src/emu/netlist/devices/nld_74ls629.c
+++ b/src/emu/netlist/devices/nld_74ls629.c
@@ -50,139 +50,139 @@ NETLIB_START(SN74LS629clk)
reset();
save(NAME(m_enableq));
- save(NAME(m_inc));
+ save(NAME(m_inc));
}
NETLIB_RESET(SN74LS629clk)
{
- m_enableq = 1;
- m_inc = netlist_time::zero;
+ m_enableq = 1;
+ m_inc = netlist_time::zero;
}
NETLIB_UPDATE(SN74LS629clk)
{
- if (!m_enableq)
- {
- OUTLOGIC(m_Y, !m_Y.net().new_Q(), m_inc);
- }
- else
- {
- OUTLOGIC(m_Y, 1, m_inc);
- }
+ if (!m_enableq)
+ {
+ OUTLOGIC(m_Y, !m_Y.net().new_Q(), m_inc);
+ }
+ else
+ {
+ OUTLOGIC(m_Y, 1, m_inc);
+ }
}
NETLIB_START(SN74LS629)
{
- register_sub(m_clock, "OSC");
- register_sub(m_R_FC, "R_FC");
- register_sub(m_R_RNG, "R_RNG");
+ register_sub(m_clock, "OSC");
+ register_sub(m_R_FC, "R_FC");
+ register_sub(m_R_RNG, "R_RNG");
- register_input("ENQ", m_ENQ);
- register_input("RNG", m_RNG);
- register_input("FC", m_FC);
- register_subalias("GND", m_R_FC.m_N);
+ register_input("ENQ", m_ENQ);
+ register_input("RNG", m_RNG);
+ register_input("FC", m_FC);
+ register_subalias("GND", m_R_FC.m_N);
- connect(m_FC, m_R_FC.m_P);
- connect(m_RNG, m_R_RNG.m_P);
- connect(m_R_FC.m_N, m_R_RNG.m_N);
+ connect(m_FC, m_R_FC.m_P);
+ connect(m_RNG, m_R_RNG.m_P);
+ connect(m_R_FC.m_N, m_R_RNG.m_N);
- register_subalias("Y", m_clock.m_Y);
- register_param("CAP", m_CAP, 1e-6);
+ register_subalias("Y", m_clock.m_Y);
+ register_param("CAP", m_CAP, 1e-6);
}
NETLIB_RESET(SN74LS629)
{
- m_R_FC.set_R(90000.0);
- m_R_RNG.set_R(90000.0);
- m_clock.reset();
+ m_R_FC.set_R(90000.0);
+ m_R_RNG.set_R(90000.0);
+ m_clock.reset();
}
NETLIB_UPDATE(SN74LS629)
{
- {
- // recompute
- double freq;
- double v_freq_2, v_freq_3, v_freq_4;
- double v_freq = INPANALOG(m_FC);
- double v_rng = INPANALOG(m_RNG);
-
- /* coefficients */
- const double k1 = 1.9904769024796283E+03;
- const double k2 = 1.2070059213983407E+03;
- const double k3 = 1.3266985579561108E+03;
- const double k4 = -1.5500979825922698E+02;
- const double k5 = 2.8184536266938172E+00;
- const double k6 = -2.3503421582744556E+02;
- const double k7 = -3.3836786704527788E+02;
- const double k8 = -1.3569136703258670E+02;
- const double k9 = 2.9914575453819188E+00;
- const double k10 = 1.6855569086173170E+00;
-
- /* scale due to input resistance */
-
- /* Polyfunctional3D_model created by zunzun.com using sum of squared absolute error */
- v_freq_2 = v_freq * v_freq;
- v_freq_3 = v_freq_2 * v_freq;
- v_freq_4 = v_freq_3 * v_freq;
- freq = k1;
- freq += k2 * v_freq;
- freq += k3 * v_freq_2;
- freq += k4 * v_freq_3;
- freq += k5 * v_freq_4;
- freq += k6 * v_rng;
- freq += k7 * v_rng * v_freq;
- freq += k8 * v_rng * v_freq_2;
- freq += k9 * v_rng * v_freq_3;
- freq += k10 * v_rng * v_freq_4;
-
- freq *= 0.1e-6 / m_CAP.Value();
-
- // FIXME: we need a possibility to remove entries from queue ...
- // or an exact model ...
- m_clock.m_inc = netlist_time::from_double(0.5 / freq);
- //m_clock.update();
- }
-
- if (!m_clock.m_enableq && INPLOGIC(m_ENQ))
- {
- m_clock.m_enableq = 1;
- OUTLOGIC(m_clock.m_Y, !m_clock.m_Y.net().last_Q(), netlist_time::from_nsec(1));
- }
- else if (m_clock.m_enableq && !INPLOGIC(m_ENQ))
- {
- m_clock.m_enableq = 0;
- OUTLOGIC(m_clock.m_Y, !m_clock.m_Y.net().last_Q(), netlist_time::from_nsec(1));
- }
+ {
+ // recompute
+ double freq;
+ double v_freq_2, v_freq_3, v_freq_4;
+ double v_freq = INPANALOG(m_FC);
+ double v_rng = INPANALOG(m_RNG);
+
+ /* coefficients */
+ const double k1 = 1.9904769024796283E+03;
+ const double k2 = 1.2070059213983407E+03;
+ const double k3 = 1.3266985579561108E+03;
+ const double k4 = -1.5500979825922698E+02;
+ const double k5 = 2.8184536266938172E+00;
+ const double k6 = -2.3503421582744556E+02;
+ const double k7 = -3.3836786704527788E+02;
+ const double k8 = -1.3569136703258670E+02;
+ const double k9 = 2.9914575453819188E+00;
+ const double k10 = 1.6855569086173170E+00;
+
+ /* scale due to input resistance */
+
+ /* Polyfunctional3D_model created by zunzun.com using sum of squared absolute error */
+ v_freq_2 = v_freq * v_freq;
+ v_freq_3 = v_freq_2 * v_freq;
+ v_freq_4 = v_freq_3 * v_freq;
+ freq = k1;
+ freq += k2 * v_freq;
+ freq += k3 * v_freq_2;
+ freq += k4 * v_freq_3;
+ freq += k5 * v_freq_4;
+ freq += k6 * v_rng;
+ freq += k7 * v_rng * v_freq;
+ freq += k8 * v_rng * v_freq_2;
+ freq += k9 * v_rng * v_freq_3;
+ freq += k10 * v_rng * v_freq_4;
+
+ freq *= 0.1e-6 / m_CAP.Value();
+
+ // FIXME: we need a possibility to remove entries from queue ...
+ // or an exact model ...
+ m_clock.m_inc = netlist_time::from_double(0.5 / freq);
+ //m_clock.update();
+ }
+
+ if (!m_clock.m_enableq && INPLOGIC(m_ENQ))
+ {
+ m_clock.m_enableq = 1;
+ OUTLOGIC(m_clock.m_Y, !m_clock.m_Y.net().last_Q(), netlist_time::from_nsec(1));
+ }
+ else if (m_clock.m_enableq && !INPLOGIC(m_ENQ))
+ {
+ m_clock.m_enableq = 0;
+ OUTLOGIC(m_clock.m_Y, !m_clock.m_Y.net().last_Q(), netlist_time::from_nsec(1));
+ }
}
NETLIB_UPDATE_PARAM(SN74LS629)
{
- //printf("updating %s to %f\n", name().cstr(), m_R.Value());
- update_dev();
+ //printf("updating %s to %f\n", name().cstr(), m_R.Value());
+ update_dev();
}
NETLIB_START(SN74LS629_dip)
{
- register_sub(m_1, "1");
- register_sub(m_2, "2");
+ register_sub(m_1, "1");
+ register_sub(m_2, "2");
- register_subalias("1", m_2.m_FC);
- register_subalias("2", m_1.m_FC);
- register_subalias("3", m_1.m_RNG);
+ register_subalias("1", m_2.m_FC);
+ register_subalias("2", m_1.m_FC);
+ register_subalias("3", m_1.m_RNG);
- register_subalias("6", m_1.m_ENQ);
- register_subalias("7", m_1.m_clock.m_Y);
+ register_subalias("6", m_1.m_ENQ);
+ register_subalias("7", m_1.m_clock.m_Y);
- register_subalias("8", m_1.m_R_FC.m_N);
- register_subalias("9", m_1.m_R_FC.m_N);
- connect(m_1.m_R_FC.m_N, m_2.m_R_FC.m_N);
+ register_subalias("8", m_1.m_R_FC.m_N);
+ register_subalias("9", m_1.m_R_FC.m_N);
+ connect(m_1.m_R_FC.m_N, m_2.m_R_FC.m_N);
- register_subalias("10", m_2.m_clock.m_Y);
+ register_subalias("10", m_2.m_clock.m_Y);
- register_subalias("11", m_2.m_ENQ);
- register_subalias("14", m_2.m_RNG);
+ register_subalias("11", m_2.m_ENQ);
+ register_subalias("14", m_2.m_RNG);
}
@@ -192,6 +192,6 @@ NETLIB_UPDATE(SN74LS629_dip)
NETLIB_RESET(SN74LS629_dip)
{
- m_1.do_reset();
- m_2.do_reset();
+ m_1.do_reset();
+ m_2.do_reset();
}
diff --git a/src/emu/netlist/devices/nld_74ls629.h b/src/emu/netlist/devices/nld_74ls629.h
index 31ecf340902..b4f011cf337 100644
--- a/src/emu/netlist/devices/nld_74ls629.h
+++ b/src/emu/netlist/devices/nld_74ls629.h
@@ -33,23 +33,23 @@
#define SN74LS629(_name, _cap) \
NET_REGISTER_DEV(SN74LS629, _name) \
- NETDEV_PARAMI(_name, CAP, _cap)
+ NETDEV_PARAMI(_name, CAP, _cap)
NETLIB_SUBDEVICE(SN74LS629clk,
- netlist_logic_input_t m_FB;
- netlist_logic_output_t m_Y;
+ netlist_logic_input_t m_FB;
+ netlist_logic_output_t m_Y;
- netlist_time m_inc;
- netlist_sig_t m_enableq;
+ netlist_time m_inc;
+ netlist_sig_t m_enableq;
);
NETLIB_DEVICE_WITH_PARAMS(SN74LS629,
public:
NETLIB_NAME(SN74LS629clk) m_clock;
- NETLIB_NAME(R_base) m_R_FC;
- NETLIB_NAME(R_base) m_R_RNG;
+ NETLIB_NAME(R_base) m_R_FC;
+ NETLIB_NAME(R_base) m_R_RNG;
- netlist_logic_input_t m_ENQ;
+ netlist_logic_input_t m_ENQ;
netlist_analog_input_t m_RNG;
netlist_analog_input_t m_FC;
@@ -57,13 +57,13 @@ public:
);
#define SN74LS629_DIP(_name, _cap1, _cap2) \
- NET_REGISTER_DEV(SN74LS629_dip, _name) \
- NETDEV_PARAMI(_name, 1.CAP, _cap1) \
- NETDEV_PARAMI(_name, 2.CAP, _cap2)
+ NET_REGISTER_DEV(SN74LS629_dip, _name) \
+ NETDEV_PARAMI(_name, 1.CAP, _cap1) \
+ NETDEV_PARAMI(_name, 2.CAP, _cap2)
NETLIB_DEVICE(SN74LS629_dip,
- NETLIB_NAME(SN74LS629) m_1;
- NETLIB_NAME(SN74LS629) m_2;
+ NETLIB_NAME(SN74LS629) m_1;
+ NETLIB_NAME(SN74LS629) m_2;
);
diff --git a/src/emu/netlist/devices/nld_9316.c b/src/emu/netlist/devices/nld_9316.c
index 14a691c4481..6445611fd06 100644
--- a/src/emu/netlist/devices/nld_9316.c
+++ b/src/emu/netlist/devices/nld_9316.c
@@ -7,8 +7,8 @@
NETLIB_START(9316)
{
- register_sub(subABCD, "subABCD");
- sub.m_ABCD = &subABCD;
+ register_sub(subABCD, "subABCD");
+ sub.m_ABCD = &subABCD;
register_sub(sub, "sub");
register_subalias("CLK", sub.m_CLK);
@@ -33,36 +33,36 @@ NETLIB_START(9316)
NETLIB_RESET(9316)
{
- sub.do_reset();
- subABCD.do_reset();
+ sub.do_reset();
+ subABCD.do_reset();
}
NETLIB_START(9316_subABCD)
{
- register_input("A", m_A);
- register_input("B", m_B);
- register_input("C", m_C);
- register_input("D", m_D);
+ register_input("A", m_A);
+ register_input("B", m_B);
+ register_input("C", m_C);
+ register_input("D", m_D);
}
NETLIB_RESET(9316_subABCD)
{
- if (1 || !USE_ADD_REMOVE_LIST)
- {
- m_A.inactivate();
- m_B.inactivate();
- m_C.inactivate();
- m_D.inactivate();
- }
+ if (1 || !USE_ADD_REMOVE_LIST)
+ {
+ m_A.inactivate();
+ m_B.inactivate();
+ m_C.inactivate();
+ m_D.inactivate();
+ }
}
ATTR_HOT inline UINT8 NETLIB_NAME(9316_subABCD::read_ABCD)()
{
- if (1 || !USE_ADD_REMOVE_LIST)
- return (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0);
- else
- return (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_A) << 0);
+ if (1 || !USE_ADD_REMOVE_LIST)
+ return (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0);
+ else
+ return (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_A) << 0);
}
NETLIB_UPDATE(9316_subABCD)
@@ -86,10 +86,10 @@ NETLIB_START(9316_sub)
NETLIB_RESET(9316_sub)
{
- m_CLK.set_state(netlist_input_t::STATE_INP_LH);
- m_cnt = 0;
- m_loadq = 1;
- m_ent = 1;
+ m_CLK.set_state(netlist_input_t::STATE_INP_LH);
+ m_cnt = 0;
+ m_loadq = 1;
+ m_ent = 1;
}
NETLIB_UPDATE(9316_sub)
@@ -99,7 +99,7 @@ NETLIB_UPDATE(9316_sub)
{
cnt = ( cnt + 1) & 0x0f;
update_outputs(cnt);
- OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20));
+ OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20));
#if 0
if (cnt == 0x0f)
OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20));
@@ -128,7 +128,7 @@ NETLIB_UPDATE(9316)
}
else
{
- UINT8 cnt = sub.m_cnt;
+ UINT8 cnt = sub.m_cnt;
sub.m_CLK.inactivate();
if (!clrq & (cnt>0))
{
@@ -198,34 +198,33 @@ inline NETLIB_FUNC_VOID(9316_sub, update_outputs, (const UINT8 cnt))
NETLIB_START(9316_dip)
{
- NETLIB_NAME(9316)::start();
-
- register_subalias("1", m_CLRQ);
- register_subalias("2", sub.m_CLK);
- register_subalias("3", subABCD.m_A);
- register_subalias("4", subABCD.m_B);
- register_subalias("5", subABCD.m_C);
- register_subalias("6", subABCD.m_D);
- register_subalias("7", m_ENP);
- // register_subalias("8", ); --> GND
-
- register_subalias("9", m_LOADQ);
- register_subalias("10", m_ENT);
- register_subalias("11", sub.m_QD);
- register_subalias("12", sub.m_QC);
- register_subalias("13", sub.m_QB);
- register_subalias("14", sub.m_QA);
- register_subalias("15", sub.m_RC);
- // register_subalias("16", ); --> VCC
+ NETLIB_NAME(9316)::start();
+
+ register_subalias("1", m_CLRQ);
+ register_subalias("2", sub.m_CLK);
+ register_subalias("3", subABCD.m_A);
+ register_subalias("4", subABCD.m_B);
+ register_subalias("5", subABCD.m_C);
+ register_subalias("6", subABCD.m_D);
+ register_subalias("7", m_ENP);
+ // register_subalias("8", ); --> GND
+
+ register_subalias("9", m_LOADQ);
+ register_subalias("10", m_ENT);
+ register_subalias("11", sub.m_QD);
+ register_subalias("12", sub.m_QC);
+ register_subalias("13", sub.m_QB);
+ register_subalias("14", sub.m_QA);
+ register_subalias("15", sub.m_RC);
+ // register_subalias("16", ); --> VCC
}
NETLIB_UPDATE(9316_dip)
{
- NETLIB_NAME(9316)::update();
+ NETLIB_NAME(9316)::update();
}
NETLIB_RESET(9316_dip)
{
- NETLIB_NAME(9316)::reset();
+ NETLIB_NAME(9316)::reset();
}
-
diff --git a/src/emu/netlist/devices/nld_9316.h b/src/emu/netlist/devices/nld_9316.h
index a9e7a37df5f..524871d8ea5 100644
--- a/src/emu/netlist/devices/nld_9316.h
+++ b/src/emu/netlist/devices/nld_9316.h
@@ -64,15 +64,15 @@
NET_CONNECT(_name, D, _D)
#define TTL_9316_DIP(_name) \
- NET_REGISTER_DEV(9316_dip, _name)
+ NET_REGISTER_DEV(9316_dip, _name)
NETLIB_SUBDEVICE(9316_subABCD,
- netlist_ttl_input_t m_A;
- netlist_ttl_input_t m_B;
- netlist_ttl_input_t m_C;
- netlist_ttl_input_t m_D;
+ netlist_ttl_input_t m_A;
+ netlist_ttl_input_t m_B;
+ netlist_ttl_input_t m_C;
+ netlist_ttl_input_t m_D;
- ATTR_HOT inline UINT8 read_ABCD();
+ ATTR_HOT inline UINT8 read_ABCD();
);
NETLIB_SUBDEVICE(9316_sub,
@@ -95,7 +95,7 @@ NETLIB_SUBDEVICE(9316_sub,
NETLIB_DEVICE(9316,
NETLIB_NAME(9316_sub) sub;
- NETLIB_NAME(9316_subABCD) subABCD;
+ NETLIB_NAME(9316_subABCD) subABCD;
netlist_ttl_input_t m_ENP;
netlist_ttl_input_t m_ENT;
netlist_ttl_input_t m_CLRQ;
diff --git a/src/emu/netlist/devices/nld_legacy.c b/src/emu/netlist/devices/nld_legacy.c
index 529d5325651..7c3faa58117 100644
--- a/src/emu/netlist/devices/nld_legacy.c
+++ b/src/emu/netlist/devices/nld_legacy.c
@@ -16,8 +16,8 @@ NETLIB_START(nicRSFF)
NETLIB_RESET(nicRSFF)
{
- m_Q.initial(0);
- m_QQ.initial(1);
+ m_Q.initial(0);
+ m_QQ.initial(1);
}
NETLIB_UPDATE(nicRSFF)
diff --git a/src/emu/netlist/devices/nld_ne555.c b/src/emu/netlist/devices/nld_ne555.c
index 580c76d3787..b8f4e4b5fc7 100644
--- a/src/emu/netlist/devices/nld_ne555.c
+++ b/src/emu/netlist/devices/nld_ne555.c
@@ -46,17 +46,17 @@ NETLIB_START(NE555)
NETLIB_RESET(NE555)
{
- m_R1.do_reset();
- m_R2.do_reset();
- m_R3.do_reset();
- m_RDIS.do_reset();
+ m_R1.do_reset();
+ m_R2.do_reset();
+ m_R3.do_reset();
+ m_RDIS.do_reset();
- m_R1.set_R(5000);
- m_R2.set_R(5000);
- m_R3.set_R(5000);
- m_RDIS.set_R(R_OFF);
+ m_R1.set_R(5000);
+ m_R2.set_R(5000);
+ m_R3.set_R(5000);
+ m_RDIS.set_R(R_OFF);
- m_last_out = false;
+ m_last_out = false;
}
NETLIB_UPDATE(NE555)
@@ -93,25 +93,25 @@ NETLIB_UPDATE(NE555)
NETLIB_START(NE555_dip)
{
- NETLIB_NAME(NE555)::start();
+ NETLIB_NAME(NE555)::start();
- register_subalias("1", m_R3.m_N); // Pin 1
- register_subalias("2", m_TRIG); // Pin 2
- register_subalias("3", m_OUT); // Pin 3
- register_subalias("4", m_RESET); // Pin 4
- register_subalias("5", m_R1.m_N); // Pin 5
- register_subalias("6", m_THRES); // Pin 6
- register_subalias("7", m_RDIS.m_P); // Pin 7
- register_subalias("8", m_R1.m_P); // Pin 8
+ register_subalias("1", m_R3.m_N); // Pin 1
+ register_subalias("2", m_TRIG); // Pin 2
+ register_subalias("3", m_OUT); // Pin 3
+ register_subalias("4", m_RESET); // Pin 4
+ register_subalias("5", m_R1.m_N); // Pin 5
+ register_subalias("6", m_THRES); // Pin 6
+ register_subalias("7", m_RDIS.m_P); // Pin 7
+ register_subalias("8", m_R1.m_P); // Pin 8
}
NETLIB_UPDATE(NE555_dip)
{
- NETLIB_NAME(NE555)::update();
+ NETLIB_NAME(NE555)::update();
}
NETLIB_RESET(NE555_dip)
{
- NETLIB_NAME(NE555)::reset();
+ NETLIB_NAME(NE555)::reset();
}
diff --git a/src/emu/netlist/devices/nld_ne555.h b/src/emu/netlist/devices/nld_ne555.h
index 50fccf8486a..8c9c1baa420 100644
--- a/src/emu/netlist/devices/nld_ne555.h
+++ b/src/emu/netlist/devices/nld_ne555.h
@@ -44,7 +44,7 @@ NETLIB_DEVICE(NE555,
);
#define NE555_DIP(_name) \
- NET_REGISTER_DEV(NE555_dip, _name)
+ NET_REGISTER_DEV(NE555_dip, _name)
NETLIB_DEVICE_DERIVED(NE555_dip, NE555,
);
diff --git a/src/emu/netlist/devices/nld_signal.h b/src/emu/netlist/devices/nld_signal.h
index 24c3854a07d..6580ec0818c 100644
--- a/src/emu/netlist/devices/nld_signal.h
+++ b/src/emu/netlist/devices/nld_signal.h
@@ -47,8 +47,8 @@ public:
ATTR_COLD void reset()
{
- m_Q.initial(1);
- m_active = 1;
+ m_Q.initial(1);
+ m_active = 1;
}
#if (USE_DEACTIVE_DEVICE)
@@ -98,55 +98,55 @@ public:
save(NAME(m_active));
}
- ATTR_COLD void reset()
- {
- m_Q.initial(1);
- m_active = 1;
- }
+ ATTR_COLD void reset()
+ {
+ m_Q.initial(1);
+ m_active = 1;
+ }
#if (USE_DEACTIVE_DEVICE)
- ATTR_HOT void inc_active()
- {
- if (++m_active == 1)
- {
- update();
- }
- }
-
- ATTR_HOT void dec_active()
- {
- if (--m_active == 0)
- {
- for (int i = 0; i< _numdev; i++)
- m_i[i].inactivate();
- }
- }
+ ATTR_HOT void inc_active()
+ {
+ if (++m_active == 1)
+ {
+ update();
+ }
+ }
+
+ ATTR_HOT void dec_active()
+ {
+ if (--m_active == 0)
+ {
+ for (int i = 0; i< _numdev; i++)
+ m_i[i].inactivate();
+ }
+ }
#endif
- virtual void update()
- {
- const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
-
- // FIXME: this check is needed because update is called during startup as well
- if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
- return;
-
- for (int i = 0; i< _numdev; i++)
- {
- this->m_i[i].activate();
- if (INPLOGIC(this->m_i[i]) == _check)
- {
- for (int j = 0; j < i; j++)
- this->m_i[j].inactivate();
- for (int j = i + 1; j < _numdev; j++)
- this->m_i[j].inactivate();
-
- OUTLOGIC(this->m_Q, _check ^ (1 ^ _invert), times[_check]);// ? 15000 : 22000);
- return;
- }
- }
- OUTLOGIC(this->m_Q,_check ^ (_invert), times[1-_check]);// ? 22000 : 15000);
- }
+ virtual void update()
+ {
+ const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
+
+ // FIXME: this check is needed because update is called during startup as well
+ if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
+ return;
+
+ for (int i = 0; i< _numdev; i++)
+ {
+ this->m_i[i].activate();
+ if (INPLOGIC(this->m_i[i]) == _check)
+ {
+ for (int j = 0; j < i; j++)
+ this->m_i[j].inactivate();
+ for (int j = i + 1; j < _numdev; j++)
+ this->m_i[j].inactivate();
+
+ OUTLOGIC(this->m_Q, _check ^ (1 ^ _invert), times[_check]);// ? 15000 : 22000);
+ return;
+ }
+ }
+ OUTLOGIC(this->m_Q,_check ^ (_invert), times[1-_check]);// ? 22000 : 15000);
+ }
public:
netlist_ttl_input_t m_i[_numdev];
@@ -166,35 +166,35 @@ public:
ATTR_COLD void start()
{
register_output("Q", m_Q);
- register_input("A", m_i[0]);
- register_input("B", m_i[1]);
+ register_input("A", m_i[0]);
+ register_input("B", m_i[1]);
- save(NAME(m_active));
+ save(NAME(m_active));
}
- ATTR_COLD void reset()
- {
- m_Q.initial(1);
- m_active = 1;
- }
+ ATTR_COLD void reset()
+ {
+ m_Q.initial(1);
+ m_active = 1;
+ }
#if (USE_DEACTIVE_DEVICE)
- ATTR_HOT virtual void inc_active()
- {
- if (++m_active == 1)
- {
- update();
- }
- }
-
- ATTR_HOT virtual void dec_active()
- {
- if (--m_active == 0)
- {
- m_i[0].inactivate();
- m_i[1].inactivate();
- }
- }
+ ATTR_HOT virtual void inc_active()
+ {
+ if (++m_active == 1)
+ {
+ update();
+ }
+ }
+
+ ATTR_HOT virtual void dec_active()
+ {
+ if (--m_active == 0)
+ {
+ m_i[0].inactivate();
+ m_i[1].inactivate();
+ }
+ }
#endif
ATTR_HOT ATTR_ALIGN void update()
@@ -202,13 +202,13 @@ public:
const netlist_time times[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22)};
// FIXME: this check is needed because update is called during startup as well
- if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
- return;
+ if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
+ return;
m_i[0].activate();
m_i[1].activate();
#if 0
- UINT8 res = _invert ^ 1 ^_check;
+ UINT8 res = _invert ^ 1 ^_check;
if (INPLOGIC(m_i[0]) ^ _check)
{
if (INPLOGIC(m_i[1]) ^ _check)
@@ -221,23 +221,23 @@ public:
if (INPLOGIC(m_i[1]) ^ _check)
m_i[1].inactivate();
}
- OUTLOGIC(m_Q, res, times[res & 1]);// ? 22000 : 15000);
+ OUTLOGIC(m_Q, res, times[res & 1]);// ? 22000 : 15000);
#else
const UINT8 val = (INPLOGIC(m_i[0]) ^ _check) | ((INPLOGIC(m_i[1]) ^ _check) << 1);
- UINT8 res = _invert ^ 1 ^_check;
+ UINT8 res = _invert ^ 1 ^_check;
switch (val)
{
- case 1:
- m_i[0].inactivate();
- break;
- case 2:
- m_i[1].inactivate();
- break;
- case 3:
- res = _invert ^ _check;
- break;
+ case 1:
+ m_i[0].inactivate();
+ break;
+ case 2:
+ m_i[1].inactivate();
+ break;
+ case 3:
+ res = _invert ^ _check;
+ break;
}
- OUTLOGIC(m_Q, res, times[res]);// ? 22000 : 15000);
+ OUTLOGIC(m_Q, res, times[res]);// ? 22000 : 15000);
#endif
}
diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c
index 7e37bef8e19..e6cd2485603 100644
--- a/src/emu/netlist/devices/nld_system.c
+++ b/src/emu/netlist/devices/nld_system.c
@@ -51,12 +51,12 @@ NETLIB_RESET(ttl_input)
NETLIB_UPDATE(ttl_input)
{
- OUTLOGIC(m_Q, m_IN.Value() & 1, netlist_time::from_nsec(1));
+ OUTLOGIC(m_Q, m_IN.Value() & 1, netlist_time::from_nsec(1));
}
NETLIB_UPDATE_PARAM(ttl_input)
{
- update();
+ update();
}
// ----------------------------------------------------------------------------------------
@@ -66,7 +66,7 @@ NETLIB_UPDATE_PARAM(ttl_input)
NETLIB_START(analog_input)
{
register_output("Q", m_Q);
- register_param("IN", m_IN, 0.0);
+ register_param("IN", m_IN, 0.0);
}
NETLIB_RESET(analog_input)
@@ -75,10 +75,10 @@ NETLIB_RESET(analog_input)
NETLIB_UPDATE(analog_input)
{
- OUTANALOG(m_Q, m_IN.Value(), NLTIME_IMMEDIATE);
+ OUTANALOG(m_Q, m_IN.Value(), NLTIME_IMMEDIATE);
}
NETLIB_UPDATE_PARAM(analog_input)
{
- update();
+ update();
}
diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h
index ca5f9b70316..2c214ed352a 100644
--- a/src/emu/netlist/devices/nld_system.h
+++ b/src/emu/netlist/devices/nld_system.h
@@ -27,14 +27,14 @@
#define MAINCLOCK(_name, _freq) \
NET_REGISTER_DEV(mainclock, _name) \
- PARAM(_name.FREQ, _freq)
+ PARAM(_name.FREQ, _freq)
#define CLOCK(_name, _freq) \
NET_REGISTER_DEV(clock, _name) \
- PARAM(_name.FREQ, _freq)
+ PARAM(_name.FREQ, _freq)
#define GNDA() \
- NET_REGISTER_DEV(gnd, GND)
+ NET_REGISTER_DEV(gnd, GND)
// ----------------------------------------------------------------------------------------
// mainclock
@@ -47,7 +47,7 @@ public:
netlist_param_double_t m_freq;
netlist_time m_inc;
- ATTR_HOT inline static void mc_update(netlist_net_t &net);
+ ATTR_HOT inline static void mc_update(netlist_net_t &net);
);
// ----------------------------------------------------------------------------------------
@@ -76,7 +76,7 @@ NETLIB_DEVICE_WITH_PARAMS(ttl_input,
NETLIB_DEVICE_WITH_PARAMS(analog_input,
netlist_analog_output_t m_Q;
- netlist_param_double_t m_IN;
+ netlist_param_double_t m_IN;
);
// ----------------------------------------------------------------------------------------
@@ -86,29 +86,29 @@ NETLIB_DEVICE_WITH_PARAMS(analog_input,
class nld_gnd : public netlist_device_t
{
public:
- ATTR_COLD nld_gnd()
- : netlist_device_t(GND) { }
+ ATTR_COLD nld_gnd()
+ : netlist_device_t(GND) { }
- ATTR_COLD virtual ~nld_gnd() {}
+ ATTR_COLD virtual ~nld_gnd() {}
protected:
- ATTR_COLD void start()
- {
- register_output("Q", m_Q);
- }
+ ATTR_COLD void start()
+ {
+ register_output("Q", m_Q);
+ }
- ATTR_COLD void reset()
- {
- }
+ ATTR_COLD void reset()
+ {
+ }
- ATTR_HOT ATTR_ALIGN void update()
- {
- OUTANALOG(m_Q, 0.0, NLTIME_IMMEDIATE);
- }
+ ATTR_HOT ATTR_ALIGN void update()
+ {
+ OUTANALOG(m_Q, 0.0, NLTIME_IMMEDIATE);
+ }
private:
- netlist_analog_output_t m_Q;
+ netlist_analog_output_t m_Q;
};
@@ -120,38 +120,38 @@ private:
class nld_a_to_d_proxy : public netlist_device_t
{
public:
- ATTR_COLD nld_a_to_d_proxy(netlist_input_t &in_proxied)
- : netlist_device_t()
- {
- assert(in_proxied.family() == LOGIC);
- m_I.m_family_desc = in_proxied.m_family_desc;
- }
+ ATTR_COLD nld_a_to_d_proxy(netlist_input_t &in_proxied)
+ : netlist_device_t()
+ {
+ assert(in_proxied.family() == LOGIC);
+ m_I.m_family_desc = in_proxied.m_family_desc;
+ }
- ATTR_COLD virtual ~nld_a_to_d_proxy() {}
+ ATTR_COLD virtual ~nld_a_to_d_proxy() {}
- netlist_analog_input_t m_I;
- netlist_ttl_output_t m_Q;
+ netlist_analog_input_t m_I;
+ netlist_ttl_output_t m_Q;
protected:
- ATTR_COLD void start()
- {
- register_input("I", m_I);
- register_output("Q", m_Q);
- }
-
- ATTR_COLD void reset()
- {
- }
-
- ATTR_HOT ATTR_ALIGN void update()
- {
- if (m_I.Q_Analog() > m_I.m_family_desc->m_high_thresh_V)
- OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(1));
- else if (m_I.Q_Analog() < m_I.m_family_desc->m_low_thresh_V)
- OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(1));
- //else
- // OUTLOGIC(m_Q, m_Q.net().last_Q(), NLTIME_FROM_NS(1));
- }
+ ATTR_COLD void start()
+ {
+ register_input("I", m_I);
+ register_output("Q", m_Q);
+ }
+
+ ATTR_COLD void reset()
+ {
+ }
+
+ ATTR_HOT ATTR_ALIGN void update()
+ {
+ if (m_I.Q_Analog() > m_I.m_family_desc->m_high_thresh_V)
+ OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(1));
+ else if (m_I.Q_Analog() < m_I.m_family_desc->m_low_thresh_V)
+ OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(1));
+ //else
+ // OUTLOGIC(m_Q, m_Q.net().last_Q(), NLTIME_FROM_NS(1));
+ }
};
@@ -162,24 +162,24 @@ protected:
class nld_base_d_to_a_proxy : public netlist_device_t
{
public:
- ATTR_COLD nld_base_d_to_a_proxy(netlist_output_t &out_proxied)
- : netlist_device_t()
- {
- assert(out_proxied.family() == LOGIC);
- m_family_desc = out_proxied.m_family_desc;
- }
+ ATTR_COLD nld_base_d_to_a_proxy(netlist_output_t &out_proxied)
+ : netlist_device_t()
+ {
+ assert(out_proxied.family() == LOGIC);
+ m_family_desc = out_proxied.m_family_desc;
+ }
- ATTR_COLD virtual ~nld_base_d_to_a_proxy() {}
+ ATTR_COLD virtual ~nld_base_d_to_a_proxy() {}
- ATTR_COLD virtual netlist_core_terminal_t &out() = 0;
+ ATTR_COLD virtual netlist_core_terminal_t &out() = 0;
- netlist_ttl_input_t m_I;
+ netlist_ttl_input_t m_I;
protected:
- ATTR_COLD void start()
- {
- register_input("I", m_I);
- }
+ ATTR_COLD void start()
+ {
+ register_input("I", m_I);
+ }
private:
};
@@ -188,88 +188,88 @@ private:
class nld_d_to_a_proxy : public nld_base_d_to_a_proxy
{
public:
- ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied)
- : nld_base_d_to_a_proxy(out_proxied)
- {
- }
+ ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied)
+ : nld_base_d_to_a_proxy(out_proxied)
+ {
+ }
- ATTR_COLD virtual ~nld_d_to_a_proxy() {}
+ ATTR_COLD virtual ~nld_d_to_a_proxy() {}
protected:
- ATTR_COLD void start()
- {
- nld_base_d_to_a_proxy::start();
- register_output("Q", m_Q);
- }
-
- ATTR_COLD void reset()
- {
- //m_Q.initial(0);
- }
-
- ATTR_COLD virtual netlist_core_terminal_t &out()
- {
- return m_Q;
- }
-
- ATTR_HOT ATTR_ALIGN void update()
- {
- OUTANALOG(m_Q, INPLOGIC(m_I) ? m_family_desc->m_high_V : m_family_desc->m_low_V, NLTIME_FROM_NS(1));
- }
+ ATTR_COLD void start()
+ {
+ nld_base_d_to_a_proxy::start();
+ register_output("Q", m_Q);
+ }
+
+ ATTR_COLD void reset()
+ {
+ //m_Q.initial(0);
+ }
+
+ ATTR_COLD virtual netlist_core_terminal_t &out()
+ {
+ return m_Q;
+ }
+
+ ATTR_HOT ATTR_ALIGN void update()
+ {
+ OUTANALOG(m_Q, INPLOGIC(m_I) ? m_family_desc->m_high_V : m_family_desc->m_low_V, NLTIME_FROM_NS(1));
+ }
private:
- netlist_analog_output_t m_Q;
+ netlist_analog_output_t m_Q;
};
#else
class nld_d_to_a_proxy : public nld_base_d_to_a_proxy
{
public:
- ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied)
- : nld_base_d_to_a_proxy(out_proxied)
- {
- }
+ ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied)
+ : nld_base_d_to_a_proxy(out_proxied)
+ {
+ }
- ATTR_COLD virtual ~nld_d_to_a_proxy() {}
+ ATTR_COLD virtual ~nld_d_to_a_proxy() {}
protected:
- ATTR_COLD void start()
- {
- nld_base_d_to_a_proxy::start();
-
- register_sub(m_R, "R");
- register_output("_Q", m_Q);
- register_subalias("Q", m_R.m_N);
-
- connect(m_R.m_P, m_Q);
-
- //m_Q.initial(m_family_desc->m_low_V);
- //m_R.set_R(m_family_desc->m_R_low);
- }
-
- ATTR_COLD void reset()
- {
- //m_Q.initial(m_family_desc->m_low_V);
- //m_R.set_R(m_family_desc->m_R_low);
- m_R.do_reset();
- }
-
- ATTR_COLD virtual netlist_core_terminal_t &out()
- {
- return m_R.m_N;
- }
-
- ATTR_HOT ATTR_ALIGN void update()
- {
- double R = INPLOGIC(m_I) ? m_family_desc->m_R_high : m_family_desc->m_R_low;
- double V = INPLOGIC(m_I) ? m_family_desc->m_high_V : m_family_desc->m_low_V;
- //printf("%f %f\n", R, V);
- m_R.set_R(R);
- OUTANALOG(m_Q, V, NLTIME_FROM_NS(0));
- }
+ ATTR_COLD void start()
+ {
+ nld_base_d_to_a_proxy::start();
+
+ register_sub(m_R, "R");
+ register_output("_Q", m_Q);
+ register_subalias("Q", m_R.m_N);
+
+ connect(m_R.m_P, m_Q);
+
+ //m_Q.initial(m_family_desc->m_low_V);
+ //m_R.set_R(m_family_desc->m_R_low);
+ }
+
+ ATTR_COLD void reset()
+ {
+ //m_Q.initial(m_family_desc->m_low_V);
+ //m_R.set_R(m_family_desc->m_R_low);
+ m_R.do_reset();
+ }
+
+ ATTR_COLD virtual netlist_core_terminal_t &out()
+ {
+ return m_R.m_N;
+ }
+
+ ATTR_HOT ATTR_ALIGN void update()
+ {
+ double R = INPLOGIC(m_I) ? m_family_desc->m_R_high : m_family_desc->m_R_low;
+ double V = INPLOGIC(m_I) ? m_family_desc->m_high_V : m_family_desc->m_low_V;
+ //printf("%f %f\n", R, V);
+ m_R.set_R(R);
+ OUTANALOG(m_Q, V, NLTIME_FROM_NS(0));
+ }
private:
- netlist_analog_output_t m_Q;
- nld_R_base m_R;
+ netlist_analog_output_t m_Q;
+ nld_R_base m_R;
};
#endif
diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c
index 55ef0f80073..8f1e6c9dfcf 100644
--- a/src/emu/netlist/nl_base.c
+++ b/src/emu/netlist/nl_base.c
@@ -13,12 +13,12 @@ const netlist_time netlist_time::zero = netlist_time::from_raw(0);
netlist_logic_family_desc_t netlist_family_ttl =
{
- 0.8, // m_low_thresh_V
- 2.0, // m_high_thresh_V
- 0.3, // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
- 3.7, // m_high_V
- 1.0, // m_R_low;
- 130.0, // m_R_high;
+ 0.8, // m_low_thresh_V
+ 2.0, // m_high_thresh_V
+ 0.3, // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
+ 3.7, // m_high_V
+ 1.0, // m_R_low;
+ 130.0, // m_R_high;
};
// ----------------------------------------------------------------------------------------
@@ -94,7 +94,7 @@ ATTR_COLD const pstring netlist_object_t::name() const
{
if (m_name == "")
netlist().error("object not initialized");
- return m_name;
+ return m_name;
}
// ----------------------------------------------------------------------------------------
@@ -142,10 +142,10 @@ netlist_base_t::~netlist_base_t()
{
for (int i=0; i < m_nets.count(); i++)
{
- if (!m_nets[i]->isRailNet())
- {
- delete m_nets[i];
- }
+ if (!m_nets[i]->isRailNet())
+ {
+ delete m_nets[i];
+ }
}
m_nets.clear();
@@ -157,36 +157,36 @@ netlist_base_t::~netlist_base_t()
ATTR_COLD void netlist_base_t::save_register()
{
- save(NAME(m_queue.callback()));
- save(NAME(m_time));
- netlist_object_t::save_register();
+ save(NAME(m_queue.callback()));
+ save(NAME(m_time));
+ netlist_object_t::save_register();
}
ATTR_HOT const double netlist_base_t::gmin() const
{
- return solver()->gmin();
+ return solver()->gmin();
}
ATTR_COLD void netlist_base_t::start()
{
- /* find the main clock and solver ... */
+ /* find the main clock and solver ... */
- m_mainclock = get_single_device<NETLIB_NAME(mainclock)>("mainclock");
- m_solver = get_single_device<NETLIB_NAME(solver)>("solver");
- m_gnd = get_single_device<NETLIB_NAME(gnd)>("gnd");
+ m_mainclock = get_single_device<NETLIB_NAME(mainclock)>("mainclock");
+ m_solver = get_single_device<NETLIB_NAME(solver)>("solver");
+ m_gnd = get_single_device<NETLIB_NAME(gnd)>("gnd");
- /* make sure the solver is started first! */
+ /* make sure the solver is started first! */
- if (m_solver != NULL)
- m_solver->start_dev();
+ if (m_solver != NULL)
+ m_solver->start_dev();
- NL_VERBOSE_OUT(("Initializing devices ...\n"));
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- netlist_device_t *dev = entry->object();
- if (dev != m_solver)
- dev->start_dev();
- }
+ NL_VERBOSE_OUT(("Initializing devices ...\n"));
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ netlist_device_t *dev = entry->object();
+ if (dev != m_solver)
+ dev->start_dev();
+ }
}
@@ -202,8 +202,8 @@ ATTR_COLD netlist_net_t *netlist_base_t::find_net(const pstring &name)
ATTR_COLD void netlist_base_t::rebuild_lists()
{
- for (int i = 0; i < m_nets.count(); i++)
- m_nets[i]->rebuild_list();
+ for (int i = 0; i < m_nets.count(); i++)
+ m_nets[i]->rebuild_list();
}
@@ -213,19 +213,19 @@ ATTR_COLD void netlist_base_t::reset()
m_queue.clear();
if (m_mainclock != NULL)
m_mainclock->m_Q.net().set_time(netlist_time::zero);
- if (m_solver != NULL)
- m_solver->do_reset();
+ if (m_solver != NULL)
+ m_solver->do_reset();
- // Reset all nets once !
- for (int i = 0; i < m_nets.count(); i++)
- m_nets[i]->do_reset();
+ // Reset all nets once !
+ for (int i = 0; i < m_nets.count(); i++)
+ m_nets[i]->do_reset();
- // Reset all devices once !
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- netlist_device_t *dev = entry->object();
- dev->do_reset();
- }
+ // Reset all devices once !
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ netlist_device_t *dev = entry->object();
+ dev->do_reset();
+ }
// Step all devices once !
for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
@@ -235,67 +235,67 @@ ATTR_COLD void netlist_base_t::reset()
}
// FIXME: some const devices rely on this
- /* make sure params are set now .. */
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- entry->object()->update_param();
- }
+ /* make sure params are set now .. */
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ entry->object()->update_param();
+ }
}
ATTR_HOT ATTR_ALIGN void netlist_base_t::process_queue(const netlist_time delta)
{
- m_stop = m_time + delta;
-
- if (m_mainclock == NULL)
- {
- while ( (m_time < m_stop) && (m_queue.is_not_empty()))
- {
- const netlist_queue_t::entry_t *e = m_queue.pop();
- m_time = e->exec_time();
- e->object()->update_devs();
-
- add_to_stat(m_perf_out_processed, 1);
- if (FATAL_ERROR_AFTER_NS)
- if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS))
- error("Stopped");
- }
- if (m_queue.is_empty())
- m_time = m_stop;
-
- } else {
- netlist_net_t &mc_net = m_mainclock->m_Q.net();
- const netlist_time inc = m_mainclock->m_inc;
- netlist_time mc_time = mc_net.time();
-
- while (m_time < m_stop)
- {
- if (m_queue.is_not_empty())
- {
- while (m_queue.peek()->exec_time() > mc_time)
- {
- m_time = mc_time;
- mc_time += inc;
- NETLIB_NAME(mainclock)::mc_update(mc_net);
- }
-
- const netlist_queue_t::entry_t *e = m_queue.pop();
- m_time = e->exec_time();
- e->object()->update_devs();
-
- } else {
- m_time = mc_time;
- mc_time += inc;
- NETLIB_NAME(mainclock)::mc_update(mc_net);
- }
- if (FATAL_ERROR_AFTER_NS)
- if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS))
- error("Stopped");
-
- add_to_stat(m_perf_out_processed, 1);
- }
- mc_net.set_time(mc_time);
- }
+ m_stop = m_time + delta;
+
+ if (m_mainclock == NULL)
+ {
+ while ( (m_time < m_stop) && (m_queue.is_not_empty()))
+ {
+ const netlist_queue_t::entry_t *e = m_queue.pop();
+ m_time = e->exec_time();
+ e->object()->update_devs();
+
+ add_to_stat(m_perf_out_processed, 1);
+ if (FATAL_ERROR_AFTER_NS)
+ if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS))
+ error("Stopped");
+ }
+ if (m_queue.is_empty())
+ m_time = m_stop;
+
+ } else {
+ netlist_net_t &mc_net = m_mainclock->m_Q.net();
+ const netlist_time inc = m_mainclock->m_inc;
+ netlist_time mc_time = mc_net.time();
+
+ while (m_time < m_stop)
+ {
+ if (m_queue.is_not_empty())
+ {
+ while (m_queue.peek()->exec_time() > mc_time)
+ {
+ m_time = mc_time;
+ mc_time += inc;
+ NETLIB_NAME(mainclock)::mc_update(mc_net);
+ }
+
+ const netlist_queue_t::entry_t *e = m_queue.pop();
+ m_time = e->exec_time();
+ e->object()->update_devs();
+
+ } else {
+ m_time = mc_time;
+ mc_time += inc;
+ NETLIB_NAME(mainclock)::mc_update(mc_net);
+ }
+ if (FATAL_ERROR_AFTER_NS)
+ if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS))
+ error("Stopped");
+
+ add_to_stat(m_perf_out_processed, 1);
+ }
+ mc_net.set_time(mc_time);
+ }
}
ATTR_COLD void netlist_base_t::error(const char *format, ...) const
@@ -308,18 +308,18 @@ ATTR_COLD void netlist_base_t::error(const char *format, ...) const
ATTR_COLD void netlist_base_t::warning(const char *format, ...) const
{
- va_list ap;
- va_start(ap, format);
- verror(NL_WARNING, format, ap);
- va_end(ap);
+ va_list ap;
+ va_start(ap, format);
+ verror(NL_WARNING, format, ap);
+ va_end(ap);
}
ATTR_COLD void netlist_base_t::log(const char *format, ...) const
{
- va_list ap;
- va_start(ap, format);
- verror(NL_LOG, format, ap);
- va_end(ap);
+ va_list ap;
+ va_start(ap, format);
+ verror(NL_LOG, format, ap);
+ va_end(ap);
}
@@ -361,14 +361,14 @@ ATTR_COLD netlist_core_device_t::~netlist_core_device_t()
ATTR_HOT ATTR_ALIGN const netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE(netlist_logic_input_t &inp)
{
if (inp.state() != netlist_input_t::STATE_INP_PASSIVE)
- return inp.Q();
+ return inp.Q();
else
- {
- inp.activate();
- const netlist_sig_t ret = inp.Q();
- inp.inactivate();
- return ret;
- }
+ {
+ inp.activate();
+ const netlist_sig_t ret = inp.Q();
+ inp.inactivate();
+ return ret;
+ }
}
@@ -424,26 +424,26 @@ ATTR_COLD void netlist_device_t::register_subalias(const pstring &name, netlist_
ATTR_COLD void netlist_device_t::register_terminal(const pstring &name, netlist_terminal_t &port)
{
setup().register_object(*this, name, port);
- if (port.isType(netlist_terminal_t::INPUT) || port.isType(netlist_terminal_t::TERMINAL))
- m_terminals.add(port.name());
+ if (port.isType(netlist_terminal_t::INPUT) || port.isType(netlist_terminal_t::TERMINAL))
+ m_terminals.add(port.name());
}
ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_output_t &port)
{
- port.m_family_desc = this->m_family_desc;
+ port.m_family_desc = this->m_family_desc;
setup().register_object(*this, name, port);
}
ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_input_t &inp)
{
- inp.m_family_desc = this->m_family_desc;
+ inp.m_family_desc = this->m_family_desc;
setup().register_object(*this, name, inp);
- m_terminals.add(inp.name());
+ m_terminals.add(inp.name());
}
ATTR_COLD void netlist_device_t::connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2)
{
- setup().connect(t1, t2);
+ setup().connect(t1, t2);
}
@@ -470,117 +470,117 @@ template ATTR_COLD void netlist_device_t::register_param(const pstring &sname, n
ATTR_COLD netlist_net_t::netlist_net_t(const type_t atype, const family_t afamily)
: netlist_object_t(atype, afamily)
- , m_solver(NULL)
- , m_railterminal(NULL)
+ , m_solver(NULL)
+ , m_railterminal(NULL)
, m_num_cons(0)
, m_time(netlist_time::zero)
, m_active(0)
, m_in_queue(2)
{
- m_last_Q = 0;
- m_new_Q = 0;
- m_cur_Q = 0;
- m_last_Analog = 0.0;
- m_new_Analog = 0.0;
- m_cur_Analog = 0.0;
+ m_last_Q = 0;
+ m_new_Q = 0;
+ m_cur_Q = 0;
+ m_last_Analog = 0.0;
+ m_new_Analog = 0.0;
+ m_cur_Analog = 0.0;
};
ATTR_COLD netlist_net_t::~netlist_net_t()
{
- netlist().remove_save_items(this);
+ netlist().remove_save_items(this);
}
ATTR_HOT void netlist_net_t::inc_active(netlist_core_terminal_t &term)
{
- m_active++;
-
- if (USE_ADD_REMOVE_LIST)
- {
- m_list.insert(term);
- //m_list.add(term);
- }
-
- if (USE_DEACTIVE_DEVICE)
- {
- if (m_active == 1 && m_in_queue > 0)
- {
- m_last_Q = m_cur_Q;
- m_last_Analog = m_cur_Analog; // FIXME: Needed here ?
- railterminal().netdev().inc_active();
- m_cur_Q = m_new_Q;
- m_cur_Analog = m_new_Analog;
- }
- }
-
- if (m_active == 1 && m_in_queue == 0)
- {
- if (m_time > netlist().time())
- {
- m_in_queue = 1; /* pending */
- netlist().push_to_queue(this, m_time);
- }
- else
- {
- m_cur_Q = m_last_Q = m_new_Q;
- m_cur_Analog = m_last_Analog = m_new_Analog; // FIXME: Needed here?
- m_in_queue = 2;
- }
- }
+ m_active++;
+
+ if (USE_ADD_REMOVE_LIST)
+ {
+ m_list.insert(term);
+ //m_list.add(term);
+ }
+
+ if (USE_DEACTIVE_DEVICE)
+ {
+ if (m_active == 1 && m_in_queue > 0)
+ {
+ m_last_Q = m_cur_Q;
+ m_last_Analog = m_cur_Analog; // FIXME: Needed here ?
+ railterminal().netdev().inc_active();
+ m_cur_Q = m_new_Q;
+ m_cur_Analog = m_new_Analog;
+ }
+ }
+
+ if (m_active == 1 && m_in_queue == 0)
+ {
+ if (m_time > netlist().time())
+ {
+ m_in_queue = 1; /* pending */
+ netlist().push_to_queue(this, m_time);
+ }
+ else
+ {
+ m_cur_Q = m_last_Q = m_new_Q;
+ m_cur_Analog = m_last_Analog = m_new_Analog; // FIXME: Needed here?
+ m_in_queue = 2;
+ }
+ }
}
ATTR_HOT void netlist_net_t::dec_active(netlist_core_terminal_t &term)
{
- m_active--;
+ m_active--;
- if (USE_ADD_REMOVE_LIST)
- {
- m_list.remove(term);
- }
+ if (USE_ADD_REMOVE_LIST)
+ {
+ m_list.remove(term);
+ }
- if (USE_DEACTIVE_DEVICE)
- {
- if (m_active == 0)
- railterminal().netdev().dec_active();
- }
+ if (USE_DEACTIVE_DEVICE)
+ {
+ if (m_active == 0)
+ railterminal().netdev().dec_active();
+ }
}
ATTR_COLD void netlist_net_t::rebuild_list()
{
- /* rebuild m_list */
+ /* rebuild m_list */
- m_list.clear();
- for (int i=0; i < m_registered.count(); i++)
- if (m_registered[i]->state() != netlist_input_t::STATE_INP_PASSIVE)
- m_list.add(*m_registered[i]);
+ m_list.clear();
+ for (int i=0; i < m_registered.count(); i++)
+ if (m_registered[i]->state() != netlist_input_t::STATE_INP_PASSIVE)
+ m_list.add(*m_registered[i]);
}
ATTR_COLD void netlist_net_t::reset()
{
- m_last_Analog = 0.0;
- m_cur_Analog = 0.0;
- m_new_Analog = 0.0;
- m_last_Q = 0; // set to something we will never hit.
- m_new_Q = 0;
- m_cur_Q = 0;
- m_time = netlist_time::zero;
- m_active = 0;
- m_in_queue = 2;
-
- /* rebuild m_list */
-
- m_list.clear();
- for (int i=0; i < m_registered.count(); i++)
- m_list.add(*m_registered[i]);
-
- for (netlist_core_terminal_t *t = m_list.first(); t != NULL; t = m_list.next(t))
- {
- t->do_reset();
- }
- for (netlist_core_terminal_t *t = m_list.first(); t != NULL; t = m_list.next(t))
- {
- if (t->state() != netlist_input_t::STATE_INP_PASSIVE)
- m_active++;
- }
+ m_last_Analog = 0.0;
+ m_cur_Analog = 0.0;
+ m_new_Analog = 0.0;
+ m_last_Q = 0; // set to something we will never hit.
+ m_new_Q = 0;
+ m_cur_Q = 0;
+ m_time = netlist_time::zero;
+ m_active = 0;
+ m_in_queue = 2;
+
+ /* rebuild m_list */
+
+ m_list.clear();
+ for (int i=0; i < m_registered.count(); i++)
+ m_list.add(*m_registered[i]);
+
+ for (netlist_core_terminal_t *t = m_list.first(); t != NULL; t = m_list.next(t))
+ {
+ t->do_reset();
+ }
+ for (netlist_core_terminal_t *t = m_list.first(); t != NULL; t = m_list.next(t))
+ {
+ if (t->state() != netlist_input_t::STATE_INP_PASSIVE)
+ m_active++;
+ }
}
ATTR_COLD void netlist_net_t::init_object(netlist_base_t &nl, const pstring &aname)
@@ -591,16 +591,16 @@ ATTR_COLD void netlist_net_t::init_object(netlist_base_t &nl, const pstring &ana
ATTR_COLD void netlist_net_t::save_register()
{
- save(NAME(m_last_Analog));
- save(NAME(m_cur_Analog));
- save(NAME(m_new_Analog));
- save(NAME(m_last_Q));
- save(NAME(m_cur_Q));
- save(NAME(m_new_Q));
- save(NAME(m_time));
- save(NAME(m_active));
- save(NAME(m_in_queue));
- netlist_object_t::save_register();
+ save(NAME(m_last_Analog));
+ save(NAME(m_cur_Analog));
+ save(NAME(m_new_Analog));
+ save(NAME(m_last_Q));
+ save(NAME(m_cur_Q));
+ save(NAME(m_new_Q));
+ save(NAME(m_time));
+ save(NAME(m_active));
+ save(NAME(m_in_queue));
+ netlist_object_t::save_register();
}
ATTR_COLD void netlist_net_t::register_railterminal(netlist_output_t &mr)
@@ -666,61 +666,61 @@ ATTR_HOT ATTR_ALIGN inline void netlist_net_t::update_devs()
assert(this->isRailNet());
const UINT32 masks[4] = { 1, 5, 3, 1 };
- const UINT32 mask = masks[ (m_last_Q << 1) | m_new_Q ];
- netlist_core_terminal_t *p = m_list.first();
-
- m_in_queue = 2; /* mark as taken ... */
- m_cur_Q = m_new_Q;
-
- m_cur_Analog = m_new_Analog;
-
- if (USE_ADD_REMOVE_LIST)
- {
- switch (m_active)
- {
- case 2:
- update_dev(p, mask);
- p = m_list.next(p);
- if (p == NULL) break;
- case 1:
- update_dev(p, mask);
- break;
- default:
- while (p != NULL)
- {
- update_dev(p, mask);
- p = m_list.next(p);
- }
- break;
- }
- }
- else
- {
- switch (m_num_cons)
- {
- case 2:
- update_dev(p, mask);
- p = m_list.next(p);
- case 1:
- update_dev(p, mask);
- break;
- default:
- do
- {
- update_dev(p, mask);
- p = m_list.next(p);
- } while (p != NULL);
- break;
- }
- }
- m_last_Q = m_cur_Q;
- m_last_Analog = m_cur_Analog;
+ const UINT32 mask = masks[ (m_last_Q << 1) | m_new_Q ];
+ netlist_core_terminal_t *p = m_list.first();
+
+ m_in_queue = 2; /* mark as taken ... */
+ m_cur_Q = m_new_Q;
+
+ m_cur_Analog = m_new_Analog;
+
+ if (USE_ADD_REMOVE_LIST)
+ {
+ switch (m_active)
+ {
+ case 2:
+ update_dev(p, mask);
+ p = m_list.next(p);
+ if (p == NULL) break;
+ case 1:
+ update_dev(p, mask);
+ break;
+ default:
+ while (p != NULL)
+ {
+ update_dev(p, mask);
+ p = m_list.next(p);
+ }
+ break;
+ }
+ }
+ else
+ {
+ switch (m_num_cons)
+ {
+ case 2:
+ update_dev(p, mask);
+ p = m_list.next(p);
+ case 1:
+ update_dev(p, mask);
+ break;
+ default:
+ do
+ {
+ update_dev(p, mask);
+ p = m_list.next(p);
+ } while (p != NULL);
+ break;
+ }
+ }
+ m_last_Q = m_cur_Q;
+ m_last_Analog = m_cur_Analog;
}
ATTR_HOT void netlist_net_t::solve()
{
- if (m_solver != NULL)
- m_solver->schedule();
+ if (m_solver != NULL)
+ m_solver->schedule();
}
// ----------------------------------------------------------------------------------------
@@ -748,19 +748,19 @@ ATTR_COLD netlist_terminal_t::netlist_terminal_t()
ATTR_COLD void netlist_terminal_t::reset()
{
- //netlist_terminal_core_terminal_t::reset();
- set_state(STATE_INP_ACTIVE);
- m_Idr = 0.0;
- m_go = netlist().gmin();
- m_gt = netlist().gmin();
+ //netlist_terminal_core_terminal_t::reset();
+ set_state(STATE_INP_ACTIVE);
+ m_Idr = 0.0;
+ m_go = netlist().gmin();
+ m_gt = netlist().gmin();
}
ATTR_COLD void netlist_terminal_t::save_register()
{
- save(NAME(m_Idr));
- save(NAME(m_go));
- save(NAME(m_gt));
- netlist_core_terminal_t::save_register();
+ save(NAME(m_Idr));
+ save(NAME(m_go));
+ save(NAME(m_gt));
+ netlist_core_terminal_t::save_register();
}
@@ -782,7 +782,7 @@ netlist_output_t::netlist_output_t(const type_t atype, const family_t afamily)
, m_my_net(NET, afamily)
{
//m_net = new net_net_t(NET_DIGITAL);
- set_state(STATE_OUT);
+ set_state(STATE_OUT);
this->set_net(m_my_net);
}
@@ -798,7 +798,7 @@ ATTR_COLD void netlist_output_t::init_object(netlist_core_device_t &dev, const p
// ----------------------------------------------------------------------------------------
ATTR_COLD netlist_logic_output_t::netlist_logic_output_t()
- : netlist_output_t(OUTPUT, LOGIC), m_proxy(NULL)
+ : netlist_output_t(OUTPUT, LOGIC), m_proxy(NULL)
{
}
@@ -806,7 +806,7 @@ ATTR_COLD void netlist_logic_output_t::initial(const netlist_sig_t val)
{
net().m_cur_Q = val;
net().m_new_Q = val;
- net().m_last_Q = val;
+ net().m_last_Q = val;
}
// ----------------------------------------------------------------------------------------
@@ -825,14 +825,14 @@ ATTR_COLD netlist_ttl_output_t::netlist_ttl_output_t()
ATTR_COLD netlist_analog_output_t::netlist_analog_output_t()
: netlist_output_t(OUTPUT, ANALOG)
{
- net().m_last_Analog = 0.97;
+ net().m_last_Analog = 0.97;
net().m_cur_Analog = 0.98;
net().m_new_Analog = 0.99;
}
ATTR_COLD void netlist_analog_output_t::initial(const double val)
{
- net().m_cur_Analog = val * 0.98;
+ net().m_cur_Analog = val * 0.98;
net().m_cur_Analog = val * 0.99;
net().m_new_Analog = val * 1.0;
}
@@ -878,14 +878,14 @@ ATTR_COLD netlist_param_model_t::netlist_param_model_t()
ATTR_COLD const pstring netlist_param_model_t::model_type() const
{
- pstring tmp = this->Value();
- // .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)
- int p = tmp.find("(");
- int p1 = p;
- while (--p >= 0 && tmp[p] != ' ')
- ;
+ pstring tmp = this->Value();
+ // .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)
+ int p = tmp.find("(");
+ int p1 = p;
+ while (--p >= 0 && tmp[p] != ' ')
+ ;
- return tmp.substr(p+1, p1-p-1).ucase();
+ return tmp.substr(p+1, p1-p-1).ucase();
}
@@ -929,8 +929,8 @@ ATTR_COLD double netlist_param_model_t::model_value(const pstring &entity, const
ATTR_HOT inline void NETLIB_NAME(mainclock)::mc_update(netlist_net_t &net)
{
- net.m_new_Q ^= 1;
- net.update_devs();
+ net.m_new_Q ^= 1;
+ net.update_devs();
}
NETLIB_START(mainclock)
@@ -943,7 +943,7 @@ NETLIB_START(mainclock)
NETLIB_RESET(mainclock)
{
- m_Q.net().set_time(netlist_time::zero);
+ m_Q.net().set_time(netlist_time::zero);
}
NETLIB_UPDATE_PARAM(mainclock)
@@ -965,16 +965,16 @@ NETLIB_UPDATE(mainclock)
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::term_param_list()
{
- if (m_def_param.startsWith("+"))
- return nl_util::split(m_def_param.substr(1), ",");
- else
- return nl_util::pstring_list();
+ if (m_def_param.startsWith("+"))
+ return nl_util::split(m_def_param.substr(1), ",");
+ else
+ return nl_util::pstring_list();
}
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::def_params()
{
- if (m_def_param.startsWith("+") || m_def_param.equals("-"))
- return nl_util::pstring_list();
- else
- return nl_util::split(m_def_param, ",");
+ if (m_def_param.startsWith("+") || m_def_param.equals("-"))
+ return nl_util::pstring_list();
+ else
+ return nl_util::split(m_def_param, ",");
}
diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h
index 97c229e0dd2..f6a768040d4 100644
--- a/src/emu/netlist/nl_base.h
+++ b/src/emu/netlist/nl_base.h
@@ -190,49 +190,49 @@ typedef void (*net_update_delegate)(netlist_core_device_t *);
#define NETLIB_UPDATEI() ATTR_HOT ATTR_ALIGN inline void update(void)
#define NETLIB_DEVICE_BASE(_name, _pclass, _extra, _priv) \
- class _name : public _pclass \
- { \
- public: \
- _name() \
- : _pclass() { } \
- protected: \
- _extra \
- ATTR_HOT void update(); \
- ATTR_HOT void start(); \
- ATTR_HOT void reset(); \
- _priv \
- }
+ class _name : public _pclass \
+ { \
+ public: \
+ _name() \
+ : _pclass() { } \
+ protected: \
+ _extra \
+ ATTR_HOT void update(); \
+ ATTR_HOT void start(); \
+ ATTR_HOT void reset(); \
+ _priv \
+ }
#define NETLIB_DEVICE_DERIVED(_name, _pclass, _priv) \
- NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), , _priv)
+ NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), , _priv)
#define NETLIB_DEVICE(_name, _priv) \
- NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, , _priv)
+ NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, , _priv)
#define NETLIB_SUBDEVICE(_name, _priv) \
- class NETLIB_NAME(_name) : public netlist_device_t \
- { \
- public: \
- NETLIB_NAME(_name) () \
- : netlist_device_t() \
- { } \
- /*protected:*/ \
- ATTR_HOT void update(); \
- ATTR_HOT void start(); \
- ATTR_HOT void reset(); \
- public: \
- _priv \
- }
+ class NETLIB_NAME(_name) : public netlist_device_t \
+ { \
+ public: \
+ NETLIB_NAME(_name) () \
+ : netlist_device_t() \
+ { } \
+ /*protected:*/ \
+ ATTR_HOT void update(); \
+ ATTR_HOT void start(); \
+ ATTR_HOT void reset(); \
+ public: \
+ _priv \
+ }
#define NETLIB_DEVICE_WITH_PARAMS(_name, _priv) \
- NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, \
- ATTR_HOT void update_param(); \
- , _priv)
+ NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, \
+ ATTR_HOT void update_param(); \
+ , _priv)
#define NETLIB_DEVICE_WITH_PARAMS_DERIVED(_name, _pclass, _priv) \
- NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), \
- ATTR_HOT void update_param(); \
- , _priv)
+ NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), \
+ ATTR_HOT void update_param(); \
+ , _priv)
// ----------------------------------------------------------------------------------------
// forward definitions
@@ -255,12 +255,12 @@ class NETLIB_NAME(base_d_to_a_proxy);
struct netlist_logic_family_desc_t
{
- double m_low_thresh_V;
- double m_high_thresh_V;
- double m_low_V;
- double m_high_V;
- double m_R_low;
- double m_R_high;
+ double m_low_thresh_V;
+ double m_high_thresh_V;
+ double m_low_V;
+ double m_high_V;
+ double m_R_low;
+ double m_R_high;
};
/* Terminals inherit the family description from the netlist_device
@@ -278,69 +278,69 @@ extern netlist_logic_family_desc_t netlist_family_ttl;
class netlist_object_t
{
- NETLIST_PREVENT_COPYING(netlist_object_t)
+ NETLIST_PREVENT_COPYING(netlist_object_t)
public:
- enum type_t {
- TERMINAL = 0,
- INPUT = 1,
- OUTPUT = 2,
- PARAM = 3,
- NET = 4,
- DEVICE = 5,
- NETLIST = 6,
- };
- enum family_t {
- // Terminal families
- LOGIC = 1,
- ANALOG = 2,
- // Device families
- GENERIC = 3, // <== devices usually fall into this category
- RESISTOR = 4, // Resistor
- CAPACITOR = 5, // Capacitor
- DIODE = 6, // Diode
- BJT_SWITCH = 7, // BJT(Switch)
- VCVS = 8, // Voltage controlled voltage source
- VCCS = 9, // Voltage controlled voltage source
- BJT_EB = 10, // BJT(Ebers-Moll)
- GND = 11, // BJT(Ebers-Moll)
- };
-
- ATTR_COLD netlist_object_t(const type_t atype, const family_t afamily);
-
- virtual ~netlist_object_t();
-
- ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname);
- ATTR_COLD bool isInitalized() { return (m_netlist != NULL); }
-
- ATTR_COLD const pstring name() const;
-
- PSTATE_INTERFACE_DECL()
-
- ATTR_HOT inline const type_t type() const { return m_objtype; }
- ATTR_HOT inline const family_t family() const { return m_family; }
-
- ATTR_HOT inline const bool isType(const type_t atype) const { return (m_objtype == atype); }
- ATTR_HOT inline const bool isFamily(const family_t afamily) const { return (m_family == afamily); }
-
- ATTR_HOT inline netlist_base_t & RESTRICT netlist() { return *m_netlist; }
- ATTR_HOT inline const netlist_base_t & RESTRICT netlist() const { return *m_netlist; }
-
- ATTR_COLD void inline do_reset()
- {
- reset();
- }
+ enum type_t {
+ TERMINAL = 0,
+ INPUT = 1,
+ OUTPUT = 2,
+ PARAM = 3,
+ NET = 4,
+ DEVICE = 5,
+ NETLIST = 6,
+ };
+ enum family_t {
+ // Terminal families
+ LOGIC = 1,
+ ANALOG = 2,
+ // Device families
+ GENERIC = 3, // <== devices usually fall into this category
+ RESISTOR = 4, // Resistor
+ CAPACITOR = 5, // Capacitor
+ DIODE = 6, // Diode
+ BJT_SWITCH = 7, // BJT(Switch)
+ VCVS = 8, // Voltage controlled voltage source
+ VCCS = 9, // Voltage controlled voltage source
+ BJT_EB = 10, // BJT(Ebers-Moll)
+ GND = 11, // BJT(Ebers-Moll)
+ };
+
+ ATTR_COLD netlist_object_t(const type_t atype, const family_t afamily);
+
+ virtual ~netlist_object_t();
+
+ ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname);
+ ATTR_COLD bool isInitalized() { return (m_netlist != NULL); }
+
+ ATTR_COLD const pstring name() const;
+
+ PSTATE_INTERFACE_DECL()
+
+ ATTR_HOT inline const type_t type() const { return m_objtype; }
+ ATTR_HOT inline const family_t family() const { return m_family; }
+
+ ATTR_HOT inline const bool isType(const type_t atype) const { return (m_objtype == atype); }
+ ATTR_HOT inline const bool isFamily(const family_t afamily) const { return (m_family == afamily); }
+
+ ATTR_HOT inline netlist_base_t & RESTRICT netlist() { return *m_netlist; }
+ ATTR_HOT inline const netlist_base_t & RESTRICT netlist() const { return *m_netlist; }
+
+ ATTR_COLD void inline do_reset()
+ {
+ reset();
+ }
protected:
- ATTR_COLD virtual void reset() = 0;
- // must call parent save_register !
- ATTR_COLD virtual void save_register() { };
+ ATTR_COLD virtual void reset() = 0;
+ // must call parent save_register !
+ ATTR_COLD virtual void save_register() { };
private:
- pstring m_name;
- const type_t m_objtype;
- const family_t m_family;
- netlist_base_t * RESTRICT m_netlist;
+ pstring m_name;
+ const type_t m_objtype;
+ const family_t m_family;
+ netlist_base_t * RESTRICT m_netlist;
};
// ----------------------------------------------------------------------------------------
@@ -349,15 +349,15 @@ private:
class netlist_owned_object_t : public netlist_object_t
{
- NETLIST_PREVENT_COPYING(netlist_owned_object_t)
+ NETLIST_PREVENT_COPYING(netlist_owned_object_t)
public:
- ATTR_COLD netlist_owned_object_t(const type_t atype, const family_t afamily);
+ ATTR_COLD netlist_owned_object_t(const type_t atype, const family_t afamily);
- ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
+ ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
- ATTR_HOT inline netlist_core_device_t & RESTRICT netdev() const { return *m_netdev; }
+ ATTR_HOT inline netlist_core_device_t & RESTRICT netdev() const { return *m_netdev; }
private:
- netlist_core_device_t * RESTRICT m_netdev;
+ netlist_core_device_t * RESTRICT m_netdev;
};
// ----------------------------------------------------------------------------------------
@@ -366,53 +366,53 @@ private:
class netlist_core_terminal_t : public netlist_owned_object_t, public plinked_list_element<netlist_core_terminal_t>
{
- NETLIST_PREVENT_COPYING(netlist_core_terminal_t)
+ NETLIST_PREVENT_COPYING(netlist_core_terminal_t)
public:
- typedef netlist_list_t<netlist_core_terminal_t *> list_t;
+ typedef netlist_list_t<netlist_core_terminal_t *> list_t;
- /* needed here ... */
+ /* needed here ... */
- enum state_e {
- STATE_INP_PASSIVE = 0,
- STATE_INP_ACTIVE = 1,
- STATE_INP_HL = 2,
- STATE_INP_LH = 4,
- STATE_OUT = 128,
- STATE_NONEX = 256
- };
+ enum state_e {
+ STATE_INP_PASSIVE = 0,
+ STATE_INP_ACTIVE = 1,
+ STATE_INP_HL = 2,
+ STATE_INP_LH = 4,
+ STATE_OUT = 128,
+ STATE_NONEX = 256
+ };
- ATTR_COLD netlist_core_terminal_t(const type_t atype, const family_t afamily);
+ ATTR_COLD netlist_core_terminal_t(const type_t atype, const family_t afamily);
- //ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
+ //ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
- ATTR_COLD void set_net(netlist_net_t &anet);
- ATTR_COLD inline void clear_net() { m_net = NULL; }
- ATTR_HOT inline bool has_net() const { return (m_net != NULL); }
- ATTR_HOT inline const netlist_net_t & RESTRICT net() const { return *m_net;}
- ATTR_HOT inline netlist_net_t & RESTRICT net() { return *m_net;}
+ ATTR_COLD void set_net(netlist_net_t &anet);
+ ATTR_COLD inline void clear_net() { m_net = NULL; }
+ ATTR_HOT inline bool has_net() const { return (m_net != NULL); }
+ ATTR_HOT inline const netlist_net_t & RESTRICT net() const { return *m_net;}
+ ATTR_HOT inline netlist_net_t & RESTRICT net() { return *m_net;}
- ATTR_HOT inline const bool is_state(const state_e astate) const { return (m_state == astate); }
- ATTR_HOT inline const state_e state() const { return m_state; }
- ATTR_HOT inline void set_state(const state_e astate)
- {
- assert(astate != STATE_NONEX);
- m_state = astate;
- }
+ ATTR_HOT inline const bool is_state(const state_e astate) const { return (m_state == astate); }
+ ATTR_HOT inline const state_e state() const { return m_state; }
+ ATTR_HOT inline void set_state(const state_e astate)
+ {
+ assert(astate != STATE_NONEX);
+ m_state = astate;
+ }
- const netlist_logic_family_desc_t *m_family_desc;
+ const netlist_logic_family_desc_t *m_family_desc;
protected:
- ATTR_COLD virtual void save_register()
- {
- save(NAME(m_state));
- netlist_owned_object_t::save_register();
- }
+ ATTR_COLD virtual void save_register()
+ {
+ save(NAME(m_state));
+ netlist_owned_object_t::save_register();
+ }
private:
- netlist_net_t * RESTRICT m_net;
- state_e m_state;
+ netlist_net_t * RESTRICT m_net;
+ state_e m_state;
};
NETLIST_SAVE_TYPE(netlist_core_terminal_t::state_e, DT_INT);
@@ -420,41 +420,41 @@ NETLIST_SAVE_TYPE(netlist_core_terminal_t::state_e, DT_INT);
class netlist_terminal_t : public netlist_core_terminal_t
{
- NETLIST_PREVENT_COPYING(netlist_terminal_t)
+ NETLIST_PREVENT_COPYING(netlist_terminal_t)
public:
- ATTR_COLD netlist_terminal_t();
+ ATTR_COLD netlist_terminal_t();
- double m_Idr; // drive current
- double m_go; // conductance for Voltage from other term
- double m_gt; // conductance for total conductance
+ double m_Idr; // drive current
+ double m_go; // conductance for Voltage from other term
+ double m_gt; // conductance for total conductance
- ATTR_HOT inline void set(const double G)
- {
- m_Idr = 0;
- m_go = m_gt = G;
- }
+ ATTR_HOT inline void set(const double G)
+ {
+ m_Idr = 0;
+ m_go = m_gt = G;
+ }
- ATTR_HOT inline void set(const double GO, const double GT)
- {
- m_Idr = 0;
- m_go = GO;
- m_gt = GT;
- }
+ ATTR_HOT inline void set(const double GO, const double GT)
+ {
+ m_Idr = 0;
+ m_go = GO;
+ m_gt = GT;
+ }
- ATTR_HOT inline void set(const double GO, const double GT, const double I)
- {
- m_Idr = I;
- m_go = GO;
- m_gt = GT;
- }
+ ATTR_HOT inline void set(const double GO, const double GT, const double I)
+ {
+ m_Idr = I;
+ m_go = GO;
+ m_gt = GT;
+ }
- netlist_terminal_t *m_otherterm;
+ netlist_terminal_t *m_otherterm;
protected:
- ATTR_COLD virtual void save_register();
+ ATTR_COLD virtual void save_register();
- ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void reset();
};
@@ -467,23 +467,23 @@ class netlist_input_t : public netlist_core_terminal_t
public:
- ATTR_COLD netlist_input_t(const type_t atype, const family_t afamily)
- : netlist_core_terminal_t(atype, afamily)
- {
- set_state(STATE_INP_ACTIVE);
- }
+ ATTR_COLD netlist_input_t(const type_t atype, const family_t afamily)
+ : netlist_core_terminal_t(atype, afamily)
+ {
+ set_state(STATE_INP_ACTIVE);
+ }
- ATTR_HOT inline void inactivate();
- ATTR_HOT inline void activate();
- ATTR_HOT inline void activate_hl();
- ATTR_HOT inline void activate_lh();
+ ATTR_HOT inline void inactivate();
+ ATTR_HOT inline void activate();
+ ATTR_HOT inline void activate_hl();
+ ATTR_HOT inline void activate_lh();
protected:
- ATTR_COLD virtual void reset()
- {
- //netlist_core_terminal_t::reset();
- set_state(STATE_INP_ACTIVE);
- }
+ ATTR_COLD virtual void reset()
+ {
+ //netlist_core_terminal_t::reset();
+ set_state(STATE_INP_ACTIVE);
+ }
private:
};
@@ -495,13 +495,13 @@ private:
class netlist_logic_input_t : public netlist_input_t
{
public:
- ATTR_COLD netlist_logic_input_t()
- : netlist_input_t(INPUT, LOGIC)
- {
- }
+ ATTR_COLD netlist_logic_input_t()
+ : netlist_input_t(INPUT, LOGIC)
+ {
+ }
- ATTR_HOT inline const netlist_sig_t Q() const;
- ATTR_HOT inline const netlist_sig_t last_Q() const;
+ ATTR_HOT inline const netlist_sig_t Q() const;
+ ATTR_HOT inline const netlist_sig_t last_Q() const;
};
@@ -512,8 +512,8 @@ public:
class netlist_ttl_input_t : public netlist_logic_input_t
{
public:
- ATTR_COLD netlist_ttl_input_t()
- : netlist_logic_input_t() { }
+ ATTR_COLD netlist_ttl_input_t()
+ : netlist_logic_input_t() { }
};
// ----------------------------------------------------------------------------------------
@@ -523,10 +523,10 @@ public:
class netlist_analog_input_t : public netlist_input_t
{
public:
- ATTR_COLD netlist_analog_input_t()
- : netlist_input_t(INPUT, ANALOG) { }
+ ATTR_COLD netlist_analog_input_t()
+ : netlist_input_t(INPUT, ANALOG) { }
- ATTR_HOT inline const double Q_Analog() const;
+ ATTR_HOT inline const double Q_Analog() const;
};
//#define INPVAL(_x) (_x).Q()
@@ -537,120 +537,120 @@ public:
class netlist_net_t : public netlist_object_t
{
- NETLIST_PREVENT_COPYING(netlist_net_t)
+ NETLIST_PREVENT_COPYING(netlist_net_t)
public:
- typedef netlist_list_t<netlist_net_t *> list_t;
+ typedef netlist_list_t<netlist_net_t *> list_t;
- friend class NETLIB_NAME(mainclock);
- friend class netlist_matrix_solver_t;
- friend class netlist_logic_output_t;
- friend class netlist_analog_output_t;
- friend class netlist_setup_t;
+ friend class NETLIB_NAME(mainclock);
+ friend class netlist_matrix_solver_t;
+ friend class netlist_logic_output_t;
+ friend class netlist_analog_output_t;
+ friend class netlist_setup_t;
- ATTR_COLD netlist_net_t(const type_t atype, const family_t afamily);
- ATTR_COLD virtual ~netlist_net_t();
+ ATTR_COLD netlist_net_t(const type_t atype, const family_t afamily);
+ ATTR_COLD virtual ~netlist_net_t();
- ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname);
+ ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname);
- ATTR_COLD void register_con(netlist_core_terminal_t &terminal);
- ATTR_COLD void merge_net(netlist_net_t *othernet);
- ATTR_COLD void register_railterminal(netlist_output_t &mr);
+ ATTR_COLD void register_con(netlist_core_terminal_t &terminal);
+ ATTR_COLD void merge_net(netlist_net_t *othernet);
+ ATTR_COLD void register_railterminal(netlist_output_t &mr);
- ATTR_HOT inline void update_devs();
+ ATTR_HOT inline void update_devs();
- ATTR_HOT inline const netlist_time time() const { return m_time; }
- ATTR_HOT inline void set_time(const netlist_time ntime) { m_time = ntime; }
+ ATTR_HOT inline const netlist_time time() const { return m_time; }
+ ATTR_HOT inline void set_time(const netlist_time ntime) { m_time = ntime; }
- ATTR_HOT inline bool isRailNet() const { return !(m_railterminal == NULL); }
- ATTR_HOT inline const netlist_core_terminal_t & RESTRICT railterminal() const { return *m_railterminal; }
+ ATTR_HOT inline bool isRailNet() const { return !(m_railterminal == NULL); }
+ ATTR_HOT inline const netlist_core_terminal_t & RESTRICT railterminal() const { return *m_railterminal; }
- /* Everything below is used by the logic subsystem */
- ATTR_HOT void inc_active(netlist_core_terminal_t &term);
- ATTR_HOT void dec_active(netlist_core_terminal_t &term);
+ /* Everything below is used by the logic subsystem */
+ ATTR_HOT void inc_active(netlist_core_terminal_t &term);
+ ATTR_HOT void dec_active(netlist_core_terminal_t &term);
- ATTR_HOT inline const netlist_sig_t Q() const
- {
- assert(family() == LOGIC);
- return m_cur_Q;
- }
+ ATTR_HOT inline const netlist_sig_t Q() const
+ {
+ assert(family() == LOGIC);
+ return m_cur_Q;
+ }
- ATTR_HOT inline const netlist_sig_t last_Q() const
- {
- assert(family() == LOGIC);
- return m_last_Q;
- }
+ ATTR_HOT inline const netlist_sig_t last_Q() const
+ {
+ assert(family() == LOGIC);
+ return m_last_Q;
+ }
- ATTR_HOT inline const netlist_sig_t new_Q() const
- {
- assert(family() == LOGIC);
- return m_new_Q;
- }
+ ATTR_HOT inline const netlist_sig_t new_Q() const
+ {
+ assert(family() == LOGIC);
+ return m_new_Q;
+ }
- ATTR_HOT inline const double Q_Analog() const
- {
- //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG);
- assert(family() == ANALOG);
- return m_cur_Analog;
- }
+ ATTR_HOT inline const double Q_Analog() const
+ {
+ //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG);
+ assert(family() == ANALOG);
+ return m_cur_Analog;
+ }
- ATTR_HOT inline void push_to_queue(const netlist_time delay);
- ATTR_HOT bool inline is_queued() const { return m_in_queue == 1; }
+ ATTR_HOT inline void push_to_queue(const netlist_time delay);
+ ATTR_HOT bool inline is_queued() const { return m_in_queue == 1; }
- /* internal state support
- * FIXME: get rid of this and implement export/import in MAME
- */
- ATTR_COLD inline netlist_sig_t &Q_state_ptr()
- {
- assert(family() == LOGIC);
- return m_cur_Q;
- }
+ /* internal state support
+ * FIXME: get rid of this and implement export/import in MAME
+ */
+ ATTR_COLD inline netlist_sig_t &Q_state_ptr()
+ {
+ assert(family() == LOGIC);
+ return m_cur_Q;
+ }
- ATTR_COLD inline double &Q_Analog_state_ptr()
- {
- //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG);
- assert(family() == ANALOG);
- return m_cur_Analog;
- }
+ ATTR_COLD inline double &Q_Analog_state_ptr()
+ {
+ //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG);
+ assert(family() == ANALOG);
+ return m_cur_Analog;
+ }
- ATTR_HOT inline int num_cons() const { return m_num_cons; }
+ ATTR_HOT inline int num_cons() const { return m_num_cons; }
- // m_terms is only used by analog subsystem
- typedef netlist_list_t<netlist_terminal_t *> terminal_list_t;
+ // m_terms is only used by analog subsystem
+ typedef netlist_list_t<netlist_terminal_t *> terminal_list_t;
- terminal_list_t m_terms;
- terminal_list_t m_rails;
- netlist_matrix_solver_t *m_solver;
- netlist_core_terminal_t * RESTRICT m_railterminal;
+ terminal_list_t m_terms;
+ terminal_list_t m_rails;
+ netlist_matrix_solver_t *m_solver;
+ netlist_core_terminal_t * RESTRICT m_railterminal;
- ATTR_HOT void solve();
+ ATTR_HOT void solve();
- netlist_list_t<netlist_core_terminal_t *> m_registered; // save post-start m_list ...
- plinked_list<netlist_core_terminal_t> m_list;
+ netlist_list_t<netlist_core_terminal_t *> m_registered; // save post-start m_list ...
+ plinked_list<netlist_core_terminal_t> m_list;
- ATTR_COLD void rebuild_list(); /* rebuild m_list after a load */
+ ATTR_COLD void rebuild_list(); /* rebuild m_list after a load */
protected: //FIXME: needed by current solver code
- UINT16 m_num_cons;
+ UINT16 m_num_cons;
- ATTR_COLD virtual void save_register();
- ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void save_register();
+ ATTR_COLD virtual void reset();
private:
- netlist_sig_t m_new_Q;
- netlist_sig_t m_cur_Q;
- netlist_sig_t m_last_Q;
+ netlist_sig_t m_new_Q;
+ netlist_sig_t m_cur_Q;
+ netlist_sig_t m_last_Q;
- netlist_time m_time;
- INT32 m_active;
- UINT8 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */
+ netlist_time m_time;
+ INT32 m_active;
+ UINT8 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */
public:
- double m_last_Analog;
- double m_cur_Analog;
- double m_new_Analog;
+ double m_last_Analog;
+ double m_cur_Analog;
+ double m_new_Analog;
};
@@ -661,74 +661,74 @@ public:
class netlist_output_t : public netlist_core_terminal_t
{
- NETLIST_PREVENT_COPYING(netlist_output_t)
+ NETLIST_PREVENT_COPYING(netlist_output_t)
public:
- ATTR_COLD netlist_output_t(const type_t atype, const family_t afamily);
- ATTR_COLD virtual ~netlist_output_t() {}
+ ATTR_COLD netlist_output_t(const type_t atype, const family_t afamily);
+ ATTR_COLD virtual ~netlist_output_t() {}
- ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
- ATTR_COLD virtual void reset()
- {
- //netlist_core_terminal_t::reset();
- set_state(STATE_OUT);
- }
+ ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname);
+ ATTR_COLD virtual void reset()
+ {
+ //netlist_core_terminal_t::reset();
+ set_state(STATE_OUT);
+ }
private:
- netlist_net_t m_my_net;
+ netlist_net_t m_my_net;
};
class netlist_logic_output_t : public netlist_output_t
{
- NETLIST_PREVENT_COPYING(netlist_logic_output_t)
+ NETLIST_PREVENT_COPYING(netlist_logic_output_t)
public:
- ATTR_COLD netlist_logic_output_t();
+ ATTR_COLD netlist_logic_output_t();
- ATTR_COLD void initial(const netlist_sig_t val);
+ ATTR_COLD void initial(const netlist_sig_t val);
- ATTR_COLD bool has_proxy() const { return (m_proxy != NULL); }
- ATTR_COLD nld_base_d_to_a_proxy *get_proxy() const { return m_proxy; }
- ATTR_COLD void set_proxy(nld_base_d_to_a_proxy *proxy) { m_proxy = proxy; }
+ ATTR_COLD bool has_proxy() const { return (m_proxy != NULL); }
+ ATTR_COLD nld_base_d_to_a_proxy *get_proxy() const { return m_proxy; }
+ ATTR_COLD void set_proxy(nld_base_d_to_a_proxy *proxy) { m_proxy = proxy; }
- ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time delay)
- {
- if (EXPECTED(newQ != net().m_new_Q))
- {
- net().m_new_Q = newQ;
- net().push_to_queue(delay);
- }
- }
+ ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time delay)
+ {
+ if (EXPECTED(newQ != net().m_new_Q))
+ {
+ net().m_new_Q = newQ;
+ net().push_to_queue(delay);
+ }
+ }
private:
- nld_base_d_to_a_proxy *m_proxy;
+ nld_base_d_to_a_proxy *m_proxy;
};
class netlist_ttl_output_t : public netlist_logic_output_t
{
public:
- ATTR_COLD netlist_ttl_output_t();
+ ATTR_COLD netlist_ttl_output_t();
};
class netlist_analog_output_t : public netlist_output_t
{
- NETLIST_PREVENT_COPYING(netlist_analog_output_t)
+ NETLIST_PREVENT_COPYING(netlist_analog_output_t)
public:
- ATTR_COLD netlist_analog_output_t();
+ ATTR_COLD netlist_analog_output_t();
- ATTR_COLD void initial(const double val);
+ ATTR_COLD void initial(const double val);
- ATTR_HOT inline void set_Q(const double newQ, const netlist_time delay)
- {
- if (newQ != net().m_new_Analog)
- {
- net().m_new_Analog = newQ;
- net().push_to_queue(delay);
- }
- }
+ ATTR_HOT inline void set_Q(const double newQ, const netlist_time delay)
+ {
+ if (newQ != net().m_new_Analog)
+ {
+ net().m_new_Analog = newQ;
+ net().push_to_queue(delay);
+ }
+ }
};
@@ -738,110 +738,110 @@ public:
class netlist_param_t : public netlist_owned_object_t
{
- NETLIST_PREVENT_COPYING(netlist_param_t)
+ NETLIST_PREVENT_COPYING(netlist_param_t)
public:
- enum param_type_t {
- MODEL,
- STRING,
- DOUBLE,
- INTEGER,
- LOGIC
- };
+ enum param_type_t {
+ MODEL,
+ STRING,
+ DOUBLE,
+ INTEGER,
+ LOGIC
+ };
- ATTR_COLD netlist_param_t(const param_type_t atype);
+ ATTR_COLD netlist_param_t(const param_type_t atype);
- ATTR_HOT inline const param_type_t param_type() const { return m_param_type; }
+ ATTR_HOT inline const param_type_t param_type() const { return m_param_type; }
protected:
- ATTR_COLD virtual void reset() { }
+ ATTR_COLD virtual void reset() { }
private:
- const param_type_t m_param_type;
+ const param_type_t m_param_type;
};
class netlist_param_double_t : public netlist_param_t
{
- NETLIST_PREVENT_COPYING(netlist_param_double_t)
+ NETLIST_PREVENT_COPYING(netlist_param_double_t)
public:
- ATTR_COLD netlist_param_double_t();
+ ATTR_COLD netlist_param_double_t();
- ATTR_HOT inline void setTo(const double param);
- ATTR_COLD inline void initial(const double val) { m_param = val; }
- ATTR_HOT inline const double Value() const { return m_param; }
+ ATTR_HOT inline void setTo(const double param);
+ ATTR_COLD inline void initial(const double val) { m_param = val; }
+ ATTR_HOT inline const double Value() const { return m_param; }
protected:
- ATTR_COLD virtual void save_register()
- {
- save(NAME(m_param));
- netlist_param_t::save_register();
- }
+ ATTR_COLD virtual void save_register()
+ {
+ save(NAME(m_param));
+ netlist_param_t::save_register();
+ }
private:
- double m_param;
+ double m_param;
};
class netlist_param_int_t : public netlist_param_t
{
- NETLIST_PREVENT_COPYING(netlist_param_int_t)
+ NETLIST_PREVENT_COPYING(netlist_param_int_t)
public:
- ATTR_COLD netlist_param_int_t();
+ ATTR_COLD netlist_param_int_t();
- ATTR_HOT inline void setTo(const int param);
- ATTR_COLD inline void initial(const int val) { m_param = val; }
+ ATTR_HOT inline void setTo(const int param);
+ ATTR_COLD inline void initial(const int val) { m_param = val; }
- ATTR_HOT inline const int Value() const { return m_param; }
+ ATTR_HOT inline const int Value() const { return m_param; }
protected:
- ATTR_COLD virtual void save_register()
- {
- save(NAME(m_param));
- netlist_param_t::save_register();
- }
+ ATTR_COLD virtual void save_register()
+ {
+ save(NAME(m_param));
+ netlist_param_t::save_register();
+ }
private:
- int m_param;
+ int m_param;
};
class netlist_param_logic_t : public netlist_param_int_t
{
- NETLIST_PREVENT_COPYING(netlist_param_logic_t)
+ NETLIST_PREVENT_COPYING(netlist_param_logic_t)
public:
- ATTR_COLD netlist_param_logic_t();
+ ATTR_COLD netlist_param_logic_t();
};
class netlist_param_str_t : public netlist_param_t
{
- NETLIST_PREVENT_COPYING(netlist_param_str_t)
+ NETLIST_PREVENT_COPYING(netlist_param_str_t)
public:
- ATTR_COLD netlist_param_str_t();
+ ATTR_COLD netlist_param_str_t();
- ATTR_HOT inline void setTo(const pstring &param);
- ATTR_COLD inline void initial(const pstring &val) { m_param = val; }
+ ATTR_HOT inline void setTo(const pstring &param);
+ ATTR_COLD inline void initial(const pstring &val) { m_param = val; }
- ATTR_HOT inline const pstring &Value() const { return m_param; }
+ ATTR_HOT inline const pstring &Value() const { return m_param; }
private:
- pstring m_param;
+ pstring m_param;
};
class netlist_param_model_t : public netlist_param_t
{
- NETLIST_PREVENT_COPYING(netlist_param_model_t)
+ NETLIST_PREVENT_COPYING(netlist_param_model_t)
public:
- ATTR_COLD netlist_param_model_t();
+ ATTR_COLD netlist_param_model_t();
- ATTR_COLD inline void initial(const pstring &val) { m_param = val; }
+ ATTR_COLD inline void initial(const pstring &val) { m_param = val; }
- ATTR_HOT inline const pstring &Value() const { return m_param; }
+ ATTR_HOT inline const pstring &Value() const { return m_param; }
- /* these should be cached! */
- ATTR_COLD double model_value(const pstring &entity, const double defval = 0.0) const;
- ATTR_COLD const pstring model_type() const;
+ /* these should be cached! */
+ ATTR_COLD double model_value(const pstring &entity, const double defval = 0.0) const;
+ ATTR_COLD const pstring model_type() const;
private:
- pstring m_param;
+ pstring m_param;
};
// ----------------------------------------------------------------------------------------
@@ -850,90 +850,90 @@ private:
class netlist_core_device_t : public netlist_object_t
{
- NETLIST_PREVENT_COPYING(netlist_core_device_t)
+ NETLIST_PREVENT_COPYING(netlist_core_device_t)
public:
- typedef netlist_list_t<netlist_core_device_t *> list_t;
+ typedef netlist_list_t<netlist_core_device_t *> list_t;
- //ATTR_COLD netlist_core_device_t();
- ATTR_COLD netlist_core_device_t(const family_t afamily);
- ATTR_COLD netlist_core_device_t(const netlist_logic_family_desc_t *family_desc);
+ //ATTR_COLD netlist_core_device_t();
+ ATTR_COLD netlist_core_device_t(const family_t afamily);
+ ATTR_COLD netlist_core_device_t(const netlist_logic_family_desc_t *family_desc);
- ATTR_COLD virtual ~netlist_core_device_t();
+ ATTR_COLD virtual ~netlist_core_device_t();
- ATTR_COLD virtual void init(netlist_base_t &anetlist, const pstring &name);
- ATTR_HOT virtual void update_param() {}
+ ATTR_COLD virtual void init(netlist_base_t &anetlist, const pstring &name);
+ ATTR_HOT virtual void update_param() {}
- ATTR_HOT inline void update_dev()
- {
+ ATTR_HOT inline void update_dev()
+ {
#if USE_PMFDELEGATES
- static_update(this);
+ static_update(this);
#else
- update();
+ update();
#endif
- }
- ATTR_HOT inline void start_dev()
- {
- start();
- }
+ }
+ ATTR_HOT inline void start_dev()
+ {
+ start();
+ }
- ATTR_HOT const netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp);
+ ATTR_HOT const netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp);
- ATTR_HOT inline const netlist_sig_t INPLOGIC(const netlist_logic_input_t &inp) const
- {
- assert(inp.state() != netlist_input_t::STATE_INP_PASSIVE);
- return inp.Q();
- }
+ ATTR_HOT inline const netlist_sig_t INPLOGIC(const netlist_logic_input_t &inp) const
+ {
+ assert(inp.state() != netlist_input_t::STATE_INP_PASSIVE);
+ return inp.Q();
+ }
- ATTR_HOT inline void OUTLOGIC(netlist_logic_output_t &out, const netlist_sig_t val, const netlist_time delay)
- {
- out.set_Q(val, delay);
- }
+ ATTR_HOT inline void OUTLOGIC(netlist_logic_output_t &out, const netlist_sig_t val, const netlist_time delay)
+ {
+ out.set_Q(val, delay);
+ }
- ATTR_HOT inline bool INP_HL(const netlist_logic_input_t &inp) const
- {
- return ((inp.last_Q() & !inp.Q()) == 1);
- }
+ ATTR_HOT inline bool INP_HL(const netlist_logic_input_t &inp) const
+ {
+ return ((inp.last_Q() & !inp.Q()) == 1);
+ }
- ATTR_HOT inline bool INP_LH(const netlist_logic_input_t &inp) const
- {
- return ((!inp.last_Q() & inp.Q()) == 1);
- }
+ ATTR_HOT inline bool INP_LH(const netlist_logic_input_t &inp) const
+ {
+ return ((!inp.last_Q() & inp.Q()) == 1);
+ }
- ATTR_HOT inline const double INPANALOG(const netlist_analog_input_t &inp) const { return inp.Q_Analog(); }
+ ATTR_HOT inline const double INPANALOG(const netlist_analog_input_t &inp) const { return inp.Q_Analog(); }
- ATTR_HOT inline const double TERMANALOG(const netlist_terminal_t &term) const { return term.net().Q_Analog(); }
+ ATTR_HOT inline const double TERMANALOG(const netlist_terminal_t &term) const { return term.net().Q_Analog(); }
- ATTR_HOT inline void OUTANALOG(netlist_analog_output_t &out, const double val, const netlist_time delay)
- {
- out.set_Q(val, delay);
- }
+ ATTR_HOT inline void OUTANALOG(netlist_analog_output_t &out, const double val, const netlist_time delay)
+ {
+ out.set_Q(val, delay);
+ }
- ATTR_HOT virtual void inc_active() { }
+ ATTR_HOT virtual void inc_active() { }
- ATTR_HOT virtual void dec_active() { }
+ ATTR_HOT virtual void dec_active() { }
- ATTR_HOT virtual void step_time(const double st) { }
- ATTR_HOT virtual void update_terminals() { }
+ ATTR_HOT virtual void step_time(const double st) { }
+ ATTR_HOT virtual void update_terminals() { }
#if (NL_KEEP_STATISTICS)
- /* stats */
- osd_ticks_t total_time;
- INT32 stat_count;
+ /* stats */
+ osd_ticks_t total_time;
+ INT32 stat_count;
#endif
#if USE_PMFDELEGATES
- net_update_delegate static_update;
+ net_update_delegate static_update;
#endif
- const netlist_logic_family_desc_t *m_family_desc;
+ const netlist_logic_family_desc_t *m_family_desc;
protected:
- ATTR_HOT virtual void update() { }
- ATTR_COLD virtual void start() { }
+ ATTR_HOT virtual void update() { }
+ ATTR_COLD virtual void start() { }
private:
};
@@ -941,36 +941,36 @@ private:
class netlist_device_t : public netlist_core_device_t
{
- NETLIST_PREVENT_COPYING(netlist_device_t)
+ NETLIST_PREVENT_COPYING(netlist_device_t)
public:
- ATTR_COLD netlist_device_t();
- ATTR_COLD netlist_device_t(const family_t afamily);
+ ATTR_COLD netlist_device_t();
+ ATTR_COLD netlist_device_t(const family_t afamily);
- ATTR_COLD virtual ~netlist_device_t();
+ ATTR_COLD virtual ~netlist_device_t();
- ATTR_COLD virtual void init(netlist_base_t &anetlist, const pstring &name);
+ ATTR_COLD virtual void init(netlist_base_t &anetlist, const pstring &name);
- ATTR_COLD netlist_setup_t &setup();
+ ATTR_COLD netlist_setup_t &setup();
- ATTR_COLD void register_sub(netlist_device_t &dev, const pstring &name);
- ATTR_COLD void register_subalias(const pstring &name, netlist_core_terminal_t &term);
- ATTR_COLD void register_terminal(const pstring &name, netlist_terminal_t &port);
- ATTR_COLD void register_output(const pstring &name, netlist_output_t &out);
- ATTR_COLD void register_input(const pstring &name, netlist_input_t &in);
+ ATTR_COLD void register_sub(netlist_device_t &dev, const pstring &name);
+ ATTR_COLD void register_subalias(const pstring &name, netlist_core_terminal_t &term);
+ ATTR_COLD void register_terminal(const pstring &name, netlist_terminal_t &port);
+ ATTR_COLD void register_output(const pstring &name, netlist_output_t &out);
+ ATTR_COLD void register_input(const pstring &name, netlist_input_t &in);
- ATTR_COLD void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2);
+ ATTR_COLD void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2);
- netlist_list_t<pstring, 20> m_terminals;
+ netlist_list_t<pstring, 20> m_terminals;
protected:
- ATTR_HOT virtual void update() { }
- ATTR_HOT virtual void start() { }
- ATTR_HOT virtual void update_terminals() { }
+ ATTR_HOT virtual void update() { }
+ ATTR_HOT virtual void start() { }
+ ATTR_HOT virtual void update_terminals() { }
- template <class C, class T>
- ATTR_COLD void register_param(const pstring &sname, C &param, const T initialVal);
+ template <class C, class T>
+ ATTR_COLD void register_param(const pstring &sname, C &param, const T initialVal);
private:
};
@@ -981,23 +981,23 @@ private:
// ----------------------------------------------------------------------------------------
class netlist_queue_t : public netlist_timed_queue<netlist_net_t *, netlist_time, 512>,
- public pstate_callback_t
+ public pstate_callback_t
{
public:
- netlist_queue_t(netlist_base_t &nl);
+ netlist_queue_t(netlist_base_t &nl);
- void register_state(pstate_manager_t &manager, const pstring &module);
- void on_pre_save();
- void on_post_load();
+ void register_state(pstate_manager_t &manager, const pstring &module);
+ void on_pre_save();
+ void on_post_load();
- pstate_callback_t &callback() { return *this; }
+ pstate_callback_t &callback() { return *this; }
private:
- netlist_base_t &m_netlist;
- int m_qsize;
- netlist_time::INTERNALTYPE m_times[512];
- char m_name[512][64];
+ netlist_base_t &m_netlist;
+ int m_qsize;
+ netlist_time::INTERNALTYPE m_times[512];
+ char m_name[512][64];
};
// ----------------------------------------------------------------------------------------
@@ -1009,121 +1009,121 @@ typedef tagmap_t<netlist_device_t *, 393> tagmap_devices_t;
class netlist_base_t : public netlist_object_t, public pstate_manager_t
{
- NETLIST_PREVENT_COPYING(netlist_base_t)
+ NETLIST_PREVENT_COPYING(netlist_base_t)
public:
- netlist_base_t();
- virtual ~netlist_base_t();
-
- ATTR_COLD void start();
-
- ATTR_HOT inline const netlist_queue_t &queue() const { return m_queue; }
- ATTR_HOT inline netlist_queue_t &queue() { return m_queue; }
- ATTR_HOT inline const netlist_time time() const { return m_time; }
- ATTR_HOT inline NETLIB_NAME(solver) *solver() const { return m_solver; }
- ATTR_HOT inline NETLIB_NAME(gnd) *gnd() const { return m_gnd; }
- ATTR_HOT const double gmin() const;
-
- ATTR_HOT inline void push_to_queue(netlist_net_t *out, const netlist_time attime)
- {
- m_queue.push(netlist_queue_t::entry_t(attime, out));
- }
-
- ATTR_HOT void process_queue(const netlist_time delta);
- ATTR_HOT inline void abort_current_queue_slice() { m_stop = netlist_time::zero; }
-
- ATTR_COLD void rebuild_lists(); /* must be called after post_load ! */
-
- ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; }
- ATTR_COLD netlist_setup_t &setup() { return *m_setup; }
-
- ATTR_COLD netlist_net_t *find_net(const pstring &name);
-
- ATTR_COLD void error(const char *format, ...) const ATTR_PRINTF(2,3);
- ATTR_COLD void warning(const char *format, ...) const ATTR_PRINTF(2,3);
- ATTR_COLD void log(const char *format, ...) const ATTR_PRINTF(2,3);
-
- template<class _C>
- netlist_list_t<_C *> get_device_list()
- {
- netlist_list_t<_C *> tmp;
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- _C *dev = dynamic_cast<_C *>(entry->object());
- if (dev != NULL)
- tmp.add(dev);
- }
- return tmp;
- }
-
- template<class _C>
- _C *get_first_device()
- {
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- _C *dev = dynamic_cast<_C *>(entry->object());
- if (dev != NULL)
- return dev;
- }
- return NULL;
- }
-
- template<class _C>
- _C *get_single_device(const char *classname)
- {
- _C *ret = NULL;
- for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
- {
- _C *dev = dynamic_cast<_C *>(entry->object());
- if (dev != NULL)
- {
- if (ret != NULL)
- this->error("more than one %s device found", classname);
- else
- ret = dev;
- }
- }
- return ret;
- }
-
- tagmap_devices_t m_devices;
- netlist_net_t::list_t m_nets;
+ netlist_base_t();
+ virtual ~netlist_base_t();
+
+ ATTR_COLD void start();
+
+ ATTR_HOT inline const netlist_queue_t &queue() const { return m_queue; }
+ ATTR_HOT inline netlist_queue_t &queue() { return m_queue; }
+ ATTR_HOT inline const netlist_time time() const { return m_time; }
+ ATTR_HOT inline NETLIB_NAME(solver) *solver() const { return m_solver; }
+ ATTR_HOT inline NETLIB_NAME(gnd) *gnd() const { return m_gnd; }
+ ATTR_HOT const double gmin() const;
+
+ ATTR_HOT inline void push_to_queue(netlist_net_t *out, const netlist_time attime)
+ {
+ m_queue.push(netlist_queue_t::entry_t(attime, out));
+ }
+
+ ATTR_HOT void process_queue(const netlist_time delta);
+ ATTR_HOT inline void abort_current_queue_slice() { m_stop = netlist_time::zero; }
+
+ ATTR_COLD void rebuild_lists(); /* must be called after post_load ! */
+
+ ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; }
+ ATTR_COLD netlist_setup_t &setup() { return *m_setup; }
+
+ ATTR_COLD netlist_net_t *find_net(const pstring &name);
+
+ ATTR_COLD void error(const char *format, ...) const ATTR_PRINTF(2,3);
+ ATTR_COLD void warning(const char *format, ...) const ATTR_PRINTF(2,3);
+ ATTR_COLD void log(const char *format, ...) const ATTR_PRINTF(2,3);
+
+ template<class _C>
+ netlist_list_t<_C *> get_device_list()
+ {
+ netlist_list_t<_C *> tmp;
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ _C *dev = dynamic_cast<_C *>(entry->object());
+ if (dev != NULL)
+ tmp.add(dev);
+ }
+ return tmp;
+ }
+
+ template<class _C>
+ _C *get_first_device()
+ {
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ _C *dev = dynamic_cast<_C *>(entry->object());
+ if (dev != NULL)
+ return dev;
+ }
+ return NULL;
+ }
+
+ template<class _C>
+ _C *get_single_device(const char *classname)
+ {
+ _C *ret = NULL;
+ for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry))
+ {
+ _C *dev = dynamic_cast<_C *>(entry->object());
+ if (dev != NULL)
+ {
+ if (ret != NULL)
+ this->error("more than one %s device found", classname);
+ else
+ ret = dev;
+ }
+ }
+ return ret;
+ }
+
+ tagmap_devices_t m_devices;
+ netlist_net_t::list_t m_nets;
protected:
- enum loglevel_e
- {
- NL_ERROR,
- NL_WARNING,
- NL_LOG,
- };
+ enum loglevel_e
+ {
+ NL_ERROR,
+ NL_WARNING,
+ NL_LOG,
+ };
- // any derived netlist must override this ...
- ATTR_COLD virtual void verror(const loglevel_e level,
- const char *format, va_list ap) const = 0;
+ // any derived netlist must override this ...
+ ATTR_COLD virtual void verror(const loglevel_e level,
+ const char *format, va_list ap) const = 0;
- /* from netlist_object */
- ATTR_COLD virtual void reset();
- ATTR_COLD virtual void save_register();
+ /* from netlist_object */
+ ATTR_COLD virtual void reset();
+ ATTR_COLD virtual void save_register();
#if (NL_KEEP_STATISTICS)
- // performance
- int m_perf_out_processed;
- int m_perf_inp_processed;
- int m_perf_inp_active;
+ // performance
+ int m_perf_out_processed;
+ int m_perf_inp_processed;
+ int m_perf_inp_active;
#endif
private:
- netlist_time m_stop; // target time for current queue processing
+ netlist_time m_stop; // target time for current queue processing
- netlist_time m_time;
- netlist_queue_t m_queue;
+ netlist_time m_time;
+ netlist_queue_t m_queue;
- NETLIB_NAME(mainclock) * m_mainclock;
- NETLIB_NAME(solver) * m_solver;
- NETLIB_NAME(gnd) * m_gnd;
+ NETLIB_NAME(mainclock) * m_mainclock;
+ NETLIB_NAME(solver) * m_solver;
+ NETLIB_NAME(gnd) * m_gnd;
- netlist_setup_t *m_setup;
+ netlist_setup_t *m_setup;
};
// ----------------------------------------------------------------------------------------
@@ -1134,94 +1134,94 @@ PSTATE_INTERFACE(netlist_object_t, m_netlist, name())
ATTR_HOT inline void netlist_param_str_t::setTo(const pstring &param)
{
- m_param = param;
- netdev().update_param();
+ m_param = param;
+ netdev().update_param();
}
ATTR_HOT inline void netlist_param_int_t::setTo(const int param)
{
- if (m_param != param)
- {
- m_param = param;
- netdev().update_param();
- }
+ if (m_param != param)
+ {
+ m_param = param;
+ netdev().update_param();
+ }
}
ATTR_HOT inline void netlist_param_double_t::setTo(const double param)
{
- if (m_param != param)
- {
- m_param = param;
- netdev().update_param();
- }
+ if (m_param != param)
+ {
+ m_param = param;
+ netdev().update_param();
+ }
}
ATTR_HOT inline void netlist_input_t::inactivate()
{
- if (EXPECTED(!is_state(STATE_INP_PASSIVE)))
- {
- set_state(STATE_INP_PASSIVE);
- net().dec_active(*this);
- }
+ if (EXPECTED(!is_state(STATE_INP_PASSIVE)))
+ {
+ set_state(STATE_INP_PASSIVE);
+ net().dec_active(*this);
+ }
}
ATTR_HOT inline void netlist_input_t::activate()
{
- if (is_state(STATE_INP_PASSIVE))
- {
- net().inc_active(*this);
- set_state(STATE_INP_ACTIVE);
- }
+ if (is_state(STATE_INP_PASSIVE))
+ {
+ net().inc_active(*this);
+ set_state(STATE_INP_ACTIVE);
+ }
}
ATTR_HOT inline void netlist_input_t::activate_hl()
{
- if (is_state(STATE_INP_PASSIVE))
- {
- net().inc_active(*this);
- set_state(STATE_INP_HL);
- }
+ if (is_state(STATE_INP_PASSIVE))
+ {
+ net().inc_active(*this);
+ set_state(STATE_INP_HL);
+ }
}
ATTR_HOT inline void netlist_input_t::activate_lh()
{
- if (is_state(STATE_INP_PASSIVE))
- {
- net().inc_active(*this);
- set_state(STATE_INP_LH);
- }
+ if (is_state(STATE_INP_PASSIVE))
+ {
+ net().inc_active(*this);
+ set_state(STATE_INP_LH);
+ }
}
ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time delay)
{
- //if (UNEXPECTED(m_num_cons == 0 || is_queued()))
- if (!is_queued())
- {
- m_time = netlist().time() + delay;
- m_in_queue = (m_active > 0); /* queued ? */
- if (EXPECTED(m_in_queue))
- {
- netlist().push_to_queue(this, m_time);
- }
- }
+ //if (UNEXPECTED(m_num_cons == 0 || is_queued()))
+ if (!is_queued())
+ {
+ m_time = netlist().time() + delay;
+ m_in_queue = (m_active > 0); /* queued ? */
+ if (EXPECTED(m_in_queue))
+ {
+ netlist().push_to_queue(this, m_time);
+ }
+ }
}
ATTR_HOT inline const netlist_sig_t netlist_logic_input_t::Q() const
{
- return net().Q();
+ return net().Q();
}
ATTR_HOT inline const netlist_sig_t netlist_logic_input_t::last_Q() const
{
- return net().last_Q();
+ return net().last_Q();
}
ATTR_HOT inline const double netlist_analog_input_t::Q_Analog() const
{
- return net().Q_Analog();
+ return net().Q_Analog();
}
@@ -1231,71 +1231,71 @@ ATTR_HOT inline const double netlist_analog_input_t::Q_Analog() const
class net_device_t_base_factory
{
- NETLIST_PREVENT_COPYING(net_device_t_base_factory)
+ NETLIST_PREVENT_COPYING(net_device_t_base_factory)
public:
- ATTR_COLD net_device_t_base_factory(const pstring &name, const pstring &classname,
- const pstring &def_param)
- : m_name(name), m_classname(classname), m_def_param(def_param)
- {}
+ ATTR_COLD net_device_t_base_factory(const pstring &name, const pstring &classname,
+ const pstring &def_param)
+ : m_name(name), m_classname(classname), m_def_param(def_param)
+ {}
- ATTR_COLD virtual ~net_device_t_base_factory() {}
+ ATTR_COLD virtual ~net_device_t_base_factory() {}
- ATTR_COLD virtual netlist_device_t *Create() const = 0;
+ ATTR_COLD virtual netlist_device_t *Create() const = 0;
- ATTR_COLD const pstring &name() const { return m_name; }
- ATTR_COLD const pstring &classname() const { return m_classname; }
- ATTR_COLD const pstring &param_desc() const { return m_def_param; }
- ATTR_COLD const nl_util::pstring_list term_param_list();
- ATTR_COLD const nl_util::pstring_list def_params();
+ ATTR_COLD const pstring &name() const { return m_name; }
+ ATTR_COLD const pstring &classname() const { return m_classname; }
+ ATTR_COLD const pstring &param_desc() const { return m_def_param; }
+ ATTR_COLD const nl_util::pstring_list term_param_list();
+ ATTR_COLD const nl_util::pstring_list def_params();
protected:
- pstring m_name; /* device name */
- pstring m_classname; /* device class name */
- pstring m_def_param; /* default parameter */
+ pstring m_name; /* device name */
+ pstring m_classname; /* device class name */
+ pstring m_def_param; /* default parameter */
};
template <class C>
class net_device_t_factory : public net_device_t_base_factory
{
- NETLIST_PREVENT_COPYING(net_device_t_factory)
+ NETLIST_PREVENT_COPYING(net_device_t_factory)
public:
- ATTR_COLD net_device_t_factory(const pstring &name, const pstring &classname,
- const pstring &def_param)
- : net_device_t_base_factory(name, classname, def_param) { }
-
- ATTR_COLD netlist_device_t *Create() const
- {
- netlist_device_t *r = new C();
- //r->init(setup, name);
- return r;
- }
+ ATTR_COLD net_device_t_factory(const pstring &name, const pstring &classname,
+ const pstring &def_param)
+ : net_device_t_base_factory(name, classname, def_param) { }
+
+ ATTR_COLD netlist_device_t *Create() const
+ {
+ netlist_device_t *r = new C();
+ //r->init(setup, name);
+ return r;
+ }
};
class netlist_factory_t
{
public:
- typedef netlist_list_t<net_device_t_base_factory *> list_t;
+ typedef netlist_list_t<net_device_t_base_factory *> list_t;
- ATTR_COLD netlist_factory_t();
- ATTR_COLD ~netlist_factory_t();
+ ATTR_COLD netlist_factory_t();
+ ATTR_COLD ~netlist_factory_t();
- ATTR_COLD void initialize();
+ ATTR_COLD void initialize();
- template<class _C>
- ATTR_COLD void register_device(const pstring &name, const pstring &classname,
- const pstring &def_param)
- {
- m_list.add(new net_device_t_factory< _C >(name, classname, def_param) );
- }
+ template<class _C>
+ ATTR_COLD void register_device(const pstring &name, const pstring &classname,
+ const pstring &def_param)
+ {
+ m_list.add(new net_device_t_factory< _C >(name, classname, def_param) );
+ }
- ATTR_COLD netlist_device_t *new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const;
- ATTR_COLD netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const;
- ATTR_COLD net_device_t_base_factory * factory_by_name(const pstring &name, netlist_setup_t &setup) const;
+ ATTR_COLD netlist_device_t *new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const;
+ ATTR_COLD netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const;
+ ATTR_COLD net_device_t_base_factory * factory_by_name(const pstring &name, netlist_setup_t &setup) const;
- const list_t &list() { return m_list; }
+ const list_t &list() { return m_list; }
private:
- list_t m_list;
+ list_t m_list;
};
diff --git a/src/emu/netlist/nl_dice_compat.h b/src/emu/netlist/nl_dice_compat.h
index c6ea2ef5860..a63ac5b1b9a 100644
--- a/src/emu/netlist/nl_dice_compat.h
+++ b/src/emu/netlist/nl_dice_compat.h
@@ -29,50 +29,50 @@
struct Mono555Desc
{
public:
- double r, c;
+ double r, c;
- Mono555Desc(double res, double cap) : r(res), c(cap) { }
+ Mono555Desc(double res, double cap) : r(res), c(cap) { }
};
struct SeriesRCDesc
{
public:
- double r, c;
+ double r, c;
- SeriesRCDesc(double res, double cap) : r(res), c(cap) { }
+ SeriesRCDesc(double res, double cap) : r(res), c(cap) { }
};
#define CHIP_555_Mono(_name, _pdesc) \
- CHIP(# _name, NE555) \
- NET_C(_name.6, _name.7) \
- RES(_name ## _R, (_pdesc)->r) \
- CAP(_name ## _C, (_pdesc)->c) \
- NET_C(_name.6, _name ## _R.1) \
- NET_C(_name.6, _name ## _C.1) \
- NET_C(_name ## _R.2, V5) \
- NET_CSTR(# _name "_C.2", "GND") \
- NET_C(_name.8, V5) \
- NET_CSTR(# _name ".1", "GND")
+ CHIP(# _name, NE555) \
+ NET_C(_name.6, _name.7) \
+ RES(_name ## _R, (_pdesc)->r) \
+ CAP(_name ## _C, (_pdesc)->c) \
+ NET_C(_name.6, _name ## _R.1) \
+ NET_C(_name.6, _name ## _C.1) \
+ NET_C(_name ## _R.2, V5) \
+ NET_CSTR(# _name "_C.2", "GND") \
+ NET_C(_name.8, V5) \
+ NET_CSTR(# _name ".1", "GND")
#define CHIP_SERIES_RC(_name, _pdesc) \
- RES(_name ## _R, (_pdesc)->r) \
- CAP(_name ## _C, (_pdesc)->c) \
- NET_C(_name ## _R.1, _name ## _C.2) \
- ALIAS(_name.3, _name ## _R.1) \
- ALIAS(_name.2, _name ## _R.2) \
- ALIAS(_name.1, _name ## _C.1)
+ RES(_name ## _R, (_pdesc)->r) \
+ CAP(_name ## _C, (_pdesc)->c) \
+ NET_C(_name ## _R.1, _name ## _C.2) \
+ ALIAS(_name.3, _name ## _R.1) \
+ ALIAS(_name.2, _name ## _R.2) \
+ ALIAS(_name.1, _name ## _C.1)
#define CHIP_INPUT(_name) \
SWITCH2(_name ## _SW) \
- NET_C(_name ## _SW.2, V5) \
- NET_CSTR(# _name "_SW.1", "GND") \
- ALIAS(_name.1, _name ## _SW.Q)
+ NET_C(_name ## _SW.2, V5) \
+ NET_CSTR(# _name "_SW.1", "GND") \
+ ALIAS(_name.1, _name ## _SW.Q)
#define CHIP_LATCH(_name) \
NETDEV_RSFF(_name) \
- ALIAS(_name.1, _name.S) \
- ALIAS(_name.2, _name.R) \
- ALIAS(_name.3, _name.QQ)
+ ALIAS(_name.1, _name.S) \
+ ALIAS(_name.2, _name.R) \
+ ALIAS(_name.3, _name.QQ)
diff --git a/src/emu/netlist/nl_lists.h b/src/emu/netlist/nl_lists.h
index 685081d941a..0de20ea55ab 100644
--- a/src/emu/netlist/nl_lists.h
+++ b/src/emu/netlist/nl_lists.h
@@ -22,133 +22,133 @@ class netlist_list_t
{
public:
- ATTR_COLD netlist_list_t(int numElements = _NumElem)
- {
- m_num_elements = numElements;
- m_list = new _ListClass[m_num_elements];
- m_count = 0;
- }
-
- ATTR_COLD netlist_list_t(const netlist_list_t &rhs)
- {
- m_num_elements = rhs.capacity();
- m_list = new _ListClass[m_num_elements];
- m_count = 0;
- for (int i=0; i<rhs.count(); i++)
- {
- this->add(rhs[i]);
- }
- }
-
- ATTR_COLD netlist_list_t &operator=(const netlist_list_t &rhs)
- {
- this->reset();
- for (int i=0; i<rhs.count(); i++)
- {
- this->add(rhs[i]);
- }
- return *this;
- }
-
-
- ATTR_COLD ~netlist_list_t()
- {
- delete[] m_list;
- }
-
- ATTR_HOT inline void add(const _ListClass &elem)
- {
- if (m_count >= m_num_elements)
- resize(m_num_elements * 2);
-
- m_list[m_count++] = elem;
- }
-
- ATTR_HOT inline void resize(const int new_size)
- {
- int cnt = count();
- _ListClass *m_new = new _ListClass[new_size];
- _ListClass *pd = m_new;
-
- for (_ListClass *ps = m_list; ps < m_list + cnt; ps++, pd++)
- *pd = *ps;
- delete[] m_list;
- m_list = m_new;
- m_count = cnt;
- m_num_elements = new_size;
- }
-
- ATTR_HOT inline void remove(const _ListClass &elem)
- {
- for (int i = 0; i < m_count; i++)
- {
- if (m_list[i] == elem)
- {
- m_count --;
- while (i < m_count)
- {
- m_list[i] = m_list[i+1];
- i++;
- }
- return;
- }
- }
- }
-
- ATTR_HOT inline void remove_at(const int pos)
- {
- assert((pos>=0) && (pos<m_count));
- m_count--;
- for (int i = pos; i < m_count; i++)
- {
- m_list[i] = m_list[i+1];
- }
- }
-
- ATTR_HOT inline bool contains(const _ListClass &elem) const
- {
- for (_ListClass *i = m_list; i < m_list + m_count; i++)
- {
- if (*i == elem)
- return true;
- }
- return false;
- }
-
- ATTR_HOT inline int indexof(const _ListClass &elem) const
- {
- for (int i = 0; i < m_count; i++)
- {
- if (m_list[i] == elem)
- return i;
- }
- return -1;
- }
-
- ATTR_HOT inline const _ListClass *first() const { return ((m_count > 0) ? &m_list[0] : NULL ); }
- ATTR_HOT inline const _ListClass *next(const _ListClass *lc) const { return ((lc < last()) ? lc + 1 : NULL ); }
- ATTR_HOT inline const _ListClass *last() const { return &m_list[m_count -1]; }
- ATTR_HOT inline int count() const { return m_count; }
- ATTR_HOT inline bool empty() const { return (m_count == 0); }
- ATTR_HOT inline void clear() { m_count = 0; }
- ATTR_HOT inline int capacity() const { return m_num_elements; }
-
- ATTR_COLD void clear_and_free()
- {
- for (_ListClass *i = m_list; i < m_list + m_count; i++)
- {
- delete *i;
- }
- clear();
- }
-
- ATTR_HOT inline _ListClass& operator[](const int & index) { return m_list[index]; }
- ATTR_HOT inline const _ListClass& operator[](const int & index) const { return m_list[index]; }
+ ATTR_COLD netlist_list_t(int numElements = _NumElem)
+ {
+ m_num_elements = numElements;
+ m_list = new _ListClass[m_num_elements];
+ m_count = 0;
+ }
+
+ ATTR_COLD netlist_list_t(const netlist_list_t &rhs)
+ {
+ m_num_elements = rhs.capacity();
+ m_list = new _ListClass[m_num_elements];
+ m_count = 0;
+ for (int i=0; i<rhs.count(); i++)
+ {
+ this->add(rhs[i]);
+ }
+ }
+
+ ATTR_COLD netlist_list_t &operator=(const netlist_list_t &rhs)
+ {
+ this->reset();
+ for (int i=0; i<rhs.count(); i++)
+ {
+ this->add(rhs[i]);
+ }
+ return *this;
+ }
+
+
+ ATTR_COLD ~netlist_list_t()
+ {
+ delete[] m_list;
+ }
+
+ ATTR_HOT inline void add(const _ListClass &elem)
+ {
+ if (m_count >= m_num_elements)
+ resize(m_num_elements * 2);
+
+ m_list[m_count++] = elem;
+ }
+
+ ATTR_HOT inline void resize(const int new_size)
+ {
+ int cnt = count();
+ _ListClass *m_new = new _ListClass[new_size];
+ _ListClass *pd = m_new;
+
+ for (_ListClass *ps = m_list; ps < m_list + cnt; ps++, pd++)
+ *pd = *ps;
+ delete[] m_list;
+ m_list = m_new;
+ m_count = cnt;
+ m_num_elements = new_size;
+ }
+
+ ATTR_HOT inline void remove(const _ListClass &elem)
+ {
+ for (int i = 0; i < m_count; i++)
+ {
+ if (m_list[i] == elem)
+ {
+ m_count --;
+ while (i < m_count)
+ {
+ m_list[i] = m_list[i+1];
+ i++;
+ }
+ return;
+ }
+ }
+ }
+
+ ATTR_HOT inline void remove_at(const int pos)
+ {
+ assert((pos>=0) && (pos<m_count));
+ m_count--;
+ for (int i = pos; i < m_count; i++)
+ {
+ m_list[i] = m_list[i+1];
+ }
+ }
+
+ ATTR_HOT inline bool contains(const _ListClass &elem) const
+ {
+ for (_ListClass *i = m_list; i < m_list + m_count; i++)
+ {
+ if (*i == elem)
+ return true;
+ }
+ return false;
+ }
+
+ ATTR_HOT inline int indexof(const _ListClass &elem) const
+ {
+ for (int i = 0; i < m_count; i++)
+ {
+ if (m_list[i] == elem)
+ return i;
+ }
+ return -1;
+ }
+
+ ATTR_HOT inline const _ListClass *first() const { return ((m_count > 0) ? &m_list[0] : NULL ); }
+ ATTR_HOT inline const _ListClass *next(const _ListClass *lc) const { return ((lc < last()) ? lc + 1 : NULL ); }
+ ATTR_HOT inline const _ListClass *last() const { return &m_list[m_count -1]; }
+ ATTR_HOT inline int count() const { return m_count; }
+ ATTR_HOT inline bool empty() const { return (m_count == 0); }
+ ATTR_HOT inline void clear() { m_count = 0; }
+ ATTR_HOT inline int capacity() const { return m_num_elements; }
+
+ ATTR_COLD void clear_and_free()
+ {
+ for (_ListClass *i = m_list; i < m_list + m_count; i++)
+ {
+ delete *i;
+ }
+ clear();
+ }
+
+ ATTR_HOT inline _ListClass& operator[](const int & index) { return m_list[index]; }
+ ATTR_HOT inline const _ListClass& operator[](const int & index) const { return m_list[index]; }
private:
- int m_count;
- _ListClass * m_list;
- int m_num_elements;
+ int m_count;
+ _ListClass * m_list;
+ int m_num_elements;
};
// ----------------------------------------------------------------------------------------
@@ -158,81 +158,81 @@ private:
template <class _Element, class _Time, int _Size>
class netlist_timed_queue
{
- NETLIST_PREVENT_COPYING(netlist_timed_queue)
+ NETLIST_PREVENT_COPYING(netlist_timed_queue)
public:
- class entry_t
- {
- public:
- ATTR_HOT inline entry_t()
- : m_exec_time(), m_object() {}
- ATTR_HOT inline entry_t(const _Time atime, const _Element elem) : m_exec_time(atime), m_object(elem) {}
- ATTR_HOT inline const _Time exec_time() const { return m_exec_time; }
- ATTR_HOT inline const _Element object() const { return m_object; }
-
- private:
- _Time m_exec_time;
- _Element m_object;
- };
-
- netlist_timed_queue()
- {
- //m_list = global_alloc_array(entry_t, SIZE);
- clear();
- }
-
- ATTR_HOT inline int capacity() const { return _Size; }
- ATTR_HOT inline bool is_empty() const { return (m_end == &m_list[0]); }
- ATTR_HOT inline bool is_not_empty() const { return (m_end > &m_list[0]); }
-
- ATTR_HOT ATTR_ALIGN void push(const entry_t &e)
- {
- entry_t * i = m_end++;
- const _Time e_time = e.exec_time();
- while ((i > &m_list[0]) && (e_time > (i - 1)->exec_time()) )
- {
- *(i) = *(i-1);
- i--;
- inc_stat(m_prof_sortmove);
- }
- *i = e;
- inc_stat(m_prof_sort);
- assert(m_end - m_list < _Size);
- }
-
- ATTR_HOT inline const entry_t *pop()
- {
- return --m_end;
- }
-
- ATTR_HOT inline const entry_t *peek() const
- {
- return (m_end-1);
- }
-
- ATTR_COLD void clear()
- {
- m_end = &m_list[0];
- }
-
- // save state support & mame disasm
-
- ATTR_COLD inline const entry_t *listptr() const { return &m_list[0]; }
- ATTR_HOT inline int count() const { return m_end - m_list; }
- ATTR_HOT inline const entry_t & operator[](const int & index) const { return m_list[index]; }
+ class entry_t
+ {
+ public:
+ ATTR_HOT inline entry_t()
+ : m_exec_time(), m_object() {}
+ ATTR_HOT inline entry_t(const _Time atime, const _Element elem) : m_exec_time(atime), m_object(elem) {}
+ ATTR_HOT inline const _Time exec_time() const { return m_exec_time; }
+ ATTR_HOT inline const _Element object() const { return m_object; }
+
+ private:
+ _Time m_exec_time;
+ _Element m_object;
+ };
+
+ netlist_timed_queue()
+ {
+ //m_list = global_alloc_array(entry_t, SIZE);
+ clear();
+ }
+
+ ATTR_HOT inline int capacity() const { return _Size; }
+ ATTR_HOT inline bool is_empty() const { return (m_end == &m_list[0]); }
+ ATTR_HOT inline bool is_not_empty() const { return (m_end > &m_list[0]); }
+
+ ATTR_HOT ATTR_ALIGN void push(const entry_t &e)
+ {
+ entry_t * i = m_end++;
+ const _Time e_time = e.exec_time();
+ while ((i > &m_list[0]) && (e_time > (i - 1)->exec_time()) )
+ {
+ *(i) = *(i-1);
+ i--;
+ inc_stat(m_prof_sortmove);
+ }
+ *i = e;
+ inc_stat(m_prof_sort);
+ assert(m_end - m_list < _Size);
+ }
+
+ ATTR_HOT inline const entry_t *pop()
+ {
+ return --m_end;
+ }
+
+ ATTR_HOT inline const entry_t *peek() const
+ {
+ return (m_end-1);
+ }
+
+ ATTR_COLD void clear()
+ {
+ m_end = &m_list[0];
+ }
+
+ // save state support & mame disasm
+
+ ATTR_COLD inline const entry_t *listptr() const { return &m_list[0]; }
+ ATTR_HOT inline int count() const { return m_end - m_list; }
+ ATTR_HOT inline const entry_t & operator[](const int & index) const { return m_list[index]; }
#if (NL_KEEP_STATISTICS)
- // profiling
- INT32 m_prof_start;
- INT32 m_prof_end;
- INT32 m_prof_sortmove;
- INT32 m_prof_sort;
+ // profiling
+ INT32 m_prof_start;
+ INT32 m_prof_end;
+ INT32 m_prof_sortmove;
+ INT32 m_prof_sort;
#endif
private:
- entry_t * m_end;
- entry_t m_list[_Size];
+ entry_t * m_end;
+ entry_t m_list[_Size];
};
@@ -246,58 +246,58 @@ class netlist_stack_t
{
public:
- ATTR_COLD netlist_stack_t(int numElements = _NumElem)
- : m_list(numElements)
- {
- }
-
- ATTR_COLD netlist_stack_t(const netlist_stack_t &rhs)
- : m_list(rhs.m_list)
- {
- }
-
- ATTR_COLD netlist_stack_t &operator=(const netlist_stack_t &rhs)
- {
- m_list = rhs.m_list;
- return *this;
- }
-
-
- ATTR_COLD ~netlist_stack_t()
- {
- }
-
- ATTR_HOT inline void push(const _StackClass &elem)
- {
- m_list.add(elem);
- }
-
- ATTR_HOT inline _StackClass peek() const
- {
- return m_list[m_list.count() - 1];
- }
-
- ATTR_HOT inline _StackClass pop()
- {
- _StackClass ret = peek();
- m_list.remove_at(m_list.count() - 1);
- return ret;
- }
-
- ATTR_HOT inline int count() const { return m_list.count(); }
- ATTR_HOT inline bool empty() const { return (m_list.count() == 0); }
- ATTR_HOT inline void reset() { m_list.reset(); }
- ATTR_HOT inline int capacity() const { return m_list.capacity(); }
+ ATTR_COLD netlist_stack_t(int numElements = _NumElem)
+ : m_list(numElements)
+ {
+ }
+
+ ATTR_COLD netlist_stack_t(const netlist_stack_t &rhs)
+ : m_list(rhs.m_list)
+ {
+ }
+
+ ATTR_COLD netlist_stack_t &operator=(const netlist_stack_t &rhs)
+ {
+ m_list = rhs.m_list;
+ return *this;
+ }
+
+
+ ATTR_COLD ~netlist_stack_t()
+ {
+ }
+
+ ATTR_HOT inline void push(const _StackClass &elem)
+ {
+ m_list.add(elem);
+ }
+
+ ATTR_HOT inline _StackClass peek() const
+ {
+ return m_list[m_list.count() - 1];
+ }
+
+ ATTR_HOT inline _StackClass pop()
+ {
+ _StackClass ret = peek();
+ m_list.remove_at(m_list.count() - 1);
+ return ret;
+ }
+
+ ATTR_HOT inline int count() const { return m_list.count(); }
+ ATTR_HOT inline bool empty() const { return (m_list.count() == 0); }
+ ATTR_HOT inline void reset() { m_list.reset(); }
+ ATTR_HOT inline int capacity() const { return m_list.capacity(); }
private:
- netlist_list_t<_StackClass, _NumElem> m_list;
+ netlist_list_t<_StackClass, _NumElem> m_list;
};
template <class _ListClass>
struct plinked_list_element
{
- plinked_list_element() : m_next(NULL) {}
- _ListClass * m_next;
+ plinked_list_element() : m_next(NULL) {}
+ _ListClass * m_next;
};
@@ -306,69 +306,69 @@ class plinked_list
{
public:
- plinked_list() : m_head(NULL) {}
-
- ATTR_HOT inline void insert(const _ListClass &before, _ListClass &elem)
- {
- if (m_head == &before)
- {
- elem.m_next = m_head;
- m_head = elem;
- }
- else
- {
- _ListClass *p = m_head;
- while (p != NULL)
- {
- if (p->m_next == &before)
- {
- elem->m_next = &before;
- p->m_next = &elem;
- return;
- }
- p = p->m_next;
- }
- assert_always(false, "element not found");
- }
- }
-
- ATTR_HOT inline void insert(_ListClass &elem)
- {
- elem.m_next = m_head;
- m_head = &elem;
- }
-
- ATTR_HOT inline void add(_ListClass &elem)
- {
- _ListClass **p = &m_head;
- while (*p != NULL)
- {
- p = &((*p)->m_next);
- }
- *p = &elem;
- elem.m_next = NULL;
- }
-
- ATTR_HOT inline void remove(const _ListClass &elem)
- {
- _ListClass **p = &m_head;
- while (*p != &elem)
- {
- assert(*p != NULL);
- p = &((*p)->m_next);
- }
- (*p) = elem.m_next;
- }
-
-
- ATTR_HOT static inline _ListClass *next(const _ListClass &elem) { return elem.m_next; }
- ATTR_HOT static inline _ListClass *next(const _ListClass *elem) { return elem->m_next; }
- ATTR_HOT inline _ListClass *first() const { return m_head; }
- ATTR_HOT inline void clear() { m_head = NULL; }
- ATTR_HOT inline bool is_empty() const { return (m_head == NULL); }
+ plinked_list() : m_head(NULL) {}
+
+ ATTR_HOT inline void insert(const _ListClass &before, _ListClass &elem)
+ {
+ if (m_head == &before)
+ {
+ elem.m_next = m_head;
+ m_head = elem;
+ }
+ else
+ {
+ _ListClass *p = m_head;
+ while (p != NULL)
+ {
+ if (p->m_next == &before)
+ {
+ elem->m_next = &before;
+ p->m_next = &elem;
+ return;
+ }
+ p = p->m_next;
+ }
+ assert_always(false, "element not found");
+ }
+ }
+
+ ATTR_HOT inline void insert(_ListClass &elem)
+ {
+ elem.m_next = m_head;
+ m_head = &elem;
+ }
+
+ ATTR_HOT inline void add(_ListClass &elem)
+ {
+ _ListClass **p = &m_head;
+ while (*p != NULL)
+ {
+ p = &((*p)->m_next);
+ }
+ *p = &elem;
+ elem.m_next = NULL;
+ }
+
+ ATTR_HOT inline void remove(const _ListClass &elem)
+ {
+ _ListClass **p = &m_head;
+ while (*p != &elem)
+ {
+ assert(*p != NULL);
+ p = &((*p)->m_next);
+ }
+ (*p) = elem.m_next;
+ }
+
+
+ ATTR_HOT static inline _ListClass *next(const _ListClass &elem) { return elem.m_next; }
+ ATTR_HOT static inline _ListClass *next(const _ListClass *elem) { return elem->m_next; }
+ ATTR_HOT inline _ListClass *first() const { return m_head; }
+ ATTR_HOT inline void clear() { m_head = NULL; }
+ ATTR_HOT inline bool is_empty() const { return (m_head == NULL); }
private:
- _ListClass *m_head;
+ _ListClass *m_head;
};
#endif /* NLLISTS_H_ */
diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c
index e28d43901c2..06017975824 100644
--- a/src/emu/netlist/nl_parser.c
+++ b/src/emu/netlist/nl_parser.c
@@ -16,189 +16,189 @@
pstring ptokenizer::currentline_str()
{
- char buf[300];
- int bufp = 0;
- const char *p = m_line_ptr;
- while (*p && *p != 10)
- buf[bufp++] = *p++;
- buf[bufp] = 0;
- return pstring(buf);
+ char buf[300];
+ int bufp = 0;
+ const char *p = m_line_ptr;
+ while (*p && *p != 10)
+ buf[bufp++] = *p++;
+ buf[bufp] = 0;
+ return pstring(buf);
}
void ptokenizer::skipeol()
{
- char c = getc();
- while (c)
- {
- if (c == 10)
- {
- c = getc();
- if (c != 13)
- ungetc();
- return;
- }
- c = getc();
- }
+ char c = getc();
+ while (c)
+ {
+ if (c == 10)
+ {
+ c = getc();
+ if (c != 13)
+ ungetc();
+ return;
+ }
+ c = getc();
+ }
}
unsigned char ptokenizer::getc()
{
- if (*m_px == 10)
- {
- m_line++;
- m_line_ptr = m_px + 1;
- }
- if (*m_px)
- return *(m_px++);
- else
- return *m_px;
+ if (*m_px == 10)
+ {
+ m_line++;
+ m_line_ptr = m_px + 1;
+ }
+ if (*m_px)
+ return *(m_px++);
+ else
+ return *m_px;
}
void ptokenizer::ungetc()
{
- m_px--;
+ m_px--;
}
void ptokenizer::require_token(const token_id_t &token_num)
{
- require_token(get_token(), token_num);
+ require_token(get_token(), token_num);
}
void ptokenizer::require_token(const token_t tok, const token_id_t &token_num)
{
- if (!tok.is(token_num))
- {
- error("Error: expected token <%s> got <%s>\n", m_tokens[token_num.id()].cstr(), tok.str().cstr());
- }
+ if (!tok.is(token_num))
+ {
+ error("Error: expected token <%s> got <%s>\n", m_tokens[token_num.id()].cstr(), tok.str().cstr());
+ }
}
pstring ptokenizer::get_string()
{
- token_t tok = get_token();
- if (!tok.is_type(STRING))
- {
- error("Error: expected a string, got <%s>\n", tok.str().cstr());
- }
- return tok.str();
+ token_t tok = get_token();
+ if (!tok.is_type(STRING))
+ {
+ error("Error: expected a string, got <%s>\n", tok.str().cstr());
+ }
+ return tok.str();
}
pstring ptokenizer::get_identifier()
{
- token_t tok = get_token();
- if (!tok.is_type(IDENTIFIER))
- {
- error("Error: expected an identifier, got <%s>\n", tok.str().cstr());
- }
- return tok.str();
+ token_t tok = get_token();
+ if (!tok.is_type(IDENTIFIER))
+ {
+ error("Error: expected an identifier, got <%s>\n", tok.str().cstr());
+ }
+ return tok.str();
}
ptokenizer::token_t ptokenizer::get_token()
{
- while (true)
- {
- token_t ret = get_token_internal();
- if (ret.is_type(ENDOFFILE))
- return ret;
-
- if (ret.is(m_tok_comment_start))
- {
- do {
- ret = get_token_internal();
- } while (ret.is_not(m_tok_comment_end));
- }
- else if (ret.is(m_tok_line_comment))
- {
- skipeol();
- }
- else if (ret.str() == "#")
- {
- skipeol();
- }
- else
- return ret;
- }
+ while (true)
+ {
+ token_t ret = get_token_internal();
+ if (ret.is_type(ENDOFFILE))
+ return ret;
+
+ if (ret.is(m_tok_comment_start))
+ {
+ do {
+ ret = get_token_internal();
+ } while (ret.is_not(m_tok_comment_end));
+ }
+ else if (ret.is(m_tok_line_comment))
+ {
+ skipeol();
+ }
+ else if (ret.str() == "#")
+ {
+ skipeol();
+ }
+ else
+ return ret;
+ }
}
ptokenizer::token_t ptokenizer::get_token_internal()
{
- /* skip ws */
- char c = getc();
- while (m_whitespace.find(c)>=0)
- {
- c = getc();
- if (eof())
- {
- return token_t(ENDOFFILE);
- }
- }
- if (m_identifier_chars.find(c)>=0)
- {
- /* read identifier till non identifier char */
- pstring tokstr = "";
- while (m_identifier_chars.find(c)>=0) {
- tokstr += c;
- c = getc();
- }
- ungetc();
- token_id_t id = token_id_t(m_tokens.indexof(tokstr));
- if (id.id() >= 0)
- return token_t(id, tokstr);
- else
- {
- return token_t(IDENTIFIER, tokstr);
- }
- }
- else if (c == m_string)
- {
- pstring tokstr = "";
- c = getc();
- while (c != m_string)
- {
- tokstr += c;
- c = getc();
- }
- return token_t(STRING, tokstr);
- }
- else
- {
- /* read identifier till first identifier char or ws */
- pstring tokstr = "";
- while ((m_identifier_chars.find(c)) < 0 && (m_whitespace.find(c) < 0)) {
- tokstr += c;
- /* expensive, check for single char tokens */
- if (tokstr.len() == 1)
- {
- token_id_t id = token_id_t(m_tokens.indexof(tokstr));
- if (id.id() >= 0)
- return token_t(id, tokstr);
- }
- c = getc();
- }
- ungetc();
- token_id_t id = token_id_t(m_tokens.indexof(tokstr));
- if (id.id() >= 0)
- return token_t(id, tokstr);
- else
- {
- return token_t(UNKNOWN, tokstr);
- }
- }
+ /* skip ws */
+ char c = getc();
+ while (m_whitespace.find(c)>=0)
+ {
+ c = getc();
+ if (eof())
+ {
+ return token_t(ENDOFFILE);
+ }
+ }
+ if (m_identifier_chars.find(c)>=0)
+ {
+ /* read identifier till non identifier char */
+ pstring tokstr = "";
+ while (m_identifier_chars.find(c)>=0) {
+ tokstr += c;
+ c = getc();
+ }
+ ungetc();
+ token_id_t id = token_id_t(m_tokens.indexof(tokstr));
+ if (id.id() >= 0)
+ return token_t(id, tokstr);
+ else
+ {
+ return token_t(IDENTIFIER, tokstr);
+ }
+ }
+ else if (c == m_string)
+ {
+ pstring tokstr = "";
+ c = getc();
+ while (c != m_string)
+ {
+ tokstr += c;
+ c = getc();
+ }
+ return token_t(STRING, tokstr);
+ }
+ else
+ {
+ /* read identifier till first identifier char or ws */
+ pstring tokstr = "";
+ while ((m_identifier_chars.find(c)) < 0 && (m_whitespace.find(c) < 0)) {
+ tokstr += c;
+ /* expensive, check for single char tokens */
+ if (tokstr.len() == 1)
+ {
+ token_id_t id = token_id_t(m_tokens.indexof(tokstr));
+ if (id.id() >= 0)
+ return token_t(id, tokstr);
+ }
+ c = getc();
+ }
+ ungetc();
+ token_id_t id = token_id_t(m_tokens.indexof(tokstr));
+ if (id.id() >= 0)
+ return token_t(id, tokstr);
+ else
+ {
+ return token_t(UNKNOWN, tokstr);
+ }
+ }
}
ATTR_COLD void ptokenizer::error(const char *format, ...)
{
- va_list ap;
- va_start(ap, format);
+ va_list ap;
+ va_start(ap, format);
- pstring errmsg1 =pstring(format).vprintf(ap);
- va_end(ap);
+ pstring errmsg1 =pstring(format).vprintf(ap);
+ va_end(ap);
- verror(errmsg1, currentline_no(), currentline_str());
+ verror(errmsg1, currentline_no(), currentline_str());
- //throw error;
+ //throw error;
}
// ----------------------------------------------------------------------------------------
@@ -207,160 +207,159 @@ ATTR_COLD void ptokenizer::error(const char *format, ...)
ATTR_COLD void netlist_parser::verror(pstring msg, int line_num, pstring line)
{
- m_setup.netlist().error("line %d: error: %s\n\t\t%s\n", line_num,
- msg.cstr(), line.cstr());
+ m_setup.netlist().error("line %d: error: %s\n\t\t%s\n", line_num,
+ msg.cstr(), line.cstr());
- //throw error;
+ //throw error;
}
bool netlist_parser::parse(const char *buf, const pstring nlname)
{
- m_buf = buf;
-
- reset(buf);
- set_identifier_chars("abcdefghijklmnopqrstuvwvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-");
- set_number_chars("01234567890eE-."); //FIXME: processing of numbers
- char ws[5];
- ws[0] = ' ';
- ws[1] = 9;
- ws[2] = 10;
- ws[3] = 13;
- ws[4] = 0;
- set_whitespace(ws);
- set_comment("/*", "*/", "//");
- m_tok_param_left = register_token("(");
- m_tok_param_right = register_token(")");
- m_tok_comma = register_token(",");
-
- m_tok_ALIAS = register_token("ALIAS");
- m_tok_NET_C = register_token("NET_C");
- m_tok_PARAM = register_token("PARAM");
- m_tok_NET_MODEL = register_token("NET_MODEL");
- m_tok_INCLUDE = register_token("INCLUDE");
- m_tok_SUBMODEL = register_token("SUBMODEL");
- m_tok_NETLIST_START = register_token("NETLIST_START");
- m_tok_NETLIST_END = register_token("NETLIST_END");
-
- bool in_nl = false;
-
- while (true)
+ m_buf = buf;
+
+ reset(buf);
+ set_identifier_chars("abcdefghijklmnopqrstuvwvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-");
+ set_number_chars("01234567890eE-."); //FIXME: processing of numbers
+ char ws[5];
+ ws[0] = ' ';
+ ws[1] = 9;
+ ws[2] = 10;
+ ws[3] = 13;
+ ws[4] = 0;
+ set_whitespace(ws);
+ set_comment("/*", "*/", "//");
+ m_tok_param_left = register_token("(");
+ m_tok_param_right = register_token(")");
+ m_tok_comma = register_token(",");
+
+ m_tok_ALIAS = register_token("ALIAS");
+ m_tok_NET_C = register_token("NET_C");
+ m_tok_PARAM = register_token("PARAM");
+ m_tok_NET_MODEL = register_token("NET_MODEL");
+ m_tok_INCLUDE = register_token("INCLUDE");
+ m_tok_SUBMODEL = register_token("SUBMODEL");
+ m_tok_NETLIST_START = register_token("NETLIST_START");
+ m_tok_NETLIST_END = register_token("NETLIST_END");
+
+ bool in_nl = false;
+
+ while (true)
{
- token_t token = get_token();
-
- if (token.is_type(ENDOFFILE))
- {
- return false;
- //error("EOF while searching for <%s>", nlname.cstr());
- }
-
- if (token.is(m_tok_NETLIST_END))
- {
- require_token(m_tok_param_left);
- if (!in_nl)
- error("Unexpected NETLIST_END");
- else
- {
- in_nl = false;
- }
- require_token(m_tok_param_right);
- }
- else if (token.is(m_tok_NETLIST_START))
- {
- if (in_nl)
- error("Unexpected NETLIST_START");
- require_token(m_tok_param_left);
- token_t name = get_token();
- require_token(m_tok_param_right);
- if (name.str() == nlname || nlname == "")
- {
- parse_netlist(name.str());
- return true;
- } else
- in_nl = true;
- }
+ token_t token = get_token();
+
+ if (token.is_type(ENDOFFILE))
+ {
+ return false;
+ //error("EOF while searching for <%s>", nlname.cstr());
+ }
+
+ if (token.is(m_tok_NETLIST_END))
+ {
+ require_token(m_tok_param_left);
+ if (!in_nl)
+ error("Unexpected NETLIST_END");
+ else
+ {
+ in_nl = false;
+ }
+ require_token(m_tok_param_right);
+ }
+ else if (token.is(m_tok_NETLIST_START))
+ {
+ if (in_nl)
+ error("Unexpected NETLIST_START");
+ require_token(m_tok_param_left);
+ token_t name = get_token();
+ require_token(m_tok_param_right);
+ if (name.str() == nlname || nlname == "")
+ {
+ parse_netlist(name.str());
+ return true;
+ } else
+ in_nl = true;
+ }
}
}
void netlist_parser::parse_netlist(const pstring &nlname)
{
-
- while (true)
- {
- token_t token = get_token();
-
- if (token.is_type(ENDOFFILE))
- return;
-
- require_token(m_tok_param_left);
- NL_VERBOSE_OUT(("Parser: Device: %s\n", token.str().cstr()));
-
- if (token.is(m_tok_ALIAS))
- net_alias();
- else if (token.is(m_tok_NET_C))
- net_c();
- else if (token.is(m_tok_PARAM))
- netdev_param();
- else if (token.is(m_tok_NET_MODEL))
- net_model();
- else if (token.is(m_tok_SUBMODEL))
- net_submodel();
- else if (token.is(m_tok_INCLUDE))
- net_include();
- else if (token.is(m_tok_NETLIST_END))
- {
- netdev_netlist_end();
- return;
- }
- else
- device(token.str());
- }
+ while (true)
+ {
+ token_t token = get_token();
+
+ if (token.is_type(ENDOFFILE))
+ return;
+
+ require_token(m_tok_param_left);
+ NL_VERBOSE_OUT(("Parser: Device: %s\n", token.str().cstr()));
+
+ if (token.is(m_tok_ALIAS))
+ net_alias();
+ else if (token.is(m_tok_NET_C))
+ net_c();
+ else if (token.is(m_tok_PARAM))
+ netdev_param();
+ else if (token.is(m_tok_NET_MODEL))
+ net_model();
+ else if (token.is(m_tok_SUBMODEL))
+ net_submodel();
+ else if (token.is(m_tok_INCLUDE))
+ net_include();
+ else if (token.is(m_tok_NETLIST_END))
+ {
+ netdev_netlist_end();
+ return;
+ }
+ else
+ device(token.str());
+ }
}
void netlist_parser::netdev_netlist_start()
{
- // don't do much
- token_t name = get_token();
- require_token(m_tok_param_right);
+ // don't do much
+ token_t name = get_token();
+ require_token(m_tok_param_right);
}
void netlist_parser::netdev_netlist_end()
{
- // don't do much
- require_token(m_tok_param_right);
+ // don't do much
+ require_token(m_tok_param_right);
}
void netlist_parser::net_model()
{
- // don't do much
- pstring model = get_string();
- m_setup.register_model(model);
- require_token(m_tok_param_right);
+ // don't do much
+ pstring model = get_string();
+ m_setup.register_model(model);
+ require_token(m_tok_param_right);
}
void netlist_parser::net_submodel()
{
- // don't do much
- pstring name = get_identifier();
- require_token(m_tok_comma);
- pstring model = get_identifier();
- require_token(m_tok_param_right);
-
- m_setup.namespace_push(name);
- netlist_parser subparser(m_setup);
- subparser.parse(m_buf, model);
- m_setup.namespace_pop();
+ // don't do much
+ pstring name = get_identifier();
+ require_token(m_tok_comma);
+ pstring model = get_identifier();
+ require_token(m_tok_param_right);
+
+ m_setup.namespace_push(name);
+ netlist_parser subparser(m_setup);
+ subparser.parse(m_buf, model);
+ m_setup.namespace_pop();
}
void netlist_parser::net_include()
{
- // don't do much
- pstring name = get_identifier();
- require_token(m_tok_param_right);
+ // don't do much
+ pstring name = get_identifier();
+ require_token(m_tok_param_right);
- netlist_parser subparser(m_setup);
- subparser.parse(m_buf, name);
+ netlist_parser subparser(m_setup);
+ subparser.parse(m_buf, name);
}
void netlist_parser::net_alias()
@@ -380,18 +379,18 @@ void netlist_parser::net_alias()
void netlist_parser::net_c()
{
pstring last = get_identifier();
- require_token(m_tok_comma);
+ require_token(m_tok_comma);
while (true)
{
- pstring t1 = get_identifier();
- m_setup.register_link(last , t1);
- token_t n = get_token();
- if (n.is(m_tok_param_right))
- break;
- if (!n.is(m_tok_comma))
- error("expected a comma, found <%s>", n.str().cstr());
- last = t1;
+ pstring t1 = get_identifier();
+ m_setup.register_link(last , t1);
+ token_t n = get_token();
+ if (n.is(m_tok_param_right))
+ break;
+ if (!n.is(m_tok_comma))
+ error("expected a comma, found <%s>", n.str().cstr());
+ last = t1;
}
NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", t1.cstr(), t2.cstr()));
@@ -406,7 +405,7 @@ void netlist_parser::netdev_param()
val = eval_param(get_token());
NL_VERBOSE_OUT(("Parser: Param: %s %f\n", param.cstr(), val));
m_setup.register_param(param, val);
- require_token(m_tok_param_right);
+ require_token(m_tok_param_right);
}
void netlist_parser::device(const pstring &dev_type)
@@ -427,25 +426,25 @@ void netlist_parser::device(const pstring &dev_type)
NL_VERBOSE_OUT(("Parser: IC: %s\n", devname.cstr()));
- cnt = 0;
- while (cnt < def_params.count())
- {
- pstring paramfq = devname + "." + def_params[cnt];
-
- NL_VERBOSE_OUT(("Defparam: %s\n", paramfq.cstr()));
- require_token(m_tok_comma);
- tok = get_token();
- if (tok.is_type(STRING))
- {
- m_setup.register_param(paramfq, tok.str());
- }
- else
- {
- double val = eval_param(tok);
- m_setup.register_param(paramfq, val);
- }
- cnt++;
- }
+ cnt = 0;
+ while (cnt < def_params.count())
+ {
+ pstring paramfq = devname + "." + def_params[cnt];
+
+ NL_VERBOSE_OUT(("Defparam: %s\n", paramfq.cstr()));
+ require_token(m_tok_comma);
+ tok = get_token();
+ if (tok.is_type(STRING))
+ {
+ m_setup.register_param(paramfq, tok.str());
+ }
+ else
+ {
+ double val = eval_param(tok);
+ m_setup.register_param(paramfq, val);
+ }
+ cnt++;
+ }
tok = get_token();
cnt = 0;
@@ -456,11 +455,11 @@ void netlist_parser::device(const pstring &dev_type)
m_setup.register_link(devname + "." + termlist[cnt], output_name);
cnt++;
- tok = get_token();
+ tok = get_token();
}
- if (cnt != termlist.count())
- fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), termlist.count(), cnt);
- require_token(tok, m_tok_param_right);
+ if (cnt != termlist.count())
+ fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), termlist.count(), cnt);
+ require_token(tok, m_tok_param_right);
}
@@ -483,20 +482,19 @@ double netlist_parser::eval_param(const token_t tok)
for (i=1; i<6;i++)
if (tok.str().equals(macs[i]))
f = i;
- if (f>0)
- {
- require_token(m_tok_param_left);
- val = get_identifier();
- }
- else
- val = tok.str();
+ if (f>0)
+ {
+ require_token(m_tok_param_left);
+ val = get_identifier();
+ }
+ else
+ val = tok.str();
- ret = val.as_double(&e);
+ ret = val.as_double(&e);
- if (e)
+ if (e)
error("Error with parameter ...\n");
if (f>0)
- require_token(m_tok_param_right);
+ require_token(m_tok_param_right);
return ret * facs[f];
}
-
diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h
index 1f0905bfbdf..c9e0608d4ba 100644
--- a/src/emu/netlist/nl_parser.h
+++ b/src/emu/netlist/nl_parser.h
@@ -12,129 +12,129 @@
class ptokenizer
{
- NETLIST_PREVENT_COPYING(ptokenizer)
+ NETLIST_PREVENT_COPYING(ptokenizer)
public:
- virtual ~ptokenizer() {}
-
- ptokenizer()
- : m_line(1), m_line_ptr(NULL), m_px(NULL)
- {}
-
- enum token_type
- {
- IDENTIFIER,
- NUMBER,
- TOKEN,
- STRING,
- COMMENT,
- UNKNOWN,
- ENDOFFILE,
- };
-
- struct token_id_t
- {
- public:
- token_id_t() : m_id(-2) {}
- token_id_t(const int id) : m_id(id) {}
- const int id() const { return m_id; }
- private:
- int m_id;
- };
-
- struct token_t
- {
- token_t() {};
- token_t(token_type type)
- {
- m_type = type;
- m_id = token_id_t(-1);
- m_token ="";
- }
- token_t(token_type type, const pstring str)
- {
- m_type = type;
- m_id = token_id_t(-1);
- m_token = str;
- }
- token_t(const token_id_t id, const pstring str)
- {
- m_type = TOKEN;
- m_id = id;
- m_token = str;
- }
-
- bool is(const token_id_t &tok_id) const { return m_id.id() == tok_id.id(); }
- bool is_not(const token_id_t &tok_id) const { return !is(tok_id); }
-
- bool is_type(const token_type type) const { return m_type == type; }
-
- pstring str() const { return m_token; }
-
- private:
- token_type m_type;
- token_id_t m_id;
- pstring m_token;
- };
-
-
- int currentline_no() { return m_line; }
- pstring currentline_str();
-
- /* tokenizer stuff follows ... */
-
- token_t get_token();
- pstring get_string();
- pstring get_identifier();
-
- void require_token(const token_id_t &token_num);
- void require_token(const token_t tok, const token_id_t &token_num);
-
- token_id_t register_token(pstring token)
- {
- m_tokens.add(token);
- return token_id_t(m_tokens.count() - 1);
- }
-
- void set_identifier_chars(pstring s) { m_identifier_chars = s; }
- void set_number_chars(pstring s) { m_number_chars = s; }
- void set_whitespace(pstring s) { m_whitespace = s; }
- void set_comment(pstring start, pstring end, pstring line)
- {
- m_tok_comment_start = register_token(start);
- m_tok_comment_end = register_token(end);
- m_tok_line_comment = register_token(line);
- m_string = '"';
- }
-
- token_t get_token_internal();
- void error(const char *format, ...) ATTR_PRINTF(2,3);
+ virtual ~ptokenizer() {}
+
+ ptokenizer()
+ : m_line(1), m_line_ptr(NULL), m_px(NULL)
+ {}
+
+ enum token_type
+ {
+ IDENTIFIER,
+ NUMBER,
+ TOKEN,
+ STRING,
+ COMMENT,
+ UNKNOWN,
+ ENDOFFILE,
+ };
+
+ struct token_id_t
+ {
+ public:
+ token_id_t() : m_id(-2) {}
+ token_id_t(const int id) : m_id(id) {}
+ const int id() const { return m_id; }
+ private:
+ int m_id;
+ };
+
+ struct token_t
+ {
+ token_t() {};
+ token_t(token_type type)
+ {
+ m_type = type;
+ m_id = token_id_t(-1);
+ m_token ="";
+ }
+ token_t(token_type type, const pstring str)
+ {
+ m_type = type;
+ m_id = token_id_t(-1);
+ m_token = str;
+ }
+ token_t(const token_id_t id, const pstring str)
+ {
+ m_type = TOKEN;
+ m_id = id;
+ m_token = str;
+ }
+
+ bool is(const token_id_t &tok_id) const { return m_id.id() == tok_id.id(); }
+ bool is_not(const token_id_t &tok_id) const { return !is(tok_id); }
+
+ bool is_type(const token_type type) const { return m_type == type; }
+
+ pstring str() const { return m_token; }
+
+ private:
+ token_type m_type;
+ token_id_t m_id;
+ pstring m_token;
+ };
+
+
+ int currentline_no() { return m_line; }
+ pstring currentline_str();
+
+ /* tokenizer stuff follows ... */
+
+ token_t get_token();
+ pstring get_string();
+ pstring get_identifier();
+
+ void require_token(const token_id_t &token_num);
+ void require_token(const token_t tok, const token_id_t &token_num);
+
+ token_id_t register_token(pstring token)
+ {
+ m_tokens.add(token);
+ return token_id_t(m_tokens.count() - 1);
+ }
+
+ void set_identifier_chars(pstring s) { m_identifier_chars = s; }
+ void set_number_chars(pstring s) { m_number_chars = s; }
+ void set_whitespace(pstring s) { m_whitespace = s; }
+ void set_comment(pstring start, pstring end, pstring line)
+ {
+ m_tok_comment_start = register_token(start);
+ m_tok_comment_end = register_token(end);
+ m_tok_line_comment = register_token(line);
+ m_string = '"';
+ }
+
+ token_t get_token_internal();
+ void error(const char *format, ...) ATTR_PRINTF(2,3);
protected:
- void reset(const char *p) { m_px = p; m_line = 1; m_line_ptr = p; }
- virtual void verror(pstring msg, int line_num, pstring line) = 0;
+ void reset(const char *p) { m_px = p; m_line = 1; m_line_ptr = p; }
+ virtual void verror(pstring msg, int line_num, pstring line) = 0;
private:
- void skipeol();
+ void skipeol();
- unsigned char getc();
- void ungetc();
- bool eof() { return *m_px == 0; }
+ unsigned char getc();
+ void ungetc();
+ bool eof() { return *m_px == 0; }
- int m_line;
- const char * m_line_ptr;
- const char * m_px;
+ int m_line;
+ const char * m_line_ptr;
+ const char * m_px;
- /* tokenizer stuff follows ... */
+ /* tokenizer stuff follows ... */
- pstring m_identifier_chars;
- pstring m_number_chars;
- netlist_list_t<pstring> m_tokens;
- pstring m_whitespace;
- char m_string;
+ pstring m_identifier_chars;
+ pstring m_number_chars;
+ netlist_list_t<pstring> m_tokens;
+ pstring m_whitespace;
+ char m_string;
- token_id_t m_tok_comment_start;
- token_id_t m_tok_comment_end;
- token_id_t m_tok_line_comment;
+ token_id_t m_tok_comment_start;
+ token_id_t m_tok_comment_end;
+ token_id_t m_tok_line_comment;
};
class netlist_parser : public ptokenizer
@@ -146,131 +146,131 @@ public:
bool parse(const char *buf, const pstring nlname = "");
- void parse_netlist(const pstring &nlname);
+ void parse_netlist(const pstring &nlname);
void net_alias();
void netdev_param();
void net_c();
void device(const pstring &dev_type);
- void netdev_netlist_start();
- void netdev_netlist_end();
- void net_model();
- void net_submodel();
- void net_include();
+ void netdev_netlist_start();
+ void netdev_netlist_end();
+ void net_model();
+ void net_submodel();
+ void net_include();
protected:
- virtual void verror(pstring msg, int line_num, pstring line);
+ virtual void verror(pstring msg, int line_num, pstring line);
private:
- double eval_param(const token_t tok);
+ double eval_param(const token_t tok);
- token_id_t m_tok_param_left;
- token_id_t m_tok_param_right;
- token_id_t m_tok_comma;
- token_id_t m_tok_ALIAS;
- token_id_t m_tok_NET_C;
- token_id_t m_tok_PARAM;
- token_id_t m_tok_NET_MODEL;
- token_id_t m_tok_NETLIST_START;
- token_id_t m_tok_NETLIST_END;
- token_id_t m_tok_SUBMODEL;
- token_id_t m_tok_INCLUDE;
+ token_id_t m_tok_param_left;
+ token_id_t m_tok_param_right;
+ token_id_t m_tok_comma;
+ token_id_t m_tok_ALIAS;
+ token_id_t m_tok_NET_C;
+ token_id_t m_tok_PARAM;
+ token_id_t m_tok_NET_MODEL;
+ token_id_t m_tok_NETLIST_START;
+ token_id_t m_tok_NETLIST_END;
+ token_id_t m_tok_SUBMODEL;
+ token_id_t m_tok_INCLUDE;
- netlist_setup_t &m_setup;
+ netlist_setup_t &m_setup;
- const char *m_buf;
+ const char *m_buf;
};
class netlist_source_t
{
public:
- typedef netlist_list_t<netlist_source_t> list_t;
-
- enum source_e
- {
- EMPTY,
- STRING,
- PROC,
- MEMORY
- };
-
- netlist_source_t()
- : m_type(EMPTY),
- m_setup_func(NULL),
- m_setup_func_name(""),
- m_mem(NULL)
- {
- }
-
- netlist_source_t(pstring name, void (*setup_func)(netlist_setup_t &))
- : m_type(PROC),
- m_setup_func(setup_func),
- m_setup_func_name(name),
- m_mem(NULL)
- {
- }
-
- netlist_source_t(const char *mem)
- : m_type(MEMORY),
- m_setup_func(NULL),
- m_setup_func_name(""),
- m_mem(mem)
- {
- }
-
- ~netlist_source_t() { }
-
- bool parse(netlist_setup_t &setup, const pstring name)
- {
- switch (m_type)
- {
- case PROC:
- if (name == m_setup_func_name)
- {
- m_setup_func(setup);
- return true;
- }
- break;
- case MEMORY:
- {
- netlist_parser p(setup);
- return p.parse(m_mem, name);
- }
- break;
- case STRING:
- case EMPTY:
- break;
- }
- return false;
- }
+ typedef netlist_list_t<netlist_source_t> list_t;
+
+ enum source_e
+ {
+ EMPTY,
+ STRING,
+ PROC,
+ MEMORY
+ };
+
+ netlist_source_t()
+ : m_type(EMPTY),
+ m_setup_func(NULL),
+ m_setup_func_name(""),
+ m_mem(NULL)
+ {
+ }
+
+ netlist_source_t(pstring name, void (*setup_func)(netlist_setup_t &))
+ : m_type(PROC),
+ m_setup_func(setup_func),
+ m_setup_func_name(name),
+ m_mem(NULL)
+ {
+ }
+
+ netlist_source_t(const char *mem)
+ : m_type(MEMORY),
+ m_setup_func(NULL),
+ m_setup_func_name(""),
+ m_mem(mem)
+ {
+ }
+
+ ~netlist_source_t() { }
+
+ bool parse(netlist_setup_t &setup, const pstring name)
+ {
+ switch (m_type)
+ {
+ case PROC:
+ if (name == m_setup_func_name)
+ {
+ m_setup_func(setup);
+ return true;
+ }
+ break;
+ case MEMORY:
+ {
+ netlist_parser p(setup);
+ return p.parse(m_mem, name);
+ }
+ break;
+ case STRING:
+ case EMPTY:
+ break;
+ }
+ return false;
+ }
private:
- source_e m_type;
+ source_e m_type;
- void (*m_setup_func)(netlist_setup_t &);
- pstring m_setup_func_name;
- const char *m_mem;
+ void (*m_setup_func)(netlist_setup_t &);
+ pstring m_setup_func_name;
+ const char *m_mem;
};
class netlist_sources_t
{
public:
- void add(netlist_source_t src)
- {
- m_list.add(src);
- }
-
- void parse(netlist_setup_t &setup, const pstring name)
- {
- for (int i=0; i < m_list.count(); i++)
- {
- if (m_list[i].parse(setup, name))
- return;
- }
- setup.netlist().error("unable to find %s in source collection", name.cstr());
- }
+ void add(netlist_source_t src)
+ {
+ m_list.add(src);
+ }
+
+ void parse(netlist_setup_t &setup, const pstring name)
+ {
+ for (int i=0; i < m_list.count(); i++)
+ {
+ if (m_list[i].parse(setup, name))
+ return;
+ }
+ setup.netlist().error("unable to find %s in source collection", name.cstr());
+ }
private:
- netlist_source_t::list_t m_list;
+ netlist_source_t::list_t m_list;
};
#endif /* NL_PARSER_H_ */
diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c
index b8d93b2f865..0644a73b38d 100644
--- a/src/emu/netlist/nl_setup.c
+++ b/src/emu/netlist/nl_setup.c
@@ -19,8 +19,8 @@ static NETLIST_START(base)
TTL_INPUT(ttllow, 0)
NET_REGISTER_DEV(gnd, GND)
- INCLUDE(diode_models);
- INCLUDE(bjt_models);
+ INCLUDE(diode_models);
+ INCLUDE(bjt_models);
NETLIST_END()
@@ -58,31 +58,31 @@ netlist_setup_t::~netlist_setup_t()
ATTR_COLD pstring netlist_setup_t::build_fqn(const pstring &obj_name) const
{
- if (m_stack.empty())
- return netlist().name() + "." + obj_name;
- else
- return m_stack.peek() + "." + obj_name;
+ if (m_stack.empty())
+ return netlist().name() + "." + obj_name;
+ else
+ return m_stack.peek() + "." + obj_name;
}
void netlist_setup_t::namespace_push(const pstring &aname)
{
- if (m_stack.empty())
- m_stack.push(netlist().name() + "." + aname);
- else
- m_stack.push(m_stack.peek() + "." + aname);
+ if (m_stack.empty())
+ m_stack.push(netlist().name() + "." + aname);
+ else
+ m_stack.push(m_stack.peek() + "." + aname);
}
void netlist_setup_t::namespace_pop()
{
- m_stack.pop();
+ m_stack.pop();
}
netlist_device_t *netlist_setup_t::register_dev(netlist_device_t *dev, const pstring &name)
{
- pstring fqn = build_fqn(name);
+ pstring fqn = build_fqn(name);
- dev->init(netlist(), fqn);
+ dev->init(netlist(), fqn);
if (!(netlist().m_devices.add(fqn, dev, false)==TMERR_NONE))
netlist().error("Error adding %s to device list\n", name.cstr());
@@ -120,7 +120,7 @@ void netlist_setup_t::remove_dev(const pstring &name)
const link_t *p = m_links.first();
while (p != NULL)
{
- const link_t *n = m_links.next(p);
+ const link_t *n = m_links.next(p);
if (temp.equals(p->e1.substr(0,temp.len())) || temp.equals(p->e2.substr(0,temp.len())))
m_links.remove(*p);
p = n;
@@ -135,15 +135,15 @@ void netlist_setup_t::register_model(const pstring &model)
void netlist_setup_t::register_alias_nofqn(const pstring &alias, const pstring &out)
{
- if (!(m_alias.add(alias, out, false)==TMERR_NONE))
- netlist().error("Error adding alias %s to alias list\n", alias.cstr());
+ if (!(m_alias.add(alias, out, false)==TMERR_NONE))
+ netlist().error("Error adding alias %s to alias list\n", alias.cstr());
}
void netlist_setup_t::register_alias(const pstring &alias, const pstring &out)
{
- pstring alias_fqn = build_fqn(alias);
- pstring out_fqn = build_fqn(out);
- register_alias_nofqn(alias_fqn, out_fqn);
+ pstring alias_fqn = build_fqn(alias);
+ pstring out_fqn = build_fqn(out);
+ register_alias_nofqn(alias_fqn, out_fqn);
}
pstring netlist_setup_t::objtype_as_astr(netlist_object_t &in) const
@@ -241,7 +241,7 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name
//int pl=m_models[i].find("(");
//int pr=m_models[i].find(")");
//dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i].substr(pl+1,pr-pl-1));
- dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i]);
+ dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i]);
found = true;
break;
}
@@ -269,15 +269,15 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name
void netlist_setup_t::register_link_arr(const pstring &terms)
{
- nl_util::pstring_list list = nl_util::split(terms,", ");
- if (list.count() < 2)
- netlist().error("You must pass at least 2 terminals to NET_C");
- pstring last = list[0];
- for (int i = 1; i < list.count(); i++)
- {
- register_link(last, list[i]);
- last = list[i];
- }
+ nl_util::pstring_list list = nl_util::split(terms,", ");
+ if (list.count() < 2)
+ netlist().error("You must pass at least 2 terminals to NET_C");
+ pstring last = list[0];
+ for (int i = 1; i < list.count(); i++)
+ {
+ register_link(last, list[i]);
+ last = list[i];
+ }
}
@@ -298,7 +298,7 @@ void netlist_setup_t::register_param(const pstring &param, const double value)
void netlist_setup_t::register_param(const pstring &param, const pstring &value)
{
- pstring fqn = build_fqn(param);
+ pstring fqn = build_fqn(param);
if (!(m_params_temp.add(fqn, value, false)==TMERR_NONE))
netlist().error("Error adding parameter %s to parameter list\n", param.cstr());
@@ -368,7 +368,7 @@ netlist_core_terminal_t *netlist_setup_t::find_terminal(const pstring &terminal_
netlist_param_t *netlist_setup_t::find_param(const pstring &param_in, bool required)
{
- const pstring param_in_fqn = build_fqn(param_in);
+ const pstring param_in_fqn = build_fqn(param_in);
const pstring &outname = resolve_alias(param_in_fqn);
netlist_param_t *ret;
@@ -383,41 +383,41 @@ netlist_param_t *netlist_setup_t::find_param(const pstring &param_in, bool requi
nld_base_d_to_a_proxy *netlist_setup_t::get_d_a_proxy(netlist_output_t &out)
{
- assert(out.isFamily(netlist_terminal_t::LOGIC));
+ assert(out.isFamily(netlist_terminal_t::LOGIC));
- //printf("proxy for %s\n", out.name().cstr());;
- netlist_logic_output_t &out_cast = dynamic_cast<netlist_logic_output_t &>(out);
- nld_base_d_to_a_proxy *proxy = out_cast.get_proxy();
+ //printf("proxy for %s\n", out.name().cstr());;
+ netlist_logic_output_t &out_cast = dynamic_cast<netlist_logic_output_t &>(out);
+ nld_base_d_to_a_proxy *proxy = out_cast.get_proxy();
- if (proxy == NULL)
- {
- // create a new one ...
- proxy = new nld_d_to_a_proxy(out);
- pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt);
- m_proxy_cnt++;
+ if (proxy == NULL)
+ {
+ // create a new one ...
+ proxy = new nld_d_to_a_proxy(out);
+ pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt);
+ m_proxy_cnt++;
- register_dev(proxy, x);
- proxy->start_dev();
+ register_dev(proxy, x);
+ proxy->start_dev();
#if 1
- /* connect all existing terminals to new net */
-
- netlist_core_terminal_t *p = out.net().m_list.first();
- while (p != NULL)
- {
- netlist_core_terminal_t *np = out.net().m_list.next(p);
- p->clear_net(); // de-link from all nets ...
- connect(proxy->out(), *p);
- p = np;
- }
- out.net().m_list.clear(); // clear the list
- out.net().m_num_cons = 0;
+ /* connect all existing terminals to new net */
+
+ netlist_core_terminal_t *p = out.net().m_list.first();
+ while (p != NULL)
+ {
+ netlist_core_terminal_t *np = out.net().m_list.next(p);
+ p->clear_net(); // de-link from all nets ...
+ connect(proxy->out(), *p);
+ p = np;
+ }
+ out.net().m_list.clear(); // clear the list
+ out.net().m_num_cons = 0;
#endif
- out.net().register_con(proxy->m_I);
- out_cast.set_proxy(proxy);
+ out.net().register_con(proxy->m_I);
+ out_cast.set_proxy(proxy);
- }
- return proxy;
+ }
+ return proxy;
}
void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t &out)
@@ -429,7 +429,7 @@ void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t
m_proxy_cnt++;
register_dev(proxy, x);
- proxy->start_dev();
+ proxy->start_dev();
proxy->m_Q.net().register_con(in);
out.net().register_con(proxy->m_I);
@@ -437,10 +437,10 @@ void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t
}
else if (out.isFamily(netlist_terminal_t::LOGIC) && in.isFamily(netlist_terminal_t::ANALOG))
{
- nld_base_d_to_a_proxy *proxy = get_d_a_proxy(out);
+ nld_base_d_to_a_proxy *proxy = get_d_a_proxy(out);
- connect_terminals(proxy->out(), in);
- //proxy->out().net().register_con(in);
+ connect_terminals(proxy->out(), in);
+ //proxy->out().net().register_con(in);
}
else
{
@@ -462,7 +462,7 @@ void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_i
m_proxy_cnt++;
register_dev(proxy, x);
- proxy->start_dev();
+ proxy->start_dev();
connect_terminals(term, proxy->m_I);
@@ -536,13 +536,13 @@ void netlist_setup_t::connect_terminals(netlist_core_terminal_t &t1, netlist_cor
static netlist_core_terminal_t &resolve_proxy(netlist_core_terminal_t &term)
{
- if (term.isType(netlist_core_terminal_t::OUTPUT) && term.isFamily(netlist_core_terminal_t::LOGIC))
- {
- netlist_logic_output_t &out = dynamic_cast<netlist_logic_output_t &>(term);
- if (out.has_proxy())
- return out.get_proxy()->out();
- }
- return term;
+ if (term.isType(netlist_core_terminal_t::OUTPUT) && term.isFamily(netlist_core_terminal_t::LOGIC))
+ {
+ netlist_logic_output_t &out = dynamic_cast<netlist_logic_output_t &>(term);
+ if (out.has_proxy())
+ return out.get_proxy()->out();
+ }
+ return term;
}
void netlist_setup_t::connect(netlist_core_terminal_t &t1_in, netlist_core_terminal_t &t2_in)
@@ -560,7 +560,7 @@ void netlist_setup_t::connect(netlist_core_terminal_t &t1_in, netlist_core_termi
else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::OUTPUT))
{
if (t1.has_net() && t1.net().isRailNet())
- netlist().error("Input %s already connected\n", t1.name().cstr());
+ netlist().error("Input %s already connected\n", t1.name().cstr());
connect_input_output(dynamic_cast<netlist_input_t &>(t1), dynamic_cast<netlist_output_t &>(t2));
}
else if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::TERMINAL))
@@ -589,9 +589,9 @@ void netlist_setup_t::connect(netlist_core_terminal_t &t1_in, netlist_core_termi
void netlist_setup_t::resolve_inputs()
{
- bool has_twoterms = false;
+ bool has_twoterms = false;
- netlist().log("Resolving inputs ...");
+ netlist().log("Resolving inputs ...");
for (const link_t *entry = m_links.first(); entry != NULL; entry = m_links.next(entry))
{
@@ -612,68 +612,68 @@ void netlist_setup_t::resolve_inputs()
//VERBOSE_OUT(("%s %d\n", out->netdev()->name(), *out->Q_ptr()));
}
- netlist().log("deleting empty nets ...");
+ netlist().log("deleting empty nets ...");
// delete empty nets ... and save m_list ...
- netlist_net_t::list_t todelete;
+ netlist_net_t::list_t todelete;
for (netlist_net_t *const *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn))
{
if ((*pn)->m_list.is_empty())
{
- todelete.add(*pn);
+ todelete.add(*pn);
}
else
{
- for (netlist_core_terminal_t *p = (*pn)->m_list.first(); p != NULL; p = (*pn)->m_list.next(p))
- (*pn)->m_registered.add(p);
+ for (netlist_core_terminal_t *p = (*pn)->m_list.first(); p != NULL; p = (*pn)->m_list.next(p))
+ (*pn)->m_registered.add(p);
+ }
+ }
+
+ for (int i=0; i < todelete.count(); i++)
+ {
+ netlist().log("Deleting net %s ...", todelete[i]->name().cstr());
+ netlist().m_nets.remove(todelete[i]);
+ if (!todelete[i]->isRailNet())
+ delete todelete[i];
+ }
+
+ pstring errstr("");
+
+ netlist().log("looking for terminals not connected ...");
+ for (tagmap_terminal_t::entry_t *entry = m_terminals.first(); entry != NULL; entry = m_terminals.next(entry))
+ {
+ if (!entry->object()->has_net())
+ errstr += pstring::sprintf("Found terminal %s without a net\n",
+ entry->object()->name().cstr());
+ else if (entry->object()->net().num_cons() == 0)
+ netlist().warning("Found terminal %s without connections",
+ entry->object()->name().cstr());
+ }
+ if (errstr != "")
+ netlist().error("%s", errstr.cstr());
+
+
+ netlist().log("looking for two terms connected to rail nets ...\n");
+ for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry))
+ {
+ NETLIB_NAME(twoterm) *t = dynamic_cast<NETLIB_NAME(twoterm) *>(entry->object());
+ if (t != NULL)
+ {
+ has_twoterms = true;
+ if (t->m_N.net().isRailNet() && t->m_P.net().isRailNet())
+ netlist().error("Found device %s connected only to railterminals %s/%s\n",
+ t->name().cstr(), t->m_N.net().name().cstr(), t->m_P.net().name().cstr());
}
}
- for (int i=0; i < todelete.count(); i++)
- {
- netlist().log("Deleting net %s ...", todelete[i]->name().cstr());
- netlist().m_nets.remove(todelete[i]);
- if (!todelete[i]->isRailNet())
- delete todelete[i];
- }
-
- pstring errstr("");
-
- netlist().log("looking for terminals not connected ...");
- for (tagmap_terminal_t::entry_t *entry = m_terminals.first(); entry != NULL; entry = m_terminals.next(entry))
- {
- if (!entry->object()->has_net())
- errstr += pstring::sprintf("Found terminal %s without a net\n",
- entry->object()->name().cstr());
- else if (entry->object()->net().num_cons() == 0)
- netlist().warning("Found terminal %s without connections",
- entry->object()->name().cstr());
- }
- if (errstr != "")
- netlist().error("%s", errstr.cstr());
-
-
- netlist().log("looking for two terms connected to rail nets ...\n");
- for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry))
- {
- NETLIB_NAME(twoterm) *t = dynamic_cast<NETLIB_NAME(twoterm) *>(entry->object());
- if (t != NULL)
- {
- has_twoterms = true;
- if (t->m_N.net().isRailNet() && t->m_P.net().isRailNet())
- netlist().error("Found device %s connected only to railterminals %s/%s\n",
- t->name().cstr(), t->m_N.net().name().cstr(), t->m_P.net().name().cstr());
- }
- }
-
- netlist().log("initialize solver ...\n");
+ netlist().log("initialize solver ...\n");
if (m_netlist.solver() == NULL)
{
- if (has_twoterms)
- netlist().error("No solver found for this net although analog elements are present\n");
+ if (has_twoterms)
+ netlist().error("No solver found for this net although analog elements are present\n");
}
else
m_netlist.solver()->post_start();
diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h
index b6f474cde94..0c2546afff2 100644
--- a/src/emu/netlist/nl_setup.h
+++ b/src/emu/netlist/nl_setup.h
@@ -39,7 +39,7 @@
setup.register_link(# _name "." # _input, # _output);
#define NET_C(_term1, ...) \
- setup.register_link_arr( #_term1 ", " # __VA_ARGS__);
+ setup.register_link_arr( #_term1 ", " # __VA_ARGS__);
#define PARAM(_name, _val) \
setup.register_param(# _name, _val);
@@ -55,17 +55,15 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &setup)
#define NETLIST_START(_name) \
ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &setup) \
{
-
-
#define NETLIST_END() }
#define INCLUDE(_name) \
NETLIST_NAME(_name)(setup);
#define SUBMODEL(_name, _model) \
- setup.namespace_push(# _name); \
- NETLIST_NAME(_model)(setup); \
- setup.namespace_pop();
+ setup.namespace_push(# _name); \
+ NETLIST_NAME(_model)(setup); \
+ setup.namespace_pop();
// ----------------------------------------------------------------------------------------
// FIXME: Clean this up
@@ -117,9 +115,9 @@ public:
netlist_base_t &netlist() { return m_netlist; }
const netlist_base_t &netlist() const { return m_netlist; }
netlist_factory_t &factory() { return m_factory; }
- const netlist_factory_t &factory() const { return m_factory; }
+ const netlist_factory_t &factory() const { return m_factory; }
- pstring build_fqn(const pstring &obj_name) const;
+ pstring build_fqn(const pstring &obj_name) const;
netlist_device_t *register_dev(netlist_device_t *dev, const pstring &name);
void remove_dev(const pstring &name);
@@ -127,7 +125,7 @@ public:
void register_model(const pstring &model);
void register_alias(const pstring &alias, const pstring &out);
void register_alias_nofqn(const pstring &alias, const pstring &out);
- void register_link_arr(const pstring &terms);
+ void register_link_arr(const pstring &terms);
void register_link(const pstring &sin, const pstring &sout);
void register_param(const pstring &param, const pstring &value);
void register_param(const pstring &param, const double value);
@@ -148,7 +146,7 @@ public:
/* handle namespace */
void namespace_push(const pstring &aname);
- void namespace_pop();
+ void namespace_pop();
/* not ideal, but needed for save_state */
tagmap_terminal_t m_terminals;
@@ -172,7 +170,7 @@ private:
int m_proxy_cnt;
- netlist_stack_t<pstring> m_stack;
+ netlist_stack_t<pstring> m_stack;
void connect_terminals(netlist_core_terminal_t &in, netlist_core_terminal_t &out);
diff --git a/src/emu/netlist/pstate.c b/src/emu/netlist/pstate.c
index 1bc08410a7f..5b07692e460 100644
--- a/src/emu/netlist/pstate.c
+++ b/src/emu/netlist/pstate.c
@@ -17,10 +17,10 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst
pstring fullname = stname;
ATTR_UNUSED pstring ts[] = {
"NOT_SUPPORTED",
- "DT_CUSTOM",
+ "DT_CUSTOM",
"DT_DOUBLE",
"DT_INT64",
- "DT_INT16",
+ "DT_INT16",
"DT_INT8",
"DT_INT",
"DT_BOOLEAN"
@@ -33,30 +33,30 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst
ATTR_COLD void pstate_manager_t::remove_save_items(const void *owner)
{
- pstate_entry_t::list_t todelete;
-
- for (int i=0; i < m_save.count(); i++)
- {
- if (m_save[i]->m_owner == owner)
- todelete.add(m_save[i]);
- }
- for (int i=0; i < todelete.count(); i++)
- {
- m_save.remove(todelete[i]);
- }
- todelete.clear_and_free();
+ pstate_entry_t::list_t todelete;
+
+ for (int i=0; i < m_save.count(); i++)
+ {
+ if (m_save[i]->m_owner == owner)
+ todelete.add(m_save[i]);
+ }
+ for (int i=0; i < todelete.count(); i++)
+ {
+ m_save.remove(todelete[i]);
+ }
+ todelete.clear_and_free();
}
ATTR_COLD void pstate_manager_t::pre_save()
{
for (int i=0; i < m_save.count(); i++)
- if (m_save[i]->m_dt == DT_CUSTOM)
- m_save[i]->m_callback->on_pre_save();
+ if (m_save[i]->m_dt == DT_CUSTOM)
+ m_save[i]->m_callback->on_pre_save();
}
ATTR_COLD void pstate_manager_t::post_load()
{
- for (int i=0; i < m_save.count(); i++)
- if (m_save[i]->m_dt == DT_CUSTOM)
- m_save[i]->m_callback->on_post_load();
+ for (int i=0; i < m_save.count(); i++)
+ if (m_save[i]->m_dt == DT_CUSTOM)
+ m_save[i]->m_callback->on_post_load();
}
diff --git a/src/emu/netlist/pstate.h b/src/emu/netlist/pstate.h
index 4265da06b8d..3e1f73e7cc5 100644
--- a/src/emu/netlist/pstate.h
+++ b/src/emu/netlist/pstate.h
@@ -29,7 +29,7 @@ enum pstate_data_type_e {
DT_CUSTOM,
DT_DOUBLE,
DT_INT64,
- DT_INT16,
+ DT_INT16,
DT_INT8,
DT_INT,
DT_BOOLEAN
@@ -70,22 +70,22 @@ protected:
struct pstate_entry_t
{
- typedef netlist_list_t<pstate_entry_t *> list_t;
-
- pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner,
- const int size, const int count, void *ptr)
- : m_name(stname), m_dt(dt), m_owner(owner), m_callback(NULL), m_size(size), m_count(count), m_ptr(ptr) { }
-
- pstate_entry_t(const pstring &stname, const void *owner, pstate_callback_t *callback)
- : m_name(stname), m_dt(DT_CUSTOM), m_owner(owner), m_callback(callback), m_size(0), m_count(0), m_ptr(NULL) { }
-
- pstring m_name;
- const pstate_data_type_e m_dt;
- const void *m_owner;
- pstate_callback_t *m_callback;
- const int m_size;
- const int m_count;
- void *m_ptr;
+ typedef netlist_list_t<pstate_entry_t *> list_t;
+
+ pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner,
+ const int size, const int count, void *ptr)
+ : m_name(stname), m_dt(dt), m_owner(owner), m_callback(NULL), m_size(size), m_count(count), m_ptr(ptr) { }
+
+ pstate_entry_t(const pstring &stname, const void *owner, pstate_callback_t *callback)
+ : m_name(stname), m_dt(DT_CUSTOM), m_owner(owner), m_callback(callback), m_size(0), m_count(0), m_ptr(NULL) { }
+
+ pstring m_name;
+ const pstate_data_type_e m_dt;
+ const void *m_owner;
+ pstate_callback_t *m_callback;
+ const int m_size;
+ const int m_count;
+ void *m_ptr;
};
class pstate_manager_t
@@ -125,8 +125,8 @@ private:
template<> ATTR_COLD inline void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname)
{
//save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
- pstate_entry_t *p = new pstate_entry_t(stname, owner, &state);
- m_save.add(p);
+ pstate_entry_t *p = new pstate_entry_t(stname, owner, &state);
+ m_save.add(p);
state.register_state(*this, stname);
}
diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/pstring.h
index d3bf7f61840..1928a580b01 100644
--- a/src/emu/netlist/pstring.h
+++ b/src/emu/netlist/pstring.h
@@ -97,7 +97,7 @@ public:
inline const char *cstr() const { return m_ptr->str(); }
// concatenation operators
- pstring& operator+=(const char c) { char buf[2] = { c, 0 }; pcat(buf); return *this; }
+ pstring& operator+=(const char c) { char buf[2] = { c, 0 }; pcat(buf); return *this; }
pstring& operator+=(const pstring &string) { pcat(string.cstr()); return *this; }
friend pstring operator+(const pstring &lhs, const pstring &rhs) { return pstring(lhs) += rhs; }
friend pstring operator+(const pstring &lhs, const char *rhs) { return pstring(lhs) += rhs; }
@@ -133,12 +133,12 @@ public:
return (result != NULL) ? (result - cstr()) : -1;
}
- inline int find(const char search, int start = 0) const
- {
- int alen = len();
- const char *result = strchr(cstr() + MIN(start, alen), search);
- return (result != NULL) ? (result - cstr()) : -1;
- }
+ inline int find(const char search, int start = 0) const
+ {
+ int alen = len();
+ const char *result = strchr(cstr() + MIN(start, alen), search);
+ return (result != NULL) ? (result - cstr()) : -1;
+ }
// various
@@ -174,7 +174,7 @@ protected:
struct str_t
{
- str_t() : m_ref_count(1), m_len(0) { m_str[0] = 0; }
+ str_t() : m_ref_count(1), m_len(0) { m_str[0] = 0; }
str_t(int alen) : m_ref_count(1), m_len(alen) { m_str[0] = 0; }
char *str() { return &m_str[0]; }
diff --git a/src/emu/output.c b/src/emu/output.c
index 39acdff9952..10bd135b4d1 100644
--- a/src/emu/output.c
+++ b/src/emu/output.c
@@ -31,14 +31,14 @@ class output_notify
public:
output_notify(output_notifier_func callback, void *param)
: m_next(NULL),
- m_notifier(callback),
- m_param(param) { }
+ m_notifier(callback),
+ m_param(param) { }
output_notify *next() const { return m_next; }
- output_notify * m_next; /* link to next item */
+ output_notify * m_next; /* link to next item */
output_notifier_func m_notifier; /* callback to call */
- void * m_param; /* parameter to pass the callback */
+ void * m_param; /* parameter to pass the callback */
};
diff --git a/src/emu/render.c b/src/emu/render.c
index 05ed18d3883..5e2ae35e26a 100644
--- a/src/emu/render.c
+++ b/src/emu/render.c
@@ -1212,7 +1212,7 @@ void render_target::compute_minimum_size(INT32 &minwidth, INT32 &minheight)
// get visible area
rectangle visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR)
- ? rectangle(0, 639, 0, 479) // use a hard-coded default visible area for vector screens
+ ? rectangle(0, 639, 0, 479) // use a hard-coded default visible area for vector screens
: screen->visible_area();
// is our visible area too small? if so, we need to bump up the size
diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c
index a186dd78ee3..27d183b88c7 100644
--- a/src/emu/rendfont.c
+++ b/src/emu/rendfont.c
@@ -392,8 +392,8 @@ bool render_font::load_cached_bdf(const char *filename)
// if that worked, we're done
if (result)
{
- // don't do that - glyphs data point into this array ...
- // m_rawdata.reset();
+ // don't do that - glyphs data point into this array ...
+ // m_rawdata.reset();
return true;
}
}
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h
index 31a0781bd59..62ce244d69a 100644
--- a/src/emu/rendfont.h
+++ b/src/emu/rendfont.h
@@ -52,11 +52,11 @@ private:
public:
glyph()
: width(0),
- xoffs(0), yoffs(0),
- bmwidth(0), bmheight(0),
- rawdata(NULL),
- texture(NULL) { }
-
+ xoffs(0), yoffs(0),
+ bmwidth(0), bmheight(0),
+ rawdata(NULL),
+ texture(NULL) { }
+
INT32 width; // width from this character to the next
INT32 xoffs, yoffs; // X and Y offset from baseline to top,left of bitmap
INT32 bmwidth, bmheight; // width and height of bitmap
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index 8e549f0aef4..27e888df16c 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -667,7 +667,7 @@ layout_element::component::component(running_machine &machine, xml_data_node &co
m_numsymbolsvisible = xml_get_attribute_int_with_subst(machine, compnode, "numsymbolsvisible", 3);
m_reelreversed = xml_get_attribute_int_with_subst(machine, compnode, "reelreversed", 0);
m_beltreel = xml_get_attribute_int_with_subst(machine, compnode, "beltreel", 0);
-
+
}
// led7seg nodes
@@ -1004,7 +1004,7 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3
render_font *font = machine.render().font_alloc("default");
float aspect = 1.0f;
INT32 width;
-
+
int curry = 0;
int num_shown = m_numsymbolsvisible;
@@ -1109,7 +1109,7 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3
int effx = curx + x + chbounds.min_x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ UINT32 spix = rgb_t(src[x]).a();
if (spix != 0)
{
rgb_t dpix = d[effx];
@@ -1259,7 +1259,7 @@ void layout_element::component::draw_beltreel(running_machine &machine, bitmap_a
int effx = basex + curx + x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = rgb_t(src[x]).a();
+ UINT32 spix = rgb_t(src[x]).a();
if (spix != 0)
{
rgb_t dpix = d[effx];
@@ -2309,9 +2309,9 @@ layout_view::item::~item()
//-------------------------------------------------
-render_container *layout_view::item::screen_container(running_machine &machine) const
-{
- return (m_screen != NULL) ? &m_screen->container() : NULL;
+render_container *layout_view::item::screen_container(running_machine &machine) const
+{
+ return (m_screen != NULL) ? &m_screen->container() : NULL;
}
//-------------------------------------------------
diff --git a/src/emu/rendlay.h b/src/emu/rendlay.h
index 8065685bcc2..acd4b4407ab 100644
--- a/src/emu/rendlay.h
+++ b/src/emu/rendlay.h
@@ -149,7 +149,7 @@ private:
int m_stateoffset;
int m_reelreversed;
int m_numsymbolsvisible;
- int m_beltreel;
+ int m_beltreel;
};
// a texture encapsulates a texture for a given element in a given state
diff --git a/src/emu/screen.c b/src/emu/screen.c
index 4a21b87cfdd..496d152e19e 100644
--- a/src/emu/screen.c
+++ b/src/emu/screen.c
@@ -226,7 +226,7 @@ void screen_device::static_set_palette(device_t &device, const char *tag)
//-------------------------------------------------
-// static_set_video_attributes - set the screen
+// static_set_video_attributes - set the screen
// video attributes
//-------------------------------------------------
@@ -260,10 +260,10 @@ void screen_device::device_validity_check(validity_checker &valid) const
// check for zero frame rate
if (m_refresh == 0)
mame_printf_error("Invalid (zero) refresh rate\n");
-
+
texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
if (m_palette == NULL && texformat == TEXFORMAT_PALETTE16)
- mame_printf_error("Screen does not have palette defined\n");
+ mame_printf_error("Screen does not have palette defined\n");
if (m_palette != NULL && texformat == TEXFORMAT_RGB32)
mame_printf_warning("Screen does not need palette defined\n");
}
@@ -279,7 +279,7 @@ void screen_device::device_start()
m_screen_update_ind16.bind_relative_to(*owner());
m_screen_update_rgb32.bind_relative_to(*owner());
m_screen_vblank.bind_relative_to(*owner());
-
+
// if we have a palette and it's not started, wait for it
if (m_palette != NULL && !m_palette->started())
throw device_missing_dependencies();
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 956a899b331..67d47902c96 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -261,7 +261,7 @@ private:
screen_update_ind16_delegate m_screen_update_ind16; // screen update callback (16-bit palette)
screen_update_rgb32_delegate m_screen_update_rgb32; // screen update callback (32-bit RGB)
screen_vblank_delegate m_screen_vblank; // screen vblank callback
- optional_device<palette_device> m_palette; // our palette
+ optional_device<palette_device> m_palette; // our palette
UINT32 m_video_attributes; // flags describing the video system
// internal state
diff --git a/src/emu/softlist.c b/src/emu/softlist.c
index 803e4a36f54..27c857a383c 100644
--- a/src/emu/softlist.c
+++ b/src/emu/softlist.c
@@ -40,7 +40,7 @@ private:
POS_PART,
POS_DATA
};
-
+
// internal parsing helpers
const char *filename() const { return m_list.filename(); }
const char *infoname() const { return (m_current_info != NULL) ? m_current_info->shortname() : "???"; }
@@ -74,15 +74,15 @@ private:
void parse_soft_end(const char *name);
// internal parsing state
- software_list_device & m_list;
- astring & m_errors;
- XML_Parser m_parser;
- bool m_done;
- bool m_data_accum_expected;
- astring m_data_accum;
- software_info * m_current_info;
- software_part * m_current_part;
- parse_position m_pos;
+ software_list_device & m_list;
+ astring & m_errors;
+ XML_Parser m_parser;
+ bool m_done;
+ bool m_data_accum_expected;
+ astring m_data_accum;
+ software_info * m_current_info;
+ software_part * m_current_part;
+ parse_position m_pos;
};
@@ -106,9 +106,9 @@ const device_type SOFTWARE_LIST = &device_creator<software_list_device>;
software_part::software_part(software_info &info, const char *name, const char *interface)
: m_next(NULL),
- m_info(info),
- m_name(name),
- m_interface(interface)
+ m_info(info),
+ m_name(name),
+ m_interface(interface)
{
// ensure strings we are passed are in the string pool
assert(info.list().string_pool_contains(name));
@@ -117,8 +117,8 @@ software_part::software_part(software_info &info, const char *name, const char *
//-------------------------------------------------
-// feature - return the value of the given
-// feature, if specified
+// feature - return the value of the given
+// feature, if specified
//-------------------------------------------------
const char *software_part::feature(const char *feature_name) const
@@ -136,7 +136,7 @@ const char *software_part::feature(const char *feature_name) const
//-------------------------------------------------
// is_compatible - determine if we are compatible
-// with the given software_list_device
+// with the given software_list_device
//-------------------------------------------------
bool software_part::is_compatible(const software_list_device &swlistdev) const
@@ -150,7 +150,7 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const
// copy the comma-delimited strings and ensure they end with a final comma
astring comp(compatibility, ",");
astring filt(filter, ",");
-
+
// iterate over filter items and see if they exist in the compatibility list; if so, return true
for (int start = 0, end = filt.chr(start, ','); end != -1; start = end + 1, end = filt.chr(start, ','))
{
@@ -164,7 +164,7 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const
//-------------------------------------------------
// matches_interface - determine if we match
-// an interface in the provided list
+// an interface in the provided list
//-------------------------------------------------
bool software_part::matches_interface(const char *interface_list) const
@@ -175,7 +175,7 @@ bool software_part::matches_interface(const char *interface_list) const
// copy the comma-delimited interface list and ensure it ends with a final comma
astring interfaces(interface_list, ",");
-
+
// then add a comma to the end of our interface and return true if we find it in the list string
astring our_interface(m_interface, ",");
return (interfaces.find(0, our_interface) != -1);
@@ -193,10 +193,10 @@ bool software_part::matches_interface(const char *interface_list) const
software_info::software_info(software_list_device &list, const char *name, const char *parent, const char *supported)
: m_next(NULL),
- m_list(list),
- m_supported(SOFTWARE_SUPPORTED_YES),
- m_shortname(name),
- m_parentname(parent)
+ m_list(list),
+ m_supported(SOFTWARE_SUPPORTED_YES),
+ m_shortname(name),
+ m_parentname(parent)
{
// ensure strings we are passed are in the string pool
assert(list.string_pool_contains(name));
@@ -215,7 +215,7 @@ software_info::software_info(software_list_device &list, const char *name, const
//-------------------------------------------------
// find_part - find a part by name with an
-// optional interface match
+// optional interface match
//-------------------------------------------------
software_part *software_info::find_part(const char *partname, const char *interface)
@@ -225,14 +225,14 @@ software_part *software_info::find_part(const char *partname, const char *interf
if (partname == NULL && interface == NULL)
return m_partdata.first();
-
+
// look for the part by name and match against the interface if provided
for (software_part *part = m_partdata.first(); part != NULL; part = part->next())
if (partname != NULL && strcmp(partname, part->name()) == 0)
{
if (interface == NULL || part->matches_interface(interface))
return part;
- }
+ }
else if (partname == NULL && part->matches_interface(interface))
return part;
return NULL;
@@ -241,20 +241,20 @@ software_part *software_info::find_part(const char *partname, const char *interf
//-------------------------------------------------
// has_multiple_parts - return true if we have
-// more than one part matching the given
-// interface
+// more than one part matching the given
+// interface
//-------------------------------------------------
bool software_info::has_multiple_parts(const char *interface) const
{
int count = 0;
-
+
// increment the count for each match and stop if we hit more than 1
for (software_part *part = first_part(); part != NULL; part = part->next())
if (part->matches_interface(interface))
if (++count > 1)
return true;
-
+
return false;
}
@@ -290,7 +290,7 @@ const char *const_string_pool::add(const char *string)
if (result != NULL)
return result;
}
-
+
// no space anywhere, create a new pool and prepend it (so it gets used first)
const char *result = m_chunklist.prepend(*global_alloc(pool_chunk)).add(string);
assert(result != NULL);
@@ -299,7 +299,7 @@ const char *const_string_pool::add(const char *string)
//-------------------------------------------------
-// contains - determine if the given string
+// contains - determine if the given string
// pointer lives in the pool
//-------------------------------------------------
@@ -313,7 +313,7 @@ bool const_string_pool::contains(const char *string)
for (pool_chunk *chunk = m_chunklist.first(); chunk != NULL; chunk = chunk->next())
if (chunk->contains(string))
return true;
-
+
return false;
}
@@ -323,8 +323,8 @@ bool const_string_pool::contains(const char *string)
//-------------------------------------------------
const_string_pool::pool_chunk::pool_chunk()
- : m_next(NULL),
- m_used(0)
+ : m_next(NULL),
+ m_used(0)
{
}
@@ -338,7 +338,7 @@ const char *const_string_pool::pool_chunk::add(const char *string)
// get the length of the string (no string can be longer than a full pool)
int bytes = strlen(string) + 1;
assert(bytes < POOL_SIZE);
-
+
// if too big, return NULL
if (m_used + bytes > POOL_SIZE)
return NULL;
@@ -405,8 +405,8 @@ void software_list_device::device_start()
//-------------------------------------------------
// find_approx_matches - search ourselves for
-// a list of possible matches of the given name
-// and optional interface
+// a list of possible matches of the given name
+// and optional interface
//-------------------------------------------------
void software_list_device::find_approx_matches(const char *name, int matches, software_info **list, const char *interface)
@@ -456,7 +456,7 @@ void software_list_device::find_approx_matches(const char *name, int matches, so
//-------------------------------------------------
-// release - reset to a pre-parsed state
+// release - reset to a pre-parsed state
//-------------------------------------------------
void software_list_device::release()
@@ -471,8 +471,8 @@ void software_list_device::release()
//-------------------------------------------------
-// find_by_name - find a software list by name
-// across all software list devices
+// find_by_name - find a software list by name
+// across all software list devices
//-------------------------------------------------
software_list_device *software_list_device::find_by_name(const machine_config &config, const char *name)
@@ -488,8 +488,8 @@ software_list_device *software_list_device::find_by_name(const machine_config &c
//-------------------------------------------------
// software_display_matches - display a list of
-// possible matches in the system to the given
-// name, across all software list devices
+// possible matches in the system to the given
+// name, across all software list devices
//-------------------------------------------------
void software_list_device::display_matches(const machine_config &config, const char *interface, const char *name)
@@ -528,9 +528,9 @@ void software_list_device::display_matches(const machine_config &config, const c
//-------------------------------------------------
-// find - find an item by name in the software
+// find - find an item by name in the software
// list, using wildcards and optionally starting
-// from an intermediate point
+// from an intermediate point
//-------------------------------------------------
software_info *software_list_device::find(const char *look_for, software_info *prev)
@@ -566,12 +566,12 @@ void software_list_device::parse()
if (filerr == FILERR_NONE)
{
// parse if no error
- softlist_parser parser(*this, m_errors);
+ softlist_parser parser(*this, m_errors);
m_file.close();
}
else
m_errors.printf("Error opening file: %s\n", filename());
-
+
// indicate that we've been parsed
m_parsed = true;
}
@@ -579,7 +579,7 @@ void software_list_device::parse()
//-------------------------------------------------
// device_validity_check - validate the device
-// configuration
+// configuration
//-------------------------------------------------
void software_list_device::device_validity_check(validity_checker &valid) const
@@ -592,7 +592,7 @@ void software_list_device::device_validity_check(validity_checker &valid) const
// do device validation only in case of validate command
if (strcmp(mconfig().options().command(), CLICOMMAND_VALIDATE) != 0)
return;
-
+
// actually do the validate
const_cast<software_list_device *>(this)->internal_validity_check(valid);
}
@@ -600,7 +600,7 @@ void software_list_device::device_validity_check(validity_checker &valid) const
//-------------------------------------------------
// internal_validity_check - internal helper to
-// check the list
+// check the list
//-------------------------------------------------
void software_list_device::internal_validity_check(validity_checker &valid)
@@ -734,12 +734,12 @@ void software_list_device::internal_validity_check(validity_checker &valid)
softlist_parser::softlist_parser(software_list_device &list, astring &errors)
: m_list(list),
- m_errors(errors),
- m_done(false),
- m_data_accum_expected(false),
- m_current_info(NULL),
- m_current_part(NULL),
- m_pos(POS_ROOT)
+ m_errors(errors),
+ m_done(false),
+ m_data_accum_expected(false),
+ m_current_info(NULL),
+ m_current_part(NULL),
+ m_pos(POS_ROOT)
{
mame_printf_verbose("Parsing %s\n", m_list.m_file.filename());
@@ -805,20 +805,20 @@ void softlist_parser::expat_free(void *ptr)
//-------------------------------------------------
// parse_error - append a parsing error with
-// filename, line and column information
+// filename, line and column information
//-------------------------------------------------
void ATTR_PRINTF(2,3) softlist_parser::parse_error(const char *fmt, ...)
{
- // always start with filename(line.column):
+ // always start with filename(line.column):
m_errors.catprintf("%s(%d.%d): ", filename(), line(), column());
-
+
// append the remainder of the string
va_list va;
va_start(va, fmt);
m_errors.catvprintf(fmt, va);
va_end(va);
-
+
// append a newline at the end
m_errors.cat("\n");
}
@@ -826,7 +826,7 @@ void ATTR_PRINTF(2,3) softlist_parser::parse_error(const char *fmt, ...)
//-------------------------------------------------
// parse_attributes - helper to parse a set of
-// attributes into a list of strings
+// attributes into a list of strings
//-------------------------------------------------
void softlist_parser::parse_attributes(const char **attributes, int numattrs, const char *attrlist[], const char *outlist[])
@@ -835,7 +835,7 @@ void softlist_parser::parse_attributes(const char **attributes, int numattrs, co
for( ; attributes[0]; attributes += 2)
{
int index;
-
+
// look for a match among the attributes provided
for (index = 0; index < numattrs; index++)
if (strcmp(attributes[0], attrlist[index]) == 0)
@@ -844,7 +844,7 @@ void softlist_parser::parse_attributes(const char **attributes, int numattrs, co
outlist[index] = attributes[1];
break;
}
-
+
// if not found, report an unknown attribute
if (index == numattrs)
unknown_attribute(attributes[0]);
@@ -854,7 +854,7 @@ void softlist_parser::parse_attributes(const char **attributes, int numattrs, co
//-------------------------------------------------
// add_rom_entry - append a new ROM entry to the
-// current part's list
+// current part's list
//-------------------------------------------------
void softlist_parser::add_rom_entry(const char *name, const char *hashdata, UINT32 offset, UINT32 length, UINT32 flags)
@@ -903,16 +903,16 @@ void softlist_parser::start_handler(void *data, const char *tagname, const char
case POS_SOFT:
state->parse_soft_start(tagname, attributes);
break;
-
+
case POS_PART:
state->parse_part_start(tagname, attributes);
break;
-
+
case POS_DATA:
state->parse_data_start(tagname, attributes);
break;
}
-
+
// increment the state since this is a tag start
state->m_pos = parse_position(state->m_pos + 1);
}
@@ -949,7 +949,7 @@ void softlist_parser::end_handler(void *data, const char *name)
case POS_DATA:
break;
}
-
+
// stop accumulating
state->m_data_accum_expected = false;
state->m_data_accum.reset();
@@ -991,7 +991,7 @@ void softlist_parser::parse_root_start(const char *tagname, const char **attribu
static const char *attrnames[] = { "name", "description" };
const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
-
+
if (attrvalues[1] != NULL)
m_list.m_description = m_list.add_string(attrvalues[1]);
}
@@ -1002,7 +1002,7 @@ void softlist_parser::parse_root_start(const char *tagname, const char **attribu
//-------------------------------------------------
// parse_main_start - handle tag start within
-// a softwarelist tag
+// a softwarelist tag
//-------------------------------------------------
void softlist_parser::parse_main_start(const char *tagname, const char **attributes)
@@ -1026,7 +1026,7 @@ void softlist_parser::parse_main_start(const char *tagname, const char **attribu
//-------------------------------------------------
// parse_main_start - handle tag start within
-// a software tag
+// a software tag
//-------------------------------------------------
void softlist_parser::parse_soft_start(const char *tagname, const char **attributes)
@@ -1062,20 +1062,20 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
else
parse_error("Incomplete other_info definition");
}
-
+
// <sharedfeat name='' value=''>
else if (strcmp(tagname, "sharedfeat") == 0)
{
static const char *attrnames[] = { "name", "value" };
const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
-
+
if (attrvalues[0] != NULL && attrvalues[1] != NULL)
m_current_info->m_shared_info.append(*global_alloc(feature_list_item(m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete sharedfeat definition");
}
-
+
// <part name='' interface=''>
else if (strcmp(tagname, "part" ) == 0)
{
@@ -1095,7 +1095,7 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
//-------------------------------------------------
// parse_part_start - handle tag start within
-// a part tag
+// a part tag
//-------------------------------------------------
void softlist_parser::parse_part_start(const char *tagname, const char **attributes)
@@ -1113,13 +1113,13 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
static const char *attrnames[] = { "name", "size" };
const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
-
+
if (attrvalues[0] != NULL && attrvalues[1] != NULL && strcmp(attrvalues[0], "") != 0 && strcmp(attrvalues[1], "") != 0)
add_rom_entry(attrvalues[0], NULL, 0, strtol(attrvalues[1], NULL, 0), ROMENTRYTYPE_REGION);
else
parse_error("Incomplete dataarea definition");
}
-
+
// <diskarea name=''>
else if (strcmp(tagname, "diskarea") == 0)
{
@@ -1132,20 +1132,20 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
else
parse_error("Incomplete diskarea definition");
}
-
+
// <feature name='' value=''>
else if (strcmp(tagname, "feature") == 0)
{
static const char *attrnames[] = { "name", "value" };
const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
-
+
if (attrvalues[0] != NULL)
m_current_part->m_featurelist.append(*global_alloc(feature_list_item(m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete feature definition");
}
-
+
// <dipswitch>
else if (strcmp(tagname, "dipswitch") == 0)
;
@@ -1156,7 +1156,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
//-------------------------------------------------
// parse_data_start - handle tag start within a
-// dataarea or diskarea tag
+// dataarea or diskarea tag
//-------------------------------------------------
void softlist_parser::parse_data_start(const char *tagname, const char **attributes)
@@ -1174,7 +1174,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
static const char *attrnames[] = { "name", "size", "crc", "sha1", "offset", "value", "status", "loadflag" };
const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
-
+
const char *name = attrvalues[0];
const char *sizestr = attrvalues[1];
const char *crc = attrvalues[2];
@@ -1237,7 +1237,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
else
parse_error("Incomplete rom definition");
}
-
+
// <rom name='' sha1='' status='' writeable=''>
else if (strcmp(tagname, "disk") == 0)
{
@@ -1262,7 +1262,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
else if (status == NULL || !strcmp(status, "nodump")) // a no_dump chd is not an incomplete entry
parse_error("Incomplete disk definition");
}
-
+
// <dipvalue>
else if (strcmp(tagname, "dipvalue") == 0)
;
@@ -1273,7 +1273,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
//-------------------------------------------------
// parse_soft_end - handle end-of-tag post-
-// processing within the <software> tag
+// processing within the <software> tag
//-------------------------------------------------
void softlist_parser::parse_soft_end(const char *tagname)
@@ -1299,11 +1299,11 @@ void softlist_parser::parse_soft_end(const char *tagname)
assert(m_current_part != NULL);
if (m_current_part == NULL)
return;
-
+
// was any dataarea/rom information encountered? if so, add a terminator
if (m_current_part->romdata() != NULL)
add_rom_entry(NULL, NULL, 0, 0, ROMENTRYTYPE_END);
-
+
// get the info; if present, copy shared data (we assume name/value strings live
// in the string pool and don't need to be reallocated)
if (m_current_info != NULL)
diff --git a/src/emu/softlist.h b/src/emu/softlist.h
index 5a32e67c1c8..b88fabafbf1 100644
--- a/src/emu/softlist.h
+++ b/src/emu/softlist.h
@@ -78,8 +78,8 @@ public:
// construction/destruction
feature_list_item(const char *name = NULL, const char *value = NULL)
: m_next(NULL),
- m_name(name),
- m_value(value) { }
+ m_name(name),
+ m_value(value) { }
// getters
feature_list_item *next() const { return m_next; }
@@ -87,10 +87,10 @@ public:
const char *value() const { return m_value; }
private:
- // internal state
+ // internal state
feature_list_item * m_next;
- const char * m_name;
- const char * m_value;
+ const char * m_name;
+ const char * m_value;
};
@@ -101,7 +101,7 @@ class software_part
{
friend class softlist_parser;
friend class simple_list<software_part>;
-
+
public:
// construction/destruction
software_part(software_info &info, const char *name = NULL, const char *interface = NULL);
@@ -121,10 +121,10 @@ public:
private:
// internal state
- software_part * m_next;
- software_info & m_info;
- const char * m_name;
- const char * m_interface;
+ software_part * m_next;
+ software_info & m_info;
+ const char * m_name;
+ const char * m_interface;
simple_list<feature_list_item> m_featurelist;
dynamic_array<rom_entry> m_romdata;
};
@@ -137,11 +137,11 @@ class software_info
{
friend class softlist_parser;
friend class simple_list<software_info>;
-
+
public:
// construction/destruction
software_info(software_list_device &list, const char *name, const char *parent, const char *supported);
-
+
// getters
software_info *next() const { return m_next; }
software_list_device &list() const { return m_list; }
@@ -156,24 +156,24 @@ public:
int num_parts() const { return m_partdata.count(); }
software_part *first_part() const { return m_partdata.first(); }
software_part *last_part() const { return m_partdata.last(); }
-
+
// additional operations
software_part *find_part(const char *partname, const char *interface = NULL);
bool has_multiple_parts(const char *interface) const;
private:
// internal state
- software_info * m_next;
- software_list_device & m_list;
- UINT32 m_supported;
- const char * m_shortname;
- const char * m_longname;
- const char * m_parentname;
- const char * m_year; // Copyright year on title screen, actual release dates can be tracked in external resources
- const char * m_publisher;
+ software_info * m_next;
+ software_list_device & m_list;
+ UINT32 m_supported;
+ const char * m_shortname;
+ const char * m_longname;
+ const char * m_parentname;
+ const char * m_year; // Copyright year on title screen, actual release dates can be tracked in external resources
+ const char * m_publisher;
simple_list<feature_list_item> m_other_info; // Here we store info like developer, serial #, etc. which belong to the software entry as a whole
simple_list<feature_list_item> m_shared_info; // Here we store info like TV standard compatibility, or add-on requirements, etc. which get inherited
- // by each part of this software entry (after loading these are stored in partdata->featurelist)
+ // by each part of this software entry (after loading these are stored in partdata->featurelist)
simple_list<software_part> m_partdata;
};
@@ -228,17 +228,17 @@ protected:
virtual void device_validity_check(validity_checker &valid) const ATTR_COLD;
// configuration state
- astring m_list_name;
+ astring m_list_name;
softlist_type m_list_type;
const char * m_filter;
// internal state
- bool m_parsed;
- emu_file m_file;
- const char * m_description;
- astring m_errors;
- simple_list<software_info> m_infolist;
- const_string_pool m_stringpool;
+ bool m_parsed;
+ emu_file m_file;
+ const char * m_description;
+ astring m_errors;
+ simple_list<software_info> m_infolist;
+ const_string_pool m_stringpool;
};
diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c
index 52c82e30187..9127251dc50 100644
--- a/src/emu/sound/aica.c
+++ b/src/emu/sound/aica.c
@@ -1400,10 +1400,10 @@ void aica_device::device_start()
// set up the IRQ callbacks
m_irq_cb.resolve_safe();
- m_main_irq_cb.resolve_safe();
+ m_main_irq_cb.resolve_safe();
m_stream = machine().sound().stream_alloc(*this, 0, 2, 44100);
-
+
// save state
save_item(NAME(m_IrqTimA));
save_item(NAME(m_IrqTimBC));
@@ -1416,7 +1416,7 @@ void aica_device::device_start()
save_item(NAME(m_LPANTABLE),0x20000);
save_item(NAME(m_RPANTABLE),0x20000);
save_item(NAME(m_TimPris),3);
- save_item(NAME(m_TimCnt),3);
+ save_item(NAME(m_TimCnt),3);
}
void aica_device::set_ram_base(void *base, int size)
@@ -1489,40 +1489,40 @@ aica_device::aica_device(const machine_config &mconfig, const char *tag, device_
m_bufferr(NULL),
m_length(0),
m_RBUFDST(NULL)
-
+
{
- memset(&m_udata.data, 0, sizeof(m_udata.data));
- memset(m_EFSPAN, 0, sizeof(m_EFSPAN));
- memset(m_Slots, 0, sizeof(m_Slots));
- memset(m_RINGBUF, 0, sizeof(m_RINGBUF));
- memset(m_MidiStack, 0, sizeof(m_MidiStack));
-
- memset(m_LPANTABLE, 0, sizeof(m_LPANTABLE));
- memset(m_RPANTABLE, 0, sizeof(m_RPANTABLE));
-
- memset(m_TimPris, 0, sizeof(m_TimPris));
- memset(m_TimCnt, 0, sizeof(m_TimCnt));
-
- memset(&m_dma, 0, sizeof(m_dma));
-
- memset(m_ARTABLE, 0, sizeof(m_ARTABLE));
- memset(m_DRTABLE, 0, sizeof(m_DRTABLE));
-
- memset(&m_DSP, 0, sizeof(m_DSP));
-
- memset(m_EG_TABLE, 0, sizeof(m_EG_TABLE));
- memset(m_PLFO_TRI, 0, sizeof(m_PLFO_TRI));
- memset(m_PLFO_SQR, 0, sizeof(m_PLFO_SQR));
- memset(m_PLFO_SAW, 0, sizeof(m_PLFO_SAW));
- memset(m_PLFO_NOI, 0, sizeof(m_PLFO_NOI));
-
- memset(m_ALFO_TRI, 0, sizeof(m_ALFO_TRI));
- memset(m_ALFO_SQR, 0, sizeof(m_ALFO_SQR));
- memset(m_ALFO_SAW, 0, sizeof(m_ALFO_SAW));
- memset(m_ALFO_NOI, 0, sizeof(m_ALFO_NOI));
-
- memset(m_PSCALES, 0, sizeof(m_PSCALES));
- memset(m_ASCALES, 0, sizeof(m_ASCALES));
+ memset(&m_udata.data, 0, sizeof(m_udata.data));
+ memset(m_EFSPAN, 0, sizeof(m_EFSPAN));
+ memset(m_Slots, 0, sizeof(m_Slots));
+ memset(m_RINGBUF, 0, sizeof(m_RINGBUF));
+ memset(m_MidiStack, 0, sizeof(m_MidiStack));
+
+ memset(m_LPANTABLE, 0, sizeof(m_LPANTABLE));
+ memset(m_RPANTABLE, 0, sizeof(m_RPANTABLE));
+
+ memset(m_TimPris, 0, sizeof(m_TimPris));
+ memset(m_TimCnt, 0, sizeof(m_TimCnt));
+
+ memset(&m_dma, 0, sizeof(m_dma));
+
+ memset(m_ARTABLE, 0, sizeof(m_ARTABLE));
+ memset(m_DRTABLE, 0, sizeof(m_DRTABLE));
+
+ memset(&m_DSP, 0, sizeof(m_DSP));
+
+ memset(m_EG_TABLE, 0, sizeof(m_EG_TABLE));
+ memset(m_PLFO_TRI, 0, sizeof(m_PLFO_TRI));
+ memset(m_PLFO_SQR, 0, sizeof(m_PLFO_SQR));
+ memset(m_PLFO_SAW, 0, sizeof(m_PLFO_SAW));
+ memset(m_PLFO_NOI, 0, sizeof(m_PLFO_NOI));
+
+ memset(m_ALFO_TRI, 0, sizeof(m_ALFO_TRI));
+ memset(m_ALFO_SQR, 0, sizeof(m_ALFO_SQR));
+ memset(m_ALFO_SAW, 0, sizeof(m_ALFO_SAW));
+ memset(m_ALFO_NOI, 0, sizeof(m_ALFO_NOI));
+
+ memset(m_PSCALES, 0, sizeof(m_PSCALES));
+ memset(m_ASCALES, 0, sizeof(m_ASCALES));
}
diff --git a/src/emu/sound/aica.h b/src/emu/sound/aica.h
index 25bcc011155..321bc5257d1 100644
--- a/src/emu/sound/aica.h
+++ b/src/emu/sound/aica.h
@@ -82,7 +82,7 @@ public:
static void set_roffset(device_t &device, int roffset) { downcast<aica_device &>(device).m_roffset = roffset; }
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<aica_device &>(device).m_irq_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_main_irq_callback(device_t &device, _Object object) { return downcast<aica_device &>(device).m_main_irq_cb.set_callback(object); }
-
+
// AICA register access
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
@@ -90,7 +90,7 @@ public:
// MIDI I/O access
DECLARE_WRITE16_MEMBER( midi_in );
DECLARE_READ16_MEMBER( midi_out_r );
-
+
void set_ram_base(void *base, int size);
protected:
@@ -146,7 +146,7 @@ private:
UINT16 data[0xc0/2];
UINT8 datab[0xc0];
} m_udata;
-
+
UINT16 m_IRQL, m_IRQR;
UINT16 m_EFSPAN[0x48];
AICA_SLOT m_Slots[64];
@@ -193,9 +193,9 @@ private:
stream_sample_t *m_bufferl;
stream_sample_t *m_bufferr;
-
+
int m_length;
-
+
signed short *m_RBUFDST; //this points to where the sample will be stored in the RingBuf
INT32 m_EG_TABLE[0x400];
int m_PLFO_TRI[256],m_PLFO_SQR[256],m_PLFO_SAW[256],m_PLFO_NOI[256];
diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c
index e42d04af8b8..bce6bad9f21 100644
--- a/src/emu/sound/ay8910.c
+++ b/src/emu/sound/ay8910.c
@@ -422,18 +422,17 @@ INLINE void build_single_table(double rl, const ay_ym_param *par, int normalize,
INLINE void build_resisor_table(const ay_ym_param *par, INT32 *tab, int zero_is_off)
{
- int j;
-
- for (j=0; j < par->res_count; j++)
- {
-
- if (zero_is_off && j == 0)
- {
- tab[j] = 1e6;
- }
- else
- tab[j] = par->res[j];
- }
+ int j;
+
+ for (j=0; j < par->res_count; j++)
+ {
+ if (zero_is_off && j == 0)
+ {
+ tab[j] = 1e6;
+ }
+ else
+ tab[j] = par->res[j];
+ }
}
@@ -605,21 +604,21 @@ static STREAM_UPDATE( ay8910_update )
psg->count_noise++;
if (psg->count_noise >= NOISE_PERIOD(psg))
{
- /* toggle the prescaler output. Noise is no different to
- * channels.
- */
- psg->count_noise = 0;
- psg->prescale_noise ^= 1;
-
- if ( psg->prescale_noise)
- {
- /* The Random Number Generator of the 8910 is a 17-bit shift */
- /* register. The input to the shift register is bit0 XOR bit3 */
- /* (bit0 is the output). This was verified on AY-3-8910 and YM2149 chips. */
-
- psg->rng ^= (((psg->rng & 1) ^ ((psg->rng >> 3) & 1)) << 17);
- psg->rng >>= 1;
- }
+ /* toggle the prescaler output. Noise is no different to
+ * channels.
+ */
+ psg->count_noise = 0;
+ psg->prescale_noise ^= 1;
+
+ if ( psg->prescale_noise)
+ {
+ /* The Random Number Generator of the 8910 is a 17-bit shift */
+ /* register. The input to the shift register is bit0 XOR bit3 */
+ /* (bit0 is the output). This was verified on AY-3-8910 and YM2149 chips. */
+
+ psg->rng ^= (((psg->rng & 1) ^ ((psg->rng >> 3) & 1)) << 17);
+ psg->rng >>= 1;
+ }
}
for (chan = 0; chan < NUM_CHANNELS; chan++)
@@ -704,22 +703,22 @@ static void build_mixer_table(ay8910_context *psg)
normalize = 1;
}
- if ((psg->intf->flags & AY8910_RESISTOR_OUTPUT) != 0)
- {
- for (chan=0; chan < NUM_CHANNELS; chan++)
- {
- build_resisor_table(psg->par, psg->vol_table[chan], psg->zero_is_off);
- build_resisor_table(psg->par_env, psg->env_table[chan], 0);
- }
- }
- else
- {
- for (chan=0; chan < NUM_CHANNELS; chan++)
- {
- build_single_table(psg->intf->res_load[chan], psg->par, normalize, psg->vol_table[chan], psg->zero_is_off);
- build_single_table(psg->intf->res_load[chan], psg->par_env, normalize, psg->env_table[chan], 0);
- }
- }
+ if ((psg->intf->flags & AY8910_RESISTOR_OUTPUT) != 0)
+ {
+ for (chan=0; chan < NUM_CHANNELS; chan++)
+ {
+ build_resisor_table(psg->par, psg->vol_table[chan], psg->zero_is_off);
+ build_resisor_table(psg->par_env, psg->env_table[chan], 0);
+ }
+ }
+ else
+ {
+ for (chan=0; chan < NUM_CHANNELS; chan++)
+ {
+ build_single_table(psg->intf->res_load[chan], psg->par, normalize, psg->vol_table[chan], psg->zero_is_off);
+ build_single_table(psg->intf->res_load[chan], psg->par_env, normalize, psg->env_table[chan], 0);
+ }
+ }
/*
* The previous implementation added all three channels up instead of averaging them.
* The factor of 3 will force the same levels if normalizing is used.
diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c
index 7f924ebece0..2b8a42d0184 100644
--- a/src/emu/sound/cdp1869.c
+++ b/src/emu/sound/cdp1869.c
@@ -369,7 +369,7 @@ MACHINE_CONFIG_END
machine_config_constructor cdp1869_device::device_mconfig_additions() const
{
- return MACHINE_CONFIG_NAME( cdp1869 );
+ return MACHINE_CONFIG_NAME( cdp1869 );
}
diff --git a/src/emu/sound/cdp1869.h b/src/emu/sound/cdp1869.h
index 39cefd391c7..0c9b1ee1155 100644
--- a/src/emu/sound/cdp1869.h
+++ b/src/emu/sound/cdp1869.h
@@ -202,7 +202,7 @@ public:
static void static_set_char_ram_write(device_t &device, cdp1869_char_ram_write_delegate callback) { downcast<cdp1869_device &>(device).m_out_char_ram_func = callback; }
static void static_set_pcb_read(device_t &device, cdp1869_pcb_read_delegate callback) { downcast<cdp1869_device &>(device).m_in_pcb_func = callback; }
static void static_set_color_clock(device_t &device, int color_clock) { downcast<cdp1869_device &>(device).m_color_clock = color_clock; }
-
+
DECLARE_PALETTE_INIT(cdp1869);
virtual DECLARE_ADDRESS_MAP(io_map, 8);
@@ -228,7 +228,7 @@ public:
protected:
// device-level overrides
- virtual machine_config_constructor device_mconfig_additions() const;
+ virtual machine_config_constructor device_mconfig_additions() const;
virtual void device_start();
virtual void device_post_load();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
diff --git a/src/emu/sound/dmadac.c b/src/emu/sound/dmadac.c
index 3b1f23dceda..7dab612ea64 100644
--- a/src/emu/sound/dmadac.c
+++ b/src/emu/sound/dmadac.c
@@ -46,7 +46,6 @@
void dmadac_sound_device::device_start()
{
-
/* allocate a clear a buffer */
m_buffer = auto_alloc_array_clear(machine(), INT16, BUFFER_SIZE);
@@ -186,7 +185,7 @@ void dmadac_set_volume(dmadac_sound_device **devlist, UINT8 num_channels, UINT16
/* flush out as much data as we can */
for (i = 0; i < num_channels; i++)
- {
+ {
devlist[i]->set_volume(volume);
}
}
diff --git a/src/emu/sound/dmadac.h b/src/emu/sound/dmadac.h
index 917f6fb5ce0..65bfe16b3ff 100644
--- a/src/emu/sound/dmadac.h
+++ b/src/emu/sound/dmadac.h
@@ -24,7 +24,7 @@ public:
void enable(UINT8 enable);
void set_frequency(double frequency);
void set_volume(UINT16 volume);
-
+
protected:
// device-level overrides
virtual void device_start();
diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c
index 1bbf3cc411a..5b1433fdfd2 100644
--- a/src/emu/sound/es5503.c
+++ b/src/emu/sound/es5503.c
@@ -235,7 +235,7 @@ void es5503_device::device_start()
m_irq_func.resolve_safe();
m_adc_func.resolve_safe(0);
-
+
rege0 = 0xff;
for (osc = 0; osc < 32; osc++)
diff --git a/src/emu/sound/es5503.h b/src/emu/sound/es5503.h
index 17189eb19a6..1d649713b1d 100644
--- a/src/emu/sound/es5503.h
+++ b/src/emu/sound/es5503.h
@@ -13,7 +13,7 @@
#define MCFG_ES5503_IRQ_FUNC(_write) \
devcb = &es5503_device::static_set_irqf(*device, DEVCB2_##_write);
-
+
#define MCFG_ES5503_ADC_FUNC(_read) \
devcb = &es5503_device::static_set_adcf(*device, DEVCB2_##_read);
@@ -31,7 +31,7 @@ public:
template<class _Object> static devcb2_base &static_set_irqf(device_t &device, _Object object) { return downcast<es5503_device &>(device).m_irq_func.set_callback(object); }
template<class _Object> static devcb2_base &static_set_adcf(device_t &device, _Object object) { return downcast<es5503_device &>(device).m_adc_func.set_callback(object); }
-
+
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -53,8 +53,8 @@ protected:
const address_space_config m_space_config;
- devcb2_write_line m_irq_func;
- devcb2_read8 m_adc_func;
+ devcb2_write_line m_irq_func;
+ devcb2_read8 m_adc_func;
emu_timer *m_sync_timer;
diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c
index 12fe8c7e18a..1fc4e175c8a 100644
--- a/src/emu/sound/ics2115.c
+++ b/src/emu/sound/ics2115.c
@@ -30,7 +30,7 @@ void ics2115_device::device_start()
m_timer[0].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ics2115_device::timer_cb_0),this), this);
m_timer[1].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ics2115_device::timer_cb_1),this), this);
m_stream = machine().sound().stream_alloc(*this, 0, 2, 33075);
-
+
m_irq_cb.resolve_safe();
//Exact formula as per patent 5809466
diff --git a/src/emu/sound/k007232.h b/src/emu/sound/k007232.h
index 17490780d80..6da2790a24b 100644
--- a/src/emu/sound/k007232.h
+++ b/src/emu/sound/k007232.h
@@ -12,14 +12,14 @@
#define MCFG_K007232_PORT_WRITE_HANDLER(_devcb) \
devcb = &k007232_device::set_port_write_handler(*device, DEVCB2_##_devcb);
-
+
class k007232_device : public device_t,
public device_sound_interface
{
public:
k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k007232_device() {}
-
+
template<class _Object> static devcb2_base &set_port_write_handler(device_t &device, _Object object) { return downcast<k007232_device &>(device).m_port_write_handler.set_callback(object); }
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/emu/sound/mos6560.h b/src/emu/sound/mos6560.h
index 68dc107518e..53de3ba8a0c 100644
--- a/src/emu/sound/mos6560.h
+++ b/src/emu/sound/mos6560.h
@@ -138,7 +138,7 @@ class mos6560_device : public device_t,
public:
mos6560_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
template<class _Object> static devcb2_base &set_potx_rd_callback(device_t &device, _Object object) { return downcast<mos6560_device &>(device).m_read_potx.set_callback(object); }
template<class _Object> static devcb2_base &set_poty_rd_callback(device_t &device, _Object object) { return downcast<mos6560_device &>(device).m_read_poty.set_callback(object); }
diff --git a/src/emu/sound/msm5205.h b/src/emu/sound/msm5205.h
index 6d034da3de5..2b11592e39b 100644
--- a/src/emu/sound/msm5205.h
+++ b/src/emu/sound/msm5205.h
@@ -35,7 +35,7 @@
#define MCFG_MSM6585_VCLK_CB(_devcb) \
devcb = &msm6585_device::set_vclk_callback(*device, DEVCB2_##_devcb);
-
+
class msm5205_device : public device_t,
public device_sound_interface
@@ -44,7 +44,7 @@ public:
msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
msm5205_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
~msm5205_device() {}
-
+
static void set_prescaler_selector(device_t &device, int select) { downcast<msm5205_device &>(device).m_select = select; }
template<class _Object> static devcb2_base &set_vclk_callback(device_t &device, _Object object) { return downcast<msm5205_device &>(device).m_vclk_cb.set_callback(object); }
diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c
index 71a9a89b875..fadae1a6ae7 100644
--- a/src/emu/sound/msm5232.c
+++ b/src/emu/sound/msm5232.c
@@ -26,7 +26,7 @@ void msm5232_device::device_start()
{
int rate = clock()/CLOCK_RATE_DIVIDER;
int voicenum;
-
+
m_gate_handler_cb.resolve();
init(clock(), rate);
diff --git a/src/emu/sound/msm5232.h b/src/emu/sound/msm5232.h
index ad5b3e92e2b..febcca4f1f2 100644
--- a/src/emu/sound/msm5232.h
+++ b/src/emu/sound/msm5232.h
@@ -6,7 +6,7 @@
#define MCFG_MSM5232_SET_CAPACITORS(_a, _b, _c, _d, _e, _f, _g, _h) \
msm5232_device::static_set_capacitors(*device, _a, _b, _c, _d, _e, _f, _g, _h);
-
+
#define MCFG_MSM5232_GATE_HANDLER_CB(_devcb) \
devcb = &msm5232_device::set_gate_handler_callback(*device, DEVCB2_##_devcb);
@@ -45,7 +45,7 @@ class msm5232_device : public device_t,
public:
msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~msm5232_device() {}
-
+
static void static_set_capacitors(device_t &device, double cap1, double cap2, double cap3, double cap4, double cap5, double cap6, double cap7, double cap8);
template<class _Object> static devcb2_base &set_gate_handler_callback(device_t &device, _Object object) { return downcast<msm5232_device &>(device).m_gate_handler_cb.set_callback(object); }
diff --git a/src/emu/sound/qs1000.c b/src/emu/sound/qs1000.c
index 59a7be87f1e..4034e94e48f 100644
--- a/src/emu/sound/qs1000.c
+++ b/src/emu/sound/qs1000.c
@@ -239,7 +239,7 @@ void qs1000_device::device_start()
m_out_p1_cb.resolve_safe();
m_out_p2_cb.resolve_safe();
m_out_p3_cb.resolve_safe();
-
+
//m_serial_w_cb.resolve_safe();
m_cpu->i8051_set_serial_rx_callback(read8_delegate(FUNC(qs1000_device::data_to_i8052),this));
diff --git a/src/emu/sound/qs1000.h b/src/emu/sound/qs1000.h
index 5cf0623d5ae..6f8c1ac1977 100644
--- a/src/emu/sound/qs1000.h
+++ b/src/emu/sound/qs1000.h
@@ -38,9 +38,9 @@
#define MCFG_QS1000_OUT_P3_CB(_devcb) \
devcb = &qs1000_device::set_out_p3_callback(*device, DEVCB2_##_devcb);
-
+
/*#define MCFG_QS1000_SERIAL_W_CB(_devcb) \
- devcb = &qs1000_device::set_serial_w_callback(*device, DEVCB2_##_devcb);*/
+ devcb = &qs1000_device::set_serial_w_callback(*device, DEVCB2_##_devcb);*/
//**************************************************************************
// TYPE DEFINITIONS
@@ -67,7 +67,7 @@ public:
template<class _Object> static devcb2_base &set_out_p2_callback(device_t &device, _Object object) { return downcast<qs1000_device &>(device).m_out_p2_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_out_p3_callback(device_t &device, _Object object) { return downcast<qs1000_device &>(device).m_out_p3_cb.set_callback(object); }
//template<class _Object> static devcb2_base &set_serial_w_callback(device_t &device, _Object object) { return downcast<qs1000_device &>(device).m_serial_w_cb.set_callback(object); }
-
+
// external
void serial_in(UINT8 data);
void set_irq(int state);
@@ -113,7 +113,7 @@ public:
void set_voice_regs(int ch);
bool m_external_rom;
-
+
// Callbacks
devcb2_read8 m_in_p1_cb;
devcb2_read8 m_in_p2_cb;
diff --git a/src/emu/sound/qsound.c b/src/emu/sound/qsound.c
index 2a2e8fb9c0b..51ac2e769b6 100644
--- a/src/emu/sound/qsound.c
+++ b/src/emu/sound/qsound.c
@@ -11,7 +11,7 @@
Many thanks to CAB (the author of Amuse), without whom this probably would
never have been finished.
-
+
TODO:
- hook up the DSP!
- is master volume really linear?
@@ -116,7 +116,7 @@ void qsound_device::device_start()
// create pan table
for (int i = 0; i < 33; i++)
m_pan_table[i] = (int)((256 / sqrt(32.0)) * sqrt((double)i));
-
+
// init sound regs
memset(m_channel, 0, sizeof(m_channel));
@@ -165,18 +165,18 @@ void qsound_device::sound_stream_update(sound_stream &stream, stream_sample_t **
m_channel[ch].address += (m_channel[ch].step_ptr >> 12);
m_channel[ch].step_ptr &= 0xfff;
m_channel[ch].step_ptr += m_channel[ch].freq;
-
+
if (m_channel[ch].address >= m_channel[ch].end)
{
if (m_channel[ch].loop)
{
// Reached the end, restart the loop
m_channel[ch].address -= m_channel[ch].loop;
-
+
// Make sure we don't overflow (what does the real chip do in this case?)
if (m_channel[ch].address >= m_channel[ch].end)
m_channel[ch].address = m_channel[ch].end - m_channel[ch].loop;
-
+
m_channel[ch].address &= 0xffff;
}
else
@@ -186,7 +186,7 @@ void qsound_device::sound_stream_update(sound_stream &stream, stream_sample_t **
break;
}
}
-
+
INT8 sample = read_sample(m_channel[ch].bank | m_channel[ch].address);
*lmix++ += ((sample * m_channel[ch].lvol * m_channel[ch].vol) >> 14);
*rmix++ += ((sample * m_channel[ch].rvol * m_channel[ch].vol) >> 14);
@@ -237,7 +237,7 @@ void qsound_device::write_data(UINT8 address, UINT16 data)
ch = address >> 3;
reg = address & 7;
}
-
+
// >= 0x80 is probably for the dsp?
else if (address < 0x90)
{
@@ -312,12 +312,12 @@ void qsound_device::write_data(UINT8 address, UINT16 data)
pan = 0x20;
if (pan < 0)
pan = 0;
-
+
m_channel[ch].rvol = m_pan_table[pan];
m_channel[ch].lvol = m_pan_table[0x20 - pan];
break;
}
-
+
case 9:
// unknown
break;
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 5d429d8442e..12553092b23 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -173,7 +173,7 @@ scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_
memset(m_MidiStack, 0, sizeof(m_MidiStack));
memset(m_LPANTABLE, 0, sizeof(m_LPANTABLE));
memset(m_RPANTABLE, 0, sizeof(m_RPANTABLE));
- memset(m_TimPris, 0, sizeof(m_TimPris));
+ memset(m_TimPris, 0, sizeof(m_TimPris));
memset(m_ARTABLE, 0, sizeof(m_ARTABLE));
memset(m_DRTABLE, 0, sizeof(m_DRTABLE));
memset(m_EG_TABLE, 0, sizeof(m_EG_TABLE));
@@ -187,8 +187,8 @@ scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_
memset(m_ALFO_NOI, 0, sizeof(m_ALFO_NOI));
memset(m_PSCALES, 0, sizeof(m_PSCALES));
memset(m_ASCALES, 0, sizeof(m_ASCALES));
- memset(&m_Slots, 0, sizeof(m_Slots));
- memset(&m_udata.data, 0, sizeof(m_udata.data));
+ memset(&m_Slots, 0, sizeof(m_Slots));
+ memset(&m_udata.data, 0, sizeof(m_udata.data));
m_TimCnt[0] = 0;
m_TimCnt[1] = 0;
m_TimCnt[2] = 0;
@@ -205,7 +205,7 @@ void scsp_device::device_start()
// set up the IRQ callbacks
m_irq_cb.resolve_safe();
- m_main_irq_cb.resolve_safe();
+ m_main_irq_cb.resolve_safe();
m_stream = machine().sound().stream_alloc(*this, 0, 2, 44100, this);
}
@@ -219,7 +219,7 @@ void scsp_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
m_bufferl = outputs[0];
m_bufferr = outputs[1];
m_length = samples;
- DoMasterSamples(samples);
+ DoMasterSamples(samples);
}
unsigned char scsp_device::DecodeSCI(unsigned char irq)
@@ -937,7 +937,7 @@ void scsp_device::w16(address_space &space,unsigned int addr,unsigned short val)
*((unsigned short *) (m_DSP.COEF+(addr-0x700)/2))=val;
else if(addr<0x7c0)
*((unsigned short *) (m_DSP.MADRS+(addr-0x780)/2))=val;
- else if(addr<0x800) // MADRS is mirrored twice
+ else if(addr<0x800) // MADRS is mirrored twice
*((unsigned short *) (m_DSP.MADRS+(addr-0x7c0)/2))=val;
else if(addr<0xC00)
{
diff --git a/src/emu/sound/scsp.h b/src/emu/sound/scsp.h
index cd66eb8f6c8..7c7e200cf3f 100644
--- a/src/emu/sound/scsp.h
+++ b/src/emu/sound/scsp.h
@@ -21,10 +21,10 @@
#define MCFG_SCSP_MAIN_IRQ_CB(_devcb) \
devcb = &scsp_device::set_main_irq_callback(*device, DEVCB2_##_devcb);
-
+
enum SCSP_STATE {SCSP_ATTACK,SCSP_DECAY1,SCSP_DECAY2,SCSP_RELEASE};
-
+
struct SCSP_EG_t
{
int volume; //
@@ -56,7 +56,7 @@ struct SCSP_SLOT
UINT16 data[0x10]; //only 0x1a bytes used
UINT8 datab[0x20];
} udata;
-
+
UINT8 Backwards; //the wave is playing backwards
UINT8 active; //this slot is currently playing
UINT8 *base; //samples base address
@@ -76,7 +76,7 @@ class scsp_device : public device_t,
{
public:
scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void set_roffset(device_t &device, int roffset) { downcast<scsp_device &>(device).m_roffset = roffset; }
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<scsp_device &>(device).m_irq_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_main_irq_callback(device_t &device, _Object object) { return downcast<scsp_device &>(device).m_main_irq_cb.set_callback(object); }
@@ -88,7 +88,7 @@ public:
// MIDI I/O access (used for comms on Model 2/3)
DECLARE_WRITE16_MEMBER( midi_in );
DECLARE_READ16_MEMBER( midi_out_r );
-
+
void set_ram_base(void *base);
protected:
@@ -97,18 +97,18 @@ protected:
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
-
+
private:
int m_roffset; /* offset in the region */
- devcb2_write8 m_irq_cb; /* irq callback */
+ devcb2_write8 m_irq_cb; /* irq callback */
devcb2_write_line m_main_irq_cb;
-
+
union
{
UINT16 data[0x30/2];
UINT8 datab[0x30];
} m_udata;
-
+
SCSP_SLOT m_Slots[32];
signed short m_RINGBUF[128];
unsigned char m_BUFPTR;
@@ -130,7 +130,7 @@ private:
UINT8 m_MidiOutW, m_MidiOutR;
UINT8 m_MidiStack[32];
UINT8 m_MidiW, m_MidiR;
-
+
INT32 m_EG_TABLE[0x400];
int m_LPANTABLE[0x10000];
@@ -158,20 +158,20 @@ private:
int m_ARTABLE[64], m_DRTABLE[64];
SCSPDSP m_DSP;
-
+
stream_sample_t *m_bufferl;
stream_sample_t *m_bufferr;
int m_length;
signed short *m_RBUFDST; //this points to where the sample will be stored in the RingBuf
-
+
//LFO
int m_PLFO_TRI[256], m_PLFO_SQR[256], m_PLFO_SAW[256], m_PLFO_NOI[256];
int m_ALFO_TRI[256], m_ALFO_SQR[256], m_ALFO_SAW[256], m_ALFO_NOI[256];
int m_PSCALES[8][256];
int m_ASCALES[8][256];
-
+
void exec_dma(address_space &space); /*state DMA transfer function*/
unsigned char DecodeSCI(unsigned char irq);
void CheckPendingIRQ();
@@ -198,7 +198,7 @@ private:
unsigned short r16(address_space &space, unsigned int addr);
inline INT32 UpdateSlot(SCSP_SLOT *slot);
void DoMasterSamples(int nsamples);
-
+
//LFO
void LFO_Init();
signed int PLFO_Step(SCSP_LFO_t *LFO);
diff --git a/src/emu/sound/sp0256.h b/src/emu/sound/sp0256.h
index 2ea19f29c65..2f93af5836b 100644
--- a/src/emu/sound/sp0256.h
+++ b/src/emu/sound/sp0256.h
@@ -74,10 +74,10 @@ class sp0256_device : public device_t,
public:
sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~sp0256_device() { }
-
+
template<class _Object> static devcb2_base &set_data_request_callback(device_t &device, _Object object) { return downcast<sp0256_device &>(device).m_drq_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_standby_callback(device_t &device, _Object object) { return downcast<sp0256_device &>(device).m_sby_cb.set_callback(object); }
-
+
DECLARE_WRITE8_MEMBER(ald_w);
DECLARE_READ_LINE_MEMBER(lrq_r);
DECLARE_READ_LINE_MEMBER(sby_r);
@@ -101,8 +101,8 @@ private:
void micro();
sound_stream *m_stream; /* MAME core sound stream */
- devcb2_write_line m_drq_cb; /* Data request callback */
- devcb2_write_line m_sby_cb; /* Standby callback */
+ devcb2_write_line m_drq_cb; /* Data request callback */
+ devcb2_write_line m_sby_cb; /* Standby callback */
int m_sby_line; /* Standby line state */
int m_cur_len; /* Fullness of current sound buffer. */
diff --git a/src/emu/sound/spu.c b/src/emu/sound/spu.c
index 808b1180ae8..f6ee4e95a49 100644
--- a/src/emu/sound/spu.c
+++ b/src/emu/sound/spu.c
@@ -138,13 +138,13 @@ static const unsigned int /*sound_buffer_size=65536*4,*/
output_buffer_size=65536/8/*,
- sample_loop_cache_pool_size=64,
- sample_loop_cache_extend_size=64,
- sample_cache_pool_size=64,
- sample_cache_extend_size=64,
+ sample_loop_cache_pool_size=64,
+ sample_loop_cache_extend_size=64,
+ sample_cache_pool_size=64,
+ sample_cache_extend_size=64,
- stream_marker_pool_size=64,
- stream_marker_extend_size=64*/;
+ stream_marker_pool_size=64,
+ stream_marker_extend_size=64*/;
//
//
diff --git a/src/emu/sound/tc8830f.c b/src/emu/sound/tc8830f.c
index 07a8d9ca27c..3ef03fb8578 100644
--- a/src/emu/sound/tc8830f.c
+++ b/src/emu/sound/tc8830f.c
@@ -111,22 +111,22 @@ void tc8830f_device::sound_stream_update(sound_stream &stream, stream_sample_t *
m_delta -= 8;
if (m_delta <= 0)
m_delta = 1;
-
+
// determine direction
if (bit)
m_output += m_delta;
else
m_output -= m_delta;
-
+
if (m_output > 32767)
m_output = 32767;
else if (m_output < -32768)
m_output = -32768;
-
+
m_prevbits = m_prevbits << 1 | bit;
mix = m_output;
}
-
+
outputs[0][i] = mix;
}
}
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c
index 68788ae5861..11305f49533 100644
--- a/src/emu/sound/upd7759.c
+++ b/src/emu/sound/upd7759.c
@@ -220,7 +220,7 @@ void upd775x_device::device_start()
void upd7759_device::device_start()
{
m_drqcallback.resolve_safe();
-
+
/* chip configuration */
m_sample_offset_shift = (type() == UPD7759) ? 1 : 0;
@@ -295,7 +295,7 @@ void upd7759_device::device_start()
void upd7756_device::device_start()
{
m_drqcallback.resolve_safe();
-
+
/* chip configuration */
m_sample_offset_shift = (type() == UPD7759) ? 1 : 0;
diff --git a/src/emu/sound/upd7759.h b/src/emu/sound/upd7759.h
index ae315315bbb..a711df62a31 100644
--- a/src/emu/sound/upd7759.h
+++ b/src/emu/sound/upd7759.h
@@ -22,7 +22,7 @@ public:
~upd775x_device() {}
template<class _Object> static devcb2_base &set_drq_callback(device_t &device, _Object object) { return downcast<upd775x_device &>(device).m_drqcallback.set_callback(object); }
-
+
void set_bank_base(offs_t base);
void reset_w(UINT8 data);
@@ -82,7 +82,7 @@ protected:
UINT32 m_rommask; /* maximum address offset */
devcb2_write_line m_drqcallback;
-
+
void update_adpcm(int data);
void advance_state();
};
diff --git a/src/emu/sound/votrax.h b/src/emu/sound/votrax.h
index 85acea086d2..38a31ae4d58 100644
--- a/src/emu/sound/votrax.h
+++ b/src/emu/sound/votrax.h
@@ -38,7 +38,7 @@ public:
votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _Object> static devcb2_base &set_request_callback(device_t &device, _Object object) { return downcast<votrax_sc01_device &>(device).m_request_cb.set_callback(object); }
-
+
// writers
DECLARE_WRITE8_MEMBER( write );
DECLARE_WRITE8_MEMBER( inflection_w );
@@ -73,7 +73,7 @@ private:
UINT8 m_phoneme; // 6-bit phoneme value
// outputs
- devcb2_write_line m_request_cb; // callback for request
+ devcb2_write_line m_request_cb; // callback for request
UINT8 m_request_state; // request as seen to the outside world
UINT8 m_internal_request; // request managed by stream timing
diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c
index b2b7797a88a..c869a6f689a 100644
--- a/src/emu/sound/ymf278b.c
+++ b/src/emu/sound/ymf278b.c
@@ -267,7 +267,7 @@ void ymf278b_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (slot->stepptr >= slot->endaddr)
{
slot->stepptr = slot->stepptr - slot->endaddr + slot->loopaddr;
-
+
// NOTE: loop overflow is still possible here if (slot->stepptr >= slot->endaddr)
// This glitch may be (ab)used to your advantage to create pseudorandom noise.
}
diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c
index 597f9f5b64f..683937a3511 100644
--- a/src/emu/sound/ymz280b.c
+++ b/src/emu/sound/ymz280b.c
@@ -505,7 +505,7 @@ void ymz280b_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (samples_left || voice->ended)
{
voice->ended = false;
-
+
/* if there are leftovers, ramp back to 0 */
int base = new_samples - samples_left;
int i, t = (base == 0) ? curr : m_scratch[base - 1];
diff --git a/src/emu/sound/zsg2.c b/src/emu/sound/zsg2.c
index 19766e0ecc6..b9dd8bd3272 100644
--- a/src/emu/sound/zsg2.c
+++ b/src/emu/sound/zsg2.c
@@ -89,10 +89,10 @@ void zsg2_device::device_start()
m_mem_base = *region();
m_mem_size = region()->bytes();
m_mem_blocks = m_mem_size / 4;
-
+
m_mem_copy = auto_alloc_array_clear(machine(), UINT32, m_mem_blocks);
m_full_samples = auto_alloc_array_clear(machine(), INT16, m_mem_blocks * 4 + 4); // +4 is for empty block
-
+
// register for savestates
save_pointer(NAME(m_mem_copy), m_mem_blocks / sizeof(UINT32));
save_pointer(NAME(m_full_samples), (m_mem_blocks * 4 + 4) / sizeof(INT16));
@@ -129,7 +129,7 @@ void zsg2_device::device_reset()
control_w(4, 0xffff);
control_w(5, 0xffff);
control_w(6, 0xffff);
-
+
for (int ch = 0; ch < 48; ch++)
for (int reg = 0; reg < 0x10; reg++)
chan_w(ch, reg, 0);
@@ -155,20 +155,20 @@ INT16 *zsg2_device::prepare_samples(UINT32 offset)
if (block == 0)
return &m_full_samples[m_mem_blocks]; // overflow or 0
-
+
if (block == m_mem_copy[offset])
return &m_full_samples[offset * 4]; // cached
-
+
m_mem_copy[offset] = block;
offset *= 4;
-
+
// decompress 32 byte block to 4 16-bit samples
// 42222222 51111111 60000000 ssss3333
m_full_samples[offset|0] = block >> 8 & 0x7f;
m_full_samples[offset|1] = block >> 16 & 0x7f;
m_full_samples[offset|2] = block >> 24 & 0x7f;
m_full_samples[offset|3] = (block >> (8+1) & 0x40) | (block >> (16+2) & 0x20) | (block >> (24+3) & 0x10) | (block & 0xf);
-
+
// sign-extend and shift
UINT8 shift = block >> 4 & 0xf;
for (int i = offset; i < (offset + 4); i++)
@@ -176,7 +176,7 @@ INT16 *zsg2_device::prepare_samples(UINT32 offset)
m_full_samples[i] <<= 9;
m_full_samples[i] >>= shift;
}
-
+
return &m_full_samples[offset];
}
@@ -197,7 +197,7 @@ void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
{
if (!m_chan[ch].is_playing)
continue;
-
+
m_chan[ch].step_ptr += m_chan[ch].step;
if (m_chan[ch].step_ptr & 0x40000)
{
@@ -215,9 +215,9 @@ void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
}
m_chan[ch].samples = prepare_samples(m_chan[ch].page | m_chan[ch].cur_pos);
}
-
+
INT32 sample = (m_chan[ch].samples[m_chan[ch].step_ptr >> 16 & 3] * m_chan[ch].vol) >> 16;
-
+
mix_l += (sample * m_chan[ch].panl + sample * (0x1f - m_chan[ch].panr)) >> 5;
mix_r += (sample * m_chan[ch].panr + sample * (0x1f - m_chan[ch].panl)) >> 5;
}
@@ -246,15 +246,15 @@ void zsg2_device::chan_w(int ch, int reg, UINT16 data)
m_chan[ch].start_pos = (m_chan[ch].start_pos & 0x00ff) | (data << 8 & 0xff00);
m_chan[ch].page = data << 8 & 0xff0000;
break;
-
+
case 0x2:
// no function? always 0
break;
-
+
case 0x3:
// unknown, always 0x0400
break;
-
+
case 0x4:
// frequency
m_chan[ch].step = data + 1;
@@ -266,7 +266,7 @@ void zsg2_device::chan_w(int ch, int reg, UINT16 data)
m_chan[ch].loop_pos = (m_chan[ch].loop_pos & 0xff00) | (data & 0xff);
m_chan[ch].panr = data >> 8 & 0x1f;
break;
-
+
case 0x6:
// end address
m_chan[ch].end_pos = data;
@@ -278,26 +278,26 @@ void zsg2_device::chan_w(int ch, int reg, UINT16 data)
m_chan[ch].loop_pos = (m_chan[ch].loop_pos & 0x00ff) | (data << 8 & 0xff00);
m_chan[ch].panl = data >> 8 & 0x1f;
break;
-
+
case 0x9:
// no function? always 0
break;
-
+
case 0xb:
// always writes 0
// this register is read-only
break;
-
+
case 0xe:
// volume
m_chan[ch].vol = data;
break;
-
+
case 0xf:
// flags
m_chan[ch].flags = data;
break;
-
+
default:
break;
}
@@ -316,7 +316,7 @@ UINT16 zsg2_device::chan_r(int ch, int reg)
default:
break;
}
-
+
return m_chan[ch].v[reg];
}
@@ -397,7 +397,7 @@ UINT16 zsg2_device::control_r(int reg)
default:
break;
}
-
+
return 0;
}
diff --git a/src/emu/sound/zsg2.h b/src/emu/sound/zsg2.h
index 5040c5e5370..cf9450128a1 100644
--- a/src/emu/sound/zsg2.h
+++ b/src/emu/sound/zsg2.h
@@ -74,7 +74,7 @@ private:
INT16 *m_full_samples;
sound_stream *m_stream;
-
+
devcb2_read32 m_ext_read_handler;
UINT32 read_memory(UINT32 offset);
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index ba1f7bc26dd..0ff5f507f4d 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -438,7 +438,7 @@ struct tile_data
UINT8 flags; // defaults to 0; one or more of TILE_* flags above
UINT8 pen_mask; // defaults to 0xff; mask to apply to pen_data while rendering the tile
UINT8 gfxnum; // defaults to 0xff; specify index of gfx for auto-invalidation on dirty
-
+
void set(int _gfxnum, int rawcode, int rawcolor, int _flags)
{
gfx_element *gfx = decoder->gfx(_gfxnum);
diff --git a/src/emu/ui/barcode.c b/src/emu/ui/barcode.c
index a5c7db0c9dd..fcf1b06444a 100644
--- a/src/emu/ui/barcode.c
+++ b/src/emu/ui/barcode.c
@@ -1,9 +1,9 @@
/***************************************************************************
- ui/barcode.c
-
- MESS's "barcode reader" control
-
+ ui/barcode.c
+
+ MESS's "barcode reader" control
+
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
@@ -21,9 +21,9 @@
/**************************************************
-
+
BARCODE INPUT MENU
-
+
**************************************************/
@@ -67,7 +67,7 @@ void ui_menu_barcode_code::populate()
}
item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE);
-
+
// finish up the menu
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
item_append("Enter Code", NULL, 0, ITEMREF_ENTER);
@@ -108,12 +108,12 @@ void ui_menu_barcode_code::handle()
}
}
break;
-
+
case IPT_SPECIAL:
if (get_selection() == ITEMREF_NEW_BARCODE)
{
int buflen = strlen(m_barcode_buffer);
-
+
// if it's a backspace and we can handle it, do so
if ((event->unichar == 8 || event->unichar == 0x7f) && buflen > 0)
*(char *)utf8_previous_char(&m_barcode_buffer[buflen]) = 0;
@@ -140,7 +140,7 @@ void ui_menu_barcode_code::handle()
/**************************************************
READER MENU
-
+
**************************************************/
//-------------------------------------------------
@@ -168,14 +168,14 @@ ui_menu_barcode_reader::~ui_menu_barcode_reader()
void ui_menu_barcode_reader::populate()
{
astring buffer;
-
+
barcode_reader_device_iterator iter(machine().config().root_device());
for (const barcode_reader_device *bcreader = iter.first(); bcreader != NULL; bcreader = iter.next())
{
char label[0x400];
sprintf(label,"[%s (%s)]",bcreader->name(),bcreader->basetag());
item_append(label, NULL, 0, (void *)bcreader);
- }
+ }
}
@@ -187,7 +187,7 @@ void ui_menu_barcode_reader::handle()
{
// process the menu
const ui_menu_event *event = process(0);
-
+
// process the event
if (event != NULL && event->iptkey == IPT_UI_SELECT)
{
@@ -195,6 +195,6 @@ void ui_menu_barcode_reader::handle()
{
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_barcode_code(machine(), container, (barcode_reader_device *)event->itemref)));
}
-
+
}
}
diff --git a/src/emu/ui/barcode.h b/src/emu/ui/barcode.h
index c467fff8f38..46dbe981ad0 100644
--- a/src/emu/ui/barcode.h
+++ b/src/emu/ui/barcode.h
@@ -22,7 +22,7 @@ public:
virtual ~ui_menu_barcode_code();
virtual void populate();
virtual void handle();
-
+
private:
barcode_reader_device *m_reader;
char m_barcode_buffer[20];
diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h
index 5cc246cb567..24a7b743d8b 100644
--- a/src/emu/ui/devctrl.h
+++ b/src/emu/ui/devctrl.h
@@ -23,7 +23,7 @@ public:
protected:
_DeviceType *current_device() { return m_device; }
int count() { return m_count; }
-
+
int current_index();
void previous();
void next();
@@ -32,8 +32,8 @@ private:
// device iterator
typedef device_type_iterator<&device_creator<_DeviceType>, _DeviceType> iterator;
- _DeviceType * m_device;
- int m_count;
+ _DeviceType * m_device;
+ int m_count;
};
diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c
index 1650145277d..ef7bb0838e1 100644
--- a/src/emu/ui/filemngr.c
+++ b/src/emu/ui/filemngr.c
@@ -134,5 +134,3 @@ void ui_menu_file_manager::handle()
}
}
}
-
-
diff --git a/src/emu/ui/filesel.c b/src/emu/ui/filesel.c
index ed275f255a5..403ccb4268e 100644
--- a/src/emu/ui/filesel.c
+++ b/src/emu/ui/filesel.c
@@ -203,14 +203,14 @@ static int is_valid_filename_char(unicode_char unichar)
// this should really be in the OSD layer
static const char valid_filename_char[] =
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00-0f
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10-1f
- 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, // !"#$%&'()*+,-./
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 0123456789:;<=>?
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // @ABCDEFGHIJKLMNO
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // PQRSTUVWXYZ[\]^_
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // `abcdefghijklmno
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, // pqrstuvwxyz{|}~
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00-0f
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10-1f
+ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, // !"#$%&'()*+,-./
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 0123456789:;<=>?
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // @ABCDEFGHIJKLMNO
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // PQRSTUVWXYZ[\]^_
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // `abcdefghijklmno
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, // pqrstuvwxyz{|}~
};
return (unichar < ARRAY_LENGTH(valid_filename_char)) && valid_filename_char[unichar];
}
@@ -222,8 +222,8 @@ static int is_valid_filename_char(unicode_char unichar)
ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, astring &current_directory, astring &current_file)
: ui_menu(machine, container),
- m_current_directory(current_directory),
- m_current_file(current_file)
+ m_current_directory(current_directory),
+ m_current_file(current_file)
{
m_image = image;
}
@@ -344,8 +344,8 @@ void ui_menu_file_create::handle()
ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, astring &current_directory, astring &current_file, bool has_empty, bool has_softlist, bool has_create, int *result)
: ui_menu(machine, container),
- m_current_directory(current_directory),
- m_current_file(current_file)
+ m_current_directory(current_directory),
+ m_current_file(current_file)
{
m_image = image;
m_has_empty = has_empty;
diff --git a/src/emu/ui/filesel.h b/src/emu/ui/filesel.h
index 4e741a8e4a3..f32e87cf7b7 100644
--- a/src/emu/ui/filesel.h
+++ b/src/emu/ui/filesel.h
@@ -41,11 +41,11 @@ public:
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
private:
- device_image_interface * m_image;
- astring & m_current_directory;
- astring & m_current_file;
- const image_device_format * m_current_format;
- char m_filename_buffer[1024];
+ device_image_interface * m_image;
+ astring & m_current_directory;
+ astring & m_current_file;
+ const image_device_format * m_current_format;
+ char m_filename_buffer[1024];
};
@@ -82,15 +82,15 @@ private:
};
// internal state
- device_image_interface * m_image;
- astring & m_current_directory;
- astring & m_current_file;
- bool m_has_empty;
- bool m_has_softlist;
- bool m_has_create;
- int * m_result;
- file_selector_entry * m_entrylist;
- char m_filename_buffer[1024];
+ device_image_interface * m_image;
+ astring & m_current_directory;
+ astring & m_current_file;
+ bool m_has_empty;
+ bool m_has_softlist;
+ bool m_has_create;
+ int * m_result;
+ file_selector_entry * m_entrylist;
+ char m_filename_buffer[1024];
// methods
int compare_entries(const file_selector_entry *e1, const file_selector_entry *e2);
@@ -113,10 +113,10 @@ public:
private:
// internal state
- floppy_image_format_t ** m_formats;
- int m_ext_match;
- int m_total_usable;
- int * m_result;
+ floppy_image_format_t ** m_formats;
+ int m_ext_match;
+ int m_total_usable;
+ int * m_result;
};
@@ -134,8 +134,8 @@ public:
private:
// internal state
- bool m_can_in_place;
- int * m_result;
+ bool m_can_in_place;
+ int * m_result;
};
// helper
diff --git a/src/emu/ui/imgcntrl.c b/src/emu/ui/imgcntrl.c
index 82b37b376fb..7d451863d5f 100644
--- a/src/emu/ui/imgcntrl.c
+++ b/src/emu/ui/imgcntrl.c
@@ -119,7 +119,7 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf
need_confirm = false;
break;
}
-
+
if (entry != NULL)
osd_free(entry);
}
diff --git a/src/emu/ui/imginfo.c b/src/emu/ui/imginfo.c
index 2eaccfdaee6..9fc80b82a07 100644
--- a/src/emu/ui/imginfo.c
+++ b/src/emu/ui/imginfo.c
@@ -186,5 +186,3 @@ void ui_menu_image_info::image_info_astring(running_machine &machine, astring &s
}
}
}
-
-
diff --git a/src/emu/ui/mainmenu.c b/src/emu/ui/mainmenu.c
index 5b48a80c153..341a3c1dc01 100644
--- a/src/emu/ui/mainmenu.c
+++ b/src/emu/ui/mainmenu.c
@@ -246,11 +246,11 @@ void ui_menu_main::handle()
case BIOS_SELECTION:
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_bios_selection(machine(), container)));
break;
-
+
case BARCODE_READ:
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_barcode_reader(machine(), container)));
break;
-
+
default:
fatalerror("ui_menu_main::handle - unknown reference\n");
}
diff --git a/src/emu/ui/menu.c b/src/emu/ui/menu.c
index 3e35ee3a6c5..6e5c8f09297 100644
--- a/src/emu/ui/menu.c
+++ b/src/emu/ui/menu.c
@@ -83,10 +83,10 @@ void ui_menu::init(running_machine &machine)
{
int x;
- // initialize the menu stack
+ // initialize the menu stack
ui_menu::stack_reset(machine);
- // create a texture for hilighting items
+ // create a texture for hilighting items
hilight_bitmap = auto_bitmap_rgb32_alloc(machine, 256, 1);
for (x = 0; x < 256; x++)
{
@@ -98,10 +98,10 @@ void ui_menu::init(running_machine &machine)
hilight_texture = machine.render().texture_alloc();
hilight_texture->set_bitmap(*hilight_bitmap, hilight_bitmap->cliprect(), TEXFORMAT_ARGB32);
- // create a texture for arrow icons
+ // create a texture for arrow icons
arrow_texture = machine.render().texture_alloc(render_triangle);
- // add an exit callback to free memory
+ // add an exit callback to free memory
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_menu::exit), &machine));
}
@@ -112,11 +112,11 @@ void ui_menu::init(running_machine &machine)
void ui_menu::exit(running_machine &machine)
{
- // free menus
+ // free menus
ui_menu::stack_reset(machine);
ui_menu::clear_free_list(machine);
- // free textures
+ // free textures
machine.render().texture_free(hilight_texture);
machine.render().texture_free(arrow_texture);
}
@@ -146,7 +146,7 @@ ui_menu::ui_menu(running_machine &machine, render_container *_container) : m_mac
ui_menu::~ui_menu()
{
- // free the pools
+ // free the pools
while (pool)
{
ui_menu_pool *ppool = pool;
@@ -154,7 +154,7 @@ ui_menu::~ui_menu()
auto_free(machine(), ppool);
}
- // free the item array
+ // free the item array
if (item)
auto_free(machine(), item);
}
@@ -167,7 +167,7 @@ ui_menu::~ui_menu()
void ui_menu::reset(ui_menu_reset_options options)
{
- // based on the reset option, set the reset info
+ // based on the reset option, set the reset info
resetpos = 0;
resetref = NULL;
if (options == UI_MENU_RESET_REMEMBER_POSITION)
@@ -175,7 +175,7 @@ void ui_menu::reset(ui_menu_reset_options options)
else if (options == UI_MENU_RESET_REMEMBER_REF)
resetref = item[selected].ref;
- // reset all the pools and the numitems back to 0
+ // reset all the pools and the numitems back to 0
for (ui_menu_pool *ppool = pool; ppool != NULL; ppool = ppool->next)
ppool->top = (UINT8 *)(ppool + 1);
numitems = 0;
@@ -184,7 +184,7 @@ void ui_menu::reset(ui_menu_reset_options options)
astring backtext;
backtext.printf("Return to %s",emulator_info::get_capstartgamenoun());
- // add an item to return
+ // add an item to return
if (parent == NULL)
item_append(backtext.cstr(), NULL, 0, NULL);
else if (parent->is_special_main_menu())
@@ -237,15 +237,15 @@ void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, v
ui_menu_item *pitem;
int index;
- // only allow multiline as the first item
+ // only allow multiline as the first item
if ((flags & MENU_FLAG_MULTILINE) != 0)
assert(numitems == 1);
- // only allow a single multi-line item
+ // only allow a single multi-line item
else if (numitems >= 2)
assert((item[0].flags & MENU_FLAG_MULTILINE) == 0);
- // realloc the item array if necessary
+ // realloc the item array if necessary
if (numitems >= allocitems)
{
int olditems = allocitems;
@@ -258,21 +258,21 @@ void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, v
}
index = numitems++;
- // copy the previous last item to the next one
+ // copy the previous last item to the next one
if (index != 0)
{
index--;
item[index + 1] = item[index];
}
- // allocate a new item and populate it
+ // allocate a new item and populate it
pitem = &item[index];
pitem->text = (text != NULL) ? pool_strdup(text) : NULL;
pitem->subtext = (subtext != NULL) ? pool_strdup(subtext) : NULL;
pitem->flags = flags;
pitem->ref = ref;
- // update the selection if we need to
+ // update the selection if we need to
if (resetpos == index || (resetref != NULL && resetref == ref))
selected = index;
if (resetpos == numitems - 1)
@@ -287,30 +287,30 @@ void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, v
const ui_menu_event *ui_menu::process(UINT32 flags)
{
- // reset the menu_event
+ // reset the menu_event
menu_event.iptkey = IPT_INVALID;
- // first make sure our selection is valid
+ // first make sure our selection is valid
validate_selection(1);
- // draw the menu
+ // draw the menu
if (numitems > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0)
draw_text_box();
else
draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY);
- // process input
+ // process input
if (!(flags & UI_MENU_PROCESS_NOKEYS))
{
- // read events
+ // read events
handle_events();
- // handle the keys if we don't already have an menu_event
+ // handle the keys if we don't already have an menu_event
if (menu_event.iptkey == IPT_INVALID)
handle_keys(flags);
}
- // update the selected item in the menu_event
+ // update the selected item in the menu_event
if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < numitems)
{
menu_event.itemref = item[selected].ref;
@@ -331,7 +331,7 @@ void *ui_menu::m_pool_alloc(size_t size)
assert(size < UI_MENU_POOL_SIZE);
- // find a pool with enough room
+ // find a pool with enough room
for (ppool = pool; ppool != NULL; ppool = ppool->next)
if (ppool->end - ppool->top >= size)
{
@@ -340,10 +340,10 @@ void *ui_menu::m_pool_alloc(size_t size)
return result;
}
- // allocate a new pool
+ // allocate a new pool
ppool = (ui_menu_pool *)auto_alloc_array_clear(machine(), UINT8, sizeof(*ppool) + UI_MENU_POOL_SIZE);
- // wire it up
+ // wire it up
ppool->next = pool;
pool = ppool;
ppool->top = (UINT8 *)(ppool + 1);
@@ -423,7 +423,7 @@ void ui_menu::draw(bool customonly)
INT32 mouse_target_x, mouse_target_y;
float mouse_x = -1, mouse_y = -1;
- // compute the width and height of the full menu
+ // compute the width and height of the full menu
visible_width = 0;
visible_main_menu_height = 0;
for (itemnum = 0; itemnum < numitems; itemnum++)
@@ -431,47 +431,47 @@ void ui_menu::draw(bool customonly)
const ui_menu_item &pitem = item[itemnum];
float total_width;
- // compute width of left hand side
+ // compute width of left hand side
total_width = gutter_width + machine().ui().get_string_width(pitem.text) + gutter_width;
- // add in width of right hand side
+ // add in width of right hand side
if (pitem.subtext)
total_width += 2.0f * gutter_width + machine().ui().get_string_width(pitem.subtext);
- // track the maximum
+ // track the maximum
if (total_width > visible_width)
visible_width = total_width;
- // track the height as well
+ // track the height as well
visible_main_menu_height += line_height;
}
- // account for extra space at the top and bottom
+ // account for extra space at the top and bottom
visible_extra_menu_height = customtop + custombottom;
- // add a little bit of slop for rounding
+ // add a little bit of slop for rounding
visible_width += 0.01f;
visible_main_menu_height += 0.01f;
- // if we are too wide or too tall, clamp it down
+ // if we are too wide or too tall, clamp it down
if (visible_width + 2.0f * UI_BOX_LR_BORDER > 1.0f)
visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER;
- // if the menu and extra menu won't fit, take away part of the regular menu, it will scroll
+ // if the menu and extra menu won't fit, take away part of the regular menu, it will scroll
if (visible_main_menu_height + visible_extra_menu_height + 2.0f * UI_BOX_TB_BORDER > 1.0f)
visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height;
visible_lines = floor(visible_main_menu_height / line_height);
visible_main_menu_height = (float)visible_lines * line_height;
- // compute top/left of inner menu area by centering
+ // compute top/left of inner menu area by centering
visible_left = (1.0f - visible_width) * 0.5f;
visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
- // if the menu is at the bottom of the extra, adjust
+ // if the menu is at the bottom of the extra, adjust
visible_top += customtop;
- // first add us a box
+ // first add us a box
x1 = visible_left - UI_BOX_LR_BORDER;
y1 = visible_top - UI_BOX_TB_BORDER;
x2 = visible_left + visible_width + UI_BOX_LR_BORDER;
@@ -479,18 +479,18 @@ void ui_menu::draw(bool customonly)
if (!customonly)
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR);
- // determine the first visible line based on the current selection
+ // determine the first visible line based on the current selection
top_line = selected - visible_lines / 2;
if (top_line < 0)
top_line = 0;
if (top_line + visible_lines >= numitems)
top_line = numitems - visible_lines;
- // determine effective positions taking into account the hilighting arrows
+ // determine effective positions taking into account the hilighting arrows
effective_width = visible_width - 2.0f * gutter_width;
effective_left = visible_left + gutter_width;
- // locate mouse
+ // locate mouse
mouse_hit = false;
mouse_button = false;
if (!customonly)
@@ -501,7 +501,7 @@ void ui_menu::draw(bool customonly)
mouse_hit = true;
}
- // loop over visible lines
+ // loop over visible lines
hover = numitems + 1;
if (!customonly)
for (linenum = 0; linenum < visible_lines; linenum++)
@@ -519,11 +519,11 @@ void ui_menu::draw(bool customonly)
float line_x1 = x2 - 0.5f * UI_LINE_WIDTH;
float line_y1 = line_y + line_height;
- // set the hover if this is our item
+ // set the hover if this is our item
if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable())
hover = itemnum;
- // if we're selected, draw with a different background
+ // if we're selected, draw with a different background
if (itemnum == selected)
{
fgcolor = UI_SELECTED_COLOR;
@@ -532,7 +532,7 @@ void ui_menu::draw(bool customonly)
fgcolor3 = UI_SELECTED_COLOR;
}
- // else if the mouse is over this item, draw with a different background
+ // else if the mouse is over this item, draw with a different background
else if (itemnum == hover)
{
fgcolor = UI_MOUSEOVER_COLOR;
@@ -541,11 +541,11 @@ void ui_menu::draw(bool customonly)
fgcolor3 = UI_MOUSEOVER_COLOR;
}
- // if we have some background hilighting to do, add a quad behind everything else
+ // if we have some background hilighting to do, add a quad behind everything else
if (bgcolor != UI_TEXT_BG_COLOR)
highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor);
- // if we're on the top line, display the up arrow
+ // if we're on the top line, display the up arrow
if (linenum == 0 && top_line != 0)
{
draw_arrow(
@@ -560,7 +560,7 @@ void ui_menu::draw(bool customonly)
hover = -2;
}
- // if we're on the bottom line, display the down arrow
+ // if we're on the bottom line, display the down arrow
else if (linenum == visible_lines - 1 && itemnum != numitems - 1)
{
draw_arrow(
@@ -575,30 +575,30 @@ void ui_menu::draw(bool customonly)
hover = -1;
}
- // if we're just a divider, draw a line
+ // if we're just a divider, draw a line
else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0)
container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
- // if we don't have a subitem, just draw the string centered
+ // if we don't have a subitem, just draw the string centered
else if (pitem.subtext == NULL)
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, NULL, NULL);
- // otherwise, draw the item on the left and the subitem text on the right
+ // otherwise, draw the item on the left and the subitem text on the right
else
{
int subitem_invert = pitem.flags & MENU_FLAG_INVERT;
const char *subitem_text = pitem.subtext;
float item_width, subitem_width;
- // draw the left-side text
+ // draw the left-side text
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, &item_width, NULL);
- // give 2 spaces worth of padding
+ // give 2 spaces worth of padding
item_width += 2.0f * gutter_width;
- // if the subitem doesn't fit here, display dots
+ // if the subitem doesn't fit here, display dots
if (machine().ui().get_string_width(subitem_text) > effective_width - item_width)
{
subitem_text = "...";
@@ -606,11 +606,11 @@ void ui_menu::draw(bool customonly)
selected_subitem_too_big = TRUE;
}
- // draw the subitem right-justified
+ // draw the subitem right-justified
machine().ui().draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width,
JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, subitem_invert ? fgcolor3 : fgcolor2, bgcolor, &subitem_width, NULL);
- // apply arrows
+ // apply arrows
if (itemnum == selected && (pitem.flags & MENU_FLAG_LEFT_ARROW))
{
draw_arrow(
@@ -636,7 +636,7 @@ void ui_menu::draw(bool customonly)
}
}
- // if the selected subitem is too big, display it in a separate offset box
+ // if the selected subitem is too big, display it in a separate offset box
if (selected_subitem_too_big)
{
const ui_menu_item &pitem = item[selected];
@@ -646,17 +646,17 @@ void ui_menu::draw(bool customonly)
float target_width, target_height;
float target_x, target_y;
- // compute the multi-line target width/height
+ // compute the multi-line target width/height
machine().ui().draw_text_full(container, pitem.subtext, 0, 0, visible_width * 0.75f,
JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
- // determine the target location
+ // determine the target location
target_x = visible_left + visible_width - target_width - UI_BOX_LR_BORDER;
target_y = line_y + line_height + UI_BOX_TB_BORDER;
if (target_y + target_height + UI_BOX_TB_BORDER > visible_main_menu_height)
target_y = line_y - target_height - UI_BOX_TB_BORDER;
- // add a box around that
+ // add a box around that
machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER,
target_y - UI_BOX_TB_BORDER,
target_x + target_width + UI_BOX_LR_BORDER,
@@ -665,10 +665,10 @@ void ui_menu::draw(bool customonly)
JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, NULL, NULL);
}
- // if there is something special to add, do it by calling the virtual method
+ // if there is something special to add, do it by calling the virtual method
custom_render((selected >= 0 && selected < numitems) ? item[selected].ref : NULL, customtop, custombottom, x1, y1, x2, y2);
- // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
+ // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != numitems);
}
@@ -692,22 +692,22 @@ void ui_menu::draw_text_box()
float target_width, target_height, prior_width;
float target_x, target_y;
- // compute the multi-line target width/height
+ // compute the multi-line target width/height
machine().ui().draw_text_full(container, text, 0, 0, 1.0f - 2.0f * UI_BOX_LR_BORDER - 2.0f * gutter_width,
JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height);
target_height += 2.0f * line_height;
if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER)
target_height = floor((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height;
- // maximum against "return to prior menu" text
+ // maximum against "return to prior menu" text
prior_width = machine().ui().get_string_width(backtext) + 2.0f * gutter_width;
target_width = MAX(target_width, prior_width);
- // determine the target location
+ // determine the target location
target_x = 0.5f - 0.5f * target_width;
target_y = 0.5f - 0.5f * target_height;
- // make sure we stay on-screen
+ // make sure we stay on-screen
if (target_x < UI_BOX_LR_BORDER + gutter_width)
target_x = UI_BOX_LR_BORDER + gutter_width;
if (target_x + target_width + gutter_width + UI_BOX_LR_BORDER > 1.0f)
@@ -717,7 +717,7 @@ void ui_menu::draw_text_box()
if (target_y + target_height + UI_BOX_TB_BORDER > 1.0f)
target_y = 1.0f - UI_BOX_TB_BORDER - target_height;
- // add a box around that
+ // add a box around that
machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER - gutter_width,
target_y - UI_BOX_TB_BORDER,
target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
@@ -725,7 +725,7 @@ void ui_menu::draw_text_box()
machine().ui().draw_text_full(container, text, target_x, target_y, target_width,
JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
- // draw the "return to prior menu" text with a hilight behind it
+ // draw the "return to prior menu" text with a hilight behind it
highlight(
container,
target_x + 0.5f * UI_LINE_WIDTH,
@@ -736,7 +736,7 @@ void ui_menu::draw_text_box()
machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width,
JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, NULL, NULL);
- // artificially set the hover to the last item so a double-click exits
+ // artificially set the hover to the last item so a double-click exits
hover = numitems - 1;
}
@@ -751,12 +751,12 @@ void ui_menu::handle_events()
int stop = FALSE;
ui_event local_menu_event;
- // loop while we have interesting events
+ // loop while we have interesting events
while (!stop && ui_input_pop_event(machine(), &local_menu_event))
{
switch (local_menu_event.event_type)
{
- // if we are hovering over a valid item, select it with a single click
+ // if we are hovering over a valid item, select it with a single click
case UI_EVENT_MOUSE_DOWN:
if (hover >= 0 && hover < numitems)
selected = hover;
@@ -772,7 +772,7 @@ void ui_menu::handle_events()
}
break;
- // if we are hovering over a valid item, fake a UI_SELECT with a double-click
+ // if we are hovering over a valid item, fake a UI_SELECT with a double-click
case UI_EVENT_MOUSE_DOUBLE_CLICK:
if (hover >= 0 && hover < numitems)
{
@@ -790,14 +790,14 @@ void ui_menu::handle_events()
}
break;
- // translate CHAR events into specials
+ // translate CHAR events into specials
case UI_EVENT_CHAR:
menu_event.iptkey = IPT_SPECIAL;
menu_event.unichar = local_menu_event.ch;
stop = TRUE;
break;
- // ignore everything else
+ // ignore everything else
default:
break;
}
@@ -817,11 +817,11 @@ void ui_menu::handle_keys(UINT32 flags)
int ignoreleft = FALSE;
int code;
- // bail if no items
+ // bail if no items
if (numitems == 0)
return;
- // if we hit select, return TRUE or pop the stack, depending on the item
+ // if we hit select, return TRUE or pop the stack, depending on the item
if (exclusive_input_pressed(IPT_UI_SELECT, 0))
{
if (selected == numitems - 1)
@@ -832,69 +832,69 @@ void ui_menu::handle_keys(UINT32 flags)
return;
}
- // hitting cancel also pops the stack
+ // hitting cancel also pops the stack
if (exclusive_input_pressed(IPT_UI_CANCEL, 0))
{
ui_menu::stack_pop(machine());
return;
}
- // validate the current selection
+ // validate the current selection
validate_selection(1);
- // swallow left/right keys if they are not appropriate
+ // swallow left/right keys if they are not appropriate
ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0);
ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0);
- // accept left/right keys as-is with repeat
+ // accept left/right keys as-is with repeat
if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
return;
if (!ignoreright && exclusive_input_pressed(IPT_UI_RIGHT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0))
return;
- // up backs up by one item
+ // up backs up by one item
if (exclusive_input_pressed(IPT_UI_UP, 6))
{
selected = (selected + numitems - 1) % numitems;
validate_selection(-1);
}
- // down advances by one item
+ // down advances by one item
if (exclusive_input_pressed(IPT_UI_DOWN, 6))
{
selected = (selected + 1) % numitems;
validate_selection(1);
}
- // page up backs up by visitems
+ // page up backs up by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6))
{
selected -= visitems - 1;
validate_selection(1);
}
- // page down advances by visitems
+ // page down advances by visitems
if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6))
{
selected += visitems - 1;
validate_selection(-1);
}
- // home goes to the start
+ // home goes to the start
if (exclusive_input_pressed(IPT_UI_HOME, 0))
{
selected = 0;
validate_selection(1);
}
- // end goes to the last
+ // end goes to the last
if (exclusive_input_pressed(IPT_UI_END, 0))
{
selected = numitems - 1;
validate_selection(-1);
}
- // pause enables/disables pause
+ // pause enables/disables pause
if (!ignorepause && exclusive_input_pressed(IPT_UI_PAUSE, 0))
{
if (machine().paused())
@@ -903,11 +903,11 @@ void ui_menu::handle_keys(UINT32 flags)
machine().pause();
}
- // handle a toggle cheats request
+ // handle a toggle cheats request
if (ui_input_pressed_repeat(machine(), IPT_UI_TOGGLE_CHEAT, 0))
machine().cheat().set_enable(!machine().cheat().enabled());
- // see if any other UI keys are pressed
+ // see if any other UI keys are pressed
if (menu_event.iptkey == IPT_INVALID)
for (code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
{
@@ -927,13 +927,13 @@ void ui_menu::handle_keys(UINT32 flags)
void ui_menu::validate_selection(int scandir)
{
- // clamp to be in range
+ // clamp to be in range
if (selected < 0)
selected = 0;
else if (selected >= numitems)
selected = numitems - 1;
- // skip past unselectable items
+ // skip past unselectable items
while (!item[selected].is_selectable())
selected = (selected + numitems + scandir) % numitems;
}
@@ -1038,18 +1038,18 @@ void ui_menu::do_handle()
UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container, UINT32 state)
{
- // if we have no menus stacked up, start with the main menu
+ // if we have no menus stacked up, start with the main menu
if (menu_stack == NULL)
stack_push(auto_alloc_clear(machine, ui_menu_main(machine, container)));
- // update the menu state
+ // update the menu state
if (menu_stack != NULL)
menu_stack->do_handle();
- // clear up anything pending to be released
+ // clear up anything pending to be released
clear_free_list(machine);
- // if the menus are to be hidden, return a cancel here
+ // if the menus are to be hidden, return a cancel here
if (machine.ui().is_menu_active() && ((ui_input_pressed(machine, IPT_UI_CONFIGURE) && !stack_has_special_main_menu()) || menu_stack == NULL))
return UI_HANDLER_CANCEL;
@@ -1072,16 +1072,16 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const
int height = dest.height();
int x, y;
- // start with all-transparent
+ // start with all-transparent
dest.fill(rgb_t(0x00,0x00,0x00,0x00));
- // render from the tip to the bottom
+ // render from the tip to the bottom
for (y = 0; y < height; y++)
{
int linewidth = (y * (halfwidth - 1) + (height / 2)) * 255 * 2 / height;
UINT32 *target = &dest.pix32(y, halfwidth);
- // don't antialias if height < 12
+ // don't antialias if height < 12
if (dest.height() < 12)
{
int pixels = (linewidth + 254) / 255;
@@ -1089,19 +1089,19 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const
linewidth = pixels * 255;
}
- // loop while we still have data to generate
+ // loop while we still have data to generate
for (x = 0; linewidth > 0; x++)
{
int dalpha;
- // first column we only consume one pixel
+ // first column we only consume one pixel
if (x == 0)
{
dalpha = MIN(0xff, linewidth);
target[x] = rgb_t(dalpha,0xff,0xff,0xff);
}
- // remaining columns consume two pixels, one on each side
+ // remaining columns consume two pixels, one on each side
else
{
dalpha = MIN(0x1fe, linewidth);
diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h
index 6091bc3e3a7..253e3634ad7 100644
--- a/src/emu/ui/menu.h
+++ b/src/emu/ui/menu.h
@@ -21,7 +21,7 @@
CONSTANTS
***************************************************************************/
-// flags for menu items
+// flags for menu items
#define MENU_FLAG_LEFT_ARROW (1 << 0)
#define MENU_FLAG_RIGHT_ARROW (1 << 1)
#define MENU_FLAG_INVERT (1 << 2)
@@ -29,15 +29,15 @@
#define MENU_FLAG_REDTEXT (1 << 4)
#define MENU_FLAG_DISABLE (1 << 5)
-// special menu item for separators
+// special menu item for separators
#define MENU_SEPARATOR_ITEM "---"
-// flags to pass to ui_menu_process
+// flags to pass to ui_menu_process
#define UI_MENU_PROCESS_NOKEYS 1
#define UI_MENU_PROCESS_LR_REPEAT 2
#define UI_MENU_PROCESS_CUSTOM_ONLY 4
-// options for ui_menu_reset
+// options for ui_menu_reset
enum ui_menu_reset_options
{
UI_MENU_RESET_SELECT_FIRST,
@@ -51,19 +51,19 @@ enum ui_menu_reset_options
TYPE DEFINITIONS
***************************************************************************/
-// menu-related events
+// menu-related events
struct ui_menu_event
{
- void * itemref; // reference for the selected item
- int iptkey; // one of the IPT_* values from inptport.h
- unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
+ void * itemref; // reference for the selected item
+ int iptkey; // one of the IPT_* values from inptport.h
+ unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL
};
struct ui_menu_pool
{
- ui_menu_pool * next; // chain to next one
- UINT8 * top; // top of the pool
- UINT8 * end; // end of the pool
+ ui_menu_pool * next; // chain to next one
+ UINT8 * top; // top of the pool
+ UINT8 * end; // end of the pool
};
@@ -86,87 +86,87 @@ public:
running_machine &machine() const { return m_machine; }
- render_container * container; // render_container we render to
- ui_menu_event menu_event; // the UI menu_event that occurred
- ui_menu * parent; // pointer to parent menu
- int resetpos; // reset position
- void * resetref; // reset reference
- int selected; // which item is selected
- int hover; // which item is being hovered over
- int visitems; // number of visible items
- int numitems; // number of items in the menu
- int allocitems; // allocated size of array
- ui_menu_item * item; // pointer to array of items
- float customtop; // amount of extra height to add at the top
- float custombottom; // amount of extra height to add at the bottom
- ui_menu_pool * pool; // list of memory pools
-
- // free all items in the menu, and all memory allocated from the memory pool
+ render_container * container; // render_container we render to
+ ui_menu_event menu_event; // the UI menu_event that occurred
+ ui_menu * parent; // pointer to parent menu
+ int resetpos; // reset position
+ void * resetref; // reset reference
+ int selected; // which item is selected
+ int hover; // which item is being hovered over
+ int visitems; // number of visible items
+ int numitems; // number of items in the menu
+ int allocitems; // allocated size of array
+ ui_menu_item * item; // pointer to array of items
+ float customtop; // amount of extra height to add at the top
+ float custombottom; // amount of extra height to add at the bottom
+ ui_menu_pool * pool; // list of memory pools
+
+ // free all items in the menu, and all memory allocated from the memory pool
void reset(ui_menu_reset_options options);
- // returns true if the menu has any non-default items in it
+ // returns true if the menu has any non-default items in it
bool populated();
- // append a new item to the end of the menu
+ // append a new item to the end of the menu
void item_append(const char *text, const char *subtext, UINT32 flags, void *ref);
- // process a menu, drawing it and returning any interesting events
+ // process a menu, drawing it and returning any interesting events
const ui_menu_event *process(UINT32 flags);
- // configure the menu for custom rendering
+ // configure the menu for custom rendering
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
- // allocate temporary memory from the menu's memory pool
+ // allocate temporary memory from the menu's memory pool
void *m_pool_alloc(size_t size);
- // make a temporary string copy in the menu's memory pool
+ // make a temporary string copy in the menu's memory pool
const char *pool_strdup(const char *string);
- // retrieves the index of the currently selected menu item
+ // retrieves the index of the currently selected menu item
void *get_selection();
- // changes the index of the currently selected menu item
+ // changes the index of the currently selected menu item
void set_selection(void *selected_itemref);
- // request the specific handling of the game selection main menu
+ // request the specific handling of the game selection main menu
bool is_special_main_menu() const;
void set_special_main_menu(bool disable);
- // Global initialization
+ // Global initialization
static void init(running_machine &machine);
static void exit(running_machine &machine);
- // reset the menus, clearing everything
+ // reset the menus, clearing everything
static void stack_reset(running_machine &machine);
- // push a new menu onto the stack
+ // push a new menu onto the stack
static void stack_push(ui_menu *menu);
- // pop a menu from the stack
+ // pop a menu from the stack
static void stack_pop(running_machine &machine);
- // test if one of the menus in the stack requires hide disable
+ // test if one of the menus in the stack requires hide disable
static bool stack_has_special_main_menu();
- // highlight
+ // highlight
static void highlight(render_container *container, float x0, float y0, float x1, float y1, rgb_t bgcolor);
- // draw arrow
+ // draw arrow
static void draw_arrow(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, UINT32 orientation);
- // master handler
+ // master handler
static UINT32 ui_handler(running_machine &machine, render_container *container, UINT32 state);
- // Used by sliders
+ // Used by sliders
void validate_selection(int scandir);
static ui_menu *menu_stack;
void do_handle();
- // To be reimplemented in the menu subclass
+ // To be reimplemented in the menu subclass
virtual void populate() = 0;
- // To be reimplemented in the menu subclass
+ // To be reimplemented in the menu subclass
virtual void handle() = 0;
private:
@@ -188,4 +188,4 @@ private:
static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
};
-#endif // __UI_MENU_H__
+#endif // __UI_MENU_H__
diff --git a/src/emu/ui/selgame.c b/src/emu/ui/selgame.c
index 87deeaabf0e..97dc05663ee 100644
--- a/src/emu/ui/selgame.c
+++ b/src/emu/ui/selgame.c
@@ -47,8 +47,8 @@ ui_menu_select_game::~ui_menu_select_game()
//-------------------------------------------------
-// build_driver_list - build a list of available
-// drivers
+// build_driver_list - build a list of available
+// drivers
//-------------------------------------------------
void ui_menu_select_game::build_driver_list()
@@ -108,7 +108,7 @@ void ui_menu_select_game::handle()
m_error = false;
// handle selections
- else
+ else
{
switch(menu_event->iptkey)
{
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h
index 94e6f37d43b..940a195721b 100644
--- a/src/emu/ui/selgame.h
+++ b/src/emu/ui/selgame.h
@@ -31,10 +31,10 @@ public:
private:
// internal state
enum { VISIBLE_GAMES_IN_LIST = 15 };
- UINT8 m_error;
- UINT8 m_rerandomize;
- char m_search[40];
- int m_matchlist[VISIBLE_GAMES_IN_LIST];
+ UINT8 m_error;
+ UINT8 m_rerandomize;
+ char m_search[40];
+ int m_matchlist[VISIBLE_GAMES_IN_LIST];
dynamic_array<const game_driver *> m_driverlist;
auto_pointer<driver_enumerator> m_drivlist;
diff --git a/src/emu/ui/swlist.c b/src/emu/ui/swlist.c
index f18693d7049..c864ff560e5 100644
--- a/src/emu/ui/swlist.c
+++ b/src/emu/ui/swlist.c
@@ -360,7 +360,7 @@ void ui_menu_software_list::handle()
/***************************************************************************
SOFTWARE MENU - list of available software lists - i.e. cartridges,
- floppies
+ floppies
***************************************************************************/
//-------------------------------------------------
diff --git a/src/emu/ui/swlist.h b/src/emu/ui/swlist.h
index 98c5de0d860..1d0edc80d1e 100644
--- a/src/emu/ui/swlist.h
+++ b/src/emu/ui/swlist.h
@@ -29,11 +29,11 @@ private:
};
// variables
- const software_info * m_info;
- const char * m_interface;
- const software_part ** m_selected_part;
- bool m_opt_fmgr;
- int * m_result;
+ const software_info * m_info;
+ const char * m_interface;
+ const software_part ** m_selected_part;
+ bool m_opt_fmgr;
+ int * m_result;
};
@@ -55,12 +55,12 @@ private:
};
// variables
- software_list_device * m_swlist; // currently selected list
- const char * m_interface;
- astring & m_result;
- entry_info * m_entrylist;
- char m_filename_buffer[1024];
- bool m_ordered_by_shortname;
+ software_list_device * m_swlist; // currently selected list
+ const char * m_interface;
+ astring & m_result;
+ entry_info * m_entrylist;
+ char m_filename_buffer[1024];
+ bool m_ordered_by_shortname;
// functions
int compare_entries(const entry_info *e1, const entry_info *e2, bool shortname);
@@ -78,8 +78,8 @@ public:
virtual void handle();
private:
- const char * m_interface;
- software_list_device ** m_result;
+ const char * m_interface;
+ software_list_device ** m_result;
};
#endif /* __UI_SWLIST_H__ */
diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c
index d957d8086af..45277e14b9a 100644
--- a/src/emu/ui/ui.c
+++ b/src/emu/ui/ui.c
@@ -40,7 +40,7 @@ enum
LOCAL VARIABLES
***************************************************************************/
-// list of natural keyboard keys that are not associated with UI_EVENT_CHARs
+// list of natural keyboard keys that are not associated with UI_EVENT_CHARs
static const input_item_id non_char_keys[] =
{
ITEM_ID_ESC,
@@ -88,11 +88,11 @@ static const input_item_id non_char_keys[] =
GLOBAL VARIABLES
***************************************************************************/
-// messagebox buffer
+// messagebox buffer
static astring messagebox_text;
static rgb_t messagebox_backcolor;
-// slider info
+// slider info
static slider_state *slider_list;
static slider_state *slider_current;
@@ -101,7 +101,7 @@ static slider_state *slider_current;
FUNCTION PROTOTYPES
***************************************************************************/
-// slider controls
+// slider controls
static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg);
static slider_state *slider_init(running_machine &machine);
static INT32 slider_volume(running_machine &machine, void *arg, astring *string, INT32 newval);
@@ -221,11 +221,11 @@ static const UINT32 mouse_bitmap[] = {
ui_manager::ui_manager(running_machine &machine)
: m_machine(machine)
{
- // initialize the other UI bits
+ // initialize the other UI bits
ui_menu::init(machine);
ui_gfx_init(machine);
- // reset instance variables
+ // reset instance variables
m_font = NULL;
m_handler_callback = NULL;
m_handler_param = 0;
@@ -245,7 +245,7 @@ ui_manager::ui_manager(running_machine &machine)
// request a callback upon exiting
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_manager::exit), this));
- // retrieve options
+ // retrieve options
m_use_natural_keyboard = machine.options().natural_keyboard();
bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine, bitmap_argb32(32, 32));
UINT32 *dst = &ui_mouse_bitmap->pix32(0);
@@ -265,7 +265,7 @@ void ui_manager::exit()
machine().render().texture_free(m_mouse_arrow_texture);
m_mouse_arrow_texture = NULL;
- // free the font
+ // free the font
if (m_font != NULL)
{
machine().render().font_free(m_font);
@@ -280,7 +280,7 @@ void ui_manager::exit()
void ui_manager::initialize(running_machine &machine)
{
- // initialize the on-screen display system
+ // initialize the on-screen display system
slider_list = slider_current = slider_init(machine);
}
@@ -712,7 +712,7 @@ void ui_manager::draw_text_full(render_container *container, const char *origs,
if (curwidth > maxwidth)
maxwidth = curwidth;
- // if opaque, add a black box
+ // if opaque, add a black box
if (draw == DRAW_OPAQUE)
container->add_rect(curx, cury, curx + curwidth, cury + lineheight, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
@@ -1131,7 +1131,7 @@ astring &ui_manager::game_info_astring(astring &string)
// get cpu specific clock that takes internal multiplier/dividers into account
int clock = exec->device().clock();
- // count how many identical CPUs we have
+ // count how many identical CPUs we have
int count = 1;
const char *name = exec->device().name();
execute_interface_iterator execinneriter(machine().root_device());
@@ -1142,19 +1142,19 @@ astring &ui_manager::game_info_astring(astring &string)
count++;
}
- // if more than one, prepend a #x in front of the CPU name
+ // if more than one, prepend a #x in front of the CPU name
if (count > 1)
string.catprintf("%d" UTF8_MULTIPLY, count);
string.cat(name);
- // display clock in kHz or MHz
+ // display clock in kHz or MHz
if (clock >= 1000000)
string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000);
else
string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000);
}
- // loop over all sound chips
+ // loop over all sound chips
sound_interface_iterator snditer(machine().root_device());
tagmap_t<UINT8> soundtags;
bool found_sound = false;
@@ -1163,12 +1163,12 @@ astring &ui_manager::game_info_astring(astring &string)
if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
- // append the Sound: string
+ // append the Sound: string
if (!found_sound)
string.cat("\nSound:\n");
found_sound = true;
- // count how many identical sound chips we have
+ // count how many identical sound chips we have
int count = 1;
sound_interface_iterator sndinneriter(machine().root_device());
for (device_sound_interface *scan = sndinneriter.first(); scan != NULL; scan = sndinneriter.next())
@@ -1177,12 +1177,12 @@ astring &ui_manager::game_info_astring(astring &string)
if (soundtags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
count++;
}
- // if more than one, prepend a #x in front of the CPU name
+ // if more than one, prepend a #x in front of the CPU name
if (count > 1)
string.catprintf("%d" UTF8_MULTIPLY, count);
string.cat(sound->device().name());
- // display clock in kHz or MHz
+ // display clock in kHz or MHz
int clock = sound->device().clock();
if (clock >= 1000000)
string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000);
@@ -1192,7 +1192,7 @@ astring &ui_manager::game_info_astring(astring &string)
string.cat("\n");
}
- // display screen information
+ // display screen information
string.cat("\nVideo:\n");
screen_device_iterator scriter(machine().root_device());
int scrcount = scriter.count();
@@ -1250,18 +1250,18 @@ UINT32 ui_manager::handler_messagebox(running_machine &machine, render_container
UINT32 ui_manager::handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state)
{
- // draw a standard message window
+ // draw a standard message window
machine.ui().draw_text_box(container, messagebox_text, JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
- // an 'O' or left joystick kicks us to the next state
+ // an 'O' or left joystick kicks us to the next state
if (state == 0 && (machine.input().code_pressed_once(KEYCODE_O) || ui_input_pressed(machine, IPT_UI_LEFT)))
state++;
- // a 'K' or right joystick exits the state
+ // a 'K' or right joystick exits the state
else if (state == 1 && (machine.input().code_pressed_once(KEYCODE_K) || ui_input_pressed(machine, IPT_UI_RIGHT)))
state = UI_HANDLER_CANCEL;
- // if the user cancels, exit out completely
+ // if the user cancels, exit out completely
else if (ui_input_pressed(machine, IPT_UI_CANCEL))
{
machine.schedule_exit();
@@ -1280,17 +1280,17 @@ UINT32 ui_manager::handler_messagebox_ok(running_machine &machine, render_contai
UINT32 ui_manager::handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state)
{
- // draw a standard message window
+ // draw a standard message window
machine.ui().draw_text_box(container, messagebox_text, JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
- // if the user cancels, exit out completely
+ // if the user cancels, exit out completely
if (ui_input_pressed(machine, IPT_UI_CANCEL))
{
machine.schedule_exit();
state = UI_HANDLER_CANCEL;
}
- // if any key is pressed, just exit
+ // if any key is pressed, just exit
else if (machine.input().poll_switches() != INPUT_CODE_INVALID)
state = UI_HANDLER_CANCEL;
@@ -1312,39 +1312,39 @@ void ui_manager::process_natural_keyboard()
UINT8 *key_down_ptr;
UINT8 key_down_mask;
- // loop while we have interesting events
+ // loop while we have interesting events
while (ui_input_pop_event(machine(), &event))
{
- // if this was a UI_EVENT_CHAR event, post it
+ // if this was a UI_EVENT_CHAR event, post it
if (event.event_type == UI_EVENT_CHAR)
machine().ioport().natkeyboard().post(event.ch);
}
- // process natural keyboard keys that don't get UI_EVENT_CHARs
+ // process natural keyboard keys that don't get UI_EVENT_CHARs
for (i = 0; i < ARRAY_LENGTH(non_char_keys); i++)
{
- // identify this keycode
+ // identify this keycode
itemid = non_char_keys[i];
code = machine().input().code_from_itemid(itemid);
- // ...and determine if it is pressed
+ // ...and determine if it is pressed
pressed = machine().input().code_pressed(code);
- // figure out whey we are in the key_down map
+ // figure out whey we are in the key_down map
key_down_ptr = &m_non_char_keys_down[i / 8];
key_down_mask = 1 << (i % 8);
if (pressed && !(*key_down_ptr & key_down_mask))
{
- // this key is now down
+ // this key is now down
*key_down_ptr |= key_down_mask;
- // post the key
+ // post the key
machine().ioport().natkeyboard().post(UCHAR_MAMEKEY_BEGIN + code.item_id());
}
else if (!pressed && (*key_down_ptr & key_down_mask))
{
- // this key is now up
+ // this key is now up
*key_down_ptr &= ~key_down_mask;
}
}
@@ -1357,13 +1357,13 @@ void ui_manager::process_natural_keyboard()
void ui_manager::increase_frameskip()
{
- // get the current value and increment it
+ // get the current value and increment it
int newframeskip = machine().video().frameskip() + 1;
if (newframeskip > MAX_FRAMESKIP)
newframeskip = -1;
machine().video().set_frameskip(newframeskip);
- // display the FPS counter for 2 seconds
+ // display the FPS counter for 2 seconds
machine().ui().show_fps_temp(2.0);
}
@@ -1374,13 +1374,13 @@ void ui_manager::increase_frameskip()
void ui_manager::decrease_frameskip()
{
- // get the current value and decrement it
+ // get the current value and decrement it
int newframeskip = machine().video().frameskip() - 1;
if (newframeskip < -1)
newframeskip = MAX_FRAMESKIP;
machine().video().set_frameskip(newframeskip);
- // display the FPS counter for 2 seconds
+ // display the FPS counter for 2 seconds
machine().ui().show_fps_temp(2.0);
}
@@ -1391,7 +1391,7 @@ void ui_manager::decrease_frameskip()
bool ui_manager::can_paste()
{
- // retrieve the clipboard text
+ // retrieve the clipboard text
char *text = osd_get_clipboard_text();
// free the string if allocated
@@ -1409,16 +1409,16 @@ bool ui_manager::can_paste()
void ui_manager::paste()
{
- // retrieve the clipboard text
+ // retrieve the clipboard text
char *text = osd_get_clipboard_text();
- // was a result returned?
+ // was a result returned?
if (text != NULL)
{
- // post the text
+ // post the text
machine().ioport().natkeyboard().post_utf8(text);
- // free the string
+ // free the string
osd_free(text);
}
}
@@ -1431,7 +1431,7 @@ void ui_manager::paste()
void ui_manager::image_handler_ingame()
{
- // run display routine for devices
+ // run display routine for devices
if (machine().phase() == MACHINE_PHASE_RUNNING)
{
image_interface_iterator iter(machine().root_device());
@@ -1450,7 +1450,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
{
bool is_paused = machine.paused();
- // first draw the FPS counter
+ // first draw the FPS counter
if (machine.ui().show_fps_counter())
{
astring tempstring;
@@ -1458,33 +1458,33 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
}
- // draw the profiler if visible
+ // draw the profiler if visible
if (machine.ui().show_profiler())
{
const char *text = g_profiler.text(machine);
machine.ui().draw_text_full(container, text, 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
}
- // if we're single-stepping, pause now
+ // if we're single-stepping, pause now
if (machine.ui().single_step())
{
machine.pause();
machine.ui().set_single_step(false);
}
- // determine if we should disable the rest of the UI
+ // determine if we should disable the rest of the UI
bool ui_disabled = (machine.ioport().has_keyboard() && !machine.ui_active());
- // is ScrLk UI toggling applicable here?
+ // is ScrLk UI toggling applicable here?
if (machine.ioport().has_keyboard())
{
- // are we toggling the UI with ScrLk?
+ // are we toggling the UI with ScrLk?
if (ui_input_pressed(machine, IPT_UI_TOGGLE_UI))
{
- // toggle the UI
+ // toggle the UI
machine.set_ui_active(!machine.ui_active());
- // display a popup indicating the new status
+ // display a popup indicating the new status
if (machine.ui_active())
{
machine.ui().popup_time(2, "%s\n%s\n%s\n%s\n%s\n%s\n",
@@ -1508,13 +1508,13 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
}
}
- // is the natural keyboard enabled?
+ // is the natural keyboard enabled?
if (machine.ui().use_natural_keyboard() && (machine.phase() == MACHINE_PHASE_RUNNING))
machine.ui().process_natural_keyboard();
if (!ui_disabled)
{
- // paste command
+ // paste command
if (ui_input_pressed(machine, IPT_UI_PASTE))
machine.ui().paste();
}
@@ -1529,21 +1529,21 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
return 0;
}
- // turn on menus if requested
+ // turn on menus if requested
if (ui_input_pressed(machine, IPT_UI_CONFIGURE))
return machine.ui().set_handler(ui_menu::ui_handler, 0);
- // if the on-screen display isn't up and the user has toggled it, turn it on
+ // if the on-screen display isn't up and the user has toggled it, turn it on
if ((machine.debug_flags & DEBUG_FLAG_ENABLED) == 0 && ui_input_pressed(machine, IPT_UI_ON_SCREEN_DISPLAY))
return machine.ui().set_handler(ui_menu_sliders::ui_handler, 1);
- // handle a reset request
+ // handle a reset request
if (ui_input_pressed(machine, IPT_UI_RESET_MACHINE))
machine.schedule_hard_reset();
if (ui_input_pressed(machine, IPT_UI_SOFT_RESET))
machine.schedule_soft_reset();
- // handle a request to display graphics/palette
+ // handle a request to display graphics/palette
if (ui_input_pressed(machine, IPT_UI_SHOW_GFX))
{
if (!is_paused)
@@ -1551,28 +1551,28 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
return machine.ui().set_handler(ui_gfx_ui_handler, is_paused);
}
- // handle a save state request
+ // handle a save state request
if (ui_input_pressed(machine, IPT_UI_SAVE_STATE))
{
machine.pause();
return machine.ui().set_handler(handler_load_save, LOADSAVE_SAVE);
}
- // handle a load state request
+ // handle a load state request
if (ui_input_pressed(machine, IPT_UI_LOAD_STATE))
{
machine.pause();
return machine.ui().set_handler(handler_load_save, LOADSAVE_LOAD);
}
- // handle a save snapshot request
+ // handle a save snapshot request
if (ui_input_pressed(machine, IPT_UI_SNAPSHOT))
machine.video().save_active_screen_snapshots();
- // toggle pause
+ // toggle pause
if (ui_input_pressed(machine, IPT_UI_PAUSE))
{
- // with a shift key, it is single step
+ // with a shift key, it is single step
if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT)))
{
machine.ui().set_single_step(true);
@@ -1582,35 +1582,35 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
machine.toggle_pause();
}
- // handle a toggle cheats request
+ // handle a toggle cheats request
if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT))
machine.cheat().set_enable(!machine.cheat().enabled());
- // toggle movie recording
+ // toggle movie recording
if (ui_input_pressed(machine, IPT_UI_RECORD_MOVIE))
machine.video().toggle_record_movie();
- // toggle profiler display
+ // toggle profiler display
if (ui_input_pressed(machine, IPT_UI_SHOW_PROFILER))
machine.ui().set_show_profiler(!machine.ui().show_profiler());
- // toggle FPS display
+ // toggle FPS display
if (ui_input_pressed(machine, IPT_UI_SHOW_FPS))
machine.ui().set_show_fps(!machine.ui().show_fps());
- // increment frameskip?
+ // increment frameskip?
if (ui_input_pressed(machine, IPT_UI_FRAMESKIP_INC))
machine.ui().increase_frameskip();
- // decrement frameskip?
+ // decrement frameskip?
if (ui_input_pressed(machine, IPT_UI_FRAMESKIP_DEC))
machine.ui().decrease_frameskip();
- // toggle throttle?
+ // toggle throttle?
if (ui_input_pressed(machine, IPT_UI_THROTTLE))
machine.video().toggle_throttle();
- // check for fast forward
+ // check for fast forward
if (machine.ioport().type_pressed(IPT_UI_FAST_FORWARD))
{
machine.video().set_fastforward(true);
@@ -1634,31 +1634,31 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
input_code code;
char file = 0;
- // if we're not in the middle of anything, skip
+ // if we're not in the middle of anything, skip
if (state == LOADSAVE_NONE)
return 0;
- // okay, we're waiting for a key to select a slot; display a message
+ // okay, we're waiting for a key to select a slot; display a message
if (state == LOADSAVE_SAVE)
machine.ui().draw_message_window(container, "Select position to save to");
else
machine.ui().draw_message_window(container, "Select position to load from");
- // check for cancel key
+ // check for cancel key
if (ui_input_pressed(machine, IPT_UI_CANCEL))
{
- // display a popup indicating things were cancelled
+ // display a popup indicating things were cancelled
if (state == LOADSAVE_SAVE)
popmessage("Save cancelled");
else
popmessage("Load cancelled");
- // reset the state
+ // reset the state
machine.resume();
return UI_HANDLER_CANCEL;
}
- // check for A-Z or 0-9
+ // check for A-Z or 0-9
for (input_item_id id = ITEM_ID_A; id <= ITEM_ID_Z; id++)
if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
file = id - ITEM_ID_A + 'a';
@@ -1673,7 +1673,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
if (file == 0)
return state;
- // display a popup indicating that the save will proceed
+ // display a popup indicating that the save will proceed
sprintf(filename, "%c", file);
if (state == LOADSAVE_SAVE)
{
@@ -1686,7 +1686,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
machine.schedule_load(filename);
}
- // remove the pause and reset the state
+ // remove the pause and reset the state
machine.resume();
return UI_HANDLER_CANCEL;
}
@@ -1719,11 +1719,11 @@ UINT32 ui_manager::handler_confirm_quit(running_machine &machine, render_contain
machine.ui().draw_text_box(container, quit_message, JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR);
machine.pause();
- // if the user press ENTER, quit the game
+ // if the user press ENTER, quit the game
if (ui_input_pressed(machine, IPT_UI_SELECT))
machine.schedule_exit();
- // if the user press ESC, just continue
+ // if the user press ESC, just continue
else if (ui_input_pressed(machine, IPT_UI_CANCEL))
{
machine.resume();
@@ -1783,11 +1783,11 @@ static slider_state *slider_init(running_machine &machine)
astring string;
int item;
- // add overall volume
+ // add overall volume
*tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, NULL);
tailptr = &(*tailptr)->next;
- // add per-channel volume
+ // add per-channel volume
mixer_input info;
for (item = 0; machine.sound().indexed_mixer_input(item, info); item++)
{
@@ -1800,7 +1800,7 @@ static slider_state *slider_init(running_machine &machine)
tailptr = &(*tailptr)->next;
}
- // add analog adjusters
+ // add analog adjusters
for (port = machine.ioport().first_port(); port != NULL; port = port->next())
for (field = port->first_field(); field != NULL; field = field->next())
if (field->type() == IPT_ADJUSTER)
@@ -1810,7 +1810,7 @@ static slider_state *slider_init(running_machine &machine)
tailptr = &(*tailptr)->next;
}
- // add CPU overclocking (cheat only)
+ // add CPU overclocking (cheat only)
if (machine.options().cheat())
{
execute_interface_iterator iter(machine.root_device());
@@ -1823,7 +1823,7 @@ static slider_state *slider_init(running_machine &machine)
}
}
- // add screen parameters
+ // add screen parameters
screen_device_iterator scriter(machine.root_device());
for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
{
@@ -1833,7 +1833,7 @@ static slider_state *slider_init(running_machine &machine)
int defyoffset = floor(screen->yoffset() * 1000.0f + 0.5f);
void *param = (void *)screen;
- // add refresh rate tweaker
+ // add refresh rate tweaker
if (machine.options().cheat())
{
string.printf("%s Refresh Rate", slider_get_screen_desc(*screen));
@@ -1841,7 +1841,7 @@ static slider_state *slider_init(running_machine &machine)
tailptr = &(*tailptr)->next;
}
- // add standard brightness/contrast/gamma controls per-screen
+ // add standard brightness/contrast/gamma controls per-screen
string.printf("%s Brightness", slider_get_screen_desc(*screen));
*tailptr = slider_alloc(machine, string, 100, 1000, 2000, 10, slider_brightness, param);
tailptr = &(*tailptr)->next;
@@ -1852,7 +1852,7 @@ static slider_state *slider_init(running_machine &machine)
*tailptr = slider_alloc(machine, string, 100, 1000, 3000, 50, slider_gamma, param);
tailptr = &(*tailptr)->next;
- // add scale and offset controls per-screen
+ // add scale and offset controls per-screen
string.printf("%s Horiz Stretch", slider_get_screen_desc(*screen));
*tailptr = slider_alloc(machine, string, 500, defxscale, 1500, 2, slider_xscale, param);
tailptr = &(*tailptr)->next;
@@ -1879,7 +1879,7 @@ static slider_state *slider_init(running_machine &machine)
int defyoffset = floor(config.m_overposy * 1000.0f + 0.5f);
void *param = (void *)laserdisc;
- // add scale and offset controls per-overlay
+ // add scale and offset controls per-overlay
string.printf("Laserdisc '%s' Horiz Stretch", laserdisc->tag());
*tailptr = slider_alloc(machine, string, 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param);
tailptr = &(*tailptr)->next;
@@ -1897,7 +1897,7 @@ static slider_state *slider_init(running_machine &machine)
for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
{
- // add flicker control
+ // add flicker control
*tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL);
tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(machine, "Beam Width", 10, 100, 1000, 10, slider_beam, NULL);
@@ -1906,7 +1906,7 @@ static slider_state *slider_init(running_machine &machine)
}
#ifdef MAME_DEBUG
- // add crosshair adjusters
+ // add crosshair adjusters
for (port = machine.ioport().first_port(); port != NULL; port = port->next())
for (field = port->first_field(); field != NULL; field = field->next())
if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->player() == 0)
diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h
index 4506555156f..fa6c4824d1a 100644
--- a/src/emu/ui/ui.h
+++ b/src/emu/ui/ui.h
@@ -170,25 +170,25 @@ public:
private:
// instance variables
- running_machine & m_machine;
- render_font * m_font;
- ui_callback m_handler_callback;
- UINT32 m_handler_param;
- bool m_single_step;
- bool m_showfps;
- osd_ticks_t m_showfps_end;
- bool m_show_profiler;
- osd_ticks_t m_popup_text_end;
- bool m_use_natural_keyboard;
- UINT8 * m_non_char_keys_down;
- render_texture * m_mouse_arrow_texture;
- bool m_mouse_show;
-
- // text generators
+ running_machine & m_machine;
+ render_font * m_font;
+ ui_callback m_handler_callback;
+ UINT32 m_handler_param;
+ bool m_single_step;
+ bool m_showfps;
+ osd_ticks_t m_showfps_end;
+ bool m_show_profiler;
+ osd_ticks_t m_popup_text_end;
+ bool m_use_natural_keyboard;
+ UINT8 * m_non_char_keys_down;
+ render_texture * m_mouse_arrow_texture;
+ bool m_mouse_show;
+
+ // text generators
astring &disclaimer_string(astring &buffer);
astring &warnings_string(astring &buffer);
- // UI handlers
+ // UI handlers
static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state);
static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state);
static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state);
diff --git a/src/emu/ui/viewgfx.c b/src/emu/ui/viewgfx.c
index c6410229121..feb084ca597 100644
--- a/src/emu/ui/viewgfx.c
+++ b/src/emu/ui/viewgfx.c
@@ -41,54 +41,54 @@ const int MAX_GFX_DECODERS = 8;
// information about a single gfx device
struct ui_gfx_info
{
- device_gfx_interface *interface; // pointer to device's gfx interface
- UINT8 setcount; // how many gfx sets device has
- UINT8 rotate[MAX_GFX_ELEMENTS]; // current rotation (orientation) value
- UINT8 columns[MAX_GFX_ELEMENTS]; // number of items per row
- int offset[MAX_GFX_ELEMENTS]; // current offset of top,left item
- int color[MAX_GFX_ELEMENTS]; // current color selected
+ device_gfx_interface *interface; // pointer to device's gfx interface
+ UINT8 setcount; // how many gfx sets device has
+ UINT8 rotate[MAX_GFX_ELEMENTS]; // current rotation (orientation) value
+ UINT8 columns[MAX_GFX_ELEMENTS]; // number of items per row
+ int offset[MAX_GFX_ELEMENTS]; // current offset of top,left item
+ int color[MAX_GFX_ELEMENTS]; // current color selected
};
struct ui_gfx_state
{
- bool started; // have we called ui_gfx_count_devices() yet?
- UINT8 mode; // which mode are we in?
+ bool started; // have we called ui_gfx_count_devices() yet?
+ UINT8 mode; // which mode are we in?
// intermediate bitmaps
- bool bitmap_dirty; // is the bitmap dirty?
- bitmap_rgb32 * bitmap; // bitmap for drawing gfx and tilemaps
- render_texture *texture; // texture for rendering the above bitmap
+ bool bitmap_dirty; // is the bitmap dirty?
+ bitmap_rgb32 * bitmap; // bitmap for drawing gfx and tilemaps
+ render_texture *texture; // texture for rendering the above bitmap
// palette-specific data
struct
{
- palette_device *device; // pointer to current device
- int devcount; // how many palette devices exist
- int devindex; // which palette device is visible
- UINT8 which; // which subset (pens or indirect colors)?
- UINT8 columns; // number of items per row
- int offset; // current offset of top left item
+ palette_device *device; // pointer to current device
+ int devcount; // how many palette devices exist
+ int devindex; // which palette device is visible
+ UINT8 which; // which subset (pens or indirect colors)?
+ UINT8 columns; // number of items per row
+ int offset; // current offset of top left item
} palette;
// graphics-specific data
struct
{
- UINT8 devcount; // how many gfx devices exist
- UINT8 devindex; // which device is visible
- UINT8 set; // which set is visible
+ UINT8 devcount; // how many gfx devices exist
+ UINT8 devindex; // which device is visible
+ UINT8 set; // which set is visible
} gfxset;
-
+
// information about each gfx device
ui_gfx_info gfxdev[MAX_GFX_DECODERS];
// tilemap-specific data
struct
{
- int which; // which tilemap are we viewing?
- int xoffs; // current X offset
- int yoffs; // current Y offset
- int zoom; // zoom factor
- UINT8 rotate; // current rotation (orientation) value
+ int which; // which tilemap are we viewing?
+ int xoffs; // current X offset
+ int yoffs; // current Y offset
+ int zoom; // zoom factor
+ UINT8 rotate; // current rotation (orientation) value
} tilemap;
};
@@ -254,7 +254,7 @@ bool ui_gfx_is_relevant(running_machine &machine)
UINT32 ui_gfx_ui_handler(running_machine &machine, render_container *container, UINT32 uistate)
{
ui_gfx_state &state = ui_gfx;
-
+
// if we have nothing, implicitly cancel
if (!ui_gfx_is_relevant(machine))
goto cancel;
diff --git a/src/emu/validity.c b/src/emu/validity.c
index 12be4401410..50b66778042 100644
--- a/src/emu/validity.c
+++ b/src/emu/validity.c
@@ -966,7 +966,7 @@ void validity_checker::validate_inputs()
void validity_checker::validate_devices()
{
int_map device_map;
-
+
device_iterator iter_find(m_current_config->root_device());
for (const device_t *device = iter_find.first(); device != NULL; device = iter_find.next())
{
diff --git a/src/emu/validity.h b/src/emu/validity.h
index b44fdaf364b..c6777ade775 100644
--- a/src/emu/validity.h
+++ b/src/emu/validity.h
@@ -47,10 +47,10 @@ public:
// helpers for devices
void validate_tag(const char *tag);
int region_length(const char *tag) { return m_region_map.find(tag); }
-
+
// generic registry of already-checked stuff
bool already_checked(const char *string) { return (m_already_checked.add(string, 1, false) == TMERR_DUPLICATE); }
-
+
private:
// internal helpers
const char *ioport_string_from_index(UINT32 index);
@@ -99,7 +99,7 @@ private:
const device_t * m_current_device;
const char * m_current_ioport;
int_map m_region_map;
- tagmap_t<UINT8> m_already_checked;
+ tagmap_t<UINT8> m_already_checked;
// callbacks
output_delegate m_saved_error_output;
diff --git a/src/emu/video.c b/src/emu/video.c
index 8083a0fe2cc..aebf8cf5bff 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -1247,7 +1247,7 @@ void video_manager::record_frame()
}
//-------------------------------------------------
-// toggle_throttle
+// toggle_throttle
//-------------------------------------------------
void video_manager::toggle_throttle()
@@ -1257,7 +1257,7 @@ void video_manager::toggle_throttle()
//-------------------------------------------------
-// toggle_record_movie
+// toggle_record_movie
//-------------------------------------------------
void video_manager::toggle_record_movie()
diff --git a/src/emu/video/315_5124.h b/src/emu/video/315_5124.h
index 02d5531dee4..0603c9ba0ff 100644
--- a/src/emu/video/315_5124.h
+++ b/src/emu/video/315_5124.h
@@ -64,7 +64,7 @@ public:
static void set_signal_type(device_t &device, bool is_pal) { downcast<sega315_5124_device &>(device).m_is_pal = is_pal; }
template<class _Object> static devcb2_base &set_int_callback(device_t &device, _Object object) { return downcast<sega315_5124_device &>(device).m_int_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_pause_callback(device_t &device, _Object object) { return downcast<sega315_5124_device &>(device).m_pause_cb.set_callback(object); }
-
+
DECLARE_READ8_MEMBER( vram_read );
DECLARE_WRITE8_MEMBER( vram_write );
DECLARE_READ8_MEMBER( register_read );
@@ -164,7 +164,7 @@ protected:
static const device_timer_id TIMER_DRAW = 1;
static const device_timer_id TIMER_CHECK_HINT = 2;
static const device_timer_id TIMER_CHECK_VINT = 3;
-
+
required_device<palette_device> m_palette;
};
@@ -209,31 +209,31 @@ protected:
#define MCFG_SEGA315_5124_INT_CB(_devcb) \
devcb = &sega315_5124_device::set_int_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_SEGA315_5124_PAUSE_CB(_devcb) \
devcb = &sega315_5124_device::set_pause_callback(*device, DEVCB2_##_devcb);
#define MCFG_SEGA315_5246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
+
#define MCFG_SEGA315_5246_IS_PAL(_bool) \
sega315_5246_device::set_signal_type(*device, _bool);
#define MCFG_SEGA315_5246_INT_CB(_devcb) \
devcb = &sega315_5246_device::set_int_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_SEGA315_5246_PAUSE_CB(_devcb) \
devcb = &sega315_5246_device::set_pause_callback(*device, DEVCB2_##_devcb);
#define MCFG_SEGA315_5378_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
+
#define MCFG_SEGA315_5378_IS_PAL(_bool) \
sega315_5378_device::set_signal_type(*device, _bool);
#define MCFG_SEGA315_5378_INT_CB(_devcb) \
devcb = &sega315_5378_device::set_int_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_SEGA315_5378_PAUSE_CB(_devcb) \
devcb = &sega315_5378_device::set_pause_callback(*device, DEVCB2_##_devcb);
diff --git a/src/emu/video/315_5313.c b/src/emu/video/315_5313.c
index 662792377e5..86ad88c8509 100644
--- a/src/emu/video/315_5313.c
+++ b/src/emu/video/315_5313.c
@@ -2530,7 +2530,7 @@ void sega315_5313_device::render_videobuffer_to_screenbuffer(int scanline)
lineptr[x] = m_palette_lookup[(dat & 0x3f)];
m_render_line_raw[x] |= (dat & 0x3f) | 0x040;
}
-
+
}
else
{
@@ -2546,26 +2546,26 @@ void sega315_5313_device::render_videobuffer_to_screenbuffer(int scanline)
lineptr[x] = m_palette_lookup_shadow[(dat & 0x3f)];
m_render_line_raw[x] |= (dat & 0x3f) | 0x000;
break;
-
+
case 0x4000: // normal pri, no shadow sprite, no highlight = normal;
case 0x8000: // low pri, highlight sprite = normal;
lineptr[x] = m_palette_lookup[(dat & 0x3f)];
m_render_line_raw[x] |= (dat & 0x3f) | 0x040;
break;
-
+
case 0x14000: // (sprite) normal pri, no shadow sprite, no highlight = normal;
case 0x18000: // (sprite) low pri, highlight sprite = normal;
lineptr[x] = m_palette_lookup_sprite[(dat & 0x3f)];
m_render_line_raw[x] |= (dat & 0x3f) | 0x080;
break;
-
-
+
+
case 0x0c000: // normal pri, highlight set = highlight?
case 0x1c000: // (sprite) normal pri, highlight set = highlight?
lineptr[x] = m_palette_lookup_highlight[(dat & 0x3f)];
m_render_line_raw[x] |= (dat & 0x3f) | 0x0c0;
break;
-
+
case 0x0a000: // shadow set, highlight set - not possible
case 0x0e000: // shadow set, highlight set, normal set, not possible
case 0x1a000: // (sprite)shadow set, highlight set - not possible
diff --git a/src/emu/video/315_5313.h b/src/emu/video/315_5313.h
index 94694cfe1f4..9292a339df6 100644
--- a/src/emu/video/315_5313.h
+++ b/src/emu/video/315_5313.h
@@ -149,25 +149,25 @@
#define MCFG_SEGA315_5313_INT_CB(_devcb) \
devcb = &sega315_5313_device::set_int_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_SEGA315_5313_PAUSE_CB(_devcb) \
devcb = &sega315_5313_device::set_pause_callback(*device, DEVCB2_##_devcb);
#define MCFG_SEGA315_5313_SND_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_sndirqline_callback(*device, DEVCB2_##_write);
-
+
#define MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_lv6irqline_callback(*device, DEVCB2_##_write);
-
+
#define MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(_write) \
devcb = &sega315_5313_device::set_lv4irqline_callback(*device, DEVCB2_##_write);
-
+
#define MCFG_SEGA315_5313_ALT_TIMING(_data) \
sega315_5313_device::set_alt_timing(*device, _data);
-
+
#define MCFG_SEGA315_5313_PAL_WRITE_BASE(_data) \
sega315_5313_device::set_palwrite_base(*device, _data);
-
+
#define MCFG_SEGA315_5313_PALETTE(_palette_tag) \
sega315_5313_device::static_set_palette_tag(*device, "^" _palette_tag);
@@ -257,11 +257,11 @@ protected:
devcb2_write_line m_sndirqline_callback;
devcb2_write_line m_lv6irqline_callback;
devcb2_write_line m_lv4irqline_callback;
-
+
md_32x_scanline_delegate m_32x_scanline_func;
md_32x_interrupt_delegate m_32x_interrupt_func;
md_32x_scanline_helper_delegate m_32x_scanline_helper_func;
-
+
private:
int m_command_pending; // 2nd half of command pending..
@@ -291,7 +291,7 @@ private:
int m_framerate;
int m_vdp_pal;
int m_use_cram; // c2 uses it's own palette ram, so it sets this to 0
- int m_dma_delay; // SVP and SegaCD have some 'lag' in DMA transfers
+ int m_dma_delay; // SVP and SegaCD have some 'lag' in DMA transfers
UINT16* m_regs;
UINT16* m_vram;
diff --git a/src/emu/video/crt9007.h b/src/emu/video/crt9007.h
index ada3f8bccde..8ca81f06890 100644
--- a/src/emu/video/crt9007.h
+++ b/src/emu/video/crt9007.h
@@ -97,8 +97,8 @@
// ======================> crt9007_t
class crt9007_t : public device_t,
- public device_memory_interface,
- public device_video_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
diff --git a/src/emu/video/crt9021.h b/src/emu/video/crt9021.h
index c72c5d850e1..856e9718d45 100644
--- a/src/emu/video/crt9021.h
+++ b/src/emu/video/crt9021.h
@@ -56,12 +56,12 @@ typedef device_delegate<void (bitmap_rgb32 &bitmap, int y, int x, UINT8 video, i
// ======================> crt9021_t
class crt9021_t : public device_t,
- public device_video_interface
+ public device_video_interface
{
public:
// construction/destruction
crt9021_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void static_set_display_callback(device_t &device, crt9021_draw_character_delegate callback) { downcast<crt9021_t &>(device).m_display_cb = callback; }
void write(UINT8 data) { m_data = data; }
diff --git a/src/emu/video/crt9212.h b/src/emu/video/crt9212.h
index eb17158c4eb..078429f4fd4 100644
--- a/src/emu/video/crt9212.h
+++ b/src/emu/video/crt9212.h
@@ -72,7 +72,7 @@ class crt9212_t : public device_t
public:
// construction/destruction
crt9212_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void static_set_wen2(device_t &device, int state) { downcast<crt9212_t &>(device).m_wen2 = state; }
template<class _Object> static devcb2_base &set_dout_wr_callback(device_t &device, _Object object) { return downcast<crt9212_t &>(device).m_write_dout.set_callback(object); }
@@ -94,7 +94,7 @@ protected:
virtual void device_start();
private:
- devcb2_write8 m_write_dout;
+ devcb2_write8 m_write_dout;
devcb2_write_line m_write_rof;
devcb2_write_line m_write_wof;
diff --git a/src/emu/video/dl1416.h b/src/emu/video/dl1416.h
index 6cc0db13899..80d0192e6f0 100644
--- a/src/emu/video/dl1416.h
+++ b/src/emu/video/dl1416.h
@@ -34,7 +34,7 @@ class dl1416_device : public device_t
public:
dl1416_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
~dl1416_device() {}
-
+
template<class _Object> static devcb2_base &set_update_handler(device_t &device, _Object object) { return downcast<dl1416_device &>(device).m_update.set_callback(object); }
/* inputs */
diff --git a/src/emu/video/ef9345.h b/src/emu/video/ef9345.h
index 540d3e13c3b..e41dcbc6fe4 100644
--- a/src/emu/video/ef9345.h
+++ b/src/emu/video/ef9345.h
@@ -21,7 +21,7 @@
#define MCFG_EF9345_PALETTE(_palette_tag) \
ef9345_device::static_set_palette_tag(*device, "^" _palette_tag);
-
+
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -38,7 +38,7 @@ public:
// static configuration
static void static_set_palette_tag(device_t &device, const char *tag);
-
+
// device interface
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
@@ -112,7 +112,7 @@ private:
// timers
emu_timer *m_busy_timer;
emu_timer *m_blink_timer;
-
+
required_device<palette_device> m_palette;
};
diff --git a/src/emu/video/epic12.c b/src/emu/video/epic12.c
index 8e927e1ade5..2c55e3655cf 100644
--- a/src/emu/video/epic12.c
+++ b/src/emu/video/epic12.c
@@ -42,7 +42,7 @@ TIMER_CALLBACK_MEMBER( epic12_device::epic12_device_blitter_delay_callback )
}
// static
- void epic12_device::set_rambase(device_t &device, UINT16* rambase)
+ void epic12_device::set_rambase(device_t &device, UINT16* rambase)
{
epic12_device &dev = downcast<epic12_device &>(device);
dev.epic12_device_ram16 = rambase;
@@ -87,7 +87,6 @@ void epic12_device::device_start()
void epic12_device::device_reset()
{
-
if (m_is_unsafe)
{
use_ram = epic12_device_ram16;
@@ -138,7 +137,7 @@ inline UINT16 epic12_device::READ_NEXT_WORD(offs_t *addr)
{
// UINT16 data = space.read_word(*addr); // going through the memory system is 'more correct' but noticably slower
UINT16 data = use_ram[((*addr & m_main_rammask) >> 1) ^ NATIVE_ENDIAN_VALUE_LE_BE(3, 0)];
-
+
*addr += 2;
// printf("data %04x\n", data);
@@ -229,7 +228,6 @@ inline void epic12_device::epic12_device_gfx_upload(offs_t *addr)
epic12_device_blitfunction epic12_device_f0_ti1_tr1_blit_funcs[] =
{
-
epic12_device::draw_sprite_f0_ti1_tr1_s0_d0, epic12_device::draw_sprite_f0_ti1_tr1_s1_d0, epic12_device::draw_sprite_f0_ti1_tr1_s2_d0, epic12_device::draw_sprite_f0_ti1_tr1_s3_d0, epic12_device::draw_sprite_f0_ti1_tr1_s4_d0, epic12_device::draw_sprite_f0_ti1_tr1_s5_d0, epic12_device::draw_sprite_f0_ti1_tr1_s6_d0, epic12_device::draw_sprite_f0_ti1_tr1_s7_d0,
epic12_device::draw_sprite_f0_ti1_tr1_s0_d1, epic12_device::draw_sprite_f0_ti1_tr1_s1_d1, epic12_device::draw_sprite_f0_ti1_tr1_s2_d1, epic12_device::draw_sprite_f0_ti1_tr1_s3_d1, epic12_device::draw_sprite_f0_ti1_tr1_s4_d1, epic12_device::draw_sprite_f0_ti1_tr1_s5_d1, epic12_device::draw_sprite_f0_ti1_tr1_s6_d1, epic12_device::draw_sprite_f0_ti1_tr1_s7_d1,
epic12_device::draw_sprite_f0_ti1_tr1_s0_d2, epic12_device::draw_sprite_f0_ti1_tr1_s1_d2, epic12_device::draw_sprite_f0_ti1_tr1_s2_d2, epic12_device::draw_sprite_f0_ti1_tr1_s3_d2, epic12_device::draw_sprite_f0_ti1_tr1_s4_d2, epic12_device::draw_sprite_f0_ti1_tr1_s5_d2, epic12_device::draw_sprite_f0_ti1_tr1_s6_d2, epic12_device::draw_sprite_f0_ti1_tr1_s7_d2,
@@ -242,7 +240,6 @@ epic12_device_blitfunction epic12_device_f0_ti1_tr1_blit_funcs[] =
epic12_device_blitfunction epic12_device_f0_ti1_tr0_blit_funcs[] =
{
-
epic12_device::draw_sprite_f0_ti1_tr0_s0_d0, epic12_device::draw_sprite_f0_ti1_tr0_s1_d0, epic12_device::draw_sprite_f0_ti1_tr0_s2_d0, epic12_device::draw_sprite_f0_ti1_tr0_s3_d0, epic12_device::draw_sprite_f0_ti1_tr0_s4_d0, epic12_device::draw_sprite_f0_ti1_tr0_s5_d0, epic12_device::draw_sprite_f0_ti1_tr0_s6_d0, epic12_device::draw_sprite_f0_ti1_tr0_s7_d0,
epic12_device::draw_sprite_f0_ti1_tr0_s0_d1, epic12_device::draw_sprite_f0_ti1_tr0_s1_d1, epic12_device::draw_sprite_f0_ti1_tr0_s2_d1, epic12_device::draw_sprite_f0_ti1_tr0_s3_d1, epic12_device::draw_sprite_f0_ti1_tr0_s4_d1, epic12_device::draw_sprite_f0_ti1_tr0_s5_d1, epic12_device::draw_sprite_f0_ti1_tr0_s6_d1, epic12_device::draw_sprite_f0_ti1_tr0_s7_d1,
epic12_device::draw_sprite_f0_ti1_tr0_s0_d2, epic12_device::draw_sprite_f0_ti1_tr0_s1_d2, epic12_device::draw_sprite_f0_ti1_tr0_s2_d2, epic12_device::draw_sprite_f0_ti1_tr0_s3_d2, epic12_device::draw_sprite_f0_ti1_tr0_s4_d2, epic12_device::draw_sprite_f0_ti1_tr0_s5_d2, epic12_device::draw_sprite_f0_ti1_tr0_s6_d2, epic12_device::draw_sprite_f0_ti1_tr0_s7_d2,
@@ -255,7 +252,6 @@ epic12_device_blitfunction epic12_device_f0_ti1_tr0_blit_funcs[] =
epic12_device_blitfunction epic12_device_f1_ti1_tr1_blit_funcs[] =
{
-
epic12_device::draw_sprite_f1_ti1_tr1_s0_d0, epic12_device::draw_sprite_f1_ti1_tr1_s1_d0, epic12_device::draw_sprite_f1_ti1_tr1_s2_d0, epic12_device::draw_sprite_f1_ti1_tr1_s3_d0, epic12_device::draw_sprite_f1_ti1_tr1_s4_d0, epic12_device::draw_sprite_f1_ti1_tr1_s5_d0, epic12_device::draw_sprite_f1_ti1_tr1_s6_d0, epic12_device::draw_sprite_f1_ti1_tr1_s7_d0,
epic12_device::draw_sprite_f1_ti1_tr1_s0_d1, epic12_device::draw_sprite_f1_ti1_tr1_s1_d1, epic12_device::draw_sprite_f1_ti1_tr1_s2_d1, epic12_device::draw_sprite_f1_ti1_tr1_s3_d1, epic12_device::draw_sprite_f1_ti1_tr1_s4_d1, epic12_device::draw_sprite_f1_ti1_tr1_s5_d1, epic12_device::draw_sprite_f1_ti1_tr1_s6_d1, epic12_device::draw_sprite_f1_ti1_tr1_s7_d1,
epic12_device::draw_sprite_f1_ti1_tr1_s0_d2, epic12_device::draw_sprite_f1_ti1_tr1_s1_d2, epic12_device::draw_sprite_f1_ti1_tr1_s2_d2, epic12_device::draw_sprite_f1_ti1_tr1_s3_d2, epic12_device::draw_sprite_f1_ti1_tr1_s4_d2, epic12_device::draw_sprite_f1_ti1_tr1_s5_d2, epic12_device::draw_sprite_f1_ti1_tr1_s6_d2, epic12_device::draw_sprite_f1_ti1_tr1_s7_d2,
@@ -268,7 +264,6 @@ epic12_device_blitfunction epic12_device_f1_ti1_tr1_blit_funcs[] =
epic12_device_blitfunction epic12_device_f1_ti1_tr0_blit_funcs[] =
{
-
epic12_device::draw_sprite_f1_ti1_tr0_s0_d0, epic12_device::draw_sprite_f1_ti1_tr0_s1_d0, epic12_device::draw_sprite_f1_ti1_tr0_s2_d0, epic12_device::draw_sprite_f1_ti1_tr0_s3_d0, epic12_device::draw_sprite_f1_ti1_tr0_s4_d0, epic12_device::draw_sprite_f1_ti1_tr0_s5_d0, epic12_device::draw_sprite_f1_ti1_tr0_s6_d0, epic12_device::draw_sprite_f1_ti1_tr0_s7_d0,
epic12_device::draw_sprite_f1_ti1_tr0_s0_d1, epic12_device::draw_sprite_f1_ti1_tr0_s1_d1, epic12_device::draw_sprite_f1_ti1_tr0_s2_d1, epic12_device::draw_sprite_f1_ti1_tr0_s3_d1, epic12_device::draw_sprite_f1_ti1_tr0_s4_d1, epic12_device::draw_sprite_f1_ti1_tr0_s5_d1, epic12_device::draw_sprite_f1_ti1_tr0_s6_d1, epic12_device::draw_sprite_f1_ti1_tr0_s7_d1,
epic12_device::draw_sprite_f1_ti1_tr0_s0_d2, epic12_device::draw_sprite_f1_ti1_tr0_s1_d2, epic12_device::draw_sprite_f1_ti1_tr0_s2_d2, epic12_device::draw_sprite_f1_ti1_tr0_s3_d2, epic12_device::draw_sprite_f1_ti1_tr0_s4_d2, epic12_device::draw_sprite_f1_ti1_tr0_s5_d2, epic12_device::draw_sprite_f1_ti1_tr0_s6_d2, epic12_device::draw_sprite_f1_ti1_tr0_s7_d2,
@@ -283,7 +278,6 @@ epic12_device_blitfunction epic12_device_f1_ti1_tr0_blit_funcs[] =
epic12_device_blitfunction epic12_device_f0_ti0_tr1_blit_funcs[] =
{
-
epic12_device::draw_sprite_f0_ti0_tr1_s0_d0, epic12_device::draw_sprite_f0_ti0_tr1_s1_d0, epic12_device::draw_sprite_f0_ti0_tr1_s2_d0, epic12_device::draw_sprite_f0_ti0_tr1_s3_d0, epic12_device::draw_sprite_f0_ti0_tr1_s4_d0, epic12_device::draw_sprite_f0_ti0_tr1_s5_d0, epic12_device::draw_sprite_f0_ti0_tr1_s6_d0, epic12_device::draw_sprite_f0_ti0_tr1_s7_d0,
epic12_device::draw_sprite_f0_ti0_tr1_s0_d1, epic12_device::draw_sprite_f0_ti0_tr1_s1_d1, epic12_device::draw_sprite_f0_ti0_tr1_s2_d1, epic12_device::draw_sprite_f0_ti0_tr1_s3_d1, epic12_device::draw_sprite_f0_ti0_tr1_s4_d1, epic12_device::draw_sprite_f0_ti0_tr1_s5_d1, epic12_device::draw_sprite_f0_ti0_tr1_s6_d1, epic12_device::draw_sprite_f0_ti0_tr1_s7_d1,
epic12_device::draw_sprite_f0_ti0_tr1_s0_d2, epic12_device::draw_sprite_f0_ti0_tr1_s1_d2, epic12_device::draw_sprite_f0_ti0_tr1_s2_d2, epic12_device::draw_sprite_f0_ti0_tr1_s3_d2, epic12_device::draw_sprite_f0_ti0_tr1_s4_d2, epic12_device::draw_sprite_f0_ti0_tr1_s5_d2, epic12_device::draw_sprite_f0_ti0_tr1_s6_d2, epic12_device::draw_sprite_f0_ti0_tr1_s7_d2,
@@ -296,7 +290,6 @@ epic12_device_blitfunction epic12_device_f0_ti0_tr1_blit_funcs[] =
epic12_device_blitfunction epic12_device_f0_ti0_tr0_blit_funcs[] =
{
-
epic12_device::draw_sprite_f0_ti0_tr0_s0_d0, epic12_device::draw_sprite_f0_ti0_tr0_s1_d0, epic12_device::draw_sprite_f0_ti0_tr0_s2_d0, epic12_device::draw_sprite_f0_ti0_tr0_s3_d0, epic12_device::draw_sprite_f0_ti0_tr0_s4_d0, epic12_device::draw_sprite_f0_ti0_tr0_s5_d0, epic12_device::draw_sprite_f0_ti0_tr0_s6_d0, epic12_device::draw_sprite_f0_ti0_tr0_s7_d0,
epic12_device::draw_sprite_f0_ti0_tr0_s0_d1, epic12_device::draw_sprite_f0_ti0_tr0_s1_d1, epic12_device::draw_sprite_f0_ti0_tr0_s2_d1, epic12_device::draw_sprite_f0_ti0_tr0_s3_d1, epic12_device::draw_sprite_f0_ti0_tr0_s4_d1, epic12_device::draw_sprite_f0_ti0_tr0_s5_d1, epic12_device::draw_sprite_f0_ti0_tr0_s6_d1, epic12_device::draw_sprite_f0_ti0_tr0_s7_d1,
epic12_device::draw_sprite_f0_ti0_tr0_s0_d2, epic12_device::draw_sprite_f0_ti0_tr0_s1_d2, epic12_device::draw_sprite_f0_ti0_tr0_s2_d2, epic12_device::draw_sprite_f0_ti0_tr0_s3_d2, epic12_device::draw_sprite_f0_ti0_tr0_s4_d2, epic12_device::draw_sprite_f0_ti0_tr0_s5_d2, epic12_device::draw_sprite_f0_ti0_tr0_s6_d2, epic12_device::draw_sprite_f0_ti0_tr0_s7_d2,
@@ -309,7 +302,6 @@ epic12_device_blitfunction epic12_device_f0_ti0_tr0_blit_funcs[] =
epic12_device_blitfunction epic12_device_f1_ti0_tr1_blit_funcs[] =
{
-
epic12_device::draw_sprite_f1_ti0_tr1_s0_d0, epic12_device::draw_sprite_f1_ti0_tr1_s1_d0, epic12_device::draw_sprite_f1_ti0_tr1_s2_d0, epic12_device::draw_sprite_f1_ti0_tr1_s3_d0, epic12_device::draw_sprite_f1_ti0_tr1_s4_d0, epic12_device::draw_sprite_f1_ti0_tr1_s5_d0, epic12_device::draw_sprite_f1_ti0_tr1_s6_d0, epic12_device::draw_sprite_f1_ti0_tr1_s7_d0,
epic12_device::draw_sprite_f1_ti0_tr1_s0_d1, epic12_device::draw_sprite_f1_ti0_tr1_s1_d1, epic12_device::draw_sprite_f1_ti0_tr1_s2_d1, epic12_device::draw_sprite_f1_ti0_tr1_s3_d1, epic12_device::draw_sprite_f1_ti0_tr1_s4_d1, epic12_device::draw_sprite_f1_ti0_tr1_s5_d1, epic12_device::draw_sprite_f1_ti0_tr1_s6_d1, epic12_device::draw_sprite_f1_ti0_tr1_s7_d1,
epic12_device::draw_sprite_f1_ti0_tr1_s0_d2, epic12_device::draw_sprite_f1_ti0_tr1_s1_d2, epic12_device::draw_sprite_f1_ti0_tr1_s2_d2, epic12_device::draw_sprite_f1_ti0_tr1_s3_d2, epic12_device::draw_sprite_f1_ti0_tr1_s4_d2, epic12_device::draw_sprite_f1_ti0_tr1_s5_d2, epic12_device::draw_sprite_f1_ti0_tr1_s6_d2, epic12_device::draw_sprite_f1_ti0_tr1_s7_d2,
@@ -322,7 +314,6 @@ epic12_device_blitfunction epic12_device_f1_ti0_tr1_blit_funcs[] =
epic12_device_blitfunction epic12_device_f1_ti0_tr0_blit_funcs[] =
{
-
epic12_device::draw_sprite_f1_ti0_tr0_s0_d0, epic12_device::draw_sprite_f1_ti0_tr0_s1_d0, epic12_device::draw_sprite_f1_ti0_tr0_s2_d0, epic12_device::draw_sprite_f1_ti0_tr0_s3_d0, epic12_device::draw_sprite_f1_ti0_tr0_s4_d0, epic12_device::draw_sprite_f1_ti0_tr0_s5_d0, epic12_device::draw_sprite_f1_ti0_tr0_s6_d0, epic12_device::draw_sprite_f1_ti0_tr0_s7_d0,
epic12_device::draw_sprite_f1_ti0_tr0_s0_d1, epic12_device::draw_sprite_f1_ti0_tr0_s1_d1, epic12_device::draw_sprite_f1_ti0_tr0_s2_d1, epic12_device::draw_sprite_f1_ti0_tr0_s3_d1, epic12_device::draw_sprite_f1_ti0_tr0_s4_d1, epic12_device::draw_sprite_f1_ti0_tr0_s5_d1, epic12_device::draw_sprite_f1_ti0_tr0_s6_d1, epic12_device::draw_sprite_f1_ti0_tr0_s7_d1,
epic12_device::draw_sprite_f1_ti0_tr0_s0_d2, epic12_device::draw_sprite_f1_ti0_tr0_s1_d2, epic12_device::draw_sprite_f1_ti0_tr0_s2_d2, epic12_device::draw_sprite_f1_ti0_tr0_s3_d2, epic12_device::draw_sprite_f1_ti0_tr0_s4_d2, epic12_device::draw_sprite_f1_ti0_tr0_s5_d2, epic12_device::draw_sprite_f1_ti0_tr0_s6_d2, epic12_device::draw_sprite_f1_ti0_tr0_s7_d2,
@@ -343,8 +334,8 @@ inline void epic12_device::epic12_device_gfx_draw_shadow_copy(address_space &spa
COPY_NEXT_WORD(space, addr);
COPY_NEXT_WORD(space, addr); // UINT16 dst_x_start = COPY_NEXT_WORD(space, addr);
COPY_NEXT_WORD(space, addr); // UINT16 dst_y_start = COPY_NEXT_WORD(space, addr);
- UINT16 w = COPY_NEXT_WORD(space, addr);
- UINT16 h = COPY_NEXT_WORD(space, addr);
+ UINT16 w = COPY_NEXT_WORD(space, addr);
+ UINT16 h = COPY_NEXT_WORD(space, addr);
COPY_NEXT_WORD(space, addr);
COPY_NEXT_WORD(space, addr);
@@ -359,21 +350,21 @@ inline void epic12_device::epic12_device_gfx_draw_shadow_copy(address_space &spa
inline void epic12_device::epic12_device_gfx_draw(offs_t *addr)
{
- int x,y, dimx,dimy, flipx,flipy;//, src_p;
+ int x,y, dimx,dimy, flipx,flipy;//, src_p;
int trans,blend, s_mode, d_mode;
clr_t tint_clr;
int tinted = 0;
- UINT16 attr = READ_NEXT_WORD(addr);
- UINT16 alpha = READ_NEXT_WORD(addr);
- UINT16 src_x = READ_NEXT_WORD(addr);
- UINT16 src_y = READ_NEXT_WORD(addr);
- UINT16 dst_x_start = READ_NEXT_WORD(addr);
- UINT16 dst_y_start = READ_NEXT_WORD(addr);
- UINT16 w = READ_NEXT_WORD(addr);
- UINT16 h = READ_NEXT_WORD(addr);
- UINT16 tint_r = READ_NEXT_WORD(addr);
- UINT16 tint_gb = READ_NEXT_WORD(addr);
+ UINT16 attr = READ_NEXT_WORD(addr);
+ UINT16 alpha = READ_NEXT_WORD(addr);
+ UINT16 src_x = READ_NEXT_WORD(addr);
+ UINT16 src_y = READ_NEXT_WORD(addr);
+ UINT16 dst_x_start = READ_NEXT_WORD(addr);
+ UINT16 dst_y_start = READ_NEXT_WORD(addr);
+ UINT16 w = READ_NEXT_WORD(addr);
+ UINT16 h = READ_NEXT_WORD(addr);
+ UINT16 tint_r = READ_NEXT_WORD(addr);
+ UINT16 tint_gb = READ_NEXT_WORD(addr);
// 0: +alpha
// 1: +source
@@ -384,28 +375,28 @@ inline void epic12_device::epic12_device_gfx_draw(offs_t *addr)
// 6: -dest
// 7: *
- d_mode = attr & 0x0007;
- s_mode = (attr & 0x0070) >> 4;
+ d_mode = attr & 0x0007;
+ s_mode = (attr & 0x0070) >> 4;
- trans = attr & 0x0100;
- blend = attr & 0x0200;
+ trans = attr & 0x0100;
+ blend = attr & 0x0200;
- flipy = attr & 0x0400;
- flipx = attr & 0x0800;
+ flipy = attr & 0x0400;
+ flipx = attr & 0x0800;
- const UINT8 d_alpha = ((alpha & 0x00ff) )>>3;
- const UINT8 s_alpha = ((alpha & 0xff00) >> 8 )>>3;
+ const UINT8 d_alpha = ((alpha & 0x00ff) )>>3;
+ const UINT8 s_alpha = ((alpha & 0xff00) >> 8 )>>3;
// src_p = 0;
- src_x = src_x & 0x1fff;
- src_y = src_y & 0x0fff;
+ src_x = src_x & 0x1fff;
+ src_y = src_y & 0x0fff;
- x = (dst_x_start & 0x7fff) - (dst_x_start & 0x8000);
- y = (dst_y_start & 0x7fff) - (dst_y_start & 0x8000);
+ x = (dst_x_start & 0x7fff) - (dst_x_start & 0x8000);
+ y = (dst_y_start & 0x7fff) - (dst_y_start & 0x8000);
- dimx = (w & 0x1fff) + 1;
- dimy = (h & 0x0fff) + 1;
+ dimx = (w & 0x1fff) + 1;
+ dimy = (h & 0x0fff) + 1;
// convert parameters to clr
@@ -483,7 +474,6 @@ inline void epic12_device::epic12_device_gfx_draw(offs_t *addr)
}
else
{
-
if (blend==0 && tinted==0)
{
if (!flipx)
@@ -903,7 +893,7 @@ void epic12_device::draw_screen(bitmap_rgb32 &bitmap, const rectangle &cliprect
-
+
READ32_MEMBER( epic12_device::epic12_device_blitter_r )
{
switch (offset*4)
diff --git a/src/emu/video/epic12.h b/src/emu/video/epic12.h
index 8ce6ef13b5e..0e341cae213 100644
--- a/src/emu/video/epic12.h
+++ b/src/emu/video/epic12.h
@@ -3,8 +3,8 @@
MCFG_DEVICE_ADD(_tag, EPIC12, 0)
//#define MCFG_EP1C12_ADD(_tag,_config,_map)
-// MCFG_DEVICE_CONFIG(_config)
-// MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+// MCFG_DEVICE_CONFIG(_config)
+// MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
#define MCFG_EPIC12_SET_MAINRAMSIZE( _rgn ) \
epic12_device::set_mainramsize(*device, _rgn);
@@ -29,19 +29,19 @@ union colour_t
};
typedef const void (*epic12_device_blitfunction)(bitmap_rgb32 *,
- const rectangle *,
- UINT32 *, /* gfx */
- int , /* src_x */
- int , /* src_y */
- const int , /* dst_x_start */
- const int , /* dst_y_start */
- int , /* dimx */
- int , /* dimy */
- const int , /* flipy */
- const UINT8 , /* s_alpha */
- const UINT8 , /* d_alpha */
- //int , /* tint */
- const clr_t * );
+ const rectangle *,
+ UINT32 *, /* gfx */
+ int , /* src_x */
+ int , /* src_y */
+ const int , /* dst_x_start */
+ const int , /* dst_y_start */
+ int , /* dimx */
+ int , /* dimy */
+ const int , /* flipy */
+ const UINT8 , /* s_alpha */
+ const UINT8 , /* d_alpha */
+ //int , /* tint */
+ const clr_t * );
class epic12_device : public device_t,
@@ -79,7 +79,7 @@ public:
bitmap_rgb32 *epic12_device_bitmaps;
rectangle epic12_device_clip;
-
+
UINT16* use_ram;
int m_main_ramsize; // type D has double the main ram
int m_main_rammask;
@@ -676,15 +676,14 @@ public:
// convert separate r,g,b biases (0..80..ff) to clr_t (-1f..0..1f)
static inline void tint_to_clr(UINT8 r, UINT8 g, UINT8 b, clr_t *clr)
{
- clr->r = r>>2;
- clr->g = g>>2;
- clr->b = b>>2;
+ clr->r = r>>2;
+ clr->g = g>>2;
+ clr->b = b>>2;
};
// clr_t to r5g5b5
static inline UINT32 clr_to_pen(const clr_t *clr)
{
-
// --t- ---- rrrr r--- gggg g--- bbbb b--- format
return (clr->r << (16+3)) | (clr->g << (8+3)) | (clr->b << 3);
@@ -739,9 +738,9 @@ public:
static inline void clr_add(clr_t *clr, const clr_t *clr0, const clr_t *clr1)
{
/*
- clr->r = clr0->r + clr1->r;
- clr->g = clr0->g + clr1->g;
- clr->b = clr0->b + clr1->b;
+ clr->r = clr0->r + clr1->r;
+ clr->g = clr0->g + clr1->g;
+ clr->b = clr0->b + clr1->b;
*/
// use pre-clamped lookup table
clr->r = epic12_device_colrtable_add[clr0->r][clr1->r];
@@ -834,7 +833,7 @@ protected:
- osd_work_queue * queue; /* work queue */
+ osd_work_queue * queue; /* work queue */
osd_work_item * blitter_request;
// blit timing
diff --git a/src/emu/video/epic12_blit2.c b/src/emu/video/epic12_blit2.c
index cff04448ff6..897dcad4db7 100644
--- a/src/emu/video/epic12_blit2.c
+++ b/src/emu/video/epic12_blit2.c
@@ -553,4 +553,4 @@
#undef FLIPX
#undef TINT
#undef TRANSPARENT
-#undef REALLY_SIMPLE \ No newline at end of file
+#undef REALLY_SIMPLE
diff --git a/src/emu/video/epic12_blit3.c b/src/emu/video/epic12_blit3.c
index 5729949ca50..32e7bdaf469 100644
--- a/src/emu/video/epic12_blit3.c
+++ b/src/emu/video/epic12_blit3.c
@@ -553,4 +553,4 @@
#undef FLIPX
#undef TINT
#undef TRANSPARENT
-#undef REALLY_SIMPLE \ No newline at end of file
+#undef REALLY_SIMPLE
diff --git a/src/emu/video/epic12_blit4.c b/src/emu/video/epic12_blit4.c
index 4d4bcc0853b..c431a401666 100644
--- a/src/emu/video/epic12_blit4.c
+++ b/src/emu/video/epic12_blit4.c
@@ -553,4 +553,4 @@
#undef FLIPX
#undef TINT
#undef TRANSPARENT
-#undef REALLY_SIMPLE \ No newline at end of file
+#undef REALLY_SIMPLE
diff --git a/src/emu/video/epic12_blit6.c b/src/emu/video/epic12_blit6.c
index 963d6f14ca5..7427c67f0c6 100644
--- a/src/emu/video/epic12_blit6.c
+++ b/src/emu/video/epic12_blit6.c
@@ -554,5 +554,3 @@
#undef TINT
#undef TRANSPARENT
#undef REALLY_SIMPLE
-
-
diff --git a/src/emu/video/epic12_blit7.c b/src/emu/video/epic12_blit7.c
index a7203492f10..a01fd84a5ff 100644
--- a/src/emu/video/epic12_blit7.c
+++ b/src/emu/video/epic12_blit7.c
@@ -554,5 +554,3 @@
#undef TINT
#undef TRANSPARENT
#undef REALLY_SIMPLE
-
-
diff --git a/src/emu/video/epic12_blit8.c b/src/emu/video/epic12_blit8.c
index 29bb6794e12..ed9de7c15ec 100644
--- a/src/emu/video/epic12_blit8.c
+++ b/src/emu/video/epic12_blit8.c
@@ -38,6 +38,3 @@
#undef BLENDED
#undef REALLY_SIMPLE
-
-
-
diff --git a/src/emu/video/epic12in.inc b/src/emu/video/epic12in.inc
index 7972485f2ed..d21eeac1b9c 100644
--- a/src/emu/video/epic12in.inc
+++ b/src/emu/video/epic12in.inc
@@ -3,8 +3,6 @@
const void epic12_device::FUNCNAME(BLIT_PARAMS)
{
-
-
UINT32* gfx2;
int y, yf;
@@ -47,8 +45,8 @@ const void epic12_device::FUNCNAME(BLIT_PARAMS)
src_x += (dimx-1);
#endif
- if (flipy) { yf = -1; src_y += (dimy-1); }
- else { yf = +1; }
+ if (flipy) { yf = -1; src_y += (dimy-1); }
+ else { yf = +1; }
int starty = 0;
const int dst_y_end = dst_y_start+dimy;
@@ -64,13 +62,13 @@ const void epic12_device::FUNCNAME(BLIT_PARAMS)
#if FLIPX == 1
if ((src_x &0x1fff) < ((src_x-(dimx-1))&0x1fff))
{
- // popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
+ // popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
return;
}
#else
if ((src_x &0x1fff) > ((src_x+(dimx-1))&0x1fff))
{
- // popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
+ // popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
return;
}
#endif
diff --git a/src/emu/video/epic12pixel.inc b/src/emu/video/epic12pixel.inc
index 8dbc1046c28..3cb01cebbf4 100644
--- a/src/emu/video/epic12pixel.inc
+++ b/src/emu/video/epic12pixel.inc
@@ -3,14 +3,12 @@
#if FLIPX == 1
#define LOOP_INCREMENTS \
bmp++; \
- gfx2--; \
-
+ gfx2--;
#else
#define LOOP_INCREMENTS \
bmp++; \
- gfx2++; \
-
+ gfx2++;
#endif
@@ -49,7 +47,7 @@
// convert destination to clr
pen_to_clr(*bmp, &d_clr.trgb);
- //d_clr.u32 = *bmp >> 3; // using the union is actually significantly slower than our pen_to_clr to function!
+ //d_clr.u32 = *bmp >> 3; // using the union is actually significantly slower than our pen_to_clr to function!
#if _SMODE == 0
//g_profiler.start(PROFILER_USER7);
@@ -193,4 +191,3 @@
}
#endif
LOOP_INCREMENTS
-
diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c
index fcc9247ad66..dabc7c17524 100644
--- a/src/emu/video/fixfreq.c
+++ b/src/emu/video/fixfreq.c
@@ -268,7 +268,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid)
{
int colv = (int) ((m_vid - m_sync_threshold) / 3.7 * 255.0);
if (colv > 255)
- colv = 255;
+ colv = 255;
col = rgb_t(colv, colv, colv);
}
diff --git a/src/emu/video/hd44352.h b/src/emu/video/hd44352.h
index 2ace6c258e0..195a74db1ed 100644
--- a/src/emu/video/hd44352.h
+++ b/src/emu/video/hd44352.h
@@ -30,7 +30,7 @@ public:
hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _Object> static devcb2_base &set_on_callback(device_t &device, _Object object) { return downcast<hd44352_device &>(device).m_on_cb.set_callback(object); }
-
+
// device interface
UINT8 data_read();
void data_write(UINT8 data);
diff --git a/src/emu/video/hd44780.h b/src/emu/video/hd44780.h
index aaa34fcf7e9..f59f456f00b 100644
--- a/src/emu/video/hd44780.h
+++ b/src/emu/video/hd44780.h
@@ -125,7 +125,7 @@ private:
int m_rw_state;
bool m_nibble;
int m_charset_type;
- UINT8 m_render_buf[80*16];
+ UINT8 m_render_buf[80*16];
enum { DDRAM, CGRAM };
};
diff --git a/src/emu/video/hd61830.h b/src/emu/video/hd61830.h
index 01e6aaa5036..24de36df2c9 100644
--- a/src/emu/video/hd61830.h
+++ b/src/emu/video/hd61830.h
@@ -93,7 +93,7 @@ private:
emu_timer *m_busy_timer;
//address_space *m_data;
-
+
bool m_bf; // busy flag
UINT8 m_ir; // instruction register
diff --git a/src/emu/video/huc6260.h b/src/emu/video/huc6260.h
index 3527eb65407..89932fea284 100644
--- a/src/emu/video/huc6260.h
+++ b/src/emu/video/huc6260.h
@@ -20,16 +20,16 @@
#define MCFG_HUC6260_NEXT_PIXEL_DATA_CB(_devcb) \
devcb = &huc6260_device::set_next_pixel_data_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(_devcb) \
devcb = &huc6260_device::set_time_til_next_event_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HUC6260_VSYNC_CHANGED_CB(_devcb) \
devcb = &huc6260_device::set_vsync_changed_callback(*device, DEVCB2_##_devcb);
-
+
#define MCFG_HUC6260_HSYNC_CHANGED_CB(_devcb) \
devcb = &huc6260_device::set_hsync_changed_callback(*device, DEVCB2_##_devcb);
-
+
class huc6260_device : public device_t,
public device_video_interface
@@ -42,7 +42,7 @@ public:
template<class _Object> static devcb2_base &set_time_til_next_event_callback(device_t &device, _Object object) { return downcast<huc6260_device &>(device).m_time_til_next_event_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_vsync_changed_callback(device_t &device, _Object object) { return downcast<huc6260_device &>(device).m_vsync_changed_cb.set_callback(object); }
template<class _Object> static devcb2_base &set_hsync_changed_callback(device_t &device, _Object object) { return downcast<huc6260_device &>(device).m_hsync_changed_cb.set_callback(object); }
-
+
void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/emu/video/huc6270.h b/src/emu/video/huc6270.h
index 7cf6cb42857..99e370c5af5 100644
--- a/src/emu/video/huc6270.h
+++ b/src/emu/video/huc6270.h
@@ -20,7 +20,7 @@ class huc6270_device : public device_t
public:
// construction/destruction
huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void set_vram_size(device_t &device, UINT32 vram_size) { downcast<huc6270_device &>(device).m_vram_size = vram_size; }
template<class _Object> static devcb2_base &set_irq_changed_callback(device_t &device, _Object object) { return downcast<huc6270_device &>(device).m_irq_changed_cb.set_callback(object); }
@@ -66,10 +66,10 @@ private:
HUC6270_HSW
};
-
+
/* Size of Video ram (mandatory) */
UINT32 m_vram_size;
-
+
/* Callback for when the irq line may have changed (mandatory) */
devcb2_write_line m_irq_changed_cb;
diff --git a/src/emu/video/mb_vcu.h b/src/emu/video/mb_vcu.h
index 7c83689af13..6c079c2ff45 100644
--- a/src/emu/video/mb_vcu.h
+++ b/src/emu/video/mb_vcu.h
@@ -19,7 +19,7 @@ Template for skeleton device
#define MCFG_MB_VCU_ADD(_tag,_freq,_config, _palette_tag) \
MCFG_DEVICE_ADD(_tag, MB_VCU, _freq) \
- MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_CONFIG(_config) \
mb_vcu_device::static_set_palette_tag(*device, "^" _palette_tag);
//**************************************************************************
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index eb553dd8157..20a31ff9ba4 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -1472,7 +1472,7 @@ MACHINE_CONFIG_END
machine_config_constructor mos8563_device::device_mconfig_additions() const
{
- return MACHINE_CONFIG_NAME( mos8563 );
+ return MACHINE_CONFIG_NAME( mos8563 );
}
diff --git a/src/emu/video/mc6847.c b/src/emu/video/mc6847.c
index b1810cc3446..78a74c9f474 100644
--- a/src/emu/video/mc6847.c
+++ b/src/emu/video/mc6847.c
@@ -1858,7 +1858,7 @@ mc6847t1_pal_device::mc6847t1_pal_device(const machine_config &mconfig, const ch
//-------------------------------------------------
s68047_device::s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : mc6847_base_device(mconfig, S68047, "S68047", tag, owner, clock, s68047_fontdata8x12, 262.0, "s68047", __FILE__)
+ : mc6847_base_device(mconfig, S68047, "S68047", tag, owner, clock, s68047_fontdata8x12, 262.0, "s68047", __FILE__)
{
}
@@ -1879,23 +1879,22 @@ void s68047_device::hack_black_becomes_blue(bool flag)
const UINT32 s68047_device::s_s68047_hack_palette[16] =
{
- rgb_t(0x07, 0xff, 0x00), /* GREEN */
- rgb_t(0xff, 0xff, 0x00), /* YELLOW */
- rgb_t(0x3b, 0x08, 0xff), /* BLUE */
- rgb_t(0xcc, 0x00, 0x3b), /* RED */
- rgb_t(0xff, 0xff, 0xff), /* BUFF */
- rgb_t(0x07, 0xe3, 0x99), /* CYAN */
- rgb_t(0xff, 0x1c, 0xff), /* MAGENTA */
- rgb_t(0xff, 0x81, 0x00), /* ORANGE */
-
- rgb_t(0x00, 0x00, 0x00), /* BLACK */
- rgb_t(0x07, 0xff, 0x00), /* GREEN */
- rgb_t(0x3b, 0x08, 0xff), /* BLUE */
- rgb_t(0xff, 0xff, 0xff), /* BUFF */
-
- rgb_t(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
- rgb_t(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
- rgb_t(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
- rgb_t(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
-};
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0xff, 0xff, 0x00), /* YELLOW */
+ rgb_t(0x3b, 0x08, 0xff), /* BLUE */
+ rgb_t(0xcc, 0x00, 0x3b), /* RED */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+ rgb_t(0x07, 0xe3, 0x99), /* CYAN */
+ rgb_t(0xff, 0x1c, 0xff), /* MAGENTA */
+ rgb_t(0xff, 0x81, 0x00), /* ORANGE */
+ rgb_t(0x00, 0x00, 0x00), /* BLACK */
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0x3b, 0x08, 0xff), /* BLUE */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+
+ rgb_t(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
+ rgb_t(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
+ rgb_t(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
+ rgb_t(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
+};
diff --git a/src/emu/video/mc6847.h b/src/emu/video/mc6847.h
index f93ca8dd338..372bc193131 100644
--- a/src/emu/video/mc6847.h
+++ b/src/emu/video/mc6847.h
@@ -44,7 +44,7 @@
#define MCFG_MC6847_FSYNC_CALLBACK(_write) \
devcb = &mc6847_friend_device::set_fsync_wr_callback(*device, DEVCB2_##_write);
-
+
/* interface */
struct mc6847_interface
{
@@ -668,12 +668,12 @@ public:
class s68047_device : public mc6847_base_device
{
public:
- s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void hack_black_becomes_blue(bool flag);
private:
- static const UINT32 s_s68047_hack_palette[16];
+ static const UINT32 s_s68047_hack_palette[16];
};
diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c
index cdd6e19a185..b61637b13ec 100644
--- a/src/emu/video/pc_vga.c
+++ b/src/emu/video/pc_vga.c
@@ -128,13 +128,13 @@ const device_type MACH8 = &device_creator<mach8_device>;
vga_device::vga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- m_palette(*this, "^palette")
+ m_palette(*this, "^palette")
{
}
vga_device::vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VGA, "VGA", tag, owner, clock, "vga", __FILE__),
- m_palette(*this, "^palette")
+ m_palette(*this, "^palette")
{
}
@@ -2873,7 +2873,7 @@ void s3_vga_device::s3_define_video_mode()
// DCLK calculation
freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318f; // clock between XIN and XOUT
xtal = freq * 1000000;
- }
+ }
if((s3.ext_misc_ctrl_2) >> 4)
{
diff --git a/src/emu/video/ramdac.h b/src/emu/video/ramdac.h
index 523b4ab64b3..b1630dc5658 100644
--- a/src/emu/video/ramdac.h
+++ b/src/emu/video/ramdac.h
@@ -19,8 +19,8 @@
#define MCFG_RAMDAC_ADD(_tag,_config,_map,_palette_tag) \
MCFG_DEVICE_ADD(_tag, RAMDAC, 0) \
MCFG_DEVICE_CONFIG(_config) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
- ramdac_device::static_set_palette_tag(*device, "^" _palette_tag);
+ MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
+ ramdac_device::static_set_palette_tag(*device, "^" _palette_tag);
#define RAMDAC_INTERFACE(name) \
const ramdac_interface (name) =
@@ -79,7 +79,7 @@ private:
UINT8 m_int_index[2];
UINT8 *m_palram;
- const address_space_config m_space_config;
+ const address_space_config m_space_config;
required_device<palette_device> m_palette;
};
diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c
index 27e75ff67f2..c2b3a324ecf 100644
--- a/src/emu/video/tms34061.c
+++ b/src/emu/video/tms34061.c
@@ -54,7 +54,7 @@ void tms34061_device::device_start()
{
/* resolve callbak */
m_interrupt_cb.resolve();
-
+
/* reset the data */
m_vrammask = m_vramsize - 1;
diff --git a/src/emu/video/tms34061.h b/src/emu/video/tms34061.h
index dfaf9e286f5..402a9e9de98 100644
--- a/src/emu/video/tms34061.h
+++ b/src/emu/video/tms34061.h
@@ -20,7 +20,7 @@
#define MCFG_TMS34061_INTERRUPT_CB(_devcb) \
devcb = &tms34061_device::set_interrupt_callback(*device, DEVCB2_##_devcb);
-
+
/* register constants */
enum
@@ -67,7 +67,7 @@ class tms34061_device : public device_t,
public:
// construction/destruction
tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
static void set_rowshift(device_t &device, UINT8 rowshift) { downcast<tms34061_device &>(device).m_rowshift = rowshift; }
static void set_vram_size(device_t &device, UINT32 vramsize) { downcast<tms34061_device &>(device).m_vramsize = vramsize; }
template<class _Object> static devcb2_base &set_interrupt_callback(device_t &device, _Object object) { return downcast<tms34061_device &>(device).m_interrupt_cb.set_callback(object); }
@@ -91,10 +91,10 @@ protected:
virtual void device_reset();
private:
- UINT8 m_rowshift; /* VRAM address is (row << rowshift) | col */
- UINT32 m_vramsize; /* size of video RAM */
- devcb2_write_line m_interrupt_cb; /* interrupt gen callback */
-
+ UINT8 m_rowshift; /* VRAM address is (row << rowshift) | col */
+ UINT32 m_vramsize; /* size of video RAM */
+ devcb2_write_line m_interrupt_cb; /* interrupt gen callback */
+
UINT16 m_regs[TMS34061_REGCOUNT];
UINT16 m_xmask;
UINT8 m_yshift;
diff --git a/src/emu/video/upd3301.c b/src/emu/video/upd3301.c
index f59438a6e50..15885cc6896 100644
--- a/src/emu/video/upd3301.c
+++ b/src/emu/video/upd3301.c
@@ -636,4 +636,3 @@ void upd3301_device::recompute_parameters()
update_hrtc_timer(0);
update_vrtc_timer(0);
}
-
diff --git a/src/emu/video/upd7220.h b/src/emu/video/upd7220.h
index bb7a086542d..adeadaef495 100644
--- a/src/emu/video/upd7220.h
+++ b/src/emu/video/upd7220.h
@@ -153,8 +153,8 @@ private:
void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd);
void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap);
- upd7220_display_pixels_delegate m_display_cb;
- upd7220_draw_text_delegate m_draw_text_cb;
+ upd7220_display_pixels_delegate m_display_cb;
+ upd7220_draw_text_delegate m_draw_text_cb;
devcb2_write_line m_write_drq;
devcb2_write_line m_write_hsync;
diff --git a/src/emu/video/v9938.h b/src/emu/video/v9938.h
index 6f39a5d0eaf..665a8900c48 100644
--- a/src/emu/video/v9938.h
+++ b/src/emu/video/v9938.h
@@ -233,7 +233,7 @@ private:
void (v99x8_device::*draw_sprite_16)(const pen_t *, UINT16*, UINT8*);
void (v99x8_device::*draw_sprite_16s)(const pen_t *, UINT16*, UINT8*);
} ;
- static const v99x8_mode s_modes[];
+ static const v99x8_mode s_modes[];
required_device<palette_device> m_palette;
protected:
static UINT16 s_pal_indYJK[0x20000];
diff --git a/src/emu/video/vic4567.h b/src/emu/video/vic4567.h
index f065463e1ed..3dff4b41392 100644
--- a/src/emu/video/vic4567.h
+++ b/src/emu/video/vic4567.h
@@ -241,7 +241,7 @@ private:
UINT8 m_palette_green[0x100];
UINT8 m_palette_blue[0x100];
int m_palette_dirty;
-
+
required_device<palette_device> m_palette;
};