summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--hash/videopac.xml171
-rw-r--r--makefile2
-rw-r--r--scripts/src/3rdparty.lua6
-rw-r--r--scripts/src/cpu.lua12
-rw-r--r--scripts/src/sound.lua2
-rw-r--r--scripts/target/mame/mess.lua6
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp4
-rw-r--r--src/devices/bus/a2bus/a2mcms.cpp21
-rw-r--r--src/devices/bus/a2bus/a2mcms.h2
-rw-r--r--src/devices/bus/a2bus/a2ultraterm.cpp5
-rw-r--r--src/devices/bus/a2bus/a2videoterm.cpp2
-rw-r--r--src/devices/bus/a2bus/computereyes2.cpp18
-rw-r--r--src/devices/bus/a2bus/computereyes2.h1
-rw-r--r--src/devices/bus/a2gameio/computereyes.cpp19
-rw-r--r--src/devices/bus/a2gameio/computereyes.h1
-rw-r--r--src/devices/bus/acorn/system/vdu40.cpp2
-rw-r--r--src/devices/bus/acorn/system/vdu80.cpp2
-rw-r--r--src/devices/bus/bbc/1mhzbus/m5000.h4
-rw-r--r--src/devices/bus/bbc/userport/lcd.cpp2
-rw-r--r--src/devices/bus/c64/xl80.cpp12
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp4
-rw-r--r--src/devices/bus/coco/coco_ssc.cpp22
-rw-r--r--src/devices/bus/compis/hrg.cpp16
-rw-r--r--src/devices/bus/comx35/clm.cpp8
-rw-r--r--src/devices/bus/ecbbus/grip.cpp28
-rw-r--r--src/devices/bus/einstein/pipe/tk02.cpp16
-rw-r--r--src/devices/bus/electron/mode7.cpp2
-rw-r--r--src/devices/bus/gio64/newport.cpp2
-rw-r--r--src/devices/bus/hp_dio/hp98543.cpp2
-rw-r--r--src/devices/bus/hp_dio/hp98544.cpp12
-rw-r--r--src/devices/bus/hp_dio/hp98550.cpp2
-rw-r--r--src/devices/bus/iq151/grafik.cpp2
-rw-r--r--src/devices/bus/iq151/minigraf.cpp2
-rw-r--r--src/devices/bus/iq151/ms151a.cpp2
-rw-r--r--src/devices/bus/iq151/video32.cpp2
-rw-r--r--src/devices/bus/iq151/video64.cpp2
-rw-r--r--src/devices/bus/isa/aga.cpp20
-rw-r--r--src/devices/bus/isa/cga.cpp690
-rw-r--r--src/devices/bus/isa/ega.cpp13
-rw-r--r--src/devices/bus/isa/eis_hgb107x.cpp21
-rw-r--r--src/devices/bus/isa/ex1280.cpp8
-rw-r--r--src/devices/bus/isa/gus.cpp25
-rw-r--r--src/devices/bus/isa/gus.h2
-rw-r--r--src/devices/bus/isa/mach32.cpp17
-rw-r--r--src/devices/bus/isa/mda.cpp280
-rw-r--r--src/devices/bus/isa/num9rev.cpp4
-rw-r--r--src/devices/bus/isa/pgc.cpp7
-rw-r--r--src/devices/bus/isa/trident.cpp27
-rw-r--r--src/devices/bus/macpds/pds_tpdfpd.cpp32
-rw-r--r--src/devices/bus/mtx/sdx.cpp2
-rw-r--r--src/devices/bus/nasbus/avc.cpp2
-rw-r--r--src/devices/bus/nubus/laserview.cpp30
-rw-r--r--src/devices/bus/nubus/nubus_48gc.cpp72
-rw-r--r--src/devices/bus/nubus/nubus_cb264.cpp52
-rw-r--r--src/devices/bus/nubus/nubus_m2hires.cpp56
-rw-r--r--src/devices/bus/nubus/nubus_m2video.cpp40
-rw-r--r--src/devices/bus/nubus/nubus_radiustpd.cpp32
-rw-r--r--src/devices/bus/nubus/nubus_spec8.cpp40
-rw-r--r--src/devices/bus/nubus/nubus_specpdq.cpp40
-rw-r--r--src/devices/bus/nubus/nubus_vikbw.cpp30
-rw-r--r--src/devices/bus/nubus/nubus_wsportrait.cpp49
-rw-r--r--src/devices/bus/nubus/pds30_30hr.cpp58
-rw-r--r--src/devices/bus/nubus/pds30_cb264.cpp55
-rw-r--r--src/devices/bus/nubus/pds30_mc30.cpp71
-rw-r--r--src/devices/bus/nubus/pds30_procolor816.cpp53
-rw-r--r--src/devices/bus/nubus/pds30_sigmalview.cpp14
-rw-r--r--src/devices/bus/odyssey2/4in1.cpp2
-rw-r--r--src/devices/bus/odyssey2/4in1.h2
-rw-r--r--src/devices/bus/odyssey2/chess.cpp2
-rw-r--r--src/devices/bus/odyssey2/chess.h2
-rw-r--r--src/devices/bus/odyssey2/homecomp.cpp2
-rw-r--r--src/devices/bus/odyssey2/homecomp.h2
-rw-r--r--src/devices/bus/odyssey2/ktaa.cpp2
-rw-r--r--src/devices/bus/odyssey2/ktaa.h2
-rw-r--r--src/devices/bus/odyssey2/rally.cpp2
-rw-r--r--src/devices/bus/odyssey2/rally.h2
-rw-r--r--src/devices/bus/odyssey2/rom.cpp2
-rw-r--r--src/devices/bus/odyssey2/rom.h2
-rw-r--r--src/devices/bus/odyssey2/slot.cpp14
-rw-r--r--src/devices/bus/odyssey2/slot.h40
-rw-r--r--src/devices/bus/odyssey2/voice.cpp2
-rw-r--r--src/devices/bus/odyssey2/voice.h2
-rw-r--r--src/devices/bus/s100/dg640.cpp24
-rw-r--r--src/devices/bus/s100/polyvti.cpp20
-rw-r--r--src/devices/bus/sbus/bwtwo.cpp9
-rw-r--r--src/devices/bus/sbus/cgsix.cpp6
-rw-r--r--src/devices/bus/sbus/cgthree.cpp6
-rw-r--r--src/devices/bus/svi3x8/slot/sv806.cpp18
-rw-r--r--src/devices/bus/tanbus/mpvdu.cpp10
-rw-r--r--src/devices/bus/tanbus/ravdu.cpp10
-rw-r--r--src/devices/bus/tanbus/tanhrg.cpp21
-rw-r--r--src/devices/bus/tanbus/tug8082.cpp14
-rw-r--r--src/devices/bus/ti99/internal/992board.cpp2
-rw-r--r--src/devices/bus/vic20/videopak.cpp2
-rw-r--r--src/devices/bus/wangpc/lvc.cpp10
-rw-r--r--src/devices/bus/wangpc/mvc.cpp22
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.cpp2
-rw-r--r--src/devices/cpu/f8/f8dasm.cpp181
-rw-r--r--src/devices/cpu/lc58/lc58d.cpp160
-rw-r--r--src/devices/cpu/lc58/lc58d.h30
-rw-r--r--src/devices/cpu/m6502/n2a03.cpp19
-rw-r--r--src/devices/cpu/m6502/n2a03.h29
-rw-r--r--src/devices/cpu/ns32000/ns32000.cpp72
-rw-r--r--src/devices/cpu/ns32000/ns32000.h9
-rw-r--r--src/devices/cpu/tms34010/tms34010.cpp4
-rw-r--r--src/devices/cpu/tms9900/tms9995.cpp6
-rw-r--r--src/devices/cpu/vt50/vt50.cpp2
-rw-r--r--src/devices/imagedev/cassette.cpp30
-rw-r--r--src/devices/imagedev/cassette.h3
-rw-r--r--src/devices/imagedev/floppy.cpp12
-rw-r--r--src/devices/imagedev/floppy.h2
-rw-r--r--src/devices/imagedev/picture.cpp19
-rw-r--r--src/devices/imagedev/picture.h4
-rw-r--r--src/devices/machine/8364_paula.cpp14
-rw-r--r--src/devices/machine/8364_paula.h2
-rw-r--r--src/devices/machine/acorn_vidc.cpp4
-rw-r--r--src/devices/machine/am9519.h2
-rw-r--r--src/devices/machine/bq4847.cpp2
-rw-r--r--src/devices/machine/exorterm.cpp4
-rw-r--r--src/devices/machine/ie15.cpp3
-rw-r--r--src/devices/machine/laserdsc.cpp54
-rw-r--r--src/devices/machine/laserdsc.h23
-rw-r--r--src/devices/machine/ldpr8210.cpp12
-rw-r--r--src/devices/machine/m3002.cpp4
-rw-r--r--src/devices/machine/m3002.h2
-rw-r--r--src/devices/machine/mc68328.cpp19
-rw-r--r--src/devices/machine/netlist.cpp1
-rw-r--r--src/devices/machine/pxa255.cpp2
-rw-r--r--src/devices/machine/s2636.cpp15
-rw-r--r--src/devices/machine/s2636.h2
-rw-r--r--src/devices/machine/s3c24xx.hxx58
-rw-r--r--src/devices/machine/s3c44b0.cpp9
-rw-r--r--src/devices/machine/spg110_video.cpp9
-rw-r--r--src/devices/machine/spg290_ppu.cpp8
-rw-r--r--src/devices/machine/spg2xx_audio.cpp14
-rw-r--r--src/devices/machine/spg2xx_audio.h2
-rw-r--r--src/devices/machine/spg_renderer.cpp2
-rw-r--r--src/devices/machine/swtpc8212.cpp2
-rw-r--r--src/devices/machine/tc009xlvc.cpp4
-rw-r--r--src/devices/machine/terminal.cpp2
-rw-r--r--src/devices/sound/astrocde.cpp2
-rw-r--r--src/devices/sound/cdp1864.cpp2
-rw-r--r--src/devices/sound/cdp1869.cpp13
-rw-r--r--src/devices/sound/dac76.cpp2
-rw-r--r--src/devices/sound/discrete.cpp2
-rw-r--r--src/devices/sound/es5503.h1
-rw-r--r--src/devices/sound/fm.h2
-rw-r--r--src/devices/sound/fmopl.h2
-rw-r--r--src/devices/sound/ics2115.cpp2
-rw-r--r--src/devices/sound/k053260.cpp4
-rw-r--r--src/devices/sound/k053260.h2
-rw-r--r--src/devices/sound/mos6560.cpp79
-rw-r--r--src/devices/sound/mos7360.cpp159
-rw-r--r--src/devices/sound/nes_apu.cpp9
-rw-r--r--src/devices/sound/nes_apu.h2
-rw-r--r--src/devices/sound/nes_apu_vt.cpp28
-rw-r--r--src/devices/sound/nes_apu_vt.h26
-rw-r--r--src/devices/sound/s_dsp.cpp4
-rw-r--r--src/devices/sound/vgm_visualizer.cpp65
-rw-r--r--src/devices/sound/ymf262.h2
-rw-r--r--src/devices/video/315_5124.cpp8
-rw-r--r--src/devices/video/315_5313.cpp2
-rw-r--r--src/devices/video/cdp1861.cpp5
-rw-r--r--src/devices/video/cdp1862.cpp5
-rw-r--r--src/devices/video/cesblit.cpp34
-rw-r--r--src/devices/video/clgd542x.cpp25
-rw-r--r--src/devices/video/ef9340_1.cpp123
-rw-r--r--src/devices/video/ef9340_1.h32
-rw-r--r--src/devices/video/ef9345.cpp4
-rw-r--r--src/devices/video/ef9364.cpp19
-rw-r--r--src/devices/video/ef9365.cpp15
-rw-r--r--src/devices/video/gb_lcd.cpp2
-rw-r--r--src/devices/video/gba_lcd.cpp2
-rw-r--r--src/devices/video/gf4500.cpp9
-rw-r--r--src/devices/video/hd44102.cpp2
-rw-r--r--src/devices/video/hd44352.cpp4
-rw-r--r--src/devices/video/hd44780.cpp4
-rw-r--r--src/devices/video/hd61830.cpp6
-rw-r--r--src/devices/video/hd63484.cpp2
-rw-r--r--src/devices/video/hd66421.cpp2
-rw-r--r--src/devices/video/hp1ll3.cpp4
-rw-r--r--src/devices/video/huc6260.cpp4
-rw-r--r--src/devices/video/huc6261.cpp4
-rw-r--r--src/devices/video/i8244.cpp162
-rw-r--r--src/devices/video/i8244.h68
-rw-r--r--src/devices/video/imagetek_i4100.cpp18
-rw-r--r--src/devices/video/m50458.cpp66
-rw-r--r--src/devices/video/mb88303.cpp2
-rw-r--r--src/devices/video/mb90082.cpp39
-rw-r--r--src/devices/video/mb_vcu.cpp19
-rw-r--r--src/devices/video/mc6845.cpp4
-rw-r--r--src/devices/video/mc6847.h6
-rw-r--r--src/devices/video/mos6566.cpp124
-rw-r--r--src/devices/video/msm6255.cpp8
-rw-r--r--src/devices/video/nt7534.cpp2
-rw-r--r--src/devices/video/pc_vga.cpp348
-rw-r--r--src/devices/video/ppu2c0x.cpp10
-rw-r--r--src/devices/video/ppu2c0x_sh6578.cpp6
-rw-r--r--src/devices/video/ppu2c0x_vt.cpp6
-rw-r--r--src/devices/video/psx.cpp8
-rw-r--r--src/devices/video/saa5050.cpp4
-rw-r--r--src/devices/video/scn2674.cpp2
-rw-r--r--src/devices/video/sed1330.cpp4
-rw-r--r--src/devices/video/snes_ppu.cpp14
-rw-r--r--src/devices/video/stvvdp2.cpp261
-rw-r--r--src/devices/video/t6963c.cpp8
-rw-r--r--src/devices/video/t6a04.cpp2
-rw-r--r--src/devices/video/tms3556.cpp6
-rw-r--r--src/devices/video/tms9928a.cpp2
-rw-r--r--src/devices/video/v9938.cpp6
-rw-r--r--src/devices/video/vic4567.cpp339
-rw-r--r--src/devices/video/voodoo.cpp8
-rw-r--r--src/devices/video/vrender0.cpp2
-rw-r--r--src/devices/video/zeus2.cpp10
-rw-r--r--src/emu/crsshair.cpp9
-rw-r--r--src/emu/device.h4
-rw-r--r--src/emu/disound.cpp18
-rw-r--r--src/emu/disound.h2
-rw-r--r--src/emu/emucore.h3
-rw-r--r--src/emu/render.cpp6
-rw-r--r--src/emu/rendfont.cpp6
-rw-r--r--src/emu/rendlay.cpp42
-rw-r--r--src/emu/rendutil.cpp16
-rw-r--r--src/emu/screen.cpp32
-rw-r--r--src/emu/sound.cpp88
-rw-r--r--src/emu/sound.h17
-rw-r--r--src/emu/tilemap.cpp30
-rw-r--r--src/emu/video.cpp4
-rw-r--r--src/frontend/mame/ui/selmenu.cpp14
-rw-r--r--src/frontend/mame/ui/ui.cpp2
-rw-r--r--src/frontend/mame/ui/viewgfx.cpp10
-rw-r--r--src/frontend/mame/ui/widgets.cpp23
-rw-r--r--src/lib/netlist/core/netlist_state.h22
-rw-r--r--src/lib/netlist/devices/nlid_proxy.cpp16
-rw-r--r--src/lib/netlist/generated/static_solvers.cpp3039
-rw-r--r--src/lib/netlist/nl_base.cpp1
-rw-r--r--src/lib/netlist/nl_errstr.h11
-rw-r--r--src/lib/netlist/nl_setup.cpp2
-rw-r--r--src/lib/netlist/prg/nltool.cpp4
-rw-r--r--src/lib/netlist/solver/nld_ms_gcr.h5
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp49
-rw-r--r--src/lib/util/avhuff.cpp23
-rw-r--r--src/lib/util/avhuff.h64
-rw-r--r--src/lib/util/aviio.cpp16
-rw-r--r--src/lib/util/bitmap.cpp19
-rw-r--r--src/lib/util/bitmap.h79
-rw-r--r--src/lib/util/chdcodec.cpp2
-rw-r--r--src/lib/util/png.cpp18
-rw-r--r--src/mame/audio/arcadia.cpp19
-rw-r--r--src/mame/audio/arcadia.h2
-rw-r--r--src/mame/audio/channelf.cpp17
-rw-r--r--src/mame/audio/channelf.h2
-rw-r--r--src/mame/audio/cmi01a.cpp16
-rw-r--r--src/mame/audio/cmi01a.h2
-rw-r--r--src/mame/audio/cps3.cpp16
-rw-r--r--src/mame/audio/cps3.h2
-rw-r--r--src/mame/audio/dai_snd.cpp16
-rw-r--r--src/mame/audio/dai_snd.h2
-rw-r--r--src/mame/audio/dsbz80.cpp32
-rw-r--r--src/mame/audio/dsbz80.h2
-rw-r--r--src/mame/audio/elan_eu3a05.cpp11
-rw-r--r--src/mame/audio/elan_eu3a05.h2
-rw-r--r--src/mame/audio/exidy.cpp20
-rw-r--r--src/mame/audio/exidy.h6
-rw-r--r--src/mame/audio/exidy440.cpp45
-rw-r--r--src/mame/audio/exidy440.h8
-rw-r--r--src/mame/audio/flower.cpp26
-rw-r--r--src/mame/audio/flower.h6
-rw-r--r--src/mame/audio/geebee.cpp14
-rw-r--r--src/mame/audio/geebee.h2
-rw-r--r--src/mame/audio/gomoku.cpp59
-rw-r--r--src/mame/audio/gomoku.h7
-rw-r--r--src/mame/audio/gridlee.cpp12
-rw-r--r--src/mame/audio/hyprolyb.cpp11
-rw-r--r--src/mame/audio/hyprolyb.h5
-rw-r--r--src/mame/audio/lynx.cpp40
-rw-r--r--src/mame/audio/lynx.h4
-rw-r--r--src/mame/audio/micro3d.cpp38
-rw-r--r--src/mame/audio/micro3d.h6
-rw-r--r--src/mame/audio/nl_armora.cpp2
-rw-r--r--src/mame/audio/nl_astrob.cpp39
-rw-r--r--src/mame/audio/nl_barrier.cpp6
-rw-r--r--src/mame/audio/nl_boxingb.cpp14
-rw-r--r--src/mame/audio/nl_ripoff.cpp6
-rw-r--r--src/mame/audio/nl_solarq.cpp2
-rw-r--r--src/mame/audio/nl_spacewar.cpp6
-rw-r--r--src/mame/audio/nl_starcas.cpp4
-rw-r--r--src/mame/audio/nl_tailg.cpp4
-rw-r--r--src/mame/audio/nl_warrior.cpp2
-rw-r--r--src/mame/audio/phoenix.cpp15
-rw-r--r--src/mame/audio/phoenix.h4
-rw-r--r--src/mame/audio/pleiads.cpp22
-rw-r--r--src/mame/audio/pleiads.h6
-rw-r--r--src/mame/audio/polepos.cpp16
-rw-r--r--src/mame/audio/polepos.h2
-rw-r--r--src/mame/audio/redbaron.cpp12
-rw-r--r--src/mame/audio/redbaron.h2
-rw-r--r--src/mame/audio/segag80r.cpp10
-rw-r--r--src/mame/audio/segausb.cpp12
-rw-r--r--src/mame/audio/segausb.h2
-rw-r--r--src/mame/audio/seibu.cpp20
-rw-r--r--src/mame/audio/seibu.h2
-rw-r--r--src/mame/audio/snk6502.cpp12
-rw-r--r--src/mame/audio/snk6502.h2
-rw-r--r--src/mame/audio/socrates.cpp10
-rw-r--r--src/mame/audio/socrates.h2
-rw-r--r--src/mame/audio/special.cpp35
-rw-r--r--src/mame/audio/special.h2
-rw-r--r--src/mame/audio/svis_snd.cpp29
-rw-r--r--src/mame/audio/svis_snd.h2
-rw-r--r--src/mame/audio/tiamc1.cpp10
-rw-r--r--src/mame/audio/tiamc1.h2
-rw-r--r--src/mame/audio/timeplt.cpp11
-rw-r--r--src/mame/audio/timeplt.h5
-rw-r--r--src/mame/audio/trackfld.cpp11
-rw-r--r--src/mame/audio/trackfld.h5
-rw-r--r--src/mame/audio/turrett.cpp19
-rw-r--r--src/mame/audio/tvc.cpp16
-rw-r--r--src/mame/audio/tvc.h2
-rw-r--r--src/mame/audio/tx1.cpp42
-rw-r--r--src/mame/audio/tx1.h10
-rw-r--r--src/mame/audio/vboy.cpp21
-rw-r--r--src/mame/audio/vboy.h2
-rw-r--r--src/mame/audio/vc4000.cpp16
-rw-r--r--src/mame/audio/vc4000.h2
-rw-r--r--src/mame/audio/warpwarp.cpp14
-rw-r--r--src/mame/audio/warpwarp.h2
-rw-r--r--src/mame/audio/wiping.cpp54
-rw-r--r--src/mame/audio/wiping.h7
-rw-r--r--src/mame/audio/wswan.cpp21
-rw-r--r--src/mame/audio/wswan.h2
-rw-r--r--src/mame/audio/xavix.cpp11
-rw-r--r--src/mame/drivers/1945kiii.cpp4
-rw-r--r--src/mame/drivers/5clown.cpp2
-rw-r--r--src/mame/drivers/a5105.cpp4
-rw-r--r--src/mame/drivers/a7150.cpp9
-rw-r--r--src/mame/drivers/accomm.cpp2
-rw-r--r--src/mame/drivers/acefruit.cpp23
-rw-r--r--src/mame/drivers/adacp150.cpp2
-rw-r--r--src/mame/drivers/adm11.cpp2
-rw-r--r--src/mame/drivers/aleck64.cpp28
-rw-r--r--src/mame/drivers/alesis.cpp2
-rw-r--r--src/mame/drivers/alfaskop41xx.cpp8
-rw-r--r--src/mame/drivers/alinvade.cpp14
-rw-r--r--src/mame/drivers/alphajuno.cpp2
-rw-r--r--src/mame/drivers/alphatpx.cpp52
-rw-r--r--src/mame/drivers/alphatro.cpp23
-rw-r--r--src/mame/drivers/amust.cpp15
-rw-r--r--src/mame/drivers/apc.cpp61
-rw-r--r--src/mame/drivers/apogee.cpp2
-rw-r--r--src/mame/drivers/apple1.cpp17
-rw-r--r--src/mame/drivers/applix.cpp2
-rw-r--r--src/mame/drivers/apricot.cpp4
-rw-r--r--src/mame/drivers/apricotf.cpp6
-rw-r--r--src/mame/drivers/apricotp.cpp2
-rw-r--r--src/mame/drivers/argo.cpp2
-rw-r--r--src/mame/drivers/aristmk6.cpp8
-rw-r--r--src/mame/drivers/astinvad.cpp16
-rw-r--r--src/mame/drivers/astrof.cpp22
-rw-r--r--src/mame/drivers/atarisy4.cpp12
-rw-r--r--src/mame/drivers/atronic.cpp4
-rw-r--r--src/mame/drivers/att4425.cpp27
-rw-r--r--src/mame/drivers/att630.cpp2
-rw-r--r--src/mame/drivers/attache.cpp68
-rw-r--r--src/mame/drivers/avalnche.cpp16
-rw-r--r--src/mame/drivers/b16.cpp9
-rw-r--r--src/mame/drivers/banctec.cpp14
-rw-r--r--src/mame/drivers/bcs3.cpp42
-rw-r--r--src/mame/drivers/beaminv.cpp14
-rw-r--r--src/mame/drivers/beezer.cpp4
-rw-r--r--src/mame/drivers/berzerk.cpp16
-rw-r--r--src/mame/drivers/bfcobra.cpp47
-rw-r--r--src/mame/drivers/bigbord2.cpp16
-rw-r--r--src/mame/drivers/bingor.cpp21
-rw-r--r--src/mame/drivers/bitgraph.cpp11
-rw-r--r--src/mame/drivers/blitz68k.cpp16
-rw-r--r--src/mame/drivers/blw700i.cpp33
-rw-r--r--src/mame/drivers/bmcbowl.cpp25
-rw-r--r--src/mame/drivers/bmcpokr.cpp24
-rw-r--r--src/mame/drivers/bmjr.cpp18
-rw-r--r--src/mame/drivers/bml3.cpp37
-rw-r--r--src/mame/drivers/bw12.cpp17
-rw-r--r--src/mame/drivers/c10.cpp17
-rw-r--r--src/mame/drivers/c65.cpp2
-rw-r--r--src/mame/drivers/calcune.cpp2
-rw-r--r--src/mame/drivers/camplynx.cpp31
-rw-r--r--src/mame/drivers/candela.cpp2
-rw-r--r--src/mame/drivers/canon_s80.cpp2
-rw-r--r--src/mame/drivers/cardline.cpp4
-rw-r--r--src/mame/drivers/casloopy.cpp15
-rw-r--r--src/mame/drivers/cat.cpp4
-rw-r--r--src/mame/drivers/cbm2.cpp14
-rw-r--r--src/mame/drivers/cc40.cpp2
-rw-r--r--src/mame/drivers/cd2650.cpp17
-rw-r--r--src/mame/drivers/cdc721.cpp19
-rw-r--r--src/mame/drivers/cdi.cpp2
-rw-r--r--src/mame/drivers/ceres.cpp283
-rw-r--r--src/mame/drivers/cesclass.cpp20
-rw-r--r--src/mame/drivers/cfx9850.cpp2
-rw-r--r--src/mame/drivers/cgenie.cpp10
-rw-r--r--src/mame/drivers/chihiro.cpp2
-rw-r--r--src/mame/drivers/cit101.cpp2
-rw-r--r--src/mame/drivers/cit220.cpp2
-rw-r--r--src/mame/drivers/clayshoo.cpp2
-rw-r--r--src/mame/drivers/clcd.cpp30
-rw-r--r--src/mame/drivers/cmi.cpp4
-rw-r--r--src/mame/drivers/cobra.cpp34
-rw-r--r--src/mame/drivers/cocoloco.cpp2
-rw-r--r--src/mame/drivers/compucolor.cpp6
-rw-r--r--src/mame/drivers/consola_emt.cpp2
-rw-r--r--src/mame/drivers/coolpool.cpp18
-rw-r--r--src/mame/drivers/coolridr.cpp37
-rw-r--r--src/mame/drivers/corona.cpp16
-rw-r--r--src/mame/drivers/cps3.cpp24
-rw-r--r--src/mame/drivers/cubeqst.cpp17
-rw-r--r--src/mame/drivers/cupidon.cpp20
-rw-r--r--src/mame/drivers/cxhumax.cpp19
-rw-r--r--src/mame/drivers/cybertnk.cpp2
-rw-r--r--src/mame/drivers/cz101.cpp2
-rw-r--r--src/mame/drivers/d6800.cpp10
-rw-r--r--src/mame/drivers/dai3wksi.cpp4
-rw-r--r--src/mame/drivers/ddenlovr.cpp17
-rw-r--r--src/mame/drivers/dec8.cpp8
-rw-r--r--src/mame/drivers/decstation.cpp13
-rw-r--r--src/mame/drivers/destroyr.cpp2
-rw-r--r--src/mame/drivers/dgpix.cpp4
-rw-r--r--src/mame/drivers/dim68k.cpp10
-rw-r--r--src/mame/drivers/dkmb.cpp4
-rw-r--r--src/mame/drivers/dmv.cpp19
-rw-r--r--src/mame/drivers/dooyong.cpp6
-rw-r--r--src/mame/drivers/dorachan.cpp5
-rw-r--r--src/mame/drivers/dotrikun.cpp2
-rw-r--r--src/mame/drivers/dpb7000.cpp18
-rw-r--r--src/mame/drivers/duet16.cpp4
-rw-r--r--src/mame/drivers/dvk_kcgd.cpp6
-rw-r--r--src/mame/drivers/dvk_ksm.cpp4
-rw-r--r--src/mame/drivers/dwarfd.cpp18
-rw-r--r--src/mame/drivers/e100.cpp2
-rw-r--r--src/mame/drivers/ec65.cpp16
-rw-r--r--src/mame/drivers/embargo.cpp16
-rw-r--r--src/mame/drivers/emu68k.cpp2
-rw-r--r--src/mame/drivers/enigma2.cpp4
-rw-r--r--src/mame/drivers/eolith16.cpp2
-rw-r--r--src/mame/drivers/epic14e.cpp2
-rw-r--r--src/mame/drivers/esh.cpp2
-rw-r--r--src/mame/drivers/esprit.cpp4
-rw-r--r--src/mame/drivers/esq1.cpp14
-rw-r--r--src/mame/drivers/eurit.cpp2
-rw-r--r--src/mame/drivers/eurocom2.cpp15
-rw-r--r--src/mame/drivers/excali64.cpp21
-rw-r--r--src/mame/drivers/expro02.cpp4
-rw-r--r--src/mame/drivers/f-32.cpp8
-rw-r--r--src/mame/drivers/facit4440.cpp2
-rw-r--r--src/mame/drivers/falco5220.cpp2
-rw-r--r--src/mame/drivers/fanucspmg.cpp46
-rw-r--r--src/mame/drivers/fb01.cpp2
-rw-r--r--src/mame/drivers/fk1.cpp14
-rw-r--r--src/mame/drivers/flipjack.cpp4
-rw-r--r--src/mame/drivers/flyball.cpp2
-rw-r--r--src/mame/drivers/fp1100.cpp2
-rw-r--r--src/mame/drivers/fp200.cpp32
-rw-r--r--src/mame/drivers/fp6000.cpp30
-rw-r--r--src/mame/drivers/fs3216.cpp2
-rw-r--r--src/mame/drivers/galgame.cpp2
-rw-r--r--src/mame/drivers/galpani3.cpp207
-rw-r--r--src/mame/drivers/galpanic_ms.cpp4
-rw-r--r--src/mame/drivers/gamecstl.cpp17
-rw-r--r--src/mame/drivers/gameking.cpp42
-rw-r--r--src/mame/drivers/gei.cpp2
-rw-r--r--src/mame/drivers/generalplus_gpl_unknown.cpp2
-rw-r--r--src/mame/drivers/geniusiq.cpp4
-rw-r--r--src/mame/drivers/gigatron.cpp4
-rw-r--r--src/mame/drivers/gkigt.cpp12
-rw-r--r--src/mame/drivers/gmaster.cpp34
-rw-r--r--src/mame/drivers/goldart.cpp6
-rw-r--r--src/mame/drivers/goldngam.cpp4
-rw-r--r--src/mame/drivers/goupil.cpp2
-rw-r--r--src/mame/drivers/gp2x.cpp11
-rw-r--r--src/mame/drivers/gp32.cpp55
-rw-r--r--src/mame/drivers/gpworld.cpp2
-rw-r--r--src/mame/drivers/grfd2301.cpp15
-rw-r--r--src/mame/drivers/gridcomp.cpp13
-rw-r--r--src/mame/drivers/gstream.cpp18
-rw-r--r--src/mame/drivers/gsword.cpp16
-rw-r--r--src/mame/drivers/gticlub.cpp2
-rw-r--r--src/mame/drivers/gts3a.cpp9
-rw-r--r--src/mame/drivers/gts80a.cpp8
-rw-r--r--src/mame/drivers/guab.cpp6
-rw-r--r--src/mame/drivers/gunpey.cpp54
-rw-r--r--src/mame/drivers/h19.cpp7
-rw-r--r--src/mame/drivers/halleys.cpp14
-rw-r--r--src/mame/drivers/hazeltin.cpp5
-rw-r--r--src/mame/drivers/hektor.cpp16
-rw-r--r--src/mame/drivers/hhtiger.cpp16
-rw-r--r--src/mame/drivers/highvdeo.cpp24
-rw-r--r--src/mame/drivers/hitme.cpp10
-rw-r--r--src/mame/drivers/homelab.cpp15
-rw-r--r--src/mame/drivers/homez80.cpp15
-rw-r--r--src/mame/drivers/hotblock.cpp2
-rw-r--r--src/mame/drivers/hotstuff.cpp11
-rw-r--r--src/mame/drivers/hp16500.cpp16
-rw-r--r--src/mame/drivers/hp2640.cpp4
-rw-r--r--src/mame/drivers/hp64k.cpp16
-rw-r--r--src/mame/drivers/hp80.cpp36
-rw-r--r--src/mame/drivers/hp95lx.cpp28
-rw-r--r--src/mame/drivers/hp9845.cpp36
-rw-r--r--src/mame/drivers/hp9k.cpp5
-rw-r--r--src/mame/drivers/hprot1.cpp4
-rw-r--r--src/mame/drivers/huebler.cpp21
-rw-r--r--src/mame/drivers/hunter16.cpp6
-rw-r--r--src/mame/drivers/husky.cpp14
-rw-r--r--src/mame/drivers/ibm6580.cpp38
-rw-r--r--src/mame/drivers/icatel.cpp4
-rw-r--r--src/mame/drivers/if800.cpp13
-rw-r--r--src/mame/drivers/igs011.cpp4
-rw-r--r--src/mame/drivers/imolagp.cpp2
-rw-r--r--src/mame/drivers/informer_207_100.cpp18
-rw-r--r--src/mame/drivers/informer_207_376.cpp20
-rw-r--r--src/mame/drivers/informer_213.cpp12
-rw-r--r--src/mame/drivers/invqix.cpp36
-rw-r--r--src/mame/drivers/ipds.cpp7
-rw-r--r--src/mame/drivers/irisha.cpp12
-rw-r--r--src/mame/drivers/istrebiteli.cpp12
-rw-r--r--src/mame/drivers/itgambl2.cpp2
-rw-r--r--src/mame/drivers/itgambl3.cpp15
-rw-r--r--src/mame/drivers/itt1700.cpp2
-rw-r--r--src/mame/drivers/jangou.cpp2
-rw-r--r--src/mame/drivers/jantotsu.cpp19
-rw-r--r--src/mame/drivers/jchan.cpp8
-rw-r--r--src/mame/drivers/jollyjgr.cpp10
-rw-r--r--src/mame/drivers/jongkyo.cpp25
-rw-r--r--src/mame/drivers/jonos.cpp16
-rw-r--r--src/mame/drivers/joystand.cpp4
-rw-r--r--src/mame/drivers/jpmsys5.cpp12
-rw-r--r--src/mame/drivers/jr100.cpp17
-rw-r--r--src/mame/drivers/jr200.cpp15
-rw-r--r--src/mame/drivers/jtc.cpp26
-rw-r--r--src/mame/drivers/juku.cpp2
-rw-r--r--src/mame/drivers/jupace.cpp16
-rw-r--r--src/mame/drivers/jupiter.cpp15
-rw-r--r--src/mame/drivers/k8915.cpp15
-rw-r--r--src/mame/drivers/kdt6.cpp6
-rw-r--r--src/mame/drivers/kinst.cpp8
-rw-r--r--src/mame/drivers/konamigs.cpp2
-rw-r--r--src/mame/drivers/konamigv.cpp57
-rw-r--r--src/mame/drivers/konmedal68k.cpp6
-rw-r--r--src/mame/drivers/kontest.cpp29
-rw-r--r--src/mame/drivers/korgds8.cpp4
-rw-r--r--src/mame/drivers/korgdss1.cpp2
-rw-r--r--src/mame/drivers/korgm1.cpp2
-rw-r--r--src/mame/drivers/krokha.cpp17
-rw-r--r--src/mame/drivers/kron.cpp16
-rw-r--r--src/mame/drivers/laser3k.cpp85
-rw-r--r--src/mame/drivers/laserbas.cpp4
-rw-r--r--src/mame/drivers/lastfght.cpp23
-rw-r--r--src/mame/drivers/lbeach.cpp4
-rw-r--r--src/mame/drivers/lft_craft.cpp2
-rw-r--r--src/mame/drivers/lft_phasor.cpp2
-rw-r--r--src/mame/drivers/limenko.cpp14
-rw-r--r--src/mame/drivers/llc1.cpp17
-rw-r--r--src/mame/drivers/llc2.cpp21
-rw-r--r--src/mame/drivers/lola8a.cpp12
-rw-r--r--src/mame/drivers/m14.cpp22
-rw-r--r--src/mame/drivers/m20.cpp9
-rw-r--r--src/mame/drivers/m3.cpp16
-rw-r--r--src/mame/drivers/m79152pc.cpp6
-rw-r--r--src/mame/drivers/m79amb.cpp10
-rw-r--r--src/mame/drivers/mac128.cpp20
-rw-r--r--src/mame/drivers/macrossp.cpp1
-rw-r--r--src/mame/drivers/magicard.cpp25
-rw-r--r--src/mame/drivers/marinedt.cpp12
-rw-r--r--src/mame/drivers/maygayv1.cpp14
-rw-r--r--src/mame/drivers/mbc200.cpp12
-rw-r--r--src/mame/drivers/mc8020.cpp14
-rw-r--r--src/mame/drivers/mc8030.cpp33
-rw-r--r--src/mame/drivers/mdt60.cpp2
-rw-r--r--src/mame/drivers/mediagx.cpp76
-rw-r--r--src/mame/drivers/megaplay.cpp6
-rw-r--r--src/mame/drivers/megatech.cpp4
-rw-r--r--src/mame/drivers/meijinsn.cpp2
-rw-r--r--src/mame/drivers/mekd3.cpp55
-rw-r--r--src/mame/drivers/mekd4.cpp48
-rw-r--r--src/mame/drivers/merit.cpp15
-rw-r--r--src/mame/drivers/meritum.cpp50
-rw-r--r--src/mame/drivers/mes.cpp15
-rw-r--r--src/mame/drivers/metalmx.cpp2
-rw-r--r--src/mame/drivers/meyc8080.cpp18
-rw-r--r--src/mame/drivers/meyc8088.cpp2
-rw-r--r--src/mame/drivers/micral.cpp15
-rw-r--r--src/mame/drivers/microb.cpp4
-rw-r--r--src/mame/drivers/microterm_f8.cpp2
-rw-r--r--src/mame/drivers/microvsn.cpp2
-rw-r--r--src/mame/drivers/mikro80.cpp2
-rw-r--r--src/mame/drivers/mikrosha.cpp2
-rw-r--r--src/mame/drivers/milton6805.cpp23
-rw-r--r--src/mame/drivers/mindset.cpp44
-rw-r--r--src/mame/drivers/miniboy7.cpp6
-rw-r--r--src/mame/drivers/minivadr.cpp16
-rw-r--r--src/mame/drivers/missile.cpp17
-rw-r--r--src/mame/drivers/mjsenpu.cpp26
-rw-r--r--src/mame/drivers/mjsister.cpp8
-rw-r--r--src/mame/drivers/ml20.cpp2
-rw-r--r--src/mame/drivers/mlanding.cpp6
-rw-r--r--src/mame/drivers/mmagic.cpp18
-rw-r--r--src/mame/drivers/modellot.cpp16
-rw-r--r--src/mame/drivers/monty.cpp2
-rw-r--r--src/mame/drivers/monzagp.cpp4
-rw-r--r--src/mame/drivers/mpu4plasma.cpp26
-rw-r--r--src/mame/drivers/mpu4vid.cpp43
-rw-r--r--src/mame/drivers/ms0515.cpp21
-rw-r--r--src/mame/drivers/ms6102.cpp4
-rw-r--r--src/mame/drivers/mstation.cpp4
-rw-r--r--src/mame/drivers/mtd1256.cpp4
-rw-r--r--src/mame/drivers/multi16.cpp4
-rw-r--r--src/mame/drivers/multi8.cpp31
-rw-r--r--src/mame/drivers/mx2178.cpp14
-rw-r--r--src/mame/drivers/myb3k.cpp10
-rw-r--r--src/mame/drivers/mycom.cpp27
-rw-r--r--src/mame/drivers/mz2000.cpp22
-rw-r--r--src/mame/drivers/mz2500.cpp18
-rw-r--r--src/mame/drivers/mz3500.cpp42
-rw-r--r--src/mame/drivers/mz6500.cpp15
-rw-r--r--src/mame/drivers/nakajies.cpp2
-rw-r--r--src/mame/drivers/namcos12.cpp12
-rw-r--r--src/mame/drivers/namcos21.cpp19
-rw-r--r--src/mame/drivers/namcos23.cpp14
-rw-r--r--src/mame/drivers/nanos.cpp10
-rw-r--r--src/mame/drivers/ncd68k.cpp6
-rw-r--r--src/mame/drivers/nes_vt.cpp52
-rw-r--r--src/mame/drivers/nexus3d.cpp8
-rw-r--r--src/mame/drivers/ngen.cpp4
-rw-r--r--src/mame/drivers/nightgal.cpp8
-rw-r--r--src/mame/drivers/nightmare.cpp10
-rw-r--r--src/mame/drivers/ninjaw.cpp7
-rw-r--r--src/mame/drivers/nmg5.cpp6
-rw-r--r--src/mame/drivers/nokia_3310.cpp2
-rw-r--r--src/mame/drivers/notetaker.cpp41
-rw-r--r--src/mame/drivers/novag_diablo.cpp2
-rw-r--r--src/mame/drivers/novag_sexpert.cpp2
-rw-r--r--src/mame/drivers/nyny.cpp6
-rw-r--r--src/mame/drivers/octopus.cpp2
-rw-r--r--src/mame/drivers/odyssey.cpp4
-rw-r--r--src/mame/drivers/odyssey2.cpp202
-rw-r--r--src/mame/drivers/okean240.cpp13
-rw-r--r--src/mame/drivers/olyboss.cpp7
-rw-r--r--src/mame/drivers/ondra.cpp13
-rw-r--r--src/mame/drivers/orao.cpp2
-rw-r--r--src/mame/drivers/oric.cpp2
-rw-r--r--src/mame/drivers/osbexec.cpp2
-rw-r--r--src/mame/drivers/othello.cpp6
-rw-r--r--src/mame/drivers/panicr.cpp14
-rw-r--r--src/mame/drivers/pasha2.cpp21
-rw-r--r--src/mame/drivers/paso1600.cpp40
-rw-r--r--src/mame/drivers/pasogo.cpp29
-rw-r--r--src/mame/drivers/pasopia.cpp4
-rw-r--r--src/mame/drivers/pasopia7.cpp32
-rw-r--r--src/mame/drivers/pc100.cpp27
-rw-r--r--src/mame/drivers/pc1500.cpp4
-rw-r--r--src/mame/drivers/pc2000.cpp8
-rw-r--r--src/mame/drivers/pc8001.cpp11
-rw-r--r--src/mame/drivers/pc8801.cpp169
-rw-r--r--src/mame/drivers/pc88va.cpp108
-rw-r--r--src/mame/drivers/pce220.cpp6
-rw-r--r--src/mame/drivers/pcm.cpp15
-rw-r--r--src/mame/drivers/pcw.cpp2
-rw-r--r--src/mame/drivers/pcxt.cpp21
-rw-r--r--src/mame/drivers/pda600.cpp2
-rw-r--r--src/mame/drivers/pegasus.cpp19
-rw-r--r--src/mame/drivers/peoplepc.cpp13
-rw-r--r--src/mame/drivers/pet.cpp36
-rw-r--r--src/mame/drivers/pg685.cpp50
-rw-r--r--src/mame/drivers/photon2.cpp54
-rw-r--r--src/mame/drivers/phunsy.cpp14
-rw-r--r--src/mame/drivers/piggypas.cpp2
-rw-r--r--src/mame/drivers/pinball2k.cpp52
-rw-r--r--src/mame/drivers/plan80.cpp15
-rw-r--r--src/mame/drivers/pmd85.cpp12
-rw-r--r--src/mame/drivers/pockstat.cpp2
-rw-r--r--src/mame/drivers/poisk1.cpp40
-rw-r--r--src/mame/drivers/pokemini.cpp44
-rw-r--r--src/mame/drivers/popobear.cpp2
-rw-r--r--src/mame/drivers/pp.cpp4
-rw-r--r--src/mame/drivers/prestige.cpp2
-rw-r--r--src/mame/drivers/progolf.cpp26
-rw-r--r--src/mame/drivers/proteus3.cpp18
-rw-r--r--src/mame/drivers/psion.cpp4
-rw-r--r--src/mame/drivers/ptcsol.cpp21
-rw-r--r--src/mame/drivers/pv1000.cpp19
-rw-r--r--src/mame/drivers/px4.cpp24
-rw-r--r--src/mame/drivers/pyl601.cpp47
-rw-r--r--src/mame/drivers/pzletime.cpp35
-rw-r--r--src/mame/drivers/quizo.cpp8
-rw-r--r--src/mame/drivers/qvt102.cpp2
-rw-r--r--src/mame/drivers/qvt103.cpp2
-rw-r--r--src/mame/drivers/qvt190.cpp2
-rw-r--r--src/mame/drivers/qvt70.cpp2
-rw-r--r--src/mame/drivers/qx10.cpp12
-rw-r--r--src/mame/drivers/r2dtank.cpp20
-rw-r--r--src/mame/drivers/rabbit.cpp42
-rw-r--r--src/mame/drivers/rainbow.cpp4
-rw-r--r--src/mame/drivers/rastersp.cpp2
-rw-r--r--src/mame/drivers/rc702.cpp14
-rw-r--r--src/mame/drivers/rc759.cpp2
-rw-r--r--src/mame/drivers/rd100.cpp2
-rw-r--r--src/mame/drivers/rex6000.cpp8
-rw-r--r--src/mame/drivers/roland_cm32p.cpp15
-rw-r--r--src/mame/drivers/roland_d10.cpp15
-rw-r--r--src/mame/drivers/roland_mt32.cpp2
-rw-r--r--src/mame/drivers/roland_s10.cpp4
-rw-r--r--src/mame/drivers/rollext.cpp4
-rw-r--r--src/mame/drivers/rotaryf.cpp20
-rw-r--r--src/mame/drivers/roul.cpp7
-rw-r--r--src/mame/drivers/royalmah.cpp2
-rw-r--r--src/mame/drivers/rt1715.cpp4
-rw-r--r--src/mame/drivers/rx78.cpp4
-rw-r--r--src/mame/drivers/rz1.cpp2
-rw-r--r--src/mame/drivers/saitek_intchess.cpp2
-rw-r--r--src/mame/drivers/saitek_risc2500.cpp2
-rw-r--r--src/mame/drivers/samcoupe.cpp24
-rw-r--r--src/mame/drivers/sapi1.cpp70
-rw-r--r--src/mame/drivers/sbowling.cpp2
-rw-r--r--src/mame/drivers/sbrain.cpp15
-rw-r--r--src/mame/drivers/scopus.cpp11
-rw-r--r--src/mame/drivers/scv.cpp82
-rw-r--r--src/mame/drivers/scyclone.cpp8
-rw-r--r--src/mame/drivers/seabattl.cpp22
-rw-r--r--src/mame/drivers/segac2.cpp6
-rw-r--r--src/mame/drivers/segae.cpp14
-rw-r--r--src/mame/drivers/segahang.cpp102
-rw-r--r--src/mame/drivers/sfbonus.cpp32
-rw-r--r--src/mame/drivers/shougi.cpp2
-rw-r--r--src/mame/drivers/sigmab98.cpp4
-rw-r--r--src/mame/drivers/sk101bl.cpp2
-rw-r--r--src/mame/drivers/skeetsht.cpp7
-rw-r--r--src/mame/drivers/skimaxx.cpp6
-rw-r--r--src/mame/drivers/sliver.cpp12
-rw-r--r--src/mame/drivers/slotcarn.cpp15
-rw-r--r--src/mame/drivers/sm1800.cpp9
-rw-r--r--src/mame/drivers/sm7238.cpp30
-rw-r--r--src/mame/drivers/smc777.cpp61
-rw-r--r--src/mame/drivers/smotor.cpp2
-rw-r--r--src/mame/drivers/smsmcorp.cpp7
-rw-r--r--src/mame/drivers/socrates.cpp25
-rw-r--r--src/mame/drivers/sorcerer.cpp16
-rw-r--r--src/mame/drivers/spaceg.cpp9
-rw-r--r--src/mame/drivers/spc1500.cpp49
-rw-r--r--src/mame/drivers/special_gambl.cpp4
-rw-r--r--src/mame/drivers/speglsht.cpp16
-rw-r--r--src/mame/drivers/spg29x.cpp4
-rw-r--r--src/mame/drivers/spiders.cpp26
-rw-r--r--src/mame/drivers/spinb.cpp4
-rw-r--r--src/mame/drivers/splash_ms.cpp4
-rw-r--r--src/mame/drivers/srmp5.cpp37
-rw-r--r--src/mame/drivers/ssem.cpp5
-rw-r--r--src/mame/drivers/ssingles.cpp26
-rw-r--r--src/mame/drivers/sstrangr.cpp16
-rw-r--r--src/mame/drivers/studio2.cpp2
-rw-r--r--src/mame/drivers/sun2.cpp31
-rw-r--r--src/mame/drivers/sun3.cpp99
-rw-r--r--src/mame/drivers/sun3x.cpp31
-rw-r--r--src/mame/drivers/supertnk.cpp18
-rw-r--r--src/mame/drivers/supracan.cpp36
-rw-r--r--src/mame/drivers/suprgolf.cpp38
-rw-r--r--src/mame/drivers/svision.cpp4
-rw-r--r--src/mame/drivers/swyft.cpp13
-rw-r--r--src/mame/drivers/sys9002.cpp14
-rw-r--r--src/mame/drivers/systel1.cpp2
-rw-r--r--src/mame/drivers/taitotz.cpp26
-rw-r--r--src/mame/drivers/taitowlf.cpp14
-rw-r--r--src/mame/drivers/tamag1.cpp2
-rw-r--r--src/mame/drivers/tandy2k.cpp6
-rw-r--r--src/mame/drivers/tapatune.cpp4
-rw-r--r--src/mame/drivers/tattack.cpp22
-rw-r--r--src/mame/drivers/tavernie.cpp18
-rw-r--r--src/mame/drivers/tek440x.cpp19
-rw-r--r--src/mame/drivers/teleray10.cpp2
-rw-r--r--src/mame/drivers/tgtpanic.cpp24
-rw-r--r--src/mame/drivers/ti74.cpp6
-rw-r--r--src/mame/drivers/ti89.cpp13
-rw-r--r--src/mame/drivers/ti931.cpp4
-rw-r--r--src/mame/drivers/tickee.cpp20
-rw-r--r--src/mame/drivers/tiki100.cpp6
-rw-r--r--src/mame/drivers/tim100.cpp17
-rw-r--r--src/mame/drivers/tk635.cpp4
-rw-r--r--src/mame/drivers/tmmjprd.cpp18
-rw-r--r--src/mame/drivers/toratora.cpp10
-rw-r--r--src/mame/drivers/toypop.cpp10
-rw-r--r--src/mame/drivers/trs80dt1.cpp4
-rw-r--r--src/mame/drivers/trs80m2.cpp4
-rw-r--r--src/mame/drivers/ts803.cpp17
-rw-r--r--src/mame/drivers/ttchamp.cpp42
-rw-r--r--src/mame/drivers/tulip1.cpp4
-rw-r--r--src/mame/drivers/tv910.cpp18
-rw-r--r--src/mame/drivers/tv950.cpp2
-rw-r--r--src/mame/drivers/tv955.cpp2
-rw-r--r--src/mame/drivers/tv990.cpp73
-rw-r--r--src/mame/drivers/tvc.cpp25
-rw-r--r--src/mame/drivers/tvgame.cpp11
-rw-r--r--src/mame/drivers/twins.cpp4
-rw-r--r--src/mame/drivers/ultrsprt.cpp6
-rw-r--r--src/mame/drivers/unior.cpp4
-rw-r--r--src/mame/drivers/unistar.cpp4
-rw-r--r--src/mame/drivers/univac.cpp2
-rw-r--r--src/mame/drivers/unixpc.cpp2
-rw-r--r--src/mame/drivers/unkhorse.cpp2
-rw-r--r--src/mame/drivers/unkpoker.cpp2
-rw-r--r--src/mame/drivers/uzebox.cpp4
-rw-r--r--src/mame/drivers/v6809.cpp14
-rw-r--r--src/mame/drivers/vboy.cpp47
-rw-r--r--src/mame/drivers/vcombat.cpp8
-rw-r--r--src/mame/drivers/vegaeo.cpp2
-rw-r--r--src/mame/drivers/victor9k.cpp2
-rw-r--r--src/mame/drivers/video21.cpp15
-rw-r--r--src/mame/drivers/vis.cpp17
-rw-r--r--src/mame/drivers/vixen.cpp2
-rw-r--r--src/mame/drivers/vk100.cpp2
-rw-r--r--src/mame/drivers/vp101.cpp4
-rw-r--r--src/mame/drivers/vt1682.cpp20
-rw-r--r--src/mame/drivers/vt240.cpp17
-rw-r--r--src/mame/drivers/vta2000.cpp23
-rw-r--r--src/mame/drivers/warpsped.cpp2
-rw-r--r--src/mame/drivers/wheelfir.cpp244
-rw-r--r--src/mame/drivers/wicat.cpp4
-rw-r--r--src/mame/drivers/wpc_dot.cpp11
-rw-r--r--src/mame/drivers/wy100.cpp2
-rw-r--r--src/mame/drivers/wy50.cpp4
-rw-r--r--src/mame/drivers/x07.cpp4
-rw-r--r--src/mame/drivers/xerox820.cpp32
-rw-r--r--src/mame/drivers/xtheball.cpp15
-rw-r--r--src/mame/drivers/xyonix.cpp8
-rw-r--r--src/mame/drivers/ymdx11.cpp2
-rw-r--r--src/mame/drivers/ymtx81z.cpp2
-rw-r--r--src/mame/drivers/z100.cpp2
-rw-r--r--src/mame/drivers/z1013.cpp15
-rw-r--r--src/mame/drivers/z22.cpp2
-rw-r--r--src/mame/drivers/z9001.cpp21
-rw-r--r--src/mame/drivers/zorba.cpp7
-rw-r--r--src/mame/drivers/zrt80.cpp18
-rw-r--r--src/mame/includes/gridlee.h2
-rw-r--r--src/mame/includes/segag80r.h2
-rw-r--r--src/mame/includes/segas32.h2
-rw-r--r--src/mame/includes/turrett.h2
-rw-r--r--src/mame/includes/xavix.h2
-rw-r--r--src/mame/machine/3do.cpp4
-rw-r--r--src/mame/machine/3dom2.cpp6
-rw-r--r--src/mame/machine/aim65.cpp5
-rw-r--r--src/mame/machine/amstrad.cpp6
-rw-r--r--src/mame/machine/apple3.cpp12
-rw-r--r--src/mame/machine/b2m.cpp19
-rw-r--r--src/mame/machine/bk.cpp6
-rw-r--r--src/mame/machine/cedar_magnet_plane.cpp2
-rw-r--r--src/mame/machine/cedar_magnet_sprite.cpp2
-rw-r--r--src/mame/machine/concept.cpp2
-rw-r--r--src/mame/machine/dragon.cpp2
-rw-r--r--src/mame/machine/gamepock.cpp64
-rw-r--r--src/mame/machine/imds2ioc.cpp9
-rw-r--r--src/mame/machine/inder_vid.cpp9
-rw-r--r--src/mame/machine/lynx.cpp4
-rw-r--r--src/mame/machine/m6502_swap_op_d5_d6.cpp62
-rw-r--r--src/mame/machine/m6502_swap_op_d5_d6.h40
-rw-r--r--src/mame/machine/mega32x.cpp11
-rw-r--r--src/mame/machine/mega32x.h2
-rw-r--r--src/mame/machine/megacd.cpp2
-rw-r--r--src/mame/machine/megadriv.cpp6
-rw-r--r--src/mame/machine/model1io2.cpp2
-rw-r--r--src/mame/machine/nes_vt_soc.cpp31
-rw-r--r--src/mame/machine/nes_vt_soc.h3
-rw-r--r--src/mame/machine/nl_tank.cpp17
-rw-r--r--src/mame/machine/osborne1.cpp4
-rw-r--r--src/mame/machine/partner.cpp9
-rw-r--r--src/mame/machine/primo.cpp2
-rw-r--r--src/mame/machine/radio86.cpp2
-rw-r--r--src/mame/machine/sms.cpp16
-rw-r--r--src/mame/machine/st0016.cpp4
-rw-r--r--src/mame/machine/teleprinter.cpp15
-rw-r--r--src/mame/machine/zx.cpp8
-rw-r--r--src/mame/mame.lst4
-rw-r--r--src/mame/mess.flt1
-rw-r--r--src/mame/video/1943.cpp8
-rw-r--r--src/mame/video/20pacgal.cpp8
-rw-r--r--src/mame/video/40love.cpp27
-rw-r--r--src/mame/video/733_asr.cpp2
-rw-r--r--src/mame/video/8080bw.cpp18
-rw-r--r--src/mame/video/abc1600.cpp2
-rw-r--r--src/mame/video/abc80.cpp2
-rw-r--r--src/mame/video/abc800.cpp16
-rw-r--r--src/mame/video/abc802.cpp6
-rw-r--r--src/mame/video/abc806.cpp8
-rw-r--r--src/mame/video/advision.cpp4
-rw-r--r--src/mame/video/aeroboto.cpp39
-rw-r--r--src/mame/video/aerofgt.cpp16
-rw-r--r--src/mame/video/agat7.cpp72
-rw-r--r--src/mame/video/agat9.cpp164
-rw-r--r--src/mame/video/airraid_dev.cpp4
-rw-r--r--src/mame/video/amiga.cpp6
-rw-r--r--src/mame/video/amigaaga.cpp6
-rw-r--r--src/mame/video/ams40041.cpp8
-rw-r--r--src/mame/video/apexc.cpp4
-rw-r--r--src/mame/video/apollo.cpp42
-rw-r--r--src/mame/video/apple2.cpp474
-rw-r--r--src/mame/video/apple3.cpp187
-rw-r--r--src/mame/video/arcadecl.cpp8
-rw-r--r--src/mame/video/arcadia.cpp6
-rw-r--r--src/mame/video/argus.cpp96
-rw-r--r--src/mame/video/armedf.cpp30
-rw-r--r--src/mame/video/artmagic.cpp9
-rw-r--r--src/mame/video/astrocde.cpp28
-rw-r--r--src/mame/video/atarig42.cpp23
-rw-r--r--src/mame/video/atarigt.cpp45
-rw-r--r--src/mame/video/atarigx2.cpp19
-rw-r--r--src/mame/video/atarimo.cpp2
-rw-r--r--src/mame/video/atarimo.h2
-rw-r--r--src/mame/video/atarirle.cpp24
-rw-r--r--src/mame/video/atarist.cpp4
-rw-r--r--src/mame/video/atarisy1.cpp4
-rw-r--r--src/mame/video/atarisy2.cpp8
-rw-r--r--src/mame/video/aussiebyte.cpp15
-rw-r--r--src/mame/video/avigo.cpp22
-rw-r--r--src/mame/video/badlands.cpp7
-rw-r--r--src/mame/video/balsente.cpp22
-rw-r--r--src/mame/video/batman.cpp18
-rw-r--r--src/mame/video/battlane.cpp23
-rw-r--r--src/mame/video/bbc.cpp4
-rw-r--r--src/mame/video/bbusters.cpp13
-rw-r--r--src/mame/video/bigevglf.cpp9
-rw-r--r--src/mame/video/bking.cpp6
-rw-r--r--src/mame/video/blockout.cpp4
-rw-r--r--src/mame/video/blstroid.cpp6
-rw-r--r--src/mame/video/boogwing.cpp23
-rw-r--r--src/mame/video/bosco.cpp8
-rw-r--r--src/mame/video/btoads.cpp14
-rw-r--r--src/mame/video/buggychl.cpp48
-rw-r--r--src/mame/video/busicom.cpp4
-rw-r--r--src/mame/video/capbowl.cpp4
-rw-r--r--src/mame/video/carpolo.cpp48
-rw-r--r--src/mame/video/ccastles.cpp40
-rw-r--r--src/mame/video/cclimber.cpp10
-rw-r--r--src/mame/video/cgc7900.cpp6
-rw-r--r--src/mame/video/chaknpop.cpp11
-rw-r--r--src/mame/video/changela.cpp194
-rw-r--r--src/mame/video/channelf.cpp14
-rw-r--r--src/mame/video/cheekyms.cpp13
-rw-r--r--src/mame/video/circus.cpp21
-rw-r--r--src/mame/video/cloak.cpp10
-rw-r--r--src/mame/video/cloud9.cpp41
-rw-r--r--src/mame/video/copsnrob.cpp28
-rw-r--r--src/mame/video/cosmic.cpp25
-rw-r--r--src/mame/video/cps1.cpp11
-rw-r--r--src/mame/video/crbaloon.cpp4
-rw-r--r--src/mame/video/crgolf.cpp10
-rw-r--r--src/mame/video/crt.cpp11
-rw-r--r--src/mame/video/cvs.cpp75
-rw-r--r--src/mame/video/cyberbal.cpp7
-rw-r--r--src/mame/video/cybstorm.cpp16
-rw-r--r--src/mame/video/dai.cpp397
-rw-r--r--src/mame/video/darkmist.cpp8
-rw-r--r--src/mame/video/dassault.cpp16
-rw-r--r--src/mame/video/dcheese.cpp11
-rw-r--r--src/mame/video/dday.cpp12
-rw-r--r--src/mame/video/decbac06.cpp8
-rw-r--r--src/mame/video/deco16ic.cpp12
-rw-r--r--src/mame/video/deco32.cpp20
-rw-r--r--src/mame/video/deco_mlc.cpp4
-rw-r--r--src/mame/video/deco_zoomspr.cpp33
-rw-r--r--src/mame/video/decocass.cpp42
-rw-r--r--src/mame/video/decodmd1.cpp22
-rw-r--r--src/mame/video/decodmd2.cpp7
-rw-r--r--src/mame/video/decodmd3.cpp4
-rw-r--r--src/mame/video/decospr.cpp28
-rw-r--r--src/mame/video/deniam.cpp24
-rw-r--r--src/mame/video/dgn_beta.cpp6
-rw-r--r--src/mame/video/dkong.cpp27
-rw-r--r--src/mame/video/dogfgt.cpp4
-rw-r--r--src/mame/video/dpb_combiner.cpp2
-rw-r--r--src/mame/video/dribling.cpp2
-rw-r--r--src/mame/video/dynax.cpp46
-rw-r--r--src/mame/video/dynduke.cpp15
-rw-r--r--src/mame/video/elan_eu3a05vid.cpp6
-rw-r--r--src/mame/video/elan_eu3a14vid.cpp8
-rw-r--r--src/mame/video/electron.cpp2
-rw-r--r--src/mame/video/eolith.cpp2
-rw-r--r--src/mame/video/epos.cpp8
-rw-r--r--src/mame/video/eprom.cpp33
-rw-r--r--src/mame/video/equites.cpp8
-rw-r--r--src/mame/video/esripsys.cpp15
-rw-r--r--src/mame/video/exidy.cpp50
-rw-r--r--src/mame/video/exidy440.cpp11
-rw-r--r--src/mame/video/exterm.cpp6
-rw-r--r--src/mame/video/fgoal.cpp24
-rw-r--r--src/mame/video/firetrk.cpp10
-rw-r--r--src/mame/video/fm7.cpp21
-rw-r--r--src/mame/video/fmtowns.cpp94
-rw-r--r--src/mame/video/gaelco2.cpp4
-rw-r--r--src/mame/video/gaelco3d.cpp14
-rw-r--r--src/mame/video/gaelco_wrally_sprites.cpp8
-rw-r--r--src/mame/video/galastrm.cpp12
-rw-r--r--src/mame/video/galaxia.cpp50
-rw-r--r--src/mame/video/galaxian.cpp12
-rw-r--r--src/mame/video/galaxold.cpp35
-rw-r--r--src/mame/video/galaxy.cpp43
-rw-r--r--src/mame/video/galpani2.cpp8
-rw-r--r--src/mame/video/galpanic.cpp10
-rw-r--r--src/mame/video/galspnbl.cpp6
-rw-r--r--src/mame/video/gamate.cpp2
-rw-r--r--src/mame/video/gamecom.cpp13
-rw-r--r--src/mame/video/gameplan.cpp10
-rw-r--r--src/mame/video/gaplus.cpp2
-rw-r--r--src/mame/video/gauntlet.cpp4
-rw-r--r--src/mame/video/gic.cpp23
-rw-r--r--src/mame/video/gic.h2
-rw-r--r--src/mame/video/gladiatr.cpp4
-rw-r--r--src/mame/video/glass.cpp12
-rw-r--r--src/mame/video/gomoku.cpp6
-rw-r--r--src/mame/video/gp9001.cpp10
-rw-r--r--src/mame/video/grchamp.cpp106
-rw-r--r--src/mame/video/gridlee.cpp26
-rw-r--r--src/mame/video/h01x.cpp21
-rw-r--r--src/mame/video/harddriv.cpp20
-rw-r--r--src/mame/video/hec2hrp.cpp4
-rw-r--r--src/mame/video/hnayayoi.cpp2
-rw-r--r--src/mame/video/hng64.cpp197
-rw-r--r--src/mame/video/hng64_3d.hxx4
-rw-r--r--src/mame/video/hp48.cpp2
-rw-r--r--src/mame/video/hyhoo.cpp70
-rw-r--r--src/mame/video/igs017_igs031.cpp4
-rw-r--r--src/mame/video/ikki.cpp4
-rw-r--r--src/mame/video/itech8.cpp88
-rw-r--r--src/mame/video/jaguar.cpp2
-rw-r--r--src/mame/video/jedi.cpp8
-rw-r--r--src/mame/video/jpmimpct.cpp9
-rw-r--r--src/mame/video/k001005.cpp33
-rw-r--r--src/mame/video/k001604.cpp4
-rw-r--r--src/mame/video/k053246_k053247_k055673.cpp2
-rw-r--r--src/mame/video/k053250.cpp8
-rw-r--r--src/mame/video/k053250_ps.cpp8
-rw-r--r--src/mame/video/k053936.cpp4
-rw-r--r--src/mame/video/k054156_k054157_k056832.cpp8
-rw-r--r--src/mame/video/k054338.cpp2
-rw-r--r--src/mame/video/k057714.cpp2
-rw-r--r--src/mame/video/k1ge.cpp22
-rw-r--r--src/mame/video/kaneko16.cpp13
-rw-r--r--src/mame/video/kaneko_spr.cpp19
-rw-r--r--src/mame/video/kangaroo.cpp7
-rw-r--r--src/mame/video/kaypro.cpp52
-rw-r--r--src/mame/video/kc.cpp25
-rw-r--r--src/mame/video/klax.cpp4
-rw-r--r--src/mame/video/konamigx.cpp33
-rw-r--r--src/mame/video/ladybug.cpp2
-rw-r--r--src/mame/video/laserbat.cpp12
-rw-r--r--src/mame/video/lasso.cpp20
-rw-r--r--src/mame/video/lazercmd.cpp10
-rw-r--r--src/mame/video/leland.cpp2
-rw-r--r--src/mame/video/lemmings.cpp25
-rw-r--r--src/mame/video/lethalj.cpp18
-rw-r--r--src/mame/video/liberatr.cpp34
-rw-r--r--src/mame/video/light.cpp6
-rw-r--r--src/mame/video/lockon.cpp76
-rw-r--r--src/mame/video/lordgun.cpp19
-rw-r--r--src/mame/video/lviv.cpp11
-rw-r--r--src/mame/video/m10.cpp6
-rw-r--r--src/mame/video/m57.cpp25
-rw-r--r--src/mame/video/m58.cpp4
-rw-r--r--src/mame/video/mac.cpp363
-rw-r--r--src/mame/video/madalien.cpp6
-rw-r--r--src/mame/video/magmax.cpp2
-rw-r--r--src/mame/video/malzak.cpp16
-rw-r--r--src/mame/video/mappy.cpp9
-rw-r--r--src/mame/video/maria.cpp3
-rw-r--r--src/mame/video/mbc55x.cpp47
-rw-r--r--src/mame/video/mbee.cpp2
-rw-r--r--src/mame/video/mcatadv.cpp4
-rw-r--r--src/mame/video/mcd212.cpp5
-rw-r--r--src/mame/video/mcr.cpp12
-rw-r--r--src/mame/video/megasys1.cpp20
-rw-r--r--src/mame/video/mermaid.cpp16
-rw-r--r--src/mame/video/micro3d.cpp11
-rw-r--r--src/mame/video/midtunit.cpp8
-rw-r--r--src/mame/video/midtview.ipp2
-rw-r--r--src/mame/video/midvunit.cpp8
-rw-r--r--src/mame/video/midyunit.cpp7
-rw-r--r--src/mame/video/midzeus.cpp6
-rw-r--r--src/mame/video/mikromik.cpp19
-rw-r--r--src/mame/video/mmdisplay2.cpp2
-rw-r--r--src/mame/video/model1.cpp8
-rw-r--r--src/mame/video/model2.cpp9
-rw-r--r--src/mame/video/model2rd.hxx6
-rw-r--r--src/mame/video/model3.cpp49
-rw-r--r--src/mame/video/momoko.cpp14
-rw-r--r--src/mame/video/ms32.cpp24
-rw-r--r--src/mame/video/mw8080bw.cpp20
-rw-r--r--src/mame/video/mz700.cpp40
-rw-r--r--src/mame/video/mz80.cpp45
-rw-r--r--src/mame/video/n64.cpp4
-rw-r--r--src/mame/video/n8080.cpp54
-rw-r--r--src/mame/video/namco_c355spr.cpp24
-rw-r--r--src/mame/video/namcona1.cpp12
-rw-r--r--src/mame/video/namcos21_3d.cpp12
-rw-r--r--src/mame/video/namcos22.cpp32
-rw-r--r--src/mame/video/namcos2_roz.cpp6
-rw-r--r--src/mame/video/namcos2_sprite.cpp6
-rw-r--r--src/mame/video/nbmj8688.cpp2
-rw-r--r--src/mame/video/nbmj8891.cpp4
-rw-r--r--src/mame/video/nbmj8900.cpp4
-rw-r--r--src/mame/video/nbmj8991.cpp12
-rw-r--r--src/mame/video/nbmj9195.cpp2
-rw-r--r--src/mame/video/nc.cpp2
-rw-r--r--src/mame/video/neogeo_spr.cpp6
-rw-r--r--src/mame/video/newbrain.cpp4
-rw-r--r--src/mame/video/nick.cpp2
-rw-r--r--src/mame/video/ninjakd2.cpp2
-rw-r--r--src/mame/video/nitedrvr.cpp2
-rw-r--r--src/mame/video/niyanpai.cpp2
-rw-r--r--src/mame/video/offtwall.cpp7
-rw-r--r--src/mame/video/ojankohs.cpp24
-rw-r--r--src/mame/video/orion.cpp2
-rw-r--r--src/mame/video/osi.cpp8
-rw-r--r--src/mame/video/p2000t.cpp16
-rw-r--r--src/mame/video/pacland.cpp10
-rw-r--r--src/mame/video/paradise.cpp10
-rw-r--r--src/mame/video/pastelg.cpp2
-rw-r--r--src/mame/video/pc080sn.cpp29
-rw-r--r--src/mame/video/pc4.cpp8
-rw-r--r--src/mame/video/pc6001.cpp207
-rw-r--r--src/mame/video/pc9801.cpp98
-rw-r--r--src/mame/video/pc_t1t.cpp246
-rw-r--r--src/mame/video/pcd.cpp8
-rw-r--r--src/mame/video/pcw.cpp16
-rw-r--r--src/mame/video/pcw16.cpp2
-rw-r--r--src/mame/video/pdp1.cpp7
-rw-r--r--src/mame/video/pgm.cpp16
-rw-r--r--src/mame/video/pgm2.cpp10
-rw-r--r--src/mame/video/pitnrun.cpp2
-rw-r--r--src/mame/video/pk8000.cpp31
-rw-r--r--src/mame/video/pk8020.cpp10
-rw-r--r--src/mame/video/playmark.cpp20
-rw-r--r--src/mame/video/pocketc.cpp2
-rw-r--r--src/mame/video/polepos.cpp2
-rw-r--r--src/mame/video/policetr.cpp16
-rw-r--r--src/mame/video/popeye.cpp12
-rw-r--r--src/mame/video/powervr2.cpp346
-rw-r--r--src/mame/video/pp01.cpp2
-rw-r--r--src/mame/video/psikyosh.cpp56
-rw-r--r--src/mame/video/qix.cpp4
-rw-r--r--src/mame/video/quasar.cpp18
-rw-r--r--src/mame/video/raiden2.cpp6
-rw-r--r--src/mame/video/rallyx.cpp4
-rw-r--r--src/mame/video/rampart.cpp10
-rw-r--r--src/mame/video/redalert.cpp77
-rw-r--r--src/mame/video/redclash.cpp2
-rw-r--r--src/mame/video/relief.cpp10
-rw-r--r--src/mame/video/rltennis.cpp10
-rw-r--r--src/mame/video/rm380z.cpp53
-rw-r--r--src/mame/video/rmnimbus.cpp10
-rw-r--r--src/mame/video/rockrage.cpp2
-rw-r--r--src/mame/video/rohga.cpp12
-rw-r--r--src/mame/video/route16.cpp20
-rw-r--r--src/mame/video/rpunch.cpp10
-rw-r--r--src/mame/video/segag80r.cpp27
-rw-r--r--src/mame/video/segaic16.cpp11
-rw-r--r--src/mame/video/segaic16_road.cpp4
-rw-r--r--src/mame/video/segaic24.cpp72
-rw-r--r--src/mame/video/segas32.cpp270
-rw-r--r--src/mame/video/seibuspi.cpp10
-rw-r--r--src/mame/video/senjyo.cpp6
-rw-r--r--src/mame/video/seta.cpp8
-rw-r--r--src/mame/video/seta2.cpp4
-rw-r--r--src/mame/video/shuuz.cpp8
-rw-r--r--src/mame/video/sidearms.cpp23
-rw-r--r--src/mame/video/sknsspr.cpp43
-rw-r--r--src/mame/video/skullxbo.cpp14
-rw-r--r--src/mame/video/skyfox.cpp2
-rw-r--r--src/mame/video/skyraid.cpp17
-rw-r--r--src/mame/video/spacefb.cpp67
-rw-r--r--src/mame/video/special.cpp30
-rw-r--r--src/mame/video/spectrum.cpp6
-rw-r--r--src/mame/video/splash.cpp2
-rw-r--r--src/mame/video/sprint2.cpp9
-rw-r--r--src/mame/video/sprint4.cpp2
-rw-r--r--src/mame/video/sprint8.cpp4
-rw-r--r--src/mame/video/sspeedr.cpp10
-rw-r--r--src/mame/video/ssv.cpp2
-rw-r--r--src/mame/video/stactics.cpp17
-rw-r--r--src/mame/video/starcrus.cpp16
-rw-r--r--src/mame/video/starfield_05xx.cpp2
-rw-r--r--src/mame/video/starfire.cpp16
-rw-r--r--src/mame/video/starshp1.cpp29
-rw-r--r--src/mame/video/stfight_dev.cpp4
-rw-r--r--src/mame/video/stic.cpp10
-rw-r--r--src/mame/video/super80.cpp10
-rw-r--r--src/mame/video/superqix.cpp8
-rw-r--r--src/mame/video/suprloco.cpp2
-rw-r--r--src/mame/video/suprnova.cpp127
-rw-r--r--src/mame/video/system1.cpp12
-rw-r--r--src/mame/video/taito_b.cpp42
-rw-r--r--src/mame/video/taito_f2.cpp12
-rw-r--r--src/mame/video/taito_f3.cpp24
-rw-r--r--src/mame/video/taito_helper.cpp4
-rw-r--r--src/mame/video/taitoair.cpp2
-rw-r--r--src/mame/video/taitojc.cpp19
-rw-r--r--src/mame/video/taitosj.cpp27
-rw-r--r--src/mame/video/tank8.cpp15
-rw-r--r--src/mame/video/tatsumi.cpp419
-rw-r--r--src/mame/video/taxidriv.cpp76
-rw-r--r--src/mame/video/tc0080vco.cpp4
-rw-r--r--src/mame/video/tc0100scn.cpp12
-rw-r--r--src/mame/video/tc0180vcu.cpp43
-rw-r--r--src/mame/video/tc0480scp.cpp41
-rw-r--r--src/mame/video/tc0780fpa.cpp12
-rw-r--r--src/mame/video/tceptor.cpp10
-rw-r--r--src/mame/video/tecmo_mix.cpp21
-rw-r--r--src/mame/video/tecmosys.cpp23
-rw-r--r--src/mame/video/thief.cpp15
-rw-r--r--src/mame/video/thunderj.cpp18
-rw-r--r--src/mame/video/ti85.cpp27
-rw-r--r--src/mame/video/tia.cpp24
-rw-r--r--src/mame/video/timex.cpp2
-rw-r--r--src/mame/video/tmnt.cpp6
-rw-r--r--src/mame/video/toaplan1.cpp6
-rw-r--r--src/mame/video/toaplan2.cpp4
-rw-r--r--src/mame/video/toaplan_scu.cpp6
-rw-r--r--src/mame/video/toobin.cpp10
-rw-r--r--src/mame/video/triplhnt.cpp28
-rw-r--r--src/mame/video/trs80.cpp111
-rw-r--r--src/mame/video/trs80m3.cpp20
-rw-r--r--src/mame/video/truco.cpp2
-rw-r--r--src/mame/video/tubep.cpp24
-rw-r--r--src/mame/video/tunhunt.cpp6
-rw-r--r--src/mame/video/turbo.cpp161
-rw-r--r--src/mame/video/turrett.cpp2
-rw-r--r--src/mame/video/tutankhm.cpp16
-rw-r--r--src/mame/video/twin16.cpp9
-rw-r--r--src/mame/video/tx0.cpp7
-rw-r--r--src/mame/video/tx1.cpp20
-rw-r--r--src/mame/video/ultratnk.cpp2
-rw-r--r--src/mame/video/usgames.cpp2
-rw-r--r--src/mame/video/uv201.cpp2
-rw-r--r--src/mame/video/v1050.cpp8
-rw-r--r--src/mame/video/vc4000.cpp27
-rw-r--r--src/mame/video/vector06.cpp31
-rw-r--r--src/mame/video/vicdual.cpp27
-rw-r--r--src/mame/video/victory.cpp7
-rw-r--r--src/mame/video/vindictr.cpp10
-rw-r--r--src/mame/video/volfied.cpp2
-rw-r--r--src/mame/video/vtvideo.cpp30
-rw-r--r--src/mame/video/warpwarp.cpp2
-rw-r--r--src/mame/video/wecleman.cpp109
-rw-r--r--src/mame/video/welltris.cpp13
-rw-r--r--src/mame/video/wgp.cpp8
-rw-r--r--src/mame/video/williams.cpp31
-rw-r--r--src/mame/video/wolfpack.cpp23
-rw-r--r--src/mame/video/wswan.cpp40
-rw-r--r--src/mame/video/x1.cpp18
-rw-r--r--src/mame/video/x68k.cpp78
-rw-r--r--src/mame/video/xavix.cpp8
-rw-r--r--src/mame/video/xmen.cpp8
-rw-r--r--src/mame/video/xybots.cpp10
-rw-r--r--src/mame/video/ygv608.cpp10
-rw-r--r--src/mame/video/z88.cpp2
-rw-r--r--src/mame/video/zac2650.cpp23
-rw-r--r--src/mame/video/zaxxon.cpp17
-rw-r--r--src/mame/video/zx.cpp2
-rw-r--r--src/mame/video/zx8301.cpp6
-rw-r--r--src/osd/modules/file/posixptty.cpp2
-rw-r--r--src/osd/modules/font/font_dwrite.cpp4
-rw-r--r--src/osd/modules/font/font_sdl.cpp2
-rw-r--r--src/osd/modules/font/font_windows.cpp3
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp4
-rw-r--r--src/osd/modules/render/drawbgfx.cpp2
-rw-r--r--src/tools/chdman.cpp8
-rw-r--r--src/tools/ldresample.cpp4
-rw-r--r--src/tools/ldverify.cpp14
-rw-r--r--src/tools/pngcmp.cpp24
-rw-r--r--src/tools/regrep.cpp40
-rw-r--r--src/tools/unidasm.cpp2
1274 files changed, 13583 insertions, 15636 deletions
diff --git a/hash/videopac.xml b/hash/videopac.xml
index 5badbd7fc39..16c244e535c 100644
--- a/hash/videopac.xml
+++ b/hash/videopac.xml
@@ -20,22 +20,18 @@ TODO:
Undumped (or dumped but not public):
- Spaans (spanish to dutch translator)
- Crazy Horses
-- Des Chiffres et des Lettres
- misc. homebrew cartridges
Protos:
- Bastion youtube.com/watch?v=cFdmgs4r7_E
- Catburglar youtube.com/watch?v=DDsWDFxy0oE
- Himalaya youtube.com/watch?v=L_lvOs6EnA4
-- SoundTool youtube.com/watch?v=7JYn6B7rxqw
- Terrahawks youtube.com/watch?v=AXk7OSA6NGg
http://www.ozyr.com/rene/PICS/protos.jpg
-- Sherlock Holmes Consulting Detective (programmed by Ed Friedman, most likely dumped and hoarded)
- Back Gammon
- Freedom Fighters
- K.C.'s Crazy Chase
-- Killer Bees (also 10/12/82 (silent version), and 11/12/82 builds exist)
- Handicap I (?)
- Frogger
- Robot City
@@ -53,14 +49,9 @@ Unreleased, possibly no prototypes exist:
Undumped Odyssey³/G7400 prototypes:
-USA:
-- TMS2764
-- Freedom Fighters
-- Pick Axe Pete
-
http://www.ozyr.com/rene/PICS/protos.jpg
+- Pick Axe Pete
- Modem Program
-- Attack of the Time Lord
- Requins [Shark Hunter]
- monsternet dedicated g7400 840209 [Norseman]
- 58+ Air Battle
@@ -189,6 +180,18 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
+ <software name="linguaduc"><!-- not a consumer product, communication aid for the handicapped -->
+ <description>Linguaduc (Europe, prototype)</description>
+ <year>198?</year>
+ <publisher>Carba</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x800">
+ <rom name="pr_linguaduc.bin" size="0x800" crc="bd623665" sha1="d33dedd4b880f0cb655faa2396ab05c619799269" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="newscast">
<description>Newscaster (Europe)</description>
<year>1980</year>
@@ -228,7 +231,19 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
- <software name="testcart">
+ <software name="soundtool"><!-- not a consumer product, developer sound tool -->
+ <description>Sound Tool (Europe)</description>
+ <year>198?</year>
+ <publisher>Philips</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x800">
+ <rom name="soundtool.bin" size="0x800" crc="3e454bbe" sha1="976bbac3557e6daa262439645511e280b7c740fe" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="testcart"><!-- not a consumer product, factory test rom -->
<description>Service Test Cartridge (Europe)</description>
<year>198?</year>
<publisher>Philips</publisher>
@@ -737,7 +752,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<part name="cart" interface="odyssey_cart">
<feature name="slot" value="o2_rom" />
<dataarea name="rom" size="0x1000">
- <rom name="jo_chez-maxime.bin" size="0x1000" crc="0f46cf66" sha1="cd58d267fe5bab82f5dab01dbb08d5adf0053108" />
+ <rom name="jo_vxt_a08.bin" size="0x1000" crc="0f46cf66" sha1="cd58d267fe5bab82f5dab01dbb08d5adf0053108" />
</dataarea>
</part>
</software>
@@ -803,7 +818,7 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
- <software name="conquest">
+ <software name="conquest"><!-- board game -->
<description>Conquest of the World (Europe, US)</description>
<year>1981</year>
<publisher>Philips</publisher>
@@ -951,6 +966,18 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
+ <software name="chifflet">
+ <description>Des Chiffres et des Lettres (France)</description>
+ <year>198?</year>
+ <publisher>Brandt</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x2000">
+ <rom name="jo_jft_d03.bin" size="0x2000" crc="248bf33e" sha1="5c86921225b93d87bfd63bc13dd22dddab4e8826" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="billiard">
<description>Electronic Billiards (Europe, US)</description>
<year>1978</year>
@@ -1235,6 +1262,32 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
+ <software name="beesp" cloneof="bees">
+ <description>Killer Bees! (US, prototype, set 1)</description>
+ <year>1982</year>
+ <publisher>Philips</publisher>
+ <info name="programmer" value="Robert S. Harris" />
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x1000">
+ <rom name="o2_47_pr.bin" size="0x1000" crc="f308018d" sha1="15880a92e42258776801fdae4239f3e529662913" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="beespa" cloneof="bees">
+ <description>Killer Bees! (US, prototype, set 2)</description>
+ <year>1982</year>
+ <publisher>Philips</publisher>
+ <info name="programmer" value="Robert S. Harris" />
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x1000">
+ <rom name="o2_47_pr_alt.bin" size="0x1000" crc="9bec21c2" sha1="5f38cdc587091cb149364d20d508e800c860d82d" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="lasvegas">
<description>Las Vegas Gambling (Europe, US)</description>
<year>1980</year>
@@ -1825,7 +1878,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<part name="cart" interface="odyssey_cart">
<feature name="slot" value="o2_rom" />
<dataarea name="rom" size="0x1000">
- <rom name="jo_syracuse.bin" size="0x1000" crc="280d08f4" sha1="37aa11cbf0a32ece89d1d2c500b74660830377df" />
+ <rom name="jo_vxt_a07.bin" size="0x1000" crc="280d08f4" sha1="37aa11cbf0a32ece89d1d2c500b74660830377df" />
</dataarea>
</part>
</software>
@@ -1857,6 +1910,18 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
+ <software name="sherlock"><!-- board game -->
+ <description>The Adventures of Sherlock Holmes (US, prototype)</description>
+ <year>198?</year>
+ <publisher>Magnavox</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <dataarea name="rom" size="0x2000">
+ <rom name="pr_sherlock.bin" size="0x2000" crc="245dd6a5" sha1="3046caec84ea4b4b5c84ff7e3d1fd38231367f94" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="gtwallst">
<description>The Great Wall Street Fortune Hunt (Europe, US)</description>
<year>1983</year>
@@ -1907,7 +1972,7 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
- <software name="quest">
+ <software name="quest"><!-- board game -->
<description>The Quest for the Rings (Europe, US)</description>
<year>1981</year>
<publisher>Philips</publisher>
@@ -1921,7 +1986,7 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
- <software name="laquete" cloneof="quest">
+ <software name="laquete" cloneof="quest"><!-- board game -->
<description>La Quête des Anneux (France)</description>
<year>1982</year>
<publisher>Radiola</publisher>
@@ -2032,7 +2097,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_basket-bowling_pl.bin" size="0x2000" crc="b5fb1416" sha1="c341ed24346546b75de2ab24af1a9223ca2d1aac" />
+ <rom name="jo_jfa_e03.bin" size="0x2000" crc="b5fb1416" sha1="c341ed24346546b75de2ab24af1a9223ca2d1aac" />
</dataarea>
</part>
</software>
@@ -2060,7 +2125,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_billard_pl.bin" size="0x2000" crc="4cec1404" sha1="004ea921b691db6b310f5b51c495df9b86be3aa8" />
+ <rom name="jo_jxa_d03.bin" size="0x2000" crc="4cec1404" sha1="004ea921b691db6b310f5b51c495df9b86be3aa8" />
</dataarea>
</part>
</software>
@@ -2139,7 +2204,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_demon-attack_pl.bin" size="0x2000" crc="50af9d45" sha1="cfd1337c8d5a40f2f4e1ab49158a8963764919da" />
+ <rom name="jo_jxt_c07.bin" size="0x2000" crc="50af9d45" sha1="cfd1337c8d5a40f2f4e1ab49158a8963764919da" />
</dataarea>
</part>
</software>
@@ -2152,7 +2217,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_exojet_pl.bin" size="0x2000" crc="cfca6f39" sha1="8aafcd055a2ef45c3d85804c8a3ea04d9a9732ab" />
+ <rom name="jo_jxt_c05.bin" size="0x2000" crc="cfca6f39" sha1="8aafcd055a2ef45c3d85804c8a3ea04d9a9732ab" />
</dataarea>
</part>
</software>
@@ -2165,7 +2230,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_flipper_pl.bin" size="0x2000" crc="ac5c74e6" sha1="215439c1044b93888b71bd6a210ebfda93d97c22" />
+ <rom name="jo_jfa_d01.bin" size="0x2000" crc="ac5c74e6" sha1="215439c1044b93888b71bd6a210ebfda93d97c22" />
</dataarea>
</part>
</software>
@@ -2230,7 +2295,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_le-tresor-englouti_pl.bin" size="0x2000" crc="b2f0f0b4" sha1="c0fcaef6a18026e0acc04c3d48443d768043cb03" />
+ <rom name="jo_jft_a10.bin" size="0x2000" crc="b2f0f0b4" sha1="c0fcaef6a18026e0acc04c3d48443d768043cb03" />
</dataarea>
</part>
</software>
@@ -2399,7 +2464,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<feature name="slot" value="o2_rom" />
<feature name="b_pin" value="1" />
<dataarea name="rom" size="0x2000">
- <rom name="jo_moto-crash_pl.bin" size="0x2000" crc="68560dc7" sha1="f6de2f95e5cf4849a4d7071b1a470c3ef0634e5f" />
+ <rom name="jo_jxt_e05.bin" size="0x2000" crc="68560dc7" sha1="f6de2f95e5cf4849a4d7071b1a470c3ef0634e5f" />
</dataarea>
</part>
</software>
@@ -2436,8 +2501,21 @@ Official VP+ upgaded versions (simply adds a background picture):
<!-- Odyssey³ prototypes, they won't work properly on European VP+ consoles -->
+ <software name="timelordpl" cloneof="timelord">
+ <description>Attack of the Timelord! (US, plus, prototype)</description>
+ <year>1983</year>
+ <publisher>Philips</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <feature name="b_pin" value="1" />
+ <dataarea name="rom" size="0x2000">
+ <rom name="o3_45.bin" size="0x2000" crc="5bbb30c8" sha1="29d999b9e7c59d16e5e68d833f28dbc86f062d1f" />
+ </dataarea>
+ </part>
+ </software>
+
<software name="baseballpl" cloneof="baseball">
- <description>Baseball (US, plus, prototype)</description>
+ <description>Baseball! (US, plus, prototype)</description>
<year>1983</year>
<publisher>Philips</publisher>
<part name="cart" interface="odyssey_cart">
@@ -2462,6 +2540,45 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
+ <software name="freedomplu" cloneof="freedom">
+ <description>Freedom Fighters! (US, plus, prototype)</description>
+ <year>1983</year>
+ <publisher>Philips</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <feature name="b_pin" value="1" />
+ <dataarea name="rom" size="0x2000">
+ <rom name="o3_36.bin" size="0x2000" crc="3150a9bf" sha1="e1f78160d273a19f4c322423bc28a566fa668e71" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="beesplu" cloneof="bees">
+ <description>Killer Bees! (US, plus, prototype)</description>
+ <year>1983</year>
+ <publisher>Philips</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <feature name="b_pin" value="1" />
+ <dataarea name="rom" size="0x2000">
+ <rom name="o3_47.bin" size="0x2000" crc="3026e732" sha1="a944e7d6c5c8924dcbd9ef08e0f74b4bca1177c3" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="terminal">
+ <description>Terminal Program (US, prototype)</description>
+ <year>1983</year>
+ <publisher>Philips</publisher>
+ <part name="cart" interface="odyssey_cart">
+ <feature name="slot" value="o2_rom" />
+ <feature name="b_pin" value="1" />
+ <dataarea name="rom" size="0x800">
+ <rom name="o3_terminal.bin" size="0x800" crc="e5d2cf23" sha1="3e6e4f407a8f37636336029950acf7d46253e50a" />
+ </dataarea>
+ </part>
+ </software>
+
<!-- Homebrew -->
@@ -2492,7 +2609,6 @@ Official VP+ upgaded versions (simply adds a background picture):
</part>
</software>
- <!-- NTSC Cartridge dumped from a 39SF010 flashrom (1MB) and actual data (2KB) data is repeated to fill space and matches publicly posted rom from author -->
<software name="deathrac">
<description>Death Race (US)</description>
<year>2014</year>
@@ -2501,7 +2617,8 @@ Official VP+ upgaded versions (simply adds a background picture):
<part name="cart" interface="odyssey_cart">
<feature name="slot" value="o2_rom" />
<dataarea name="rom" size="0x800">
- <rom name="drace_rc04.ntsc.bin" size="0x800" crc="91a767de" sha1="26a044c68ff08f574f6649b731b82caca8c0e797" />
+ <!-- 39SF010 flashrom (1MB), actual data (2KB) is repeated to fill space and matches publicly posted rom from author -->
+ <rom name="drace_rc04_ntsc.bin" size="0x800" crc="91a767de" sha1="26a044c68ff08f574f6649b731b82caca8c0e797" />
</dataarea>
</part>
</software>
@@ -2514,7 +2631,7 @@ Official VP+ upgaded versions (simply adds a background picture):
<part name="cart" interface="odyssey_cart">
<feature name="slot" value="o2_rom" />
<dataarea name="rom" size="0x800">
- <rom name="drace_rc04.pal.bin" size="0x800" crc="0ca8c961" sha1="3918d6c2c324fba55e8b90acc8d38e540e4ec5c6" />
+ <rom name="drace_rc04_pal.bin" size="0x800" crc="0ca8c961" sha1="3918d6c2c324fba55e8b90acc8d38e540e4ec5c6" />
</dataarea>
</part>
</software>
diff --git a/makefile b/makefile
index 1e1e7e44de7..880057968c9 100644
--- a/makefile
+++ b/makefile
@@ -196,7 +196,7 @@ GENIEOS := solaris
endif
ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
OS := freebsd
-GENIEOS := freebsd
+GENIEOS := bsd
endif
ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
OS := freebsd
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index b3fc924eab4..5056334b79e 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -1390,6 +1390,12 @@ end
end
end
+ if _OPTIONS["targetos"]=="freebsd" then
+ buildoptions {
+ backtick(pkgconfigcmd() .. " --cflags gl")
+ }
+ end
+
defines {
"__STDC_LIMIT_MACROS",
"__STDC_FORMAT_MACROS",
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index a55cf443fdb..3d0d6e0eb45 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -1580,7 +1580,7 @@ if (CPUS["M6502"]~=null) then
{ MAME_DIR .. "src/devices/cpu/m6502/om65ce02.lst", GEN_DIR .. "emu/cpu/m6502/m65ce02.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm65ce02.lst" }, {"@echo Generating m65ce02 disassembler source file...", PYTHON .. " $(1) s m65ce02 $(<) $(2) $(@)" }},
{ MAME_DIR .. "src/devices/cpu/m6502/om6509.lst", GEN_DIR .. "emu/cpu/m6502/m6509.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm6509.lst" }, {"@echo Generating m6509 disassembler source file...", PYTHON .. " $(1) s m6509 $(<) $(2) $(@)" }},
{ MAME_DIR .. "src/devices/cpu/m6502/om6510.lst", GEN_DIR .. "emu/cpu/m6502/m6510.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm6510.lst" }, {"@echo Generating m6510 disassembler source file...", PYTHON .. " $(1) s m6510 $(<) $(2) $(@)" }},
- { MAME_DIR .. "src/devices/cpu/m6502/on2a03.lst", GEN_DIR .. "emu/cpu/m6502/n2a03.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dn2a03.lst" }, {"@echo Generating n2a03 disassembler source file...", PYTHON .. " $(1) s n2a03 $(<) $(2) $(@)" }},
+ { MAME_DIR .. "src/devices/cpu/m6502/on2a03.lst", GEN_DIR .. "emu/cpu/m6502/n2a03.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dn2a03.lst" }, {"@echo Generating n2a03 disassembler source file...", PYTHON .. " $(1) s n2a03_core $(<) $(2) $(@)" }},
{ MAME_DIR .. "src/devices/cpu/m6502/om740.lst" , GEN_DIR .. "emu/cpu/m6502/m740.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm740.lst" }, {"@echo Generating m740 disassembler source file...", PYTHON .. " $(1) s m740 $(<) $(2) $(@)" }},
{ MAME_DIR .. "src/devices/cpu/m6502/dr65c02.lst", GEN_DIR .. "emu/cpu/m6502/r65c02.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", }, {"@echo Generating r65c02 disassembler source file...", PYTHON .. " $(1) s r65c02 - $(<) $(@)" }},
{ MAME_DIR .. "src/devices/cpu/m6502/or65c19.lst", GEN_DIR .. "emu/cpu/m6502/r65c19.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dr65c19.lst" }, {"@echo Generating r65c19 disassembler source file...", PYTHON .. " $(1) s r65c19 $(<) $(2) $(@)" }},
@@ -3319,3 +3319,13 @@ if (CPUS["UPD177X"]~=null or _OPTIONS["with-tools"]) then
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/upd177x/upd177xd.cpp")
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/upd177x/upd177xd.h")
end
+
+--------------------------------------------------
+-- Sanyo LC58 - Disassembler only
+--@src/devices/cpu/lc58/lc58.h,CPUS["LC58"] = true
+--------------------------------------------------
+
+if (CPUS["LC58"]~=null or _OPTIONS["with-tools"]) then
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/lc58/lc58d.cpp")
+ table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/lc58/lc58d.h")
+end
diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua
index a49d74dbc9e..27002fb8bd8 100644
--- a/scripts/src/sound.lua
+++ b/scripts/src/sound.lua
@@ -657,6 +657,8 @@ if (SOUNDS["NES_APU"]~=null) then
MAME_DIR .. "src/devices/sound/nes_apu.cpp",
MAME_DIR .. "src/devices/sound/nes_apu.h",
MAME_DIR .. "src/devices/sound/nes_defs.h",
+ MAME_DIR .. "src/devices/sound/nes_apu_vt.cpp",
+ MAME_DIR .. "src/devices/sound/nes_apu_vt.h",
}
end
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 6f08d0f2ba7..97875978d48 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -1168,6 +1168,7 @@ function linkProjects_mame_mess(_target, _subtarget)
"cccp",
"cce",
"ccs",
+ "ceres",
"chessking",
"chromatics",
"chrysler",
@@ -2017,6 +2018,11 @@ files {
MAME_DIR .. "src/mame/drivers/ccs2810.cpp",
}
+createMESSProjects(_target, _subtarget, "ceres")
+files {
+ MAME_DIR .. "src/mame/drivers/ceres.cpp",
+}
+
createMESSProjects(_target, _subtarget, "chessking")
files {
MAME_DIR .. "src/mame/drivers/cking_master.cpp",
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index ae5dbf82643..e09671f8f16 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -205,8 +205,6 @@ uint8_t a2bus_device::get_a2bus_nmi_mask()
void a2bus_device::set_irq_line(int state, int slot)
{
- m_out_irq_cb(state);
-
if (state == CLEAR_LINE)
{
m_slot_irq_mask &= ~(1<<slot);
@@ -215,6 +213,8 @@ void a2bus_device::set_irq_line(int state, int slot)
{
m_slot_irq_mask |= (1<<slot);
}
+
+ m_out_irq_cb(state);
}
void a2bus_device::set_nmi_line(int state, int slot)
diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp
index f9de57897f8..1ef164aff41 100644
--- a/src/devices/bus/a2bus/a2mcms.cpp
+++ b/src/devices/bus/a2bus/a2mcms.cpp
@@ -206,7 +206,7 @@ mcms_device::mcms_device(const machine_config &mconfig, const char *tag, device_
void mcms_device::device_start()
{
m_write_irq.resolve();
- m_stream = stream_alloc_legacy(0, 2, 31250);
+ m_stream = stream_alloc(0, 2, 31250);
m_timer = timer_alloc(0, nullptr);
m_clrtimer = timer_alloc(1, nullptr);
m_enabled = false;
@@ -252,20 +252,19 @@ void mcms_device::device_timer(emu_timer &timer, device_timer_id tid, int param,
}
}
-void mcms_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void mcms_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- stream_sample_t *outL, *outR;
int i, v;
uint16_t wptr;
int8_t sample;
int32_t mixL, mixR;
- outL = outputs[1];
- outR = outputs[0];
+ auto &outL = outputs[1];
+ auto &outR = outputs[0];
if (m_enabled)
{
- for (i = 0; i < samples; i++)
+ for (i = 0; i < outL.samples(); i++)
{
mixL = mixR = 0;
@@ -286,16 +285,14 @@ void mcms_device::sound_stream_update_legacy(sound_stream &stream, stream_sample
}
}
- outL[i] = (mixL * m_mastervol)>>9;
- outR[i] = (mixR * m_mastervol)>>9;
+ outL.put_int(i, mixL * m_mastervol, 32768 << 9);
+ outR.put_int(i, mixR * m_mastervol, 32768 << 9);
}
}
else
{
- for (i = 0; i < samples; i++)
- {
- outL[i] = outR[i] = 0;
- }
+ outL.fill(0);
+ outR.fill(0);
}
}
diff --git a/src/devices/bus/a2bus/a2mcms.h b/src/devices/bus/a2bus/a2mcms.h
index 11e8b332ee0..487c6ddb7a7 100644
--- a/src/devices/bus/a2bus/a2mcms.h
+++ b/src/devices/bus/a2bus/a2mcms.h
@@ -42,7 +42,7 @@ protected:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
private:
sound_stream *m_stream;
diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp
index 7b6caa40624..e8d5972e4ec 100644
--- a/src/devices/bus/a2bus/a2ultraterm.cpp
+++ b/src/devices/bus/a2bus/a2ultraterm.cpp
@@ -304,11 +304,10 @@ void a2bus_videx160_device::write_c800(uint16_t offset, uint8_t data)
MC6845_UPDATE_ROW( a2bus_videx160_device::crtc_update_row )
{
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
uint16_t chr_base = ra;
- int i;
- for ( i = 0; i < x_count; i++ )
+ for ( int i = 0; i < x_count; i++ )
{
uint16_t offset = ( ma + i );
uint8_t chr = m_ram[ offset ];
diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp
index b0fda659783..839fa19e74a 100644
--- a/src/devices/bus/a2bus/a2videoterm.cpp
+++ b/src/devices/bus/a2bus/a2videoterm.cpp
@@ -347,7 +347,7 @@ void a2bus_videx80_device::write_c800(uint16_t offset, uint8_t data)
MC6845_UPDATE_ROW( a2bus_videx80_device::crtc_update_row )
{
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
uint16_t chr_base = ra; //( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
for (int i = 0; i < x_count; i++)
diff --git a/src/devices/bus/a2bus/computereyes2.cpp b/src/devices/bus/a2bus/computereyes2.cpp
index b8a80819023..b8dcab00373 100644
--- a/src/devices/bus/a2bus/computereyes2.cpp
+++ b/src/devices/bus/a2bus/computereyes2.cpp
@@ -196,22 +196,22 @@ void a2bus_computereyes2_device::write_c0nx(uint8_t offset, uint8_t data)
m_x = m_y = 0;
std::fill_n(m_a2_bitmap, 280*193, 0);
- m_bitmap = &m_picture->get_bitmap();
- if (m_bitmap)
+ const bitmap_argb32 &bitmap = m_picture->get_bitmap();
+ if (bitmap.valid())
{
// convert arbitrary sized ARGB32 image to a 188x193 image with 256 levels of grayscale
- double stepx = (double)m_bitmap->width() / 188.0;
- double stepy = (double)m_bitmap->height() / 193.0;
+ double stepx = (double)bitmap.width() / 188.0;
+ double stepy = (double)bitmap.height() / 193.0;
for (int y = 0; y < 193; y++)
{
for (int x = 0; x < 280; x++)
{
- u32 pixel = m_bitmap->pix((int)((double)y * stepy), (int)((double)x * stepx));
- double mono = ((0.2126 * (double)(((pixel>>16) & 0xff) / 255.0)) +
- (0.7152 * (double)(((pixel>>8) & 0xff) / 255.0)) +
- (0.0722 * (double)((pixel& 0xff) / 255.0)));
- m_a2_bitmap[(y*280)+x] = (u8)(mono * 255.0);
+ u32 pixel = bitmap.pix(int((double)y * stepy), int((double)x * stepx));
+ double mono = ((0.2126 * double(((pixel>>16) & 0xff) / 255.0)) +
+ (0.7152 * double(((pixel>>8) & 0xff) / 255.0)) +
+ (0.0722 * double((pixel& 0xff) / 255.0)));
+ m_a2_bitmap[(y*280)+x] = u8(mono * 255.0);
}
}
}
diff --git a/src/devices/bus/a2bus/computereyes2.h b/src/devices/bus/a2bus/computereyes2.h
index 31856f08813..a69600b6de2 100644
--- a/src/devices/bus/a2bus/computereyes2.h
+++ b/src/devices/bus/a2bus/computereyes2.h
@@ -46,7 +46,6 @@ private:
u8 m_a2_bitmap[280*193];
u8 m_threshold;
bool m_bActive;
- bitmap_argb32 *m_bitmap;
};
// device type definition
diff --git a/src/devices/bus/a2gameio/computereyes.cpp b/src/devices/bus/a2gameio/computereyes.cpp
index 1c587f54254..af597361c8e 100644
--- a/src/devices/bus/a2gameio/computereyes.cpp
+++ b/src/devices/bus/a2gameio/computereyes.cpp
@@ -82,23 +82,22 @@ WRITE_LINE_MEMBER(apple2_compeyes_device::an0_w)
std::fill_n(m_a2_bitmap, 280*192, 0);
- m_bitmap = &m_picture->get_bitmap();
- if (m_bitmap)
+ const bitmap_argb32 &bitmap = m_picture->get_bitmap();
+ if (bitmap.valid())
{
// convert arbitrary sized ARGB32 image to a 280x192 image with 256 levels of grayscale
- double stepx = (double)m_bitmap->width() / 280.0;
- double stepy = (double)m_bitmap->height() / 192.0;
-
+ double stepx = (double)bitmap.width() / 280.0;
+ double stepy = (double)bitmap.height() / 192.0;
for (int y = 0; y < 192; y++)
{
for (int x = 0; x < 280; x++)
{
- u32 pixel = m_bitmap->pix((int)((double)y * stepy), (int)((double)x * stepx));
- double mono = ((0.2126 * (double)(((pixel>>16) & 0xff) / 255.0)) +
- (0.7152 * (double)(((pixel>>8) & 0xff) / 255.0)) +
- (0.0722 * (double)((pixel& 0xff) / 255.0)));
- m_a2_bitmap[(y*280)+x] = (u8)(mono * 255.0);
+ u32 pixel = bitmap.pix(int((double)y * stepy), int((double)x * stepx));
+ double mono = ((0.2126 * double(((pixel>>16) & 0xff) / 255.0)) +
+ (0.7152 * double(((pixel>>8) & 0xff) / 255.0)) +
+ (0.0722 * double((pixel& 0xff) / 255.0)));
+ m_a2_bitmap[(y*280)+x] = u8(mono * 255.0);
}
}
}
diff --git a/src/devices/bus/a2gameio/computereyes.h b/src/devices/bus/a2gameio/computereyes.h
index 6aef78796a6..9445ce4df25 100644
--- a/src/devices/bus/a2gameio/computereyes.h
+++ b/src/devices/bus/a2gameio/computereyes.h
@@ -41,7 +41,6 @@ private:
required_device<picture_image_device> m_picture;
int m_x, m_y, m_an1, m_an2, m_an3, m_level;
u8 m_a2_bitmap[280*192];
- bitmap_argb32 *m_bitmap;
};
// device type declaration
diff --git a/src/devices/bus/acorn/system/vdu40.cpp b/src/devices/bus/acorn/system/vdu40.cpp
index dcee8cd9b53..7bc8629ac35 100644
--- a/src/devices/bus/acorn/system/vdu40.cpp
+++ b/src/devices/bus/acorn/system/vdu40.cpp
@@ -93,7 +93,7 @@ void acorn_vdu40_device::device_reset()
MC6845_UPDATE_ROW(acorn_vdu40_device::crtc_update_row)
{
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
m_trom->lose_w(1);
m_trom->lose_w(0);
diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp
index 5cf995d8d3c..77bad0bf32c 100644
--- a/src/devices/bus/acorn/system/vdu80.cpp
+++ b/src/devices/bus/acorn/system/vdu80.cpp
@@ -172,7 +172,7 @@ void acorn_vdu80_device::device_reset()
MC6845_UPDATE_ROW(acorn_vdu80_device::crtc_update_row)
{
uint8_t invert = BIT(m_links->read(), 1);
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
for (int column = 0; column < x_count; column++)
{
diff --git a/src/devices/bus/bbc/1mhzbus/m5000.h b/src/devices/bus/bbc/1mhzbus/m5000.h
index bf11943d7cd..d2507ab4abe 100644
--- a/src/devices/bus/bbc/1mhzbus/m5000.h
+++ b/src/devices/bus/bbc/1mhzbus/m5000.h
@@ -63,8 +63,8 @@ private:
bool m_disable;
bool m_modulate;
- stream_sample_t m_sam_l[16];
- stream_sample_t m_sam_r[16];
+ int32_t m_sam_l[16];
+ int32_t m_sam_r[16];
emu_timer *m_dsp_timer;
diff --git a/src/devices/bus/bbc/userport/lcd.cpp b/src/devices/bus/bbc/userport/lcd.cpp
index cdc70bc35fe..f5f92270ca9 100644
--- a/src/devices/bus/bbc/userport/lcd.cpp
+++ b/src/devices/bus/bbc/userport/lcd.cpp
@@ -87,7 +87,7 @@ HD44780_PIXEL_UPDATE(bbc_lcd_device::lcd_pixel_update)
}
if (line < 4)
- bitmap.pix16(line * (8 + 1) + y, pos * 6 + x) = state ? 1 : 2;
+ bitmap.pix(line * (8 + 1) + y, pos * 6 + x) = state ? 1 : 2;
}
}
diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp
index 8f0f35b523f..6bfa6e9d8cd 100644
--- a/src/devices/bus/c64/xl80.cpp
+++ b/src/devices/bus/c64/xl80.cpp
@@ -85,12 +85,12 @@ const tiny_rom_entry *c64_xl80_device::device_rom_region() const
MC6845_UPDATE_ROW( c64_xl80_device::crtc_update_row )
{
- const pen_t *pen = m_palette->pens();
+ pen_t const *const pen = m_palette->pens();
for (int column = 0; column < x_count; column++)
{
- uint8_t code = m_ram[((ma + column) & 0x7ff)];
- uint16_t addr = (code << 3) | (ra & 0x07);
+ uint8_t const code = m_ram[((ma + column) & 0x7ff)];
+ uint16_t const addr = (code << 3) | (ra & 0x07);
uint8_t data = m_char_rom->base()[addr & 0x7ff];
if (column == cursor_x)
@@ -100,10 +100,10 @@ MC6845_UPDATE_ROW( c64_xl80_device::crtc_update_row )
for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
- int color = BIT(data, 7) && de;
+ int const x = (column * 8) + bit;
+ int const color = BIT(data, 7) && de;
- bitmap.pix32(vbp + y, hbp + x) = pen[color];
+ bitmap.pix(vbp + y, hbp + x) = pen[color];
data <<= 1;
}
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 1d9c0ac8577..2744ea3e3ac 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -575,9 +575,9 @@ WRITE_LINE_MEMBER( epson_lx810l_device::co0_w )
*/
if (m_real_cr_pos < m_bitmap.width()) {
for (int i = 0; i < 9; i++) {
- unsigned int y = bitmap_line(i);
+ unsigned int const y = bitmap_line(i);
if ((m_printhead & (1<<(8-i))) != 0)
- m_bitmap.pix32(y, m_real_cr_pos + CR_OFFSET) = 0x000000;
+ m_bitmap.pix(y, m_real_cr_pos + CR_OFFSET) = 0x000000;
}
}
}
diff --git a/src/devices/bus/coco/coco_ssc.cpp b/src/devices/bus/coco/coco_ssc.cpp
index 63f6e90fcc5..3677010648f 100644
--- a/src/devices/bus/coco/coco_ssc.cpp
+++ b/src/devices/bus/coco/coco_ssc.cpp
@@ -130,7 +130,7 @@ namespace
virtual void device_start() override;
// sound stream update overrides
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
private:
sound_stream* m_stream;
@@ -535,25 +535,25 @@ cocossc_sac_device::cocossc_sac_device(const machine_config &mconfig, const char
void cocossc_sac_device::device_start()
{
- m_stream = stream_alloc_legacy(1, 1, machine().sample_rate());
+ m_stream = stream_alloc(1, 1, machine().sample_rate());
}
//-------------------------------------------------
-// sound_stream_update_legacy - handle a stream update
+// sound_stream_update - handle a stream update
//-------------------------------------------------
-void cocossc_sac_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void cocossc_sac_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- stream_sample_t const *src = inputs[0];
- stream_sample_t *dst = outputs[0];
+ auto &src = inputs[0];
+ auto &dst = outputs[0];
- double n = samples;
+ double n = dst.samples();
- while (samples--)
+ for (int sampindex = 0; sampindex < n; sampindex++)
{
- m_rms[m_index] += ( (double)*src * (double)*src );
- *dst++ = (*src++);
+ m_rms[m_index] += src.get(sampindex) * src.get(sampindex);
+ dst.put(sampindex, src.get(sampindex));
}
m_rms[m_index] = m_rms[m_index] / n;
@@ -576,7 +576,7 @@ bool cocossc_sac_device::sound_activity_circuit_output()
average /= 16.0;
- if( average > 10400.0 )
+ if( average > 0.317 )
return true;
return false;
diff --git a/src/devices/bus/compis/hrg.cpp b/src/devices/bus/compis/hrg.cpp
index 7aa8aa72f7e..1612729e706 100644
--- a/src/devices/bus/compis/hrg.cpp
+++ b/src/devices/bus/compis/hrg.cpp
@@ -51,11 +51,11 @@ void compis_uhrg_device::uhrg_map(address_map &map)
UPD7220_DISPLAY_PIXELS_MEMBER( compis_hrg_device::display_pixels )
{
- uint16_t i,gfx = m_video_ram[(address & 0x7fff) >> 1];
- const pen_t *pen = m_palette->pens();
+ uint16_t const gfx = m_video_ram[(address & 0x7fff) >> 1];
+ pen_t const *const pen = m_palette->pens();
- for(i=0; i<16; i++)
- bitmap.pix32(y, x + i) = pen[BIT(gfx, i)];
+ for(uint16_t i=0; i<16; i++)
+ bitmap.pix(y, x + i) = pen[BIT(gfx, i)];
}
@@ -65,11 +65,11 @@ UPD7220_DISPLAY_PIXELS_MEMBER( compis_hrg_device::display_pixels )
UPD7220_DISPLAY_PIXELS_MEMBER( compis_uhrg_device::display_pixels )
{
- uint16_t i,gfx = m_video_ram[(address & 0x1ffff) >> 1];
- const pen_t *pen = m_palette->pens();
+ uint16_t const gfx = m_video_ram[(address & 0x1ffff) >> 1];
+ pen_t const *const pen = m_palette->pens();
- for(i=0; i<16; i++)
- bitmap.pix32(y, x + i) = pen[BIT(gfx, i)];
+ for(uint16_t i=0; i<16; i++)
+ bitmap.pix(y, x + i) = pen[BIT(gfx, i)];
}
diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp
index ebf7e1f271e..192e5989a36 100644
--- a/src/devices/bus/comx35/clm.cpp
+++ b/src/devices/bus/comx35/clm.cpp
@@ -104,8 +104,8 @@ MC6845_UPDATE_ROW( comx_clm_device::crtc_update_row )
{
for (int column = 0; column < x_count; column++)
{
- uint8_t code = m_video_ram[((ma + column) & 0x7ff)];
- uint16_t addr = (code << 3) | (ra & 0x07);
+ uint8_t const code = m_video_ram[((ma + column) & 0x7ff)];
+ uint16_t const addr = (code << 3) | (ra & 0x07);
uint8_t data = m_char_rom->base()[addr & 0x7ff];
if (BIT(ra, 3) && column == cursor_x)
@@ -115,9 +115,9 @@ MC6845_UPDATE_ROW( comx_clm_device::crtc_update_row )
for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
+ int const x = (column * 8) + bit;
- bitmap.pix32(vbp + y, hbp + x) = m_palette->pen(BIT(data, 7) && de);
+ bitmap.pix(vbp + y, hbp + x) = m_palette->pen(BIT(data, 7) && de);
data <<= 1;
}
diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp
index 97a33298171..659bab524ad 100644
--- a/src/devices/bus/ecbbus/grip.cpp
+++ b/src/devices/bus/ecbbus/grip.cpp
@@ -179,35 +179,33 @@ MC6845_UPDATE_ROW( ecb_grip21_device::crtc_update_row )
{
for (int column = 0; column < x_count; column++)
{
- uint16_t address = (m_page << 12) | (((ma + column) & 0xfff) << 3) | (ra & 0x07);
- uint8_t data = m_video_ram[address];
+ uint16_t const address = (m_page << 12) | (((ma + column) & 0xfff) << 3) | (ra & 0x07);
+ uint8_t const data = m_video_ram[address];
for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
- int color = (m_flash ? 0 : BIT(data, bit)) && de;
+ int const x = (column * 8) + bit;
+ int const color = (m_flash ? 0 : BIT(data, bit)) && de;
- bitmap.pix32(vbp + y, hbp + x) = m_palette->pen(color);
+ bitmap.pix(vbp + y, hbp + x) = m_palette->pen(color);
}
}
}
/*
MC6845_UPDATE_ROW( ecb_grip21_device::grip5_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int column, bit;
-
- for (column = 0; column < x_count; column++)
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ for (int column = 0; column < x_count; column++)
{
- uint16_t address = (m_dpage << 12) | (((ma + column) & 0xfff) << 3) | (ra & 0x07);
- uint8_t data = m_video_ram[address];
+ uint16_t const address = (m_dpage << 12) | (((ma + column) & 0xfff) << 3) | (ra & 0x07);
+ uint8_t const data = m_video_ram[address];
- for (bit = 0; bit < 8; bit++)
+ for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
- int color = m_flash ? 0 : BIT(data, bit);
+ int const x = (column * 8) + bit;
+ int const color = m_flash ? 0 : BIT(data, bit);
- bitmap.pix32(y, x) = palette[color];
+ bitmap.pix(y, x) = palette[color];
}
}
}
diff --git a/src/devices/bus/einstein/pipe/tk02.cpp b/src/devices/bus/einstein/pipe/tk02.cpp
index b0cf5998131..74cd880e151 100644
--- a/src/devices/bus/einstein/pipe/tk02.cpp
+++ b/src/devices/bus/einstein/pipe/tk02.cpp
@@ -185,14 +185,14 @@ MC6845_UPDATE_ROW( tk02_device::crtc_update_row )
if (i == cursor_x)
data ^= 0xff;
- bitmap.pix32(y, i * 8 + 0) = pen[BIT(data, 7)];
- bitmap.pix32(y, i * 8 + 1) = pen[BIT(data, 6)];
- bitmap.pix32(y, i * 8 + 2) = pen[BIT(data, 5)];
- bitmap.pix32(y, i * 8 + 3) = pen[BIT(data, 4)];
- bitmap.pix32(y, i * 8 + 4) = pen[BIT(data, 3)];
- bitmap.pix32(y, i * 8 + 5) = pen[BIT(data, 2)];
- bitmap.pix32(y, i * 8 + 6) = pen[BIT(data, 1)];
- bitmap.pix32(y, i * 8 + 7) = pen[BIT(data, 0)];
+ bitmap.pix(y, i * 8 + 0) = pen[BIT(data, 7)];
+ bitmap.pix(y, i * 8 + 1) = pen[BIT(data, 6)];
+ bitmap.pix(y, i * 8 + 2) = pen[BIT(data, 5)];
+ bitmap.pix(y, i * 8 + 3) = pen[BIT(data, 4)];
+ bitmap.pix(y, i * 8 + 4) = pen[BIT(data, 3)];
+ bitmap.pix(y, i * 8 + 5) = pen[BIT(data, 2)];
+ bitmap.pix(y, i * 8 + 6) = pen[BIT(data, 1)];
+ bitmap.pix(y, i * 8 + 7) = pen[BIT(data, 0)];
}
}
diff --git a/src/devices/bus/electron/mode7.cpp b/src/devices/bus/electron/mode7.cpp
index 103c861c4ae..408b6a92300 100644
--- a/src/devices/bus/electron/mode7.cpp
+++ b/src/devices/bus/electron/mode7.cpp
@@ -195,7 +195,7 @@ void electron_mode7_device::expbus_w(offs_t offset, uint8_t data)
MC6845_UPDATE_ROW(electron_mode7_device::crtc_update_row)
{
- uint32_t* p = &bitmap.pix32(y);
+ uint32_t* p = &bitmap.pix(y);
m_trom->lose_w(1);
m_trom->lose_w(0);
diff --git a/src/devices/bus/gio64/newport.cpp b/src/devices/bus/gio64/newport.cpp
index 1be643afddd..142947b4ae0 100644
--- a/src/devices/bus/gio64/newport.cpp
+++ b/src/devices/bus/gio64/newport.cpp
@@ -1302,7 +1302,7 @@ uint32_t newport_base_device::screen_update(screen_device &device, bitmap_rgb32
/* loop over rows and copy to the destination */
for (int y = cliprect.min_y, sy = y_start; y <= cliprect.max_y && sy < y_end; y++, sy++)
{
- uint32_t *dest = &bitmap.pix32(y, cliprect.min_x);
+ uint32_t *dest = &bitmap.pix(y, cliprect.min_x);
const uint32_t *src_rgbci = m_rb2->rgbci(y);
const uint32_t *src_cidaux = m_rb2->cidaux(y);
diff --git a/src/devices/bus/hp_dio/hp98543.cpp b/src/devices/bus/hp_dio/hp98543.cpp
index bd96c95852d..eb73c56c6f4 100644
--- a/src/devices/bus/hp_dio/hp98543.cpp
+++ b/src/devices/bus/hp_dio/hp98543.cpp
@@ -235,7 +235,7 @@ uint32_t dio16_98543_device::screen_update(screen_device &screen, bitmap_rgb32 &
}
for (int y = 0; y < m_v_pix; y++) {
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
for (int x = 0; x < m_h_pix; x++) {
uint8_t tmp = m_vram[y * m_h_pix + x];
diff --git a/src/devices/bus/hp_dio/hp98544.cpp b/src/devices/bus/hp_dio/hp98544.cpp
index 842a7a78229..e5aced877d8 100644
--- a/src/devices/bus/hp_dio/hp98544.cpp
+++ b/src/devices/bus/hp_dio/hp98544.cpp
@@ -165,26 +165,20 @@ WRITE_LINE_MEMBER(dio16_98544_device::int_w)
uint32_t dio16_98544_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- int startx, starty, endx, endy;
-
-
if (!m_topcat->has_changed())
return UPDATE_HAS_NOT_CHANGED;
for (int y = 0; y < m_v_pix; y++) {
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
for (int x = 0; x < m_h_pix; x++) {
uint8_t tmp = m_vram[y * m_h_pix + x];
*scanline++ = tmp ? rgb_t(255,255,255) : rgb_t(0, 0, 0);
}
}
+ int startx, starty, endx, endy;
m_topcat->get_cursor_pos(startx, starty, endx, endy);
-
- for (int y = starty; y <= endy; y++) {
- uint32_t *scanline = &bitmap.pix32(y);
- memset(scanline + startx, 0xff, (endx - startx) << 2);
- }
+ bitmap.fill(rgb_t(255, 255, 255), rectangle(startx, endx, starty, endy));
return 0;
}
diff --git a/src/devices/bus/hp_dio/hp98550.cpp b/src/devices/bus/hp_dio/hp98550.cpp
index 738926eae77..38f70d2d670 100644
--- a/src/devices/bus/hp_dio/hp98550.cpp
+++ b/src/devices/bus/hp_dio/hp98550.cpp
@@ -218,7 +218,7 @@ uint32_t dio32_98550_device::screen_update(screen_device &screen, bitmap_rgb32 &
mask |= ce->plane_enabled();
for (int y = 0; y < m_v_pix; y++) {
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
for (int x = 0; x < m_h_pix; x++) {
const int offset = y * m_fb_width +x;
diff --git a/src/devices/bus/iq151/grafik.cpp b/src/devices/bus/iq151/grafik.cpp
index 304bcf87b43..497012cf2cd 100644
--- a/src/devices/bus/iq151/grafik.cpp
+++ b/src/devices/bus/iq151/grafik.cpp
@@ -178,7 +178,7 @@ void iq151_grafik_device::video_update(bitmap_ind16 &bitmap, const rectangle &cl
{
for (int ra = 0; ra < 8; ra++)
{
- bitmap.pix16(y, x*8 + ra) |= BIT(m_videoram[(32*8 -1 - y)*64 + x], ra);
+ bitmap.pix(y, x*8 + ra) |= BIT(m_videoram[(32*8 -1 - y)*64 + x], ra);
}
}
}
diff --git a/src/devices/bus/iq151/minigraf.cpp b/src/devices/bus/iq151/minigraf.cpp
index d5bf2da1f8b..e0962048411 100644
--- a/src/devices/bus/iq151/minigraf.cpp
+++ b/src/devices/bus/iq151/minigraf.cpp
@@ -162,7 +162,7 @@ void iq151_minigraf_device::plotter_update(uint8_t control)
// if pen is down draws a point
if (m_pen)
- m_paper->pix16(((PAPER_HEIGHT-PAPER_MAX_Y)/2) + m_posy, ((PAPER_WIDTH-PAPER_MAX_X)/2) + m_posx) = 1;
+ m_paper->pix(((PAPER_HEIGHT-PAPER_MAX_Y)/2) + m_posy, ((PAPER_WIDTH-PAPER_MAX_X)/2) + m_posx) = 1;
m_control = control;
}
diff --git a/src/devices/bus/iq151/ms151a.cpp b/src/devices/bus/iq151/ms151a.cpp
index 447c9f0d43a..651e82bfe6f 100644
--- a/src/devices/bus/iq151/ms151a.cpp
+++ b/src/devices/bus/iq151/ms151a.cpp
@@ -164,5 +164,5 @@ void iq151_ms151a_device::plotter_update(uint8_t offset, uint8_t data)
// if pen is down draws a point
if (m_pen)
- m_paper->pix16(((PAPER_HEIGHT-PAPER_MAX_Y)/2) + m_posy, ((PAPER_WIDTH-PAPER_MAX_X)/2) + m_posx) = 1;
+ m_paper->pix(((PAPER_HEIGHT-PAPER_MAX_Y)/2) + m_posy, ((PAPER_WIDTH-PAPER_MAX_X)/2) + m_posx) = 1;
}
diff --git a/src/devices/bus/iq151/video32.cpp b/src/devices/bus/iq151/video32.cpp
index fce21b963e9..2d3f75b66ed 100644
--- a/src/devices/bus/iq151/video32.cpp
+++ b/src/devices/bus/iq151/video32.cpp
@@ -126,7 +126,7 @@ void iq151_video32_device::video_update(bitmap_ind16 &bitmap, const rectangle &c
{
for (int ra = 0; ra < 8; ra++)
{
- uint16_t *p = &bitmap.pix16(sy++);
+ uint16_t *p = &bitmap.pix(sy++);
for (int x = ma; x < ma + 32; x++)
{
diff --git a/src/devices/bus/iq151/video64.cpp b/src/devices/bus/iq151/video64.cpp
index a965abbd19e..487bf63ca33 100644
--- a/src/devices/bus/iq151/video64.cpp
+++ b/src/devices/bus/iq151/video64.cpp
@@ -140,7 +140,7 @@ void iq151_video64_device::video_update(bitmap_ind16 &bitmap, const rectangle &c
{
for (int ra = 0; ra < 8; ra++)
{
- uint16_t *p = &bitmap.pix16(sy++);
+ uint16_t *p = &bitmap.pix(sy++);
for (int x = ma; x < ma + 64; x++)
{
diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp
index 244fbc0bb66..81e6ba053fe 100644
--- a/src/devices/bus/isa/aga.cpp
+++ b/src/devices/bus/isa/aga.cpp
@@ -288,7 +288,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_inten_update_row )
{
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
uint8_t const *const videoram = m_videoram.get();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
uint16_t const chr_base = (ra & 0x08) ? 0x800 | (ra & 0x07) : ra;
if (y == 0) logerror("mda_text_inten_update_row\n");
@@ -345,7 +345,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_blink_update_row )
{
uint8_t const *const videoram = m_videoram.get();
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
uint16_t const chr_base = (ra & 0x08) ? 0x800 | (ra & 0x07) : ra;
if (y == 0) logerror("mda_text_blink_update_row\n");
@@ -402,7 +402,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_update_row )
{
uint8_t const *const videoram = m_videoram.get();
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
if (y == 0) logerror("cga_text_inten_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -431,7 +431,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_alt_update_row )
{
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
uint8_t const *const videoram = m_videoram.get();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
if (y == 0) logerror("cga_text_inten_alt_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -459,7 +459,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_update_row )
{
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
uint8_t const *const videoram = m_videoram.get();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
for (int i = 0; i < x_count; i++) {
uint16_t const offset = ((ma + i) << 1) & 0x3fff;
@@ -491,7 +491,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_alt_update_row )
{
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
uint8_t const *const videoram = m_videoram.get();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
if (y == 0) logerror("cga_text_blink_alt_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -526,7 +526,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bppl_update_row )
{
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
uint8_t const *const videoram = m_videoram.get();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
if (y == 0) logerror("cga_gfx_4bppl_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -551,7 +551,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bpph_update_row )
{
uint8_t const *const videoram = m_videoram.get();
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
if (y == 0) logerror("cga_gfx_4bpph_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -584,7 +584,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_2bpp_update_row )
{
uint8_t const *const videoram = m_videoram.get();
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
//if (y == 0) logerror("cga_gfx_2bpp_update_row\n");
for (int i = 0; i < x_count; i++) {
@@ -609,7 +609,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_1bpp_update_row )
{
uint8_t const *const videoram = m_videoram.get();
rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
uint8_t const fg = m_cga_color_select & 0x0f;
if (y == 0) logerror("cga_gfx_1bpp_update_row\n");
diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp
index ff30f3690ad..52a0407f065 100644
--- a/src/devices/bus/isa/cga.cpp
+++ b/src/devices/bus/isa/cga.cpp
@@ -469,47 +469,43 @@ isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &m
template<bool blink, bool si, bool comp, bool alt, int width>
MC6845_UPDATE_ROW( isa8_cga_device::cga_text )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- if ( y == 0 ) CGA_LOG(1,"cga_text_8",("\n"));
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"cga_text_8",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x3fff;
- uint8_t chr = videoram[ offset ];
- uint8_t attr = videoram[ offset +1 ];
- uint8_t data = m_chr_gen[ chr * width + ra ];
+ uint16_t const offset = ((ma + i) << 1) & 0x3fff;
+ uint8_t const chr = videoram[offset];
+ uint8_t const attr = videoram[offset +1];
+ uint8_t data = m_chr_gen[chr * width + ra];
uint16_t fg, bg;
- uint8_t xi;
- if ( comp )
+ if (comp)
{
- fg = 0x10 + ( attr & 0x0F );
- bg = alt ? 0 : ( 0x10 + ( ( attr >> 4 ) & 0x07 ) );
+ fg = 0x10 + (attr & 0x0f);
+ bg = alt ? 0 : (0x10 + ((attr >> 4) & 0x07));
}
else
{
fg = attr & 0x0F;
- bg = alt ? 0 : ( ( attr >> 4 ) & ( blink ? 0x07 : 0x0f ) );
+ bg = alt ? 0 : ((attr >> 4) & (blink ? 0x07 : 0x0f));
}
- if ( ( i == cursor_x ) && ( m_framecnt & 0x08 ) )
- data = 0xFF;
- else if ( blink && ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
+ if ((i == cursor_x) && (m_framecnt & 0x08))
+ data = 0xff;
+ else if (blink && (attr & 0x80) && (m_framecnt & 0x10))
{
data = 0x00;
- bg = ( attr >> 4 ) & 0x07;
+ bg = (attr >> 4) & 0x07;
}
- for(xi=0;xi<8;xi++)
+ for (int xi = 0; xi < 8; xi++)
{
- uint8_t pen_data, dot;
-
- dot = (data & (1 << (7-xi)));
- pen_data = dot ? fg : bg;
- if(!si || (pen_data || dot))
+ uint8_t const dot = (data & (1 << (7 - xi)));
+ uint8_t const pen_data = dot ? fg : bg;
+ if (!si || (pen_data || dot))
*p = palette[pen_data];
p++;
}
@@ -521,28 +517,29 @@ MC6845_UPDATE_ROW( isa8_cga_device::cga_text )
MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_4bppl_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- if ( y == 0 ) CGA_LOG(1,"cga_gfx_4bppl_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"cga_gfx_4bppl_update_row",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
- uint8_t data = videoram[ offset ];
+ uint16_t const offset = (((ma + i) << 1) & 0x1fff) | ((y & 1) << 13);
+ uint8_t data;
+
+ data = videoram[offset];
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
- data = videoram[ offset + 1 ];
+ data = videoram[offset + 1];
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
}
}
@@ -580,37 +577,37 @@ static const uint8_t yc_lut[16][8] =
MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_4bpph_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
-
- if ( y == 0 ) CGA_LOG(1,"cga_gfx_4bpph_update_row",("\n"));
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"cga_gfx_4bpph_update_row",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 );
- uint8_t data = videoram[ offset ];
-
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
-
- data = videoram[ offset + 1 ];
-
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data >> 4]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
- *p = palette[data & 0x0F]; p++;
+ uint16_t const offset = (((ma + i) << 1) & 0x1fff) | ((y & 1) << 13);
+ uint8_t data;
+
+ data = videoram[offset];
+
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
+
+ data = videoram[offset + 1];
+
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data >> 4];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
+ *p++ = palette[data & 0x0f];
}
}
@@ -623,28 +620,29 @@ MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_4bpph_update_row )
MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_2bpp_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- int i;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
- if ( y == 0 ) CGA_LOG(1,"cga_gfx_2bpp_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"cga_gfx_2bpp_update_row",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 );
- uint8_t data = videoram[ offset ];
+ uint16_t const offset = (((ma + i) << 1) & 0x1fff) | ((ra & 1) << 13);
+ uint8_t data;
+
+ data = videoram[offset];
- *p = palette[m_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ data & 0x03 ]]; p++;
+ *p++ = palette[m_palette_lut_2bpp[(data >> 6) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[(data >> 4) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[(data >> 2) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[ data & 0x03]];
- data = videoram[ offset+1 ];
+ data = videoram[offset + 1];
- *p = palette[m_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ ( data >> 4 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ ( data >> 2 ) & 0x03 ]]; p++;
- *p = palette[m_palette_lut_2bpp[ data & 0x03 ]]; p++;
+ *p++ = palette[m_palette_lut_2bpp[(data >> 6) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[(data >> 4) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[(data >> 2) & 0x03]];
+ *p++ = palette[m_palette_lut_2bpp[ data & 0x03]];
}
}
@@ -658,37 +656,38 @@ MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_2bpp_update_row )
MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_1bpp_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint8_t fg = m_color_select & 0x0F;
- int i;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint8_t const fg = m_color_select & 0x0f;
- if ( y == 0 ) CGA_LOG(1,"cga_gfx_1bpp_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"cga_gfx_1bpp_update_row",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 );
- uint8_t data = videoram[ offset ];
-
- *p = palette[( data & 0x80 ) ? fg : 0]; p++;
- *p = palette[( data & 0x40 ) ? fg : 0]; p++;
- *p = palette[( data & 0x20 ) ? fg : 0]; p++;
- *p = palette[( data & 0x10 ) ? fg : 0]; p++;
- *p = palette[( data & 0x08 ) ? fg : 0]; p++;
- *p = palette[( data & 0x04 ) ? fg : 0]; p++;
- *p = palette[( data & 0x02 ) ? fg : 0]; p++;
- *p = palette[( data & 0x01 ) ? fg : 0]; p++;
-
- data = videoram[ offset + 1 ];
-
- *p = palette[( data & 0x80 ) ? fg : 0]; p++;
- *p = palette[( data & 0x40 ) ? fg : 0]; p++;
- *p = palette[( data & 0x20 ) ? fg : 0]; p++;
- *p = palette[( data & 0x10 ) ? fg : 0]; p++;
- *p = palette[( data & 0x08 ) ? fg : 0]; p++;
- *p = palette[( data & 0x04 ) ? fg : 0]; p++;
- *p = palette[( data & 0x02 ) ? fg : 0]; p++;
- *p = palette[( data & 0x01 ) ? fg : 0]; p++;
+ uint16_t const offset = (((ma + i) << 1) & 0x1fff) | ((ra & 1) << 13);
+ uint8_t data;
+
+ data = videoram[offset];
+
+ *p++ = palette[(data & 0x80) ? fg : 0];
+ *p++ = palette[(data & 0x40) ? fg : 0];
+ *p++ = palette[(data & 0x20) ? fg : 0];
+ *p++ = palette[(data & 0x10) ? fg : 0];
+ *p++ = palette[(data & 0x08) ? fg : 0];
+ *p++ = palette[(data & 0x04) ? fg : 0];
+ *p++ = palette[(data & 0x02) ? fg : 0];
+ *p++ = palette[(data & 0x01) ? fg : 0];
+
+ data = videoram[offset + 1];
+
+ *p++ = palette[(data & 0x80) ? fg : 0];
+ *p++ = palette[(data & 0x40) ? fg : 0];
+ *p++ = palette[(data & 0x20) ? fg : 0];
+ *p++ = palette[(data & 0x10) ? fg : 0];
+ *p++ = palette[(data & 0x08) ? fg : 0];
+ *p++ = palette[(data & 0x04) ? fg : 0];
+ *p++ = palette[(data & 0x02) ? fg : 0];
+ *p++ = palette[(data & 0x01) ? fg : 0];
}
}
@@ -961,205 +960,200 @@ void isa8_cga_device::io_write(offs_t offset, uint8_t data)
// proc = cga_pgfx_4bpp;
//
-//static inline void pgfx_plot_unit_4bpp(bitmap_ind16 &bitmap,
-// int x, int y, int offs)
-//{
-// int color, values[2];
-// int i;
-//
-// if (cga.plantronics & 0x40)
-// {
-// values[0] = videoram[offs | 0x4000];
-// values[1] = videoram[offs];
-// }
-// else
-// {
-// values[0] = videoram[offs];
-// values[1] = videoram[offs | 0x4000];
-// }
-// for (i=3; i>=0; i--)
-// {
-// color = ((values[0] & 0x3) << 1) |
-// ((values[1] & 2) >> 1) |
-// ((values[1] & 1) << 3);
-// bitmap.pix16(y, x+i) = Machine->pens[color];
-// values[0]>>=2;
-// values[1]>>=2;
-// }
-//}
-//
-//
-//
+#if 0
+static inline void pgfx_plot_unit_4bpp(bitmap_ind16 &bitmap, int x, int y, int offs)
+{
+ int values[2];
+
+ if (cga.plantronics & 0x40)
+ {
+ values[0] = videoram[offs | 0x4000];
+ values[1] = videoram[offs];
+ }
+ else
+ {
+ values[0] = videoram[offs];
+ values[1] = videoram[offs | 0x4000];
+ }
+ for (int i = 3; i >= 0; i--)
+ {
+ int const color =
+ ((values[0] & 0x3) << 1) |
+ ((values[1] & 2) >> 1) |
+ ((values[1] & 1) << 3);
+ bitmap.pix(y, x + i) = Machine->pens[color];
+ values[0] >>= 2;
+ values[1] >>= 2;
+ }
+}
+#endif
+
+
///***************************************************************************
// Draw graphics mode with 640x200 pixels (default) with 2 bits/pixel.
// Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
// Second plane at CGA_base + 0x4000 / 0x6000
-//***************************************************************************/
-//
-//static void cga_pgfx_4bpp(bitmap_ind16 &bitmap, struct mscrtc6845 *crtc)
-//{
-// int i, sx, sy, sh;
-// int offs = mscrtc6845_get_start(crtc)*2;
-// int lines = mscrtc6845_get_char_lines(crtc);
-// int height = mscrtc6845_get_char_height(crtc);
-// int columns = mscrtc6845_get_char_columns(crtc)*2;
-//
-// for (sy=0; sy<lines; sy++,offs=(offs+columns)&0x1fff)
-// {
-// for (sh=0; sh<height; sh++, offs|=0x2000)
-// {
-// // char line 0 used as a12 line in graphic mode
-// if (!(sh & 1))
-// {
-// for (i=offs, sx=0; sx<columns; sx++, i=(i+1)&0x1fff)
-// {
-// pgfx_plot_unit_4bpp(bitmap, sx*4, sy*height+sh, i);
-// }
-// }
-// else
-// {
-// for (i=offs|0x2000, sx=0; sx<columns; sx++, i=((i+1)&0x1fff)|0x2000)
-// {
-// pgfx_plot_unit_4bpp(bitmap, sx*4, sy*height+sh, i);
-// }
-// }
-// }
-// }
-//}
-//
-//
-//
-//static inline void pgfx_plot_unit_2bpp(bitmap_ind16 &bitmap,
-// int x, int y, const uint16_t *palette, int offs)
-//{
-// int i;
-// uint8_t bmap[2], values[2];
-// uint16_t *dest;
-//
-// if (cga.plantronics & 0x40)
-// {
-// values[0] = videoram[offs];
-// values[1] = videoram[offs | 0x4000];
-// }
-// else
-// {
-// values[0] = videoram[offs | 0x4000];
-// values[1] = videoram[offs];
-// }
-// bmap[0] = bmap[1] = 0;
-// for (i=3; i>=0; i--)
-// {
-// bmap[0] = bmap[0] << 1; if (values[0] & 0x80) bmap[0] |= 1;
-// bmap[0] = bmap[0] << 1; if (values[1] & 0x80) bmap[0] |= 1;
-// bmap[1] = bmap[1] << 1; if (values[0] & 0x08) bmap[1] |= 1;
-// bmap[1] = bmap[1] << 1; if (values[1] & 0x08) bmap[1] |= 1;
-// values[0] = values[0] << 1;
-// values[1] = values[1] << 1;
-// }
-//
-// dest = &bitmap.pix16(y, x);
-// *(dest++) = palette[(bmap[0] >> 6) & 0x03];
-// *(dest++) = palette[(bmap[0] >> 4) & 0x03];
-// *(dest++) = palette[(bmap[0] >> 2) & 0x03];
-// *(dest++) = palette[(bmap[0] >> 0) & 0x03];
-// *(dest++) = palette[(bmap[1] >> 6) & 0x03];
-// *(dest++) = palette[(bmap[1] >> 4) & 0x03];
-// *(dest++) = palette[(bmap[1] >> 2) & 0x03];
-// *(dest++) = palette[(bmap[1] >> 0) & 0x03];
-//}
-//
-//
-//
+//****************************************************************************
+
+#if 0
+static void cga_pgfx_4bpp(bitmap_ind16 &bitmap, struct mscrtc6845 *crtc)
+{
+ int offs = mscrtc6845_get_start(crtc) * 2;
+ int const lines = mscrtc6845_get_char_lines(crtc);
+ int const height = mscrtc6845_get_char_height(crtc);
+ int columns = mscrtc6845_get_char_columns(crtc) * 2;
+
+ for (int sy = 0; sy < lines; sy++, offs = (offs + columns) & 0x1fff)
+ {
+ for (int sh = 0; sh < height; sh++, offs |= 0x2000)
+ {
+ // char line 0 used as a12 line in graphic mode
+ if (!(sh & 1))
+ {
+ for (int i = offs, sx = 0; sx < columns; sx++, i = (i + 1) & 0x1fff)
+ {
+ pgfx_plot_unit_4bpp(bitmap, sx * 4, sy * height + sh, i);
+ }
+ }
+ else
+ {
+ for (int i = offs | 0x2000, sx = 0; sx < columns; sx++, i = ((i + 1) & 0x1fff) | 0x2000)
+ {
+ pgfx_plot_unit_4bpp(bitmap, sx * 4, sy * height + sh, i);
+ }
+ }
+ }
+ }
+}
+#endif
+
+
+#if 0
+static inline void pgfx_plot_unit_2bpp(bitmap_ind16 &bitmap, int x, int y, const uint16_t *palette, int offs)
+{
+ uint8_t values[2];
+ if (cga.plantronics & 0x40)
+ {
+ values[0] = videoram[offs];
+ values[1] = videoram[offs | 0x4000];
+ }
+ else
+ {
+ values[0] = videoram[offs | 0x4000];
+ values[1] = videoram[offs];
+ }
+ uint8_t bmap[2] = { 0, 0 };
+ for (int i = 3; i >= 0; i--)
+ {
+ bmap[0] = (bmap[0] << 1) | BIT(values[0], 7);
+ bmap[0] = (bmap[0] << 1) | BIT(values[1], 7);
+ bmap[1] = (bmap[1] << 1) | BIT(values[0], 3);
+ bmap[1] = (bmap[1] << 1) | BIT(values[1], 3);
+ values[0] <<= 1;
+ values[1] <<= 1;
+ }
+
+ uint16_t *dest = &bitmap.pix(y, x);
+ *dest++ = palette[(bmap[0] >> 6) & 0x03];
+ *dest++ = palette[(bmap[0] >> 4) & 0x03];
+ *dest++ = palette[(bmap[0] >> 2) & 0x03];
+ *dest++ = palette[(bmap[0] >> 0) & 0x03];
+ *dest++ = palette[(bmap[1] >> 6) & 0x03];
+ *dest++ = palette[(bmap[1] >> 4) & 0x03];
+ *dest++ = palette[(bmap[1] >> 2) & 0x03];
+ *dest++ = palette[(bmap[1] >> 0) & 0x03];
+}
+#endif
+
+
///***************************************************************************
// Draw graphics mode with 320x200 pixels (default) with 2 bits/pixel.
// Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
// cga fetches 2 byte per mscrtc6845 access (not modeled here)!
-//***************************************************************************/
-//
-//static void cga_pgfx_2bpp(bitmap_ind16 &bitmap, struct mscrtc6845 *crtc)
-//{
-// int i, sx, sy, sh;
-// int offs = mscrtc6845_get_start(crtc)*2;
-// int lines = mscrtc6845_get_char_lines(crtc);
-// int height = mscrtc6845_get_char_height(crtc);
-// int columns = mscrtc6845_get_char_columns(crtc)*2;
-// int colorset = cga.color_select & 0x3F;
-// const uint16_t *palette;
-//
-// /* Most chipsets use bit 2 of the mode control register to
-// * access a third palette. But not consistently. */
-// pc_cga_check_palette();
-// switch(CGA_CHIPSET)
-// {
-// /* The IBM Professional Graphics Controller behaves like
-// * the PC1512, btw. */
-// case CGA_CHIPSET_PC1512:
-// if ((colorset < 32) && (cga.mode_control & 4)) colorset += 64;
-// break;
-//
-// case CGA_CHIPSET_IBM:
-// case CGA_CHIPSET_PC200:
-// case CGA_CHIPSET_ATI:
-// case CGA_CHIPSET_PARADISE:
-// if (cga.mode_control & 4) colorset = (colorset & 0x1F) + 64;
-// break;
-// }
-//
-//
-// /* The fact that our palette is located in cga_colortable is a vestigial
-// * aspect from when we were doing that ugly trick where drawgfx() would
-// * handle graphics drawing. Truthfully, we should probably be using
-// * palette_set_color_rgb() here and not doing the palette lookup in the loop
-// */
-// palette = &cga_colortable[256*2 + 16*2] + colorset * 4;
-//
-// for (sy=0; sy<lines; sy++,offs=(offs+columns)&0x1fff) {
-//
-// for (sh=0; sh<height; sh++)
-// {
-// if (!(sh&1)) { // char line 0 used as a12 line in graphic mode
-// for (i=offs, sx=0; sx<columns; sx++, i=(i+1)&0x1fff)
-// {
-// pgfx_plot_unit_2bpp(bitmap, sx*8, sy*height+sh, palette, i);
-// }
-// }
-// else
-// {
-// for (i=offs|0x2000, sx=0; sx<columns; sx++, i=((i+1)&0x1fff)|0x2000)
-// {
-// pgfx_plot_unit_2bpp(bitmap, sx*8, sy*height+sh, palette, i);
-// }
-// }
-// }
-// }
-//}
+//****************************************************************************
+
+#if 0
+static void cga_pgfx_2bpp(bitmap_ind16 &bitmap, struct mscrtc6845 *crtc)
+{
+ int offs = mscrtc6845_get_start(crtc) * 2;
+ int const lines = mscrtc6845_get_char_lines(crtc);
+ int const height = mscrtc6845_get_char_height(crtc);
+ int const columns = mscrtc6845_get_char_columns(crtc) * 2;
+
+ /* Most chipsets use bit 2 of the mode control register to access a third palette. But not consistently. */
+ int colorset = cga.color_select & 0x3f;
+ pc_cga_check_palette();
+ switch (CGA_CHIPSET)
+ {
+ /* The IBM Professional Graphics Controller behaves like the PC1512, btw. */
+ case CGA_CHIPSET_PC1512:
+ if ((colorset < 32) && (cga.mode_control & 4)) colorset += 64;
+ break;
+
+ case CGA_CHIPSET_IBM:
+ case CGA_CHIPSET_PC200:
+ case CGA_CHIPSET_ATI:
+ case CGA_CHIPSET_PARADISE:
+ if (cga.mode_control & 4) colorset = (colorset & 0x1f) + 64;
+ break;
+ }
+
+ /* The fact that our palette is located in cga_colortable is a vestigial
+ * aspect from when we were doing that ugly trick where drawgfx() would
+ * handle graphics drawing. Truthfully, we should probably be using
+ * palette_set_color_rgb() here and not doing the palette lookup in the loop
+ */
+ uint16_t const *const palette = &cga_colortable[256*2 + 16*2] + colorset * 4;
+
+ for (int sy = 0; sy < lines; sy++, offs = (offs + columns) & 0x1fff)
+ {
+
+ for (int sh = 0; sh < height; sh++)
+ {
+ if (!(sh & 1)) // char line 0 used as a12 line in graphic mode
+ {
+ for (int i = offs, sx = 0; sx < columns; sx++, i = (i + 1) & 0x1fff)
+ {
+ pgfx_plot_unit_2bpp(bitmap, sx * 8, sy * height + sh, palette, i);
+ }
+ }
+ else
+ {
+ for (int i = offs | 0x2000, sx = 0; sx < columns; sx++, i= ((i + 1) & 0x1fff) | 0x2000)
+ {
+ pgfx_plot_unit_2bpp(bitmap, sx * 8, sy * height + sh, palette, i);
+ }
+ }
+ }
+ }
+}
+#endif
MC6845_UPDATE_ROW( isa8_cga_pc1512_device::pc1512_gfx_4bpp_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint16_t offset_base = ra << 13;
- int j;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint16_t const offset_base = ra << 13;
- if ( y == 0 ) CGA_LOG(1,"pc1512_gfx_4bpp_update_row",("\n"));
- for ( j = 0; j < x_count; j++ )
+ if (y == 0) CGA_LOG(1,"pc1512_gfx_4bpp_update_row",("\n"));
+ for (int j = 0; j < x_count; j++)
{
- uint16_t offset = offset_base | ( ( ma + j ) & 0x1FFF );
- uint16_t i = ( m_color_select & 8 ) ? videoram[ isa8_cga_pc1512_device::vram_offset[3] | offset ] << 3 : 0;
- uint16_t r = ( m_color_select & 4 ) ? videoram[ isa8_cga_pc1512_device::vram_offset[2] | offset ] << 2 : 0;
- uint16_t g = ( m_color_select & 2 ) ? videoram[ isa8_cga_pc1512_device::vram_offset[1] | offset ] << 1 : 0;
- uint16_t b = ( m_color_select & 1 ) ? videoram[ isa8_cga_pc1512_device::vram_offset[0] | offset ] : 0;
-
- *p = palette[( ( i & 0x400 ) | ( r & 0x200 ) | ( g & 0x100 ) | ( b & 0x80 ) ) >> 7]; p++;
- *p = palette[( ( i & 0x200 ) | ( r & 0x100 ) | ( g & 0x080 ) | ( b & 0x40 ) ) >> 6]; p++;
- *p = palette[( ( i & 0x100 ) | ( r & 0x080 ) | ( g & 0x040 ) | ( b & 0x20 ) ) >> 5]; p++;
- *p = palette[( ( i & 0x080 ) | ( r & 0x040 ) | ( g & 0x020 ) | ( b & 0x10 ) ) >> 4]; p++;
- *p = palette[( ( i & 0x040 ) | ( r & 0x020 ) | ( g & 0x010 ) | ( b & 0x08 ) ) >> 3]; p++;
- *p = palette[( ( i & 0x020 ) | ( r & 0x010 ) | ( g & 0x008 ) | ( b & 0x04 ) ) >> 2]; p++;
- *p = palette[( ( i & 0x010 ) | ( r & 0x008 ) | ( g & 0x004 ) | ( b & 0x02 ) ) >> 1]; p++;
- *p = palette[ ( i & 0x008 ) | ( r & 0x004 ) | ( g & 0x002 ) | ( b & 0x01 ) ]; p++;
+ uint16_t const offset = offset_base | ((ma + j) & 0x1fff);
+ uint16_t const i = (m_color_select & 8) ? videoram[isa8_cga_pc1512_device::vram_offset[3] | offset] << 3 : 0;
+ uint16_t const r = (m_color_select & 4) ? videoram[isa8_cga_pc1512_device::vram_offset[2] | offset] << 2 : 0;
+ uint16_t const g = (m_color_select & 2) ? videoram[isa8_cga_pc1512_device::vram_offset[1] | offset] << 1 : 0;
+ uint16_t const b = (m_color_select & 1) ? videoram[isa8_cga_pc1512_device::vram_offset[0] | offset] : 0;
+
+ *p++ = palette[((i & 0x400) | (r & 0x200) | (g & 0x100) | (b & 0x80) ) >> 7];
+ *p++ = palette[((i & 0x200) | (r & 0x100) | (g & 0x080) | (b & 0x40) ) >> 6];
+ *p++ = palette[((i & 0x100) | (r & 0x080) | (g & 0x040) | (b & 0x20) ) >> 5];
+ *p++ = palette[((i & 0x080) | (r & 0x040) | (g & 0x020) | (b & 0x10) ) >> 4];
+ *p++ = palette[((i & 0x040) | (r & 0x020) | (g & 0x010) | (b & 0x08) ) >> 3];
+ *p++ = palette[((i & 0x020) | (r & 0x010) | (g & 0x008) | (b & 0x04) ) >> 2];
+ *p++ = palette[((i & 0x010) | (r & 0x008) | (g & 0x004) | (b & 0x02) ) >> 1];
+ *p++ = palette[ (i & 0x008) | (r & 0x004) | (g & 0x002) | (b & 0x01) ];
}
}
@@ -1500,31 +1494,38 @@ void isa8_wyse700_device::device_reset()
uint32_t isa8_wyse700_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- if (m_control & 0x08) {
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint8_t fg = m_color_select & 0x0F;
+ if (m_control & 0x08)
+ {
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint8_t const fg = m_color_select & 0x0F;
uint32_t addr = 0;
- for (int y = 0; y < 800; y++) {
- uint8_t *src = &m_vram[addr];
+ for (int y = 0; y < 800; y++)
+ {
+ uint8_t const *src = &m_vram[addr];
- if (y & 1) {
+ if (y & 1)
+ {
src += 0x10000;
addr += 160;
}
- for (int x = 0; x < (1280 / 8); x++) {
+ for (int x = 0; x < (1280 / 8); x++)
+ {
uint8_t val = src[x];
- for (int i = 0; i < 8; i++) {
- bitmap.pix32(y,x*8+i) = (val & 0x80) ? palette[fg] : palette[0x00];
+ for (int i = 0; i < 8; i++)
+ {
+ bitmap.pix(y, x * 8 + i) = (val & 0x80) ? palette[fg] : palette[0x00];
val <<= 1;
}
}
}
- } else {
+ return 0;
+ }
+ else
+ {
return isa8_cga_device::screen_update(screen, bitmap, cliprect);
}
- return 0;
}
@@ -1837,7 +1838,7 @@ uint8_t isa8_cga_m24_device::io_read(offs_t offset)
MC6845_UPDATE_ROW(isa8_cga_m24_device::crtc_update_row)
{
- if(m_mode2 & 1)
+ if (m_mode2 & 1)
{
m24_gfx_1bpp_m24_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp);
return;
@@ -1847,7 +1848,7 @@ MC6845_UPDATE_ROW(isa8_cga_m24_device::crtc_update_row)
return;
y = m_y;
- if(m_y >= bitmap.height())
+ if (m_y >= bitmap.height())
return;
switch (m_update_row_type)
@@ -1885,37 +1886,38 @@ MC6845_UPDATE_ROW(isa8_cga_m24_device::crtc_update_row)
MC6845_UPDATE_ROW( isa8_cga_m24_device::m24_gfx_1bpp_m24_update_row )
{
- uint8_t *videoram = &m_vram[m_start_offset];
- uint32_t *p = &bitmap.pix32(y);
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint8_t fg = m_color_select & 0x0F;
- int i;
+ uint8_t const *const videoram = &m_vram[m_start_offset];
+ uint32_t *p = &bitmap.pix(y);
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint8_t const fg = m_color_select & 0x0f;
- if ( y == 0 ) CGA_LOG(1,"m24_gfx_1bpp_m24_update_row",("\n"));
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) CGA_LOG(1,"m24_gfx_1bpp_m24_update_row",("\n"));
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 3 ) << 13 );
- uint8_t data = videoram[ offset ];
-
- *p = palette[( data & 0x80 ) ? fg : 0]; p++;
- *p = palette[( data & 0x40 ) ? fg : 0]; p++;
- *p = palette[( data & 0x20 ) ? fg : 0]; p++;
- *p = palette[( data & 0x10 ) ? fg : 0]; p++;
- *p = palette[( data & 0x08 ) ? fg : 0]; p++;
- *p = palette[( data & 0x04 ) ? fg : 0]; p++;
- *p = palette[( data & 0x02 ) ? fg : 0]; p++;
- *p = palette[( data & 0x01 ) ? fg : 0]; p++;
-
- data = videoram[ offset + 1 ];
-
- *p = palette[( data & 0x80 ) ? fg : 0]; p++;
- *p = palette[( data & 0x40 ) ? fg : 0]; p++;
- *p = palette[( data & 0x20 ) ? fg : 0]; p++;
- *p = palette[( data & 0x10 ) ? fg : 0]; p++;
- *p = palette[( data & 0x08 ) ? fg : 0]; p++;
- *p = palette[( data & 0x04 ) ? fg : 0]; p++;
- *p = palette[( data & 0x02 ) ? fg : 0]; p++;
- *p = palette[( data & 0x01 ) ? fg : 0]; p++;
+ uint16_t const offset = (((ma + i) << 1 ) & 0x1fff) | ((ra & 3) << 13);
+ uint8_t data;
+
+ data = videoram[offset];
+
+ *p++ = palette[(data & 0x80) ? fg : 0];
+ *p++ = palette[(data & 0x40) ? fg : 0];
+ *p++ = palette[(data & 0x20) ? fg : 0];
+ *p++ = palette[(data & 0x10) ? fg : 0];
+ *p++ = palette[(data & 0x08) ? fg : 0];
+ *p++ = palette[(data & 0x04) ? fg : 0];
+ *p++ = palette[(data & 0x02) ? fg : 0];
+ *p++ = palette[(data & 0x01) ? fg : 0];
+
+ data = videoram[offset + 1];
+
+ *p++ = palette[(data & 0x80) ? fg : 0];
+ *p++ = palette[(data & 0x40) ? fg : 0];
+ *p++ = palette[(data & 0x20) ? fg : 0];
+ *p++ = palette[(data & 0x10) ? fg : 0];
+ *p++ = palette[(data & 0x08) ? fg : 0];
+ *p++ = palette[(data & 0x04) ? fg : 0];
+ *p++ = palette[(data & 0x02) ? fg : 0];
+ *p++ = palette[(data & 0x01) ? fg : 0];
}
}
diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp
index e3d75e4070a..45d169f3dff 100644
--- a/src/devices/bus/isa/ega.cpp
+++ b/src/devices/bus/isa/ega.cpp
@@ -783,7 +783,7 @@ WRITE_LINE_MEMBER( isa8_ega_device::vblank_changed )
CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics )
{
- uint16_t *p = &bitmap.pix16(y);
+ uint16_t *p = &bitmap.pix(y);
LOG("%s: y = %d, x_count = %d, ma = %d, ra = %d\n", FUNCNAME, y, x_count, ma, ra );
@@ -844,12 +844,11 @@ CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_graphics )
CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_text )
{
- uint16_t *p = &bitmap.pix16(y);
- int i;
+ uint16_t *p = &bitmap.pix(y);
LOG("%s: y = %d, x_count = %d, ma = %d, ra = %d\n", FUNCNAME, y, x_count, ma, ra );
- for ( i = 0; i < x_count; i++ )
+ for ( int i = 0; i < x_count; i++ )
{
uint16_t offset = ma + i;
uint8_t chr = m_plane[0][ offset ];
@@ -901,8 +900,6 @@ CRTC_EGA_ROW_UPDATE( isa8_ega_device::pc_ega_text )
void isa8_ega_device::change_mode()
{
- int clock, pixels;
-
m_video_mode = 0;
/* Check for graphics mode */
@@ -938,8 +935,8 @@ void isa8_ega_device::change_mode()
}
/* Check for changes to the crtc input clock and number of pixels per clock */
- clock = ( ( m_misc_output & 0x0c ) ? 16257000 : 14318181 );
- pixels = ( ( m_sequencer.data[0x01] & 0x01 ) ? 8 : 9 );
+ int clock = ( ( m_misc_output & 0x0c ) ? 16257000 : 14318181 );
+ int pixels = ( ( m_sequencer.data[0x01] & 0x01 ) ? 8 : 9 );
if ( m_sequencer.data[0x01] & 0x08 )
{
diff --git a/src/devices/bus/isa/eis_hgb107x.cpp b/src/devices/bus/isa/eis_hgb107x.cpp
index 32aeac02c3e..25b16a38fe3 100644
--- a/src/devices/bus/isa/eis_hgb107x.cpp
+++ b/src/devices/bus/isa/eis_hgb107x.cpp
@@ -420,10 +420,6 @@ inline int isa8_epc_mda_device::get_yres()
MC6845_UPDATE_ROW(isa8_epc_mda_device::crtc_update_row)
{
- uint32_t *p = &bitmap.pix32(y);
- uint16_t chr_base = ra;
- int i;
-
// Get som debug data from a couple of rows now and then
if ( y < (16 * 0 + 0x20) && (m_framecnt & 0xff) == 0 )
{
@@ -436,7 +432,7 @@ MC6845_UPDATE_ROW(isa8_epc_mda_device::crtc_update_row)
{
for (int i = 0; i < get_xres(); i++)
{
- bitmap.pix32(y, i) = rgb_t::black();
+ bitmap.pix(y, i) = rgb_t::black();
}
}
@@ -449,14 +445,17 @@ MC6845_UPDATE_ROW(isa8_epc_mda_device::crtc_update_row)
// Text modes using one of two 9x16 fonts in character rom
else
{
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t chr_base = ra;
+
// Adjust row pointer if in monochrome text mode as we insert two scanlines per row of characters (see below)
if (m_vmode & VM_MONO)
{
- p = &bitmap.pix32((y / 14) * 16 + y % 14);
+ p = &bitmap.pix((y / 14) * 16 + y % 14);
}
// Loop over each character in a row
- for ( i = 0; i < x_count; i++ )
+ for ( int i = 0; i < x_count; i++ )
{
uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
uint8_t chr = m_videoram[ offset ];
@@ -555,14 +554,14 @@ MC6845_UPDATE_ROW(isa8_epc_mda_device::crtc_update_row)
{
if (chr >= 0xb3 && chr <= 0xdf) // Handle the meta graphics characters
{
- bitmap.pix32(row + 1, j + i * 9) = (*m_pal)[( data & (0x80 >> j) ) || (j == 8 && (data & 0x01)) ? fg : bg];
- bitmap.pix32(row + 2, j + i * 9) = (*m_pal)[( data & (0x80 >> j) ) || (j == 8 && (data & 0x01)) ? fg : bg];
+ bitmap.pix(row + 1, j + i * 9) = (*m_pal)[( data & (0x80 >> j) ) || (j == 8 && (data & 0x01)) ? fg : bg];
+ bitmap.pix(row + 2, j + i * 9) = (*m_pal)[( data & (0x80 >> j) ) || (j == 8 && (data & 0x01)) ? fg : bg];
}
else
{
// Handle underline
- bitmap.pix32(row + 1, j + i * 9) =(*m_pal)[( attr & ATTR_FOREG ) == ATTR_ULINE ? fg : bg];
- bitmap.pix32(row + 2, j + i * 9) = (*m_pal)[bg];
+ bitmap.pix(row + 1, j + i * 9) =(*m_pal)[( attr & ATTR_FOREG ) == ATTR_ULINE ? fg : bg];
+ bitmap.pix(row + 2, j + i * 9) = (*m_pal)[bg];
}
}
}
diff --git a/src/devices/bus/isa/ex1280.cpp b/src/devices/bus/isa/ex1280.cpp
index 84c8bb8d269..2d9153616e9 100644
--- a/src/devices/bus/isa/ex1280.cpp
+++ b/src/devices/bus/isa/ex1280.cpp
@@ -144,15 +144,15 @@ void isa16_ex1280_device::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask
TMS340X0_SCANLINE_RGB32_CB_MEMBER(isa16_ex1280_device::scanline_update)
{
- uint16_t *src = &m_vram[params->rowaddr << 8];
- uint32_t *dest = &bitmap.pix32(scanline);
- const pen_t *pens = m_ramdac->pens();
+ uint16_t const *const src = &m_vram[params->rowaddr << 8];
+ uint32_t *const dest = &bitmap.pix(scanline);
+ pen_t const *const pens = m_ramdac->pens();
int coladdr = params->coladdr << 1;
/* copy the non-blanked portions of this scanline */
for (int x = params->heblnk; x < params->hsblnk; x += 4)
{
- uint16_t pixels = src[coladdr++];
+ uint16_t const pixels = src[coladdr++];
dest[x + 0] = pens[pixels & 0x0f];
dest[x + 1] = pens[(pixels >> 4) & 0x0f];
dest[x + 2] = pens[(pixels >> 8) & 0x0f];
diff --git a/src/devices/bus/isa/gus.cpp b/src/devices/bus/isa/gus.cpp
index a1c3f39612e..237211047a2 100644
--- a/src/devices/bus/isa/gus.cpp
+++ b/src/devices/bus/isa/gus.cpp
@@ -243,29 +243,26 @@ void gf1_device::device_timer(emu_timer &timer, device_timer_id id, int param, v
}
}
-void gf1_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void gf1_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- int x,y;
+ int x;
//uint32_t count;
- stream_sample_t* outputl = outputs[0];
- stream_sample_t* outputr = outputs[1];
- memset( outputl, 0x00, samples * sizeof(*outputl) );
- memset( outputr, 0x00, samples * sizeof(*outputr) );
+ auto &outputl = outputs[0];
+ auto &outputr = outputs[1];
+
+ outputl.fill(0);
+ outputr.fill(0);
for(x=0;x<32;x++) // for each voice
{
- stream_sample_t* left = outputl;
- stream_sample_t* right = outputr;
uint16_t vol = (m_volume_table[(m_voice[x].current_vol & 0xfff0) >> 4]);
- for(y=samples-1; y>=0; y--)
+ for (int sampindex = 0; sampindex < outputl.samples(); sampindex++)
{
uint32_t current = m_voice[x].current_addr >> 9;
// TODO: implement proper panning
- (*left) += ((m_voice[x].sample) * (vol/8192.0));
- (*right) += ((m_voice[x].sample) * (vol/8192.0));
- left++;
- right++;
+ outputl.add_int(sampindex, m_voice[x].sample * vol, 32768 * 8192);
+ outputr.add_int(sampindex, m_voice[x].sample * vol, 32768 * 8192);
if((!(m_voice[x].voice_ctrl & 0x40)) && (m_voice[x].current_addr >= m_voice[x].end_addr) && !m_voice[x].rollover && !(m_voice[x].voice_ctrl & 0x01))
{
if(m_voice[x].vol_ramp_ctrl & 0x04)
@@ -403,7 +400,7 @@ void gf1_device::device_start()
m_wave_ram.resize(1024*1024);
memset(&m_wave_ram[0], 0, 1024*1024);
- m_stream = stream_alloc_legacy(0,2,clock() / (14 * 16));
+ m_stream = stream_alloc(0,2,clock() / (14 * 16));
// init timers
m_timer1 = timer_alloc(ADLIB_TIMER1);
diff --git a/src/devices/bus/isa/gus.h b/src/devices/bus/isa/gus.h
index 3f637bee84d..be8dbbdbe2d 100644
--- a/src/devices/bus/isa/gus.h
+++ b/src/devices/bus/isa/gus.h
@@ -123,7 +123,7 @@ public:
// optional information overrides
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
protected:
// voice-specific registers
diff --git a/src/devices/bus/isa/mach32.cpp b/src/devices/bus/isa/mach32.cpp
index 602147aa060..e9f4ad8d197 100644
--- a/src/devices/bus/isa/mach32.cpp
+++ b/src/devices/bus/isa/mach32.cpp
@@ -180,11 +180,8 @@ uint32_t mach32_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
return 0;
uint32_t src = (m_cursor_address & 0x000fffff) << 2;
- uint32_t* dst; // destination pixel
- uint8_t x,y,z;
- uint32_t colour0;
- uint32_t colour1;
+ uint32_t colour0, colour1;
if(depth == 8)
{
colour0 = pen(m_cursor_colour0_b);
@@ -197,18 +194,18 @@ uint32_t mach32_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
}
// draw hardware pointer (64x64 max)
- for(y=0;y<64;y++)
+ for(uint8_t y=0;y<64;y++)
{
- dst = &bitmap.pix32(m_cursor_vertical + y, m_cursor_horizontal);
- for(x=0;x<64;x+=8)
+ uint32_t *dst = &bitmap.pix(m_cursor_vertical + y, m_cursor_horizontal);
+ for(uint8_t x=0;x<64;x+=8)
{
- uint16_t bits = (vga.memory[(src+0) % vga.svga_intf.vram_size] | ((vga.memory[(src+1) % vga.svga_intf.vram_size]) << 8));
+ uint16_t const bits = (vga.memory[(src+0) % vga.svga_intf.vram_size] | ((vga.memory[(src+1) % vga.svga_intf.vram_size]) << 8));
- for(z=0;z<8;z++)
+ for(uint8_t z=0;z<8;z++)
{
if(((z + x) > (m_cursor_offset_horizontal-1)) && (y < (63 - m_cursor_offset_vertical)))
{
- uint8_t val = (bits >> (z*2)) & 0x03;
+ uint8_t const val = (bits >> (z*2)) & 0x03;
switch(val)
{
case 0: // cursor colour 0
diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp
index cf4a6aa3803..ae61e78e116 100644
--- a/src/devices/bus/isa/mda.cpp
+++ b/src/devices/bus/isa/mda.cpp
@@ -225,27 +225,26 @@ void isa8_mda_device::device_reset()
***************************************************************************/
MC6845_UPDATE_ROW( isa8_mda_device::mda_text_inten_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
- int i;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t const chr_base = (ra & 0x08) ? 0x800 | (ra & 0x07) : ra;
- if ( y == 0 ) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- uint8_t chr = m_videoram[ offset ];
- uint8_t attr = m_videoram[ offset + 1 ];
- uint8_t data = m_chr_gen[ chr_base + chr * 8 ];
- uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint16_t const offset = ((ma + i) << 1) & 0x0fff;
+ uint8_t const chr = m_videoram[offset];
+ uint8_t const attr = m_videoram[offset + 1];
+ uint8_t data = m_chr_gen[chr_base + chr * 8];
+ uint8_t fg = (attr & 0x08) ? 3 : 2;
uint8_t bg = 0;
- if ( ( attr & ~0x88 ) == 0 )
+ if ((attr & ~0x88) == 0)
{
data = 0x00;
}
- switch( attr )
+ switch (attr)
{
case 0x70:
bg = 2;
@@ -255,36 +254,36 @@ MC6845_UPDATE_ROW( isa8_mda_device::mda_text_inten_update_row )
bg = 2;
fg = 1;
break;
- case 0xF0:
+ case 0xf0:
bg = 3;
fg = 0;
break;
- case 0xF8:
+ case 0xf8:
bg = 3;
fg = 1;
break;
}
- if ( ( i == cursor_x && ( m_framecnt & 0x08 ) ) || ( attr & 0x07 ) == 0x01 )
+ if ((i == cursor_x && (m_framecnt & 0x08)) || (attr & 0x07) == 0x01)
{
- data = 0xFF;
+ data = 0xff;
}
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- if ( ( chr & 0xE0 ) == 0xC0 )
+ *p++ = palette[(data & 0x80) ? fg : bg];
+ *p++ = palette[(data & 0x40) ? fg : bg];
+ *p++ = palette[(data & 0x20) ? fg : bg];
+ *p++ = palette[(data & 0x10) ? fg : bg];
+ *p++ = palette[(data & 0x08) ? fg : bg];
+ *p++ = palette[(data & 0x04) ? fg : bg];
+ *p++ = palette[(data & 0x02) ? fg : bg];
+ *p++ = palette[(data & 0x01) ? fg : bg];
+ if ((chr & 0xe0) == 0xc0)
{
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
+ *p++ = palette[(data & 0x01) ? fg : bg];
}
else
{
- *p = palette[bg]; p++;
+ *p++ = palette[bg];
}
}
}
@@ -298,75 +297,74 @@ MC6845_UPDATE_ROW( isa8_mda_device::mda_text_inten_update_row )
MC6845_UPDATE_ROW( isa8_mda_device::mda_text_blink_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
- int i;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t const chr_base = (ra & 0x08) ? 0x800 | (ra & 0x07) : ra;
- if ( y == 0 ) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- uint8_t chr = m_videoram[ offset ];
- uint8_t attr = m_videoram[ offset + 1 ];
- uint8_t data = m_chr_gen[ chr_base + chr * 8 ];
- uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint16_t const offset = ((ma + i) << 1) & 0x0fff;
+ uint8_t const chr = m_videoram[offset];
+ uint8_t const attr = m_videoram[offset + 1];
+ uint8_t data = m_chr_gen[chr_base + chr * 8];
+ uint8_t fg = (attr & 0x08) ? 3 : 2;
uint8_t bg = 0;
- if ( ( attr & ~0x88 ) == 0 )
+ if ((attr & ~0x88) == 0)
{
data = 0x00;
}
- switch( attr )
+ switch (attr)
{
case 0x70:
- case 0xF0:
+ case 0xf0:
bg = 2;
fg = 0;
break;
case 0x78:
- case 0xF8:
+ case 0xf8:
bg = 2;
fg = 1;
break;
}
- if ( ( attr & 0x07 ) == 0x01 )
+ if ((attr & 0x07) == 0x01)
{
- data = 0xFF;
+ data = 0xff;
}
- if ( i == cursor_x )
+ if (i == cursor_x)
{
- if ( m_framecnt & 0x08 )
+ if (m_framecnt & 0x08)
{
- data = 0xFF;
+ data = 0xff;
}
}
else
{
- if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
+ if ((attr & 0x80) && (m_framecnt & 0x10))
{
data = 0x00;
}
}
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
- if ( ( chr & 0xE0 ) == 0xC0 )
+ *p++ = palette[(data & 0x80) ? fg : bg];
+ *p++ = palette[(data & 0x40) ? fg : bg];
+ *p++ = palette[(data & 0x20) ? fg : bg];
+ *p++ = palette[(data & 0x10) ? fg : bg];
+ *p++ = palette[(data & 0x08) ? fg : bg];
+ *p++ = palette[(data & 0x04) ? fg : bg];
+ *p++ = palette[(data & 0x02) ? fg : bg];
+ *p++ = palette[(data & 0x01) ? fg : bg];
+ if ((chr & 0xe0) == 0xc0)
{
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
+ *p++ = palette[(data & 0x01) ? fg : bg];
}
else
{
- *p = palette[bg]; p++;
+ *p++ = palette[bg];
}
}
}
@@ -631,34 +629,36 @@ void isa8_hercules_device::device_reset()
MC6845_UPDATE_ROW( isa8_hercules_device::hercules_gfx_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t gfx_base = ( ( m_mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 );
- int i;
- if ( y == 0 ) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
- for ( i = 0; i < x_count; i++ )
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t const gfx_base = ((m_mode_control & 0x80) ? 0x8000 : 0x0000) | ((ra & 0x03) << 13);
+
+ if (y == 0) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
+ for (int i = 0; i < x_count; i++)
{
- uint8_t data = m_videoram[ gfx_base + ( ( ma + i ) << 1 ) ];
-
- *p = palette[( data & 0x80 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x40 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x20 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x10 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x08 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x04 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x02 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x01 ) ? 2 : 0]; p++;
-
- data = m_videoram[ gfx_base + ( ( ma + i ) << 1 ) + 1 ];
-
- *p = palette[( data & 0x80 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x40 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x20 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x10 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x08 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x04 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x02 ) ? 2 : 0]; p++;
- *p = palette[( data & 0x01 ) ? 2 : 0]; p++;
+ uint8_t data;
+
+ data = m_videoram[gfx_base + ((ma + i) << 1)];
+
+ *p++ = palette[(data & 0x80) ? 2 : 0];
+ *p++ = palette[(data & 0x40) ? 2 : 0];
+ *p++ = palette[(data & 0x20) ? 2 : 0];
+ *p++ = palette[(data & 0x10) ? 2 : 0];
+ *p++ = palette[(data & 0x08) ? 2 : 0];
+ *p++ = palette[(data & 0x04) ? 2 : 0];
+ *p++ = palette[(data & 0x02) ? 2 : 0];
+ *p++ = palette[(data & 0x01) ? 2 : 0];
+
+ data = m_videoram[gfx_base + ((ma + i) << 1) + 1];
+
+ *p++ = palette[(data & 0x80) ? 2 : 0];
+ *p++ = palette[(data & 0x40) ? 2 : 0];
+ *p++ = palette[(data & 0x20) ? 2 : 0];
+ *p++ = palette[(data & 0x10) ? 2 : 0];
+ *p++ = palette[(data & 0x08) ? 2 : 0];
+ *p++ = palette[(data & 0x04) ? 2 : 0];
+ *p++ = palette[(data & 0x02) ? 2 : 0];
+ *p++ = palette[(data & 0x01) ? 2 : 0];
}
}
@@ -816,27 +816,26 @@ void isa8_ec1840_0002_device::device_reset()
MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_inten_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t chr_base = ra;
- int i;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t const chr_base = ra;
- if ( y == 0 ) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- uint8_t chr = m_videoram[ offset ];
- uint8_t attr = m_videoram[ offset + 1 ];
- uint8_t data = m_chr_gen[ (chr_base + chr * 16) << 1 ];
- uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint16_t const offset = ((ma + i) << 1) & 0x0fff;
+ uint8_t const chr = m_videoram[offset];
+ uint8_t const attr = m_videoram[offset + 1];
+ uint8_t data = m_chr_gen[(chr_base + chr * 16) << 1];
+ uint8_t fg = (attr & 0x08) ? 3 : 2;
uint8_t bg = 0;
- if ( ( attr & ~0x88 ) == 0 )
+ if ((attr & ~0x88) == 0)
{
data = 0x00;
}
- switch( attr )
+ switch (attr)
{
case 0x70:
bg = 2;
@@ -846,29 +845,29 @@ MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_inten_update_row )
bg = 2;
fg = 1;
break;
- case 0xF0:
+ case 0xf0:
bg = 3;
fg = 0;
break;
- case 0xF8:
+ case 0xf8:
bg = 3;
fg = 1;
break;
}
- if ( ( i == cursor_x && ( m_framecnt & 0x08 ) ) || ( attr & 0x07 ) == 0x01 )
+ if ((i == cursor_x && (m_framecnt & 0x08)) || (attr & 0x07) == 0x01)
{
- data = 0xFF;
+ data = 0xff;
}
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
+ *p++ = palette[(data & 0x80) ? fg : bg];
+ *p++ = palette[(data & 0x40) ? fg : bg];
+ *p++ = palette[(data & 0x20) ? fg : bg];
+ *p++ = palette[(data & 0x10) ? fg : bg];
+ *p++ = palette[(data & 0x08) ? fg : bg];
+ *p++ = palette[(data & 0x04) ? fg : bg];
+ *p++ = palette[(data & 0x02) ? fg : bg];
+ *p++ = palette[(data & 0x01) ? fg : bg];
}
}
@@ -880,68 +879,67 @@ MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_inten_update_row )
MC6845_UPDATE_ROW( isa8_ec1840_0002_device::mda_lowres_text_blink_update_row )
{
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t chr_base = ra;
- int i;
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
+ uint32_t *p = &bitmap.pix(y);
+ uint16_t const chr_base = ra;
- if ( y == 0 ) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
- for ( i = 0; i < x_count; i++ )
+ if (y == 0) LOGROW("%11.6f: %-24s\n", machine().time().as_double(), FUNCNAME);
+ for (int i = 0; i < x_count; i++)
{
- uint16_t offset = ( ( ma + i ) << 1 ) & 0x0FFF;
- uint8_t chr = m_videoram[ offset ];
- uint8_t attr = m_videoram[ offset + 1 ];
- uint8_t data = m_chr_gen[ (chr_base + chr * 16) << 1 ];
- uint8_t fg = ( attr & 0x08 ) ? 3 : 2;
+ uint16_t const offset = ((ma + i) << 1) & 0x0fff;
+ uint8_t const chr = m_videoram[offset];
+ uint8_t const attr = m_videoram[offset + 1];
+ uint8_t data = m_chr_gen[(chr_base + chr * 16) << 1];
+ uint8_t fg = (attr & 0x08) ? 3 : 2;
uint8_t bg = 0;
- if ( ( attr & ~0x88 ) == 0 )
+ if ((attr & ~0x88) == 0)
{
data = 0x00;
}
- switch( attr )
+ switch (attr)
{
case 0x70:
- case 0xF0:
+ case 0xf0:
bg = 2;
fg = 0;
break;
case 0x78:
- case 0xF8:
+ case 0xf8:
bg = 2;
fg = 1;
break;
}
- if ( ( attr & 0x07 ) == 0x01 )
+ if ((attr & 0x07) == 0x01)
{
- data = 0xFF;
+ data = 0xff;
}
- if ( i == cursor_x )
+ if (i == cursor_x)
{
- if ( m_framecnt & 0x08 )
+ if (m_framecnt & 0x08)
{
- data = 0xFF;
+ data = 0xff;
}
}
else
{
- if ( ( attr & 0x80 ) && ( m_framecnt & 0x10 ) )
+ if ((attr & 0x80) && (m_framecnt & 0x10))
{
data = 0x00;
}
}
- *p = palette[( data & 0x80 ) ? fg : bg]; p++;
- *p = palette[( data & 0x40 ) ? fg : bg]; p++;
- *p = palette[( data & 0x20 ) ? fg : bg]; p++;
- *p = palette[( data & 0x10 ) ? fg : bg]; p++;
- *p = palette[( data & 0x08 ) ? fg : bg]; p++;
- *p = palette[( data & 0x04 ) ? fg : bg]; p++;
- *p = palette[( data & 0x02 ) ? fg : bg]; p++;
- *p = palette[( data & 0x01 ) ? fg : bg]; p++;
+ *p++ = palette[(data & 0x80) ? fg : bg];
+ *p++ = palette[(data & 0x40) ? fg : bg];
+ *p++ = palette[(data & 0x20) ? fg : bg];
+ *p++ = palette[(data & 0x10) ? fg : bg];
+ *p++ = palette[(data & 0x08) ? fg : bg];
+ *p++ = palette[(data & 0x04) ? fg : bg];
+ *p++ = palette[(data & 0x02) ? fg : bg];
+ *p++ = palette[(data & 0x01) ? fg : bg];
}
}
diff --git a/src/devices/bus/isa/num9rev.cpp b/src/devices/bus/isa/num9rev.cpp
index 07a35ee073c..632eb8b544b 100644
--- a/src/devices/bus/isa/num9rev.cpp
+++ b/src/devices/bus/isa/num9rev.cpp
@@ -36,7 +36,7 @@ UPD7220_DISPLAY_PIXELS_MEMBER( isa8_number_9_rev_device::hgdc_display_pixels )
color.set_r(pal->entry_color(m_ram[addr] | ((overlay & 0xf) << 8)).r());
color.set_g(pal->entry_color(m_ram[addr + 0x40000] | ((overlay & 0xf0) << 4)).g());
color.set_b(pal->entry_color(m_ram[addr + 0x80000] | (overlay & 0xf00)).b());
- bitmap.pix32(y, x + i) = color;
+ bitmap.pix(y, x + i) = color;
}
}
else
@@ -44,7 +44,7 @@ UPD7220_DISPLAY_PIXELS_MEMBER( isa8_number_9_rev_device::hgdc_display_pixels )
if(((address << 3) + 16) > (1024*1024))
return;
for(int i = 0; i < 16; i++)
- bitmap.pix32(y, x + i) = pal->entry_color(m_ram[(address << 4) + i]);
+ bitmap.pix(y, x + i) = pal->entry_color(m_ram[(address << 4) + i]);
}
}
diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp
index 1366bc92dbc..f204333f9f2 100644
--- a/src/devices/bus/isa/pgc.cpp
+++ b/src/devices/bus/isa/pgc.cpp
@@ -401,14 +401,11 @@ uint8_t isa8_pgc_device::init_r()
uint32_t isa8_pgc_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint16_t *p;
- uint8_t *v;
-
for (int y = 0; y < PGC_DISP_VERT; y++)
{
// XXX address translation happens in hardware
- v = &m_vram[y * 1024];
- p = &bitmap.pix16(y + PGC_VERT_START, PGC_HORZ_START);
+ uint8_t const *v = &m_vram[y * 1024];
+ uint16_t *p = &bitmap.pix(y + PGC_VERT_START, PGC_HORZ_START);
for (int x = 0; x < PGC_DISP_HORZ; x++)
{
diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp
index 0d64df5ba27..5fc2d2d6d19 100644
--- a/src/devices/bus/isa/trident.cpp
+++ b/src/devices/bus/isa/trident.cpp
@@ -212,29 +212,22 @@ void trident_vga_device::device_reset()
uint32_t trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint8_t cur_mode;
-
svga_device::screen_update(screen,bitmap,cliprect);
- cur_mode = pc_vga_choosevideomode();
+ uint8_t const cur_mode = pc_vga_choosevideomode();
// draw hardware graphics cursor
if(tri.cursor_ctrl & 0x80) // if cursor is enabled
{
- uint32_t src;
- uint32_t* dst;
- uint8_t val;
- int x,y;
- uint16_t cx = tri.cursor_x & 0x0fff;
- uint16_t cy = tri.cursor_y & 0x0fff;
- uint32_t bg_col;
- uint32_t fg_col;
- uint8_t cursor_size = (tri.cursor_ctrl & 0x01) ? 64 : 32;
+ uint16_t const cx = tri.cursor_x & 0x0fff;
+ uint16_t const cy = tri.cursor_y & 0x0fff;
+ uint8_t const cursor_size = (tri.cursor_ctrl & 0x01) ? 64 : 32;
if(cur_mode == SCREEN_OFF || cur_mode == TEXT_MODE || cur_mode == MONO_MODE || cur_mode == CGA_MODE || cur_mode == EGA_MODE)
return 0; // cursor only works in VGA or SVGA modes
- src = tri.cursor_loc * 1024; // start address is in units of 1024 bytes
+ uint32_t src = tri.cursor_loc * 1024; // start address is in units of 1024 bytes
+ uint32_t bg_col, fg_col;
if(cur_mode == RGB16_MODE)
{
bg_col = tri.cursor_bg;
@@ -246,11 +239,11 @@ uint32_t trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &
fg_col = pen(tri.cursor_fg & 0xff);
}
- for(y=0;y<cursor_size;y++)
+ for(int y=0;y<cursor_size;y++)
{
uint8_t bitcount = 31;
- dst = &bitmap.pix32(cy + y, cx);
- for(x=0;x<cursor_size;x++)
+ uint32_t *const dst = &bitmap.pix(cy + y, cx);
+ for(int x=0;x<cursor_size;x++)
{
uint32_t bitb = (vga.memory[(src+3) % vga.svga_intf.vram_size]
| ((vga.memory[(src+2) % vga.svga_intf.vram_size]) << 8)
@@ -260,7 +253,7 @@ uint32_t trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &
| ((vga.memory[(src+6) % vga.svga_intf.vram_size]) << 8)
| ((vga.memory[(src+5) % vga.svga_intf.vram_size]) << 16)
| ((vga.memory[(src+4) % vga.svga_intf.vram_size]) << 24));
- val = (BIT(bita << 1,bitcount+1) << 1 | BIT(bitb,bitcount));
+ uint8_t const val = (BIT(bita << 1,bitcount+1) << 1 | BIT(bitb,bitcount));
if(tri.cursor_ctrl & 0x40)
{ // X11 mode
switch(val)
diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp
index 833d1d3820f..6d9dd93b4ed 100644
--- a/src/devices/bus/macpds/pds_tpdfpd.cpp
+++ b/src/devices/bus/macpds/pds_tpdfpd.cpp
@@ -154,27 +154,23 @@ void macpds_sedisplay_device::device_timer(emu_timer &timer, device_timer_id tid
uint32_t macpds_sedisplay_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
+ uint8_t const *const vram = m_vram.get();
- vram = m_vram.get();
-
- for (y = 0; y < 870; y++)
+ for (int y = 0; y < 870; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * (1024/8)) + (x^1)];
-
- *scanline++ = m_palette[((pixels>>7)&0x1)^1];
- *scanline++ = m_palette[((pixels>>6)&0x1)^1];
- *scanline++ = m_palette[((pixels>>5)&0x1)^1];
- *scanline++ = m_palette[((pixels>>4)&0x1)^1];
- *scanline++ = m_palette[((pixels>>3)&0x1)^1];
- *scanline++ = m_palette[((pixels>>2)&0x1)^1];
- *scanline++ = m_palette[((pixels>>1)&0x1)^1];
- *scanline++ = m_palette[(pixels&1)^1];
+ uint8_t const pixels = vram[(y * (1024/8)) + (x^1)];
+
+ *scanline++ = m_palette[BIT(~pixels, 7)];
+ *scanline++ = m_palette[BIT(~pixels, 6)];
+ *scanline++ = m_palette[BIT(~pixels, 5)];
+ *scanline++ = m_palette[BIT(~pixels, 4)];
+ *scanline++ = m_palette[BIT(~pixels, 3)];
+ *scanline++ = m_palette[BIT(~pixels, 2)];
+ *scanline++ = m_palette[BIT(~pixels, 1)];
+ *scanline++ = m_palette[BIT(~pixels, 0)];
}
}
diff --git a/src/devices/bus/mtx/sdx.cpp b/src/devices/bus/mtx/sdx.cpp
index e413e997f5b..09e7199ac53 100644
--- a/src/devices/bus/mtx/sdx.cpp
+++ b/src/devices/bus/mtx/sdx.cpp
@@ -417,7 +417,7 @@ MC6845_UPDATE_ROW(mtx_sdxcpm_device::crtc_update_row)
int color = BIT(data, 7) ? fg : bg;
- bitmap.pix32(y, x) = pen[de ? color : 0];
+ bitmap.pix(y, x) = pen[de ? color : 0];
data <<= 1;
}
diff --git a/src/devices/bus/nasbus/avc.cpp b/src/devices/bus/nasbus/avc.cpp
index f7bc8e95596..f4590b2ac3f 100644
--- a/src/devices/bus/nasbus/avc.cpp
+++ b/src/devices/bus/nasbus/avc.cpp
@@ -120,7 +120,7 @@ MC6845_UPDATE_ROW( nascom_avc_device::crtc_update_row )
}
// plot the pixel
- bitmap.pix32(y, x) = m_palette->pen_color((b << 2) | (g << 1) | (r << 0));
+ bitmap.pix(y, x) = m_palette->pen_color((b << 2) | (g << 1) | (r << 0));
}
}
diff --git a/src/devices/bus/nubus/laserview.cpp b/src/devices/bus/nubus/laserview.cpp
index 2c58b6e8dc3..7e802b58988 100644
--- a/src/devices/bus/nubus/laserview.cpp
+++ b/src/devices/bus/nubus/laserview.cpp
@@ -117,30 +117,26 @@ void nubus_laserview_device::device_reset()
uint32_t nubus_laserview_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels;
-
if (!m_vbl_disable)
{
raise_slot_irq();
}
- for (y = 0; y < 600; y++)
+ for (int y = 0; y < 600; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 832/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 832/8; x++)
{
- pixels = m_vram[(y * 104) + (BYTE4_XOR_BE(x)) + 0x20];
-
- *scanline++ = m_palette[(pixels>>7)&1];
- *scanline++ = m_palette[(pixels>>6)&1];
- *scanline++ = m_palette[(pixels>>5)&1];
- *scanline++ = m_palette[(pixels>>4)&1];
- *scanline++ = m_palette[(pixels>>3)&1];
- *scanline++ = m_palette[(pixels>>2)&1];
- *scanline++ = m_palette[(pixels>>1)&1];
- *scanline++ = m_palette[(pixels&1)];
+ uint8_t const pixels = m_vram[(y * 104) + (BYTE4_XOR_BE(x)) + 0x20];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp
index 9105414f3e0..b9b831c6de2 100644
--- a/src/devices/bus/nubus/nubus_48gc.cpp
+++ b/src/devices/bus/nubus/nubus_48gc.cpp
@@ -12,6 +12,9 @@
#include "nubus_48gc.h"
#include "screen.h"
+#include <algorithm>
+
+
#define VRAM_SIZE (0x200000) // 2 megs, maxed out
#define GC48_SCREEN_NAME "48gc_screen"
@@ -152,10 +155,7 @@ void jmfb_device::device_timer(emu_timer &timer, device_timer_id tid, int param,
uint32_t jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline, *base;
- int x, y;
- uint8_t *vram8 = &m_vram[0];
- uint8_t pixels;
+ uint8_t const *const vram8 = &m_vram[0xa00];
// first time? kick off the VBL timer
if (!m_screen)
@@ -164,37 +164,35 @@ uint32_t jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
- vram8 += 0xa00;
-
switch (m_mode)
{
case 0: // 1bpp
- for (y = 0; y < m_yres; y++)
+ for (int y = 0; y < m_yres; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < m_xres/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < m_xres/8; x++)
{
- pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[(pixels>>7)&1];
- *scanline++ = m_palette[(pixels>>6)&1];
- *scanline++ = m_palette[(pixels>>5)&1];
- *scanline++ = m_palette[(pixels>>4)&1];
- *scanline++ = m_palette[(pixels>>3)&1];
- *scanline++ = m_palette[(pixels>>2)&1];
- *scanline++ = m_palette[(pixels>>1)&1];
- *scanline++ = m_palette[pixels&1];
+ uint8_t const pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
break;
case 1: // 2bpp
- for (y = 0; y < m_yres; y++)
+ for (int y = 0; y < m_yres; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < m_xres/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < m_xres/4; x++)
{
- pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels>>6)&0x3];
*scanline++ = m_palette[(pixels>>4)&0x3];
@@ -205,13 +203,12 @@ uint32_t jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
break;
case 2: // 4 bpp
- for (y = 0; y < m_yres; y++)
+ for (int y = 0; y < m_yres; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < m_xres/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < m_xres/2; x++)
{
- pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels>>4)&0xf];
*scanline++ = m_palette[pixels&0xf];
@@ -220,27 +217,22 @@ uint32_t jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
break;
case 3: // 8 bpp
- for (y = 0; y < m_yres; y++)
+ for (int y = 0; y < m_yres; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < m_xres; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < m_xres; x++)
{
- pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
break;
case 4: // 24 bpp
- for (y = 0; y < m_yres; y++)
+ for (int y = 0; y < m_yres; y++)
{
- scanline = &bitmap.pix32(y);
- base = (uint32_t *)&m_vram[y * m_stride];
- for (x = 0; x < m_xres; x++)
- {
- *scanline++ = *base++;
- }
+ uint32_t const *base = (uint32_t *)&m_vram[y * m_stride];
+ std::copy_n(base, m_xres, &bitmap.pix(y));
}
break;
}
diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp
index db964ec2055..db1fd821a11 100644
--- a/src/devices/bus/nubus/nubus_cb264.cpp
+++ b/src/devices/bus/nubus/nubus_cb264.cpp
@@ -17,6 +17,9 @@
#include "nubus_cb264.h"
#include "screen.h"
+#include <algorithm>
+
+
#define CB264_SCREEN_NAME "cb264_screen"
#define CB264_ROM_REGION "cb264_rom"
@@ -122,10 +125,6 @@ void nubus_cb264_device::device_reset()
uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline, *base;
- int x, y;
- uint8_t pixels;
-
if (!m_cb264_vbl_disable)
{
raise_slot_irq();
@@ -134,12 +133,12 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &
switch (m_cb264_mode)
{
case 0: // 1 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0x80];
*scanline++ = m_palette[(pixels<<1)&0x80];
@@ -154,12 +153,12 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &
break;
case 1: // 2 bpp (3f/7f/bf/ff)
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0xc0];
*scanline++ = m_palette[(pixels<<2)&0xc0];
@@ -170,13 +169,12 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0xf0];
*scanline++ = m_palette[(pixels<<4)&0xf0];
@@ -185,13 +183,12 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
@@ -200,16 +197,11 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &
case 4: // 24 bpp
case 7: // ???
{
- uint32_t *vram32 = (uint32_t *)&m_vram[0];
+ uint32_t const *const vram32 = (uint32_t *)&m_vram[0];
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- base = &vram32[y * 1024];
- for (x = 0; x < 640; x++)
- {
- *scanline++ = *base++;
- }
+ std::copy_n(&vram32[y * 1024], 640, &bitmap.pix(y));
}
}
break;
diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp
index 851537685d2..e913c0cb0cb 100644
--- a/src/devices/bus/nubus/nubus_m2hires.cpp
+++ b/src/devices/bus/nubus/nubus_m2hires.cpp
@@ -137,41 +137,37 @@ void nubus_m2hires_device::device_timer(emu_timer &timer, device_timer_id tid, i
uint32_t nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[0x20];
+ uint8_t const *const vram = &m_vram[0x20];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[((pixels>>7)&0x1)];
- *scanline++ = m_palette[((pixels>>6)&0x1)];
- *scanline++ = m_palette[((pixels>>5)&0x1)];
- *scanline++ = m_palette[((pixels>>4)&0x1)];
- *scanline++ = m_palette[((pixels>>3)&0x1)];
- *scanline++ = m_palette[((pixels>>2)&0x1)];
- *scanline++ = m_palette[((pixels>>1)&0x1)];
- *scanline++ = m_palette[(pixels&1)];
+ uint8_t const pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels>>6)&3)];
*scanline++ = m_palette[((pixels>>4)&3)];
@@ -182,13 +178,13 @@ uint32_t nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
- for (x = 0; x < 640/2; x++)
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels&0xf0)>>4)];
*scanline++ = m_palette[(pixels&0xf)];
@@ -197,13 +193,13 @@ uint32_t nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
- for (x = 0; x < 640; x++)
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp
index f557d7631b0..60728d7dd15 100644
--- a/src/devices/bus/nubus/nubus_m2video.cpp
+++ b/src/devices/bus/nubus/nubus_m2video.cpp
@@ -139,21 +139,17 @@ void nubus_m2video_device::device_timer(emu_timer &timer, device_timer_id tid, i
uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[0x20];
+ uint8_t const *const vram = &m_vram[0x20];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0x80)];
*scanline++ = m_palette[((pixels<<1)&0x80)];
@@ -168,12 +164,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xc0)];
*scanline++ = m_palette[((pixels<<2)&0xc0)];
@@ -184,13 +180,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xf0)];
*scanline++ = m_palette[((pixels&0x0f)<<4)];
@@ -199,13 +194,12 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp
index f6d152be059..89518f0d223 100644
--- a/src/devices/bus/nubus/nubus_radiustpd.cpp
+++ b/src/devices/bus/nubus/nubus_radiustpd.cpp
@@ -139,27 +139,23 @@ void nubus_radiustpd_device::device_timer(emu_timer &timer, device_timer_id tid,
uint32_t nubus_radiustpd_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
+ uint8_t const *const vram = &m_vram[0x200];
- vram = &m_vram[0x200];
-
- for (y = 0; y < 880; y++)
+ for (int y = 0; y < 880; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1152/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1152/8; x++)
{
- pixels = vram[(y * (1152/8)) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[((pixels>>7)&0x1)];
- *scanline++ = m_palette[((pixels>>6)&0x1)];
- *scanline++ = m_palette[((pixels>>5)&0x1)];
- *scanline++ = m_palette[((pixels>>4)&0x1)];
- *scanline++ = m_palette[((pixels>>3)&0x1)];
- *scanline++ = m_palette[((pixels>>2)&0x1)];
- *scanline++ = m_palette[((pixels>>1)&0x1)];
- *scanline++ = m_palette[(pixels&1)];
+ uint8_t const pixels = vram[(y * (1152/8)) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp
index b7a29b6f537..6ca1f9f4489 100644
--- a/src/devices/bus/nubus/nubus_spec8.cpp
+++ b/src/devices/bus/nubus/nubus_spec8.cpp
@@ -144,21 +144,17 @@ void nubus_spec8s3_device::device_timer(emu_timer &timer, device_timer_id tid, i
uint32_t nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[0x400];
+ uint8_t const *const vram = &m_vram[0x400];
switch (m_mode)
{
case 0: // 1 bpp
- for (y = 0; y < 768; y++)
+ for (int y = 0; y < 768; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1024/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1024/8; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0x80];
*scanline++ = m_palette[(pixels<<1)&0x80];
@@ -173,12 +169,12 @@ uint32_t nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 1: // 2 bpp
- for (y = 0; y < 768; y++)
+ for (int y = 0; y < 768; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1024/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1024/4; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0xc0];
*scanline++ = m_palette[(pixels<<2)&0xc0];
@@ -189,13 +185,12 @@ uint32_t nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 2: // 4 bpp
- for (y = 0; y < 768; y++)
+ for (int y = 0; y < 768; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 1024/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1024/2; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels&0xf0];
*scanline++ = m_palette[(pixels<<4)&0xf0];
@@ -204,13 +199,12 @@ uint32_t nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 3: // 8 bpp
- for (y = 0; y < 768; y++)
+ for (int y = 0; y < 768; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 1024; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1024; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp
index 891defaa336..c00938c6102 100644
--- a/src/devices/bus/nubus/nubus_specpdq.cpp
+++ b/src/devices/bus/nubus/nubus_specpdq.cpp
@@ -157,22 +157,18 @@ void nubus_specpdq_device::device_timer(emu_timer &timer, device_timer_id tid, i
uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
// first time? kick off the VBL timer
- vram = &m_vram[0x9000];
+ uint8_t const *const vram = &m_vram[0x9000];
switch (m_mode)
{
case 0: // 1 bpp
- for (y = 0; y < 844; y++)
+ for (int y = 0; y < 844; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1152/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1152/8; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette_val[(pixels&0x80)];
*scanline++ = m_palette_val[((pixels<<1)&0x80)];
@@ -187,12 +183,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 1: // 2 bpp
- for (y = 0; y < 844; y++)
+ for (int y = 0; y < 844; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1152/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1152/4; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette_val[(pixels&0xc0)];
*scanline++ = m_palette_val[((pixels<<2)&0xc0)];
@@ -203,13 +199,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 2: // 4 bpp
- for (y = 0; y < 844; y++)
+ for (int y = 0; y < 844; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 1152/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1152/2; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette_val[(pixels&0xf0)];
*scanline++ = m_palette_val[((pixels<<4)&0xf0)];
@@ -218,13 +213,12 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32
break;
case 3: // 8 bpp
- for (y = 0; y < 844; y++)
+ for (int y = 0; y < 844; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 1152; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1152; x++)
{
- pixels = vram[(y * 1152) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1152) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette_val[pixels];
}
}
diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp
index 1c25795cd45..18c94f9ba5b 100644
--- a/src/devices/bus/nubus/nubus_vikbw.cpp
+++ b/src/devices/bus/nubus/nubus_vikbw.cpp
@@ -117,30 +117,26 @@ void nubus_vikbw_device::device_reset()
uint32_t nubus_vikbw_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels;
-
if (!m_vbl_disable)
{
raise_slot_irq();
}
- for (y = 0; y < 768; y++)
+ for (int y = 0; y < 768; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 1024/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 1024/8; x++)
{
- pixels = m_vram[(y * 128) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[(pixels>>7)&1];
- *scanline++ = m_palette[(pixels>>6)&1];
- *scanline++ = m_palette[(pixels>>5)&1];
- *scanline++ = m_palette[(pixels>>4)&1];
- *scanline++ = m_palette[(pixels>>3)&1];
- *scanline++ = m_palette[(pixels>>2)&1];
- *scanline++ = m_palette[(pixels>>1)&1];
- *scanline++ = m_palette[(pixels&1)];
+ uint8_t const pixels = m_vram[(y * 128) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp
index 2f56488bf48..9894e0d7906 100644
--- a/src/devices/bus/nubus/nubus_wsportrait.cpp
+++ b/src/devices/bus/nubus/nubus_wsportrait.cpp
@@ -137,42 +137,38 @@ void nubus_wsportrait_device::device_timer(emu_timer &timer, device_timer_id tid
uint32_t nubus_wsportrait_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
// first time? kick off the VBL timer
- vram = &m_vram[0x80];
+ uint8_t const *const vram = &m_vram[0x80];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 870; y++)
+ for (int y = 0; y < 870; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[((pixels>>7)&0x1)];
- *scanline++ = m_palette[((pixels>>6)&0x1)];
- *scanline++ = m_palette[((pixels>>5)&0x1)];
- *scanline++ = m_palette[((pixels>>4)&0x1)];
- *scanline++ = m_palette[((pixels>>3)&0x1)];
- *scanline++ = m_palette[((pixels>>2)&0x1)];
- *scanline++ = m_palette[((pixels>>1)&0x1)];
- *scanline++ = m_palette[(pixels&1)];
+ uint8_t const pixels = vram[(y * 128) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 256) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels>>6)&3)];
*scanline++ = m_palette[((pixels>>4)&3)];
@@ -183,13 +179,12 @@ uint32_t nubus_wsportrait_device::screen_update(screen_device &screen, bitmap_rg
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 512) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels&0xf0)>>4)];
*scanline++ = m_palette[(pixels&0xf)];
diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp
index 2fe4687fc44..dde2348abc6 100644
--- a/src/devices/bus/nubus/pds30_30hr.cpp
+++ b/src/devices/bus/nubus/pds30_30hr.cpp
@@ -139,41 +139,37 @@ void nubus_xceed30hr_device::device_timer(emu_timer &timer, device_timer_id tid,
uint32_t nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[1024];
+ uint8_t const *const vram = &m_vram[1024];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[(pixels>>7)&1];
- *scanline++ = m_palette[(pixels>>6)&1];
- *scanline++ = m_palette[(pixels>>5)&1];
- *scanline++ = m_palette[(pixels>>4)&1];
- *scanline++ = m_palette[(pixels>>3)&1];
- *scanline++ = m_palette[(pixels>>2)&1];
- *scanline++ = m_palette[(pixels>>1)&1];
- *scanline++ = m_palette[pixels&1];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels>>6)&3)];
*scanline++ = m_palette[((pixels>>4)&3)];
@@ -184,13 +180,12 @@ uint32_t nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels>>4)];
*scanline++ = m_palette[(pixels&0xf)];
@@ -199,13 +194,12 @@ uint32_t nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp
index aa0ca1df648..388aa5f54d5 100644
--- a/src/devices/bus/nubus/pds30_cb264.cpp
+++ b/src/devices/bus/nubus/pds30_cb264.cpp
@@ -10,6 +10,9 @@
#include "pds30_cb264.h"
#include "screen.h"
+#include <algorithm>
+
+
#define CB264SE30_SCREEN_NAME "cb264_screen"
#define CB264SE30_ROM_REGION "cb264_rom"
@@ -133,21 +136,17 @@ void nubus_cb264se30_device::device_timer(emu_timer &timer, device_timer_id tid,
uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[8*1024];
+ uint8_t const *const vram = &m_vram[8*1024];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0x80)];
*scanline++ = m_palette[((pixels<<1)&0x80)];
@@ -162,12 +161,12 @@ uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xc0)];
*scanline++ = m_palette[((pixels<<2)&0xc0)];
@@ -178,13 +177,12 @@ uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xf0)];
*scanline++ = m_palette[((pixels&0x0f)<<4)];
@@ -193,13 +191,12 @@ uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
@@ -207,17 +204,11 @@ uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb
case 4: // 24 bpp
{
- uint32_t *vram32 = (uint32_t *)&m_vram[0];
- uint32_t *base;
+ uint32_t const *const vram32 = (uint32_t *)&m_vram[0];
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- base = &vram32[y * 1024];
- for (x = 0; x < 640; x++)
- {
- *scanline++ = *base++;
- }
+ std::copy_n(&vram32[y * 1024], 640, &bitmap.pix(y));
}
}
break;
diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp
index 20969a5a6b7..87992723319 100644
--- a/src/devices/bus/nubus/pds30_mc30.cpp
+++ b/src/devices/bus/nubus/pds30_mc30.cpp
@@ -13,6 +13,9 @@
#include "pds30_mc30.h"
#include "screen.h"
+#include <algorithm>
+
+
#define XCEEDMC30_SCREEN_NAME "x30hr_screen"
#define XCEEDMC30_ROM_REGION "x30hr_rom"
@@ -135,41 +138,37 @@ void nubus_xceedmc30_device::device_timer(emu_timer &timer, device_timer_id tid,
uint32_t nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[4*1024];
+ uint8_t const *const vram = &m_vram[4*1024];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
-
- *scanline++ = m_palette[(pixels>>7)&1];
- *scanline++ = m_palette[(pixels>>6)&1];
- *scanline++ = m_palette[(pixels>>5)&1];
- *scanline++ = m_palette[(pixels>>4)&1];
- *scanline++ = m_palette[(pixels>>3)&1];
- *scanline++ = m_palette[(pixels>>2)&1];
- *scanline++ = m_palette[(pixels>>1)&1];
- *scanline++ = m_palette[pixels&1];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+
+ *scanline++ = m_palette[BIT(pixels, 7)];
+ *scanline++ = m_palette[BIT(pixels, 6)];
+ *scanline++ = m_palette[BIT(pixels, 5)];
+ *scanline++ = m_palette[BIT(pixels, 4)];
+ *scanline++ = m_palette[BIT(pixels, 3)];
+ *scanline++ = m_palette[BIT(pixels, 2)];
+ *scanline++ = m_palette[BIT(pixels, 1)];
+ *scanline++ = m_palette[BIT(pixels, 0)];
}
}
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[((pixels>>6)&3)];
*scanline++ = m_palette[((pixels>>4)&3)];
@@ -180,13 +179,13 @@ uint32_t nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
- for (x = 0; x < 640/2; x++)
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels>>4)];
*scanline++ = m_palette[(pixels&0xf)];
@@ -195,13 +194,13 @@ uint32_t nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
- for (x = 0; x < 640; x++)
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 1024) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
@@ -209,17 +208,11 @@ uint32_t nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb
case 4: // 24 bpp
{
- uint32_t *vram32 = (uint32_t *)vram;
- uint32_t *base;
+ uint32_t const *const vram32 = (uint32_t *)vram;
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- base = &vram32[y * 1024];
- for (x = 0; x < 640; x++)
- {
- *scanline++ = *base++;
- }
+ std::copy_n(&vram32[y * 1024], 640, &bitmap.pix(y));
}
}
break;
diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp
index b251a57c33c..83fd8512704 100644
--- a/src/devices/bus/nubus/pds30_procolor816.cpp
+++ b/src/devices/bus/nubus/pds30_procolor816.cpp
@@ -139,21 +139,17 @@ void nubus_procolor816_device::device_timer(emu_timer &timer, device_timer_id ti
uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
-
- vram = &m_vram[4];
+ uint8_t const *const vram = &m_vram[4];
switch (m_mode)
{
case 0: // 1 bpp?
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/8; x++)
{
- pixels = vram[(y * 640/8) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 640/8) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0x80)];
*scanline++ = m_palette[((pixels<<1)&0x80)];
@@ -168,12 +164,12 @@ uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_r
break;
case 1: // 2 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640/4; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/4; x++)
{
- pixels = vram[(y * 640/4) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 640/4) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xc0)];
*scanline++ = m_palette[((pixels<<2)&0xc0)];
@@ -184,13 +180,12 @@ uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_r
break;
case 2: // 4 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640/2; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640/2; x++)
{
- pixels = vram[(y * 640/2) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 640/2) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0xf0)];
*scanline++ = m_palette[((pixels&0x0f)<<4)];
@@ -199,13 +194,12 @@ uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_r
break;
case 3: // 8 bpp
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
-
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram[(y * 640) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * 640) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[pixels];
}
}
@@ -213,16 +207,15 @@ uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_r
case 4: // 15 bpp
{
- uint16_t *vram16 = (uint16_t *)&m_vram[0];
- uint16_t pixels;
+ uint16_t const *const vram16 = (uint16_t *)&m_vram[0];
- for (y = 0; y < 480; y++)
+ for (int y = 0; y < 480; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 640; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 640; x++)
{
- pixels = vram16[(y * 640) + (x^1)];
- *scanline++ = rgb_t(((pixels>>10) & 0x1f)<<3, ((pixels>>5) & 0x1f)<<3, (pixels & 0x1f)<<3);
+ uint16_t const pixels = vram16[(y * 640) + BYTE_XOR_BE(x)];
+ *scanline++ = rgb_t(pal5bit((pixels>>10) & 0x1f), pal5bit((pixels>>5) & 0x1f), pal5bit(pixels & 0x1f));
}
}
}
diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp
index c509b908064..e04e4b2e297 100644
--- a/src/devices/bus/nubus/pds30_sigmalview.cpp
+++ b/src/devices/bus/nubus/pds30_sigmalview.cpp
@@ -132,18 +132,14 @@ void nubus_lview_device::device_timer(emu_timer &timer, device_timer_id tid, int
uint32_t nubus_lview_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels, *vram;
+ uint8_t const *const vram = &m_vram[0x20];
- vram = &m_vram[0x20];
-
- for (y = 0; y < 600; y++)
+ for (int y = 0; y < 600; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 832/8; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 832/8; x++)
{
- pixels = vram[(y * (832/8)) + (BYTE4_XOR_BE(x))];
+ uint8_t const pixels = vram[(y * (832/8)) + (BYTE4_XOR_BE(x))];
*scanline++ = m_palette[(pixels&0x80)];
*scanline++ = m_palette[((pixels<<1)&0x80)];
diff --git a/src/devices/bus/odyssey2/4in1.cpp b/src/devices/bus/odyssey2/4in1.cpp
index f0eefac089b..dfadbf2c1ab 100644
--- a/src/devices/bus/odyssey2/4in1.cpp
+++ b/src/devices/bus/odyssey2/4in1.cpp
@@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_4IN1, o2_4in1_device, "o2_4in1", "Odyssey 2 Videopac 4
// o2_4in1_device - constructor
//-------------------------------------------------
-o2_4in1_device::o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_4in1_device::o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_4IN1, tag, owner, clock),
device_o2_cart_interface(mconfig, *this)
{ }
diff --git a/src/devices/bus/odyssey2/4in1.h b/src/devices/bus/odyssey2/4in1.h
index 09cfa626b38..2840361bfe0 100644
--- a/src/devices/bus/odyssey2/4in1.h
+++ b/src/devices/bus/odyssey2/4in1.h
@@ -21,7 +21,7 @@ class o2_4in1_device : public device_t,
{
public:
// construction/destruction
- o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/chess.cpp b/src/devices/bus/odyssey2/chess.cpp
index f954ca93340..6ff1ff76dd2 100644
--- a/src/devices/bus/odyssey2/chess.cpp
+++ b/src/devices/bus/odyssey2/chess.cpp
@@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_CHESS, o2_chess_device, "o2_chess", "Odyssey 2 Videopa
// o2_chess_device - constructor
//-------------------------------------------------
-o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_CHESS, tag, owner, clock),
device_o2_cart_interface(mconfig, *this),
m_maincpu(*this, "maincpu"),
diff --git a/src/devices/bus/odyssey2/chess.h b/src/devices/bus/odyssey2/chess.h
index d4e861e2a64..0b37c50684c 100644
--- a/src/devices/bus/odyssey2/chess.h
+++ b/src/devices/bus/odyssey2/chess.h
@@ -24,7 +24,7 @@ class o2_chess_device : public device_t,
{
public:
// construction/destruction
- o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/homecomp.cpp b/src/devices/bus/odyssey2/homecomp.cpp
index 352d0f2a452..23c6f6c31f7 100644
--- a/src/devices/bus/odyssey2/homecomp.cpp
+++ b/src/devices/bus/odyssey2/homecomp.cpp
@@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_HOMECOMP, o2_homecomp_device, "o2_homecomp", "Odyssey
// o2_homecomp_device - constructor
//-------------------------------------------------
-o2_homecomp_device::o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_homecomp_device::o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_HOMECOMP, tag, owner, clock),
device_o2_cart_interface(mconfig, *this),
m_maincpu(*this, "maincpu"),
diff --git a/src/devices/bus/odyssey2/homecomp.h b/src/devices/bus/odyssey2/homecomp.h
index f530cd36375..6ecc67f1184 100644
--- a/src/devices/bus/odyssey2/homecomp.h
+++ b/src/devices/bus/odyssey2/homecomp.h
@@ -25,7 +25,7 @@ class o2_homecomp_device : public device_t,
{
public:
// construction/destruction
- o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/ktaa.cpp b/src/devices/bus/odyssey2/ktaa.cpp
index 24d62c81796..4f1fba25153 100644
--- a/src/devices/bus/odyssey2/ktaa.cpp
+++ b/src/devices/bus/odyssey2/ktaa.cpp
@@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_KTAA, o2_ktaa_device, "o2_ktaa", "Odyssey 2 Homebrew K
// o2_ktaa_device - constructor
//-------------------------------------------------
-o2_ktaa_device::o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_ktaa_device::o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_KTAA, tag, owner, clock),
device_o2_cart_interface(mconfig, *this)
{ }
diff --git a/src/devices/bus/odyssey2/ktaa.h b/src/devices/bus/odyssey2/ktaa.h
index e1ac477e445..53ce2296941 100644
--- a/src/devices/bus/odyssey2/ktaa.h
+++ b/src/devices/bus/odyssey2/ktaa.h
@@ -21,7 +21,7 @@ class o2_ktaa_device : public device_t,
{
public:
// construction/destruction
- o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/rally.cpp b/src/devices/bus/odyssey2/rally.cpp
index 7bdec3502b3..42dcdc0b26f 100644
--- a/src/devices/bus/odyssey2/rally.cpp
+++ b/src/devices/bus/odyssey2/rally.cpp
@@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_RALLY, o2_rally_device, "o2_rally", "Odyssey 2 Videopa
// o2_rally_device - constructor
//-------------------------------------------------
-o2_rally_device::o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_rally_device::o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_RALLY, tag, owner, clock),
device_o2_cart_interface(mconfig, *this)
{ }
diff --git a/src/devices/bus/odyssey2/rally.h b/src/devices/bus/odyssey2/rally.h
index 81de2673ae6..8d359362dce 100644
--- a/src/devices/bus/odyssey2/rally.h
+++ b/src/devices/bus/odyssey2/rally.h
@@ -21,7 +21,7 @@ class o2_rally_device : public device_t,
{
public:
// construction/destruction
- o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/rom.cpp b/src/devices/bus/odyssey2/rom.cpp
index f54398914e3..12f8fa9b128 100644
--- a/src/devices/bus/odyssey2/rom.cpp
+++ b/src/devices/bus/odyssey2/rom.cpp
@@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_STD, o2_rom_device, "o2_rom", "Odyssey 2 Standard Cart
// o2_rom_device - constructor
//-------------------------------------------------
-o2_rom_device::o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_rom_device::o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_STD, tag, owner, clock),
device_o2_cart_interface(mconfig, *this)
{ }
diff --git a/src/devices/bus/odyssey2/rom.h b/src/devices/bus/odyssey2/rom.h
index 74e742a38d8..204d96030ce 100644
--- a/src/devices/bus/odyssey2/rom.h
+++ b/src/devices/bus/odyssey2/rom.h
@@ -21,7 +21,7 @@ class o2_rom_device : public device_t,
{
public:
// construction/destruction
- o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp
index 2e020342366..5f0f30e2f35 100644
--- a/src/devices/bus/odyssey2/slot.cpp
+++ b/src/devices/bus/odyssey2/slot.cpp
@@ -50,7 +50,7 @@ device_o2_cart_interface::~device_o2_cart_interface()
//-------------------------------------------------
// o2_cart_slot_device - constructor
//-------------------------------------------------
-o2_cart_slot_device::o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+o2_cart_slot_device::o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, O2_CART_SLOT, tag, owner, clock)
, device_image_interface(mconfig, *this)
, device_single_card_slot_interface<device_o2_cart_interface>(mconfig, *this)
@@ -148,7 +148,7 @@ image_init_result o2_cart_slot_device::call_load()
}
else
{
- uint32_t size = length();
+ u32 size = length();
fread(m_cart->m_rom, size);
m_type = (size == 0x4000) ? O2_RALLY : O2_STD;
@@ -174,7 +174,7 @@ std::string o2_cart_slot_device::get_default_card_software(get_default_card_soft
if (hook.image_file())
{
const char *slot_string;
- uint32_t size = hook.image_file()->size();
+ u32 size = hook.image_file()->size();
int type = (size == 0x4000) ? O2_RALLY : O2_STD;
slot_string = o2_get_slot(type);
@@ -190,7 +190,7 @@ std::string o2_cart_slot_device::get_default_card_software(get_default_card_soft
read_rom**
-------------------------------------------------*/
-uint8_t o2_cart_slot_device::read_rom04(offs_t offset)
+u8 o2_cart_slot_device::read_rom04(offs_t offset)
{
if (m_cart)
return m_cart->read_rom04(offset);
@@ -198,7 +198,7 @@ uint8_t o2_cart_slot_device::read_rom04(offs_t offset)
return 0xff;
}
-uint8_t o2_cart_slot_device::read_rom0c(offs_t offset)
+u8 o2_cart_slot_device::read_rom0c(offs_t offset)
{
if (m_cart)
return m_cart->read_rom0c(offset);
@@ -210,13 +210,13 @@ uint8_t o2_cart_slot_device::read_rom0c(offs_t offset)
io
-------------------------------------------------*/
-void o2_cart_slot_device::io_write(offs_t offset, uint8_t data)
+void o2_cart_slot_device::io_write(offs_t offset, u8 data)
{
if (m_cart)
m_cart->io_write(offset, data);
}
-uint8_t o2_cart_slot_device::io_read(offs_t offset)
+u8 o2_cart_slot_device::io_read(offs_t offset)
{
if (m_cart)
return m_cart->io_read(offset);
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index 0717ce973f2..4c65fafe01e 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -37,30 +37,30 @@ public:
virtual ~device_o2_cart_interface();
// reading and writing
- virtual uint8_t read_rom04(offs_t offset) { return 0xff; }
- virtual uint8_t read_rom0c(offs_t offset) { return 0xff; }
- virtual void write_p1(uint8_t data) { }
- virtual void write_p2(uint8_t data) { }
+ virtual u8 read_rom04(offs_t offset) { return 0xff; }
+ virtual u8 read_rom0c(offs_t offset) { return 0xff; }
+ virtual void write_p1(u8 data) { }
+ virtual void write_p2(u8 data) { }
- virtual void io_write(offs_t offset, uint8_t data) { }
- virtual uint8_t io_read(offs_t offset) { return 0xff; }
+ virtual void io_write(offs_t offset, u8 data) { }
+ virtual u8 io_read(offs_t offset) { return 0xff; }
virtual DECLARE_READ_LINE_MEMBER(t0_read) { return 0; }
virtual int b_read() { return -1; }
virtual void cart_init() { } // called after loading ROM
- uint8_t* get_rom_base() { return m_rom ? &m_rom[0] : nullptr; }
- uint32_t get_rom_size() { return m_rom ? m_rom.bytes() : 0; }
+ u8* get_rom_base() { return m_rom ? &m_rom[0] : nullptr; }
+ u32 get_rom_size() { return m_rom ? m_rom.bytes() : 0; }
- uint8_t* get_voice_base() { return m_voice ? &m_voice[0] : nullptr; }
- uint32_t get_voice_size() { return m_voice ? m_voice.bytes() : 0; }
+ u8* get_voice_base() { return m_voice ? &m_voice[0] : nullptr; }
+ u32 get_voice_size() { return m_voice ? m_voice.bytes() : 0; }
protected:
device_o2_cart_interface(const machine_config &mconfig, device_t &device);
- optional_shared_ptr<uint8_t> m_rom;
- optional_shared_ptr<uint8_t> m_exrom;
- optional_shared_ptr<uint8_t> m_voice;
+ optional_shared_ptr<u8> m_rom;
+ optional_shared_ptr<u8> m_exrom;
+ optional_shared_ptr<u8> m_voice;
};
@@ -82,7 +82,7 @@ public:
set_fixed(false);
}
- o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
virtual ~o2_cart_slot_device();
// image-level overrides
@@ -105,15 +105,15 @@ public:
device_o2_cart_interface* cart() { return m_cart; }
// reading and writing
- uint8_t read_rom04(offs_t offset);
- uint8_t read_rom0c(offs_t offset);
- void io_write(offs_t offset, uint8_t data);
- uint8_t io_read(offs_t offset);
+ u8 read_rom04(offs_t offset);
+ u8 read_rom0c(offs_t offset);
+ void io_write(offs_t offset, u8 data);
+ u8 io_read(offs_t offset);
DECLARE_READ_LINE_MEMBER(t0_read) { if (m_cart) return m_cart->t0_read(); else return 0; }
int b_read();
- void write_p1(uint8_t data) { if (m_cart) m_cart->write_p1(data); }
- void write_p2(uint8_t data) { if (m_cart) m_cart->write_p2(data); }
+ void write_p1(u8 data) { if (m_cart) m_cart->write_p1(data); }
+ void write_p2(u8 data) { if (m_cart) m_cart->write_p2(data); }
protected:
// device-level overrides
diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp
index f741946dfa0..927b8fcc05e 100644
--- a/src/devices/bus/odyssey2/voice.cpp
+++ b/src/devices/bus/odyssey2/voice.cpp
@@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_VOICE, o2_voice_device, "o2_voice", "Odyssey 2 The Voi
// o2_voice_device - constructor
//-------------------------------------------------
-o2_voice_device::o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+o2_voice_device::o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, O2_ROM_VOICE, tag, owner, clock),
device_o2_cart_interface(mconfig, *this),
m_speech(*this, "speech"),
diff --git a/src/devices/bus/odyssey2/voice.h b/src/devices/bus/odyssey2/voice.h
index 829267fd439..b717334149a 100644
--- a/src/devices/bus/odyssey2/voice.h
+++ b/src/devices/bus/odyssey2/voice.h
@@ -22,7 +22,7 @@ class o2_voice_device : public device_t,
{
public:
// construction/destruction
- o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void cart_init() override;
diff --git a/src/devices/bus/s100/dg640.cpp b/src/devices/bus/s100/dg640.cpp
index 7f79983f17d..f6adb27cfa8 100644
--- a/src/devices/bus/s100/dg640.cpp
+++ b/src/devices/bus/s100/dg640.cpp
@@ -39,28 +39,26 @@ void dg640_device::device_start()
uint32_t dg640_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// attributes bit 0 = flash, bit 1 = lores. Also bit 7 of the character = reverse-video (text only).
- uint8_t y,ra,chr,gfx,attr,inv,gfxbit;
- uint16_t sy=0,ma=0,x;
- bool flash;
+ uint16_t sy=0,ma=0;
m_framecnt++;
- for (y = 0; y < 16; y++)
+ for (uint8_t y = 0; y < 16; y++)
{
- for (ra = 0; ra < 16; ra++)
+ for (uint8_t ra = 0; ra < 16; ra++)
{
- uint16_t *p = &bitmap.pix16(sy++);
+ uint16_t *p = &bitmap.pix(sy++);
- for (x = ma; x < ma + 64; x++)
+ for (uint16_t x = ma; x < ma + 64; x++)
{
- attr = m_p_attribram[x];
- chr = m_p_videoram[x];
- flash = BIT(m_framecnt, 4) & BIT(attr, 0);
+ uint8_t attr = m_p_attribram[x];
+ uint8_t chr = m_p_videoram[x];
+ bool flash = BIT(m_framecnt, 4) & BIT(attr, 0);
if (BIT(attr, 1)) // lores gfx - can flash
{
if (flash) chr = 0; // blank part of flashing
- gfxbit = (ra & 0x0c)>>1;
+ uint8_t gfxbit = (ra & 0x0c) >> 1;
/* Display one line of a lores character (8 pixels) */
*p++ = BIT(chr, gfxbit);
*p++ = BIT(chr, gfxbit);
@@ -74,11 +72,11 @@ uint32_t dg640_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap
}
else
{
- gfx = 0;
+ uint8_t gfx = 0;
if (!flash)
{
- inv = BIT(chr, 7) ? 0xff : 0; // text with bit 7 high is reversed
+ uint8_t inv = BIT(chr, 7) ? 0xff : 0; // text with bit 7 high is reversed
chr &= 0x7f;
gfx = inv;
diff --git a/src/devices/bus/s100/polyvti.cpp b/src/devices/bus/s100/polyvti.cpp
index 973e89c0693..242d13a8fe2 100644
--- a/src/devices/bus/s100/polyvti.cpp
+++ b/src/devices/bus/s100/polyvti.cpp
@@ -119,22 +119,22 @@ u32 poly_vti_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
{
u8 r = b/5;
if (l==0 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,5) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,5) ? 0 : 1;
if (l==0 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,2) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,2) ? 0 : 1;
if (l==1 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,4) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,4) ? 0 : 1;
if (l==1 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,1) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,1) ? 0 : 1;
if (l==2 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,3) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,3) ? 0 : 1;
if (l==2 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,0) ? 0 : 1;
+ bitmap.pix(y*15+j, xpos+b ) = BIT(code,0) ? 0 : 1;
}
}
}
@@ -156,11 +156,11 @@ u32 poly_vti_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
for (int b = 0; b < 7; b++)
- bitmap.pix16(y*15+j, xpos+b ) = (l >> (6-b)) & 1;
+ bitmap.pix(y*15+j, xpos+b ) = (l >> (6-b)) & 1;
- bitmap.pix16(y*15+j, xpos+7 ) = 0;
- bitmap.pix16(y*15+j, xpos+8 ) = 0;
- bitmap.pix16(y*15+j, xpos+9 ) = 0;
+ bitmap.pix(y*15+j, xpos+7 ) = 0;
+ bitmap.pix(y*15+j, xpos+8 ) = 0;
+ bitmap.pix(y*15+j, xpos+9 ) = 0;
}
}
xpos += 10;
diff --git a/src/devices/bus/sbus/bwtwo.cpp b/src/devices/bus/sbus/bwtwo.cpp
index 55d9f92b7b6..c034d43e05f 100644
--- a/src/devices/bus/sbus/bwtwo.cpp
+++ b/src/devices/bus/sbus/bwtwo.cpp
@@ -10,6 +10,9 @@
#include "bwtwo.h"
#include "screen.h"
+#include <algorithm>
+
+
DEFINE_DEVICE_TYPE(SBUS_BWTWO, sbus_bwtwo_device, "bwtwo", "Sun bwtwo SBus Video")
void sbus_bwtwo_device::mem_map(address_map &map)
@@ -72,14 +75,14 @@ void sbus_bwtwo_device::install_device()
uint32_t sbus_bwtwo_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint8_t *line = &m_vram[0];
+ uint8_t const *line = &m_vram[0];
for (int y = 0; y < 900; y++)
{
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
for (int x = 0; x < 1152/8; x++)
{
- memcpy(scanline, m_mono_lut[*line], sizeof(uint32_t) * 8);
+ std::copy_n(m_mono_lut[*line], 8, scanline);
line++;
scanline += 8;
}
diff --git a/src/devices/bus/sbus/cgsix.cpp b/src/devices/bus/sbus/cgsix.cpp
index 5d7bd715efd..65a24e1b505 100644
--- a/src/devices/bus/sbus/cgsix.cpp
+++ b/src/devices/bus/sbus/cgsix.cpp
@@ -171,12 +171,12 @@ void sbus_cgsix_device::device_reset()
uint32_t sbus_cgsix_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- const pen_t *pens = m_ramdac->pens();
- uint8_t *vram = (uint8_t *)&m_vram[0];
+ pen_t const *const pens = m_ramdac->pens();
+ uint8_t const *const vram = (uint8_t *)&m_vram[0];
for (int16_t y = 0; y < 900; y++)
{
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
const bool cursor_row_hit = (y >= m_cursor_y && y < (m_cursor_y + 32));
for (int16_t x = 0; x < 1152; x++)
{
diff --git a/src/devices/bus/sbus/cgthree.cpp b/src/devices/bus/sbus/cgthree.cpp
index 5ffe6a885c5..ad0ba5c1467 100644
--- a/src/devices/bus/sbus/cgthree.cpp
+++ b/src/devices/bus/sbus/cgthree.cpp
@@ -67,12 +67,12 @@ void sbus_cgthree_device::install_device()
uint32_t sbus_cgthree_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- const pen_t *pens = m_ramdac->pens();
- uint8_t *vram = (uint8_t *)&m_vram[0];
+ pen_t const *const pens = m_ramdac->pens();
+ uint8_t const *const vram = (uint8_t *)&m_vram[0];
for (int y = 0; y < 900; y++)
{
- uint32_t *scanline = &bitmap.pix32(y);
+ uint32_t *scanline = &bitmap.pix(y);
for (int x = 0; x < 1152; x++)
{
const uint8_t pixel = vram[y * 1152 + BYTE4_XOR_BE(x)];
diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp
index bc4dafbd415..5a7d858d38b 100644
--- a/src/devices/bus/svi3x8/slot/sv806.cpp
+++ b/src/devices/bus/svi3x8/slot/sv806.cpp
@@ -94,7 +94,7 @@ void sv806_device::device_start()
MC6845_UPDATE_ROW( sv806_device::crtc_update_row )
{
- const pen_t *pen = m_palette->pens();
+ pen_t const *const pen = m_palette->pens();
for (int i = 0; i < x_count; i++)
{
@@ -103,14 +103,14 @@ MC6845_UPDATE_ROW( sv806_device::crtc_update_row )
if (i == cursor_x)
data = 0xff;
- bitmap.pix32(y, i * 8 + 0) = pen[BIT(data, 7)];
- bitmap.pix32(y, i * 8 + 1) = pen[BIT(data, 6)];
- bitmap.pix32(y, i * 8 + 2) = pen[BIT(data, 5)];
- bitmap.pix32(y, i * 8 + 3) = pen[BIT(data, 4)];
- bitmap.pix32(y, i * 8 + 4) = pen[BIT(data, 3)];
- bitmap.pix32(y, i * 8 + 5) = pen[BIT(data, 2)];
- bitmap.pix32(y, i * 8 + 6) = pen[BIT(data, 1)];
- bitmap.pix32(y, i * 8 + 7) = pen[BIT(data, 0)];
+ bitmap.pix(y, i * 8 + 0) = pen[BIT(data, 7)];
+ bitmap.pix(y, i * 8 + 1) = pen[BIT(data, 6)];
+ bitmap.pix(y, i * 8 + 2) = pen[BIT(data, 5)];
+ bitmap.pix(y, i * 8 + 3) = pen[BIT(data, 4)];
+ bitmap.pix(y, i * 8 + 4) = pen[BIT(data, 3)];
+ bitmap.pix(y, i * 8 + 5) = pen[BIT(data, 2)];
+ bitmap.pix(y, i * 8 + 6) = pen[BIT(data, 1)];
+ bitmap.pix(y, i * 8 + 7) = pen[BIT(data, 0)];
}
}
diff --git a/src/devices/bus/tanbus/mpvdu.cpp b/src/devices/bus/tanbus/mpvdu.cpp
index e9f4fe766eb..28cd0b988f9 100644
--- a/src/devices/bus/tanbus/mpvdu.cpp
+++ b/src/devices/bus/tanbus/mpvdu.cpp
@@ -149,7 +149,7 @@ uint8_t tanbus_mpvdu_device::videoram_r(offs_t offset)
MC6845_UPDATE_ROW(tanbus_mpvdu_device::crtc_update_row)
{
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
m_trom->lose_w(1);
m_trom->lose_w(0);
@@ -165,11 +165,11 @@ MC6845_UPDATE_ROW(tanbus_mpvdu_device::crtc_update_row)
m_trom->tr6_w(1);
m_trom->tr6_w(0);
- int col = m_trom->get_rgb() ^ ((column == cursor_x) ? 7 : 0);
+ int const col = m_trom->get_rgb() ^ ((column == cursor_x) ? 7 : 0);
- int r = BIT(col, 0) * 0xff;
- int g = BIT(col, 1) * 0xff;
- int b = BIT(col, 2) * 0xff;
+ int const r = BIT(col, 0) * 0xff;
+ int const g = BIT(col, 1) * 0xff;
+ int const b = BIT(col, 2) * 0xff;
*p++ = rgb_t(r, g, b);
}
diff --git a/src/devices/bus/tanbus/ravdu.cpp b/src/devices/bus/tanbus/ravdu.cpp
index 80664797081..b93b1a41c35 100644
--- a/src/devices/bus/tanbus/ravdu.cpp
+++ b/src/devices/bus/tanbus/ravdu.cpp
@@ -161,7 +161,7 @@ uint8_t tanbus_ravdu_device::videoram_r(offs_t offset)
MC6845_UPDATE_ROW(tanbus_ravdu_device::crtc_update_row)
{
- uint32_t *p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
m_trom->lose_w(1);
m_trom->lose_w(0);
@@ -178,11 +178,11 @@ MC6845_UPDATE_ROW(tanbus_ravdu_device::crtc_update_row)
m_trom->tr6_w(1);
m_trom->tr6_w(0);
- int col = m_trom->get_rgb() ^ ((column == cursor_x) ? 7 : 0);
+ int const col = m_trom->get_rgb() ^ ((column == cursor_x) ? 7 : 0);
- int r = BIT(col, 0) * 0xff;
- int g = BIT(col, 1) * 0xff;
- int b = BIT(col, 2) * 0xff;
+ int const r = BIT(col, 0) * 0xff;
+ int const g = BIT(col, 1) * 0xff;
+ int const b = BIT(col, 2) * 0xff;
*p++ = rgb_t(r, g, b);
}
diff --git a/src/devices/bus/tanbus/tanhrg.cpp b/src/devices/bus/tanbus/tanhrg.cpp
index 1c8ffc87ab5..b857e84ac69 100644
--- a/src/devices/bus/tanbus/tanhrg.cpp
+++ b/src/devices/bus/tanbus/tanhrg.cpp
@@ -323,16 +323,13 @@ void tanbus_tanhrgc_device::set_inhibit_lines(offs_t offset, int &inhram, int &i
uint32_t tanbus_tanhrg_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint16_t offset;
- uint32_t *p;
-
for (int y = 0; y < 256; y++)
{
- p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
for (int x = 0; x < 256; x++)
{
- offset = (y * 32) + (x / 8);
+ uint16_t const offset = (y * 32) + (x / 8);
*p++ = m_palette->pen_color(BIT(m_videoram[offset], x & 7));
}
@@ -344,21 +341,17 @@ uint32_t tanbus_tanhrg_device::screen_update(screen_device &screen, bitmap_rgb32
uint32_t tanbus_tanhrgc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint8_t r, g, b;
- uint16_t offset;
- uint32_t *p;
-
for (int y = 0; y < 256; y++)
{
- p = &bitmap.pix32(y);
+ uint32_t *p = &bitmap.pix(y);
for (int x = 0; x < 256; x++)
{
- offset = (y * 32) + (x / 8);
+ uint16_t const offset = (y * 32) + (x / 8);
- r = m_videoram[0x0000 | offset];
- b = m_videoram[0x2000 | offset];
- g = m_videoram[0x4000 | offset];
+ uint8_t const r = m_videoram[0x0000 | offset];
+ uint8_t const b = m_videoram[0x2000 | offset];
+ uint8_t const g = m_videoram[0x4000 | offset];
*p++ = m_palette->pen_color(BIT(b, x & 7) << 2 | BIT(g, x & 7) << 1 | BIT(r, x & 7));
}
diff --git a/src/devices/bus/tanbus/tug8082.cpp b/src/devices/bus/tanbus/tug8082.cpp
index 1e4ad1a4504..582ab726c8e 100644
--- a/src/devices/bus/tanbus/tug8082.cpp
+++ b/src/devices/bus/tanbus/tug8082.cpp
@@ -241,18 +241,14 @@ WRITE_LINE_MEMBER(tanbus_tug8082_device::vdu_irq_w)
uint32_t tanbus_tug8082_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- uint32_t *scanline;
- int x, y;
- uint8_t pixels;
+ pen_t const *const pen = m_palette->pens();
- const pen_t *pen = m_palette->pens();
-
- for (y = 0; y < 256; y++)
+ for (int y = 0; y < 256; y++)
{
- scanline = &bitmap.pix32(y);
- for (x = 0; x < 64; x++)
+ uint32_t *scanline = &bitmap.pix(y);
+ for (int x = 0; x < 64; x++)
{
- pixels = m_videoram[(y * 64) + x];
+ uint8_t const pixels = m_videoram[(y * 64) + x];
for (int i = 0; i < 8; ++i)
*scanline++ = pen[BIT(pixels, 7 - i)];
diff --git a/src/devices/bus/ti99/internal/992board.cpp b/src/devices/bus/ti99/internal/992board.cpp
index 031f82d7fe5..2f01c025cb6 100644
--- a/src/devices/bus/ti99/internal/992board.cpp
+++ b/src/devices/bus/ti99/internal/992board.cpp
@@ -202,7 +202,7 @@ void video992_device::device_timer(emu_timer &timer, device_timer_id id, int par
}
int vpos = raw_vpos * m_vertical_size / screen().height();
- uint32_t *p = &m_tmpbmp.pix32(vpos);
+ uint32_t *p = &m_tmpbmp.pix(vpos);
bool endofline = false;
int linelength = 0;
diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp
index 187224721be..1f2b3c35431 100644
--- a/src/devices/bus/vic20/videopak.cpp
+++ b/src/devices/bus/vic20/videopak.cpp
@@ -77,7 +77,7 @@ MC6845_UPDATE_ROW( vic20_video_pak_device::crtc_update_row )
int x = (column * 8) + bit;
int color = BIT(data, 7) && de;
- bitmap.pix32(vbp + y, hbp + x) = pen[color];
+ bitmap.pix(vbp + y, hbp + x) = pen[color];
data <<= 1;
}
diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp
index 4d31a7b9367..1fd3c0610d4 100644
--- a/src/devices/bus/wangpc/lvc.cpp
+++ b/src/devices/bus/wangpc/lvc.cpp
@@ -62,17 +62,17 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row )
{
for (int column = 0; column < x_count; column++)
{
- offs_t addr = scroll_y + (m_scroll & 0x3f) + ((ma / 80) * 0x480) + (((ra & 0x0f) << 7) | (column & 0x7f));
+ offs_t const addr = scroll_y + (m_scroll & 0x3f) + ((ma / 80) * 0x480) + (((ra & 0x0f) << 7) | (column & 0x7f));
uint16_t data = m_video_ram[addr & 0x7fff];
for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
+ int const x = (column * 8) + bit;
int color = (BIT(data, 15) << 1) | BIT(data, 7);
if (column == cursor_x) color = 0x03;
- bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
+ bitmap.pix(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
data <<= 1;
}
@@ -89,12 +89,12 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row )
for (int bit = 0; bit < 8; bit++)
{
- int x = (column * 8) + bit;
+ int const x = (column * 8) + bit;
int color = (BIT(data, 31) << 3) | (BIT(data, 23) << 2) | (BIT(data, 15) << 1) | BIT(data, 7);
if (column == cursor_x) color = 0x03;
- bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
+ bitmap.pix(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black();
data <<= 1;
}
diff --git a/src/devices/bus/wangpc/mvc.cpp b/src/devices/bus/wangpc/mvc.cpp
index 562e277f982..cff515a05c1 100644
--- a/src/devices/bus/wangpc/mvc.cpp
+++ b/src/devices/bus/wangpc/mvc.cpp
@@ -73,15 +73,15 @@ MC6845_UPDATE_ROW( wangpc_mvc_device::crtc_update_row )
{
for (int sx = 0; sx < 50; sx++)
{
- offs_t addr = (y * 50) + sx;
+ offs_t const addr = (y * 50) + sx;
uint16_t data = m_bitmap_ram[addr];
for (int bit = 0; bit < 16; bit++)
{
- int x = (sx * 16) + bit;
- int color = BIT(data, 15) && de;
+ int const x = (sx * 16) + bit;
+ int const color = BIT(data, 15) && de;
- bitmap.pix32(vbp + y, hbp + x) = PALETTE_MVC[color];
+ bitmap.pix(vbp + y, hbp + x) = PALETTE_MVC[color];
data <<= 1;
}
@@ -89,8 +89,8 @@ MC6845_UPDATE_ROW( wangpc_mvc_device::crtc_update_row )
for (int column = 0; column < x_count; column++)
{
- uint16_t code = m_video_ram[((ma + column) & 0x7ff)];
- uint8_t attr = code & 0xff;
+ uint16_t const code = m_video_ram[((ma + column) & 0x7ff)];
+ uint8_t const attr = code & 0xff;
uint8_t new_ra = ra + 1;
@@ -103,7 +103,7 @@ MC6845_UPDATE_ROW( wangpc_mvc_device::crtc_update_row )
new_ra = ra;
}
- offs_t addr = ((code >> 8) << 4) | (new_ra & 0x0f);
+ offs_t const addr = ((code >> 8) << 4) | (new_ra & 0x0f);
uint16_t data = m_char_ram[addr & 0xfff];
if ((column == cursor_x) || (!ra && ATTR_OVERSCORE) || ((ra == 9) && ATTR_UNDERSCORE))
@@ -113,11 +113,13 @@ MC6845_UPDATE_ROW( wangpc_mvc_device::crtc_update_row )
for (int bit = 0; bit < 10; bit++)
{
- int x = (column * 10) + bit;
+ int const x = (column * 10) + bit;
int color = ((BIT(data, 9) & ~ATTR_BLANK) ^ ATTR_REVERSE);
- if ((color | bitmap.pix32(vbp + y, hbp + x)) & ATTR_BOLD) color = 2;
- if (color) bitmap.pix32(vbp + y, hbp + x) = de ? PALETTE_MVC[color] : rgb_t::black();
+ if ((color | bitmap.pix(vbp + y, hbp + x)) & ATTR_BOLD)
+ color = 2;
+ if (color)
+ bitmap.pix(vbp + y, hbp + x) = de ? PALETTE_MVC[color] : rgb_t::black();
data <<= 1;
}
diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp
index 9f80774a6e5..5094c36a5f7 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.cpp
+++ b/src/devices/cpu/e0c6200/e0c6s46.cpp
@@ -589,7 +589,7 @@ u32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
if (!m_pixel_update_cb.isnull())
m_pixel_update_cb(bitmap, cliprect, m_lcd_contrast, seg, com, pixel);
else if (cliprect.contains(seg, com))
- bitmap.pix16(com, seg) = pixel;
+ bitmap.pix(com, seg) = pixel;
}
}
}
diff --git a/src/devices/cpu/f8/f8dasm.cpp b/src/devices/cpu/f8/f8dasm.cpp
index 24ec47b5154..e35a7d42f70 100644
--- a/src/devices/cpu/f8/f8dasm.cpp
+++ b/src/devices/cpu/f8/f8dasm.cpp
@@ -17,33 +17,22 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
{
offs_t base_pc = pc;
uint8_t op = opcodes.r8(pc++);
+ offs_t flags = SUPPORTED;
switch( op )
{
/* opcode bitmask */
case 0x00: /* 0000 0000 */
- util::stream_format(stream, "LR A,KU");
- break;
case 0x01: /* 0000 0001 */
- util::stream_format(stream, "LR A,KL");
- break;
case 0x02: /* 0000 0010 */
- util::stream_format(stream, "LR A,QU");
- break;
case 0x03: /* 0000 0011 */
- util::stream_format(stream, "LR A,QL");
+ util::stream_format(stream, "LR A,%s", rname[op + 12]);
break;
case 0x04: /* 0000 0100 */
- util::stream_format(stream, "LR KU,A");
- break;
case 0x05: /* 0000 0101 */
- util::stream_format(stream, "LR KL,A");
- break;
case 0x06: /* 0000 0110 */
- util::stream_format(stream, "LR QU,A");
- break;
case 0x07: /* 0000 0111 */
- util::stream_format(stream, "LR QL,A");
+ util::stream_format(stream, "LR %s,A", rname[(op - 0x04) + 12]);
break;
case 0x08: /* 0000 1000 */
@@ -60,7 +49,8 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
break;
case 0x0c: /* 0000 1100 */
- util::stream_format(stream, "PK") ;
+ util::stream_format(stream, "PK");
+ flags |= STEP_OUT;
break;
case 0x0d: /* 0000 1101 */
util::stream_format(stream, "LR P0,Q");
@@ -109,6 +99,7 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
break;
case 0x1c: /* 0001 1100 */
util::stream_format(stream, "POP");
+ flags |= STEP_OUT;
break;
case 0x1d: /* 0001 1101 */
util::stream_format(stream, "LR W,J");
@@ -120,39 +111,40 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
util::stream_format(stream, "INC");
break;
case 0x20: /* 0010 0000 */
- util::stream_format(stream, "LI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "LI H'%02X'", opcodes.r8(pc++));
break;
case 0x21: /* 0010 0001 */
- util::stream_format(stream, "NI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "NI H'%02X'", opcodes.r8(pc++));
break;
case 0x22: /* 0010 0010 */
- util::stream_format(stream, "OI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "OI H'%02X'", opcodes.r8(pc++));
break;
case 0x23: /* 0010 0011 */
- util::stream_format(stream, "XI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "XI H'%02X'", opcodes.r8(pc++));
break;
case 0x24: /* 0010 0100 */
- util::stream_format(stream, "AI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "AI H'%02X'", opcodes.r8(pc++));
break;
case 0x25: /* 0010 0101 */
- util::stream_format(stream, "CI $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "CI H'%02X'", opcodes.r8(pc++));
break;
case 0x26: /* 0010 0110 */
- util::stream_format(stream, "IN $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "IN H'%02X'", opcodes.r8(pc++));
break;
case 0x27: /* 0010 0111 */
- util::stream_format(stream, "OUT $%02X", opcodes.r8(pc++));
+ util::stream_format(stream, "OUT H'%02X'", opcodes.r8(pc++));
break;
case 0x28: /* 0010 1000 */
- util::stream_format(stream, "PI $%04X", opcodes.r16(pc));
+ util::stream_format(stream, "PI H'%04X'", opcodes.r16(pc));
pc += 2;
+ flags |= STEP_OVER;
break;
case 0x29: /* 0010 1001 */
- util::stream_format(stream, "JMP $%04X", opcodes.r16(pc));
+ util::stream_format(stream, "JMP H'%04X'", opcodes.r16(pc));
pc += 2;
break;
case 0x2a: /* 0010 1010 */
- util::stream_format(stream, "DCI $%04X", opcodes.r16(pc));
+ util::stream_format(stream, "DCI H'%04X'", opcodes.r16(pc));
pc += 2;
break;
case 0x2b: /* 0010 1011 */
@@ -161,11 +153,9 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x2c: /* 0010 1100 */
util::stream_format(stream, "XDC");
break;
- case 0x2d: /* 0010 1101 */
- case 0x2e: /* 0010 1110 */
- case 0x2f: /* 0010 1111 */
- util::stream_format(stream, "??? $%02X",op);
- break;
+ /* case 0x2d: 0010 1101 */
+ /* case 0x2e: 0010 1110 */
+ /* case 0x2f: 0010 1111 */
case 0x30: /* 0011 0000 */
case 0x31: /* 0011 0001 */
@@ -179,20 +169,18 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x39: /* 0011 1001 */
case 0x3a: /* 0011 1010 */
case 0x3b: /* 0011 1011 */
- util::stream_format(stream, "DS %s",rname[op & 15]);
+ util::stream_format(stream, "DS %s", rname[op & 15]);
break;
case 0x3c: /* 0011 1100 */
- util::stream_format(stream, "DS (IS)");
+ util::stream_format(stream, "DS S");
break;
case 0x3d: /* 0011 1101 */
- util::stream_format(stream, "DS (IS++)");
+ util::stream_format(stream, "DS I");
break;
case 0x3e: /* 0011 1110 */
- util::stream_format(stream, "DS (IS--)");
- break;
- case 0x3f: /* 0011 1111 */
- util::stream_format(stream, "??? $%02X",op);
+ util::stream_format(stream, "DS D");
break;
+ /* case 0x3f: 0011 1111 */
case 0x40: /* 0100 0000 */
case 0x41: /* 0100 0001 */
@@ -206,20 +194,18 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x49: /* 0100 1001 */
case 0x4a: /* 0100 1010 */
case 0x4b: /* 0100 1011 */
- util::stream_format(stream, "LR A,%s",rname[op & 15]);
+ util::stream_format(stream, "LR A,%s", rname[op & 15]);
break;
case 0x4c: /* 0100 1100 */
- util::stream_format(stream, "LR A,(IS)");
+ util::stream_format(stream, "LR A,S");
break;
case 0x4d: /* 0100 1101 */
- util::stream_format(stream, "LR A,(IS++)");
+ util::stream_format(stream, "LR A,I");
break;
case 0x4e: /* 0100 1110 */
- util::stream_format(stream, "LR A,(IS--)");
- break;
- case 0x4f: /* 0100 1111 */
- util::stream_format(stream, "??? $%02X",op);
+ util::stream_format(stream, "LR A,D");
break;
+ /* case 0x4f: 0100 1111 */
case 0x50: /* 0101 0000 */
case 0x51: /* 0101 0001 */
@@ -233,20 +219,18 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x59: /* 0101 1001 */
case 0x5a: /* 0101 1010 */
case 0x5b: /* 0101 1011 */
- util::stream_format(stream, "LR %s,A",rname[op & 15]);
+ util::stream_format(stream, "LR %s,A", rname[op & 15]);
break;
case 0x5c: /* 0101 1100 */
- util::stream_format(stream, "LR (IS),A");
+ util::stream_format(stream, "LR S,A");
break;
case 0x5d: /* 0101 1101 */
- util::stream_format(stream, "LR (IS++),A");
+ util::stream_format(stream, "LR I,A");
break;
case 0x5e: /* 0101 1110 */
- util::stream_format(stream, "LR (IS--),A");
- break;
- case 0x5f: /* 0101 1111 */
- util::stream_format(stream, "??? $%02X",op);
+ util::stream_format(stream, "LR D,A");
break;
+ /* case 0x5f: 0101 1111 */
case 0x60: /* 0110 0000 */
case 0x61: /* 0110 0001 */
@@ -256,7 +240,7 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x65: /* 0110 0101 */
case 0x66: /* 0110 0110 */
case 0x67: /* 0110 0111 */
- util::stream_format(stream, "LISU $%02X", op & 0x07);
+ util::stream_format(stream, "LISU %d", op & 0x07);
break;
case 0x68: /* 0110 1000 */
case 0x69: /* 0110 1001 */
@@ -266,7 +250,7 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x6d: /* 0110 1101 */
case 0x6e: /* 0110 1110 */
case 0x6f: /* 0110 1111 */
- util::stream_format(stream, "LISL $%02X", op & 0x07);
+ util::stream_format(stream, "LISL %d", op & 0x07);
break;
case 0x70: /* 0111 0000 */
@@ -285,27 +269,27 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x7d: /* 0111 1101 */
case 0x7e: /* 0111 1110 */
case 0x7f: /* 0111 1111 */
- util::stream_format(stream, "LIS $%02X", op & 0x0f);
+ util::stream_format(stream, "LIS H'%02X'", op & 0x0f);
break;
case 0x81: /* 1000 0001 */
case 0x85: /* 1000 0101 */
- util::stream_format(stream, "BP $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BP H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x82: /* 1000 0010 */
- util::stream_format(stream, "BC $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BC H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x84: /* 1000 0100 */
- util::stream_format(stream, "BZ $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BZ H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x80: /* 1000 0000 */
case 0x83: /* 1000 0011 */
case 0x86: /* 1000 0110 */
case 0x87: /* 1000 0111 */
- util::stream_format(stream, "BT $%02X,$%04X", op & 0x07, base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BT H'%02X',H'%04X'", op & 0x07, base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x88: /* 1000 1000 */
@@ -337,28 +321,28 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
break;
case 0x8f: /* 1000 1111 */
- util::stream_format(stream, "BR7 $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BR7 H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x90: /* 1001 0000 */
- util::stream_format(stream, "BR $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BR H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x91: /* 1001 0001 */
case 0x95: /* 1001 0101 */
- util::stream_format(stream, "BM $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BM H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x92: /* 1001 0010 */
- util::stream_format(stream, "BNC $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BNC H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x94: /* 1001 0100 */
- util::stream_format(stream, "BNZ $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BNZ H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x98: /* 1001 1000 */
- util::stream_format(stream, "BNO $%04X", base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BNO H'%04X'", base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0x93: /* 1001 0011 */
@@ -371,18 +355,16 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0x9d: /* 1001 1101 */
case 0x9e: /* 1001 1110 */
case 0x9f: /* 1001 1111 */
- util::stream_format(stream, "BF $%02X,$%04X", op & 0x0f, base_pc + (int8_t)opcodes.r8(pc++) + 1);
+ util::stream_format(stream, "BF H'%02X',H'%04X'", op & 0x0f, base_pc + (int8_t)opcodes.r8(pc++) + 1);
break;
case 0xa0: /* 1010 0000 */
case 0xa1: /* 1010 0001 */
- util::stream_format(stream, "INS $%02X", (unsigned) (int8_t) (op & 0x0F));
+ util::stream_format(stream, "INS %d", op & 0x0f);
break;
- case 0xa2: /* 1010 0010 */
- case 0xa3: /* 1010 0011 */
- util::stream_format(stream, "??? $%02X", op);
- break;
+ /* case 0xa2: 1010 0010 */
+ /* case 0xa3: 1010 0011 */
case 0xa4: /* 1010 0100 */
case 0xa5: /* 1010 0101 */
@@ -396,18 +378,16 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0xad: /* 1010 1101 */
case 0xae: /* 1010 1110 */
case 0xaf: /* 1010 1111 */
- util::stream_format(stream, "INS $%02X", (int8_t) op & 0x0f);
+ util::stream_format(stream, "INS H'%02X'", op & 0x0f);
break;
case 0xb0: /* 1011 0000 */
case 0xb1: /* 1011 0001 */
- util::stream_format(stream, "OUTS $%02X", (int8_t) op & 0x0f);
+ util::stream_format(stream, "OUTS %d", op & 0x0f);
break;
- case 0xb2: /* 1011 0010 */
- case 0xb3: /* 1011 0011 */
- util::stream_format(stream, "??? $%02X", op);
- break;
+ /* case 0xb2: 1011 0010 */
+ /* case 0xb3: 1011 0011 */
case 0xb4: /* 1011 0100 */
case 0xb5: /* 1011 0101 */
@@ -421,7 +401,7 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
case 0xbd: /* 1011 1101 */
case 0xbe: /* 1011 1110 */
case 0xbf: /* 1011 1111 */
- util::stream_format(stream, "OUTS $%02X", (unsigned) (int8_t) op & 0x0f);
+ util::stream_format(stream, "OUTS H'%02X'", op & 0x0f);
break;
case 0xc0: /* 1100 0000 */
@@ -439,17 +419,15 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
util::stream_format(stream, "AS %s", rname[op & 15]);
break;
case 0xcc: /* 1100 1100 */
- util::stream_format(stream, "AS (IS)");
+ util::stream_format(stream, "AS S");
break;
case 0xcd: /* 1100 1101 */
- util::stream_format(stream, "AS (IS++)");
+ util::stream_format(stream, "AS I");
break;
case 0xce: /* 1100 1110 */
- util::stream_format(stream, "AS (IS--)");
- break;
- case 0xcf: /* 1100 1111 */
- util::stream_format(stream, "??? $%02X", op);
+ util::stream_format(stream, "AS D");
break;
+ /* case 0xcf: 1100 1111 */
case 0xd0: /* 1101 0000 */
case 0xd1: /* 1101 0001 */
@@ -466,17 +444,15 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
util::stream_format(stream, "ASD %s", rname[op & 15]);
break;
case 0xdc: /* 1101 1100 */
- util::stream_format(stream, "ASD (IS)");
+ util::stream_format(stream, "ASD S");
break;
case 0xdd: /* 1101 1101 */
- util::stream_format(stream, "ASD (IS++)");
+ util::stream_format(stream, "ASD I");
break;
case 0xde: /* 1101 1110 */
- util::stream_format(stream, "ASD (IS--)");
- break;
- case 0xdf: /* 1101 1111 */
- util::stream_format(stream, "??? $%02X", op);
+ util::stream_format(stream, "ASD D");
break;
+ /* case 0xdf: 1101 1111 */
case 0xe0: /* 1110 0000 */
case 0xe1: /* 1110 0001 */
@@ -493,17 +469,15 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
util::stream_format(stream, "XS %s", rname[op & 15]);
break;
case 0xec: /* 1110 1100 */
- util::stream_format(stream, "XS (IS)");
+ util::stream_format(stream, "XS S");
break;
case 0xed: /* 1110 1101 */
- util::stream_format(stream, "XS (IS++)");
+ util::stream_format(stream, "XS I");
break;
case 0xee: /* 1110 1110 */
- util::stream_format(stream, "XS (IS--)");
- break;
- case 0xef: /* 1110 1111 */
- util::stream_format(stream, "??? $%02X", op);
+ util::stream_format(stream, "XS D");
break;
+ /* case 0xef: 1110 1111 */
case 0xf0: /* 1111 0000 */
@@ -521,18 +495,21 @@ offs_t f8_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_
util::stream_format(stream, "NS %s", rname[op & 15]);
break;
case 0xfc: /* 1111 1100 */
- util::stream_format(stream, "NS (IS)");
+ util::stream_format(stream, "NS S");
break;
case 0xfd: /* 1111 1101 */
- util::stream_format(stream, "NS (IS++)");
+ util::stream_format(stream, "NS I");
break;
case 0xfe: /* 1111 1110 */
- util::stream_format(stream, "NS (IS--)");
+ util::stream_format(stream, "NS D");
break;
- case 0xff: /* 1111 1111 */
- util::stream_format(stream, "??? $%02X", op);
+ /* case 0xff: 1111 1111 */
+
+
+ default:
+ util::stream_format(stream, "DC H'%02X' (?)", op);
break;
}
- return pc - base_pc;
+ return (pc - base_pc) | flags;
}
diff --git a/src/devices/cpu/lc58/lc58d.cpp b/src/devices/cpu/lc58/lc58d.cpp
new file mode 100644
index 00000000000..477ee00ffb0
--- /dev/null
+++ b/src/devices/cpu/lc58/lc58d.cpp
@@ -0,0 +1,160 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// LC58 generic disassembler
+
+#include "emu.h"
+#include "lc58d.h"
+
+u32 lc58_disassembler::opcode_alignment() const
+{
+ return 1;
+}
+
+#define P std::ostream &stream, const lc58_disassembler *d, u16 opcode
+const lc58_disassembler::instruction lc58_disassembler::instructions[] {
+ { 0x5a00, 0xffff, [](P) -> u32 { util::stream_format(stream, "cla"); return 1; } },
+ { 0xec01, 0xffff, [](P) -> u32 { util::stream_format(stream, "rcf"); return 1; } },
+ { 0xe801, 0xffff, [](P) -> u32 { util::stream_format(stream, "scf"); return 1; } },
+ { 0x6000, 0xfc00, [](P) -> u32 { util::stream_format(stream, "mrw wr%x, %02x", (opcode >> 7) & 7, opcode & 0x7f); return 1; } },
+ { 0x6400, 0xfc00, [](P) -> u32 { util::stream_format(stream, "mwr %02x, wr%x", opcode & 0x7f, (opcode >> 7) & 7); return 1; } },
+ { 0x6800, 0xff80, [](P) -> u32 { util::stream_format(stream, "sr0 %02x", opcode & 0x7f); return 1; } },
+ { 0x6900, 0xff80, [](P) -> u32 { util::stream_format(stream, "sr1 %02x", opcode & 0x7f); return 1; } },
+ { 0x6a00, 0xff80, [](P) -> u32 { util::stream_format(stream, "sl0 %02x", opcode & 0x7f); return 1; } },
+ { 0x6b00, 0xff80, [](P) -> u32 { util::stream_format(stream, "sl1 %02x", opcode & 0x7f); return 1; } },
+ { 0x6c00, 0xff80, [](P) -> u32 { util::stream_format(stream, "rar %02x", opcode & 0x7f); return 1; } },
+ { 0x6e00, 0xff80, [](P) -> u32 { util::stream_format(stream, "ral %02x", opcode & 0x7f); return 1; } },
+ { 0x7400, 0xff80, [](P) -> u32 { util::stream_format(stream, "maf %02x", opcode & 0x7f); return 1; } },
+ { 0x0f80, 0xff80, [](P) -> u32 { util::stream_format(stream, "mra %02x", opcode & 0x7f); return 1; } },
+
+ { 0x4000, 0xff80, [](P) -> u32 { util::stream_format(stream, "adc %02x", opcode & 0x7f); return 1; } },
+ { 0x4100, 0xff80, [](P) -> u32 { util::stream_format(stream, "adc* %02x", opcode & 0x7f); return 1; } },
+ { 0x4200, 0xff80, [](P) -> u32 { util::stream_format(stream, "sbc %02x", opcode & 0x7f); return 1; } },
+ { 0x4300, 0xff80, [](P) -> u32 { util::stream_format(stream, "sbc* %02x", opcode & 0x7f); return 1; } },
+ { 0x4400, 0xff80, [](P) -> u32 { util::stream_format(stream, "add %02x", opcode & 0x7f); return 1; } },
+ { 0x4500, 0xff80, [](P) -> u32 { util::stream_format(stream, "add* %02x", opcode & 0x7f); return 1; } },
+ { 0x4600, 0xff80, [](P) -> u32 { util::stream_format(stream, "sub %02x", opcode & 0x7f); return 1; } },
+ { 0x4700, 0xff80, [](P) -> u32 { util::stream_format(stream, "sub* %02x", opcode & 0x7f); return 1; } },
+ { 0x4800, 0xff80, [](P) -> u32 { util::stream_format(stream, "adn %02x", opcode & 0x7f); return 1; } },
+ { 0x4900, 0xff80, [](P) -> u32 { util::stream_format(stream, "adn* %02x", opcode & 0x7f); return 1; } },
+ { 0x4a00, 0xff80, [](P) -> u32 { util::stream_format(stream, "and %02x", opcode & 0x7f); return 1; } },
+ { 0x4b00, 0xff80, [](P) -> u32 { util::stream_format(stream, "and* %02x", opcode & 0x7f); return 1; } },
+ { 0x4c00, 0xff80, [](P) -> u32 { util::stream_format(stream, "eor %02x", opcode & 0x7f); return 1; } },
+ { 0x4d00, 0xff80, [](P) -> u32 { util::stream_format(stream, "eor* %02x", opcode & 0x7f); return 1; } },
+ { 0x4e00, 0xff80, [](P) -> u32 { util::stream_format(stream, "or %02x", opcode & 0x7f); return 1; } },
+ { 0x4f00, 0xff80, [](P) -> u32 { util::stream_format(stream, "or* %02x", opcode & 0x7f); return 1; } },
+ { 0x5000, 0xff00, [](P) -> u32 { util::stream_format(stream, "adci #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5100, 0xff00, [](P) -> u32 { util::stream_format(stream, "adci* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5200, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbci #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5300, 0xff00, [](P) -> u32 { util::stream_format(stream, "sbci* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5400, 0xff00, [](P) -> u32 { util::stream_format(stream, "addi #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5500, 0xff00, [](P) -> u32 { util::stream_format(stream, "addi* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5600, 0xff00, [](P) -> u32 { util::stream_format(stream, "subi #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5700, 0xff00, [](P) -> u32 { util::stream_format(stream, "subi* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5800, 0xff00, [](P) -> u32 { util::stream_format(stream, "adni #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5900, 0xff00, [](P) -> u32 { util::stream_format(stream, "adni* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5a00, 0xff00, [](P) -> u32 { util::stream_format(stream, "andi #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5b00, 0xff00, [](P) -> u32 { util::stream_format(stream, "andi* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5c00, 0xff00, [](P) -> u32 { util::stream_format(stream, "eori #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5d00, 0xff00, [](P) -> u32 { util::stream_format(stream, "eori* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5e00, 0xff00, [](P) -> u32 { util::stream_format(stream, "ori #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+ { 0x5f00, 0xff00, [](P) -> u32 { util::stream_format(stream, "ori* #%x, %02x", (opcode >> 4) & 0xf, 0x70 + (opcode & 0xf)); return 1; } },
+
+ { 0x7700, 0xff80, [](P) -> u32 { util::stream_format(stream, "mdpl %02x", opcode & 0x7f); return 1; } },
+ { 0x7680, 0xff80, [](P) -> u32 { util::stream_format(stream, "mdph %02x", opcode & 0x7f); return 1; } },
+ { 0x6b80, 0xff80, [](P) -> u32 { util::stream_format(stream, "mrdl %02x", opcode & 0x7f); return 1; } },
+ { 0x6980, 0xff80, [](P) -> u32 { util::stream_format(stream, "mrdh %02x", opcode & 0x7f); return 1; } },
+ { 0x6a80, 0xff80, [](P) -> u32 { util::stream_format(stream, "mrsp %02x", opcode & 0x7f); return 1; } },
+ { 0xe800, 0xfc00, [](P) -> u32 { util::stream_format(stream, "sf1 %03x", opcode & 0x3ff); return 1; } },
+ { 0xec00, 0xfc00, [](P) -> u32 { util::stream_format(stream, "rf1 %03x", opcode & 0x3ff); return 1; } },
+ { 0xf000, 0xfc00, [](P) -> u32 { util::stream_format(stream, "sf2 %03x", opcode & 0x3ff); return 1; } },
+ { 0xf400, 0xfc00, [](P) -> u32 { util::stream_format(stream, "rf2 %03x", opcode & 0x3ff); return 1; } },
+ { 0xe880, 0xffff, [](P) -> u32 { util::stream_format(stream, "sdpf"); return 1; } },
+ { 0xec80, 0xffff, [](P) -> u32 { util::stream_format(stream, "rdpf"); return 1; } },
+
+ { 0x7780, 0xff80, [](P) -> u32 { util::stream_format(stream, "sta %02x", opcode & 0x7f); return 1; } },
+ { 0x7800, 0xf800, [](P) -> u32 { util::stream_format(stream, "lds %02x, #%x", opcode & 0x7f, (opcode >> 7) & 0xf); return 1; } },
+ { 0x6880, 0xff80, [](P) -> u32 { util::stream_format(stream, "lda %02x", opcode & 0x7f); return 1; } },
+
+ { 0xff00, 0xffff, [](P) -> u32 { util::stream_format(stream, "halt"); return 1; } },
+ { 0xe000, 0xffc0, [](P) -> u32 { util::stream_format(stream, "ssw %02x", opcode & 0x3f); return 1; } },
+ { 0xfa00, 0xfe00, [](P) -> u32 { util::stream_format(stream, "sie %03x", opcode & 0x1ff); return 1 | STEP_OVER; } },
+ { 0xfe00, 0xfff0, [](P) -> u32 { util::stream_format(stream, "sie* %x", opcode & 0xf); return 1 | STEP_OVER; } },
+ { 0x7580, 0xff80, [](P) -> u32 { util::stream_format(stream, "msb %02x", opcode & 0x7f); return 1; } },
+ { 0x7600, 0xff80, [](P) -> u32 { util::stream_format(stream, "msc %02x", opcode & 0x7f); return 1; } },
+ { 0x0000, 0xffff, [](P) -> u32 { util::stream_format(stream, "nop"); return 1; } },
+ { 0xf018, 0xffff, [](P) -> u32 { util::stream_format(stream, "lon"); return 1; } },
+ { 0xf418, 0xffff, [](P) -> u32 { util::stream_format(stream, "loff"); return 1; } },
+ { 0xf004, 0xffff, [](P) -> u32 { util::stream_format(stream, "sbak"); return 1; } },
+ { 0xf404, 0xffff, [](P) -> u32 { util::stream_format(stream, "rbak"); return 1; } },
+
+ { 0x7480, 0xff80, [](P) -> u32 { util::stream_format(stream, "mcd %02x", opcode & 0x7f); return 1; } },
+ { 0x7500, 0xff80, [](P) -> u32 { util::stream_format(stream, "mcf %02x", opcode & 0x7f); return 1; } },
+ { 0xfc22, 0xffff, [](P) -> u32 { util::stream_format(stream, "ccc"); return 1; } },
+ { 0xfc40, 0xffff, [](P) -> u32 { util::stream_format(stream, "rlp"); return 1; } },
+ { 0xfc80, 0xffff, [](P) -> u32 { util::stream_format(stream, "csp"); return 1; } },
+ { 0xfb00, 0xffff, [](P) -> u32 { util::stream_format(stream, "cst"); return 1; } },
+ { 0xe802, 0xffff, [](P) -> u32 { util::stream_format(stream, "scex"); return 1; } },
+ { 0xec02, 0xffff, [](P) -> u32 { util::stream_format(stream, "rcex"); return 1; } },
+ { 0xf000, 0xfffc, [](P) -> u32 { util::stream_format(stream, "schf %x", opcode & 3); return 1; } },
+ { 0xf400, 0xfffc, [](P) -> u32 { util::stream_format(stream, "rchf %x", opcode & 3); return 1; } },
+
+ { 0x7180, 0xff80, [](P) -> u32 { util::stream_format(stream, "ipp %02x", opcode & 0x7f); return 1; } },
+ { 0x7000, 0xff80, [](P) -> u32 { util::stream_format(stream, "ips %02x", opcode & 0x7f); return 1; } },
+ { 0x7080, 0xff80, [](P) -> u32 { util::stream_format(stream, "ipm %02x", opcode & 0x7f); return 1; } },
+ { 0x7100, 0xff80, [](P) -> u32 { util::stream_format(stream, "ipk %02x", opcode & 0x7f); return 1; } },
+ { 0x0080, 0xff80, [](P) -> u32 { util::stream_format(stream, "opp %02x", opcode & 0x7f); return 1; } },
+ { 0x0f00, 0xff80, [](P) -> u32 { util::stream_format(stream, "opm %02x", opcode & 0x7f); return 1; } },
+ { 0xe804, 0xffff, [](P) -> u32 { util::stream_format(stream, "sct1"); return 1; } },
+ { 0xec04, 0xffff, [](P) -> u32 { util::stream_format(stream, "rct1"); return 1; } },
+ { 0xf200, 0xffff, [](P) -> u32 { util::stream_format(stream, "sct2"); return 1; } },
+ { 0xf600, 0xffff, [](P) -> u32 { util::stream_format(stream, "rct2"); return 1; } },
+ { 0xf010, 0xffff, [](P) -> u32 { util::stream_format(stream, "slgt"); return 1; } },
+ { 0xf410, 0xffff, [](P) -> u32 { util::stream_format(stream, "rlgt"); return 1; } },
+ { 0xf800, 0xffff, [](P) -> u32 { util::stream_format(stream, "ras"); return 1; } },
+ { 0xf800, 0xfe00, [](P) -> u32 { util::stream_format(stream, "sas %03x", opcode & 0x1ff); return 1; } },
+ { 0xe800, 0xff9f, [](P) -> u32 { util::stream_format(stream, "comd %x", (opcode >> 5) & 3); return 1; } },
+ { 0xec00, 0xff9f, [](P) -> u32 { util::stream_format(stream, "cimd %x", (opcode >> 5) & 3); return 1; } },
+ { 0xf000, 0xfe1f, [](P) -> u32 { util::stream_format(stream, "spdf %x", (opcode >> 5) & 3); return 1; } },
+ { 0xf400, 0xfe1f, [](P) -> u32 { util::stream_format(stream, "rpdf %x", (opcode >> 5) & 3); return 1; } },
+ { 0xe808, 0xffff, [](P) -> u32 { util::stream_format(stream, "sfsp"); return 1; } },
+ { 0xec08, 0xffff, [](P) -> u32 { util::stream_format(stream, "rfsp"); return 1; } },
+ { 0x0000, 0xf000, [](P) -> u32 { util::stream_format(stream, "wrt %02x, %02x", (opcode >> 7) & 0x1f, opcode & 0x7f); return 1; } },
+ { 0x1000, 0xf000, [](P) -> u32 { util::stream_format(stream, "wrb %02x, %02x", (opcode >> 7) & 0x1f, opcode & 0x7f); return 1; } },
+ { 0x2000, 0xf000, [](P) -> u32 { util::stream_format(stream, "wrc %02x, %02x", (opcode >> 7) & 0x1f, opcode & 0x7f); return 1; } },
+ { 0x3000, 0xf000, [](P) -> u32 { util::stream_format(stream, "wrp %02x, %02x", (opcode >> 7) & 0x1f, opcode & 0x7f); return 1; } },
+
+ { 0xc000, 0xf800, [](P) -> u32 { util::stream_format(stream, "jmp %03x", opcode & 0x7ff); return 1; } },
+ { 0x8000, 0xf800, [](P) -> u32 { util::stream_format(stream, "bab0 %03x", opcode & 0x7ff); return 1; } },
+ { 0x8800, 0xf800, [](P) -> u32 { util::stream_format(stream, "bab1 %03x", opcode & 0x7ff); return 1; } },
+ { 0x9000, 0xf800, [](P) -> u32 { util::stream_format(stream, "bab2 %03x", opcode & 0x7ff); return 1; } },
+ { 0x9800, 0xf800, [](P) -> u32 { util::stream_format(stream, "bab3 %03x", opcode & 0x7ff); return 1; } },
+ { 0xa000, 0xf800, [](P) -> u32 { util::stream_format(stream, "banz %03x", opcode & 0x7ff); return 1; } },
+ { 0xb000, 0xf800, [](P) -> u32 { util::stream_format(stream, "baz %03x", opcode & 0x7ff); return 1; } },
+ { 0xa800, 0xf800, [](P) -> u32 { util::stream_format(stream, "bcnh %03x", opcode & 0x7ff); return 1; } },
+ { 0xb800, 0xf800, [](P) -> u32 { util::stream_format(stream, "bch %03x", opcode & 0x7ff); return 1; } },
+
+ { 0xc800, 0xf800, [](P) -> u32 { util::stream_format(stream, "call %03x", opcode & 0x7ff); return 1 | STEP_OVER; } },
+ { 0xd000, 0xffff, [](P) -> u32 { util::stream_format(stream, "rts"); return 1 | STEP_OUT; } },
+ { 0xd800, 0xffff, [](P) -> u32 { util::stream_format(stream, "pop"); return 1; } },
+
+ { 0xe400, 0xfc00, [](P) -> u32 { util::stream_format(stream, "stm %03x", opcode & 0x7ff); return 1; } },
+ { 0xfc04, 0xffff, [](P) -> u32 { util::stream_format(stream, "rtm"); return 1 | STEP_OUT; } },
+ { 0xf810, 0xffff, [](P) -> u32 { util::stream_format(stream, "sfpd"); return 1 | STEP_OUT; } },
+ { 0xfc10, 0xffff, [](P) -> u32 { util::stream_format(stream, "rfpd"); return 1 | STEP_OUT; } },
+ { 0xfc00, 0xfe00, [](P) -> u32 { util::stream_format(stream, "plc %03x", opcode & 0x1ff); return 1 | STEP_OVER; } },
+
+ { 0x0000, 0x0000, [](P) -> u32 { util::stream_format(stream, "?%04x", opcode); return 1; } },
+};
+
+#undef P
+
+offs_t lc58_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
+{
+ u16 opcode = opcodes.r16(pc);
+
+ for(u32 i=0;; i++)
+ if((opcode & instructions[i].mask) == instructions[i].value)
+ return instructions[i].cb(stream, this, opcode) | SUPPORTED;
+ return 0;
+}
diff --git a/src/devices/cpu/lc58/lc58d.h b/src/devices/cpu/lc58/lc58d.h
new file mode 100644
index 00000000000..6a570c10f02
--- /dev/null
+++ b/src/devices/cpu/lc58/lc58d.h
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// Sanyo LC58 generic disassembler
+
+#ifndef MAME_CPU_LC58_LC58D_H
+#define MAME_CPU_LC58_LC58D_H
+
+#pragma once
+
+class lc58_disassembler : public util::disasm_interface
+{
+public:
+ lc58_disassembler() = default;
+ virtual ~lc58_disassembler() = default;
+
+ virtual u32 opcode_alignment() const override;
+ virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
+
+private:
+ struct instruction {
+ u16 value;
+ u16 mask;
+ u32 (*cb)(std::ostream &, const lc58_disassembler *, u16);
+ };
+
+ static const instruction instructions[];
+};
+
+#endif // MAME_CPU_LC58_LC58D_H
diff --git a/src/devices/cpu/m6502/n2a03.cpp b/src/devices/cpu/m6502/n2a03.cpp
index f303f1bf1b6..e1731b62e75 100644
--- a/src/devices/cpu/m6502/n2a03.cpp
+++ b/src/devices/cpu/m6502/n2a03.cpp
@@ -12,6 +12,7 @@
#include "n2a03.h"
#include "n2a03d.h"
+DEFINE_DEVICE_TYPE(N2A03_CORE, n2a03_core_device, "n2a03_core", "Ricoh N2A03 core") // needed for some VT systems with XOP instead of standard APU
DEFINE_DEVICE_TYPE(N2A03, n2a03_device, "n2a03", "Ricoh N2A03")
uint8_t n2a03_device::psg1_4014_r()
@@ -51,15 +52,29 @@ void n2a03_device::n2a03_map(address_map &map)
+n2a03_core_device::n2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : m6502_device(mconfig, type, tag, owner, clock)
+{
+}
+
+n2a03_core_device::n2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : n2a03_core_device(mconfig, N2A03_CORE, tag, owner, clock)
+{
+}
+
+
+
n2a03_device::n2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : m6502_device(mconfig, N2A03, tag, owner, clock)
+ : n2a03_core_device(mconfig, N2A03, tag, owner, clock)
, device_mixer_interface(mconfig, *this, 1)
, m_apu(*this, "nesapu")
{
program_config.m_internal_map = address_map_constructor(FUNC(n2a03_device::n2a03_map), this);
}
-std::unique_ptr<util::disasm_interface> n2a03_device::create_disassembler()
+
+
+std::unique_ptr<util::disasm_interface> n2a03_core_device::create_disassembler()
{
return std::make_unique<n2a03_disassembler>();
}
diff --git a/src/devices/cpu/m6502/n2a03.h b/src/devices/cpu/m6502/n2a03.h
index 5a57bcbed2b..4232093c7a5 100644
--- a/src/devices/cpu/m6502/n2a03.h
+++ b/src/devices/cpu/m6502/n2a03.h
@@ -15,22 +15,18 @@
#include "m6502.h"
#include "sound/nes_apu.h"
-class n2a03_device : public m6502_device, public device_mixer_interface {
+class n2a03_core_device : public m6502_device {
public:
- n2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ n2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
virtual void do_exec_full() override;
virtual void do_exec_partial() override;
- uint8_t psg1_4014_r();
- uint8_t psg1_4015_r();
- void psg1_4015_w(uint8_t data);
- void psg1_4017_w(uint8_t data);
-
- void n2a03_map(address_map &map);
protected:
+ n2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
#define O(o) void o ## _full(); void o ## _partial()
// n2a03 opcodes - same as 6502 with D disabled
@@ -42,6 +38,21 @@ protected:
#undef O
+private:
+};
+
+class n2a03_device : public n2a03_core_device, public device_mixer_interface {
+public:
+ n2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ uint8_t psg1_4014_r();
+ uint8_t psg1_4015_r();
+ void psg1_4015_w(uint8_t data);
+ void psg1_4017_w(uint8_t data);
+
+ void n2a03_map(address_map &map);
+protected:
+
required_device<nesapu_device> m_apu;
virtual void device_add_mconfig(machine_config &config) override;
@@ -52,6 +63,7 @@ private:
};
+
/* These are the official XTAL values and clock rates used by Nintendo for
manufacturing throughout the production of the 2A03. PALC_APU_CLOCK is
the clock rate devised by UMC(?) for PAL Famicom clone hardware. */
@@ -69,6 +81,7 @@ enum {
N2A03_SET_OVERFLOW = m6502_device::V_LINE
};
+DECLARE_DEVICE_TYPE(N2A03_CORE, n2a03_core_device)
DECLARE_DEVICE_TYPE(N2A03, n2a03_device)
#endif // MAME_CPU_M6502_N2A03_H
diff --git a/src/devices/cpu/ns32000/ns32000.cpp b/src/devices/cpu/ns32000/ns32000.cpp
index 4b796f8f345..d4801f3c079 100644
--- a/src/devices/cpu/ns32000/ns32000.cpp
+++ b/src/devices/cpu/ns32000/ns32000.cpp
@@ -83,7 +83,7 @@ static const u32 size_mask[] = { 0x000000ffU, 0x0000ffffU, 0x00000000U, 0xffffff
#define SP ((m_psr & PSR_S) ? m_sp1 : m_sp0)
-ns32000_device::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int databits, int addrbits)
+template <int Width>ns32000_device<Width>::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int databits, int addrbits)
: cpu_device(mconfig, type, tag, owner, clock)
, m_program_config("program", ENDIANNESS_LITTLE, databits, addrbits, 0)
, m_interrupt_config("interrupt", ENDIANNESS_LITTLE, databits, addrbits, 0)
@@ -106,7 +106,7 @@ ns32032_device::ns32032_device(const machine_config &mconfig, const char *tag, d
{
}
-void ns32000_device::device_start()
+template <int Width> void ns32000_device<Width>::device_start()
{
set_icountptr(m_icount);
@@ -152,7 +152,7 @@ void ns32000_device::device_start()
// state_add(8 + i, util::string_format("F%d", i).c_str(), m_f[i]);
}
-void ns32000_device::device_reset()
+template <int Width> void ns32000_device<Width>::device_reset()
{
for (std::pair<int, address_space_config const *> s : memory_space_config())
space(has_configured_map(s.first) ? s.first : 0).cache(m_bus[s.first]);
@@ -166,7 +166,7 @@ void ns32000_device::device_reset()
m_wait = false;
}
-void ns32000_device::state_string_export(device_state_entry const &entry, std::string &str) const
+template <int Width> void ns32000_device<Width>::state_string_export(device_state_entry const &entry, std::string &str) const
{
switch (entry.index())
{
@@ -186,7 +186,7 @@ void ns32000_device::state_string_export(device_state_entry const &entry, std::s
}
}
-s32 ns32000_device::displacement(unsigned &bytes)
+template <int Width> s32 ns32000_device<Width>::displacement(unsigned &bytes)
{
s32 disp = space(0).read_byte(m_pc + bytes);
if (BIT(disp, 7))
@@ -214,7 +214,7 @@ s32 ns32000_device::displacement(unsigned &bytes)
return disp;
}
-void ns32000_device::decode(addr_mode *mode, unsigned imm_size, unsigned &bytes)
+template <int Width> void ns32000_device<Width>::decode(addr_mode *mode, unsigned imm_size, unsigned &bytes)
{
bool scaled[] = { false, false };
@@ -325,7 +325,7 @@ void ns32000_device::decode(addr_mode *mode, unsigned imm_size, unsigned &bytes)
}
}
-u32 ns32000_device::ea(addr_mode const mode)
+template <int Width> u32 ns32000_device<Width>::ea(addr_mode const mode)
{
u32 base;
@@ -352,7 +352,7 @@ u32 ns32000_device::ea(addr_mode const mode)
return base + mode.disp;
}
-u64 ns32000_device::gen_read(addr_mode mode, unsigned size)
+template <int Width> u64 ns32000_device<Width>::gen_read(addr_mode mode, unsigned size)
{
u64 data = 0;
@@ -396,7 +396,7 @@ u64 ns32000_device::gen_read(addr_mode mode, unsigned size)
return data;
}
-s64 ns32000_device::gen_read_sx(addr_mode mode, unsigned size)
+template <int Width> s64 ns32000_device<Width>::gen_read_sx(addr_mode mode, unsigned size)
{
u64 data = gen_read(mode, size);
@@ -411,7 +411,7 @@ s64 ns32000_device::gen_read_sx(addr_mode mode, unsigned size)
return data;
}
-void ns32000_device::gen_write(addr_mode mode, unsigned size, u64 data)
+template <int Width> void ns32000_device<Width>::gen_write(addr_mode mode, unsigned size, u64 data)
{
switch (mode.type)
{
@@ -450,7 +450,7 @@ void ns32000_device::gen_write(addr_mode mode, unsigned size, u64 data)
}
}
-bool ns32000_device::condition(unsigned const cc)
+template <int Width> bool ns32000_device<Width>::condition(unsigned const cc)
{
switch (cc & 15)
{
@@ -492,7 +492,7 @@ bool ns32000_device::condition(unsigned const cc)
return false;
}
-void ns32000_device::flags(u32 const src1, u32 const src2, u32 const dest, unsigned const size, bool const subtraction)
+template <int Width> void ns32000_device<Width>::flags(u32 const src1, u32 const src2, u32 const dest, unsigned const size, bool const subtraction)
{
unsigned const sign_bit = (size + 1) * 8 - 1;
@@ -508,7 +508,7 @@ void ns32000_device::flags(u32 const src1, u32 const src2, u32 const dest, unsig
m_psr |= PSR_F;
}
-void ns32000_device::interrupt(unsigned const vector, u32 const return_address, bool const trap)
+template <int Width> void ns32000_device<Width>::interrupt(unsigned const vector, u32 const return_address, bool const trap)
{
// clear trace pending flag
if (vector == TRC)
@@ -543,7 +543,7 @@ void ns32000_device::interrupt(unsigned const vector, u32 const return_address,
// TODO: flush queue
}
-void ns32000_device::execute_run()
+template <int Width> void ns32000_device<Width>::execute_run()
{
while (m_icount > 0)
{
@@ -866,16 +866,16 @@ void ns32000_device::execute_run()
m_psr &= ~(PSR_N | PSR_Z | PSR_L);
if ((size == SIZE_D && s32(src1) > s32(src2))
- || ((size == SIZE_W && s16(src1) > s16(src2))
- || ((size == SIZE_B && s8(src1) > s8(src2)))))
+ || ((size == SIZE_W && s16(src1) > s16(src2))
+ || ((size == SIZE_B && s8(src1) > s8(src2)))))
m_psr |= PSR_N;
if (src1 == src2)
m_psr |= PSR_Z;
if ((size == SIZE_D && u32(src1) > u32(src2))
- || ((size == SIZE_W && u16(src1) > u16(src2))
- || ((size == SIZE_B && u8(src1) > u8(src2)))))
+ || ((size == SIZE_W && u16(src1) > u16(src2))
+ || ((size == SIZE_B && u8(src1) > u8(src2)))))
m_psr |= PSR_L;
}
m_pc += bytes;
@@ -1160,16 +1160,16 @@ void ns32000_device::execute_run()
m_psr &= ~(PSR_N | PSR_Z | PSR_L);
if ((size == SIZE_D && s32(src1) > s32(src2))
- || ((size == SIZE_W && s16(src1) > s16(src2))
- || ((size == SIZE_B && s8(src1) > s8(src2)))))
+ || ((size == SIZE_W && s16(src1) > s16(src2))
+ || ((size == SIZE_B && s8(src1) > s8(src2)))))
m_psr |= PSR_N;
if (src1 == src2)
m_psr |= PSR_Z;
if ((size == SIZE_D && u32(src1) > u32(src2))
- || ((size == SIZE_W && u16(src1) > u16(src2))
- || ((size == SIZE_B && u8(src1) > u8(src2)))))
+ || ((size == SIZE_W && u16(src1) > u16(src2))
+ || ((size == SIZE_B && u8(src1) > u8(src2)))))
m_psr |= PSR_L;
}
m_pc += bytes;
@@ -1420,13 +1420,13 @@ void ns32000_device::execute_run()
m_psr &= ~PSR_Z;
if ((size == SIZE_D && s32(src1) > s32(src2))
- || ((size == SIZE_W && s16(src1) > s16(src2))
- || ((size == SIZE_B && s8(src1) > s8(src2)))))
+ || ((size == SIZE_W && s16(src1) > s16(src2))
+ || ((size == SIZE_B && s8(src1) > s8(src2)))))
m_psr |= PSR_N;
if ((size == SIZE_D && u32(src1) > u32(src2))
- || ((size == SIZE_W && u16(src1) > u16(src2))
- || ((size == SIZE_B && u8(src1) > u8(src2)))))
+ || ((size == SIZE_W && u16(src1) > u16(src2))
+ || ((size == SIZE_B && u8(src1) > u8(src2)))))
m_psr |= PSR_L;
break;
@@ -2249,6 +2249,18 @@ void ns32000_device::execute_run()
break;
case 0x1e: // format 14
// TODO: mmu
+ {
+ u16 const opword = space(0).read_word_unaligned(m_pc + bytes);
+ bytes += 2;
+
+ addr_mode mode[] = { addr_mode((opword >> 11) & 31), addr_mode(0x13) };
+
+ //unsigned const quick = (opword >> 7) & 15;
+ unsigned const size = opword & 3;
+
+ decode(mode, size, bytes);
+ }
+ m_pc += bytes;
break;
case 0x16: // format 15.0
case 0x36: // format 15.1
@@ -2279,7 +2291,7 @@ void ns32000_device::execute_run()
}
}
-void ns32000_device::execute_set_input(int inputnum, int state)
+template <int Width> void ns32000_device<Width>::execute_set_input(int inputnum, int state)
{
if (state)
m_wait = false;
@@ -2298,7 +2310,7 @@ void ns32000_device::execute_set_input(int inputnum, int state)
}
}
-device_memory_interface::space_config_vector ns32000_device::memory_space_config() const
+template <int Width> device_memory_interface::space_config_vector ns32000_device<Width>::memory_space_config() const
{
return space_config_vector{
std::make_pair(AS_PROGRAM, &m_program_config),
@@ -2312,12 +2324,12 @@ device_memory_interface::space_config_vector ns32000_device::memory_space_config
};
}
-bool ns32000_device::memory_translate(int spacenum, int intention, offs_t &address)
+template <int Width> bool ns32000_device<Width>::memory_translate(int spacenum, int intention, offs_t &address)
{
return true;
}
-std::unique_ptr<util::disasm_interface> ns32000_device::create_disassembler()
+template <int Width> std::unique_ptr<util::disasm_interface> ns32000_device<Width>::create_disassembler()
{
return std::make_unique<ns32000_disassembler>();
}
diff --git a/src/devices/cpu/ns32000/ns32000.h b/src/devices/cpu/ns32000/ns32000.h
index af5977fe52e..800b6982a5d 100644
--- a/src/devices/cpu/ns32000/ns32000.h
+++ b/src/devices/cpu/ns32000/ns32000.h
@@ -6,6 +6,7 @@
#pragma once
+template <int Width>
class ns32000_device : public cpu_device
{
public:
@@ -87,7 +88,7 @@ private:
// emulation state
int m_icount;
- memory_access<24, 1, 0, ENDIANNESS_LITTLE>::cache m_bus[16];
+ typename memory_access<24, Width, 0, ENDIANNESS_LITTLE>::cache m_bus[16];
u32 m_pc; // program counter
u32 m_sb; // static base
@@ -107,19 +108,19 @@ private:
bool m_wait;
};
-class ns32008_device : public ns32000_device
+class ns32008_device : public ns32000_device<0>
{
public:
ns32008_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
};
-class ns32016_device : public ns32000_device
+class ns32016_device : public ns32000_device<1>
{
public:
ns32016_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
};
-class ns32032_device : public ns32000_device
+class ns32032_device : public ns32000_device<2>
{
public:
ns32032_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index d5fd882a484..ab820fc1599 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -1178,7 +1178,7 @@ uint32_t tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bi
params.heblnk = params.hsblnk = cliprect.max_x + 1;
/* blank out the blank regions */
- uint16_t *dest = &bitmap.pix16(cliprect.min_y);
+ uint16_t *dest = &bitmap.pix(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_x; x++)
@@ -1209,7 +1209,7 @@ uint32_t tms340x0_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bi
params.heblnk = params.hsblnk = cliprect.max_x + 1;
/* blank out the blank regions */
- uint32_t *dest = &bitmap.pix32(cliprect.min_y);
+ uint32_t *dest = &bitmap.pix(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_x; x++)
diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp
index 981356ebcd2..89fdcc8d817 100644
--- a/src/devices/cpu/tms9900/tms9995.cpp
+++ b/src/devices/cpu/tms9900/tms9995.cpp
@@ -220,6 +220,8 @@ void tms9995_device::device_start()
m_source_value = 0;
+ m_index = 0;
+
// add the states for the debugger
for (int i=0; i < 20; i++)
{
@@ -242,7 +244,7 @@ void tms9995_device::device_start()
save_item(NAME(PC));
save_item(NAME(ST));
// save_item(NAME(PC_debug)); // only for debugger output
- save_pointer(NAME(m_onchip_memory),256);
+ save_item(NAME(m_onchip_memory));
save_item(NAME(m_idle_state));
save_item(NAME(m_nmi_state));
save_item(NAME(m_hold_state));
@@ -285,7 +287,7 @@ void tms9995_device::device_start()
save_item(NAME(m_cru_address));
save_item(NAME(m_cru_value));
save_item(NAME(m_cru_first_read));
- save_pointer(NAME(m_flag),16);
+ save_item(NAME(m_flag));
save_item(NAME(IR));
save_item(NAME(m_pre_IR));
save_item(NAME(m_command));
diff --git a/src/devices/cpu/vt50/vt50.cpp b/src/devices/cpu/vt50/vt50.cpp
index 961dca5aa2c..7a964c4be5b 100644
--- a/src/devices/cpu/vt50/vt50.cpp
+++ b/src/devices/cpu/vt50/vt50.cpp
@@ -284,7 +284,7 @@ void vt5x_cpu_device::draw_char_line()
if (xc > screen().visible_area().right() - 8)
return;
- u32 *pix = &m_bitmap.pix32(m_current_line, xc);
+ u32 *pix = &m_bitmap.pix(m_current_line, xc);
if (m_video_process && m_cursor_ff && m_cursor_active)
std::fill_n(pix, 9, rgb_t::white());
else if (!m_video_process || m_cursor_ff)
diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp
index c6e20ba66dd..38f5fcfb059 100644
--- a/src/devices/imagedev/cassette.cpp
+++ b/src/devices/imagedev/cassette.cpp
@@ -236,7 +236,7 @@ void cassette_image_device::device_start()
m_state = m_default_state;
m_value = 0;
- stream_alloc_legacy(0, (m_stereo? 2:1), machine().sample_rate());
+ stream_alloc(0, m_stereo? 2:1, machine().sample_rate());
}
image_init_result cassette_image_device::call_create(int format_type, util::option_resolution *format_options)
@@ -404,37 +404,29 @@ std::string cassette_image_device::call_display()
// Cassette sound
//-------------------------------------------------
-void cassette_image_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void cassette_image_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- stream_sample_t *left_buffer = outputs[0];
- stream_sample_t *right_buffer = nullptr;
-
- if (m_stereo)
- right_buffer = outputs[1];
-
cassette_state state = get_state() & (CASSETTE_MASK_UISTATE | CASSETTE_MASK_MOTOR | CASSETTE_MASK_SPEAKER);
if (exists() && (state == (CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)))
{
cassette_image *cassette = get_image();
double time_index = get_position();
- double duration = ((double) samples) / machine().sample_rate();
+ double duration = ((double) outputs[0].samples()) / outputs[0].sample_rate();
- cassette_get_samples(cassette, 0, time_index, duration, samples, 2, left_buffer, CASSETTE_WAVEFORM_16BIT);
- if (m_stereo)
- cassette_get_samples(cassette, 1, time_index, duration, samples, 2, right_buffer, CASSETTE_WAVEFORM_16BIT);
+ if (m_samples.size() < outputs[0].samples())
+ m_samples.resize(outputs[0].samples());
- for (int i = samples - 1; i >= 0; i--)
+ for (int ch = 0; ch < outputs.size(); ch++)
{
- left_buffer[i] = ((int16_t *) left_buffer)[i];
- if (m_stereo)
- right_buffer[i] = ((int16_t *) right_buffer)[i];
+ cassette_get_samples(cassette, 0, time_index, duration, outputs[0].samples(), 2, &m_samples[0], CASSETTE_WAVEFORM_16BIT);
+ for (int sampindex = 0; sampindex < outputs[ch].samples(); sampindex++)
+ outputs[ch].put_int(sampindex, m_samples[sampindex], 32768);
}
}
else
{
- memset(left_buffer, 0, sizeof(*left_buffer) * samples);
- if (m_stereo)
- memset(right_buffer, 0, sizeof(*right_buffer) * samples);
+ for (int ch = 0; ch < outputs.size(); ch++)
+ outputs[ch].fill(0);
}
}
diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h
index a661e8312a8..ae3af3c6429 100644
--- a/src/devices/imagedev/cassette.h
+++ b/src/devices/imagedev/cassette.h
@@ -102,7 +102,7 @@ public:
void seek(double time, int origin);
// sound stream update overrides
- void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
device_sound_interface& set_stereo() { m_stereo = true; return *this; }
protected:
@@ -133,6 +133,7 @@ private:
image_init_result internal_load(bool is_create);
bool m_stereo;
+ std::vector<s16> m_samples;
};
// device type definition
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
index 3dd96644f1a..f39be79c761 100644
--- a/src/devices/imagedev/floppy.cpp
+++ b/src/devices/imagedev/floppy.cpp
@@ -1248,7 +1248,7 @@ void floppy_sound_device::device_start()
// If we don't have all samples, don't allocate a stream or access sample data.
if (m_loaded)
{
- m_sound = stream_alloc_legacy(0, 1, clock()); // per-floppy stream
+ m_sound = stream_alloc(0, 1, clock()); // per-floppy stream
}
register_for_save_states();
}
@@ -1369,21 +1369,21 @@ void floppy_sound_device::step(int zone)
}
//-------------------------------------------------
-// sound_stream_update_legacy - update the sound stream
+// sound_stream_update - update the sound stream
//-------------------------------------------------
-void floppy_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
// We are using only one stream, unlike the parent class
// Also, there is no need for interpolation, as we only expect
// one sample rate of 44100 for all samples
int16_t out;
- stream_sample_t *samplebuffer = outputs[0];
+ auto &samplebuffer = outputs[0];
int idx = 0;
int sampleend = 0;
- while (samples-- > 0)
+ for (int sampindex = 0; sampindex < samplebuffer.samples(); sampindex++)
{
out = 0;
@@ -1477,7 +1477,7 @@ void floppy_sound_device::sound_stream_update_legacy(sound_stream &stream, strea
}
// Write to the stream buffer
- *(samplebuffer++) = out;
+ samplebuffer.put_int(sampindex, out, 32768);
}
}
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index d07a12c146c..515cf28f610 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -294,7 +294,7 @@ protected:
private:
// device_sound_interface overrides
- void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
sound_stream* m_sound;
int m_step_base;
diff --git a/src/devices/imagedev/picture.cpp b/src/devices/imagedev/picture.cpp
index f80bfb2885e..e50f2c0d4c6 100644
--- a/src/devices/imagedev/picture.cpp
+++ b/src/devices/imagedev/picture.cpp
@@ -25,8 +25,7 @@ DEFINE_DEVICE_TYPE(IMAGE_PICTURE, picture_image_device, "picture_image", "Still
picture_image_device::picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, IMAGE_PICTURE, tag, owner, clock),
- device_image_interface(mconfig, *this),
- m_picture(nullptr)
+ device_image_interface(mconfig, *this)
{
}
@@ -36,11 +35,6 @@ picture_image_device::picture_image_device(const machine_config &mconfig, const
picture_image_device::~picture_image_device()
{
- if (m_picture)
- {
- delete m_picture;
- m_picture = nullptr;
- }
}
@@ -50,11 +44,9 @@ void picture_image_device::device_start()
image_init_result picture_image_device::call_load()
{
- m_picture = new bitmap_argb32;
- if (png_read_bitmap(image_core_file(), *m_picture) != PNGERR_NONE)
+ if (png_read_bitmap(image_core_file(), m_picture) != PNGERR_NONE)
{
- delete m_picture;
- m_picture = nullptr;
+ m_picture.reset();
// todo: try JPEG here.
return image_init_result::FAIL;
@@ -65,9 +57,8 @@ image_init_result picture_image_device::call_load()
void picture_image_device::call_unload()
{
- if (m_picture)
+ if (m_picture.valid())
{
- delete m_picture;
- m_picture = nullptr;
+ m_picture.reset();
}
}
diff --git a/src/devices/imagedev/picture.h b/src/devices/imagedev/picture.h
index f8601345a89..1780a563318 100644
--- a/src/devices/imagedev/picture.h
+++ b/src/devices/imagedev/picture.h
@@ -41,14 +41,14 @@ public:
virtual bool is_reset_on_load() const noexcept override { return false; }
virtual const char *file_extensions() const noexcept override { return "png"; }
- bitmap_argb32 &get_bitmap() { return *m_picture; }
+ const bitmap_argb32 &get_bitmap() { return m_picture; }
protected:
// device-level overrides
virtual void device_start() override;
private:
- bitmap_argb32 *m_picture;
+ bitmap_argb32 m_picture;
};
diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp
index 1e10ca55b3e..6869ffb3395 100644
--- a/src/devices/machine/8364_paula.cpp
+++ b/src/devices/machine/8364_paula.cpp
@@ -58,7 +58,7 @@ void paula_8364_device::device_start()
}
// create the stream
- m_stream = stream_alloc_legacy(0, 4, clock() / CLOCK_DIVIDER);
+ m_stream = stream_alloc(0, 4, clock() / CLOCK_DIVIDER);
}
//-------------------------------------------------
@@ -159,10 +159,10 @@ void paula_8364_device::dma_reload(audio_channel *chan)
}
//-------------------------------------------------
-// sound_stream_update_legacy - handle a stream update
+// sound_stream_update - handle a stream update
//-------------------------------------------------
-void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void paula_8364_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
int channum, sampoffs = 0;
@@ -176,11 +176,11 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
// clear the sample data to 0
for (channum = 0; channum < 4; channum++)
- memset(outputs[channum], 0, sizeof(stream_sample_t) * samples);
+ outputs[channum].fill(0);
return;
}
- samples *= CLOCK_DIVIDER;
+ int samples = outputs[0].samples() * CLOCK_DIVIDER;
// update the DMA states on each channel and reload if fresh
for (channum = 0; channum < 4; channum++)
@@ -215,7 +215,7 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
audio_channel *chan = &m_channel[channum];
int volume = (nextvol == -1) ? chan->vol : nextvol;
int period = (nextper == -1) ? chan->per : nextper;
- stream_sample_t sample;
+ s32 sample;
int i;
// normalize the volume value
@@ -247,7 +247,7 @@ void paula_8364_device::sound_stream_update_legacy(sound_stream &stream, stream_
// fill the buffer with the sample
for (i = 0; i < ticks; i += CLOCK_DIVIDER)
- outputs[channum][(sampoffs + i) / CLOCK_DIVIDER] = sample;
+ outputs[channum].put_int((sampoffs + i) / CLOCK_DIVIDER, sample, 32768);
// account for the ticks; if we hit 0, advance
chan->curticks -= ticks;
diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h
index a2ac2feab26..9fa7a6ebf38 100644
--- a/src/devices/machine/8364_paula.h
+++ b/src/devices/machine/8364_paula.h
@@ -68,7 +68,7 @@ protected:
virtual void device_start() override;
// sound stream update overrides
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
private:
enum
diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp
index 36733555e7d..f0ebf10f612 100644
--- a/src/devices/machine/acorn_vidc.cpp
+++ b/src/devices/machine/acorn_vidc.cpp
@@ -492,9 +492,9 @@ void acorn_vidc10_device::draw(bitmap_rgb32 &bitmap, const rectangle &cliprect,
if (is_cursor == true && dot == 0)
continue;
dot += pen_base;
- bitmap.pix32(dsty, dstx+xi) = this->pen(dot);
+ bitmap.pix(dsty, dstx+xi) = this->pen(dot);
if (m_crtc_interlace)
- bitmap.pix32(dsty+1, dstx+xi) = this->pen(dot);
+ bitmap.pix(dsty+1, dstx+xi) = this->pen(dot);
}
}
}
diff --git a/src/devices/machine/am9519.h b/src/devices/machine/am9519.h
index 315e0bd890d..ec84cd50e52 100644
--- a/src/devices/machine/am9519.h
+++ b/src/devices/machine/am9519.h
@@ -32,7 +32,7 @@
class am9519_device : public device_t
{
public:
- am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
auto out_int_callback() { return m_out_int_func.bind(); }
diff --git a/src/devices/machine/bq4847.cpp b/src/devices/machine/bq4847.cpp
index 09afd9b9424..7dd9031c814 100644
--- a/src/devices/machine/bq4847.cpp
+++ b/src/devices/machine/bq4847.cpp
@@ -305,6 +305,8 @@ uint8_t bq4847_device::read(offs_t address)
set_register(reg_flags, 0xff, false);
m_interrupt_cb(intrq_r());
}
+ else
+ if (regnum == reg_unused) value = 0; // Reg 15 is locked to 0 in BQ4847
LOGMASKED(LOG_REG, "Reg %d -> %02x\n", regnum, value);
diff --git a/src/devices/machine/exorterm.cpp b/src/devices/machine/exorterm.cpp
index 0b62597e3f1..9db3f0658e4 100644
--- a/src/devices/machine/exorterm.cpp
+++ b/src/devices/machine/exorterm.cpp
@@ -348,7 +348,7 @@ u32 exorterm155_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
u16 sy = 0, ma = 0;
u8 disable_fac = m_disable_fac->read() == 0;
u8 display_fac = m_display_fac->read() == 0;
- const rgb_t *palette = m_palette->palette()->entry_list_raw();
+ rgb_t const *const palette = m_palette->palette()->entry_list_raw();
m_framecnt++;
@@ -356,7 +356,7 @@ u32 exorterm155_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
{
for (u8 ra = 0; ra < 12; ra++)
{
- u32 *p = &bitmap.pix32(sy++);
+ u32 *p = &bitmap.pix(sy++);
// FAC codes are cleared on horizontal sync.
u8 underline1 = 0;
u8 underline2 = 0;
diff --git a/src/devices/machine/ie15.cpp b/src/devices/machine/ie15.cpp
index 3cdb35af145..eba7ace6fa7 100644
--- a/src/devices/machine/ie15.cpp
+++ b/src/devices/machine/ie15.cpp
@@ -637,7 +637,8 @@ void ie15_device::scanline_callback()
uint32_t ie15_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
update_leds();
- memcpy(&bitmap.pix32(0), &m_tmpbmp[0], sizeof(uint32_t) * IE15_TOTAL_HORZ * IE15_TOTAL_VERT);
+ for (int y = 0; y < IE15_TOTAL_VERT; y++)
+ std::copy_n(&m_tmpbmp[y * IE15_TOTAL_HORZ], IE15_TOTAL_HORZ, &bitmap.pix(y));
return 0;
}
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index ef3df359859..d04d3c1201a 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -308,11 +308,11 @@ void laserdisc_device::device_timer(emu_timer &timer, device_timer_id id, int pa
//-------------------------------------------------
-// sound_stream_update_legacy - audio streamer for
+// sound_stream_update - audio streamer for
// laserdiscs
//-------------------------------------------------
-void laserdisc_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void laserdisc_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
// compute AND values based on the squelch
int16_t leftand = (m_audiosquelch & 1) ? 0x0000 : 0xffff;
@@ -324,12 +324,12 @@ void laserdisc_device::sound_stream_update_legacy(sound_stream &stream, stream_s
samples_avail += m_audiobufsize;
// if no attached ld, just clear the buffers
- stream_sample_t *dst0 = outputs[0];
- stream_sample_t *dst1 = outputs[1];
- if (samples_avail < samples)
+ auto &dst0 = outputs[0];
+ auto &dst1 = outputs[1];
+ if (samples_avail < outputs[0].samples())
{
- memset(dst0, 0, samples * sizeof(dst0[0]));
- memset(dst1, 0, samples * sizeof(dst1[0]));
+ dst0.fill(0);
+ dst1.fill(0);
}
// otherwise, stream from our buffer
@@ -340,10 +340,11 @@ void laserdisc_device::sound_stream_update_legacy(sound_stream &stream, stream_s
int sampout = m_audiobufout;
// copy samples, clearing behind us as we go
- while (sampout != m_audiobufin && samples-- > 0)
+ int sampindex;
+ for (sampindex = 0; sampout != m_audiobufin && sampindex < outputs[0].samples(); sampindex++)
{
- *dst0++ = buffer0[sampout] & leftand;
- *dst1++ = buffer1[sampout] & rightand;
+ dst0.put_int(sampindex, buffer0[sampout] & leftand, 32768);
+ dst1.put_int(sampindex, buffer1[sampout] & rightand, 32768);
buffer0[sampout] = 0;
buffer1[sampout] = 0;
sampout++;
@@ -353,16 +354,16 @@ void laserdisc_device::sound_stream_update_legacy(sound_stream &stream, stream_s
m_audiobufout = sampout;
// clear out the rest of the buffer
- if (samples > 0)
+ if (sampindex < outputs[0].samples())
{
sampout = (m_audiobufout == 0) ? m_audiobufsize - 1 : m_audiobufout - 1;
- stream_sample_t fill0 = buffer0[sampout] & leftand;
- stream_sample_t fill1 = buffer1[sampout] & rightand;
+ s32 fill0 = buffer0[sampout] & leftand;
+ s32 fill1 = buffer1[sampout] & rightand;
- while (samples-- > 0)
+ for ( ; sampindex < outputs[0].samples(); sampindex++)
{
- *dst0++ = fill0;
- *dst1++ = fill1;
+ dst0.put_int(sampindex, fill0, 32768);
+ dst1.put_int(sampindex, fill1, 32768);
}
}
}
@@ -712,10 +713,10 @@ void laserdisc_device::init_video()
fillbitmap_yuy16(frame.m_bitmap, 40, 109, 240);
// make a copy of the bitmap that clips out the VBI and horizontal blanking areas
- frame.m_visbitmap.wrap(&frame.m_bitmap.pix16(44, frame.m_bitmap.width() * 8 / 720),
- frame.m_bitmap.width() - 2 * frame.m_bitmap.width() * 8 / 720,
- frame.m_bitmap.height() - 44,
- frame.m_bitmap.rowpixels());
+ frame.m_visbitmap.wrap(&frame.m_bitmap.pix(
+ 44, frame.m_bitmap.width() * 8 / 720),
+ frame.m_bitmap.width() - 2 * frame.m_bitmap.width() * 8 / 720, frame.m_bitmap.height() - 44,
+ frame.m_bitmap.rowpixels());
frame.m_visbitmap.set_palette(m_videopalette);
}
@@ -762,7 +763,7 @@ void laserdisc_device::init_audio()
m_audio_callback.resolve();
// allocate a stream
- m_stream = stream_alloc_legacy(0, 2, 48000);
+ m_stream = stream_alloc(0, 2, 48000);
// allocate audio buffers
m_audiomaxsamples = ((uint64_t)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million;
@@ -789,7 +790,7 @@ void laserdisc_device::fillbitmap_yuy16(bitmap_yuy16 &bitmap, uint8_t yval, uint
// write 32 bits of color (2 pixels at a time)
for (int y = 0; y < bitmap.height(); y++)
{
- uint16_t *dest = &bitmap.pix16(y);
+ uint16_t *dest = &bitmap.pix(y);
for (int x = 0; x < bitmap.width() / 2; x++)
{
*dest++ = color0;
@@ -918,7 +919,8 @@ void laserdisc_device::read_track_data()
frame->m_lastfield = m_curtrack * 2 + m_fieldnum;
// set the video target information
- m_avhuff_config.video.wrap(&frame->m_bitmap.pix16(m_fieldnum), frame->m_bitmap.width(), frame->m_bitmap.height() / 2, frame->m_bitmap.rowpixels() * 2);
+ m_avhuff_video.wrap(&frame->m_bitmap.pix(m_fieldnum), frame->m_bitmap.width(), frame->m_bitmap.height() / 2, frame->m_bitmap.rowpixels() * 2);
+ m_avhuff_config.video = &m_avhuff_video;
// set the audio target information
if (m_audiobufin + m_audiomaxsamples <= m_audiobufsize)
@@ -995,13 +997,13 @@ void laserdisc_device::process_track_data()
// remove the video if we had an error
if (m_readresult != CHDERR_NONE)
- m_avhuff_config.video.reset();
+ m_avhuff_video.reset();
// count the field as read if we are successful
- if (m_avhuff_config.video.valid())
+ if (m_avhuff_video.valid())
{
m_frame[m_videoindex].m_numfields++;
- player_overlay(m_avhuff_config.video);
+ player_overlay(m_avhuff_video);
}
// pass the audio to the callback
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index 8ca3abad222..14594bcf7cd 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -220,7 +220,7 @@ protected:
virtual void device_validity_check(validity_checker &valid) const override;
// device_sound_interface overrides
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
// subclass helpers
void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); }
@@ -277,28 +277,29 @@ private:
std::vector<uint8_t> m_vbidata; // pointer to precomputed VBI data
int m_width; // width of video
int m_height; // height of video
- uint32_t m_fps_times_1million; // frame rate of video
+ uint32_t m_fps_times_1million; // frame rate of video
int m_samplerate; // audio samplerate
int m_readresult; // result of the most recent read
- uint32_t m_chdtracks; // number of tracks in the CHD
- avhuff_decompress_config m_avhuff_config; // decompression configuration
+ uint32_t m_chdtracks; // number of tracks in the CHD
+ bitmap_yuy16 m_avhuff_video; // decompresed frame buffer
+ avhuff_decoder::config m_avhuff_config; // decompression configuration
// async operations
osd_work_queue * m_work_queue; // work queue
- uint32_t m_queued_hunknum; // queued hunk
+ uint32_t m_queued_hunknum; // queued hunk
// core states
- uint8_t m_audiosquelch; // audio squelch state: bit 0 = audio 1, bit 1 = audio 2
- uint8_t m_videosquelch; // video squelch state: bit 0 = on/off
- uint8_t m_fieldnum; // field number (0 or 1)
- int32_t m_curtrack; // current track at this end of this vsync
- uint32_t m_maxtrack; // maximum track number
+ uint8_t m_audiosquelch; // audio squelch state: bit 0 = audio 1, bit 1 = audio 2
+ uint8_t m_videosquelch; // video squelch state: bit 0 = on/off
+ uint8_t m_fieldnum; // field number (0 or 1)
+ int32_t m_curtrack; // current track at this end of this vsync
+ uint32_t m_maxtrack; // maximum track number
attoseconds_t m_attospertrack; // attoseconds per track, or 0 if not moving
attotime m_sliderupdate; // time of last slider update
// video data
frame_data m_frame[3]; // circular list of frames
- uint8_t m_videoindex; // index of the current video buffer
+ uint8_t m_videoindex; // index of the current video buffer
bitmap_yuy16 m_emptyframe; // blank frame
// audio data
diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp
index fc94159ff6a..64392ed0c90 100644
--- a/src/devices/machine/ldpr8210.cpp
+++ b/src/devices/machine/ldpr8210.cpp
@@ -784,12 +784,12 @@ void pioneer_pr8210_device::overlay_draw_group(bitmap_yuy16 &bitmap, const uint8
void pioneer_pr8210_device::overlay_erase(bitmap_yuy16 &bitmap, float xstart, float xend)
{
- uint32_t xmin = (uint32_t)(xstart * 256.0f * float(bitmap.width()));
- uint32_t xmax = (uint32_t)(xend * 256.0f * float(bitmap.width()));
+ uint32_t xmin = uint32_t(xstart * 256.0f * float(bitmap.width()));
+ uint32_t xmax = uint32_t(xend * 256.0f * float(bitmap.width()));
for (uint32_t y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++)
{
- uint16_t *dest = &bitmap.pix16(y, xmin >> 8);
+ uint16_t *dest = &bitmap.pix(y, xmin >> 8);
uint16_t ymax = *dest >> 8;
uint16_t ymin = ymax * 3 / 8;
uint16_t yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256;
@@ -819,8 +819,8 @@ void pioneer_pr8210_device::overlay_erase(bitmap_yuy16 &bitmap, float xstart, fl
void pioneer_pr8210_device::overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch, float xstart)
{
- uint32_t xminbase = (uint32_t)(xstart * 256.0f * float(bitmap.width()));
- uint32_t xsize = (uint32_t)(OVERLAY_PIXEL_WIDTH * 256.0f * float(bitmap.width()));
+ uint32_t xminbase = uint32_t(xstart * 256.0f * float(bitmap.width()));
+ uint32_t xsize = uint32_t(OVERLAY_PIXEL_WIDTH * 256.0f * float(bitmap.width()));
// iterate over pixels
const uint8_t *chdataptr = &text_bitmap[ch & 0x3f][0];
@@ -835,7 +835,7 @@ void pioneer_pr8210_device::overlay_draw_char(bitmap_yuy16 &bitmap, uint8_t ch,
uint32_t xmax = xmin + xsize;
for (uint32_t yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++)
{
- uint16_t *dest = &bitmap.pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
+ uint16_t *dest = &bitmap.pix(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
uint16_t ymax = 0xff;
uint16_t ymin = *dest >> 8;
uint16_t yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256;
diff --git a/src/devices/machine/m3002.cpp b/src/devices/machine/m3002.cpp
index 8bb9edda2b9..fd93666a55f 100644
--- a/src/devices/machine/m3002.cpp
+++ b/src/devices/machine/m3002.cpp
@@ -351,13 +351,13 @@ void m3002_device::irq_update()
{
LOG("IRQ occurred\n");
m_irq_active = true;
- m_irq_callback(ASSERT_LINE);
+ m_irq_callback(0);
}
else if (m_irq_active && (m_ram[0xf] & 0x0c) == 0)
{
LOG("IRQ cleared\n");
m_irq_active = false;
- m_irq_callback(CLEAR_LINE);
+ m_irq_callback(1);
}
}
diff --git a/src/devices/machine/m3002.h b/src/devices/machine/m3002.h
index d39f904fe60..ef13c360e47 100644
--- a/src/devices/machine/m3002.h
+++ b/src/devices/machine/m3002.h
@@ -37,6 +37,8 @@ public:
// device type constructor
m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ auto irq_out() { return m_irq_callback.bind(); }
+
// 4-bit read/write handlers
u8 read();
void write(u8 data);
diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp
index 3df500d2f0c..e3690287710 100644
--- a/src/devices/machine/mc68328.cpp
+++ b/src/devices/machine/mc68328.cpp
@@ -3044,20 +3044,17 @@ uint16_t mc68328_device::internal_read(offs_t offset, uint16_t mem_mask)
uint32_t mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
uint32_t vram_addr = m_regs.lssa & 0x00fffffe;
- uint16_t word;
- uint16_t *line;
- int y, x, b;
if (m_regs.lckcon & LCKCON_LCDC_EN)
{
- for (y = 0; y < 160; y++)
+ for (int y = 0; y < 160; y++)
{
- line = &bitmap.pix16(y);
+ uint16_t *const line = &bitmap.pix(y);
- for (x = 0; x < 160; x += 16, vram_addr += 2)
+ for (int x = 0; x < 160; x += 16, vram_addr += 2)
{
- word = space(AS_PROGRAM).read_word(vram_addr);
- for (b = 0; b < 16; b++)
+ uint16_t const word = space(AS_PROGRAM).read_word(vram_addr);
+ for (int b = 0; b < 16; b++)
{
line[x + b] = (word >> (15 - b)) & 0x0001;
}
@@ -3066,11 +3063,11 @@ uint32_t mc68328_device::screen_update(screen_device &screen, bitmap_ind16 &bitm
}
else
{
- for (y = 0; y < 160; y++)
+ for (int y = 0; y < 160; y++)
{
- line = &bitmap.pix16(y);
+ uint16_t *const line = &bitmap.pix(y);
- for (x = 0; x < 160; x++)
+ for (int x = 0; x < 160; x++)
{
line[x] = 0;
}
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 988c21c33e1..a13349e318f 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -987,7 +987,6 @@ std::unique_ptr<netlist::netlist_state_t> netlist_mame_device::base_validity_che
auto lnetlist = std::make_unique<netlist::netlist_state_t>("netlist",
plib::plog_delegate(&validity_logger::log, &logger));
// enable validation mode
- lnetlist->set_extended_validation(true);
lnetlist->set_static_solver_lib(std::make_unique<plib::dynlib_static>(nullptr));
diff --git a/src/devices/machine/pxa255.cpp b/src/devices/machine/pxa255.cpp
index 07e7d997b8c..6bd82ec987c 100644
--- a/src/devices/machine/pxa255.cpp
+++ b/src/devices/machine/pxa255.cpp
@@ -1583,7 +1583,7 @@ uint32_t pxa255_periphs_device::screen_update(screen_device &screen, bitmap_rgb3
{
for (int y = 0; y <= (m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++)
{
- uint32_t *dst = &bitmap.pix32(y);
+ uint32_t *dst = &bitmap.pix(y);
for (int x = 0; x <= (m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++)
{
*dst++ = m_lcd_palette[m_lcd_framebuffer[y * ((m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]];
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp
index bdf95dc69d0..8ad26690bcf 100644
--- a/src/devices/machine/s2636.cpp
+++ b/src/devices/machine/s2636.cpp
@@ -203,7 +203,7 @@ void s2636_device::device_start()
save_item(NAME(m_intreq));
save_item(NAME(m_intack));
- m_stream = stream_alloc_legacy(0, 1, machine().sample_rate());
+ m_stream = stream_alloc(0, 1, machine().sample_rate());
save_item(NAME(m_sample_cnt));
save_item(NAME(m_sound_lvl));
@@ -247,7 +247,7 @@ void s2636_device::render_next_line()
// pre-clear the line for convenience
rectangle const &vis_area = screen().visible_area();
- uint16_t *const row = &m_bitmap.pix16(m_screen_line);
+ uint16_t *const row = &m_bitmap.pix(m_screen_line);
m_bitmap.plot_box(0, m_screen_line, m_bitmap.width(), 1, 0);
if ((vis_area.min_y > m_screen_line) || (vis_area.max_y < m_screen_line))
@@ -447,13 +447,14 @@ void s2636_device::write_intack(int state)
//-------------------------------------------------
-// sound_stream_update_legacy - generate audio output
+// sound_stream_update - generate audio output
//-------------------------------------------------
-void s2636_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+
+void s2636_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- stream_sample_t *buffer = outputs[0];
- while (samples--)
+ auto &buffer = outputs[0];
+ for (int sampindex = 0; sampindex < buffer.samples(); sampindex++)
{
if (!m_sample_cnt)
{
@@ -469,7 +470,7 @@ void s2636_device::sound_stream_update_legacy(sound_stream &stream, stream_sampl
}
}
- *buffer++ = m_sound_lvl ? 0x7fff : 0x0000;
+ buffer.put(sampindex, m_sound_lvl ? 1.0 : 0.0);
m_sample_cnt--;
}
}
diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h
index b5e41b83499..8803c629015 100644
--- a/src/devices/machine/s2636.h
+++ b/src/devices/machine/s2636.h
@@ -58,7 +58,7 @@ protected:
virtual void device_start() override;
// sound stream update overrides
- virtual void sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
private:
enum
diff --git a/src/devices/machine/s3c24xx.hxx b/src/devices/machine/s3c24xx.hxx
index dcff99a7b70..8fae9ee616e 100644
--- a/src/devices/machine/s3c24xx.hxx
+++ b/src/devices/machine/s3c24xx.hxx
@@ -434,7 +434,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tpal()
uint32_t color = s3c24xx_get_color_tpal();
for (int y = m_lcd.vpos_min; y <= m_lcd.vpos_max; y++)
{
- uint32_t *scanline = &bitmap.pix32(y, m_lcd.hpos_min);
+ uint32_t *scanline = &bitmap.pix(y, m_lcd.hpos_min);
for (int x = m_lcd.hpos_min; x <= m_lcd.hpos_max; x++)
{
*scanline++ = color;
@@ -445,7 +445,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tpal()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_01()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -467,7 +467,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_01()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -476,7 +476,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_01()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_02()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -490,7 +490,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_02()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -499,7 +499,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_02()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_04()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -513,7 +513,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_04()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -522,7 +522,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_04()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_08()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -536,7 +536,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_08()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -545,7 +545,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_08()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_p()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 16; i++)
{
*scanline++ = s3c24xx_get_color_stn_12(s3c24xx_lcd_dma_read_bits(12));
@@ -555,7 +555,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_p()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -563,7 +563,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_p()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_u() // not tested
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -577,7 +577,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_u() // not tested
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -586,7 +586,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_stn_12_u() // not tested
void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_01()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -600,7 +600,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_01()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -609,7 +609,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_01()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_02()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[0];
- uint32_t *scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ uint32_t *scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
for (int i = 0; i < 4; i++)
{
uint32_t data = s3c24xx_lcd_dma_read();
@@ -623,7 +623,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_02()
m_lcd.vpos++;
if (m_lcd.vpos > m_lcd.vpos_max) m_lcd.vpos = m_lcd.vpos_min;
m_lcd.hpos = m_lcd.hpos_min;
- scanline = &bitmap.pix32(m_lcd.vpos, m_lcd.hpos);
+ scanline = &bitmap.pix(m_lcd.vpos, m_lcd.hpos);
}
}
}
@@ -632,7 +632,7 @@ void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_02()
void S3C24_CLASS_NAME::s3c24xx_lcd_render_tft_04()
{
bitmap_rgb32 &bitmap = *m_lcd.bitmap[