Previous 199869 Revisions Next

r41780 Sunday 15th November, 2015 at 12:07:26 UTC by Jezze
Merge remote-tracking branch 'remotes/mamedev/master'
[/trunk]makefile
[3rdparty/bx/include/bx]os.h platform.h
[3rdparty/genie/build/gmake.bsd]genie.make
[3rdparty/genie/build/gmake.solaris]genie.make
[hash]psx.xml
[scripts]genie.lua
[scripts/src]3rdparty.lua bus.lua cpu.lua devices.lua emu.lua lib.lua main.lua netlist.lua tests.lua tools.lua
[scripts/src/osd]modules.lua osdmini.lua sdl.lua windows.lua
[scripts/target/mame]arcade.lua dummy.lua mame.lua mess.lua nl.lua tiny.lua
[src/devices/bus/a1bus]a1bus.cpp a1cassette.cpp a1cffa.cpp
[src/devices/bus/a2bus]a2alfam2.cpp a2applicard.cpp a2bus.cpp a2cffa.cpp a2corvus.cpp a2diskii.cpp a2diskiing.cpp a2dx1.cpp a2eauxslot.cpp a2eramworks3.cpp a2hsscsi.cpp a2mcms.cpp a2memexp.cpp a2midi.cpp a2mockingboard.cpp a2pic.cpp a2scsi.cpp a2softcard.cpp a2ssc.cpp a2swyft.cpp a2themill.cpp a2thunderclock.cpp a2ultraterm.cpp a2videoterm.cpp a2vulcan.cpp a2zipdrive.cpp corvfdc01.cpp corvfdc02.cpp laser128.cpp mouse.cpp ramcard128k.cpp ramcard16k.cpp timemasterho.cpp
[src/devices/bus/a7800]a78_slot.cpp cpuwiz.cpp rom.cpp xboard.cpp
[src/devices/bus/a800]a800_slot.cpp a8sio.cpp cassette.cpp oss.cpp rom.cpp sparta.cpp
[src/devices/bus/abcbus]abcbus.cpp fd2.cpp lux10828.cpp lux21046.cpp lux21056.cpp
[src/devices/bus/abckb]abc77.cpp abc800kb.cpp abc99.cpp abckb.cpp
[src/devices/bus/adam]exp.cpp ide.cpp
[src/devices/bus/adamnet]adamnet.cpp ddp.cpp
[src/devices/bus/apf]slot.cpp
[src/devices/bus/apricot]expansion.cpp
[src/devices/bus/arcadia]slot.cpp
[src/devices/bus/astrocde]exp.cpp rom.cpp slot.cpp
[src/devices/bus/bml3]bml3bus.cpp bml3kanji.cpp bml3mp1802.cpp bml3mp1805.cpp
[src/devices/bus/bw2]exp.cpp
[src/devices/bus/c64]bn1541.cpp c128_partner.cpp comal80.cpp cpm.cpp dela_ep64.cpp dela_ep7x8.cpp dinamic.cpp dqbb.cpp easy_calc_result.cpp epyx_fast_load.cpp exp.cpp final3.cpp fun_play.cpp georam.cpp ide64.cpp mach5.cpp magic_desk.cpp magic_voice.cpp multiscreen.cpp neoram.cpp pagefox.cpp ross.cpp silverrock.cpp structured_basic.cpp super_explode.cpp super_games.cpp sw8k.cpp swiftlink.cpp system3.cpp tdos.cpp turbo232.cpp vw64.cpp zaxxon.cpp
[src/devices/bus/cbm2]exp.cpp user.cpp
[src/devices/bus/cbmiec]cbmiec.cpp
[src/devices/bus/centronics]comxpl80.cpp covox.cpp epson_ex800.cpp epson_lx810l.cpp printer.cpp
[src/devices/bus/chanf]rom.cpp slot.cpp
[src/devices/bus/coco]coco_dwsock.cpp coco_fdc.cpp coco_multi.cpp coco_orch90.cpp coco_pak.cpp cococart.cpp
[src/devices/bus/coleco]ctrl.cpp exp.cpp
[src/devices/bus/compucolor]floppy.cpp
[src/devices/bus/comx35]exp.cpp ram.cpp
[src/devices/bus/cpc]amdrum.cpp brunword4.cpp cpc_pds.cpp cpc_rom.cpp cpc_rs232.cpp cpc_ssa1.cpp cpcexp.cpp ddi1.cpp doubler.cpp hd20.cpp magicsound.cpp mface2.cpp playcity.cpp smartwatch.cpp symbfac2.cpp transtape.cpp* transtape.h*
[src/devices/bus/crvision]slot.cpp
[src/devices/bus/dmv]dmvbus.cpp k210.cpp k220.cpp k230.cpp k233.cpp k801.cpp k803.cpp k806.cpp ram.cpp
[src/devices/bus/ecbbus]ecbbus.cpp grip.cpp
[src/devices/bus/econet]e01.cpp econet.cpp
[src/devices/bus/ep64]exp.cpp
[src/devices/bus/epson_sio]epson_sio.cpp pf10.cpp tf20.cpp
[src/devices/bus/gameboy]gb_slot.cpp mbc.cpp rom.cpp
[src/devices/bus/gamegear]ggext.cpp
[src/devices/bus/gba]gba_slot.cpp rom.cpp
[src/devices/bus/generic]slot.cpp
[src/devices/bus/ieee488]c2031.cpp c2040.cpp c2040fdc.cpp c8050.cpp c8050fdc.cpp c8280.cpp d9060.cpp hardbox.cpp ieee488.cpp softbox.cpp
[src/devices/bus/imi7000]imi7000.cpp
[src/devices/bus/intv]slot.cpp
[src/devices/bus/iq151]disc2.cpp grafik.cpp iq151.cpp minigraf.cpp ms151a.cpp rom.cpp staper.cpp video32.cpp video64.cpp
[src/devices/bus/isa]3c503.cpp 3c505.cpp aga.cpp cga.cpp dectalk.cpp ega.cpp finalchs.cpp gus.cpp hdc.cpp ibm_mfc.cpp isa.cpp lpt.cpp mach32.cpp mc1502_fdc.cpp mda.cpp ne1000.cpp ne2000.cpp num9rev.cpp omti8621.cpp pgc.cpp sb16.cpp sblaster.cpp sc499.cpp stereo_fx.cpp svga_cirrus.cpp svga_s3.cpp svga_trident.cpp svga_tseng.cpp vga.cpp vga_ati.cpp xtide.cpp
[src/devices/bus/isbx]isbc_218a.cpp isbx.cpp
[src/devices/bus/kc]d002.cpp d004.cpp kc.cpp ram.cpp rom.cpp
[src/devices/bus/lpci]i82439tx.cpp mpc105.cpp pci.cpp southbridge.cpp
[src/devices/bus/macpds]macpds.cpp pds_tpdfpd.cpp
[src/devices/bus/megadrive]eeprom.cpp ggenie.cpp jcart.cpp md_slot.cpp rom.cpp stm95.cpp svp.cpp
[src/devices/bus/midi]midi.cpp
[src/devices/bus/msx_cart]disk.cpp msx_audio_kb.cpp
[src/devices/bus/neogeo]banked_cart.cpp bootleg_prot.cpp cmc_prot.cpp fatfury2_prot.cpp kof98_prot.cpp mslugx_prot.cpp neogeo_intf.cpp pvc_prot.cpp sbp_prot.cpp sma_prot.cpp
[src/devices/bus/nes]act53.cpp aladdin.cpp ave.cpp bandai.cpp benshieng.cpp bootleg.cpp camerica.cpp cony.cpp datach.cpp disksys.cpp event.cpp ggenie.cpp henggedianzi.cpp hosenkan.cpp irem.cpp jaleco.cpp jy.cpp kaiser.cpp karastudio.cpp konami.cpp legacy.cpp mmc1.cpp mmc2.cpp mmc3.cpp mmc3_clones.cpp mmc5.cpp multigame.cpp namcot.cpp nanjing.cpp nes_slot.cpp ntdec.cpp nxrom.cpp pirate.cpp racermate.cpp rcm.cpp rexsoft.cpp sachen.cpp somari.cpp sunsoft.cpp sunsoft_dcs.cpp taito.cpp tengen.cpp waixing.cpp
[src/devices/bus/nes_ctrl]4score.cpp arkpaddle.cpp bcbattle.cpp ctrl.cpp fckeybrd.cpp ftrainer.cpp joypad.cpp konamihs.cpp miracle.cpp mjpanel.cpp pachinko.cpp partytap.cpp suborkey.cpp
[src/devices/bus/nubus]nubus.cpp nubus_48gc.cpp nubus_cb264.cpp nubus_image.cpp nubus_m2hires.cpp nubus_m2video.cpp nubus_radiustpd.cpp nubus_spec8.cpp nubus_specpdq.cpp nubus_vikbw.cpp nubus_wsportrait.cpp pds30_30hr.cpp pds30_cb264.cpp pds30_mc30.cpp pds30_procolor816.cpp pds30_sigmalview.cpp
[src/devices/bus/odyssey2]rom.cpp slot.cpp
[src/devices/bus/oricext]jasmin.cpp microdisc.cpp oricext.cpp
[src/devices/bus/pc_joy]pc_joy.cpp pc_joy_sw.cpp
[src/devices/bus/pc_kbd]iskr1030.cpp keytro.cpp msnat.cpp pc83.cpp pc_kbdc.cpp
[src/devices/bus/pce]pce_rom.cpp pce_slot.cpp
[src/devices/bus/pet]c2n.cpp cass.cpp exp.cpp superpet.cpp
[src/devices/bus/plus4]c1551.cpp exp.cpp
[src/devices/bus/psx]analogue.cpp ctlrport.cpp memcard.cpp multitap.cpp
[src/devices/bus/ql]exp.cpp rom.cpp sandy_superdisk.cpp trumpcard.cpp
[src/devices/bus/rs232]keyboard.cpp null_modem.cpp pty.cpp rs232.cpp ser_mouse.cpp terminal.cpp xvd701.cpp
[src/devices/bus/s100]s100.cpp wunderbus.cpp
[src/devices/bus/saturn]sat_slot.cpp
[src/devices/bus/scsi]scsi.cpp scsihle.cpp
[src/devices/bus/scv]rom.cpp slot.cpp
[src/devices/bus/sega8]rom.cpp sega8_slot.cpp
[src/devices/bus/sms_ctrl]lphaser.cpp smsctrl.cpp sports.cpp
[src/devices/bus/sms_exp]smsexp.cpp
[src/devices/bus/snes]bsx.cpp event.cpp rom.cpp rom21.cpp sa1.cpp sdd1.cpp sdd1.h sgb.cpp snes_slot.cpp spc7110.cpp
[src/devices/bus/snes_ctrl]bcbattle.cpp ctrl.cpp joypad.cpp miracle.cpp mouse.cpp multitap.cpp pachinko.cpp sscope.cpp twintap.cpp
[src/devices/bus/spc1000]exp.cpp fdd.cpp
[src/devices/bus/ti99_peb]bwg.cpp evpc.cpp hfdc.cpp horizon.cpp hsgpl.cpp memex.cpp myarcmem.cpp pcode.cpp peribox.cpp peribox.h samsmem.cpp spchsyn.cpp ti_32kmem.cpp ti_fdc.cpp ti_rs232.cpp tn_ide.cpp tn_usbsm.cpp
[src/devices/bus/ti99x]990_dk.cpp 998board.cpp 998board.h datamux.cpp datamux.h genboard.cpp grom.cpp gromport.cpp gromport.h handset.cpp joyport.cpp joyport.h mecmouse.cpp videowrp.cpp videowrp.h
[src/devices/bus/tiki100]exp.cpp
[src/devices/bus/tvc]hbf.cpp tvc.cpp
[src/devices/bus/vboy]slot.cpp
[src/devices/bus/vc4000]slot.cpp
[src/devices/bus/vcs]dpc.cpp rom.cpp scharger.cpp vcs_slot.cpp
[src/devices/bus/vcs_ctrl]ctrl.cpp keypad.cpp
[src/devices/bus/vectrex]rom.cpp slot.cpp
[src/devices/bus/vic10]exp.cpp
[src/devices/bus/vic20]exp.cpp fe3.cpp vic1112.cpp
[src/devices/bus/vidbrain]exp.cpp
[src/devices/bus/vip]byteio.cpp exp.cpp vp550.cpp vp585.cpp vp590.cpp
[src/devices/bus/vtech/memexp]floppy.cpp
[src/devices/bus/wangpc]emb.cpp lvc.cpp mcc.cpp tig.cpp wangpc.cpp wdc.cpp
[src/devices/bus/wswan]rom.cpp slot.cpp
[src/devices/bus/x68k]x68k_neptunex.cpp x68k_scsiext.cpp x68kexp.cpp
[src/devices/bus/z88]ram.cpp rom.cpp z88.cpp
[src/devices/cpu/dsp56k]dsp56mem.h
[src/devices/cpu/i8085]i8085.cpp
[src/devices/cpu/i86]i286.cpp
[src/devices/cpu/m6502]deco16.cpp m3745x.cpp m4510.cpp m5074x.cpp
[src/devices/cpu/m6809]6309dasm.cpp 6809dasm.cpp hd6309.cpp
[src/devices/cpu/sh2]sh2comn.cpp
[src/devices/cpu/tms32031]32031ops.cpp 32031ops.inc* tms32031.cpp
[src/devices/cpu/tms32051]32051ops.cpp 32051ops.inc* tms32051.cpp
[src/devices/cpu/tms34010]34010fld.cpp 34010fld.inc* 34010gfx.cpp 34010gfx.inc* 34010ops.cpp 34010ops.inc* 34010tbl.cpp 34010tbl.inc* tms34010.cpp
[src/devices/cpu/tms9900]tms9995.h
[src/devices/cpu/z80]z80dasm.cpp
[src/devices/imagedev]cassette.cpp chd_cd.cpp flopdrv.cpp flopdrv.h floppy.cpp mfmhd.cpp mfmhd.h midiin.cpp midiout.cpp snapquik.cpp
[src/devices/machine]6532riot.cpp 6821pia.cpp bankdev.cpp keyboard.cpp legscsi.cpp nvram.cpp pci.cpp pit8253.cpp ram.cpp terminal.cpp z80ctc.cpp z80ctc.h
[src/devices/sound]2151intf.cpp 3526intf.cpp 3812intf.cpp 8950intf.cpp ay8910.cpp discrete.cpp samples.cpp tms5110.cpp tms5220.cpp votrax.cpp ym2151.cpp
[src/devices/video]poly.h
[src/emu]addrmap.cpp audit.cpp config.cpp debugger.cpp devcb.cpp devcpu.cpp devfind.cpp devfind.h device.cpp device.h diexec.h digfx.cpp diimage.cpp diimage.h dimemory.cpp dinetwork.cpp dinetwork.h dioutput.cpp dioutput.h dipty.cpp dipty.h dirtc.h diserial.cpp dislot.cpp disound.cpp distate.cpp distate.h drawgfxm.h drivenum.cpp drivenum.h emualloc.cpp emuopts.cpp emupal.cpp hash.cpp hashfile.cpp input.cpp ioport.cpp ioport.h luaengine.cpp machine.cpp machine.h mame.cpp memory.cpp network.cpp profiler.cpp render.cpp render.h rendfont.cpp rendlay.cpp romload.cpp save.cpp schedule.cpp screen.cpp softlist.cpp sound.cpp speaker.cpp sprite.h tilemap.cpp timer.cpp uiinput.cpp validity.cpp video.cpp
[src/emu/debug]debugcmd.cpp debugcon.cpp debugcpu.cpp debugvw.cpp debugvw.h dvmemory.cpp dvmemory.h dvwpoints.cpp express.cpp
[src/emu/drivers]testcpu.cpp
[src/emu/machine]generic.cpp
[src/emu/ui]cheatopt.cpp filemngr.cpp filesel.cpp imgcntrl.cpp inputmap.cpp mainmenu.cpp menu.cpp menu.h miscmenu.cpp selgame.cpp swlist.cpp ui.cpp videoopt.cpp viewgfx.cpp
[src/emu/video]resnet.cpp rgbgen.h rgbvmx.h vector.cpp
[src/lib/netlist]nl_parser.cpp
[src/lib/netlist/plib]pconfig.h pparser.cpp
[src/lib/netlist/solver]nld_solver.cpp
[src/lib/netlist/tools]nl_convert.cpp
[src/mame]arcade.lst
[src/mame/audio]irem.cpp nl_kidniki.cpp nl_kidniki.inc*
[src/mame/drivers]amstrad.cpp c65_old.cpp chihiro.cpp exidyttl.cpp fidelz80.cpp goldnpkr.cpp goldstar.cpp model3.cpp namcos23.cpp naomi.cpp pse.cpp psikyo.cpp psikyosh.cpp shadfrce.cpp ssem.cpp taitottl.cpp
[src/mame/includes]amstrad.h chihiro.h fidelz80.h shadfrce.h
[src/mame/layout]cmpacman.lay
[src/mame/machine]c65_old.cpp dc.cpp naomim2.cpp xbox.cpp
[src/mame/video]chihiro.cpp shadfrce.cpp
[src/osd]strconv.cpp
[src/osd/modules/debugger]debugint.cpp debugwin.cpp
[src/osd/modules/debugger/win]consolewininfo.cpp debugviewinfo.cpp debugwininfo.cpp disasmwininfo.cpp logwininfo.cpp memorywininfo.cpp pointswininfo.cpp uimetrics.cpp
[src/osd/modules/font]font_none.cpp font_windows.cpp
[src/osd/modules/midi]none.cpp portmidi.cpp
[src/osd/modules/netdev]pcap.cpp
[src/osd/modules/render]drawd3d.cpp drawdd.cpp drawnone.cpp drawogl.cpp
[src/osd/modules/render/d3d]d3d9intf.cpp d3dhlsl.cpp d3dhlsl.h
[src/osd/modules/sound]direct_sound.cpp
[src/osd/modules/sync]work_osd.cpp
[src/osd/sdl]sdldir.cpp sdlfile.cpp sdlptty_unix.cpp sdlptty_win32.cpp sdlsocket.cpp
[src/osd/windows]input.cpp output.cpp video.cpp winclip.cpp window.cpp winfile.cpp winmain.cpp winsocket.cpp winutf8.cpp winutil.cpp

trunk/3rdparty/bx/include/bx/os.h
r250291r250292
1515#elif  BX_PLATFORM_ANDROID \
1616   || BX_PLATFORM_EMSCRIPTEN \
1717   || BX_PLATFORM_FREEBSD \
18   || BX_PLATFORM_NETBSD \
1819   || BX_PLATFORM_IOS \
1920   || BX_PLATFORM_LINUX \
2021   || BX_PLATFORM_NACL \
r250291r250292
2425
2526#   include <sched.h> // sched_yield
2627#   if BX_PLATFORM_FREEBSD \
28   || BX_PLATFORM_NETBSD \
2729   || BX_PLATFORM_IOS \
2830   || BX_PLATFORM_NACL \
2931   || BX_PLATFORM_OSX \
r250291r250292
103105      return (pid_t)::syscall(SYS_gettid);
104106#elif BX_PLATFORM_IOS || BX_PLATFORM_OSX
105107      return (mach_port_t)::pthread_mach_thread_np(pthread_self() );
106#elif BX_PLATFORM_FREEBSD || BX_PLATFORM_NACL
108#elif BX_PLATFORM_FREEBSD || BX_PLATFORM_NACL || BX_PLATFORM_NETBSD
107109      // Casting __nc_basic_thread_data*... need better way to do this.
108110      return *(uint32_t*)::pthread_self();
109111#else
trunk/3rdparty/bx/include/bx/platform.h
r250291r250292
1515#define BX_PLATFORM_ANDROID    0
1616#define BX_PLATFORM_EMSCRIPTEN 0
1717#define BX_PLATFORM_FREEBSD    0
18#define BX_PLATFORM_NETBSD     0
1819#define BX_PLATFORM_IOS        0
1920#define BX_PLATFORM_LINUX      0
2021#define BX_PLATFORM_NACL       0
r250291r250292
187188#elif defined(__FreeBSD__)
188189#   undef  BX_PLATFORM_FREEBSD
189190#   define BX_PLATFORM_FREEBSD 1
191#elif defined(__NetBSD__)
192#   undef  BX_PLATFORM_NETBSD
193#   define BX_PLATFORM_NETBSD 1
190194#else
191195#   error "BX_PLATFORM_* is not defined!"
192196#endif //
r250291r250292
195199                  || BX_PLATFORM_ANDROID \
196200                  || BX_PLATFORM_EMSCRIPTEN \
197201                  || BX_PLATFORM_FREEBSD \
202                  || BX_PLATFORM_NETBSD \
198203                  || BX_PLATFORM_IOS \
199204                  || BX_PLATFORM_LINUX \
200205                  || BX_PLATFORM_NACL \
r250291r250292
244249            BX_STRINGIZE(__EMSCRIPTEN_tiny__)
245250#elif BX_PLATFORM_FREEBSD
246251#   define BX_PLATFORM_NAME "FreeBSD"
252#elif BX_PLATFORM_NETBSD
253#   define BX_PLATFORM_NAME "NetBSD"
247254#elif BX_PLATFORM_IOS
248255#   define BX_PLATFORM_NAME "iOS"
249256#elif BX_PLATFORM_LINUX
trunk/3rdparty/genie/build/gmake.bsd/genie.make
r250291r250292
5656   $(OBJDIR)/src/host/os_chdir.o \
5757   $(OBJDIR)/src/host/os_copyfile.o \
5858   $(OBJDIR)/src/host/os_getcwd.o \
59   $(OBJDIR)/src/host/os_getversion.o \
6059   $(OBJDIR)/src/host/os_is64bit.o \
6160   $(OBJDIR)/src/host/os_isdir.o \
6261   $(OBJDIR)/src/host/os_isfile.o \
r250291r250292
134133   $(OBJDIR)/src/host/os_chdir.o \
135134   $(OBJDIR)/src/host/os_copyfile.o \
136135   $(OBJDIR)/src/host/os_getcwd.o \
137   $(OBJDIR)/src/host/os_getversion.o \
138136   $(OBJDIR)/src/host/os_is64bit.o \
139137   $(OBJDIR)/src/host/os_isdir.o \
140138   $(OBJDIR)/src/host/os_isfile.o \
r250291r250292
252250   @echo $(notdir $<)
253251   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
254252
255$(OBJDIR)/src/host/os_getversion.o: ../../src/host/os_getversion.c
256   @echo $(notdir $<)
257   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
258
259253$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c
260254   @echo $(notdir $<)
261255   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
trunk/3rdparty/genie/build/gmake.solaris/genie.make
r250291r250292
5656   $(OBJDIR)/src/host/os_chdir.o \
5757   $(OBJDIR)/src/host/os_copyfile.o \
5858   $(OBJDIR)/src/host/os_getcwd.o \
59   $(OBJDIR)/src/host/os_getversion.o \
6059   $(OBJDIR)/src/host/os_is64bit.o \
6160   $(OBJDIR)/src/host/os_isdir.o \
6261   $(OBJDIR)/src/host/os_isfile.o \
r250291r250292
134133   $(OBJDIR)/src/host/os_chdir.o \
135134   $(OBJDIR)/src/host/os_copyfile.o \
136135   $(OBJDIR)/src/host/os_getcwd.o \
137   $(OBJDIR)/src/host/os_getversion.o \
138136   $(OBJDIR)/src/host/os_is64bit.o \
139137   $(OBJDIR)/src/host/os_isdir.o \
140138   $(OBJDIR)/src/host/os_isfile.o \
r250291r250292
252250   @echo $(notdir $<)
253251   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
254252
255$(OBJDIR)/src/host/os_getversion.o: ../../src/host/os_getversion.c
256   @echo $(notdir $<)
257   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
258
259253$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c
260254   @echo $(notdir $<)
261255   $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
trunk/hash/psx.xml
r250291r250292
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
33<softwarelist name="psx" description="Sony Playstation CD-ROMs">
44
5   <!-- todo, reconvert original dumps using current CHDMAN version - Feb 2014 -->
5<!-- Interactive CD Sampler Discs-->
66
7<!-- size="364872255" crc="536126e5" -->   
8   <software name="intcdv1m">
9      <description>Interactive CD Sampler Disc - Volume 01 (M Rated)</description>
10      <year>1995</year>
11      <publisher>SCEA</publisher>
12      <part name="cdrom" interface="psx_cdrom">
13         <diskarea name="cdrom">
14            <disk name="Interactive CD Sampler Disc - Volume 1 (m rated)" sha1="4bc8e61f799ecd19c1b8207943eaab8359d34858"/>
15         </diskarea>
16      </part>
17   </software>
18
19<!-- size="428110417" crc="48bd3d35" -->
20   <software name="intcdv2">
21      <description>Interactive CD Sampler Disc - Volume 02</description>
22      <year>1996</year>
23      <publisher>SCEA</publisher>
24      <part name="cdrom" interface="psx_cdrom">
25         <diskarea name="cdrom">
26            <disk name="Interactive CD Sampler Disc - Volume 2" sha1="5801f9972e483b9e2a7f316796b57b74d8baa5e7"/>
27         </diskarea>
28      </part>
29   </software>
30
31<!-- size="476195663" crc="fb8d356b" -->
32   <software name="intcdv30">
33      <description>Interactive CD Sampler Disc - Volume 03 (1.0)</description>
34      <year>1996</year>
35      <publisher>SCEA</publisher>
36      <part name="cdrom" interface="psx_cdrom">
37         <diskarea name="cdrom">
38            <disk name="Interactive CD Sampler Disc - Volume 3 (1.0)" sha1="f82e72d70b10badb35a91a09950d0d89db50855c"/>
39         </diskarea>
40      </part>
41   </software>
42
43<!-- size="487436207" crc="336304eb" -->
44   <software name="intcdv31">
45      <description>Interactive CD Sampler Disc - Volume 03 (1.1)</description>
46      <year>1996</year>
47      <publisher>SCEA</publisher>
48      <part name="cdrom" interface="psx_cdrom">
49         <diskarea name="cdrom">
50            <disk name="Interactive CD Sampler Disc - Volume 3 (1.1)" sha1="5f6fa89b8c9b31b3dabdc7ac06806bc721d2aa16"/>
51         </diskarea>
52      </part>
53   </software>
54
55<!-- size="487436203" crc="d96b31d2" -->
56   <software name="intcdv32">
57      <description>Interactive CD Sampler Disc - Volume 03 (1.2)</description>
58      <year>1996</year>
59      <publisher>SCEA</publisher>
60      <part name="cdrom" interface="psx_cdrom">
61         <diskarea name="cdrom">
62            <disk name="Interactive CD Sampler Disc - Volume 3 (1.2)" sha1="20f261877d3f63bd9215ca791800417ff7287e46"/>
63         </diskarea>
64      </part>
65   </software>
66
67<!-- size="354903558" crc="67ca3059" -->
68   <software name="intcdv4">
69      <description>Interactive CD Sampler Disc - Volume 04</description>
70      <year>1997</year>
71      <publisher>SCEA</publisher>
72      <part name="cdrom" interface="psx_cdrom">
73         <diskarea name="cdrom">
74            <disk name="Interactive CD Sampler Disc - Volume 4" sha1="c353a52e8b7831f11d3ce8ea771e865e9ba3431a"/>
75         </diskarea>
76      </part>
77   </software>
78
79<!-- size="291855185" crc="8119ed78" -->
80   <software name="intcdv5">
81      <description>Interactive CD Sampler Disc - Volume 05</description>
82      <year>1997</year>
83      <publisher>SCEA</publisher>
84      <part name="cdrom" interface="psx_cdrom">
85         <diskarea name="cdrom">
86            <disk name="Interactive CD Sampler Disc - Volume 5" sha1="9aef2ff7583b61d24302a35831a25ed5549610e1"/>
87         </diskarea>
88      </part>
89   </software>
90
91<!-- size="427620748" crc="917b5f35" -->
92   <software name="intcdv6">
93      <description>Interactive CD Sampler Disc - Volume 06</description>
94      <year>1998</year>
95      <publisher>SCEA</publisher>
96      <part name="cdrom" interface="psx_cdrom">
97         <diskarea name="cdrom">
98            <disk name="Interactive CD Sampler Disc - Volume 6" sha1="c35833fdd8a46016b3ccafa9ae08f68c10309737"/>
99         </diskarea>
100      </part>
101   </software>
102
103<!-- size="397092409" crc="17f17815" -->
104   <software name="intcdv7">
105      <description>Interactive CD Sampler Disc - Volume 07</description>
106      <year>1998</year>
107      <publisher>SCEA</publisher>
108      <part name="cdrom" interface="psx_cdrom">
109         <diskarea name="cdrom">
110            <disk name="Interactive CD Sampler Disc - Volume 7" sha1="81db574e4599e022cfac938516cff29bb09d1388"/>
111         </diskarea>
112      </part>
113   </software>
114
115<!-- size="420000809" crc="91d8b335" -->
116   <software name="intcdv8">
117      <description>Interactive CD Sampler Disc - Volume 08</description>
118      <year>1998</year>
119      <publisher>SCEA</publisher>
120      <part name="cdrom" interface="psx_cdrom">
121         <diskarea name="cdrom">
122            <disk name="Interactive CD Sampler Disc - Volume 8" sha1="7f23e2d284a104e6914d34527960567111914264"/>
123         </diskarea>
124      </part>
125   </software>
126
127<!-- size="389598196" crc="993e0ab1" -->
128   <software name="intcdv9">
129      <description>Interactive CD Sampler Disc - Volume 09</description>
130      <year>1998</year>
131      <publisher>SCEA</publisher>
132      <part name="cdrom" interface="psx_cdrom">
133         <diskarea name="cdrom">
134            <disk name="Interactive CD Sampler Disc - Volume 9" sha1="286559ce34f06a7f2eb2b441e9188da0e158d107"/>
135         </diskarea>
136      </part>
137   </software>
138
139<!-- size="365007076" crc="5f5fd01f" -->
140   <software name="intcdv10">
141      <description>Interactive CD Sampler Disc - Volume 10</description>
142      <year>1999</year>
143      <publisher>SCEA</publisher>
144      <part name="cdrom" interface="psx_cdrom">
145         <diskarea name="cdrom">
146            <disk name="Interactive CD Sampler Disc - Volume 10" sha1="8c414a1e26ac98d07f774cc8b16eb2fa8da0ca61"/>
147         </diskarea>
148      </part>
149   </software>
150
151<!-- size="272935197" crc="82e6fdf0" -->
152   <software name="intcdv11">
153      <description>Interactive CD Sampler Disc - Volume 11</description>
154      <year>1999</year>
155      <publisher>SCEA</publisher>
156      <part name="cdrom" interface="psx_cdrom">
157         <diskarea name="cdrom">
158            <disk name="Interactive CD Sampler Disc - Volume 11" sha1="3029004840d98c2789d2a0d93bdd762b3c56df0f"/>
159         </diskarea>
160      </part>
161   </software>
162
163<!-- size="149681460" crc="99551669" -->
164   <software name="intcdtru">
165      <description>Toys R Us - Interactive CD Sampler Disc</description>
166      <year>1998</year>
167      <publisher>SCEA</publisher>
168      <part name="cdrom" interface="psx_cdrom">
169         <diskarea name="cdrom">
170            <disk name="Toys R Us - Interactive CD Sampler Disc" sha1="4abae391a7ad1e38c2ee7cbd7401caebcf091df3"/>
171         </diskarea>
172      </part>
173   </software>
174
175<!-- size="93662349" crc="59bd7278" -->
176   <software name="intcdff7">
177      <description>Final Fantasy VII Interactive Sampler CD</description>
178      <year>1996</year>
179      <publisher>SCEA</publisher>
180      <part name="cdrom" interface="psx_cdrom">
181         <diskarea name="cdrom">
182            <disk name="Final Fantasy VII Interactive Sampler CD" sha1="0a88439b32be5172e79847f79ae33b6ba22b1de6"/>
183         </diskarea>
184      </part>
185   </software>
186
7187<!--
8188***********************
9189NON-REDUMP Rips
r250291r250292
27207   that subtle errors are introduced either in this procedure, or in the original creation of the mdf/mds/cdi image. These should
28208   be verified with the original media, and are marked as bad dumps.
29209-->
210   <!-- todo, reconvert original dumps using current CHDMAN version - Feb 2014 -->
30211
31
32212<!-- Pirate disks -->
33213
34214   <software name="ddrdmp" supported="no">
trunk/makefile
r250291r250292
674674   $(wildcard src/osd/$(OSD)/$(OSD).mak) \
675675   $(wildcard src/$(TARGET)/$(SUBTARGET).mak)
676676
677ifeq ($(SUBTARGET),mame)
678SCRIPTS += scripts/target/$(TARGET)/arcade.lua
679SCRIPTS += scripts/target/$(TARGET)/mess.lua
680endif
681
677682ifndef SOURCES
678683SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET).lua
679684endif
r250291r250292
841846vs2015: generate
842847   $(SILENT) $(GENIE) $(PARAMS) vs2015
843848
849vs2015_intel: generate
850   $(SILENT) $(GENIE) $(PARAMS) --vs=intel-15 vs2015
851
852vs2015_xp: generate
853   $(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-xp vs2015
854
855vs2015_clang: generate
856   $(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-clang vs2015
857
858vs2015_winrt: generate
859   $(SILENT) $(GENIE) $(PARAMS) --vs=winstore81 vs2015
860
844861android-arm: generate
845862ifndef ANDROID_NDK_ARM
846863   $(error ANDROID_NDK_ARM is not set)
trunk/scripts/genie.lua
r250291r250292
532532   os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " drivers " .. _OPTIONS["subtarget"] .. " > ".. GEN_DIR  .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"].."/drivlist.cpp")
533533end
534534configuration { "gmake" }
535   defines {
536      "nullptr=NULL" -- getting ready for C++11
537   }
535538   flags {
536539      "SingleOutputDir",
537540   }
r250291r250292
12541257         "/Qwd1478",          -- warning #1478: function "xxx" (declared at line yyy of "zzz") was declared deprecated
12551258         "/Qwd1879",          -- warning #1879: unimplemented pragma ignored
12561259         "/Qwd3291",          -- warning #3291: invalid narrowing conversion from "double" to "int"
1257         "/Qwd1195",
1258         "/Qwd1786",
1259         "/Qwd592", -- For lua, false positive?
1260         "/Qwd1195",          -- error #1195: conversion from integer to smaller pointer
1261         "/Qwd47",            -- error #47: incompatible redefinition of macro "xxx"
1262         "/Qwd265",            -- error #265: floating-point operation result is out of range
1263         -- these occur on a release build, while we can increase the size limits instead some of the files do require extreme amounts
1264         "/Qwd11074",         -- remark #11074: Inlining inhibited by limit max-size  / remark #11074: Inlining inhibited by limit max-total-size
1265         "/Qwd11075",         -- remark #11075: To get full report use -Qopt-report:4 -Qopt-report-phase ipo
12601266      }
12611267end
12621268
trunk/scripts/src/3rdparty.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   3rdparty.lua
7--
8--   Library objects for all 3rdparty sources
9--
10---------------------------------------------------------------------------
11
412--------------------------------------------------
513-- expat library objects
614--------------------------------------------------
r250291r250292
1624         "/wd4127", -- warning C4127: conditional expression is constant
1725         "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
1826      }
27if _OPTIONS["vs"]=="intel-15" then
28      buildoptions {
29         "/Qwd111",           -- remark #111: statement is unreachable
30         "/Qwd1879",          -- warning #1879: unimplemented pragma ignored
31         "/Qwd2557",          -- remark #2557: comparison between signed and unsigned operands
32         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
33      }
34end
1935   configuration { "vs2015" }
2036      buildoptions {
2137         "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
r250291r250292
4864         "/wd4127", -- warning C4127: conditional expression is constant
4965         "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
5066      }
51
67if _OPTIONS["vs"]=="intel-15" then
68      buildoptions {
69         "/Qwd111",           -- remark #111: statement is unreachable
70         "/Qwd280",           -- remark #280: selector expression is constant
71      }
72end
5273   configuration "Debug"
5374      defines {
5475         "verbose=-1",
r250291r250292
98119   includedirs {
99120      MAME_DIR .. "src/osd",
100121   }
101   
122if _OPTIONS["vs"]=="intel-15" then
123      buildoptions {
124         "/Qwd2557",          -- remark #2557: comparison between signed and unsigned operands
125      }
126end   
102127   files {
103128      MAME_DIR .. "3rdparty/softfloat/softfloat.c",
104129      MAME_DIR .. "3rdparty/softfloat/fsincos.c",
r250291r250292
120145         "/wd4127", -- warning C4127: conditional expression is constant
121146         "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
122147      }
148if _OPTIONS["vs"]=="intel-15" then
149      buildoptions {
150         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
151      }
152end   
123153
124154   configuration { }
125155
r250291r250292
193223         "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter   
194224         "/wd4702", -- warning C4702: unreachable code
195225      }
226if _OPTIONS["vs"]=="intel-15" then
227      buildoptions {
228         "/Qwd111",           -- remark #111: statement is unreachable
229         "/Qwd177",           -- remark #177: function "xxx" was declared but never referenced
230         "/Qwd181",           -- remark #181: argument of type "UINT32={unsigned int}" is incompatible with format "%d", expecting argument of type "int"
231         "/Qwd188",           -- error #188: enumerated type mixed with another type
232         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
233      }
234end   
196235
197236   configuration { "vs2015" }
198237      buildoptions {
r250291r250292
261300      buildoptions {
262301         "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
263302      }
303if _OPTIONS["vs"]=="intel-15" then
304      buildoptions {
305         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
306      }
307end
264308   configuration { "vs2015" }
265309      buildoptions {
266310         "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
r250291r250292
318362         "/wd4702", -- warning C4702: unreachable code
319363         "/wd4310", -- warning C4310: cast truncates constant value
320364      }
321
365if _OPTIONS["vs"]=="intel-15" then
366      buildoptions {
367         "/Qwd592", -- error #592: variable "xxx" is used before its value is set
368      }
369end
322370   configuration { }
323371      defines {
324372         "LUA_COMPAT_ALL",
r250291r250292
459507         "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter
460508         "/wd4706", -- warning C4706: assignment within conditional expression
461509      }
510if _OPTIONS["vs"]=="intel-15" then
511      buildoptions {
512         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
513         "/Qwd2557",          -- remark #2557: comparison between signed and unsigned operands
514      }
515end
462516
463517   configuration { "vs2015" }
464518      buildoptions {
r250291r250292
513567         "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data
514568         "/wd4706", -- warning C4706: assignment within conditional expression
515569      }
570if _OPTIONS["vs"]=="intel-15" then
571      buildoptions {
572         "/Qwd188",           -- error #188: enumerated type mixed with another type
573         "/Qwd344",           -- remark #344: typedef name has already been declared (with same type)
574         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
575         "/Qwd2557",          -- remark #2557: comparison between signed and unsigned operands
576      }
577end
516578
517579   configuration { "vs2015" }
518580      buildoptions {
r250291r250292
587649         "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
588650         "/wd4310", -- warning C4310: cast truncates constant value         
589651      }
590
652if _OPTIONS["vs"]=="intel-15" then
653      buildoptions {
654         "/Qwd906",           -- message #906: effect of this "#pragma pack" directive is local to function "xxx"
655         "/Qwd1879",          -- warning #1879: unimplemented pragma ignored
656         "/Qwd82",            -- remark #82: storage class is not first
657      }
658end
591659   configuration { }
592660
593661   includedirs {     
r250291r250292
706774         "/wd4189", -- warning C4189: 'xxx' : local variable is initialized but not referenced
707775         "/wd4127", -- warning C4127: conditional expression is constant
708776      }
709
777if _OPTIONS["vs"]=="intel-15" then
778      buildoptions {
779         "/Qwd869",           -- remark #869: parameter "xxx" was never referenced
780         "/Qwd1478",          -- warning #1478: function "xxx" (declared at line yyy of "zzz") was declared deprecated
781         "/Qwd2544",          -- message #2544: empty dependent statement in if-statement
782         "/Qwd1879",          -- warning #1879: unimplemented pragma ignored
783      }
784end
710785   configuration { "vs2015" }
711786      buildoptions {
712787         "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration
r250291r250292
848923         "-Wno-unused-variable",
849924      }
850925
926   configuration { "vs*" }
927if _OPTIONS["vs"]=="intel-15" then
928      buildoptions {
929         "/Qwd1195",          -- error #1195: conversion from integer to smaller pointer
930      }
931end
932
851933   configuration { }
852934
853935   includedirs {
trunk/scripts/src/bus.lua
r250291r250292
22052205      MAME_DIR .. "src/devices/bus/cpc/magicsound.h",
22062206      MAME_DIR .. "src/devices/bus/cpc/doubler.cpp",
22072207      MAME_DIR .. "src/devices/bus/cpc/doubler.h",
2208      MAME_DIR .. "src/devices/bus/cpc/transtape.cpp",
2209      MAME_DIR .. "src/devices/bus/cpc/transtape.h",
22082210   }
22092211end
22102212
trunk/scripts/src/cpu.lua
r250291r250292
9090      MAME_DIR .. "src/devices/cpu/arcompact/arcompact.cpp",
9191      MAME_DIR .. "src/devices/cpu/arcompact/arcompact.h",
9292      MAME_DIR .. "src/devices/cpu/arcompact/arcompact_execute.cpp",
93      MAME_DIR .. "src/devices/cpu/arcompact/arcompactdasm_dispatch.h",
94      MAME_DIR .. "src/devices/cpu/arcompact/arcompactdasm_ops.h",
95      MAME_DIR .. "src/devices/cpu/arcompact/arcompact_common.h",
9396   }
9497   dependency {
9598      { MAME_DIR .. "src/devices/cpu/arcompact/arcompact.cpp",        GEN_DIR .. "emu/cpu/arcompact/arcompact.inc" },
r250291r250292
134137      MAME_DIR .. "src/devices/cpu/arm7/arm7ops.cpp",
135138      MAME_DIR .. "src/devices/cpu/arm7/lpc210x.cpp",
136139      MAME_DIR .. "src/devices/cpu/arm7/lpc210x.h",
140      MAME_DIR .. "src/devices/cpu/arm7/arm7core.h",
141      MAME_DIR .. "src/devices/cpu/arm7/arm7core.inc",
142      MAME_DIR .. "src/devices/cpu/arm7/arm7drc.inc",
143      MAME_DIR .. "src/devices/cpu/arm7/arm7help.h",
144      MAME_DIR .. "src/devices/cpu/arm7/arm7tdrc.inc",
137145   }
138146end
139147
r250291r250292
199207   files {
200208      MAME_DIR .. "src/devices/cpu/adsp2100/adsp2100.cpp",
201209      MAME_DIR .. "src/devices/cpu/adsp2100/adsp2100.h",
210      MAME_DIR .. "src/devices/cpu/adsp2100/2100ops.inc",
202211   }
203212end
204213
r250291r250292
215224   files {
216225      MAME_DIR .. "src/devices/cpu/sharc/sharc.cpp",
217226      MAME_DIR .. "src/devices/cpu/sharc/sharc.h",
227      MAME_DIR .. "src/devices/cpu/sharc/compute.inc",
228      MAME_DIR .. "src/devices/cpu/sharc/sharcdma.inc",
229      MAME_DIR .. "src/devices/cpu/sharc/sharcdsm.h",
230      MAME_DIR .. "src/devices/cpu/sharc/sharcmem.inc",
231      MAME_DIR .. "src/devices/cpu/sharc/sharcops.h",
232      MAME_DIR .. "src/devices/cpu/sharc/sharcops.inc",
218233   }
219234end
220235
r250291r250292
247262   files {
248263      MAME_DIR .. "src/devices/cpu/dsp16/dsp16.cpp",
249264      MAME_DIR .. "src/devices/cpu/dsp16/dsp16.h",
265      MAME_DIR .. "src/devices/cpu/dsp16/dsp16ops.inc",
250266   }
251267end
252268
r250291r250292
263279   files {
264280      MAME_DIR .. "src/devices/cpu/dsp32/dsp32.cpp",
265281      MAME_DIR .. "src/devices/cpu/dsp32/dsp32.h",
282      MAME_DIR .. "src/devices/cpu/dsp32/dsp32ops.inc",
266283   }
267284end
268285
r250291r250292
295312   files {
296313      MAME_DIR .. "src/devices/cpu/am29000/am29000.cpp",
297314      MAME_DIR .. "src/devices/cpu/am29000/am29000.h",
315      MAME_DIR .. "src/devices/cpu/am29000/am29ops.h",
298316   }
299317end
300318
r250291r250292
373391      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6200.h",
374392      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6s46.cpp",
375393      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6s46.h",
394      MAME_DIR .. "src/devices/cpu/e0c6200/e0c6200op.inc",
376395   }
377396end
378397
r250291r250292
405424   files {
406425      MAME_DIR .. "src/devices/cpu/cop400/cop400.cpp",
407426      MAME_DIR .. "src/devices/cpu/cop400/cop400.h",
427      MAME_DIR .. "src/devices/cpu/cop400/cop400op.inc",
408428   }
409429end
410430
r250291r250292
455475   files {
456476      MAME_DIR .. "src/devices/cpu/t11/t11.cpp",
457477      MAME_DIR .. "src/devices/cpu/t11/t11.h",
478      MAME_DIR .. "src/devices/cpu/t11/t11ops.inc",
479      MAME_DIR .. "src/devices/cpu/t11/t11table.inc",
458480   }
459481end
460482
r250291r250292
508530      MAME_DIR .. "src/devices/cpu/g65816/g65816o2.cpp",
509531      MAME_DIR .. "src/devices/cpu/g65816/g65816o3.cpp",
510532      MAME_DIR .. "src/devices/cpu/g65816/g65816o4.cpp",
533      MAME_DIR .. "src/devices/cpu/g65816/g65816cm.h",
534      MAME_DIR .. "src/devices/cpu/g65816/g65816ds.h",
535      MAME_DIR .. "src/devices/cpu/g65816/g65816op.h",
511536   }
512537end
513538
r250291r250292
586611   files {
587612      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121.cpp",
588613      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121.h",
614      MAME_DIR .. "src/devices/cpu/hcd62121/hcd62121_ops.h",
589615   }
590616end
591617
r250291r250292
620646      MAME_DIR .. "src/devices/cpu/sh2/sh2.cpp",
621647      MAME_DIR .. "src/devices/cpu/sh2/sh2.h",
622648      MAME_DIR .. "src/devices/cpu/sh2/sh2fe.cpp",
649      --MAME_DIR .. "src/devices/cpu/sh2/sh2comn.cpp",
650      --MAME_DIR .. "src/devices/cpu/sh2/sh2comn.h",
651      --MAME_DIR .. "src/devices/cpu/sh2/sh2drc.cpp",
623652   }
624653end
625654
r250291r250292
644673      MAME_DIR .. "src/devices/cpu/sh4/sh4tmu.h",
645674      MAME_DIR .. "src/devices/cpu/sh4/sh4dmac.cpp",
646675      MAME_DIR .. "src/devices/cpu/sh4/sh4dmac.h",
676      MAME_DIR .. "src/devices/cpu/sh4/sh4regs.h",
647677   }
648678end
649679
r250291r250292
692722   files {
693723      MAME_DIR .. "src/devices/cpu/e132xs/e132xs.cpp",
694724      MAME_DIR .. "src/devices/cpu/e132xs/e132xs.h",
725      MAME_DIR .. "src/devices/cpu/e132xs/e132xsop.inc",
695726   }
696727end
697728
r250291r250292
772803   files {
773804      MAME_DIR .. "src/devices/cpu/i8085/i8085.cpp",
774805      MAME_DIR .. "src/devices/cpu/i8085/i8085.h",
806      MAME_DIR .. "src/devices/cpu/i8085/i8085cpu.h",
775807   }
776808end
777809
r250291r250292
823855   files {
824856      MAME_DIR .. "src/devices/cpu/mcs51/mcs51.cpp",
825857      MAME_DIR .. "src/devices/cpu/mcs51/mcs51.h",
858      MAME_DIR .. "src/devices/cpu/mcs51/mcs51ops.inc",
826859   }
827860end
828861
r250291r250292
872905      MAME_DIR .. "src/devices/cpu/i86/i186.h",
873906      MAME_DIR .. "src/devices/cpu/i86/i286.cpp",
874907      MAME_DIR .. "src/devices/cpu/i86/i286.h",
908      MAME_DIR .. "src/devices/cpu/i86/i86inline.h",
875909   }
876910end
877911
r250291r250292
883917   files {
884918      MAME_DIR .. "src/devices/cpu/i386/i386.cpp",
885919      MAME_DIR .. "src/devices/cpu/i386/i386.h",
920      MAME_DIR .. "src/devices/cpu/i386/cycles.h",
921      MAME_DIR .. "src/devices/cpu/i386/i386op16.inc",
922      MAME_DIR .. "src/devices/cpu/i386/i386op32.inc",
923      MAME_DIR .. "src/devices/cpu/i386/i386ops.h",
924      MAME_DIR .. "src/devices/cpu/i386/i386ops.inc",
925      MAME_DIR .. "src/devices/cpu/i386/i386priv.h",
926      MAME_DIR .. "src/devices/cpu/i386/i486ops.inc",
927      MAME_DIR .. "src/devices/cpu/i386/pentops.inc",
928      MAME_DIR .. "src/devices/cpu/i386/x87ops.inc",
886929   }
887930end
888931
r250291r250292
899942   files {
900943      MAME_DIR .. "src/devices/cpu/i860/i860.cpp",
901944      MAME_DIR .. "src/devices/cpu/i860/i860.h",
945      --MAME_DIR .. "src/devices/cpu/i860/i860dasm.cpp",
946      MAME_DIR .. "src/devices/cpu/i860/i860dec.inc",
902947   }
903948end
904949
r250291r250292
914959if (CPUS["I960"]~=null) then
915960   files {
916961      MAME_DIR .. "src/devices/cpu/i960/i960.cpp",
917      MAME_DIR .. "src/devices/cpu/i960/i960.h",
962      MAME_DIR .. "src/devices/cpu/i960/i960.h",     
918963   }
919964end
920965
921966if (CPUS["I960"]~=null or _OPTIONS["with-tools"]) then
922967   table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/i960/i960dis.cpp")
968   table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/i960/i960dis.h")
923969end
924970
925971--------------------------------------------------
r250291r250292
931977   files {
932978      MAME_DIR .. "src/devices/cpu/lh5801/lh5801.cpp",
933979      MAME_DIR .. "src/devices/cpu/lh5801/lh5801.h",
980      MAME_DIR .. "src/devices/cpu/lh5801/5801tbl.inc",
934981   }
935982end
936983
r250291r250292
10111058   files {
10121059      MAME_DIR .. "src/devices/cpu/pic16c5x/pic16c5x.cpp",
10131060      MAME_DIR .. "src/devices/cpu/pic16c5x/pic16c5x.h",
1061      --MAME_DIR .. "src/devices/cpu/pic16c5x/dis16c5x.cpp",
10141062   }
10151063end
10161064
r250291r250292
10271075   files {
10281076      MAME_DIR .. "src/devices/cpu/pic16c62x/pic16c62x.cpp",
10291077      MAME_DIR .. "src/devices/cpu/pic16c62x/pic16c62x.h",
1078      --MAME_DIR .. "src/devices/cpu/pic16c62x/dis16c62x.cpp",
10301079   }
10311080end
10321081
r250291r250292
10801129      MAME_DIR .. "src/devices/cpu/psx/rcnt.h",
10811130      MAME_DIR .. "src/devices/cpu/psx/sio.cpp",
10821131      MAME_DIR .. "src/devices/cpu/psx/sio.h",
1132      --MAME_DIR .. "src/devices/cpu/psx/dismips.cpp",
10831133   }
10841134end
10851135
r250291r250292
11191169      MAME_DIR .. "src/devices/cpu/m37710/m37710o1.cpp",
11201170      MAME_DIR .. "src/devices/cpu/m37710/m37710o2.cpp",
11211171      MAME_DIR .. "src/devices/cpu/m37710/m37710o3.cpp",
1172      MAME_DIR .. "src/devices/cpu/m37710/m37710cm.h",
1173      MAME_DIR .. "src/devices/cpu/m37710/m37710il.h",
1174      MAME_DIR .. "src/devices/cpu/m37710/m37710op.h",
1175      MAME_DIR .. "src/devices/cpu/m37710/m7700ds.h",   
11221176   }
11231177end
11241178
r250291r250292
12261280   files {
12271281      MAME_DIR .. "src/devices/cpu/m6800/m6800.cpp",
12281282      MAME_DIR .. "src/devices/cpu/m6800/m6800.h",
1283      MAME_DIR .. "src/devices/cpu/m6800/6800ops.inc",
1284      MAME_DIR .. "src/devices/cpu/m6800/6800tbl.inc",
12291285   }
12301286end
12311287
r250291r250292
12421298   files {
12431299      MAME_DIR .. "src/devices/cpu/m6805/m6805.cpp",
12441300      MAME_DIR .. "src/devices/cpu/m6805/m6805.h",
1301      MAME_DIR .. "src/devices/cpu/m6805/6805ops.inc",
12451302   }
12461303end
12471304
r250291r250292
12641321      MAME_DIR .. "src/devices/cpu/m6809/hd6309.h",
12651322      MAME_DIR .. "src/devices/cpu/m6809/konami.cpp",
12661323      MAME_DIR .. "src/devices/cpu/m6809/konami.h",
1324      MAME_DIR .. "src/devices/cpu/m6809/m6809inl.h",
12671325   }
12681326
12691327   dependency {
r250291r250292
12941352   files {
12951353      MAME_DIR .. "src/devices/cpu/mc68hc11/mc68hc11.cpp",
12961354      MAME_DIR .. "src/devices/cpu/mc68hc11/mc68hc11.h",
1355      MAME_DIR .. "src/devices/cpu/mc68hc11/hc11ops.h",
1356      MAME_DIR .. "src/devices/cpu/mc68hc11/hc11ops.inc",
12971357   }
12981358end
12991359
r250291r250292
13121372      MAME_DIR .. "src/devices/cpu/m68000/m68kcpu.h",
13131373      MAME_DIR .. "src/devices/cpu/m68000/m68kops.cpp",
13141374      MAME_DIR .. "src/devices/cpu/m68000/m68kops.h",
1375      MAME_DIR .. "src/devices/cpu/m68000/m68000.h",
1376      MAME_DIR .. "src/devices/cpu/m68000/m68kfpu.inc",
1377      --MAME_DIR .. "src/devices/cpu/m68000/m68kmake.cpp",
1378      MAME_DIR .. "src/devices/cpu/m68000/m68kmmu.h",
1379      --MAME_DIR .. "src/devices/cpu/m68000/m68k_in.cpp",
13151380   }
13161381end
13171382
r250291r250292
13321397      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56mem.h",
13331398      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56pcu.cpp",
13341399      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56pcu.h",
1400      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56def.h",
1401      MAME_DIR .. "src/devices/cpu/dsp56k/dsp56ops.inc",
1402      MAME_DIR .. "src/devices/cpu/dsp56k/inst.h",
1403      MAME_DIR .. "src/devices/cpu/dsp56k/opcode.h",
1404      MAME_DIR .. "src/devices/cpu/dsp56k/pmove.h",
1405      MAME_DIR .. "src/devices/cpu/dsp56k/tables.h",
13351406   }
13361407end
13371408
r250291r250292
13761447      MAME_DIR .. "src/devices/cpu/powerpc/ppcfe.cpp",
13771448      MAME_DIR .. "src/devices/cpu/powerpc/ppcfe.h",
13781449      MAME_DIR .. "src/devices/cpu/powerpc/ppcdrc.cpp",
1450     
1451      --MAME_DIR .. "src/devices/cpu/powerpc/drc_ops.cpp",
1452      MAME_DIR .. "src/devices/cpu/powerpc/drc_ops.h",
1453      --MAME_DIR .. "src/devices/cpu/powerpc/ppc.cpp",
1454      MAME_DIR .. "src/devices/cpu/powerpc/ppc.h",
1455      MAME_DIR .. "src/devices/cpu/powerpc/ppc403.inc",
1456      MAME_DIR .. "src/devices/cpu/powerpc/ppc602.inc",
1457      MAME_DIR .. "src/devices/cpu/powerpc/ppc603.inc",
1458      MAME_DIR .. "src/devices/cpu/powerpc/ppc_mem.inc",
1459      MAME_DIR .. "src/devices/cpu/powerpc/ppc_ops.h",
1460      MAME_DIR .. "src/devices/cpu/powerpc/ppc_ops.inc",
13791461   }
13801462end
13811463
r250291r250292
13931475   files {
13941476      MAME_DIR .. "src/devices/cpu/nec/nec.cpp",
13951477      MAME_DIR .. "src/devices/cpu/nec/nec.h",
1478      MAME_DIR .. "src/devices/cpu/nec/necea.h",
1479      MAME_DIR .. "src/devices/cpu/nec/necinstr.h",
1480      MAME_DIR .. "src/devices/cpu/nec/necinstr.inc",
1481      MAME_DIR .. "src/devices/cpu/nec/necmacro.h",
1482      MAME_DIR .. "src/devices/cpu/nec/necmodrm.h",
1483      MAME_DIR .. "src/devices/cpu/nec/necpriv.h",
1484      MAME_DIR .. "src/devices/cpu/nec/v25instr.h",
1485      MAME_DIR .. "src/devices/cpu/nec/v25instr.inc",
1486      MAME_DIR .. "src/devices/cpu/nec/v25priv.h",
13961487      MAME_DIR .. "src/devices/cpu/nec/v25.cpp",
13971488      MAME_DIR .. "src/devices/cpu/nec/v25.h",
13981489      MAME_DIR .. "src/devices/cpu/nec/v25sfr.cpp",
r250291r250292
14251516   files {
14261517      MAME_DIR .. "src/devices/cpu/v60/v60.cpp",
14271518      MAME_DIR .. "src/devices/cpu/v60/v60.h",
1519      MAME_DIR .. "src/devices/cpu/v60/am.inc",
1520      MAME_DIR .. "src/devices/cpu/v60/am1.inc",
1521      MAME_DIR .. "src/devices/cpu/v60/am2.inc",
1522      MAME_DIR .. "src/devices/cpu/v60/am3.inc",
1523      MAME_DIR .. "src/devices/cpu/v60/op12.inc",
1524      MAME_DIR .. "src/devices/cpu/v60/op2.inc",
1525      MAME_DIR .. "src/devices/cpu/v60/op3.inc",
1526      MAME_DIR .. "src/devices/cpu/v60/op4.inc",
1527      MAME_DIR .. "src/devices/cpu/v60/op5.inc",
1528      MAME_DIR .. "src/devices/cpu/v60/op6.inc",
1529      MAME_DIR .. "src/devices/cpu/v60/op7a.inc",
1530      MAME_DIR .. "src/devices/cpu/v60/optable.inc",
14281531   }
14291532end
14301533
r250291r250292
14751578      MAME_DIR .. "src/devices/cpu/upd7810/upd7810.h",
14761579      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_opcodes.cpp",
14771580      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_table.cpp",
1581      MAME_DIR .. "src/devices/cpu/upd7810/upd7810_macros.h",
14781582   }
14791583end
14801584
r250291r250292
15081612   files {
15091613      MAME_DIR .. "src/devices/cpu/minx/minx.cpp",
15101614      MAME_DIR .. "src/devices/cpu/minx/minx.h",
1615      MAME_DIR .. "src/devices/cpu/minx/minxfunc.h",
1616      MAME_DIR .. "src/devices/cpu/minx/minxopce.h",
1617      MAME_DIR .. "src/devices/cpu/minx/minxopcf.h",
1618      MAME_DIR .. "src/devices/cpu/minx/minxops.h",   
15111619   }
15121620end
15131621
r250291r250292
15571665      MAME_DIR .. "src/devices/cpu/rsp/vsub.h",
15581666      MAME_DIR .. "src/devices/cpu/rsp/vsubc.h",
15591667      MAME_DIR .. "src/devices/cpu/rsp/vxor.h",
1668      MAME_DIR .. "src/devices/cpu/rsp/rspdiv.h",
15601669   }
15611670end
15621671
r250291r250292
15891698   files {
15901699      MAME_DIR .. "src/devices/cpu/saturn/saturn.cpp",
15911700      MAME_DIR .. "src/devices/cpu/saturn/saturn.h",
1701      MAME_DIR .. "src/devices/cpu/saturn/satops.inc",
1702      MAME_DIR .. "src/devices/cpu/saturn/sattable.inc",     
15921703   }
15931704end
15941705
r250291r250292
16241735   files {
16251736      MAME_DIR .. "src/devices/cpu/sm8500/sm8500.cpp",
16261737      MAME_DIR .. "src/devices/cpu/sm8500/sm8500.h",
1738      MAME_DIR .. "src/devices/cpu/sm8500/sm85ops.h",
16271739   }
16281740end
16291741
r250291r250292
16401752   files {
16411753      MAME_DIR .. "src/devices/cpu/s2650/s2650.cpp",
16421754      MAME_DIR .. "src/devices/cpu/s2650/s2650.h",
1755      MAME_DIR .. "src/devices/cpu/s2650/s2650cpu.h",
16431756   }
16441757end
16451758
r250291r250292
16561769   files {
16571770      MAME_DIR .. "src/devices/cpu/sc61860/sc61860.cpp",
16581771      MAME_DIR .. "src/devices/cpu/sc61860/sc61860.h",
1772      --MAME_DIR .. "src/devices/cpu/sc61860/readpc.cpp",
1773      MAME_DIR .. "src/devices/cpu/sc61860/scops.inc",
1774      MAME_DIR .. "src/devices/cpu/sc61860/sctable.inc",
16591775   }
16601776end
16611777
r250291r250292
16721788   files {
16731789      MAME_DIR .. "src/devices/cpu/spc700/spc700.cpp",
16741790      MAME_DIR .. "src/devices/cpu/spc700/spc700.h",
1791      MAME_DIR .. "src/devices/cpu/spc700/spc700ds.h",
16751792   }
16761793end
16771794
r250291r250292
17521869   files {
17531870      MAME_DIR .. "src/devices/cpu/tms7000/tms7000.cpp",
17541871      MAME_DIR .. "src/devices/cpu/tms7000/tms7000.h",
1872      MAME_DIR .. "src/devices/cpu/tms7000/tms70op.inc",
17551873   }
17561874end
17571875
r250291r250292
17771895      MAME_DIR .. "src/devices/cpu/tms9900/tms9995.h",
17781896      MAME_DIR .. "src/devices/cpu/tms9900/ti990_10.cpp",
17791897      MAME_DIR .. "src/devices/cpu/tms9900/ti990_10.h",
1898      MAME_DIR .. "src/devices/cpu/tms9900/99xxcore.h",
1899      MAME_DIR .. "src/devices/cpu/tms9900/tms99com.h",
17801900   }
17811901end
17821902
r250291r250292
17931913   files {
17941914      MAME_DIR .. "src/devices/cpu/tms34010/tms34010.cpp",
17951915      MAME_DIR .. "src/devices/cpu/tms34010/tms34010.h",
1916      MAME_DIR .. "src/devices/cpu/tms34010/34010fld.inc",
1917      MAME_DIR .. "src/devices/cpu/tms34010/34010gfx.inc",
1918      MAME_DIR .. "src/devices/cpu/tms34010/34010ops.h",
1919      MAME_DIR .. "src/devices/cpu/tms34010/34010ops.inc",
1920      MAME_DIR .. "src/devices/cpu/tms34010/34010tbl.inc",
1921      --MAME_DIR .. "src/devices/cpu/tms34010/dis34010.cpp",
17961922   }
17971923end
17981924
r250291r250292
18091935   files {
18101936      MAME_DIR .. "src/devices/cpu/tms32010/tms32010.cpp",
18111937      MAME_DIR .. "src/devices/cpu/tms32010/tms32010.h",
1938      --MAME_DIR .. "src/devices/cpu/tms32010/dis32010.cpp",
18121939   }
18131940end
18141941
r250291r250292
18251952   files {
18261953      MAME_DIR .. "src/devices/cpu/tms32025/tms32025.cpp",
18271954      MAME_DIR .. "src/devices/cpu/tms32025/tms32025.h",
1955      --MAME_DIR .. "src/devices/cpu/tms32025/dis32025.cpp",
18281956   }
18291957end
18301958
r250291r250292
18411969   files {
18421970      MAME_DIR .. "src/devices/cpu/tms32031/tms32031.cpp",
18431971      MAME_DIR .. "src/devices/cpu/tms32031/tms32031.h",
1972      MAME_DIR .. "src/devices/cpu/tms32031/32031ops.inc",
18441973   }
18451974end
18461975
r250291r250292
18571986   files {
18581987      MAME_DIR .. "src/devices/cpu/tms32051/tms32051.cpp",
18591988      MAME_DIR .. "src/devices/cpu/tms32051/tms32051.h",
1989      MAME_DIR .. "src/devices/cpu/tms32051/32051ops.h",
1990      MAME_DIR .. "src/devices/cpu/tms32051/32051ops.inc",
18601991   }
18611992end
18621993
r250291r250292
19292060   files {
19302061      MAME_DIR .. "src/devices/cpu/tlcs900/tlcs900.cpp",
19312062      MAME_DIR .. "src/devices/cpu/tlcs900/tlcs900.h",
2063      MAME_DIR .. "src/devices/cpu/tlcs900/900tbl.inc",
19322064   }
19332065end
19342066
r250291r250292
19702102   files {
19712103      MAME_DIR .. "src/devices/cpu/lr35902/lr35902.cpp",
19722104      MAME_DIR .. "src/devices/cpu/lr35902/lr35902.h",
2105      MAME_DIR .. "src/devices/cpu/lr35902/opc_cb.inc",
2106      MAME_DIR .. "src/devices/cpu/lr35902/opc_main.inc",
19732107   }
19742108end
19752109
r250291r250292
19862120   files {
19872121      MAME_DIR .. "src/devices/cpu/z180/z180.cpp",
19882122      MAME_DIR .. "src/devices/cpu/z180/z180.h",
2123      MAME_DIR .. "src/devices/cpu/z180/z180cb.inc",
2124      MAME_DIR .. "src/devices/cpu/z180/z180dd.inc",
2125      MAME_DIR .. "src/devices/cpu/z180/z180ed.inc",
2126      MAME_DIR .. "src/devices/cpu/z180/z180fd.inc",
2127      MAME_DIR .. "src/devices/cpu/z180/z180op.inc",
2128      MAME_DIR .. "src/devices/cpu/z180/z180ops.h",
2129      MAME_DIR .. "src/devices/cpu/z180/z180tbl.h",
2130      MAME_DIR .. "src/devices/cpu/z180/z180xy.inc",
19892131      MAME_DIR .. "src/devices/cpu/z80/z80daisy.cpp",
19902132      MAME_DIR .. "src/devices/cpu/z80/z80daisy.h",
19912133   }
r250291r250292
20042146   files {
20052147      MAME_DIR .. "src/devices/cpu/z8000/z8000.cpp",
20062148      MAME_DIR .. "src/devices/cpu/z8000/z8000.h",
2149      --MAME_DIR .. "src/devices/cpu/z8000/makedab.cpp",
2150      MAME_DIR .. "src/devices/cpu/z8000/z8000cpu.h",
2151      MAME_DIR .. "src/devices/cpu/z8000/z8000dab.h",
2152      MAME_DIR .. "src/devices/cpu/z8000/z8000ops.inc",
2153      MAME_DIR .. "src/devices/cpu/z8000/z8000tbl.inc",
20072154   }
20082155end
20092156
r250291r250292
20202167   files {
20212168      MAME_DIR .. "src/devices/cpu/z8/z8.cpp",
20222169      MAME_DIR .. "src/devices/cpu/z8/z8.h",
2170      MAME_DIR .. "src/devices/cpu/z8/z8ops.inc",
20232171   }
20242172end
20252173
r250291r250292
21162264   files {
21172265      MAME_DIR .. "src/devices/cpu/score/score.cpp",
21182266      MAME_DIR .. "src/devices/cpu/score/score.h",
2267      MAME_DIR .. "src/devices/cpu/score/scorem.h",
21192268   }
21202269end
21212270
r250291r250292
21682317      MAME_DIR .. "src/devices/cpu/alto2/a2ram.h",
21692318      MAME_DIR .. "src/devices/cpu/alto2/a2roms.cpp",
21702319      MAME_DIR .. "src/devices/cpu/alto2/a2roms.h",
2320      MAME_DIR .. "src/devices/cpu/alto2/a2jkff.h",
21712321   }
21722322end
21732323
trunk/scripts/src/devices.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   devices.lua
7--
8--   Rules for building device cores
9--
10---------------------------------------------------------------------------
11
412function devicesProject(_target, _subtarget)
513
614   disasm_files = { }
trunk/scripts/src/emu.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   emu.lua
7--
8--   Rules for building emu cores
9--
10---------------------------------------------------------------------------
11
412project ("emu")
513targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
614uuid ("e6fa15e4-a354-4526-acef-13c8e80fcacf")
trunk/scripts/src/lib.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   lib.lua
7--
8--   Rules for building lib cores
9--
10---------------------------------------------------------------------------
11
412project "utils"
513   uuid "22489ad0-4cb2-4d91-ad81-24b0d80ca30a"
614   kind (LIBTYPE)
r250291r250292
178186      MAME_DIR .. "src/lib/formats/c8280_dsk.h",
179187      MAME_DIR .. "src/lib/formats/camplynx_cas.cpp",
180188      MAME_DIR .. "src/lib/formats/camplynx_cas.h",
189      MAME_DIR .. "src/lib/formats/camplynx_dsk.cpp",
190      MAME_DIR .. "src/lib/formats/camplynx_dsk.h",
181191      MAME_DIR .. "src/lib/formats/cbm_crt.cpp",
182192      MAME_DIR .. "src/lib/formats/cbm_crt.h",
183193      MAME_DIR .. "src/lib/formats/cbm_tap.cpp",
trunk/scripts/src/main.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   main.lua
7--
8--   Rules for building main binary
9--
10---------------------------------------------------------------------------
11
412function mainProject(_target, _subtarget)
513if (_OPTIONS["SOURCES"] == nil) then
614   if (_target == _subtarget) then
trunk/scripts/src/netlist.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   netlist.lua
7--
8--   Rules for building netlist cores
9--
10---------------------------------------------------------------------------
11
412project "netlist"
513   uuid "665ef8ac-2a4c-4c3e-a05f-fd1e5db11de9"
614   kind (LIBTYPE)
r250291r250292
3442      MAME_DIR .. "src/lib/netlist/plib/pconfig.h",
3543      MAME_DIR .. "src/lib/netlist/plib/palloc.cpp",
3644      MAME_DIR .. "src/lib/netlist/plib/palloc.h",
37    MAME_DIR .. "src/lib/netlist/plib/pfmtlog.cpp",
38    MAME_DIR .. "src/lib/netlist/plib/pfmtlog.h",
45      MAME_DIR .. "src/lib/netlist/plib/pfmtlog.cpp",
46      MAME_DIR .. "src/lib/netlist/plib/pfmtlog.h",
3947      MAME_DIR .. "src/lib/netlist/plib/plists.h",
4048      MAME_DIR .. "src/lib/netlist/plib/poptions.h",
4149      MAME_DIR .. "src/lib/netlist/plib/pparser.cpp",
r250291r250292
4856      MAME_DIR .. "src/lib/netlist/plib/pstring.h",
4957      MAME_DIR .. "src/lib/netlist/plib/pstream.cpp",
5058      MAME_DIR .. "src/lib/netlist/plib/pstream.h",
51    MAME_DIR .. "src/lib/netlist/plib/ptypes.h",
59      MAME_DIR .. "src/lib/netlist/plib/ptypes.h",
5260      MAME_DIR .. "src/lib/netlist/tools/nl_convert.cpp",
5361      MAME_DIR .. "src/lib/netlist/tools/nl_convert.h",
5462      MAME_DIR .. "src/lib/netlist/analog/nld_bjt.cpp",
r250291r250292
6977      MAME_DIR .. "src/lib/netlist/solver/nld_ms_sor.h",
7078      MAME_DIR .. "src/lib/netlist/solver/nld_ms_sor_mat.h",
7179      MAME_DIR .. "src/lib/netlist/solver/nld_ms_gmres.h",
80      MAME_DIR .. "src/lib/netlist/solver/mat_cr.h",
81      MAME_DIR .. "src/lib/netlist/solver/nld_ms_direct_lu.h",
82      MAME_DIR .. "src/lib/netlist/solver/vector_base.h",     
7283      MAME_DIR .. "src/lib/netlist/devices/nld_4020.cpp",
7384      MAME_DIR .. "src/lib/netlist/devices/nld_4020.h",
7485      MAME_DIR .. "src/lib/netlist/devices/nld_4066.cpp",
r250291r250292
160171      MAME_DIR .. "src/lib/netlist/macro/nlm_opamp.cpp",
161172      MAME_DIR .. "src/lib/netlist/macro/nlm_opamp.h",
162173      MAME_DIR .. "src/lib/netlist/macro/nlm_other.cpp",
163      MAME_DIR .. "src/lib/netlist/macro/nlm_other.h",
174      MAME_DIR .. "src/lib/netlist/macro/nlm_other.h",     
164175}
trunk/scripts/src/osd/modules.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   modules.lua
7--
8--   Rules for the building of modules
9--
10---------------------------------------------------------------------------
11
412function string.starts(String,Start)
513   return string.sub(String,1,string.len(Start))==Start
614end
r250291r250292
3543
3644   files {
3745      MAME_DIR .. "src/osd/osdnet.cpp",
46      MAME_DIR .. "src/osd/osdnet.h",
47      MAME_DIR .. "src/osd/modules/debugger/debug_module.h",
48      MAME_DIR .. "src/osd/modules/font/font_module.h",
49      MAME_DIR .. "src/osd/modules/midi/midi_module.h",
50      MAME_DIR .. "src/osd/modules/netdev/netdev_module.h",
51      MAME_DIR .. "src/osd/modules/sound/sound_module.h",
3852      MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp",
53      MAME_DIR .. "src/osd/modules/lib/osdobj_common.h",
3954      MAME_DIR .. "src/osd/modules/debugger/none.cpp",
4055      MAME_DIR .. "src/osd/modules/debugger/debugint.cpp",
4156      MAME_DIR .. "src/osd/modules/debugger/debugwin.cpp",
r250291r250292
7186         MAME_DIR .. "src/osd/modules/render/drawogl.cpp",
7287         MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.cpp",
7388         MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.cpp",
89         MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.h",
90         MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.h",
91         MAME_DIR .. "src/osd/modules/opengl/osd_opengl.h",
92         MAME_DIR .. "src/osd/modules/opengl/SDL1211_opengl.h",
7493      }
7594      defines {
7695         "USE_OPENGL=1",
r250291r250292
104123   if _OPTIONS["USE_QTDEBUG"]=="1" then
105124      files {
106125         MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.cpp",
126         MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.h",
107127         MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.cpp",
128         MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.h",
108129         MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.cpp",
130         MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.h",
109131         MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.cpp",
132         MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.h",
110133         MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.cpp",
134         MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.h",
111135         MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.cpp",
136         MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.h",
112137         MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.cpp",
138         MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.h",
113139         MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.cpp",
114140         MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.cpp",
141         MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.h",
142         MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.h",
115143         GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.cpp",
116144         GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.cpp",
117145         GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.cpp",
trunk/scripts/src/osd/osdmini.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   osdmini.lua
7--
8--   Rules for the building of osdmini
9--
10---------------------------------------------------------------------------
11
412function maintargetosdoptions(_target,_subtarget)
513end
614
r250291r250292
3038
3139   files {
3240      MAME_DIR .. "src/osd/osdnet.cpp",
41      MAME_DIR .. "src/osd/osdnet.h",
3342      MAME_DIR .. "src/osd/osdmini/minimain.cpp",
43      MAME_DIR .. "src/osd/osdmini/osdmini.h",
44      MAME_DIR .. "src/osd/osdepend.h",
3445      MAME_DIR .. "src/osd/modules/lib/osdobj_common.cpp",
46      MAME_DIR .. "src/osd/modules/lib/osdobj_common.h",
3547      MAME_DIR .. "src/osd/modules/font/font_sdl.cpp",
3648      MAME_DIR .. "src/osd/modules/font/font_windows.cpp",
3749      MAME_DIR .. "src/osd/modules/font/font_osx.cpp",
r250291r250292
8597
8698   files {
8799      MAME_DIR .. "src/osd/osdcore.cpp",
100      MAME_DIR .. "src/osd/osdcore.h",
88101      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
102      MAME_DIR .. "src/osd/modules/osdmodule.h",     
89103      MAME_DIR .. "src/osd/osdmini/minidir.cpp",
90104      MAME_DIR .. "src/osd/osdmini/minifile.cpp",
91105      MAME_DIR .. "src/osd/osdmini/minimisc.cpp",
trunk/scripts/src/osd/sdl.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   sdl.lua
7--
8--   Rules for the building with SDL
9--
10---------------------------------------------------------------------------
11
412dofile("modules.lua")
513
614
r250291r250292
329337      files {
330338         MAME_DIR .. "src/osd/modules/debugger/debugosx.mm",
331339         MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.mm",
340         MAME_DIR .. "src/osd/modules/debugger/osx/breakpointsview.h",
332341         MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.mm",
342         MAME_DIR .. "src/osd/modules/debugger/osx/consoleview.h",
333343         MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.mm",
344         MAME_DIR .. "src/osd/modules/debugger/osx/debugcommandhistory.h",
334345         MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.mm",
346         MAME_DIR .. "src/osd/modules/debugger/osx/debugconsole.h",
335347         MAME_DIR .. "src/osd/modules/debugger/osx/debugview.mm",
348         MAME_DIR .. "src/osd/modules/debugger/osx/debugview.h",
336349         MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.mm",
350         MAME_DIR .. "src/osd/modules/debugger/osx/debugwindowhandler.h",
337351         MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.mm",
352         MAME_DIR .. "src/osd/modules/debugger/osx/deviceinfoviewer.h",
338353         MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.mm",
354         MAME_DIR .. "src/osd/modules/debugger/osx/devicesviewer.h",
339355         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.mm",
340356         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.mm",
357         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h",
341358         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm",
359         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h",
360         MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h",
342361         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm",
362         MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h",
343363         MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.mm",
364         MAME_DIR .. "src/osd/modules/debugger/osx/memoryview.h",
344365         MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.mm",
366         MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h",
345367         MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm",
368         MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h",
346369         MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm",
370         MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h",
347371         MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm",
372         MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h",     
373         MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h",
348374      }
349375      if _OPTIONS["SDL_LIBVER"]=="sdl" then
350376         -- SDLMain_tmpl isn't necessary for SDL2
351377         files {
352378            MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.mm",
379            MAME_DIR .. "src/osd/sdl/SDLMain_tmpl.h",
353380         }
354381      end
355382   end
356383
357384   files {
385      MAME_DIR .. "src/osd/sdl/osdsdl.h",
386      MAME_DIR .. "src/osd/sdl/sdlinc.h",
387      MAME_DIR .. "src/osd/sdl/sdlprefix.h",
358388      MAME_DIR .. "src/osd/sdl/sdlmain.cpp",
389      MAME_DIR .. "src/osd/osdepend.h",
359390      MAME_DIR .. "src/osd/sdl/input.cpp",
391      MAME_DIR .. "src/osd/sdl/input.h",
360392      MAME_DIR .. "src/osd/sdl/video.cpp",
393      MAME_DIR .. "src/osd/sdl/video.h",
361394      MAME_DIR .. "src/osd/sdl/window.cpp",
395      MAME_DIR .. "src/osd/sdl/window.h",
396      MAME_DIR .. "src/osd/modules/osdwindow.h",
362397      MAME_DIR .. "src/osd/sdl/output.cpp",
363398      MAME_DIR .. "src/osd/sdl/watchdog.cpp",
399      MAME_DIR .. "src/osd/sdl/watchdog.h",
364400      MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
365401   }
366402   if _OPTIONS["SDL_LIBVER"]=="sdl2" then
367403      files {
368404         MAME_DIR .. "src/osd/modules/render/draw13.cpp",
405         MAME_DIR .. "src/osd/modules/render/blit13.h",
369406      }
370407   end
371408
r250291r250292
391428
392429   files {
393430      MAME_DIR .. "src/osd/osdcore.cpp",
431      MAME_DIR .. "src/osd/osdcore.h",
394432      MAME_DIR .. "src/osd/strconv.cpp",
433      MAME_DIR .. "src/osd/strconv.h",
395434      MAME_DIR .. "src/osd/sdl/sdldir.cpp",
396435      MAME_DIR .. "src/osd/sdl/sdlfile.cpp",
436      MAME_DIR .. "src/osd/sdl/sdlfile.h",
397437      MAME_DIR .. "src/osd/sdl/sdlptty_" .. BASE_TARGETOS ..".cpp",
398438      MAME_DIR .. "src/osd/sdl/sdlsocket.cpp",
399439      MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp",
400440      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
441      MAME_DIR .. "src/osd/modules/osdmodule.h",     
401442      MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp",
443      MAME_DIR .. "src/osd/modules/lib/osdlib.h",
402444      MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp",
445      MAME_DIR .. "src/osd/modules/sync/osdsync.h",
403446   }
404447
405448   if _OPTIONS["NOASM"]=="1" then
r250291r250292
414457
415458   if _OPTIONS["targetos"]=="macosx" then
416459      files {
460         MAME_DIR .. "src/osd/sdl/osxutils.h",
417461         MAME_DIR .. "src/osd/sdl/osxutils.mm",
418462      }
419463   end
trunk/scripts/src/osd/windows.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   windows.lua
7--
8--   Rules for the building for Windows
9--
10---------------------------------------------------------------------------
11
412dofile("modules.lua")
513
614
r250291r250292
129137
130138   files {
131139      MAME_DIR .. "src/osd/modules/render/drawd3d.cpp",
140      MAME_DIR .. "src/osd/modules/render/drawd3d.h",
132141      MAME_DIR .. "src/osd/modules/render/d3d/d3d9intf.cpp",
133142      MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.cpp",
143      MAME_DIR .. "src/osd/modules/render/d3d/d3dcomm.h",
144      MAME_DIR .. "src/osd/modules/render/d3d/d3dhlsl.h",
145      MAME_DIR .. "src/osd/modules/render/d3d/d3dintf.h",
134146      MAME_DIR .. "src/osd/modules/render/drawdd.cpp",
135147      MAME_DIR .. "src/osd/modules/render/drawgdi.cpp",
136148      MAME_DIR .. "src/osd/modules/render/drawnone.cpp",
137149      MAME_DIR .. "src/osd/windows/input.cpp",
150      MAME_DIR .. "src/osd/windows/input.h",
138151      MAME_DIR .. "src/osd/windows/output.cpp",
152      MAME_DIR .. "src/osd/windows/output.h",
139153      MAME_DIR .. "src/osd/windows/video.cpp",
154      MAME_DIR .. "src/osd/windows/video.h",
140155      MAME_DIR .. "src/osd/windows/window.cpp",
156      MAME_DIR .. "src/osd/windows/window.h",
157      MAME_DIR .. "src/osd/modules/osdwindow.h",
141158      MAME_DIR .. "src/osd/windows/winmenu.cpp",
142159      MAME_DIR .. "src/osd/windows/winmain.cpp",
160      MAME_DIR .. "src/osd/windows/winmain.h",
161      MAME_DIR .. "src/osd/osdepend.h",
143162      MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.cpp",
163      MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.h",
144164      MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.cpp",
165      MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.h",
145166      MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.cpp",
167      MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.h",
146168      MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.cpp",
169      MAME_DIR .. "src/osd/modules/debugger/win/debugwininfo.h",
147170      MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.cpp",
171      MAME_DIR .. "src/osd/modules/debugger/win/disasmbasewininfo.h",
148172      MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.cpp",
173      MAME_DIR .. "src/osd/modules/debugger/win/disasmviewinfo.h",
149174      MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.cpp",
175      MAME_DIR .. "src/osd/modules/debugger/win/disasmwininfo.h",
150176      MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.cpp",
177      MAME_DIR .. "src/osd/modules/debugger/win/editwininfo.h",
151178      MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.cpp",
179      MAME_DIR .. "src/osd/modules/debugger/win/logwininfo.h",
152180      MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.cpp",
181      MAME_DIR .. "src/osd/modules/debugger/win/memoryviewinfo.h",
153182      MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.cpp",
183      MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.h",
154184      MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.cpp",
185      MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.h",
155186      MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.cpp",
187      MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.h",
188      MAME_DIR .. "src/osd/modules/debugger/win/debugwin.h",
156189   }
157190
158191
r250291r250292
183216   }
184217
185218   files {
219      MAME_DIR .. "src/osd/eigccppc.h",
220      MAME_DIR .. "src/osd/eigccx86.h",
221      MAME_DIR .. "src/osd/eivc.h",
222      MAME_DIR .. "src/osd/eivcx86.h",
223      MAME_DIR .. "src/osd/eminline.h",
224      MAME_DIR .. "src/osd/osdcomm.h",
186225      MAME_DIR .. "src/osd/osdcore.cpp",
226      MAME_DIR .. "src/osd/osdcore.h",
187227      MAME_DIR .. "src/osd/strconv.cpp",
228      MAME_DIR .. "src/osd/strconv.h",
188229      MAME_DIR .. "src/osd/windows/main.cpp",
189230      MAME_DIR .. "src/osd/windows/windir.cpp",
190231      MAME_DIR .. "src/osd/windows/winfile.cpp",
191232      MAME_DIR .. "src/osd/modules/sync/sync_windows.cpp",
233      MAME_DIR .. "src/osd/modules/sync/osdsync.h",
192234      MAME_DIR .. "src/osd/windows/winutf8.cpp",
235      MAME_DIR .. "src/osd/windows/winutf8.h",
193236      MAME_DIR .. "src/osd/windows/winutil.cpp",
237      MAME_DIR .. "src/osd/windows/winutil.h",
238      MAME_DIR .. "src/osd/windows/winfile.h",
194239      MAME_DIR .. "src/osd/windows/winclip.cpp",
195240      MAME_DIR .. "src/osd/windows/winsocket.cpp",
196241      MAME_DIR .. "src/osd/windows/winptty.cpp",
197242      MAME_DIR .. "src/osd/modules/osdmodule.cpp",
243      MAME_DIR .. "src/osd/modules/osdmodule.h",
198244      MAME_DIR .. "src/osd/modules/lib/osdlib_win32.cpp",
199245   }
200246
trunk/scripts/src/tests.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4--------------------------------------------------
5-- MAME tests
6--------------------------------------------------
4---------------------------------------------------------------------------
5--
6--   tests.lua
7--
8--   Rules for building tests
9--
10---------------------------------------------------------------------------
711
812project("tests")
913uuid ("66d4c639-196b-4065-a411-7ee9266564f5")
trunk/scripts/src/tools.lua
r250291r250292
11-- license:BSD-3-Clause
22-- copyright-holders:MAMEdev Team
33
4---------------------------------------------------------------------------
5--
6--   tools.lua
7--
8--   Rules for the building of tools
9--
10---------------------------------------------------------------------------
11
412--------------------------------------------------
513-- romcmp
614--------------------------------------------------
r250291r250292
766774
767775files {
768776   MAME_DIR .. "src/tools/imgtool/main.cpp",
777   MAME_DIR .. "src/tools/imgtool/main.h",
769778   MAME_DIR .. "src/tools/imgtool/stream.cpp",
779   MAME_DIR .. "src/tools/imgtool/stream.h",
770780   MAME_DIR .. "src/tools/imgtool/library.cpp",
781   MAME_DIR .. "src/tools/imgtool/library.h",
771782   MAME_DIR .. "src/tools/imgtool/modules.cpp",
783   MAME_DIR .. "src/tools/imgtool/modules.h",
772784   MAME_DIR .. "src/tools/imgtool/iflopimg.cpp",
785   MAME_DIR .. "src/tools/imgtool/iflopimg.h",
773786   MAME_DIR .. "src/tools/imgtool/filter.cpp",
787   MAME_DIR .. "src/tools/imgtool/filter.h",
774788   MAME_DIR .. "src/tools/imgtool/filteoln.cpp",
775789   MAME_DIR .. "src/tools/imgtool/filtbas.cpp",
776790   MAME_DIR .. "src/tools/imgtool/imgtool.cpp",
791   MAME_DIR .. "src/tools/imgtool/imgtool.h",
777792   MAME_DIR .. "src/tools/imgtool/imgterrs.cpp",
793   MAME_DIR .. "src/tools/imgtool/imgterrs.h",   
778794   MAME_DIR .. "src/tools/imgtool/imghd.cpp",
795   MAME_DIR .. "src/tools/imgtool/imghd.h",
779796   MAME_DIR .. "src/tools/imgtool/charconv.cpp",
797   MAME_DIR .. "src/tools/imgtool/charconv.h",
780798   MAME_DIR .. "src/tools/imgtool/formats/vt_dsk.cpp",
781799   MAME_DIR .. "src/tools/imgtool/formats/vt_dsk.h",
782800   MAME_DIR .. "src/tools/imgtool/formats/coco_dsk.cpp",
r250291r250292
790808   MAME_DIR .. "src/tools/imgtool/modules/ti990hd.cpp",
791809   MAME_DIR .. "src/tools/imgtool/modules/concept.cpp",
792810   MAME_DIR .. "src/tools/imgtool/modules/fat.cpp",
811   MAME_DIR .. "src/tools/imgtool/modules/fat.h",
793812   MAME_DIR .. "src/tools/imgtool/modules/pc_flop.cpp",
794813   MAME_DIR .. "src/tools/imgtool/modules/pc_hard.cpp",
795814   MAME_DIR .. "src/tools/imgtool/modules/prodos.cpp",
796815   MAME_DIR .. "src/tools/imgtool/modules/vzdos.cpp",
797816   MAME_DIR .. "src/tools/imgtool/modules/thomson.cpp",
798817   MAME_DIR .. "src/tools/imgtool/modules/macutil.cpp",
818   MAME_DIR .. "src/tools/imgtool/modules/macutil.h",
799819   MAME_DIR .. "src/tools/imgtool/modules/cybiko.cpp",
800820   MAME_DIR .. "src/tools/imgtool/modules/cybikoxt.cpp",
801821   MAME_DIR .. "src/tools/imgtool/modules/psion.cpp",
trunk/scripts/target/mame/arcade.lua
r250291r250292
787787createMAMEProjects(_target, _subtarget, "shared")
788788files {
789789   MAME_DIR .. "src/mame/machine/nmk112.cpp",
790   MAME_DIR .. "src/mame/machine/nmk112.h",
790791   MAME_DIR .. "src/mame/machine/pcshare.cpp",
792   MAME_DIR .. "src/mame/machine/pcshare.h",
791793   MAME_DIR .. "src/mame/machine/segacrpt.cpp",
794   MAME_DIR .. "src/mame/machine/segacrpt.h",
792795   MAME_DIR .. "src/mame/machine/segacrp2.cpp",
796   MAME_DIR .. "src/mame/machine/segacrp2.h",
793797   MAME_DIR .. "src/mame/machine/ticket.cpp",
798   MAME_DIR .. "src/mame/machine/ticket.h",
794799   MAME_DIR .. "src/mame/video/avgdvg.cpp",
800   MAME_DIR .. "src/mame/video/avgdvg.h",
795801   MAME_DIR .. "src/mame/audio/dcs.cpp",
802   MAME_DIR .. "src/mame/audio/dcs.h",
796803   MAME_DIR .. "src/mame/audio/decobsmt.cpp",
804   MAME_DIR .. "src/mame/audio/decobsmt.h",
797805   MAME_DIR .. "src/mame/audio/segam1audio.cpp",
806   MAME_DIR .. "src/mame/audio/segam1audio.h",
798807}
799808
800809--------------------------------------------------
r250291r250292
807816   MAME_DIR .. "src/mame/drivers/ssfindo.cpp",
808817   MAME_DIR .. "src/mame/drivers/aristmk5.cpp",
809818   MAME_DIR .. "src/mame/machine/archimds.cpp",
819   MAME_DIR .. "src/mame/includes/archimds.h",
810820   MAME_DIR .. "src/mame/video/archimds.cpp",
811821}
812822
r250291r250292
827837createMAMEProjects(_target, _subtarget, "alpha")
828838files {
829839   MAME_DIR .. "src/mame/drivers/alpha68k.cpp",
840   MAME_DIR .. "src/mame/includes/alpha68k.h",
830841   MAME_DIR .. "src/mame/video/alpha68k.cpp",
831842   MAME_DIR .. "src/mame/drivers/champbas.cpp",
843   MAME_DIR .. "src/mame/includes/champbas.h",
832844   MAME_DIR .. "src/mame/video/champbas.cpp",
833845   MAME_DIR .. "src/mame/drivers/equites.cpp",
846   MAME_DIR .. "src/mame/includes/equites.h",
834847   MAME_DIR .. "src/mame/video/equites.cpp",
835848   MAME_DIR .. "src/mame/drivers/meijinsn.cpp",
836849   MAME_DIR .. "src/mame/drivers/shougi.cpp",
837850   MAME_DIR .. "src/mame/machine/alpha8201.cpp",
851   MAME_DIR .. "src/mame/machine/alpha8201.h",
838852}
839853
840854createMAMEProjects(_target, _subtarget, "amiga")
r250291r250292
868882createMAMEProjects(_target, _subtarget, "atari")
869883files {
870884   MAME_DIR .. "src/mame/drivers/arcadecl.cpp",
885   MAME_DIR .. "src/mame/includes/arcadecl.h",
871886   MAME_DIR .. "src/mame/video/arcadecl.cpp",
872887   MAME_DIR .. "src/mame/drivers/asteroid.cpp",
888   MAME_DIR .. "src/mame/includes/asteroid.h",
873889   MAME_DIR .. "src/mame/machine/asteroid.cpp",
874890   MAME_DIR .. "src/mame/audio/asteroid.cpp",
875891   MAME_DIR .. "src/mame/audio/llander.cpp",
876892   MAME_DIR .. "src/mame/drivers/atarifb.cpp",
893   MAME_DIR .. "src/mame/includes/atarifb.h",
877894   MAME_DIR .. "src/mame/machine/atarifb.cpp",
878895   MAME_DIR .. "src/mame/audio/atarifb.cpp",
879896   MAME_DIR .. "src/mame/video/atarifb.cpp",
880897   MAME_DIR .. "src/mame/drivers/atarig1.cpp",
898   MAME_DIR .. "src/mame/includes/atarig1.h",
881899   MAME_DIR .. "src/mame/video/atarig1.cpp",
900   MAME_DIR .. "src/mame/includes/slapstic.h",
882901   MAME_DIR .. "src/mame/drivers/atarig42.cpp",
902   MAME_DIR .. "src/mame/includes/atarig42.h",
883903   MAME_DIR .. "src/mame/video/atarig42.cpp",
884904   MAME_DIR .. "src/mame/drivers/atarigt.cpp",
905   MAME_DIR .. "src/mame/includes/atarigt.h",
885906   MAME_DIR .. "src/mame/video/atarigt.cpp",
886907   MAME_DIR .. "src/mame/drivers/atarigx2.cpp",
908   MAME_DIR .. "src/mame/includes/atarigx2.h",
887909   MAME_DIR .. "src/mame/video/atarigx2.cpp",
888910   MAME_DIR .. "src/mame/drivers/atarisy1.cpp",
911   MAME_DIR .. "src/mame/includes/atarisy1.h",
889912   MAME_DIR .. "src/mame/video/atarisy1.cpp",
890913   MAME_DIR .. "src/mame/drivers/atarisy2.cpp",
914   MAME_DIR .. "src/mame/includes/atarisy2.h",
891915   MAME_DIR .. "src/mame/video/atarisy2.cpp",
892916   MAME_DIR .. "src/mame/drivers/atarisy4.cpp",
893917   MAME_DIR .. "src/mame/drivers/atarittl.cpp",
894918   MAME_DIR .. "src/mame/drivers/atetris.cpp",
919   MAME_DIR .. "src/mame/includes/atetris.h",
895920   MAME_DIR .. "src/mame/video/atetris.cpp",
896921   MAME_DIR .. "src/mame/drivers/avalnche.cpp",
922   MAME_DIR .. "src/mame/includes/avalnche.h",
897923   MAME_DIR .. "src/mame/audio/avalnche.cpp",
898924   MAME_DIR .. "src/mame/drivers/badlands.cpp",
925   MAME_DIR .. "src/mame/includes/badlands.h",
899926   MAME_DIR .. "src/mame/video/badlands.cpp",
900927   MAME_DIR .. "src/mame/drivers/bartop52.cpp",
901928   MAME_DIR .. "src/mame/drivers/batman.cpp",
929   MAME_DIR .. "src/mame/includes/batman.h",
902930   MAME_DIR .. "src/mame/video/batman.cpp",
903931   MAME_DIR .. "src/mame/drivers/beathead.cpp",
932   MAME_DIR .. "src/mame/includes/beathead.h",
904933   MAME_DIR .. "src/mame/video/beathead.cpp",
905934   MAME_DIR .. "src/mame/drivers/blstroid.cpp",
935   MAME_DIR .. "src/mame/includes/blstroid.h",
906936   MAME_DIR .. "src/mame/video/blstroid.cpp",
907937   MAME_DIR .. "src/mame/drivers/boxer.cpp",
908938   MAME_DIR .. "src/mame/drivers/bsktball.cpp",
939   MAME_DIR .. "src/mame/includes/bsktball.h",
909940   MAME_DIR .. "src/mame/machine/bsktball.cpp",
910941   MAME_DIR .. "src/mame/audio/bsktball.cpp",
911942   MAME_DIR .. "src/mame/video/bsktball.cpp",
912943   MAME_DIR .. "src/mame/drivers/bwidow.cpp",
944   MAME_DIR .. "src/mame/includes/bwidow.h",
913945   MAME_DIR .. "src/mame/audio/bwidow.cpp",
914946   MAME_DIR .. "src/mame/drivers/bzone.cpp",
947   MAME_DIR .. "src/mame/includes/bzone.h",
915948   MAME_DIR .. "src/mame/audio/bzone.cpp",
916949   MAME_DIR .. "src/mame/drivers/canyon.cpp",
950   MAME_DIR .. "src/mame/includes/canyon.h",
917951   MAME_DIR .. "src/mame/audio/canyon.cpp",
918952   MAME_DIR .. "src/mame/video/canyon.cpp",
919953   MAME_DIR .. "src/mame/drivers/cball.cpp",
920954   MAME_DIR .. "src/mame/drivers/ccastles.cpp",
955   MAME_DIR .. "src/mame/includes/ccastles.h",
921956   MAME_DIR .. "src/mame/video/ccastles.cpp",
922957   MAME_DIR .. "src/mame/drivers/centiped.cpp",
958   MAME_DIR .. "src/mame/includes/centiped.h",
923959   MAME_DIR .. "src/mame/video/centiped.cpp",
924960   MAME_DIR .. "src/mame/drivers/cloak.cpp",
961   MAME_DIR .. "src/mame/includes/cloak.h",
925962   MAME_DIR .. "src/mame/video/cloak.cpp",
926963   MAME_DIR .. "src/mame/drivers/cloud9.cpp",
964   MAME_DIR .. "src/mame/includes/cloud9.h",
927965   MAME_DIR .. "src/mame/video/cloud9.cpp",
928966   MAME_DIR .. "src/mame/drivers/cmmb.cpp",
929967   MAME_DIR .. "src/mame/drivers/cops.cpp",
930968   MAME_DIR .. "src/mame/drivers/copsnrob.cpp",
969   MAME_DIR .. "src/mame/includes/copsnrob.h",
931970   MAME_DIR .. "src/mame/audio/copsnrob.cpp",
932971   MAME_DIR .. "src/mame/video/copsnrob.cpp",
933972   MAME_DIR .. "src/mame/drivers/cyberbal.cpp",
973   MAME_DIR .. "src/mame/includes/cyberbal.h",
934974   MAME_DIR .. "src/mame/audio/cyberbal.cpp",
935975   MAME_DIR .. "src/mame/video/cyberbal.cpp",
936976   MAME_DIR .. "src/mame/drivers/destroyr.cpp",
937977   MAME_DIR .. "src/mame/drivers/dragrace.cpp",
978   MAME_DIR .. "src/mame/includes/dragrace.h",
938979   MAME_DIR .. "src/mame/audio/dragrace.cpp",
939980   MAME_DIR .. "src/mame/video/dragrace.cpp",
940981   MAME_DIR .. "src/mame/drivers/eprom.cpp",
982   MAME_DIR .. "src/mame/includes/eprom.h",
941983   MAME_DIR .. "src/mame/video/eprom.cpp",
942984   MAME_DIR .. "src/mame/drivers/firefox.cpp",
943985   MAME_DIR .. "src/mame/drivers/firetrk.cpp",
986   MAME_DIR .. "src/mame/includes/firetrk.h",
944987   MAME_DIR .. "src/mame/audio/firetrk.cpp",
945988   MAME_DIR .. "src/mame/video/firetrk.cpp",
946989   MAME_DIR .. "src/mame/drivers/flyball.cpp",
947990   MAME_DIR .. "src/mame/drivers/foodf.cpp",
991   MAME_DIR .. "src/mame/includes/foodf.h",
948992   MAME_DIR .. "src/mame/video/foodf.cpp",
949993   MAME_DIR .. "src/mame/drivers/gauntlet.cpp",
994   MAME_DIR .. "src/mame/includes/gauntlet.h",
950995   MAME_DIR .. "src/mame/video/gauntlet.cpp",
951996   MAME_DIR .. "src/mame/drivers/harddriv.cpp",
997   MAME_DIR .. "src/mame/includes/harddriv.h",
952998   MAME_DIR .. "src/mame/machine/harddriv.cpp",
953999   MAME_DIR .. "src/mame/audio/harddriv.cpp",
9541000   MAME_DIR .. "src/mame/video/harddriv.cpp",
9551001   MAME_DIR .. "src/mame/drivers/irobot.cpp",
1002   MAME_DIR .. "src/mame/includes/irobot.h",
9561003   MAME_DIR .. "src/mame/machine/irobot.cpp",
9571004   MAME_DIR .. "src/mame/video/irobot.cpp",
9581005   MAME_DIR .. "src/mame/drivers/jaguar.cpp",
1006   MAME_DIR .. "src/mame/includes/jaguar.h",
9591007   MAME_DIR .. "src/mame/audio/jaguar.cpp",
9601008   MAME_DIR .. "src/mame/video/jaguar.cpp",
1009   MAME_DIR .. "src/mame/video/jagblit.h",
1010   MAME_DIR .. "src/mame/video/jagblit.inc",
1011   MAME_DIR .. "src/mame/video/jagobj.inc",
9611012   MAME_DIR .. "src/mame/drivers/jedi.cpp",
1013   MAME_DIR .. "src/mame/includes/jedi.h",
9621014   MAME_DIR .. "src/mame/audio/jedi.cpp",
9631015   MAME_DIR .. "src/mame/video/jedi.cpp",
9641016   MAME_DIR .. "src/mame/drivers/klax.cpp",
1017   MAME_DIR .. "src/mame/includes/klax.h",
9651018   MAME_DIR .. "src/mame/video/klax.cpp",
9661019   MAME_DIR .. "src/mame/drivers/liberatr.cpp",
1020   MAME_DIR .. "src/mame/includes/liberatr.h",
9671021   MAME_DIR .. "src/mame/video/liberatr.cpp",
9681022   MAME_DIR .. "src/mame/drivers/mediagx.cpp",
9691023   MAME_DIR .. "src/mame/drivers/metalmx.cpp",
1024   MAME_DIR .. "src/mame/includes/metalmx.h",
9701025   MAME_DIR .. "src/mame/drivers/mgolf.cpp",
9711026   MAME_DIR .. "src/mame/drivers/mhavoc.cpp",
1027   MAME_DIR .. "src/mame/includes/mhavoc.h",
9721028   MAME_DIR .. "src/mame/machine/mhavoc.cpp",
9731029   MAME_DIR .. "src/mame/drivers/missile.cpp",
9741030   MAME_DIR .. "src/mame/drivers/nitedrvr.cpp",
1031   MAME_DIR .. "src/mame/includes/nitedrvr.h",
9751032   MAME_DIR .. "src/mame/machine/nitedrvr.cpp",
9761033   MAME_DIR .. "src/mame/audio/nitedrvr.cpp",
9771034   MAME_DIR .. "src/mame/video/nitedrvr.cpp",
9781035   MAME_DIR .. "src/mame/drivers/offtwall.cpp",
1036   MAME_DIR .. "src/mame/includes/offtwall.h",
9791037   MAME_DIR .. "src/mame/video/offtwall.cpp",
9801038   MAME_DIR .. "src/mame/drivers/orbit.cpp",
1039   MAME_DIR .. "src/mame/includes/orbit.h",
9811040   MAME_DIR .. "src/mame/audio/orbit.cpp",
9821041   MAME_DIR .. "src/mame/video/orbit.cpp",
9831042   MAME_DIR .. "src/mame/drivers/pong.cpp",
r250291r250292
9851044   MAME_DIR .. "src/mame/drivers/nl_pongd.cpp",
9861045   MAME_DIR .. "src/mame/drivers/nl_breakout.cpp",
9871046   MAME_DIR .. "src/mame/drivers/poolshrk.cpp",
1047   MAME_DIR .. "src/mame/includes/poolshrk.h",
9881048   MAME_DIR .. "src/mame/audio/poolshrk.cpp",
9891049   MAME_DIR .. "src/mame/video/poolshrk.cpp",
9901050   MAME_DIR .. "src/mame/drivers/quantum.cpp",
9911051   MAME_DIR .. "src/mame/drivers/quizshow.cpp",
9921052   MAME_DIR .. "src/mame/drivers/rampart.cpp",
1053   MAME_DIR .. "src/mame/includes/rampart.h",
9931054   MAME_DIR .. "src/mame/video/rampart.cpp",
9941055   MAME_DIR .. "src/mame/drivers/relief.cpp",
1056   MAME_DIR .. "src/mame/includes/relief.h",
9951057   MAME_DIR .. "src/mame/video/relief.cpp",
9961058   MAME_DIR .. "src/mame/drivers/runaway.cpp",
1059   MAME_DIR .. "src/mame/includes/runaway.h",
9971060   MAME_DIR .. "src/mame/video/runaway.cpp",
9981061   MAME_DIR .. "src/mame/drivers/sbrkout.cpp",
9991062   MAME_DIR .. "src/mame/drivers/shuuz.cpp",
1063   MAME_DIR .. "src/mame/includes/shuuz.h",
10001064   MAME_DIR .. "src/mame/video/shuuz.cpp",
10011065   MAME_DIR .. "src/mame/drivers/skullxbo.cpp",
1066   MAME_DIR .. "src/mame/includes/skullxbo.h",
10021067   MAME_DIR .. "src/mame/video/skullxbo.cpp",
10031068   MAME_DIR .. "src/mame/drivers/skydiver.cpp",
1069   MAME_DIR .. "src/mame/includes/skydiver.h",
10041070   MAME_DIR .. "src/mame/audio/skydiver.cpp",
10051071   MAME_DIR .. "src/mame/video/skydiver.cpp",
10061072   MAME_DIR .. "src/mame/drivers/skyraid.cpp",
1073   MAME_DIR .. "src/mame/includes/skyraid.h",
10071074   MAME_DIR .. "src/mame/audio/skyraid.cpp",
10081075   MAME_DIR .. "src/mame/video/skyraid.cpp",
10091076   MAME_DIR .. "src/mame/drivers/sprint2.cpp",
1077   MAME_DIR .. "src/mame/includes/sprint2.h",
10101078   MAME_DIR .. "src/mame/audio/sprint2.cpp",
10111079   MAME_DIR .. "src/mame/video/sprint2.cpp",
10121080   MAME_DIR .. "src/mame/drivers/sprint4.cpp",
1081   MAME_DIR .. "src/mame/includes/sprint4.h",
10131082   MAME_DIR .. "src/mame/video/sprint4.cpp",
10141083   MAME_DIR .. "src/mame/audio/sprint4.cpp",
1084   MAME_DIR .. "src/mame/audio/sprint4.h",
10151085   MAME_DIR .. "src/mame/drivers/sprint8.cpp",
1086   MAME_DIR .. "src/mame/includes/sprint8.h",
10161087   MAME_DIR .. "src/mame/audio/sprint8.cpp",
10171088   MAME_DIR .. "src/mame/video/sprint8.cpp",
10181089   MAME_DIR .. "src/mame/drivers/starshp1.cpp",
1090   MAME_DIR .. "src/mame/includes/starshp1.h",
10191091   MAME_DIR .. "src/mame/audio/starshp1.cpp",
10201092   MAME_DIR .. "src/mame/video/starshp1.cpp",
10211093   MAME_DIR .. "src/mame/drivers/starwars.cpp",
1094   MAME_DIR .. "src/mame/includes/starwars.h",
10221095   MAME_DIR .. "src/mame/machine/starwars.cpp",
10231096   MAME_DIR .. "src/mame/audio/starwars.cpp",
10241097   MAME_DIR .. "src/mame/drivers/subs.cpp",
1098   MAME_DIR .. "src/mame/includes/subs.h",
10251099   MAME_DIR .. "src/mame/machine/subs.cpp",
10261100   MAME_DIR .. "src/mame/audio/subs.cpp",
10271101   MAME_DIR .. "src/mame/video/subs.cpp",
10281102   MAME_DIR .. "src/mame/drivers/tank8.cpp",
1103   MAME_DIR .. "src/mame/includes/tank8.h",
10291104   MAME_DIR .. "src/mame/audio/tank8.cpp",
10301105   MAME_DIR .. "src/mame/video/tank8.cpp",
10311106   MAME_DIR .. "src/mame/drivers/tempest.cpp",
10321107   MAME_DIR .. "src/mame/drivers/thunderj.cpp",
1108   MAME_DIR .. "src/mame/includes/thunderj.h",
10331109   MAME_DIR .. "src/mame/video/thunderj.cpp",
10341110   MAME_DIR .. "src/mame/drivers/tomcat.cpp",
10351111   MAME_DIR .. "src/mame/drivers/toobin.cpp",
1112   MAME_DIR .. "src/mame/includes/toobin.h",
10361113   MAME_DIR .. "src/mame/video/toobin.cpp",
10371114   MAME_DIR .. "src/mame/drivers/tourtabl.cpp",
10381115   MAME_DIR .. "src/mame/video/tia.cpp",
1116   MAME_DIR .. "src/mame/video/tia.h",
10391117   MAME_DIR .. "src/mame/drivers/triplhnt.cpp",
1118   MAME_DIR .. "src/mame/includes/triplhnt.h",
10401119   MAME_DIR .. "src/mame/audio/triplhnt.cpp",
10411120   MAME_DIR .. "src/mame/video/triplhnt.cpp",
10421121   MAME_DIR .. "src/mame/drivers/tunhunt.cpp",
1122   MAME_DIR .. "src/mame/includes/tunhunt.h",
10431123   MAME_DIR .. "src/mame/video/tunhunt.cpp",
10441124   MAME_DIR .. "src/mame/drivers/ultratnk.cpp",
1125   MAME_DIR .. "src/mame/includes/ultratnk.h",
10451126   MAME_DIR .. "src/mame/video/ultratnk.cpp",
10461127   MAME_DIR .. "src/mame/drivers/videopin.cpp",
1128   MAME_DIR .. "src/mame/includes/videopin.h",
10471129   MAME_DIR .. "src/mame/audio/videopin.cpp",
10481130   MAME_DIR .. "src/mame/video/videopin.cpp",
10491131   MAME_DIR .. "src/mame/drivers/vindictr.cpp",
1132   MAME_DIR .. "src/mame/includes/vindictr.h",
10501133   MAME_DIR .. "src/mame/video/vindictr.cpp",
10511134   MAME_DIR .. "src/mame/drivers/wolfpack.cpp",
1135   MAME_DIR .. "src/mame/includes/wolfpack.h",
10521136   MAME_DIR .. "src/mame/video/wolfpack.cpp",
10531137   MAME_DIR .. "src/mame/drivers/xybots.cpp",
1138   MAME_DIR .. "src/mame/includes/xybots.h",
10541139   MAME_DIR .. "src/mame/video/xybots.cpp",
10551140   MAME_DIR .. "src/mame/machine/asic65.cpp",
1141   MAME_DIR .. "src/mame/machine/asic65.h",
10561142   MAME_DIR .. "src/mame/machine/atari_vg.cpp",
1143   MAME_DIR .. "src/mame/machine/atari_vg.h",
10571144   MAME_DIR .. "src/mame/machine/atarigen.cpp",
1145   MAME_DIR .. "src/mame/machine/atarigen.h",
10581146   MAME_DIR .. "src/mame/machine/mathbox.cpp",
1147   MAME_DIR .. "src/mame/machine/mathbox.h",
10591148   MAME_DIR .. "src/mame/machine/slapstic.cpp",
10601149   MAME_DIR .. "src/mame/audio/atarijsa.cpp",
1150   MAME_DIR .. "src/mame/audio/atarijsa.h",
10611151   MAME_DIR .. "src/mame/audio/cage.cpp",
1152   MAME_DIR .. "src/mame/audio/cage.h",
10621153   MAME_DIR .. "src/mame/audio/redbaron.cpp",
1154   MAME_DIR .. "src/mame/audio/redbaron.h",
10631155   MAME_DIR .. "src/mame/video/atarimo.cpp",
1156   MAME_DIR .. "src/mame/video/atarimo.h",
10641157   MAME_DIR .. "src/mame/video/atarirle.cpp",
1158   MAME_DIR .. "src/mame/video/atarirle.h",
10651159}
10661160
10671161createMAMEProjects(_target, _subtarget, "atlus")
10681162files {
10691163   MAME_DIR .. "src/mame/drivers/blmbycar.cpp",
1164   MAME_DIR .. "src/mame/includes/blmbycar.h",
10701165   MAME_DIR .. "src/mame/video/blmbycar.cpp",
10711166   MAME_DIR .. "src/mame/drivers/ohmygod.cpp",
1167   MAME_DIR .. "src/mame/includes/ohmygod.h",
10721168   MAME_DIR .. "src/mame/video/ohmygod.cpp",
10731169   MAME_DIR .. "src/mame/drivers/powerins.cpp",
1170   MAME_DIR .. "src/mame/includes/powerins.h",
10741171   MAME_DIR .. "src/mame/video/powerins.cpp",
10751172   MAME_DIR .. "src/mame/drivers/bowltry.cpp",
10761173}
r250291r250292
10821179   MAME_DIR .. "src/mame/drivers/mpu4hw.cpp",
10831180   MAME_DIR .. "src/mame/drivers/mpu4sw.cpp",
10841181   MAME_DIR .. "src/mame/drivers/mpu4.cpp",
1182   MAME_DIR .. "src/mame/includes/mpu4.h",
10851183   MAME_DIR .. "src/mame/drivers/mpu4mod2sw.cpp",
10861184   MAME_DIR .. "src/mame/drivers/mpu4mod4yam.cpp",
10871185   MAME_DIR .. "src/mame/drivers/mpu4plasma.cpp",
r250291r250292
10981196   MAME_DIR .. "src/mame/drivers/mpu5hw.cpp",
10991197   MAME_DIR .. "src/mame/drivers/mpu5.cpp",
11001198   MAME_DIR .. "src/mame/video/awpvid.cpp",
1199   MAME_DIR .. "src/mame/video/awpvid.h",
11011200   MAME_DIR .. "src/mame/machine/meters.cpp",
1201   MAME_DIR .. "src/mame/machine/meters.h",
11021202}
11031203
11041204createMAMEProjects(_target, _subtarget, "bfm")
11051205files {
11061206   MAME_DIR .. "src/mame/drivers/bfcobra.cpp",
11071207   MAME_DIR .. "src/mame/machine/bfm_comn.cpp",
1208   MAME_DIR .. "src/mame/machine/bfm_comn.h",
11081209   MAME_DIR .. "src/mame/drivers/bfm_sc1.cpp",
11091210   MAME_DIR .. "src/mame/drivers/bfm_sc2.cpp",
11101211   MAME_DIR .. "src/mame/video/bfm_adr2.cpp",
1212   MAME_DIR .. "src/mame/video/bfm_adr2.h",
11111213   MAME_DIR .. "src/mame/drivers/bfm_sc4.cpp",
11121214   MAME_DIR .. "src/mame/drivers/bfm_sc4h.cpp",
11131215   MAME_DIR .. "src/mame/drivers/bfm_sc5.cpp",
1216   MAME_DIR .. "src/mame/includes/bfm_sc5.h",
11141217   MAME_DIR .. "src/mame/drivers/bfm_sc5sw.cpp",
11151218   MAME_DIR .. "src/mame/drivers/bfm_ad5.cpp",
1219   MAME_DIR .. "src/mame/includes/bfm_ad5.h",
11161220   MAME_DIR .. "src/mame/drivers/bfm_ad5sw.cpp",
11171221   MAME_DIR .. "src/mame/drivers/bfm_sc45_helper.cpp",
1222   MAME_DIR .. "src/mame/drivers/bfm_sc45_helper.h",
1223   MAME_DIR .. "src/mame/includes/bfm_sc45.h",
11181224   MAME_DIR .. "src/mame/drivers/bfm_swp.cpp",
11191225   MAME_DIR .. "src/mame/drivers/bfmsys83.cpp",
11201226   MAME_DIR .. "src/mame/drivers/bfmsys85.cpp",
11211227   MAME_DIR .. "src/mame/machine/sec.cpp",
1228   MAME_DIR .. "src/mame/machine/sec.h",
11221229   MAME_DIR .. "src/mame/machine/bfm_bd1.cpp",
1230   MAME_DIR .. "src/mame/machine/bfm_bd1.h",
11231231   MAME_DIR .. "src/mame/machine/bfm_bda.cpp",
1232   MAME_DIR .. "src/mame/machine/bfm_bda.h",
11241233   MAME_DIR .. "src/mame/video/bfm_dm01.cpp",
1234   MAME_DIR .. "src/mame/video/bfm_dm01.h",
11251235   MAME_DIR .. "src/mame/drivers/rastersp.cpp",
11261236}
11271237
r250291r250292
11361246createMAMEProjects(_target, _subtarget, "capcom")
11371247files {
11381248   MAME_DIR .. "src/mame/drivers/1942.cpp",
1249   MAME_DIR .. "src/mame/includes/1942.h",
11391250   MAME_DIR .. "src/mame/video/1942.cpp",
11401251   MAME_DIR .. "src/mame/drivers/1943.cpp",
1252   MAME_DIR .. "src/mame/includes/1943.h",
11411253   MAME_DIR .. "src/mame/video/1943.cpp",
11421254   MAME_DIR .. "src/mame/drivers/alien.cpp",
11431255   MAME_DIR .. "src/mame/drivers/bionicc.cpp",
1256   MAME_DIR .. "src/mame/includes/bionicc.h",
11441257   MAME_DIR .. "src/mame/video/bionicc.cpp",
11451258   MAME_DIR .. "src/mame/drivers/supduck.cpp",
11461259   MAME_DIR .. "src/mame/video/tigeroad_spr.cpp",
1260   MAME_DIR .. "src/mame/video/tigeroad_spr.h",
11471261   MAME_DIR .. "src/mame/drivers/blktiger.cpp",
1262   MAME_DIR .. "src/mame/includes/blktiger.h",
11481263   MAME_DIR .. "src/mame/video/blktiger.cpp",
11491264   MAME_DIR .. "src/mame/drivers/cbasebal.cpp",
1265   MAME_DIR .. "src/mame/includes/cbasebal.h",
11501266   MAME_DIR .. "src/mame/video/cbasebal.cpp",
11511267   MAME_DIR .. "src/mame/drivers/commando.cpp",
1268   MAME_DIR .. "src/mame/includes/commando.h",
11521269   MAME_DIR .. "src/mame/video/commando.cpp",
11531270   MAME_DIR .. "src/mame/drivers/cps1.cpp",
1271   MAME_DIR .. "src/mame/includes/cps1.h",
11541272   MAME_DIR .. "src/mame/video/cps1.cpp",
11551273   MAME_DIR .. "src/mame/drivers/kenseim.cpp",
11561274   MAME_DIR .. "src/mame/drivers/cps2.cpp",
11571275   MAME_DIR .. "src/mame/machine/cps2crpt.cpp",
1276   MAME_DIR .. "src/mame/machine/cps2crypt.h",
11581277   MAME_DIR .. "src/mame/drivers/cps3.cpp",
1278   MAME_DIR .. "src/mame/includes/cps3.h",
11591279   MAME_DIR .. "src/mame/audio/cps3.cpp",
1280   MAME_DIR .. "src/mame/audio/cps3.h",
11601281   MAME_DIR .. "src/mame/drivers/egghunt.cpp",
11611282   MAME_DIR .. "src/mame/drivers/exedexes.cpp",
1283   MAME_DIR .. "src/mame/includes/exedexes.h",
11621284   MAME_DIR .. "src/mame/video/exedexes.cpp",
11631285   MAME_DIR .. "src/mame/drivers/fcrash.cpp",
11641286   MAME_DIR .. "src/mame/drivers/gng.cpp",
1287   MAME_DIR .. "src/mame/includes/gng.h",
11651288   MAME_DIR .. "src/mame/video/gng.cpp",
11661289   MAME_DIR .. "src/mame/drivers/gunsmoke.cpp",
1290   MAME_DIR .. "src/mame/includes/gunsmoke.h",
11671291   MAME_DIR .. "src/mame/video/gunsmoke.cpp",
11681292   MAME_DIR .. "src/mame/drivers/higemaru.cpp",
1293   MAME_DIR .. "src/mame/includes/higemaru.h",
11691294   MAME_DIR .. "src/mame/video/higemaru.cpp",
11701295   MAME_DIR .. "src/mame/drivers/lastduel.cpp",
1296   MAME_DIR .. "src/mame/includes/lastduel.h",
11711297   MAME_DIR .. "src/mame/video/lastduel.cpp",
11721298   MAME_DIR .. "src/mame/drivers/lwings.cpp",
1299   MAME_DIR .. "src/mame/includes/lwings.h",
11731300   MAME_DIR .. "src/mame/video/lwings.cpp",
11741301   MAME_DIR .. "src/mame/drivers/mitchell.cpp",
1302   MAME_DIR .. "src/mame/includes/mitchell.h",
11751303   MAME_DIR .. "src/mame/video/mitchell.cpp",
11761304   MAME_DIR .. "src/mame/drivers/sf.cpp",
1305   MAME_DIR .. "src/mame/includes/sf.h",
11771306   MAME_DIR .. "src/mame/video/sf.cpp",
11781307   MAME_DIR .. "src/mame/drivers/sidearms.cpp",
1308   MAME_DIR .. "src/mame/includes/sidearms.h",
11791309   MAME_DIR .. "src/mame/video/sidearms.cpp",
11801310   MAME_DIR .. "src/mame/drivers/sonson.cpp",
1311   MAME_DIR .. "src/mame/includes/sonson.h",
11811312   MAME_DIR .. "src/mame/video/sonson.cpp",
11821313   MAME_DIR .. "src/mame/drivers/srumbler.cpp",
1314   MAME_DIR .. "src/mame/includes/srumbler.h",
11831315   MAME_DIR .. "src/mame/video/srumbler.cpp",
11841316   MAME_DIR .. "src/mame/drivers/tigeroad.cpp",
1317   MAME_DIR .. "src/mame/includes/tigeroad.h",
11851318   MAME_DIR .. "src/mame/video/tigeroad.cpp",
11861319   MAME_DIR .. "src/mame/machine/tigeroad.cpp",
11871320   MAME_DIR .. "src/mame/drivers/vulgus.cpp",
1321   MAME_DIR .. "src/mame/includes/vulgus.h",
11881322   MAME_DIR .. "src/mame/video/vulgus.cpp",
11891323   MAME_DIR .. "src/mame/machine/kabuki.cpp",
1324   MAME_DIR .. "src/mame/machine/kabuki.h",
11901325}
11911326
11921327createMAMEProjects(_target, _subtarget, "cinemat")
11931328files {
11941329   MAME_DIR .. "src/mame/drivers/ataxx.cpp",
11951330   MAME_DIR .. "src/mame/drivers/cinemat.cpp",
1331   MAME_DIR .. "src/mame/includes/cinemat.h",
11961332   MAME_DIR .. "src/mame/audio/cinemat.cpp",
11971333   MAME_DIR .. "src/mame/video/cinemat.cpp",
11981334   MAME_DIR .. "src/mame/drivers/cchasm.cpp",
1335   MAME_DIR .. "src/mame/includes/cchasm.h",
11991336   MAME_DIR .. "src/mame/machine/cchasm.cpp",
12001337   MAME_DIR .. "src/mame/audio/cchasm.cpp",
12011338   MAME_DIR .. "src/mame/video/cchasm.cpp",
r250291r250292
12031340   MAME_DIR .. "src/mame/drivers/dlair2.cpp",
12041341   MAME_DIR .. "src/mame/drivers/embargo.cpp",
12051342   MAME_DIR .. "src/mame/drivers/jack.cpp",
1343   MAME_DIR .. "src/mame/includes/jack.h",
12061344   MAME_DIR .. "src/mame/video/jack.cpp",
12071345   MAME_DIR .. "src/mame/drivers/leland.cpp",
1346   MAME_DIR .. "src/mame/includes/leland.h",
12081347   MAME_DIR .. "src/mame/machine/leland.cpp",
12091348   MAME_DIR .. "src/mame/audio/leland.cpp",
12101349   MAME_DIR .. "src/mame/video/leland.cpp",
r250291r250292
12131352createMAMEProjects(_target, _subtarget, "comad")
12141353files {
12151354   MAME_DIR .. "src/mame/drivers/funybubl.cpp",
1355   MAME_DIR .. "src/mame/includes/funybubl.h",
12161356   MAME_DIR .. "src/mame/video/funybubl.cpp",
12171357   MAME_DIR .. "src/mame/drivers/galspnbl.cpp",
1358   MAME_DIR .. "src/mame/includes/galspnbl.h",
12181359   MAME_DIR .. "src/mame/video/galspnbl.cpp",
12191360   MAME_DIR .. "src/mame/drivers/zerozone.cpp",
1361   MAME_DIR .. "src/mame/includes/zerozone.h",
12201362   MAME_DIR .. "src/mame/video/zerozone.cpp",
12211363}
12221364
12231365createMAMEProjects(_target, _subtarget, "cvs")
12241366files {
12251367   MAME_DIR .. "src/mame/drivers/cvs.cpp",
1368   MAME_DIR .. "src/mame/includes/cvs.h",
12261369   MAME_DIR .. "src/mame/video/cvs.cpp",
12271370   MAME_DIR .. "src/mame/drivers/galaxia.cpp",
1371   MAME_DIR .. "src/mame/includes/galaxia.h",
12281372   MAME_DIR .. "src/mame/video/galaxia.cpp",
12291373   MAME_DIR .. "src/mame/drivers/quasar.cpp",
1374   MAME_DIR .. "src/mame/includes/quasar.h",
12301375   MAME_DIR .. "src/mame/video/quasar.cpp",
12311376}
12321377
12331378createMAMEProjects(_target, _subtarget, "dataeast")
12341379files {
12351380   MAME_DIR .. "src/mame/drivers/actfancr.cpp",
1381   MAME_DIR .. "src/mame/includes/actfancr.h",
12361382   MAME_DIR .. "src/mame/video/actfancr.cpp",
12371383   MAME_DIR .. "src/mame/drivers/astrof.cpp",
1384   MAME_DIR .. "src/mame/includes/astrof.h",
12381385   MAME_DIR .. "src/mame/audio/astrof.cpp",
12391386   MAME_DIR .. "src/mame/drivers/backfire.cpp",
12401387   MAME_DIR .. "src/mame/drivers/battlera.cpp",
1388   MAME_DIR .. "src/mame/includes/battlera.h",
12411389   MAME_DIR .. "src/mame/drivers/boogwing.cpp",
1390   MAME_DIR .. "src/mame/includes/boogwing.h",
12421391   MAME_DIR .. "src/mame/video/boogwing.cpp",
12431392   MAME_DIR .. "src/mame/drivers/brkthru.cpp",
1393   MAME_DIR .. "src/mame/includes/brkthru.h",
12441394   MAME_DIR .. "src/mame/video/brkthru.cpp",
12451395   MAME_DIR .. "src/mame/drivers/btime.cpp",
1396   MAME_DIR .. "src/mame/includes/btime.h",
12461397   MAME_DIR .. "src/mame/machine/btime.cpp",
12471398   MAME_DIR .. "src/mame/video/btime.cpp",
12481399   MAME_DIR .. "src/mame/drivers/bwing.cpp",
1400   MAME_DIR .. "src/mame/includes/bwing.h",
12491401   MAME_DIR .. "src/mame/video/bwing.cpp",
12501402   MAME_DIR .. "src/mame/drivers/cbuster.cpp",
1403   MAME_DIR .. "src/mame/includes/cbuster.h",
12511404   MAME_DIR .. "src/mame/video/cbuster.cpp",
12521405   MAME_DIR .. "src/mame/drivers/chanbara.cpp",
12531406   MAME_DIR .. "src/mame/drivers/cninja.cpp",
1407   MAME_DIR .. "src/mame/includes/cninja.h",
12541408   MAME_DIR .. "src/mame/video/cninja.cpp",
12551409   MAME_DIR .. "src/mame/drivers/cntsteer.cpp",
12561410   MAME_DIR .. "src/mame/drivers/compgolf.cpp",
1411   MAME_DIR .. "src/mame/includes/compgolf.h",
12571412   MAME_DIR .. "src/mame/video/compgolf.cpp",
12581413   MAME_DIR .. "src/mame/drivers/darkseal.cpp",
1414   MAME_DIR .. "src/mame/includes/darkseal.h",
12591415   MAME_DIR .. "src/mame/video/darkseal.cpp",
12601416   MAME_DIR .. "src/mame/drivers/dassault.cpp",
1417   MAME_DIR .. "src/mame/includes/dassault.h",
12611418   MAME_DIR .. "src/mame/video/dassault.cpp",
12621419   MAME_DIR .. "src/mame/drivers/dblewing.cpp",
12631420   MAME_DIR .. "src/mame/drivers/dec0.cpp",
1421   MAME_DIR .. "src/mame/includes/dec0.h",
12641422   MAME_DIR .. "src/mame/machine/dec0.cpp",
12651423   MAME_DIR .. "src/mame/video/dec0.cpp",
12661424   MAME_DIR .. "src/mame/drivers/dec8.cpp",
1425   MAME_DIR .. "src/mame/includes/dec8.h",
12671426   MAME_DIR .. "src/mame/video/dec8.cpp",
12681427   MAME_DIR .. "src/mame/machine/deco222.cpp",
1428   MAME_DIR .. "src/mame/machine/deco222.h",
12691429   MAME_DIR .. "src/mame/machine/decocpu7.cpp",
1430   MAME_DIR .. "src/mame/machine/decocpu7.h",
12701431   MAME_DIR .. "src/mame/machine/decocpu6.cpp",
1432   MAME_DIR .. "src/mame/machine/decocpu6.h",
12711433   MAME_DIR .. "src/mame/drivers/deco_ld.cpp",
12721434   MAME_DIR .. "src/mame/drivers/deco_mlc.cpp",
1435   MAME_DIR .. "src/mame/includes/deco_mlc.h",
12731436   MAME_DIR .. "src/mame/video/deco_mlc.cpp",
12741437   MAME_DIR .. "src/mame/drivers/deco156.cpp",
12751438   MAME_DIR .. "src/mame/machine/deco156.cpp",
12761439   MAME_DIR .. "src/mame/drivers/deco32.cpp",
1440   MAME_DIR .. "src/mame/includes/deco32.h",
12771441   MAME_DIR .. "src/mame/video/deco32.cpp",
12781442   MAME_DIR .. "src/mame/video/dvi.cpp",
12791443   MAME_DIR .. "src/mame/video/deco_zoomspr.cpp",
1444   MAME_DIR .. "src/mame/video/deco_zoomspr.h",
12801445   MAME_DIR .. "src/mame/drivers/decocass.cpp",
1446   MAME_DIR .. "src/mame/includes/decocass.h",
12811447   MAME_DIR .. "src/mame/machine/decocass.cpp",
12821448   MAME_DIR .. "src/mame/machine/decocass_tape.cpp",
1449   MAME_DIR .. "src/mame/machine/decocass_tape.h",
12831450   MAME_DIR .. "src/mame/video/decocass.cpp",
12841451   MAME_DIR .. "src/mame/drivers/deshoros.cpp",
12851452   MAME_DIR .. "src/mame/drivers/dietgo.cpp",
1453   MAME_DIR .. "src/mame/includes/dietgo.h",
12861454   MAME_DIR .. "src/mame/video/dietgo.cpp",
12871455   MAME_DIR .. "src/mame/drivers/dreambal.cpp",
12881456   MAME_DIR .. "src/mame/drivers/exprraid.cpp",
1457   MAME_DIR .. "src/mame/includes/exprraid.h",
12891458   MAME_DIR .. "src/mame/video/exprraid.cpp",
12901459   MAME_DIR .. "src/mame/drivers/firetrap.cpp",
1460   MAME_DIR .. "src/mame/includes/firetrap.h",
12911461   MAME_DIR .. "src/mame/video/firetrap.cpp",
12921462   MAME_DIR .. "src/mame/drivers/funkyjet.cpp",
1463   MAME_DIR .. "src/mame/includes/funkyjet.h",
12931464   MAME_DIR .. "src/mame/video/funkyjet.cpp",
12941465   MAME_DIR .. "src/mame/drivers/karnov.cpp",
1466   MAME_DIR .. "src/mame/includes/karnov.h",
12951467   MAME_DIR .. "src/mame/video/karnov.cpp",
12961468   MAME_DIR .. "src/mame/drivers/kchamp.cpp",
1469   MAME_DIR .. "src/mame/includes/kchamp.h",
12971470   MAME_DIR .. "src/mame/video/kchamp.cpp",
12981471   MAME_DIR .. "src/mame/drivers/kingobox.cpp",
1472   MAME_DIR .. "src/mame/includes/kingobox.h",
12991473   MAME_DIR .. "src/mame/video/kingobox.cpp",
13001474   MAME_DIR .. "src/mame/drivers/lemmings.cpp",
1475   MAME_DIR .. "src/mame/includes/lemmings.h",
13011476   MAME_DIR .. "src/mame/video/lemmings.cpp",
13021477   MAME_DIR .. "src/mame/drivers/liberate.cpp",
1478   MAME_DIR .. "src/mame/includes/liberate.h",
13031479   MAME_DIR .. "src/mame/video/liberate.cpp",
13041480   MAME_DIR .. "src/mame/drivers/madalien.cpp",
1481   MAME_DIR .. "src/mame/includes/madalien.h",
13051482   MAME_DIR .. "src/mame/audio/madalien.cpp",
13061483   MAME_DIR .. "src/mame/video/madalien.cpp",
13071484   MAME_DIR .. "src/mame/drivers/madmotor.cpp",
1485   MAME_DIR .. "src/mame/includes/madmotor.h",
13081486   MAME_DIR .. "src/mame/video/madmotor.cpp",
13091487   MAME_DIR .. "src/mame/drivers/metlclsh.cpp",
1488   MAME_DIR .. "src/mame/includes/metlclsh.h",
13101489   MAME_DIR .. "src/mame/video/metlclsh.cpp",
13111490   MAME_DIR .. "src/mame/drivers/mirage.cpp",
13121491   MAME_DIR .. "src/mame/drivers/pcktgal.cpp",
1492   MAME_DIR .. "src/mame/includes/pcktgal.h",
13131493   MAME_DIR .. "src/mame/video/pcktgal.cpp",
13141494   MAME_DIR .. "src/mame/drivers/pktgaldx.cpp",
1495   MAME_DIR .. "src/mame/includes/pktgaldx.h",
13151496   MAME_DIR .. "src/mame/video/pktgaldx.cpp",
13161497   MAME_DIR .. "src/mame/drivers/progolf.cpp",
13171498   MAME_DIR .. "src/mame/drivers/rohga.cpp",
1499   MAME_DIR .. "src/mame/includes/rohga.h",
13181500   MAME_DIR .. "src/mame/video/rohga.cpp",
13191501   MAME_DIR .. "src/mame/drivers/shootout.cpp",
1502   MAME_DIR .. "src/mame/includes/shootout.h",
13201503   MAME_DIR .. "src/mame/video/shootout.cpp",
13211504   MAME_DIR .. "src/mame/drivers/sidepckt.cpp",
1505   MAME_DIR .. "src/mame/includes/sidepckt.h",
13221506   MAME_DIR .. "src/mame/video/sidepckt.cpp",
13231507   MAME_DIR .. "src/mame/drivers/simpl156.cpp",
1508   MAME_DIR .. "src/mame/includes/simpl156.h",
13241509   MAME_DIR .. "src/mame/video/simpl156.cpp",
13251510   MAME_DIR .. "src/mame/drivers/sshangha.cpp",
1511   MAME_DIR .. "src/mame/includes/sshangha.h",
13261512   MAME_DIR .. "src/mame/video/sshangha.cpp",
13271513   MAME_DIR .. "src/mame/drivers/stadhero.cpp",
1514   MAME_DIR .. "src/mame/includes/stadhero.h",
13281515   MAME_DIR .. "src/mame/video/stadhero.cpp",
13291516   MAME_DIR .. "src/mame/drivers/supbtime.cpp",
1517   MAME_DIR .. "src/mame/includes/supbtime.h",
13301518   MAME_DIR .. "src/mame/video/supbtime.cpp",
13311519   MAME_DIR .. "src/mame/drivers/tryout.cpp",
1520   MAME_DIR .. "src/mame/includes/tryout.h",
13321521   MAME_DIR .. "src/mame/video/tryout.cpp",
13331522   MAME_DIR .. "src/mame/drivers/tumbleb.cpp",
1523   MAME_DIR .. "src/mame/includes/tumbleb.h",
13341524   MAME_DIR .. "src/mame/video/tumbleb.cpp",
13351525   MAME_DIR .. "src/mame/drivers/tumblep.cpp",
1526   MAME_DIR .. "src/mame/includes/tumblep.h",
13361527   MAME_DIR .. "src/mame/video/tumblep.cpp",
13371528   MAME_DIR .. "src/mame/drivers/vaportra.cpp",
1529   MAME_DIR .. "src/mame/includes/vaportra.h",
13381530   MAME_DIR .. "src/mame/video/vaportra.cpp",
13391531   MAME_DIR .. "src/mame/machine/deco102.cpp",
13401532   MAME_DIR .. "src/mame/machine/decocrpt.cpp",
1533   MAME_DIR .. "src/mame/includes/decocrpt.h",
13411534   MAME_DIR .. "src/mame/machine/deco104.cpp",
1535   MAME_DIR .. "src/mame/machine/deco104.h",
13421536   MAME_DIR .. "src/mame/machine/deco146.cpp",
1537   MAME_DIR .. "src/mame/machine/deco146.h",
13431538   MAME_DIR .. "src/mame/video/decbac06.cpp",
1539   MAME_DIR .. "src/mame/video/decbac06.h",
13441540   MAME_DIR .. "src/mame/video/deco16ic.cpp",
1541   MAME_DIR .. "src/mame/video/deco16ic.h",
13451542   MAME_DIR .. "src/mame/video/decocomn.cpp",
1543   MAME_DIR .. "src/mame/video/decocomn.h",
13461544   MAME_DIR .. "src/mame/video/decospr.cpp",
1545   MAME_DIR .. "src/mame/video/decospr.h",
13471546   MAME_DIR .. "src/mame/video/decmxc06.cpp",
1547   MAME_DIR .. "src/mame/video/decmxc06.h",
13481548   MAME_DIR .. "src/mame/video/deckarn.cpp",
1549   MAME_DIR .. "src/mame/video/deckarn.h",
13491550}
13501551
13511552createMAMEProjects(_target, _subtarget, "dgrm")
13521553files {
13531554   MAME_DIR .. "src/mame/drivers/blackt96.cpp",
13541555   MAME_DIR .. "src/mame/drivers/pokechmp.cpp",
1556   MAME_DIR .. "src/mame/includes/pokechmp.h",
13551557   MAME_DIR .. "src/mame/video/pokechmp.cpp",
13561558}
13571559
13581560createMAMEProjects(_target, _subtarget, "dooyong")
13591561files {
13601562   MAME_DIR .. "src/mame/drivers/dooyong.cpp",
1563   MAME_DIR .. "src/mame/includes/dooyong.h",
13611564   MAME_DIR .. "src/mame/video/dooyong.cpp",
13621565   MAME_DIR .. "src/mame/drivers/gundealr.cpp",
1566   MAME_DIR .. "src/mame/includes/gundealr.h",
13631567   MAME_DIR .. "src/mame/video/gundealr.cpp",
13641568}
13651569
r250291r250292
13671571files {
13681572   MAME_DIR .. "src/mame/drivers/ddenlovr.cpp",
13691573   MAME_DIR .. "src/mame/drivers/dynax.cpp",
1574   MAME_DIR .. "src/mame/includes/dynax.h",
13701575   MAME_DIR .. "src/mame/video/dynax.cpp",
13711576   MAME_DIR .. "src/mame/drivers/hnayayoi.cpp",
1577   MAME_DIR .. "src/mame/includes/hnayayoi.h",
13721578   MAME_DIR .. "src/mame/video/hnayayoi.cpp",
13731579   MAME_DIR .. "src/mame/drivers/realbrk.cpp",
1580   MAME_DIR .. "src/mame/includes/realbrk.h",
13741581   MAME_DIR .. "src/mame/video/realbrk.cpp",
13751582   MAME_DIR .. "src/mame/drivers/royalmah.cpp",
13761583}
r250291r250292
13791586files {
13801587   MAME_DIR .. "src/mame/drivers/diverboy.cpp",
13811588   MAME_DIR .. "src/mame/drivers/fantland.cpp",
1589   MAME_DIR .. "src/mame/includes/fantland.h",
13821590   MAME_DIR .. "src/mame/video/fantland.cpp",
13831591   MAME_DIR .. "src/mame/drivers/mwarr.cpp",
13841592   MAME_DIR .. "src/mame/drivers/mugsmash.cpp",
1593   MAME_DIR .. "src/mame/includes/mugsmash.h",
13851594   MAME_DIR .. "src/mame/video/mugsmash.cpp",
13861595   MAME_DIR .. "src/mame/drivers/ppmast93.cpp",
13871596   MAME_DIR .. "src/mame/drivers/pzletime.cpp",
13881597   MAME_DIR .. "src/mame/drivers/stlforce.cpp",
1598   MAME_DIR .. "src/mame/includes/stlforce.h",
13891599   MAME_DIR .. "src/mame/video/stlforce.cpp",
13901600   MAME_DIR .. "src/mame/drivers/twins.cpp",
13911601}
r250291r250292
13931603createMAMEProjects(_target, _subtarget, "eolith")
13941604files {
13951605   MAME_DIR .. "src/mame/drivers/eolith.cpp",
1606   MAME_DIR .. "src/mame/includes/eolith.h",
13961607   MAME_DIR .. "src/mame/video/eolith.cpp",
13971608   MAME_DIR .. "src/mame/drivers/eolith16.cpp",
13981609   MAME_DIR .. "src/mame/drivers/eolithsp.cpp",
r250291r250292
14031614createMAMEProjects(_target, _subtarget, "excelent")
14041615files {
14051616   MAME_DIR .. "src/mame/drivers/aquarium.cpp",
1617   MAME_DIR .. "src/mame/includes/aquarium.h",
14061618   MAME_DIR .. "src/mame/video/aquarium.cpp",
14071619   MAME_DIR .. "src/mame/drivers/d9final.cpp",
14081620   MAME_DIR .. "src/mame/drivers/dblcrown.cpp",
14091621   MAME_DIR .. "src/mame/drivers/gcpinbal.cpp",
1622   MAME_DIR .. "src/mame/includes/gcpinbal.h",
14101623   MAME_DIR .. "src/mame/video/gcpinbal.cpp",
14111624   MAME_DIR .. "src/mame/video/excellent_spr.cpp",
1625   MAME_DIR .. "src/mame/video/excellent_spr.h",
14121626   MAME_DIR .. "src/mame/drivers/lastbank.cpp",
14131627}
14141628
14151629createMAMEProjects(_target, _subtarget, "exidy")
14161630files {
14171631   MAME_DIR .. "src/mame/drivers/carpolo.cpp",
1632   MAME_DIR .. "src/mame/includes/carpolo.h",
14181633   MAME_DIR .. "src/mame/machine/carpolo.cpp",
14191634   MAME_DIR .. "src/mame/video/carpolo.cpp",
14201635   MAME_DIR .. "src/mame/drivers/circus.cpp",
1636   MAME_DIR .. "src/mame/includes/circus.h",
14211637   MAME_DIR .. "src/mame/audio/circus.cpp",
14221638   MAME_DIR .. "src/mame/video/circus.cpp",
14231639   MAME_DIR .. "src/mame/drivers/exidy.cpp",
1640   MAME_DIR .. "src/mame/includes/exidy.h",
14241641   MAME_DIR .. "src/mame/audio/exidy.cpp",
1642   MAME_DIR .. "src/mame/audio/exidy.h",
14251643   MAME_DIR .. "src/mame/video/exidy.cpp",
14261644   MAME_DIR .. "src/mame/audio/targ.cpp",
14271645   MAME_DIR .. "src/mame/drivers/exidy440.cpp",
1646   MAME_DIR .. "src/mame/includes/exidy440.h",
14281647   MAME_DIR .. "src/mame/audio/exidy440.cpp",
1648   MAME_DIR .. "src/mame/audio/exidy440.h",
14291649   MAME_DIR .. "src/mame/video/exidy440.cpp",
14301650   MAME_DIR .. "src/mame/drivers/exidyttl.cpp",
14311651   MAME_DIR .. "src/mame/drivers/maxaflex.cpp",
14321652   MAME_DIR .. "src/mame/machine/atari.cpp",
1653   MAME_DIR .. "src/mame/includes/atari.h",
14331654   MAME_DIR .. "src/mame/video/atari.cpp",
14341655   MAME_DIR .. "src/mame/video/antic.cpp",
1656   MAME_DIR .. "src/mame/video/antic.h",
14351657   MAME_DIR .. "src/mame/video/gtia.cpp",
1658   MAME_DIR .. "src/mame/video/gtia.h",
14361659   MAME_DIR .. "src/mame/drivers/starfire.cpp",
1660   MAME_DIR .. "src/mame/includes/starfire.h",
14371661   MAME_DIR .. "src/mame/video/starfire.cpp",
14381662   MAME_DIR .. "src/mame/drivers/vertigo.cpp",
1663   MAME_DIR .. "src/mame/includes/vertigo.h",
14391664   MAME_DIR .. "src/mame/machine/vertigo.cpp",
14401665   MAME_DIR .. "src/mame/video/vertigo.cpp",
14411666   MAME_DIR .. "src/mame/drivers/victory.cpp",
1667   MAME_DIR .. "src/mame/includes/victory.h",
14421668   MAME_DIR .. "src/mame/video/victory.cpp",
14431669}
14441670
14451671createMAMEProjects(_target, _subtarget, "f32")
14461672files {
14471673   MAME_DIR .. "src/mame/drivers/crospang.cpp",
1674   MAME_DIR .. "src/mame/includes/crospang.h",
14481675   MAME_DIR .. "src/mame/video/crospang.cpp",
14491676   MAME_DIR .. "src/mame/drivers/silvmil.cpp",
14501677   MAME_DIR .. "src/mame/drivers/f-32.cpp",
r250291r250292
14541681files {
14551682   MAME_DIR .. "src/mame/drivers/4roses.cpp",
14561683   MAME_DIR .. "src/mame/drivers/funworld.cpp",
1684   MAME_DIR .. "src/mame/includes/funworld.h",
14571685   MAME_DIR .. "src/mame/video/funworld.cpp",
14581686   MAME_DIR .. "src/mame/drivers/snookr10.cpp",
1687   MAME_DIR .. "src/mame/includes/snookr10.h",
14591688   MAME_DIR .. "src/mame/video/snookr10.cpp",
14601689}
14611690
14621691createMAMEProjects(_target, _subtarget, "fuuki")
14631692files {
14641693   MAME_DIR .. "src/mame/drivers/fuukifg2.cpp",
1694   MAME_DIR .. "src/mame/includes/fuukifg2.h",
14651695   MAME_DIR .. "src/mame/video/fuukifg2.cpp",
14661696   MAME_DIR .. "src/mame/drivers/fuukifg3.cpp",
1697   MAME_DIR .. "src/mame/includes/fuukifg3.h",
14671698   MAME_DIR .. "src/mame/video/fuukifg3.cpp",
14681699   MAME_DIR .. "src/mame/video/fuukifg.cpp",
1700   MAME_DIR .. "src/mame/video/fuukifg.h",
14691701}
14701702
14711703createMAMEProjects(_target, _subtarget, "gaelco")
14721704files {
14731705   MAME_DIR .. "src/mame/drivers/atvtrack.cpp",
14741706   MAME_DIR .. "src/mame/drivers/gaelco.cpp",
1707   MAME_DIR .. "src/mame/includes/gaelco.h",
14751708   MAME_DIR .. "src/mame/video/gaelco.cpp",
14761709   MAME_DIR .. "src/mame/machine/gaelcrpt.cpp",
1710   MAME_DIR .. "src/mame/includes/gaelcrpt.h",
14771711   MAME_DIR .. "src/mame/drivers/gaelco2.cpp",
1712   MAME_DIR .. "src/mame/includes/gaelco2.h",
14781713   MAME_DIR .. "src/mame/machine/gaelco2.cpp",
14791714   MAME_DIR .. "src/mame/video/gaelco2.cpp",
14801715   MAME_DIR .. "src/mame/drivers/gaelco3d.cpp",
1716   MAME_DIR .. "src/mame/includes/gaelco3d.h",
14811717   MAME_DIR .. "src/mame/video/gaelco3d.cpp",
14821718   MAME_DIR .. "src/mame/machine/gaelco3d.cpp",
1719   MAME_DIR .. "src/mame/machine/gaelco3d.h",
14831720   MAME_DIR .. "src/mame/drivers/glass.cpp",
1721   MAME_DIR .. "src/mame/includes/glass.h",
14841722   MAME_DIR .. "src/mame/video/glass.cpp",
14851723   MAME_DIR .. "src/mame/drivers/mastboy.cpp",
14861724   MAME_DIR .. "src/mame/drivers/rollext.cpp",
14871725   MAME_DIR .. "src/mame/drivers/splash.cpp",
1726   MAME_DIR .. "src/mame/includes/splash.h",
14881727   MAME_DIR .. "src/mame/video/splash.cpp",
14891728   MAME_DIR .. "src/mame/drivers/targeth.cpp",
1729   MAME_DIR .. "src/mame/includes/targeth.h",
14901730   MAME_DIR .. "src/mame/video/targeth.cpp",
14911731   MAME_DIR .. "src/mame/drivers/thoop2.cpp",
1732   MAME_DIR .. "src/mame/includes/thoop2.h",
14921733   MAME_DIR .. "src/mame/video/thoop2.cpp",
14931734   MAME_DIR .. "src/mame/drivers/tokyocop.cpp",
14941735   MAME_DIR .. "src/mame/drivers/wrally.cpp",
1736   MAME_DIR .. "src/mame/includes/wrally.h",
14951737   MAME_DIR .. "src/mame/machine/wrally.cpp",
14961738   MAME_DIR .. "src/mame/video/wrally.cpp",
14971739   MAME_DIR .. "src/mame/drivers/xorworld.cpp",
1740   MAME_DIR .. "src/mame/includes/xorworld.h",
14981741   MAME_DIR .. "src/mame/video/xorworld.cpp",
14991742}
15001743
r250291r250292
15021745files {
15031746   MAME_DIR .. "src/mame/drivers/enigma2.cpp",
15041747   MAME_DIR .. "src/mame/drivers/gameplan.cpp",
1748   MAME_DIR .. "src/mame/includes/gameplan.h",
15051749   MAME_DIR .. "src/mame/video/gameplan.cpp",
15061750   MAME_DIR .. "src/mame/drivers/toratora.cpp",
15071751}
r250291r250292
15091753createMAMEProjects(_target, _subtarget, "gametron")
15101754files {
15111755   MAME_DIR .. "src/mame/drivers/gatron.cpp",
1756   MAME_DIR .. "src/mame/includes/gatron.h",
15121757   MAME_DIR .. "src/mame/video/gatron.cpp",
15131758   MAME_DIR .. "src/mame/drivers/gotya.cpp",
1759   MAME_DIR .. "src/mame/includes/gotya.h",
15141760   MAME_DIR .. "src/mame/audio/gotya.cpp",
15151761   MAME_DIR .. "src/mame/video/gotya.cpp",
15161762   MAME_DIR .. "src/mame/drivers/sbugger.cpp",
1763   MAME_DIR .. "src/mame/includes/sbugger.h",
15171764   MAME_DIR .. "src/mame/video/sbugger.cpp",
15181765}
15191766
15201767createMAMEProjects(_target, _subtarget, "gottlieb")
15211768files {
15221769   MAME_DIR .. "src/mame/drivers/exterm.cpp",
1770   MAME_DIR .. "src/mame/includes/exterm.h",
15231771   MAME_DIR .. "src/mame/video/exterm.cpp",
15241772   MAME_DIR .. "src/mame/drivers/gottlieb.cpp",
1773   MAME_DIR .. "src/mame/includes/gottlieb.h",
15251774   MAME_DIR .. "src/mame/audio/gottlieb.cpp",
1775   MAME_DIR .. "src/mame/audio/gottlieb.h",
15261776   MAME_DIR .. "src/mame/video/gottlieb.cpp",
15271777}
15281778
r250291r250292
15451795   MAME_DIR .. "src/mame/drivers/ddz.cpp",
15461796   MAME_DIR .. "src/mame/drivers/dunhuang.cpp",
15471797   MAME_DIR .. "src/mame/drivers/goldstar.cpp",
1798   MAME_DIR .. "src/mame/includes/goldstar.h",
15481799   MAME_DIR .. "src/mame/video/goldstar.cpp",
15491800   MAME_DIR .. "src/mame/drivers/jackie.cpp",
15501801   MAME_DIR .. "src/mame/drivers/igspoker.cpp",
r250291r250292
15521803   MAME_DIR .. "src/mame/drivers/igs011.cpp",
15531804   MAME_DIR .. "src/mame/drivers/igs017.cpp",
15541805   MAME_DIR .. "src/mame/video/igs017_igs031.cpp",
1806   MAME_DIR .. "src/mame/video/igs017_igs031.h",
15551807   MAME_DIR .. "src/mame/drivers/igs_fear.cpp",
15561808   MAME_DIR .. "src/mame/drivers/igs_m027.cpp",
15571809   MAME_DIR .. "src/mame/drivers/igs_m036.cpp",
15581810   MAME_DIR .. "src/mame/drivers/iqblock.cpp",
1811   MAME_DIR .. "src/mame/includes/iqblock.h",
15591812   MAME_DIR .. "src/mame/video/iqblock.cpp",
15601813   MAME_DIR .. "src/mame/drivers/lordgun.cpp",
1814   MAME_DIR .. "src/mame/includes/lordgun.h",
15611815   MAME_DIR .. "src/mame/video/lordgun.cpp",
15621816   MAME_DIR .. "src/mame/drivers/pgm.cpp",
1817   MAME_DIR .. "src/mame/includes/pgm.h",
15631818   MAME_DIR .. "src/mame/video/pgm.cpp",
15641819   MAME_DIR .. "src/mame/machine/pgmprot_igs027a_type1.cpp",
15651820   MAME_DIR .. "src/mame/machine/pgmprot_igs027a_type2.cpp",
r250291r250292
15711826   MAME_DIR .. "src/mame/drivers/pgm2.cpp",
15721827   MAME_DIR .. "src/mame/drivers/spoker.cpp",
15731828   MAME_DIR .. "src/mame/machine/igs036crypt.cpp",
1829   MAME_DIR .. "src/mame/machine/igs036crypt.h",
15741830   MAME_DIR .. "src/mame/machine/pgmcrypt.cpp",
1831   MAME_DIR .. "src/mame/machine/pgmcrypt.h",
15751832   MAME_DIR .. "src/mame/machine/igs025.cpp",
1833   MAME_DIR .. "src/mame/machine/igs025.h",
15761834   MAME_DIR .. "src/mame/machine/igs022.cpp",
1835   MAME_DIR .. "src/mame/machine/igs022.h",
15771836   MAME_DIR .. "src/mame/machine/igs028.cpp",
1837   MAME_DIR .. "src/mame/machine/igs028.h",
15781838}
15791839
15801840createMAMEProjects(_target, _subtarget, "irem")
15811841files {
15821842   MAME_DIR .. "src/mame/drivers/m10.cpp",
1843   MAME_DIR .. "src/mame/includes/m10.h",
15831844   MAME_DIR .. "src/mame/video/m10.cpp",
15841845   MAME_DIR .. "src/mame/drivers/m14.cpp",
15851846   MAME_DIR .. "src/mame/drivers/m52.cpp",
1847   MAME_DIR .. "src/mame/includes/m52.h",
15861848   MAME_DIR .. "src/mame/video/m52.cpp",
15871849   MAME_DIR .. "src/mame/drivers/m57.cpp",
1850   MAME_DIR .. "src/mame/includes/m57.h",
15881851   MAME_DIR .. "src/mame/video/m57.cpp",
15891852   MAME_DIR .. "src/mame/drivers/m58.cpp",
1853   MAME_DIR .. "src/mame/includes/m58.h",
15901854   MAME_DIR .. "src/mame/video/m58.cpp",
15911855   MAME_DIR .. "src/mame/drivers/m62.cpp",
1856   MAME_DIR .. "src/mame/includes/m62.h",
15921857   MAME_DIR .. "src/mame/video/m62.cpp",
15931858   MAME_DIR .. "src/mame/drivers/m63.cpp",
15941859   MAME_DIR .. "src/mame/drivers/m72.cpp",
1860   MAME_DIR .. "src/mame/includes/m72.h",
15951861   MAME_DIR .. "src/mame/audio/m72.cpp",
1862   MAME_DIR .. "src/mame/audio/m72.h",
15961863   MAME_DIR .. "src/mame/video/m72.cpp",
15971864   MAME_DIR .. "src/mame/drivers/m90.cpp",
1865   MAME_DIR .. "src/mame/includes/m90.h",
15981866   MAME_DIR .. "src/mame/video/m90.cpp",
15991867   MAME_DIR .. "src/mame/drivers/m92.cpp",
1868   MAME_DIR .. "src/mame/includes/m92.h",
16001869   MAME_DIR .. "src/mame/video/m92.cpp",
16011870   MAME_DIR .. "src/mame/drivers/m107.cpp",
1871   MAME_DIR .. "src/mame/includes/m107.h",
16021872   MAME_DIR .. "src/mame/video/m107.cpp",
1873   MAME_DIR .. "src/mame/includes/iremipt.h",
16031874   MAME_DIR .. "src/mame/drivers/olibochu.cpp",
16041875   MAME_DIR .. "src/mame/drivers/redalert.cpp",
1876   MAME_DIR .. "src/mame/includes/redalert.h",
16051877   MAME_DIR .. "src/mame/audio/redalert.cpp",
16061878   MAME_DIR .. "src/mame/video/redalert.cpp",
16071879   MAME_DIR .. "src/mame/drivers/shisen.cpp",
1880   MAME_DIR .. "src/mame/includes/shisen.h",
16081881   MAME_DIR .. "src/mame/video/shisen.cpp",
16091882   MAME_DIR .. "src/mame/drivers/travrusa.cpp",
1883   MAME_DIR .. "src/mame/includes/travrusa.h",
16101884   MAME_DIR .. "src/mame/video/travrusa.cpp",
16111885   MAME_DIR .. "src/mame/drivers/vigilant.cpp",
1886   MAME_DIR .. "src/mame/includes/vigilant.h",
16121887   MAME_DIR .. "src/mame/video/vigilant.cpp",
16131888   MAME_DIR .. "src/mame/machine/irem_cpu.cpp",
1889   MAME_DIR .. "src/mame/machine/irem_cpu.h",
16141890   MAME_DIR .. "src/mame/audio/irem.cpp",
1891   MAME_DIR .. "src/mame/audio/irem.h",
16151892}
16161893
16171894createMAMEProjects(_target, _subtarget, "itech")
16181895files {
16191896   MAME_DIR .. "src/mame/drivers/capbowl.cpp",
1897   MAME_DIR .. "src/mame/includes/capbowl.h",
16201898   MAME_DIR .. "src/mame/video/capbowl.cpp",
16211899   MAME_DIR .. "src/mame/drivers/itech8.cpp",
1900   MAME_DIR .. "src/mame/includes/itech8.h",
16221901   MAME_DIR .. "src/mame/machine/slikshot.cpp",
16231902   MAME_DIR .. "src/mame/video/itech8.cpp",
16241903   MAME_DIR .. "src/mame/drivers/itech32.cpp",
1904   MAME_DIR .. "src/mame/includes/itech32.h",
16251905   MAME_DIR .. "src/mame/video/itech32.cpp",
16261906   MAME_DIR .. "src/mame/drivers/iteagle.cpp",
16271907   MAME_DIR .. "src/mame/machine/iteagle_fpga.cpp",
1908   MAME_DIR .. "src/mame/machine/iteagle_fpga.h",
16281909}
16291910
16301911createMAMEProjects(_target, _subtarget, "jaleco")
16311912files {
16321913   MAME_DIR .. "src/mame/drivers/aeroboto.cpp",
1914   MAME_DIR .. "src/mame/includes/aeroboto.h",
16331915   MAME_DIR .. "src/mame/video/aeroboto.cpp",
16341916   MAME_DIR .. "src/mame/drivers/argus.cpp",
1917   MAME_DIR .. "src/mame/includes/argus.h",
16351918   MAME_DIR .. "src/mame/video/argus.cpp",
16361919   MAME_DIR .. "src/mame/drivers/bestleag.cpp",
16371920   MAME_DIR .. "src/mame/drivers/bigstrkb.cpp",
1921   MAME_DIR .. "src/mame/includes/bigstrkb.h",
16381922   MAME_DIR .. "src/mame/video/bigstrkb.cpp",
16391923   MAME_DIR .. "src/mame/drivers/blueprnt.cpp",
1924   MAME_DIR .. "src/mame/includes/blueprnt.h",
16401925   MAME_DIR .. "src/mame/video/blueprnt.cpp",
16411926   MAME_DIR .. "src/mame/drivers/bnstars.cpp",
16421927   MAME_DIR .. "src/mame/drivers/cischeat.cpp",
1928   MAME_DIR .. "src/mame/includes/cischeat.h",
16431929   MAME_DIR .. "src/mame/video/cischeat.cpp",
16441930   MAME_DIR .. "src/mame/drivers/citycon.cpp",
1931   MAME_DIR .. "src/mame/includes/citycon.h",
16451932   MAME_DIR .. "src/mame/video/citycon.cpp",
16461933   MAME_DIR .. "src/mame/drivers/ddayjlc.cpp",
16471934   MAME_DIR .. "src/mame/drivers/exerion.cpp",
1935   MAME_DIR .. "src/mame/includes/exerion.h",
16481936   MAME_DIR .. "src/mame/video/exerion.cpp",
16491937   MAME_DIR .. "src/mame/drivers/fcombat.cpp",
1938   MAME_DIR .. "src/mame/includes/fcombat.h",
16501939   MAME_DIR .. "src/mame/video/fcombat.cpp",
16511940   MAME_DIR .. "src/mame/drivers/ginganin.cpp",
1941   MAME_DIR .. "src/mame/includes/ginganin.h",
16521942   MAME_DIR .. "src/mame/video/ginganin.cpp",
16531943   MAME_DIR .. "src/mame/drivers/homerun.cpp",
1944   MAME_DIR .. "src/mame/includes/homerun.h",
16541945   MAME_DIR .. "src/mame/video/homerun.cpp",
16551946   MAME_DIR .. "src/mame/drivers/megasys1.cpp",
1947   MAME_DIR .. "src/mame/includes/megasys1.h",
16561948   MAME_DIR .. "src/mame/video/megasys1.cpp",
16571949   MAME_DIR .. "src/mame/drivers/momoko.cpp",
1950   MAME_DIR .. "src/mame/includes/momoko.h",
16581951   MAME_DIR .. "src/mame/video/momoko.cpp",
16591952   MAME_DIR .. "src/mame/drivers/ms32.cpp",
1953   MAME_DIR .. "src/mame/includes/ms32.h",
16601954   MAME_DIR .. "src/mame/video/ms32.cpp",
16611955   MAME_DIR .. "src/mame/drivers/psychic5.cpp",
1956   MAME_DIR .. "src/mame/includes/psychic5.h",
16621957   MAME_DIR .. "src/mame/video/psychic5.cpp",
16631958   MAME_DIR .. "src/mame/drivers/pturn.cpp",
16641959   MAME_DIR .. "src/mame/drivers/skyfox.cpp",
1960   MAME_DIR .. "src/mame/includes/skyfox.h",
16651961   MAME_DIR .. "src/mame/video/skyfox.cpp",
16661962   MAME_DIR .. "src/mame/drivers/tetrisp2.cpp",
1963   MAME_DIR .. "src/mame/includes/tetrisp2.h",
16671964   MAME_DIR .. "src/mame/video/tetrisp2.cpp",
16681965   MAME_DIR .. "src/mame/machine/jalcrpt.cpp",
1966   MAME_DIR .. "src/mame/machine/jalcrpt.h",
16691967   MAME_DIR .. "src/mame/video/jalblend.cpp",
1968   MAME_DIR .. "src/mame/video/jalblend.h",
16701969}
16711970
16721971createMAMEProjects(_target, _subtarget, "jpm")
16731972files {
16741973   MAME_DIR .. "src/mame/drivers/guab.cpp",
16751974   MAME_DIR .. "src/mame/drivers/jpmsys5.cpp",
1975   MAME_DIR .. "src/mame/includes/jpmsys5.h",
16761976   MAME_DIR .. "src/mame/drivers/jpmsys5sw.cpp",
16771977   MAME_DIR .. "src/mame/drivers/jpmmps.cpp",
16781978   MAME_DIR .. "src/mame/drivers/jpms80.cpp",
16791979   MAME_DIR .. "src/mame/drivers/jpmsru.cpp",
16801980   MAME_DIR .. "src/mame/drivers/jpmimpct.cpp",
1981   MAME_DIR .. "src/mame/includes/jpmimpct.h",
16811982   MAME_DIR .. "src/mame/video/jpmimpct.cpp",
16821983   MAME_DIR .. "src/mame/drivers/jpmimpctsw.cpp",
16831984   MAME_DIR .. "src/mame/drivers/pluto5.cpp",
16841985   MAME_DIR .. "src/mame/drivers/jpmsys7.cpp",
16851986   MAME_DIR .. "src/mame/video/awpvid.cpp",
1987   MAME_DIR .. "src/mame/video/awpvid.h",
16861988   MAME_DIR .. "src/mame/machine/meters.cpp",
1989   MAME_DIR .. "src/mame/machine/meters.h",
16871990}
16881991
16891992createMAMEProjects(_target, _subtarget, "kaneko")
16901993files {
16911994   MAME_DIR .. "src/mame/drivers/airbustr.cpp",
1995   MAME_DIR .. "src/mame/includes/airbustr.h",
16921996   MAME_DIR .. "src/mame/video/airbustr.cpp",
16931997   MAME_DIR .. "src/mame/drivers/djboy.cpp",
1998   MAME_DIR .. "src/mame/includes/djboy.h",
16941999   MAME_DIR .. "src/mame/video/djboy.cpp",
16952000   MAME_DIR .. "src/mame/drivers/expro02.cpp",
16962001   MAME_DIR .. "src/mame/drivers/galpanic.cpp",
2002   MAME_DIR .. "src/mame/includes/galpnipt.h",
2003   MAME_DIR .. "src/mame/includes/galpanic.h",
16972004   MAME_DIR .. "src/mame/video/galpanic.cpp",
16982005   MAME_DIR .. "src/mame/drivers/galpani2.cpp",
2006   MAME_DIR .. "src/mame/includes/galpani2.h",
16992007   MAME_DIR .. "src/mame/video/galpani2.cpp",
17002008   MAME_DIR .. "src/mame/drivers/galpani3.cpp",
17012009   MAME_DIR .. "src/mame/video/kaneko_grap2.cpp",
2010   MAME_DIR .. "src/mame/video/kaneko_grap2.h",
17022011   MAME_DIR .. "src/mame/drivers/hvyunit.cpp",
17032012   MAME_DIR .. "src/mame/drivers/jchan.cpp",
17042013   MAME_DIR .. "src/mame/drivers/kaneko16.cpp",
2014   MAME_DIR .. "src/mame/includes/kaneko16.h",
17052015   MAME_DIR .. "src/mame/video/kaneko16.cpp",
17062016   MAME_DIR .. "src/mame/video/kaneko_tmap.cpp",
2017   MAME_DIR .. "src/mame/video/kaneko_tmap.h",
17072018   MAME_DIR .. "src/mame/video/kaneko_spr.cpp",
2019   MAME_DIR .. "src/mame/video/kaneko_spr.h",
17082020   MAME_DIR .. "src/mame/machine/kaneko_hit.cpp",
2021   MAME_DIR .. "src/mame/machine/kaneko_hit.h",
17092022   MAME_DIR .. "src/mame/machine/kaneko_calc3.cpp",
2023   MAME_DIR .. "src/mame/machine/kaneko_calc3.h",
17102024   MAME_DIR .. "src/mame/machine/kaneko_toybox.cpp",
2025   MAME_DIR .. "src/mame/machine/kaneko_toybox.h",
17112026   MAME_DIR .. "src/mame/drivers/sandscrp.cpp",
17122027   MAME_DIR .. "src/mame/drivers/suprnova.cpp",
2028   MAME_DIR .. "src/mame/includes/suprnova.h",
17132029   MAME_DIR .. "src/mame/video/suprnova.cpp",
17142030   MAME_DIR .. "src/mame/video/sknsspr.cpp",
2031   MAME_DIR .. "src/mame/video/sknsspr.h",
17152032}
17162033
17172034createMAMEProjects(_target, _subtarget, "konami")
17182035files {
17192036   MAME_DIR .. "src/mame/drivers/88games.cpp",
2037   MAME_DIR .. "src/mame/includes/88games.h",
17202038   MAME_DIR .. "src/mame/video/88games.cpp",
17212039   MAME_DIR .. "src/mame/drivers/ajax.cpp",
2040   MAME_DIR .. "src/mame/includes/ajax.h",
17222041   MAME_DIR .. "src/mame/machine/ajax.cpp",
17232042   MAME_DIR .. "src/mame/video/ajax.cpp",
17242043   MAME_DIR .. "src/mame/drivers/aliens.cpp",
2044   MAME_DIR .. "src/mame/includes/aliens.h",
17252045   MAME_DIR .. "src/mame/video/aliens.cpp",
17262046   MAME_DIR .. "src/mame/drivers/asterix.cpp",
2047   MAME_DIR .. "src/mame/includes/asterix.h",
17272048   MAME_DIR .. "src/mame/video/asterix.cpp",
17282049   MAME_DIR .. "src/mame/drivers/battlnts.cpp",
2050   MAME_DIR .. "src/mame/includes/battlnts.h",
17292051   MAME_DIR .. "src/mame/video/battlnts.cpp",
17302052   MAME_DIR .. "src/mame/drivers/bishi.cpp",
2053   MAME_DIR .. "src/mame/includes/bishi.h",
17312054   MAME_DIR .. "src/mame/video/bishi.cpp",
17322055   MAME_DIR .. "src/mame/drivers/bladestl.cpp",
2056   MAME_DIR .. "src/mame/includes/bladestl.h",
17332057   MAME_DIR .. "src/mame/video/bladestl.cpp",
17342058   MAME_DIR .. "src/mame/drivers/blockhl.cpp",
17352059   MAME_DIR .. "src/mame/drivers/bottom9.cpp",
2060   MAME_DIR .. "src/mame/includes/bottom9.h",
17362061   MAME_DIR .. "src/mame/video/bottom9.cpp",
17372062   MAME_DIR .. "src/mame/drivers/chqflag.cpp",
2063   MAME_DIR .. "src/mame/includes/chqflag.h",
17382064   MAME_DIR .. "src/mame/video/chqflag.cpp",
17392065   MAME_DIR .. "src/mame/drivers/circusc.cpp",
2066   MAME_DIR .. "src/mame/includes/circusc.h",
17402067   MAME_DIR .. "src/mame/video/circusc.cpp",
17412068   MAME_DIR .. "src/mame/drivers/cobra.cpp",
17422069   MAME_DIR .. "src/mame/drivers/combatsc.cpp",
2070   MAME_DIR .. "src/mame/includes/combatsc.h",
17432071   MAME_DIR .. "src/mame/video/combatsc.cpp",
17442072   MAME_DIR .. "src/mame/drivers/contra.cpp",
2073   MAME_DIR .. "src/mame/includes/contra.h",
17452074   MAME_DIR .. "src/mame/video/contra.cpp",
17462075   MAME_DIR .. "src/mame/drivers/crimfght.cpp",
2076   MAME_DIR .. "src/mame/includes/crimfght.h",
17472077   MAME_DIR .. "src/mame/video/crimfght.cpp",
17482078   MAME_DIR .. "src/mame/drivers/dbz.cpp",
2079   MAME_DIR .. "src/mame/includes/dbz.h",
17492080   MAME_DIR .. "src/mame/video/dbz.cpp",
17502081   MAME_DIR .. "src/mame/drivers/ddribble.cpp",
2082   MAME_DIR .. "src/mame/includes/ddribble.h",
17512083   MAME_DIR .. "src/mame/video/ddribble.cpp",
17522084   MAME_DIR .. "src/mame/drivers/djmain.cpp",
2085   MAME_DIR .. "src/mame/includes/djmain.h",
17532086   MAME_DIR .. "src/mame/video/djmain.cpp",
17542087   MAME_DIR .. "src/mame/drivers/fastfred.cpp",
2088   MAME_DIR .. "src/mame/includes/fastfred.h",
17552089   MAME_DIR .. "src/mame/video/fastfred.cpp",
17562090   MAME_DIR .. "src/mame/drivers/fastlane.cpp",
2091   MAME_DIR .. "src/mame/includes/fastlane.h",
17572092   MAME_DIR .. "src/mame/video/fastlane.cpp",
17582093   MAME_DIR .. "src/mame/drivers/finalizr.cpp",
2094   MAME_DIR .. "src/mame/includes/finalizr.h",
17592095   MAME_DIR .. "src/mame/video/finalizr.cpp",
17602096   MAME_DIR .. "src/mame/drivers/firebeat.cpp",
17612097   MAME_DIR .. "src/mame/machine/midikbd.cpp",
2098   MAME_DIR .. "src/mame/machine/midikbd.h",
17622099   MAME_DIR .. "src/mame/drivers/flkatck.cpp",
2100   MAME_DIR .. "src/mame/includes/flkatck.h",
17632101   MAME_DIR .. "src/mame/video/flkatck.cpp",
17642102   MAME_DIR .. "src/mame/drivers/gberet.cpp",
2103   MAME_DIR .. "src/mame/includes/gberet.h",
17652104   MAME_DIR .. "src/mame/video/gberet.cpp",
17662105   MAME_DIR .. "src/mame/drivers/gijoe.cpp",
2106   MAME_DIR .. "src/mame/includes/gijoe.h",
17672107   MAME_DIR .. "src/mame/video/gijoe.cpp",
17682108   MAME_DIR .. "src/mame/drivers/gradius3.cpp",
2109   MAME_DIR .. "src/mame/includes/gradius3.h",
17692110   MAME_DIR .. "src/mame/video/gradius3.cpp",
17702111   MAME_DIR .. "src/mame/drivers/gticlub.cpp",
17712112   MAME_DIR .. "src/mame/drivers/gyruss.cpp",
2113   MAME_DIR .. "src/mame/includes/gyruss.h",
17722114   MAME_DIR .. "src/mame/video/gyruss.cpp",
17732115   MAME_DIR .. "src/mame/drivers/hcastle.cpp",
2116   MAME_DIR .. "src/mame/includes/hcastle.h",
17742117   MAME_DIR .. "src/mame/video/hcastle.cpp",
17752118   MAME_DIR .. "src/mame/drivers/hexion.cpp",
2119   MAME_DIR .. "src/mame/includes/hexion.h",
17762120   MAME_DIR .. "src/mame/video/hexion.cpp",
17772121   MAME_DIR .. "src/mame/drivers/hornet.cpp",
17782122   MAME_DIR .. "src/mame/machine/konppc.cpp",
2123   MAME_DIR .. "src/mame/machine/konppc.h",
17792124   MAME_DIR .. "src/mame/drivers/hyperspt.cpp",
2125   MAME_DIR .. "src/mame/includes/hyperspt.h",
17802126   MAME_DIR .. "src/mame/audio/hyprolyb.cpp",
2127   MAME_DIR .. "src/mame/audio/hyprolyb.h",
17812128   MAME_DIR .. "src/mame/video/hyperspt.cpp",
17822129   MAME_DIR .. "src/mame/drivers/ironhors.cpp",
2130   MAME_DIR .. "src/mame/includes/ironhors.h",
17832131   MAME_DIR .. "src/mame/video/ironhors.cpp",
17842132   MAME_DIR .. "src/mame/drivers/jackal.cpp",
2133   MAME_DIR .. "src/mame/includes/jackal.h",
17852134   MAME_DIR .. "src/mame/video/jackal.cpp",
17862135   MAME_DIR .. "src/mame/drivers/jailbrek.cpp",
2136   MAME_DIR .. "src/mame/includes/jailbrek.h",
17872137   MAME_DIR .. "src/mame/video/jailbrek.cpp",
17882138   MAME_DIR .. "src/mame/drivers/junofrst.cpp",
17892139   MAME_DIR .. "src/mame/drivers/konamigq.cpp",
17902140   MAME_DIR .. "src/mame/drivers/konamigv.cpp",
17912141   MAME_DIR .. "src/mame/drivers/konamigx.cpp",
2142   MAME_DIR .. "src/mame/includes/konamigx.h",
17922143   MAME_DIR .. "src/mame/machine/konamigx.cpp",
17932144   MAME_DIR .. "src/mame/video/konamigx.cpp",
17942145   MAME_DIR .. "src/mame/drivers/konamim2.cpp",
r250291r250292
17962147   MAME_DIR .. "src/mame/drivers/konendev.cpp",
17972148   MAME_DIR .. "src/mame/drivers/ksys573.cpp",
17982149   MAME_DIR .. "src/mame/machine/k573cass.cpp",
2150   MAME_DIR .. "src/mame/machine/k573cass.h",
17992151   MAME_DIR .. "src/mame/machine/k573dio.cpp",
2152   MAME_DIR .. "src/mame/machine/k573dio.h",
18002153   MAME_DIR .. "src/mame/machine/k573mcr.cpp",
2154   MAME_DIR .. "src/mame/machine/k573mcr.h",
18012155   MAME_DIR .. "src/mame/machine/k573msu.cpp",
2156   MAME_DIR .. "src/mame/machine/k573msu.h",
18022157   MAME_DIR .. "src/mame/machine/k573npu.cpp",
2158   MAME_DIR .. "src/mame/machine/k573npu.h",
18032159   MAME_DIR .. "src/mame/machine/zs01.cpp",
2160   MAME_DIR .. "src/mame/machine/zs01.h",
18042161   MAME_DIR .. "src/mame/drivers/labyrunr.cpp",
2162   MAME_DIR .. "src/mame/includes/labyrunr.h",
18052163   MAME_DIR .. "src/mame/video/labyrunr.cpp",
18062164   MAME_DIR .. "src/mame/drivers/lethal.cpp",
2165   MAME_DIR .. "src/mame/includes/lethal.h",
18072166   MAME_DIR .. "src/mame/video/lethal.cpp",
18082167   MAME_DIR .. "src/mame/drivers/mainevt.cpp",
2168   MAME_DIR .. "src/mame/includes/mainevt.h",
18092169   MAME_DIR .. "src/mame/video/mainevt.cpp",
18102170   MAME_DIR .. "src/mame/drivers/megazone.cpp",
2171   MAME_DIR .. "src/mame/includes/megazone.h",
18112172   MAME_DIR .. "src/mame/video/megazone.cpp",
18122173   MAME_DIR .. "src/mame/drivers/mikie.cpp",
2174   MAME_DIR .. "src/mame/includes/mikie.h",
18132175   MAME_DIR .. "src/mame/video/mikie.cpp",
18142176   MAME_DIR .. "src/mame/drivers/mogura.cpp",
18152177   MAME_DIR .. "src/mame/drivers/moo.cpp",
2178   MAME_DIR .. "src/mame/includes/moo.h",
18162179   MAME_DIR .. "src/mame/video/moo.cpp",
18172180   MAME_DIR .. "src/mame/drivers/mystwarr.cpp",
2181   MAME_DIR .. "src/mame/includes/mystwarr.h",
18182182   MAME_DIR .. "src/mame/video/mystwarr.cpp",
18192183   MAME_DIR .. "src/mame/drivers/nemesis.cpp",
2184   MAME_DIR .. "src/mame/includes/nemesis.h",
18202185   MAME_DIR .. "src/mame/video/nemesis.cpp",
18212186   MAME_DIR .. "src/mame/drivers/nwk-tr.cpp",
18222187   MAME_DIR .. "src/mame/drivers/overdriv.cpp",
2188   MAME_DIR .. "src/mame/includes/overdriv.h",
18232189   MAME_DIR .. "src/mame/video/overdriv.cpp",
18242190   MAME_DIR .. "src/mame/drivers/pandoras.cpp",
2191   MAME_DIR .. "src/mame/includes/pandoras.h",
18252192   MAME_DIR .. "src/mame/video/pandoras.cpp",
18262193   MAME_DIR .. "src/mame/drivers/parodius.cpp",
2194   MAME_DIR .. "src/mame/includes/parodius.h",
18272195   MAME_DIR .. "src/mame/video/parodius.cpp",
18282196   MAME_DIR .. "src/mame/drivers/pingpong.cpp",
2197   MAME_DIR .. "src/mame/includes/pingpong.h",
18292198   MAME_DIR .. "src/mame/video/pingpong.cpp",
18302199   MAME_DIR .. "src/mame/drivers/plygonet.cpp",
2200   MAME_DIR .. "src/mame/includes/plygonet.h",
18312201   MAME_DIR .. "src/mame/video/plygonet.cpp",
18322202   MAME_DIR .. "src/mame/drivers/pooyan.cpp",
2203   MAME_DIR .. "src/mame/includes/pooyan.h",
18332204   MAME_DIR .. "src/mame/video/pooyan.cpp",
18342205   MAME_DIR .. "src/mame/drivers/pyson.cpp",
18352206   MAME_DIR .. "src/mame/drivers/qdrmfgp.cpp",
2207   MAME_DIR .. "src/mame/includes/qdrmfgp.h",
18362208   MAME_DIR .. "src/mame/video/qdrmfgp.cpp",
18372209   MAME_DIR .. "src/mame/drivers/rockrage.cpp",
2210   MAME_DIR .. "src/mame/includes/rockrage.h",
18382211   MAME_DIR .. "src/mame/video/rockrage.cpp",
18392212   MAME_DIR .. "src/mame/drivers/rocnrope.cpp",
2213   MAME_DIR .. "src/mame/includes/rocnrope.h",
18402214   MAME_DIR .. "src/mame/video/rocnrope.cpp",
18412215   MAME_DIR .. "src/mame/drivers/rollerg.cpp",
2216   MAME_DIR .. "src/mame/includes/rollerg.h",
18422217   MAME_DIR .. "src/mame/video/rollerg.cpp",
18432218   MAME_DIR .. "src/mame/drivers/rungun.cpp",
2219   MAME_DIR .. "src/mame/includes/rungun.h",
18442220   MAME_DIR .. "src/mame/video/rungun.cpp",
18452221   MAME_DIR .. "src/mame/drivers/sbasketb.cpp",
2222   MAME_DIR .. "src/mame/includes/sbasketb.h",
18462223   MAME_DIR .. "src/mame/video/sbasketb.cpp",
18472224   MAME_DIR .. "src/mame/drivers/scobra.cpp",
18482225   MAME_DIR .. "src/mame/drivers/scotrsht.cpp",
2226   MAME_DIR .. "src/mame/includes/scotrsht.h",
18492227   MAME_DIR .. "src/mame/video/scotrsht.cpp",
18502228   MAME_DIR .. "src/mame/drivers/scramble.cpp",
2229   MAME_DIR .. "src/mame/includes/scramble.h",
18512230   MAME_DIR .. "src/mame/machine/scramble.cpp",
18522231   MAME_DIR .. "src/mame/audio/scramble.cpp",
18532232   MAME_DIR .. "src/mame/drivers/shaolins.cpp",
2233   MAME_DIR .. "src/mame/includes/shaolins.h",
18542234   MAME_DIR .. "src/mame/video/shaolins.cpp",
18552235   MAME_DIR .. "src/mame/drivers/simpsons.cpp",
2236   MAME_DIR .. "src/mame/includes/simpsons.h",
18562237   MAME_DIR .. "src/mame/machine/simpsons.cpp",
18572238   MAME_DIR .. "src/mame/video/simpsons.cpp",
18582239   MAME_DIR .. "src/mame/drivers/spy.cpp",
2240   MAME_DIR .. "src/mame/includes/spy.h",
18592241   MAME_DIR .. "src/mame/video/spy.cpp",
18602242   MAME_DIR .. "src/mame/drivers/surpratk.cpp",
2243   MAME_DIR .. "src/mame/includes/surpratk.h",
18612244   MAME_DIR .. "src/mame/video/surpratk.cpp",
18622245   MAME_DIR .. "src/mame/drivers/tasman.cpp",
18632246   MAME_DIR .. "src/mame/drivers/tgtpanic.cpp",
18642247   MAME_DIR .. "src/mame/drivers/thunderx.cpp",
2248   MAME_DIR .. "src/mame/includes/thunderx.h",
18652249   MAME_DIR .. "src/mame/video/thunderx.cpp",
18662250   MAME_DIR .. "src/mame/drivers/timeplt.cpp",
2251   MAME_DIR .. "src/mame/includes/timeplt.h",
18672252   MAME_DIR .. "src/mame/audio/timeplt.cpp",
2253   MAME_DIR .. "src/mame/audio/timeplt.h",
18682254   MAME_DIR .. "src/mame/video/timeplt.cpp",
18692255   MAME_DIR .. "src/mame/drivers/tmnt.cpp",
2256   MAME_DIR .. "src/mame/includes/tmnt.h",
18702257   MAME_DIR .. "src/mame/video/tmnt.cpp",
18712258   MAME_DIR .. "src/mame/drivers/tp84.cpp",
2259   MAME_DIR .. "src/mame/includes/tp84.h",
18722260   MAME_DIR .. "src/mame/video/tp84.cpp",
18732261   MAME_DIR .. "src/mame/drivers/trackfld.cpp",
2262   MAME_DIR .. "src/mame/includes/trackfld.h",
18742263   MAME_DIR .. "src/mame/machine/konami1.cpp",
2264   MAME_DIR .. "src/mame/machine/konami1.h",
18752265   MAME_DIR .. "src/mame/audio/trackfld.cpp",
2266   MAME_DIR .. "src/mame/audio/trackfld.h",
18762267   MAME_DIR .. "src/mame/video/trackfld.cpp",
18772268   MAME_DIR .. "src/mame/drivers/tutankhm.cpp",
2269   MAME_DIR .. "src/mame/includes/tutankhm.h",
18782270   MAME_DIR .. "src/mame/video/tutankhm.cpp",
18792271   MAME_DIR .. "src/mame/drivers/twin16.cpp",
2272   MAME_DIR .. "src/mame/includes/twin16.h",
18802273   MAME_DIR .. "src/mame/video/twin16.cpp",
18812274   MAME_DIR .. "src/mame/drivers/twinkle.cpp",
18822275   MAME_DIR .. "src/mame/drivers/ultrsprt.cpp",
18832276   MAME_DIR .. "src/mame/drivers/ultraman.cpp",
2277   MAME_DIR .. "src/mame/includes/ultraman.h",
18842278   MAME_DIR .. "src/mame/video/ultraman.cpp",
18852279   MAME_DIR .. "src/mame/drivers/vendetta.cpp",
2280   MAME_DIR .. "src/mame/includes/vendetta.h",
18862281   MAME_DIR .. "src/mame/video/vendetta.cpp",
18872282   MAME_DIR .. "src/mame/drivers/viper.cpp",
18882283   MAME_DIR .. "src/mame/drivers/wecleman.cpp",
2284   MAME_DIR .. "src/mame/includes/wecleman.h",
18892285   MAME_DIR .. "src/mame/video/wecleman.cpp",
18902286   MAME_DIR .. "src/mame/drivers/xexex.cpp",
2287   MAME_DIR .. "src/mame/includes/xexex.h",
18912288   MAME_DIR .. "src/mame/video/xexex.cpp",
18922289   MAME_DIR .. "src/mame/drivers/xmen.cpp",
2290   MAME_DIR .. "src/mame/includes/xmen.h",
18932291   MAME_DIR .. "src/mame/video/xmen.cpp",
18942292   MAME_DIR .. "src/mame/drivers/yiear.cpp",
2293   MAME_DIR .. "src/mame/includes/yiear.h",
18952294   MAME_DIR .. "src/mame/video/yiear.cpp",
18962295   MAME_DIR .. "src/mame/drivers/zr107.cpp",
2296   MAME_DIR .. "src/mame/includes/konamipt.h",
18972297   MAME_DIR .. "src/mame/video/konami_helper.cpp",
2298   MAME_DIR .. "src/mame/video/konami_helper.h",
18982299   MAME_DIR .. "src/mame/video/k007121.cpp",
2300   MAME_DIR .. "src/mame/video/k007121.h",
18992301   MAME_DIR .. "src/mame/video/k007342.cpp",
2302   MAME_DIR .. "src/mame/video/k007342.h",
19002303   MAME_DIR .. "src/mame/video/k007420.cpp",
2304   MAME_DIR .. "src/mame/video/k007420.h",
19012305   MAME_DIR .. "src/mame/video/k037122.cpp",
2306   MAME_DIR .. "src/mame/video/k037122.h",
19022307   MAME_DIR .. "src/mame/video/k051316.cpp",
2308   MAME_DIR .. "src/mame/video/k051316.h",
19032309   MAME_DIR .. "src/mame/video/k051733.cpp",
2310   MAME_DIR .. "src/mame/video/k051733.h",
19042311   MAME_DIR .. "src/mame/video/k051960.cpp",
2312   MAME_DIR .. "src/mame/video/k051960.h",
19052313   MAME_DIR .. "src/mame/video/k052109.cpp",
2314   MAME_DIR .. "src/mame/video/k052109.h",
19062315   MAME_DIR .. "src/mame/video/k053250.cpp",
2316   MAME_DIR .. "src/mame/video/k053250.h",
19072317   MAME_DIR .. "src/mame/video/k053251.cpp",
2318   MAME_DIR .. "src/mame/video/k053251.h",
19082319   MAME_DIR .. "src/mame/video/k054156_k054157_k056832.cpp",
2320   MAME_DIR .. "src/mame/video/k054156_k054157_k056832.h",
19092321   MAME_DIR .. "src/mame/video/k053244_k053245.cpp",
2322   MAME_DIR .. "src/mame/video/k053244_k053245.h",
19102323   MAME_DIR .. "src/mame/video/k053246_k053247_k055673.cpp",
2324   MAME_DIR .. "src/mame/video/k053246_k053247_k055673.h",
19112325   MAME_DIR .. "src/mame/video/k055555.cpp",
2326   MAME_DIR .. "src/mame/video/k055555.h",
19122327   MAME_DIR .. "src/mame/video/k054000.cpp",
2328   MAME_DIR .. "src/mame/video/k054000.h",
19132329   MAME_DIR .. "src/mame/video/k054338.cpp",
2330   MAME_DIR .. "src/mame/video/k054338.h",
19142331   MAME_DIR .. "src/mame/video/k053936.cpp",
2332   MAME_DIR .. "src/mame/video/k053936.h",
19152333   MAME_DIR .. "src/mame/video/k001006.cpp",
2334   MAME_DIR .. "src/mame/video/k001006.h",
19162335   MAME_DIR .. "src/mame/video/k001005.cpp",
2336   MAME_DIR .. "src/mame/video/k001005.h",
19172337   MAME_DIR .. "src/mame/video/k001604.cpp",
2338   MAME_DIR .. "src/mame/video/k001604.h",
19182339   MAME_DIR .. "src/mame/video/k057714.cpp",
2340   MAME_DIR .. "src/mame/video/k057714.h",
19192341}
19202342
19212343createMAMEProjects(_target, _subtarget, "matic")
r250291r250292
19262348createMAMEProjects(_target, _subtarget, "maygay")
19272349files {
19282350   MAME_DIR .. "src/mame/drivers/maygay1b.cpp",
2351   MAME_DIR .. "src/mame/includes/maygay1b.h",
19292352   MAME_DIR .. "src/mame/drivers/maygay1bsw.cpp",
19302353   MAME_DIR .. "src/mame/drivers/maygayv1.cpp",
19312354   MAME_DIR .. "src/mame/drivers/maygayep.cpp",
r250291r250292
19362359createMAMEProjects(_target, _subtarget, "meadows")
19372360files {
19382361   MAME_DIR .. "src/mame/drivers/lazercmd.cpp",
2362   MAME_DIR .. "src/mame/includes/lazercmd.h",
19392363   MAME_DIR .. "src/mame/video/lazercmd.cpp",
19402364   MAME_DIR .. "src/mame/drivers/meadwttl.cpp",
19412365   MAME_DIR .. "src/mame/drivers/meadows.cpp",
2366   MAME_DIR .. "src/mame/includes/meadows.h",
19422367   MAME_DIR .. "src/mame/audio/meadows.cpp",
19432368   MAME_DIR .. "src/mame/video/meadows.cpp",
19442369   MAME_DIR .. "src/mame/drivers/warpsped.cpp",
r250291r250292
19542379createMAMEProjects(_target, _subtarget, "metro")
19552380files {
19562381   MAME_DIR .. "src/mame/drivers/hyprduel.cpp",
2382   MAME_DIR .. "src/mame/includes/hyprduel.h",
19572383   MAME_DIR .. "src/mame/video/hyprduel.cpp",
19582384   MAME_DIR .. "src/mame/drivers/metro.cpp",
2385   MAME_DIR .. "src/mame/includes/metro.h",
19592386   MAME_DIR .. "src/mame/video/metro.cpp",
19602387   MAME_DIR .. "src/mame/drivers/rabbit.cpp",
19612388   MAME_DIR .. "src/mame/drivers/tmmjprd.cpp",
r250291r250292
19712398createMAMEProjects(_target, _subtarget, "midw8080")
19722399files {
19732400   MAME_DIR .. "src/mame/drivers/8080bw.cpp",
2401   MAME_DIR .. "src/mame/includes/8080bw.h",
19742402   MAME_DIR .. "src/mame/audio/8080bw.cpp",
19752403   MAME_DIR .. "src/mame/video/8080bw.cpp",
19762404   MAME_DIR .. "src/mame/drivers/m79amb.cpp",
2405   MAME_DIR .. "src/mame/includes/m79amb.h",
19772406   MAME_DIR .. "src/mame/audio/m79amb.cpp",
19782407   MAME_DIR .. "src/mame/drivers/mw8080bw.cpp",
2408   MAME_DIR .. "src/mame/includes/mw8080bw.h",
19792409   MAME_DIR .. "src/mame/machine/mw8080bw.cpp",
19802410   MAME_DIR .. "src/mame/audio/mw8080bw.cpp",
19812411   MAME_DIR .. "src/mame/video/mw8080bw.cpp",
r250291r250292
19852415createMAMEProjects(_target, _subtarget, "midway")
19862416files {
19872417   MAME_DIR .. "src/mame/drivers/astrocde.cpp",
2418   MAME_DIR .. "src/mame/includes/astrocde.h",
19882419   MAME_DIR .. "src/mame/video/astrocde.cpp",
19892420   MAME_DIR .. "src/mame/audio/gorf.cpp",
19902421   MAME_DIR .. "src/mame/audio/wow.cpp",
19912422   MAME_DIR .. "src/mame/drivers/atlantis.cpp",
19922423   MAME_DIR .. "src/mame/drivers/balsente.cpp",
2424   MAME_DIR .. "src/mame/includes/balsente.h",
19932425   MAME_DIR .. "src/mame/machine/balsente.cpp",
19942426   MAME_DIR .. "src/mame/video/balsente.cpp",
19952427   MAME_DIR .. "src/mame/drivers/gridlee.cpp",
2428   MAME_DIR .. "src/mame/includes/gridlee.h",
19962429   MAME_DIR .. "src/mame/audio/gridlee.cpp",
19972430   MAME_DIR .. "src/mame/video/gridlee.cpp",
19982431   MAME_DIR .. "src/mame/drivers/mcr.cpp",
2432   MAME_DIR .. "src/mame/includes/mcr.h",
19992433   MAME_DIR .. "src/mame/machine/mcr.cpp",
20002434   MAME_DIR .. "src/mame/video/mcr.cpp",
20012435   MAME_DIR .. "src/mame/drivers/mcr3.cpp",
2436   MAME_DIR .. "src/mame/includes/mcr3.h",
20022437   MAME_DIR .. "src/mame/video/mcr3.cpp",
20032438   MAME_DIR .. "src/mame/drivers/mcr68.cpp",
2439   MAME_DIR .. "src/mame/includes/mcr68.h",
20042440   MAME_DIR .. "src/mame/machine/mcr68.cpp",
20052441   MAME_DIR .. "src/mame/video/mcr68.cpp",
20062442   MAME_DIR .. "src/mame/drivers/midqslvr.cpp",
20072443   MAME_DIR .. "src/mame/drivers/midtunit.cpp",
2444   MAME_DIR .. "src/mame/includes/midtunit.h",
20082445   MAME_DIR .. "src/mame/machine/midtunit.cpp",
20092446   MAME_DIR .. "src/mame/video/midtunit.cpp",
20102447   MAME_DIR .. "src/mame/drivers/midvunit.cpp",
2448   MAME_DIR .. "src/mame/includes/midvunit.h",
20112449   MAME_DIR .. "src/mame/video/midvunit.cpp",
20122450   MAME_DIR .. "src/mame/drivers/midwunit.cpp",
2451   MAME_DIR .. "src/mame/includes/midwunit.h",
20132452   MAME_DIR .. "src/mame/machine/midwunit.cpp",
20142453   MAME_DIR .. "src/mame/drivers/midxunit.cpp",
2454   MAME_DIR .. "src/mame/includes/midxunit.h",
20152455   MAME_DIR .. "src/mame/machine/midxunit.cpp",
20162456   MAME_DIR .. "src/mame/drivers/midyunit.cpp",
2457   MAME_DIR .. "src/mame/includes/midyunit.h",
20172458   MAME_DIR .. "src/mame/machine/midyunit.cpp",
20182459   MAME_DIR .. "src/mame/video/midyunit.cpp",
20192460   MAME_DIR .. "src/mame/drivers/midzeus.cpp",
2461   MAME_DIR .. "src/mame/includes/midzeus.h",
20202462   MAME_DIR .. "src/mame/video/midzeus.cpp",
20212463   MAME_DIR .. "src/mame/video/midzeus2.cpp",
20222464   MAME_DIR .. "src/mame/drivers/mw18w.cpp",
r250291r250292
20252467   MAME_DIR .. "src/mame/drivers/pinball2k.cpp",
20262468   MAME_DIR .. "src/mame/drivers/seattle.cpp",
20272469   MAME_DIR .. "src/mame/drivers/sspeedr.cpp",
2470   MAME_DIR .. "src/mame/includes/sspeedr.h",
20282471   MAME_DIR .. "src/mame/video/sspeedr.cpp",
20292472   MAME_DIR .. "src/mame/drivers/tmaster.cpp",
20302473   MAME_DIR .. "src/mame/drivers/vegas.cpp",
20312474   MAME_DIR .. "src/mame/drivers/wmg.cpp",
20322475   MAME_DIR .. "src/mame/drivers/williams.cpp",
2476   MAME_DIR .. "src/mame/includes/williams.h",
20332477   MAME_DIR .. "src/mame/machine/williams.cpp",
20342478   MAME_DIR .. "src/mame/audio/williams.cpp",
2479   MAME_DIR .. "src/mame/audio/williams.h",
20352480   MAME_DIR .. "src/mame/video/williams.cpp",
20362481   MAME_DIR .. "src/mame/machine/midwayic.cpp",
2482   MAME_DIR .. "src/mame/machine/midwayic.h",
20372483   MAME_DIR .. "src/mame/audio/midway.cpp",
2484   MAME_DIR .. "src/mame/audio/midway.h",
20382485}
20392486
20402487createMAMEProjects(_target, _subtarget, "namco")
20412488files {
20422489   MAME_DIR .. "src/mame/drivers/20pacgal.cpp",
2490   MAME_DIR .. "src/mame/includes/20pacgal.h",
20432491   MAME_DIR .. "src/mame/video/20pacgal.cpp",
20442492   MAME_DIR .. "src/mame/drivers/30test.cpp",
20452493   MAME_DIR .. "src/mame/drivers/baraduke.cpp",
2494   MAME_DIR .. "src/mame/includes/baraduke.h",
20462495   MAME_DIR .. "src/mame/video/baraduke.cpp",
20472496   MAME_DIR .. "src/mame/drivers/cswat.cpp",
20482497   MAME_DIR .. "src/mame/drivers/dambustr.cpp",
20492498   MAME_DIR .. "src/mame/drivers/gal3.cpp",
20502499   MAME_DIR .. "src/mame/drivers/galaga.cpp",
2500   MAME_DIR .. "src/mame/includes/galaga.h",
20512501   MAME_DIR .. "src/mame/audio/galaga.cpp",
20522502   MAME_DIR .. "src/mame/video/galaga.cpp",
20532503   MAME_DIR .. "src/mame/video/bosco.cpp",
r250291r250292
20552505   MAME_DIR .. "src/mame/machine/xevious.cpp",
20562506   MAME_DIR .. "src/mame/video/xevious.cpp",
20572507   MAME_DIR .. "src/mame/drivers/galaxian.cpp",
2508   MAME_DIR .. "src/mame/includes/galaxian.h",
20582509   MAME_DIR .. "src/mame/audio/galaxian.cpp",
2510   MAME_DIR .. "src/mame/audio/galaxian.h",
20592511   MAME_DIR .. "src/mame/video/galaxian.cpp",
20602512   MAME_DIR .. "src/mame/drivers/galaxold.cpp",
2513   MAME_DIR .. "src/mame/includes/galaxold.h",
20612514   MAME_DIR .. "src/mame/machine/galaxold.cpp",
20622515   MAME_DIR .. "src/mame/video/galaxold.cpp",
20632516   MAME_DIR .. "src/mame/drivers/gaplus.cpp",
2517   MAME_DIR .. "src/mame/includes/gaplus.h",
20642518   MAME_DIR .. "src/mame/machine/gaplus.cpp",
20652519   MAME_DIR .. "src/mame/video/gaplus.cpp",
20662520   MAME_DIR .. "src/mame/drivers/kungfur.cpp",
20672521   MAME_DIR .. "src/mame/drivers/mappy.cpp",
2522   MAME_DIR .. "src/mame/includes/mappy.h",
20682523   MAME_DIR .. "src/mame/video/mappy.cpp",
20692524   MAME_DIR .. "src/mame/drivers/namcofl.cpp",
2525   MAME_DIR .. "src/mame/includes/namcofl.h",
20702526   MAME_DIR .. "src/mame/video/namcofl.cpp",
20712527   MAME_DIR .. "src/mame/drivers/namcoic.cpp",
2528   MAME_DIR .. "src/mame/includes/namcoic.h",
20722529   MAME_DIR .. "src/mame/drivers/namcona1.cpp",
2530   MAME_DIR .. "src/mame/includes/namcona1.h",
20732531   MAME_DIR .. "src/mame/video/namcona1.cpp",
20742532   MAME_DIR .. "src/mame/drivers/namconb1.cpp",
2533   MAME_DIR .. "src/mame/includes/namconb1.h",
20752534   MAME_DIR .. "src/mame/video/namconb1.cpp",
20762535   MAME_DIR .. "src/mame/drivers/namcond1.cpp",
2536   MAME_DIR .. "src/mame/includes/namcond1.h",
20772537   MAME_DIR .. "src/mame/machine/namcond1.cpp",
20782538   MAME_DIR .. "src/mame/video/ygv608.cpp",
2539   MAME_DIR .. "src/mame/video/ygv608.h",
20792540   MAME_DIR .. "src/mame/drivers/namcops2.cpp",
20802541   MAME_DIR .. "src/mame/drivers/namcos1.cpp",
2542   MAME_DIR .. "src/mame/includes/namcos1.h",
20812543   MAME_DIR .. "src/mame/machine/namcos1.cpp",
20822544   MAME_DIR .. "src/mame/video/namcos1.cpp",
20832545   MAME_DIR .. "src/mame/drivers/namcos10.cpp",
20842546   MAME_DIR .. "src/mame/machine/ns10crypt.cpp",
2547   MAME_DIR .. "src/mame/machine/ns10crypt.h",
20852548   MAME_DIR .. "src/mame/drivers/namcos11.cpp",
20862549   MAME_DIR .. "src/mame/machine/ns11prot.cpp",
2550   MAME_DIR .. "src/mame/machine/ns11prot.h",
20872551   MAME_DIR .. "src/mame/drivers/namcos12.cpp",
20882552   MAME_DIR .. "src/mame/machine/namco_settings.cpp",
2553   MAME_DIR .. "src/mame/machine/namco_settings.h",
20892554   MAME_DIR .. "src/mame/drivers/namcos2.cpp",
2555   MAME_DIR .. "src/mame/includes/namcos2.h",
20902556   MAME_DIR .. "src/mame/machine/namcos2.cpp",
20912557   MAME_DIR .. "src/mame/video/namcos2.cpp",
20922558   MAME_DIR .. "src/mame/drivers/namcos21.cpp",
2559   MAME_DIR .. "src/mame/includes/namcos21.h",
20932560   MAME_DIR .. "src/mame/video/namcos21.cpp",
20942561   MAME_DIR .. "src/mame/drivers/namcos22.cpp",
2562   MAME_DIR .. "src/mame/includes/namcos22.h",
20952563   MAME_DIR .. "src/mame/video/namcos22.cpp",
20962564   MAME_DIR .. "src/mame/drivers/namcos23.cpp",
20972565   MAME_DIR .. "src/mame/drivers/namcos86.cpp",
2566   MAME_DIR .. "src/mame/includes/namcos86.h",
20982567   MAME_DIR .. "src/mame/video/namcos86.cpp",
20992568   MAME_DIR .. "src/mame/drivers/pacland.cpp",
2569   MAME_DIR .. "src/mame/includes/pacland.h",
21002570   MAME_DIR .. "src/mame/video/pacland.cpp",
21012571   MAME_DIR .. "src/mame/drivers/polepos.cpp",
2572   MAME_DIR .. "src/mame/includes/polepos.h",
21022573   MAME_DIR .. "src/mame/audio/polepos.cpp",
21032574   MAME_DIR .. "src/mame/video/polepos.cpp",
21042575   MAME_DIR .. "src/mame/drivers/rallyx.cpp",
2576   MAME_DIR .. "src/mame/includes/rallyx.h",
21052577   MAME_DIR .. "src/mame/video/rallyx.cpp",
21062578   MAME_DIR .. "src/mame/drivers/skykid.cpp",
2579   MAME_DIR .. "src/mame/includes/skykid.h",
21072580   MAME_DIR .. "src/mame/video/skykid.cpp",
21082581   MAME_DIR .. "src/mame/drivers/tankbatt.cpp",
2582   MAME_DIR .. "src/mame/includes/tankbatt.h",
21092583   MAME_DIR .. "src/mame/video/tankbatt.cpp",
21102584   MAME_DIR .. "src/mame/drivers/tceptor.cpp",
2585   MAME_DIR .. "src/mame/includes/tceptor.h",
21112586   MAME_DIR .. "src/mame/video/tceptor.cpp",
21122587   MAME_DIR .. "src/mame/drivers/toypop.cpp",
2588   MAME_DIR .. "src/mame/includes/toypop.h",
21132589   MAME_DIR .. "src/mame/video/toypop.cpp",
21142590   MAME_DIR .. "src/mame/drivers/turrett.cpp",
2591   MAME_DIR .. "src/mame/includes/turrett.h",
21152592   MAME_DIR .. "src/mame/audio/turrett.cpp",
21162593   MAME_DIR .. "src/mame/video/turrett.cpp",
21172594   MAME_DIR .. "src/mame/drivers/warpwarp.cpp",
2595   MAME_DIR .. "src/mame/includes/warpwarp.h",
21182596   MAME_DIR .. "src/mame/audio/geebee.cpp",
21192597   MAME_DIR .. "src/mame/audio/warpwarp.cpp",
2598   MAME_DIR .. "src/mame/audio/warpwarp.h",
21202599   MAME_DIR .. "src/mame/video/warpwarp.cpp",
21212600   MAME_DIR .. "src/mame/machine/c117.cpp",
2601   MAME_DIR .. "src/mame/machine/c117.h",
21222602   MAME_DIR .. "src/mame/machine/namcoio.cpp",
2603   MAME_DIR .. "src/mame/machine/namcoio.h",
21232604   MAME_DIR .. "src/mame/machine/namco06.cpp",
2605   MAME_DIR .. "src/mame/machine/namco06.h",
21242606   MAME_DIR .. "src/mame/machine/namco50.cpp",
2607   MAME_DIR .. "src/mame/machine/namco50.h",
21252608   MAME_DIR .. "src/mame/machine/namco51.cpp",
2609   MAME_DIR .. "src/mame/machine/namco51.h",
21262610   MAME_DIR .. "src/mame/machine/namco53.cpp",
2611   MAME_DIR .. "src/mame/machine/namco53.h",
21272612   MAME_DIR .. "src/mame/machine/namco62.cpp",
2613   MAME_DIR .. "src/mame/machine/namco62.h",
21282614   MAME_DIR .. "src/mame/machine/namcomcu.cpp",
2615   MAME_DIR .. "src/mame/machine/namcomcu.h",
21292616   MAME_DIR .. "src/mame/audio/namco52.cpp",
2617   MAME_DIR .. "src/mame/audio/namco52.h",
21302618   MAME_DIR .. "src/mame/audio/namco54.cpp",
2619   MAME_DIR .. "src/mame/audio/namco54.h",
21312620   MAME_DIR .. "src/mame/video/c116.cpp",
2621   MAME_DIR .. "src/mame/video/c116.h",
21322622   MAME_DIR .. "src/mame/video/c45.cpp",
2623   MAME_DIR .. "src/mame/video/c45.h",
21332624}
21342625
21352626createMAMEProjects(_target, _subtarget, "nasco")
21362627files {
21372628   MAME_DIR .. "src/mame/drivers/crgolf.cpp",
2629   MAME_DIR .. "src/mame/includes/crgolf.h",
21382630   MAME_DIR .. "src/mame/video/crgolf.cpp",
21392631   MAME_DIR .. "src/mame/drivers/suprgolf.cpp",
21402632}
r250291r250292
21422634createMAMEProjects(_target, _subtarget, "neogeo")
21432635files {
21442636   MAME_DIR .. "src/mame/drivers/neogeo.cpp",
2637   MAME_DIR .. "src/mame/includes/neogeo.h",
21452638   MAME_DIR .. "src/mame/video/neogeo.cpp",
21462639   MAME_DIR .. "src/mame/drivers/neogeo_noslot.cpp",
21472640   MAME_DIR .. "src/mame/video/neogeo_spr.cpp",
2641   MAME_DIR .. "src/mame/video/neogeo_spr.h",
21482642   MAME_DIR .. "src/mame/machine/neocrypt.cpp",
21492643   MAME_DIR .. "src/mame/machine/ng_memcard.cpp",
2644   MAME_DIR .. "src/mame/machine/ng_memcard.h",
21502645}
21512646
21522647createMAMEProjects(_target, _subtarget, "nichibut")
21532648files {
21542649   MAME_DIR .. "src/mame/drivers/armedf.cpp",
2650   MAME_DIR .. "src/mame/includes/armedf.h",
21552651   MAME_DIR .. "src/mame/video/armedf.cpp",
21562652   MAME_DIR .. "src/mame/drivers/cclimber.cpp",
2653   MAME_DIR .. "src/mame/includes/cclimber.h",
21572654   MAME_DIR .. "src/mame/machine/cclimber.cpp",
21582655   MAME_DIR .. "src/mame/audio/cclimber.cpp",
2656   MAME_DIR .. "src/mame/audio/cclimber.h",
21592657   MAME_DIR .. "src/mame/video/cclimber.cpp",
21602658   MAME_DIR .. "src/mame/drivers/clshroad.cpp",
2659   MAME_DIR .. "src/mame/includes/clshroad.h",
21612660   MAME_DIR .. "src/mame/video/clshroad.cpp",
21622661   MAME_DIR .. "src/mame/drivers/csplayh5.cpp",
21632662   MAME_DIR .. "src/mame/drivers/cop01.cpp",
2663   MAME_DIR .. "src/mame/includes/cop01.h",
21642664   MAME_DIR .. "src/mame/video/cop01.cpp",
21652665   MAME_DIR .. "src/mame/drivers/dacholer.cpp",
21662666   MAME_DIR .. "src/mame/drivers/galivan.cpp",
2667   MAME_DIR .. "src/mame/includes/galivan.h",
21672668   MAME_DIR .. "src/mame/video/galivan.cpp",
21682669   MAME_DIR .. "src/mame/drivers/gomoku.cpp",
2670   MAME_DIR .. "src/mame/includes/gomoku.h",
21692671   MAME_DIR .. "src/mame/audio/gomoku.cpp",
21702672   MAME_DIR .. "src/mame/video/gomoku.cpp",
21712673   MAME_DIR .. "src/mame/drivers/hyhoo.cpp",
2674   MAME_DIR .. "src/mame/includes/hyhoo.h",
21722675   MAME_DIR .. "src/mame/video/hyhoo.cpp",
21732676   MAME_DIR .. "src/mame/drivers/jangou.cpp",
21742677   MAME_DIR .. "src/mame/drivers/magmax.cpp",
2678   MAME_DIR .. "src/mame/includes/magmax.h",
21752679   MAME_DIR .. "src/mame/video/magmax.cpp",
21762680   MAME_DIR .. "src/mame/drivers/nbmj8688.cpp",
2681   MAME_DIR .. "src/mame/includes/nbmj8688.h",
21772682   MAME_DIR .. "src/mame/video/nbmj8688.cpp",
21782683   MAME_DIR .. "src/mame/drivers/nbmj8891.cpp",
2684   MAME_DIR .. "src/mame/includes/nbmj8891.h",
21792685   MAME_DIR .. "src/mame/video/nbmj8891.cpp",
21802686   MAME_DIR .. "src/mame/drivers/nbmj8900.cpp",
2687   MAME_DIR .. "src/mame/includes/nbmj8900.h",
21812688   MAME_DIR .. "src/mame/video/nbmj8900.cpp",
21822689   MAME_DIR .. "src/mame/drivers/nbmj8991.cpp",
2690   MAME_DIR .. "src/mame/includes/nbmj8991.h",
21832691   MAME_DIR .. "src/mame/video/nbmj8991.cpp",
21842692   MAME_DIR .. "src/mame/drivers/nbmj9195.cpp",
2693   MAME_DIR .. "src/mame/includes/nbmj9195.h",
21852694   MAME_DIR .. "src/mame/video/nbmj9195.cpp",
21862695   MAME_DIR .. "src/mame/drivers/nightgal.cpp",
21872696   MAME_DIR .. "src/mame/drivers/niyanpai.cpp",
2697   MAME_DIR .. "src/mame/includes/niyanpai.h",
21882698   MAME_DIR .. "src/mame/video/niyanpai.cpp",
21892699   MAME_DIR .. "src/mame/drivers/pastelg.cpp",
2700   MAME_DIR .. "src/mame/includes/pastelg.h",
21902701   MAME_DIR .. "src/mame/video/pastelg.cpp",
21912702   MAME_DIR .. "src/mame/drivers/seicross.cpp",
2703   MAME_DIR .. "src/mame/includes/seicross.h",
21922704   MAME_DIR .. "src/mame/video/seicross.cpp",
21932705   MAME_DIR .. "src/mame/drivers/terracre.cpp",
2706   MAME_DIR .. "src/mame/includes/terracre.h",
21942707   MAME_DIR .. "src/mame/video/terracre.cpp",
21952708   MAME_DIR .. "src/mame/drivers/tubep.cpp",
2709   MAME_DIR .. "src/mame/includes/tubep.h",
21962710   MAME_DIR .. "src/mame/video/tubep.cpp",
21972711   MAME_DIR .. "src/mame/drivers/wiping.cpp",
2712   MAME_DIR .. "src/mame/includes/wiping.h",
21982713   MAME_DIR .. "src/mame/audio/wiping.cpp",
2714   MAME_DIR .. "src/mame/audio/wiping.h",
21992715   MAME_DIR .. "src/mame/video/wiping.cpp",
22002716   MAME_DIR .. "src/mame/machine/nb1413m3.cpp",
2717   MAME_DIR .. "src/mame/includes/nb1413m3.h",
22012718   MAME_DIR .. "src/mame/machine/nb1414m4.cpp",
2719   MAME_DIR .. "src/mame/includes/nb1414m4.h",
22022720}
22032721
22042722createMAMEProjects(_target, _subtarget, "nintendo")
22052723files {
22062724   MAME_DIR .. "src/mame/drivers/cham24.cpp",
22072725   MAME_DIR .. "src/mame/drivers/dkong.cpp",
2726   MAME_DIR .. "src/mame/includes/dkong.h",
22082727   MAME_DIR .. "src/mame/audio/dkong.cpp",
22092728   MAME_DIR .. "src/mame/video/dkong.cpp",
22102729   MAME_DIR .. "src/mame/drivers/mario.cpp",
2730   MAME_DIR .. "src/mame/includes/mario.h",
22112731   MAME_DIR .. "src/mame/audio/mario.cpp",
22122732   MAME_DIR .. "src/mame/video/mario.cpp",
22132733   MAME_DIR .. "src/mame/drivers/mmagic.cpp",
22142734   MAME_DIR .. "src/mame/drivers/multigam.cpp",
22152735   MAME_DIR .. "src/mame/drivers/n8080.cpp",
2736   MAME_DIR .. "src/mame/includes/n8080.h",
22162737   MAME_DIR .. "src/mame/audio/n8080.cpp",
22172738   MAME_DIR .. "src/mame/video/n8080.cpp",
22182739   MAME_DIR .. "src/mame/drivers/nss.cpp",
22192740   MAME_DIR .. "src/mame/machine/snes.cpp",
22202741   MAME_DIR .. "src/mame/audio/snes_snd.cpp",
2742   MAME_DIR .. "src/mame/audio/snes_snd.h",
22212743   MAME_DIR .. "src/mame/drivers/playch10.cpp",
2744   MAME_DIR .. "src/mame/includes/playch10.h",
22222745   MAME_DIR .. "src/mame/machine/playch10.cpp",
22232746   MAME_DIR .. "src/mame/video/playch10.cpp",
22242747   MAME_DIR .. "src/mame/drivers/popeye.cpp",
2748   MAME_DIR .. "src/mame/includes/popeye.h",
22252749   MAME_DIR .. "src/mame/video/popeye.cpp",
22262750   MAME_DIR .. "src/mame/drivers/punchout.cpp",
2751   MAME_DIR .. "src/mame/includes/punchout.h",
22272752   MAME_DIR .. "src/mame/video/punchout.cpp",
22282753   MAME_DIR .. "src/mame/drivers/famibox.cpp",
22292754   MAME_DIR .. "src/mame/drivers/sfcbox.cpp",
22302755   MAME_DIR .. "src/mame/drivers/snesb.cpp",
22312756   MAME_DIR .. "src/mame/drivers/spacefb.cpp",
2757   MAME_DIR .. "src/mame/includes/spacefb.h",
22322758   MAME_DIR .. "src/mame/audio/spacefb.cpp",
22332759   MAME_DIR .. "src/mame/video/spacefb.cpp",
22342760   MAME_DIR .. "src/mame/drivers/vsnes.cpp",
2761   MAME_DIR .. "src/mame/includes/vsnes.h",
22352762   MAME_DIR .. "src/mame/machine/vsnes.cpp",
22362763   MAME_DIR .. "src/mame/video/vsnes.cpp",
22372764   MAME_DIR .. "src/mame/video/ppu2c0x.cpp",
2765   MAME_DIR .. "src/mame/video/ppu2c0x.h",
22382766
22392767
22402768}
r250291r250292
22422770createMAMEProjects(_target, _subtarget, "nix")
22432771files {
22442772   MAME_DIR .. "src/mame/drivers/fitfight.cpp",
2773   MAME_DIR .. "src/mame/includes/fitfight.h",
22452774   MAME_DIR .. "src/mame/video/fitfight.cpp",
22462775   MAME_DIR .. "src/mame/drivers/pirates.cpp",
2776   MAME_DIR .. "src/mame/includes/pirates.h",
22472777   MAME_DIR .. "src/mame/video/pirates.cpp",
22482778}
22492779
r250291r250292
22542784   MAME_DIR .. "src/mame/drivers/ddealer.cpp",
22552785   MAME_DIR .. "src/mame/drivers/jalmah.cpp",
22562786   MAME_DIR .. "src/mame/drivers/macrossp.cpp",
2787   MAME_DIR .. "src/mame/includes/macrossp.h",
22572788   MAME_DIR .. "src/mame/video/macrossp.cpp",
22582789   MAME_DIR .. "src/mame/drivers/nmk16.cpp",
2790   MAME_DIR .. "src/mame/includes/nmk16.h",
22592791   MAME_DIR .. "src/mame/machine/nmk004.cpp",
2792   MAME_DIR .. "src/mame/machine/nmk004.h",
22602793   MAME_DIR .. "src/mame/video/nmk16.cpp",
22612794   MAME_DIR .. "src/mame/drivers/quizdna.cpp",
2795   MAME_DIR .. "src/mame/includes/quizdna.h",
22622796   MAME_DIR .. "src/mame/video/quizdna.cpp",
22632797   MAME_DIR .. "src/mame/drivers/quizpani.cpp",
2798   MAME_DIR .. "src/mame/includes/quizpani.h",
22642799   MAME_DIR .. "src/mame/video/quizpani.cpp",
22652800}
22662801
22672802createMAMEProjects(_target, _subtarget, "olympia")
22682803files {
22692804   MAME_DIR .. "src/mame/drivers/dday.cpp",
2805   MAME_DIR .. "src/mame/includes/dday.h",
22702806   MAME_DIR .. "src/mame/video/dday.cpp",
22712807   MAME_DIR .. "src/mame/drivers/lbeach.cpp",
22722808   MAME_DIR .. "src/mame/drivers/monzagp.cpp",
22732809   MAME_DIR .. "src/mame/drivers/portrait.cpp",
2810   MAME_DIR .. "src/mame/includes/portrait.h",
22742811   MAME_DIR .. "src/mame/video/portrait.cpp",
22752812   MAME_DIR .. "src/mame/drivers/vega.cpp",
22762813}
r250291r250292
22782815createMAMEProjects(_target, _subtarget, "omori")
22792816files {
22802817   MAME_DIR .. "src/mame/drivers/battlex.cpp",
2818   MAME_DIR .. "src/mame/includes/battlex.h",
22812819   MAME_DIR .. "src/mame/video/battlex.cpp",
22822820   MAME_DIR .. "src/mame/drivers/carjmbre.cpp",
2821   MAME_DIR .. "src/mame/includes/carjmbre.h",
22832822   MAME_DIR .. "src/mame/video/carjmbre.cpp",
22842823   MAME_DIR .. "src/mame/drivers/popper.cpp",
2824   MAME_DIR .. "src/mame/includes/popper.h",
22852825   MAME_DIR .. "src/mame/video/popper.cpp",
22862826   MAME_DIR .. "src/mame/drivers/spaceg.cpp",
22872827}
r250291r250292
22892829createMAMEProjects(_target, _subtarget, "orca")
22902830files {
22912831   MAME_DIR .. "src/mame/drivers/espial.cpp",
2832   MAME_DIR .. "src/mame/includes/espial.h",
22922833   MAME_DIR .. "src/mame/video/espial.cpp",
22932834   MAME_DIR .. "src/mame/drivers/funkybee.cpp",
2835   MAME_DIR .. "src/mame/includes/funkybee.h",
22942836   MAME_DIR .. "src/mame/video/funkybee.cpp",
22952837   MAME_DIR .. "src/mame/drivers/marineb.cpp",
2838   MAME_DIR .. "src/mame/includes/marineb.h",
22962839   MAME_DIR .. "src/mame/video/marineb.cpp",
22972840   MAME_DIR .. "src/mame/drivers/vastar.cpp",
2841   MAME_DIR .. "src/mame/includes/vastar.h",
22982842   MAME_DIR .. "src/mame/video/vastar.cpp",
22992843   MAME_DIR .. "src/mame/drivers/zodiack.cpp",
2844   MAME_DIR .. "src/mame/includes/zodiack.h",
23002845   MAME_DIR .. "src/mame/video/zodiack.cpp",
23012846}
23022847
23032848createMAMEProjects(_target, _subtarget, "pacific")
23042849files {
23052850   MAME_DIR .. "src/mame/drivers/mrflea.cpp",
2851   MAME_DIR .. "src/mame/includes/mrflea.h",
23062852   MAME_DIR .. "src/mame/video/mrflea.cpp",
23072853   MAME_DIR .. "src/mame/drivers/thief.cpp",
2854   MAME_DIR .. "src/mame/includes/thief.h",
23082855   MAME_DIR .. "src/mame/video/thief.cpp",
23092856}
23102857
r250291r250292
23122859files {
23132860   MAME_DIR .. "src/mame/drivers/jrpacman.cpp",
23142861   MAME_DIR .. "src/mame/drivers/pacman.cpp",
2862   MAME_DIR .. "src/mame/includes/pacman.h",
23152863   MAME_DIR .. "src/mame/video/pacman.cpp",
23162864   MAME_DIR .. "src/mame/machine/acitya.cpp",
23172865   MAME_DIR .. "src/mame/machine/jumpshot.cpp",
r250291r250292
23272875   MAME_DIR .. "src/mame/drivers/tourvis.cpp",
23282876   MAME_DIR .. "src/mame/drivers/uapce.cpp",
23292877   MAME_DIR .. "src/mame/machine/pcecommn.cpp",
2878   MAME_DIR .. "src/mame/machine/pcecommn.h",
23302879}
23312880
23322881createMAMEProjects(_target, _subtarget, "phoenix")
23332882files {
23342883   MAME_DIR .. "src/mame/drivers/naughtyb.cpp",
2884   MAME_DIR .. "src/mame/includes/naughtyb.h",
23352885   MAME_DIR .. "src/mame/video/naughtyb.cpp",
23362886   MAME_DIR .. "src/mame/drivers/phoenix.cpp",
2887   MAME_DIR .. "src/mame/includes/phoenix.h",
23372888   MAME_DIR .. "src/mame/audio/phoenix.cpp",
23382889   MAME_DIR .. "src/mame/video/phoenix.cpp",
23392890   MAME_DIR .. "src/mame/drivers/safarir.cpp",
23402891   MAME_DIR .. "src/mame/audio/pleiads.cpp",
2892   MAME_DIR .. "src/mame/audio/pleiads.h",
23412893}
23422894
23432895createMAMEProjects(_target, _subtarget, "playmark")
23442896files {
23452897   MAME_DIR .. "src/mame/drivers/drtomy.cpp",
23462898   MAME_DIR .. "src/mame/drivers/playmark.cpp",
2899   MAME_DIR .. "src/mame/includes/playmark.h",
23472900   MAME_DIR .. "src/mame/video/playmark.cpp",
23482901   MAME_DIR .. "src/mame/drivers/powerbal.cpp",
23492902   MAME_DIR .. "src/mame/drivers/sderby.cpp",
2903   MAME_DIR .. "src/mame/includes/sderby.h",
23502904   MAME_DIR .. "src/mame/video/sderby.cpp",
23512905   MAME_DIR .. "src/mame/drivers/sslam.cpp",
2906   MAME_DIR .. "src/mame/includes/sslam.h",
23522907   MAME_DIR .. "src/mame/video/sslam.cpp",
23532908}
23542909
23552910createMAMEProjects(_target, _subtarget, "psikyo")
23562911files {
23572912   MAME_DIR .. "src/mame/drivers/psikyo.cpp",
2913   MAME_DIR .. "src/mame/includes/psikyo.h",
23582914   MAME_DIR .. "src/mame/video/psikyo.cpp",
23592915   MAME_DIR .. "src/mame/drivers/psikyo4.cpp",
2916   MAME_DIR .. "src/mame/includes/psikyo4.h",
23602917   MAME_DIR .. "src/mame/video/psikyo4.cpp",
23612918   MAME_DIR .. "src/mame/drivers/psikyosh.cpp",
2919   MAME_DIR .. "src/mame/includes/psikyosh.h",
23622920   MAME_DIR .. "src/mame/video/psikyosh.cpp",
23632921}
23642922
23652923createMAMEProjects(_target, _subtarget, "ramtek")
23662924files {
23672925   MAME_DIR .. "src/mame/drivers/hitme.cpp",
2926   MAME_DIR .. "src/mame/includes/hitme.h",
23682927   MAME_DIR .. "src/mame/audio/hitme.cpp",
23692928   MAME_DIR .. "src/mame/drivers/ramtek.cpp",
23702929   MAME_DIR .. "src/mame/drivers/starcrus.cpp",
2930   MAME_DIR .. "src/mame/includes/starcrus.h",
23712931   MAME_DIR .. "src/mame/video/starcrus.cpp",
23722932}
23732933
23742934createMAMEProjects(_target, _subtarget, "rare")
23752935files {
23762936   MAME_DIR .. "src/mame/drivers/btoads.cpp",
2937   MAME_DIR .. "src/mame/includes/btoads.h",
23772938   MAME_DIR .. "src/mame/video/btoads.cpp",
23782939   MAME_DIR .. "src/mame/drivers/kinst.cpp",
23792940   MAME_DIR .. "src/mame/drivers/xtheball.cpp",
r250291r250292
23822943createMAMEProjects(_target, _subtarget, "sanritsu")
23832944files {
23842945   MAME_DIR .. "src/mame/drivers/appoooh.cpp",
2946   MAME_DIR .. "src/mame/includes/appoooh.h",
23852947   MAME_DIR .. "src/mame/video/appoooh.cpp",
23862948   MAME_DIR .. "src/mame/drivers/bankp.cpp",
2949   MAME_DIR .. "src/mame/includes/bankp.h",
23872950   MAME_DIR .. "src/mame/video/bankp.cpp",
23882951   MAME_DIR .. "src/mame/drivers/chinsan.cpp",
23892952   MAME_DIR .. "src/mame/drivers/drmicro.cpp",
2953   MAME_DIR .. "src/mame/includes/drmicro.h",
23902954   MAME_DIR .. "src/mame/video/drmicro.cpp",
23912955   MAME_DIR .. "src/mame/drivers/jantotsu.cpp",
23922956   MAME_DIR .. "src/mame/drivers/mayumi.cpp",
23932957   MAME_DIR .. "src/mame/drivers/mermaid.cpp",
2958   MAME_DIR .. "src/mame/includes/mermaid.h",
23942959   MAME_DIR .. "src/mame/video/mermaid.cpp",
23952960   MAME_DIR .. "src/mame/drivers/mjkjidai.cpp",
2961   MAME_DIR .. "src/mame/includes/mjkjidai.h",
23962962   MAME_DIR .. "src/mame/video/mjkjidai.cpp",
23972963}
23982964
23992965createMAMEProjects(_target, _subtarget, "sega")
24002966files {
24012967   MAME_DIR .. "src/mame/drivers/angelkds.cpp",
2968   MAME_DIR .. "src/mame/includes/angelkds.h",
24022969   MAME_DIR .. "src/mame/video/angelkds.cpp",
24032970   MAME_DIR .. "src/mame/drivers/bingoc.cpp",
24042971   MAME_DIR .. "src/mame/drivers/blockade.cpp",
2972   MAME_DIR .. "src/mame/includes/blockade.h",
24052973   MAME_DIR .. "src/mame/audio/blockade.cpp",
24062974   MAME_DIR .. "src/mame/video/blockade.cpp",
24072975   MAME_DIR .. "src/mame/drivers/calorie.cpp",
24082976   MAME_DIR .. "src/mame/drivers/chihiro.cpp",
2977   MAME_DIR .. "src/mame/includes/chihiro.h",
24092978   MAME_DIR .. "src/mame/video/chihiro.cpp",
24102979   MAME_DIR .. "src/mame/drivers/coolridr.cpp",
24112980   MAME_DIR .. "src/mame/drivers/deniam.cpp",
2981   MAME_DIR .. "src/mame/includes/deniam.h",
24122982   MAME_DIR .. "src/mame/video/deniam.cpp",
24132983   MAME_DIR .. "src/mame/drivers/dotrikun.cpp",
24142984   MAME_DIR .. "src/mame/drivers/gpworld.cpp",
24152985   MAME_DIR .. "src/mame/drivers/hikaru.cpp",
24162986   MAME_DIR .. "src/mame/drivers/hshavoc.cpp",
24172987   MAME_DIR .. "src/mame/drivers/kopunch.cpp",
2988   MAME_DIR .. "src/mame/includes/kopunch.h",
24182989   MAME_DIR .. "src/mame/video/kopunch.cpp",
24192990   MAME_DIR .. "src/mame/drivers/lindbergh.cpp",
24202991   MAME_DIR .. "src/mame/machine/segabb.cpp",
2992   MAME_DIR .. "src/mame/machine/segabb.h",
24212993   MAME_DIR .. "src/mame/machine/megadriv.cpp",
2994   MAME_DIR .. "src/mame/includes/md_cons.h",
24222995   MAME_DIR .. "src/mame/drivers/megadrvb.cpp",
24232996   MAME_DIR .. "src/mame/drivers/megaplay.cpp",
24242997   MAME_DIR .. "src/mame/drivers/megatech.cpp",
24252998   MAME_DIR .. "src/mame/drivers/model1.cpp",
2999   MAME_DIR .. "src/mame/includes/model1.h",
24263000   MAME_DIR .. "src/mame/machine/model1.cpp",
24273001   MAME_DIR .. "src/mame/video/model1.cpp",
24283002   MAME_DIR .. "src/mame/machine/s32comm.cpp",
3003   MAME_DIR .. "src/mame/machine/s32comm.h",
24293004   MAME_DIR .. "src/mame/machine/m1comm.cpp",
3005   MAME_DIR .. "src/mame/machine/m1comm.h",
24303006   MAME_DIR .. "src/mame/audio/dsbz80.cpp",
3007   MAME_DIR .. "src/mame/audio/dsbz80.h",
24313008   MAME_DIR .. "src/mame/drivers/model2.cpp",
3009   MAME_DIR .. "src/mame/includes/model2.h",
3010   MAME_DIR .. "src/mame/video/model2rd.inc",
24323011   MAME_DIR .. "src/mame/video/model2.cpp",
24333012   MAME_DIR .. "src/mame/drivers/model3.cpp",
3013   MAME_DIR .. "src/mame/includes/model3.h",
24343014   MAME_DIR .. "src/mame/video/model3.cpp",
24353015   MAME_DIR .. "src/mame/machine/model3.cpp",
24363016   MAME_DIR .. "src/mame/drivers/monacogp.cpp",
24373017   MAME_DIR .. "src/mame/drivers/naomi.cpp",
3018   MAME_DIR .. "src/mame/includes/naomi.h",
3019   MAME_DIR .. "src/mame/includes/dc.h",
24383020   MAME_DIR .. "src/mame/drivers/segasp.cpp",
3021   MAME_DIR .. "src/mame/includes/segasp.h",
24393022   MAME_DIR .. "src/mame/machine/dc.cpp",
24403023   MAME_DIR .. "src/mame/video/powervr2.cpp",
3024   MAME_DIR .. "src/mame/video/powervr2.h",
24413025   MAME_DIR .. "src/mame/machine/naomi.cpp",
24423026   MAME_DIR .. "src/mame/machine/naomig1.cpp",
3027   MAME_DIR .. "src/mame/machine/naomig1.h",
24433028   MAME_DIR .. "src/mame/machine/naomibd.cpp",
3029   MAME_DIR .. "src/mame/machine/naomibd.h",
24443030   MAME_DIR .. "src/mame/machine/naomirom.cpp",
3031   MAME_DIR .. "src/mame/machine/naomirom.h",
24453032   MAME_DIR .. "src/mame/machine/naomigd.cpp",
3033   MAME_DIR .. "src/mame/machine/naomigd.h",
24463034   MAME_DIR .. "src/mame/machine/naomim1.cpp",
3035   MAME_DIR .. "src/mame/machine/naomim1.h",
24473036   MAME_DIR .. "src/mame/machine/naomim2.cpp",
3037   MAME_DIR .. "src/mame/machine/naomim2.h",
24483038   MAME_DIR .. "src/mame/machine/naomim4.cpp",
3039   MAME_DIR .. "src/mame/machine/naomim4.h",
24493040   MAME_DIR .. "src/mame/machine/315-5881_crypt.cpp",
3041   MAME_DIR .. "src/mame/machine/315-5881_crypt.h",
24503042   MAME_DIR .. "src/mame/machine/awboard.cpp",
3043   MAME_DIR .. "src/mame/machine/awboard.h",
24513044   MAME_DIR .. "src/mame/machine/mie.cpp",
3045   MAME_DIR .. "src/mame/machine/mie.h",
24523046   MAME_DIR .. "src/mame/machine/maple-dc.cpp",
3047   MAME_DIR .. "src/mame/machine/maple-dc.h",
24533048   MAME_DIR .. "src/mame/machine/mapledev.cpp",
3049   MAME_DIR .. "src/mame/machine/mapledev.h",
24543050   MAME_DIR .. "src/mame/machine/dc-ctrl.cpp",
3051   MAME_DIR .. "src/mame/machine/dc-ctrl.h",
24553052   MAME_DIR .. "src/mame/machine/jvs13551.cpp",
3053   MAME_DIR .. "src/mame/machine/jvs13551.h",
24563054   MAME_DIR .. "src/mame/drivers/triforce.cpp",
24573055   MAME_DIR .. "src/mame/drivers/puckpkmn.cpp",
24583056   MAME_DIR .. "src/mame/drivers/segac2.cpp",
r250291r250292
24603058   MAME_DIR .. "src/mame/drivers/shtzone.cpp",
24613059   MAME_DIR .. "src/mame/drivers/segacoin.cpp",
24623060   MAME_DIR .. "src/mame/drivers/segag80r.cpp",
3061   MAME_DIR .. "src/mame/includes/segag80r.h",
24633062   MAME_DIR .. "src/mame/machine/segag80.cpp",
3063   MAME_DIR .. "src/mame/machine/segag80.h",
24643064   MAME_DIR .. "src/mame/audio/segag80r.cpp",
24653065   MAME_DIR .. "src/mame/video/segag80r.cpp",
24663066   MAME_DIR .. "src/mame/drivers/segag80v.cpp",
3067   MAME_DIR .. "src/mame/includes/segag80v.h",
24673068   MAME_DIR .. "src/mame/audio/segag80v.cpp",
24683069   MAME_DIR .. "src/mame/video/segag80v.cpp",
24693070   MAME_DIR .. "src/mame/drivers/segahang.cpp",
3071   MAME_DIR .. "src/mame/includes/segahang.h",
24703072   MAME_DIR .. "src/mame/video/segahang.cpp",
24713073   MAME_DIR .. "src/mame/drivers/segajw.cpp",
24723074   MAME_DIR .. "src/mame/drivers/segald.cpp",
24733075   MAME_DIR .. "src/mame/drivers/segaorun.cpp",
3076   MAME_DIR .. "src/mame/includes/segaorun.h",
24743077   MAME_DIR .. "src/mame/video/segaorun.cpp",
24753078   MAME_DIR .. "src/mame/drivers/segas16a.cpp",
3079   MAME_DIR .. "src/mame/includes/segas16a.h",
24763080   MAME_DIR .. "src/mame/video/segas16a.cpp",
24773081   MAME_DIR .. "src/mame/drivers/segas16b.cpp",
3082   MAME_DIR .. "src/mame/includes/segas16b.h",
24783083   MAME_DIR .. "src/mame/video/segas16b.cpp",
24793084   MAME_DIR .. "src/mame/drivers/segas18.cpp",
3085   MAME_DIR .. "src/mame/includes/segas18.h",
24803086   MAME_DIR .. "src/mame/video/segas18.cpp",
24813087   MAME_DIR .. "src/mame/drivers/segas24.cpp",
3088   MAME_DIR .. "src/mame/includes/segas24.h",
24823089   MAME_DIR .. "src/mame/video/segas24.cpp",
24833090   MAME_DIR .. "src/mame/drivers/segam1.cpp",
24843091   MAME_DIR .. "src/mame/drivers/segas32.cpp",
3092   MAME_DIR .. "src/mame/includes/segas32.h",
24853093   MAME_DIR .. "src/mame/machine/segas32.cpp",
24863094   MAME_DIR .. "src/mame/video/segas32.cpp",
24873095   MAME_DIR .. "src/mame/drivers/segaufo.cpp",
24883096   MAME_DIR .. "src/mame/drivers/segaxbd.cpp",
3097   MAME_DIR .. "src/mame/includes/segaxbd.h",
24893098   MAME_DIR .. "src/mame/video/segaxbd.cpp",
24903099   MAME_DIR .. "src/mame/drivers/segaybd.cpp",
3100   MAME_DIR .. "src/mame/includes/segaybd.h",
24913101   MAME_DIR .. "src/mame/video/segaybd.cpp",
3102   MAME_DIR .. "src/mame/includes/segaipt.h",
24923103   MAME_DIR .. "src/mame/drivers/sg1000a.cpp",
24933104   MAME_DIR .. "src/mame/drivers/stactics.cpp",
3105   MAME_DIR .. "src/mame/includes/stactics.h",
24943106   MAME_DIR .. "src/mame/video/stactics.cpp",
24953107   MAME_DIR .. "src/mame/drivers/stv.cpp",
3108   MAME_DIR .. "src/mame/includes/stv.h",
24963109   MAME_DIR .. "src/mame/machine/stvprot.cpp",
24973110   MAME_DIR .. "src/mame/machine/315-5838_317-0229_comp.cpp",
3111   MAME_DIR .. "src/mame/machine/315-5838_317-0229_comp.h",
24983112   MAME_DIR .. "src/mame/drivers/suprloco.cpp",
3113   MAME_DIR .. "src/mame/includes/suprloco.h",
24993114   MAME_DIR .. "src/mame/video/suprloco.cpp",
25003115   MAME_DIR .. "src/mame/drivers/system1.cpp",
3116   MAME_DIR .. "src/mame/includes/system1.h",
25013117   MAME_DIR .. "src/mame/video/system1.cpp",
25023118   MAME_DIR .. "src/mame/drivers/system16.cpp",
3119   MAME_DIR .. "src/mame/includes/system16.h",
25033120   MAME_DIR .. "src/mame/video/system16.cpp",
25043121   MAME_DIR .. "src/mame/drivers/timetrv.cpp",
25053122   MAME_DIR .. "src/mame/drivers/turbo.cpp",
3123   MAME_DIR .. "src/mame/includes/turbo.h",
25063124   MAME_DIR .. "src/mame/audio/turbo.cpp",
25073125   MAME_DIR .. "src/mame/video/turbo.cpp",
25083126   MAME_DIR .. "src/mame/drivers/vicdual.cpp",
3127   MAME_DIR .. "src/mame/includes/vicdual.h",
25093128   MAME_DIR .. "src/mame/audio/vicdual.cpp",
25103129   MAME_DIR .. "src/mame/video/vicdual.cpp",
25113130   MAME_DIR .. "src/mame/audio/carnival.cpp",
r250291r250292
25133132   MAME_DIR .. "src/mame/audio/invinco.cpp",
25143133   MAME_DIR .. "src/mame/audio/pulsar.cpp",
25153134   MAME_DIR .. "src/mame/drivers/zaxxon.cpp",
3135   MAME_DIR .. "src/mame/includes/zaxxon.h",
25163136   MAME_DIR .. "src/mame/audio/zaxxon.cpp",
25173137   MAME_DIR .. "src/mame/video/zaxxon.cpp",
25183138   MAME_DIR .. "src/mame/machine/315_5296.cpp",
3139   MAME_DIR .. "src/mame/machine/315_5296.h",
25193140   MAME_DIR .. "src/mame/machine/fd1089.cpp",
3141   MAME_DIR .. "src/mame/machine/fd1089.h",
25203142   MAME_DIR .. "src/mame/machine/fd1094.cpp",
3143   MAME_DIR .. "src/mame/machine/fd1094.h",
25213144   MAME_DIR .. "src/mame/machine/fddebug.cpp",
3145   MAME_DIR .. "src/mame/machine/fddebug.h",
25223146   MAME_DIR .. "src/mame/machine/mc8123.cpp",
3147   MAME_DIR .. "src/mame/machine/mc8123.h",
25233148   MAME_DIR .. "src/mame/machine/segaic16.cpp",
3149   MAME_DIR .. "src/mame/machine/segaic16.h",
25243150   MAME_DIR .. "src/mame/audio/segasnd.cpp",
3151   MAME_DIR .. "src/mame/audio/segasnd.h",
25253152   MAME_DIR .. "src/mame/video/segaic16.cpp",
3153   MAME_DIR .. "src/mame/video/segaic16.h",
25263154   MAME_DIR .. "src/mame/video/segaic16_road.cpp",
3155   MAME_DIR .. "src/mame/video/segaic16_road.h",
25273156   MAME_DIR .. "src/mame/video/sega16sp.cpp",
3157   MAME_DIR .. "src/mame/video/sega16sp.h",
25283158   MAME_DIR .. "src/mame/video/segaic24.cpp",
3159   MAME_DIR .. "src/mame/video/segaic24.h",
25293160   MAME_DIR .. "src/mame/machine/gdrom.cpp",
3161   MAME_DIR .. "src/mame/machine/gdrom.h",
25303162   MAME_DIR .. "src/mame/machine/xbox.cpp",
25313163}
25323164
25333165createMAMEProjects(_target, _subtarget, "seibu")
25343166files {
25353167   MAME_DIR .. "src/mame/drivers/bloodbro.cpp",
3168   MAME_DIR .. "src/mame/includes/bloodbro.h",
25363169   MAME_DIR .. "src/mame/video/bloodbro.cpp",
25373170   MAME_DIR .. "src/mame/drivers/cabal.cpp",
3171   MAME_DIR .. "src/mame/includes/cabal.h",
25383172   MAME_DIR .. "src/mame/video/cabal.cpp",
25393173   MAME_DIR .. "src/mame/drivers/cshooter.cpp",
25403174   MAME_DIR .. "src/mame/drivers/dcon.cpp",
3175   MAME_DIR .. "src/mame/includes/dcon.h",
25413176   MAME_DIR .. "src/mame/video/dcon.cpp",
25423177   MAME_DIR .. "src/mame/drivers/deadang.cpp",
3178   MAME_DIR .. "src/mame/includes/deadang.h",
25433179   MAME_DIR .. "src/mame/video/deadang.cpp",
25443180   MAME_DIR .. "src/mame/drivers/dynduke.cpp",
3181   MAME_DIR .. "src/mame/includes/dynduke.h",
25453182   MAME_DIR .. "src/mame/video/dynduke.cpp",
25463183   MAME_DIR .. "src/mame/drivers/feversoc.cpp",
25473184   MAME_DIR .. "src/mame/drivers/goal92.cpp",
3185   MAME_DIR .. "src/mame/includes/goal92.h",
25483186   MAME_DIR .. "src/mame/video/goal92.cpp",
25493187   MAME_DIR .. "src/mame/drivers/goodejan.cpp",
25503188   MAME_DIR .. "src/mame/drivers/kncljoe.cpp",
3189   MAME_DIR .. "src/mame/includes/kncljoe.h",
25513190   MAME_DIR .. "src/mame/video/kncljoe.cpp",
25523191   MAME_DIR .. "src/mame/drivers/legionna.cpp",
3192   MAME_DIR .. "src/mame/includes/legionna.h",
25533193   MAME_DIR .. "src/mame/video/legionna.cpp",
25543194   MAME_DIR .. "src/mame/drivers/mustache.cpp",
3195   MAME_DIR .. "src/mame/includes/mustache.h",
25553196   MAME_DIR .. "src/mame/video/mustache.cpp",
25563197   MAME_DIR .. "src/mame/drivers/panicr.cpp",
25573198   MAME_DIR .. "src/mame/drivers/raiden.cpp",
3199   MAME_DIR .. "src/mame/includes/raiden.h",
25583200   MAME_DIR .. "src/mame/video/raiden.cpp",
25593201   MAME_DIR .. "src/mame/drivers/raiden2.cpp",
3202   MAME_DIR .. "src/mame/includes/raiden2.h",
25603203   MAME_DIR .. "src/mame/machine/r2crypt.cpp",
25613204   MAME_DIR .. "src/mame/machine/raiden2cop.cpp",
3205   MAME_DIR .. "src/mame/machine/raiden2cop.h",
25623206   MAME_DIR .. "src/mame/drivers/r2dx_v33.cpp",
25633207   MAME_DIR .. "src/mame/drivers/seibuspi.cpp",
3208   MAME_DIR .. "src/mame/includes/seibuspi.h",
25643209   MAME_DIR .. "src/mame/machine/seibuspi.cpp",
3210   MAME_DIR .. "src/mame/machine/seibuspi.h",
25653211   MAME_DIR .. "src/mame/video/seibuspi.cpp",
25663212   MAME_DIR .. "src/mame/drivers/sengokmj.cpp",
25673213   MAME_DIR .. "src/mame/drivers/stfight.cpp",
3214   MAME_DIR .. "src/mame/includes/stfight.h",
25683215   MAME_DIR .. "src/mame/machine/stfight.cpp",
25693216   MAME_DIR .. "src/mame/video/stfight.cpp",
25703217   MAME_DIR .. "src/mame/drivers/toki.cpp",
3218   MAME_DIR .. "src/mame/includes/toki.h",
25713219   MAME_DIR .. "src/mame/video/toki.cpp",
25723220   MAME_DIR .. "src/mame/drivers/wiz.cpp",
3221   MAME_DIR .. "src/mame/includes/wiz.h",
25733222   MAME_DIR .. "src/mame/video/wiz.cpp",
25743223   MAME_DIR .. "src/mame/machine/seicop.cpp",
3224   MAME_DIR .. "src/mame/machine/seicop.h",
25753225   MAME_DIR .. "src/mame/machine/spisprit.cpp",
25763226   MAME_DIR .. "src/mame/audio/seibu.cpp",
3227   MAME_DIR .. "src/mame/audio/seibu.h",
25773228   MAME_DIR .. "src/mame/video/seibu_crtc.cpp",
3229   MAME_DIR .. "src/mame/video/seibu_crtc.h",
25783230}
25793231
25803232createMAMEProjects(_target, _subtarget, "seta")
r250291r250292
25823234   MAME_DIR .. "src/mame/drivers/aleck64.cpp",
25833235   MAME_DIR .. "src/mame/machine/n64.cpp",
25843236   MAME_DIR .. "src/mame/video/n64.cpp",
3237   MAME_DIR .. "src/mame/video/n64types.h",
3238   MAME_DIR .. "src/mame/video/rdpfiltr.inc",     
3239   MAME_DIR .. "src/mame/video/n64.h",
25853240   MAME_DIR .. "src/mame/video/rdpblend.cpp",
3241   MAME_DIR .. "src/mame/video/rdpblend.h",
25863242   MAME_DIR .. "src/mame/video/rdptpipe.cpp",
3243   MAME_DIR .. "src/mame/video/rdptpipe.h",
25873244   MAME_DIR .. "src/mame/drivers/hanaawas.cpp",
3245   MAME_DIR .. "src/mame/includes/hanaawas.h",
25883246   MAME_DIR .. "src/mame/video/hanaawas.cpp",
25893247   MAME_DIR .. "src/mame/drivers/jclub2.cpp",
25903248   MAME_DIR .. "src/mame/drivers/macs.cpp",
25913249   MAME_DIR .. "src/mame/drivers/seta.cpp",
3250   MAME_DIR .. "src/mame/includes/seta.h",
25923251   MAME_DIR .. "src/mame/video/seta.cpp",
25933252   MAME_DIR .. "src/mame/drivers/seta2.cpp",
3253   MAME_DIR .. "src/mame/includes/seta2.h",
25943254   MAME_DIR .. "src/mame/video/seta2.cpp",
25953255   MAME_DIR .. "src/mame/drivers/speedatk.cpp",
3256   MAME_DIR .. "src/mame/includes/speedatk.h",
25963257   MAME_DIR .. "src/mame/video/speedatk.cpp",
25973258   MAME_DIR .. "src/mame/drivers/speglsht.cpp",
25983259   MAME_DIR .. "src/mame/drivers/srmp2.cpp",
3260   MAME_DIR .. "src/mame/includes/srmp2.h",
25993261   MAME_DIR .. "src/mame/video/srmp2.cpp",
26003262   MAME_DIR .. "src/mame/drivers/srmp5.cpp",
26013263   MAME_DIR .. "src/mame/drivers/srmp6.cpp",
26023264   MAME_DIR .. "src/mame/drivers/ssv.cpp",
3265   MAME_DIR .. "src/mame/includes/ssv.h",
26033266   MAME_DIR .. "src/mame/video/ssv.cpp",
26043267   MAME_DIR .. "src/mame/video/st0020.cpp",
3268   MAME_DIR .. "src/mame/video/st0020.h",
26053269   MAME_DIR .. "src/mame/machine/st0016.cpp",
3270   MAME_DIR .. "src/mame/machine/st0016.h",
26063271   MAME_DIR .. "src/mame/drivers/simple_st0016.cpp",
3272   MAME_DIR .. "src/mame/includes/simple_st0016.h",
26073273   MAME_DIR .. "src/mame/video/seta001.cpp",
3274   MAME_DIR .. "src/mame/video/seta001.h",
26083275   MAME_DIR .. "src/mame/drivers/thedealr.cpp",
26093276}
26103277
r250291r250292
26153282   MAME_DIR .. "src/mame/drivers/sigmab52.cpp",
26163283   MAME_DIR .. "src/mame/drivers/sigmab98.cpp",
26173284   MAME_DIR .. "src/mame/drivers/spiders.cpp",
3285   MAME_DIR .. "src/mame/includes/spiders.h",
26183286   MAME_DIR .. "src/mame/audio/spiders.cpp",
26193287   MAME_DIR .. "src/mame/drivers/sub.cpp",
26203288}
r250291r250292
26223290createMAMEProjects(_target, _subtarget, "snk")
26233291files {
26243292   MAME_DIR .. "src/mame/drivers/bbusters.cpp",
3293   MAME_DIR .. "src/mame/includes/bbusters.h",
26253294   MAME_DIR .. "src/mame/video/bbusters.cpp",
26263295   MAME_DIR .. "src/mame/drivers/dmndrby.cpp",
26273296   MAME_DIR .. "src/mame/drivers/hng64.cpp",
3297   MAME_DIR .. "src/mame/includes/hng64.h",
26283298   MAME_DIR .. "src/mame/video/hng64.cpp",
26293299   MAME_DIR .. "src/mame/audio/hng64.cpp",
26303300   MAME_DIR .. "src/mame/machine/hng64_net.cpp",
26313301   MAME_DIR .. "src/mame/video/hng64_3d.cpp",
26323302   MAME_DIR .. "src/mame/video/hng64_sprite.cpp",
26333303   MAME_DIR .. "src/mame/drivers/lasso.cpp",
3304   MAME_DIR .. "src/mame/includes/lasso.h",
26343305   MAME_DIR .. "src/mame/video/lasso.cpp",
26353306   MAME_DIR .. "src/mame/drivers/mainsnk.cpp",
3307   MAME_DIR .. "src/mame/includes/mainsnk.h",
26363308   MAME_DIR .. "src/mame/video/mainsnk.cpp",
26373309   MAME_DIR .. "src/mame/drivers/munchmo.cpp",
3310   MAME_DIR .. "src/mame/includes/munchmo.h",
26383311   MAME_DIR .. "src/mame/video/munchmo.cpp",
26393312   MAME_DIR .. "src/mame/drivers/prehisle.cpp",
3313   MAME_DIR .. "src/mame/includes/prehisle.h",
26403314   MAME_DIR .. "src/mame/video/prehisle.cpp",
26413315   MAME_DIR .. "src/mame/drivers/snk6502.cpp",
3316   MAME_DIR .. "src/mame/includes/snk6502.h",
26423317   MAME_DIR .. "src/mame/audio/snk6502.cpp",
26433318   MAME_DIR .. "src/mame/video/snk6502.cpp",
26443319   MAME_DIR .. "src/mame/drivers/snk.cpp",
3320   MAME_DIR .. "src/mame/includes/snk.h",
26453321   MAME_DIR .. "src/mame/video/snk.cpp",
26463322   MAME_DIR .. "src/mame/drivers/snk68.cpp",
3323   MAME_DIR .. "src/mame/includes/snk68.h",
26473324   MAME_DIR .. "src/mame/video/snk68.cpp",
26483325}
26493326
r250291r250292
26513328files {
26523329   MAME_DIR .. "src/mame/drivers/zn.cpp",
26533330   MAME_DIR .. "src/mame/machine/zndip.cpp",
3331   MAME_DIR .. "src/mame/machine/zndip.h",
26543332   MAME_DIR .. "src/mame/machine/cat702.cpp",
3333   MAME_DIR .. "src/mame/machine/cat702.h",
26553334}
26563335
26573336createMAMEProjects(_target, _subtarget, "stern")
r250291r250292
26703349   MAME_DIR .. "src/mame/drivers/subsino.cpp",
26713350   MAME_DIR .. "src/mame/drivers/subsino2.cpp",
26723351   MAME_DIR .. "src/mame/machine/subsino.cpp",
3352   MAME_DIR .. "src/mame/machine/subsino.h",
26733353}
26743354
26753355createMAMEProjects(_target, _subtarget, "sun")
26763356files {
26773357   MAME_DIR .. "src/mame/drivers/arabian.cpp",
3358   MAME_DIR .. "src/mame/includes/arabian.h",
26783359   MAME_DIR .. "src/mame/video/arabian.cpp",
26793360   MAME_DIR .. "src/mame/drivers/dai3wksi.cpp",
26803361   MAME_DIR .. "src/mame/drivers/ikki.cpp",
3362   MAME_DIR .. "src/mame/includes/ikki.h",
26813363   MAME_DIR .. "src/mame/video/ikki.cpp",
26823364   MAME_DIR .. "src/mame/drivers/kangaroo.cpp",
3365   MAME_DIR .. "src/mame/includes/kangaroo.h",
26833366   MAME_DIR .. "src/mame/video/kangaroo.cpp",
26843367   MAME_DIR .. "src/mame/drivers/markham.cpp",
3368   MAME_DIR .. "src/mame/includes/markham.h",
26853369   MAME_DIR .. "src/mame/video/markham.cpp",
26863370   MAME_DIR .. "src/mame/drivers/route16.cpp",
3371   MAME_DIR .. "src/mame/includes/route16.h",
26873372   MAME_DIR .. "src/mame/video/route16.cpp",
26883373   MAME_DIR .. "src/mame/drivers/shanghai.cpp",
26893374   MAME_DIR .. "src/mame/drivers/shangha3.cpp",
3375   MAME_DIR .. "src/mame/includes/shangha3.h",
26903376   MAME_DIR .. "src/mame/video/shangha3.cpp",
26913377   MAME_DIR .. "src/mame/drivers/strnskil.cpp",
3378   MAME_DIR .. "src/mame/includes/strnskil.h",
26923379   MAME_DIR .. "src/mame/video/strnskil.cpp",
26933380   MAME_DIR .. "src/mame/drivers/tonton.cpp",
26943381}
r250291r250292
26973384files {
26983385   MAME_DIR .. "src/mame/drivers/go2000.cpp",
26993386   MAME_DIR .. "src/mame/drivers/goindol.cpp",
3387   MAME_DIR .. "src/mame/includes/goindol.h",
27003388   MAME_DIR .. "src/mame/video/goindol.cpp",
27013389   MAME_DIR .. "src/mame/drivers/suna8.cpp",
3390   MAME_DIR .. "src/mame/includes/suna8.h",
27023391   MAME_DIR .. "src/mame/audio/suna8.cpp",
27033392   MAME_DIR .. "src/mame/video/suna8.cpp",
27043393   MAME_DIR .. "src/mame/drivers/suna16.cpp",
3394   MAME_DIR .. "src/mame/includes/suna16.h",
27053395   MAME_DIR .. "src/mame/video/suna16.cpp",
27063396}
27073397
r250291r250292
27153405files {
27163406   MAME_DIR .. "src/mame/drivers/2mindril.cpp",
27173407   MAME_DIR .. "src/mame/drivers/40love.cpp",
3408   MAME_DIR .. "src/mame/includes/40love.h",
27183409   MAME_DIR .. "src/mame/video/40love.cpp",
27193410   MAME_DIR .. "src/mame/drivers/arkanoid.cpp",
3411   MAME_DIR .. "src/mame/includes/arkanoid.h",
27203412   MAME_DIR .. "src/mame/machine/arkanoid.cpp",
27213413   MAME_DIR .. "src/mame/video/arkanoid.cpp",
27223414   MAME_DIR .. "src/mame/drivers/ashnojoe.cpp",
3415   MAME_DIR .. "src/mame/includes/ashnojoe.h",
27233416   MAME_DIR .. "src/mame/video/ashnojoe.cpp",
27243417   MAME_DIR .. "src/mame/drivers/asuka.cpp",
3418   MAME_DIR .. "src/mame/includes/asuka.h",
27253419   MAME_DIR .. "src/mame/machine/bonzeadv.cpp",
27263420   MAME_DIR .. "src/mame/video/asuka.cpp",
27273421   MAME_DIR .. "src/mame/drivers/bigevglf.cpp",
3422   MAME_DIR .. "src/mame/includes/bigevglf.h",
27283423   MAME_DIR .. "src/mame/machine/bigevglf.cpp",
27293424   MAME_DIR .. "src/mame/video/bigevglf.cpp",
27303425   MAME_DIR .. "src/mame/drivers/bking.cpp",
3426   MAME_DIR .. "src/mame/includes/bking.h",
27313427   MAME_DIR .. "src/mame/video/bking.cpp",
27323428   MAME_DIR .. "src/mame/drivers/bublbobl.cpp",
3429   MAME_DIR .. "src/mame/includes/bublbobl.h",
27333430   MAME_DIR .. "src/mame/machine/bublbobl.cpp",
27343431   MAME_DIR .. "src/mame/video/bublbobl.cpp",
27353432   MAME_DIR .. "src/mame/drivers/buggychl.cpp",
3433   MAME_DIR .. "src/mame/includes/buggychl.h",
27363434   MAME_DIR .. "src/mame/machine/buggychl.cpp",
3435   MAME_DIR .. "src/mame/machine/buggychl.h",
27373436   MAME_DIR .. "src/mame/video/buggychl.cpp",
27383437   MAME_DIR .. "src/mame/drivers/capr1.cpp",
27393438   MAME_DIR .. "src/mame/drivers/caprcyc.cpp",
27403439   MAME_DIR .. "src/mame/drivers/cchance.cpp",
27413440   MAME_DIR .. "src/mame/drivers/chaknpop.cpp",
3441   MAME_DIR .. "src/mame/includes/chaknpop.h",
27423442   MAME_DIR .. "src/mame/machine/chaknpop.cpp",
27433443   MAME_DIR .. "src/mame/video/chaknpop.cpp",
27443444   MAME_DIR .. "src/mame/drivers/champbwl.cpp",
27453445   MAME_DIR .. "src/mame/drivers/changela.cpp",
3446   MAME_DIR .. "src/mame/includes/changela.h",
27463447   MAME_DIR .. "src/mame/video/changela.cpp",
27473448   MAME_DIR .. "src/mame/drivers/crbaloon.cpp",
3449   MAME_DIR .. "src/mame/includes/crbaloon.h",
27483450   MAME_DIR .. "src/mame/video/crbaloon.cpp",
27493451   MAME_DIR .. "src/mame/audio/crbaloon.cpp",
27503452   MAME_DIR .. "src/mame/drivers/cyclemb.cpp",
27513453   MAME_DIR .. "src/mame/drivers/darius.cpp",
3454   MAME_DIR .. "src/mame/includes/darius.h",
27523455   MAME_DIR .. "src/mame/video/darius.cpp",
27533456   MAME_DIR .. "src/mame/drivers/darkmist.cpp",
3457   MAME_DIR .. "src/mame/includes/darkmist.h",
27543458   MAME_DIR .. "src/mame/video/darkmist.cpp",
27553459   MAME_DIR .. "src/mame/drivers/exzisus.cpp",
3460   MAME_DIR .. "src/mame/includes/exzisus.h",
27563461   MAME_DIR .. "src/mame/video/exzisus.cpp",
27573462   MAME_DIR .. "src/mame/drivers/fgoal.cpp",
3463   MAME_DIR .. "src/mame/includes/fgoal.h",
27583464   MAME_DIR .. "src/mame/video/fgoal.cpp",
27593465   MAME_DIR .. "src/mame/drivers/flstory.cpp",
3466   MAME_DIR .. "src/mame/includes/flstory.h",
27603467   MAME_DIR .. "src/mame/machine/flstory.cpp",
27613468   MAME_DIR .. "src/mame/video/flstory.cpp",
27623469   MAME_DIR .. "src/mame/drivers/galastrm.cpp",
3470   MAME_DIR .. "src/mame/includes/galastrm.h",
27633471   MAME_DIR .. "src/mame/video/galastrm.cpp",
27643472   MAME_DIR .. "src/mame/drivers/gladiatr.cpp",
3473   MAME_DIR .. "src/mame/includes/gladiatr.h",
27653474   MAME_DIR .. "src/mame/video/gladiatr.cpp",
27663475   MAME_DIR .. "src/mame/drivers/grchamp.cpp",
3476   MAME_DIR .. "src/mame/includes/grchamp.h",
27673477   MAME_DIR .. "src/mame/audio/grchamp.cpp",
27683478   MAME_DIR .. "src/mame/video/grchamp.cpp",
27693479   MAME_DIR .. "src/mame/drivers/groundfx.cpp",
3480   MAME_DIR .. "src/mame/includes/groundfx.h",
27703481   MAME_DIR .. "src/mame/video/groundfx.cpp",
27713482   MAME_DIR .. "src/mame/drivers/gsword.cpp",
3483   MAME_DIR .. "src/mame/includes/gsword.h",
27723484   MAME_DIR .. "src/mame/machine/tait8741.cpp",
3485   MAME_DIR .. "src/mame/machine/tait8741.h",
27733486   MAME_DIR .. "src/mame/video/gsword.cpp",
27743487   MAME_DIR .. "src/mame/drivers/gunbustr.cpp",
3488   MAME_DIR .. "src/mame/includes/gunbustr.h",
27753489   MAME_DIR .. "src/mame/video/gunbustr.cpp",
27763490   MAME_DIR .. "src/mame/drivers/halleys.cpp",
27773491   MAME_DIR .. "src/mame/drivers/invqix.cpp",
27783492   MAME_DIR .. "src/mame/drivers/jollyjgr.cpp",
27793493   MAME_DIR .. "src/mame/drivers/ksayakyu.cpp",
3494   MAME_DIR .. "src/mame/includes/ksayakyu.h",
27803495   MAME_DIR .. "src/mame/video/ksayakyu.cpp",
27813496   MAME_DIR .. "src/mame/drivers/lgp.cpp",
27823497   MAME_DIR .. "src/mame/drivers/lkage.cpp",
3498   MAME_DIR .. "src/mame/includes/lkage.h",
27833499   MAME_DIR .. "src/mame/machine/lkage.cpp",
27843500   MAME_DIR .. "src/mame/video/lkage.cpp",
27853501   MAME_DIR .. "src/mame/drivers/lsasquad.cpp",
3502   MAME_DIR .. "src/mame/includes/lsasquad.h",
27863503   MAME_DIR .. "src/mame/machine/lsasquad.cpp",
27873504   MAME_DIR .. "src/mame/video/lsasquad.cpp",
27883505   MAME_DIR .. "src/mame/drivers/marinedt.cpp",
27893506   MAME_DIR .. "src/mame/drivers/mexico86.cpp",
3507   MAME_DIR .. "src/mame/includes/mexico86.h",
27903508   MAME_DIR .. "src/mame/machine/mexico86.cpp",
27913509   MAME_DIR .. "src/mame/video/mexico86.cpp",
27923510   MAME_DIR .. "src/mame/drivers/minivadr.cpp",
27933511   MAME_DIR .. "src/mame/drivers/missb2.cpp",
27943512   MAME_DIR .. "src/mame/drivers/mlanding.cpp",
27953513   MAME_DIR .. "src/mame/drivers/msisaac.cpp",
3514   MAME_DIR .. "src/mame/includes/msisaac.h",
27963515   MAME_DIR .. "src/mame/video/msisaac.cpp",
27973516   MAME_DIR .. "src/mame/drivers/ninjaw.cpp",
3517   MAME_DIR .. "src/mame/includes/ninjaw.h",
27983518   MAME_DIR .. "src/mame/video/ninjaw.cpp",
27993519   MAME_DIR .. "src/mame/drivers/nycaptor.cpp",
3520   MAME_DIR .. "src/mame/includes/nycaptor.h",
28003521   MAME_DIR .. "src/mame/machine/nycaptor.cpp",
28013522   MAME_DIR .. "src/mame/video/nycaptor.cpp",
28023523   MAME_DIR .. "src/mame/drivers/opwolf.cpp",
3524   MAME_DIR .. "src/mame/includes/opwolf.h",
28033525   MAME_DIR .. "src/mame/machine/opwolf.cpp",
28043526   MAME_DIR .. "src/mame/video/opwolf.cpp",
28053527   MAME_DIR .. "src/mame/drivers/othunder.cpp",
3528   MAME_DIR .. "src/mame/includes/othunder.h",
28063529   MAME_DIR .. "src/mame/video/othunder.cpp",
28073530   MAME_DIR .. "src/mame/drivers/pitnrun.cpp",
3531   MAME_DIR .. "src/mame/includes/pitnrun.h",
28083532   MAME_DIR .. "src/mame/machine/pitnrun.cpp",
28093533   MAME_DIR .. "src/mame/video/pitnrun.cpp",
28103534   MAME_DIR .. "src/mame/drivers/qix.cpp",
3535   MAME_DIR .. "src/mame/includes/qix.h",
28113536   MAME_DIR .. "src/mame/machine/qix.cpp",
28123537   MAME_DIR .. "src/mame/audio/qix.cpp",
28133538   MAME_DIR .. "src/mame/video/qix.cpp",
28143539   MAME_DIR .. "src/mame/drivers/rbisland.cpp",
3540   MAME_DIR .. "src/mame/includes/rbisland.h",
28153541   MAME_DIR .. "src/mame/machine/rbisland.cpp",
28163542   MAME_DIR .. "src/mame/video/rbisland.cpp",
28173543   MAME_DIR .. "src/mame/drivers/rastan.cpp",
3544   MAME_DIR .. "src/mame/includes/rastan.h",
28183545   MAME_DIR .. "src/mame/video/rastan.cpp",
28193546   MAME_DIR .. "src/mame/drivers/retofinv.cpp",
3547   MAME_DIR .. "src/mame/includes/retofinv.h",
28203548   MAME_DIR .. "src/mame/machine/retofinv.cpp",
28213549   MAME_DIR .. "src/mame/video/retofinv.cpp",
28223550   MAME_DIR .. "src/mame/drivers/rollrace.cpp",
3551   MAME_DIR .. "src/mame/includes/rollrace.h",
28233552   MAME_DIR .. "src/mame/video/rollrace.cpp",
28243553   MAME_DIR .. "src/mame/drivers/sbowling.cpp",
28253554   MAME_DIR .. "src/mame/drivers/slapshot.cpp",
3555   MAME_DIR .. "src/mame/includes/slapshot.h",
28263556   MAME_DIR .. "src/mame/video/slapshot.cpp",
28273557   MAME_DIR .. "src/mame/drivers/ssrj.cpp",
3558   MAME_DIR .. "src/mame/includes/ssrj.h",
28283559   MAME_DIR .. "src/mame/video/ssrj.cpp",
28293560   MAME_DIR .. "src/mame/drivers/superchs.cpp",
3561   MAME_DIR .. "src/mame/includes/superchs.h",
28303562   MAME_DIR .. "src/mame/video/superchs.cpp",
28313563   MAME_DIR .. "src/mame/drivers/superqix.cpp",
3564   MAME_DIR .. "src/mame/includes/superqix.h",
28323565   MAME_DIR .. "src/mame/video/superqix.cpp",
28333566   MAME_DIR .. "src/mame/drivers/taito_b.cpp",
3567   MAME_DIR .. "src/mame/includes/taito_b.h",
28343568   MAME_DIR .. "src/mame/video/taito_b.cpp",
3569   MAME_DIR .. "src/mame/includes/taitoipt.h",
28353570   MAME_DIR .. "src/mame/drivers/taito_f2.cpp",
3571   MAME_DIR .. "src/mame/includes/taito_f2.h",
28363572   MAME_DIR .. "src/mame/video/taito_f2.cpp",
28373573   MAME_DIR .. "src/mame/drivers/taito_f3.cpp",
3574   MAME_DIR .. "src/mame/includes/taito_f3.h",
28383575   MAME_DIR .. "src/mame/video/taito_f3.cpp",
28393576   MAME_DIR .. "src/mame/audio/taito_en.cpp",
3577   MAME_DIR .. "src/mame/audio/taito_en.h",
28403578   MAME_DIR .. "src/mame/drivers/taito_h.cpp",
3579   MAME_DIR .. "src/mame/includes/taito_h.h",
28413580   MAME_DIR .. "src/mame/video/taito_h.cpp",
28423581   MAME_DIR .. "src/mame/drivers/taito_l.cpp",
3582   MAME_DIR .. "src/mame/includes/taito_l.h",
28433583   MAME_DIR .. "src/mame/video/taito_l.cpp",
28443584   MAME_DIR .. "src/mame/drivers/taito_x.cpp",
3585   MAME_DIR .. "src/mame/includes/taito_x.h",
28453586   MAME_DIR .. "src/mame/machine/cchip.cpp",
28463587   MAME_DIR .. "src/mame/drivers/taito_z.cpp",
3588   MAME_DIR .. "src/mame/includes/taito_z.h",
28473589   MAME_DIR .. "src/mame/video/taito_z.cpp",
28483590   MAME_DIR .. "src/mame/drivers/taito_o.cpp",
3591   MAME_DIR .. "src/mame/includes/taito_o.h",
28493592   MAME_DIR .. "src/mame/video/taito_o.cpp",
28503593   MAME_DIR .. "src/mame/drivers/taitoair.cpp",
3594   MAME_DIR .. "src/mame/includes/taitoair.h",
28513595   MAME_DIR .. "src/mame/video/taitoair.cpp",
28523596   MAME_DIR .. "src/mame/drivers/taitogn.cpp",
28533597   MAME_DIR .. "src/mame/drivers/taitojc.cpp",
3598   MAME_DIR .. "src/mame/includes/taitojc.h",
28543599   MAME_DIR .. "src/mame/video/taitojc.cpp",
28553600   MAME_DIR .. "src/mame/drivers/taitopjc.cpp",
28563601   MAME_DIR .. "src/mame/drivers/taitosj.cpp",
3602   MAME_DIR .. "src/mame/includes/taitosj.h",
28573603   MAME_DIR .. "src/mame/machine/taitosj.cpp",
28583604   MAME_DIR .. "src/mame/video/taitosj.cpp",
28593605   MAME_DIR .. "src/mame/drivers/taitottl.cpp",
r250291r250292
28613607   MAME_DIR .. "src/mame/drivers/taitotx.cpp",
28623608   MAME_DIR .. "src/mame/drivers/taitowlf.cpp",
28633609   MAME_DIR .. "src/mame/drivers/tnzs.cpp",
3610   MAME_DIR .. "src/mame/includes/tnzs.h",
28643611   MAME_DIR .. "src/mame/machine/tnzs.cpp",
28653612   MAME_DIR .. "src/mame/video/tnzs.cpp",
28663613   MAME_DIR .. "src/mame/drivers/topspeed.cpp",
3614   MAME_DIR .. "src/mame/includes/topspeed.h",
28673615   MAME_DIR .. "src/mame/video/topspeed.cpp",
28683616   MAME_DIR .. "src/mame/drivers/tsamurai.cpp",
3617   MAME_DIR .. "src/mame/includes/tsamurai.h",
28693618   MAME_DIR .. "src/mame/video/tsamurai.cpp",
28703619   MAME_DIR .. "src/mame/drivers/undrfire.cpp",
3620   MAME_DIR .. "src/mame/includes/undrfire.h",
28713621   MAME_DIR .. "src/mame/video/undrfire.cpp",
28723622   MAME_DIR .. "src/mame/drivers/volfied.cpp",
3623   MAME_DIR .. "src/mame/includes/volfied.h",
28733624   MAME_DIR .. "src/mame/machine/volfied.cpp",
28743625   MAME_DIR .. "src/mame/video/volfied.cpp",
28753626   MAME_DIR .. "src/mame/drivers/warriorb.cpp",
3627   MAME_DIR .. "src/mame/includes/warriorb.h",
28763628   MAME_DIR .. "src/mame/video/warriorb.cpp",
28773629   MAME_DIR .. "src/mame/drivers/wgp.cpp",
3630   MAME_DIR .. "src/mame/includes/wgp.h",
28783631   MAME_DIR .. "src/mame/video/wgp.cpp",
28793632   MAME_DIR .. "src/mame/drivers/wyvernf0.cpp",
28803633   MAME_DIR .. "src/mame/audio/taitosnd.cpp",
3634   MAME_DIR .. "src/mame/audio/taitosnd.h",
28813635   MAME_DIR .. "src/mame/audio/taito_zm.cpp",
3636   MAME_DIR .. "src/mame/audio/taito_zm.h",
28823637   MAME_DIR .. "src/mame/audio/t5182.cpp",
3638   MAME_DIR .. "src/mame/audio/t5182.h",
28833639   MAME_DIR .. "src/mame/machine/taitoio.cpp",
3640   MAME_DIR .. "src/mame/machine/taitoio.h",
28843641   MAME_DIR .. "src/mame/video/taito_helper.cpp",
3642   MAME_DIR .. "src/mame/video/taito_helper.h",
28853643   MAME_DIR .. "src/mame/video/pc080sn.cpp",
3644   MAME_DIR .. "src/mame/video/pc080sn.h",
28863645   MAME_DIR .. "src/mame/video/pc090oj.cpp",
3646   MAME_DIR .. "src/mame/video/pc090oj.h",
28873647   MAME_DIR .. "src/mame/video/tc0080vco.cpp",
3648   MAME_DIR .. "src/mame/video/tc0080vco.h",
28883649   MAME_DIR .. "src/mame/video/tc0100scn.cpp",
3650   MAME_DIR .. "src/mame/video/tc0100scn.h",
28893651   MAME_DIR .. "src/mame/video/tc0150rod.cpp",
3652   MAME_DIR .. "src/mame/video/tc0150rod.h",
28903653   MAME_DIR .. "src/mame/video/tc0280grd.cpp",
3654   MAME_DIR .. "src/mame/video/tc0280grd.h",
28913655   MAME_DIR .. "src/mame/video/tc0360pri.cpp",
3656   MAME_DIR .. "src/mame/video/tc0360pri.h",
28923657   MAME_DIR .. "src/mame/video/tc0480scp.cpp",
3658   MAME_DIR .. "src/mame/video/tc0480scp.h",
28933659   MAME_DIR .. "src/mame/video/tc0110pcr.cpp",
3660   MAME_DIR .. "src/mame/video/tc0110pcr.h",
28943661   MAME_DIR .. "src/mame/video/tc0180vcu.cpp",
3662   MAME_DIR .. "src/mame/video/tc0180vcu.h",
28953663}
28963664
28973665createMAMEProjects(_target, _subtarget, "tatsumi")
28983666files {
28993667   MAME_DIR .. "src/mame/drivers/kingdrby.cpp",
29003668   MAME_DIR .. "src/mame/drivers/lockon.cpp",
3669   MAME_DIR .. "src/mame/includes/lockon.h",
29013670   MAME_DIR .. "src/mame/video/lockon.cpp",
29023671   MAME_DIR .. "src/mame/drivers/tatsumi.cpp",
3672   MAME_DIR .. "src/mame/includes/tatsumi.h",
29033673   MAME_DIR .. "src/mame/machine/tatsumi.cpp",
29043674   MAME_DIR .. "src/mame/video/tatsumi.cpp",
29053675   MAME_DIR .. "src/mame/drivers/tx1.cpp",
3676   MAME_DIR .. "src/mame/includes/tx1.h",
29063677   MAME_DIR .. "src/mame/machine/tx1.cpp",
29073678   MAME_DIR .. "src/mame/audio/tx1.cpp",
29083679   MAME_DIR .. "src/mame/video/tx1.cpp",
r250291r250292
29113682createMAMEProjects(_target, _subtarget, "tch")
29123683files {
29133684   MAME_DIR .. "src/mame/drivers/kickgoal.cpp",
3685   MAME_DIR .. "src/mame/includes/kickgoal.h",
29143686   MAME_DIR .. "src/mame/video/kickgoal.cpp",
29153687   MAME_DIR .. "src/mame/drivers/littlerb.cpp",
29163688   MAME_DIR .. "src/mame/drivers/rltennis.cpp",
3689   MAME_DIR .. "src/mame/includes/rltennis.h",
29173690   MAME_DIR .. "src/mame/video/rltennis.cpp",
29183691   MAME_DIR .. "src/mame/drivers/speedspn.cpp",
3692   MAME_DIR .. "src/mame/includes/speedspn.h",
29193693   MAME_DIR .. "src/mame/video/speedspn.cpp",
29203694   MAME_DIR .. "src/mame/drivers/wheelfir.cpp",
29213695}
r250291r250292
29233697createMAMEProjects(_target, _subtarget, "tecfri")
29243698files {
29253699   MAME_DIR .. "src/mame/drivers/ambush.cpp",
3700   MAME_DIR .. "src/mame/includes/ambush.h",
29263701   MAME_DIR .. "src/mame/video/ambush.cpp",
29273702   MAME_DIR .. "src/mame/drivers/holeland.cpp",
3703   MAME_DIR .. "src/mame/includes/holeland.h",
29283704   MAME_DIR .. "src/mame/video/holeland.cpp",
29293705   MAME_DIR .. "src/mame/drivers/sauro.cpp",
3706   MAME_DIR .. "src/mame/includes/sauro.h",
29303707   MAME_DIR .. "src/mame/video/sauro.cpp",
29313708   MAME_DIR .. "src/mame/drivers/speedbal.cpp",
3709   MAME_DIR .. "src/mame/includes/speedbal.h",
29323710   MAME_DIR .. "src/mame/video/speedbal.cpp",
29333711}
29343712
29353713createMAMEProjects(_target, _subtarget, "technos")
29363714files {
29373715   MAME_DIR .. "src/mame/drivers/battlane.cpp",
3716   MAME_DIR .. "src/mame/includes/battlane.h",
29383717   MAME_DIR .. "src/mame/video/battlane.cpp",
29393718   MAME_DIR .. "src/mame/drivers/blockout.cpp",
3719   MAME_DIR .. "src/mame/includes/blockout.h",
29403720   MAME_DIR .. "src/mame/video/blockout.cpp",
29413721   MAME_DIR .. "src/mame/drivers/bogeyman.cpp",
3722   MAME_DIR .. "src/mame/includes/bogeyman.h",
29423723   MAME_DIR .. "src/mame/video/bogeyman.cpp",
29433724   MAME_DIR .. "src/mame/drivers/chinagat.cpp",
29443725   MAME_DIR .. "src/mame/drivers/ddragon.cpp",
3726   MAME_DIR .. "src/mame/includes/ddragon.h",
29453727   MAME_DIR .. "src/mame/video/ddragon.cpp",
29463728   MAME_DIR .. "src/mame/drivers/ddragon3.cpp",
3729   MAME_DIR .. "src/mame/includes/ddragon3.h",
29473730   MAME_DIR .. "src/mame/video/ddragon3.cpp",
29483731   MAME_DIR .. "src/mame/drivers/dogfgt.cpp",
3732   MAME_DIR .. "src/mame/includes/dogfgt.h",
29493733   MAME_DIR .. "src/mame/video/dogfgt.cpp",
29503734   MAME_DIR .. "src/mame/drivers/matmania.cpp",
3735   MAME_DIR .. "src/mame/includes/matmania.h",
29513736   MAME_DIR .. "src/mame/video/matmania.cpp",
29523737   MAME_DIR .. "src/mame/drivers/mystston.cpp",
3738   MAME_DIR .. "src/mame/includes/mystston.h",
29533739   MAME_DIR .. "src/mame/video/mystston.cpp",
29543740   MAME_DIR .. "src/mame/drivers/renegade.cpp",
3741   MAME_DIR .. "src/mame/includes/renegade.h",
29553742   MAME_DIR .. "src/mame/video/renegade.cpp",
29563743   MAME_DIR .. "src/mame/drivers/scregg.cpp",
29573744   MAME_DIR .. "src/mame/drivers/shadfrce.cpp",
3745   MAME_DIR .. "src/mame/includes/shadfrce.h",
29583746   MAME_DIR .. "src/mame/video/shadfrce.cpp",
29593747   MAME_DIR .. "src/mame/drivers/spdodgeb.cpp",
3748   MAME_DIR .. "src/mame/includes/spdodgeb.h",
29603749   MAME_DIR .. "src/mame/video/spdodgeb.cpp",
29613750   MAME_DIR .. "src/mame/drivers/ssozumo.cpp",
3751   MAME_DIR .. "src/mame/includes/ssozumo.h",
29623752   MAME_DIR .. "src/mame/video/ssozumo.cpp",
29633753   MAME_DIR .. "src/mame/drivers/tagteam.cpp",
3754   MAME_DIR .. "src/mame/includes/tagteam.h",
29643755   MAME_DIR .. "src/mame/video/tagteam.cpp",
29653756   MAME_DIR .. "src/mame/drivers/vball.cpp",
3757   MAME_DIR .. "src/mame/includes/vball.h",
29663758   MAME_DIR .. "src/mame/video/vball.cpp",
29673759   MAME_DIR .. "src/mame/drivers/wwfsstar.cpp",
3760   MAME_DIR .. "src/mame/includes/wwfsstar.h",
29683761   MAME_DIR .. "src/mame/video/wwfsstar.cpp",
29693762   MAME_DIR .. "src/mame/drivers/xain.cpp",
3763   MAME_DIR .. "src/mame/includes/xain.h",
29703764   MAME_DIR .. "src/mame/video/xain.cpp",
29713765}
29723766
29733767createMAMEProjects(_target, _subtarget, "tehkan")
29743768files {
29753769   MAME_DIR .. "src/mame/video/tecmo_spr.cpp",
3770   MAME_DIR .. "src/mame/video/tecmo_spr.h",
29763771   MAME_DIR .. "src/mame/video/tecmo_mix.cpp",
3772   MAME_DIR .. "src/mame/video/tecmo_mix.h",
29773773   MAME_DIR .. "src/mame/drivers/bombjack.cpp",
3774   MAME_DIR .. "src/mame/includes/bombjack.h",
29783775   MAME_DIR .. "src/mame/video/bombjack.cpp",
29793776   MAME_DIR .. "src/mame/drivers/gaiden.cpp",
3777   MAME_DIR .. "src/mame/includes/gaiden.h",
29803778   MAME_DIR .. "src/mame/video/gaiden.cpp",
29813779   MAME_DIR .. "src/mame/drivers/lvcards.cpp",
3780   MAME_DIR .. "src/mame/includes/lvcards.h",
29823781   MAME_DIR .. "src/mame/video/lvcards.cpp",
29833782   MAME_DIR .. "src/mame/drivers/pbaction.cpp",
3783   MAME_DIR .. "src/mame/includes/pbaction.h",
29843784   MAME_DIR .. "src/mame/video/pbaction.cpp",
29853785   MAME_DIR .. "src/mame/drivers/senjyo.cpp",
3786   MAME_DIR .. "src/mame/includes/senjyo.h",
29863787   MAME_DIR .. "src/mame/audio/senjyo.cpp",
29873788   MAME_DIR .. "src/mame/video/senjyo.cpp",
29883789   MAME_DIR .. "src/mame/drivers/solomon.cpp",
3790   MAME_DIR .. "src/mame/includes/solomon.h",
29893791   MAME_DIR .. "src/mame/video/solomon.cpp",
29903792   MAME_DIR .. "src/mame/drivers/spbactn.cpp",
3793   MAME_DIR .. "src/mame/includes/spbactn.h",
29913794   MAME_DIR .. "src/mame/video/spbactn.cpp",
29923795   MAME_DIR .. "src/mame/drivers/tbowl.cpp",
3796   MAME_DIR .. "src/mame/includes/tbowl.h",
29933797   MAME_DIR .. "src/mame/video/tbowl.cpp",
29943798   MAME_DIR .. "src/mame/drivers/tecmo.cpp",
3799   MAME_DIR .. "src/mame/includes/tecmo.h",
29953800   MAME_DIR .. "src/mame/video/tecmo.cpp",
29963801   MAME_DIR .. "src/mame/drivers/tecmo16.cpp",
3802   MAME_DIR .. "src/mame/includes/tecmo16.h",
29973803   MAME_DIR .. "src/mame/video/tecmo16.cpp",
29983804   MAME_DIR .. "src/mame/drivers/tecmosys.cpp",
3805   MAME_DIR .. "src/mame/includes/tecmosys.h",
29993806   MAME_DIR .. "src/mame/machine/tecmosys.cpp",
30003807   MAME_DIR .. "src/mame/video/tecmosys.cpp",
30013808   MAME_DIR .. "src/mame/drivers/tehkanwc.cpp",
3809   MAME_DIR .. "src/mame/includes/tehkanwc.h",
30023810   MAME_DIR .. "src/mame/video/tehkanwc.cpp",
30033811   MAME_DIR .. "src/mame/drivers/wc90.cpp",
3812   MAME_DIR .. "src/mame/includes/wc90.h",
30043813   MAME_DIR .. "src/mame/video/wc90.cpp",
30053814   MAME_DIR .. "src/mame/drivers/wc90b.cpp",
3815   MAME_DIR .. "src/mame/includes/wc90b.h",
30063816   MAME_DIR .. "src/mame/video/wc90b.cpp",
30073817}
30083818
30093819createMAMEProjects(_target, _subtarget, "thepit")
30103820files {
30113821   MAME_DIR .. "src/mame/drivers/thepit.cpp",
3822   MAME_DIR .. "src/mame/includes/thepit.h",
30123823   MAME_DIR .. "src/mame/video/thepit.cpp",
30133824   MAME_DIR .. "src/mame/drivers/timelimt.cpp",
3825   MAME_DIR .. "src/mame/includes/timelimt.h",
30143826   MAME_DIR .. "src/mame/video/timelimt.cpp",
30153827}
30163828
r250291r250292
30183830files {
30193831   MAME_DIR .. "src/mame/drivers/mjsister.cpp",
30203832   MAME_DIR .. "src/mame/drivers/slapfght.cpp",
3833   MAME_DIR .. "src/mame/includes/slapfght.h",
30213834   MAME_DIR .. "src/mame/machine/slapfght.cpp",
30223835   MAME_DIR .. "src/mame/video/slapfght.cpp",
30233836   MAME_DIR .. "src/mame/drivers/snowbros.cpp",
3837   MAME_DIR .. "src/mame/includes/snowbros.h",
30243838   MAME_DIR .. "src/mame/video/kan_pand.cpp",
3839   MAME_DIR .. "src/mame/video/kan_pand.h",
30253840   MAME_DIR .. "src/mame/video/kan_panb.cpp",
30263841   MAME_DIR .. "src/mame/drivers/toaplan1.cpp",
3842   MAME_DIR .. "src/mame/includes/toaplan1.h",
30273843   MAME_DIR .. "src/mame/machine/toaplan1.cpp",
30283844   MAME_DIR .. "src/mame/video/toaplan1.cpp",
3845   MAME_DIR .. "src/mame/includes/toaplipt.h",
30293846   MAME_DIR .. "src/mame/drivers/toaplan2.cpp",
3847   MAME_DIR .. "src/mame/includes/toaplan2.h",
30303848   MAME_DIR .. "src/mame/video/toaplan2.cpp",
30313849   MAME_DIR .. "src/mame/video/gp9001.cpp",
3850   MAME_DIR .. "src/mame/video/gp9001.h",
30323851   MAME_DIR .. "src/mame/drivers/twincobr.cpp",
3852   MAME_DIR .. "src/mame/includes/twincobr.h",
30333853   MAME_DIR .. "src/mame/machine/twincobr.cpp",
30343854   MAME_DIR .. "src/mame/video/twincobr.cpp",
30353855   MAME_DIR .. "src/mame/drivers/wardner.cpp",
30363856   MAME_DIR .. "src/mame/video/toaplan_scu.cpp",
3857   MAME_DIR .. "src/mame/video/toaplan_scu.h",
30373858}
30383859
30393860createMAMEProjects(_target, _subtarget, "tong")
30403861files {
30413862   MAME_DIR .. "src/mame/drivers/beezer.cpp",
3863   MAME_DIR .. "src/mame/includes/beezer.h",
30423864   MAME_DIR .. "src/mame/machine/beezer.cpp",
30433865   MAME_DIR .. "src/mame/video/beezer.cpp",
30443866   MAME_DIR .. "src/mame/audio/beezer.cpp",
r250291r250292
30473869createMAMEProjects(_target, _subtarget, "unico")
30483870files {
30493871   MAME_DIR .. "src/mame/drivers/drgnmst.cpp",
3872   MAME_DIR .. "src/mame/includes/drgnmst.h",
30503873   MAME_DIR .. "src/mame/video/drgnmst.cpp",
30513874   MAME_DIR .. "src/mame/drivers/silkroad.cpp",
3875   MAME_DIR .. "src/mame/includes/silkroad.h",
30523876   MAME_DIR .. "src/mame/video/silkroad.cpp",
30533877   MAME_DIR .. "src/mame/drivers/unico.cpp",
3878   MAME_DIR .. "src/mame/includes/unico.h",
30543879   MAME_DIR .. "src/mame/video/unico.cpp",
30553880}
30563881
30573882createMAMEProjects(_target, _subtarget, "univers")
30583883files {
30593884   MAME_DIR .. "src/mame/drivers/cheekyms.cpp",
3885   MAME_DIR .. "src/mame/includes/cheekyms.h",
30603886   MAME_DIR .. "src/mame/video/cheekyms.cpp",
30613887   MAME_DIR .. "src/mame/drivers/cosmic.cpp",
3888   MAME_DIR .. "src/mame/includes/cosmic.h",
30623889   MAME_DIR .. "src/mame/video/cosmic.cpp",
30633890   MAME_DIR .. "src/mame/drivers/docastle.cpp",
3891   MAME_DIR .. "src/mame/includes/docastle.h",
30643892   MAME_DIR .. "src/mame/machine/docastle.cpp",
30653893   MAME_DIR .. "src/mame/video/docastle.cpp",
30663894   MAME_DIR .. "src/mame/drivers/ladybug.cpp",
3895   MAME_DIR .. "src/mame/includes/ladybug.h",
30673896   MAME_DIR .. "src/mame/video/ladybug.cpp",
30683897   MAME_DIR .. "src/mame/drivers/mrdo.cpp",
3898   MAME_DIR .. "src/mame/includes/mrdo.h",
30693899   MAME_DIR .. "src/mame/video/mrdo.cpp",
30703900   MAME_DIR .. "src/mame/drivers/redclash.cpp",
30713901   MAME_DIR .. "src/mame/video/redclash.cpp",
r250291r250292
30753905createMAMEProjects(_target, _subtarget, "upl")
30763906files {
30773907   MAME_DIR .. "src/mame/drivers/mouser.cpp",
3908   MAME_DIR .. "src/mame/includes/mouser.h",
30783909   MAME_DIR .. "src/mame/video/mouser.cpp",
30793910   MAME_DIR .. "src/mame/drivers/ninjakd2.cpp",
3911   MAME_DIR .. "src/mame/includes/ninjakd2.h",
30803912   MAME_DIR .. "src/mame/video/ninjakd2.cpp",
30813913   MAME_DIR .. "src/mame/drivers/nova2001.cpp",
3914   MAME_DIR .. "src/mame/includes/nova2001.h",
30823915   MAME_DIR .. "src/mame/video/nova2001.cpp",
30833916   MAME_DIR .. "src/mame/drivers/xxmissio.cpp",
3917   MAME_DIR .. "src/mame/includes/xxmissio.h",
30843918   MAME_DIR .. "src/mame/video/xxmissio.cpp",
30853919}
30863920
30873921createMAMEProjects(_target, _subtarget, "valadon")
30883922files {
30893923   MAME_DIR .. "src/mame/drivers/bagman.cpp",
3924   MAME_DIR .. "src/mame/includes/bagman.h",
30903925   MAME_DIR .. "src/mame/machine/bagman.cpp",
30913926   MAME_DIR .. "src/mame/video/bagman.cpp",
30923927   MAME_DIR .. "src/mame/drivers/tankbust.cpp",
3928   MAME_DIR .. "src/mame/includes/tankbust.h",
30933929   MAME_DIR .. "src/mame/video/tankbust.cpp",
30943930}
30953931
r250291r250292
31033939files {
31043940   MAME_DIR .. "src/mame/drivers/looping.cpp",
31053941   MAME_DIR .. "src/mame/drivers/spcforce.cpp",
3942   MAME_DIR .. "src/mame/includes/spcforce.h",
31063943   MAME_DIR .. "src/mame/video/spcforce.cpp",
31073944   MAME_DIR .. "src/mame/drivers/suprridr.cpp",
3945   MAME_DIR .. "src/mame/includes/suprridr.h",
31083946   MAME_DIR .. "src/mame/video/suprridr.cpp",
31093947}
31103948
31113949createMAMEProjects(_target, _subtarget, "vsystem")
31123950files {
31133951   MAME_DIR .. "src/mame/video/vsystem_spr.cpp",
3952   MAME_DIR .. "src/mame/video/vsystem_spr.h",
31143953   MAME_DIR .. "src/mame/video/vsystem_spr2.cpp",
3954   MAME_DIR .. "src/mame/video/vsystem_spr2.h",
31153955   MAME_DIR .. "src/mame/drivers/aerofgt.cpp",
3956   MAME_DIR .. "src/mame/includes/aerofgt.h",
31163957   MAME_DIR .. "src/mame/video/aerofgt.cpp",
31173958   MAME_DIR .. "src/mame/drivers/crshrace.cpp",
3959   MAME_DIR .. "src/mame/includes/crshrace.h",
31183960   MAME_DIR .. "src/mame/video/crshrace.cpp",
31193961   MAME_DIR .. "src/mame/drivers/f1gp.cpp",
3962   MAME_DIR .. "src/mame/includes/f1gp.h",
31203963   MAME_DIR .. "src/mame/video/f1gp.cpp",
31213964   MAME_DIR .. "src/mame/drivers/fromance.cpp",
3965   MAME_DIR .. "src/mame/includes/fromance.h",
31223966   MAME_DIR .. "src/mame/video/fromance.cpp",
31233967   MAME_DIR .. "src/mame/drivers/fromanc2.cpp",
3968   MAME_DIR .. "src/mame/includes/fromanc2.h",
31243969   MAME_DIR .. "src/mame/video/fromanc2.cpp",
31253970   MAME_DIR .. "src/mame/drivers/gstriker.cpp",
3971   MAME_DIR .. "src/mame/includes/gstriker.h",
31263972   MAME_DIR .. "src/mame/video/gstriker.cpp",
31273973   MAME_DIR .. "src/mame/video/mb60553.cpp",
3974   MAME_DIR .. "src/mame/video/mb60553.h",
31283975   MAME_DIR .. "src/mame/video/vs920a.cpp",
3976   MAME_DIR .. "src/mame/video/vs920a.h",
31293977   MAME_DIR .. "src/mame/drivers/inufuku.cpp",
3978   MAME_DIR .. "src/mame/includes/inufuku.h",
31303979   MAME_DIR .. "src/mame/video/inufuku.cpp",
31313980   MAME_DIR .. "src/mame/drivers/ojankohs.cpp",
3981   MAME_DIR .. "src/mame/includes/ojankohs.h",
31323982   MAME_DIR .. "src/mame/video/ojankohs.cpp",
31333983   MAME_DIR .. "src/mame/drivers/pipedrm.cpp",
31343984   MAME_DIR .. "src/mame/drivers/rpunch.cpp",
3985   MAME_DIR .. "src/mame/includes/rpunch.h",
31353986   MAME_DIR .. "src/mame/video/rpunch.cpp",
31363987   MAME_DIR .. "src/mame/drivers/suprslam.cpp",
3988   MAME_DIR .. "src/mame/includes/suprslam.h",
31373989   MAME_DIR .. "src/mame/video/suprslam.cpp",
31383990   MAME_DIR .. "src/mame/drivers/tail2nos.cpp",
3991   MAME_DIR .. "src/mame/includes/tail2nos.h",
31393992   MAME_DIR .. "src/mame/video/tail2nos.cpp",
31403993   MAME_DIR .. "src/mame/drivers/taotaido.cpp",
3994   MAME_DIR .. "src/mame/includes/taotaido.h",
31413995   MAME_DIR .. "src/mame/video/taotaido.cpp",
31423996   MAME_DIR .. "src/mame/drivers/welltris.cpp",
3997   MAME_DIR .. "src/mame/includes/welltris.h",
31433998   MAME_DIR .. "src/mame/video/welltris.cpp",
31443999}
31454000
r250291r250292
31474002files {
31484003   MAME_DIR .. "src/mame/drivers/nmg5.cpp",
31494004   MAME_DIR .. "src/mame/drivers/paradise.cpp",
4005   MAME_DIR .. "src/mame/includes/paradise.h",
31504006   MAME_DIR .. "src/mame/video/paradise.cpp",
31514007   MAME_DIR .. "src/mame/drivers/yunsung8.cpp",
4008   MAME_DIR .. "src/mame/includes/yunsung8.h",
31524009   MAME_DIR .. "src/mame/video/yunsung8.cpp",
31534010   MAME_DIR .. "src/mame/drivers/yunsun16.cpp",
4011   MAME_DIR .. "src/mame/includes/yunsun16.h",
31544012   MAME_DIR .. "src/mame/video/yunsun16.cpp",
31554013}
31564014
31574015createMAMEProjects(_target, _subtarget, "zaccaria")
31584016files {
31594017   MAME_DIR .. "src/mame/drivers/laserbat.cpp",
4018   MAME_DIR .. "src/mame/includes/laserbat.h",
31604019   MAME_DIR .. "src/mame/audio/laserbat.cpp",
31614020   MAME_DIR .. "src/mame/drivers/seabattl.cpp",
31624021   MAME_DIR .. "src/mame/drivers/zac2650.cpp",
4022   MAME_DIR .. "src/mame/includes/zac2650.h",
31634023   MAME_DIR .. "src/mame/video/zac2650.cpp",
31644024   MAME_DIR .. "src/mame/drivers/zaccaria.cpp",
4025   MAME_DIR .. "src/mame/includes/zaccaria.h",
31654026   MAME_DIR .. "src/mame/video/zaccaria.cpp",
31664027}
31674028
r250291r250292
31854046   MAME_DIR .. "src/mame/drivers/de_2.cpp",
31864047   MAME_DIR .. "src/mame/drivers/de_3.cpp",
31874048   MAME_DIR .. "src/mame/machine/decopincpu.cpp",
4049   MAME_DIR .. "src/mame/machine/decopincpu.h",
31884050   MAME_DIR .. "src/mame/video/decodmd1.cpp",
4051   MAME_DIR .. "src/mame/video/decodmd1.h",
31894052   MAME_DIR .. "src/mame/video/decodmd2.cpp",
4053   MAME_DIR .. "src/mame/video/decodmd2.h",
31904054   MAME_DIR .. "src/mame/video/decodmd3.cpp",
4055   MAME_DIR .. "src/mame/video/decodmd3.h",
31914056   MAME_DIR .. "src/mame/drivers/de_3b.cpp",
31924057   MAME_DIR .. "src/mame/drivers/flicker.cpp",
31934058   MAME_DIR .. "src/mame/drivers/g627.cpp",
31944059   MAME_DIR .. "src/mame/drivers/gp_1.cpp",
31954060   MAME_DIR .. "src/mame/machine/genpin.cpp",
4061   MAME_DIR .. "src/mame/machine/genpin.h",
31964062   MAME_DIR .. "src/mame/drivers/gp_2.cpp",
31974063   MAME_DIR .. "src/mame/drivers/gts1.cpp",
31984064   MAME_DIR .. "src/mame/drivers/gts3.cpp",
r250291r250292
32194085   MAME_DIR .. "src/mame/drivers/play_5.cpp",
32204086   MAME_DIR .. "src/mame/drivers/rowamet.cpp",
32214087   MAME_DIR .. "src/mame/drivers/s11.cpp",
4088   MAME_DIR .. "src/mame/includes/s11.h",
32224089   MAME_DIR .. "src/mame/drivers/s11a.cpp",
32234090   MAME_DIR .. "src/mame/drivers/s11b.cpp",
32244091   MAME_DIR .. "src/mame/drivers/s11c.cpp",
32254092   MAME_DIR .. "src/mame/audio/s11c_bg.cpp",
4093   MAME_DIR .. "src/mame/audio/s11c_bg.h",
32264094   MAME_DIR .. "src/mame/drivers/s3.cpp",
32274095   MAME_DIR .. "src/mame/drivers/s4.cpp",
32284096   MAME_DIR .. "src/mame/drivers/s6.cpp",
r250291r250292
32514119   MAME_DIR .. "src/mame/drivers/wpc_flip2.cpp",
32524120   MAME_DIR .. "src/mame/drivers/wpc_s.cpp",
32534121   MAME_DIR .. "src/mame/machine/wpc.cpp",
4122   MAME_DIR .. "src/mame/machine/wpc.h",
4123   MAME_DIR .. "src/mame/includes/wpc_pin.h",
32544124   MAME_DIR .. "src/mame/audio/wpcsnd.cpp",
4125   MAME_DIR .. "src/mame/audio/wpcsnd.h",
32554126   MAME_DIR .. "src/mame/video/wpc_dmd.cpp",
4127   MAME_DIR .. "src/mame/video/wpc_dmd.h",
32564128   MAME_DIR .. "src/mame/machine/wpc_pic.cpp",
4129   MAME_DIR .. "src/mame/machine/wpc_pic.h",
32574130   MAME_DIR .. "src/mame/machine/wpc_lamp.cpp",
4131   MAME_DIR .. "src/mame/machine/wpc_lamp.h",
32584132   MAME_DIR .. "src/mame/machine/wpc_out.cpp",
4133   MAME_DIR .. "src/mame/machine/wpc_out.h",
32594134   MAME_DIR .. "src/mame/machine/wpc_shift.cpp",
4135   MAME_DIR .. "src/mame/machine/wpc_shift.h",
32604136   MAME_DIR .. "src/mame/drivers/zac_1.cpp",
32614137   MAME_DIR .. "src/mame/drivers/zac_2.cpp",
32624138   MAME_DIR .. "src/mame/drivers/zac_proto.cpp",
r250291r250292
32704146files {
32714147   MAME_DIR .. "src/mame/drivers/1945kiii.cpp",
32724148   MAME_DIR .. "src/mame/drivers/39in1.cpp",
4149   MAME_DIR .. "src/mame/machine/pxa255.h",
32734150   MAME_DIR .. "src/mame/drivers/3do.cpp",
4151   MAME_DIR .. "src/mame/includes/3do.h",
32744152   MAME_DIR .. "src/mame/machine/3do.cpp",
32754153   MAME_DIR .. "src/mame/drivers/3x3puzzl.cpp",
32764154   MAME_DIR .. "src/mame/drivers/4enraya.cpp",
4155   MAME_DIR .. "src/mame/includes/4enraya.h",
32774156   MAME_DIR .. "src/mame/video/4enraya.cpp",
32784157   MAME_DIR .. "src/mame/drivers/4enlinea.cpp",
32794158   MAME_DIR .. "src/mame/drivers/5clown.cpp",
r250291r250292
32854164   MAME_DIR .. "src/mame/drivers/alinvade.cpp",
32864165   MAME_DIR .. "src/mame/drivers/amaticmg.cpp",
32874166   MAME_DIR .. "src/mame/drivers/ampoker2.cpp",
4167   MAME_DIR .. "src/mame/includes/ampoker2.h",
32884168   MAME_DIR .. "src/mame/video/ampoker2.cpp",
32894169   MAME_DIR .. "src/mame/drivers/amspdwy.cpp",
4170   MAME_DIR .. "src/mame/includes/amspdwy.h",
32904171   MAME_DIR .. "src/mame/video/amspdwy.cpp",
32914172   MAME_DIR .. "src/mame/drivers/amusco.cpp",
32924173   MAME_DIR .. "src/mame/drivers/arachnid.cpp",
32934174   MAME_DIR .. "src/mame/drivers/artmagic.cpp",
4175   MAME_DIR .. "src/mame/includes/artmagic.h",
32944176   MAME_DIR .. "src/mame/video/artmagic.cpp",
32954177   MAME_DIR .. "src/mame/drivers/astrafr.cpp",
32964178   MAME_DIR .. "src/mame/drivers/astrcorp.cpp",
r250291r250292
32994181   MAME_DIR .. "src/mame/drivers/attckufo.cpp",
33004182   MAME_DIR .. "src/mame/drivers/avt.cpp",
33014183   MAME_DIR .. "src/mame/drivers/aztarac.cpp",
4184   MAME_DIR .. "src/mame/includes/aztarac.h",
33024185   MAME_DIR .. "src/mame/audio/aztarac.cpp",
33034186   MAME_DIR .. "src/mame/video/aztarac.cpp",
33044187   MAME_DIR .. "src/mame/drivers/bailey.cpp",
r250291r250292
33114194   MAME_DIR .. "src/mame/drivers/blitz68k.cpp",
33124195   MAME_DIR .. "src/mame/drivers/buster.cpp",
33134196   MAME_DIR .. "src/mame/drivers/calomega.cpp",
4197   MAME_DIR .. "src/mame/includes/calomega.h",
33144198   MAME_DIR .. "src/mame/video/calomega.cpp",
33154199   MAME_DIR .. "src/mame/drivers/carrera.cpp",
33164200   MAME_DIR .. "src/mame/drivers/castle.cpp",
33174201   MAME_DIR .. "src/mame/drivers/cave.cpp",
4202   MAME_DIR .. "src/mame/includes/cave.h",
33184203   MAME_DIR .. "src/mame/video/cave.cpp",
33194204   MAME_DIR .. "src/mame/drivers/cavepc.cpp",
33204205   MAME_DIR .. "src/mame/drivers/cv1k.cpp",
33214206   MAME_DIR .. "src/mame/drivers/cb2001.cpp",
33224207   MAME_DIR .. "src/mame/drivers/cdi.cpp",
4208   MAME_DIR .. "src/mame/includes/cdi.h",
33234209   MAME_DIR .. "src/mame/video/mcd212.cpp",
4210   MAME_DIR .. "src/mame/video/mcd212.h",
33244211   MAME_DIR .. "src/mame/machine/cdi070.cpp",
4212   MAME_DIR .. "src/mame/machine/cdi070.h",
33254213   MAME_DIR .. "src/mame/machine/cdislave.cpp",
4214   MAME_DIR .. "src/mame/machine/cdislave.h",
33264215   MAME_DIR .. "src/mame/machine/cdicdic.cpp",
4216   MAME_DIR .. "src/mame/machine/cdicdic.h",
33274217   MAME_DIR .. "src/mame/drivers/cesclass.cpp",
33284218   MAME_DIR .. "src/mame/drivers/chance32.cpp",
33294219   MAME_DIR .. "src/mame/drivers/chexx.cpp",
33304220   MAME_DIR .. "src/mame/drivers/chicago.cpp",
33314221   MAME_DIR .. "src/mame/drivers/chsuper.cpp",
33324222   MAME_DIR .. "src/mame/drivers/cidelsa.cpp",
4223   MAME_DIR .. "src/mame/includes/cidelsa.h",
33334224   MAME_DIR .. "src/mame/video/cidelsa.cpp",
33344225   MAME_DIR .. "src/mame/drivers/cocoloco.cpp",
33354226   MAME_DIR .. "src/mame/drivers/coinmstr.cpp",
r250291r250292
33384229   MAME_DIR .. "src/mame/drivers/cupidon.cpp",
33394230   MAME_DIR .. "src/mame/drivers/bntyhunt.cpp",
33404231   MAME_DIR .. "src/mame/drivers/coolpool.cpp",
4232   MAME_DIR .. "src/mame/includes/coolpool.h",
33414233   MAME_DIR .. "src/mame/drivers/megaphx.cpp",
33424234   MAME_DIR .. "src/mame/machine/inder_sb.cpp",
4235   MAME_DIR .. "src/mame/machine/inder_sb.h",
33434236   MAME_DIR .. "src/mame/machine/inder_vid.cpp",
4237   MAME_DIR .. "src/mame/machine/inder_vid.h",
33444238   MAME_DIR .. "src/mame/drivers/corona.cpp",
33454239   MAME_DIR .. "src/mame/drivers/crystal.cpp",
33464240   MAME_DIR .. "src/mame/video/vrender0.cpp",
4241   MAME_DIR .. "src/mame/video/vrender0.h",
33474242   MAME_DIR .. "src/mame/drivers/cubeqst.cpp",
33484243   MAME_DIR .. "src/mame/drivers/cybertnk.cpp",
33494244   MAME_DIR .. "src/mame/drivers/dcheese.cpp",
4245   MAME_DIR .. "src/mame/includes/dcheese.h",
33504246   MAME_DIR .. "src/mame/video/dcheese.cpp",
33514247   MAME_DIR .. "src/mame/drivers/dfruit.cpp",
33524248   MAME_DIR .. "src/mame/drivers/dgpix.cpp",
r250291r250292
33554251   MAME_DIR .. "src/mame/drivers/dorachan.cpp",
33564252   MAME_DIR .. "src/mame/drivers/dreamwld.cpp",
33574253   MAME_DIR .. "src/mame/drivers/dribling.cpp",
4254   MAME_DIR .. "src/mame/includes/dribling.h",
33584255   MAME_DIR .. "src/mame/video/dribling.cpp",
33594256   MAME_DIR .. "src/mame/drivers/drw80pkr.cpp",
33604257   MAME_DIR .. "src/mame/drivers/dwarfd.cpp",
r250291r250292
33654262   MAME_DIR .. "src/mame/drivers/ecoinf3.cpp",
33664263   MAME_DIR .. "src/mame/drivers/electra.cpp",
33674264   MAME_DIR .. "src/mame/drivers/epos.cpp",
4265   MAME_DIR .. "src/mame/includes/epos.h",
33684266   MAME_DIR .. "src/mame/video/epos.cpp",
33694267   MAME_DIR .. "src/mame/drivers/esd16.cpp",
4268   MAME_DIR .. "src/mame/includes/esd16.h",
33704269   MAME_DIR .. "src/mame/video/esd16.cpp",
33714270   MAME_DIR .. "src/mame/drivers/esh.cpp",
33724271   MAME_DIR .. "src/mame/drivers/esripsys.cpp",
4272   MAME_DIR .. "src/mame/includes/esripsys.h",
33734273   MAME_DIR .. "src/mame/video/esripsys.cpp",
33744274   MAME_DIR .. "src/mame/drivers/ettrivia.cpp",
33754275   MAME_DIR .. "src/mame/drivers/extrema.cpp",
33764276   MAME_DIR .. "src/mame/drivers/fireball.cpp",
33774277   MAME_DIR .. "src/mame/drivers/flipjack.cpp",
33784278   MAME_DIR .. "src/mame/drivers/flower.cpp",
4279   MAME_DIR .. "src/mame/includes/flower.h",
33794280   MAME_DIR .. "src/mame/audio/flower.cpp",
33804281   MAME_DIR .. "src/mame/video/flower.cpp",
33814282   MAME_DIR .. "src/mame/drivers/fortecar.cpp",
33824283   MAME_DIR .. "src/mame/drivers/fresh.cpp",
33834284   MAME_DIR .. "src/mame/drivers/freekick.cpp",
4285   MAME_DIR .. "src/mame/includes/freekick.h",
33844286   MAME_DIR .. "src/mame/video/freekick.cpp",
33854287   MAME_DIR .. "src/mame/drivers/fungames.cpp",
33864288   MAME_DIR .. "src/mame/drivers/funkball.cpp",
r250291r250292
33984300   MAME_DIR .. "src/mame/drivers/goldnpkr.cpp",
33994301   MAME_DIR .. "src/mame/drivers/good.cpp",
34004302   MAME_DIR .. "src/mame/drivers/gotcha.cpp",
4303   MAME_DIR .. "src/mame/includes/gotcha.h",
34014304   MAME_DIR .. "src/mame/video/gotcha.cpp",
34024305   MAME_DIR .. "src/mame/drivers/gstream.cpp",
34034306   MAME_DIR .. "src/mame/drivers/gumbo.cpp",
4307   MAME_DIR .. "src/mame/includes/gumbo.h",
34044308   MAME_DIR .. "src/mame/video/gumbo.cpp",
34054309   MAME_DIR .. "src/mame/drivers/gunpey.cpp",
34064310   MAME_DIR .. "src/mame/drivers/hideseek.cpp",
r250291r250292
34084312   MAME_DIR .. "src/mame/drivers/headonb.cpp",
34094313   MAME_DIR .. "src/mame/drivers/highvdeo.cpp",
34104314   MAME_DIR .. "src/mame/drivers/himesiki.cpp",
4315   MAME_DIR .. "src/mame/includes/himesiki.h",
34114316   MAME_DIR .. "src/mame/video/himesiki.cpp",
34124317   MAME_DIR .. "src/mame/drivers/hitpoker.cpp",
34134318   MAME_DIR .. "src/mame/drivers/homedata.cpp",
4319   MAME_DIR .. "src/mame/includes/homedata.h",
34144320   MAME_DIR .. "src/mame/video/homedata.cpp",
34154321   MAME_DIR .. "src/mame/drivers/hotblock.cpp",
34164322   MAME_DIR .. "src/mame/drivers/hotstuff.cpp",
r250291r250292
34324338   MAME_DIR .. "src/mame/drivers/koikoi.cpp",
34334339   MAME_DIR .. "src/mame/drivers/kurukuru.cpp",
34344340   MAME_DIR .. "src/mame/drivers/kyugo.cpp",
4341   MAME_DIR .. "src/mame/includes/kyugo.h",
34354342   MAME_DIR .. "src/mame/video/kyugo.cpp",
34364343   MAME_DIR .. "src/mame/drivers/ladyfrog.cpp",
4344   MAME_DIR .. "src/mame/includes/ladyfrog.h",
34374345   MAME_DIR .. "src/mame/video/ladyfrog.cpp",
34384346   MAME_DIR .. "src/mame/drivers/laserbas.cpp",
34394347   MAME_DIR .. "src/mame/drivers/lethalj.cpp",
4348   MAME_DIR .. "src/mame/includes/lethalj.h",
34404349   MAME_DIR .. "src/mame/video/lethalj.cpp",
34414350   MAME_DIR .. "src/mame/drivers/limenko.cpp",
34424351   MAME_DIR .. "src/mame/drivers/ltcasino.cpp",
34434352   MAME_DIR .. "src/mame/drivers/lucky74.cpp",
4353   MAME_DIR .. "src/mame/includes/lucky74.h",
34444354   MAME_DIR .. "src/mame/video/lucky74.cpp",
34454355   MAME_DIR .. "src/mame/drivers/luckgrln.cpp",
34464356   MAME_DIR .. "src/mame/drivers/magic10.cpp",
r250291r250292
34504360   MAME_DIR .. "src/mame/drivers/magtouch.cpp",
34514361   MAME_DIR .. "src/mame/drivers/majorpkr.cpp",
34524362   MAME_DIR .. "src/mame/drivers/malzak.cpp",
4363   MAME_DIR .. "src/mame/includes/malzak.h",
34534364   MAME_DIR .. "src/mame/video/malzak.cpp",
34544365   MAME_DIR .. "src/mame/drivers/manohman.cpp",
34554366   MAME_DIR .. "src/mame/drivers/mcatadv.cpp",
4367   MAME_DIR .. "src/mame/includes/mcatadv.h",
34564368   MAME_DIR .. "src/mame/video/mcatadv.cpp",
34574369   MAME_DIR .. "src/mame/drivers/mgavegas.cpp",
34584370   MAME_DIR .. "src/mame/drivers/meyc8080.cpp",
34594371   MAME_DIR .. "src/mame/drivers/meyc8088.cpp",
34604372   MAME_DIR .. "src/mame/drivers/micro3d.cpp",
4373   MAME_DIR .. "src/mame/includes/micro3d.h",
34614374   MAME_DIR .. "src/mame/machine/micro3d.cpp",
34624375   MAME_DIR .. "src/mame/video/micro3d.cpp",
34634376   MAME_DIR .. "src/mame/audio/micro3d.cpp",
r250291r250292
34664379   MAME_DIR .. "src/mame/drivers/mirax.cpp",
34674380   MAME_DIR .. "src/mame/drivers/mole.cpp",
34684381   MAME_DIR .. "src/mame/drivers/mosaic.cpp",
4382   MAME_DIR .. "src/mame/includes/mosaic.h",
34694383   MAME_DIR .. "src/mame/video/mosaic.cpp",
34704384   MAME_DIR .. "src/mame/drivers/mpu12wbk.cpp",
34714385   MAME_DIR .. "src/mame/drivers/mrjong.cpp",
4386   MAME_DIR .. "src/mame/includes/mrjong.h",
34724387   MAME_DIR .. "src/mame/video/mrjong.cpp",
34734388   MAME_DIR .. "src/mame/drivers/multfish.cpp",
4389   MAME_DIR .. "src/mame/includes/multfish.h",
34744390   MAME_DIR .. "src/mame/drivers/multfish_boot.cpp",
34754391   MAME_DIR .. "src/mame/drivers/multfish_ref.cpp",
34764392   MAME_DIR .. "src/mame/drivers/murogem.cpp",
r250291r250292
34784394   MAME_DIR .. "src/mame/drivers/neoprint.cpp",
34794395   MAME_DIR .. "src/mame/drivers/neptunp2.cpp",
34804396   MAME_DIR .. "src/mame/drivers/news.cpp",
4397   MAME_DIR .. "src/mame/includes/news.h",
34814398   MAME_DIR .. "src/mame/video/news.cpp",
34824399   MAME_DIR .. "src/mame/drivers/nexus3d.cpp",
34834400   MAME_DIR .. "src/mame/drivers/norautp.cpp",
4401   MAME_DIR .. "src/mame/includes/norautp.h",
34844402   MAME_DIR .. "src/mame/audio/norautp.cpp",
34854403   MAME_DIR .. "src/mame/drivers/nsmpoker.cpp",
34864404   MAME_DIR .. "src/mame/drivers/oneshot.cpp",
4405   MAME_DIR .. "src/mame/includes/oneshot.h",
34874406   MAME_DIR .. "src/mame/video/oneshot.cpp",
34884407   MAME_DIR .. "src/mame/drivers/onetwo.cpp",
34894408   MAME_DIR .. "src/mame/drivers/othello.cpp",
34904409   MAME_DIR .. "src/mame/drivers/pachifev.cpp",
34914410   MAME_DIR .. "src/mame/drivers/pasha2.cpp",
34924411   MAME_DIR .. "src/mame/drivers/pass.cpp",
4412   MAME_DIR .. "src/mame/includes/pass.h",
34934413   MAME_DIR .. "src/mame/video/pass.cpp",
34944414   MAME_DIR .. "src/mame/drivers/peplus.cpp",
34954415   MAME_DIR .. "src/mame/drivers/photon.cpp",
r250291r250292
35024422   MAME_DIR .. "src/mame/drivers/pkscram.cpp",
35034423   MAME_DIR .. "src/mame/drivers/pntnpuzl.cpp",
35044424   MAME_DIR .. "src/mame/drivers/policetr.cpp",
4425   MAME_DIR .. "src/mame/includes/policetr.h",
35054426   MAME_DIR .. "src/mame/video/policetr.cpp",
35064427   MAME_DIR .. "src/mame/drivers/polyplay.cpp",
4428   MAME_DIR .. "src/mame/includes/polyplay.h",
35074429   MAME_DIR .. "src/mame/audio/polyplay.cpp",
35084430   MAME_DIR .. "src/mame/video/polyplay.cpp",
35094431   MAME_DIR .. "src/mame/drivers/poker72.cpp",
r250291r250292
35234445   MAME_DIR .. "src/mame/drivers/sealy.cpp",
35244446   MAME_DIR .. "src/mame/drivers/sfbonus.cpp",
35254447   MAME_DIR .. "src/mame/drivers/shangkid.cpp",
4448   MAME_DIR .. "src/mame/includes/shangkid.h",
35264449   MAME_DIR .. "src/mame/video/shangkid.cpp",
35274450   MAME_DIR .. "src/mame/drivers/skeetsht.cpp",
35284451   MAME_DIR .. "src/mame/drivers/skimaxx.cpp",
r250291r250292
35354458   MAME_DIR .. "src/mame/drivers/splus.cpp",
35364459   MAME_DIR .. "src/mame/drivers/spool99.cpp",
35374460   MAME_DIR .. "src/mame/drivers/sprcros2.cpp",
4461   MAME_DIR .. "src/mame/includes/sprcros2.h",
35384462   MAME_DIR .. "src/mame/video/sprcros2.cpp",
35394463   MAME_DIR .. "src/mame/drivers/sshot.cpp",
35404464   MAME_DIR .. "src/mame/drivers/ssingles.cpp",
r250291r250292
35524476   MAME_DIR .. "src/mame/drivers/tapatune.cpp",
35534477   MAME_DIR .. "src/mame/drivers/tattack.cpp",
35544478   MAME_DIR .. "src/mame/drivers/taxidriv.cpp",
4479   MAME_DIR .. "src/mame/includes/taxidriv.h",
35554480   MAME_DIR .. "src/mame/video/taxidriv.cpp",
35564481   MAME_DIR .. "src/mame/drivers/tcl.cpp",
35574482   MAME_DIR .. "src/mame/drivers/thayers.cpp",
35584483   MAME_DIR .. "src/mame/drivers/thedeep.cpp",
4484   MAME_DIR .. "src/mame/includes/thedeep.h",
35594485   MAME_DIR .. "src/mame/video/thedeep.cpp",
35604486   MAME_DIR .. "src/mame/drivers/tiamc1.cpp",
4487   MAME_DIR .. "src/mame/includes/tiamc1.h",
35614488   MAME_DIR .. "src/mame/video/tiamc1.cpp",
35624489   MAME_DIR .. "src/mame/audio/tiamc1.cpp",
35634490   MAME_DIR .. "src/mame/drivers/tickee.cpp",
35644491   MAME_DIR .. "src/mame/drivers/tmspoker.cpp",
35654492   MAME_DIR .. "src/mame/drivers/truco.cpp",
4493   MAME_DIR .. "src/mame/includes/truco.h",
35664494   MAME_DIR .. "src/mame/video/truco.cpp",
35674495   MAME_DIR .. "src/mame/drivers/trucocl.cpp",
4496   MAME_DIR .. "src/mame/includes/trucocl.h",
35684497   MAME_DIR .. "src/mame/video/trucocl.cpp",
35694498   MAME_DIR .. "src/mame/drivers/trvmadns.cpp",
35704499   MAME_DIR .. "src/mame/drivers/trvquest.cpp",
r250291r250292
35744503   MAME_DIR .. "src/mame/drivers/unkfr.cpp",
35754504   MAME_DIR .. "src/mame/drivers/unkhorse.cpp",
35764505   MAME_DIR .. "src/mame/drivers/usgames.cpp",
4506   MAME_DIR .. "src/mame/includes/usgames.h",
35774507   MAME_DIR .. "src/mame/video/usgames.cpp",
35784508   MAME_DIR .. "src/mame/drivers/vamphalf.cpp",
35794509   MAME_DIR .. "src/mame/drivers/vcombat.cpp",
35804510   MAME_DIR .. "src/mame/drivers/vectrex.cpp",
4511   MAME_DIR .. "src/mame/includes/vectrex.h",
35814512   MAME_DIR .. "src/mame/video/vectrex.cpp",
35824513   MAME_DIR .. "src/mame/machine/vectrex.cpp",
35834514   MAME_DIR .. "src/mame/drivers/videopkr.cpp",
r250291r250292
35914522   MAME_DIR .. "src/mame/drivers/wacky_gator.cpp",
35924523   MAME_DIR .. "src/mame/drivers/xtom3d.cpp",
35934524   MAME_DIR .. "src/mame/drivers/xyonix.cpp",
4525   MAME_DIR .. "src/mame/includes/xyonix.h",
35944526   MAME_DIR .. "src/mame/video/xyonix.cpp",
35954527}
35964528end
trunk/scripts/target/mame/dummy.lua
r250291r250292
2929      GEN_DIR  .. "mess/layout",
3030   }
3131
32   files{
33      MAME_DIR .. "src/mame/drivers/coleco.cpp",
34      MAME_DIR .. "src/mame/machine/coleco.cpp",
35   }
32files{
33   MAME_DIR .. "src/mame/drivers/coleco.cpp",
34   MAME_DIR .. "src/mame/includes/coleco.h",
35   MAME_DIR .. "src/mame/machine/coleco.cpp",
36   MAME_DIR .. "src/mame/machine/coleco.h",
37}
3638end
3739
3840function linkProjects_mame_dummy(_target, _subtarget)
trunk/scripts/target/mame/mame.lua
r250291r250292
2020function linkProjects_mame_mame(_target, _subtarget)
2121   linkProjects_mame_arcade(_target, _subtarget)
2222   linkProjects_mame_mess(_target, _subtarget)
23end
No newline at end of file
23end
trunk/scripts/target/mame/mess.lua
r250291r250292
927927   MAME_DIR .. "src/mame/video/amiga.cpp",
928928   MAME_DIR .. "src/mame/video/amigaaga.cpp",
929929   MAME_DIR .. "src/mame/video/tia.cpp",
930   MAME_DIR .. "src/mame/video/tia.h",
930931   MAME_DIR .. "src/mame/machine/atari.cpp",
931932   MAME_DIR .. "src/mame/video/atari.cpp",
933   MAME_DIR .. "src/mame/includes/atari.h",
932934   MAME_DIR .. "src/mame/video/antic.cpp",
935   MAME_DIR .. "src/mame/video/antic.h",
933936   MAME_DIR .. "src/mame/video/gtia.cpp",
937   MAME_DIR .. "src/mame/video/gtia.h",
934938   MAME_DIR .. "src/mame/drivers/jaguar.cpp",
939   MAME_DIR .. "src/mame/includes/jaguar.h",
935940   MAME_DIR .. "src/mame/audio/jaguar.cpp",
936941   MAME_DIR .. "src/mame/video/jaguar.cpp",
942   MAME_DIR .. "src/mame/video/jagblit.h",
943   MAME_DIR .. "src/mame/video/jagblit.inc",
944   MAME_DIR .. "src/mame/video/jagobj.inc",   
937945   MAME_DIR .. "src/mame/audio/gorf.cpp",
938946   MAME_DIR .. "src/mame/audio/wow.cpp",
939947   MAME_DIR .. "src/mame/drivers/astrocde.cpp",
948   MAME_DIR .. "src/mame/includes/astrocde.h",
940949   MAME_DIR .. "src/mame/video/astrocde.cpp",
941950   MAME_DIR .. "src/mame/machine/kabuki.cpp",
951   MAME_DIR .. "src/mame/machine/kabuki.h",
942952   MAME_DIR .. "src/mame/video/pk8000.cpp",
943953   MAME_DIR .. "src/mame/video/ppu2c0x.cpp",
954   MAME_DIR .. "src/mame/video/ppu2c0x.h",
944955   MAME_DIR .. "src/mame/machine/snes.cpp",
945956   MAME_DIR .. "src/mame/audio/snes_snd.cpp",
957   MAME_DIR .. "src/mame/audio/snes_snd.h",
946958   MAME_DIR .. "src/mame/machine/n64.cpp",
947959   MAME_DIR .. "src/mame/video/n64.cpp",
960   MAME_DIR .. "src/mame/video/n64types.h",
961   MAME_DIR .. "src/mame/video/rdpfiltr.inc",   
962   MAME_DIR .. "src/mame/video/n64.h",
948963   MAME_DIR .. "src/mame/video/rdpblend.cpp",
964   MAME_DIR .. "src/mame/video/rdpblend.h",
949965   MAME_DIR .. "src/mame/video/rdptpipe.cpp",
966   MAME_DIR .. "src/mame/video/rdptpipe.h",
950967   MAME_DIR .. "src/mame/machine/megadriv.cpp",
951968   MAME_DIR .. "src/mame/drivers/naomi.cpp",
969   MAME_DIR .. "src/mame/includes/naomi.h",
970   MAME_DIR .. "src/mame/includes/dc.h",
952971   MAME_DIR .. "src/mame/machine/awboard.cpp",
972   MAME_DIR .. "src/mame/machine/awboard.h",
953973   MAME_DIR .. "src/mame/machine/dc.cpp",
954974   MAME_DIR .. "src/mame/machine/dc-ctrl.cpp",
975   MAME_DIR .. "src/mame/machine/dc-ctrl.h",
955976   MAME_DIR .. "src/mame/machine/gdrom.cpp",
977   MAME_DIR .. "src/mame/machine/gdrom.h",
956978   MAME_DIR .. "src/mame/machine/jvs13551.cpp",
979   MAME_DIR .. "src/mame/machine/jvs13551.h",
957980   MAME_DIR .. "src/mame/machine/maple-dc.cpp",
981   MAME_DIR .. "src/mame/machine/maple-dc.h",
958982   MAME_DIR .. "src/mame/machine/mapledev.cpp",
983   MAME_DIR .. "src/mame/machine/mapledev.h",
959984   MAME_DIR .. "src/mame/machine/mie.cpp",
985   MAME_DIR .. "src/mame/machine/mie.h",
960986   MAME_DIR .. "src/mame/machine/naomi.cpp",
961987   MAME_DIR .. "src/mame/machine/naomibd.cpp",
988   MAME_DIR .. "src/mame/machine/naomibd.h",
962989   MAME_DIR .. "src/mame/machine/naomig1.cpp",
990   MAME_DIR .. "src/mame/machine/naomig1.h",
963991   MAME_DIR .. "src/mame/machine/naomigd.cpp",
992   MAME_DIR .. "src/mame/machine/naomigd.h",
964993   MAME_DIR .. "src/mame/machine/naomim1.cpp",
994   MAME_DIR .. "src/mame/machine/naomim1.h",
965995   MAME_DIR .. "src/mame/machine/naomim2.cpp",
996   MAME_DIR .. "src/mame/machine/naomim2.h",
966997   MAME_DIR .. "src/mame/machine/naomim4.cpp",
998   MAME_DIR .. "src/mame/machine/naomim4.h",
967999   MAME_DIR .. "src/mame/machine/naomirom.cpp",
1000   MAME_DIR .. "src/mame/machine/naomirom.h",
9681001   MAME_DIR .. "src/mame/machine/315-5881_crypt.cpp",
1002   MAME_DIR .. "src/mame/machine/315-5881_crypt.h",
9691003   MAME_DIR .. "src/mame/video/powervr2.cpp",
1004   MAME_DIR .. "src/mame/video/powervr2.h",
9701005   MAME_DIR .. "src/mame/drivers/neogeo.cpp",
1006   MAME_DIR .. "src/mame/includes/neogeo.h",
9711007   MAME_DIR .. "src/mame/machine/neocrypt.cpp",
9721008   MAME_DIR .. "src/mame/machine/ng_memcard.cpp",
1009   MAME_DIR .. "src/mame/machine/ng_memcard.h",
9731010   MAME_DIR .. "src/mame/video/neogeo.cpp",
9741011   MAME_DIR .. "src/mame/video/neogeo_spr.cpp",
1012   MAME_DIR .. "src/mame/video/neogeo_spr.h",
9751013   MAME_DIR .. "src/mame/drivers/cdi.cpp",
1014   MAME_DIR .. "src/mame/includes/cdi.h",
9761015   MAME_DIR .. "src/mame/machine/cdi070.cpp",
1016   MAME_DIR .. "src/mame/machine/cdi070.h",
9771017   MAME_DIR .. "src/mame/machine/cdicdic.cpp",
1018   MAME_DIR .. "src/mame/machine/cdicdic.h",
9781019   MAME_DIR .. "src/mame/machine/cdislave.cpp",
1020   MAME_DIR .. "src/mame/machine/cdislave.h",
9791021   MAME_DIR .. "src/mame/video/mcd212.cpp",
1022   MAME_DIR .. "src/mame/video/mcd212.h",
9801023   MAME_DIR .. "src/mame/drivers/3do.cpp",
1024   MAME_DIR .. "src/mame/includes/3do.h",
9811025   MAME_DIR .. "src/mame/machine/3do.cpp",
9821026   MAME_DIR .. "src/mame/drivers/konamim2.cpp",
9831027   MAME_DIR .. "src/mame/drivers/vectrex.cpp",
1028   MAME_DIR .. "src/mame/includes/vectrex.h",
9841029   MAME_DIR .. "src/mame/machine/vectrex.cpp",
9851030   MAME_DIR .. "src/mame/video/vectrex.cpp",
9861031   MAME_DIR .. "src/mame/drivers/cps1.cpp",
1032   MAME_DIR .. "src/mame/includes/cps1.h",
9871033   MAME_DIR .. "src/mame/video/cps1.cpp",
9881034   MAME_DIR .. "src/mame/video/chihiro.cpp",
9891035   MAME_DIR .. "src/mame/machine/xbox.cpp",
r250291r250292
9961042createMESSProjects(_target, _subtarget, "messshared")
9971043files {
9981044   MAME_DIR .. "src/mame/audio/mea8000.cpp",
1045   MAME_DIR .. "src/mame/audio/mea8000.h",
9991046   MAME_DIR .. "src/mame/machine/appldriv.cpp",
1047   MAME_DIR .. "src/mame/machine/appldriv.h",
10001048   MAME_DIR .. "src/mame/machine/applefdc.cpp",
1049   MAME_DIR .. "src/mame/machine/applefdc.h",
10011050   MAME_DIR .. "src/mame/machine/microdrv.cpp",
1051   MAME_DIR .. "src/mame/machine/microdrv.h",
10021052   MAME_DIR .. "src/mame/machine/smartmed.cpp",
1053   MAME_DIR .. "src/mame/machine/smartmed.h",
10031054   MAME_DIR .. "src/mame/machine/sonydriv.cpp",
1055   MAME_DIR .. "src/mame/machine/sonydriv.h",
10041056   MAME_DIR .. "src/mame/machine/teleprinter.cpp",
1057   MAME_DIR .. "src/mame/machine/teleprinter.h",
10051058   MAME_DIR .. "src/mame/machine/z80bin.cpp",
1059   MAME_DIR .. "src/mame/machine/z80bin.h",
10061060}
10071061--------------------------------------------------
10081062-- manufacturer-specific groupings for drivers
r250291r250292
10141068   MAME_DIR .. "src/mame/drivers/a6809.cpp",
10151069   MAME_DIR .. "src/mame/drivers/acrnsys1.cpp",
10161070   MAME_DIR .. "src/mame/drivers/atom.cpp",
1071   MAME_DIR .. "src/mame/includes/atom.h",
10171072   MAME_DIR .. "src/mame/drivers/bbc.cpp",
1073   MAME_DIR .. "src/mame/includes/bbc.h",
10181074   MAME_DIR .. "src/mame/machine/bbc.cpp",
10191075   MAME_DIR .. "src/mame/video/bbc.cpp",
10201076   MAME_DIR .. "src/mame/drivers/bbcbc.cpp",
10211077   MAME_DIR .. "src/mame/drivers/electron.cpp",
1078   MAME_DIR .. "src/mame/includes/electron.h",
10221079   MAME_DIR .. "src/mame/machine/electron.cpp",
10231080   MAME_DIR .. "src/mame/video/electron.cpp",
10241081   MAME_DIR .. "src/mame/drivers/riscpc.cpp",
10251082   MAME_DIR .. "src/mame/drivers/z88.cpp",
1083   MAME_DIR .. "src/mame/includes/z88.h",
10261084   MAME_DIR .. "src/mame/machine/upd65031.cpp",
1085   MAME_DIR .. "src/mame/machine/upd65031.h",
10271086   MAME_DIR .. "src/mame/video/z88.cpp",
10281087}
10291088
r250291r250292
10331092   MAME_DIR .. "src/mame/drivers/apricotf.cpp",
10341093   MAME_DIR .. "src/mame/drivers/apricotp.cpp",
10351094   MAME_DIR .. "src/mame/machine/apricotkb.cpp",
1095   MAME_DIR .. "src/mame/machine/apricotkb.h",
10361096   MAME_DIR .. "src/mame/machine/apricotkb_hle.cpp",
1097   MAME_DIR .. "src/mame/machine/apricotkb_hle.h",
10371098   MAME_DIR .. "src/mame/drivers/victor9k.cpp",
1099   MAME_DIR .. "src/mame/includes/victor9k.h",
10381100   MAME_DIR .. "src/mame/machine/victor9kb.cpp",
1101   MAME_DIR .. "src/mame/machine/victor9kb.h",
10391102   MAME_DIR .. "src/mame/machine/victor9k_fdc.cpp",
1103   MAME_DIR .. "src/mame/machine/victor9k_fdc.h",
10401104}
10411105
10421106createMESSProjects(_target, _subtarget, "adc")
10431107files {
10441108   MAME_DIR .. "src/mame/drivers/super6.cpp",
1109   MAME_DIR .. "src/mame/includes/super6.h",
10451110   MAME_DIR .. "src/mame/drivers/superslave.cpp",
1111   MAME_DIR .. "src/mame/includes/superslave.h",
10461112}
10471113
10481114createMESSProjects(_target, _subtarget, "alesis")
10491115files {
10501116   MAME_DIR .. "src/mame/drivers/alesis.cpp",
1117   MAME_DIR .. "src/mame/includes/alesis.h",
10511118   MAME_DIR .. "src/mame/audio/alesis.cpp",
10521119   MAME_DIR .. "src/mame/video/alesis.cpp",
10531120}
r250291r250292
10601127createMESSProjects(_target, _subtarget, "amiga")
10611128files {
10621129   MAME_DIR .. "src/mame/drivers/amiga.cpp",
1130   MAME_DIR .. "src/mame/includes/amiga.h",
10631131   MAME_DIR .. "src/mame/machine/amigakbd.cpp",
1132   MAME_DIR .. "src/mame/machine/amigakbd.h",
10641133}
10651134
10661135createMESSProjects(_target, _subtarget, "amstrad")
10671136files {
10681137   MAME_DIR .. "src/mame/drivers/amstrad.cpp",
1138   MAME_DIR .. "src/mame/includes/amstrad.h",
10691139   MAME_DIR .. "src/mame/machine/amstrad.cpp",
10701140   MAME_DIR .. "src/mame/drivers/amstr_pc.cpp",
10711141   MAME_DIR .. "src/mame/drivers/nc.cpp",
1142   MAME_DIR .. "src/mame/includes/nc.h",
10721143   MAME_DIR .. "src/mame/machine/nc.cpp",
10731144   MAME_DIR .. "src/mame/video/nc.cpp",
10741145   MAME_DIR .. "src/mame/drivers/pc1512.cpp",
1146   MAME_DIR .. "src/mame/includes/pc1512.h",
10751147   MAME_DIR .. "src/mame/machine/pc1512kb.cpp",
1148   MAME_DIR .. "src/mame/machine/pc1512kb.h",
10761149   MAME_DIR .. "src/mame/video/pc1512.cpp",
10771150   MAME_DIR .. "src/mame/drivers/pcw.cpp",
1151   MAME_DIR .. "src/mame/includes/pcw.h",
10781152   MAME_DIR .. "src/mame/video/pcw.cpp",
10791153   MAME_DIR .. "src/mame/drivers/pcw16.cpp",
1154   MAME_DIR .. "src/mame/includes/pcw16.h",
10801155   MAME_DIR .. "src/mame/video/pcw16.cpp",
10811156   MAME_DIR .. "src/mame/drivers/pda600.cpp",
10821157}
r250291r250292
10891164createMESSProjects(_target, _subtarget, "apollo")
10901165files {
10911166   MAME_DIR .. "src/mame/drivers/apollo.cpp",
1167   MAME_DIR .. "src/mame/includes/apollo.h",
10921168   MAME_DIR .. "src/mame/machine/apollo.cpp",
10931169   MAME_DIR .. "src/mame/machine/apollo_dbg.cpp",
10941170   MAME_DIR .. "src/mame/machine/apollo_kbd.cpp",
1171   MAME_DIR .. "src/mame/machine/apollo_kbd.h",
10951172   MAME_DIR .. "src/mame/video/apollo.cpp",
10961173}
10971174
10981175createMESSProjects(_target, _subtarget, "apple")
10991176files {
11001177   MAME_DIR .. "src/mame/drivers/apple1.cpp",
1178   MAME_DIR .. "src/mame/includes/apple1.h",
11011179   MAME_DIR .. "src/mame/machine/apple1.cpp",
11021180   MAME_DIR .. "src/mame/video/apple1.cpp",
11031181   MAME_DIR .. "src/mame/drivers/apple2.cpp",
1182   MAME_DIR .. "src/mame/includes/apple2.h",
11041183   MAME_DIR .. "src/mame/drivers/apple2e.cpp",
11051184   MAME_DIR .. "src/mame/machine/apple2.cpp",
11061185   MAME_DIR .. "src/mame/video/apple2.cpp",
1186   MAME_DIR .. "src/mame/video/apple2.h",
11071187   MAME_DIR .. "src/mame/drivers/tk2000.cpp",
11081188   MAME_DIR .. "src/mame/drivers/apple2gs.cpp",
1189   MAME_DIR .. "src/mame/includes/apple2gs.h",
11091190   MAME_DIR .. "src/mame/machine/apple2gs.cpp",
11101191   MAME_DIR .. "src/mame/video/apple2gs.cpp",
11111192   MAME_DIR .. "src/mame/drivers/apple3.cpp",
1193   MAME_DIR .. "src/mame/includes/apple3.h",
11121194   MAME_DIR .. "src/mame/machine/apple3.cpp",
11131195   MAME_DIR .. "src/mame/video/apple3.cpp",
11141196   MAME_DIR .. "src/mame/drivers/lisa.cpp",
1197   MAME_DIR .. "src/mame/includes/lisa.h",
11151198   MAME_DIR .. "src/mame/machine/lisa.cpp",
11161199   MAME_DIR .. "src/mame/drivers/mac.cpp",
1200   MAME_DIR .. "src/mame/includes/mac.h",
11171201   MAME_DIR .. "src/mame/audio/mac.cpp",
11181202   MAME_DIR .. "src/mame/machine/egret.cpp",
1203   MAME_DIR .. "src/mame/machine/egret.h",
11191204   MAME_DIR .. "src/mame/machine/mac.cpp",
11201205   MAME_DIR .. "src/mame/machine/macadb.cpp",
11211206   MAME_DIR .. "src/mame/machine/macrtc.cpp",
1207   MAME_DIR .. "src/mame/machine/macrtc.h",
11221208   MAME_DIR .. "src/mame/machine/mackbd.cpp",
1209   MAME_DIR .. "src/mame/machine/mackbd.h",
11231210   MAME_DIR .. "src/mame/machine/swim.cpp",
1211   MAME_DIR .. "src/mame/machine/swim.h",
11241212   MAME_DIR .. "src/mame/video/mac.cpp",
11251213   MAME_DIR .. "src/mame/drivers/macpci.cpp",
1214   MAME_DIR .. "src/mame/includes/macpci.h",
11261215   MAME_DIR .. "src/mame/machine/macpci.cpp",
11271216   MAME_DIR .. "src/mame/machine/cuda.cpp",
1217   MAME_DIR .. "src/mame/machine/cuda.h",
11281218}
11291219
11301220createMESSProjects(_target, _subtarget, "applied")
11311221files {
11321222   MAME_DIR .. "src/mame/drivers/mbee.cpp",
1223   MAME_DIR .. "src/mame/includes/mbee.h",
11331224   MAME_DIR .. "src/mame/machine/mbee.cpp",
11341225   MAME_DIR .. "src/mame/video/mbee.cpp",
11351226}
r250291r250292
11371228createMESSProjects(_target, _subtarget, "arcadia")
11381229files {
11391230   MAME_DIR .. "src/mame/drivers/arcadia.cpp",
1231   MAME_DIR .. "src/mame/includes/arcadia.h",
11401232   MAME_DIR .. "src/mame/audio/arcadia.cpp",
1233   MAME_DIR .. "src/mame/audio/arcadia.h",
11411234   MAME_DIR .. "src/mame/video/arcadia.cpp",
11421235}
11431236
11441237createMESSProjects(_target, _subtarget, "ascii")
11451238files {
11461239   MAME_DIR .. "src/mame/drivers/msx.cpp",
1240   MAME_DIR .. "src/mame/includes/msx.h",
11471241   MAME_DIR .. "src/mame/machine/msx.cpp",
11481242   MAME_DIR .. "src/mame/machine/msx_matsushita.cpp",
1243   MAME_DIR .. "src/mame/machine/msx_matsushita.h",
11491244   MAME_DIR .. "src/mame/machine/msx_s1985.cpp",
1245   MAME_DIR .. "src/mame/machine/msx_s1985.h",
11501246   MAME_DIR .. "src/mame/machine/msx_switched.cpp",
1247   MAME_DIR .. "src/mame/machine/msx_switched.h",
11511248   MAME_DIR .. "src/mame/machine/msx_systemflags.cpp",
1249   MAME_DIR .. "src/mame/machine/msx_systemflags.h",
11521250}
11531251
11541252createMESSProjects(_target, _subtarget, "at")
11551253files {
11561254   MAME_DIR .. "src/mame/drivers/at.cpp",
1255   MAME_DIR .. "src/mame/includes/at.h",
11571256   MAME_DIR .. "src/mame/machine/at.cpp",
11581257   MAME_DIR .. "src/mame/drivers/ct486.cpp",
11591258}
r250291r250292
11631262   MAME_DIR .. "src/mame/drivers/a2600.cpp",
11641263   MAME_DIR .. "src/mame/drivers/a7800.cpp",
11651264   MAME_DIR .. "src/mame/video/maria.cpp",
1265   MAME_DIR .. "src/mame/video/maria.h",
11661266   MAME_DIR .. "src/mame/drivers/atari400.cpp",
11671267   MAME_DIR .. "src/mame/machine/atarifdc.cpp",
1268   MAME_DIR .. "src/mame/machine/atarifdc.h",
11681269   MAME_DIR .. "src/mame/drivers/atarist.cpp",
1270   MAME_DIR .. "src/mame/includes/atarist.h",
11691271   MAME_DIR .. "src/mame/video/atarist.cpp",
1272   MAME_DIR .. "src/mame/video/atarist.h",
11701273   MAME_DIR .. "src/mame/drivers/lynx.cpp",
1274   MAME_DIR .. "src/mame/includes/lynx.h",
11711275   MAME_DIR .. "src/mame/audio/lynx.cpp",
1276   MAME_DIR .. "src/mame/audio/lynx.h",
11721277   MAME_DIR .. "src/mame/machine/lynx.cpp",
11731278   MAME_DIR .. "src/mame/drivers/portfoli.cpp",
1279   MAME_DIR .. "src/mame/includes/portfoli.h",
11741280}
11751281
11761282createMESSProjects(_target, _subtarget, "att")
r250291r250292
11861292createMESSProjects(_target, _subtarget, "banctec")
11871293files {
11881294   MAME_DIR .. "src/mame/drivers/banctec.cpp",
1295   MAME_DIR .. "src/mame/includes/banctec.h",
11891296}
11901297
11911298createMESSProjects(_target, _subtarget, "bandai")
r250291r250292
11941301   MAME_DIR .. "src/mame/drivers/rx78.cpp",
11951302   MAME_DIR .. "src/mame/drivers/tamag1.cpp",
11961303   MAME_DIR .. "src/mame/drivers/wswan.cpp",
1304   MAME_DIR .. "src/mame/includes/wswan.h",
11971305   MAME_DIR .. "src/mame/audio/wswan_snd.cpp",
1306   MAME_DIR .. "src/mame/audio/wswan_snd.h",
11981307   MAME_DIR .. "src/mame/machine/wswan.cpp",
11991308   MAME_DIR .. "src/mame/video/wswan_video.cpp",
1309   MAME_DIR .. "src/mame/video/wswan_video.h",
12001310}
12011311
12021312createMESSProjects(_target, _subtarget, "be")
12031313files {
12041314   MAME_DIR .. "src/mame/drivers/bebox.cpp",
1315   MAME_DIR .. "src/mame/includes/bebox.h",
12051316   MAME_DIR .. "src/mame/machine/bebox.cpp",
12061317}
12071318
12081319createMESSProjects(_target, _subtarget, "bnpo")
12091320files {
12101321   MAME_DIR .. "src/mame/drivers/b2m.cpp",
1322   MAME_DIR .. "src/mame/includes/b2m.h",
12111323   MAME_DIR .. "src/mame/machine/b2m.cpp",
12121324   MAME_DIR .. "src/mame/video/b2m.cpp",
12131325}
r250291r250292
12151327createMESSProjects(_target, _subtarget, "bondwell")
12161328files {
12171329   MAME_DIR .. "src/mame/drivers/bw12.cpp",
1330   MAME_DIR .. "src/mame/includes/bw12.h",
12181331   MAME_DIR .. "src/mame/drivers/bw2.cpp",
1332   MAME_DIR .. "src/mame/includes/bw2.h",
12191333}
12201334
12211335createMESSProjects(_target, _subtarget, "booth")
r250291r250292
12261340createMESSProjects(_target, _subtarget, "camputers")
12271341files {
12281342   MAME_DIR .. "src/mame/drivers/camplynx.cpp",
1229   MAME_DIR .. "src/lib/formats/camplynx_dsk.cpp",
12301343}
12311344
12321345createMESSProjects(_target, _subtarget, "canon")
12331346files {
12341347   MAME_DIR .. "src/mame/drivers/cat.cpp",
12351348   MAME_DIR .. "src/mame/drivers/x07.cpp",
1349   MAME_DIR .. "src/mame/includes/x07.h",
12361350   MAME_DIR .. "src/mame/drivers/canon_s80.cpp",
12371351}
12381352
r250291r250292
12561370createMESSProjects(_target, _subtarget, "cbm")
12571371files {
12581372   MAME_DIR .. "src/mame/drivers/c128.cpp",
1373   MAME_DIR .. "src/mame/includes/c128.h",
12591374   MAME_DIR .. "src/mame/drivers/c64.cpp",
1375   MAME_DIR .. "src/mame/includes/c64.h",
12601376   MAME_DIR .. "src/mame/drivers/c64dtv.cpp",
12611377   MAME_DIR .. "src/mame/drivers/c65.cpp",
1378   MAME_DIR .. "src/mame/includes/c65.h",
12621379   MAME_DIR .. "src/mame/drivers/c900.cpp",
12631380   MAME_DIR .. "src/mame/drivers/cbm2.cpp",
1381   MAME_DIR .. "src/mame/includes/cbm2.h",
12641382   MAME_DIR .. "src/mame/drivers/clcd.cpp",
12651383   MAME_DIR .. "src/mame/drivers/pet.cpp",
1384   MAME_DIR .. "src/mame/includes/pet.h",
12661385   MAME_DIR .. "src/mame/drivers/plus4.cpp",
1386   MAME_DIR .. "src/mame/includes/plus4.h",
12671387   MAME_DIR .. "src/mame/drivers/vic10.cpp",
1388   MAME_DIR .. "src/mame/includes/vic10.h",
12681389   MAME_DIR .. "src/mame/drivers/vic20.cpp",
1390   MAME_DIR .. "src/mame/includes/vic20.h",
12691391   MAME_DIR .. "src/mame/machine/cbm_snqk.cpp",
1392   MAME_DIR .. "src/mame/machine/cbm_snqk.h",
12701393   MAME_DIR .. "src/mame/drivers/mps1230.cpp",
12711394}
12721395
r250291r250292
12751398   MAME_DIR .. "src/mame/drivers/argo.cpp",
12761399   MAME_DIR .. "src/mame/drivers/cm1800.cpp",
12771400   MAME_DIR .. "src/mame/drivers/lviv.cpp",
1401   MAME_DIR .. "src/mame/includes/lviv.h",
12781402   MAME_DIR .. "src/mame/machine/lviv.cpp",
12791403   MAME_DIR .. "src/mame/video/lviv.cpp",
12801404   MAME_DIR .. "src/mame/drivers/mikro80.cpp",
1405   MAME_DIR .. "src/mame/includes/mikro80.h",
12811406   MAME_DIR .. "src/mame/machine/mikro80.cpp",
12821407   MAME_DIR .. "src/mame/video/mikro80.cpp",
12831408   MAME_DIR .. "src/mame/drivers/pk8000.cpp",
1409   MAME_DIR .. "src/mame/includes/pk8000.h",
12841410   MAME_DIR .. "src/mame/drivers/pk8020.cpp",
1411   MAME_DIR .. "src/mame/includes/pk8020.h",
12851412   MAME_DIR .. "src/mame/machine/pk8020.cpp",
12861413   MAME_DIR .. "src/mame/video/pk8020.cpp",
12871414   MAME_DIR .. "src/mame/drivers/pyl601.cpp",
r250291r250292
12891416   MAME_DIR .. "src/mame/drivers/uknc.cpp",
12901417   MAME_DIR .. "src/mame/drivers/unior.cpp",
12911418   MAME_DIR .. "src/mame/drivers/ut88.cpp",
1419   MAME_DIR .. "src/mame/includes/ut88.h",
12921420   MAME_DIR .. "src/mame/machine/ut88.cpp",
12931421   MAME_DIR .. "src/mame/video/ut88.cpp",
12941422   MAME_DIR .. "src/mame/drivers/vector06.cpp",
1423   MAME_DIR .. "src/mame/includes/vector06.h",
12951424   MAME_DIR .. "src/mame/machine/vector06.cpp",
12961425   MAME_DIR .. "src/mame/video/vector06.cpp",
12971426   MAME_DIR .. "src/mame/drivers/vta2000.cpp",
r250291r250292
13001429createMESSProjects(_target, _subtarget, "cce")
13011430files {
13021431   MAME_DIR .. "src/mame/drivers/mc1000.cpp",
1432   MAME_DIR .. "src/mame/includes/mc1000.h",
13031433}
13041434
13051435createMESSProjects(_target, _subtarget, "ccs")
r250291r250292
13111441createMESSProjects(_target, _subtarget, "chromatics")
13121442files {
13131443   MAME_DIR .. "src/mame/drivers/cgc7900.cpp",
1444   MAME_DIR .. "src/mame/includes/cgc7900.h",
13141445   MAME_DIR .. "src/mame/video/cgc7900.cpp",
13151446}
13161447
13171448createMESSProjects(_target, _subtarget, "coleco")
13181449files {
13191450   MAME_DIR .. "src/mame/drivers/adam.cpp",
1451   MAME_DIR .. "src/mame/includes/adam.h",
13201452   MAME_DIR .. "src/mame/drivers/coleco.cpp",
1453   MAME_DIR .. "src/mame/includes/coleco.h",
13211454   MAME_DIR .. "src/mame/machine/coleco.cpp",
1455   MAME_DIR .. "src/mame/machine/coleco.h",
13221456}
13231457
13241458createMESSProjects(_target, _subtarget, "cromemco")
r250291r250292
13301464createMESSProjects(_target, _subtarget, "comx")
13311465files {
13321466   MAME_DIR .. "src/mame/drivers/comx35.cpp",
1467   MAME_DIR .. "src/mame/includes/comx35.h",
13331468   MAME_DIR .. "src/mame/video/comx35.cpp",
13341469}
13351470
13361471createMESSProjects(_target, _subtarget, "concept")
13371472files {
13381473   MAME_DIR .. "src/mame/drivers/concept.cpp",
1474   MAME_DIR .. "src/mame/includes/concept.h",
13391475   MAME_DIR .. "src/mame/machine/concept.cpp",
13401476}
13411477
13421478createMESSProjects(_target, _subtarget, "conitec")
13431479files {
13441480   MAME_DIR .. "src/mame/drivers/prof180x.cpp",
1481   MAME_DIR .. "src/mame/includes/prof180x.h",
13451482   MAME_DIR .. "src/mame/drivers/prof80.cpp",
1483   MAME_DIR .. "src/mame/includes/prof80.h",
13461484   MAME_DIR .. "src/mame/machine/prof80mmu.cpp",
1485   MAME_DIR .. "src/mame/machine/prof80mmu.h",
13471486}
13481487
13491488createMESSProjects(_target, _subtarget, "cybiko")
13501489files {
13511490   MAME_DIR .. "src/mame/drivers/cybiko.cpp",
1491   MAME_DIR .. "src/mame/includes/cybiko.h",
13521492   MAME_DIR .. "src/mame/machine/cybiko.cpp",
13531493}
13541494
13551495createMESSProjects(_target, _subtarget, "dai")
13561496files {
13571497   MAME_DIR .. "src/mame/drivers/dai.cpp",
1498   MAME_DIR .. "src/mame/includes/dai.h",
13581499   MAME_DIR .. "src/mame/audio/dai_snd.cpp",
1500   MAME_DIR .. "src/mame/audio/dai_snd.h",
13591501   MAME_DIR .. "src/mame/machine/dai.cpp",
13601502   MAME_DIR .. "src/mame/video/dai.cpp",
13611503}
r250291r250292
13631505createMESSProjects(_target, _subtarget, "ddr")
13641506files {
13651507   MAME_DIR .. "src/mame/drivers/ac1.cpp",
1508   MAME_DIR .. "src/mame/includes/ac1.h",
13661509   MAME_DIR .. "src/mame/machine/ac1.cpp",
13671510   MAME_DIR .. "src/mame/video/ac1.cpp",
13681511   MAME_DIR .. "src/mame/drivers/bcs3.cpp",
13691512   MAME_DIR .. "src/mame/drivers/c80.cpp",
1513   MAME_DIR .. "src/mame/includes/c80.h",
13701514   MAME_DIR .. "src/mame/drivers/huebler.cpp",
1515   MAME_DIR .. "src/mame/includes/huebler.h",
13711516   MAME_DIR .. "src/mame/drivers/jtc.cpp",
13721517   MAME_DIR .. "src/mame/drivers/kramermc.cpp",
1518   MAME_DIR .. "src/mame/includes/kramermc.h",
13731519   MAME_DIR .. "src/mame/machine/kramermc.cpp",
13741520   MAME_DIR .. "src/mame/video/kramermc.cpp",
13751521   MAME_DIR .. "src/mame/drivers/llc.cpp",
1522   MAME_DIR .. "src/mame/includes/llc.h",
13761523   MAME_DIR .. "src/mame/machine/llc.cpp",
13771524   MAME_DIR .. "src/mame/video/llc.cpp",
13781525   MAME_DIR .. "src/mame/drivers/nanos.cpp",
13791526   MAME_DIR .. "src/mame/drivers/pcm.cpp",
13801527   MAME_DIR .. "src/mame/drivers/vcs80.cpp",
1528   MAME_DIR .. "src/mame/includes/vcs80.h",
13811529   MAME_DIR .. "src/mame/machine/k7659kb.cpp",
1530   MAME_DIR .. "src/mame/machine/k7659kb.h",
13821531}
13831532
13841533createMESSProjects(_target, _subtarget, "dec")
r250291r250292
13961545   MAME_DIR .. "src/mame/drivers/vt320.cpp",
13971546   MAME_DIR .. "src/mame/drivers/vt520.cpp",
13981547   MAME_DIR .. "src/mame/machine/dec_lk201.cpp",
1548   MAME_DIR .. "src/mame/machine/dec_lk201.h",
13991549   MAME_DIR .. "src/mame/machine/rx01.cpp",
1550   MAME_DIR .. "src/mame/machine/rx01.h",
14001551   MAME_DIR .. "src/mame/video/vtvideo.cpp",
1552   MAME_DIR .. "src/mame/video/vtvideo.h",
14011553}
14021554
14031555createMESSProjects(_target, _subtarget, "dicksmth")
14041556files {
14051557   MAME_DIR .. "src/mame/drivers/super80.cpp",
1558   MAME_DIR .. "src/mame/includes/super80.h",
14061559   MAME_DIR .. "src/mame/machine/super80.cpp",
14071560   MAME_DIR .. "src/mame/video/super80.cpp",
14081561}
r250291r250292
14171570createMESSProjects(_target, _subtarget, "dragon")
14181571files {
14191572   MAME_DIR .. "src/mame/drivers/dgn_beta.cpp",
1573   MAME_DIR .. "src/mame/includes/dgn_beta.h",
14201574   MAME_DIR .. "src/mame/machine/dgn_beta.cpp",
14211575   MAME_DIR .. "src/mame/video/dgn_beta.cpp",
14221576}
r250291r250292
14341588createMESSProjects(_target, _subtarget, "einis")
14351589files {
14361590   MAME_DIR .. "src/mame/drivers/pecom.cpp",
1591   MAME_DIR .. "src/mame/includes/pecom.h",
14371592   MAME_DIR .. "src/mame/machine/pecom.cpp",
14381593   MAME_DIR .. "src/mame/video/pecom.cpp",
14391594}
r250291r250292
14411596createMESSProjects(_target, _subtarget, "elektrka")
14421597files {
14431598   MAME_DIR .. "src/mame/drivers/bk.cpp",
1599   MAME_DIR .. "src/mame/includes/bk.h",
14441600   MAME_DIR .. "src/mame/machine/bk.cpp",
14451601   MAME_DIR .. "src/mame/video/bk.cpp",
14461602   MAME_DIR .. "src/mame/drivers/dvk_kcgd.cpp",
14471603   MAME_DIR .. "src/mame/drivers/dvk_ksm.cpp",
14481604   MAME_DIR .. "src/mame/machine/ms7004.cpp",
1605   MAME_DIR .. "src/mame/machine/ms7004.h",
14491606   MAME_DIR .. "src/mame/drivers/mk85.cpp",
14501607   MAME_DIR .. "src/mame/drivers/mk90.cpp",
14511608}
r250291r250292
14661623   MAME_DIR .. "src/mame/drivers/esqmr.cpp",
14671624   MAME_DIR .. "src/mame/drivers/enmirage.cpp",
14681625   MAME_DIR .. "src/mame/machine/esqpanel.cpp",
1626   MAME_DIR .. "src/mame/machine/esqpanel.h",
14691627   MAME_DIR .. "src/mame/machine/esqvfd.cpp",
1628   MAME_DIR .. "src/mame/machine/esqvfd.h",
14701629}
14711630
14721631createMESSProjects(_target, _subtarget, "enterprise")
14731632files {
14741633   MAME_DIR .. "src/mame/drivers/ep64.cpp",
1634   MAME_DIR .. "src/mame/includes/ep64.h",
14751635   MAME_DIR .. "src/mame/audio/dave.cpp",
1636   MAME_DIR .. "src/mame/audio/dave.h",
14761637   MAME_DIR .. "src/mame/video/nick.cpp",
1638   MAME_DIR .. "src/mame/video/nick.h",
14771639}
14781640
14791641createMESSProjects(_target, _subtarget, "entex")
14801642files {
14811643   MAME_DIR .. "src/mame/drivers/advision.cpp",
1644   MAME_DIR .. "src/mame/includes/advision.h",
14821645   MAME_DIR .. "src/mame/machine/advision.cpp",
14831646   MAME_DIR .. "src/mame/video/advision.cpp",
14841647}
r250291r250292
14861649createMESSProjects(_target, _subtarget, "epoch")
14871650files {
14881651   MAME_DIR .. "src/mame/drivers/gamepock.cpp",
1652   MAME_DIR .. "src/mame/includes/gamepock.h",
14891653   MAME_DIR .. "src/mame/machine/gamepock.cpp",
14901654   MAME_DIR .. "src/mame/drivers/scv.cpp",
14911655   MAME_DIR .. "src/mame/audio/upd1771.cpp",
1656   MAME_DIR .. "src/mame/audio/upd1771.h",
14921657}
14931658
14941659createMESSProjects(_target, _subtarget, "epson")
14951660files {
14961661   MAME_DIR .. "src/mame/drivers/hx20.cpp",
1662   MAME_DIR .. "src/mame/includes/hx20.h",
14971663   MAME_DIR .. "src/mame/drivers/px4.cpp",
14981664   MAME_DIR .. "src/mame/drivers/px8.cpp",
1665   MAME_DIR .. "src/mame/includes/px8.h",
14991666   MAME_DIR .. "src/mame/drivers/qx10.cpp",
15001667   MAME_DIR .. "src/mame/machine/qx10kbd.cpp",
1668   MAME_DIR .. "src/mame/machine/qx10kbd.h",
15011669}
15021670
15031671createMESSProjects(_target, _subtarget, "exidy")
15041672files {
15051673   MAME_DIR .. "src/mame/machine/sorcerer.cpp",
15061674   MAME_DIR .. "src/mame/drivers/sorcerer.cpp",
1675   MAME_DIR .. "src/mame/includes/sorcerer.h",
15071676   MAME_DIR .. "src/mame/machine/micropolis.cpp",
1677   MAME_DIR .. "src/mame/machine/micropolis.h",
15081678}
15091679
15101680createMESSProjects(_target, _subtarget, "fairch")
15111681files {
15121682   MAME_DIR .. "src/mame/drivers/channelf.cpp",
1683   MAME_DIR .. "src/mame/includes/channelf.h",
15131684   MAME_DIR .. "src/mame/audio/channelf.cpp",
1685   MAME_DIR .. "src/mame/audio/channelf.h",
15141686   MAME_DIR .. "src/mame/video/channelf.cpp",
15151687}
15161688
r250291r250292
15181690files {
15191691   MAME_DIR .. "src/mame/drivers/csc.cpp",
15201692   MAME_DIR .. "src/mame/drivers/fidelz80.cpp",
1693   MAME_DIR .. "src/mame/includes/fidelz80.h",
15211694}
15221695
15231696createMESSProjects(_target, _subtarget, "force")
r250291r250292
15281701createMESSProjects(_target, _subtarget, "fujitsu")
15291702files {
15301703   MAME_DIR .. "src/mame/drivers/fmtowns.cpp",
1704   MAME_DIR .. "src/mame/includes/fmtowns.h",
15311705   MAME_DIR .. "src/mame/video/fmtowns.cpp",
15321706   MAME_DIR .. "src/mame/machine/fm_scsi.cpp",
1707   MAME_DIR .. "src/mame/machine/fm_scsi.h",
15331708   MAME_DIR .. "src/mame/drivers/fm7.cpp",
1709   MAME_DIR .. "src/mame/includes/fm7.h",
15341710   MAME_DIR .. "src/mame/video/fm7.cpp",
15351711}
15361712
r250291r250292
15421718createMESSProjects(_target, _subtarget, "galaxy")
15431719files {
15441720   MAME_DIR .. "src/mame/drivers/galaxy.cpp",
1721   MAME_DIR .. "src/mame/includes/galaxy.h",
15451722   MAME_DIR .. "src/mame/machine/galaxy.cpp",
15461723   MAME_DIR .. "src/mame/video/galaxy.cpp",
15471724}
r250291r250292
15501727files {
15511728   MAME_DIR .. "src/mame/drivers/gp2x.cpp",
15521729   MAME_DIR .. "src/mame/drivers/gp32.cpp",
1730   MAME_DIR .. "src/mame/includes/gp32.h",
15531731}
15541732
15551733createMESSProjects(_target, _subtarget, "gi")
r250291r250292
15601738createMESSProjects(_target, _subtarget, "grundy")
15611739files {
15621740   MAME_DIR .. "src/mame/drivers/newbrain.cpp",
1741   MAME_DIR .. "src/mame/includes/newbrain.h",
15631742   MAME_DIR .. "src/mame/video/newbrain.cpp",
15641743}
15651744
r250291r250292
15831762   MAME_DIR .. "src/mame/drivers/mmodular.cpp",
15841763   MAME_DIR .. "src/mame/drivers/stratos.cpp",
15851764   MAME_DIR .. "src/mame/machine/mboard.cpp",
1765   MAME_DIR .. "src/mame/includes/mboard.h",
15861766}
15871767
15881768createMESSProjects(_target, _subtarget, "hitachi")
r250291r250292
16191799files {
16201800   MAME_DIR .. "src/mame/drivers/hp16500.cpp",
16211801   MAME_DIR .. "src/mame/drivers/hp48.cpp",
1802   MAME_DIR .. "src/mame/includes/hp48.h",
16221803   MAME_DIR .. "src/mame/machine/hp48.cpp",
16231804   MAME_DIR .. "src/mame/video/hp48.cpp",
16241805   MAME_DIR .. "src/mame/drivers/hp49gp.cpp",
r250291r250292
16321813createMESSProjects(_target, _subtarget, "hec2hrp")
16331814files {
16341815   MAME_DIR .. "src/mame/drivers/hec2hrp.cpp",
1816   MAME_DIR .. "src/mame/includes/hec2hrp.h",
16351817   MAME_DIR .. "src/mame/machine/hec2hrp.cpp",
16361818   MAME_DIR .. "src/mame/machine/hecdisk2.cpp",
16371819   MAME_DIR .. "src/mame/video/hec2video.cpp",
r250291r250292
16511833   MAME_DIR .. "src/mame/drivers/ipds.cpp",
16521834   MAME_DIR .. "src/mame/drivers/isbc.cpp",
16531835   MAME_DIR .. "src/mame/machine/isbc_215g.cpp",
1836   MAME_DIR .. "src/mame/machine/isbc_215g.h",
16541837   MAME_DIR .. "src/mame/drivers/rex6000.cpp",
16551838   MAME_DIR .. "src/mame/drivers/sdk80.cpp",
16561839   MAME_DIR .. "src/mame/drivers/sdk85.cpp",
16571840   MAME_DIR .. "src/mame/drivers/sdk86.cpp",
16581841   MAME_DIR .. "src/mame/drivers/imds2.cpp",
1842   MAME_DIR .. "src/mame/includes/imds2.h",
16591843}
16601844
16611845createMESSProjects(_target, _subtarget, "imp")
r250291r250292
16671851createMESSProjects(_target, _subtarget, "interton")
16681852files {
16691853   MAME_DIR .. "src/mame/drivers/vc4000.cpp",
1854   MAME_DIR .. "src/mame/includes/vc4000.h",
16701855   MAME_DIR .. "src/mame/audio/vc4000snd.cpp",
1856   MAME_DIR .. "src/mame/audio/vc4000snd.h",
16711857   MAME_DIR .. "src/mame/video/vc4000.cpp",
16721858}
16731859
16741860createMESSProjects(_target, _subtarget, "intv")
16751861files {
16761862   MAME_DIR .. "src/mame/drivers/intv.cpp",
1863   MAME_DIR .. "src/mame/includes/intv.h",
16771864   MAME_DIR .. "src/mame/machine/intv.cpp",
16781865   MAME_DIR .. "src/mame/video/intv.cpp",
16791866   MAME_DIR .. "src/mame/video/stic.cpp",
1867   MAME_DIR .. "src/mame/video/stic.h",
16801868}
16811869
16821870createMESSProjects(_target, _subtarget, "isc")
r250291r250292
16871875createMESSProjects(_target, _subtarget, "kaypro")
16881876files {
16891877   MAME_DIR .. "src/mame/drivers/kaypro.cpp",
1878   MAME_DIR .. "src/mame/includes/kaypro.h",
16901879   MAME_DIR .. "src/mame/machine/kaypro.cpp",
16911880   MAME_DIR .. "src/mame/machine/kay_kbd.cpp",
16921881   MAME_DIR .. "src/mame/video/kaypro.cpp",
r250291r250292
17001889createMESSProjects(_target, _subtarget, "kyocera")
17011890files {
17021891   MAME_DIR .. "src/mame/drivers/kyocera.cpp",
1892   MAME_DIR .. "src/mame/includes/kyocera.h",
17031893   MAME_DIR .. "src/mame/video/kyocera.cpp",
17041894}
17051895
17061896createMESSProjects(_target, _subtarget, "luxor")
17071897files {
17081898   MAME_DIR .. "src/mame/drivers/abc80.cpp",
1899   MAME_DIR .. "src/mame/includes/abc80.h",
17091900   MAME_DIR .. "src/mame/machine/abc80kb.cpp",
1901   MAME_DIR .. "src/mame/machine/abc80kb.h",
17101902   MAME_DIR .. "src/mame/video/abc80.cpp",
17111903   MAME_DIR .. "src/mame/drivers/abc80x.cpp",
1904   MAME_DIR .. "src/mame/includes/abc80x.h",
17121905   MAME_DIR .. "src/mame/video/abc800.cpp",
17131906   MAME_DIR .. "src/mame/video/abc802.cpp",
17141907   MAME_DIR .. "src/mame/video/abc806.cpp",
17151908   MAME_DIR .. "src/mame/drivers/abc1600.cpp",
1909   MAME_DIR .. "src/mame/includes/abc1600.h",
17161910   MAME_DIR .. "src/mame/machine/abc1600mac.cpp",
1911   MAME_DIR .. "src/mame/machine/abc1600mac.h",
17171912   MAME_DIR .. "src/mame/video/abc1600.cpp",
1913   MAME_DIR .. "src/mame/video/abc1600.h",
17181914}
17191915
17201916createMESSProjects(_target, _subtarget, "magnavox")
r250291r250292
17351931createMESSProjects(_target, _subtarget, "mattel")
17361932files {
17371933   MAME_DIR .. "src/mame/drivers/aquarius.cpp",
1934   MAME_DIR .. "src/mame/includes/aquarius.h",
17381935   MAME_DIR .. "src/mame/video/aquarius.cpp",
17391936   MAME_DIR .. "src/mame/drivers/juicebox.cpp",
17401937   MAME_DIR .. "src/mame/drivers/hyperscan.cpp",
r250291r250292
17611958createMESSProjects(_target, _subtarget, "memotech")
17621959files {
17631960   MAME_DIR .. "src/mame/drivers/mtx.cpp",
1961   MAME_DIR .. "src/mame/includes/mtx.h",
17641962   MAME_DIR .. "src/mame/machine/mtx.cpp",
17651963}
17661964
r250291r250292
17721970createMESSProjects(_target, _subtarget, "microkey")
17731971files {
17741972   MAME_DIR .. "src/mame/drivers/primo.cpp",
1973   MAME_DIR .. "src/mame/includes/primo.h",
17751974   MAME_DIR .. "src/mame/machine/primo.cpp",
17761975   MAME_DIR .. "src/mame/video/primo.cpp",
17771976}
r250291r250292
17791978createMESSProjects(_target, _subtarget, "microsoft")
17801979files {
17811980   MAME_DIR .. "src/mame/drivers/xbox.cpp",
1981   MAME_DIR .. "src/mame/includes/xbox.h",
17821982}
17831983
17841984createMESSProjects(_target, _subtarget, "mit")
17851985files {
17861986   MAME_DIR .. "src/mame/drivers/tx0.cpp",
1987   MAME_DIR .. "src/mame/includes/tx0.h",
17871988   MAME_DIR .. "src/mame/video/crt.cpp",
1989   MAME_DIR .. "src/mame/video/crt.h",
17881990   MAME_DIR .. "src/mame/video/tx0.cpp",
17891991}
17901992
r250291r250292
18102012files {
18112013   MAME_DIR .. "src/mame/drivers/microdec.cpp",
18122014   MAME_DIR .. "src/mame/drivers/mpz80.cpp",
2015   MAME_DIR .. "src/mame/includes/mpz80.h",
18132016   MAME_DIR .. "src/mame/drivers/tricep.cpp",
18142017}
18152018
r250291r250292
18282031files {
18292032   MAME_DIR .. "src/mame/drivers/mkit09.cpp",
18302033   MAME_DIR .. "src/mame/drivers/mpf1.cpp",
2034   MAME_DIR .. "src/mame/includes/mpf1.h",
18312035}
18322036
18332037createMESSProjects(_target, _subtarget, "nakajima")
r250291r250292
18432047createMESSProjects(_target, _subtarget, "ne")
18442048files {
18452049   MAME_DIR .. "src/mame/drivers/z80ne.cpp",
2050   MAME_DIR .. "src/mame/includes/z80ne.h",
18462051   MAME_DIR .. "src/mame/machine/z80ne.cpp",
18472052}
18482053
r250291r250292
18502055files {
18512056   MAME_DIR .. "src/mame/drivers/apc.cpp",
18522057   MAME_DIR .. "src/mame/drivers/pce.cpp",
2058   MAME_DIR .. "src/mame/includes/pce.h",
18532059   MAME_DIR .. "src/mame/machine/pce.cpp",
18542060   MAME_DIR .. "src/mame/machine/pce_cd.cpp",
2061   MAME_DIR .. "src/mame/machine/pce_cd.h",
18552062   MAME_DIR .. "src/mame/drivers/pcfx.cpp",
18562063   MAME_DIR .. "src/mame/drivers/pc6001.cpp",
18572064   MAME_DIR .. "src/mame/drivers/pc8401a.cpp",
2065   MAME_DIR .. "src/mame/includes/pc8401a.h",
18582066   MAME_DIR .. "src/mame/video/pc8401a.cpp",
18592067   MAME_DIR .. "src/mame/drivers/pc8001.cpp",
2068   MAME_DIR .. "src/mame/includes/pc8001.h",
18602069   MAME_DIR .. "src/mame/drivers/pc8801.cpp",
18612070   MAME_DIR .. "src/mame/drivers/pc88va.cpp",
18622071   MAME_DIR .. "src/mame/drivers/pc100.cpp",
18632072   MAME_DIR .. "src/mame/drivers/pc9801.cpp",
18642073   MAME_DIR .. "src/mame/machine/pc9801_26.cpp",
2074   MAME_DIR .. "src/mame/machine/pc9801_26.h",
18652075   MAME_DIR .. "src/mame/machine/pc9801_86.cpp",
2076   MAME_DIR .. "src/mame/machine/pc9801_86.h",
18662077   MAME_DIR .. "src/mame/machine/pc9801_118.cpp",
2078   MAME_DIR .. "src/mame/machine/pc9801_118.h",
18672079   MAME_DIR .. "src/mame/machine/pc9801_cbus.cpp",
2080   MAME_DIR .. "src/mame/machine/pc9801_cbus.h",
18682081   MAME_DIR .. "src/mame/machine/pc9801_kbd.cpp",
2082   MAME_DIR .. "src/mame/machine/pc9801_kbd.h",
18692083   MAME_DIR .. "src/mame/drivers/tk80bs.cpp",
18702084   MAME_DIR .. "src/mame/drivers/hh_ucom4.cpp",
2085   MAME_DIR .. "src/mame/includes/hh_ucom4.h",
18712086}
18722087
18732088createMESSProjects(_target, _subtarget, "netronic")
18742089files {
18752090   MAME_DIR .. "src/mame/drivers/elf.cpp",
2091   MAME_DIR .. "src/mame/includes/elf.h",
18762092   MAME_DIR .. "src/mame/drivers/exp85.cpp",
2093   MAME_DIR .. "src/mame/includes/exp85.h",
18772094}
18782095
18792096createMESSProjects(_target, _subtarget, "next")
18802097files {
18812098   MAME_DIR .. "src/mame/drivers/next.cpp",
2099   MAME_DIR .. "src/mame/includes/next.h",
18822100   MAME_DIR .. "src/mame/machine/nextkbd.cpp",
2101   MAME_DIR .. "src/mame/machine/nextkbd.h",
18832102   MAME_DIR .. "src/mame/machine/nextmo.cpp",
2103   MAME_DIR .. "src/mame/machine/nextmo.h",
18842104}
18852105
18862106createMESSProjects(_target, _subtarget, "nintendo")
18872107files {
18882108   MAME_DIR .. "src/mame/drivers/gb.cpp",
2109   MAME_DIR .. "src/mame/includes/gb.h",
18892110   MAME_DIR .. "src/mame/audio/gb.cpp",
2111   MAME_DIR .. "src/mame/audio/gb.h",
18902112   MAME_DIR .. "src/mame/machine/gb.cpp",
18912113   MAME_DIR .. "src/mame/video/gb_lcd.cpp",
2114   MAME_DIR .. "src/mame/video/gb_lcd.h",
18922115   MAME_DIR .. "src/mame/drivers/gba.cpp",
2116   MAME_DIR .. "src/mame/includes/gba.h",
18932117   MAME_DIR .. "src/mame/video/gba.cpp",
18942118   MAME_DIR .. "src/mame/drivers/n64.cpp",
2119   MAME_DIR .. "src/mame/includes/n64.h",
18952120   MAME_DIR .. "src/mame/drivers/nes.cpp",
2121   MAME_DIR .. "src/mame/includes/nes.h",
18962122   MAME_DIR .. "src/mame/machine/nes.cpp",
18972123   MAME_DIR .. "src/mame/video/nes.cpp",
18982124   MAME_DIR .. "src/mame/drivers/pokemini.cpp",
18992125   MAME_DIR .. "src/mame/drivers/snes.cpp",
2126   MAME_DIR .. "src/mame/includes/snes.h",
19002127   MAME_DIR .. "src/mame/machine/snescx4.cpp",
2128   MAME_DIR .. "src/mame/machine/snescx4.h",
2129   MAME_DIR .. "src/mame/machine/cx4data.inc",
2130   MAME_DIR .. "src/mame/machine/cx4fn.inc",
2131   MAME_DIR .. "src/mame/machine/cx4oam.inc",
2132   MAME_DIR .. "src/mame/machine/cx4ops.inc",
19012133   MAME_DIR .. "src/mame/drivers/vboy.cpp",
19022134   MAME_DIR .. "src/mame/audio/vboy.cpp",
2135   MAME_DIR .. "src/mame/audio/vboy.h",
19032136}
19042137
19052138createMESSProjects(_target, _subtarget, "nokia")
19062139files {
19072140   MAME_DIR .. "src/mame/drivers/mikromik.cpp",
2141   MAME_DIR .. "src/mame/includes/mikromik.h",
19082142   MAME_DIR .. "src/mame/machine/mm1kb.cpp",
2143   MAME_DIR .. "src/mame/machine/mm1kb.h",
19092144   MAME_DIR .. "src/mame/video/mikromik.cpp",
19102145}
19112146
r250291r250292
19192154   MAME_DIR .. "src/mame/drivers/mk1.cpp",
19202155   MAME_DIR .. "src/mame/drivers/mk2.cpp",
19212156   MAME_DIR .. "src/mame/drivers/ssystem3.cpp",
2157   MAME_DIR .. "src/mame/includes/ssystem3.h",
19222158   MAME_DIR .. "src/mame/video/ssystem3.cpp",
19232159   MAME_DIR .. "src/mame/drivers/supercon.cpp",
19242160}
r250291r250292
19272163files {
19282164   MAME_DIR .. "src/mame/drivers/m20.cpp",
19292165   MAME_DIR .. "src/mame/machine/m20_kbd.cpp",
2166   MAME_DIR .. "src/mame/machine/m20_kbd.h",
19302167   MAME_DIR .. "src/mame/machine/m20_8086.cpp",
2168   MAME_DIR .. "src/mame/machine/m20_8086.h",
19312169   MAME_DIR .. "src/mame/drivers/m24.cpp",
19322170   MAME_DIR .. "src/mame/machine/m24_kbd.cpp",
1933   MAME_DIR .. "src/mame/machine/m24_z8000.cpp"
2171   MAME_DIR .. "src/mame/machine/m24_kbd.h",
2172   MAME_DIR .. "src/mame/machine/m24_z8000.cpp",
2173   MAME_DIR .. "src/mame/machine/m24_z8000.h",
19342174}
19352175
19362176createMESSProjects(_target, _subtarget, "olympia")
r250291r250292
19462186createMESSProjects(_target, _subtarget, "omnibyte")
19472187files {
19482188   MAME_DIR .. "src/mame/drivers/msbc1.cpp",
2189   MAME_DIR .. "src/mame/includes/msbc1.h",
19492190   MAME_DIR .. "src/mame/drivers/ob68k1a.cpp",
2191   MAME_DIR .. "src/mame/includes/ob68k1a.h",
19502192}
19512193
19522194createMESSProjects(_target, _subtarget, "orion")
19532195files {
19542196   MAME_DIR .. "src/mame/drivers/orion.cpp",
2197   MAME_DIR .. "src/mame/includes/orion.h",
19552198   MAME_DIR .. "src/mame/machine/orion.cpp",
19562199   MAME_DIR .. "src/mame/video/orion.cpp",
19572200}
r250291r250292
19592202createMESSProjects(_target, _subtarget, "osborne")
19602203files {
19612204   MAME_DIR .. "src/mame/drivers/osborne1.cpp",
2205   MAME_DIR .. "src/mame/includes/osborne1.h",
19622206   MAME_DIR .. "src/mame/machine/osborne1.cpp",
19632207   MAME_DIR .. "src/mame/drivers/osbexec.cpp",
19642208   MAME_DIR .. "src/mame/drivers/vixen.cpp",
2209   MAME_DIR .. "src/mame/includes/vixen.h",
19652210}
19662211
19672212createMESSProjects(_target, _subtarget, "osi")
19682213files {
19692214   MAME_DIR .. "src/mame/drivers/osi.cpp",
2215   MAME_DIR .. "src/mame/includes/osi.h",
19702216   MAME_DIR .. "src/mame/video/osi.cpp",
19712217}
19722218
19732219createMESSProjects(_target, _subtarget, "palm")
19742220files {
19752221   MAME_DIR .. "src/mame/drivers/palm.cpp",
2222   MAME_DIR .. "src/mame/drivers/palm_dbg.inc",
19762223   MAME_DIR .. "src/mame/drivers/palmz22.cpp",
19772224}
19782225
r250291r250292
19912238   MAME_DIR .. "src/mame/drivers/asst128.cpp",
19922239   MAME_DIR .. "src/mame/drivers/europc.cpp",
19932240   MAME_DIR .. "src/mame/drivers/genpc.cpp",
2241   MAME_DIR .. "src/mame/includes/genpc.h",
19942242   MAME_DIR .. "src/mame/machine/genpc.cpp",
19952243   MAME_DIR .. "src/mame/drivers/ibmpc.cpp",
19962244   MAME_DIR .. "src/mame/drivers/ibmpcjr.cpp",
19972245   MAME_DIR .. "src/mame/drivers/pc.cpp",
19982246   MAME_DIR .. "src/mame/drivers/tandy1t.cpp",
19992247   MAME_DIR .. "src/mame/video/pc_t1t.cpp",
2248   MAME_DIR .. "src/mame/video/pc_t1t.h",
20002249}
20012250
20022251createMESSProjects(_target, _subtarget, "pdp1")
20032252files {
20042253   MAME_DIR .. "src/mame/drivers/pdp1.cpp",
2254   MAME_DIR .. "src/mame/includes/pdp1.h",
20052255   MAME_DIR .. "src/mame/video/pdp1.cpp",
20062256}
20072257
20082258createMESSProjects(_target, _subtarget, "pel")
20092259files {
20102260   MAME_DIR .. "src/mame/drivers/galeb.cpp",
2261   MAME_DIR .. "src/mame/includes/galeb.h",
20112262   MAME_DIR .. "src/mame/video/galeb.cpp",
20122263      MAME_DIR .. "src/mame/drivers/orao.cpp",
2264   MAME_DIR .. "src/mame/includes/orao.h",
20132265   MAME_DIR .. "src/mame/machine/orao.cpp",
20142266   MAME_DIR .. "src/mame/video/orao.cpp",
20152267}
r250291r250292
20172269createMESSProjects(_target, _subtarget, "philips")
20182270files {
20192271   MAME_DIR .. "src/mame/drivers/p2000t.cpp",
2272   MAME_DIR .. "src/mame/includes/p2000t.h",
20202273   MAME_DIR .. "src/mame/machine/p2000t.cpp",
20212274   MAME_DIR .. "src/mame/video/p2000m.cpp",
20222275   MAME_DIR .. "src/mame/drivers/vg5k.cpp",
r250291r250292
20252278createMESSProjects(_target, _subtarget, "poly88")
20262279files {
20272280   MAME_DIR .. "src/mame/drivers/poly88.cpp",
2281   MAME_DIR .. "src/mame/includes/poly88.h",
20282282   MAME_DIR .. "src/mame/machine/poly88.cpp",
20292283   MAME_DIR .. "src/mame/video/poly88.cpp",
20302284}
r250291r250292
20322286createMESSProjects(_target, _subtarget, "psion")
20332287files {
20342288   MAME_DIR .. "src/mame/drivers/psion.cpp",
2289   MAME_DIR .. "src/mame/includes/psion.h",
20352290   MAME_DIR .. "src/mame/machine/psion_pack.cpp",
2291   MAME_DIR .. "src/mame/machine/psion_pack.h",
20362292}
20372293
20382294createMESSProjects(_target, _subtarget, "radio")
r250291r250292
20402296   MAME_DIR .. "src/mame/drivers/apogee.cpp",
20412297   MAME_DIR .. "src/mame/drivers/mikrosha.cpp",
20422298   MAME_DIR .. "src/mame/drivers/partner.cpp",
2299   MAME_DIR .. "src/mame/includes/partner.h",
20432300   MAME_DIR .. "src/mame/machine/partner.cpp",
20442301   MAME_DIR .. "src/mame/drivers/radio86.cpp",
2302   MAME_DIR .. "src/mame/includes/radio86.h",
20452303   MAME_DIR .. "src/mame/machine/radio86.cpp",
20462304}
20472305
r250291r250292
20502308   MAME_DIR .. "src/mame/drivers/microkit.cpp",
20512309   MAME_DIR .. "src/mame/drivers/studio2.cpp",
20522310   MAME_DIR .. "src/mame/drivers/vip.cpp",
2311   MAME_DIR .. "src/mame/includes/vip.h",
20532312}
20542313
20552314createMESSProjects(_target, _subtarget, "regnecentralen")
r250291r250292
20652324createMESSProjects(_target, _subtarget, "rm")
20662325files {
20672326   MAME_DIR .. "src/mame/drivers/rm380z.cpp",
2327   MAME_DIR .. "src/mame/includes/rm380z.h",
20682328   MAME_DIR .. "src/mame/machine/rm380z.cpp",
20692329   MAME_DIR .. "src/mame/video/rm380z.cpp",
20702330   MAME_DIR .. "src/mame/drivers/rmnimbus.cpp",
2331   MAME_DIR .. "src/mame/includes/rmnimbus.h",
20712332   MAME_DIR .. "src/mame/machine/rmnimbus.cpp",
20722333   MAME_DIR .. "src/mame/video/rmnimbus.cpp",
20732334   MAME_DIR .. "src/mame/machine/rmnkbd.cpp",
2335   MAME_DIR .. "src/mame/machine/rmnkbd.h",
20742336}
20752337
20762338createMESSProjects(_target, _subtarget, "robotron")
r250291r250292
20962358createMESSProjects(_target, _subtarget, "rockwell")
20972359files {
20982360   MAME_DIR .. "src/mame/drivers/aim65.cpp",
2361   MAME_DIR .. "src/mame/includes/aim65.h",
20992362   MAME_DIR .. "src/mame/machine/aim65.cpp",
21002363   MAME_DIR .. "src/mame/drivers/aim65_40.cpp",
21012364}
r250291r250292
21032366createMESSProjects(_target, _subtarget, "sage")
21042367files {
21052368   MAME_DIR .. "src/mame/drivers/sage2.cpp",
2369   MAME_DIR .. "src/mame/includes/sage2.h",
21062370}
21072371
21082372createMESSProjects(_target, _subtarget, "samcoupe")
21092373files {
21102374   MAME_DIR .. "src/mame/drivers/samcoupe.cpp",
2375   MAME_DIR .. "src/mame/includes/samcoupe.h",
21112376   MAME_DIR .. "src/mame/machine/samcoupe.cpp",
21122377   MAME_DIR .. "src/mame/video/samcoupe.cpp",
21132378}
r250291r250292
21212386files {
21222387   MAME_DIR .. "src/mame/drivers/mbc200.cpp",
21232388   MAME_DIR .. "src/mame/drivers/mbc55x.cpp",
2389   MAME_DIR .. "src/mame/includes/mbc55x.h",
21242390   MAME_DIR .. "src/mame/machine/mbc55x.cpp",
21252391   MAME_DIR .. "src/mame/video/mbc55x.cpp",
21262392   MAME_DIR .. "src/mame/drivers/phc25.cpp",
2393   MAME_DIR .. "src/mame/includes/phc25.h",
21272394}
21282395
21292396createMESSProjects(_target, _subtarget, "sega")
21302397files {
21312398   MAME_DIR .. "src/mame/drivers/dccons.cpp",
2399   MAME_DIR .. "src/mame/includes/dccons.h",
21322400   MAME_DIR .. "src/mame/machine/dccons.cpp",
21332401   MAME_DIR .. "src/mame/drivers/megadriv.cpp",
2402   MAME_DIR .. "src/mame/includes/megadriv.h",
2403   MAME_DIR .. "src/mame/includes/md_cons.h",
21342404   MAME_DIR .. "src/mame/drivers/saturn.cpp",
21352405   MAME_DIR .. "src/mame/drivers/segapico.cpp",
21362406   MAME_DIR .. "src/mame/drivers/sega_sawatte.cpp",
21372407   MAME_DIR .. "src/mame/drivers/segapm.cpp",
21382408   MAME_DIR .. "src/mame/drivers/sg1000.cpp",
2409   MAME_DIR .. "src/mame/includes/sg1000.h",
21392410   MAME_DIR .. "src/mame/drivers/sms.cpp",
2411   MAME_DIR .. "src/mame/includes/sms.h",
21402412   MAME_DIR .. "src/mame/machine/sms.cpp",
21412413   MAME_DIR .. "src/mame/drivers/svmu.cpp",
21422414   MAME_DIR .. "src/mame/machine/mega32x.cpp",
2415   MAME_DIR .. "src/mame/machine/mega32x.h",
21432416   MAME_DIR .. "src/mame/machine/megacd.cpp",
2417   MAME_DIR .. "src/mame/machine/megacd.h",
21442418   MAME_DIR .. "src/mame/machine/megacdcd.cpp",
2419   MAME_DIR .. "src/mame/machine/megacdcd.h",
21452420}
21462421
21472422createMESSProjects(_target, _subtarget, "sgi")
21482423files {
21492424   MAME_DIR .. "src/mame/machine/sgi.cpp",
2425   MAME_DIR .. "src/mame/machine/sgi.h",
21502426   MAME_DIR .. "src/mame/drivers/sgi_ip2.cpp",
21512427   MAME_DIR .. "src/mame/drivers/sgi_ip6.cpp",
21522428   MAME_DIR .. "src/mame/drivers/ip20.cpp",
21532429   MAME_DIR .. "src/mame/drivers/ip22.cpp",
21542430   MAME_DIR .. "src/mame/video/newport.cpp",
2431   MAME_DIR .. "src/mame/video/newport.h",
21552432}
21562433
21572434createMESSProjects(_target, _subtarget, "sharp")
r250291r250292
21592436   MAME_DIR .. "src/mame/drivers/hh_sm510.cpp",
21602437   MAME_DIR .. "src/mame/video/mz700.cpp",
21612438   MAME_DIR .. "src/mame/drivers/mz700.cpp",
2439   MAME_DIR .. "src/mame/includes/mz700.h",
21622440   MAME_DIR .. "src/mame/drivers/pc1500.cpp",
21632441   MAME_DIR .. "src/mame/drivers/pocketc.cpp",
2442   MAME_DIR .. "src/mame/includes/pocketc.h",
21642443   MAME_DIR .. "src/mame/video/pc1401.cpp",
21652444   MAME_DIR .. "src/mame/machine/pc1401.cpp",
2445   MAME_DIR .. "src/mame/includes/pc1401.h",
21662446   MAME_DIR .. "src/mame/video/pc1403.cpp",
21672447   MAME_DIR .. "src/mame/machine/pc1403.cpp",
2448   MAME_DIR .. "src/mame/includes/pc1403.h",
21682449   MAME_DIR .. "src/mame/video/pc1350.cpp",
21692450   MAME_DIR .. "src/mame/machine/pc1350.cpp",
2451   MAME_DIR .. "src/mame/includes/pc1350.h",
21702452   MAME_DIR .. "src/mame/video/pc1251.cpp",
21712453   MAME_DIR .. "src/mame/machine/pc1251.cpp",
2454   MAME_DIR .. "src/mame/includes/pc1251.h",
21722455   MAME_DIR .. "src/mame/video/pocketc.cpp",
21732456   MAME_DIR .. "src/mame/machine/mz700.cpp",
21742457   MAME_DIR .. "src/mame/drivers/x68k.cpp",
2458   MAME_DIR .. "src/mame/includes/x68k.h",
21752459   MAME_DIR .. "src/mame/video/x68k.cpp",
21762460   MAME_DIR .. "src/mame/machine/x68k_hdc.cpp",
2461   MAME_DIR .. "src/mame/machine/x68k_hdc.h",
21772462   MAME_DIR .. "src/mame/machine/x68k_kbd.cpp",
2463   MAME_DIR .. "src/mame/machine/x68k_kbd.h",
21782464   MAME_DIR .. "src/mame/drivers/mz80.cpp",
2465   MAME_DIR .. "src/mame/includes/mz80.h",
21792466   MAME_DIR .. "src/mame/video/mz80.cpp",
21802467   MAME_DIR .. "src/mame/machine/mz80.cpp",
21812468   MAME_DIR .. "src/mame/drivers/mz2000.cpp",
21822469   MAME_DIR .. "src/mame/drivers/x1.cpp",
2470   MAME_DIR .. "src/mame/includes/x1.h",
21832471   MAME_DIR .. "src/mame/machine/x1.cpp",
21842472   MAME_DIR .. "src/mame/drivers/x1twin.cpp",
21852473   MAME_DIR .. "src/mame/drivers/mz2500.cpp",
21862474   MAME_DIR .. "src/mame/drivers/mz3500.cpp",
21872475   MAME_DIR .. "src/mame/drivers/pce220.cpp",
21882476   MAME_DIR .. "src/mame/machine/pce220_ser.cpp",
2477   MAME_DIR .. "src/mame/machine/pce220_ser.h",
21892478   MAME_DIR .. "src/mame/drivers/mz6500.cpp",
21902479   MAME_DIR .. "src/mame/drivers/zaurus.cpp",
2480   MAME_DIR .. "src/mame/machine/pxa255.h",
21912481}
21922482
21932483createMESSProjects(_target, _subtarget, "sinclair")
r250291r250292
21962486   MAME_DIR .. "src/mame/video/timex.cpp",
21972487   MAME_DIR .. "src/mame/video/zx.cpp",
21982488   MAME_DIR .. "src/mame/drivers/zx.cpp",
2489   MAME_DIR .. "src/mame/includes/zx.h",
21992490   MAME_DIR .. "src/mame/machine/zx.cpp",
22002491   MAME_DIR .. "src/mame/drivers/spectrum.cpp",
2492   MAME_DIR .. "src/mame/includes/spectrum.h",
22012493   MAME_DIR .. "src/mame/drivers/spec128.cpp",
22022494   MAME_DIR .. "src/mame/drivers/timex.cpp",
22032495   MAME_DIR .. "src/mame/drivers/specpls3.cpp",
r250291r250292
22052497   MAME_DIR .. "src/mame/drivers/atm.cpp",
22062498   MAME_DIR .. "src/mame/drivers/pentagon.cpp",
22072499   MAME_DIR .. "src/mame/machine/beta.cpp",
2500   MAME_DIR .. "src/mame/machine/beta.h",
22082501   MAME_DIR .. "src/mame/machine/spec_snqk.cpp",
2502   MAME_DIR .. "src/mame/machine/spec_snqk.h",
22092503   MAME_DIR .. "src/mame/drivers/ql.cpp",
2504   MAME_DIR .. "src/mame/includes/ql.h",
22102505   MAME_DIR .. "src/mame/machine/qimi.cpp",
2506   MAME_DIR .. "src/mame/machine/qimi.h",
22112507   MAME_DIR .. "src/mame/video/zx8301.cpp",
2508   MAME_DIR .. "src/mame/video/zx8301.h",
22122509   MAME_DIR .. "src/mame/machine/zx8302.cpp",
2510   MAME_DIR .. "src/mame/machine/zx8302.h",
22132511}
22142512
22152513createMESSProjects(_target, _subtarget, "siemens")
22162514files {
22172515   MAME_DIR .. "src/mame/drivers/pcd.cpp",
22182516   MAME_DIR .. "src/mame/machine/pcd_kbd.cpp",
2517   MAME_DIR .. "src/mame/machine/pcd_kbd.h",
22192518   MAME_DIR .. "src/mame/video/pcd.cpp",
2519   MAME_DIR .. "src/mame/video/pcd.h",
22202520}
22212521
22222522createMESSProjects(_target, _subtarget, "slicer")
r250291r250292
22292529   MAME_DIR .. "src/mame/drivers/ng_aes.cpp",
22302530   MAME_DIR .. "src/mame/drivers/ngp.cpp",
22312531   MAME_DIR .. "src/mame/video/k1ge.cpp",
2532   MAME_DIR .. "src/mame/video/k1ge.h",
22322533}
22332534
22342535createMESSProjects(_target, _subtarget, "sony")
r250291r250292
22362537   MAME_DIR .. "src/mame/drivers/pockstat.cpp",
22372538   MAME_DIR .. "src/mame/drivers/psx.cpp",
22382539   MAME_DIR .. "src/mame/machine/psxcd.cpp",
2540   MAME_DIR .. "src/mame/machine/psxcd.h",
22392541   MAME_DIR .. "src/mame/drivers/pve500.cpp",
22402542   MAME_DIR .. "src/mame/drivers/smc777.cpp",
22412543}
r250291r250292
22432545createMESSProjects(_target, _subtarget, "sord")
22442546files {
22452547   MAME_DIR .. "src/mame/drivers/m5.cpp",
2548   MAME_DIR .. "src/mame/includes/m5.h",
22462549}
22472550
22482551createMESSProjects(_target, _subtarget, "special")
22492552files {
22502553   MAME_DIR .. "src/mame/drivers/special.cpp",
2554   MAME_DIR .. "src/mame/includes/special.h",
22512555   MAME_DIR .. "src/mame/audio/specimx_snd.cpp",
2556   MAME_DIR .. "src/mame/audio/specimx_snd.h",
22522557   MAME_DIR .. "src/mame/machine/special.cpp",
22532558   MAME_DIR .. "src/mame/video/special.cpp",
22542559}
r250291r250292
22642569createMESSProjects(_target, _subtarget, "svi")
22652570files {
22662571   MAME_DIR .. "src/mame/drivers/svi318.cpp",
2572   MAME_DIR .. "src/mame/includes/svi318.h",
22672573   MAME_DIR .. "src/mame/machine/svi318.cpp",
22682574}
22692575
22702576createMESSProjects(_target, _subtarget, "svision")
22712577files {
22722578   MAME_DIR .. "src/mame/drivers/svision.cpp",
2579   MAME_DIR .. "src/mame/includes/svision.h",
22732580   MAME_DIR .. "src/mame/audio/svis_snd.cpp",
2581   MAME_DIR .. "src/mame/audio/svis_snd.h",
22742582}
22752583
22762584createMESSProjects(_target, _subtarget, "swtpc09")
22772585files {
22782586   MAME_DIR .. "src/mame/drivers/swtpc09.cpp",
2587   MAME_DIR .. "src/mame/includes/swtpc09.h",
22792588   MAME_DIR .. "src/mame/machine/swtpc09.cpp",
22802589}
22812590
r250291r250292
22922601createMESSProjects(_target, _subtarget, "tandberg")
22932602files {
22942603   MAME_DIR .. "src/mame/drivers/tdv2324.cpp",
2604   MAME_DIR .. "src/mame/includes/tdv2324.h",
22952605}
22962606
22972607createMESSProjects(_target, _subtarget, "tangerin")
22982608files {
22992609   MAME_DIR .. "src/mame/drivers/microtan.cpp",
2610   MAME_DIR .. "src/mame/includes/microtan.h",
23002611   MAME_DIR .. "src/mame/machine/microtan.cpp",
23012612   MAME_DIR .. "src/mame/video/microtan.cpp",
23022613   MAME_DIR .. "src/mame/drivers/oric.cpp",
r250291r250292
23052616createMESSProjects(_target, _subtarget, "tatung")
23062617files {
23072618   MAME_DIR .. "src/mame/drivers/einstein.cpp",
2619   MAME_DIR .. "src/mame/includes/einstein.h",
23082620   MAME_DIR .. "src/mame/machine/einstein.cpp",
23092621}
23102622
23112623createMESSProjects(_target, _subtarget, "teamconc")
23122624files {
23132625   MAME_DIR .. "src/mame/drivers/comquest.cpp",
2626   MAME_DIR .. "src/mame/includes/comquest.h",
23142627   MAME_DIR .. "src/mame/video/comquest.cpp",
23152628}
23162629
23172630createMESSProjects(_target, _subtarget, "tektroni")
23182631files {
23192632   MAME_DIR .. "src/mame/drivers/tek405x.cpp",
2633   MAME_DIR .. "src/mame/includes/tek405x.h",
23202634   MAME_DIR .. "src/mame/drivers/tek410x.cpp",
23212635}
23222636
23232637createMESSProjects(_target, _subtarget, "telenova")
23242638files {
23252639   MAME_DIR .. "src/mame/drivers/compis.cpp",
2640   MAME_DIR .. "src/mame/includes/compis.h",
23262641   MAME_DIR .. "src/mame/machine/compiskb.cpp",
2642   MAME_DIR .. "src/mame/machine/compiskb.h",
23272643}
23282644
23292645createMESSProjects(_target, _subtarget, "telercas")
23302646files {
23312647   MAME_DIR .. "src/mame/drivers/tmc1800.cpp",
2648   MAME_DIR .. "src/mame/includes/tmc1800.h",
23322649   MAME_DIR .. "src/mame/video/tmc1800.cpp",
23332650   MAME_DIR .. "src/mame/drivers/tmc600.cpp",
2651   MAME_DIR .. "src/mame/includes/tmc600.h",
23342652   MAME_DIR .. "src/mame/video/tmc600.cpp",
23352653   MAME_DIR .. "src/mame/drivers/tmc2000e.cpp",
2654   MAME_DIR .. "src/mame/includes/tmc2000e.h",
23362655}
23372656
23382657createMESSProjects(_target, _subtarget, "televideo")
r250291r250292
23512670createMESSProjects(_target, _subtarget, "tesla")
23522671files {
23532672   MAME_DIR .. "src/mame/drivers/ondra.cpp",
2673   MAME_DIR .. "src/mame/includes/ondra.h",
23542674   MAME_DIR .. "src/mame/machine/ondra.cpp",
23552675   MAME_DIR .. "src/mame/video/ondra.cpp",
23562676   MAME_DIR .. "src/mame/drivers/pmd85.cpp",
2677   MAME_DIR .. "src/mame/includes/pmd85.h",
23572678   MAME_DIR .. "src/mame/machine/pmd85.cpp",
23582679   MAME_DIR .. "src/mame/drivers/pmi80.cpp",
23592680   MAME_DIR .. "src/mame/drivers/sapi1.cpp",
r250291r250292
23682689createMESSProjects(_target, _subtarget, "thomson")
23692690files {
23702691   MAME_DIR .. "src/mame/drivers/thomson.cpp",
2692   MAME_DIR .. "src/mame/includes/thomson.h",
23712693   MAME_DIR .. "src/mame/machine/thomson.cpp",
23722694   MAME_DIR .. "src/mame/machine/thomflop.cpp",
2695   MAME_DIR .. "src/mame/machine/thomflop.h",
23732696   MAME_DIR .. "src/mame/video/thomson.cpp",
23742697}
23752698
23762699createMESSProjects(_target, _subtarget, "ti")
23772700files {
23782701   MAME_DIR .. "src/mame/drivers/avigo.cpp",
2702   MAME_DIR .. "src/mame/includes/avigo.h",
23792703   MAME_DIR .. "src/mame/video/avigo.cpp",
23802704   MAME_DIR .. "src/mame/drivers/cc40.cpp",
23812705   MAME_DIR .. "src/mame/drivers/evmbug.cpp",
r250291r250292
23852709   MAME_DIR .. "src/mame/drivers/tispeak.cpp",
23862710   MAME_DIR .. "src/mame/drivers/ti74.cpp",
23872711   MAME_DIR .. "src/mame/drivers/ti85.cpp",
2712   MAME_DIR .. "src/mame/includes/ti85.h",
23882713   MAME_DIR .. "src/mame/machine/ti85.cpp",
23892714   MAME_DIR .. "src/mame/video/ti85.cpp",
23902715   MAME_DIR .. "src/mame/drivers/ti89.cpp",
2716   MAME_DIR .. "src/mame/includes/ti89.h",
23912717   MAME_DIR .. "src/mame/drivers/ti99_2.cpp",
23922718   MAME_DIR .. "src/mame/drivers/ti99_4x.cpp",
23932719   MAME_DIR .. "src/mame/drivers/ti99_4p.cpp",
r250291r250292
23962722   MAME_DIR .. "src/mame/drivers/ti990_10.cpp",
23972723   MAME_DIR .. "src/mame/drivers/tm990189.cpp",
23982724   MAME_DIR .. "src/mame/video/733_asr.cpp",
2725   MAME_DIR .. "src/mame/video/733_asr.h",
23992726   MAME_DIR .. "src/mame/video/911_vdt.cpp",
2727   MAME_DIR .. "src/mame/video/911_vdt.h",
2728   MAME_DIR .. "src/mame/video/911_chr.h",
2729   MAME_DIR .. "src/mame/video/911_key.h",
24002730   MAME_DIR .. "src/mame/drivers/hh_tms1k.cpp",
2731   MAME_DIR .. "src/mame/includes/hh_tms1k.h",
24012732}
24022733
24032734createMESSProjects(_target, _subtarget, "tiger")
24042735files {
24052736   MAME_DIR .. "src/mame/drivers/gamecom.cpp",
2737   MAME_DIR .. "src/mame/includes/gamecom.h",
24062738   MAME_DIR .. "src/mame/machine/gamecom.cpp",
24072739   MAME_DIR .. "src/mame/video/gamecom.cpp",
24082740}
r250291r250292
24112743files {
24122744   MAME_DIR .. "src/mame/drivers/gizmondo.cpp",
24132745   MAME_DIR .. "src/mame/machine/docg3.cpp",
2746   MAME_DIR .. "src/mame/machine/docg3.h",
24142747}
24152748
24162749createMESSProjects(_target, _subtarget, "tiki")
24172750files {
24182751   MAME_DIR .. "src/mame/drivers/tiki100.cpp",
2752   MAME_DIR .. "src/mame/includes/tiki100.h",
24192753}
24202754
24212755createMESSProjects(_target, _subtarget, "tomy")
r250291r250292
24262760createMESSProjects(_target, _subtarget, "toshiba")
24272761files {
24282762   MAME_DIR .. "src/mame/drivers/pasopia.cpp",
2763   MAME_DIR .. "src/mame/includes/pasopia.h",
24292764   MAME_DIR .. "src/mame/drivers/pasopia7.cpp",
24302765   MAME_DIR .. "src/mame/drivers/paso1600.cpp",
24312766}
r250291r250292
24492784createMESSProjects(_target, _subtarget, "trs")
24502785files {
24512786   MAME_DIR .. "src/mame/drivers/coco12.cpp",
2787   MAME_DIR .. "src/mame/includes/coco12.h",
24522788   MAME_DIR .. "src/mame/drivers/coco3.cpp",
2789   MAME_DIR .. "src/mame/includes/coco3.h",
24532790   MAME_DIR .. "src/mame/drivers/dragon.cpp",
2791   MAME_DIR .. "src/mame/includes/dragon.h",
24542792   MAME_DIR .. "src/mame/drivers/mc10.cpp",
24552793   MAME_DIR .. "src/mame/machine/6883sam.cpp",
2794   MAME_DIR .. "src/mame/machine/6883sam.h",
24562795   MAME_DIR .. "src/mame/machine/coco.cpp",
2796   MAME_DIR .. "src/mame/includes/coco.h",
24572797   MAME_DIR .. "src/mame/machine/coco12.cpp",
24582798   MAME_DIR .. "src/mame/machine/coco3.cpp",
24592799   MAME_DIR .. "src/mame/machine/coco_vhd.cpp",
2800   MAME_DIR .. "src/mame/machine/coco_vhd.h",
24602801   MAME_DIR .. "src/mame/machine/dragon.cpp",
24612802   MAME_DIR .. "src/mame/machine/dgnalpha.cpp",
2803   MAME_DIR .. "src/mame/includes/dgnalpha.h",
24622804   MAME_DIR .. "src/mame/video/gime.cpp",
2805   MAME_DIR .. "src/mame/video/gime.h",
24632806   MAME_DIR .. "src/mame/drivers/trs80.cpp",
2807   MAME_DIR .. "src/mame/includes/trs80.h",
24642808   MAME_DIR .. "src/mame/machine/trs80.cpp",
24652809   MAME_DIR .. "src/mame/video/trs80.cpp",
24662810   MAME_DIR .. "src/mame/drivers/trs80m2.cpp",
2811   MAME_DIR .. "src/mame/includes/trs80m2.h",
24672812   MAME_DIR .. "src/mame/machine/trs80m2kb.cpp",
2813   MAME_DIR .. "src/mame/machine/trs80m2kb.h",
24682814   MAME_DIR .. "src/mame/drivers/tandy2k.cpp",
2815   MAME_DIR .. "src/mame/includes/tandy2k.h",
24692816   MAME_DIR .. "src/mame/machine/tandy2kb.cpp",
2817   MAME_DIR .. "src/mame/machine/tandy2kb.h",
24702818}
24712819
24722820createMESSProjects(_target, _subtarget, "ultimachine")
r250291r250292
24832831files {
24842832   MAME_DIR .. "src/mame/drivers/unichamp.cpp",
24852833   MAME_DIR .. "src/mame/video/gic.cpp",
2834   MAME_DIR .. "src/mame/video/gic.h",
24862835   MAME_DIR .. "src/mame/video/gic.cpp",
2836   MAME_DIR .. "src/mame/video/gic.h",
24872837}
24882838
24892839
r250291r250292
24962846files {
24972847   MAME_DIR .. "src/mame/drivers/chessmst.cpp",
24982848   MAME_DIR .. "src/mame/drivers/kc.cpp",
2849   MAME_DIR .. "src/mame/includes/kc.h",
24992850   MAME_DIR .. "src/mame/machine/kc.cpp",
25002851   MAME_DIR .. "src/mame/machine/kc_keyb.cpp",
2852   MAME_DIR .. "src/mame/machine/kc_keyb.h",
25012853   MAME_DIR .. "src/mame/video/kc.cpp",
25022854   MAME_DIR .. "src/mame/drivers/lc80.cpp",
2855   MAME_DIR .. "src/mame/includes/lc80.h",
25032856   MAME_DIR .. "src/mame/drivers/mc80.cpp",
2857   MAME_DIR .. "src/mame/includes/mc80.h",
25042858   MAME_DIR .. "src/mame/machine/mc80.cpp",
25052859   MAME_DIR .. "src/mame/video/mc80.cpp",
25062860   MAME_DIR .. "src/mame/drivers/poly880.cpp",
2861   MAME_DIR .. "src/mame/includes/poly880.h",
25072862   MAME_DIR .. "src/mame/drivers/sc1.cpp",
25082863   MAME_DIR .. "src/mame/drivers/sc2.cpp",
25092864}
r250291r250292
25112866createMESSProjects(_target, _subtarget, "vidbrain")
25122867files {
25132868   MAME_DIR .. "src/mame/drivers/vidbrain.cpp",
2869   MAME_DIR .. "src/mame/includes/vidbrain.h",
25142870   MAME_DIR .. "src/mame/video/uv201.cpp",
2871   MAME_DIR .. "src/mame/video/uv201.h",
25152872}
25162873
25172874createMESSProjects(_target, _subtarget, "videoton")
25182875files {
25192876   MAME_DIR .. "src/mame/drivers/tvc.cpp",
25202877   MAME_DIR .. "src/mame/audio/tvc_snd.cpp",
2878   MAME_DIR .. "src/mame/audio/tvc_snd.h",
25212879}
25222880
25232881createMESSProjects(_target, _subtarget, "visual")
25242882files {
25252883   MAME_DIR .. "src/mame/drivers/v1050.cpp",
2884   MAME_DIR .. "src/mame/includes/v1050.h",
25262885   MAME_DIR .. "src/mame/machine/v1050kb.cpp",
2886   MAME_DIR .. "src/mame/machine/v1050kb.h",
25272887   MAME_DIR .. "src/mame/video/v1050.cpp",
25282888}
25292889
r250291r250292
25362896createMESSProjects(_target, _subtarget, "vtech")
25372897files {
25382898   MAME_DIR .. "src/mame/drivers/crvision.cpp",
2899   MAME_DIR .. "src/mame/includes/crvision.h",
25392900   MAME_DIR .. "src/mame/drivers/geniusiq.cpp",
25402901   MAME_DIR .. "src/mame/drivers/laser3k.cpp",
25412902   MAME_DIR .. "src/mame/drivers/lcmate2.cpp",
25422903   MAME_DIR .. "src/mame/drivers/pc4.cpp",
2904   MAME_DIR .. "src/mame/includes/pc4.h",
25432905   MAME_DIR .. "src/mame/video/pc4.cpp",
25442906   MAME_DIR .. "src/mame/drivers/pc2000.cpp",
25452907   MAME_DIR .. "src/mame/drivers/pitagjr.cpp",
25462908   MAME_DIR .. "src/mame/drivers/prestige.cpp",
25472909   MAME_DIR .. "src/mame/drivers/vtech1.cpp",
25482910   MAME_DIR .. "src/mame/drivers/vtech2.cpp",
2911   MAME_DIR .. "src/mame/includes/vtech2.h",
25492912   MAME_DIR .. "src/mame/machine/vtech2.cpp",
25502913   MAME_DIR .. "src/mame/video/vtech2.cpp",
25512914   MAME_DIR .. "src/mame/drivers/socrates.cpp",
25522915   MAME_DIR .. "src/mame/audio/socrates.cpp",
2916   MAME_DIR .. "src/mame/audio/socrates.h",
25532917}
25542918
25552919createMESSProjects(_target, _subtarget, "wang")
25562920files {
25572921   MAME_DIR .. "src/mame/drivers/wangpc.cpp",
2922   MAME_DIR .. "src/mame/includes/wangpc.h",
25582923   MAME_DIR .. "src/mame/machine/wangpckb.cpp",
2924   MAME_DIR .. "src/mame/machine/wangpckb.h",
25592925}
25602926
25612927createMESSProjects(_target, _subtarget, "wavemate")
25622928files {
25632929   MAME_DIR .. "src/mame/drivers/bullet.cpp",
2930   MAME_DIR .. "src/mame/includes/bullet.h",
25642931   MAME_DIR .. "src/mame/drivers/jupiter.cpp",
2932   MAME_DIR .. "src/mame/includes/jupiter.h",
25652933}
25662934
25672935createMESSProjects(_target, _subtarget, "xerox")
25682936files {
25692937   MAME_DIR .. "src/mame/drivers/xerox820.cpp",
2938   MAME_DIR .. "src/mame/includes/xerox820.h",
25702939   MAME_DIR .. "src/mame/machine/x820kb.cpp",
2940   MAME_DIR .. "src/mame/machine/x820kb.h",
25712941   MAME_DIR .. "src/mame/drivers/bigbord2.cpp",
25722942   MAME_DIR .. "src/mame/drivers/alto2.cpp",
25732943}
r250291r250292
25752945createMESSProjects(_target, _subtarget, "xussrpc")
25762946files {
25772947   MAME_DIR .. "src/mame/drivers/ec184x.cpp",
2948   MAME_DIR .. "src/mame/includes/ec184x.h",
25782949   MAME_DIR .. "src/mame/drivers/iskr103x.cpp",
25792950   MAME_DIR .. "src/mame/drivers/mc1502.cpp",
2951   MAME_DIR .. "src/mame/machine/kb_7007_3.h",
2952   MAME_DIR .. "src/mame/includes/mc1502.h",
25802953   MAME_DIR .. "src/mame/drivers/poisk1.cpp",
2954   MAME_DIR .. "src/mame/machine/kb_poisk1.h",
2955   MAME_DIR .. "src/mame/includes/poisk1.h",
25812956   MAME_DIR .. "src/mame/video/poisk1.cpp",
2957   MAME_DIR .. "src/mame/video/poisk1.h",
25822958}
25832959
25842960createMESSProjects(_target, _subtarget, "yamaha")
r250291r250292
26062982createMESSProjects(_target, _subtarget, "zvt")
26072983files {
26082984   MAME_DIR .. "src/mame/drivers/pp01.cpp",
2985   MAME_DIR .. "src/mame/includes/pp01.h",
26092986   MAME_DIR .. "src/mame/machine/pp01.cpp",
26102987   MAME_DIR .. "src/mame/video/pp01.cpp",
26112988}
r250291r250292
26182995   MAME_DIR .. "src/mame/drivers/applix.cpp",
26192996   MAME_DIR .. "src/mame/drivers/attache.cpp",
26202997   MAME_DIR .. "src/mame/drivers/aussiebyte.cpp",
2998   MAME_DIR .. "src/mame/includes/aussiebyte.h",
26212999   MAME_DIR .. "src/mame/video/aussiebyte.cpp",
26223000   MAME_DIR .. "src/mame/drivers/ax20.cpp",
26233001   MAME_DIR .. "src/mame/drivers/beehive.cpp",
r250291r250292
26263004   MAME_DIR .. "src/mame/drivers/bitgraph.cpp",
26273005   MAME_DIR .. "src/mame/drivers/br8641.cpp",
26283006   MAME_DIR .. "src/mame/drivers/busicom.cpp",
3007   MAME_DIR .. "src/mame/includes/busicom.h",
26293008   MAME_DIR .. "src/mame/video/busicom.cpp",
26303009   MAME_DIR .. "src/mame/drivers/chaos.cpp",
26313010   MAME_DIR .. "src/mame/drivers/chesstrv.cpp",
r250291r250292
26343013   MAME_DIR .. "src/mame/drivers/codata.cpp",
26353014   MAME_DIR .. "src/mame/drivers/cortex.cpp",
26363015   MAME_DIR .. "src/mame/drivers/cosmicos.cpp",
3016   MAME_DIR .. "src/mame/includes/cosmicos.h",
26373017   MAME_DIR .. "src/mame/drivers/cp1.cpp",
26383018   MAME_DIR .. "src/mame/drivers/cxhumax.cpp",
3019   MAME_DIR .. "src/mame/includes/cxhumax.h",
26393020   MAME_DIR .. "src/mame/drivers/czk80.cpp",
26403021   MAME_DIR .. "src/mame/drivers/d6800.cpp",
26413022   MAME_DIR .. "src/mame/drivers/d6809.cpp",
r250291r250292
26433024   MAME_DIR .. "src/mame/drivers/digel804.cpp",
26443025   MAME_DIR .. "src/mame/drivers/dim68k.cpp",
26453026   MAME_DIR .. "src/mame/drivers/dm7000.cpp",
3027   MAME_DIR .. "src/mame/includes/dm7000.h",
26463028   MAME_DIR .. "src/mame/drivers/dmv.cpp",
26473029   MAME_DIR .. "src/mame/machine/dmv_keyb.cpp",
3030   MAME_DIR .. "src/mame/machine/dmv_keyb.h",
26483031   MAME_DIR .. "src/mame/drivers/dps1.cpp",
26493032   MAME_DIR .. "src/mame/drivers/dsb46.cpp",
26503033   MAME_DIR .. "src/mame/drivers/dual68.cpp",
26513034   MAME_DIR .. "src/mame/drivers/eacc.cpp",
26523035   MAME_DIR .. "src/mame/drivers/elwro800.cpp",
26533036   MAME_DIR .. "src/mame/drivers/eti660.cpp",
3037   MAME_DIR .. "src/mame/includes/eti660.h",
26543038   MAME_DIR .. "src/mame/drivers/excali64.cpp",
26553039   MAME_DIR .. "src/mame/drivers/fanucs15.cpp",
26563040   MAME_DIR .. "src/mame/drivers/fanucspmg.cpp",
r250291r250292
26583042   MAME_DIR .. "src/mame/drivers/fk1.cpp",
26593043   MAME_DIR .. "src/mame/drivers/ft68m.cpp",
26603044   MAME_DIR .. "src/mame/drivers/gamate.cpp",
3045   MAME_DIR .. "src/mame/includes/gamate.h",
26613046   MAME_DIR .. "src/mame/audio/gamate.cpp",
26623047   MAME_DIR .. "src/mame/drivers/gameking.cpp",
26633048   MAME_DIR .. "src/mame/drivers/gimix.cpp",
r250291r250292
26723057   MAME_DIR .. "src/mame/drivers/icatel.cpp",
26733058   MAME_DIR .. "src/mame/drivers/ie15.cpp",
26743059   MAME_DIR .. "src/mame/machine/ie15_kbd.cpp",
3060   MAME_DIR .. "src/mame/machine/ie15_kbd.h",
26753061   MAME_DIR .. "src/mame/drivers/if800.cpp",
26763062   MAME_DIR .. "src/mame/drivers/imsai.cpp",
26773063   MAME_DIR .. "src/mame/drivers/indiana.cpp",
r250291r250292
26893075   MAME_DIR .. "src/mame/drivers/mice.cpp",
26903076   MAME_DIR .. "src/mame/drivers/micral.cpp",
26913077   MAME_DIR .. "src/mame/drivers/micronic.cpp",
3078   MAME_DIR .. "src/mame/includes/micronic.h",
26923079   MAME_DIR .. "src/mame/drivers/mini2440.cpp",
26933080   MAME_DIR .. "src/mame/drivers/mmd1.cpp",
26943081   MAME_DIR .. "src/mame/drivers/mod8.cpp",
r250291r250292
27033090   MAME_DIR .. "src/mame/drivers/myvision.cpp",
27043091   MAME_DIR .. "src/mame/drivers/ngen.cpp",
27053092   MAME_DIR .. "src/mame/machine/ngen_kb.cpp",
3093   MAME_DIR .. "src/mame/machine/ngen_kb.h",
27063094   MAME_DIR .. "src/mame/drivers/octopus.cpp",
27073095   MAME_DIR .. "src/mame/drivers/onyx.cpp",
27083096   MAME_DIR .. "src/mame/drivers/okean240.cpp",
r250291r250292
27103098   MAME_DIR .. "src/mame/drivers/pegasus.cpp",
27113099   MAME_DIR .. "src/mame/drivers/pencil2.cpp",
27123100   MAME_DIR .. "src/mame/drivers/pes.cpp",
3101   MAME_DIR .. "src/mame/includes/pes.h",
27133102   MAME_DIR .. "src/mame/drivers/pipbug.cpp",
27143103   MAME_DIR .. "src/mame/drivers/plan80.cpp",
27153104   MAME_DIR .. "src/mame/drivers/pm68k.cpp",
r250291r250292
27273116   MAME_DIR .. "src/mame/drivers/seattlecmp.cpp",
27283117   MAME_DIR .. "src/mame/drivers/sh4robot.cpp",
27293118   MAME_DIR .. "src/mame/drivers/softbox.cpp",
3119   MAME_DIR .. "src/mame/includes/softbox.h",
27303120   MAME_DIR .. "src/mame/drivers/squale.cpp",
27313121   MAME_DIR .. "src/mame/drivers/swtpc.cpp",
27323122   MAME_DIR .. "src/mame/drivers/swyft.cpp",
r250291r250292
27373127   MAME_DIR .. "src/mame/drivers/terak.cpp",
27383128   MAME_DIR .. "src/mame/drivers/ti630.cpp",
27393129   MAME_DIR .. "src/mame/drivers/tsispch.cpp",
3130   MAME_DIR .. "src/mame/includes/tsispch.h",
27403131   MAME_DIR .. "src/mame/drivers/tvgame.cpp",
27413132   MAME_DIR .. "src/mame/drivers/unistar.cpp",
27423133   MAME_DIR .. "src/mame/drivers/v6809.cpp",
r250291r250292
27443135   MAME_DIR .. "src/mame/drivers/vii.cpp",
27453136   MAME_DIR .. "src/mame/drivers/wicat.cpp",
27463137   MAME_DIR .. "src/mame/drivers/xor100.cpp",
3138   MAME_DIR .. "src/mame/includes/xor100.h",
27473139   MAME_DIR .. "src/mame/drivers/xavix.cpp",
27483140   MAME_DIR .. "src/mame/drivers/zorba.cpp",
27493141}
trunk/scripts/target/mame/nl.lua
r250291r250292
9797      GEN_DIR  .. "mame/layout",
9898   }
9999
100   files{
101      MAME_DIR .. "src/mame/drivers/pong.cpp",
102      MAME_DIR .. "src/mame/drivers/nl_pong.cpp",
103      MAME_DIR .. "src/mame/drivers/nl_pongd.cpp",
104      MAME_DIR .. "src/mame/drivers/nl_breakout.cpp",
100files{
101   MAME_DIR .. "src/mame/drivers/pong.cpp",
102   MAME_DIR .. "src/mame/drivers/nl_pong.cpp",
103   MAME_DIR .. "src/mame/drivers/nl_pongd.cpp",
104   MAME_DIR .. "src/mame/drivers/nl_breakout.cpp",
105105
106      MAME_DIR .. "src/mame/drivers/1942.cpp",
107      MAME_DIR .. "src/mame/video/1942.cpp",
108      MAME_DIR .. "src/mame/drivers/popeye.cpp",
109      MAME_DIR .. "src/mame/video/popeye.cpp",
106   MAME_DIR .. "src/mame/drivers/1942.cpp",
107   MAME_DIR .. "src/mame/includes/1942.h",
108   MAME_DIR .. "src/mame/video/1942.cpp",
109   MAME_DIR .. "src/mame/drivers/popeye.cpp",
110   MAME_DIR .. "src/mame/includes/popeye.h",
111   MAME_DIR .. "src/mame/video/popeye.cpp",
110112
111   }
113}
112114end
113115
114116function linkProjects_mame_nl(_target, _subtarget)
trunk/scripts/target/mame/tiny.lua
r250291r250292
9292      GEN_DIR  .. "mame/layout",
9393   }
9494
95   files{
96      MAME_DIR .. "src/mame/machine/ticket.cpp",
97      MAME_DIR .. "src/mame/drivers/carpolo.cpp",
98      MAME_DIR .. "src/mame/machine/carpolo.cpp",
99      MAME_DIR .. "src/mame/video/carpolo.cpp",
100      MAME_DIR .. "src/mame/drivers/circus.cpp",
101      MAME_DIR .. "src/mame/audio/circus.cpp",
102      MAME_DIR .. "src/mame/video/circus.cpp",
103      MAME_DIR .. "src/mame/drivers/exidy.cpp",
104      MAME_DIR .. "src/mame/audio/exidy.cpp",
105      MAME_DIR .. "src/mame/video/exidy.cpp",
106      MAME_DIR .. "src/mame/audio/exidy440.cpp",
107      MAME_DIR .. "src/mame/drivers/starfire.cpp",
108      MAME_DIR .. "src/mame/video/starfire.cpp",
109      MAME_DIR .. "src/mame/drivers/vertigo.cpp",
110      MAME_DIR .. "src/mame/machine/vertigo.cpp",
111      MAME_DIR .. "src/mame/video/vertigo.cpp",
112      MAME_DIR .. "src/mame/drivers/victory.cpp",
113      MAME_DIR .. "src/mame/video/victory.cpp",
114      MAME_DIR .. "src/mame/audio/targ.cpp",
115      MAME_DIR .. "src/mame/drivers/astrocde.cpp",
116      MAME_DIR .. "src/mame/video/astrocde.cpp",
117      MAME_DIR .. "src/mame/drivers/gridlee.cpp",
118      MAME_DIR .. "src/mame/audio/gridlee.cpp",
119      MAME_DIR .. "src/mame/video/gridlee.cpp",
120      MAME_DIR .. "src/mame/drivers/williams.cpp",
121      MAME_DIR .. "src/mame/machine/williams.cpp",
122      MAME_DIR .. "src/mame/audio/williams.cpp",
123      MAME_DIR .. "src/mame/video/williams.cpp",
124      MAME_DIR .. "src/mame/audio/gorf.cpp",
125      MAME_DIR .. "src/mame/audio/wow.cpp",
126      MAME_DIR .. "src/mame/drivers/gaelco.cpp",
127      MAME_DIR .. "src/mame/video/gaelco.cpp",
128      MAME_DIR .. "src/mame/machine/gaelcrpt.cpp",
129      MAME_DIR .. "src/mame/drivers/wrally.cpp",
130      MAME_DIR .. "src/mame/machine/wrally.cpp",
131      MAME_DIR .. "src/mame/video/wrally.cpp",
132      MAME_DIR .. "src/mame/drivers/looping.cpp",
133      MAME_DIR .. "src/mame/drivers/supertnk.cpp",
134   }
95files{
96   MAME_DIR .. "src/mame/machine/ticket.cpp",
97   MAME_DIR .. "src/mame/machine/ticket.h",
98   MAME_DIR .. "src/mame/drivers/carpolo.cpp",
99   MAME_DIR .. "src/mame/includes/carpolo.h",
100   MAME_DIR .. "src/mame/machine/carpolo.cpp",
101   MAME_DIR .. "src/mame/video/carpolo.cpp",
102   MAME_DIR .. "src/mame/drivers/circus.cpp",
103   MAME_DIR .. "src/mame/includes/circus.h",
104   MAME_DIR .. "src/mame/audio/circus.cpp",
105   MAME_DIR .. "src/mame/video/circus.cpp",
106   MAME_DIR .. "src/mame/drivers/exidy.cpp",
107   MAME_DIR .. "src/mame/includes/exidy.h",
108   MAME_DIR .. "src/mame/audio/exidy.cpp",
109   MAME_DIR .. "src/mame/audio/exidy.h",
110   MAME_DIR .. "src/mame/video/exidy.cpp",
111   MAME_DIR .. "src/mame/audio/exidy440.cpp",
112   MAME_DIR .. "src/mame/audio/exidy440.h",
113   MAME_DIR .. "src/mame/drivers/starfire.cpp",
114   MAME_DIR .. "src/mame/includes/starfire.h",
115   MAME_DIR .. "src/mame/video/starfire.cpp",
116   MAME_DIR .. "src/mame/drivers/vertigo.cpp",
117   MAME_DIR .. "src/mame/includes/vertigo.h",
118   MAME_DIR .. "src/mame/machine/vertigo.cpp",
119   MAME_DIR .. "src/mame/video/vertigo.cpp",
120   MAME_DIR .. "src/mame/drivers/victory.cpp",
121   MAME_DIR .. "src/mame/includes/victory.h",
122   MAME_DIR .. "src/mame/video/victory.cpp",
123   MAME_DIR .. "src/mame/audio/targ.cpp",
124   MAME_DIR .. "src/mame/drivers/astrocde.cpp",
125   MAME_DIR .. "src/mame/includes/astrocde.h",
126   MAME_DIR .. "src/mame/video/astrocde.cpp",
127   MAME_DIR .. "src/mame/drivers/gridlee.cpp",
128   MAME_DIR .. "src/mame/includes/gridlee.h",
129   MAME_DIR .. "src/mame/audio/gridlee.cpp",
130   MAME_DIR .. "src/mame/video/gridlee.cpp",
131   MAME_DIR .. "src/mame/drivers/williams.cpp",
132   MAME_DIR .. "src/mame/includes/williams.h",
133   MAME_DIR .. "src/mame/machine/williams.cpp",
134   MAME_DIR .. "src/mame/audio/williams.cpp",
135   MAME_DIR .. "src/mame/audio/williams.h",
136   MAME_DIR .. "src/mame/video/williams.cpp",
137   MAME_DIR .. "src/mame/audio/gorf.cpp",
138   MAME_DIR .. "src/mame/audio/wow.cpp",
139   MAME_DIR .. "src/mame/drivers/gaelco.cpp",
140   MAME_DIR .. "src/mame/includes/gaelco.h",
141   MAME_DIR .. "src/mame/video/gaelco.cpp",
142   MAME_DIR .. "src/mame/machine/gaelcrpt.cpp",
143   MAME_DIR .. "src/mame/drivers/wrally.cpp",
144   MAME_DIR .. "src/mame/includes/wrally.h",
145   MAME_DIR .. "src/mame/machine/wrally.cpp",
146   MAME_DIR .. "src/mame/video/wrally.cpp",
147   MAME_DIR .. "src/mame/drivers/looping.cpp",
148   MAME_DIR .. "src/mame/drivers/supertnk.cpp",
149}
135150end
136151
137152function linkProjects_mame_tiny(_target, _subtarget)
trunk/src/devices/bus/a1bus/a1bus.cpp
r250291r250292
2626//-------------------------------------------------
2727a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
2828      device_t(mconfig, A1BUS_SLOT, "Apple I Slot", tag, owner, clock, "a1bus_slot", __FILE__),
29      device_slot_interface(mconfig, *this)
29      device_slot_interface(mconfig, *this),
30   m_a1bus_tag(nullptr),
31   m_a1bus_slottag(nullptr)
3032{
3133}
3234
3335a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3436      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
35      device_slot_interface(mconfig, *this)
37      device_slot_interface(mconfig, *this), m_a1bus_tag(nullptr), m_a1bus_slottag(nullptr)
3638{
3739}
3840
r250291r250292
7577//-------------------------------------------------
7678
7779a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
78      device_t(mconfig, A1BUS, "Apple I Bus", tag, owner, clock, "a1bus", __FILE__),
80      device_t(mconfig, A1BUS, "Apple I Bus", tag, owner, clock, "a1bus", __FILE__), m_maincpu(nullptr),
7981      m_out_irq_cb(*this),
80      m_out_nmi_cb(*this)
82      m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
8183{
8284}
8385
8486a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
85      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
87      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr),
8688      m_out_irq_cb(*this),
87      m_out_nmi_cb(*this)
89      m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
8890{
8991}
9092//-------------------------------------------------
r250291r250292
166168
167169device_a1bus_card_interface::device_a1bus_card_interface(const machine_config &mconfig, device_t &device)
168170   : device_slot_card_interface(mconfig, device),
169      m_a1bus(NULL),
170      m_a1bus_tag(NULL)
171      m_a1bus(nullptr),
172      m_a1bus_tag(nullptr), m_a1bus_slottag(nullptr), m_next(nullptr)
171173{
172174}
173175
trunk/src/devices/bus/a1bus/a1cassette.cpp
r250291r250292
5959a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6060      device_t(mconfig, A1BUS_CASSETTE, "Apple I cassette board", tag, owner, clock, "a1cass", __FILE__),
6161      device_a1bus_card_interface(mconfig, *this),
62      m_cassette(*this, "cassette")
62      m_cassette(*this, "cassette"), m_rom(nullptr), m_cassette_output_flipflop(0)
6363{
6464}
6565
6666a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
6767      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
6868      device_a1bus_card_interface(mconfig, *this),
69      m_cassette(*this, "cassette")
69      m_cassette(*this, "cassette"), m_rom(nullptr), m_cassette_output_flipflop(0)
7070{
7171}
7272
trunk/src/devices/bus/a1bus/a1cffa.cpp
r250291r250292
5454a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5555      device_t(mconfig, A1BUS_CFFA, "CFFA Compact Flash for Apple I", tag, owner, clock, "cffa1", __FILE__),
5656      device_a1bus_card_interface(mconfig, *this),
57      m_ata(*this, CFFA_ATA_TAG)
57      m_ata(*this, CFFA_ATA_TAG), m_rom(nullptr), m_lastdata(0), m_writeprotect(false)
5858{
5959}
6060
6161a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
6262      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
6363      device_a1bus_card_interface(mconfig, *this),
64      m_ata(*this, CFFA_ATA_TAG)
64      m_ata(*this, CFFA_ATA_TAG), m_rom(nullptr), m_lastdata(0), m_writeprotect(false)
6565{
6666}
6767
trunk/src/devices/bus/a2bus/a2alfam2.cpp
r250291r250292
8888   m_sn1(*this, SN1_TAG),
8989   m_sn2(*this, SN2_TAG),
9090   m_sn3(*this, SN3_TAG),
91   m_sn4(*this, SN4_TAG)
91   m_sn4(*this, SN4_TAG), m_latch0(0), m_latch1(0), m_latch2(0), m_latch3(0), m_has4thsn(false)
9292{
9393}
9494
trunk/src/devices/bus/a2bus/a2applicard.cpp
r250291r250292
7878a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7979   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8080   device_a2bus_card_interface(mconfig, *this),
81   m_z80(*this, Z80_TAG)
81   m_z80(*this, Z80_TAG), m_bROMAtZ80Zero(false), m_z80stat(false), m_6502stat(false), m_toz80(0), m_to6502(0), m_z80rom(nullptr)
8282{
8383}
8484
8585a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8686   device_t(mconfig, A2BUS_APPLICARD, "PCPI Applicard", tag, owner, clock, "a2aplcrd", __FILE__),
8787   device_a2bus_card_interface(mconfig, *this),
88   m_z80(*this, Z80_TAG)
88   m_z80(*this, Z80_TAG), m_bROMAtZ80Zero(false), m_z80stat(false), m_6502stat(false), m_toz80(0), m_to6502(0), m_z80rom(nullptr)
8989{
9090}
9191
trunk/src/devices/bus/a2bus/a2bus.cpp
r250291r250292
9090//-------------------------------------------------
9191a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
9292      device_t(mconfig, A2BUS_SLOT, "Apple II Slot", tag, owner, clock, "a2bus_slot", __FILE__),
93      device_slot_interface(mconfig, *this)
93      device_slot_interface(mconfig, *this), m_a2bus_tag(nullptr), m_a2bus_slottag(nullptr)
9494{
9595}
9696
9797a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
9898      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
99      device_slot_interface(mconfig, *this)
99      device_slot_interface(mconfig, *this), m_a2bus_tag(nullptr), m_a2bus_slottag(nullptr)
100100{
101101}
102102
r250291r250292
139139//-------------------------------------------------
140140
141141a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
142      device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock, "a2bus", __FILE__),
142      device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock, "a2bus", __FILE__), m_maincpu(nullptr), m_maincpu_space(nullptr),
143143      m_out_irq_cb(*this),
144144      m_out_nmi_cb(*this),
145      m_out_inh_cb(*this)
145      m_out_inh_cb(*this), m_cputag(nullptr), m_slot_irq_mask(0), m_slot_nmi_mask(0)
146146{
147147}
148148
149149a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
150      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
150      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr), m_maincpu_space(nullptr),
151151      m_out_irq_cb(*this),
152152      m_out_nmi_cb(*this),
153      m_out_inh_cb(*this)
153      m_out_inh_cb(*this), m_cputag(nullptr), m_slot_irq_mask(0), m_slot_nmi_mask(0)
154154{
155155}
156156//-------------------------------------------------
r250291r250292
296296
297297device_a2bus_card_interface::device_a2bus_card_interface(const machine_config &mconfig, device_t &device)
298298   : device_slot_card_interface(mconfig, device),
299      m_a2bus(NULL),
300      m_a2bus_tag(NULL)
299      m_a2bus(nullptr),
300      m_a2bus_tag(nullptr), m_a2bus_slottag(nullptr), m_slot(0), m_next(nullptr)
301301{
302302}
303303
trunk/src/devices/bus/a2bus/a2cffa.cpp
r250291r250292
8686a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8787   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8888   device_a2bus_card_interface(mconfig, *this),
89   m_ata(*this, CFFA2_ATA_TAG)
89   m_ata(*this, CFFA2_ATA_TAG), m_rom(nullptr), m_lastdata(0), m_lastreaddata(0), m_writeprotect(false), m_inwritecycle(false)
9090{
9191}
9292
trunk/src/devices/bus/a2bus/a2corvus.cpp
r250291r250292
104104a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
105105   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
106106   device_a2bus_card_interface(mconfig, *this),
107   m_corvushd(*this, CORVUS_HD_TAG)
107   m_corvushd(*this, CORVUS_HD_TAG), m_rom(nullptr)
108108{
109109}
110110
111111a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
112112   device_t(mconfig, A2BUS_CORVUS, "Corvus Flat Cable interface", tag, owner, clock, "a2corvus", __FILE__),
113113   device_a2bus_card_interface(mconfig, *this),
114   m_corvushd(*this, CORVUS_HD_TAG)
114   m_corvushd(*this, CORVUS_HD_TAG), m_rom(nullptr)
115115{
116116}
117117
trunk/src/devices/bus/a2bus/a2diskii.cpp
r250291r250292
9393a2bus_floppy_device::a2bus_floppy_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
9494      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
9595      device_a2bus_card_interface(mconfig, *this),
96      m_fdc(*this, FDC_TAG)
96      m_fdc(*this, FDC_TAG), m_rom(nullptr)
9797{
9898}
9999
trunk/src/devices/bus/a2bus/a2diskiing.cpp
r250291r250292
7373   device_a2bus_card_interface(mconfig, *this),
7474   m_wozfdc(*this, WOZFDC_TAG),
7575   floppy0(*this, "0"),
76   floppy1(*this, "1")
76   floppy1(*this, "1"), m_rom(nullptr)
7777{
7878}
7979
trunk/src/devices/bus/a2bus/a2dx1.cpp
r250291r250292
5151a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
5252   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
5353   device_a2bus_card_interface(mconfig, *this),
54   m_dac(*this, DAC_TAG)
54   m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
5555{
5656}
5757
5858a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5959   device_t(mconfig, A2BUS_DX1, "Decillonix DX-1", tag, owner, clock, "a2dx1", __FILE__),
6060   device_a2bus_card_interface(mconfig, *this),
61   m_dac(*this, DAC_TAG)
61   m_dac(*this, DAC_TAG), m_volume(0), m_lastdac(0)
6262{
6363}
6464
trunk/src/devices/bus/a2bus/a2eauxslot.cpp
r250291r250292
2828//-------------------------------------------------
2929a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030      device_t(mconfig, A2EAUXSLOT_SLOT, "Apple IIe AUX Slot", tag, owner, clock, "a2eauxslot_slot", __FILE__),
31      device_slot_interface(mconfig, *this)
31      device_slot_interface(mconfig, *this),
32   m_a2eauxslot_tag(nullptr),
33   m_a2eauxslot_slottag(nullptr)
3234{
3335}
3436
3537a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3638      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
37      device_slot_interface(mconfig, *this)
39      device_slot_interface(mconfig, *this), m_a2eauxslot_tag(nullptr), m_a2eauxslot_slottag(nullptr)
3840{
3941}
4042
r250291r250292
7779//-------------------------------------------------
7880
7981a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
80      device_t(mconfig, A2EAUXSLOT, "Apple IIe AUX Bus", tag, owner, clock, "a2eauxslot", __FILE__),
82      device_t(mconfig, A2EAUXSLOT, "Apple IIe AUX Bus", tag, owner, clock, "a2eauxslot", __FILE__), m_maincpu(nullptr),
8183      m_out_irq_cb(*this),
82      m_out_nmi_cb(*this)
84      m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
8385{
8486}
8587
8688a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
87      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
89      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr),
8890      m_out_irq_cb(*this),
89      m_out_nmi_cb(*this)
91      m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
9092{
9193}
9294//-------------------------------------------------
r250291r250292
152154
153155device_a2eauxslot_card_interface::device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device)
154156   : device_slot_card_interface(mconfig, device),
155      m_a2eauxslot(NULL),
156      m_a2eauxslot_tag(NULL)
157      m_a2eauxslot(nullptr),
158      m_a2eauxslot_tag(nullptr), m_a2eauxslot_slottag(nullptr), m_slot(0), m_next(nullptr)
157159{
158160}
159161
trunk/src/devices/bus/a2bus/a2eramworks3.cpp
r250291r250292
3030
3131a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3232      device_t(mconfig, A2EAUX_RAMWORKS3, "Applied Engineering RamWorks III", tag, owner, clock, "a2erwks3", __FILE__),
33      device_a2eauxslot_card_interface(mconfig, *this)
33      device_a2eauxslot_card_interface(mconfig, *this),
34   m_bank(0)
3435{
3536}
3637
3738a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3839      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
39      device_a2eauxslot_card_interface(mconfig, *this)
40      device_a2eauxslot_card_interface(mconfig, *this), m_bank(0)
4041{
4142}
4243
trunk/src/devices/bus/a2bus/a2hsscsi.cpp
r250291r250292
117117   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
118118   device_a2bus_card_interface(mconfig, *this),
119119   m_ncr5380(*this, SCSI_5380_TAG),
120   m_scsibus(*this, SCSI_BUS_TAG)
120   m_scsibus(*this, SCSI_BUS_TAG), m_rom(nullptr), m_rambank(0), m_rombank(0), m_drq(0), m_bank(0), m_816block(false), m_c0ne(0), m_c0nf(0)
121121{
122122}
123123
r250291r250292
125125   device_t(mconfig, A2BUS_HSSCSI, "Apple II High-Speed SCSI Card", tag, owner, clock, "a2hsscsi", __FILE__),
126126   device_a2bus_card_interface(mconfig, *this),
127127   m_ncr5380(*this, SCSI_5380_TAG),
128   m_scsibus(*this, SCSI_BUS_TAG)
128   m_scsibus(*this, SCSI_BUS_TAG), m_rom(nullptr), m_rambank(0), m_rombank(0), m_drq(0), m_bank(0), m_816block(false), m_c0ne(0), m_c0nf(0)
129129{
130130}
131131
trunk/src/devices/bus/a2bus/a2mcms.cpp
r250291r250292
151151
152152a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
153153   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
154   device_a2bus_card_interface(mconfig, *this)
154   device_a2bus_card_interface(mconfig, *this), m_card1(nullptr), m_engine(nullptr)
155155{
156156}
157157
158158a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
159159   device_t(mconfig, A2BUS_MCMS2, "Mountain Computer Music System (card 2)", tag, owner, clock, "a2mcms2", __FILE__),
160   device_a2bus_card_interface(mconfig, *this)
160   device_a2bus_card_interface(mconfig, *this), m_card1(nullptr), m_engine(nullptr)
161161{
162162}
163163
r250291r250292
215215mcms_device::mcms_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
216216   : device_t(mconfig, MCMS, "Mountain Computer Music System engine", tag, owner, clock, "msmseng", __FILE__),
217217   device_sound_interface(mconfig, *this),
218   m_write_irq(*this)
218   m_write_irq(*this), m_stream(nullptr), m_timer(nullptr), m_clrtimer(nullptr), m_pBusDevice(nullptr), m_enabled(false), m_mastervol(0), m_rand(0)
219219{
220220}
221221
trunk/src/devices/bus/a2bus/a2memexp.cpp
r250291r250292
7575
7676a2bus_memexp_device::a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7777   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
78   device_a2bus_card_interface(mconfig, *this)
78   device_a2bus_card_interface(mconfig, *this), m_isramfactor(false), m_bankhior(0), m_addrmask(0), m_rom(nullptr), m_wptr(0), m_liveptr(0)
7979{
8080}
8181
trunk/src/devices/bus/a2bus/a2midi.cpp
r250291r250292
6363      device_t(mconfig, A2BUS_MIDI, "6850 MIDI card", tag, owner, clock, "a2midi", __FILE__),
6464      device_a2bus_card_interface(mconfig, *this),
6565      m_ptm(*this, MIDI_PTM_TAG),
66      m_acia(*this, MIDI_ACIA_TAG),
66      m_acia(*this, MIDI_ACIA_TAG), m_acia_irq(false),
6767      m_ptm_irq(false)
6868{
6969}
r250291r250292
7272      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7373      device_a2bus_card_interface(mconfig, *this),
7474      m_ptm(*this, MIDI_PTM_TAG),
75      m_acia(*this, MIDI_ACIA_TAG),
75      m_acia(*this, MIDI_ACIA_TAG), m_acia_irq(false),
7676      m_ptm_irq(false)
7777{
7878}
trunk/src/devices/bus/a2bus/a2mockingboard.cpp
r250291r250292
128128   m_ay1(*this, AY1_TAG),
129129   m_ay2(*this, AY2_TAG),
130130   m_ay3(*this, AY3_TAG),
131   m_ay4(*this, AY4_TAG)
131   m_ay4(*this, AY4_TAG), m_isPhasor(false), m_PhasorNative(false), m_porta1(0), m_porta2(0)
132132{
133133}
134134
trunk/src/devices/bus/a2bus/a2pic.cpp
r250291r250292
104104      m_dsw1(*this, "DSW1"),
105105      m_ctx(*this, PIC_CENTRONICS_TAG),
106106      m_ctx_data_in(*this, "ctx_data_in"),
107      m_ctx_data_out(*this, "ctx_data_out"),
108      m_started(false)
107      m_ctx_data_out(*this, "ctx_data_out"), m_rom(nullptr),
108      m_started(false), m_ack(0), m_irqenable(false), m_autostrobe(false), m_timer(nullptr)
109109{
110110}
111111
r250291r250292
115115      m_dsw1(*this, "DSW1"),
116116      m_ctx(*this, PIC_CENTRONICS_TAG),
117117      m_ctx_data_in(*this, "ctx_data_in"),
118      m_ctx_data_out(*this, "ctx_data_out"),
119      m_started(false)
118      m_ctx_data_out(*this, "ctx_data_out"), m_rom(nullptr),
119      m_started(false), m_ack(0), m_irqenable(false), m_autostrobe(false), m_timer(nullptr)
120120{
121121}
122122
trunk/src/devices/bus/a2bus/a2scsi.cpp
r250291r250292
110110   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
111111   device_a2bus_card_interface(mconfig, *this),
112112   m_ncr5380(*this, SCSI_5380_TAG),
113   m_scsibus(*this, SCSI_BUS_TAG)
113   m_scsibus(*this, SCSI_BUS_TAG), m_rom(nullptr), m_rambank(0), m_rombank(0), m_drq(0), m_bank(0), m_816block(false)
114114{
115115}
116116
r250291r250292
118118   device_t(mconfig, A2BUS_SCSI, "Apple II SCSI Card", tag, owner, clock, "a2scsi", __FILE__),
119119   device_a2bus_card_interface(mconfig, *this),
120120   m_ncr5380(*this, SCSI_5380_TAG),
121   m_scsibus(*this, SCSI_BUS_TAG)
121   m_scsibus(*this, SCSI_BUS_TAG), m_rom(nullptr), m_rambank(0), m_rombank(0), m_drq(0), m_bank(0), m_816block(false)
122122{
123123}
124124
trunk/src/devices/bus/a2bus/a2softcard.cpp
r250291r250292
5454a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
5555   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
5656   device_a2bus_card_interface(mconfig, *this),
57   m_z80(*this, Z80_TAG)
57   m_z80(*this, Z80_TAG), m_bEnabled(false), m_FirstZ80Boot(false)
5858{
5959}
6060
6161a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6262   device_t(mconfig, A2BUS_SOFTCARD, "Microsoft SoftCard", tag, owner, clock, "a2softcard", __FILE__),
6363   device_a2bus_card_interface(mconfig, *this),
64   m_z80(*this, Z80_TAG)
64   m_z80(*this, Z80_TAG), m_bEnabled(false), m_FirstZ80Boot(false)
6565{
6666}
6767
trunk/src/devices/bus/a2bus/a2ssc.cpp
r250291r250292
132132      device_a2bus_card_interface(mconfig, *this),
133133      m_dsw1(*this, "DSW1"),
134134      m_dsw2(*this, "DSW2"),
135      m_acia(*this, SSC_ACIA_TAG),
135      m_acia(*this, SSC_ACIA_TAG), m_rom(nullptr),
136136      m_started(false)
137137{
138138}
r250291r250292
142142      device_a2bus_card_interface(mconfig, *this),
143143      m_dsw1(*this, "DSW1"),
144144      m_dsw2(*this, "DSW2"),
145      m_acia(*this, SSC_ACIA_TAG),
145      m_acia(*this, SSC_ACIA_TAG), m_rom(nullptr),
146146      m_started(false)
147147{
148148}
trunk/src/devices/bus/a2bus/a2swyft.cpp
r250291r250292
4747
4848a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4949      device_t(mconfig, A2BUS_SWYFT, "IAI SwyftCard", tag, owner, clock, "a2swyft", __FILE__),
50      device_a2bus_card_interface(mconfig, *this)
50      device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_rombank(0), m_inh_state(0)
5151{
5252}
5353
5454a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
5555      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
56      device_a2bus_card_interface(mconfig, *this)
56      device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_rombank(0), m_inh_state(0)
5757{
5858}
5959
trunk/src/devices/bus/a2bus/a2themill.cpp
r250291r250292
7070a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7171   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7272   device_a2bus_card_interface(mconfig, *this),
73   m_6809(*this, M6809_TAG)
73   m_6809(*this, M6809_TAG), m_bEnabled(false), m_flipAddrSpace(false), m_6809Mode(false), m_status(0)
7474{
7575}
7676
7777a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7878   device_t(mconfig, A2BUS_THEMILL, "Stellation Two The Mill", tag, owner, clock, "a2themill", __FILE__),
7979   device_a2bus_card_interface(mconfig, *this),
80   m_6809(*this, M6809_TAG)
80   m_6809(*this, M6809_TAG), m_bEnabled(false), m_flipAddrSpace(false), m_6809Mode(false), m_status(0)
8181{
8282}
8383
trunk/src/devices/bus/a2bus/a2thunderclock.cpp
r250291r250292
7979a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8080   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8181   device_a2bus_card_interface(mconfig, *this),
82   m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG)
82   m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG), m_rom(nullptr), m_dataout(0)
8383{
8484}
8585
8686a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8787   device_t(mconfig, A2BUS_THUNDERCLOCK, "ThunderWare ThunderClock Plus", tag, owner, clock, "a2thunpl", __FILE__),
8888   device_a2bus_card_interface(mconfig, *this),
89   m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG)
89   m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG), m_rom(nullptr), m_dataout(0)
9090{
9191}
9292
trunk/src/devices/bus/a2bus/a2ultraterm.cpp
r250291r250292
140140
141141a2bus_videx160_device::a2bus_videx160_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
142142   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
143   device_a2bus_card_interface(mconfig, *this),
144   m_crtc(*this, ULTRATERM_MC6845_NAME)
143   device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_chrrom(nullptr), m_framecnt(0), m_ctrl1(0), m_ctrl2(0),
144   m_crtc(*this, ULTRATERM_MC6845_NAME), m_rambank(0)
145145{
146146}
147147
trunk/src/devices/bus/a2bus/a2videoterm.cpp
r250291r250292
174174
175175a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
176176   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
177   device_a2bus_card_interface(mconfig, *this),
178   m_crtc(*this, VIDEOTERM_MC6845_NAME),
177   device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_chrrom(nullptr), m_framecnt(0),
178   m_crtc(*this, VIDEOTERM_MC6845_NAME), m_rambank(0),
179179   m_palette(*this, ":palette")
180180{
181181}
trunk/src/devices/bus/a2bus/a2vulcan.cpp
r250291r250292
117117a2bus_vulcanbase_device::a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
118118   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
119119   device_a2bus_card_interface(mconfig, *this),
120   m_ata(*this, VULCAN_ATA_TAG)
120   m_ata(*this, VULCAN_ATA_TAG), m_rom(nullptr), m_lastdata(0), m_rombank(0), m_rambank(0), m_last_read_was_0(false)
121121{
122122}
123123
trunk/src/devices/bus/a2bus/a2zipdrive.cpp
r250291r250292
7272a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7373   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7474   device_a2bus_card_interface(mconfig, *this),
75   m_ata(*this, ZIPDRIVE_ATA_TAG)
75   m_ata(*this, ZIPDRIVE_ATA_TAG), m_rom(nullptr), m_lastdata(0)
7676{
7777}
7878
trunk/src/devices/bus/a2bus/corvfdc01.cpp
r250291r250292
117117   m_con1(*this, FDC01_FDC_TAG":0"),
118118   m_con2(*this, FDC01_FDC_TAG":1"),
119119   m_con3(*this, FDC01_FDC_TAG":2"),
120   m_con4(*this, FDC01_FDC_TAG":3")
120   m_con4(*this, FDC01_FDC_TAG":3"), m_rom(nullptr), m_fdc_local_status(0), m_fdc_local_command(0), m_curfloppy(nullptr)
121121{
122122}
123123
r250291r250292
128128   m_con1(*this, FDC01_FDC_TAG":0"),
129129   m_con2(*this, FDC01_FDC_TAG":1"),
130130   m_con3(*this, FDC01_FDC_TAG":2"),
131   m_con4(*this, FDC01_FDC_TAG":3")
131   m_con4(*this, FDC01_FDC_TAG":3"), m_rom(nullptr), m_fdc_local_status(0), m_fdc_local_command(0), m_curfloppy(nullptr)
132132{
133133}
134134
trunk/src/devices/bus/a2bus/corvfdc02.cpp
r250291r250292
8787   m_con1(*this, FDC02_FDC_TAG":0"),
8888   m_con2(*this, FDC02_FDC_TAG":1"),
8989   m_con3(*this, FDC02_FDC_TAG":2"),
90   m_con4(*this, FDC02_FDC_TAG":3")
90   m_con4(*this, FDC02_FDC_TAG":3"), m_rom(nullptr), m_fdc_local_status(0), m_fdc_local_command(0), m_bufptr(0), m_curfloppy(nullptr), m_in_drq(false), m_timer(nullptr)
9191{
9292}
9393
r250291r250292
9898   m_con1(*this, FDC02_FDC_TAG":0"),
9999   m_con2(*this, FDC02_FDC_TAG":1"),
100100   m_con3(*this, FDC02_FDC_TAG":2"),
101   m_con4(*this, FDC02_FDC_TAG":3")
101   m_con4(*this, FDC02_FDC_TAG":3"), m_rom(nullptr), m_fdc_local_status(0), m_fdc_local_command(0), m_bufptr(0), m_curfloppy(nullptr), m_in_drq(false), m_timer(nullptr)
102102{
103103}
104104
r250291r250292
125125{
126126   m_fdc_local_status = 2;
127127   m_fdc_local_command = 0;
128   m_curfloppy = NULL;
128   m_curfloppy = nullptr;
129129   m_in_drq = false;
130130   m_timer->adjust(attotime::never);
131131}
trunk/src/devices/bus/a2bus/laser128.cpp
r250291r250292
4444
4545a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
4646   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
47   device_a2bus_card_interface(mconfig, *this)
47   device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_slot7_bank(0), m_slot7_ram_bank(0)
4848
4949{
5050}
5151
5252a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5353   device_t(mconfig, A2BUS_LASER128, "VTech Laser 128 Internal Device", tag, owner, clock, "a2laser128", __FILE__),
54   device_a2bus_card_interface(mconfig, *this)
54   device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_slot7_bank(0), m_slot7_ram_bank(0)
5555{
5656}
5757
trunk/src/devices/bus/a2bus/mouse.cpp
r250291r250292
179179   m_mcu(*this, MOUSE_MCU_TAG),
180180   m_mouseb(*this, MOUSE_BUTTON_TAG),
181181   m_mousex(*this, MOUSE_XAXIS_TAG),
182   m_mousey(*this, MOUSE_YAXIS_TAG)
182   m_mousey(*this, MOUSE_YAXIS_TAG), m_rom(nullptr), m_ddr_a(0), m_ddr_b(0), m_ddr_c(0), m_port_a_out(0), m_port_b_out(0), m_port_c_out(0), m_port_a_in(0), m_port_b_in(0),
183   m_port_c_in(0), m_timer_cnt(0), m_timer_ctl(0), m_mask_option(0), last_mx(0), last_my(0), count_x(0), count_y(0), m_timer(nullptr), m_read_timer(nullptr)
183184{
184185   m_started = false;
185186   m_rom_bank = 0;
r250291r250292
192193   m_mcu(*this, MOUSE_MCU_TAG),
193194   m_mouseb(*this, MOUSE_BUTTON_TAG),
194195   m_mousex(*this, MOUSE_XAXIS_TAG),
195   m_mousey(*this, MOUSE_YAXIS_TAG)
196   m_mousey(*this, MOUSE_YAXIS_TAG), m_rom(nullptr), m_ddr_a(0), m_ddr_b(0), m_ddr_c(0), m_port_a_out(0), m_port_b_out(0), m_port_c_out(0), m_port_a_in(0), m_port_b_in(0), m_port_c_in(0), m_timer_cnt(0), m_timer_ctl(0), m_mask_option(0), last_mx(0), last_my(0), count_x(0), count_y(0), m_timer(nullptr), m_read_timer(nullptr)
196197{
197198   m_started = false;
198199   m_rom_bank = 0;
trunk/src/devices/bus/a2bus/ramcard128k.cpp
r250291r250292
3030
3131a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3232   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
33   device_a2bus_card_interface(mconfig, *this)
33   device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0), m_main_bank(0)
3434{
3535}
3636
3737a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3838   device_t(mconfig, A2BUS_RAMCARD128K, "Saturn Systems 128K Extended Language Card", tag, owner, clock, "ssram128", __FILE__),
39   device_a2bus_card_interface(mconfig, *this)
39   device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0), m_main_bank(0)
4040{
4141}
4242
trunk/src/devices/bus/a2bus/ramcard16k.cpp
r250291r250292
3030
3131a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3232   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
33   device_a2bus_card_interface(mconfig, *this)
33   device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0)
3434{
3535}
3636
3737a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3838   device_t(mconfig, A2BUS_RAMCARD16K, "Apple II 16K Language Card", tag, owner, clock, "a2ram16k", __FILE__),
39   device_a2bus_card_interface(mconfig, *this)
39   device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0)
4040{
4141}
4242
trunk/src/devices/bus/a2bus/timemasterho.cpp
r250291r250292
126126   device_a2bus_card_interface(mconfig, *this),
127127   m_pia(*this, TIMEMASTER_PIA_TAG),
128128   m_msm5832(*this, TIMEMASTER_M5832_TAG),
129   m_dsw1(*this, "DSW1")
129   m_dsw1(*this, "DSW1"), m_rom(nullptr), m_irqa(false), m_irqb(false)
130130{
131131   m_started = false;
132132}
r250291r250292
136136   device_a2bus_card_interface(mconfig, *this),
137137   m_pia(*this, TIMEMASTER_PIA_TAG),
138138   m_msm5832(*this, TIMEMASTER_M5832_TAG),
139   m_dsw1(*this, "DSW1")
139   m_dsw1(*this, "DSW1"), m_rom(nullptr), m_irqa(false), m_irqb(false)
140140{
141141   m_started = false;
142142}
trunk/src/devices/bus/a7800/a78_slot.cpp
r250291r250292
115115a78_cart_slot_device::a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
116116                  device_t(mconfig, A78_CART_SLOT, "Atari 7800 Cartridge Slot", tag, owner, clock, "a78_cart_slot", __FILE__),
117117                  device_image_interface(mconfig, *this),
118                  device_slot_interface(mconfig, *this)
118                  device_slot_interface(mconfig, *this), m_cart(nullptr), m_type(0), m_stick_type(0)
119119{
120120}
121121
trunk/src/devices/bus/a7800/cpuwiz.cpp
r250291r250292
4141
4242
4343a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
44               : a78_rom_sg_device(mconfig, type, name, tag, owner, clock, shortname, source)
45{
44               : a78_rom_sg_device(mconfig, type, name, tag, owner, clock, shortname, source), m_ram_bank(0)
45            {
4646}
4747
4848a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
49               : a78_rom_sg_device(mconfig, A78_ROM_VERSABOARD, "Atari 7800 VersaBoard Cart", tag, owner, clock, "a78_versaboard", __FILE__)
50{
49               : a78_rom_sg_device(mconfig, A78_ROM_VERSABOARD, "Atari 7800 VersaBoard Cart", tag, owner, clock, "a78_versaboard", __FILE__), m_ram_bank(0)
50            {
5151}
5252
5353
trunk/src/devices/bus/a7800/rom.cpp
r250291r250292
6868
6969
7070a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
71               : a78_rom_device(mconfig, type, name, tag, owner, clock, shortname, source)
72{
71               : a78_rom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_bank(0)
72            {
7373}
7474
7575a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
76               : a78_rom_device(mconfig, A78_ROM_SG, "Atari 7800 ROM Carts w/SuperGame Bankswitch", tag, owner, clock, "a78_rom_sg", __FILE__)
77{
76               : a78_rom_device(mconfig, A78_ROM_SG, "Atari 7800 ROM Carts w/SuperGame Bankswitch", tag, owner, clock, "a78_rom_sg", __FILE__), m_bank(0)
77            {
7878}
7979
8080a78_rom_sg_pokey_device::a78_rom_sg_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
107107
108108
109109a78_rom_abs_device::a78_rom_abs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
110               : a78_rom_device(mconfig, A78_ROM_ABSOLUTE, "Atari 7800 ROM Carts w/Absolute Bankswitch", tag, owner, clock, "a78_rom_abs", __FILE__)
111{
110               : a78_rom_device(mconfig, A78_ROM_ABSOLUTE, "Atari 7800 ROM Carts w/Absolute Bankswitch", tag, owner, clock, "a78_rom_abs", __FILE__), m_bank(0)
111            {
112112}
113113
114114
115115a78_rom_act_device::a78_rom_act_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
116               : a78_rom_device(mconfig, A78_ROM_ACTIVISION, "Atari 7800 ROM Carts w/Activision Bankswitch", tag, owner, clock, "a78_rom_act", __FILE__)
117{
116               : a78_rom_device(mconfig, A78_ROM_ACTIVISION, "Atari 7800 ROM Carts w/Activision Bankswitch", tag, owner, clock, "a78_rom_act", __FILE__), m_bank(0)
117            {
118118}
119119
120120
trunk/src/devices/bus/a7800/xboard.cpp
r250291r250292
5959a78_xboard_device::a78_xboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
6060               : a78_rom_device(mconfig, type, name, tag, owner, clock, shortname, source),
6161                  m_xbslot(*this, "xb_slot"),
62                  m_pokey(*this, "xb_pokey")
63{
62                  m_pokey(*this, "xb_pokey"), m_reg(0), m_ram_bank(0)
63            {
6464}
6565
6666
6767a78_xboard_device::a78_xboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6868               : a78_rom_device(mconfig, A78_XBOARD, "Atari 7800 XBoarD expansion", tag, owner, clock, "a78_xboard", __FILE__),
6969                  m_xbslot(*this, "xb_slot"),
70                  m_pokey(*this, "xb_pokey")
71{
70                  m_pokey(*this, "xb_pokey"), m_reg(0), m_ram_bank(0)
71            {
7272}
7373
7474
7575a78_xm_device::a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
7676               : a78_xboard_device(mconfig, A78_XM, "Atari 7800 XM expansion module", tag, owner, clock, "a78_xm", __FILE__),
77                  m_ym(*this, "xm_ym2151")
78{
77                  m_ym(*this, "xm_ym2151"), m_ym_enabled(0)
78            {
7979}
8080
8181
trunk/src/devices/bus/a800/a800_slot.cpp
r250291r250292
104104a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
105105                  device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
106106                  device_image_interface(mconfig, *this),
107                  device_slot_interface(mconfig, *this)
107                  device_slot_interface(mconfig, *this), m_cart(nullptr), m_type(0)
108108{
109109}
110110
111111a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
112112                  device_t(mconfig, A800_CART_SLOT, "Atari 8bit Cartridge Slot", tag, owner, clock, "a800_cart_slot", __FILE__),
113113                  device_image_interface(mconfig, *this),
114                  device_slot_interface(mconfig, *this)
114                  device_slot_interface(mconfig, *this), m_cart(nullptr), m_type(0)
115115{
116116}
117117
trunk/src/devices/bus/a800/a8sio.cpp
r250291r250292
5050//-------------------------------------------------
5151a8sio_slot_device::a8sio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5252   : device_t(mconfig, A8SIO_SLOT, "Atari 8 bit SIO Slot", tag, owner, clock, "a8sio_slot", __FILE__)
53   , device_slot_interface(mconfig, *this)
53   , device_slot_interface(mconfig, *this), m_a8sio_tag(nullptr), m_a8sio_slottag(nullptr)
5454{
5555}
5656
5757a8sio_slot_device::a8sio_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
5858      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
59      device_slot_interface(mconfig, *this)
59      device_slot_interface(mconfig, *this), m_a8sio_tag(nullptr), m_a8sio_slottag(nullptr)
6060{
6161}
6262
r250291r250292
102102   : device_t(mconfig, A8SIO, "Atari 8 biot SIO", tag, owner, clock, "a8sio", __FILE__)
103103   , m_out_clock_in_cb(*this)
104104   , m_out_data_in_cb(*this)
105   , m_out_audio_in_cb(*this)
105   , m_out_audio_in_cb(*this), m_device(nullptr)
106106{
107107}
108108
r250291r250292
110110   : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
111111   , m_out_clock_in_cb(*this)
112112   , m_out_data_in_cb(*this)
113   , m_out_audio_in_cb(*this)
113   , m_out_audio_in_cb(*this), m_device(nullptr)
114114{
115115}
116116
r250291r250292
182182device_a8sio_card_interface::device_a8sio_card_interface(const machine_config &mconfig, device_t &device)
183183   : device_slot_card_interface(mconfig, device)
184184   , m_a8sio(NULL)
185   , m_a8sio_tag(NULL)
185   , m_a8sio_tag(NULL), m_a8sio_slottag(nullptr)
186186{
187187}
188188
trunk/src/devices/bus/a800/cassette.cpp
r250291r250292
4747a8sio_cassette_device::a8sio_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4848   : device_t(mconfig, A8SIO_CASSETTE, "Atari 8 bit cassette", tag, owner, clock, "a8sio_cass", __FILE__)
4949   , device_a8sio_card_interface(mconfig, *this)
50   , m_cassette(*this, "cassette")
51   , m_old_cass_signal(0)
50   , m_cassette(*this, "cassette"), m_read_timer(nullptr)
51     , m_old_cass_signal(0)
5252   , m_signal_count(0)
5353{
5454}
r250291r250292
5656a8sio_cassette_device::a8sio_cassette_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
5757   : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
5858   , device_a8sio_card_interface(mconfig, *this)
59   , m_cassette(*this, "cassette")
60   , m_old_cass_signal(0)
59   , m_cassette(*this, "cassette"), m_read_timer(nullptr)
60     , m_old_cass_signal(0)
6161   , m_signal_count(0)
6262{
6363}
trunk/src/devices/bus/a800/oss.cpp
r250291r250292
2222
2323
2424a800_rom_oss8k_device::a800_rom_oss8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
25               : a800_rom_device(mconfig, A800_ROM_OSS8K, "Atari 800 ROM Carts OSS 8K", tag, owner, clock, "a800_oss8k", __FILE__)
26{
25               : a800_rom_device(mconfig, A800_ROM_OSS8K, "Atari 800 ROM Carts OSS 8K", tag, owner, clock, "a800_oss8k", __FILE__),
26   m_bank(0)
27            {
2728}
2829
2930
3031a800_rom_oss34_device::a800_rom_oss34_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
31               : a800_rom_device(mconfig, A800_ROM_OSS34, "Atari 800 ROM Carts OSS-034M", tag, owner, clock, "a800_034m", __FILE__)
32{
32               : a800_rom_device(mconfig, A800_ROM_OSS34, "Atari 800 ROM Carts OSS-034M", tag, owner, clock, "a800_034m", __FILE__), m_bank(0)
33            {
3334}
3435
3536
3637a800_rom_oss43_device::a800_rom_oss43_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
37               : a800_rom_device(mconfig, A800_ROM_OSS43, "Atari 800 ROM Carts OSS-043M", tag, owner, clock, "a800_043m", __FILE__)
38{
38               : a800_rom_device(mconfig, A800_ROM_OSS43, "Atari 800 ROM Carts OSS-043M", tag, owner, clock, "a800_043m", __FILE__), m_bank(0)
39            {
3940}
4041
4142
4243a800_rom_oss91_device::a800_rom_oss91_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43               : a800_rom_device(mconfig, A800_ROM_OSS91, "Atari 800 ROM Carts OSS-M091", tag, owner, clock, "a800_m091", __FILE__)
44{
44               : a800_rom_device(mconfig, A800_ROM_OSS91, "Atari 800 ROM Carts OSS-M091", tag, owner, clock, "a800_m091", __FILE__), m_bank(0)
45            {
4546}
4647
4748
trunk/src/devices/bus/a800/rom.cpp
r250291r250292
5151
5252
5353xegs_rom_device::xegs_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
54               : a800_rom_device(mconfig, XEGS_ROM, "Atari XEGS 64K ROM Carts", tag, owner, clock, "a800_xegs", __FILE__)
55{
54               : a800_rom_device(mconfig, XEGS_ROM, "Atari XEGS 64K ROM Carts", tag, owner, clock, "a800_xegs", __FILE__), m_bank(0)
55            {
5656}
5757
5858
5959a800_rom_williams_device::a800_rom_williams_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
60               : a800_rom_device(mconfig, A800_ROM_WILLIAMS, "Atari 800 64K ROM Carts Williams", tag, owner, clock, "a800_williams", __FILE__)
61{
60               : a800_rom_device(mconfig, A800_ROM_WILLIAMS, "Atari 800 64K ROM Carts Williams", tag, owner, clock, "a800_williams", __FILE__), m_bank(0)
61            {
6262}
6363
6464
6565a800_rom_express_device::a800_rom_express_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66               : a800_rom_device(mconfig, A800_ROM_EXPRESS, "Atari 800 64K ROM Carts Express/Diamond", tag, owner, clock, "a800_express", __FILE__)
67{
66               : a800_rom_device(mconfig, A800_ROM_EXPRESS, "Atari 800 64K ROM Carts Express/Diamond", tag, owner, clock, "a800_express", __FILE__), m_bank(0)
67            {
6868}
6969
7070
7171a800_rom_turbo_device::a800_rom_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
72               : a800_rom_device(mconfig, A800_ROM_TURBO, "Atari 800 64K ROM Carts Turbosoft", tag, owner, clock, "a800_turbo", __FILE__)
73{
72               : a800_rom_device(mconfig, A800_ROM_TURBO, "Atari 800 64K ROM Carts Turbosoft", tag, owner, clock, "a800_turbo", __FILE__), m_bank(0)
73            {
7474}
7575
7676
r250291r250292
8181
8282
8383a800_rom_microcalc_device::a800_rom_microcalc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
84               : a800_rom_device(mconfig, A800_ROM_MICROCALC, "Atari 800 64K ROM Cart SITSA MicroCalc", tag, owner, clock, "a800_sitsa", __FILE__)
85{
84               : a800_rom_device(mconfig, A800_ROM_MICROCALC, "Atari 800 64K ROM Cart SITSA MicroCalc", tag, owner, clock, "a800_sitsa", __FILE__), m_bank(0)
85            {
8686}
8787
8888
trunk/src/devices/bus/a800/sparta.cpp
r250291r250292
1919
2020
2121a800_rom_spartados_device::a800_rom_spartados_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
22               : a800_rom_device(mconfig, A800_ROM_SPARTADOS, "Atari 800 SpartaDOS ROM Carts", tag, owner, clock, "a800_sparta", __FILE__)
23{
22               : a800_rom_device(mconfig, A800_ROM_SPARTADOS, "Atari 800 SpartaDOS ROM Carts", tag, owner, clock, "a800_sparta", __FILE__),
23   m_bank(0),
24   m_subslot_enabled(0)
25            {
2426}
2527
2628
trunk/src/devices/bus/abcbus/abcbus.cpp
r250291r250292
4949   m_write_xint2(*this),
5050   m_write_xint3(*this),
5151   m_write_xint4(*this),
52   m_write_xint5(*this),
53   m_trrq(0)
52   m_write_xint5(*this), m_card(nullptr), m_irq(0), m_nmi(0), m_pren(0),
53   m_trrq(0), m_xint2(0), m_xint3(0), m_xint4(0), m_xint5(0)
5454{
5555}
5656
trunk/src/devices/bus/abcbus/fd2.cpp
r250291r250292
285285   m_floppy0(*this, FD1771_TAG ":0"),
286286   m_floppy1(*this, FD1771_TAG ":1"),
287287   m_dos_rom(*this, "dos"),
288   m_cs(false)
288   m_cs(false), m_status(0), m_data(0)
289289{
290290}
291291
trunk/src/devices/bus/abcbus/lux10828.cpp
r250291r250292
413413      m_floppy1(*this, MB8876_TAG":1"),
414414      m_sw1(*this, "SW1"),
415415      m_s1(*this, "S1"),
416      m_cs(false),
416      m_cs(false), m_status(0), m_data(0),
417417      m_fdc_irq(0),
418418      m_fdc_drq(0),
419419      m_wait_enable(0),
trunk/src/devices/bus/abcbus/lux21046.cpp
r250291r250292
748748      m_fdc(*this, SAB1793_TAG),
749749      m_floppy0(*this, SAB1793_TAG":0"),
750750      m_floppy1(*this, SAB1793_TAG":1"),
751      m_floppy(NULL),
751      m_floppy(nullptr),
752752      m_sw1(*this, "SW1"),
753753      m_sw2(*this, "SW2"),
754754      m_sw3(*this, "SW3"),
755      m_cs(false),
755      m_cs(false), m_status(0), m_out(0), m_inp(0),
756756      m_fdc_irq(0),
757757      m_dma_irq(0),
758758      m_busy(0),
r250291r250292
768768      m_fdc(*this, SAB1793_TAG),
769769      m_floppy0(*this, SAB1793_TAG":0"),
770770      m_floppy1(*this, SAB1793_TAG":1"),
771      m_floppy(NULL),
771      m_floppy(nullptr),
772772      m_sw1(*this, "SW1"),
773773      m_sw2(*this, "SW2"),
774774      m_sw3(*this, "SW3"),
775      m_cs(false),
775      m_cs(false), m_status(0), m_out(0), m_inp(0),
776776      m_fdc_irq(0),
777777      m_dma_irq(0),
778778      m_busy(0),
trunk/src/devices/bus/abcbus/lux21056.cpp
r250291r250292
352352      m_sasi_io(0),
353353      m_sasi_cd(0),
354354      m_sasi_msg(0),
355      m_sasi_bsy(0),
355      m_sasi_bsy(0), m_inp(0), m_out(0),
356356      m_stat(0),
357357      m_sasi_data(0)
358358{
trunk/src/devices/bus/abckb/abc77.cpp
r250291r250292
439439   m_x10(*this, "X10"),
440440   m_x11(*this, "X11"),
441441   m_dsw(*this, "DSW"),
442   m_txd(1),
442   m_txd(1), m_keylatch(0),
443443   m_keydown(1),
444   m_clock(0),
445   m_stb(1)
444   m_clock(0), m_hys(0), m_reset(0),
445   m_stb(1), m_j3(0), m_serial_timer(nullptr), m_reset_timer(nullptr)
446446{
447447}
448448
r250291r250292
464464   m_x10(*this, "X10"),
465465   m_x11(*this, "X11"),
466466   m_dsw(*this, "DSW"),
467   m_txd(1),
467   m_txd(1), m_keylatch(0),
468468   m_keydown(1),
469   m_clock(0),
470   m_stb(1)
469   m_clock(0), m_hys(0), m_reset(0),
470   m_stb(1), m_j3(0), m_serial_timer(nullptr), m_reset_timer(nullptr)
471471{
472472}
473473
trunk/src/devices/bus/abckb/abc800kb.cpp
r250291r250292
352352      m_txd(1),
353353      m_clk(0),
354354      m_stb(1),
355      m_keydown(1)
355      m_keydown(1), m_serial_timer(nullptr)
356356{
357357}
358358
trunk/src/devices/bus/abckb/abc99.cpp
r250291r250292
487487
488488abc99_device::abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
489489   device_t(mconfig, ABC99, "Luxor ABC 99", tag, owner, clock, "abc99", __FILE__),
490   abc_keyboard_interface(mconfig, *this),
490   abc_keyboard_interface(mconfig, *this), m_serial_timer(nullptr), m_mouse_timer(nullptr),
491491   m_maincpu(*this, I8035_Z2_TAG),
492492   m_mousecpu(*this, I8035_Z5_TAG),
493493   m_speaker(*this, "speaker"),
trunk/src/devices/bus/abckb/abckb.cpp
r250291r250292
4747   device_slot_interface(mconfig, *this),
4848   m_out_rx_handler(*this),
4949   m_out_trxc_handler(*this),
50   m_out_keydown_handler(*this)
50   m_out_keydown_handler(*this), m_card(nullptr)
5151{
5252}
5353
trunk/src/devices/bus/adam/exp.cpp
r250291r250292
5555   device_t(mconfig, ADAM_EXPANSION_SLOT, "ADAM expansion slot", tag, owner, clock, "adam_expansion_slot", __FILE__),
5656   device_slot_interface(mconfig, *this),
5757   device_image_interface(mconfig, *this),
58   m_write_irq(*this)
58   m_write_irq(*this), m_card(nullptr)
5959{
6060}
6161
trunk/src/devices/bus/adam/ide.cpp
r250291r250292
9292   : device_t(mconfig, ADAM_IDE, "Powermate HP IDE", tag, owner, clock, "adam_ide", __FILE__),
9393      device_adam_expansion_slot_card_interface(mconfig, *this),
9494      m_ata(*this, ATA_TAG),
95      m_cent_data_out(*this, "cent_data_out")
95      m_cent_data_out(*this, "cent_data_out"), m_ata_data(0)
9696{
9797}
9898
trunk/src/devices/bus/adamnet/adamnet.cpp
r250291r250292
2828//-------------------------------------------------
2929
3030device_adamnet_card_interface::device_adamnet_card_interface(const machine_config &mconfig, device_t &device)
31   : device_slot_card_interface(mconfig, device)
31   : device_slot_card_interface(mconfig, device),
32   m_bus(nullptr)
3233{
3334}
3435
r250291r250292
5253//-------------------------------------------------
5354adamnet_slot_device::adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5455   device_t(mconfig, ADAMNET_SLOT, "ADAMnet slot", tag, owner, clock, "adamnet_slot", __FILE__),
55   device_slot_interface(mconfig, *this)
56   device_slot_interface(mconfig, *this), m_bus(nullptr)
5657{
5758}
5859
trunk/src/devices/bus/adamnet/ddp.cpp
r250291r250292
123123      device_adamnet_card_interface(mconfig, *this),
124124      m_maincpu(*this, M6801_TAG),
125125      m_ddp0(*this, "cassette"),
126      m_ddp1(*this, "cassette2")
126      m_ddp1(*this, "cassette2"), m_wr0(0), m_wr1(0), m_track(0)
127127{
128128}
129129
trunk/src/devices/bus/apf/slot.cpp
r250291r250292
7676                  device_t(mconfig, APF_CART_SLOT, "APF Cartridge Slot", tag, owner, clock, "apf_cart_slot", __FILE__),
7777                  device_image_interface(mconfig, *this),
7878                  device_slot_interface(mconfig, *this),
79                  m_type(APF_STD)
79                  m_type(APF_STD), m_cart(nullptr)
8080{
8181}
8282
trunk/src/devices/bus/apricot/expansion.cpp
r250291r250292
6969   m_ext1_handler(*this),
7070   m_ext2_handler(*this),
7171   m_int2_handler(*this),
72   m_int3_handler(*this)
72   m_int3_handler(*this), m_cpu_tag(nullptr), m_iop_tag(nullptr)
7373{
7474}
7575
trunk/src/devices/bus/arcadia/slot.cpp
r250291r250292
6666                  device_t(mconfig, EA2001_CART_SLOT, "Emerson Arcadia Cartridge Slot", tag, owner, clock, "arcadia_cart_slot", __FILE__),
6767                  device_image_interface(mconfig, *this),
6868                  device_slot_interface(mconfig, *this),
69                  m_type(ARCADIA_STD)
69                  m_type(ARCADIA_STD), m_cart(nullptr)
7070{
7171}
7272
trunk/src/devices/bus/astrocde/exp.cpp
r250291r250292
3838astrocade_exp_device::astrocade_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3939                  device_t(mconfig, ASTROCADE_EXP_SLOT, "Bally Astrocade expansion", tag, owner, clock, "astrocde_exp", __FILE__),
4040                  device_slot_interface(mconfig, *this),
41                  m_card_mounted(false)
41                  m_card_mounted(false), m_card(nullptr)
4242{
4343}
4444
trunk/src/devices/bus/astrocde/rom.cpp
r250291r250292
3535}
3636
3737astrocade_rom_256k_device::astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
38               : astrocade_rom_device(mconfig, ASTROCADE_ROM_256K, "Bally Astrocade 256K Carts", tag, owner, clock, "astrocade_256k", __FILE__)
39{
38               : astrocade_rom_device(mconfig, ASTROCADE_ROM_256K, "Bally Astrocade 256K Carts", tag, owner, clock, "astrocade_256k", __FILE__), m_base_bank(0)
39            {
4040}
4141
4242astrocade_rom_512k_device::astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43               : astrocade_rom_device(mconfig, ASTROCADE_ROM_512K, "Bally Astrocade 512K Carts", tag, owner, clock, "astrocade_512k", __FILE__)
44{
43               : astrocade_rom_device(mconfig, ASTROCADE_ROM_512K, "Bally Astrocade 512K Carts", tag, owner, clock, "astrocade_512k", __FILE__), m_base_bank(0)
44            {
4545}
4646
4747
trunk/src/devices/bus/astrocde/slot.cpp
r250291r250292
6666                  device_t(mconfig, ASTROCADE_CART_SLOT, "Bally Astrocade Cartridge Slot", tag, owner, clock, "astrocade_cart_slot", __FILE__),
6767                  device_image_interface(mconfig, *this),
6868                  device_slot_interface(mconfig, *this),
69                  m_type(ASTROCADE_STD)
69                  m_type(ASTROCADE_STD), m_cart(nullptr)
7070{
7171}
7272
trunk/src/devices/bus/bml3/bml3bus.cpp
r250291r250292
6262//-------------------------------------------------
6363bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6464      device_t(mconfig, BML3BUS_SLOT, "Hitachi MB-6890 Slot", tag, owner, clock, "bml3bus_slot", __FILE__),
65      device_slot_interface(mconfig, *this)
65      device_slot_interface(mconfig, *this), m_bml3bus_tag(nullptr), m_bml3bus_slottag(nullptr)
6666{
6767}
6868
6969bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7070      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
71      device_slot_interface(mconfig, *this)
71      device_slot_interface(mconfig, *this), m_bml3bus_tag(nullptr), m_bml3bus_slottag(nullptr)
7272{
7373}
7474
r250291r250292
111111//-------------------------------------------------
112112
113113bml3bus_device::bml3bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
114      device_t(mconfig, BML3BUS, "Hitachi MB-6890 Bus", tag, owner, clock, "bml3bus", __FILE__),
114      device_t(mconfig, BML3BUS, "Hitachi MB-6890 Bus", tag, owner, clock, "bml3bus", __FILE__), m_maincpu(nullptr),
115115      m_out_nmi_cb(*this),
116116      m_out_irq_cb(*this),
117      m_out_firq_cb(*this)
117      m_out_firq_cb(*this), m_cputag(nullptr)
118118{
119119}
120120
121121bml3bus_device::bml3bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
122      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
122      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr),
123123      m_out_nmi_cb(*this),
124124      m_out_irq_cb(*this),
125      m_out_firq_cb(*this)
125      m_out_firq_cb(*this), m_cputag(nullptr)
126126{
127127}
128128//-------------------------------------------------
r250291r250292
203203
204204device_bml3bus_card_interface::device_bml3bus_card_interface(const machine_config &mconfig, device_t &device)
205205   : device_slot_card_interface(mconfig, device),
206      m_bml3bus(NULL),
207      m_bml3bus_tag(NULL)
206      m_bml3bus(nullptr),
207      m_bml3bus_tag(nullptr), m_bml3bus_slottag(nullptr), m_slot(0), m_next(nullptr)
208208{
209209}
210210
trunk/src/devices/bus/bml3/bml3kanji.cpp
r250291r250292
7474
7575bml3bus_kanji_device::bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7676   device_t(mconfig, BML3BUS_KANJI, "Hitachi MP-9740 Kanji Character ROM Card", tag, owner, clock, "bml3kanji", __FILE__),
77   device_bml3bus_card_interface(mconfig, *this)
77   device_bml3bus_card_interface(mconfig, *this), m_kanji_addr(0), m_rom(nullptr)
7878{
7979}
8080
trunk/src/devices/bus/bml3/bml3mp1802.cpp
r250291r250292
113113   m_floppy0(*this, "fdc:0"),
114114   m_floppy1(*this, "fdc:1"),
115115   m_floppy2(*this, "fdc:2"),
116   m_floppy3(*this, "fdc:3")
116   m_floppy3(*this, "fdc:3"), m_rom(nullptr)
117117{
118118}
119119
trunk/src/devices/bus/bml3/bml3mp1805.cpp
r250291r250292
140140bml3bus_mp1805_device::bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
141141   device_t(mconfig, BML3BUS_MP1805, "Hitachi MP-1805 Floppy Controller Card", tag, owner, clock, "bml3mp1805", __FILE__),
142142   device_bml3bus_card_interface(mconfig, *this),
143   m_mc6843(*this, "mc6843")
143   m_mc6843(*this, "mc6843"), m_rom(nullptr)
144144{
145145}
146146
trunk/src/devices/bus/bw2/exp.cpp
r250291r250292
5353
5454bw2_expansion_slot_device::bw2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5555   device_t(mconfig, BW2_EXPANSION_SLOT, "Bondwell 2 expansion port", tag, owner, clock, "bw2_expansion_slot", __FILE__),
56   device_slot_interface(mconfig, *this)
56   device_slot_interface(mconfig, *this), m_cart(nullptr)
5757{
5858}
5959
trunk/src/devices/bus/c64/bn1541.cpp
r250291r250292
3737//-------------------------------------------------
3838
3939device_c64_floppy_parallel_interface::device_c64_floppy_parallel_interface(const machine_config &mconfig, device_t &device) :
40   m_other(NULL)
40   m_other(nullptr), m_parallel_data(0)
4141{
4242}
4343
r250291r250292
6363c64_bn1541_device::c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6464   device_t(mconfig, C64_BN1541, "C64 Burst Nibbler 1541/1571 Parallel Cable", tag, owner, clock, "c64_bn1541", __FILE__),
6565   device_pet_user_port_interface(mconfig, *this),
66   device_c64_floppy_parallel_interface(mconfig, *this)
66   device_c64_floppy_parallel_interface(mconfig, *this), m_parallel_output(0)
6767{
6868}
6969
trunk/src/devices/bus/c64/c128_partner.cpp
r250291r250292
8080   device_t(mconfig, C128_PARTNER, "PARTNER 128", tag, owner, clock, "c128_partner", __FILE__),
8181   device_c64_expansion_card_interface(mconfig, *this),
8282   //device_vcs_control_port_interface(mconfig, *this),
83   m_ram(*this, "ram"),
83   m_ram(*this, "ram"), t_joyb2(nullptr),
8484   m_ram_a12_a7(0),
8585   m_ls74_cd(0),
8686   m_ls74_q1(0),
trunk/src/devices/bus/c64/comal80.cpp
r250291r250292
2828
2929c64_comal80_cartridge_device::c64_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_COMAL80, "C64 COMAL 80 cartridge", tag, owner, clock, "c64_comal80", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/cpm.cpp
r250291r250292
134134   device_c64_expansion_card_interface(mconfig, *this),
135135   m_maincpu(*this, Z80_TAG),
136136   m_enabled(0),
137   m_ba(1)
137   m_ba(1), m_reset(0)
138138{
139139}
140140
trunk/src/devices/bus/c64/dela_ep64.cpp
r250291r250292
5252   device_t(mconfig, C64_DELA_EP64, "C64 Rex 64KB EPROM cartridge", tag, owner, clock, "c64_dela_ep64", __FILE__),
5353   device_c64_expansion_card_interface(mconfig, *this),
5454   m_eprom1(*this, "eprom1"),
55   m_eprom2(*this, "eprom2")
55   m_eprom2(*this, "eprom2"), m_bank(0), m_reset(0), m_rom0_ce(0), m_rom1_ce(0), m_rom2_ce(0)
5656{
5757}
5858
trunk/src/devices/bus/c64/dela_ep7x8.cpp
r250291r250292
6767   m_eprom4(*this, "rom4"),
6868   m_eprom5(*this, "rom5"),
6969   m_eprom6(*this, "rom6"),
70   m_eprom7(*this, "rom7")
70   m_eprom7(*this, "rom7"), m_bank(0)
7171{
7272}
7373
trunk/src/devices/bus/c64/dinamic.cpp
r250291r250292
2828
2929c64_dinamic_cartridge_device::c64_dinamic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_DINAMIC, "C64 Dinamic cartridge", tag, owner, clock, "c64_dinamic", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/dqbb.cpp
r250291r250292
3838c64_dqbb_cartridge_device::c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3939   device_t(mconfig, C64_DQBB, "C64 Double Quick Brown Box cartridge", tag, owner, clock, "c64_dqbb", __FILE__),
4040   device_c64_expansion_card_interface(mconfig, *this),
41   device_nvram_interface(mconfig, *this)
41   device_nvram_interface(mconfig, *this),
42   m_cs(0),
43   m_we(0)
4244{
4345}
4446
trunk/src/devices/bus/c64/easy_calc_result.cpp
r250291r250292
4949
5050c64_easy_calc_result_cartridge_device::c64_easy_calc_result_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5151   device_t(mconfig, C64_EASY_CALC_RESULT, "C64 Easy Calc Result cartridge", tag, owner, clock, "c64_easy_calc_result", __FILE__),
52   device_c64_expansion_card_interface(mconfig, *this)
52   device_c64_expansion_card_interface(mconfig, *this), m_bank(0)
5353{
5454}
5555
trunk/src/devices/bus/c64/epyx_fast_load.cpp
r250291r250292
3838
3939c64_epyx_fast_load_cartridge_device::c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4040   device_t(mconfig, C64_EPYX_FAST_LOAD, "C64 Epyx Fast Load cartridge", tag, owner, clock, "c64_epyx_fast_load", __FILE__),
41   device_c64_expansion_card_interface(mconfig, *this)
41   device_c64_expansion_card_interface(mconfig, *this), m_exrom_timer(nullptr)
4242{
4343}
4444
trunk/src/devices/bus/c64/exp.cpp
r250291r250292
6565      m_write_irq(*this),
6666      m_write_nmi(*this),
6767      m_write_dma(*this),
68      m_write_reset(*this)
68      m_write_reset(*this), m_card(nullptr), m_hiram(0)
6969{
7070}
7171
trunk/src/devices/bus/c64/final3.cpp
r250291r250292
6565
6666c64_final3_cartridge_device::c64_final3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6767   device_t(mconfig, C64_FINAL3, "C64 Final Cartridge III", tag, owner, clock, "c64_final3", __FILE__),
68   device_c64_expansion_card_interface(mconfig, *this)
68   device_c64_expansion_card_interface(mconfig, *this), m_bank(0), m_hidden(0)
6969{
7070}
7171
trunk/src/devices/bus/c64/fun_play.cpp
r250291r250292
2828
2929c64_fun_play_cartridge_device::c64_fun_play_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_FUN_PLAY, "C64 Fun Play cartridge", tag, owner, clock, "c64_fun_play", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/georam.cpp
r250291r250292
2929c64_georam_cartridge_device::c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_GEORAM, "C64 GeoRAM cartridge", tag, owner, clock, "c64_georam", __FILE__),
3131   device_c64_expansion_card_interface(mconfig, *this),
32   m_ram(*this, "ram")
32   m_ram(*this, "ram"),
33   m_bank(0)
3334{
3435}
3536
trunk/src/devices/bus/c64/ide64.cpp
r250291r250292
101101   m_rtc(*this, DS1302_TAG),
102102   m_ata(*this, ATA_TAG),
103103   m_jp1(*this, "JP1"),
104   m_ram(*this, "ram")
104   m_ram(*this, "ram"), m_bank(0), m_ata_data(0), m_wp(0), m_enable(0)
105105{
106106}
107107
trunk/src/devices/bus/c64/mach5.cpp
r250291r250292
5454c64_mach5_cartridge_device::c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5555   device_t(mconfig, C64_MACH5, "C64 MACH5 cartridge", tag, owner, clock, "c64_mach5", __FILE__),
5656   device_c64_expansion_card_interface(mconfig, *this),
57   m_s1(*this, "S1")
57   m_s1(*this, "S1"), m_c128(false)
5858{
5959}
6060
trunk/src/devices/bus/c64/magic_desk.cpp
r250291r250292
2828
2929c64_magic_desk_cartridge_device::c64_magic_desk_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_MAGIC_DESK, "C64 Magic Desk cartridge", tag, owner, clock, "c64_magic_desk", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/magic_voice.cpp
r250291r250292
266266   m_vslsi(*this, T6721A_TAG),
267267   m_tpi(*this, MOS6525_TAG),
268268   m_fifo(*this, CMOS40105_TAG),
269   m_exp(*this, C64_EXPANSION_SLOT_TAG),
269   m_exp(*this, C64_EXPANSION_SLOT_TAG), m_ca(0),
270270   m_tpi_pb(0x60),
271271   m_tpi_pc6(1),
272272   m_pd(0)
trunk/src/devices/bus/c64/multiscreen.cpp
r250291r250292
141141
142142c64_multiscreen_cartridge_device::c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
143143   device_t(mconfig, C64_MULTISCREEN, "C64 Multiscreen cartridge", tag, owner, clock, "c64_mscr", __FILE__),
144   device_c64_expansion_card_interface(mconfig, *this)
144   device_c64_expansion_card_interface(mconfig, *this), m_bank(0)
145145{
146146}
147147
trunk/src/devices/bus/c64/neoram.cpp
r250291r250292
2929c64_neoram_cartridge_device::c64_neoram_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_NEORAM, "C64 NeoRAM cartridge", tag, owner, clock, "c64_neoram", __FILE__),
3131   device_c64_expansion_card_interface(mconfig, *this),
32   device_nvram_interface(mconfig, *this)
32   device_nvram_interface(mconfig, *this),
33   m_bank(0)
3334{
3435}
3536
trunk/src/devices/bus/c64/pagefox.cpp
r250291r250292
5151c64_pagefox_cartridge_device::c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5252   device_t(mconfig, C64_PAGEFOX, "C64 Pagefox cartridge", tag, owner, clock, "c64_pagefox", __FILE__),
5353   device_c64_expansion_card_interface(mconfig, *this),
54   m_ram(*this, "ram")
54   m_ram(*this, "ram"), m_bank(0)
5555{
5656}
5757
trunk/src/devices/bus/c64/ross.cpp
r250291r250292
2828
2929c64_ross_cartridge_device::c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_ROSS, "C64 Ross cartridge", tag, owner, clock, "c64_ross", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this), m_bank(0)
3232{
3333}
3434
trunk/src/devices/bus/c64/silverrock.cpp
r250291r250292
6161
6262c64_silverrock_cartridge_device::c64_silverrock_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6363   device_t(mconfig, C64_SILVERROCK, "C64 SilverRock cartridge", tag, owner, clock, "c64_silverrock", __FILE__),
64   device_c64_expansion_card_interface(mconfig, *this)
64   device_c64_expansion_card_interface(mconfig, *this), m_bank(0)
6565{
6666}
6767
trunk/src/devices/bus/c64/structured_basic.cpp
r250291r250292
2828
2929c64_structured_basic_cartridge_device::c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_STRUCTURED_BASIC, "C64 Structured Basic cartridge", tag, owner, clock, "c64_structured_basic", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/super_explode.cpp
r250291r250292
3838
3939c64_super_explode_cartridge_device::c64_super_explode_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4040   device_t(mconfig, C64_SUPER_EXPLODE, "C64 Super Explode! cartridge", tag, owner, clock, "c64_super_explode", __FILE__),
41   device_c64_expansion_card_interface(mconfig, *this)
41   device_c64_expansion_card_interface(mconfig, *this), m_bank(0), m_exrom_timer(nullptr)
4242{
4343}
4444
trunk/src/devices/bus/c64/super_games.cpp
r250291r250292
2828
2929c64_super_games_cartridge_device::c64_super_games_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_SUPER_GAMES, "C64 Super Games cartridge", tag, owner, clock, "c64_super_games", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/sw8k.cpp
r250291r250292
7474c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7575   device_t(mconfig, C64_SW8K, "C64 Switchable 8K cartridge", tag, owner, clock, "c64_sw8k", __FILE__),
7676   device_c64_expansion_card_interface(mconfig, *this),
77   m_sw(*this, "SW")
77   m_sw(*this, "SW"), m_bank(0)
7878{
7979}
8080
trunk/src/devices/bus/c64/swiftlink.cpp
r250291r250292
104104   device_c64_expansion_card_interface(mconfig, *this),
105105   m_acia(*this, MOS6551_TAG),
106106   m_io_cs(*this, "CS"),
107   m_io_irq(*this, "IRQ")
107   m_io_irq(*this, "IRQ"), m_cs(0), m_irq(0)
108108{
109109}
110110
trunk/src/devices/bus/c64/system3.cpp
r250291r250292
2828
2929c64_system3_cartridge_device::c64_system3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_SYSTEM3, "C64 System 3 cartridge", tag, owner, clock, "c64_system3", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/c64/tdos.cpp
r250291r250292
206206   device_c64_expansion_card_interface(mconfig, *this),
207207   m_ssda(*this, MC68A52P_TAG),
208208   m_exp(*this, C64_EXPANSION_SLOT_TAG),
209   m_sw1(*this, "SW1")
209   m_sw1(*this, "SW1"), m_enabled(false)
210210{
211211}
212212
trunk/src/devices/bus/c64/turbo232.cpp
r250291r250292
104104   m_acia(*this, MOS6551_TAG),
105105   m_rs232(*this, RS232_TAG),
106106   m_io_cs(*this, "CS"),
107   m_io_irq(*this, "IRQ")
107   m_io_irq(*this, "IRQ"), m_cs(0), m_irq(0), m_es(0)
108108{
109109}
110110
trunk/src/devices/bus/c64/vw64.cpp
r250291r250292
6868
6969c64_vizawrite_cartridge_device::c64_vizawrite_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7070   device_t(mconfig, C64_VW64, "VizaWrite 64", tag, owner, clock, "c64_vizawrite", __FILE__),
71   device_c64_expansion_card_interface(mconfig, *this)
71   device_c64_expansion_card_interface(mconfig, *this), m_game_timer(nullptr)
7272{
7373}
7474
trunk/src/devices/bus/c64/zaxxon.cpp
r250291r250292
2828
2929c64_zaxxon_cartridge_device::c64_zaxxon_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, C64_ZAXXON, "C64 Zaxxon cartridge", tag, owner, clock, "c64_zaxxon", __FILE__),
31   device_c64_expansion_card_interface(mconfig, *this)
31   device_c64_expansion_card_interface(mconfig, *this),
32   m_bank(0)
3233{
3334}
3435
trunk/src/devices/bus/cbm2/exp.cpp
r250291r250292
6565cbm2_expansion_slot_device::cbm2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6666      device_t(mconfig, CBM2_EXPANSION_SLOT, "CBM-II expansion port", tag, owner, clock, "cbm2_expansion_slot", __FILE__),
6767      device_slot_interface(mconfig, *this),
68      device_image_interface(mconfig, *this)
68      device_image_interface(mconfig, *this), m_card(nullptr)
6969{
7070}
7171
trunk/src/devices/bus/cbm2/user.cpp
r250291r250292
4848   m_write_irq(*this),
4949   m_write_sp(*this),
5050   m_write_cnt(*this),
51   m_write_flag(*this)
51   m_write_flag(*this), m_card(nullptr)
5252{
5353}
5454
trunk/src/devices/bus/cbmiec/cbmiec.cpp
r250291r250292
222222//-------------------------------------------------
223223
224224device_cbm_iec_interface::device_cbm_iec_interface(const machine_config &mconfig, device_t &device)
225   : device_slot_card_interface(mconfig, device)
225   : device_slot_card_interface(mconfig, device), m_next(nullptr), m_bus(nullptr), m_slot(nullptr)
226226{
227227}
228228
r250291r250292
247247
248248cbm_iec_slot_device::cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
249249      device_t(mconfig, CBM_IEC_SLOT, "CBM IEC slot", tag, owner, clock, "cbm_iec_slot", __FILE__),
250      device_slot_interface(mconfig, *this)
250      device_slot_interface(mconfig, *this), m_address(0)
251251{
252252}
253253
trunk/src/devices/bus/centronics/comxpl80.cpp
r250291r250292
163163      device_centronics_peripheral_interface(mconfig, *this),
164164      m_plotter(*this, "PLOTTER"),
165165      m_font(*this, "FONT"),
166      m_sw(*this, "SW")
166      m_sw(*this, "SW"), m_font_addr(0), m_x_motor_phase(0), m_y_motor_phase(0), m_z_motor_phase(0), m_plotter_data(0), m_plotter_ack(0), m_plotter_online(0), m_data(0)
167167{
168168}
169169
trunk/src/devices/bus/centronics/covox.cpp
r250291r250292
9292   : device_t(mconfig, CENTRONICS_COVOX_STEREO, "Covox (Stereo-in-1)", tag, owner, clock, "covox_stereo", __FILE__),
9393   device_centronics_peripheral_interface( mconfig, *this ),
9494   m_dac_left(*this, "dac_left"),
95   m_dac_right(*this, "dac_right"),
96   m_data(0)
95   m_dac_right(*this, "dac_right"), m_strobe(0),
96   m_data(0), m_autofd(0)
9797{
9898}
9999
trunk/src/devices/bus/centronics/epson_ex800.cpp
r250291r250292
361361   device_t(mconfig, EPSON_EX800, "Epson EX-800", tag, owner, clock, "ex800", __FILE__),
362362   device_centronics_peripheral_interface(mconfig, *this),
363363   m_maincpu(*this, "maincpu"),
364   m_beeper(*this, "beeper")
364   m_beeper(*this, "beeper"), m_irq_state(0)
365365{
366366}
367367
trunk/src/devices/bus/centronics/epson_lx810l.cpp
r250291r250292
302302   m_cr_pos_abs(1),
303303   m_real_cr_pos(1),
304304   m_real_cr_steps(0),
305   m_real_cr_dir(0)
305   m_real_cr_dir(0), m_fakemem(0)
306306{
307307}
308308
r250291r250292
323323   m_cr_pos_abs(1),
324324   m_real_cr_pos(1),
325325   m_real_cr_steps(0),
326   m_real_cr_dir(0)
326   m_real_cr_dir(0), m_fakemem(0)
327327{
328328}
329329
trunk/src/devices/bus/centronics/printer.cpp
r250291r250292
2727centronics_printer_device::centronics_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
2828   device_t(mconfig, CENTRONICS_PRINTER, "Centronics Printer", tag, owner, clock, "centronics_printer", __FILE__),
2929   device_centronics_peripheral_interface( mconfig, *this ),
30   m_strobe(0),
30   m_strobe(0),
31   m_data(0),
32   m_busy(0),
3133   m_printer(*this, "printer")
3234{
3335}
trunk/src/devices/bus/chanf/rom.cpp
r250291r250292
3333
3434chanf_rom_device::chanf_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
3535               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
36                  device_channelf_cart_interface( mconfig, *this )
37{
36                  device_channelf_cart_interface( mconfig, *this ), m_addr_latch(0), m_addr(0), m_read_write(0), m_data0(0)
37            {
3838}
3939
4040chanf_rom_device::chanf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4141               : device_t(mconfig, CHANF_ROM_STD, "Channel F Standard Carts", tag, owner, clock, "chanf_rom", __FILE__),
42                  device_channelf_cart_interface( mconfig, *this )
43{
42                  device_channelf_cart_interface( mconfig, *this ), m_addr_latch(0), m_addr(0), m_read_write(0), m_data0(0)
43            {
4444}
4545
4646chanf_maze_device::chanf_maze_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
5959}
6060
6161chanf_multi_old_device::chanf_multi_old_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
62               : chanf_rom_device(mconfig, CHANF_ROM_MULTI_OLD, "Channel F Multigame (Earlier Version) Cart", tag, owner, clock, "chanf_multi_old", __FILE__)
63{
62               : chanf_rom_device(mconfig, CHANF_ROM_MULTI_OLD, "Channel F Multigame (Earlier Version) Cart", tag, owner, clock, "chanf_multi_old", __FILE__), m_base_bank(0)
63            {
6464}
6565
6666chanf_multi_final_device::chanf_multi_final_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
67               : chanf_rom_device(mconfig, CHANF_ROM_MULTI_FINAL, "Channel F Multigame (Final Version) Cart", tag, owner, clock, "chanf_multi_fin", __FILE__)
68{
67               : chanf_rom_device(mconfig, CHANF_ROM_MULTI_FINAL, "Channel F Multigame (Final Version) Cart", tag, owner, clock, "chanf_multi_fin", __FILE__), m_base_bank(0), m_half_bank(0)
68            {
6969}
7070
7171
trunk/src/devices/bus/chanf/slot.cpp
r250291r250292
7676                  device_t(mconfig, CHANF_CART_SLOT, "Fairchild Channel F Cartridge Slot", tag, owner, clock, "cf_cart_slot", __FILE__),
7777                  device_image_interface(mconfig, *this),
7878                  device_slot_interface(mconfig, *this),
79                  m_type(CF_CHESS)
79                  m_type(CF_CHESS), m_cart(nullptr)
8080{
8181}
8282
trunk/src/devices/bus/coco/coco_dwsock.cpp
r250291r250292
6666//-------------------------------------------------
6767
6868beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
69   : device_t(mconfig, COCO_DWSOCK, "Virtual Becker Port", tag, owner, clock, "coco_dwsock", __FILE__),
70   m_dwconfigport(*this, DRIVEWIRE_PORT_TAG)
69   : device_t(mconfig, COCO_DWSOCK, "Virtual Becker Port", tag, owner, clock, "coco_dwsock", __FILE__), m_hostname(nullptr),
70   m_dwconfigport(*this, DRIVEWIRE_PORT_TAG), m_dwtcpport(0)
7171{
7272   m_pSocket = NULL;
7373   m_head = 0;
trunk/src/devices/bus/coco/coco_fdc.cpp
r250291r250292
179179//-------------------------------------------------
180180coco_fdc_device::coco_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
181181   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
182      device_cococart_interface( mconfig, *this ),
182      device_cococart_interface( mconfig, *this ), m_owner(nullptr), m_dskreg(0), m_drq(0), m_intrq(0),
183183      m_wd17xx(*this, WD_TAG),
184184      m_wd2797(*this, WD2797_TAG),
185185      m_ds1315(*this, CLOUD9_TAG),
186      m_disto_msm6242(*this, DISTO_TAG)
186      m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0)
187187{
188188}
189189
190190coco_fdc_device::coco_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
191191      : device_t(mconfig, COCO_FDC, "CoCo FDC", tag, owner, clock, "coco_fdc", __FILE__),
192      device_cococart_interface( mconfig, *this ),
192      device_cococart_interface( mconfig, *this ), m_owner(nullptr), m_dskreg(0), m_drq(0), m_intrq(0),
193193      m_wd17xx(*this, WD_TAG),
194194      m_wd2797(*this, WD2797_TAG),
195195      m_ds1315(*this, CLOUD9_TAG),
196      m_disto_msm6242(*this, DISTO_TAG)
197{
196      m_disto_msm6242(*this, DISTO_TAG), m_msm6242_rtc_address(0)
197   {
198198}
199199
200200//-------------------------------------------------
trunk/src/devices/bus/coco/coco_multi.cpp
r250291r250292
140140
141141coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
142142      : device_t(mconfig, COCO_MULTIPAK, "CoCo Multi-Pak Interface", tag, owner, clock, "coco_multipak", __FILE__),
143      device_cococart_interface( mconfig, *this )
144{
143      device_cococart_interface( mconfig, *this ), m_owner(nullptr), m_select(0)
144   {
145145}
146146
147147
trunk/src/devices/bus/coco/coco_orch90.cpp
r250291r250292
4040
4141coco_orch90_device::coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4242      : device_t(mconfig, COCO_ORCH90, "CoCo Orch-90 PAK", tag, owner, clock, "coco_orch90", __FILE__),
43      device_cococart_interface( mconfig, *this )
44{
43      device_cococart_interface( mconfig, *this ), m_left_dac(nullptr), m_right_dac(nullptr)
44   {
4545}
4646
4747//-------------------------------------------------
trunk/src/devices/bus/coco/coco_pak.cpp
r250291r250292
4141//-------------------------------------------------
4242coco_pak_device::coco_pak_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
4343   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
44      device_cococart_interface( mconfig, *this )
44      device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr)
4545{
4646}
4747
4848coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4949      : device_t(mconfig, COCO_PAK, "CoCo Program PAK", tag, owner, clock, "cocopak", __FILE__),
50      device_cococart_interface( mconfig, *this )
51{
50      device_cococart_interface( mconfig, *this ), m_cart(nullptr), m_owner(nullptr)
51   {
5252}
5353
5454//-------------------------------------------------
trunk/src/devices/bus/coco/cococart.cpp
r250291r250292
4141      device_image_interface(mconfig, *this),
4242      m_cart_callback(*this),
4343      m_nmi_callback(*this),
44      m_halt_callback(*this)
44      m_halt_callback(*this), m_cart(nullptr)
4545{
4646}
4747
trunk/src/devices/bus/coleco/ctrl.cpp
r250291r250292
4646
4747colecovision_control_port_device::colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4848   device_t(mconfig, COLECOVISION_CONTROL_PORT, "ColecoVision control port", tag, owner, clock, "colecovision_control_port", __FILE__),
49   device_slot_interface(mconfig, *this),
49   device_slot_interface(mconfig, *this), m_device(nullptr),
5050   m_write_irq(*this)
5151{
5252}
trunk/src/devices/bus/coleco/exp.cpp
r250291r250292
5555colecovision_cartridge_slot_device::colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5656   device_t(mconfig, COLECOVISION_CARTRIDGE_SLOT, "ColecoVision cartridge port", tag, owner, clock, "coleco_cartridge_port", __FILE__),
5757   device_slot_interface(mconfig, *this),
58   device_image_interface(mconfig, *this)
58   device_image_interface(mconfig, *this), m_card(nullptr)
5959{
6060}
6161
trunk/src/devices/bus/compucolor/floppy.cpp
r250291r250292
8585//-------------------------------------------------
8686
8787compucolor_floppy_port_device::compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
88   : rs232_port_device(mconfig, COMPUCOLOR_FLOPPY_PORT, "Compucolor Floppy Port", tag, owner, clock, "compclr_flp_port", __FILE__)
88   : rs232_port_device(mconfig, COMPUCOLOR_FLOPPY_PORT, "Compucolor Floppy Port", tag, owner, clock, "compclr_flp_port", __FILE__), m_dev(nullptr)
8989{
9090}
9191
trunk/src/devices/bus/comx35/exp.cpp
r250291r250292
4545comx_expansion_slot_device::comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4646   device_t(mconfig, COMX_EXPANSION_SLOT, "COMX-35 expansion slot", tag, owner, clock, "comx_expansion_slot", __FILE__),
4747   device_slot_interface(mconfig, *this),
48   m_write_irq(*this)
48   m_write_irq(*this), m_card(nullptr)
4949{
5050}
5151
trunk/src/devices/bus/comx35/ram.cpp
r250291r250292
3636comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3737   device_t(mconfig, COMX_RAM, "COMX-35 RAM Card", tag, owner, clock, "comx_ram", __FILE__),
3838   device_comx_expansion_card_interface(mconfig, *this),
39   m_ram(*this, "ram")
39   m_ram(*this, "ram"),
40   m_bank(0)
4041{
4142}
4243
trunk/src/devices/bus/cpc/amdrum.cpp
r250291r250292
3636
3737cpc_amdrum_device::cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3838   device_t(mconfig, CPC_AMDRUM, "Amdrum", tag, owner, clock, "cpc_amdrum", __FILE__),
39   device_cpc_expansion_card_interface(mconfig, *this),
39   device_cpc_expansion_card_interface(mconfig, *this),
40   m_slot(nullptr),
4041   m_dac(*this,"dac")
4142{
4243}
trunk/src/devices/bus/cpc/brunword4.cpp
r250291r250292
6464
6565cpc_brunword4_device::cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6666   device_t(mconfig, CPC_BRUNWORD_MK4, "Brunword Elite MK4", tag, owner, clock, "cpc_brunword4", __FILE__),
67   device_cpc_expansion_card_interface(mconfig, *this)
67   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rombank_active(false), m_bank_sel(0)
6868{
6969}
7070
trunk/src/devices/bus/cpc/cpc_pds.cpp
r250291r250292
3737
3838cpc_pds_device::cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3939   device_t(mconfig, CPC_PDS, "Programmers Development System (CPC Target)", tag, owner, clock, "cpc_pds", __FILE__),
40   device_cpc_expansion_card_interface(mconfig, *this),
40   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
4141   m_pio(*this,"pio")
4242{
4343}
trunk/src/devices/bus/cpc/cpc_rom.cpp
r250291r250292
8181
8282rom_image_device::rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
8383   : device_t(mconfig, ROMSLOT, "ROM image", tag, owner, clock, "rom_image", __FILE__),
84      device_image_interface(mconfig, *this)
84      device_image_interface(mconfig, *this), m_base(nullptr)
8585{
8686}
8787
trunk/src/devices/bus/cpc/cpc_rs232.cpp
r250291r250292
8585   device_cpc_expansion_card_interface(mconfig, *this),
8686   m_pit(*this,"pit"),
8787   m_dart(*this,"dart"),
88   m_rs232(*this,"rs232")
88   m_rs232(*this,"rs232"), m_slot(nullptr)
8989{
9090}
9191
r250291r250292
9494   device_cpc_expansion_card_interface(mconfig, *this),
9595   m_pit(*this,"pit"),
9696   m_dart(*this,"dart"),
97   m_rs232(*this,"rs232")
97   m_rs232(*this,"rs232"), m_slot(nullptr)
9898{
9999}
100100
trunk/src/devices/bus/cpc/cpc_ssa1.cpp
r250291r250292
160160
161161cpc_ssa1_device::cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
162162   device_t(mconfig, CPC_SSA1, "SSA-1", tag, owner, clock, "cpc_ssa1", __FILE__),
163   device_cpc_expansion_card_interface(mconfig, *this),
164   m_lrq(1),
163   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rom(nullptr),
164   m_lrq(1), m_sby(0),
165165   m_sp0256_device(*this,"sp0256")
166166{
167167}
168168
169169cpc_dkspeech_device::cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
170170   device_t(mconfig, CPC_DKSPEECH, "DK'Tronics Speech Synthesiser", tag, owner, clock, "cpc_dkspeech", __FILE__),
171   device_cpc_expansion_card_interface(mconfig, *this),
172   m_lrq(1),
171   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rom(nullptr),
172   m_lrq(1), m_sby(0),
173173   m_sp0256_device(*this,"sp0256")
174174{
175175}
trunk/src/devices/bus/cpc/cpcexp.cpp
r250291r250292
2626
2727
2828device_cpc_expansion_card_interface::device_cpc_expansion_card_interface(const machine_config &mconfig, device_t &device)
29   : device_slot_card_interface(mconfig,device)
29   : device_slot_card_interface(mconfig,device),
30   m_rom_sel(0)
3031{
3132}
3233
r250291r250292
4849      m_out_nmi_cb(*this),
4950      m_out_reset_cb(*this),
5051      m_out_romdis_cb(*this),
51      m_out_rom_select(*this)
52      m_out_rom_select(*this), m_card(nullptr)
5253{
5354}
5455
trunk/src/devices/bus/cpc/ddi1.cpp
r250291r250292
6363
6464cpc_ddi1_device::cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6565   device_t(mconfig, CPC_DDI1, "DDI-1", tag, owner, clock, "cpc_ddi1", __FILE__),
66   device_cpc_expansion_card_interface(mconfig, *this),
66   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
6767   m_fdc(*this,"upd765"),
68   m_connector(*this,"upd765:0")
68   m_connector(*this,"upd765:0"), m_rom_active(false), m_romen(false)
6969{
7070}
7171
trunk/src/devices/bus/cpc/doubler.cpp
r250291r250292
66 *
77 */
88
9   #include "doubler.h"
10   #include "includes/amstrad.h"
9#include "doubler.h"
10#include "includes/amstrad.h"
1111
12   //**************************************************************************
12//**************************************************************************
1313//  DEVICE DEFINITIONS
1414//**************************************************************************
1515
r250291r250292
3838
3939cpc_doubler_device::cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4040   device_t(mconfig, CPC_DOUBLER, "Draysoft Doubler", tag, owner, clock, "cpc_doubler", __FILE__),
41   device_cpc_expansion_card_interface(mconfig, *this),
41   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
4242   m_tape(*this,"doubler_tape")
4343{
4444}
trunk/src/devices/bus/cpc/hd20.cpp
r250291r250292
5050
5151cpc_hd20_device::cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5252   device_t(mconfig, CPC_HD20, "Dobbertin HD20", tag, owner, clock, "cpc_hd20", __FILE__),
53   device_cpc_expansion_card_interface(mconfig, *this),
53   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
5454   m_hdc(*this,"hdc")
5555{
5656}
trunk/src/devices/bus/cpc/magicsound.cpp
r250291r250292
7272
7373al_magicsound_device::al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7474   device_t(mconfig, AL_MAGICSOUND, "Magic Sound Board", tag, owner, clock, "al_magicsound", __FILE__),
75   device_cpc_expansion_card_interface(mconfig, *this),
75   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
7676   m_dac1(*this,"dac1"),
7777   m_dmac(*this,"dmac"),
7878   m_timer1(*this,"timer1"),
79   m_timer2(*this,"timer2")
79   m_timer2(*this,"timer2"), m_current_channel(0), m_ramptr(nullptr), m_current_output(0)
8080{
8181}
8282
trunk/src/devices/bus/cpc/mface2.cpp
r250291r250292
310310
311311cpc_multiface2_device::cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
312312   device_t(mconfig, CPC_MFACE2, "Multiface II", tag, owner, clock, "cpc_mf2", __FILE__),
313   device_cpc_expansion_card_interface(mconfig, *this)
313   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_multiface_ram(nullptr), m_multiface_flags(0), m_romdis(0)
314314{
315315}
316316
trunk/src/devices/bus/cpc/playcity.cpp
r250291r250292
5454
5555cpc_playcity_device::cpc_playcity_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5656   device_t(mconfig, CPC_PLAYCITY, "PlayCity", tag, owner, clock, "cpc_playcity", __FILE__),
57   device_cpc_expansion_card_interface(mconfig, *this),
57   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
5858   m_ctc(*this,"ctc"),
5959   m_ymz1(*this,"ymz_1"),
6060   m_ymz2(*this,"ymz_2")
trunk/src/devices/bus/cpc/smartwatch.cpp
r250291r250292
4747
4848cpc_smartwatch_device::cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4949   device_t(mconfig, CPC_SMARTWATCH, "Dobbertin Smartwatch", tag, owner, clock, "cpc_smartwatch", __FILE__),
50   device_cpc_expansion_card_interface(mconfig, *this),
51   m_rtc(*this,"rtc")
50   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
51   m_rtc(*this,"rtc"), m_bank(nullptr)
5252{
5353}
5454
trunk/src/devices/bus/cpc/symbfac2.cpp
r250291r250292
7373
7474cpc_symbiface2_device::cpc_symbiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7575   device_t(mconfig, CPC_SYMBIFACE2, "SYMBiFACE II", tag, owner, clock, "cpc_symf2", __FILE__),
76   device_cpc_expansion_card_interface(mconfig, *this),
76   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr),
7777   m_ide(*this,"ide"),
7878   m_rtc(*this,"rtc"),
7979   m_nvram(*this,"nvram"),
8080   m_mouse_x(*this,"sf2_mouse_x"),
8181   m_mouse_y(*this,"sf2_mouse_y"),
82   m_mouse_buttons(*this,"sf2_mouse_buttons")
82   m_mouse_buttons(*this,"sf2_mouse_buttons"), m_iohigh(false), m_ide_data(0), m_mouse_state(0), m_input_x(0), m_input_y(0), m_4xxx_ptr_r(nullptr), m_4xxx_ptr_w(nullptr), m_6xxx_ptr_r(nullptr), m_6xxx_ptr_w(nullptr)
8383{
8484}
8585
trunk/src/devices/bus/cpc/transtape.cpp
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Barry Rodewald
3/*
4 * transtape.c  --  Hard Micro SA Transtape
5 *
6 * Spanish hacking device
7 *
8 * Further info at - http://cpcwiki.eu/index.php/Transtape
9 */
10
11#include "transtape.h"
12#include "includes/amstrad.h"
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type CPC_TRANSTAPE = &device_creator<cpc_transtape_device>;
19
20ROM_START( cpc_transtape )
21   ROM_REGION( 0x4000, "tt_rom", 0 )
22   ROM_LOAD( "tta.rom",   0x0000, 0x4000, CRC(c568da76) SHA1(cc509d21216bf11d40f9a3e0791ef7f4ada03790) )
23ROM_END
24
25const rom_entry *cpc_transtape_device::device_rom_region() const
26{
27   return ROM_NAME( cpc_transtape );
28}
29
30static INPUT_PORTS_START(cpc_transtape)
31   PORT_START("transtape")
32   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Red Button") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF,cpc_transtape_device,button_red_w,1)
33   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Black Button") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF,cpc_transtape_device,button_black_w,1)
34INPUT_PORTS_END
35
36ioport_constructor cpc_transtape_device::device_input_ports() const
37{
38   return INPUT_PORTS_NAME( cpc_transtape );
39}
40
41//**************************************************************************
42//  LIVE DEVICE
43//**************************************************************************
44
45cpc_transtape_device::cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
46   device_t(mconfig, CPC_TRANSTAPE, "HM Transtape", tag, owner, clock, "cpc_transtape", __FILE__),
47   device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_cpu(nullptr), m_space(nullptr), m_ram(nullptr),
48   m_rom_active(false),
49   m_romen(true),
50   m_output(0)
51{
52}
53
54//-------------------------------------------------
55//  device_start - device-specific startup
56//-------------------------------------------------
57
58void cpc_transtape_device::device_start()
59{
60   m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner());
61   m_cpu = static_cast<cpu_device*>(machine().device("maincpu"));
62   m_space = &m_cpu->space(AS_IO);
63
64   m_ram = auto_alloc_array_clear(machine(), UINT8, 0x2000);
65
66   m_space->install_write_handler(0xfbf0,0xfbf0,0,0,write8_delegate(FUNC(cpc_transtape_device::output_w),this));
67   m_space->install_read_handler(0xfbff,0xfbff,0,0,read8_delegate(FUNC(cpc_transtape_device::input_r),this));
68}
69
70//-------------------------------------------------
71//  device_reset - device-specific reset
72//-------------------------------------------------
73
74void cpc_transtape_device::device_reset()
75{
76   // TODO
77   m_rom_active = false;
78   m_output = 0;
79}
80
81void cpc_transtape_device::map_enable()
82{
83   UINT8* ROM = memregion("tt_rom")->base();
84   if(m_output & 0x02)  // ROM enable
85   {
86      membank(":bank1")->set_base(ROM);
87      membank(":bank2")->set_base(ROM+0x2000);
88   }
89   if(m_output & 0x01)  // RAM enable
90   {
91      membank(":bank7")->set_base(m_ram);
92      membank(":bank15")->set_base(m_ram);
93      membank(":bank8")->set_base(m_ram);  // repeats in second 8kB
94      membank(":bank16")->set_base(m_ram);
95   }
96}
97
98INPUT_CHANGED_MEMBER(cpc_transtape_device::button_red_w)
99{
100   // enables device ROM at 0x0000, RAM at 0xc000, generates NMI
101   if(newval & 0x01)
102   {
103      m_output |= 0x1f;
104      map_enable();
105      m_cpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
106   }
107}
108
109INPUT_CHANGED_MEMBER(cpc_transtape_device::button_black_w)
110{
111   // enables device ROM at 0x0000, RAM at 0xc000(?), force execution to start at 0x0000
112   if(newval & 0x01)
113   {
114      m_output |= 0x1f;
115      map_enable();
116      m_cpu->set_pc(0);
117   }
118}
119
120READ8_MEMBER(cpc_transtape_device::input_r)
121{
122   // TODO
123   return 0x80;
124}
125
126WRITE8_MEMBER(cpc_transtape_device::output_w)
127{
128   // TODO
129   m_output = data;
130   m_slot->rom_select(space,0,get_rom_bank());  // trigger rethink
131}
132
133void cpc_transtape_device::set_mapping(UINT8 type)
134{
135   if(type != MAP_OTHER)
136      return;
137   map_enable();
138}
139
140
trunk/src/devices/bus/cpc/transtape.h
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Barry Rodewald
3/*
4 * transtape.c  --  Hard Micro SA Transtape
5 *
6 * Spanish hacking device
7 *
8 */
9
10#ifndef TRANSTAPE_H_
11#define TRANSTAPE_H_
12
13#include "emu.h"
14#include "cpcexp.h"
15
16class cpc_transtape_device  : public device_t,
17                  public device_cpc_expansion_card_interface
18{
19public:
20   // construction/destruction
21   cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
22
23   // optional information overrides
24   virtual const rom_entry *device_rom_region() const;
25   virtual ioport_constructor device_input_ports() const;
26   
27   virtual void set_mapping(UINT8 type);
28   virtual WRITE_LINE_MEMBER( romen_w ) { m_romen = state; }
29   
30   DECLARE_READ8_MEMBER(input_r);
31   DECLARE_WRITE8_MEMBER(output_w);
32   DECLARE_INPUT_CHANGED_MEMBER(button_red_w);
33   DECLARE_INPUT_CHANGED_MEMBER(button_black_w);
34
35protected:
36   // device-level overrides
37   virtual void device_start();
38   virtual void device_reset();
39
40private:
41   cpc_expansion_slot_device *m_slot;
42   cpu_device* m_cpu;
43   address_space* m_space;
44   UINT8* m_ram;  // 8kB internal RAM
45   bool m_rom_active;
46   bool m_romen;
47   UINT8 m_output;
48   
49   void map_enable();
50};
51
52// device type definition
53extern const device_type CPC_TRANSTAPE;
54
55#endif /* TRANSTAPE_H_ */
trunk/src/devices/bus/crvision/slot.cpp
r250291r250292
6666                  device_t(mconfig, CRVISION_CART_SLOT, "CreatiVision Cartridge Slot", tag, owner, clock, "crvision_cart_slot", __FILE__),
6767                  device_image_interface(mconfig, *this),
6868                  device_slot_interface(mconfig, *this),
69                  m_type(CRV_4K)
69                  m_type(CRV_4K), m_cart(nullptr)
7070{
7171}
7272
trunk/src/devices/bus/dmv/dmvbus.cpp
r250291r250292
201201      m_prog_write_cb(*this),
202202      m_out_int_cb(*this),
203203      m_out_irq_cb(*this),
204      m_out_thold_cb(*this)
204      m_out_thold_cb(*this), m_cart(nullptr)
205205{
206206}
207207
trunk/src/devices/bus/dmv/k210.cpp
r250291r250292
5757      m_ppi(*this, "ppi8255"),
5858      m_centronics(*this, "centronics"),
5959      m_cent_data_in(*this, "cent_data_in"),
60      m_cent_data_out(*this, "cent_data_out")
61{
60      m_cent_data_out(*this, "cent_data_out"), m_bus(nullptr), m_clk1_timer(nullptr), m_portb(0), m_portc(0)
61   {
6262}
6363
6464//-------------------------------------------------
trunk/src/devices/bus/dmv/k220.cpp
r250291r250292
138138      m_pit(*this, "pit8253"),
139139      m_ppi(*this, "ppi8255"),
140140      m_ram(*this, "ram"),
141      m_rom(*this, "rom")
142{
141      m_rom(*this, "rom"), m_portc(0)
142   {
143143}
144144
145145//-------------------------------------------------
trunk/src/devices/bus/dmv/k230.cpp
r250291r250292
110110      : device_t(mconfig, DMV_K230, "K230 8088 without interrupt controller", tag, owner, clock, "dmv_k230", __FILE__),
111111      device_dmvslot_interface( mconfig, *this ),
112112      m_maincpu(*this, "maincpu"),
113      m_rom(*this, "rom")
114{
113      m_rom(*this, "rom"), m_bus(nullptr), m_io(nullptr), m_switch16(0), m_hold(0)
114   {
115115}
116116
117117dmv_k230_device::dmv_k230_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
118118      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
119119      device_dmvslot_interface( mconfig, *this ),
120120      m_maincpu(*this, "maincpu"),
121      m_rom(*this, "rom")
122{
121      m_rom(*this, "rom"), m_bus(nullptr), m_io(nullptr), m_switch16(0), m_hold(0)
122   {
123123}
124124
125125//-------------------------------------------------
r250291r250292
136136//-------------------------------------------------
137137
138138dmv_k234_device::dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
139      : dmv_k230_device(mconfig, DMV_K234, "K234 68008", tag, owner, clock, "dmv_k234", __FILE__)
140{
139      : dmv_k230_device(mconfig, DMV_K234, "K234 68008", tag, owner, clock, "dmv_k234", __FILE__), m_snr(0)
140   {
141141}
142142
143143//-------------------------------------------------
r250291r250292
220220
221221const rom_entry *dmv_k234_device::device_rom_region() const
222222{
223   return NULL;
223   return nullptr;
224224}
225225
226226const rom_entry *dmv_k235_device::device_rom_region() const
trunk/src/devices/bus/dmv/k233.cpp
r250291r250292
3030
3131dmv_k233_device::dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3232      : device_t(mconfig, DMV_K233, "K233 16K Shared RAM", tag, owner, clock, "dmv_k233", __FILE__),
33      device_dmvslot_interface( mconfig, *this )
34{
33      device_dmvslot_interface( mconfig, *this ),
34   m_enabled(false),
35   m_ram(nullptr)
36   {
3537}
3638
3739//-------------------------------------------------
trunk/src/devices/bus/dmv/k801.cpp
r250291r250292
115115      : device_t(mconfig, DMV_K801, "K801 RS-232 Switchable Interface", tag, owner, clock, "dmv_k801", __FILE__),
116116      device_dmvslot_interface( mconfig, *this ),
117117      m_epci(*this, "epci"),
118      m_dsw(*this, "DSW")
119{
118      m_dsw(*this, "DSW"), m_bus(nullptr)
119   {
120120}
121121
122122dmv_k801_device::dmv_k801_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
123123      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
124124      device_dmvslot_interface( mconfig, *this ),
125125      m_epci(*this, "epci"),
126      m_dsw(*this, "DSW")
127{
126      m_dsw(*this, "DSW"), m_bus(nullptr)
127   {
128128}
129129
130130//-------------------------------------------------
trunk/src/devices/bus/dmv/k803.cpp
r250291r250292
5353      : device_t(mconfig, DMV_K803, "K803 RTC", tag, owner, clock, "dmv_k803", __FILE__),
5454      device_dmvslot_interface( mconfig, *this ),
5555      m_rtc(*this, "rtc"),
56      m_dsw(*this, "DSW")
57{
56      m_dsw(*this, "DSW"), m_bus(nullptr), m_latch(0), m_rtc_int(0)
57   {
5858}
5959
6060//-------------------------------------------------
trunk/src/devices/bus/dmv/k806.cpp
r250291r250292
8282      m_jumpers(*this, "JUMPERS"),
8383      m_mouse_buttons(*this, "MOUSE"),
8484      m_mouse_x(*this, "MOUSEX"),
85      m_mouse_y(*this, "MOUSEY")
86{
85      m_mouse_y(*this, "MOUSEY"), m_bus(nullptr)
86   {
8787}
8888
8989//-------------------------------------------------
trunk/src/devices/bus/dmv/ram.cpp
r250291r250292
3434
3535dmv_ram_device::dmv_ram_device(const machine_config &mconfig, device_type type, UINT32 size, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
3636      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
37      device_dmvslot_interface( mconfig, *this ),
37      device_dmvslot_interface( mconfig, *this ), m_ram(nullptr),
3838      m_size(size)
3939{
4040}
trunk/src/devices/bus/ecbbus/ecbbus.cpp
r250291r250292
2828
2929ecbbus_slot_device::ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030      device_t(mconfig, ECBBUS_SLOT, "ECB bus slot", tag, owner, clock, "ecbbus_slot", __FILE__),
31      device_slot_interface(mconfig, *this)
31      device_slot_interface(mconfig, *this), m_bus_tag(nullptr), m_bus_num(0), m_bus(nullptr)
3232{
3333}
3434
trunk/src/devices/bus/ecbbus/grip.cpp
r250291r250292
625625   m_video_ram(*this, "video_ram"),
626626   m_j3a(*this, "J3A"),
627627   m_j3b(*this, "J3B"),
628   m_j7(*this, "J7")
628   m_j7(*this, "J7"), m_centronics_busy(0), m_centronics_fault(0), m_vol0(0), m_vol1(0), m_ia(0), m_ib(0), m_keydata(0), m_kbf(0), m_lps(0), m_page(0), m_flash(0), m_base(0), m_ppi_pa(0), m_ppi_pc(0), m_kb_timer(nullptr)
629629{
630630}
631631
trunk/src/devices/bus/econet/e01.cpp
r250291r250292
396396      m_fdc_irq(CLEAR_LINE),
397397      m_fdc_drq(CLEAR_LINE),
398398      m_adlc_irq(CLEAR_LINE),
399      m_clk_en(0),
400      m_variant(TYPE_E01)
399      m_clk_en(0), m_ram_en(false),
400      m_variant(TYPE_E01), m_clk_timer(nullptr)
401401{
402402}
403403
r250291r250292
426426      m_fdc_irq(CLEAR_LINE),
427427      m_fdc_drq(CLEAR_LINE),
428428      m_adlc_irq(CLEAR_LINE),
429      m_clk_en(0),
430      m_variant(TYPE_E01)
429      m_clk_en(0), m_ram_en(false),
430      m_variant(TYPE_E01), m_clk_timer(nullptr)
431431{
432432}
433433
trunk/src/devices/bus/econet/econet.cpp
r250291r250292
3939//-------------------------------------------------
4040
4141device_econet_interface::device_econet_interface(const machine_config &mconfig, device_t &device) :
42   device_slot_card_interface(mconfig, device)
42   device_slot_card_interface(mconfig, device), m_next(nullptr), m_econet(nullptr), m_address(0)
4343{
4444}
4545
r250291r250292
5555
5656econet_slot_device::econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5757   device_t(mconfig, ECONET_SLOT, "Econet station", tag, owner, clock, "econet_slot", __FILE__),
58   device_slot_interface(mconfig, *this)
58   device_slot_interface(mconfig, *this), m_address(0), m_econet(nullptr)
5959{
6060}
6161
trunk/src/devices/bus/ep64/exp.cpp
r250291r250292
4848   m_write_irq(*this),
4949   m_write_nmi(*this),
5050   m_write_wait(*this),
51   m_dave(*this)
51   m_dave(*this), m_card(nullptr)
5252{
5353}
5454
trunk/src/devices/bus/epson_sio/epson_sio.cpp
r250291r250292
5454
5555epson_sio_device::epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5656      device_t(mconfig, EPSON_SIO, "EPSON SIO port", tag, owner, clock, "epson_sio", __FILE__),
57      device_slot_interface(mconfig, *this),
57      device_slot_interface(mconfig, *this), m_cart(nullptr),
5858      m_write_rx(*this),
5959      m_write_pin(*this)
6060{
trunk/src/devices/bus/epson_sio/pf10.cpp
r250291r250292
9696   device_epson_sio_interface(mconfig, *this),
9797   m_cpu(*this, "maincpu"),
9898   m_fdc(*this, "upd765a"),
99   m_sio_output(*this, "sio"),
99   m_sio_output(*this, "sio"), m_floppy(nullptr), m_timer(nullptr),
100100   m_port1(0xff),
101101   m_port2(0xff),
102   m_rxc(1)
102   m_rxc(1), m_hd6303_tx(0), m_pinc(0)
103103{
104104   m_sio_input = dynamic_cast<epson_sio_device *>(owner);
105105}
trunk/src/devices/bus/epson_sio/tf20.cpp
r250291r250292
133133   m_ram(*this, "ram"),
134134   m_fdc(*this, "5a"),
135135   m_mpsc(*this, "3a"),
136   m_sio_output(*this, "sio"),
137   m_rxc(1)
136   m_sio_output(*this, "sio"), m_fd0(nullptr), m_fd1(nullptr), m_timer_serial(nullptr), m_timer_tc(nullptr),
137   m_rxc(1), m_txda(0), m_dtra(0), m_pinc(0)
138138{
139139   m_sio_input = dynamic_cast<epson_sio_device *>(owner);
140140}
trunk/src/devices/bus/gameboy/gb_slot.cpp
r250291r250292
3838
3939device_gb_cart_interface::device_gb_cart_interface(const machine_config &mconfig, device_t &device)
4040   : device_slot_card_interface(mconfig, device),
41      m_rom(NULL),
42      m_rom_size(0),
43      has_rumble(false),
44      has_timer(false),
45      has_battery(false)
41     m_rom(NULL),
42     m_rom_size(0), m_ram_bank(0), m_latch_bank(0), m_latch_bank2(0),
43     has_rumble(false),
44     has_timer(false),
45     has_battery(false)
4646{
4747}
4848
r250291r250292
142142                  device_image_interface(mconfig, *this),
143143                  device_slot_interface(mconfig, *this),
144144                  m_sgb_hack(0),
145                  m_type(GB_MBC_UNKNOWN)
145                  m_type(GB_MBC_UNKNOWN), m_cart(nullptr)
146146{
147147}
148148
trunk/src/devices/bus/gameboy/mbc.cpp
r250291r250292
3939
4040gb_rom_mbc_device::gb_rom_mbc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
4141               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
42                  device_gb_cart_interface( mconfig, *this )
43{
42                  device_gb_cart_interface( mconfig, *this ), m_ram_enable(0)
43            {
4444}
4545
4646gb_rom_mbc1_device::gb_rom_mbc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
47               : gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source),
47               : gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source), m_mode(0),
4848                  m_mask(0x1f),
4949                  m_shift(0)
5050{
5151}
5252
5353gb_rom_mbc1_device::gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
54               : gb_rom_mbc_device(mconfig, GB_ROM_MBC1, "GB MBC1 Carts", tag, owner, clock, "gb_rom_mbc1", __FILE__),
54               : gb_rom_mbc_device(mconfig, GB_ROM_MBC1, "GB MBC1 Carts", tag, owner, clock, "gb_rom_mbc1", __FILE__), m_mode(0),
5555                  m_mask(0x1f),
5656                  m_shift(0)
5757{
r250291r250292
7878}
7979
8080gb_rom_mbc6_device::gb_rom_mbc6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
81               : gb_rom_mbc_device(mconfig, GB_ROM_MBC6, "GB MBC6 Carts", tag, owner, clock, "gb_rom_mbc6", __FILE__)
82{
81               : gb_rom_mbc_device(mconfig, GB_ROM_MBC6, "GB MBC6 Carts", tag, owner, clock, "gb_rom_mbc6", __FILE__), m_latch1(0), m_latch2(0), m_bank_4000(0), m_bank_6000(0)
82            {
8383}
8484
8585gb_rom_mbc7_device::gb_rom_mbc7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
8888}
8989
9090gb_rom_m161_device::gb_rom_m161_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
91               : gb_rom_mbc_device(mconfig, GB_ROM_M161_M12, "GB M161-M12 Carts", tag, owner, clock, "gb_rom_m161m12", __FILE__)
92{
91               : gb_rom_mbc_device(mconfig, GB_ROM_M161_M12, "GB M161-M12 Carts", tag, owner, clock, "gb_rom_m161m12", __FILE__), m_base_bank(0)
92            {
9393}
9494
9595gb_rom_mmm01_device::gb_rom_mmm01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
96               : gb_rom_mbc_device(mconfig, GB_ROM_MMM01, "GB MMM01 Carts", tag, owner, clock, "gb_rom_mmm01", __FILE__)
97{
96               : gb_rom_mbc_device(mconfig, GB_ROM_MMM01, "GB MMM01 Carts", tag, owner, clock, "gb_rom_mmm01", __FILE__), m_bank_mask(0), m_bank(0), m_reg(0)
97            {
9898}
9999
100100gb_rom_sachen_mmc1_device::gb_rom_sachen_mmc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
101               : gb_rom_mbc_device(mconfig, GB_ROM_SACHEN1, "GB Sachen MMC1 Carts", tag, owner, clock, "gb_rom_sachen1", __FILE__)
102{
101               : gb_rom_mbc_device(mconfig, GB_ROM_SACHEN1, "GB Sachen MMC1 Carts", tag, owner, clock, "gb_rom_sachen1", __FILE__), m_base_bank(0), m_mask(0), m_mode(0), m_unlock_cnt(0)
102            {
103103}
104104
105105gb_rom_sachen_mmc1_device::gb_rom_sachen_mmc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
106               : gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source)
107{
106               : gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source), m_base_bank(0), m_mask(0), m_mode(0), m_unlock_cnt(0)
107            {
108108}
109109
110110gb_rom_sachen_mmc2_device::gb_rom_sachen_mmc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
113113}
114114
115115gb_rom_188in1_device::gb_rom_188in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
116               : gb_rom_mbc1_device(mconfig, GB_ROM_188IN1, "GB 188in1", tag, owner, clock, "gb_rom_188in1", __FILE__)
117{
116               : gb_rom_mbc1_device(mconfig, GB_ROM_188IN1, "GB 188in1", tag, owner, clock, "gb_rom_188in1", __FILE__), m_game_base(0)
117            {
118118}
119119
120120gb_rom_sintax_device::gb_rom_sintax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
121               : gb_rom_mbc_device(mconfig, GB_ROM_SINTAX, "GB MBC5 Sintax Carts", tag, owner, clock, "gb_rom_sintax", __FILE__)
122{
121               : gb_rom_mbc_device(mconfig, GB_ROM_SINTAX, "GB MBC5 Sintax Carts", tag, owner, clock, "gb_rom_sintax", __FILE__), m_bank_mask(0), m_bank(0), m_reg(0), m_currentxor(0), m_xor2(0), m_xor3(0), m_xor4(0), m_xor5(0), m_sintax_mode(0)
122            {
123123}
124124
125125gb_rom_chongwu_device::gb_rom_chongwu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
126               : gb_rom_mbc5_device(mconfig, GB_ROM_CHONGWU, "GB Chong Wu Xiao Jing Ling", tag, owner, clock, "gb_rom_chongwu", __FILE__)
127{
126               : gb_rom_mbc5_device(mconfig, GB_ROM_CHONGWU, "GB Chong Wu Xiao Jing Ling", tag, owner, clock, "gb_rom_chongwu", __FILE__), m_protection_checked(0)
127            {
128128}
129129
130130gb_rom_licheng_device::gb_rom_licheng_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
138138}
139139
140140gb_rom_rockman8_device::gb_rom_rockman8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
141               : gb_rom_mbc_device(mconfig, GB_ROM_ROCKMAN8, "GB MBC1 Rockman 8", tag, owner, clock, "gb_rom_rockman8", __FILE__)
142{
141               : gb_rom_mbc_device(mconfig, GB_ROM_ROCKMAN8, "GB MBC1 Rockman 8", tag, owner, clock, "gb_rom_rockman8", __FILE__), m_bank_mask(0), m_bank(0), m_reg(0)
142            {
143143}
144144
145145gb_rom_sm3sp_device::gb_rom_sm3sp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
146               : gb_rom_mbc_device(mconfig, GB_ROM_SM3SP, "GB MBC1 Super Mario 3 Special", tag, owner, clock, "gb_rom_sm3sp", __FILE__)
147{
146               : gb_rom_mbc_device(mconfig, GB_ROM_SM3SP, "GB MBC1 Super Mario 3 Special", tag, owner, clock, "gb_rom_sm3sp", __FILE__), m_bank_mask(0), m_bank(0), m_reg(0), m_mode(0)
147            {
148148}
149149
150150
trunk/src/devices/bus/gameboy/rom.cpp
r250291r250292
4242}
4343
4444gb_rom_tama5_device::gb_rom_tama5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
45               : gb_rom_device(mconfig, GB_ROM_TAMA5, "GB Tamagotchi", tag, owner, clock, "gb_rom_tama5", __FILE__)
46{
45               : gb_rom_device(mconfig, GB_ROM_TAMA5, "GB Tamagotchi", tag, owner, clock, "gb_rom_tama5", __FILE__), m_tama5_data(0), m_tama5_addr(0), m_tama5_cmd(0), m_rtc_reg(0)
46            {
4747}
4848
4949gb_rom_wisdom_device::gb_rom_wisdom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/gamegear/ggext.cpp
r250291r250292
5656
5757gg_ext_port_device::gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5858                  device_t(mconfig, GG_EXT_PORT, "EXT Port", tag, owner, clock, "gg_ext_port", __FILE__),
59                  device_slot_interface(mconfig, *this),
59                  device_slot_interface(mconfig, *this), m_device(nullptr),
6060                  m_th_pin_handler(*this),
6161                  m_pixel_handler(*this)
6262{
trunk/src/devices/bus/gba/gba_slot.cpp
r250291r250292
7878                  device_t(mconfig, GBA_CART_SLOT, "Game Boy Advance Cartridge Slot", tag, owner, clock, "gba_cart_slot", __FILE__),
7979                  device_image_interface(mconfig, *this),
8080                  device_slot_interface(mconfig, *this),
81                  m_type(GBA_STD)
81                  m_type(GBA_STD), m_cart(nullptr)
8282{
8383}
8484
trunk/src/devices/bus/gba/rom.cpp
r250291r250292
5757}
5858
5959gba_rom_flash_device::gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
60               : gba_rom_device(mconfig, GBA_ROM_FLASH, "GBA Carts + Panasonic Flash", tag, owner, clock, "gba_flash", __FILE__),
60               : gba_rom_device(mconfig, GBA_ROM_FLASH, "GBA Carts + Panasonic Flash", tag, owner, clock, "gba_flash", __FILE__), m_flash_mask(0),
6161                  m_flash(*this, "flash")
6262{
6363}
6464
6565gba_rom_flash1m_device::gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66               : gba_rom_device(mconfig, GBA_ROM_FLASH1M, "GBA Carts + Sanyo Flash", tag, owner, clock, "gba_flash1m", __FILE__),
66               : gba_rom_device(mconfig, GBA_ROM_FLASH1M, "GBA Carts + Sanyo Flash", tag, owner, clock, "gba_flash1m", __FILE__), m_flash_mask(0),
6767                  m_flash(*this, "flash")
6868{
6969}
trunk/src/devices/bus/generic/slot.cpp
r250291r250292
9292                  m_extensions("bin"),
9393                  m_must_be_loaded(FALSE),
9494                  m_width(GENERIC_ROM8_WIDTH),
95                  m_endianness(ENDIANNESS_LITTLE)
95                  m_endianness(ENDIANNESS_LITTLE), m_cart(nullptr)
9696{
9797}
9898
trunk/src/devices/bus/ieee488/c2031.cpp
r250291r250292
408408      m_address(*this, "ADDRESS"),
409409      m_nrfd_out(1),
410410      m_ndac_out(1),
411      m_atna(1),
411      m_atna(1), m_ifc(0),
412412      m_via0_irq(0),
413413      m_via1_irq(0)
414414{
trunk/src/devices/bus/ieee488/c2040.cpp
r250291r250292
690690   m_address(*this, "ADDRESS"),
691691   m_rfdo(1),
692692   m_daco(1),
693   m_atna(1)
693   m_atna(1), m_ifc(0)
694694{
695695}
696696
r250291r250292
710710   m_address(*this, "ADDRESS"),
711711   m_rfdo(1),
712712   m_daco(1),
713   m_atna(1)
713   m_atna(1), m_ifc(0)
714714{
715715}
716716
trunk/src/devices/bus/ieee488/c2040fdc.cpp
r250291r250292
8686   m_ds1(0),
8787   m_drv_sel(0),
8888   m_mode_sel(0),
89   m_rw_sel(0),
90   m_period(attotime::from_hz(clock))
89   m_rw_sel(0), m_odd_hd(0), m_pi(0),
90   m_period(attotime::from_hz(clock)), t_gen(nullptr)
9191{
9292   cur_live.tm = attotime::never;
9393   cur_live.state = IDLE;
trunk/src/devices/bus/ieee488/c8050.cpp
r250291r250292
832832   m_address(*this, "ADDRESS"),
833833   m_rfdo(1),
834834   m_daco(1),
835   m_atna(1)
835   m_atna(1), m_ifc(0)
836836{
837837}
838838
r250291r250292
851851   m_address(*this, "ADDRESS"),
852852   m_rfdo(1),
853853   m_daco(1),
854   m_atna(1)
854   m_atna(1), m_ifc(0)
855855{
856856}
857857
trunk/src/devices/bus/ieee488/c8050fdc.cpp
r250291r250292
8989   m_ds1(0),
9090   m_drv_sel(0),
9191   m_mode_sel(0),
92   m_rw_sel(1)
92   m_rw_sel(1), m_odd_hd(0), m_pi(0), t_gen(nullptr)
9393{
9494   cur_live.tm = attotime::never;
9595   cur_live.state = IDLE;
trunk/src/devices/bus/ieee488/c8280.cpp
r250291r250292
392392   m_fdc(*this, WD1797_TAG),
393393   m_floppy0(*this, WD1797_TAG ":0"),
394394   m_floppy1(*this, WD1797_TAG ":1"),
395   m_address(*this, "ADDRESS"),
395   m_address(*this, "ADDRESS"), m_floppy(nullptr),
396396   m_rfdo(1),
397397   m_daco(1),
398   m_atna(1)
398   m_atna(1), m_ifc(0), m_fk5(0)
399399{
400400}
401401
trunk/src/devices/bus/ieee488/d9060.cpp
r250291r250292
496496      m_address(*this, "ADDRESS"),
497497      m_rfdo(1),
498498      m_daco(1),
499      m_atna(1),
500      m_enable(0),
499      m_atna(1), m_ifc(0),
500      m_enable(0), m_data(0),
501501      m_variant(variant)
502502{
503503}
trunk/src/devices/bus/ieee488/hardbox.cpp
r250291r250292
350350   : device_t(mconfig, HARDBOX, "HardBox", tag, owner, clock, "hardbox", __FILE__),
351351      device_ieee488_interface(mconfig, *this),
352352      m_maincpu(*this, Z80_TAG),
353      m_hdc(*this, CORVUS_HDC_TAG)
353      m_hdc(*this, CORVUS_HDC_TAG), m_ifc(0)
354354{
355355}
356356
trunk/src/devices/bus/ieee488/ieee488.cpp
r250291r250292
4040//-------------------------------------------------
4141
4242device_ieee488_interface::device_ieee488_interface(const machine_config &mconfig, device_t &device)
43   : device_slot_card_interface(mconfig, device)
43   : device_slot_card_interface(mconfig, device), m_next(nullptr), m_bus(nullptr), m_slot(nullptr)
4444{
4545}
4646
r250291r250292
6565
6666ieee488_slot_device::ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6767      device_t(mconfig, IEEE488_SLOT, "IEEE-488 slot", tag, owner, clock, "ieee488_slot", __FILE__),
68      device_slot_interface(mconfig, *this)
68      device_slot_interface(mconfig, *this), m_address(0)
6969{
7070}
7171
trunk/src/devices/bus/ieee488/softbox.cpp
r250291r250292
331331      device_ieee488_interface(mconfig, *this),
332332      m_maincpu(*this, Z80_TAG),
333333      m_dbrg(*this, COM8116_TAG),
334      m_hdc(*this, CORVUS_HDC_TAG)
334      m_hdc(*this, CORVUS_HDC_TAG), m_ifc(0)
335335{
336336}
337337
trunk/src/devices/bus/imi7000/imi7000.cpp
r250291r250292
3636//-------------------------------------------------
3737
3838device_imi7000_interface::device_imi7000_interface(const machine_config &mconfig, device_t &device)
39   : device_slot_card_interface(mconfig, device)
39   : device_slot_card_interface(mconfig, device), m_slot(nullptr)
4040{
4141}
4242
r250291r250292
5252
5353imi7000_slot_device::imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5454      device_t(mconfig, IMI7000_SLOT, "IMI 7000 slot", tag, owner, clock, "imi7000_slot", __FILE__),
55      device_slot_interface(mconfig, *this)
55      device_slot_interface(mconfig, *this), m_card(nullptr)
5656{
5757}
5858
trunk/src/devices/bus/intv/slot.cpp
r250291r250292
148148                  device_t(mconfig, INTV_CART_SLOT, "Intellivision Cartridge Slot", tag, owner, clock, "intv_cart_slot", __FILE__),
149149                  device_image_interface(mconfig, *this),
150150                  device_slot_interface(mconfig, *this),
151                  m_type(INTV_STD)
151                  m_type(INTV_STD), m_cart(nullptr)
152152{
153153}
154154
trunk/src/devices/bus/iq151/disc2.cpp
r250291r250292
5151iq151_disc2_device::iq151_disc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5252      : device_t(mconfig, IQ151_DISC2, "IQ151 Disc2", tag, owner, clock, "iq151_disc2", __FILE__),
5353      device_iq151cart_interface( mconfig, *this ),
54      m_fdc(*this, "fdc")
55{
54      m_fdc(*this, "fdc"), m_rom(nullptr), m_rom_enabled(false)
55   {
5656}
5757
5858//-------------------------------------------------
trunk/src/devices/bus/iq151/grafik.cpp
r250291r250292
4040iq151_grafik_device::iq151_grafik_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4141      : device_t(mconfig, IQ151_GRAFIK, "IQ151 grafik", tag, owner, clock, "iq151_grafik", __FILE__),
4242      device_iq151cart_interface( mconfig, *this ),
43      m_ppi8255(*this, "ppi8255")
44{
43      m_ppi8255(*this, "ppi8255"), m_posx(0), m_posy(0), m_all(0), m_pen(0), m_fast(0), m_ev(0), m_ex(0), m_sel(0)
44   {
4545}
4646
4747//-------------------------------------------------
trunk/src/devices/bus/iq151/iq151.cpp
r250291r250292
6262      m_out_irq2_cb(*this),
6363      m_out_irq3_cb(*this),
6464      m_out_irq4_cb(*this),
65      m_out_drq_cb(*this)
65      m_out_drq_cb(*this), m_cart(nullptr)
6666{
6767}
6868
trunk/src/devices/bus/iq151/minigraf.cpp
r250291r250292
4949
5050iq151_minigraf_device::iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5151      : device_t(mconfig, IQ151_MINIGRAF, "IQ151 Minigraf", tag, owner, clock, "iq151_minigraf", __FILE__),
52      device_iq151cart_interface( mconfig, *this )
53{
52      device_iq151cart_interface( mconfig, *this ), m_rom(nullptr), m_posx(0), m_posy(0), m_pen(0), m_control(0), m_paper(nullptr)
53   {
5454}
5555
5656//-------------------------------------------------
trunk/src/devices/bus/iq151/ms151a.cpp
r250291r250292
4848
4949iq151_ms151a_device::iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5050      : device_t(mconfig, IQ151_MS151A, "IQ151 MS151A", tag, owner, clock, "iq151_ms151a", __FILE__),
51      device_iq151cart_interface( mconfig, *this )
52{
51      device_iq151cart_interface( mconfig, *this ), m_rom(nullptr), m_posx(0), m_posy(0), m_pen(0), m_paper(nullptr)
52   {
5353}
5454
5555//-------------------------------------------------
trunk/src/devices/bus/iq151/rom.cpp
r250291r250292
4343
4444iq151_rom_device::iq151_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
4545      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
46      device_iq151cart_interface(mconfig, *this)
46      device_iq151cart_interface(mconfig, *this), m_rom(nullptr)
4747{
4848}
4949
trunk/src/devices/bus/iq151/staper.cpp
r250291r250292
4848      : device_t(mconfig, IQ151_STAPER, "IQ151 STAPER", tag, owner, clock, "iq151_staper", __FILE__),
4949      device_iq151cart_interface( mconfig, *this ),
5050      m_ppi(*this, "ppi8255"),
51      m_printer(*this, "printer")
52{
51      m_printer(*this, "printer"), m_printer_timer(nullptr), m_ppi_portc(0)
52   {
5353}
5454
5555//-------------------------------------------------
trunk/src/devices/bus/iq151/video32.cpp
r250291r250292
5959
6060iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6161      : device_t(mconfig, IQ151_VIDEO32, "IQ151 video32", tag, owner, clock, "iq151_video32", __FILE__),
62      device_iq151cart_interface( mconfig, *this ),
62      device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
6363      m_gfxdecode(*this, "gfxdecode"),
6464      m_palette(*this, "^^palette")
6565{
trunk/src/devices/bus/iq151/video64.cpp
r250291r250292
5959
6060iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6161      : device_t(mconfig, IQ151_VIDEO64, "IQ151 video64", tag, owner, clock, "iq151_video64", __FILE__),
62      device_iq151cart_interface( mconfig, *this ),
62      device_iq151cart_interface( mconfig, *this ), m_videoram(nullptr), m_chargen(nullptr),
6363      m_gfxdecode(*this, "gfxdecode"),
6464      m_palette(*this, "^^palette")
6565{
trunk/src/devices/bus/isa/3c503.cpp
r250291r250292
1818   return MACHINE_CONFIG_NAME(el2_3c503_config);
1919}
2020
21el2_3c503_device::el2_3c503_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
22      : device_t(mconfig, EL2_3C503, "3C503 Network Adapter", tag, owner, clock, "el2_3c503", __FILE__),
23      device_isa8_card_interface(mconfig, *this),
24      m_dp8390(*this, "dp8390d") {
21el2_3c503_device::el2_3c503_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock)
22   : device_t(mconfig, EL2_3C503, "3C503 Network Adapter", tag, owner, clock, "el2_3c503", __FILE__),
23     device_isa8_card_interface(mconfig, *this),
24     m_dp8390(*this, "dp8390d"),
25     m_irq_state(0)
26{
2527}
2628
2729void el2_3c503_device::device_start() {
trunk/src/devices/bus/isa/3c505.cpp
r250291r250292
309309   device_isa16_card_interface(mconfig, *this),
310310   m_iobase(*this, "IO_BASE"),
311311   m_irqdrq(*this, "IRQ_DRQ"),
312   m_romopts(*this, "ROM_OPTS")
312   m_romopts(*this, "ROM_OPTS"), m_status(0), m_control(0), m_command_index(0), m_command_pending(0), m_wait_for_ack(0), m_wait_for_nak(0), m_rx_data_index(0), m_rx_pending(0), m_tx_data_length(0), m_program_length(0), m_response_length(0), m_response_index(0), m_microcode_version(0), m_microcode_running(0), m_i82586_config(0), irq_state(), m_do_command_timer(nullptr), m_installed(false), m_irq(0), m_drq(0)
313313{
314314}
315315
r250291r250292
319319   device_isa16_card_interface(mconfig, *this),
320320   m_iobase(*this, "IO_BASE"),
321321   m_irqdrq(*this, "IRQ_DRQ"),
322   m_romopts(*this, "ROM_OPTS")
322   m_romopts(*this, "ROM_OPTS"), m_status(0), m_control(0), m_command_index(0), m_command_pending(0), m_wait_for_ack(0), m_wait_for_nak(0), m_rx_data_index(0), m_rx_pending(0), m_tx_data_length(0), m_program_length(0), m_response_length(0), m_response_index(0), m_microcode_version(0), m_microcode_running(0), m_i82586_config(0), irq_state(), m_do_command_timer(nullptr), m_installed(false), m_irq(0), m_drq(0)
323323{
324324}
325325
r250291r250292
447447//**************************************************************************
448448
449449threecom3c505_device::data_buffer::data_buffer() :
450   m_device(NULL)
450   m_device(nullptr), m_length(0)
451451{
452452}
453453
r250291r250292
508508//**************************************************************************
509509
510510threecom3c505_device::data_buffer_fifo::data_buffer_fifo() :
511   m_device(NULL),
512   m_size(0)
511   m_device(nullptr),
512   m_size(0), m_count(0), m_get_index(0), m_put_index(0)
513513{
514514}
515515
trunk/src/devices/bus/isa/aga.cpp
r250291r250292
6262      m_palette(*this, "palette"),
6363      m_mc6845(*this, AGA_MC6845_NAME),
6464      m_cga_config(*this, "cga_config"),
65      m_update_row_type(-1),
65      m_update_row_type(-1),
66      m_mode(),
6667      m_mda_mode_control(0),
67      m_mda_status(0),
68      m_mda_status(0),
69      m_mda_chr_gen(nullptr),
6870      m_cga_mode_control(0),
6971      m_cga_color_select(0),
70      m_cga_status(0),
72      m_cga_status(0),
73      m_cga_chr_gen(nullptr),
7174      m_framecnt(0),
7275      m_vsync(0),
73      m_hsync(0)
76      m_hsync(0),
77      m_videoram(nullptr)
7478{
7579}
7680
r250291r250292
8084      m_palette(*this, "palette"),
8185      m_mc6845(*this, AGA_MC6845_NAME),
8286      m_cga_config(*this, "cga_config"),
83      m_update_row_type(-1),
87      m_update_row_type(-1), m_mode(),
8488      m_mda_mode_control(0),
85      m_mda_status(0),
89      m_mda_status(0), m_mda_chr_gen(nullptr),
8690      m_cga_mode_control(0),
8791      m_cga_color_select(0),
88      m_cga_status(0),
92      m_cga_status(0), m_cga_chr_gen(nullptr),
8993      m_framecnt(0),
9094      m_vsync(0),
91      m_hsync(0)
95      m_hsync(0), m_videoram(nullptr)
9296{
9397}
9498//-------------------------------------------------
trunk/src/devices/bus/isa/cga.cpp
r250291r250292
301301isa8_cga_device::isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
302302      device_t(mconfig, ISA8_CGA, "IBM Color/Graphics Monitor Adapter", tag, owner, clock, "cga", __FILE__),
303303      device_isa8_card_interface(mconfig, *this),
304      m_cga_config(*this, "cga_config"),
305      m_update_row_type(-1),
306      m_vram_size( 0x4000 ),
304      m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0),
305      m_update_row_type(-1), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0),
306      m_vram_size( 0x4000 ), m_plantronics(0),
307307      m_palette(*this, "palette")
308308{
309309   m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800;
r250291r250292
316316isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
317317      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
318318      device_isa8_card_interface(mconfig, *this),
319      m_cga_config(*this, "cga_config"),
320      m_update_row_type(-1),
321      m_vram_size( 0x4000 ),
319      m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0),
320      m_update_row_type(-1), m_chr_gen_base(nullptr), m_chr_gen(nullptr), m_vsync(0), m_hsync(0),
321      m_vram_size( 0x4000 ), m_plantronics(0),
322322      m_palette(*this, "palette")
323323{
324324   m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800;
r250291r250292
15231523//-------------------------------------------------
15241524
15251525isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1526      isa8_cga_device( mconfig, ISA8_CGA_PC1512, "ISA8_CGA_PC1512", tag, owner, clock, "cga_pc1512", __FILE__)
1526      isa8_cga_device( mconfig, ISA8_CGA_PC1512, "ISA8_CGA_PC1512", tag, owner, clock, "cga_pc1512", __FILE__), m_write(0), m_read(0), m_mc6845_address(0)
15271527{
15281528   m_vram_size = 0x10000;
15291529   m_chr_gen_offset[0] = 0x0000;
r250291r250292
16521652//-------------------------------------------------
16531653
16541654isa8_wyse700_device::isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1655      isa8_cga_device( mconfig, ISA8_WYSE700, "Wyse 700", tag, owner, clock, "wyse700", __FILE__)
1655      isa8_cga_device( mconfig, ISA8_WYSE700, "Wyse 700", tag, owner, clock, "wyse700", __FILE__), m_bank_offset(0), m_bank_base(0), m_control(0)
16561656{
16571657   m_vram_size = 0x20000;
16581658   m_start_offset = 0x18000;
r250291r250292
17401740//-------------------------------------------------
17411741
17421742isa8_ec1841_0002_device::isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1743      isa8_cga_device( mconfig, ISA8_EC1841_0002, "EC 1841.0002 (CGA)", tag, owner, clock, "ec1841_0002", __FILE__)
1743      isa8_cga_device( mconfig, ISA8_EC1841_0002, "EC 1841.0002 (CGA)", tag, owner, clock, "ec1841_0002", __FILE__), m_p3df(0)
17441744{
17451745}
17461746
r250291r250292
18941894const device_type ISA8_CGA_M24 = &device_creator<isa8_cga_m24_device>;
18951895
18961896isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1897      isa8_cga_device( mconfig, ISA8_CGA_M24, "Olivetti M24 CGA", tag, owner, clock, "cga_m24", __FILE__)
1897      isa8_cga_device( mconfig, ISA8_CGA_M24, "Olivetti M24 CGA", tag, owner, clock, "cga_m24", __FILE__), m_mode2(0), m_index(0)
18981898{
18991899   m_vram_size = 0x8000;
19001900}
trunk/src/devices/bus/isa/dectalk.cpp
r250291r250292
66
77dectalk_isa_device::dectalk_isa_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
88   device_t(mconfig, ISA8_DECTALK, "DECTalk-PC", tag, owner, clock, "dectalk_isa", __FILE__),
9   device_isa8_card_interface(mconfig, *this),
9   device_isa8_card_interface(mconfig, *this),
10   m_cmd(0),
11   m_stat(0),
12   m_data(0),
13   m_dsp_dma(0),
14   m_ctl(0),
15   m_dma(0),
16   m_vol(0),
17   m_bio(0),
1018   m_cpu(*this, "dectalk_cpu"),
1119   m_dac(*this, "dac"),
1220   m_dsp(*this, "dectalk_dsp")
trunk/src/devices/bus/isa/ega.cpp
r250291r250292
572572
573573isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
574574      device_t(mconfig, ISA8_EGA, "IBM Enhanced Graphics Adapter", tag, owner, clock, "ega", __FILE__),
575      device_isa8_card_interface(mconfig, *this),
576      m_misc_output(0),
575      device_isa8_card_interface(mconfig, *this), m_crtc_ega(nullptr), m_vram(nullptr), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr),
576      m_misc_output(0), m_feature_control(0), m_frame_cnt(0), m_hsync(0), m_vsync(0), m_vblank(0), m_display_enable(0), m_video_mode(0),
577577      m_palette(*this, "palette")
578578{
579579}
580580
581581isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
582582      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
583      device_isa8_card_interface(mconfig, *this),
584      m_misc_output(0),
583      device_isa8_card_interface(mconfig, *this), m_crtc_ega(nullptr), m_vram(nullptr), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr),
584      m_misc_output(0), m_feature_control(0), m_frame_cnt(0), m_hsync(0), m_vsync(0), m_vblank(0), m_display_enable(0), m_video_mode(0),
585585      m_palette(*this, "palette")
586586{
587587}
trunk/src/devices/bus/isa/finalchs.cpp
r250291r250292
9191
9292isa8_finalchs_device::isa8_finalchs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
9393      : device_t(mconfig, ISA8_FINALCHS, "Final Chess Card", tag, owner, clock, "finalchs", __FILE__),
94      device_isa8_card_interface( mconfig, *this )
95{
94      device_isa8_card_interface( mconfig, *this ), m_FCH_latch_data(0)
95   {
9696}
9797
9898//-------------------------------------------------
trunk/src/devices/bus/isa/gus.cpp
r250291r250292
352352
353353gf1_device::gf1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
354354   acia6850_device(mconfig, GGF1, "Gravis GF1", tag, owner, clock, "gf1", __FILE__),
355   device_sound_interface( mconfig, *this ),
355   device_sound_interface( mconfig, *this ), m_dma_dram_ctrl(0), m_dma_start_addr(0), m_dram_addr(0), m_timer_ctrl(0), m_timer1_count(0), m_timer2_count(0), m_timer1_value(0), m_timer2_value(0), m_sampling_freq(0), m_sampling_ctrl(0), m_joy_trim_dac(0), m_reset(0), m_active_voices(0), m_irq_source(0), m_stream(nullptr), m_timer1(nullptr), m_timer2(nullptr), m_dmatimer(nullptr), m_voltimer(nullptr), m_current_voice(0), m_current_reg(0), m_adlib_cmd(0), m_mix_ctrl(0), m_gf1_irq(0), m_midi_irq(0), m_dma_channel1(0), m_dma_channel2(0), m_irq_combine(0), m_dma_combine(0), m_adlib_timer_cmd(0), m_adlib_timer1_enable(0), m_adlib_timer2_enable(0), m_adlib_status(0), m_adlib_data(0), m_voice_irq_ptr(0), m_voice_irq_current(0), m_dma_16bit(0), m_statread(0), m_sb_data_2xc(0), m_sb_data_2xe(0), m_reg_ctrl(0), m_fake_adlib_status(0), m_dma_current(0), m_txirq(0), m_rxirq(0),
356356   m_txirq_handler(*this),
357357   m_rxirq_handler(*this),
358358   m_wave_irq_handler(*this),
r250291r250292
12761276isa16_gus_device::isa16_gus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
12771277   device_t(mconfig, ISA16_GUS, "Gravis Ultrasound", tag, owner, clock, "isa_gus", __FILE__),
12781278   device_isa16_card_interface( mconfig, *this ),
1279   m_gf1(*this, "gf1")
1279   m_gf1(*this, "gf1"), m_irq_status(0)
12801280{
12811281}
12821282
trunk/src/devices/bus/isa/hdc.cpp
r250291r250292
162162const device_type ST11M_HDC = &device_creator<st11m_device>;
163163
164164xt_hdc_device::xt_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
165      device_t(mconfig, XT_HDC, "Generic PC-XT Fixed Disk Controller", tag, owner, clock, "xt_hdc", __FILE__),
165      device_t(mconfig, XT_HDC, "Generic PC-XT Fixed Disk Controller", tag, owner, clock, "xt_hdc", __FILE__), buffer_ptr(nullptr), csb(0), status(0), error(0), m_current_cmd(0),
166166      m_irq_handler(*this),
167      m_drq_handler(*this)
167      m_drq_handler(*this), drv(0), timer(nullptr), data_cnt(0), hdc_control(0), hdcdma_src(nullptr), hdcdma_dst(nullptr), hdcdma_read(0), hdcdma_write(0), hdcdma_size(0)
168168{
169169   m_type = STANDARD;
170170}
171171
172172xt_hdc_device::xt_hdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
173      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
173      device_t(mconfig, type, name, tag, owner, clock, shortname, source), buffer_ptr(nullptr), csb(0), status(0), error(0), m_type(0), m_current_cmd(0),
174174      m_irq_handler(*this),
175      m_drq_handler(*this)
175      m_drq_handler(*this), drv(0), timer(nullptr), data_cnt(0), hdc_control(0), hdcdma_src(nullptr), hdcdma_dst(nullptr), hdcdma_read(0), hdcdma_write(0), hdcdma_size(0)
176176{
177177}
178178
r250291r250292
921921isa8_hdc_device::isa8_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
922922      device_t(mconfig, ISA8_HDC, "Fixed Disk Controller Card", tag, owner, clock, "hdc", __FILE__),
923923      device_isa8_card_interface(mconfig, *this),
924      m_hdc(*this,"hdc")
924      m_hdc(*this,"hdc"), dip(0)
925925{
926926}
927927
928928isa8_hdc_device::isa8_hdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
929929      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
930930      device_isa8_card_interface(mconfig, *this),
931      m_hdc(*this,"hdc")
931      m_hdc(*this,"hdc"), dip(0)
932932{
933933}
934934
trunk/src/devices/bus/isa/ibm_mfc.cpp
r250291r250292
449449
450450isa8_ibm_mfc_device::isa8_ibm_mfc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
451451      device_t(mconfig, ISA8_IBM_MFC, "IBM PC Music Feature Card", tag, owner, clock, "ibm_mfc", __FILE__),
452      device_isa8_card_interface(mconfig, *this),
452      device_isa8_card_interface(mconfig, *this), m_tcr(0), m_pc_ppi_c(0), m_z80_ppi_c(0), m_pc_irq_state(0), m_z80_irq_state(0),
453453      m_cpu(*this, "ibm_mfc"),
454454      m_ym2151(*this, "ym2151"),
455455      m_d8253(*this, "d8253"),
trunk/src/devices/bus/isa/isa.cpp
r250291r250292
2626//-------------------------------------------------
2727isa8_slot_device::isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
2828      device_t(mconfig, ISA8_SLOT, "ISA8_SLOT", tag, owner, clock, "isa8_slot", __FILE__),
29      device_slot_interface(mconfig, *this)
29      device_slot_interface(mconfig, *this),
30   m_owner(nullptr),
31   m_isa_tag(nullptr)
3032{
3133}
3234
3335isa8_slot_device::isa8_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3436      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
35      device_slot_interface(mconfig, *this)
37      device_slot_interface(mconfig, *this), m_owner(nullptr), m_isa_tag(nullptr)
3638{
3739}
3840
r250291r250292
136138isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
137139      device_t(mconfig, ISA8, "ISA8", tag, owner, clock, "isa8", __FILE__),
138140      device_memory_interface(mconfig, *this),
139      m_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, NULL),
140      m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, NULL),
141      m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, NULL),
142      m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, NULL),
141      m_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
142      m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, nullptr),
143      m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
144      m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, nullptr), m_maincpu(nullptr), m_iospace(nullptr), m_prgspace(nullptr),
143145      m_out_irq2_cb(*this),
144146      m_out_irq3_cb(*this),
145147      m_out_irq4_cb(*this),
r250291r250292
148150      m_out_irq7_cb(*this),
149151      m_out_drq1_cb(*this),
150152      m_out_drq2_cb(*this),
151      m_out_drq3_cb(*this),
153      m_out_drq3_cb(*this), m_cputag(nullptr),
152154      m_write_iochck(*this)
153155{
154156   for(int i=0;i<8;i++)
155157   {
156      m_dma_device[i] = NULL;
158      m_dma_device[i] = nullptr;
157159      m_dma_eop[i] = false;
158160   }
159161   m_nmi_enabled = false;
r250291r250292
164166isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
165167      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
166168      device_memory_interface(mconfig, *this),
167      m_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, NULL),
168      m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, NULL),
169      m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, NULL),
170      m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, NULL),
169      m_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
170      m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, nullptr),
171      m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
172      m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, nullptr), m_maincpu(nullptr), m_iospace(nullptr), m_prgspace(nullptr),
171173      m_out_irq2_cb(*this),
172174      m_out_irq3_cb(*this),
173175      m_out_irq4_cb(*this),
r250291r250292
176178      m_out_irq7_cb(*this),
177179      m_out_drq1_cb(*this),
178180      m_out_drq2_cb(*this),
179      m_out_drq3_cb(*this),
181      m_out_drq3_cb(*this), m_cputag(nullptr),
180182      m_write_iochck(*this)
181183{
182184   for(int i=0;i<8;i++)
183185   {
184      m_dma_device[i] = NULL;
186      m_dma_device[i] = nullptr;
185187      m_dma_eop[i] = false;
186188   }
187189   m_nmi_enabled = false;
r250291r250292
418420
419421device_isa8_card_interface::device_isa8_card_interface(const machine_config &mconfig, device_t &device)
420422   : device_slot_card_interface(mconfig, device),
421      m_isa(NULL)
423      m_isa(nullptr), m_isa_dev(nullptr), m_next(nullptr)
422424{
423425}
424426
r250291r250292
618620//-------------------------------------------------
619621
620622device_isa16_card_interface::device_isa16_card_interface(const machine_config &mconfig, device_t &device)
621   : device_isa8_card_interface(mconfig,device)
623   : device_isa8_card_interface(mconfig,device), m_isa(nullptr)
622624{
623625}
624626
trunk/src/devices/bus/isa/lpt.cpp
r250291r250292
1414
1515isa8_lpt_device::isa8_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1616   device_t(mconfig, ISA8_LPT, "Printer Adapter", tag, owner, clock, "isa_lpt", __FILE__),
17   device_isa8_card_interface(mconfig, *this)
17   device_isa8_card_interface(mconfig, *this),
18   m_is_primary(false)
1819{
1920}
2021
trunk/src/devices/bus/isa/mach32.cpp
r250291r250292
2323
2424// 8514/A device
2525mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
26   : mach8_device(mconfig, ATIMACH32_8514A, "ATi mach32 (2D acceleration module)", tag, owner, clock, "mach32_8514a", __FILE__)
26   : mach8_device(mconfig, ATIMACH32_8514A, "ATi mach32 (2D acceleration module)", tag, owner, clock, "mach32_8514a", __FILE__),
27   m_chip_ID(0),
28   m_membounds(0)
2729{
2830}
2931
3032mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
31   : mach8_device(mconfig, type, name, tag, owner, clock, shortname, source)
33   : mach8_device(mconfig, type, name, tag, owner, clock, shortname, source),
34   m_chip_ID(0),
35   m_membounds(0)
3236{
3337}
3438
trunk/src/devices/bus/isa/mc1502_fdc.cpp
r250291r250292
192192mc1502_fdc_device::mc1502_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
193193   device_t(mconfig, MC1502_FDC, "MC-1502 floppy", tag, owner, clock, "mc1502_fdc", __FILE__),
194194   device_isa8_card_interface( mconfig, *this ),
195   m_fdc(*this, "fdc")
195   m_fdc(*this, "fdc"), motor_on(0), motor_timer(nullptr)
196196{
197197}
198198
trunk/src/devices/bus/isa/mda.cpp
r250291r250292
152152
153153isa8_mda_device::isa8_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
154154      device_t(mconfig, ISA8_MDA, "IBM Monochrome Display and Printer Adapter", tag, owner, clock, "isa_ibm_mda", __FILE__),
155      device_isa8_card_interface(mconfig, *this),
156      m_update_row_type(-1),
155      device_isa8_card_interface(mconfig, *this), m_framecnt(0), m_mode_control(0),
156      m_update_row_type(-1), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), m_pixel(0),
157157      m_palette(*this, "palette")
158158{
159159}
160160
161161isa8_mda_device::isa8_mda_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
162162      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
163      device_isa8_card_interface(mconfig, *this),
164      m_update_row_type(-1),
163      device_isa8_card_interface(mconfig, *this), m_framecnt(0), m_mode_control(0),
164      m_update_row_type(-1), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), m_pixel(0),
165165      m_palette(*this, "palette")
166166{
167167}
r250291r250292
581581//-------------------------------------------------
582582
583583isa8_hercules_device::isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
584      isa8_mda_device(mconfig, ISA8_HERCULES, "Hercules Graphics Card", tag, owner, clock, "isa_hercules", __FILE__)
584      isa8_mda_device(mconfig, ISA8_HERCULES, "Hercules Graphics Card", tag, owner, clock, "isa_hercules", __FILE__), m_configuration_switch(0)
585585{
586586}
587587
r250291r250292
787787//-------------------------------------------------
788788
789789isa8_ec1840_0002_device::isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
790      isa8_mda_device( mconfig, ISA8_EC1840_0002, "EC 1840.0002 (MDA)", tag, owner, clock, "ec1840_0002", __FILE__)
790      isa8_mda_device( mconfig, ISA8_EC1840_0002, "EC 1840.0002 (MDA)", tag, owner, clock, "ec1840_0002", __FILE__), m_soft_chr_gen(nullptr)
791791{
792792}
793793
trunk/src/devices/bus/isa/ne1000.cpp
r250291r250292
1919ne1000_device::ne1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2020      : device_t(mconfig, NE1000, "NE1000 Network Adapter", tag, owner, clock, "ne1000", __FILE__),
2121      device_isa8_card_interface(mconfig, *this),
22      m_dp8390(*this, "dp8390d") {
22      m_dp8390(*this, "dp8390d"),
23   m_irq(0)
24   {
2325}
2426
2527void ne1000_device::device_start() {
trunk/src/devices/bus/isa/ne2000.cpp
r250291r250292
1717   return MACHINE_CONFIG_NAME(ne2000_config);
1818}
1919
20ne2000_device::ne2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
21      : device_t(mconfig, NE2000, "NE2000 Network Adapter", tag, owner, clock, "ne2000", __FILE__),
22      device_isa16_card_interface(mconfig, *this),
23      m_dp8390(*this, "dp8390d") {
20ne2000_device::ne2000_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock)
21   : device_t(mconfig, NE2000, "NE2000 Network Adapter", tag, owner, clock, "ne2000", __FILE__),
22     device_isa16_card_interface(mconfig, *this),
23     m_dp8390(*this, "dp8390d"),
24     m_irq(0)
25{
2426}
2527
2628void ne2000_device::device_start() {
trunk/src/devices/bus/isa/num9rev.cpp
r250291r250292
8383      m_upd7220(*this, "upd7220"),
8484      m_palette(*this, "palette"),
8585      m_ram(1024*1024),
86      m_overlay(1024)
86      m_overlay(1024), m_bank(0), m_mode(0), m_1024(false)
8787{
8888}
8989
trunk/src/devices/bus/isa/omti8621.cpp
r250291r250292
376376   device_isa16_card_interface(mconfig, *this),
377377   m_fdc(*this, OMTI_FDC_TAG),
378378   m_iobase(*this, "IO_BASE"),
379   m_biosopts(*this, "BIOS_OPTS")
379   m_biosopts(*this, "BIOS_OPTS"), jumper(0), omti_state(0), status_port(0), config_port(0), mask_port(0), command_length(0), command_index(0), command_status(0), data_buffer(nullptr),
380   data_length(0), data_index(0), diskaddr_ecc_error(0), diskaddr_format_bad_track(0), m_timer(nullptr), m_installed(false)
380381{
381382}
382383
r250291r250292
12871288
12881289omti_disk_image_device::omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
12891290   : device_t(mconfig, OMTI_DISK, "OMTI8621 ESDI disk", tag, owner, clock, "omti_disk_image", __FILE__),
1290      device_image_interface(mconfig, *this)
1291      device_image_interface(mconfig, *this), m_type(0), m_cylinders(0), m_heads(0), m_sectors(0), m_sectorbytes(0), m_sector_count(0), m_image(nullptr)
12911292{
12921293}
12931294
trunk/src/devices/bus/isa/pgc.cpp
r250291r250292
208208   device_isa8_card_interface(mconfig, *this),
209209   m_cpu(*this, "maincpu"),
210210   m_screen(*this, PGC_SCREEN_NAME),
211   m_palette(*this, "palette")
211   m_palette(*this, "palette"), m_commarea(nullptr), m_vram(nullptr), m_eram(nullptr), m_bitmap(nullptr)
212212{
213213}
214214
r250291r250292
217217   device_isa8_card_interface(mconfig, *this),
218218   m_cpu(*this, "maincpu"),
219219   m_screen(*this, PGC_SCREEN_NAME),
220   m_palette(*this, "palette")
220   m_palette(*this, "palette"), m_commarea(nullptr), m_vram(nullptr), m_eram(nullptr), m_bitmap(nullptr)
221221{
222222}
223223
trunk/src/devices/bus/isa/sb16.cpp
r250291r250292
684684   m_dacl(*this, "dacl"),
685685   m_dacr(*this, "dacr"),
686686   m_joy(*this, "pc_joy"),
687   m_cpu(*this, "sb16_cpu")
687   m_cpu(*this, "sb16_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_freq(0), m_mode(0), m_dac_fifo_ctrl(0), m_adc_fifo_ctrl(0), m_ctrl8(0), m_ctrl16(0), m_mpu_byte(0),
688   m_dma8_len(0), m_dma16_len(0), m_dma8_cnt(0), m_dma16_cnt(0), m_adc_fifo_head(0), m_adc_fifo_tail(0), m_dac_fifo_head(0), m_dac_fifo_tail(0), m_adc_r(false), m_dac_r(false), m_adc_h(false),
689   m_dac_h(false), m_irq8(false), m_irq16(false), m_irq_midi(false), m_dma8_done(false), m_dma16_done(false), m_timer(nullptr)
688690{
689691}
690692
trunk/src/devices/bus/isa/sblaster.cpp
r250291r250292
11071107   m_dacl(*this, "sbdacl"),
11081108   m_dacr(*this, "sbdacr"),
11091109   m_joy(*this, "pc_joy"),
1110   m_mdout(*this, "mdout")
1110   m_mdout(*this, "mdout"), m_dack_out(0), m_onebyte_midi(false), m_uart_midi(false), m_uart_irq(false), m_mpu_midi(false), m_rx_waiting(0), m_tx_waiting(0), m_xmit_read(0), m_xmit_write(0), m_recv_read(0), m_recv_write(0), m_tx_busy(false), m_timer(nullptr)
11111111{
11121112}
11131113
trunk/src/devices/bus/isa/sc499.cpp
r250291r250292
319319   : device_t(mconfig, SC499, "Archive SC-499", tag, owner, clock, "sc499", __FILE__),
320320   device_isa8_card_interface(mconfig, *this),
321321   m_iobase(*this, "IO_BASE"),
322   m_irqdrq(*this, "IRQ_DRQ"),
323   m_image(*this, SC499_CTAPE_TAG)
322   m_irqdrq(*this, "IRQ_DRQ"), m_data(0), m_command(0), m_status(0), m_control(0), m_has_cartridge(0), m_is_writable(0), m_current_command(0), m_first_block_hack(0), m_nasty_readahead(0), m_read_block_pending(0),
323   m_data_index(0), m_tape_status(0), m_data_error_counter(0), m_underrun_counter(0), m_tape_pos(0), m_ctape_block_count(0), m_ctape_block_index(0), m_image_length(0),
324   m_image(*this, SC499_CTAPE_TAG), irq_state(), dma_drq_state(), m_timer(nullptr), m_timer1(nullptr), m_timer_type(0), m_irq(0), m_drq(0), m_installed(false)
324325{
325326}
326327
trunk/src/devices/bus/isa/stereo_fx.cpp
r250291r250292
192192   m_dacl(*this, "dacl"),
193193   m_dacr(*this, "dacr"),
194194   m_joy(*this, "pc_joy"),
195   m_cpu(*this, "stereo_fx_cpu")
195   m_cpu(*this, "stereo_fx_cpu"), m_data_in(false), m_in_byte(0), m_data_out(false), m_out_byte(0), m_port20(0), m_port00(0), m_timer(nullptr), m_t0(0)
196196{
197197   m_t1 = 0;
198198}
trunk/src/devices/bus/isa/svga_cirrus.cpp
r250291r250292
6161
6262isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6363      device_t(mconfig, ISA16_SVGA_CIRRUS, "Diamond Speedstar Pro SE ISA Graphics Card (BIOS v1.00)", tag, owner, clock, "dm_clgd5430", __FILE__),
64      device_isa16_card_interface(mconfig, *this)
64      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
6565{
6666}
6767
r250291r250292
147147
148148isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
149149      device_t(mconfig, ISA16_SVGA_CIRRUS_GD542X, "Generic Cirrus Logic GD542x Graphics Card (BIOS v1.20)", tag, owner, clock, "clgd542x", __FILE__),
150      device_isa16_card_interface(mconfig, *this)
150      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
151151{
152152}
153153
trunk/src/devices/bus/isa/svga_s3.cpp
r250291r250292
7272
7373isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7474      device_t(mconfig, ISA16_SVGA_S3, "Number Nine 9FX Vision 330 (S3 764) Graphics Card", tag, owner, clock, "s3_764", __FILE__),
75      device_isa16_card_interface(mconfig, *this)
75      device_isa16_card_interface(mconfig, *this), m_vga(nullptr), m_8514(nullptr)
7676{
7777}
7878
r250291r250292
184184
185185isa16_s3virge_device::isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
186186      device_t(mconfig, ISA16_S3VIRGE, "S3 ViRGE Graphics Card", tag, owner, clock, "s3virge", __FILE__),
187      device_isa16_card_interface(mconfig, *this)
187      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
188188{
189189}
190190
r250291r250292
271271
272272isa16_s3virgedx_device::isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
273273      device_t(mconfig, ISA16_S3VIRGEDX, "S3 ViRGE/DX Graphics Card", tag, owner, clock, "s3virgedx", __FILE__),
274      device_isa16_card_interface(mconfig, *this)
274      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
275275{
276276}
277277
r250291r250292
359359
360360isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
361361      device_t(mconfig, ISA16_DMS3D2KPRO, "Diamond Stealth 3D 2000 Pro", tag, owner, clock, "dms3d2kp", __FILE__),
362      device_isa16_card_interface(mconfig, *this)
362      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
363363{
364364}
365365
trunk/src/devices/bus/isa/svga_trident.cpp
r250291r250292
6363
6464isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6565      device_t(mconfig, ISA16_SVGA_TGUI9680, "Trident TGUI9680 Graphics Card (BIOS X5.5 (02) 02/13/96)", tag, owner, clock, "tgui9680", __FILE__),
66      device_isa16_card_interface(mconfig, *this)
66      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
6767{
6868}
6969
trunk/src/devices/bus/isa/svga_tseng.cpp
r250291r250292
6161
6262isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6363      device_t(mconfig, ISA8_SVGA_ET4K, "SVGA Tseng ET4000 Graphics Card", tag, owner, clock, "et4000", __FILE__),
64      device_isa8_card_interface(mconfig, *this)
64      device_isa8_card_interface(mconfig, *this), m_vga(nullptr)
6565{
6666}
6767
trunk/src/devices/bus/isa/vga.cpp
r250291r250292
5151
5252isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5353      device_t(mconfig, ISA8_VGA, "IBM VGA Graphics Card", tag, owner, clock, "ibm_vga", __FILE__),
54      device_isa8_card_interface(mconfig, *this)
54      device_isa8_card_interface(mconfig, *this), m_vga(nullptr)
5555{
5656}
5757
trunk/src/devices/bus/isa/vga_ati.cpp
r250291r250292
148148
149149isa16_vga_gfxultra_device::isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
150150      device_t(mconfig, ISA16_VGA_GFXULTRA, "ATi Graphics Ultra Card", tag, owner, clock, "gfxultra", __FILE__),
151      device_isa16_card_interface(mconfig, *this)
151      device_isa16_card_interface(mconfig, *this), m_vga(nullptr), m_8514(nullptr)
152152{
153153}
154154
155155isa16_vga_gfxultrapro_device::isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
156156      device_t(mconfig, ISA16_SVGA_GFXULTRAPRO, "ATi Graphics Ultra Pro Card", tag, owner, clock, "gfxultrp", __FILE__),
157      device_isa16_card_interface(mconfig, *this)
157      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
158158{
159159}
160160
161161isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
162162      device_t(mconfig, ISA16_SVGA_MACH64, "ATi mach64 Card", tag, owner, clock, "mach64", __FILE__),
163      device_isa16_card_interface(mconfig, *this)
163      device_isa16_card_interface(mconfig, *this), m_vga(nullptr)
164164{
165165}
166166
trunk/src/devices/bus/isa/xtide.cpp
r250291r250292
303303   : device_t(mconfig, ISA8_XTIDE, "XT-IDE Fixed Drive Adapter", tag, owner, clock, "isa8_xtide", __FILE__),
304304   device_isa8_card_interface( mconfig, *this ),
305305   m_ata(*this, "ata"),
306   m_eeprom(*this, "eeprom")
306   m_eeprom(*this, "eeprom"), m_irq_number(0), m_d8_d15_latch(0)
307307{
308308}
309309
trunk/src/devices/bus/isbx/isbc_218a.cpp
r250291r250292
8383   device_t(mconfig, ISBC_218A, "ISBX 218a for ISBC", tag, owner, clock, "isbc_218a", __FILE__),
8484   device_isbx_card_interface(mconfig, *this),
8585   m_fdc(*this, I8272_TAG),
86   m_floppy0(*this, I8272_TAG":0")
86   m_floppy0(*this, I8272_TAG":0"), m_reset(false), m_motor(false)
8787{
8888}
8989
trunk/src/devices/bus/isbx/isbx.cpp
r250291r250292
4343   m_write_mintr0(*this),
4444   m_write_mintr1(*this),
4545   m_write_mdrqt(*this),
46   m_write_mwait(*this)
46   m_write_mwait(*this), m_card(nullptr)
4747{
4848}
4949
trunk/src/devices/bus/kc/d002.cpp
r250291r250292
110110
111111kc_d002_device::kc_d002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
112112      : device_t(mconfig, KC_D002, "D002 Bus Driver", tag, owner, clock, "kc_d002", __FILE__),
113      device_kcexp_interface( mconfig, *this )
114{
113      device_kcexp_interface( mconfig, *this ), m_slot(nullptr)
114   {
115115}
116116
117117//-------------------------------------------------
trunk/src/devices/bus/kc/d004.cpp
r250291r250292
137137      m_floppy1(*this, UPD765_TAG ":1"),
138138      m_floppy2(*this, UPD765_TAG ":2"),
139139      m_floppy3(*this, UPD765_TAG ":3"),
140      m_koppel_ram(*this, "koppelram")
141{
140      m_koppel_ram(*this, "koppelram"), m_reset_timer(nullptr), m_rom(nullptr), m_rom_base(0), m_enabled(0), m_connected(0), m_floppy(nullptr)
141   {
142142}
143143
144144kc_d004_device::kc_d004_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
r250291r250292
150150      m_floppy1(*this, UPD765_TAG ":1"),
151151      m_floppy2(*this, UPD765_TAG ":2"),
152152      m_floppy3(*this, UPD765_TAG ":3"),
153      m_koppel_ram(*this, "koppelram")
154{
153      m_koppel_ram(*this, "koppelram"), m_reset_timer(nullptr), m_rom(nullptr), m_rom_base(0), m_enabled(0), m_connected(0), m_floppy(nullptr)
154   {
155155}
156156
157157//-------------------------------------------------
r250291r250292
384384
385385kc_d004_gide_device::kc_d004_gide_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
386386      : kc_d004_device(mconfig, KC_D004, "D004 Floppy Disk + GIDE Interface", tag, owner, clock, "kc_d004gide", __FILE__),
387      m_ata(*this, ATA_TAG)
388{
387      m_ata(*this, ATA_TAG), m_ata_data(0), m_lh(0)
388   {
389389}
390390
391391//-------------------------------------------------
trunk/src/devices/bus/kc/kc.cpp
r250291r250292
158158      device_slot_interface(mconfig, *this),
159159      m_out_irq_cb(*this),
160160      m_out_nmi_cb(*this),
161      m_out_halt_cb(*this)
161      m_out_halt_cb(*this), m_cart(nullptr), m_next_slot_tag(nullptr), m_next_slot(nullptr)
162162{
163163}
164164
r250291r250292
167167      device_slot_interface(mconfig, *this),
168168      m_out_irq_cb(*this),
169169      m_out_nmi_cb(*this),
170      m_out_halt_cb(*this)
170      m_out_halt_cb(*this), m_cart(nullptr), m_next_slot_tag(nullptr), m_next_slot(nullptr)
171171{
172172}
173173
trunk/src/devices/bus/kc/ram.cpp
r250291r250292
4444
4545kc_m011_device::kc_m011_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4646      : device_t(mconfig, KC_M011, "M011 64KB RAM", tag, owner, clock, "kc_m011", __FILE__),
47      device_kcexp_interface( mconfig, *this )
48{
47      device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_ram(nullptr), m_enabled(0), m_write_enabled(0), m_base(0), m_segment(0)
48   {
4949}
5050
5151kc_m011_device::kc_m011_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
5252      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
53      device_kcexp_interface( mconfig, *this )
53      device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_ram(nullptr), m_enabled(0), m_write_enabled(0), m_base(0), m_segment(0)
5454{
5555}
5656
trunk/src/devices/bus/kc/rom.cpp
r250291r250292
4444
4545kc_8k_device::kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4646      : device_t(mconfig, KC_STANDARD, "Standard", tag, owner, clock, "kc_8k", __FILE__),
47      device_kcexp_interface( mconfig, *this )
48{
47      device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_rom(nullptr), m_enabled(0), m_base(0)
48   {
4949}
5050
5151kc_8k_device::kc_8k_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
5252      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
53      device_kcexp_interface( mconfig, *this )
54{
53      device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_rom(nullptr), m_enabled(0), m_base(0)
54   {
5555}
5656
5757
r250291r250292
185185//-------------------------------------------------
186186
187187kc_m033_device::kc_m033_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
188      : kc_8k_device(mconfig, KC_M033, "M033 TypeStar", tag, owner, clock, "kc_m033", __FILE__)
189{
188      : kc_8k_device(mconfig, KC_M033, "M033 TypeStar", tag, owner, clock, "kc_m033", __FILE__), m_bank(0)
189   {
190190}
191191
192192//-------------------------------------------------
trunk/src/devices/bus/lpci/i82439tx.cpp
r250291r250292
2020   : northbridge_device(mconfig, I82439TX, "Intel 82439TX", tag, owner, clock, "i82439tx", __FILE__),
2121   pci_device_interface( mconfig, *this ),
2222   m_cpu_tag( NULL ),
23   m_region_tag( NULL )
23   m_region_tag( NULL ),
24   m_space(nullptr),
25   m_rom(nullptr)
2426{
2527}
2628
trunk/src/devices/bus/lpci/mpc105.cpp
r250291r250292
3232mpc105_device::mpc105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3333   : device_t(mconfig, MPC105, "MPC105", tag, owner, clock, "mpc105", __FILE__),
3434   pci_device_interface( mconfig, *this ),
35   m_cpu_tag(NULL),
36   m_bank_base_default(0)
35   m_cpu_tag(nullptr),
36   m_bank_base_default(0),
37   m_bank_base(0),
38   m_bank_enable(0),
39   m_maincpu(nullptr)
3740{
3841}
3942
trunk/src/devices/bus/lpci/pci.cpp
r250291r250292
9090//  pci_bus_device - constructor
9191//-------------------------------------------------
9292pci_bus_device::pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
93      device_t(mconfig, PCI_BUS, "PCI Bus", tag, owner, clock, "pci_bus", __FILE__),
94      m_father(NULL)
93      device_t(mconfig, PCI_BUS, "PCI Bus", tag, owner, clock, "pci_bus", __FILE__), m_busnum(0),
94      m_father(NULL), m_address(0), m_devicenum(0), m_busnumber(0), m_busnumaddr(nullptr)
9595{
9696   for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++) {
9797      m_devtag[i]= NULL;
trunk/src/devices/bus/lpci/southbridge.cpp
r250291r250292
141141   m_ds12885(*this, "rtc"),
142142   m_pc_kbdc(*this, "pc_kbdc"),
143143   m_ide(*this, "ide"),
144   m_ide2(*this, "ide2")
144   m_ide2(*this, "ide2"), m_at_spkrdata(0), m_pit_out2(0), m_dma_channel(0), m_cur_eop(false), m_dma_high_byte(0), m_at_speaker(0), m_refresh(false), m_channel_check(0), m_nmi_enabled(0)
145145{
146146}
147147/**********************************************************
trunk/src/devices/bus/macpds/macpds.cpp
r250291r250292
2828//-------------------------------------------------
2929macpds_slot_device::macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030      device_t(mconfig, MACPDS_SLOT, "Mac 68000 Processor-Direct Slot", tag, owner, clock, "macpds_slot", __FILE__),
31      device_slot_interface(mconfig, *this)
31      device_slot_interface(mconfig, *this),
32   m_macpds_tag(nullptr),
33   m_macpds_slottag(nullptr)
3234{
3335}
3436
3537macpds_slot_device::macpds_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3638      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
37      device_slot_interface(mconfig, *this)
39      device_slot_interface(mconfig, *this), m_macpds_tag(nullptr), m_macpds_slottag(nullptr)
3840{
3941}
4042
r250291r250292
7779//-------------------------------------------------
7880
7981macpds_device::macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
80      device_t(mconfig, MACPDS, "MACPDS", tag, owner, clock, "macpds", __FILE__)
82      device_t(mconfig, MACPDS, "MACPDS", tag, owner, clock, "macpds", __FILE__), m_maincpu(nullptr), m_cputag(nullptr)
8183{
8284}
8385
8486macpds_device::macpds_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
85      device_t(mconfig, type, name, tag, owner, clock, shortname, source)
87      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr), m_cputag(nullptr)
8688{
8789}
8890//-------------------------------------------------
r250291r250292
148150
149151device_macpds_card_interface::device_macpds_card_interface(const machine_config &mconfig, device_t &device)
150152   : device_slot_card_interface(mconfig, device),
151      m_macpds(NULL),
152      m_macpds_tag(NULL)
153      m_macpds(nullptr),
154      m_macpds_tag(nullptr), m_macpds_slottag(nullptr), m_next(nullptr)
153155{
154156}
155157
trunk/src/devices/bus/macpds/pds_tpdfpd.cpp
r250291r250292
8989macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
9090      device_t(mconfig, PDS_SEDISPLAY, "Radius SE Full Page Display", tag, owner, clock, "pds_sefp", __FILE__),
9191      device_video_interface(mconfig, *this),
92      device_macpds_card_interface(mconfig, *this)
92      device_macpds_card_interface(mconfig, *this), m_vram(nullptr), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
9393{
9494   m_assembled_tag = std::string(tag).append(":").append(SEDISPLAY_SCREEN_NAME);
9595   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
9898macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
9999      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
100100      device_video_interface(mconfig, *this),
101      device_macpds_card_interface(mconfig, *this)
101      device_macpds_card_interface(mconfig, *this), m_vram(nullptr), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
102102{
103103   m_assembled_tag = std::string(tag).append(":").append(SEDISPLAY_SCREEN_NAME);
104104   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/megadrive/eeprom.cpp
r250291r250292
6363md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
6464               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
6565               device_md_cart_interface( mconfig, *this ),
66               m_i2cmem(*this, "i2cmem")
67{
66               m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
67            {
6868}
6969
7070md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
7171               : device_t(mconfig, MD_STD_EEPROM, "MD Standard cart + EEPROM", tag, owner, clock, "md_std_eeprom", __FILE__),
7272               device_md_cart_interface( mconfig, *this ),
73               m_i2cmem(*this, "i2cmem")
74{
73               m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
74            {
7575}
7676
7777md_eeprom_nbajam_device::md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/megadrive/ggenie.cpp
r250291r250292
3535md_rom_ggenie_device::md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3636               : device_t(mconfig, MD_ROM_GAMEGENIE, "MD Game Genie", tag, owner, clock, "md_ggenie", __FILE__),
3737                  device_md_cart_interface( mconfig, *this ),
38                  m_exp(*this, "subslot")
39{
38                  m_exp(*this, "subslot"), m_gg_bypass(0), m_reg_enable(0)
39            {
4040}
4141
4242
trunk/src/devices/bus/megadrive/jcart.cpp
r250291r250292
5959// Micro Machines 2, Micro Machines Military
6060md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
6161               : md_jcart_device(mconfig, type, name, tag, owner, clock, shortname, source),
62               m_i2cmem(*this, "i2cmem")
63{
62               m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
63            {
6464}
6565
6666md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6767               : md_jcart_device(mconfig, MD_SEPROM_CODEMAST, "MD J-Cart games + SEPROM", tag, owner, clock, "md_seprom_codemast", __FILE__),
68               m_i2cmem(*this, "i2cmem")
69{
68               m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
69            {
7070}
7171
7272// Micro Machines 96
trunk/src/devices/bus/megadrive/md_slot.cpp
r250291r250292
6464//-------------------------------------------------
6565
6666device_md_cart_interface::device_md_cart_interface(const machine_config &mconfig, device_t &device)
67   : device_slot_card_interface(mconfig, device),
67   : device_slot_card_interface(mconfig, device), m_nvram_start(0), m_nvram_end(0), m_nvram_active(0), m_nvram_readonly(0), m_nvram_handlers_installed(0),
6868      m_rom(NULL),
6969      m_rom_size(0)
7070{
r250291r250292
164164                  device_t(mconfig, type, name, tag, owner, clock, shortname, source),
165165                  device_image_interface(mconfig, *this),
166166                  device_slot_interface(mconfig, *this),
167                  m_type(SEGA_STD),
167                  m_type(SEGA_STD), m_cart(nullptr),
168168                  m_must_be_loaded(1)
169169{
170170}
trunk/src/devices/bus/megadrive/rom.cpp
r250291r250292
8686}
8787
8888md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
89               : md_std_rom_device(mconfig, MD_ROM_SSF2, "MD Super SF2", tag, owner, clock, "md_rom_ssf2", __FILE__)
90{
89               : md_std_rom_device(mconfig, MD_ROM_SSF2, "MD Super SF2", tag, owner, clock, "md_rom_ssf2", __FILE__), m_lastoff(0), m_lastdata(0)
90            {
9191}
9292
9393md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
94               : md_std_rom_device(mconfig, MD_ROM_CM2IN1, "MD Codemasters 2in1", tag, owner, clock, "md_rom_cm2in1", __FILE__)
95{
94               : md_std_rom_device(mconfig, MD_ROM_CM2IN1, "MD Codemasters 2in1", tag, owner, clock, "md_rom_cm2in1", __FILE__), m_base(0)
95            {
9696}
9797
9898md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
99               : md_std_rom_device(mconfig, MD_ROM_MCPIR, "MD Pirate Multicarts (Various)", tag, owner, clock, "md_rom_mcpirate", __FILE__)
100{
99               : md_std_rom_device(mconfig, MD_ROM_MCPIR, "MD Pirate Multicarts (Various)", tag, owner, clock, "md_rom_mcpirate", __FILE__), m_bank(0)
100            {
101101}
102102
103103md_rom_bugslife_device::md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
121121}
122122
123123md_rom_smw64_device::md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
124               : md_std_rom_device(mconfig, MD_ROM_SMW64, "MD Super Mario World 64", tag, owner, clock, "md_rom_smw64", __FILE__)
125{
124               : md_std_rom_device(mconfig, MD_ROM_SMW64, "MD Super Mario World 64", tag, owner, clock, "md_rom_smw64", __FILE__), m_latch0(0), m_latch1(0)
125            {
126126}
127127
128128md_rom_sbubl_device::md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
156156}
157157
158158md_rom_chinf3_device::md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
159               : md_std_rom_device(mconfig, MD_ROM_CHINF3, "MD Chinese Fighter 3", tag, owner, clock, "md_rom_chinf3", __FILE__)
160{
159               : md_std_rom_device(mconfig, MD_ROM_CHINF3, "MD Chinese Fighter 3", tag, owner, clock, "md_rom_chinf3", __FILE__), m_bank(0)
160            {
161161}
162162
163163md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
176176}
177177
178178md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
179               : md_std_rom_device(mconfig, MD_ROM_LION2, "MD Lion King 2", tag, owner, clock, "md_rom_lion2", __FILE__)
180{
179               : md_std_rom_device(mconfig, MD_ROM_LION2, "MD Lion King 2", tag, owner, clock, "md_rom_lion2", __FILE__), m_prot1_data(0), m_prot2_data(0)
180            {
181181}
182182
183183md_rom_lion3_device::md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
184               : md_std_rom_device(mconfig, MD_ROM_LION3, "MD Lion King 3", tag, owner, clock, "md_rom_lion3", __FILE__)
185{
184               : md_std_rom_device(mconfig, MD_ROM_LION3, "MD Lion King 3", tag, owner, clock, "md_rom_lion3", __FILE__), m_bank(0)
185            {
186186}
187187
188188md_rom_pokea_device::md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
191191}
192192
193193md_rom_pokestad_device::md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
194               : md_std_rom_device(mconfig, MD_ROM_POKESTAD, "MD Pokemon Stadium", tag, owner, clock, "md_rom_pokestad", __FILE__)
195{
194               : md_std_rom_device(mconfig, MD_ROM_POKESTAD, "MD Pokemon Stadium", tag, owner, clock, "md_rom_pokestad", __FILE__), m_bank(0)
195            {
196196}
197197
198198md_rom_realtec_device::md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
199               : md_std_rom_device(mconfig, MD_ROM_REALTEC, "MD Realtec", tag, owner, clock, "md_rom_realtec", __FILE__)
200{
199               : md_std_rom_device(mconfig, MD_ROM_REALTEC, "MD Realtec", tag, owner, clock, "md_rom_realtec", __FILE__), m_bank_addr(0), m_bank_size(0), m_old_bank_addr(0)
200            {
201201}
202202
203203md_rom_redcl_device::md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
206206}
207207
208208md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
209               : md_std_rom_device(mconfig, MD_ROM_SQUIR, "MD Squirrel King", tag, owner, clock, "md_rom_squir", __FILE__)
210{
209               : md_std_rom_device(mconfig, MD_ROM_SQUIR, "MD Squirrel King", tag, owner, clock, "md_rom_squir", __FILE__), m_latch(0)
210            {
211211}
212212
213213md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
214               : md_std_rom_device(mconfig, MD_ROM_TEKKENSP, "MD Tekken Special", tag, owner, clock, "md_rom_tekkensp", __FILE__)
215{
214               : md_std_rom_device(mconfig, MD_ROM_TEKKENSP, "MD Tekken Special", tag, owner, clock, "md_rom_tekkensp", __FILE__), m_reg(0)
215            {
216216}
217217
218218md_rom_topf_device::md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
219               : md_std_rom_device(mconfig, MD_ROM_TOPF, "MD Top Fighter", tag, owner, clock, "md_rom_topf", __FILE__)
220{
219               : md_std_rom_device(mconfig, MD_ROM_TOPF, "MD Top Fighter", tag, owner, clock, "md_rom_topf", __FILE__), m_latch(0)
220            {
221221}
222222
223223md_rom_radica_device::md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
224               : md_std_rom_device(mconfig, MD_ROM_RADICA, "MD Radica TV games", tag, owner, clock, "md_rom_radica", __FILE__)
225{
224               : md_std_rom_device(mconfig, MD_ROM_RADICA, "MD Radica TV games", tag, owner, clock, "md_rom_radica", __FILE__), m_bank(0)
225            {
226226}
227227
228228md_rom_beggarp_device::md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
229               : md_std_rom_device(mconfig, MD_ROM_BEGGARP, "MD Beggar Prince", tag, owner, clock, "md_rom_beggarp", __FILE__)
230{
229               : md_std_rom_device(mconfig, MD_ROM_BEGGARP, "MD Beggar Prince", tag, owner, clock, "md_rom_beggarp", __FILE__), m_mode(0), m_lock(0)
230            {
231231}
232232
233233md_rom_wukong_device::md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
234               : md_std_rom_device(mconfig, MD_ROM_WUKONG, "MD Legend of Wukong", tag, owner, clock, "md_rom_wukong", __FILE__)
235{
234               : md_std_rom_device(mconfig, MD_ROM_WUKONG, "MD Legend of Wukong", tag, owner, clock, "md_rom_wukong", __FILE__), m_mode(0)
235            {
236236}
237237
238238//-------------------------------------------------
trunk/src/devices/bus/megadrive/stm95.cpp
r250291r250292
177177
178178md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
179179               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
180               device_md_cart_interface( mconfig, *this )
181{
180               device_md_cart_interface( mconfig, *this ), m_rdcnt(0)
181            {
182182}
183183
184184md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
185185               : device_t(mconfig, MD_EEPROM_STM95, "MD Cart + EEPROM STM95", tag, owner, clock, "md_eeprom_stm95", __FILE__),
186               device_md_cart_interface( mconfig, *this )
187{
186               device_md_cart_interface( mconfig, *this ), m_rdcnt(0)
187            {
188188}
189189
190190
trunk/src/devices/bus/megadrive/svp.cpp
r250291r250292
4040                     : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
4141                     device_md_cart_interface( mconfig, *this ),
4242                     m_svp(*this, "svp"),
43                     m_test_ipt(*this, "MEMORY_TEST")
44{
43                     m_test_ipt(*this, "MEMORY_TEST"), m_emu_status(0), m_xst(0), m_xst2(0)
44                  {
4545}
4646
4747md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4848                     : device_t(mconfig, MD_ROM_SVP, "MD Virtua Racing", tag, owner, clock, "md_rom_svp", __FILE__),
4949                     device_md_cart_interface( mconfig, *this ),
5050                     m_svp(*this, "svp"),
51                     m_test_ipt(*this, "MEMORY_TEST")
52{
51                     m_test_ipt(*this, "MEMORY_TEST"), m_emu_status(0), m_xst(0), m_xst2(0)
52                  {
5353}
5454
5555
trunk/src/devices/bus/midi/midi.cpp
r250291r250292
66
77midi_port_device::midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
88   : device_t(mconfig, MIDI_PORT, "Midi Port", tag, owner, clock, "midi_port", __FILE__),
9   device_slot_interface(mconfig, *this),
9   device_slot_interface(mconfig, *this),
10   m_rxd(0),
1011   m_rxd_handler(*this),
1112   m_dev(NULL)
1213{
trunk/src/devices/bus/msx_cart/disk.cpp
r250291r250292
140140
141141
142142msx_cart_disk_type1::msx_cart_disk_type1(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
143   : msx_cart_disk_wd(mconfig, type, name, tag, owner, clock, shortname)
144   , m_control(0)
143   : msx_cart_disk_wd(mconfig, type, name, tag, owner, clock, shortname), m_side_control(0)
144     , m_control(0)
145145{
146146}
147147
trunk/src/devices/bus/msx_cart/msx_audio_kb.cpp
r250291r250292
88
99
1010msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
11   : device_t(mconfig, MSX_AUDIO_KBDC_PORT, "MSX Audio keyboard connector port", tag, owner, clock, "msx_audio_kbdc_port", __FILE__)
12   , device_slot_interface(mconfig, *this)
11   : device_t(mconfig, MSX_AUDIO_KBDC_PORT, "MSX Audio keyboard connector port", tag, owner, clock, "msx_audio_kbdc_port", __FILE__),
12   device_slot_interface(mconfig, *this),
13   m_keyboard(NULL)
1314{
1415}
1516
trunk/src/devices/bus/neogeo/banked_cart.cpp
r250291r250292
1010
1111neogeo_banked_cart_device::neogeo_banked_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1212   : device_t(mconfig, NEOGEO_BANKED_CART, "NeoGeo Banked Cartridge", tag, owner, clock, "neogeo_banked_cart", __FILE__),
13   m_bank_cartridge(0),
14   m_region(0)
13   m_bank_cartridge(0),
14   m_main_cpu_bank_address(0),
15   m_region(0),
16   m_region_size(0)
1517
1618{
1719}
trunk/src/devices/bus/neogeo/bootleg_prot.cpp
r250291r250292
1010
1111
1212ngbootleg_prot_device::ngbootleg_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
13   : device_t(mconfig, NGBOOTLEG_PROT, "NeoGeo Protection (Bootleg)", tag, owner, clock, "ngbootleg_prot", __FILE__)
13   : device_t(mconfig, NGBOOTLEG_PROT, "NeoGeo Protection (Bootleg)", tag, owner, clock, "ngbootleg_prot", __FILE__),
14   kof2k3_overlay(0),
15   m_mainrom(NULL),
16   m_fixedrom(NULL),
17   m_bankdev(NULL)
1418{
1519}
1620
trunk/src/devices/bus/neogeo/cmc_prot.cpp
r250291r250292
1010
1111
1212cmc_prot_device::cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
13   : device_t(mconfig, CMC_PROT, "NeoGeo Protection (CMC)", tag, owner, clock, "cmc_prot", __FILE__)
13   : device_t(mconfig, CMC_PROT, "NeoGeo Protection (CMC)", tag, owner, clock, "cmc_prot", __FILE__),
14   type0_t03(NULL),
15   type0_t12(NULL),
16   type1_t03(NULL),
17   type1_t12(NULL),
18   address_8_15_xor1(NULL),
19   address_8_15_xor2(NULL),
20   address_16_23_xor1(NULL),
21   address_16_23_xor2(NULL),
22   address_0_7_xor(NULL)
1423{
1524}
1625
trunk/src/devices/bus/neogeo/fatfury2_prot.cpp
r250291r250292
1010
1111
1212fatfury2_prot_device::fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
13   : device_t(mconfig, FATFURY2_PROT, "NeoGeo Protection (Fatal Fury 2)", tag, owner, clock, "fatfury2_prot", __FILE__)
13   : device_t(mconfig, FATFURY2_PROT, "NeoGeo Protection (Fatal Fury 2)", tag, owner, clock, "fatfury2_prot", __FILE__),
14   m_bankdev(NULL),
15   m_fatfury2_prot_data(0)
1416{
1517}
1618
trunk/src/devices/bus/neogeo/kof98_prot.cpp
r250291r250292
1111
1212
1313kof98_prot_device::kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
14   : device_t(mconfig, KOF98_PROT, "NeoGeo Protection (KOF98)", tag, owner, clock, "kof98_prot", __FILE__)
14   : device_t(mconfig, KOF98_PROT, "NeoGeo Protection (KOF98)", tag, owner, clock, "kof98_prot", __FILE__),
15   kof98_prot_state(0)
1516{
1617}
1718
trunk/src/devices/bus/neogeo/mslugx_prot.cpp
r250291r250292
99
1010
1111mslugx_prot_device::mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
12   : device_t(mconfig, MSLUGX_PROT, "NeoGeo Protection (Metal Slug X)", tag, owner, clock, "mslugx_prot", __FILE__)
12   : device_t(mconfig, MSLUGX_PROT, "NeoGeo Protection (Metal Slug X)", tag, owner, clock, "mslugx_prot", __FILE__),
13   m_mslugx_counter(0),
14   m_mslugx_command(0)
1315{
1416}
1517
trunk/src/devices/bus/neogeo/neogeo_intf.cpp
r250291r250292
99//-------------------------------------------------
1010
1111device_neogeo_cart_interface::device_neogeo_cart_interface(const machine_config &mconfig, device_t &device)
12   : device_slot_card_interface(mconfig, device)
13   /*
14   m_rom(NULL),
15   m_fixed(NULL),
16   m_sprites(NULL),
17   m_sprites_optimized(NULL),
18   m_audio(NULL),
19   m_ym(NULL),
20   m_ymdelta(NULL),
21   m_audiocrypt(NULL)
22   */
12   : device_slot_card_interface(mconfig, device),
13      m_sprite_gfx_address_mask(0)
14/*
15m_rom(NULL),
16m_fixed(NULL),
17m_sprites(NULL),
18m_sprites_optimized(NULL),
19m_audio(NULL),
20m_ym(NULL),
21m_ymdelta(NULL),
22m_audiocrypt(NULL)
23*/
2324{
2425}
2526
trunk/src/devices/bus/neogeo/pvc_prot.cpp
r250291r250292
1111
1212
1313pvc_prot_device::pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
14   : device_t(mconfig, PVC_PROT, "NeoGeo Protection (PVC)", tag, owner, clock, "pvc_prot", __FILE__)
14   : device_t(mconfig, PVC_PROT, "NeoGeo Protection (PVC)", tag, owner, clock, "pvc_prot", __FILE__),
15   m_bankdev(NULL)
1516{
1617}
1718
trunk/src/devices/bus/neogeo/sbp_prot.cpp
r250291r250292
1111
1212
1313sbp_prot_device::sbp_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
14   : device_t(mconfig, SBP_PROT, "NeoGeo Protection (Super Bubble Pop)", tag, owner, clock, "sbp_prot", __FILE__)
14   : device_t(mconfig, SBP_PROT, "NeoGeo Protection (Super Bubble Pop)", tag, owner, clock, "sbp_prot", __FILE__),
15   m_mainrom(NULL)
1516{
1617}
1718
trunk/src/devices/bus/neogeo/sma_prot.cpp
r250291r250292
99
1010
1111sma_prot_device::sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
12   : device_t(mconfig, SMA_PROT, "NeoGeo SMA Cartridge", tag, owner, clock, "sma_prot", __FILE__)
12   : device_t(mconfig, SMA_PROT, "NeoGeo SMA Cartridge", tag, owner, clock, "sma_prot", __FILE__),
13   m_bankdev(NULL),
14   m_sma_rng(0)
1315{
1416}
1517
trunk/src/devices/bus/nes/act53.cpp
r250291r250292
3333
3434
3535nes_action53_device::nes_action53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
36               : nes_nrom_device(mconfig, NES_ACTION53, "NES Cart Action 53 PCB", tag, owner, clock, "nes_action53", __FILE__)
37{
36               : nes_nrom_device(mconfig, NES_ACTION53, "NES Cart Action 53 PCB", tag, owner, clock, "nes_action53", __FILE__),
37   m_sel(0)
38            {
3839}
3940
4041
trunk/src/devices/bus/nes/aladdin.cpp
r250291r250292
4141aladdin_cart_interface::aladdin_cart_interface(const machine_config &mconfig, device_t &device)
4242                  : device_slot_card_interface(mconfig, device),
4343                     m_rom(NULL),
44                     m_rom_size(0),
44                     m_rom_size(0),
45   m_lobank(0),
46   m_hibank(0),
4547                     m_rom_mask(0xff)
4648{
4749}
r250291r250292
6769nes_aladdin_slot_device::nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6870                  device_t(mconfig, NES_ALADDIN_SLOT, "NES Aladdin Deck Enhancer Cartridge Slot", tag, owner, clock, "nes_ade_slot", __FILE__),
6971                  device_image_interface(mconfig, *this),
70                  device_slot_interface(mconfig, *this)
72                  device_slot_interface(mconfig, *this), m_cart(nullptr)
7173{
7274}
7375
r250291r250292
194196}
195197
196198nes_algq_rom_device::nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
197                  : nes_algn_rom_device(mconfig, NES_ALGQ_ROM, "NES Aladdin Deck Enhancer ALGQ ROM", tag, owner, clock, "nes_algq_rom", __FILE__)
198{
199                  : nes_algn_rom_device(mconfig, NES_ALGQ_ROM, "NES Aladdin Deck Enhancer ALGQ ROM", tag, owner, clock, "nes_algq_rom", __FILE__), m_bank_base(0)
200               {
199201}
200202
201203void nes_algn_rom_device::device_start()
trunk/src/devices/bus/nes/ave.cpp
r250291r250292
4949}
5050
5151nes_maxi15_device::nes_maxi15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
52               : nes_nrom_device(mconfig, NES_MAXI15, "NES Cart AVE Maxi 15 PCB", tag, owner, clock, "nes_maxi15", __FILE__)
53{
52               : nes_nrom_device(mconfig, NES_MAXI15, "NES Cart AVE Maxi 15 PCB", tag, owner, clock, "nes_maxi15", __FILE__), m_reg(0), m_bank(0)
53            {
5454}
5555
5656
trunk/src/devices/bus/nes/bandai.cpp
r250291r250292
5959
6060
6161nes_oekakids_device::nes_oekakids_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
62               : nes_nrom_device(mconfig, NES_OEKAKIDS, "NES Cart Bandai Oeka Kids PCB", tag, owner, clock, "nes_oeka", __FILE__)
63{
62               : nes_nrom_device(mconfig, NES_OEKAKIDS, "NES Cart Bandai Oeka Kids PCB", tag, owner, clock, "nes_oeka", __FILE__), m_reg(0), m_latch(0)
63            {
6464}
6565
6666nes_fcg_device::nes_fcg_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
67               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
68{
67               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
68            {
6969}
7070
7171nes_fcg_device::nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
72               : nes_nrom_device(mconfig, NES_FCG, "NES Cart Bandai FCG PCB", tag, owner, clock, "nes_fcg", __FILE__)
73{
72               : nes_nrom_device(mconfig, NES_FCG, "NES Cart Bandai FCG PCB", tag, owner, clock, "nes_fcg", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
73            {
7474}
7575
7676nes_lz93d50_device::nes_lz93d50_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
r250291r250292
8585
8686nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
8787               : nes_lz93d50_device(mconfig, type, name, tag, owner, clock, shortname, source),
88                  m_i2cmem(*this, "i2cmem")
89{
88                  m_i2cmem(*this, "i2cmem"), m_i2c_dir(0)
89            {
9090}
9191
9292nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
9393               : nes_lz93d50_device(mconfig, NES_LZ93D50_24C01, "NES Cart Bandai LZ93D50 + 24C01 PCB", tag, owner, clock, "nes_lz93d50_ep1", __FILE__),
94                  m_i2cmem(*this, "i2cmem")
95{
94                  m_i2cmem(*this, "i2cmem"), m_i2c_dir(0)
95            {
9696}
9797
9898nes_lz93d50_24c02_device::nes_lz93d50_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/benshieng.cpp
r250291r250292
3232
3333
3434nes_benshieng_device::nes_benshieng_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
35               : nes_nrom_device(mconfig, NES_BENSHIENG, "NES Cart Benshieng PCB", tag, owner, clock, "nes_benshieng", __FILE__)
36{
35               : nes_nrom_device(mconfig, NES_BENSHIENG, "NES Cart Benshieng PCB", tag, owner, clock, "nes_benshieng", __FILE__),
36   m_dipsetting(0)
37            {
3738}
3839
3940
trunk/src/devices/bus/nes/bootleg.cpp
r250291r250292
6666}
6767
6868nes_sc127_device::nes_sc127_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
69               : nes_nrom_device(mconfig, NES_SC127, "NES Cart SC-127 PCB", tag, owner, clock, "nes_sc127", __FILE__)
70{
69               : nes_nrom_device(mconfig, NES_SC127, "NES Cart SC-127 PCB", tag, owner, clock, "nes_sc127", __FILE__), m_irq_count(0), m_irq_enable(0)
70            {
7171}
7272
7373nes_mbaby_device::nes_mbaby_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
74               : nes_nrom_device(mconfig, NES_MARIOBABY, "NES Cart Mario Baby Bootleg PCB", tag, owner, clock, "nes_mbaby", __FILE__)
75{
74               : nes_nrom_device(mconfig, NES_MARIOBABY, "NES Cart Mario Baby Bootleg PCB", tag, owner, clock, "nes_mbaby", __FILE__), m_latch(0), m_irq_enable(0), irq_timer(nullptr)
75            {
7676}
7777
7878nes_asn_device::nes_asn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
79               : nes_nrom_device(mconfig, NES_ASN, "NES Cart Ai Senshi Nicol Bootleg PCB", tag, owner, clock, "nes_asn", __FILE__)
80{
79               : nes_nrom_device(mconfig, NES_ASN, "NES Cart Ai Senshi Nicol Bootleg PCB", tag, owner, clock, "nes_asn", __FILE__), m_latch(0)
80            {
8181}
8282
8383nes_smb3p_device::nes_smb3p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
84               : nes_nrom_device(mconfig, NES_SMB3PIRATE, "NES Cart Super Mario Bros. 3 Pirate PCB", tag, owner, clock, "nes_smb3p", __FILE__)
85{
84               : nes_nrom_device(mconfig, NES_SMB3PIRATE, "NES Cart Super Mario Bros. 3 Pirate PCB", tag, owner, clock, "nes_smb3p", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
85            {
8686}
8787
8888nes_btl_dn_device::nes_btl_dn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
89               : nes_nrom_device(mconfig, NES_BTL_DNINJA, "NES Cart DragonNinja Pirate PCB", tag, owner, clock, "nes_btl_dn", __FILE__)
90{
89               : nes_nrom_device(mconfig, NES_BTL_DNINJA, "NES Cart DragonNinja Pirate PCB", tag, owner, clock, "nes_btl_dn", __FILE__), m_irq_count(0)
90            {
9191}
9292
9393nes_whirl2706_device::nes_whirl2706_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
94               : nes_nrom_device(mconfig, NES_WHIRLWIND_2706, "NES Cart Whirlwind 2706 PCB", tag, owner, clock, "nes_whirl2706", __FILE__)
95{
94               : nes_nrom_device(mconfig, NES_WHIRLWIND_2706, "NES Cart Whirlwind 2706 PCB", tag, owner, clock, "nes_whirl2706", __FILE__), m_latch(0)
95            {
9696}
9797
9898nes_smb2j_device::nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
99               : nes_nrom_device(mconfig, NES_SMB2J, "NES Cart Super Mario Bros. 2 Jpn PCB", tag, owner, clock, "nes_smb2j", __FILE__)
100{
99               : nes_nrom_device(mconfig, NES_SMB2J, "NES Cart Super Mario Bros. 2 Jpn PCB", tag, owner, clock, "nes_smb2j", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
100            {
101101}
102102
103103nes_smb2ja_device::nes_smb2ja_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
104               : nes_nrom_device(mconfig, NES_SMB2JA, "NES Cart Super Mario Bros. 2 Jpn (Alt) PCB", tag, owner, clock, "nes_smb2ja", __FILE__)
105{
104               : nes_nrom_device(mconfig, NES_SMB2JA, "NES Cart Super Mario Bros. 2 Jpn (Alt) PCB", tag, owner, clock, "nes_smb2ja", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
105            {
106106}
107107
108108nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
109               : nes_nrom_device(mconfig, NES_SMB2JB, "NES Cart Super Mario Bros. 2 Jpn (Alt 2) PCB", tag, owner, clock, "nes_smb2jb", __FILE__)
110{
109               : nes_nrom_device(mconfig, NES_SMB2JB, "NES Cart Super Mario Bros. 2 Jpn (Alt 2) PCB", tag, owner, clock, "nes_smb2jb", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
110            {
111111}
112112
113113nes_09034a_device::nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
114               : nes_nrom_device(mconfig, NES_09034A, "NES Cart 09-034A PCB", tag, owner, clock, "nes_09034a", __FILE__)
115{
114               : nes_nrom_device(mconfig, NES_09034A, "NES Cart 09-034A PCB", tag, owner, clock, "nes_09034a", __FILE__), m_reg(0)
115            {
116116}
117117
118118nes_tobidase_device::nes_tobidase_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
119               : nes_nrom_device(mconfig, NES_TOBIDASE, "NES Cart Tobidase Daisakusen Pirate PCB", tag, owner, clock, "nes_tobidase", __FILE__)
120{
119               : nes_nrom_device(mconfig, NES_TOBIDASE, "NES Cart Tobidase Daisakusen Pirate PCB", tag, owner, clock, "nes_tobidase", __FILE__), m_latch(0)
120            {
121121}
122122
123123nes_lh32_device::nes_lh32_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
124               : nes_nrom_device(mconfig, NES_LH32, "NES Cart LH-32 Pirate PCB", tag, owner, clock, "nes_lh32", __FILE__)
125{
124               : nes_nrom_device(mconfig, NES_LH32, "NES Cart LH-32 Pirate PCB", tag, owner, clock, "nes_lh32", __FILE__), m_latch(0)
125            {
126126}
127127
128128nes_lh10_device::nes_lh10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
129               : nes_nrom_device(mconfig, NES_LH10, "NES Cart LH-10 Pirate PCB", tag, owner, clock, "nes_lh10", __FILE__)
130{
129               : nes_nrom_device(mconfig, NES_LH10, "NES Cart LH-10 Pirate PCB", tag, owner, clock, "nes_lh10", __FILE__), m_latch(0)
130            {
131131}
132132
133133nes_lh53_device::nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
134               : nes_nrom_device(mconfig, NES_LH53, "NES Cart LH-53 Pirate PCB", tag, owner, clock, "nes_lh53", __FILE__)
135{
134               : nes_nrom_device(mconfig, NES_LH53, "NES Cart LH-53 Pirate PCB", tag, owner, clock, "nes_lh53", __FILE__), m_irq_count(0), m_irq_enable(0), m_reg(0), irq_timer(nullptr)
135            {
136136}
137137
138138nes_2708_device::nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
141141}
142142
143143nes_ac08_device::nes_ac08_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
144               : nes_nrom_device(mconfig, NES_AC08, "NES Cart AC08 Pirate PCB", tag, owner, clock, "nes_ac08", __FILE__)
145{
144               : nes_nrom_device(mconfig, NES_AC08, "NES Cart AC08 Pirate PCB", tag, owner, clock, "nes_ac08", __FILE__), m_latch(0)
145            {
146146}
147147
148148nes_unl_bb_device::nes_unl_bb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
156156}
157157
158158nes_shuiguan_device::nes_shuiguan_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
159               : nes_nrom_device(mconfig, NES_SHUIGUAN, "NES Cart Shui Guan Pipe Pirate PCB", tag, owner, clock, "nes_shuiguan", __FILE__)
160{
159               : nes_nrom_device(mconfig, NES_SHUIGUAN, "NES Cart Shui Guan Pipe Pirate PCB", tag, owner, clock, "nes_shuiguan", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
160            {
161161}
162162
163163
trunk/src/devices/bus/nes/camerica.cpp
r250291r250292
5252}
5353
5454nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
55               : nes_nrom_device(mconfig, NES_BF9096, "NES Cart Camerica BF9096 PCB", tag, owner, clock, "nes_bf9096", __FILE__)
56{
55               : nes_nrom_device(mconfig, NES_BF9096, "NES Cart Camerica BF9096 PCB", tag, owner, clock, "nes_bf9096", __FILE__), m_bank_base(0), m_latch(0)
56            {
5757}
5858
5959nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
60               : nes_nrom_device(mconfig, NES_GOLDEN5, "NES Cart Camerica Golden 5 PCB", tag, owner, clock, "nes_golden5", __FILE__)
61{
60               : nes_nrom_device(mconfig, NES_GOLDEN5, "NES Cart Camerica Golden 5 PCB", tag, owner, clock, "nes_golden5", __FILE__), m_bank_base(0), m_latch(0)
61            {
6262}
6363
6464
trunk/src/devices/bus/nes/cony.cpp
r250291r250292
4040
4141
4242nes_cony_device::nes_cony_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
43               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
44{
43               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source),
44   m_irq_count(0),
45   m_irq_enable(0),
46   irq_timer(nullptr),
47   m_latch1(0),
48   m_latch2(0),
49   m_extra1(0)
50            {
4551}
4652
4753nes_cony_device::nes_cony_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48               : nes_nrom_device(mconfig, NES_CONY, "NES Cart Cony PCB", tag, owner, clock, "nes_cony", __FILE__)
49{
54               : nes_nrom_device(mconfig, NES_CONY, "NES Cart Cony PCB", tag, owner, clock, "nes_cony", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch1(0), m_latch2(0), m_extra1(0)
55            {
5056}
5157
5258nes_yoko_device::nes_yoko_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53               : nes_cony_device(mconfig, NES_YOKO, "NES Cart Yoko PCB", tag, owner, clock, "nes_yoko", __FILE__)
54{
59               : nes_cony_device(mconfig, NES_YOKO, "NES Cart Yoko PCB", tag, owner, clock, "nes_yoko", __FILE__), m_extra2(0)
60            {
5561}
5662
5763
trunk/src/devices/bus/nes/datach.cpp
r250291r250292
4545datach_cart_interface::datach_cart_interface(const machine_config &mconfig, device_t &device)
4646               : device_slot_card_interface(mconfig, device),
4747                  m_i2cmem(*this, "i2cmem"),
48                  m_rom(NULL)
49{
48                  m_rom(nullptr), m_bank(0)
49            {
5050}
5151
5252datach_cart_interface::~datach_cart_interface()
r250291r250292
7070nes_datach_slot_device::nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7171                  device_t(mconfig, NES_DATACH_SLOT, "NES Datach Cartridge Slot", tag, owner, clock, "nes_datach_slot", __FILE__),
7272                  device_image_interface(mconfig, *this),
73                  device_slot_interface(mconfig, *this)
73                  device_slot_interface(mconfig, *this), m_cart(nullptr)
7474{
7575}
7676
r250291r250292
228228
229229
230230nes_datach_device::nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
231               : nes_lz93d50_device(mconfig, NES_DATACH, "NES Cart Bandai Datach PCB", tag, owner, clock, "nes_datach", __FILE__),
231               : nes_lz93d50_device(mconfig, NES_DATACH, "NES Cart Bandai Datach PCB", tag, owner, clock, "nes_datach", __FILE__), m_datach_latch(0),
232232                  m_i2cmem(*this, "i2cmem"),
233233                  m_reader(*this, "datach"),
234                  m_subslot(*this, "datach_slot")
235{
234                  m_subslot(*this, "datach_slot"), m_i2c_dir(0), m_i2c_in_use(0), serial_timer(nullptr)
235            {
236236}
237237
238238
trunk/src/devices/bus/nes/disksys.cpp
r250291r250292
104104
105105
106106nes_disksys_device::nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
107               : nes_nrom_device(mconfig, NES_DISKSYS, "FC RAM Expansion + Disk System PCB", tag, owner, clock, "fc_disksys", __FILE__),
107               : nes_nrom_device(mconfig, NES_DISKSYS, "FC RAM Expansion + Disk System PCB", tag, owner, clock, "fc_disksys", __FILE__), m_2c33_rom(nullptr),
108108                  m_fds_data(NULL),
109                  m_disk(*this, FLOPPY_0),
110                  m_fds_sides(0)
111{
109                  m_disk(*this, FLOPPY_0), irq_timer(nullptr), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_transfer(0), m_fds_motor_on(0), m_fds_door_closed(0), m_fds_current_side(0), m_fds_head_position(0), m_fds_status0(0), m_read_mode(0), m_drive_ready(0),
110                  m_fds_sides(0), m_fds_last_side(0), m_fds_count(0)
111            {
112112}
113113
114114
trunk/src/devices/bus/nes/event.cpp
r250291r250292
3737
3838nes_event_device::nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3939               : nes_sxrom_device(mconfig, NES_EVENT, "NES Cart Event PCB", tag, owner, clock, "nes_event", __FILE__),
40                  m_dsw(*this, "DIPSW")
41{
40                  m_dsw(*this, "DIPSW"),
41   m_nwc_init(0),
42   event_timer(nullptr),
43   m_timer_count(0),
44   m_timer_on(0),
45   m_timer_enabled(0)
46            {
4247}
4348
4449
trunk/src/devices/bus/nes/ggenie.cpp
r250291r250292
3636
3737nes_ggenie_device::nes_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3838               : nes_nrom_device(mconfig, NES_GGENIE, "NES Cart Game Genie PCB", tag, owner, clock, "nes_ggenie", __FILE__),
39                  m_ggslot(*this, "gg_slot")
40{
39                  m_ggslot(*this, "gg_slot"),
40   m_gg_bypass(0)
41            {
4142}
4243
4344
trunk/src/devices/bus/nes/henggedianzi.cpp
r250291r250292
5454}
5555
5656nes_hengg_shjy3_device::nes_hengg_shjy3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
57               : nes_nrom_device(mconfig, NES_HENGG_SHJY3, "NES Cart Henggedianzi Shen Hua Jian Yun III PCB", tag, owner, clock, "nes_hengg_shjy3", __FILE__)
58{
57               : nes_nrom_device(mconfig, NES_HENGG_SHJY3, "NES Cart Henggedianzi Shen Hua Jian Yun III PCB", tag, owner, clock, "nes_hengg_shjy3", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_chr_mode(0)
58            {
5959}
6060
6161
trunk/src/devices/bus/nes/hosenkan.cpp
r250291r250292
3333
3434
3535nes_hosenkan_device::nes_hosenkan_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
36               : nes_nrom_device(mconfig, NES_HOSENKAN, "NES Cart HOSENKAN PCB", tag, owner, clock, "nes_hosenkan", __FILE__)
37{
36               : nes_nrom_device(mconfig, NES_HOSENKAN, "NES Cart HOSENKAN PCB", tag, owner, clock, "nes_hosenkan", __FILE__),
37   m_irq_count(0),
38   m_irq_count_latch(0),
39   m_irq_clear(0),
40   m_irq_enable(0),
41   m_latch(0)
42            {
3843}
3944
4045
trunk/src/devices/bus/nes/irem.cpp
r250291r250292
5858}
5959
6060nes_g101_device::nes_g101_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
61               : nes_nrom_device(mconfig, NES_G101, "NES Cart Irem G-101 PCB", tag, owner, clock, "nes_g101", __FILE__)
62{
61               : nes_nrom_device(mconfig, NES_G101, "NES Cart Irem G-101 PCB", tag, owner, clock, "nes_g101", __FILE__), m_latch(0)
62            {
6363}
6464
6565nes_h3001_device::nes_h3001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66               : nes_nrom_device(mconfig, NES_H3001, "NES Cart Irem H-3001 PCB", tag, owner, clock, "nes_h3001", __FILE__)
67{
66               : nes_nrom_device(mconfig, NES_H3001, "NES Cart Irem H-3001 PCB", tag, owner, clock, "nes_h3001", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), irq_timer(nullptr)
67            {
6868}
6969
7070
trunk/src/devices/bus/nes/jaleco.cpp
r250291r250292
6868}
6969
7070nes_jf17_device::nes_jf17_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
71               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
72{
71               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0)
72            {
7373}
7474
7575nes_jf17_device::nes_jf17_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
76               : nes_nrom_device(mconfig, NES_JF17, "NES Cart Jaleco JF-17 PCB", tag, owner, clock, "nes_jf17", __FILE__)
77{
76               : nes_nrom_device(mconfig, NES_JF17, "NES Cart Jaleco JF-17 PCB", tag, owner, clock, "nes_jf17", __FILE__), m_latch(0)
77            {
7878}
7979
8080nes_jf17_adpcm_device::nes_jf17_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
100100}
101101
102102nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
103               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
104{
103               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0)
104            {
105105}
106106
107107nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
108               : nes_nrom_device(mconfig, NES_SS88006, "NES Cart Jaleco SS88006 PCB", tag, owner, clock, "nes_ss88006", __FILE__)
109{
108               : nes_nrom_device(mconfig, NES_SS88006, "NES Cart Jaleco SS88006 PCB", tag, owner, clock, "nes_ss88006", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0)
109            {
110110}
111111
112112nes_ss88006_adpcm_device::nes_ss88006_adpcm_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
trunk/src/devices/bus/nes/jy.cpp
r250291r250292
4343
4444
4545nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
46               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
47{
46               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0), m_extra_chr_bank(0), m_extra_chr_mask(0), m_bank_6000(0),
47   m_irq_mode(0), m_irq_count(0), m_irq_prescale(0), m_irq_prescale_mask(0), m_irq_flip(0), m_irq_enable(0), m_irq_up(0), m_irq_down(0), irq_timer(nullptr)
48            {
4849}
4950
5051nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
51               : nes_nrom_device(mconfig, NES_JY_TYPEA, "NES Cart JY Company Type A PCB", tag, owner, clock, "nes_jya", __FILE__)
52               : nes_nrom_device(mconfig, NES_JY_TYPEA, "NES Cart JY Company Type A PCB", tag, owner, clock, "nes_jya", __FILE__), m_latch(0), m_extra_chr_bank(0),
53   m_extra_chr_mask(0), m_bank_6000(0), m_irq_mode(0), m_irq_count(0), m_irq_prescale(0), m_irq_prescale_mask(0), m_irq_flip(0), m_irq_enable(0), m_irq_up(0),
54   m_irq_down(0), irq_timer(nullptr)
5255{
5356}
5457
trunk/src/devices/bus/nes/kaiser.cpp
r250291r250292
6363}
6464
6565nes_ks7022_device::nes_ks7022_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66               : nes_nrom_device(mconfig, NES_KS7022, "NES Cart Kaiser KS-7022 PCB", tag, owner, clock, "nes_ks7022", __FILE__)
67{
66               : nes_nrom_device(mconfig, NES_KS7022, "NES Cart Kaiser KS-7022 PCB", tag, owner, clock, "nes_ks7022", __FILE__), m_latch(0)
67            {
6868}
6969
7070nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
71               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
72{
71               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
72            {
7373}
7474
7575nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
76               : nes_nrom_device(mconfig, NES_KS7032, "NES Cart Kaiser KS-7032 PCB", tag, owner, clock, "nes_ks7032", __FILE__)
77{
76               : nes_nrom_device(mconfig, NES_KS7032, "NES Cart Kaiser KS-7032 PCB", tag, owner, clock, "nes_ks7032", __FILE__), m_latch(0), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
77            {
7878}
7979
8080nes_ks202_device::nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
8383}
8484
8585nes_ks7017_device::nes_ks7017_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
86               : nes_nrom_device(mconfig, NES_KS7017, "NES Cart Kaiser KS-7017 PCB", tag, owner, clock, "nes_ks7017", __FILE__)
87{
86               : nes_nrom_device(mconfig, NES_KS7017, "NES Cart Kaiser KS-7017 PCB", tag, owner, clock, "nes_ks7017", __FILE__), m_latch(0), m_irq_count(0), m_irq_status(0), m_irq_enable(0), irq_timer(nullptr)
87            {
8888}
8989
9090nes_ks7012_device::nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/karastudio.cpp
r250291r250292
5252
5353kstudio_cart_interface::kstudio_cart_interface(const machine_config &mconfig, device_t &device)
5454               : device_slot_card_interface(mconfig, device),
55               m_rom(NULL)
56{
55               m_rom(nullptr), m_bank(0)
56            {
5757}
5858
5959kstudio_cart_interface::~kstudio_cart_interface()
r250291r250292
7474nes_kstudio_slot_device::nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7575                     device_t(mconfig, NES_KSEXPANSION_SLOT, "NES Karaoke Studio Expansion Slot", tag, owner, clock, "nes_ks_slot", __FILE__),
7676                     device_image_interface(mconfig, *this),
77                     device_slot_interface(mconfig, *this)
77                     device_slot_interface(mconfig, *this), m_cart(nullptr)
7878{
7979}
8080
r250291r250292
188188
189189
190190nes_karaokestudio_device::nes_karaokestudio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
191               : nes_nrom_device(mconfig, NES_KARAOKESTUDIO, "NES Cart Bandai Karaoke Studio PCB", tag, owner, clock, "nes_karaoke", __FILE__),
191               : nes_nrom_device(mconfig, NES_KARAOKESTUDIO, "NES Cart Bandai Karaoke Studio PCB", tag, owner, clock, "nes_karaoke", __FILE__), m_exp_active(0),
192192               m_subslot(*this, "exp_slot"),
193193               m_mic_ipt(*this, "MIC")
194194{
trunk/src/devices/bus/nes/konami.cpp
r250291r250292
5757}
5858
5959nes_konami_vrc2_device::nes_konami_vrc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
60               : nes_nrom_device(mconfig, NES_VRC2, "NES Cart Konami VRC-2 PCB", tag, owner, clock, "nes_vrc2", __FILE__)
61{
60               : nes_nrom_device(mconfig, NES_VRC2, "NES Cart Konami VRC-2 PCB", tag, owner, clock, "nes_vrc2", __FILE__), m_latch(0)
61            {
6262}
6363
6464nes_konami_vrc3_device::nes_konami_vrc3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
65               : nes_nrom_device(mconfig, NES_VRC3, "NES Cart Konami VRC-3 PCB", tag, owner, clock, "nes_vrc3", __FILE__)
66{
65               : nes_nrom_device(mconfig, NES_VRC3, "NES Cart Konami VRC-3 PCB", tag, owner, clock, "nes_vrc3", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0), m_irq_mode(0), irq_timer(nullptr)
66            {
6767}
6868
6969nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
70               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
71{
70               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0), m_mmc_prg_bank(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0), m_irq_mode(0), m_irq_prescale(0), irq_timer(nullptr)
71            {
7272}
7373
7474nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
75               : nes_nrom_device(mconfig, NES_VRC4, "NES Cart Konami VRC-4 PCB", tag, owner, clock, "nes_vrc4", __FILE__)
76{
75               : nes_nrom_device(mconfig, NES_VRC4, "NES Cart Konami VRC-4 PCB", tag, owner, clock, "nes_vrc4", __FILE__), m_latch(0), m_mmc_prg_bank(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0), m_irq_mode(0), m_irq_prescale(0), irq_timer(nullptr)
76            {
7777}
7878
7979nes_konami_vrc6_device::nes_konami_vrc6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/legacy.cpp
r250291r250292
4545}
4646
4747nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
48               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
49{
48               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_exram_enabled(0), m_exram_bank(0)
49            {
5050}
5151
5252nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53               : nes_nrom_device(mconfig, NES_FFE4, "NES Cart FFE-4 PCB", tag, owner, clock, "nes_ff4", __FILE__)
54{
53               : nes_nrom_device(mconfig, NES_FFE4, "NES Cart FFE-4 PCB", tag, owner, clock, "nes_ff4", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_exram_enabled(0), m_exram_bank(0)
54            {
5555}
5656
5757nes_ffe8_device::nes_ffe8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/mmc1.cpp
r250291r250292
4040
4141
4242nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
43               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
44{
43               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_reg_write_enable(0), m_latch(0), m_count(0)
44            {
4545}
4646
4747nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48               : nes_nrom_device(mconfig, NES_SXROM, "NES Cart SxROM (MMC-1) PCB", tag, owner, clock, "nes_sxrom", __FILE__)
49{
48               : nes_nrom_device(mconfig, NES_SXROM, "NES Cart SxROM (MMC-1) PCB", tag, owner, clock, "nes_sxrom", __FILE__), m_reg_write_enable(0), m_latch(0), m_count(0)
49            {
5050}
5151
5252nes_sorom_device::nes_sorom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/mmc2.cpp
r250291r250292
3333
3434
3535nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
36               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
37{
36               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source),
37   m_latch1(0),
38   m_latch2(0)
39            {
3840}
3941
4042nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
41               : nes_nrom_device(mconfig, NES_PXROM, "NES Cart PxROM (MMC-2) PCB", tag, owner, clock, "nes_pxrom", __FILE__)
42{
43               : nes_nrom_device(mconfig, NES_PXROM, "NES Cart PxROM (MMC-2) PCB", tag, owner, clock, "nes_pxrom", __FILE__), m_latch1(0), m_latch2(0)
44            {
4345}
4446
4547nes_fxrom_device::nes_fxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/mmc3.cpp
r250291r250292
5454
5555
5656nes_txrom_device::nes_txrom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
57               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
58{
57               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_prg_base(0), m_prg_mask(0), m_chr_base(0), m_chr_mask(0),
58   m_latch(0), m_wram_protect(0), m_alt_irq(0), m_irq_count(0), m_irq_count_latch(0), m_irq_clear(0), m_irq_enable(0)
59            {
5960}
6061
6162nes_txrom_device::nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
62               : nes_nrom_device(mconfig, NES_TXROM, "NES Cart TxROM (MMC-3) PCB", tag, owner, clock, "nes_txrom", __FILE__)
63{
63               : nes_nrom_device(mconfig, NES_TXROM, "NES Cart TxROM (MMC-3) PCB", tag, owner, clock, "nes_txrom", __FILE__), m_prg_base(0), m_prg_mask(0), m_chr_base(0), m_chr_mask(0),
64   m_latch(0), m_wram_protect(0), m_alt_irq(0), m_irq_count(0), m_irq_count_latch(0), m_irq_clear(0), m_irq_enable(0)
65            {
6466}
6567
6668nes_hkrom_device::nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
67               : nes_txrom_device(mconfig, NES_HKROM, "NES Cart HKROM (MMC-6) PCB", tag, owner, clock, "nes_hkrom", __FILE__)
68{
69               : nes_txrom_device(mconfig, NES_HKROM, "NES Cart HKROM (MMC-6) PCB", tag, owner, clock, "nes_hkrom", __FILE__), m_wram_enable(0), m_mmc6_reg(0)
70            {
6971}
7072
7173nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/mmc3_clones.cpp
r250291r250292
9696}
9797
9898nes_8237_device::nes_8237_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
99               : nes_txrom_device(mconfig, NES_8237, "NES Cart UNL-8237 PCB", tag, owner, clock, "nes_8237", __FILE__)
100{
99               : nes_txrom_device(mconfig, NES_8237, "NES Cart UNL-8237 PCB", tag, owner, clock, "nes_8237", __FILE__), m_cd_enable(0)
100            {
101101}
102102
103103nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
104               : nes_txrom_device(mconfig, NES_SG_LIONK, "NES Cart SuperGame Lion King PCB", tag, owner, clock, "nes_sglionk", __FILE__)
105{
104               : nes_txrom_device(mconfig, NES_SG_LIONK, "NES Cart SuperGame Lion King PCB", tag, owner, clock, "nes_sglionk", __FILE__), m_reg(0), m_reg_enabled(0)
105            {
106106}
107107
108108nes_sgboog_device::nes_sgboog_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
109               : nes_txrom_device(mconfig, NES_SG_BOOG, "NES Cart SuperGame BoogerMan PCB", tag, owner, clock, "nes_sgbooger", __FILE__)
110{
109               : nes_txrom_device(mconfig, NES_SG_BOOG, "NES Cart SuperGame BoogerMan PCB", tag, owner, clock, "nes_sgbooger", __FILE__), m_mode(0)
110            {
111111}
112112
113113nes_kasing_device::nes_kasing_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
114               : nes_txrom_device(mconfig, NES_KASING, "NES Cart Kasing PCB", tag, owner, clock, "nes_kasing", __FILE__)
115{
114               : nes_txrom_device(mconfig, NES_KASING, "NES Cart Kasing PCB", tag, owner, clock, "nes_kasing", __FILE__), m_reg(0)
115            {
116116}
117117
118118nes_kay_device::nes_kay_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
119               : nes_txrom_device(mconfig, NES_KAY, "NES Cart KAY PCB", tag, owner, clock, "nes_kay", __FILE__)
120{
119               : nes_txrom_device(mconfig, NES_KAY, "NES Cart KAY PCB", tag, owner, clock, "nes_kay", __FILE__), m_low_reg(0)
120            {
121121}
122122
123123nes_h2288_device::nes_h2288_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
126126}
127127
128128nes_6035052_device::nes_6035052_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
129               : nes_txrom_device(mconfig, NES_6035052, "NES Cart UNL-603-5052 PCB", tag, owner, clock, "nes_6035052", __FILE__)
130{
129               : nes_txrom_device(mconfig, NES_6035052, "NES Cart UNL-603-5052 PCB", tag, owner, clock, "nes_6035052", __FILE__), m_prot(0)
130            {
131131}
132132
133133nes_txc_tw_device::nes_txc_tw_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
156156}
157157
158158nes_sa9602b_device::nes_sa9602b_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
159               : nes_txrom_device(mconfig, NES_SA9602B, "NES Cart SA-9602B PCB", tag, owner, clock, "nes_sa9602b", __FILE__)
160{
159               : nes_txrom_device(mconfig, NES_SA9602B, "NES Cart SA-9602B PCB", tag, owner, clock, "nes_sa9602b", __FILE__), m_reg(0), m_prg_chip(0)
160            {
161161}
162162
163163nes_sachen_shero_device::nes_sachen_shero_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
164               : nes_txrom_device(mconfig, NES_SACHEN_SHERO, "NES Cart Street Hero PCB", tag, owner, clock, "nes_shero", __FILE__)
165{
164               : nes_txrom_device(mconfig, NES_SACHEN_SHERO, "NES Cart Street Hero PCB", tag, owner, clock, "nes_shero", __FILE__), m_reg(0)
165            {
166166}
167167
168168//nes_a9746_device::nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
171171//}
172172
173173nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
174               : nes_txrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
175{
174               : nes_txrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_mmc_cmd1(0)
175            {
176176}
177177
178178nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
179               : nes_txrom_device(mconfig, NES_FK23C, "NES Cart FK23C PCB", tag, owner, clock, "nes_fk23c", __FILE__)
180{
179               : nes_txrom_device(mconfig, NES_FK23C, "NES Cart FK23C PCB", tag, owner, clock, "nes_fk23c", __FILE__), m_mmc_cmd1(0)
180            {
181181}
182182
183183nes_fk23ca_device::nes_fk23ca_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
201201}
202202
203203nes_bmc_hik8_device::nes_bmc_hik8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
204               : nes_txrom_device(mconfig, NES_BMC_HIK8, "NES Cart BMC Super HIK 8 in 1 PCB", tag, owner, clock, "nes_bmc_hik8", __FILE__)
205{
204               : nes_txrom_device(mconfig, NES_BMC_HIK8, "NES Cart BMC Super HIK 8 in 1 PCB", tag, owner, clock, "nes_bmc_hik8", __FILE__), m_count(0)
205            {
206206}
207207
208208nes_bmc_hik4_device::nes_bmc_hik4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
211211}
212212
213213nes_bmc_mario7in1_device::nes_bmc_mario7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
214               : nes_txrom_device(mconfig, NES_BMC_MARIO7IN1, "NES Cart BMC Mario 7 in 1 PCB", tag, owner, clock, "nes_bmc_mario7in1", __FILE__)
215{
214               : nes_txrom_device(mconfig, NES_BMC_MARIO7IN1, "NES Cart BMC Mario 7 in 1 PCB", tag, owner, clock, "nes_bmc_mario7in1", __FILE__), m_reg_written(0)
215            {
216216}
217217
218218nes_bmc_gold7in1_device::nes_bmc_gold7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
219               : nes_txrom_device(mconfig, NES_BMC_GOLD7IN1, "NES Cart BMC Golden 7 in 1 PCB", tag, owner, clock, "nes_bmc_gold7in1", __FILE__)
220{
219               : nes_txrom_device(mconfig, NES_BMC_GOLD7IN1, "NES Cart BMC Golden 7 in 1 PCB", tag, owner, clock, "nes_bmc_gold7in1", __FILE__), m_reg_written(0)
220            {
221221}
222222
223223nes_bmc_gc6in1_device::nes_bmc_gc6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
226226}
227227
228228nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
229               : nes_txrom_device(mconfig, NES_BMC_411120C, "NES Cart BMC 411120C PCB", tag, owner, clock, "nes_bmc_411120c", __FILE__)
230{
229               : nes_txrom_device(mconfig, NES_BMC_411120C, "NES Cart BMC 411120C PCB", tag, owner, clock, "nes_bmc_411120c", __FILE__), m_reg(0)
230            {
231231}
232232
233233nes_bmc_830118c_device::nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
234               : nes_txrom_device(mconfig, NES_BMC_830118C, "NES Cart BMC 830118C PCB", tag, owner, clock, "nes_bmc_830118c", __FILE__)
235{
234               : nes_txrom_device(mconfig, NES_BMC_830118C, "NES Cart BMC 830118C PCB", tag, owner, clock, "nes_bmc_830118c", __FILE__), m_reg(0)
235            {
236236}
237237
238238nes_pjoy84_device::nes_pjoy84_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/mmc5.cpp
r250291r250292
4545
4646
4747nes_exrom_device::nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48               : nes_nrom_device(mconfig, NES_EXROM, "NES Cart ExROM (MMC-5) PCB", tag, owner, clock, "nes_exrom", __FILE__)
49{
48               : nes_nrom_device(mconfig, NES_EXROM, "NES Cart ExROM (MMC-5) PCB", tag, owner, clock, "nes_exrom", __FILE__), m_irq_count(0),
49   m_irq_status(0), m_irq_enable(0), m_mult1(0), m_mult2(0), m_mmc5_scanline(0), m_vrom_page_a(0), m_vrom_page_b(0), m_floodtile(0), m_floodattr(0),
50   m_prg_mode(0), m_chr_mode(0), m_wram_protect_1(0), m_wram_protect_2(0), m_exram_control(0), m_wram_base(0), m_last_chr(0), m_ex1_chr(0),
51   m_split_chr(0), m_ex1_bank(0), m_high_chr(0), m_split_scr(0), m_split_rev(0), m_split_ctrl(0), m_split_yst(0), m_split_bank(0), m_vcount(0)
52            {
5053}
5154
5255
trunk/src/devices/bus/nes/multigame.cpp
r250291r250292
8383}
8484
8585nes_caltron_device::nes_caltron_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
86               : nes_nrom_device(mconfig, NES_CALTRON6IN1, "NES Cart Caltron 6 in 1 PCB", tag, owner, clock, "nes_caltron", __FILE__)
87{
86               : nes_nrom_device(mconfig, NES_CALTRON6IN1, "NES Cart Caltron 6 in 1 PCB", tag, owner, clock, "nes_caltron", __FILE__), m_latch(0)
87            {
8888}
8989
9090nes_rumblestat_device::nes_rumblestat_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
91               : nes_nrom_device(mconfig, NES_RUMBLESTATION, "NES Cart Rumblestation PCB", tag, owner, clock, "nes_rumblestat", __FILE__)
92{
91               : nes_nrom_device(mconfig, NES_RUMBLESTATION, "NES Cart Rumblestation PCB", tag, owner, clock, "nes_rumblestat", __FILE__), m_prg(0), m_chr(0)
92            {
9393}
9494
9595nes_svision16_device::nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
96               : nes_nrom_device(mconfig, NES_SVISION16, "NES Cart Supervision 16 in 1 PCB", tag, owner, clock, "nes_svision16", __FILE__)
97{
96               : nes_nrom_device(mconfig, NES_SVISION16, "NES Cart Supervision 16 in 1 PCB", tag, owner, clock, "nes_svision16", __FILE__), m_latch1(0), m_latch2(0)
97            {
9898}
9999
100100nes_n625092_device::nes_n625092_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
101               : nes_nrom_device(mconfig, NES_N625092, "NES Cart N625092 PCB", tag, owner, clock, "nes_n625092", __FILE__)
102{
101               : nes_nrom_device(mconfig, NES_N625092, "NES Cart N625092 PCB", tag, owner, clock, "nes_n625092", __FILE__), m_latch1(0), m_latch2(0)
102            {
103103}
104104
105105nes_a65as_device::nes_a65as_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
108108}
109109
110110nes_t262_device::nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
111               : nes_nrom_device(mconfig, NES_T262, "NES Cart T-262 PCB", tag, owner, clock, "nes_t262", __FILE__)
112{
111               : nes_nrom_device(mconfig, NES_T262, "NES Cart T-262 PCB", tag, owner, clock, "nes_t262", __FILE__), m_latch1(0), m_latch2(0)
112            {
113113}
114114
115115nes_novel1_device::nes_novel1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
133133}
134134
135135nes_vt5201_device::nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
136               : nes_nrom_device(mconfig, NES_VT5201, "NES Cart VT5201 PCB", tag, owner, clock, "nes_vt5201", __FILE__)
137{
136               : nes_nrom_device(mconfig, NES_VT5201, "NES Cart VT5201 PCB", tag, owner, clock, "nes_vt5201", __FILE__), m_latch(0), m_dipsetting(0)
137            {
138138}
139139
140140nes_810544c_device::nes_810544c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
148148}
149149
150150nes_bmc_gb63_device::nes_bmc_gb63_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
151               : nes_nrom_device(mconfig, NES_BMC_GB63, "NES Cart BMC Ghostbusters 63 in 1 PCB", tag, owner, clock, "nes_bmc_gb63", __FILE__)
152{
151               : nes_nrom_device(mconfig, NES_BMC_GB63, "NES Cart BMC Ghostbusters 63 in 1 PCB", tag, owner, clock, "nes_bmc_gb63", __FILE__), m_latch(0), m_dipsetting(0), m_vram_disable(0)
152            {
153153}
154154
155155nes_bmc_gka_device::nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
156               : nes_nrom_device(mconfig, NES_BMC_GKA, "NES Cart BMC GK-A PCB", tag, owner, clock, "nes_bmc_gka", __FILE__)
157{
156               : nes_nrom_device(mconfig, NES_BMC_GKA, "NES Cart BMC GK-A PCB", tag, owner, clock, "nes_bmc_gka", __FILE__), m_latch1(0), m_latch2(0)
157            {
158158}
159159
160160nes_bmc_gkb_device::nes_bmc_gkb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
163163}
164164
165165nes_bmc_ws_device::nes_bmc_ws_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
166               : nes_nrom_device(mconfig, NES_BMC_WS, "NES Cart BMC WS PCB", tag, owner, clock, "nes_bmc_ws", __FILE__)
167{
166               : nes_nrom_device(mconfig, NES_BMC_WS, "NES Cart BMC WS PCB", tag, owner, clock, "nes_bmc_ws", __FILE__), m_latch(0)
167            {
168168}
169169
170170nes_bmc_11160_device::nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
243243}
244244
245245nes_bmc_70in1_device::nes_bmc_70in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
246               : nes_nrom_device(mconfig, NES_BMC_70IN1, "NES Cart BMC 70 in 1 PCB", tag, owner, clock, "nes_bmc_70in1", __FILE__)
247{
246               : nes_nrom_device(mconfig, NES_BMC_70IN1, "NES Cart BMC 70 in 1 PCB", tag, owner, clock, "nes_bmc_70in1", __FILE__), m_mode(0)
247            {
248248}
249249
250250nes_bmc_72in1_device::nes_bmc_72in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
253253}
254254
255255nes_bmc_76in1_device::nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
256               : nes_nrom_device(mconfig, NES_BMC_76IN1, "NES Cart BMC 76 in 1 PCB", tag, owner, clock, "nes_bmc_76in1", __FILE__)
257{
256               : nes_nrom_device(mconfig, NES_BMC_76IN1, "NES Cart BMC 76 in 1 PCB", tag, owner, clock, "nes_bmc_76in1", __FILE__), m_latch1(0), m_latch2(0)
257            {
258258}
259259
260260nes_bmc_110in1_device::nes_bmc_110in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
273273}
274274
275275nes_bmc_800in1_device::nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
276               : nes_nrom_device(mconfig, NES_BMC_800IN1, "NES Cart BMC 800 in 1 PCB", tag, owner, clock, "nes_bmc_800in1", __FILE__)
277{
276               : nes_nrom_device(mconfig, NES_BMC_800IN1, "NES Cart BMC 800 in 1 PCB", tag, owner, clock, "nes_bmc_800in1", __FILE__), m_mode(0)
277            {
278278}
279279
280280nes_bmc_1200in1_device::nes_bmc_1200in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
281               : nes_nrom_device(mconfig, NES_BMC_1200IN1, "NES Cart BMC 1200 in 1 PCB", tag, owner, clock, "nes_bmc_1200in1", __FILE__)
282{
281               : nes_nrom_device(mconfig, NES_BMC_1200IN1, "NES Cart BMC 1200 in 1 PCB", tag, owner, clock, "nes_bmc_1200in1", __FILE__), m_vram_protect(0)
282            {
283283}
284284
285285nes_bmc_gold150_device::nes_bmc_gold150_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
286               : nes_nrom_device(mconfig, NES_BMC_GOLD150, "NES Cart BMC Golden 150 in 1 PCB", tag, owner, clock, "nes_bmc_gold150", __FILE__)
287{
286               : nes_nrom_device(mconfig, NES_BMC_GOLD150, "NES Cart BMC Golden 150 in 1 PCB", tag, owner, clock, "nes_bmc_gold150", __FILE__), m_latch(0)
287            {
288288}
289289
290290nes_bmc_gold260_device::nes_bmc_gold260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
293293}
294294
295295nes_bmc_ch001_device::nes_bmc_ch001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
296               : nes_nrom_device(mconfig, NES_BMC_CH001, "NES Cart BMC CH-001 PCB", tag, owner, clock, "nes_bmc_ch001", __FILE__)
297{
296               : nes_nrom_device(mconfig, NES_BMC_CH001, "NES Cart BMC CH-001 PCB", tag, owner, clock, "nes_bmc_ch001", __FILE__), m_latch(0)
297            {
298298}
299299
300300nes_bmc_super22_device::nes_bmc_super22_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
303303}
304304
305305nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
306               : nes_nrom_device(mconfig, NES_BMC_4IN1RESET, "NES Cart BMC 4 in 1 (Reset Based) PCB", tag, owner, clock, "nes_bmc_4in1reset", __FILE__)
307{
306               : nes_nrom_device(mconfig, NES_BMC_4IN1RESET, "NES Cart BMC 4 in 1 (Reset Based) PCB", tag, owner, clock, "nes_bmc_4in1reset", __FILE__), m_latch(0)
307            {
308308}
309309
310310nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
311               : nes_nrom_device(mconfig, NES_BMC_42IN1RESET, "NES Cart BMC 42 in 1 (Reset Based) PCB", tag, owner, clock, "nes_bmc_42in1reset", __FILE__)
312{
311               : nes_nrom_device(mconfig, NES_BMC_42IN1RESET, "NES Cart BMC 42 in 1 (Reset Based) PCB", tag, owner, clock, "nes_bmc_42in1reset", __FILE__), m_latch(0)
312            {
313313}
314314
315315
trunk/src/devices/bus/nes/namcot.cpp
r250291r250292
5050
5151
5252nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
53               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
54{
53               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0)
54            {
5555}
5656
5757nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
58               : nes_nrom_device(mconfig, NES_NAMCOT3433, "NES Cart Namcot 3433 & 3443 / DxROM PCB", tag, owner, clock, "nes_namcot3433", __FILE__)
59{
58               : nes_nrom_device(mconfig, NES_NAMCOT3433, "NES Cart Namcot 3433 & 3443 / DxROM PCB", tag, owner, clock, "nes_namcot3433", __FILE__), m_latch(0)
59            {
6060}
6161
6262nes_namcot3446_device::nes_namcot3446_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
63               : nes_nrom_device(mconfig, NES_NAMCOT3446, "NES Cart Namcot 3446 PCB", tag, owner, clock, "nes_namcot3446", __FILE__)
64{
63               : nes_nrom_device(mconfig, NES_NAMCOT3446, "NES Cart Namcot 3446 PCB", tag, owner, clock, "nes_namcot3446", __FILE__), m_latch(0)
64            {
6565}
6666
6767nes_namcot3425_device::nes_namcot3425_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
68               : nes_nrom_device(mconfig, NES_NAMCOT3425, "NES Cart Namcot 3425 PCB", tag, owner, clock, "nes_namcot3425", __FILE__)
69{
68               : nes_nrom_device(mconfig, NES_NAMCOT3425, "NES Cart Namcot 3425 PCB", tag, owner, clock, "nes_namcot3425", __FILE__), m_latch(0)
69            {
7070}
7171
7272nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
73               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
74{
73               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
74            {
7575}
7676
7777nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
78               : nes_nrom_device(mconfig, NES_NAMCOT175, "NES Cart Namcot 340 PCB", tag, owner, clock, "nes_namcot340", __FILE__)
79{
78               : nes_nrom_device(mconfig, NES_NAMCOT175, "NES Cart Namcot 340 PCB", tag, owner, clock, "nes_namcot340", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
79            {
8080}
8181
8282nes_namcot175_device::nes_namcot175_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
83               : nes_namcot340_device(mconfig, NES_NAMCOT340, "NES Cart Namcot 175 PCB", tag, owner, clock, "nes_namcot175", __FILE__)
84{
83               : nes_namcot340_device(mconfig, NES_NAMCOT340, "NES Cart Namcot 175 PCB", tag, owner, clock, "nes_namcot175", __FILE__), m_wram_protect(0)
84            {
8585}
8686
8787nes_namcot163_device::nes_namcot163_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
88               : nes_namcot340_device(mconfig, NES_NAMCOT163, "NES Cart Namcot 163 PCB", tag, owner, clock, "nes_namcot163", __FILE__)
89{
88               : nes_namcot340_device(mconfig, NES_NAMCOT163, "NES Cart Namcot 163 PCB", tag, owner, clock, "nes_namcot163", __FILE__), m_wram_protect(0), m_latch(0), m_chr_bank(0)
89            {
9090}
9191
9292
trunk/src/devices/bus/nes/nanjing.cpp
r250291r250292
3434
3535
3636nes_nanjing_device::nes_nanjing_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
37               : nes_nrom_device(mconfig, NES_NANJING, "NES Cart Nanjing PCB", tag, owner, clock, "nes_nanjing", __FILE__)
38{
37               : nes_nrom_device(mconfig, NES_NANJING, "NES Cart Nanjing PCB", tag, owner, clock, "nes_nanjing", __FILE__),
38   m_count(0),
39   m_latch1(0),
40   m_latch2(0)
41            {
3942}
4043
4144
trunk/src/devices/bus/nes/nes_slot.cpp
r250291r250292
110110                  m_vrom(NULL),
111111                  m_ciram(NULL),
112112                  m_prg_size(0),
113                  m_vrom_size(0),
113                  m_vrom_size(0), m_maincpu(nullptr),
114114                  m_mapper_sram(NULL),
115115                  m_mapper_sram_size(0),
116116                  m_ce_mask(0),
r250291r250292
746746                  device_t(mconfig, NES_CART_SLOT, "NES Cartridge Slot", tag, owner, clock, "nes_cart_slot", __FILE__),
747747                  device_image_interface(mconfig, *this),
748748                  device_slot_interface(mconfig, *this),
749                  m_crc_hack(0),
749                  m_crc_hack(0), m_cart(nullptr),
750750                  m_pcb_id(NO_BOARD),
751751                  m_must_be_loaded(1)
752752{
trunk/src/devices/bus/nes/ntdec.cpp
r250291r250292
3939
4040
4141nes_ntdec_asder_device::nes_ntdec_asder_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
42               : nes_nrom_device(mconfig, NES_NTDEC_ASDER, "NES Cart NTDEC Asder PCB", tag, owner, clock, "nes_ntdec_asder", __FILE__)
43{
42               : nes_nrom_device(mconfig, NES_NTDEC_ASDER, "NES Cart NTDEC Asder PCB", tag, owner, clock, "nes_ntdec_asder", __FILE__),
43   m_latch(0)
44            {
4445}
4546
4647nes_ntdec_fh_device::nes_ntdec_fh_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/nxrom.cpp
r250291r250292
9292}
9393
9494nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
95               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
96{
95               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_chr_open_bus(0)
96            {
9797}
9898
9999nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
100               : nes_nrom_device(mconfig, NES_CNROM, "NES Cart CNROM PCB", tag, owner, clock, "nes_cnrom", __FILE__)
101{
100               : nes_nrom_device(mconfig, NES_CNROM, "NES Cart CNROM PCB", tag, owner, clock, "nes_cnrom", __FILE__), m_chr_open_bus(0)
101            {
102102}
103103
104104nes_cprom_device::nes_cprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/pirate.cpp
r250291r250292
6464}
6565
6666nes_fukutake_device::nes_fukutake_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
67               : nes_nrom_device(mconfig, NES_FUKUTAKE, "NES Cart Fukutake Study Box PCB", tag, owner, clock, "nes_fukutake", __FILE__)
68{
67               : nes_nrom_device(mconfig, NES_FUKUTAKE, "NES Cart Fukutake Study Box PCB", tag, owner, clock, "nes_fukutake", __FILE__), m_latch(0)
68            {
6969}
7070
7171nes_futuremedia_device::nes_futuremedia_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
72               : nes_nrom_device(mconfig, NES_FUTUREMEDIA, "NES Cart FutureMedia PCB", tag, owner, clock, "nes_futuremedia", __FILE__)
73{
72               : nes_nrom_device(mconfig, NES_FUTUREMEDIA, "NES Cart FutureMedia PCB", tag, owner, clock, "nes_futuremedia", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_clear(0), m_irq_enable(0)
73            {
7474}
7575
7676nes_magseries_device::nes_magseries_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
104104}
105105
106106nes_edu2k_device::nes_edu2k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
107               : nes_nrom_device(mconfig, NES_EDU2K, "NES Cart Educational Computer 2000 PCB", tag, owner, clock, "nes_edu2k", __FILE__)
108{
107               : nes_nrom_device(mconfig, NES_EDU2K, "NES Cart Educational Computer 2000 PCB", tag, owner, clock, "nes_edu2k", __FILE__), m_latch(0)
108            {
109109}
110110
111111nes_t230_device::nes_t230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
112               : nes_nrom_device(mconfig, NES_T230, "NES Cart T-230 PCB", tag, owner, clock, "nes_t230", __FILE__)
113{
112               : nes_nrom_device(mconfig, NES_T230, "NES Cart T-230 PCB", tag, owner, clock, "nes_t230", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_enable(0), m_irq_enable_latch(0)
113            {
114114}
115115
116116nes_mk2_device::nes_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
117               : nes_nrom_device(mconfig, NES_MK2, "NES Cart Mortal Kombat 2 PCB", tag, owner, clock, "nes_mk2", __FILE__)
118{
117               : nes_nrom_device(mconfig, NES_MK2, "NES Cart Mortal Kombat 2 PCB", tag, owner, clock, "nes_mk2", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_clear(0), m_irq_enable(0)
118            {
119119}
120120
121121nes_whero_device::nes_whero_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
122               : nes_nrom_device(mconfig, NES_WHERO, "NES Cart World Heroes PCB", tag, owner, clock, "nes_whero", __FILE__)
123{
122               : nes_nrom_device(mconfig, NES_WHERO, "NES Cart World Heroes PCB", tag, owner, clock, "nes_whero", __FILE__), m_reg(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0)
123            {
124124}
125125
126126nes_43272_device::nes_43272_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
127               : nes_nrom_device(mconfig, NES_43272, "NES Cart UNL-43272 PCB", tag, owner, clock, "nes_43272", __FILE__)
128{
127               : nes_nrom_device(mconfig, NES_43272, "NES Cart UNL-43272 PCB", tag, owner, clock, "nes_43272", __FILE__), m_latch(0)
128            {
129129}
130130
131131nes_tf1201_device::nes_tf1201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
132               : nes_nrom_device(mconfig, NES_TF1201, "NES Cart UNL-TF1201 PCB", tag, owner, clock, "nes_tf1201", __FILE__)
133{
132               : nes_nrom_device(mconfig, NES_TF1201, "NES Cart UNL-TF1201 PCB", tag, owner, clock, "nes_tf1201", __FILE__), m_prg(0), m_swap(0), m_irq_count(0), m_irq_enable(0), m_irq_enable_latch(0)
133            {
134134}
135135
136136nes_cityfight_device::nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
137               : nes_nrom_device(mconfig, NES_TF1201, "NES Cart City Fighter PCB", tag, owner, clock, "nes_cityfight", __FILE__)
138{
137               : nes_nrom_device(mconfig, NES_TF1201, "NES Cart City Fighter PCB", tag, owner, clock, "nes_cityfight", __FILE__), m_prg_reg(0), m_prg_mode(0), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr)
138            {
139139}
140140
141141
trunk/src/devices/bus/nes/racermate.cpp
r250291r250292
3636
3737
3838nes_racermate_device::nes_racermate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
39               : nes_nrom_device(mconfig, NES_RACERMATE, "NES Cart Racermate PCB", tag, owner, clock, "nes_racermate", __FILE__)
40{
39               : nes_nrom_device(mconfig, NES_RACERMATE, "NES Cart Racermate PCB", tag, owner, clock, "nes_racermate", __FILE__),
40   m_latch(0)
41            {
4142}
4243
4344
trunk/src/devices/bus/nes/rcm.cpp
r250291r250292
6767}
6868
6969nes_3dblock_device::nes_3dblock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
70               : nes_nrom_device(mconfig, NES_3DBLOCK, "NES Cart RCM 3D Block PCB", tag, owner, clock, "nes_3dblock", __FILE__)
71{
70               : nes_nrom_device(mconfig, NES_3DBLOCK, "NES Cart RCM 3D Block PCB", tag, owner, clock, "nes_3dblock", __FILE__), m_irq_count(0)
71            {
7272}
7373
7474
trunk/src/devices/bus/nes/rexsoft.cpp
r250291r250292
4040
4141
4242nes_rex_dbz5_device::nes_rex_dbz5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43               : nes_txrom_device(mconfig, NES_REX_DBZ5, "NES Cart Rex Soft DragonBall Z V PCB", tag, owner, clock, "nes_rex_dbz5", __FILE__)
44{
43               : nes_txrom_device(mconfig, NES_REX_DBZ5, "NES Cart Rex Soft DragonBall Z V PCB", tag, owner, clock, "nes_rex_dbz5", __FILE__),
44   m_extra(0)
45            {
4546}
4647
4748nes_rex_sl1632_device::nes_rex_sl1632_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48               : nes_txrom_device(mconfig, NES_REX_SL1632, "NES Cart Rex Soft SL-1632 PCB", tag, owner, clock, "nes_rex_sl1632", __FILE__)
49{
49               : nes_txrom_device(mconfig, NES_REX_SL1632, "NES Cart Rex Soft SL-1632 PCB", tag, owner, clock, "nes_rex_sl1632", __FILE__), m_mode(0), m_mirror(0)
50            {
5051}
5152
5253
trunk/src/devices/bus/nes/sachen.cpp
r250291r250292
9696}
9797
9898nes_sachen_tcu02_device::nes_sachen_tcu02_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
99               : nes_nrom_device(mconfig, NES_SACHEN_TCU02, "NES Cart Sachen TCU-02 PCB", tag, owner, clock, "nes_tcu02", __FILE__)
100{
99               : nes_nrom_device(mconfig, NES_SACHEN_TCU02, "NES Cart Sachen TCU-02 PCB", tag, owner, clock, "nes_tcu02", __FILE__), m_latch(0)
100            {
101101}
102102
103103nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
104               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
105{
104               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_latch(0), m_mmc_vrom_bank(0)
105            {
106106}
107107
108108nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
109               : nes_nrom_device(mconfig, NES_SACHEN_74X374, "NES Cart Sachen 74*374 PCB", tag, owner, clock, "nes_s74x34", __FILE__)
110{
109               : nes_nrom_device(mconfig, NES_SACHEN_74X374, "NES Cart Sachen 74*374 PCB", tag, owner, clock, "nes_s74x34", __FILE__), m_latch(0), m_mmc_vrom_bank(0)
110            {
111111}
112112
113113nes_sachen_74x374_alt_device::nes_sachen_74x374_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/somari.cpp
r250291r250292
4040
4141
4242nes_somari_device::nes_somari_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43               : nes_txrom_device(mconfig, NES_SOMARI, "NES Cart Team Somari PCB", tag, owner, clock, "nes_somari", __FILE__)
44{
43               : nes_txrom_device(mconfig, NES_SOMARI, "NES Cart Team Somari PCB", tag, owner, clock, "nes_somari", __FILE__),
44   m_board_mode(0),
45   m_mmc3_mirror_reg(0),
46   m_count(0),
47   m_mmc1_latch(0),
48   m_vrc_mirror_reg(0)
49            {
4550}
4651
4752
trunk/src/devices/bus/nes/sunsoft.cpp
r250291r250292
5959}
6060
6161nes_sunsoft_3_device::nes_sunsoft_3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
62               : nes_nrom_device(mconfig, NES_SUNSOFT_3, "NES Cart Sunsoft 3 PCB", tag, owner, clock, "nes_sun3", __FILE__)
63{
62               : nes_nrom_device(mconfig, NES_SUNSOFT_3, "NES Cart Sunsoft 3 PCB", tag, owner, clock, "nes_sun3", __FILE__), m_irq_count(0), m_irq_enable(0), m_irq_toggle(0), irq_timer(nullptr)
63            {
6464}
6565
6666nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
67               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
68{
67               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_reg(0), m_latch1(0), m_latch2(0), m_wram_enable(0)
68            {
6969}
7070
7171nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
72               : nes_nrom_device(mconfig, NES_SUNSOFT_4, "NES Cart Sunsoft 4 PCB", tag, owner, clock, "nes_sun4", __FILE__)
73{
72               : nes_nrom_device(mconfig, NES_SUNSOFT_4, "NES Cart Sunsoft 4 PCB", tag, owner, clock, "nes_sun4", __FILE__), m_reg(0), m_latch1(0), m_latch2(0), m_wram_enable(0)
73            {
7474}
7575
7676nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
77               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
78{
77               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_wram_bank(0)
78            {
7979}
8080
8181nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
82               : nes_nrom_device(mconfig, NES_SUNSOFT_4, "NES Cart Sunsoft FME7 PCB", tag, owner, clock, "nes_fme7", __FILE__)
83{
82               : nes_nrom_device(mconfig, NES_SUNSOFT_4, "NES Cart Sunsoft FME7 PCB", tag, owner, clock, "nes_fme7", __FILE__), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_wram_bank(0)
83            {
8484}
8585
8686nes_sunsoft_5_device::nes_sunsoft_5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes/sunsoft_dcs.cpp
r250291r250292
5353nes_ntb_slot_device::nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5454                  device_t(mconfig, NES_NTB_SLOT, "NES NTB Cartridge Slot", tag, owner, clock, "nes_ntb_slot", __FILE__),
5555                  device_image_interface(mconfig, *this),
56                  device_slot_interface(mconfig, *this)
56                  device_slot_interface(mconfig, *this), m_cart(nullptr)
5757{
5858}
5959
r250291r250292
163163
164164
165165nes_sunsoft_dcs_device::nes_sunsoft_dcs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
166               : nes_sunsoft_4_device(mconfig, NES_SUNSOFT_DCS, "NES Cart Sunsoft DCS PCB", tag, owner, clock, "nes_dcs", __FILE__),
167                  m_subslot(*this, "ntb_slot")
168{
166               : nes_sunsoft_4_device(mconfig, NES_SUNSOFT_DCS, "NES Cart Sunsoft DCS PCB", tag, owner, clock, "nes_dcs", __FILE__), m_timer_on(0), m_exrom_enable(0),
167                  m_subslot(*this, "ntb_slot"), ntb_enable_timer(nullptr)
168            {
169169}
170170
171171
trunk/src/devices/bus/nes/taito.cpp
r250291r250292
5858}
5959
6060nes_tc0190fmc_pal16r4_device::nes_tc0190fmc_pal16r4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
61               : nes_tc0190fmc_device(mconfig, NES_TC0190FMC_PAL16R4, "NES Cart Taito TC0190FMC + PAL16R4 PCB", tag, owner, clock, "nes_tc0190pal", __FILE__)
62{
61               : nes_tc0190fmc_device(mconfig, NES_TC0190FMC_PAL16R4, "NES Cart Taito TC0190FMC + PAL16R4 PCB", tag, owner, clock, "nes_tc0190pal", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0)
62            {
6363}
6464
6565nes_x1_005_device::nes_x1_005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66               : nes_nrom_device(mconfig, NES_X1_005, "NES Cart Taito X1-005 PCB", tag, owner, clock, "nes_x1_005", __FILE__)
67{
66               : nes_nrom_device(mconfig, NES_X1_005, "NES Cart Taito X1-005 PCB", tag, owner, clock, "nes_x1_005", __FILE__), m_latch(0)
67            {
6868}
6969
7070nes_x1_017_device::nes_x1_017_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
71               : nes_nrom_device(mconfig, NES_X1_017, "NES Cart Taito X1-017 PCB", tag, owner, clock, "nes_x1_017", __FILE__)
72{
71               : nes_nrom_device(mconfig, NES_X1_017, "NES Cart Taito X1-017 PCB", tag, owner, clock, "nes_x1_017", __FILE__), m_latch(0)
72            {
7373}
7474
7575
trunk/src/devices/bus/nes/tengen.cpp
r250291r250292
4949}
5050
5151nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
52               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
53{
52               : nes_nrom_device(mconfig, type, name, tag, owner, clock, shortname, source), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_reset(0), m_irq_enable(0), m_latch(0), irq_timer(nullptr)
53            {
5454}
5555
5656nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
57               : nes_nrom_device(mconfig, NES_TENGEN_800032, "NES Cart Tengen 800032 PCB", tag, owner, clock, "nes_tengen032", __FILE__)
57               : nes_nrom_device(mconfig, NES_TENGEN_800032, "NES Cart Tengen 800032 PCB", tag, owner, clock, "nes_tengen032", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_reset(0), m_irq_enable(0), m_latch(0), irq_timer(nullptr)
5858{
5959}
6060
trunk/src/devices/bus/nes/waixing.cpp
r250291r250292
132132}
133133
134134nes_waixing_sec_device::nes_waixing_sec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
135               : nes_txrom_device(mconfig, NES_WAIXING_SEC, "NES Cart Waixing Security Chip PCB", tag, owner, clock, "nes_waixing_sec", __FILE__)
136{
135               : nes_txrom_device(mconfig, NES_WAIXING_SEC, "NES Cart Waixing Security Chip PCB", tag, owner, clock, "nes_waixing_sec", __FILE__), m_reg(0)
136            {
137137}
138138
139139nes_waixing_sgz_device::nes_waixing_sgz_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
140               : nes_nrom_device(mconfig, NES_WAIXING_SGZ, "NES Cart Waixing San Guo Zhi PCB", tag, owner, clock, "nes_waixing_sgz", __FILE__)
141{
140               : nes_nrom_device(mconfig, NES_WAIXING_SGZ, "NES Cart Waixing San Guo Zhi PCB", tag, owner, clock, "nes_waixing_sgz", __FILE__), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0)
141            {
142142}
143143
144144nes_waixing_sgzlz_device::nes_waixing_sgzlz_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
145               : nes_nrom_device(mconfig, NES_WAIXING_SGZLZ, "NES Cart Waixing San Guo Zhong Lie Zhuan PCB", tag, owner, clock, "nes_waixing_sgzlz", __FILE__)
146{
145               : nes_nrom_device(mconfig, NES_WAIXING_SGZLZ, "NES Cart Waixing San Guo Zhong Lie Zhuan PCB", tag, owner, clock, "nes_waixing_sgzlz", __FILE__), m_latch(0)
146            {
147147}
148148
149149nes_waixing_ffv_device::nes_waixing_ffv_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/nes_ctrl/4score.cpp
r250291r250292
112112
113113nes_4score_device::nes_4score_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
114114               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
115                  device_nes_control_port_interface(mconfig, *this)
116{
115                  device_nes_control_port_interface(mconfig, *this), m_latch(0)
116            {
117117}
118118
119119nes_4score_p1p3_device::nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
trunk/src/devices/bus/nes_ctrl/arkpaddle.cpp
r250291r250292
4848               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
4949                  device_nes_control_port_interface(mconfig, *this),
5050                  m_paddle(*this, "PADDLE"),
51                  m_button(*this, "BUTTON")
52{
51                  m_button(*this, "BUTTON"), m_start_conv(0), m_latch(0)
52            {
5353}
5454
5555nes_vaus_device::nes_vaus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5656               device_t(mconfig, NES_ARKPADDLE, "NES Arkanoid Vaus Controller", tag, owner, clock, "nes_vaus", __FILE__),
5757               device_nes_control_port_interface(mconfig, *this),
5858               m_paddle(*this, "PADDLE"),
59               m_button(*this, "BUTTON")
59               m_button(*this, "BUTTON"), m_start_conv(0), m_latch(0)
6060{
6161}
6262
trunk/src/devices/bus/nes_ctrl/bcbattle.cpp
r250291r250292
8484nes_bcbattle_device::nes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8585               device_t(mconfig, NES_BARCODE_BATTLER, "Epoch Barcode Battler (FC)", tag, owner, clock, "nes_bcbattle", __FILE__),
8686               device_nes_control_port_interface(mconfig, *this),
87               m_reader(*this, "battler")
87               m_reader(*this, "battler"), m_pending_code(0), m_new_code(0), m_transmitting(0), m_cur_bit(0), m_cur_byte(0), battler_timer(nullptr)
8888{
8989}
9090
trunk/src/devices/bus/nes_ctrl/ctrl.cpp
r250291r250292
102102
103103nes_control_port_device::nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
104104                  device_t(mconfig, NES_CONTROL_PORT, "Nintendo NES/FC control port", tag, owner, clock, "nes_control_port", __FILE__),
105                  device_slot_interface(mconfig, *this)
105                  device_slot_interface(mconfig, *this), m_device(nullptr)
106106{
107107}
108108
trunk/src/devices/bus/nes_ctrl/fckeybrd.cpp
r250291r250292
148148               device_t(mconfig, NES_FCKEYBOARD, "Nintendo Family Computer Keyboard Component", tag, owner, clock, "nes_fckeybrd", __FILE__),
149149               device_nes_control_port_interface(mconfig, *this),
150150               m_cassette(*this, "tape"),
151               m_kbd(*this, "FCKEY")
151               m_kbd(*this, "FCKEY"), m_fck_scan(0), m_fck_mode(0)
152152{
153153}
154154
trunk/src/devices/bus/nes_ctrl/ftrainer.cpp
r250291r250292
8686nes_ftrainer_device::nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8787               device_t(mconfig, NES_FTRAINER, "Bandai Family Trainer", tag, owner, clock, "nes_famtrain", __FILE__),
8888               device_nes_control_port_interface(mconfig, *this),
89               m_trainer(*this, "FT_COL")
89               m_trainer(*this, "FT_COL"), m_row_scan(0)
9090{
9191}
9292
trunk/src/devices/bus/nes_ctrl/joypad.cpp
r250291r250292
176176nes_joypad_device::nes_joypad_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
177177               device_t(mconfig, type, name, tag, owner, clock, shortname, source),
178178               device_nes_control_port_interface(mconfig, *this),
179               m_joypad(*this, "JOYPAD")
179               m_joypad(*this, "JOYPAD"), m_latch(0)
180180{
181181}
182182
183183nes_joypad_device::nes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
184184               device_t(mconfig, NES_JOYPAD, "Nintendo NES / FC Control Pad", tag, owner, clock, "nes_joypad", __FILE__),
185185               device_nes_control_port_interface(mconfig, *this),
186               m_joypad(*this, "JOYPAD")
186               m_joypad(*this, "JOYPAD"), m_latch(0)
187187{
188188}
189189
trunk/src/devices/bus/nes_ctrl/konamihs.cpp
r250291r250292
4646               device_t(mconfig, NES_KONAMIHS, "Konami Hyper Shot Controller", tag, owner, clock, "nes_konamihs", __FILE__),
4747               device_nes_control_port_interface(mconfig, *this),
4848               m_ipt_p1(*this, "P1"),
49               m_ipt_p2(*this, "P2")
49               m_ipt_p2(*this, "P2"), m_latch_p1(0), m_latch_p2(0)
5050{
5151}
5252
trunk/src/devices/bus/nes_ctrl/miracle.cpp
r250291r250292
6363               device_serial_interface(mconfig, *this),
6464               device_nes_control_port_interface(mconfig, *this),
6565               m_midiin(*this, "mdin"),
66               m_midiout(*this, "mdout")
66               m_midiout(*this, "mdout"), strobe_timer(nullptr), m_strobe_on(0), m_midi_mode(0), m_sent_bits(0), m_strobe_clock(0),
67               m_data_sent(0), m_xmit_read(0), m_xmit_write(0), m_recv_read(0), m_recv_write(0), m_tx_busy(false), m_read_status(false), m_status_bit(false)
6768{
6869}
6970
trunk/src/devices/bus/nes_ctrl/mjpanel.cpp
r250291r250292
7272nes_mjpanel_device::nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7373               device_t(mconfig, NES_MJPANEL, "Famicom Mahjong Panel", tag, owner, clock, "nes_mjpanel", __FILE__),
7474               device_nes_control_port_interface(mconfig, *this),
75               m_panel(*this, "MJPANEL")
75               m_panel(*this, "MJPANEL"), m_latch(0)
7676{
7777}
7878
trunk/src/devices/bus/nes_ctrl/pachinko.cpp
r250291r250292
5151               device_t(mconfig, NES_PACHINKO, "Famicom Pachinko Controller", tag, owner, clock, "nes_pachinko", __FILE__),
5252               device_nes_control_port_interface(mconfig, *this),
5353               m_joypad(*this, "JOYPAD"),
54               m_trigger(*this, "TRIGGER")
54               m_trigger(*this, "TRIGGER"), m_latch(0)
5555{
5656}
5757
trunk/src/devices/bus/nes_ctrl/partytap.cpp
r250291r250292
4646nes_partytap_device::nes_partytap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4747               device_t(mconfig, NES_PARTYTAP, "Yonezawa Party Tap Controller", tag, owner, clock, "nes_partytap", __FILE__),
4848               device_nes_control_port_interface(mconfig, *this),
49               m_inputs(*this, "INPUTS")
49               m_inputs(*this, "INPUTS"), m_mode(0), m_latch(0)
5050{
5151}
5252
trunk/src/devices/bus/nes_ctrl/suborkey.cpp
r250291r250292
163163nes_suborkey_device::nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
164164               device_t(mconfig, NES_SUBORKEYBOARD, "Subor FC Keyboard", tag, owner, clock, "nes_suborkey", __FILE__),
165165               device_nes_control_port_interface(mconfig, *this),
166               m_kbd(*this, "SUBOR")
166               m_kbd(*this, "SUBOR"), m_fck_scan(0), m_fck_mode(0)
167167{
168168}
169169
trunk/src/devices/bus/nubus/nubus.cpp
r250291r250292
2828//-------------------------------------------------
2929nubus_slot_device::nubus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030      device_t(mconfig, NUBUS_SLOT, "NUBUS_SLOT", tag, owner, clock, "nubus_slot", __FILE__),
31      device_slot_interface(mconfig, *this)
31      device_slot_interface(mconfig, *this),
32   m_nubus_tag(nullptr),
33   m_nubus_slottag(nullptr)
3234{
3335}
3436
3537nubus_slot_device::nubus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
3638      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
37      device_slot_interface(mconfig, *this)
39      device_slot_interface(mconfig, *this), m_nubus_tag(nullptr), m_nubus_slottag(nullptr)
3840{
3941}
4042
r250291r250292
7779//-------------------------------------------------
7880
7981nubus_device::nubus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
80      device_t(mconfig, NUBUS, "NUBUS", tag, owner, clock, "nubus", __FILE__),
82      device_t(mconfig, NUBUS, "NUBUS", tag, owner, clock, "nubus", __FILE__), m_maincpu(nullptr),
8183      m_out_irq9_cb(*this),
8284      m_out_irqa_cb(*this),
8385      m_out_irqb_cb(*this),
8486      m_out_irqc_cb(*this),
8587      m_out_irqd_cb(*this),
86      m_out_irqe_cb(*this)
88      m_out_irqe_cb(*this), m_cputag(nullptr)
8789{
8890}
8991
9092nubus_device::nubus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
91      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
93      device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr),
9294      m_out_irq9_cb(*this),
9395      m_out_irqa_cb(*this),
9496      m_out_irqb_cb(*this),
9597      m_out_irqc_cb(*this),
9698      m_out_irqd_cb(*this),
97      m_out_irqe_cb(*this)
99      m_out_irqe_cb(*this), m_cputag(nullptr)
98100{
99101}
100102//-------------------------------------------------
r250291r250292
256258
257259device_nubus_card_interface::device_nubus_card_interface(const machine_config &mconfig, device_t &device)
258260   : device_slot_card_interface(mconfig, device),
259      m_nubus(NULL),
260      m_nubus_tag(NULL)
261      m_nubus(nullptr),
262      m_nubus_tag(nullptr), m_nubus_slottag(nullptr), m_slot(0), m_next(nullptr)
261263{
262264}
263265
trunk/src/devices/bus/nubus/nubus_48gc.cpp
r250291r250292
7979jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8080      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8181      device_video_interface(mconfig, *this),
82      device_nubus_card_interface(mconfig, *this)
82      device_nubus_card_interface(mconfig, *this), m_screen(nullptr), m_timer(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_stride(0), m_base(0), m_count(0), m_clutoffs(0), m_xres(0), m_yres(0), m_is824(false)
8383{
8484   m_assembled_tag = std::string(tag).append(":").append(GC48_SCREEN_NAME);
8585   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/nubus_cb264.cpp
r250291r250292
7171
7272nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7373      device_t(mconfig, NUBUS_CB264, "RasterOps ColorBoard 264 video card", tag, owner, clock, "nb_cb264", __FILE__),
74      device_nubus_card_interface(mconfig, *this)
74      device_nubus_card_interface(mconfig, *this), m_cb264_mode(0), m_cb264_vbl_disable(0), m_cb264_toggle(0), m_count(0), m_clutoffs(0)
7575{
7676}
7777
7878nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7979      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
80      device_nubus_card_interface(mconfig, *this)
80      device_nubus_card_interface(mconfig, *this), m_cb264_mode(0), m_cb264_vbl_disable(0), m_cb264_toggle(0), m_count(0), m_clutoffs(0)
8181{
8282}
8383
trunk/src/devices/bus/nubus/nubus_image.cpp
r250291r250292
7070
7171messimg_disk_image_device::messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
7272   : device_t(mconfig, MESSIMG_DISK, "Mac image", tag, owner, clock, "messimg_disk_image", __FILE__),
73      device_image_interface(mconfig, *this)
73      device_image_interface(mconfig, *this), m_size(0), m_data(nullptr), m_ejected(false)
7474{
7575}
7676
r250291r250292
175175
176176nubus_image_device::nubus_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
177177      device_t(mconfig, NUBUS_IMAGE, "Disk Image Pseudo-Card", tag, owner, clock, "nb_image", __FILE__),
178      device_nubus_card_interface(mconfig, *this)
178      device_nubus_card_interface(mconfig, *this), m_image(nullptr)
179179{
180180}
181181
182182nubus_image_device::nubus_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
183183      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
184      device_nubus_card_interface(mconfig, *this)
184      device_nubus_card_interface(mconfig, *this), m_image(nullptr)
185185{
186186}
187187
trunk/src/devices/bus/nubus/nubus_m2hires.cpp
r250291r250292
6868nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6969      device_t(mconfig, NUBUS_M2HIRES, "Macintosh II Hi-Resolution video card", tag, owner, clock, "nb_m2hr", __FILE__),
7070      device_video_interface(mconfig, *this),
71      device_nubus_card_interface(mconfig, *this)
71      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7272{
7373   m_assembled_tag = std::string(tag).append(":").append(M2HIRES_SCREEN_NAME);
7474   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7777nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7878      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7979      device_video_interface(mconfig, *this),
80      device_nubus_card_interface(mconfig, *this)
80      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8181{
8282   m_assembled_tag = std::string(tag).append(":").append(M2HIRES_SCREEN_NAME);
8383   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/nubus_m2video.cpp
r250291r250292
6969nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7070      device_t(mconfig, NUBUS_M2VIDEO, "Macintosh II Video Card", tag, owner, clock, "nb_m2vc", __FILE__),
7171      device_video_interface(mconfig, *this),
72      device_nubus_card_interface(mconfig, *this)
72      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7373{
7474   m_assembled_tag = std::string(tag).append(":").append(M2VIDEO_SCREEN_NAME);
7575   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7878nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7979      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8080      device_video_interface(mconfig, *this),
81      device_nubus_card_interface(mconfig, *this)
81      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8282{
8383   m_assembled_tag = std::string(tag).append(":").append(M2VIDEO_SCREEN_NAME);
8484   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/nubus_radiustpd.cpp
r250291r250292
6868nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6969      device_t(mconfig, NUBUS_RADIUSTPD, "Radius Two Page Display video card", tag, owner, clock, "nb_rtpd", __FILE__),
7070      device_video_interface(mconfig, *this),
71      device_nubus_card_interface(mconfig, *this)
71      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7272{
7373   m_assembled_tag = std::string(tag).append(":").append(RADIUSTPD_SCREEN_NAME);
7474   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7777nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7878      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7979      device_video_interface(mconfig, *this),
80      device_nubus_card_interface(mconfig, *this)
80      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8181{
8282   m_assembled_tag = std::string(tag).append(":").append(RADIUSTPD_SCREEN_NAME);
8383   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/nubus_spec8.cpp
r250291r250292
7070nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7171      device_t(mconfig, NUBUS_SPEC8S3, "SuperMac Spectrum/8 Series III video card", tag, owner, clock, "nb_sp8s3", __FILE__),
7272      device_video_interface(mconfig, *this),
73      device_nubus_card_interface(mconfig, *this)
73      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr), m_vbl_pending(false), m_parameter(0)
7474{
7575   m_assembled_tag = std::string(tag).append(":").append(SPEC8S3_SCREEN_NAME);
7676   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7979nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8080      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8181      device_video_interface(mconfig, *this),
82      device_nubus_card_interface(mconfig, *this)
82      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr), m_vbl_pending(false), m_parameter(0)
8383{
8484   m_assembled_tag = std::string(tag).append(":").append(SPEC8S3_SCREEN_NAME);
8585   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/nubus_specpdq.cpp
r250291r250292
8585nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8686      device_t(mconfig, NUBUS_SPECPDQ, "SuperMac Spectrum PDQ video card", tag, owner, clock, "nb_spdq", __FILE__),
8787      device_video_interface(mconfig, *this),
88      device_nubus_card_interface(mconfig, *this),
88      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr), m_width(0), m_height(0), m_patofsx(0), m_patofsy(0), m_vram_addr(0), m_vram_src(0),
8989      m_palette(*this, "palette")
9090{
9191   m_assembled_tag = std::string(tag).append(":").append(SPECPDQ_SCREEN_NAME);
r250291r250292
9595nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
9696      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
9797      device_video_interface(mconfig, *this),
98      device_nubus_card_interface(mconfig, *this),
98      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_count(0), m_clutoffs(0), m_timer(nullptr), m_width(0), m_height(0), m_patofsx(0), m_patofsy(0), m_vram_addr(0), m_vram_src(0),
9999      m_palette(*this, "palette")
100100{
101101   m_assembled_tag = std::string(tag).append(":").append(SPECPDQ_SCREEN_NAME);
trunk/src/devices/bus/nubus/nubus_vikbw.cpp
r250291r250292
6767
6868nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6969      device_t(mconfig, NUBUS_VIKBW, "Moniterm Viking video card", tag, owner, clock, "nb_vikbw", __FILE__),
70      device_nubus_card_interface(mconfig, *this)
70      device_nubus_card_interface(mconfig, *this), m_vbl_disable(0)
7171{
7272}
7373
7474nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7575      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
76      device_nubus_card_interface(mconfig, *this)
76      device_nubus_card_interface(mconfig, *this), m_vbl_disable(0)
7777{
7878}
7979
trunk/src/devices/bus/nubus/nubus_wsportrait.cpp
r250291r250292
7171nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7272      device_t(mconfig, NUBUS_WSPORTRAIT, "Macintosh II Portrait Video Card", tag, owner, clock, "nb_wspt", __FILE__),
7373      device_video_interface(mconfig, *this),
74      device_nubus_card_interface(mconfig, *this)
74      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7575{
7676   m_assembled_tag = std::string(tag).append(":").append(WSPORTRAIT_SCREEN_NAME);
7777   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
8080nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8181      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8282      device_video_interface(mconfig, *this),
83      device_nubus_card_interface(mconfig, *this)
83      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8484{
8585   m_assembled_tag = std::string(tag).append(":").append(WSPORTRAIT_SCREEN_NAME);
8686   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/pds30_30hr.cpp
r250291r250292
7171nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7272      device_t(mconfig, PDS030_XCEED30HR, "Micron/XCEED Technology Color 30HR", tag, owner, clock, "pd3_30hr", __FILE__),
7373      device_video_interface(mconfig, *this),
74      device_nubus_card_interface(mconfig, *this)
74      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7575{
7676   m_assembled_tag = std::string(tag).append(":").append(XCEED30HR_SCREEN_NAME);
7777   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
8080nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8181      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8282      device_video_interface(mconfig, *this),
83      device_nubus_card_interface(mconfig, *this)
83      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8484{
8585   m_assembled_tag = std::string(tag).append(":").append(XCEED30HR_SCREEN_NAME);
8686   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/pds30_cb264.cpp
r250291r250292
6464nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6565      device_t(mconfig, PDS030_CB264SE30, "RasterOps Colorboard 264/SE30", tag, owner, clock, "pd3_c264", __FILE__),
6666      device_video_interface(mconfig, *this),
67      device_nubus_card_interface(mconfig, *this)
67      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
6868{
6969   m_assembled_tag = std::string(tag).append(":").append(CB264SE30_SCREEN_NAME);
7070   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7373nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7474      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7575      device_video_interface(mconfig, *this),
76      device_nubus_card_interface(mconfig, *this)
76      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7777{
7878   m_assembled_tag = std::string(tag).append(":").append(CB264SE30_SCREEN_NAME);
7979   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/pds30_mc30.cpp
r250291r250292
6767nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6868      device_t(mconfig, PDS030_XCEEDMC30, "Micron/XCEED Technology MacroColor 30", tag, owner, clock, "pd3_mclr", __FILE__),
6969      device_video_interface(mconfig, *this),
70      device_nubus_card_interface(mconfig, *this)
70      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7171{
7272   m_assembled_tag = std::string(tag).append(":").append(XCEEDMC30_SCREEN_NAME);
7373   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7676nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7777      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7878      device_video_interface(mconfig, *this),
79      device_nubus_card_interface(mconfig, *this)
79      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8080{
8181   m_assembled_tag = std::string(tag).append(":").append(XCEEDMC30_SCREEN_NAME);
8282   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/pds30_procolor816.cpp
r250291r250292
7070nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7171      device_t(mconfig, PDS030_PROCOLOR816, "Lapis ProColor Server 8*16", tag, owner, clock, "pd3_pc16", __FILE__),
7272      device_video_interface(mconfig, *this),
73      device_nubus_card_interface(mconfig, *this)
73      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
7474{
7575   m_assembled_tag = std::string(tag).append(":").append(PROCOLOR816_SCREEN_NAME);
7676   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7979nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
8080      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
8181      device_video_interface(mconfig, *this),
82      device_nubus_card_interface(mconfig, *this)
82      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_mode(0), m_vbl_disable(0), m_toggle(0), m_count(0), m_clutoffs(0), m_timer(nullptr)
8383{
8484   m_assembled_tag = std::string(tag).append(":").append(PROCOLOR816_SCREEN_NAME);
8585   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/nubus/pds30_sigmalview.cpp
r250291r250292
6464nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6565      device_t(mconfig, PDS030_LVIEW, "Sigma Designs L-View", tag, owner, clock, "pd3_lviw", __FILE__),
6666      device_video_interface(mconfig, *this),
67      device_nubus_card_interface(mconfig, *this)
67      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_vbl_disable(0), m_toggle(0), m_timer(nullptr), m_protstate(0)
6868{
6969   m_assembled_tag = std::string(tag).append(":").append(LVIEW_SCREEN_NAME);
7070   m_screen_tag = m_assembled_tag.c_str();
r250291r250292
7373nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
7474      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7575      device_video_interface(mconfig, *this),
76      device_nubus_card_interface(mconfig, *this)
76      device_nubus_card_interface(mconfig, *this), m_vram32(nullptr), m_vbl_disable(0), m_toggle(0), m_timer(nullptr), m_protstate(0)
7777{
7878   m_assembled_tag = std::string(tag).append(":").append(LVIEW_SCREEN_NAME);
7979   m_screen_tag = m_assembled_tag.c_str();
trunk/src/devices/bus/odyssey2/rom.cpp
r250291r250292
2323
2424
2525o2_rom_device::o2_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
26               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
27                  device_o2_cart_interface( mconfig, *this )
26   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
27     device_o2_cart_interface(mconfig, *this),
28     m_bank_base(0)
2829{
2930}
3031
3132o2_rom_device::o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3233               : device_t(mconfig, O2_ROM_STD, "Odyssey 2 Standard Carts", tag, owner, clock, "o2_rom", __FILE__),
33                  device_o2_cart_interface( mconfig, *this )
34{
34                  device_o2_cart_interface( mconfig, *this ),
35   m_bank_base(0)
36            {
3537}
3638
3739o2_rom12_device::o2_rom12_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/odyssey2/slot.cpp
r250291r250292
7676                  device_t(mconfig, O2_CART_SLOT, "Odyssey 2 Cartridge Slot", tag, owner, clock, "o2_cart_slot", __FILE__),
7777                  device_image_interface(mconfig, *this),
7878                  device_slot_interface(mconfig, *this),
79                  m_type(O2_STD)
79                  m_type(O2_STD), m_cart(nullptr)
8080{
8181}
8282
trunk/src/devices/bus/oricext/jasmin.cpp
r250291r250292
4444
4545jasmin_device::jasmin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4646   oricext_device(mconfig, JASMIN, "Jasmin floppy drive interface", tag, owner, clock, "jasmin", __FILE__),
47   fdc(*this, "fdc")
47   fdc(*this, "fdc"), side_sel(false), fdc_reset(false), ram_access(false), rom_access(false), jasmin_rom(nullptr), cur_floppy(nullptr)
4848{
4949}
5050
trunk/src/devices/bus/oricext/microdisc.cpp
r250291r250292
3939
4040microdisc_device::microdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4141   oricext_device(mconfig, MICRODISC, "Microdisc floppy drive interface", tag, owner, clock, "microdisc", __FILE__),
42   fdc(*this, "fdc")
42   fdc(*this, "fdc"), microdisc_rom(nullptr), port_314(0), intrq_state(false), drq_state(false), hld_state(false)
4343{
4444}
4545
trunk/src/devices/bus/oricext/oricext.cpp
r250291r250292
99oricext_connector::oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1010   device_t(mconfig, ORICEXT_CONNECTOR, "ORIC extension connector", tag, owner, clock, "oricext_connector", __FILE__),
1111   device_slot_interface(mconfig, *this),
12   irq_handler(*this)
12   irq_handler(*this),
13   cputag(NULL)
1314{
1415}
1516
r250291r250292
4142
4243oricext_device::oricext_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
4344   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
44   device_slot_card_interface(mconfig, *this)
45   device_slot_card_interface(mconfig, *this),
46   cputag(nullptr),
47   cpu(nullptr),
48   connector(nullptr),
49   bank_c000_r(nullptr),
50   bank_e000_r(nullptr),
51   bank_f800_r(nullptr),
52   bank_c000_w(nullptr),
53   bank_e000_w(nullptr),
54   bank_f800_w(nullptr),
55   rom(nullptr),
56   ram(nullptr)
4557{
4658}
4759
trunk/src/devices/bus/pc_joy/pc_joy.cpp
r250291r250292
1515
1616pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1717   device_t(mconfig, PC_JOY, "PC joystick port", tag, owner, clock, "pc_joy", __FILE__),
18   device_slot_interface(mconfig, *this)
18   device_slot_interface(mconfig, *this),
19   m_dev(nullptr)
1920{
2021}
2122
trunk/src/devices/bus/pc_joy/pc_joy_sw.cpp
r250291r250292
1313   m_btn2(*this, "btn2"),
1414   m_btn3(*this, "btn3"),
1515   m_btn4(*this, "btn4"),
16   m_conf(*this, "CONFIG")
16   m_conf(*this, "CONFIG"),
17   m_timer(NULL),
18   m_count(0),
19   m_state(0),
20   m_active(false)
1721{
1822}
1923
trunk/src/devices/bus/pc_kbd/iskr1030.cpp
r250291r250292
286286      m_md20(*this, "MD20"),
287287      m_md21(*this, "MD21"),
288288      m_md22(*this, "MD22"),
289      m_md23(*this, "MD23"),
289      m_md23(*this, "MD23"), m_bus(0),
290290      m_p1(0),
291291      m_p2(0),
292292      m_q(0)
trunk/src/devices/bus/pc_kbd/keytro.cpp
r250291r250292
380380pc_kbd_keytronic_pc3270_device::pc_kbd_keytronic_pc3270_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
381381   device_t(mconfig, PC_KBD_KEYTRONIC_PC3270, "Keytronic PC3270", tag, owner, clock, "keytronic_pc3270", __FILE__),
382382   device_pc_kbd_interface(mconfig, *this),
383   m_cpu(*this, "kb_keytr")
383   m_cpu(*this, "kb_keytr"), m_p1(0), m_p1_data(0), m_p2(0), m_p3(0), m_last_write_addr(0)
384384{
385385}
386386
trunk/src/devices/bus/pc_kbd/msnat.cpp
r250291r250292
247247   , m_p1_4(*this, "P1.4")
248248   , m_p1_5(*this, "P1.5")
249249   , m_p1_6(*this, "P1.6")
250   , m_p1_7(*this, "P1.7")
250   , m_p1_7(*this, "P1.7"), m_p0(0), m_p1(0), m_p2(0), m_p3(0)
251251{
252252}
253253
trunk/src/devices/bus/pc_kbd/pc83.cpp
r250291r250292
275275      m_dr20(*this, "DR20"),
276276      m_dr21(*this, "DR21"),
277277      m_dr22(*this, "DR22"),
278      m_dr23(*this, "DR23")
278      m_dr23(*this, "DR23"), m_cnt(0)
279279{
280280}
281281
trunk/src/devices/bus/pc_kbd/pc_kbdc.cpp
r250291r250292
3333//-------------------------------------------------
3434pc_kbdc_slot_device::pc_kbdc_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3535      device_t(mconfig, PC_KBDC_SLOT, "PC_KBDC_SLOT", tag, owner, clock, "pc_kbdc_slot", __FILE__),
36      device_slot_interface(mconfig, *this)
36      device_slot_interface(mconfig, *this),
37   m_kbdc_device(nullptr)
3738{
3839}
3940
r250291r250292
7475      m_out_clock_cb(*this),
7576      m_out_data_cb(*this),
7677      m_clock_state(-1),
77      m_data_state(-1),
78      m_data_state(-1), m_mb_clock_state(0), m_mb_data_state(0),
7879      m_kb_clock_state(1),
7980      m_kb_data_state(1),
8081      m_keyboard( NULL )
r250291r250292
195196device_pc_kbd_interface::device_pc_kbd_interface(const machine_config &mconfig, device_t &device)
196197   : device_slot_card_interface(mconfig, device),
197198      m_pc_kbdc(NULL),
198      m_pc_kbdc_tag(NULL)
199      m_pc_kbdc_tag(NULL), m_next(nullptr)
199200{
200201}
201202
trunk/src/devices/bus/pce/pce_rom.cpp
r250291r250292
4646}
4747
4848pce_sf2_device::pce_sf2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
49               : pce_rom_device(mconfig, PCE_ROM_SF2, "PCE Street Fighters 2 Cart", tag, owner, clock, "pce_sf2", __FILE__)
50{
49               : pce_rom_device(mconfig, PCE_ROM_SF2, "PCE Street Fighters 2 Cart", tag, owner, clock, "pce_sf2", __FILE__), m_bank_base(0)
50            {
5151}
5252
5353
trunk/src/devices/bus/pce/pce_slot.cpp
r250291r250292
140140                  device_image_interface(mconfig, *this),
141141                  device_slot_interface(mconfig, *this),
142142                  m_interface("pce_cart"),
143                  m_type(PCE_STD)
143                  m_type(PCE_STD), m_cart(nullptr)
144144{
145145}
146146
trunk/src/devices/bus/pet/c2n.cpp
r250291r250292
5555   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
5656      device_pet_datassette_port_interface(mconfig, *this),
5757      m_cassette(*this, "cassette"),
58      m_motor(false)
58      m_motor(false),
59   m_read_timer(nullptr)
5960{
6061}
6162
r250291r250292
6364   : device_t(mconfig, C2N, "C2N Datassette", tag, owner, clock, "c2n", __FILE__),
6465      device_pet_datassette_port_interface(mconfig, *this),
6566      m_cassette(*this, "cassette"),
66      m_motor(false)
67      m_motor(false), m_read_timer(nullptr)
6768{
6869}
6970
trunk/src/devices/bus/pet/cass.cpp
r250291r250292
5454pet_datassette_port_device::pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5555   device_t(mconfig, PET_DATASSETTE_PORT, "Datassette Port", tag, owner, clock, "pet_datassette_port", __FILE__),
5656   device_slot_interface(mconfig, *this),
57   m_read_handler(*this)
57   m_read_handler(*this), m_cart(nullptr)
5858{
5959}
6060
trunk/src/devices/bus/pet/exp.cpp
r250291r250292
3636
3737pet_expansion_slot_device::pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3838   device_t(mconfig, PET_EXPANSION_SLOT, "PET memory expansion port", tag, owner, clock, "pet_expansion_slot", __FILE__),
39   device_slot_interface(mconfig, *this),
39   device_slot_interface(mconfig, *this), m_card(nullptr),
4040   m_read_dma(*this),
4141   m_write_dma(*this)
4242{
trunk/src/devices/bus/pet/superpet.cpp
r250291r250292
185185   m_io_sw1(*this, "SW1"),
186186   m_io_sw2(*this, "SW2"),
187187   m_system(0),
188   m_bank(0),
188   m_bank(0), m_sw1(0), m_sw2(0),
189189   m_sel9_rom(0),
190190   m_pet_irq(CLEAR_LINE),
191191   m_acia_irq(CLEAR_LINE)
trunk/src/devices/bus/plus4/c1551.cpp
r250291r250292
428428      m_status(1),
429429      m_dav(1),
430430      m_ack(1),
431      m_dev(0)
431      m_dev(0), m_irq_timer(nullptr)
432432{
433433}
434434
trunk/src/devices/bus/plus4/exp.cpp
r250291r250292
7474      m_write_irq(*this),
7575      m_read_dma_cd(*this),
7676      m_write_dma_cd(*this),
77      m_write_aec(*this)
77      m_write_aec(*this), m_card(nullptr)
7878{
7979}
8080
trunk/src/devices/bus/psx/analogue.cpp
r250291r250292
77
88psx_analog_controller_device::psx_analog_controller_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
99      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
10      device_psx_controller_interface(mconfig, *this),
10      device_psx_controller_interface(mconfig, *this),
11      m_type(),
12      m_confmode(false),
13      m_analogmode(false),
14      m_analoglock(false),
15      m_temp(0),
16      m_cmd(0),
1117      m_pad0(*this, "PSXPAD0"),
1218      m_pad1(*this, "PSXPAD1"),
1319      m_rstickx(*this, "PSXRSTICKX"),
trunk/src/devices/bus/psx/ctlrport.cpp
r250291r250292
1010
1111psx_controller_port_device::psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
1212      device_t(mconfig, PSX_CONTROLLER_PORT, "Playstation Controller Port", tag, owner, clock, "psx_controller_port", __FILE__),
13      device_slot_interface(mconfig, *this),
13      device_slot_interface(mconfig, *this),
14      m_tx(false),
15      m_dev(nullptr),
1416      m_card(*this, "card")
1517{
1618}
r250291r250292
4042const device_type PSXCONTROLLERPORTS = &device_creator<psxcontrollerports_device>;
4143
4244psxcontrollerports_device::psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
43   : device_t(mconfig, PSXCONTROLLERPORTS, "PSXCONTROLLERPORTS", tag, owner, clock, "psxcontrollerports", __FILE__),
45   : device_t(mconfig, PSXCONTROLLERPORTS, "PSXCONTROLLERPORTS", tag, owner, clock, "psxcontrollerports", __FILE__), m_port0(nullptr), m_port1(nullptr),
4446   m_dsr_handler(*this),
4547   m_rxd_handler(*this)
4648{
r250291r250292
9799}
98100
99101device_psx_controller_interface::device_psx_controller_interface(const machine_config &mconfig, device_t &device) :
100      device_slot_card_interface(mconfig, device),
101      m_ack(true)
102      device_slot_card_interface(mconfig, device), m_odata(0), m_idata(0), m_bit(0), m_count(0), m_memcard(false), m_clock(false), m_sel(false),
103      m_ack(true), m_rx(false), m_ack_timer(nullptr), m_owner(nullptr)
102104{
103105}
104106
trunk/src/devices/bus/psx/memcard.cpp
r250291r250292
4343
4444psxcard_device::psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4545   : device_t(mconfig, PSXCARD, "Sony PSX Memory Card", tag, owner, clock, "psxcard", __FILE__),
46   device_image_interface(mconfig, *this)
46   device_image_interface(mconfig, *this),
47   pkt_ptr(0),
48   pkt_sz(0),
49   cmd(0),
50   addr(0),
51   state(0),
52   m_disabled(false),
53   m_odata(0),
54   m_idata(0),
55   m_bit(0),
56   m_count(0),
57   m_pad(false),
58   m_clock(false),
59   m_sel(false),
60   m_ack(false),
61   m_rx(false),
62   m_ack_timer(nullptr),
63   m_owner(nullptr)
4764{
4865}
4966
trunk/src/devices/bus/psx/multitap.cpp
r250291r250292
88
99psx_multitap_device::psx_multitap_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
1010   device_t(mconfig, PSX_MULTITAP, "Playstation Multitap", tag, owner, clock, "psx_multitap", __FILE__),
11   device_psx_controller_interface(mconfig, *this),
11   device_psx_controller_interface(mconfig, *this),
12   m_activeport(0),
13   m_singlemode(false),
14   m_nextmode(false),
15   m_tapmc(false),
1216   m_porta(*this, "a"),
1317   m_portb(*this, "b"),
1418   m_portc(*this, "c"),
trunk/src/devices/bus/ql/exp.cpp
r250291r250292
4949   m_write_ipl0l(*this),
5050   m_write_ipl1l(*this),
5151   m_write_berrl(*this),
52   m_write_extintl(*this)
52   m_write_extintl(*this), m_card(nullptr)
5353{
5454}
5555
trunk/src/devices/bus/ql/rom.cpp
r250291r250292
5656ql_rom_cartridge_slot_t::ql_rom_cartridge_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5757   device_t(mconfig, QL_ROM_CARTRIDGE_SLOT, "QL ROM cartridge slot", tag, owner, clock, "ql_rom_cartridge_slot", __FILE__),
5858   device_slot_interface(mconfig, *this),
59   device_image_interface(mconfig, *this)
59   device_image_interface(mconfig, *this), m_card(nullptr)
6060{
6161}
6262
trunk/src/devices/bus/ql/sandy_superdisk.cpp
r250291r250292
120120   m_centronics(*this, CENTRONICS_TAG),
121121   m_latch(*this, TTL74273_TAG),
122122   m_rom(*this, "rom"),
123   m_busy(1)
123   m_busy(1), m_fd6(0)
124124{
125125}
126126
trunk/src/devices/bus/ql/trumpcard.cpp
r250291r250292
119119   m_floppy1(*this, WD1772_TAG":1"),
120120   m_rom(*this, "rom"),
121121   m_ram(*this, "ram"),
122   m_ram_size(0)
122   m_ram_size(0), m_rom_en(false)
123123{
124124}
125125
r250291r250292
131131   m_floppy1(*this, WD1772_TAG":1"),
132132   m_rom(*this, "rom"),
133133   m_ram(*this, "ram"),
134   m_ram_size(ram_size)
134   m_ram_size(ram_size), m_rom_en(false)
135135{
136136}
137137
trunk/src/devices/bus/rs232/keyboard.cpp
r250291r250292
55serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66   : generic_keyboard_device(mconfig, SERIAL_KEYBOARD, "Serial Keyboard", tag, owner, clock, "serial_keyboard", __FILE__),
77   device_serial_interface(mconfig, *this),
8   device_rs232_port_interface(mconfig, *this),
8   device_rs232_port_interface(mconfig, *this),
9   m_curr_key(0),
910   m_key_valid(false),
1011   m_rs232_txbaud(*this, "RS232_TXBAUD"),
1112   m_rs232_startbits(*this, "RS232_STARTBITS"),
r250291r250292
1819serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
1920   : generic_keyboard_device(mconfig, type, name, tag, owner, clock, shortname, source),
2021   device_serial_interface(mconfig, *this),
21   device_rs232_port_interface(mconfig, *this),
22   device_rs232_port_interface(mconfig, *this),
23   m_curr_key(0),
2224   m_key_valid(false),
2325   m_rs232_txbaud(*this, "RS232_TXBAUD"),
2426   m_rs232_startbits(*this, "RS232_STARTBITS"),
trunk/src/devices/bus/rs232/null_modem.cpp
r250291r250292
1414   m_rs232_parity(*this, "RS232_PARITY"),
1515   m_rs232_stopbits(*this, "RS232_STOPBITS"),
1616   m_input_count(0),
17   m_input_index(0)
17   m_input_index(0),
18   m_timer_poll(NULL)
1819{
1920}
2021
trunk/src/devices/bus/rs232/pty.cpp
r250291r250292
1818      m_rs232_parity(*this, "RS232_PARITY"),
1919      m_rs232_stopbits(*this, "RS232_STOPBITS"),
2020      m_input_count(0),
21      m_input_index(0)
21      m_input_index(0),
22      m_timer_poll(NULL)
2223{
2324}
2425
trunk/src/devices/bus/rs232/rs232.cpp
r250291r250292
66
77rs232_port_device::rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
88   device_t(mconfig, RS232_PORT, "RS232 Port", tag, owner, clock, "rs232", __FILE__),
9   device_slot_interface(mconfig, *this),
9   device_slot_interface(mconfig, *this),
10   m_rxd(0),
11   m_dcd(0),
12   m_dsr(0),
13   m_ri(0),
14   m_cts(0),
1015   m_rxd_handler(*this),
1116   m_dcd_handler(*this),
1217   m_dsr_handler(*this),
r250291r250292
1823
1924rs232_port_device::rs232_port_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
2025   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
21   device_slot_interface(mconfig, *this),
26   device_slot_interface(mconfig, *this),
27   m_rxd(0),
28   m_dcd(0),
29   m_dsr(0),
30   m_ri(0),
31   m_cts(0),
2232   m_rxd_handler(*this),
2333   m_dcd_handler(*this),
2434   m_dsr_handler(*this),
trunk/src/devices/bus/rs232/ser_mouse.cpp
r250291r250292
1616   device_rs232_port_interface(mconfig, *this),
1717   device_serial_interface(mconfig, *this),
1818   m_dtr(1),
19   m_rts(1),
19   m_rts(1),
20   m_head(0),
21   m_tail(0),
22   m_mb(0),
23   m_timer(nullptr),
24   m_enabled(false),
2025   m_x(*this, "ser_mouse_x"),
2126   m_y(*this, "ser_mouse_y"),
2227   m_btn(*this, "ser_mouse_btn")
trunk/src/devices/bus/rs232/terminal.cpp
r250291r250292
1111   m_rs232_startbits(*this, "RS232_STARTBITS"),
1212   m_rs232_databits(*this, "RS232_DATABITS"),
1313   m_rs232_parity(*this, "RS232_PARITY"),
14   m_rs232_stopbits(*this, "RS232_STOPBITS")
14   m_rs232_stopbits(*this, "RS232_STOPBITS"),
15   m_curr_key(0),
16   m_key_valid(false)
1517{
1618}
1719
trunk/src/devices/bus/rs232/xvd701.cpp
r250291r250292
55jvc_xvd701_device::jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
66   : device_t(mconfig, JVC_XVD701, "JVC XV-D701", tag, owner, clock, "xvd701", __FILE__),
77   device_serial_interface(mconfig, *this),
8   device_rs232_port_interface(mconfig, *this)
8   device_rs232_port_interface(mconfig, *this),
9   m_response_index(0),
10   m_timer_response(nullptr)
911{
1012}
1113
trunk/src/devices/bus/s100/s100.cpp
r250291r250292
2727//-------------------------------------------------
2828
2929device_s100_card_interface::device_s100_card_interface(const machine_config &mconfig, device_t &device)
30   : device_slot_card_interface(mconfig, device)
30   : device_slot_card_interface(mconfig, device),
31   m_bus(nullptr),
32   m_next(nullptr)
3133{
3234}
3335
r250291r250292
3739//-------------------------------------------------
3840s100_slot_t::s100_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3941   device_t(mconfig, S100_SLOT, "S100 slot", tag, owner, clock, "s100_slot", __FILE__),
40   device_slot_interface(mconfig, *this)
42   device_slot_interface(mconfig, *this), m_bus(nullptr)
4143{
4244}
4345
trunk/src/devices/bus/s100/wunderbus.cpp
r250291r250292
245245   m_ace3(*this, INS8250_3_TAG),
246246   m_rtc(*this, UPD1990C_TAG),
247247   m_7c(*this, "7C"),
248   m_10a(*this, "10A")
248   m_10a(*this, "10A"), m_group(0), m_rtc_tp(0)
249249{
250250}
251251
trunk/src/devices/bus/saturn/sat_slot.cpp
r250291r250292
3737//-------------------------------------------------
3838
3939device_sat_cart_interface::device_sat_cart_interface(const machine_config &mconfig, device_t &device)
40   : device_slot_card_interface(mconfig, device),
40   : device_slot_card_interface(mconfig, device), m_cart_type(0),
4141      m_rom(NULL),
4242      m_rom_size(0)
4343{
r250291r250292
104104sat_cart_slot_device::sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
105105                  device_t(mconfig, SATURN_CART_SLOT, "Saturn Cartridge Slot", tag, owner, clock, "sat_cart_slot", __FILE__),
106106                  device_image_interface(mconfig, *this),
107                  device_slot_interface(mconfig, *this)
107                  device_slot_interface(mconfig, *this), m_cart(nullptr)
108108{
109109}
110110
trunk/src/devices/bus/scsi/scsi.cpp
r250291r250292
2121   m_data4_handler(*this),
2222   m_data5_handler(*this),
2323   m_data6_handler(*this),
24   m_data7_handler(*this),
24   m_data7_handler(*this),
25   m_device_count(0),
2526   m_bsy_in(0),
2627   m_sel_in(0),
2728   m_cd_in(0),
2829   m_io_in(0),
2930   m_msg_in(0),
3031   m_req_in(0),
31   m_ack_in(0),
32   m_ack_in(0),
33   m_atn_in(0),
3234   m_rst_in(0),
3335   m_data0_in(0),
3436   m_data1_in(0),
r250291r250292
4446   m_io_out(0),
4547   m_msg_out(0),
4648   m_req_out(0),
47   m_ack_out(0),
49   m_ack_out(0),
50   m_atn_out(0),
4851   m_rst_out(0),
4952   m_data0_out(0),
5053   m_data1_out(0),
trunk/src/devices/bus/scsi/scsihle.cpp
r250291r250292
1313scsihle_device::scsihle_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
1414   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
1515   scsi_port_interface(mconfig, *this),
16   m_scsi_id(*this, "SCSI_ID"),
16   m_scsi_id(*this, "SCSI_ID"),
17   req_timer(NULL),
18   sel_timer(NULL),
19   dataout_timer(NULL),
20   cmd_idx(0),
21   is_linked(0),
22   data_idx(0),
23   bytes_left(0),
24   data_last(0),
25   scsiID(0),
1726   m_input_data(0)
1827{
1928}
trunk/src/devices/bus/scv/rom.cpp
r250291r250292
4949}
5050
5151scv_rom32ram8_device::scv_rom32ram8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
52               : scv_rom8_device(mconfig, SCV_ROM32K_RAM8K, "SCV 32K + RAM 8K Carts", tag, owner, clock, "scv_rom32_ram8", __FILE__)
53{
52               : scv_rom8_device(mconfig, SCV_ROM32K_RAM8K, "SCV 32K + RAM 8K Carts", tag, owner, clock, "scv_rom32_ram8", __FILE__), m_ram_enabled(0)
53            {
5454}
5555
5656scv_rom64_device::scv_rom64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
57               : scv_rom8_device(mconfig, SCV_ROM16K, "SCV 64K Carts", tag, owner, clock, "scv_rom64", __FILE__)
58{
57               : scv_rom8_device(mconfig, SCV_ROM16K, "SCV 64K Carts", tag, owner, clock, "scv_rom64", __FILE__), m_bank_base(0)
58            {
5959}
6060
6161scv_rom128_device::scv_rom128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
62               : scv_rom8_device(mconfig, SCV_ROM32K, "SCV 128K Carts", tag, owner, clock, "scv_rom128", __FILE__)
63{
62               : scv_rom8_device(mconfig, SCV_ROM32K, "SCV 128K Carts", tag, owner, clock, "scv_rom128", __FILE__), m_bank_base(0)
63            {
6464}
6565
6666scv_rom128ram4_device::scv_rom128ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
67               : scv_rom8_device(mconfig, SCV_ROM128K_RAM4K, "SCV 128K + RAM 4K Carts", tag, owner, clock, "scv_rom128_ram4", __FILE__)
68{
67               : scv_rom8_device(mconfig, SCV_ROM128K_RAM4K, "SCV 128K + RAM 4K Carts", tag, owner, clock, "scv_rom128_ram4", __FILE__), m_bank_base(0), m_ram_enabled(0)
68            {
6969}
7070
7171
trunk/src/devices/bus/scv/slot.cpp
r250291r250292
7676                  device_t(mconfig, SCV_CART_SLOT, "SCV Cartridge Slot", tag, owner, clock, "scv_cart_slot", __FILE__),
7777                  device_image_interface(mconfig, *this),
7878                  device_slot_interface(mconfig, *this),
79                  m_type(SCV_8K)
79                  m_type(SCV_8K), m_cart(nullptr)
8080{
8181}
8282
trunk/src/devices/bus/sega8/rom.cpp
r250291r250292
4545
4646sega8_rom_device::sega8_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
4747               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
48                  device_sega8_cart_interface( mconfig, *this )
49{
48                  device_sega8_cart_interface( mconfig, *this ), m_ram_base(0), m_ram_enabled(0)
49            {
5050}
5151
5252sega8_rom_device::sega8_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5353               : device_t(mconfig, SEGA8_ROM_STD, "Mark III, SMS & GG Carts", tag, owner, clock, "sega8_rom", __FILE__),
54                  device_sega8_cart_interface( mconfig, *this )
55{
54                  device_sega8_cart_interface( mconfig, *this ), m_ram_base(0), m_ram_enabled(0)
55            {
5656}
5757
5858
r250291r250292
8686               : sega8_rom_device(mconfig, SEGA8_ROM_TEREBI, "SG-1000 Terebi Oekaki Cart", tag, owner, clock, "sega8_terebi", __FILE__),
8787                  m_tvdraw_x(*this, "TVDRAW_X"),
8888                  m_tvdraw_y(*this, "TVDRAW_Y"),
89                  m_tvdraw_pen(*this, "TVDRAW_PEN")
90{
89                  m_tvdraw_pen(*this, "TVDRAW_PEN"), m_tvdraw_data(0)
90            {
9191}
9292
9393
r250291r250292
108108sega8_eeprom_device::sega8_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
109109               : device_t(mconfig, SEGA8_ROM_EEPROM, "GG Carts + EEPROM", tag, owner, clock, "sega8_eeprom", __FILE__),
110110                  device_sega8_cart_interface( mconfig, *this ),
111                  m_eeprom(*this, "eeprom")
112{
111                  m_eeprom(*this, "eeprom"), m_93c46_enabled(0), m_93c46_lines(0)
112            {
113113}
114114
115115
116116sega8_codemasters_device::sega8_codemasters_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
117117               : device_t(mconfig, SEGA8_ROM_CODEMASTERS, "Mark III, SMS & GG Codemasters Carts", tag, owner, clock, "sega8_codemasters", __FILE__),
118                  device_sega8_cart_interface( mconfig, *this )
119{
118                  device_sega8_cart_interface( mconfig, *this ), m_ram_base(0), m_ram_enabled(0)
119            {
120120}
121121
122122
r250291r250292
128128
129129sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
130130               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
131                  device_sega8_cart_interface( mconfig, *this )
132{
131                  device_sega8_cart_interface( mconfig, *this ), m_ram_base(0), m_ram_enabled(0)
132            {
133133}
134134
135135sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
136136               : device_t(mconfig, SEGA8_ROM_ZEMINA, "SMS Zemina Carts", tag, owner, clock, "sega8_zemina", __FILE__),
137                  device_sega8_cart_interface( mconfig, *this )
138{
137                  device_sega8_cart_interface( mconfig, *this ), m_ram_base(0), m_ram_enabled(0)
138            {
139139}
140140
141141
r250291r250292
153153
154154
155155sega8_hicom_device::sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
156               : sega8_rom_device(mconfig, SEGA8_ROM_HICOM, "SMS Hi-Com Carts", tag, owner, clock, "sega8_hicom", __FILE__)
157{
156               : sega8_rom_device(mconfig, SEGA8_ROM_HICOM, "SMS Hi-Com Carts", tag, owner, clock, "sega8_hicom", __FILE__), m_rom_bank_base(0)
157            {
158158}
159159
160160
trunk/src/devices/bus/sega8/sega8_slot.cpp
r250291r250292
114114                  m_type(SEGA8_BASE_ROM),
115115                  m_must_be_loaded(FALSE),
116116                  m_interface("sms_cart"),
117                  m_extensions("bin")
117                  m_extensions("bin"), m_cart(nullptr)
118118{
119119   m_is_card = is_card;
120120}
r250291r250292
127127                  m_must_be_loaded(FALSE),
128128                  m_is_card(FALSE),
129129                  m_interface("sms_cart"),
130                  m_extensions("bin")
130                  m_extensions("bin"), m_cart(nullptr)
131131{
132132}
133133
trunk/src/devices/bus/sms_ctrl/lphaser.cpp
r250291r250292
7474   device_sms_control_port_interface(mconfig, *this),
7575   m_lphaser_pins(*this, "CTRL_PORT"),
7676   m_lphaser_x(*this, "LPHASER_X"),
77   m_lphaser_y(*this, "LPHASER_Y")
77   m_lphaser_y(*this, "LPHASER_Y"), m_sensor_last_state(0), m_lphaser_timer(nullptr)
7878{
7979   // Workaround for failed validation that occurs when running on a driver
8080   // with Sega Scope emulation, which adds 2 screens (left/right lenses).
trunk/src/devices/bus/sms_ctrl/smsctrl.cpp
r250291r250292
6262
6363sms_control_port_device::sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6464                  device_t(mconfig, SMS_CONTROL_PORT, "Sega SMS control port", tag, owner, clock, "sms_control_port", __FILE__),
65                  device_slot_interface(mconfig, *this),
65                  device_slot_interface(mconfig, *this), m_device(nullptr),
6666                  m_th_pin_handler(*this),
6767                  m_pixel_handler(*this)
6868{
trunk/src/devices/bus/sms_ctrl/sports.cpp
r250291r250292
154154   m_last_data(0),
155155   m_x_axis_reset_value(0x80), // value 0x80 helps when start playing paddle games.
156156   m_y_axis_reset_value(0x80),
157   m_interval(SPORTS_PAD_INTERVAL)
157   m_interval(SPORTS_PAD_INTERVAL), m_sportspad_timer(nullptr)
158158{
159159}
160160
trunk/src/devices/bus/sms_exp/smsexp.cpp
r250291r250292
5252
5353sms_expansion_slot_device::sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5454                  device_t(mconfig, SMS_EXPANSION_SLOT, "Sega SMS expansion slot", tag, owner, clock, "sms_expansion_slot", __FILE__),
55                  device_slot_interface(mconfig, *this)
55                  device_slot_interface(mconfig, *this), m_device(nullptr)
5656{
5757}
5858
trunk/src/devices/bus/snes/bsx.cpp
r250291r250292
2525
2626
2727sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
28               : sns_rom_device(mconfig, type, name, tag, owner, clock, shortname, source),
29                  m_slot(*this, "bs_slot")
28               : sns_rom_device(mconfig, type, name, tag, owner, clock, shortname, source),
29   m_base_unit(nullptr),
30   access_00_1f(0),
31   access_80_9f(0),
32   access_40_4f(0),
33   access_50_5f(0),
34   access_60_6f(0),
35   rom_access(0),
36   m_slot(*this, "bs_slot")
3037{
3138}
3239
3340sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3441               : sns_rom_device(mconfig, SNS_ROM_BSX, "SNES BS-X Cart", tag, owner, clock, "sns_rom_bsx", __FILE__),
42   m_base_unit(nullptr),
43   access_00_1f(0),
44   access_80_9f(0),
45   access_40_4f(0),
46   access_50_5f(0),
47   access_60_6f(0),
48   rom_access(0),
3549                  m_slot(*this, "bs_slot")
3650{
3751}
r250291r250292
4963}
5064
5165sns_rom_bsmempak_device::sns_rom_bsmempak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
52               : sns_rom_device(mconfig, SNS_BSMEMPAK, "SNES BS-X Memory packs", tag, owner, clock, "sns_bsmempak", __FILE__)
53{
66               : sns_rom_device(mconfig, SNS_BSMEMPAK, "SNES BS-X Memory packs", tag, owner, clock, "sns_bsmempak", __FILE__), m_command(0), m_write_old(0), m_write_new(0), m_flash_enable(0), m_read_enable(0), m_write_enable(0)
67            {
5468}
5569
5670
r250291r250292
113127// BS-X Base Unit emulation, to be device-fied ?
114128
115129BSX_base::BSX_base(running_machine &machine)
116         : m_machine(machine)
130         : r2192_minute(0), m_machine(machine)
117131{
118132   m_machine.save().save_item(regs, "SNES_BSX/regs");
119133   m_machine.save().save_item(r2192_counter, "SNES_BSX/r2192_counter");
trunk/src/devices/bus/snes/event.cpp
r250291r250292
2121
2222
2323sns_pfest94_device::sns_pfest94_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
24               : device_t(mconfig, SNS_PFEST94, "SNES Powerfest '94", tag, owner, clock, "sns_pfest94", __FILE__),
25                  device_sns_cart_interface( mconfig, *this ),
26                  m_upd7725(*this, "dsp"),
27                  m_dsw(*this, "DIPSW")
24   : device_t(mconfig, SNS_PFEST94, "SNES Powerfest '94", tag, owner, clock, "sns_pfest94", __FILE__),
25     device_sns_cart_interface(mconfig, *this),
26     m_upd7725(*this, "dsp"),
27     m_dsw(*this, "DIPSW"),
28     m_base_bank(0),
29     m_mask(0),
30     m_status(0),
31     m_count(0),
32     pfest94_timer(nullptr)
2833{
2934}
3035
trunk/src/devices/bus/snes/rom.cpp
r250291r250292
4242}
4343
4444sns_rom_obc1_device::sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
45               : sns_rom_device(mconfig, SNS_LOROM_OBC1, "SNES Cart (LoROM) + OBC-1", tag, owner, clock, "sns_rom_obc1", __FILE__)
46{
45               : sns_rom_device(mconfig, SNS_LOROM_OBC1, "SNES Cart (LoROM) + OBC-1", tag, owner, clock, "sns_rom_obc1", __FILE__), m_address(0), m_offset(0), m_shift(0)
46            {
4747}
4848
4949
5050
5151// Pirate LoROM 'mappers'
5252sns_rom_pokemon_device::sns_rom_pokemon_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53               : sns_rom_device(mconfig, SNS_LOROM_POKEMON, "SNES Pirate Carts with Protection", tag, owner, clock, "sns_rom_pokemon", __FILE__)
54{
53               : sns_rom_device(mconfig, SNS_LOROM_POKEMON, "SNES Pirate Carts with Protection", tag, owner, clock, "sns_rom_pokemon", __FILE__), m_latch(0)
54            {
5555}
5656
5757sns_rom_tekken2_device::sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
58               : sns_rom_device(mconfig, SNS_LOROM_TEKKEN2, "SNES Tekken 2", tag, owner, clock, "sns_rom_tekken2", __FILE__)
59{
58               : sns_rom_device(mconfig, SNS_LOROM_TEKKEN2, "SNES Tekken 2", tag, owner, clock, "sns_rom_tekken2", __FILE__), m_prot(0)
59            {
6060}
6161
6262sns_rom_soulblad_device::sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r250291r250292
7676
7777// Multigame LoROM 'mappers'
7878sns_rom_mcpirate1_device::sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
79               : sns_rom_device(mconfig, SNS_LOROM_MCPIR1, "SNES Pirate Multigame Carts Type 1", tag, owner, clock, "sns_rom_mcpirate1", __FILE__)
80{
79               : sns_rom_device(mconfig, SNS_LOROM_MCPIR1, "SNES Pirate Multigame Carts Type 1", tag, owner, clock, "sns_rom_mcpirate1", __FILE__), m_base_bank(0)
80            {
8181}
8282
8383sns_rom_mcpirate2_device::sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
84               : sns_rom_device(mconfig, SNS_LOROM_MCPIR2, "SNES Pirate Multigame Carts Type 2", tag, owner, clock, "sns_rom_mcpirate2", __FILE__)
85{
84               : sns_rom_device(mconfig, SNS_LOROM_MCPIR2, "SNES Pirate Multigame Carts Type 2", tag, owner, clock, "sns_rom_mcpirate2", __FILE__), m_base_bank(0)
85            {
8686}
8787
8888sns_rom_20col_device::sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
89               : sns_rom_device(mconfig, SNS_LOROM_20COL, "SNES Super 20 Collection", tag, owner, clock, "sns_rom_20col", __FILE__)
90{
89               : sns_rom_device(mconfig, SNS_LOROM_20COL, "SNES Super 20 Collection", tag, owner, clock, "sns_rom_20col", __FILE__), m_base_bank(0)
90            {
9191}
9292
9393
trunk/src/devices/bus/snes/rom21.cpp
r250291r250292
3232}
3333
3434sns_rom21_srtc_device::sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
35               : sns_rom21_device(mconfig, SNS_HIROM_SRTC, "SNES Cart (HiROM) + S-RTC", tag, owner, clock, "sns_rom21_srtc", __FILE__)
36{
35               : sns_rom21_device(mconfig, SNS_HIROM_SRTC, "SNES Cart (HiROM) + S-RTC", tag, owner, clock, "sns_rom21_srtc", __FILE__), m_mode(0), m_index(0)
36            {
3737}
3838
3939
trunk/src/devices/bus/snes/sa1.cpp
r250291r250292
8888sns_sa1_device::sns_sa1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
8989               : device_t(mconfig, SNS_LOROM_SA1, "SNES Cart + SA-1", tag, owner, clock, "sns_rom_sa1", __FILE__),
9090                  device_sns_cart_interface( mconfig, *this ),
91                  m_sa1(*this, "sa1cpu")
92{
91                  m_sa1(*this, "sa1cpu"), m_sa1_ctrl(0), m_scpu_sie(0), m_sa1_reset(0), m_sa1_nmi(0), m_sa1_irq(0), m_scpu_ctrl(0), m_sa1_sie(0), m_irq_vector(0), m_nmi_vector(0), m_hcount(0), m_vcount(0), m_bank_c_hi(0), m_bank_c_rom(0), m_bank_d_hi(0), m_bank_d_rom(0), m_bank_e_hi(0), m_bank_e_rom(0), m_bank_f_hi(0), m_bank_f_rom(0), m_bwram_snes(0), m_bwram_sa1(0), m_bwram_sa1_source(0), m_bwram_sa1_format(0), m_bwram_write_snes(0), m_bwram_write_sa1(0), m_bwpa_sa1(0), m_iram_write_snes(0), m_iram_write_sa1(0), m_dma_ctrl(0), m_dma_ccparam(0), m_src_addr(0), m_dst_addr(0), m_dma_cnt(0), m_math_ctlr(0), m_math_overflow(0), m_math_a(0), m_math_b(0), m_math_res(0), m_vda(0), m_vbit(0), m_vlen(0), m_drm(0), m_scpu_flags(0), m_sa1_flags(0), m_hcr(0), m_vcr(0)
92            {
9393}
9494
9595
trunk/src/devices/bus/snes/sdd1.cpp
r250291r250292
413413
414414sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
415415               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
416                  device_sns_cart_interface( mconfig, *this )
417{
416                  device_sns_cart_interface( mconfig, *this ), m_sdd1_enable(0), m_xfer_enable(0), m_sdd1emu(nullptr)
417            {
418418}
419419
420420sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
421421               : device_t(mconfig, SNS_LOROM_SDD1, "SNES Cart + S-DD1", tag, owner, clock, "sns_rom_sdd1", __FILE__),
422                  device_sns_cart_interface( mconfig, *this )
423{
422                  device_sns_cart_interface( mconfig, *this ), m_sdd1_enable(0), m_xfer_enable(0), m_sdd1emu(nullptr)
423            {
424424}
425425
426426
trunk/src/devices/bus/snes/sdd1.h
r250291r250292
1010class SDD1_IM //Input Manager
1111{
1212public:
13   SDD1_IM() {}
13   SDD1_IM():
14      m_byte_ptr(0),
15      m_bit_count(0)
16   { }
1417
1518   UINT32 m_byte_ptr;
1619   UINT8 m_bit_count;
r250291r250292
3437{
3538public:
3639   SDD1_BG(SDD1_GCD* associatedGCD, UINT8 code)
37   : m_code_num(code),
38   m_GCD(associatedGCD) { }
40      : m_code_num(code),
41        m_MPScount(0),
42        m_LPSind(0),
43        m_GCD(associatedGCD)
44   {
45   }
3946
4047   UINT8 m_code_num;
4148   UINT8 m_MPScount;
r250291r250292
8390{
8491public:
8592   SDD1_CM(SDD1_PEM* associatedPEM)
86   : m_PEM(associatedPEM) { }
93   : m_bitplanesInfo(0), m_contextBitsInfo(0), m_bit_number(0), m_currBitplane(0), m_PEM(associatedPEM) { }
8794
8895   UINT8 m_bitplanesInfo;
8996   UINT8 m_contextBitsInfo;
r250291r250292
101108{
102109public:
103110   SDD1_OL(SDD1_CM* associatedCM)
104   : m_CM(associatedCM) { }
111   : m_bitplanesInfo(0), m_length(0), m_buffer(nullptr), m_CM(associatedCM) { }
105112
106113   UINT8 m_bitplanesInfo;
107114   UINT16 m_length;
trunk/src/devices/bus/snes/sgb.cpp
r250291r250292
2222const device_type SNS_LOROM_SUPERGB = &device_creator<sns_rom_sgb_device>;
2323
2424
25sns_rom_sgb_device::sns_rom_sgb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
26               : sns_rom_device(mconfig, SNS_LOROM_SUPERGB, "SNES Super Game Boy Cart", tag, owner, clock, "sns_rom_sgb", __FILE__),
27               m_gb_cpu(*this, "sgb_cpu"),
28               m_gb_snd(*this, "sgb_snd"),
29               m_gb_lcd(*this, "sgb_lcd"),
30               m_cartslot(*this, "gb_slot")
25sns_rom_sgb_device::sns_rom_sgb_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
26   sns_rom_device(mconfig, SNS_LOROM_SUPERGB, "SNES Super Game Boy Cart", tag, owner, clock, "sns_rom_sgb", __FILE__),
27   m_gb_cpu(*this, "sgb_cpu"),
28   m_gb_snd(*this, "sgb_snd"),
29   m_gb_lcd(*this, "sgb_lcd"),
30   m_cartslot(*this, "gb_slot"),
31   m_sgb_ly(0),
32   m_sgb_row(0),
33   m_vram(0),
34   m_port(0),
35   m_joy1(0),
36   m_joy2(0),
37   m_joy3(0),
38   m_joy4(0),
39   m_vram_offs(0),
40   m_mlt_req(0),
41   m_lcd_row(0),
42   m_packetsize(0)
3143{
3244}
3345
trunk/src/devices/bus/snes/snes_slot.cpp
r250291r250292
177177                  device_image_interface(mconfig, *this),
178178                  device_slot_interface(mconfig, *this),
179179                  m_addon(ADDON_NONE),
180                  m_type(SNES_MODE20)
180                  m_type(SNES_MODE20), m_cart(nullptr)
181181{
182182}
183183
trunk/src/devices/bus/snes/spc7110.cpp
r250291r250292
2525
2626
2727sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
28         : sns_rom21_device(mconfig, type, name, tag, owner, clock, shortname, source)
29{
28         : sns_rom21_device(mconfig, type, name, tag, owner, clock, shortname, source), m_r4801(0), m_r4802(0), m_r4803(0), m_r4804(0), m_r4805(0), m_r4806(0), m_r4807(0),
29   m_r4808(0), m_r4809(0), m_r480a(0), m_r480b(0), m_r480c(0), m_decomp(nullptr), m_r4811(0), m_r4812(0), m_r4813(0), m_r4814(0), m_r4815(0), m_r4816(0), m_r4817(0), m_r4818(0),
30   m_r481x(0), m_r4814_latch(0), m_r4815_latch(0), m_r4820(0), m_r4821(0), m_r4822(0), m_r4823(0), m_r4824(0), m_r4825(0), m_r4826(0), m_r4827(0), m_r4828(0), m_r4829(0), m_r482a(0),
31   m_r482b(0), m_r482c(0), m_r482d(0), m_r482e(0), m_r482f(0), m_r4830(0), m_r4831(0), m_r4832(0), m_r4833(0), m_r4834(0), m_dx_offset(0), m_ex_offset(0), m_fx_offset(0), m_r4840(0),
32   m_r4841(0), m_r4842(0), m_rtc_state(0), m_rtc_mode(0), m_rtc_index(0), m_rtc_offset(0)
33      {
3034}
3135
3236sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
33         : sns_rom21_device(mconfig, SNS_HIROM_SPC7110, "SNES Cart + SPC-7110", tag, owner, clock, "sns_rom_spc7110", __FILE__)
37         : sns_rom21_device(mconfig, SNS_HIROM_SPC7110, "SNES Cart + SPC-7110", tag, owner, clock, "sns_rom_spc7110", __FILE__), m_r4801(0), m_r4802(0), m_r4803(0), m_r4804(0), m_r4805(0), m_r4806(0), m_r4807(0),
38   m_r4808(0), m_r4809(0), m_r480a(0), m_r480b(0), m_r480c(0), m_decomp(nullptr), m_r4811(0), m_r4812(0), m_r4813(0), m_r4814(0), m_r4815(0), m_r4816(0), m_r4817(0), m_r4818(0),
39   m_r481x(0), m_r4814_latch(0), m_r4815_latch(0), m_r4820(0), m_r4821(0), m_r4822(0), m_r4823(0), m_r4824(0), m_r4825(0), m_r4826(0), m_r4827(0), m_r4828(0), m_r4829(0), m_r482a(0),
40   m_r482b(0), m_r482c(0), m_r482d(0), m_r482e(0), m_r482f(0), m_r4830(0), m_r4831(0), m_r4832(0), m_r4833(0), m_r4834(0), m_dx_offset(0), m_ex_offset(0), m_fx_offset(0), m_r4840(0),
41   m_r4841(0), m_r4842(0), m_rtc_state(0), m_rtc_mode(0), m_rtc_index(0), m_rtc_offset(0)
3442{
3543}
3644
trunk/src/devices/bus/snes_ctrl/bcbattle.cpp
r250291r250292
8484snes_bcbattle_device::snes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8585               device_t(mconfig, SNES_BARCODE_BATTLER, "Epoch Barcode Battler (SFC)", tag, owner, clock, "snes_bcbattle", __FILE__),
8686               device_snes_control_port_interface(mconfig, *this),
87               m_reader(*this, "battler")
87               m_reader(*this, "battler"), m_pending_code(0), m_new_code(0), m_transmitting(0), m_cur_bit(0), m_cur_byte(0), battler_timer(nullptr), m_strobe(0), m_idx(0)
8888{
8989}
9090
trunk/src/devices/bus/snes_ctrl/ctrl.cpp
r250291r250292
5959
6060snes_control_port_device::snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6161                  device_t(mconfig, SNES_CONTROL_PORT, "Nintendo SNES / SFC control port", tag, owner, clock, "snes_control_port", __FILE__),
62                  device_slot_interface(mconfig, *this)
62                  device_slot_interface(mconfig, *this), m_device(nullptr)
6363{
6464}
6565
trunk/src/devices/bus/snes_ctrl/joypad.cpp
r250291r250292
5555snes_joypad_device::snes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5656               device_t(mconfig, SNES_JOYPAD, "Nintendo SNES / SFC Control Pad", tag, owner, clock, "snes_joypad", __FILE__),
5757               device_snes_control_port_interface(mconfig, *this),
58               m_joypad(*this, "JOYPAD")
58               m_joypad(*this, "JOYPAD"), m_strobe(0), m_latch(0)
5959{
6060}
6161
trunk/src/devices/bus/snes_ctrl/miracle.cpp
r250291r250292
6464               device_serial_interface(mconfig, *this),
6565               device_snes_control_port_interface(mconfig, *this),
6666               m_midiin(*this, "mdin"),
67               m_midiout(*this, "mdout")
67               m_midiout(*this, "mdout"), strobe_timer(nullptr), m_strobe_on(0), m_midi_mode(0), m_sent_bits(0), m_strobe_clock(0),
68   m_data_sent(0), m_xmit_read(0), m_xmit_write(0), m_recv_read(0), m_recv_write(0), m_tx_busy(false), m_read_status(false), m_status_bit(false)
6869{
6970}
7071
trunk/src/devices/bus/snes_ctrl/mouse.cpp
r250291r250292
6363               device_snes_control_port_interface(mconfig, *this),
6464               m_buttons(*this, "BUTTONS"),
6565               m_xaxis(*this, "MOUSE_X"),
66               m_yaxis(*this, "MOUSE_Y")
66               m_yaxis(*this, "MOUSE_Y"), m_strobe(0), m_idx(0), m_latch(0), m_x(0), m_y(0), m_oldx(0), m_oldy(0), m_deltax(0),
67   m_deltay(0), m_speed(0), m_dirx(0), m_diry(0)
6768{
6869}
6970
trunk/src/devices/bus/snes_ctrl/multitap.cpp
r250291r250292
7474   m_port2(*this, "port2"),
7575   m_port3(*this, "port3"),
7676   m_port4(*this, "port4"),
77   m_cfg(*this, "CONFIG")
77   m_cfg(*this, "CONFIG"), m_select(0)
7878{
7979}
8080
trunk/src/devices/bus/snes_ctrl/pachinko.cpp
r250291r250292
4848               device_t(mconfig, SNES_PACHINKO, "Sunsoft Pachinko Controller", tag, owner, clock, "snes_pachinko", __FILE__),
4949               device_snes_control_port_interface(mconfig, *this),
5050               m_dial(*this, "DIAL"),
51               m_button(*this, "BUTTON")
51               m_button(*this, "BUTTON"), m_strobe(0), m_latch(0)
5252{
5353}
5454
trunk/src/devices/bus/snes_ctrl/sscope.cpp
r250291r250292
5858               device_snes_control_port_interface(mconfig, *this),
5959               m_buttons(*this, "BUTTONS"),
6060               m_xaxis(*this, "SSX"),
61               m_yaxis(*this, "SSY")
61               m_yaxis(*this, "SSY"), m_strobe(0), m_idx(0), m_latch(0), m_x(0), m_y(0), m_turbo_lock(0), m_pause_lock(0), m_fire_lock(0)
6262{
6363}
6464
trunk/src/devices/bus/snes_ctrl/twintap.cpp
r250291r250292
5252snes_twintap_device::snes_twintap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5353               device_t(mconfig, SNES_TWINTAP, "Yonezawa Twin Tap Controller", tag, owner, clock, "snes_twintap", __FILE__),
5454               device_snes_control_port_interface(mconfig, *this),
55               m_inputs(*this, "INPUTS")
55               m_inputs(*this, "INPUTS"), m_strobe(0), m_latch(0)
5656{
5757}
5858
trunk/src/devices/bus/spc1000/exp.cpp
r250291r250292
3737//-------------------------------------------------
3838spc1000_exp_device::spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3939                  device_t(mconfig, SPC1000_EXP_SLOT, "Samsung SPC-1000 expansion", tag, owner, clock, "spc1000_exp", __FILE__),
40                  device_slot_interface(mconfig, *this)
40                  device_slot_interface(mconfig, *this), m_card(nullptr)
4141{
4242}
4343
trunk/src/devices/bus/spc1000/fdd.cpp
r250291r250292
139139      device_spc1000_card_interface(mconfig, *this),
140140      m_cpu(*this, "fdccpu"),
141141      m_fdc(*this, "upd765"),
142      m_pio(*this, "d8255_master")
143{
142      m_pio(*this, "d8255_master"), m_fd0(nullptr), m_fd1(nullptr), m_timer_tc(nullptr), m_i8255_0_pc(0), m_i8255_1_pc(0), m_i8255_portb(0)
143   {
144144}
145145
146146
trunk/src/devices/bus/ti99_peb/bwg.cpp
r250291r250292
8585*/
8686
8787snug_bwg_device::snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
88         : ti_expansion_card_device(mconfig, TI99_BWG, "SNUG BwG Floppy Controller", tag, owner, clock, "ti99_bwg", __FILE__),
88         : ti_expansion_card_device(mconfig, TI99_BWG, "SNUG BwG Floppy Controller", tag, owner, clock, "ti99_bwg", __FILE__), m_DRQ(), m_IRQ(), m_dip1(0), m_dip2(0), m_dip34(0), m_ram_page(0), m_rom_page(0), m_WAITena(false), m_inDsrArea(false), m_WDsel(false), m_WDsel0(false), m_RTCsel(false), m_lastK(false), m_dataregLB(false), m_rtc_enabled(false), m_MOTOR_ON(), m_lastval(0), m_address(0), m_DSEL(0), m_SIDSEL(), m_motor_on_timer(nullptr), m_dsrrom(nullptr), m_buffer_ram(nullptr), m_current_floppy(nullptr),
8989            m_wd1773(*this, FDC_TAG),
90            m_clock(*this, CLOCK_TAG) { }
90            m_clock(*this, CLOCK_TAG), m_debug_dataout(false)
91      { }
9192
9293/*
9394    Operate the wait state logic.
trunk/src/devices/bus/ti99_peb/evpc.cpp
r250291r250292
2626
2727snug_enhanced_video_device::snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2828: ti_expansion_card_device(mconfig, TI99_EVPC, "SNUG Enhanced Video Processor Card", tag, owner, clock, "ti99_evpc", __FILE__),
29   device_nvram_interface(mconfig, *this)
29   device_nvram_interface(mconfig, *this),
30   m_dsrrom(nullptr),
31   m_RAMEN(false),
32   m_dsr_page(0),
33   m_novram(nullptr)
3034{
3135}
3236
trunk/src/devices/bus/ti99_peb/hfdc.cpp
r250291r250292
8888   Constructor for the HFDC card.
8989*/
9090myarc_hfdc_device::myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
91   : ti_expansion_card_device(mconfig, TI99_HFDC, "Myarc Hard and Floppy Disk Controller", tag, owner, clock, "ti99_hfdc", __FILE__),
91   : ti_expansion_card_device(mconfig, TI99_HFDC, "Myarc Hard and Floppy Disk Controller", tag, owner, clock, "ti99_hfdc", __FILE__), m_motor_on_timer(nullptr),
9292      m_hdc9234(*this, FDC_TAG),
93      m_clock(*this, CLOCK_TAG)
93      m_clock(*this, CLOCK_TAG), m_current_floppy(nullptr), m_current_harddisk(nullptr), m_see_switches(false), m_irq(), m_dip(), m_motor_running(false),
94   m_inDsrArea(false), m_HDCsel(false), m_RTCsel(false), m_tapesel(false), m_RAMsel(false), m_ROMsel(false), m_address(0), m_dma_in_progress(false),
95   m_wait_for_hd1(false), m_dsrrom(nullptr), m_rom_page(0), m_buffer_ram(nullptr), m_status_latch(0), m_dma_address(0), m_output1_latch(0), m_output2_latch(0), m_lastval(0), m_MOTOR_ON(), m_readyflags(0)
9496{
9597}
9698
trunk/src/devices/bus/ti99_peb/horizon.cpp
r250291r250292
6767
6868horizon_ramdisk_device::horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6969: ti_expansion_card_device(mconfig, TI99_HORIZON, "Horizon 4000 Ramdisk", tag, owner, clock,"ti99_horizon",__FILE__),
70   device_nvram_interface(mconfig, *this)
70   device_nvram_interface(mconfig, *this), m_ram(nullptr), m_nvram(nullptr), m_ros(nullptr), m_select6_value(0), m_select_all(0), m_page(0), m_cru_horizon(0), m_cru_phoenix(0), m_timode(false), m_32k_installed(false), m_split_mode(false), m_rambo_mode(false), m_killswitch(false), m_use_rambo(false)
7171{
7272}
7373
trunk/src/devices/bus/ti99_peb/hsgpl.cpp
r250291r250292
140140#define ROM6_EEPROM "u6_rom6"
141141
142142snug_high_speed_gpl_device::snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
143: ti_expansion_card_device(mconfig, TI99_HSGPL, "SNUG High-speed GPL card", tag, owner, clock, "ti99_hsgpl", __FILE__)
143: ti_expansion_card_device(mconfig, TI99_HSGPL, "SNUG High-speed GPL card", tag, owner, clock, "ti99_hsgpl", __FILE__), m_dsr_eeprom(nullptr),
144m_rom6_eeprom(nullptr), m_grom_a_eeprom(nullptr), m_grom_b_eeprom(nullptr), m_ram6_memory(nullptr), m_gram_memory(nullptr), m_dsr_enabled(false),
145m_gram_enabled(false), m_bank_inhibit(false), m_dsr_page(0), m_card_enabled(false), m_write_enabled(false), m_supercart_enabled(false), m_led_on(false),
146m_mbx_enabled(false), m_ram_enabled(false), m_flash_mode(false), m_current_grom_port(0), m_current_bank(0), m_module_bank(0), m_waddr_LSB(false), m_raddr_LSB(false), m_grom_address(0)
144147{
145148}
146149
trunk/src/devices/bus/ti99_peb/memex.cpp
r250291r250292
3333};
3434
3535geneve_memex_device::geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
36: ti_expansion_card_device(mconfig, TI99_MEMEX, "Geneve memory expansion card", tag, owner, clock, "ti99_memex", __FILE__)
36: ti_expansion_card_device(mconfig, TI99_MEMEX, "Geneve memory expansion card", tag, owner, clock, "ti99_memex", __FILE__),
37  m_ram(nullptr),
38  m_genmod(0)
3739{
3840}
3941
trunk/src/devices/bus/ti99_peb/myarcmem.cpp
r250291r250292
4545};
4646
4747myarc_memory_expansion_device::myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48: ti_expansion_card_device(mconfig, TI99_MYARCMEM, "Myarc Memory expansion card MEXP-1", tag, owner, clock, "ti99_myarcmem", __FILE__)
48: ti_expansion_card_device(mconfig, TI99_MYARCMEM, "Myarc Memory expansion card MEXP-1", tag, owner, clock, "ti99_myarcmem", __FILE__),
49m_ram(nullptr), m_dsrrom(nullptr), m_bank(0), m_size(0)
4950{
5051}
5152
trunk/src/devices/bus/ti99_peb/pcode.cpp
r250291r250292
9696#define VERBOSE 1
9797
9898ti_pcode_card_device::ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
99: ti_expansion_card_device(mconfig, TI99_P_CODE, "TI-99 P-Code Card", tag, owner, clock, "ti99_pcode", __FILE__)
99: ti_expansion_card_device(mconfig, TI99_P_CODE, "TI-99 P-Code Card", tag, owner, clock, "ti99_pcode", __FILE__), m_rom(nullptr), m_bank_select(0), m_switch(false)
100100{
101101}
102102
trunk/src/devices/bus/ti99_peb/peribox.cpp
r250291r250292
220220: bus8z_device(mconfig, PERIBOX, "Peripheral expansion box", tag, owner, clock, "peribox", __FILE__),
221221   m_console_inta(*this),
222222   m_console_intb(*this),
223   m_datamux_ready(*this)
223   m_datamux_ready(*this), m_inta_flag(0), m_intb_flag(0), m_ready_flag(0)
224224{
225225   for (int i=2; i <= 8; i++) m_slot[i] = NULL;
226226   // The address prefix is actually created by the "Flex cable interface"
r250291r250292
235235: bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source),
236236   m_console_inta(*this),
237237   m_console_intb(*this),
238   m_datamux_ready(*this)
238   m_datamux_ready(*this), m_inta_flag(0), m_intb_flag(0), m_ready_flag(0), m_address_prefix(0)
239239{
240240   for (int i=2; i <= 8; i++) m_slot[i] = NULL;
241241}
r250291r250292
614614}
615615
616616peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
617: bus8z_device(mconfig, PERIBOX_SLOT, "TI P-Box slot", tag, owner, clock, "peribox_slot", __FILE__), device_slot_interface(mconfig, *this)
617: bus8z_device(mconfig, PERIBOX_SLOT, "TI P-Box slot", tag, owner, clock, "peribox_slot", __FILE__), device_slot_interface(mconfig, *this), m_card(nullptr), m_slotnumber(0)
618618{
619619}
620620
trunk/src/devices/bus/ti99_peb/peribox.h
r250291r250292
193193public:
194194   ti_expansion_card_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
195195   : bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source),
196   device_slot_card_interface(mconfig, *this)
197   {
196   device_slot_card_interface(mconfig, *this), m_selected(false), m_cru_base(0), m_select_mask(0), m_select_value(0)
197{
198198      m_slot = static_cast<peribox_slot_device*>(owner);
199199      m_senila = CLEAR_LINE;
200200      m_senilb = CLEAR_LINE;
trunk/src/devices/bus/ti99_peb/samsmem.cpp
r250291r250292
2626#define LOG logerror
2727
2828sams_memory_expansion_device::sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
29: ti_expansion_card_device(mconfig, TI99_SAMSMEM, "SuperAMS memory expansion card", tag, owner, clock, "ti99_sams", __FILE__)
29: ti_expansion_card_device(mconfig, TI99_SAMSMEM, "SuperAMS memory expansion card", tag, owner, clock, "ti99_sams", __FILE__), m_ram(nullptr), m_map_mode(false), m_access_mapper(false)
3030{
3131}
3232
trunk/src/devices/bus/ti99_peb/spchsyn.cpp
r250291r250292
3333/****************************************************************************/
3434
3535ti_speech_synthesizer_device::ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
36: ti_expansion_card_device(mconfig, TI99_SPEECH, "TI-99 Speech synthesizer (on adapter card)", tag, owner, clock, "ti99_speech", __FILE__)
36: ti_expansion_card_device(mconfig, TI99_SPEECH, "TI-99 Speech synthesizer (on adapter card)", tag, owner, clock, "ti99_speech", __FILE__), m_vsp(nullptr), m_read_mode(false)
3737{
3838}
3939
trunk/src/devices/bus/ti99_peb/ti_32kmem.cpp
r250291r250292
3232#define RAMREGION "ram"
3333
3434ti_32k_expcard_device::ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
35: ti_expansion_card_device(mconfig, TI_32KMEM, "TI-99 32KiB memory expansion card", tag, owner, clock, "ti99_32k", __FILE__)
35: ti_expansion_card_device(mconfig, TI_32KMEM, "TI-99 32KiB memory expansion card", tag, owner, clock, "ti99_32k", __FILE__), m_ram_ptr(nullptr)
3636{
3737}
3838
trunk/src/devices/bus/ti99_peb/ti_fdc.cpp
r250291r250292
4848#define TI_FDC_TAG "ti_dssd_controller"
4949
5050ti_fdc_device::ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
51         : ti_expansion_card_device(mconfig, TI99_FDC, "TI-99 Standard DSSD Floppy Controller", tag, owner, clock, "ti99_fdc", __FILE__),
52         m_fd1771(*this, FDC_TAG) { }
51         : ti_expansion_card_device(mconfig, TI99_FDC, "TI-99 Standard DSSD Floppy Controller", tag, owner, clock, "ti99_fdc", __FILE__), m_address(0), m_DRQ(), m_IRQ(),
52   m_lastval(0), m_DVENA(), m_inDsrArea(false), m_WAITena(false), m_WDsel(false), m_DSEL(0), m_SIDSEL(), m_motor_on_timer(nullptr),
53         m_fd1771(*this, FDC_TAG), m_dsrrom(nullptr), m_current_floppy(nullptr), m_debug_dataout(false)
54      { }
5355
5456/*
5557    Operate the wait state logic.
trunk/src/devices/bus/ti99_peb/ti_rs232.cpp
r250291r250292
117117#define ESC 0x1b
118118
119119ti_rs232_pio_device::ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
120: ti_expansion_card_device(mconfig, TI99_RS232, "TI-99 RS232/PIO interface", tag, owner, clock, "ti99_rs232", __FILE__)
120: ti_expansion_card_device(mconfig, TI99_RS232, "TI-99 RS232/PIO interface", tag, owner, clock, "ti99_rs232", __FILE__), m_piodev(nullptr), m_dsrrom(nullptr), m_pio_direction_in(false), m_pio_handshakeout(false), m_pio_handshakein(false), m_pio_spareout(false), m_pio_sparein(false), m_flag0(false), m_led(false), m_pio_out_buffer(0), m_pio_in_buffer(0), m_pio_readable(false), m_pio_writable(false), m_pio_write(false), m_ila(0)
121121{
122122}
123123
trunk/src/devices/bus/ti99_peb/tn_ide.cpp
r250291r250292
5050};
5151
5252nouspikel_ide_interface_device::nouspikel_ide_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
53   : ti_expansion_card_device(mconfig, TI99_IDE, "Nouspikel IDE interface card", tag, owner, clock, "ti99_ide", __FILE__),
54   m_ata(*this, "ata")
53   : ti_expansion_card_device(mconfig, TI99_IDE, "Nouspikel IDE interface card", tag, owner, clock, "ti99_ide", __FILE__), m_ata_irq(false),
54   m_cru_register(0), m_rtc(nullptr),
55   m_ata(*this, "ata"), m_clk_irq(false), m_sram_enable(false), m_sram_enable_dip(false), m_cur_page(0), m_tms9995_mode(false),
56   m_input_latch(0), m_output_latch(0), m_ram(nullptr)
5557{
5658}
5759
trunk/src/devices/bus/ti99_peb/tn_usbsm.cpp
r250291r250292
5252};
5353
5454nouspikel_usb_smartmedia_device::nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
55: ti_expansion_card_device(mconfig, TI99_USBSM, "Nouspikel USB/Smartmedia card", tag, owner, clock, "ti99_usbsm", __FILE__),
55: ti_expansion_card_device(mconfig, TI99_USBSM, "Nouspikel USB/Smartmedia card", tag, owner, clock, "ti99_usbsm", __FILE__),
56m_feeprom_page(0), m_sram_page(0), m_cru_register(0), m_tms9995_mode(false), m_enable_io(false), m_enable_int(false), m_enable_sm(false),
57m_write_flash(false), m_input_latch(0), m_output_latch(0),
5658   m_smartmedia(*this, "smartmedia"),
5759   m_flash(*this, STRATA_TAG)
5860{
trunk/src/devices/bus/ti99x/990_dk.cpp
r250291r250292
4343const device_type FD800 = &device_creator<fd800_legacy_device>;
4444
4545fd800_legacy_device::fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
46   : device_t(mconfig, FD800, "TI FD800 Diablo floppy disk controller", tag, owner, clock, "fd800", __FILE__),
47   m_int_line(*this)
46   : device_t(mconfig, FD800, "TI FD800 Diablo floppy disk controller", tag, owner, clock, "fd800", __FILE__),
47   m_recv_buf(0), m_stat_reg(0), m_xmit_buf(0), m_cmd_reg(0), m_interrupt_f_f(0),
48   m_int_line(*this), m_buf_pos(0), m_buf_mode(), m_unit(0), m_sector(0)
4849{
4950}
5051
trunk/src/devices/bus/ti99x/998board.cpp
r250291r250292
205205
206206mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
207207   : bus8z_device(mconfig, MAINBOARD8, "TI-99/8 Main board", tag, owner, clock, "ti998_mainboard", __FILE__),
208   m_ready(*this),
208   m_ready(*this), m_dsr_selected(false), m_hexbus_selected(false), m_CRUS(false), m_PTGE(false), m_waitcount(0), m_sram(nullptr), m_dram(nullptr), m_rom0(nullptr), m_rom1(nullptr), m_pcode(nullptr),
209209   m_oso(*this, OSO_TAG)
210210   { }
211211
r250291r250292
859859};
860860
861861ti998_oso_device::ti998_oso_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
862: device_t(mconfig, OSO, "OSO Hexbus interface", tag, owner, clock, "ti998_oso", __FILE__)
862: device_t(mconfig, OSO, "OSO Hexbus interface", tag, owner, clock, "ti998_oso", __FILE__), m_data(0), m_status(0), m_control(0), m_xmit(0)
863863{
864864}
865865
r250291r250292
948948#define REAL_TIMING 0
949949
950950ti998_spsyn_device::ti998_spsyn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
951: bus8z_device(mconfig, SPEECH8, "TI-99/8 Onboard Speech synthesizer", tag, owner, clock, "ti998_speech", __FILE__),
951: bus8z_device(mconfig, SPEECH8, "TI-99/8 Onboard Speech synthesizer", tag, owner, clock, "ti998_speech", __FILE__), m_vsp(nullptr),
952952   m_ready(*this)
953953{
954954}
trunk/src/devices/bus/ti99x/998board.h
r250291r250292
9090
9191public:
9292   logically_addressed_device(mapper8_device_kind kind, device_t *busdevice, const mapper8_list_entry &entry)
93   : m_kind(kind), m_device(busdevice), m_config(&entry) { };
93   : m_next(nullptr), m_kind(kind), m_device(busdevice), m_config(&entry) { };
9494
9595private:
9696   logically_addressed_device     *m_next;        // needed for simple_list
r250291r250292
109109
110110public:
111111   physically_addressed_device(mapper8_device_kind kind, device_t *busdevice, const mapper8_list_entry &entry)
112   : m_kind(kind), m_device(busdevice), m_config(&entry) { };
112   : m_next(nullptr), m_kind(kind), m_device(busdevice), m_config(&entry) { };
113113
114114private:
115115   physically_addressed_device       *m_next;        // needed for simple_list
trunk/src/devices/bus/ti99x/datamux.cpp
r250291r250292
7575    Constructor
7676*/
7777ti99_datamux_device::ti99_datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
78: device_t(mconfig, DATAMUX, "Databus multiplexer", tag, owner, clock, "ti99_datamux", __FILE__),
79   m_ready(*this) { }
78: device_t(mconfig, DATAMUX, "Databus multiplexer", tag, owner, clock, "ti99_datamux", __FILE__), m_spacep(nullptr),
79   m_ready(*this), m_muxready(), m_sysready(), m_addr_buf(0), m_read_mode(false), m_latch(0), m_waitcount(0), m_ram16b(nullptr), m_use32k(false), m_base32k(0), m_cpu(nullptr)
80{ }
8081
8182#define TRACE_READY 0
8283#define TRACE_ACCESS 0
trunk/src/devices/bus/ti99x/datamux.h
r250291r250292
5454
5555public:
5656   attached_device(device_t *busdevice, const dmux_device_list_entry &entry)
57   : m_device(busdevice), m_config(&entry) { };
57   : m_next(nullptr), m_device(busdevice), m_config(&entry) { };
5858
5959private:
6060   attached_device                 *m_next;
trunk/src/devices/bus/ti99x/genboard.cpp
r250291r250292
206206#define TRACE_PFM 0
207207
208208geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
209: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__),
210   m_ready(*this)
209: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false), m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false), m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false), m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false), m_cartridge_size(0), m_cartridge_secondpage(false), m_cartridge6_writable(false), m_cartridge7_writable(false), m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0), m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0),
210   m_ready(*this), m_waitcount(0), m_ext_waitcount(0), m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr), m_pfm512a(nullptr), m_keyboard(nullptr), m_video(nullptr), m_peribox(nullptr), m_sound(nullptr), m_sram(nullptr), m_dram(nullptr)
211211{
212212   m_eprom = NULL;
213213}
r250291r250292
14681468
14691469geneve_keyboard_device::geneve_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
14701470: device_t(mconfig, GENEVE_KEYBOARD, "Geneve XT-style keyboard", tag, owner, clock, "geneve_keyboard", __FILE__),
1471   m_interrupt(*this)
1471   m_interrupt(*this), m_key_reset(false), m_key_queue_length(0), m_key_queue_head(0), m_key_in_buffer(false), m_key_numlock_state(false), m_key_ctrl_state(0), m_key_alt_state(0),
1472   m_key_real_shift_state(0), m_key_fake_shift_state(false), m_key_fake_unshift_state(false), m_key_autorepeat_key(0), m_key_autorepeat_timer(0), m_keep_keybuf(false),
1473   m_keyboard_clock(false), m_timer(nullptr)
14721474{
14731475}
14741476
r250291r250292
19181920****************************************************************************/
19191921
19201922geneve_mouse_device::geneve_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1921: device_t(mconfig, GENEVE_MOUSE, "Geneve mouse", tag, owner, clock, "geneve_mouse", __FILE__)
1923: device_t(mconfig, GENEVE_MOUSE, "Geneve mouse", tag, owner, clock, "geneve_mouse", __FILE__), m_v9938(nullptr), m_last_mx(0), m_last_my(0)
19221924{
19231925}
19241926
trunk/src/devices/bus/ti99x/grom.cpp
r250291r250292
9393    Constructor.
9494*/
9595ti99_grom_device::ti99_grom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
96: bus8z_device(mconfig, GROM, "TI-99 GROM device", tag, owner, clock, "ti99_grom", __FILE__),
97   m_gromready(*this)
96: bus8z_device(mconfig, GROM, "TI-99 GROM device", tag, owner, clock, "ti99_grom", __FILE__), m_writable(false), m_ident(0), m_size(0),
97   m_gromready(*this), m_clockrate(0), m_address(0), m_buffer(0), m_raddr_LSB(false), m_waddr_LSB(false), m_memptr(nullptr), m_timer(nullptr)
9898{
9999}
100100
trunk/src/devices/bus/ti99x/gromport.cpp
r250291r250292
137137gromport_device::gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
138138   :   bus8z_device(mconfig, GROMPORT, "Cartridge port", tag, owner, clock, "gromport", __FILE__),
139139      device_slot_interface(mconfig, *this),
140      m_connector(NULL),
140      m_connector(nullptr),
141141      m_reset_on_insert(true),
142142      m_console_ready(*this),
143      m_console_reset(*this) { }
143      m_console_reset(*this), m_grombase(0), m_grommask(0)
144{ }
144145
145146/* Only called for addresses 6000-7fff and GROM addresses (see datamux config) */
146147READ8Z_MEMBER(gromport_device::readz)
r250291r250292
14521453    Unlike in the previous implementation we do not model it as a full device.
14531454***************************************************************************/
14541455
1455ti99_cartridge_pcb::ti99_cartridge_pcb()
1456ti99_cartridge_pcb::ti99_cartridge_pcb(): m_cart(nullptr), m_grom_size(0), m_rom_size(0), m_ram_size(0), m_rom_ptr(nullptr), m_ram_ptr(nullptr), m_rom_page(0), m_grom_ptr(nullptr), m_grom_address(0), m_ram_page(0), m_tag(nullptr)
14561457{
14571458}
14581459
r250291r250292
21242125    Constructor.
21252126*/
21262127rpk::rpk(emu_options& options, const char* sysname)
2127   :m_options(options)
2128   //,m_system_name(sysname)
2128   :m_options(options), m_type(0)
2129//,m_system_name(sysname)
21292130{
21302131   m_sockets.reset();
21312132}
r250291r250292
24612462         if (strcmp(socket_node->name, "socket")!=0) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> element has only <socket> children");
24622463         id = xml_get_attribute_string(socket_node, "id", NULL);
24632464         if (id == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have an 'id' attribute");
2464         uses_name = xml_get_attribute_string(socket_node, "uses", NULL);
2465         if (uses_name == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have a 'uses' attribute");
2465         uses_name = xml_get_attribute_string(socket_node, "uses", nullptr);
2466         if (uses_name == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have a 'uses' attribute");
24662467
24672468         bool found = false;
24682469         // Locate the resource node
trunk/src/devices/bus/ti99x/gromport.h
r250291r250292
404404class ti99_gromemu_cartridge : public ti99_cartridge_pcb
405405{
406406public:
407   ti99_gromemu_cartridge() {  m_grom_address = 0; }
407   ti99_gromemu_cartridge(): m_waddr_LSB(false)
408   {  m_grom_address = 0; }
408409   ~ti99_gromemu_cartridge() { };
409410   DECLARE_READ8Z_MEMBER(readz);
410411   DECLARE_WRITE8_MEMBER(write);
trunk/src/devices/bus/ti99x/handset.cpp
r250291r250292
5151static const char *const keynames[] = { "KP0", "KP1", "KP2", "KP3", "KP4" };
5252
5353ti99_handset_device::ti99_handset_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
54: joyport_attached_device(mconfig, HANDSET, "TI-99/4 IR handset", tag, owner, clock, "handset", __FILE__)
54: joyport_attached_device(mconfig, HANDSET, "TI-99/4 IR handset", tag, owner, clock, "handset", __FILE__), m_ack(0), m_clock_high(false), m_buf(0), m_buflen(0), m_delay_timer(nullptr)
5555{
5656}
5757
r250291r250292
490490INPUT_PORTS_END
491491
492492ti99_twin_joystick::ti99_twin_joystick(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
493: joyport_attached_device(mconfig, HANDSET, "TI-99/4(A) Twin Joystick", tag, owner, clock, "twinjoy", __FILE__)
493: joyport_attached_device(mconfig, HANDSET, "TI-99/4(A) Twin Joystick", tag, owner, clock, "twinjoy", __FILE__), m_joystick(0)
494494{
495495}
496496
trunk/src/devices/bus/ti99x/joyport.cpp
r250291r250292
4242joyport_device::joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4343   :   device_t(mconfig, JOYPORT, "Joystick port", tag, owner, clock, "ti99_joyport", __FILE__),
4444      device_slot_interface(mconfig, *this),
45      m_interrupt(*this)
45      m_interrupt(*this), m_connected(nullptr)
4646{
4747}
4848
trunk/src/devices/bus/ti99x/joyport.h
r250291r250292
3333{
3434public:
3535   joyport_attached_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
36   : device_t(mconfig, type, name, tag, owner, clock, shortname, source) { }
36   : device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_joyport(nullptr)
37{ }
3738
3839   virtual UINT8 read_dev() =0;
3940   virtual void write_dev(UINT8 data) =0;
trunk/src/devices/bus/ti99x/mecmouse.cpp
r250291r250292
5353#define POLL_TIMER 1
5454
5555mecmouse_device::mecmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
56   : joyport_attached_device(mconfig, MECMOUSE, "Mechatronics Mouse", tag, owner, clock, "mecmouse", __FILE__)
56   : joyport_attached_device(mconfig, MECMOUSE, "Mechatronics Mouse", tag, owner, clock, "mecmouse", __FILE__), m_last_select(0), m_read_y_axis(false), m_x(0), m_y(0), m_x_buf(0), m_y_buf(0), m_last_mx(0), m_last_my(0), m_poll_timer(nullptr)
5757{
5858}
5959
trunk/src/devices/bus/ti99x/videowrp.cpp
r250291r250292
2828    Constructors
2929*/
3030ti_video_device::ti_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
31: bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source)
31: bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source),
32m_tms9928a(nullptr)
3233{
3334}
3435
r250291r250292
3839}
3940
4041ti_exp_video_device::ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
41   : ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__)
42   : ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__), m_v9938(nullptr)
4243{
4344}
4445
trunk/src/devices/bus/ti99x/videowrp.h
r250291r250292
8585{
8686public:
8787   ti_sound_system_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
88   : bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source),
88   : bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source), m_sound_chip(nullptr),
8989      m_console_ready(*this) { };
9090
9191   // Cannot read from sound; just ignore silently
trunk/src/devices/bus/tiki100/exp.cpp
r250291r250292
2929tiki100_bus_slot_t::tiki100_bus_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, TIKI100_BUS_SLOT, "TIKI-100 expansion bus slot", tag, owner, clock, "tiki100bus_slot", __FILE__),
3131   device_slot_interface(mconfig, *this),
32   device_z80daisy_interface(mconfig, *this)
32   device_z80daisy_interface(mconfig, *this),
33   m_bus(nullptr),
34   m_card(nullptr)
3335{
3436}
3537
r250291r250292
186188//-------------------------------------------------
187189
188190device_tiki100bus_card_interface::device_tiki100bus_card_interface(const machine_config &mconfig, device_t &device) :
189   device_slot_card_interface(mconfig, device),
190   m_busak(CLEAR_LINE)
191   device_slot_card_interface(mconfig, device), m_bus(nullptr),
192   m_busak(CLEAR_LINE), m_next(nullptr)
191193{
192194   m_slot = dynamic_cast<tiki100_bus_slot_t *>(device.owner());
193195}
trunk/src/devices/bus/tvc/hbf.cpp
r250291r250292
6161tvc_hbf_device::tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6262      : device_t(mconfig, TVC_HBF, "HBF floppy interface", tag, owner, clock, "tvc_hbf", __FILE__),
6363      device_tvcexp_interface( mconfig, *this ),
64      m_fdc(*this, "fdc")
65{
64      m_fdc(*this, "fdc"), m_rom(nullptr), m_ram(nullptr), m_rom_bank(0)
65   {
6666}
6767
6868
trunk/src/devices/bus/tvc/tvc.cpp
r250291r250292
5656      device_t(mconfig, TVCEXP_SLOT, "TVC64 Expansion Slot", tag, owner, clock, "tvcexp_slot", __FILE__),
5757      device_slot_interface(mconfig, *this),
5858      m_out_irq_cb(*this),
59      m_out_nmi_cb(*this)
59      m_out_nmi_cb(*this), m_cart(nullptr)
6060{
6161}
6262
trunk/src/devices/bus/vboy/slot.cpp
r250291r250292
7878                  device_t(mconfig, VBOY_CART_SLOT, "Nintendo Virtual Boy Cartridge Slot", tag, owner, clock, "vboy_cart_slot", __FILE__),
7979                  device_image_interface(mconfig, *this),
8080                  device_slot_interface(mconfig, *this),
81                  m_type(VBOY_STD)
81                  m_type(VBOY_STD), m_cart(nullptr)
8282{
8383}
8484
trunk/src/devices/bus/vc4000/slot.cpp
r250291r250292
7676                  device_t(mconfig, VC4000_CART_SLOT, "Interton VC 4000 Cartridge Slot", tag, owner, clock, "vc4000_cart_slot", __FILE__),
7777                  device_image_interface(mconfig, *this),
7878                  device_slot_interface(mconfig, *this),
79                  m_type(VC4000_STD)
79                  m_type(VC4000_STD), m_cart(nullptr)
8080{
8181}
8282
trunk/src/devices/bus/vcs/dpc.cpp
r250291r250292
1717const device_type ATARI_DPC = &device_creator<dpc_device>;
1818
1919
20dpc_device::dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
21         : device_t(mconfig, ATARI_DPC, "Atari DCP", tag, owner, clock, "atari_dcp", __FILE__),
22            m_displaydata(NULL)
20dpc_device::dpc_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
21   device_t(mconfig, ATARI_DPC, "Atari DCP", tag, owner, clock, "atari_dcp", __FILE__),
22   m_movamt(0),
23   m_latch_62(0),
24   m_latch_64(0),
25   m_dlc(0),
26   m_shift_reg(0),
27   m_displaydata(nullptr),
28   m_oscillator(nullptr)
2329{
2430}
2531
trunk/src/devices/bus/vcs/rom.cpp
r250291r250292
104104
105105
106106a26_rom_fe_device::a26_rom_fe_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
107               : a26_rom_2k_device(mconfig, A26_ROM_FE, "Atari VCS 2600 ROM Carts w/FE bankswitch", tag, owner, clock, "vcs_fe", __FILE__)
108{
107               : a26_rom_2k_device(mconfig, A26_ROM_FE, "Atari VCS 2600 ROM Carts w/FE bankswitch", tag, owner, clock, "vcs_fe", __FILE__), m_base_bank(0), m_trigger_on_next_access(0)
108            {
109109}
110110
111111
112112a26_rom_3e_device::a26_rom_3e_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
113               : a26_rom_f6_device(mconfig, A26_ROM_3E, "Atari VCS 2600 ROM Carts w/3E bankswitch", tag, owner, clock, "vcs_3e", __FILE__)
114{
113               : a26_rom_f6_device(mconfig, A26_ROM_3E, "Atari VCS 2600 ROM Carts w/3E bankswitch", tag, owner, clock, "vcs_3e", __FILE__), m_num_bank(0), m_ram_bank(0), m_ram_enable(0)
114            {
115115}
116116
117117
118118a26_rom_3f_device::a26_rom_3f_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
119               : a26_rom_f6_device(mconfig, A26_ROM_3F, "Atari VCS 2600 ROM Carts w/3F bankswitch", tag, owner, clock, "vcs_3f", __FILE__)
120{
119               : a26_rom_f6_device(mconfig, A26_ROM_3F, "Atari VCS 2600 ROM Carts w/3F bankswitch", tag, owner, clock, "vcs_3f", __FILE__), m_num_bank(0)
120            {
121121}
122122
123123
r250291r250292
128128
129129
130130a26_rom_e7_device::a26_rom_e7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
131               : a26_rom_f6_device(mconfig, A26_ROM_E7, "Atari VCS 2600 ROM Carts w/E7 bankswitch", tag, owner, clock, "vcs_e7", __FILE__)
132{
131               : a26_rom_f6_device(mconfig, A26_ROM_E7, "Atari VCS 2600 ROM Carts w/E7 bankswitch", tag, owner, clock, "vcs_e7", __FILE__), m_ram_bank(0)
132            {
133133}
134134
135135
r250291r250292
152152
153153
154154a26_rom_fv_device::a26_rom_fv_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
155               : a26_rom_f6_device(mconfig, A26_ROM_FV, "Atari VCS 2600 ROM Carts w/FV bankswitch", tag, owner, clock, "vcs_fv", __FILE__)
156{
155               : a26_rom_f6_device(mconfig, A26_ROM_FV, "Atari VCS 2600 ROM Carts w/FV bankswitch", tag, owner, clock, "vcs_fv", __FILE__), m_locked(0)
156            {
157157}
158158
159159
r250291r250292
170170
171171
172172a26_rom_8in1_device::a26_rom_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
173               : a26_rom_f8_device(mconfig, A26_ROM_8IN1, "Atari VCS 2600 ROM Cart 8 in 1", tag, owner, clock, "vcs_8in1", __FILE__)
174{
173               : a26_rom_f8_device(mconfig, A26_ROM_8IN1, "Atari VCS 2600 ROM Cart 8 in 1", tag, owner, clock, "vcs_8in1", __FILE__), m_reset_bank(0)
174            {
175175}
176176
177177
trunk/src/devices/bus/vcs/scharger.cpp
r250291r250292
4242
4343a26_rom_ss_device::a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
4444                  : a26_rom_f6_device(mconfig, A26_ROM_SUPERCHARGER, "Atari 2600 ROM Cart Supercharger", tag, owner, clock, "a2600_ss", __FILE__),
45                     m_cassette(*this, "cassette")
46{
45                     m_cassette(*this, "cassette"),
46   m_maincpu(nullptr),
47   m_reg(0),
48   m_write_delay(0),
49   m_ram_write_enabled(0),
50   m_rom_enabled(0),
51   m_byte_started(0),
52   m_last_address(0),
53   m_diff_adjust(0)
54               {
4755}
4856
4957//-------------------------------------------------
trunk/src/devices/bus/vcs/vcs_slot.cpp
r250291r250292
8080vcs_cart_slot_device::vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8181                  device_t(mconfig, VCS_CART_SLOT, "Atari VCS 2600 Cartridge Slot", tag, owner, clock, "vcs_cart_slot", __FILE__),
8282                  device_image_interface(mconfig, *this),
83                  device_slot_interface(mconfig, *this)
83                  device_slot_interface(mconfig, *this), m_cart(nullptr), m_type(0)
8484{
8585}
8686
trunk/src/devices/bus/vcs_ctrl/ctrl.cpp
r250291r250292
4444
4545vcs_control_port_device::vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4646   device_t(mconfig, VCS_CONTROL_PORT, "Atari VCS control port", tag, owner, clock, "vcs_control_port", __FILE__),
47   device_slot_interface(mconfig, *this),
47   device_slot_interface(mconfig, *this), m_device(nullptr),
4848   m_write_trigger(*this)
4949{
5050}
trunk/src/devices/bus/vcs_ctrl/keypad.cpp
r250291r250292
5656vcs_keypad_device::vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5757   device_t(mconfig, VCS_KEYPAD, "Atari / CBM Keypad", tag, owner, clock, "vcs_keypad", __FILE__),
5858   device_vcs_control_port_interface(mconfig, *this),
59   m_keypad(*this, "KEYPAD")
59   m_keypad(*this, "KEYPAD"), m_column(0)
6060{
6161}
6262
trunk/src/devices/bus/vectrex/rom.cpp
r250291r250292
3838}
3939
4040vectrex_rom64k_device::vectrex_rom64k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
41               : vectrex_rom_device(mconfig, VECTREX_ROM_64K, "Vectrex Carts w/ Bankswitch", tag, owner, clock, "vectrex_64k", __FILE__)
42{
41               : vectrex_rom_device(mconfig, VECTREX_ROM_64K, "Vectrex Carts w/ Bankswitch", tag, owner, clock, "vectrex_64k", __FILE__), m_bank(0)
42            {
4343}
4444
4545vectrex_sram_device::vectrex_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
trunk/src/devices/bus/vectrex/slot.cpp
r250291r250292
6767                  device_image_interface(mconfig, *this),
6868                  device_slot_interface(mconfig, *this),
6969                  m_type(VECTREX_STD),
70                  m_vec3d(VEC3D_NONE)
70                  m_vec3d(VEC3D_NONE), m_cart(nullptr)
7171{
7272}
7373
trunk/src/devices/bus/vic10/exp.cpp
r250291r250292
6363      m_write_irq(*this),
6464      m_write_res(*this),
6565      m_write_cnt(*this),
66      m_write_sp(*this)
66      m_write_sp(*this), m_card(nullptr)
6767{
6868}
6969
trunk/src/devices/bus/vic20/exp.cpp
r250291r250292
6262      device_image_interface(mconfig, *this),
6363      m_write_irq(*this),
6464      m_write_nmi(*this),
65      m_write_res(*this)
65      m_write_res(*this), m_card(nullptr)
6666{
6767}
6868
trunk/src/devices/bus/vic20/fe3.cpp
r250291r250292
114114   device_t(mconfig, VIC20_FE3, "Final Expansion v3", tag, owner, clock, "vic20_fe3", __FILE__),
115115   device_vic20_expansion_card_interface(mconfig, *this),
116116   m_flash_rom(*this, AM29F040_TAG),
117   m_ram(*this, "sram")
117   m_ram(*this, "sram"), m_reg1(0), m_reg2(0), m_lockbit(0)
118118{
119119}
120120
trunk/src/devices/bus/vic20/vic1112.cpp
r250291r250292
139139      device_vic20_expansion_card_interface(mconfig, *this),
140140      m_via0(*this, M6522_0_TAG),
141141      m_via1(*this, M6522_1_TAG),
142      m_bus(*this, IEEE488_TAG)
142      m_bus(*this, IEEE488_TAG), m_via0_irq(0), m_via1_irq(0)
143143{
144144}
145145
trunk/src/devices/bus/vidbrain/exp.cpp
r250291r250292
9090   device_t(mconfig, VIDEOBRAIN_EXPANSION_SLOT, "VideoBrain expansion port", tag, owner, clock, "videobrain_expansion_slot", __FILE__),
9191   device_slot_interface(mconfig, *this),
9292   device_image_interface(mconfig, *this),
93   m_write_extres(*this)
93   m_write_extres(*this), m_cart(nullptr)
9494{
9595}
9696
trunk/src/devices/bus/vip/byteio.cpp
r250291r250292
4545vip_byteio_port_device::vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4646      device_t(mconfig, VIP_BYTEIO_PORT, "VIP byte I/O port", tag, owner, clock, "vip_byteio_port", __FILE__),
4747      device_slot_interface(mconfig, *this),
48      m_write_inst(*this)
48      m_write_inst(*this), m_cart(nullptr)
4949{
5050}
5151
trunk/src/devices/bus/vip/exp.cpp
r250291r250292
5555   device_slot_interface(mconfig, *this),
5656   m_write_int(*this),
5757   m_write_dma_out(*this),
58   m_write_dma_in(*this)
58   m_write_dma_in(*this), m_card(nullptr)
5959{
6060}
6161
trunk/src/devices/bus/vip/vp550.cpp
r250291r250292
8282   device_t(mconfig, VP550, "VP550", tag, owner, clock, "vp550", __FILE__),
8383   device_vip_expansion_card_interface(mconfig, *this),
8484   m_pfg_a(*this, CDP1863_A_TAG),
85   m_pfg_b(*this, CDP1863_B_TAG)
85   m_pfg_b(*this, CDP1863_B_TAG), m_sync_timer(nullptr)
8686{
8787}
8888
trunk/src/devices/bus/vip/vp585.cpp
r250291r250292
8383   device_t(mconfig, VP585, "VP585", tag, owner, clock, "vp585", __FILE__),
8484   device_vip_expansion_card_interface(mconfig, *this),
8585   m_j1(*this, "J1"),
86   m_j2(*this, "J2")
86   m_j2(*this, "J2"), m_keylatch(0)
8787{
8888}
8989
trunk/src/devices/bus/vip/vp590.cpp
r250291r250292
142142   m_cgc(*this, CDP1862_TAG),
143143   m_color_ram(*this, "color_ram"),
144144   m_j1(*this, "J1"),
145   m_j2(*this, "J2")
145   m_j2(*this, "J2"), m_a12(0), m_color(0), m_keylatch(0)
146146{
147147}
148148
trunk/src/devices/bus/vtech/memexp/floppy.cpp
r250291r250292
7272   device_memexp_interface(mconfig, *this),
7373   m_memexp(*this, "mem"),
7474   m_floppy0(*this, "0"),
75   m_floppy1(*this, "1")
75   m_floppy1(*this, "1"), m_floppy(nullptr), m_latch(0), m_shifter(0), m_latching_inverter(false), m_current_cyl(0), m_write_position(0)
7676{
7777}
7878
trunk/src/devices/bus/wangpc/emb.cpp
r250291r250292
4646wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
4747   device_t(mconfig, WANGPC_EMB, "Wang PC-PM031-B", tag, owner, clock, "wangpc_emb", __FILE__),
4848   device_wangpcbus_card_interface(mconfig, *this),
49   m_ram(*this, "ram")
49   m_ram(*this, "ram"), m_option(0), m_parity_error(0), m_parity_odd(0)
5050{
5151}
5252
trunk/src/devices/bus/wangpc/lvc.cpp
r250291r250292
171171   device_wangpcbus_card_interface(mconfig, *this),
172172   m_crtc(*this, MC6845_TAG),
173173   m_video_ram(*this, "video_ram"),
174   m_option(0),
174   m_option(0), m_scroll(0),
175175   m_irq(CLEAR_LINE)
176176{
177177}
trunk/src/devices/bus/wangpc/mcc.cpp
r250291r250292
106106   device_t(mconfig, WANGPC_MCC, "Wang PC-PM043", tag, owner, clock, "wangpc_mcc", __FILE__),
107107   device_wangpcbus_card_interface(mconfig, *this),
108108   m_sio(*this, Z80SIO2_TAG),
109   m_dart(*this, Z80DART_TAG)
109   m_dart(*this, Z80DART_TAG), m_option(0), m_irq(0)
110110{
111111}
112112
trunk/src/devices/bus/wangpc/tig.cpp
r250291r250292
155155   device_wangpcbus_card_interface(mconfig, *this),
156156   m_hgdc0(*this, UPD7720_0_TAG),
157157   m_hgdc1(*this, UPD7720_1_TAG),
158   m_option(0),
158   m_option(0), m_underline(0),
159159   m_palette(*this, "palette")
160160{
161161}
trunk/src/devices/bus/wangpc/wangpc.cpp
r250291r250292
2828
2929wangpcbus_slot_device::wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
3030   device_t(mconfig, WANGPC_BUS_SLOT, "Wang PC bus slot", tag, owner, clock, "wangpcbus_slot", __FILE__),
31   device_slot_interface(mconfig, *this)
31   device_slot_interface(mconfig, *this),
32   m_bus(nullptr),
33   m_sid(0)
3234{
3335}
3436
r250291r250292
246248//-------------------------------------------------
247249
248250device_wangpcbus_card_interface::device_wangpcbus_card_interface(const machine_config &mconfig, device_t &device) :
249   device_slot_card_interface(mconfig, device)
251   device_slot_card_interface(mconfig, device), m_bus(nullptr), m_sid(0), m_next(nullptr)
250252{
251253   m_slot = dynamic_cast<wangpcbus_slot_device *>(device.owner());
252254}
trunk/src/devices/bus/wangpc/wdc.cpp
r250291r250292
145145   device_t(mconfig, WANGPC_WDC, "Wang PC-PM001", tag, owner, clock, "wangpc_wdc", __FILE__),
146146   device_wangpcbus_card_interface(mconfig, *this),
147147   m_maincpu(*this, Z80_TAG),
148   m_ctc(*this, MK3882_TAG)
148   m_ctc(*this, MK3882_TAG), m_status(0), m_option(0), m_irq(0)
149149{
150150}
151151
trunk/src/devices/bus/wswan/rom.cpp
r250291r250292
2626const device_type WS_ROM_EEPROM = &device_creator<ws_rom_eeprom_device>;
2727
2828
29ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
30               : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
31                  device_ws_cart_interface( mconfig, *this )
29ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
30   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
31   device_ws_cart_interface(mconfig, *this),
32   m_base20(0),
33   m_base30(0),
34   m_base40(0),
35   m_rtc_setting(0),
36   m_rtc_year(0),
37   m_rtc_month(0),
38   m_rtc_day(0),
39   m_rtc_day_of_week(0),
40   m_rtc_hour(0),
41   m_rtc_minute(0),
42   m_rtc_second(0),
43   m_rtc_index(0),
44   rtc_timer(nullptr)
3245{
3346}
3447
3548ws_rom_device::ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3649               : device_t(mconfig, WS_ROM_STD, "Wonderswan Standard Carts", tag, owner, clock, "ws_rom", __FILE__),
37                  device_ws_cart_interface( mconfig, *this )
38{
50                  device_ws_cart_interface( mconfig, *this ), m_base20(0),
51   m_base30(0),
52   m_base40(0),
53   m_rtc_setting(0),
54   m_rtc_year(0),
55   m_rtc_month(0),
56   m_rtc_day(0),
57   m_rtc_day_of_week(0),
58   m_rtc_hour(0),
59   m_rtc_minute(0),
60   m_rtc_second(0),
61   m_rtc_index(0),
62   rtc_timer(nullptr)
63            {
3964}
4065
4166ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
42               : ws_rom_device(mconfig, WS_ROM_SRAM, "Wonderswan Carts w/SRAM", tag, owner, clock, "ws_sram", __FILE__)
43{
67               : ws_rom_device(mconfig, WS_ROM_SRAM, "Wonderswan Carts w/SRAM", tag, owner, clock, "ws_sram", __FILE__), m_nvram_base(0)
68            {
4469}
4570
4671
4772ws_rom_eeprom_device::ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
48               : ws_rom_device(mconfig, WS_ROM_EEPROM, "Wonderswan Carts w/EEPROM", tag, owner, clock, "ws_eeprom", __FILE__)
49{
73               : ws_rom_device(mconfig, WS_ROM_EEPROM, "Wonderswan Carts w/EEPROM", tag, owner, clock, "ws_eeprom", __FILE__), m_eeprom_mode(0),
74   m_eeprom_address(0), m_eeprom_command(0), m_eeprom_start(0), m_eeprom_write_enabled(0)
75            {
5076}
5177
5278
trunk/src/devices/bus/wswan/slot.cpp
r250291r250292
8080                  device_t(mconfig, WS_CART_SLOT, "Wonderswan Cartridge Slot", tag, owner, clock, "ws_cart_slot", __FILE__),
8181                  device_image_interface(mconfig, *this),
8282                  device_slot_interface(mconfig, *this),
83                  m_type(WS_STD)
83                  m_type(WS_STD), m_cart(nullptr)
8484{
8585}
8686
trunk/src/devices/bus/x68k/x68k_neptunex.cpp
r250291r250292
3030
3131x68k_neptune_device::x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3232      : device_t(mconfig, X68K_NEPTUNEX, "Neptune-X", tag, owner, clock, "x68k_neptunex", __FILE__),
33      device_x68k_expansion_card_interface(mconfig, *this),
33      device_x68k_expansion_card_interface(mconfig, *this),
34   m_slot(nullptr),
3435      m_dp8390(*this, "dp8390d")
3536{
3637}
trunk/src/devices/bus/x68k/x68k_scsiext.cpp
r250291r250292
5858
5959x68k_scsiext_device::x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6060      : device_t(mconfig, X68K_SCSIEXT, "Sharp CZ-6BS1 SCSI-1", tag, owner, clock, "x68k_cz6bs1", __FILE__),
61      device_x68k_expansion_card_interface(mconfig, *this),
61      device_x68k_expansion_card_interface(mconfig, *this), m_slot(nullptr),
6262      m_spc(*this, "mb89352")
6363{
6464}
trunk/src/devices/bus/x68k/x68kexp.cpp
r250291r250292
4040      m_out_irq2_cb(*this),
4141      m_out_irq4_cb(*this),
4242      m_out_nmi_cb(*this),
43      m_out_reset_cb(*this)
43      m_out_reset_cb(*this), m_card(nullptr)
4444{
4545}
4646
trunk/src/devices/bus/z88/ram.cpp
r250291r250292
3434
3535z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3636      : device_t(mconfig, Z88_32K_RAM, "Z88 32KB RAM", tag, owner, clock, "z88_32k_ram", __FILE__),
37      device_z88cart_interface( mconfig, *this )
38{
37      device_z88cart_interface( mconfig, *this ), m_ram(nullptr)
38   {
3939}
4040
4141z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
4242      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
43      device_z88cart_interface( mconfig, *this )
44{
43      device_z88cart_interface( mconfig, *this ), m_ram(nullptr)
44   {
4545}
4646
4747//-------------------------------------------------
trunk/src/devices/bus/z88/rom.cpp
r250291r250292
3333
3434z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3535      : device_t(mconfig, Z88_32K_ROM, "Z88 32KB ROM", tag, owner, clock, "z88_32k_rom", __FILE__),
36      device_z88cart_interface( mconfig, *this )
37{
36      device_z88cart_interface( mconfig, *this ), m_rom(nullptr)
37   {
3838}
3939
4040z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
4141      : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
42      device_z88cart_interface( mconfig, *this )
43{
42      device_z88cart_interface( mconfig, *this ), m_rom(nullptr)
43   {
4444}
4545
4646//-------------------------------------------------
trunk/src/devices/bus/z88/z88.cpp
r250291r250292
6060      device_t(mconfig, Z88CART_SLOT, "Z88 Cartridge Slot", tag, owner, clock, "z88cart_slot", __FILE__),
6161      device_image_interface(mconfig, *this),
6262      device_slot_interface(mconfig, *this),
63      m_out_flp_cb(*this)
63      m_out_flp_cb(*this), m_cart(nullptr), m_flp_timer(nullptr)
6464{
6565}
6666
trunk/src/devices/cpu/dsp56k/dsp56mem.h
r250291r250292
1313void mem_reset(dsp56k_core* cpustate);
1414
1515// Adjusts the documented address to match the offset in peripheral RAM
16#define A2O(a) (a-0xffc0)
16#define A2O(a) (a - 0xffc0)
1717
1818// Adjusts the offset in peripheral RAM to match the documented address
19#define O2A(a) (a+0xffc0)
19#define O2A(a) (a + 0xffc0)
2020
2121// The memory 'registers'
2222#define PBC      (cpustate->peripheral_ram[A2O(0xffc0)])
trunk/src/devices/cpu/i8085/i8085.cpp
r250291r250292
270270   if (m_irq_state[I8085_RST55_LINE]) result |= IM_I55;
271271
272272   /* fetch the SID bit if we have a callback */
273   result = (result & 0x7f) | (sid ? 0x80 : 0);
273   result = (result & ~IM_SID) | (sid ? IM_SID : 0);
274274
275275   return result;
276276}
trunk/src/devices/cpu/i86/i286.cpp
r250291r250292
12921292                     LOADDESC(0x848, DS);
12931293#undef LOADDESC
12941294                     // void cast supresses warning
1295#define LOADDESC(addr, reg, r) { desc[1] = read_word(addr); desc[2] = read_word(addr+2); desc[0] = read_word(addr+4); \
1295#define LOADDESC(addr, reg, r) { desc[1] = read_word(addr); desc[2] = read_word(addr + 2); desc[0] = read_word(addr + 4); \
12961296reg.base = BASE(desc); (void)(r); reg.limit = LIMIT(desc); }
12971297                     LOADDESC(0x84e, m_gdtr, 1);
12981298                     LOADDESC(0x854, m_ldtr, m_ldtr.rights = RIGHTS(desc));
trunk/src/devices/cpu/m6502/deco16.cpp
r250291r250292
1616const device_type DECO16 = &device_creator<deco16_device>;
1717
1818deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
19   m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__),
19   m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__),
20   io(NULL),
2021   io_config("io", ENDIANNESS_LITTLE, 8, 16)
2122{
2223}
trunk/src/devices/cpu/m6502/m3745x.cpp
r250291r250292
5555   read_ad_4(*this),
5656   read_ad_5(*this),
5757   read_ad_6(*this),
58   read_ad_7(*this)
58   read_ad_7(*this),
59   m_intreq1(0),
60   m_intreq2(0),
61   m_intctrl1(0),
62   m_intctrl2(0),
63   m_adctrl(0),
64   m_last_all_ints(0)
5965{
6066}
6167
r250291r250292
195201
196202void m3745x_device::recalc_irqs()
197203{
198   UINT16 all_ints = 0;
204   UINT16 all_ints;
199205   int static const irq_lines[16] =
200206   {
201207      -1, -1, -1, M740_INT11_LINE, M740_INT12_LINE, M740_INT13_LINE, -1, -1,
trunk/src/devices/cpu/m6502/m4510.cpp
r250291r250292
1414const device_type M4510 = &device_creator<m4510_device>;
1515
1616m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
17   m65ce02_device(mconfig, M4510, "M4510", tag, owner, clock, "m4510", __FILE__)
17   m65ce02_device(mconfig, M4510, "M4510", tag, owner, clock, "m4510", __FILE__),
18   map_enable(0),
19   nomap(false)
1820{
1921   program_config.m_addrbus_width = 20;
2022   program_config.m_logaddr_width = 16;
trunk/src/devices/cpu/m6502/m5074x.cpp
r250291r250292
4949   write_p0(*this),
5050   write_p1(*this),
5151   write_p2(*this),
52   write_p3(*this)
52   write_p3(*this),
53   m_intctrl(0),
54   m_tmrctrl(0),
55   m_tmr12pre(0),
56   m_tmr1(0),
57   m_tmr2(0),
58   m_tmrxpre(0),
59   m_tmrx(0),
60   m_tmr1latch(0),
61   m_tmr2latch(0),
62   m_tmrxlatch(0),
63   m_last_all_ints(0)
5364{
5465}
5566
trunk/src/devices/cpu/m6809/6309dasm.cpp
r250291r250292
613613   unsigned int ea, flags;
614614   int numoperands, offset, indirect;
615615
616   int i, p = 0, page = 0, opcode_found = FALSE;
616   int i, p = 0, page = 0, opcode_found;
617617
618618   do
619619   {
trunk/src/devices/cpu/m6809/6809dasm.cpp
r250291r250292
372372   const UINT8 *operandarray;
373373   unsigned int ea, flags;
374374   int numoperands, offset, indirect;
375   int i, p = 0, page = 0, opcode_found = FALSE;
375   int i, p = 0, page = 0, opcode_found;
376376
377377   do
378378   {
trunk/src/devices/cpu/m6809/hd6309.cpp
r250291r250292
127127//  hd6309_device - constructor
128128//-------------------------------------------------
129129
130hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
131      : m6809_base_device(mconfig, "HD6309", tag, owner, clock, HD6309, 4, "hd6309", __FILE__)
130hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
131   m6809_base_device(mconfig, "HD6309", tag, owner, clock, HD6309, 4, "hd6309", __FILE__),
132   m_md(0),
133   m_temp_im(0)
132134{
133135}
134136
r250291r250292
450452
451453inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg)
452454{
453   UINT16 value = 0;
455   UINT16 value;
454456
455457   switch(reg & 0x0F)
456458   {
trunk/src/devices/cpu/sh2/sh2comn.cpp
r250291r250292
1313#include "sh2.h"
1414#include "sh2comn.h"
1515
16
17// for now, make buggy GCC/Mingw STFU about I64FMT
18#if (defined(__MINGW32__) && (__GNUC__ >= 5))
19#pragma GCC diagnostic push
20#pragma GCC diagnostic ignored "-Wformat"
21#pragma GCC diagnostic ignored "-Wformat-extra-args"
22#endif
23
2416#define VERBOSE 0
2517
2618#define LOG(x)  do { if (VERBOSE) logerror x; } while (0)
r250291r250292
10221014{
10231015   COMBINE_DATA(&m_sh7021_regs[offset]);
10241016}
1025#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1026#pragma GCC diagnostic pop
1027#endif
trunk/src/devices/cpu/tms32031/32031ops.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Aaron Giles
3/***************************************************************************
4
5    32031ops.cpp
6
7    TMS32031/2 emulator
8
9***************************************************************************/
10
11
12//**************************************************************************
13//  COMPILE-TIME OPTIONS
14//**************************************************************************
15
16#define USE_FP              0
17
18
19
20//**************************************************************************
21//  MACROS
22//**************************************************************************
23
24#define IREG(rnum)          (m_r[rnum].i32[0])
25#define FREGEXP(rnum)       (m_r[rnum].exponent())
26#define FREGMAN(rnum)       (m_r[rnum].mantissa())
27
28#define FP2LONG(rnum)       ((FREGEXP(rnum) << 24) | ((UINT32)FREGMAN(rnum) >> 8))
29#define LONG2FP(rnum,v)     do { m_r[rnum].set_mantissa((v) << 8); m_r[rnum].set_exponent((INT32)(v) >> 24); } while (0)
30#define SHORT2FP(rnum,v)    do { \
31                        if ((UINT16)(v) == 0x8000) { m_r[rnum].set_mantissa(0); m_r[rnum].set_exponent(-128); } \
32                        else { m_r[rnum].set_mantissa((v) << 20); m_r[rnum].set_exponent((INT16)(v) >> 12); } \
33                     } while (0)
34
35#define DIRECT(op)              (((IREG(TMR_DP) & 0xff) << 16) | ((UINT16)op))
36#define INDIRECT_D(op,o)        ((this->*s_indirect_d[((o) >> 3) & 31])(op,o))
37#define INDIRECT_1(op,o)        ((this->*s_indirect_1[((o) >> 3) & 31])(op,o))
38#define INDIRECT_1_DEF(op,o)    ((this->*s_indirect_1_def[((o) >> 3) & 31])(op,o,defptr))
39
40#define SIGN(val)           ((val) & 0x80000000)
41
42#define OVERFLOW_SUB(a,b,r) ((INT32)(((a) ^ (b)) & ((a) ^ (r))) < 0)
43#define OVERFLOW_ADD(a,b,r) ((INT32)(((a) ^ (r)) & ((b) ^ (r))) < 0)
44
45#define CLR_FLAGS(f)        do { IREG(TMR_ST) &= ~(f); } while (0)
46#define CLR_NVUF()          CLR_FLAGS(NFLAG | VFLAG | UFFLAG)
47#define CLR_NZVUF()         CLR_FLAGS(NFLAG | ZFLAG | VFLAG | UFFLAG)
48#define CLR_NZCVUF()        CLR_FLAGS(NFLAG | ZFLAG | VFLAG | CFLAG | UFFLAG)
49
50#define OR_C(flag)          do { IREG(TMR_ST) |= flag & CFLAG; } while (0)
51#define OR_NZ(val)          do { IREG(TMR_ST) |= (((val) >> 28) & NFLAG) | (((val) == 0) << 2); } while (0)
52#define OR_NZF(reg)         do { IREG(TMR_ST) |= ((reg.mantissa() >> 28) & NFLAG) | ((reg.exponent() == -128) << 2); } while (0)
53#define OR_NUF(reg)         do { int temp = (reg.exponent() == -128) << 4; IREG(TMR_ST) |= ((reg.mantissa() >> 28) & NFLAG) | (temp) | (temp << 2); } while (0)
54#define OR_V_SUB(a,b,r)     do { UINT32 temp = ((((a) ^ (b)) & ((a) ^ (r))) >> 30) & VFLAG; IREG(TMR_ST) |= temp | (temp << 4); } while (0)
55#define OR_V_ADD(a,b,r)     do { UINT32 temp = ((((a) ^ (r)) & ((b) ^ (r))) >> 30) & VFLAG; IREG(TMR_ST) |= temp | (temp << 4); } while (0)
56#define OR_C_SUB(a,b,r)     do { IREG(TMR_ST) |= ((UINT32)(b) > (UINT32)(a)); } while (0)
57#define OR_C_ADD(a,b,r)     do { IREG(TMR_ST) |= ((UINT32)(a) > (UINT32)(r)); } while (0)
58#define OR_C_SBB(a,b,c)     do { INT64 temp = (INT64)(a) - (UINT32)(b) - (UINT32)(c); IREG(TMR_ST) |= (temp < 0); } while (0)
59#define OR_C_ADC(a,b,c)     do { UINT64 temp = (UINT64)(a) + (UINT32)(b) + (UINT32)(c); IREG(TMR_ST) |= (temp > 0xffffffff); } while (0)
60
61#define OVM()               (IREG(TMR_ST) & OVMFLAG)
62
63#define DECLARE_DEF         UINT32 defval; UINT32 *defptr = &defval
64#define UPDATE_DEF()        *defptr = defval
65
66
67
68//**************************************************************************
69//  IMPLEMENTATION
70//**************************************************************************
71
72void tms3203x_device::illegal(UINT32 op)
73{
74   if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
75   {
76      logerror("Illegal op @ %06X: %08X (tbl=%03X)\n", m_pc - 1, op, op >> 21);
77      debugger_break(machine());
78   }
79}
80
81
82void tms3203x_device::unimplemented(UINT32 op)
83{
84   fatalerror("Unimplemented op @ %06X: %08X (tbl=%03X)\n", m_pc - 1, op, op >> 21);
85}
86
87
88inline void tms3203x_device::execute_one()
89{
90   UINT32 op = ROPCODE(m_pc);
91   m_icount -= 2;  // 2 clocks per cycle
92   m_pc++;
93#if (TMS_3203X_LOG_OPCODE_USAGE)
94   m_hits[op >> 21]++;
95#endif
96   (this->*s_tms32031ops[op >> 21])(op);
97}
98
99
100void tms3203x_device::update_special(int dreg)
101{
102   if (dreg == TMR_BK)
103   {
104      UINT32 temp = IREG(TMR_BK);
105      m_bkmask = temp;
106      while (temp >>= 1)
107         m_bkmask |= temp;
108   }
109   else if (dreg == TMR_IOF)
110   {
111      if (IREG(TMR_IOF) & 0x002)
112         m_xf0_cb((offs_t)0, (IREG(TMR_IOF) >> 2) & 1);
113      if (IREG(TMR_IOF) & 0x020)
114         m_xf1_cb((offs_t)0, (IREG(TMR_IOF) >> 6) & 1);
115   }
116   else if (dreg == TMR_ST || dreg == TMR_IF || dreg == TMR_IE)
117      check_irqs();
118}
119
120
121
122//**************************************************************************
123//  CONDITION CODES
124//**************************************************************************
125
126const UINT32 C_LO = 1 << 1;
127const UINT32 C_LS = 1 << 2;
128const UINT32 C_HI = 1 << 3;
129const UINT32 C_HS = 1 << 4;
130const UINT32 C_EQ = 1 << 5;
131const UINT32 C_NE = 1 << 6;
132const UINT32 C_LT = 1 << 7;
133const UINT32 C_LE = 1 << 8;
134const UINT32 C_GT = 1 << 9;
135const UINT32 C_GE = 1 << 10;
136const UINT32 C_NV = 1 << 12;
137const UINT32 C_V = 1 << 13;
138const UINT32 C_NUF = 1 << 14;
139const UINT32 C_UF = 1 << 15;
140const UINT32 C_NLV = 1 << 16;
141const UINT32 C_LV = 1 << 17;
142const UINT32 C_NLUF = 1 << 18;
143const UINT32 C_LUF = 1 << 19;
144const UINT32 C_ZUF = 1 << 20;
145
146const UINT32 condition_table[0x80] =
147{
148/* ------- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_NLUF,
149/* ------C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_NLUF,
150/* -----V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_NLUF,
151/* -----VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_NLUF,
152/* ----Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
153/* ----Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
154/* ----ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
155/* ----ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
156/* ---N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF,
157/* ---N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF,
158/* ---N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF,
159/* ---N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF,
160/* ---NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
161/* ---NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
162/* ---NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
163/* ---NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
164/* --U---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
165/* --U---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
166/* --U--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
167/* --U--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
168/* --U-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
169/* --U-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
170/* --U-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
171/* --U-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
172/* --UN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
173/* --UN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
174/* --UN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
175/* --UN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
176/* --UNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
177/* --UNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
178/* --UNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
179/* --UNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
180/* -v----- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_NLUF,
181/* -v----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_NLUF,
182/* -v---V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_NLUF,
183/* -v---VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_NLUF,
184/* -v--Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
185/* -v--Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
186/* -v--ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
187/* -v--ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
188/* -v-N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF,
189/* -v-N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF,
190/* -v-N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF,
191/* -v-N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF,
192/* -v-NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
193/* -v-NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
194/* -v-NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
195/* -v-NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
196/* -vU---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
197/* -vU---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
198/* -vU--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
199/* -vU--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
200/* -vU-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
201/* -vU-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
202/* -vU-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
203/* -vU-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
204/* -vUN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
205/* -vUN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
206/* -vUN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
207/* -vUN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
208/* -vUNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
209/* -vUNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
210/* -vUNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
211/* -vUNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
212/* u------ */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_LUF,
213/* u-----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_LUF,
214/* u----V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_LUF,
215/* u----VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_LUF,
216/* u---Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
217/* u---Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
218/* u---ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
219/* u---ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
220/* u--N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF,
221/* u--N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF,
222/* u--N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF,
223/* u--N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF,
224/* u--NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
225/* u--NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
226/* u--NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
227/* u--NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
228/* u-U---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
229/* u-U---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
230/* u-U--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
231/* u-U--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
232/* u-U-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
233/* u-U-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
234/* u-U-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
235/* u-U-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
236/* u-UN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
237/* u-UN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
238/* u-UN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
239/* u-UN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
240/* u-UNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
241/* u-UNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
242/* u-UNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
243/* u-UNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
244/* uv----- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_LUF,
245/* uv----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_LUF,
246/* uv---V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_LUF,
247/* uv---VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_LUF,
248/* uv--Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
249/* uv--Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
250/* uv--ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
251/* uv--ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
252/* uv-N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF,
253/* uv-N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF,
254/* uv-N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF,
255/* uv-N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF,
256/* uv-NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
257/* uv-NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
258/* uv-NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
259/* uv-NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
260/* uvU---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
261/* uvU---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
262/* uvU--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
263/* uvU--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
264/* uvU-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
265/* uvU-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
266/* uvU-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
267/* uvU-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
268/* uvUN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
269/* uvUN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
270/* uvUN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
271/* uvUN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
272/* uvUNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
273/* uvUNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
274/* uvUNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
275/* uvUNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
276};
277
278#define CONDITION_LO()      (IREG(TMR_ST) & CFLAG)
279#define CONDITION_LS()      (IREG(TMR_ST) & (CFLAG | ZFLAG))
280#define CONDITION_HI()      (!(IREG(TMR_ST) & (CFLAG | ZFLAG)))
281#define CONDITION_HS()      (!(IREG(TMR_ST) & CFLAG))
282#define CONDITION_EQ()      (IREG(TMR_ST) & ZFLAG)
283#define CONDITION_NE()      (!(IREG(TMR_ST) & ZFLAG))
284#define CONDITION_LT()      (IREG(TMR_ST) & NFLAG)
285#define CONDITION_LE()      (IREG(TMR_ST) & (NFLAG | ZFLAG))
286#define CONDITION_GT()      (!(IREG(TMR_ST) & (NFLAG | ZFLAG)))
287#define CONDITION_GE()      (!(IREG(TMR_ST) & NFLAG))
288#define CONDITION_NV()      (!(IREG(TMR_ST) & VFLAG))
289#define CONDITION_V()       (IREG(TMR_ST) & VFLAG)
290#define CONDITION_NUF()     (!(IREG(TMR_ST) & UFFLAG))
291#define CONDITION_UF()      (IREG(TMR_ST) & UFFLAG)
292#define CONDITION_NLV()     (!(IREG(TMR_ST) & LVFLAG))
293#define CONDITION_LV()      (IREG(TMR_ST) & LVFLAG)
294#define CONDITION_NLUF()    (!(IREG(TMR_ST) & LUFFLAG))
295#define CONDITION_LUF()     (IREG(TMR_ST) & LUFFLAG)
296#define CONDITION_ZUF()     (IREG(TMR_ST) & (UFFLAG | ZFLAG))
297
298inline bool tms3203x_device::condition(int which)
299{
300   return (condition_table[IREG(TMR_ST) & (LUFFLAG | LVFLAG | UFFLAG | NFLAG | ZFLAG | VFLAG | CFLAG)] >> (which & 31)) & 1;
301}
302
303
304
305//**************************************************************************
306//  FLOATING POINT HELPERS
307//**************************************************************************
308
309#if USE_FP
310void tms3203x_device::double_to_dsp_with_flags(double val, tmsreg &result)
311{
312   int_double id;
313   id.d = val;
314
315   CLR_NZVUF();
316
317   int mantissa = ((id.i[BYTE_XOR_BE(0)] & 0x000fffff) << 11) | ((id.i[BYTE_XOR_BE(1)] & 0xffe00000) >> 21);
318   int exponent = ((id.i[BYTE_XOR_BE(0)] & 0x7ff00000) >> 20) - 1023;
319   if (exponent <= -128)
320   {
321      result.set_mantissa(0);
322      result.set_exponent(-128);
323      IREG(TMR_ST) |= UFFLAG | LUFFLAG | ZFLAG;
324   }
325   else if (exponent > 127)
326   {
327      if ((INT32)id.i[BYTE_XOR_BE(0)] >= 0)
328         result.set_mantissa(0x7fffffff);
329      else
330      {
331         result.set_mantissa(0x80000001);
332         IREG(TMR_ST) |= NFLAG;
333      }
334      result.set_exponent(127);
335      IREG(TMR_ST) |= VFLAG | LVFLAG;
336   }
337   else if (val == 0)
338   {
339      result.set_mantissa(0);
340      result.set_exponent(-128);
341      IREG(TMR_ST) |= ZFLAG;
342   }
343   else if ((INT32)id.i[BYTE_XOR_BE(0)] >= 0)
344   {
345      result.set_mantissa(mantissa);
346      result.set_exponent(exponent);
347   }
348   else if (mantissa != 0)
349   {
350      result.set_mantissa(0x80000000 | -mantissa);
351      result.set_exponent(exponent);
352      IREG(TMR_ST) |= NFLAG;
353   }
354   else
355   {
356      result.set_mantissa(0x80000000);
357      result.set_exponent(exponent - 1);
358      IREG(TMR_ST) |= NFLAG;
359   }
360}
361#endif
362
363// integer to floating point conversion
364#if USE_FP
365void tms3203x_device::int2float(tmsreg &srcdst)
366{
367   double val = srcdst.mantissa();
368   double_to_dsp_with_flags(val, srcdst);
369}
370#else
371void tms3203x_device::int2float(tmsreg &srcdst)
372{
373   UINT32 man = srcdst.mantissa();
374   int exp, cnt;
375
376   // never overflows or underflows
377   CLR_NZVUF();
378
379   // 0 always has exponent of -128
380   if (man == 0)
381   {
382      man = 0x80000000;
383      exp = -128;
384   }
385
386   // check for -1 here because count_leading_ones will infinite loop
387   else if (man == (UINT32)-1)
388   {
389      man = 0;
390      exp = -1;
391   }
392
393   // positive values; count leading zeros and shift
394   else if ((INT32)man > 0)
395   {
396      cnt = count_leading_zeros(man);
397      man <<= cnt;
398      exp = 31 - cnt;
399   }
400
401   // negative values; count leading ones and shift
402   else
403   {
404      cnt = count_leading_ones(man);
405      man <<= cnt;
406      exp = 31 - cnt;
407   }
408
409   // set the final results and compute NZ
410   srcdst.set_mantissa(man ^ 0x80000000);
411   srcdst.set_exponent(exp);
412   OR_NZF(srcdst);
413}
414#endif
415
416
417// floating point to integer conversion
418#if USE_FP
419void tms3203x_device::float2int(tmsreg &srcdst, int setflags)
420{
421   INT32 val;
422
423   if (setflags) CLR_NZVUF();
424   if (srcdst.exponent() > 30)
425   {
426      if ((INT32)srcdst.mantissa() >= 0)
427         val = 0x7fffffff;
428      else
429         val = 0x80000000;
430      if (setflags) IREG(TMR_ST) |= VFLAG | LVFLAG;
431   }
432   else
433      val = floor(srcdst.as_double());
434   srcdst.set_mantissa(val);
435   if (setflags) OR_NZ(val);
436}
437#else
438void tms3203x_device::float2int(tmsreg &srcdst, bool setflags)
439{
440   INT32 man = srcdst.mantissa();
441   int shift = 31 - srcdst.exponent();
442
443   // never underflows
444   if (setflags) CLR_NZVUF();
445
446   // if we've got too much to handle, overflow
447   if (shift <= 0)
448   {
449      srcdst.set_mantissa((man >= 0) ? 0x7fffffff : 0x80000000);
450      if (setflags) IREG(TMR_ST) |= VFLAG | LVFLAG;
451   }
452
453   // if we're too small, go to 0 or -1
454   else if (shift > 31)
455      srcdst.set_mantissa(man >> 31);
456
457   // we're in the middle; shift it
458   else
459      srcdst.set_mantissa((man >> shift) ^ (1 << (31 - shift)));
460
461   // set the NZ flags
462   if (setflags) OR_NZ(srcdst.mantissa());
463}
464#endif
465
466
467// compute the negative of a floating point value
468#if USE_FP
469void tms3203x_device::negf(tmsreg &dst, tmsreg tmsreg &src)
470{
471   double val = -src.as_double();
472   double_to_dsp_with_flags(val, dst);
473}
474#else
475void tms3203x_device::negf(tmsreg &dst, tmsreg &src)
476{
477   INT32 man = src.mantissa();
478
479   CLR_NZVUF();
480
481   if (src.exponent() == -128)
482   {
483      dst.set_mantissa(0);
484      dst.set_exponent(-128);
485   }
486   else if ((man & 0x7fffffff) != 0)
487   {
488      dst.set_mantissa(-man);
489      dst.set_exponent(src.exponent());
490   }
491   else
492   {
493      dst.set_mantissa(man ^ 0x80000000);
494      if (man == 0)
495         dst.set_exponent(src.exponent() - 1);
496      else
497         dst.set_exponent(src.exponent() + 1);
498   }
499   OR_NZF(dst);
500}
501#endif
502
503
504
505// add two floating point values
506#if USE_FP
507void tms3203x_device::addf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
508{
509   double val = src1.as_double() + src2.as_double();
510   double_to_dsp_with_flags(val, dst);
511}
512#else
513void tms3203x_device::addf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
514{
515   INT64 man;
516   INT64 m1, m2;
517   int exp, cnt;
518
519   // reset over/underflow conditions
520   CLR_NZVUF();
521
522   // first check for 0 operands
523   if (src1.exponent() == -128)
524   {
525      dst = src2;
526      OR_NZF(dst);
527      return;
528   }
529   if (src2.exponent() == -128)
530   {
531      dst = src1;
532      OR_NZF(dst);
533      return;
534   }
535
536   // extract mantissas from 1.0.31 values to 1.1.31 values
537   m1 = (INT64)src1.mantissa() ^ 0x80000000;
538   m2 = (INT64)src2.mantissa() ^ 0x80000000;
539
540   // normalize based on the exponent
541   if (src1.exponent() > src2.exponent())
542   {
543      exp = src1.exponent();
544      cnt = exp - src2.exponent();
545      if (cnt >= 32)
546      {
547         dst = src1;
548         OR_NZF(dst);
549         return;
550      }
551      m2 >>= cnt;
552   }
553   else
554   {
555      exp = src2.exponent();
556      cnt = exp - src1.exponent();
557      if (cnt >= 32)
558      {
559         dst = src2;
560         OR_NZF(dst);
561         return;
562      }
563      m1 >>= cnt;
564   }
565
566   // add
567   man = m1 + m2;
568
569   // if the mantissa is zero, set the exponent appropriately
570   if (man == 0 || exp == -128)
571   {
572      exp = -128;
573      man = 0x80000000;
574   }
575
576   // if the mantissa is >= 2.0 or < -2.0, normalize
577   else if (man >= ((INT64)2 << 31) || man < ((INT64)-2 << 31))
578   {
579      man >>= 1;
580      exp++;
581   }
582
583   // if the mantissa is < 1.0 and > -1.0, normalize
584   else if (man < ((INT64)1 << 31) && man >= ((INT64)-1 << 31))
585   {
586      if (man > 0)
587      {
588         cnt = count_leading_zeros((UINT32)man);
589         man <<= cnt;
590         exp -= cnt;
591      }
592      else
593      {
594         cnt = count_leading_ones((UINT32)man);
595         man <<= cnt;
596         exp -= cnt;
597      }
598   }
599
600   // check for underflow
601   if (exp <= -128)
602   {
603      man = 0x80000000;
604      exp = -128;
605      IREG(TMR_ST) |= UFFLAG | LUFFLAG;
606   }
607
608   // check for overflow
609   else if (exp > 127)
610   {
611      man = (man < 0) ? 0x00000000 : 0xffffffff;
612      exp = 127;
613      IREG(TMR_ST) |= VFLAG | LVFLAG;
614   }
615
616   // store the result back, removing the implicit one and putting
617   // back the sign bit
618   dst.set_mantissa((UINT32)man ^ 0x80000000);
619   dst.set_exponent(exp);
620   OR_NZF(dst);
621}
622#endif
623
624
625// subtract two floating point values
626#if USE_FP
627void tms3203x_device::subf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
628{
629   double val = src1.as_double() - src2.as_double();
630   double_to_dsp_with_flags(val, dst);
631}
632#else
633void tms3203x_device::subf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
634{
635   INT64 man;
636   INT64 m1, m2;
637   int exp, cnt;
638
639   // reset over/underflow conditions
640   CLR_NZVUF();
641
642   // first check for 0 operands
643   if (src2.exponent() == -128)
644   {
645      dst = src1;
646      OR_NZF(dst);
647      return;
648   }
649
650   // extract mantissas from 1.0.31 values to 1.1.31 values
651   m1 = (INT64)src1.mantissa() ^ 0x80000000;
652   m2 = (INT64)src2.mantissa() ^ 0x80000000;
653
654   // normalize based on the exponent
655   if (src1.exponent() > src2.exponent())
656   {
657      exp = src1.exponent();
658      cnt = exp - src2.exponent();
659      if (cnt >= 32)
660      {
661         dst = src1;
662         OR_NZF(dst);
663         return;
664      }
665      m2 >>= cnt;
666   }
667   else
668   {
669      exp = src2.exponent();
670      cnt = exp - src1.exponent();
671      if (cnt >= 32)
672      {
673         negf(dst, src2);
674         return;
675      }
676      m1 >>= cnt;
677   }
678
679   // subtract
680   man = m1 - m2;
681
682   // if the mantissa is zero, set the exponent appropriately
683   if (man == 0 || exp == -128)
684   {
685      exp = -128;
686      man = 0x80000000;
687   }
688
689   // if the mantissa is >= 2.0 or < -2.0, normalize
690   else if (man >= ((INT64)2 << 31) || man < ((INT64)-2 << 31))
691   {
692      man >>= 1;
693      exp++;
694   }
695
696   // if the mantissa is < 1.0 and > -1.0, normalize
697   else if (man < ((INT64)1 << 31) && man >= ((INT64)-1 << 31))
698   {
699      if (man > 0)
700      {
701         cnt = count_leading_zeros((UINT32)man);
702         man <<= cnt;
703         exp -= cnt;
704      }
705      else
706      {
707         cnt = count_leading_ones((UINT32)man);
708         man <<= cnt;
709         exp -= cnt;
710      }
711   }
712
713   // check for underflow
714   if (exp <= -128)
715   {
716      // make sure a 0 result doesn't set underflow
717      if (man != 0 || exp < -128)
718         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
719      man = 0x80000000;
720      exp = -128;
721   }
722
723   // check for overflow
724   else if (exp > 127)
725   {
726      man = (man < 0) ? 0x00000000 : 0xffffffff;
727      exp = 127;
728      IREG(TMR_ST) |= VFLAG | LVFLAG;
729   }
730
731   // store the result back, removing the implicit one and putting
732   // back the sign bit
733   dst.set_mantissa((UINT32)man ^ 0x80000000);
734   dst.set_exponent(exp);
735   OR_NZF(dst);
736}
737#endif
738
739
740// multiply two floating point values
741#if USE_FP
742void tms3203x_device::mpyf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
743{
744   double val = (double)src1.as_float() * (double)src2.as_float();
745   double_to_dsp_with_flags(val, dst);
746}
747#else
748void tms3203x_device::mpyf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
749{
750   // reset over/underflow conditions
751   CLR_NZVUF();
752
753   // first check for 0 multipliers and return 0 in any case
754   if (src1.exponent() == -128 || src2.exponent() == -128)
755   {
756      dst.set_mantissa(0);
757      dst.set_exponent(-128);
758      OR_NZF(dst);
759      return;
760   }
761
762   // convert the mantissas from 1.0.31 numbers to 1.1.23 numbers
763   INT32 m1 = (src1.mantissa() >> 8) ^ 0x800000;
764   INT32 m2 = (src2.mantissa() >> 8) ^ 0x800000;
765
766   // multiply the mantissas and add the exponents
767   INT64 man = (INT64)m1 * (INT64)m2;
768   int exp = src1.exponent() + src2.exponent();
769
770   // chop off the low bits, going from 1.2.46 down to 1.2.31
771   man >>= 46 - 31;
772
773   // if the mantissa is zero, set the exponent appropriately
774   if (man == 0)
775   {
776      exp = -128;
777      man = 0x80000000;
778   }
779
780   // if the mantissa is >= 2.0 or <= -2.0, normalize
781   else if (man >= ((INT64)2 << 31))
782   {
783      man >>= 1;
784      exp++;
785      if (man >= ((INT64)2 << 31))
786      {
787         man >>= 1;
788         exp++;
789      }
790   }
791
792   // if the mantissa is >= 2.0 or <= -2.0, normalize
793   else if (man < ((INT64)-2 << 31))
794   {
795      man >>= 1;
796      exp++;
797   }
798
799   // check for underflow
800   if (exp <= -128)
801   {
802      man = 0x80000000;
803      exp = -128;
804      IREG(TMR_ST) |= UFFLAG | LUFFLAG;
805   }
806
807   // check for overflow
808   else if (exp > 127)
809   {
810      man = (man < 0) ? 0x00000000 : 0xffffffff;
811      exp = 127;
812      IREG(TMR_ST) |= VFLAG | LVFLAG;
813   }
814
815   // store the result back, removing the implicit one and putting
816   // back the sign bit
817   dst.set_mantissa((UINT32)man ^ 0x80000000);
818   dst.set_exponent(exp);
819   OR_NZF(dst);
820}
821#endif
822
823
824// normalize a floating point value
825#if USE_FP
826void tms3203x_device::norm(tmsreg &dst, tmsreg &src)
827{
828   fatalerror("norm not implemented\n");
829}
830#else
831void tms3203x_device::norm(tmsreg &dst, tmsreg &src)
832{
833   INT32 man = src.mantissa();
834   int exp = src.exponent();
835
836   CLR_NZVUF();
837
838   if (exp == -128 || man == 0)
839   {
840      dst.set_mantissa(0);
841      dst.set_exponent(-128);
842      if (man != 0)
843         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
844   }
845   else
846   {
847      int cnt;
848      if (man > 0)
849      {
850         cnt = count_leading_zeros((UINT32)man);
851         man <<= cnt;
852         exp -= cnt;
853      }
854      else
855      {
856         cnt = count_leading_ones((UINT32)man);
857         man <<= cnt;
858         exp -= cnt;
859      }
860
861      // check for underflow
862      if (exp <= -128)
863      {
864         man = 0x00000000;
865         exp = -128;
866         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
867      }
868   }
869
870   dst.set_mantissa(man);
871   dst.set_exponent(exp);
872   OR_NZF(dst);
873}
874#endif
875
876
877
878
879//**************************************************************************
880//  INDIRECT MEMORY REFS
881//**************************************************************************
882
883// immediate displacement variants
884
885UINT32 tms3203x_device::mod00_d(UINT32 op, UINT8 ar)
886{
887   int reg = TMR_AR0 + (ar & 7);
888   return IREG(reg) + (UINT8)op;
889}
890
891UINT32 tms3203x_device::mod01_d(UINT32 op, UINT8 ar)
892{
893   int reg = TMR_AR0 + (ar & 7);
894   return IREG(reg) - (UINT8)op;
895}
896
897UINT32 tms3203x_device::mod02_d(UINT32 op, UINT8 ar)
898{
899   int reg = TMR_AR0 + (ar & 7);
900   IREG(reg) += (UINT8)op;
901   return IREG(reg);
902}
903
904UINT32 tms3203x_device::mod03_d(UINT32 op, UINT8 ar)
905{
906   int reg = TMR_AR0 + (ar & 7);
907   IREG(reg) -= (UINT8)op;
908   return IREG(reg);
909}
910
911UINT32 tms3203x_device::mod04_d(UINT32 op, UINT8 ar)
912{
913   int reg = TMR_AR0 + (ar & 7);
914   UINT32 result = IREG(reg);
915   IREG(reg) += (UINT8)op;
916   return result;
917}
918
919UINT32 tms3203x_device::mod05_d(UINT32 op, UINT8 ar)
920{
921   int reg = TMR_AR0 + (ar & 7);
922   UINT32 result = IREG(reg);
923   IREG(reg) -= (UINT8)op;
924   return result;
925}
926
927UINT32 tms3203x_device::mod06_d(UINT32 op, UINT8 ar)
928{
929   int reg = TMR_AR0 + (ar & 7);
930   UINT32 result = IREG(reg);
931   INT32 temp = (result & m_bkmask) + (UINT8)op;
932   if (temp >= IREG(TMR_BK))
933      temp -= IREG(TMR_BK);
934   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
935   return result;
936}
937
938UINT32 tms3203x_device::mod07_d(UINT32 op, UINT8 ar)
939{
940   int reg = TMR_AR0 + (ar & 7);
941   UINT32 result = IREG(reg);
942   INT32 temp = (result & m_bkmask) - (UINT8)op;
943   if (temp < 0)
944      temp += IREG(TMR_BK);
945   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
946   return result;
947}
948
949
950// immediate displacement variants (implied 1)
951
952UINT32 tms3203x_device::mod00_1(UINT32 op, UINT8 ar)
953{
954   int reg = TMR_AR0 + (ar & 7);
955   return IREG(reg) + 1;
956}
957
958UINT32 tms3203x_device::mod01_1(UINT32 op, UINT8 ar)
959{
960   int reg = TMR_AR0 + (ar & 7);
961   return IREG(reg) - 1;
962}
963
964UINT32 tms3203x_device::mod02_1(UINT32 op, UINT8 ar)
965{
966   int reg = TMR_AR0 + (ar & 7);
967   return ++IREG(reg);
968}
969
970UINT32 tms3203x_device::mod03_1(UINT32 op, UINT8 ar)
971{
972   int reg = TMR_AR0 + (ar & 7);
973   return --IREG(reg);
974}
975
976UINT32 tms3203x_device::mod04_1(UINT32 op, UINT8 ar)
977{
978   int reg = TMR_AR0 + (ar & 7);
979   return IREG(reg)++;
980}
981
982UINT32 tms3203x_device::mod05_1(UINT32 op, UINT8 ar)
983{
984   int reg = TMR_AR0 + (ar & 7);
985   return IREG(reg)--;
986}
987
988UINT32 tms3203x_device::mod06_1(UINT32 op, UINT8 ar)
989{
990   int reg = TMR_AR0 + (ar & 7);
991   UINT32 result = IREG(reg);
992   INT32 temp = (result & m_bkmask) + 1;
993   if (temp >= IREG(TMR_BK))
994      temp -= IREG(TMR_BK);
995   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
996   return result;
997}
998
999UINT32 tms3203x_device::mod07_1(UINT32 op, UINT8 ar)
1000{
1001   int reg = TMR_AR0 + (ar & 7);
1002   UINT32 result = IREG(reg);
1003   INT32 temp = (result & m_bkmask) - 1;
1004   if (temp < 0)
1005      temp += IREG(TMR_BK);
1006   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1007   return result;
1008}
1009
1010
1011// IR0 displacement variants
1012
1013UINT32 tms3203x_device::mod08(UINT32 op, UINT8 ar)
1014{
1015   int reg = TMR_AR0 + (ar & 7);
1016   return IREG(reg) + IREG(TMR_IR0);
1017}
1018
1019UINT32 tms3203x_device::mod09(UINT32 op, UINT8 ar)
1020{
1021   int reg = TMR_AR0 + (ar & 7);
1022   return IREG(reg) - IREG(TMR_IR0);
1023}
1024
1025UINT32 tms3203x_device::mod0a(UINT32 op, UINT8 ar)
1026{
1027   int reg = TMR_AR0 + (ar & 7);
1028   IREG(reg) += IREG(TMR_IR0);
1029   return IREG(reg);
1030}
1031
1032UINT32 tms3203x_device::mod0b(UINT32 op, UINT8 ar)
1033{
1034   int reg = TMR_AR0 + (ar & 7);
1035   IREG(reg) -= IREG(TMR_IR0);
1036   return IREG(reg);
1037}
1038
1039UINT32 tms3203x_device::mod0c(UINT32 op, UINT8 ar)
1040{
1041   int reg = TMR_AR0 + (ar & 7);
1042   UINT32 result = IREG(reg);
1043   IREG(reg) += IREG(TMR_IR0);
1044   return result;
1045}
1046
1047UINT32 tms3203x_device::mod0d(UINT32 op, UINT8 ar)
1048{
1049   int reg = TMR_AR0 + (ar & 7);
1050   UINT32 result = IREG(reg);
1051   IREG(reg) -= IREG(TMR_IR0);
1052   return result;
1053}
1054
1055UINT32 tms3203x_device::mod0e(UINT32 op, UINT8 ar)
1056{
1057   int reg = TMR_AR0 + (ar & 7);
1058   UINT32 result = IREG(reg);
1059   INT32 temp = (result & m_bkmask) + IREG(TMR_IR0);
1060   if (temp >= IREG(TMR_BK))
1061      temp -= IREG(TMR_BK);
1062   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1063   return result;
1064}
1065
1066UINT32 tms3203x_device::mod0f(UINT32 op, UINT8 ar)
1067{
1068   int reg = TMR_AR0 + (ar & 7);
1069   UINT32 result = IREG(reg);
1070   INT32 temp = (result & m_bkmask) - IREG(TMR_IR0);
1071   if (temp < 0)
1072      temp += IREG(TMR_BK);
1073   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1074   return result;
1075}
1076
1077
1078// IR1 displacement variants
1079
1080UINT32 tms3203x_device::mod10(UINT32 op, UINT8 ar)
1081{
1082   int reg = TMR_AR0 + (ar & 7);
1083   return IREG(reg) + IREG(TMR_IR1);
1084}
1085
1086UINT32 tms3203x_device::mod11(UINT32 op, UINT8 ar)
1087{
1088   int reg = TMR_AR0 + (ar & 7);
1089   return IREG(reg) - IREG(TMR_IR1);
1090}
1091
1092UINT32 tms3203x_device::mod12(UINT32 op, UINT8 ar)
1093{
1094   int reg = TMR_AR0 + (ar & 7);
1095   IREG(reg) += IREG(TMR_IR1);
1096   return IREG(reg);
1097}
1098
1099UINT32 tms3203x_device::mod13(UINT32 op, UINT8 ar)
1100{
1101   int reg = TMR_AR0 + (ar & 7);
1102   IREG(reg) -= IREG(TMR_IR1);
1103   return IREG(reg);
1104}
1105
1106UINT32 tms3203x_device::mod14(UINT32 op, UINT8 ar)
1107{
1108   int reg = TMR_AR0 + (ar & 7);
1109   UINT32 result = IREG(reg);
1110   IREG(reg) += IREG(TMR_IR1);
1111   return result;
1112}
1113
1114UINT32 tms3203x_device::mod15(UINT32 op, UINT8 ar)
1115{
1116   int reg = TMR_AR0 + (ar & 7);
1117   UINT32 result = IREG(reg);
1118   IREG(reg) -= IREG(TMR_IR1);
1119   return result;
1120}
1121
1122UINT32 tms3203x_device::mod16(UINT32 op, UINT8 ar)
1123{
1124   int reg = TMR_AR0 + (ar & 7);
1125   UINT32 result = IREG(reg);
1126   INT32 temp = (result & m_bkmask) + IREG(TMR_IR1);
1127   if (temp >= IREG(TMR_BK))
1128      temp -= IREG(TMR_BK);
1129   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1130   return result;
1131}
1132
1133UINT32 tms3203x_device::mod17(UINT32 op, UINT8 ar)
1134{
1135   int reg = TMR_AR0 + (ar & 7);
1136   UINT32 result = IREG(reg);
1137   INT32 temp = (result & m_bkmask) - IREG(TMR_IR1);
1138   if (temp < 0)
1139      temp += IREG(TMR_BK);
1140   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1141   return result;
1142}
1143
1144
1145// special variants
1146
1147UINT32 tms3203x_device::mod18(UINT32 op, UINT8 ar)
1148{
1149   int reg = TMR_AR0 + (ar & 7);
1150   return IREG(reg);
1151}
1152
1153UINT32 tms3203x_device::mod19(UINT32 op, UINT8 ar)
1154{
1155   unimplemented(op);
1156   return 0;
1157}
1158
1159UINT32 tms3203x_device::modillegal(UINT32 op, UINT8 ar)
1160{
1161   illegal(op);
1162   return 0;
1163}
1164
1165
1166// immediate displacement variants (implied 1)
1167
1168UINT32 tms3203x_device::mod00_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1169{
1170   int reg = TMR_AR0 + (ar & 7);
1171   return IREG(reg) + 1;
1172}
1173
1174UINT32 tms3203x_device::mod01_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1175{
1176   int reg = TMR_AR0 + (ar & 7);
1177   return IREG(reg) - 1;
1178}
1179
1180UINT32 tms3203x_device::mod02_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1181{
1182   int reg = TMR_AR0 + (ar & 7);
1183   UINT32 defval = IREG(reg) + 1;
1184   *defptrptr = defval;
1185   defptrptr = &IREG(reg);
1186   return defval;
1187}
1188
1189UINT32 tms3203x_device::mod03_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1190{
1191   int reg = TMR_AR0 + (ar & 7);
1192   UINT32 defval = IREG(reg) - 1;
1193   *defptrptr = defval;
1194   defptrptr = &IREG(reg);
1195   return defval;
1196}
1197
1198UINT32 tms3203x_device::mod04_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1199{
1200   int reg = TMR_AR0 + (ar & 7);
1201   *defptrptr = IREG(reg) + 1;
1202   defptrptr = &IREG(reg);
1203   return IREG(reg);
1204}
1205
1206UINT32 tms3203x_device::mod05_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1207{
1208   int reg = TMR_AR0 + (ar & 7);
1209   *defptrptr = IREG(reg) - 1;
1210   defptrptr = &IREG(reg);
1211   return IREG(reg);
1212}
1213
1214UINT32 tms3203x_device::mod06_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1215{
1216   int reg = TMR_AR0 + (ar & 7);
1217   UINT32 result = IREG(reg);
1218   INT32 temp = (result & m_bkmask) + 1;
1219   if (temp >= IREG(TMR_BK))
1220      temp -= IREG(TMR_BK);
1221   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1222   defptrptr = &IREG(reg);
1223   return result;
1224}
1225
1226UINT32 tms3203x_device::mod07_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1227{
1228   int reg = TMR_AR0 + (ar & 7);
1229   UINT32 result = IREG(reg);
1230   INT32 temp = (result & m_bkmask) - 1;
1231   if (temp < 0)
1232      temp += IREG(TMR_BK);
1233   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1234   defptrptr = &IREG(reg);
1235   return result;
1236}
1237
1238
1239// IR0 displacement variants
1240
1241UINT32 tms3203x_device::mod08_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1242{
1243   int reg = TMR_AR0 + (ar & 7);
1244   return IREG(reg) + IREG(TMR_IR0);
1245}
1246
1247UINT32 tms3203x_device::mod09_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1248{
1249   int reg = TMR_AR0 + (ar & 7);
1250   return IREG(reg) - IREG(TMR_IR0);
1251}
1252
1253UINT32 tms3203x_device::mod0a_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1254{
1255   int reg = TMR_AR0 + (ar & 7);
1256   UINT32 defval = IREG(reg) + IREG(TMR_IR0);
1257   *defptrptr = defval;
1258   defptrptr = &IREG(reg);
1259   return defval;
1260}
1261
1262UINT32 tms3203x_device::mod0b_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1263{
1264   int reg = TMR_AR0 + (ar & 7);
1265   UINT32 defval = IREG(reg) - IREG(TMR_IR0);
1266   *defptrptr = defval;
1267   defptrptr = &IREG(reg);
1268   return defval;
1269}
1270
1271UINT32 tms3203x_device::mod0c_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1272{
1273   int reg = TMR_AR0 + (ar & 7);
1274   *defptrptr = IREG(reg) + IREG(TMR_IR0);
1275   defptrptr = &IREG(reg);
1276   return IREG(reg);
1277}
1278
1279UINT32 tms3203x_device::mod0d_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1280{
1281   int reg = TMR_AR0 + (ar & 7);
1282   *defptrptr = IREG(reg) - IREG(TMR_IR0);
1283   defptrptr = &IREG(reg);
1284   return IREG(reg);
1285}
1286
1287UINT32 tms3203x_device::mod0e_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1288{
1289   int reg = TMR_AR0 + (ar & 7);
1290   UINT32 result = IREG(reg);
1291   INT32 temp = (result & m_bkmask) + IREG(TMR_IR0);
1292   if (temp >= IREG(TMR_BK))
1293      temp -= IREG(TMR_BK);
1294   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1295   defptrptr = &IREG(reg);
1296   return result;
1297}
1298
1299UINT32 tms3203x_device::mod0f_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1300{
1301   int reg = TMR_AR0 + (ar & 7);
1302   UINT32 result = IREG(reg);
1303   INT32 temp = (result & m_bkmask) - IREG(TMR_IR0);
1304   if (temp < 0)
1305      temp += IREG(TMR_BK);
1306   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1307   defptrptr = &IREG(reg);
1308   return result;
1309}
1310
1311
1312// IR1 displacement variants
1313
1314UINT32 tms3203x_device::mod10_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1315{
1316   int reg = TMR_AR0 + (ar & 7);
1317   return IREG(reg) + IREG(TMR_IR1);
1318}
1319
1320UINT32 tms3203x_device::mod11_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1321{
1322   int reg = TMR_AR0 + (ar & 7);
1323   return IREG(reg) - IREG(TMR_IR1);
1324}
1325
1326UINT32 tms3203x_device::mod12_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1327{
1328   int reg = TMR_AR0 + (ar & 7);
1329   UINT32 defval = IREG(reg) + IREG(TMR_IR1);
1330   *defptrptr = defval;
1331   defptrptr = &IREG(reg);
1332   return defval;
1333}
1334
1335UINT32 tms3203x_device::mod13_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1336{
1337   int reg = TMR_AR0 + (ar & 7);
1338   UINT32 defval = IREG(reg) - IREG(TMR_IR1);
1339   *defptrptr = defval;
1340   defptrptr = &IREG(reg);
1341   return defval;
1342}
1343
1344UINT32 tms3203x_device::mod14_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1345{
1346   int reg = TMR_AR0 + (ar & 7);
1347   *defptrptr = IREG(reg) + IREG(TMR_IR1);
1348   defptrptr = &IREG(reg);
1349   return IREG(reg);
1350}
1351
1352UINT32 tms3203x_device::mod15_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1353{
1354   int reg = TMR_AR0 + (ar & 7);
1355   *defptrptr = IREG(reg) - IREG(TMR_IR1);
1356   defptrptr = &IREG(reg);
1357   return IREG(reg);
1358}
1359
1360UINT32 tms3203x_device::mod16_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1361{
1362   int reg = TMR_AR0 + (ar & 7);
1363   UINT32 result = IREG(reg);
1364   INT32 temp = (result & m_bkmask) + IREG(TMR_IR1);
1365   if (temp >= IREG(TMR_BK))
1366      temp -= IREG(TMR_BK);
1367   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1368   defptrptr = &IREG(reg);
1369   return result;
1370}
1371
1372UINT32 tms3203x_device::mod17_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1373{
1374   int reg = TMR_AR0 + (ar & 7);
1375   UINT32 result = IREG(reg);
1376   INT32 temp = (result & m_bkmask) - IREG(TMR_IR1);
1377   if (temp < 0)
1378      temp += IREG(TMR_BK);
1379   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1380   defptrptr = &IREG(reg);
1381   return result;
1382}
1383
1384UINT32 tms3203x_device::mod18_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1385{
1386   int reg = TMR_AR0 + (ar & 7);
1387   return IREG(reg);
1388}
1389
1390UINT32 tms3203x_device::mod19_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1391{
1392   unimplemented(op);
1393   return 0;
1394}
1395
1396UINT32 tms3203x_device::modillegal_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1397{
1398   illegal(op);
1399   return 0;
1400}
1401
1402
1403/*-----------------------------------------------------*/
1404
1405#define ABSF(dreg, sreg)                                                \
1406{                                                                       \
1407   INT32 man = FREGMAN(sreg);                                          \
1408   CLR_NZVUF();                                                        \
1409   m_r[dreg] = m_r[sreg];                              \
1410   if (man < 0)                                                        \
1411   {                                                                   \
1412      m_r[dreg].set_mantissa(~man);                           \
1413      if (man == (INT32)0x80000000 && FREGEXP(sreg) == 127)           \
1414         IREG(TMR_ST) |= VFLAG | LVFLAG;                             \
1415   }                                                                   \
1416   OR_NZF(m_r[dreg]);                                          \
1417}
1418
1419void tms3203x_device::absf_reg(UINT32 op)
1420{
1421   int dreg = (op >> 16) & 7;
1422   int sreg = op & 7;
1423   ABSF(dreg, sreg);
1424}
1425
1426void tms3203x_device::absf_dir(UINT32 op)
1427{
1428   UINT32 res = RMEM(DIRECT(op));
1429   int dreg = (op >> 16) & 7;
1430   LONG2FP(TMR_TEMP1, res);
1431   ABSF(dreg, TMR_TEMP1);
1432}
1433
1434void tms3203x_device::absf_ind(UINT32 op)
1435{
1436   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1437   int dreg = (op >> 16) & 7;
1438   LONG2FP(TMR_TEMP1, res);
1439   ABSF(dreg, TMR_TEMP1);
1440}
1441
1442void tms3203x_device::absf_imm(UINT32 op)
1443{
1444   int dreg = (op >> 16) & 7;
1445   SHORT2FP(TMR_TEMP1, op);
1446   ABSF(dreg, TMR_TEMP1);
1447}
1448
1449/*-----------------------------------------------------*/
1450
1451#define ABSI(dreg, src)                                             \
1452{                                                                   \
1453   UINT32 _res = ((INT32)src < 0) ? -src : src;                    \
1454   if (!OVM() || _res != 0x80000000)                                   \
1455      IREG(dreg) = _res;                                          \
1456   else                                                            \
1457      IREG(dreg) = 0x7fffffff;                                    \
1458   if (dreg < 8)                                                   \
1459   {                                                               \
1460      CLR_NZVUF();                                                \
1461      OR_NZ(_res);                                                \
1462      if (_res == 0x80000000)                                     \
1463         IREG(TMR_ST) |= VFLAG | LVFLAG;                         \
1464   }                                                               \
1465   else if (dreg >= TMR_BK)                                        \
1466      update_special(dreg);                                       \
1467}
1468
1469void tms3203x_device::absi_reg(UINT32 op)
1470{
1471   UINT32 src = IREG(op & 31);
1472   int dreg = (op >> 16) & 31;
1473   ABSI(dreg, src);
1474}
1475
1476void tms3203x_device::absi_dir(UINT32 op)
1477{
1478   UINT32 src = RMEM(DIRECT(op));
1479   int dreg = (op >> 16) & 31;
1480   ABSI(dreg, src);
1481}
1482
1483void tms3203x_device::absi_ind(UINT32 op)
1484{
1485   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1486   int dreg = (op >> 16) & 31;
1487   ABSI(dreg, src);
1488}
1489
1490void tms3203x_device::absi_imm(UINT32 op)
1491{
1492   UINT32 src = (INT16)op;
1493   int dreg = (op >> 16) & 31;
1494   ABSI(dreg, src);
1495}
1496
1497/*-----------------------------------------------------*/
1498
1499#define ADDC(dreg, src1, src2)                                      \
1500{                                                                   \
1501   UINT32 _res = src1 + src2 + (IREG(TMR_ST) & CFLAG);             \
1502   if (!OVM() || !OVERFLOW_ADD(src1,src2,_res))                    \
1503      IREG(dreg) = _res;                                          \
1504   else                                                            \
1505      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
1506   if (dreg < 8)                                                   \
1507   {                                                               \
1508      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
1509      CLR_NZCVUF();                                               \
1510      OR_C_ADC(src1,src2,tempc);                                  \
1511      OR_V_ADD(src1,src2,_res);                                   \
1512      OR_NZ(_res);                                                \
1513   }                                                               \
1514   else if (dreg >= TMR_BK)                                        \
1515      update_special(dreg);                                       \
1516}
1517
1518void tms3203x_device::addc_reg(UINT32 op)
1519{
1520   UINT32 src = IREG(op & 31);
1521   int dreg = (op >> 16) & 31;
1522   UINT32 dst = IREG(dreg);
1523   ADDC(dreg, dst, src);
1524}
1525
1526void tms3203x_device::addc_dir(UINT32 op)
1527{
1528   UINT32 src = RMEM(DIRECT(op));
1529   int dreg = (op >> 16) & 31;
1530   UINT32 dst = IREG(dreg);
1531   ADDC(dreg, dst, src);
1532}
1533
1534void tms3203x_device::addc_ind(UINT32 op)
1535{
1536   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1537   int dreg = (op >> 16) & 31;
1538   UINT32 dst = IREG(dreg);
1539   ADDC(dreg, dst, src);
1540}
1541
1542void tms3203x_device::addc_imm(UINT32 op)
1543{
1544   UINT32 src = (INT16)op;
1545   int dreg = (op >> 16) & 31;
1546   UINT32 dst = IREG(dreg);
1547   ADDC(dreg, dst, src);
1548}
1549
1550/*-----------------------------------------------------*/
1551
1552void tms3203x_device::addf_reg(UINT32 op)
1553{
1554   int dreg = (op >> 16) & 7;
1555   addf(m_r[dreg], m_r[dreg], m_r[op & 7]);
1556}
1557
1558void tms3203x_device::addf_dir(UINT32 op)
1559{
1560   UINT32 res = RMEM(DIRECT(op));
1561   int dreg = (op >> 16) & 7;
1562   LONG2FP(TMR_TEMP1, res);
1563   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1564}
1565
1566void tms3203x_device::addf_ind(UINT32 op)
1567{
1568   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1569   int dreg = (op >> 16) & 7;
1570   LONG2FP(TMR_TEMP1, res);
1571   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1572}
1573
1574void tms3203x_device::addf_imm(UINT32 op)
1575{
1576   int dreg = (op >> 16) & 7;
1577   SHORT2FP(TMR_TEMP1, op);
1578   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1579}
1580
1581/*-----------------------------------------------------*/
1582
1583#define ADDI(dreg, src1, src2)                                      \
1584{                                                                   \
1585   UINT32 _res = src1 + src2;                                      \
1586   if (!OVM() || !OVERFLOW_ADD(src1,src2,_res))                    \
1587      IREG(dreg) = _res;                                          \
1588   else                                                            \
1589      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
1590   if (dreg < 8)                                                   \
1591   {                                                               \
1592      CLR_NZCVUF();                                               \
1593      OR_C_ADD(src1,src2,_res);                                   \
1594      OR_V_ADD(src1,src2,_res);                                   \
1595      OR_NZ(_res);                                                \
1596   }                                                               \
1597   else if (dreg >= TMR_BK)                                        \
1598      update_special(dreg);                                       \
1599}
1600
1601void tms3203x_device::addi_reg(UINT32 op)
1602{
1603   UINT32 src = IREG(op & 31);
1604   int dreg = (op >> 16) & 31;
1605   UINT32 dst = IREG(dreg);
1606   ADDI(dreg, dst, src);
1607}
1608
1609void tms3203x_device::addi_dir(UINT32 op)
1610{
1611   UINT32 src = RMEM(DIRECT(op));
1612   int dreg = (op >> 16) & 31;
1613   UINT32 dst = IREG(dreg);
1614   ADDI(dreg, dst, src);
1615}
1616
1617void tms3203x_device::addi_ind(UINT32 op)
1618{
1619   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1620   int dreg = (op >> 16) & 31;
1621   UINT32 dst = IREG(dreg);
1622   ADDI(dreg, dst, src);
1623}
1624
1625void tms3203x_device::addi_imm(UINT32 op)
1626{
1627   UINT32 src = (INT16)op;
1628   int dreg = (op >> 16) & 31;
1629   UINT32 dst = IREG(dreg);
1630   ADDI(dreg, dst, src);
1631}
1632
1633/*-----------------------------------------------------*/
1634
1635#define AND(dreg, src1, src2)                                       \
1636{                                                                   \
1637   UINT32 _res = (src1) & (src2);                                  \
1638   IREG(dreg) = _res;                                              \
1639   if (dreg < 8)                                                   \
1640   {                                                               \
1641      CLR_NZVUF();                                                \
1642      OR_NZ(_res);                                                \
1643   }                                                               \
1644   else if (dreg >= TMR_BK)                                        \
1645      update_special(dreg);                                       \
1646}
1647
1648void tms3203x_device::and_reg(UINT32 op)
1649{
1650   UINT32 src = IREG(op & 31);
1651   int dreg = (op >> 16) & 31;
1652   UINT32 dst = IREG(dreg);
1653   AND(dreg, dst, src);
1654}
1655
1656void tms3203x_device::and_dir(UINT32 op)
1657{
1658   UINT32 src = RMEM(DIRECT(op));
1659   int dreg = (op >> 16) & 31;
1660   UINT32 dst = IREG(dreg);
1661   AND(dreg, dst, src);
1662}
1663
1664void tms3203x_device::and_ind(UINT32 op)
1665{
1666   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1667   int dreg = (op >> 16) & 31;
1668   UINT32 dst = IREG(dreg);
1669   AND(dreg, dst, src);
1670}
1671
1672void tms3203x_device::and_imm(UINT32 op)
1673{
1674   UINT32 src = (UINT16)op;
1675   int dreg = (op >> 16) & 31;
1676   UINT32 dst = IREG(dreg);
1677   AND(dreg, dst, src);
1678}
1679
1680/*-----------------------------------------------------*/
1681
1682#define ANDN(dreg, src1, src2)                                      \
1683{                                                                   \
1684   UINT32 _res = (src1) & ~(src2);                                 \
1685   IREG(dreg) = _res;                                              \
1686   if (dreg < 8)                                                   \
1687   {                                                               \
1688      CLR_NZVUF();                                                \
1689      OR_NZ(_res);                                                \
1690   }                                                               \
1691   else if (dreg >= TMR_BK)                                        \
1692      update_special(dreg);                                       \
1693}
1694
1695void tms3203x_device::andn_reg(UINT32 op)
1696{
1697   UINT32 src = IREG(op & 31);
1698   int dreg = (op >> 16) & 31;
1699   UINT32 dst = IREG(dreg);
1700   ANDN(dreg, dst, src);
1701}
1702
1703void tms3203x_device::andn_dir(UINT32 op)
1704{
1705   UINT32 src = RMEM(DIRECT(op));
1706   int dreg = (op >> 16) & 31;
1707   UINT32 dst = IREG(dreg);
1708   ANDN(dreg, dst, src);
1709}
1710
1711void tms3203x_device::andn_ind(UINT32 op)
1712{
1713   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1714   int dreg = (op >> 16) & 31;
1715   UINT32 dst = IREG(dreg);
1716   ANDN(dreg, dst, src);
1717}
1718
1719void tms3203x_device::andn_imm(UINT32 op)
1720{
1721   UINT32 src = (UINT16)op;
1722   int dreg = (op >> 16) & 31;
1723   UINT32 dst = IREG(dreg);
1724   ANDN(dreg, dst, src);
1725}
1726
1727/*-----------------------------------------------------*/
1728
1729#define ASH(dreg, src, count)                                       \
1730{                                                                   \
1731   UINT32 _res;                                                    \
1732   INT32 _count = (INT16)(count << 9) >> 9;    /* 7 LSBs */        \
1733   if (_count < 0)                                                 \
1734   {                                                               \
1735      if (_count >= -31)                                          \
1736         _res = (INT32)src >> -_count;                           \
1737      else                                                        \
1738         _res = (INT32)src >> 31;                                \
1739   }                                                               \
1740   else                                                            \
1741   {                                                               \
1742      if (_count <= 31)                                           \
1743         _res = (INT32)src << _count;                            \
1744      else                                                        \
1745         _res = 0;                                               \
1746   }                                                               \
1747   IREG(dreg) = _res;                                              \
1748   if (dreg < 8)                                                   \
1749   {                                                               \
1750      CLR_NZCVUF();                                               \
1751      OR_NZ(_res);                                                \
1752      if (_count < 0)                                             \
1753      {                                                           \
1754         if (_count >= -32)                                      \
1755            OR_C(((INT32)src >> (-_count - 1)) & 1);            \
1756         else                                                    \
1757            OR_C(((INT32)src >> 31) & 1);                       \
1758      }                                                           \
1759      else if (_count > 0)                                        \
1760      {                                                           \
1761         if (_count <= 32)                                       \
1762            OR_C(((UINT32)src << (_count - 1)) >> 31);          \
1763      }                                                           \
1764   }                                                               \
1765   else if (dreg >= TMR_BK)                                        \
1766      update_special(dreg);                                       \
1767}
1768
1769void tms3203x_device::ash_reg(UINT32 op)
1770{
1771   int dreg = (op >> 16) & 31;
1772   int count = IREG(op & 31);
1773   UINT32 src = IREG(dreg);
1774   ASH(dreg, src, count);
1775}
1776
1777void tms3203x_device::ash_dir(UINT32 op)
1778{
1779   int dreg = (op >> 16) & 31;
1780   int count = RMEM(DIRECT(op));
1781   UINT32 src = IREG(dreg);
1782   ASH(dreg, src, count);
1783}
1784
1785void tms3203x_device::ash_ind(UINT32 op)
1786{
1787   int dreg = (op >> 16) & 31;
1788   int count = RMEM(INDIRECT_D(op, op >> 8));
1789   UINT32 src = IREG(dreg);
1790   ASH(dreg, src, count);
1791}
1792
1793void tms3203x_device::ash_imm(UINT32 op)
1794{
1795   int dreg = (op >> 16) & 31;
1796   int count = op;
1797   UINT32 src = IREG(dreg);
1798   ASH(dreg, src, count);
1799}
1800
1801/*-----------------------------------------------------*/
1802
1803void tms3203x_device::cmpf_reg(UINT32 op)
1804{
1805   int dreg = (op >> 16) & 7;
1806   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[op & 7]);
1807}
1808
1809void tms3203x_device::cmpf_dir(UINT32 op)
1810{
1811   UINT32 res = RMEM(DIRECT(op));
1812   int dreg = (op >> 16) & 7;
1813   LONG2FP(TMR_TEMP1, res);
1814   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1815}
1816
1817void tms3203x_device::cmpf_ind(UINT32 op)
1818{
1819   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1820   int dreg = (op >> 16) & 7;
1821   LONG2FP(TMR_TEMP1, res);
1822   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1823}
1824
1825void tms3203x_device::cmpf_imm(UINT32 op)
1826{
1827   int dreg = (op >> 16) & 7;
1828   SHORT2FP(TMR_TEMP1, op);
1829   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1830}
1831
1832/*-----------------------------------------------------*/
1833
1834#define CMPI(src1, src2)                                            \
1835{                                                                   \
1836   UINT32 _res = src1 - src2;                                      \
1837   CLR_NZCVUF();                                                   \
1838   OR_C_SUB(src1,src2,_res);                                       \
1839   OR_V_SUB(src1,src2,_res);                                       \
1840   OR_NZ(_res);                                                    \
1841}
1842
1843void tms3203x_device::cmpi_reg(UINT32 op)
1844{
1845   UINT32 src = IREG(op & 31);
1846   UINT32 dst = IREG((op >> 16) & 31);
1847   CMPI(dst, src);
1848}
1849
1850void tms3203x_device::cmpi_dir(UINT32 op)
1851{
1852   UINT32 src = RMEM(DIRECT(op));
1853   UINT32 dst = IREG((op >> 16) & 31);
1854   CMPI(dst, src);
1855}
1856
1857void tms3203x_device::cmpi_ind(UINT32 op)
1858{
1859   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1860   UINT32 dst = IREG((op >> 16) & 31);
1861   CMPI(dst, src);
1862}
1863
1864void tms3203x_device::cmpi_imm(UINT32 op)
1865{
1866   UINT32 src = (INT16)op;
1867   UINT32 dst = IREG((op >> 16) & 31);
1868   CMPI(dst, src);
1869}
1870
1871/*-----------------------------------------------------*/
1872
1873void tms3203x_device::fix_reg(UINT32 op)
1874{
1875   int dreg = (op >> 16) & 31;
1876   m_r[TMR_TEMP1] = m_r[op & 7];
1877   float2int(m_r[TMR_TEMP1], dreg < 8);
1878   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1879}
1880
1881void tms3203x_device::fix_dir(UINT32 op)
1882{
1883   UINT32 res = RMEM(DIRECT(op));
1884   int dreg = (op >> 16) & 31;
1885   LONG2FP(TMR_TEMP1, res);
1886   float2int(m_r[TMR_TEMP1], dreg < 8);
1887   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1888}
1889
1890void tms3203x_device::fix_ind(UINT32 op)
1891{
1892   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1893   int dreg = (op >> 16) & 31;
1894   LONG2FP(TMR_TEMP1, res);
1895   float2int(m_r[TMR_TEMP1], dreg < 8);
1896   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1897}
1898
1899void tms3203x_device::fix_imm(UINT32 op)
1900{
1901   int dreg = (op >> 16) & 31;
1902   SHORT2FP(TMR_TEMP1, op);
1903   float2int(m_r[TMR_TEMP1], dreg < 8);
1904   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1905}
1906
1907/*-----------------------------------------------------*/
1908
1909#define FLOAT(dreg, src)                                            \
1910{                                                                   \
1911   IREG(dreg) = src;                                               \
1912   int2float(m_r[dreg]);                                   \
1913}
1914
1915void tms3203x_device::float_reg(UINT32 op)
1916{
1917   UINT32 src = IREG(op & 31);
1918   int dreg = (op >> 16) & 7;
1919   FLOAT(dreg, src);
1920}
1921
1922void tms3203x_device::float_dir(UINT32 op)
1923{
1924   UINT32 src = RMEM(DIRECT(op));
1925   int dreg = (op >> 16) & 7;
1926   FLOAT(dreg, src);
1927}
1928
1929void tms3203x_device::float_ind(UINT32 op)
1930{
1931   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1932   int dreg = (op >> 16) & 7;
1933   FLOAT(dreg, src);
1934}
1935
1936void tms3203x_device::float_imm(UINT32 op)
1937{
1938   UINT32 src = (INT16)op;
1939   int dreg = (op >> 16) & 7;
1940   FLOAT(dreg, src);
1941}
1942
1943/*-----------------------------------------------------*/
1944
1945void tms3203x_device::idle(UINT32 op)
1946{
1947   m_is_idling = true;
1948   IREG(TMR_ST) |= GIEFLAG;
1949   check_irqs();
1950   if (m_is_idling)
1951      m_icount = 0;
1952}
1953
1954/*-----------------------------------------------------*/
1955
1956void tms3203x_device::lde_reg(UINT32 op)
1957{
1958   int dreg = (op >> 16) & 7;
1959   m_r[dreg].set_exponent(m_r[op & 7].exponent());
1960   if (m_r[dreg].exponent() == -128)
1961      m_r[dreg].set_mantissa(0);
1962}
1963
1964void tms3203x_device::lde_dir(UINT32 op)
1965{
1966   UINT32 res = RMEM(DIRECT(op));
1967   int dreg = (op >> 16) & 7;
1968   LONG2FP(TMR_TEMP1, res);
1969   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1970   if (m_r[dreg].exponent() == -128)
1971      m_r[dreg].set_mantissa(0);
1972}
1973
1974void tms3203x_device::lde_ind(UINT32 op)
1975{
1976   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1977   int dreg = (op >> 16) & 7;
1978   LONG2FP(TMR_TEMP1, res);
1979   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1980   if (m_r[dreg].exponent() == -128)
1981      m_r[dreg].set_mantissa(0);
1982}
1983
1984void tms3203x_device::lde_imm(UINT32 op)
1985{
1986   int dreg = (op >> 16) & 7;
1987   SHORT2FP(TMR_TEMP1, op);
1988   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1989   if (m_r[dreg].exponent() == -128)
1990      m_r[dreg].set_mantissa(0);
1991}
1992
1993/*-----------------------------------------------------*/
1994
1995void tms3203x_device::ldf_reg(UINT32 op)
1996{
1997   int dreg = (op >> 16) & 7;
1998   m_r[dreg] = m_r[op & 7];
1999   CLR_NZVUF();
2000   OR_NZF(m_r[dreg]);
2001}
2002
2003void tms3203x_device::ldf_dir(UINT32 op)
2004{
2005   UINT32 res = RMEM(DIRECT(op));
2006   int dreg = (op >> 16) & 7;
2007   LONG2FP(dreg, res);
2008   CLR_NZVUF();
2009   OR_NZF(m_r[dreg]);
2010}
2011
2012void tms3203x_device::ldf_ind(UINT32 op)
2013{
2014   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2015   int dreg = (op >> 16) & 7;
2016   LONG2FP(dreg, res);
2017   CLR_NZVUF();
2018   OR_NZF(m_r[dreg]);
2019}
2020
2021void tms3203x_device::ldf_imm(UINT32 op)
2022{
2023   int dreg = (op >> 16) & 7;
2024   SHORT2FP(dreg, op);
2025   CLR_NZVUF();
2026   OR_NZF(m_r[dreg]);
2027}
2028
2029/*-----------------------------------------------------*/
2030
2031void tms3203x_device::ldfi_dir(UINT32 op) { unimplemented(op); }
2032void tms3203x_device::ldfi_ind(UINT32 op) { unimplemented(op); }
2033
2034/*-----------------------------------------------------*/
2035
2036#define LDI(dreg, src)                                              \
2037{                                                                   \
2038   IREG(dreg) = src;                                               \
2039   if (dreg < 8)                                                   \
2040   {                                                               \
2041      CLR_NZVUF();                                                \
2042      OR_NZ(src);                                                 \
2043   }                                                               \
2044   else if (dreg >= TMR_BK)                                        \
2045      update_special(dreg);                                       \
2046}
2047
2048void tms3203x_device::ldi_reg(UINT32 op)
2049{
2050   UINT32 src = IREG(op & 31);
2051   int dreg = (op >> 16) & 31;
2052   LDI(dreg, src);
2053}
2054
2055void tms3203x_device::ldi_dir(UINT32 op)
2056{
2057   UINT32 src = RMEM(DIRECT(op));
2058   int dreg = (op >> 16) & 31;
2059   LDI(dreg, src);
2060}
2061
2062void tms3203x_device::ldi_ind(UINT32 op)
2063{
2064   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2065   int dreg = (op >> 16) & 31;
2066   LDI(dreg, src);
2067}
2068
2069void tms3203x_device::ldi_imm(UINT32 op)
2070{
2071   UINT32 src = (INT16)op;
2072   int dreg = (op >> 16) & 31;
2073   LDI(dreg, src);
2074}
2075
2076/*-----------------------------------------------------*/
2077
2078void tms3203x_device::ldii_dir(UINT32 op) { unimplemented(op); }
2079void tms3203x_device::ldii_ind(UINT32 op) { unimplemented(op); }
2080
2081/*-----------------------------------------------------*/
2082
2083void tms3203x_device::ldm_reg(UINT32 op)
2084{
2085   int dreg = (op >> 16) & 7;
2086   m_r[dreg].set_mantissa(m_r[op & 7].mantissa());
2087}
2088
2089void tms3203x_device::ldm_dir(UINT32 op)
2090{
2091   UINT32 res = RMEM(DIRECT(op));
2092   int dreg = (op >> 16) & 7;
2093   m_r[dreg].set_mantissa(res);
2094}
2095
2096void tms3203x_device::ldm_ind(UINT32 op)
2097{
2098   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2099   int dreg = (op >> 16) & 7;
2100   m_r[dreg].set_mantissa(res);
2101}
2102
2103void tms3203x_device::ldm_imm(UINT32 op)
2104{
2105   int dreg = (op >> 16) & 7;
2106   SHORT2FP(TMR_TEMP1, op);
2107   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
2108}
2109
2110/*-----------------------------------------------------*/
2111
2112#define LSH(dreg, src, count)                                       \
2113{                                                                   \
2114   UINT32 _res;                                                    \
2115   INT32 _count = (INT16)(count << 9) >> 9;    /* 7 LSBs */        \
2116   if (_count < 0)                                                 \
2117   {                                                               \
2118      if (_count >= -31)                                          \
2119         _res = (UINT32)src >> -_count;                          \
2120      else                                                        \
2121         _res = 0;                                               \
2122   }                                                               \
2123   else                                                            \
2124   {                                                               \
2125      if (_count <= 31)                                           \
2126         _res = (UINT32)src << _count;                           \
2127      else                                                        \
2128         _res = 0;                                               \
2129   }                                                               \
2130   IREG(dreg) = _res;                                              \
2131   if (dreg < 8)                                                   \
2132   {                                                               \
2133      CLR_NZCVUF();                                               \
2134      OR_NZ(_res);                                                \
2135      if (_count < 0)                                             \
2136      {                                                           \
2137         if (_count >= -32)                                      \
2138            OR_C(((UINT32)src >> (-_count - 1)) & 1);           \
2139      }                                                           \
2140      else if (_count > 0)                                        \
2141      {                                                           \
2142         if (_count <= 32)                                       \
2143            OR_C(((UINT32)src << (_count - 1)) >> 31);          \
2144      }                                                           \
2145   }                                                               \
2146   else if (dreg >= TMR_BK)                                        \
2147      update_special(dreg);                                       \
2148}
2149
2150void tms3203x_device::lsh_reg(UINT32 op)
2151{
2152   int dreg = (op >> 16) & 31;
2153   int count = IREG(op & 31);
2154   UINT32 src = IREG(dreg);
2155   LSH(dreg, src, count);
2156}
2157
2158void tms3203x_device::lsh_dir(UINT32 op)
2159{
2160   int dreg = (op >> 16) & 31;
2161   int count = RMEM(DIRECT(op));
2162   UINT32 src = IREG(dreg);
2163   LSH(dreg, src, count);
2164}
2165
2166void tms3203x_device::lsh_ind(UINT32 op)
2167{
2168   int dreg = (op >> 16) & 31;
2169   int count = RMEM(INDIRECT_D(op, op >> 8));
2170   UINT32 src = IREG(dreg);
2171   LSH(dreg, src, count);
2172}
2173
2174void tms3203x_device::lsh_imm(UINT32 op)
2175{
2176   int dreg = (op >> 16) & 31;
2177   int count = op;
2178   UINT32 src = IREG(dreg);
2179   LSH(dreg, src, count);
2180}
2181
2182/*-----------------------------------------------------*/
2183
2184void tms3203x_device::mpyf_reg(UINT32 op)
2185{
2186   int dreg = (op >> 16) & 31;
2187   mpyf(m_r[dreg], m_r[dreg], m_r[op & 31]);
2188}
2189
2190void tms3203x_device::mpyf_dir(UINT32 op)
2191{
2192   UINT32 res = RMEM(DIRECT(op));
2193   int dreg = (op >> 16) & 31;
2194   LONG2FP(TMR_TEMP1, res);
2195   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2196}
2197
2198void tms3203x_device::mpyf_ind(UINT32 op)
2199{
2200   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2201   int dreg = (op >> 16) & 31;
2202   LONG2FP(TMR_TEMP1, res);
2203   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2204}
2205
2206void tms3203x_device::mpyf_imm(UINT32 op)
2207{
2208   int dreg = (op >> 16) & 31;
2209   SHORT2FP(TMR_TEMP1, op);
2210   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2211}
2212
2213/*-----------------------------------------------------*/
2214
2215#define MPYI(dreg, src1, src2)                                      \
2216{                                                                   \
2217   INT64 _res = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);\
2218   if (!OVM() || (_res >= -(INT64)0x80000000 && _res <= (INT64)0x7fffffff))        \
2219      IREG(dreg) = _res;                                          \
2220   else                                                            \
2221      IREG(dreg) = (_res < 0) ? 0x80000000 : 0x7fffffff;          \
2222   if (dreg < 8)                                                   \
2223   {                                                               \
2224      CLR_NZVUF();                                                \
2225      OR_NZ((UINT32)_res);                                        \
2226      if (_res < -(INT64)0x80000000 || _res > (INT64)0x7fffffff)  \
2227         IREG(TMR_ST) |= VFLAG | LVFLAG;                         \
2228   }                                                               \
2229   else if (dreg >= TMR_BK)                                        \
2230      update_special(dreg);                                       \
2231}
2232
2233void tms3203x_device::mpyi_reg(UINT32 op)
2234{
2235   UINT32 src = IREG(op & 31);
2236   int dreg = (op >> 16) & 31;
2237   UINT32 dst = IREG(dreg);
2238   MPYI(dreg, dst, src);
2239}
2240
2241void tms3203x_device::mpyi_dir(UINT32 op)
2242{
2243   UINT32 src = RMEM(DIRECT(op));
2244   int dreg = (op >> 16) & 31;
2245   UINT32 dst = IREG(dreg);
2246   MPYI(dreg, dst, src);
2247}
2248
2249void tms3203x_device::mpyi_ind(UINT32 op)
2250{
2251   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2252   int dreg = (op >> 16) & 31;
2253   UINT32 dst = IREG(dreg);
2254   MPYI(dreg, dst, src);
2255}
2256
2257void tms3203x_device::mpyi_imm(UINT32 op)
2258{
2259   UINT32 src = (INT16)op;
2260   int dreg = (op >> 16) & 31;
2261   UINT32 dst = IREG(dreg);
2262   MPYI(dreg, dst, src);
2263}
2264
2265/*-----------------------------------------------------*/
2266
2267#define NEGB(dreg, src)                                             \
2268{                                                                   \
2269   UINT32 _res = 0 - src - (IREG(TMR_ST) & CFLAG);                 \
2270   if (!OVM() || !OVERFLOW_SUB(0,src,_res))                        \
2271      IREG(dreg) = _res;                                          \
2272   else                                                            \
2273      IREG(dreg) = ((INT32)src < 0) ? 0x80000000 : 0x7fffffff;    \
2274   if (dreg < 8)                                                   \
2275   {                                                               \
2276      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
2277      CLR_NZCVUF();                                               \
2278      OR_C_SBB(0,src,tempc);                                      \
2279      OR_V_SUB(0,src,_res);                                       \
2280      OR_NZ(_res);                                                \
2281   }                                                               \
2282   else if (dreg >= TMR_BK)                                        \
2283      update_special(dreg);                                       \
2284}
2285
2286void tms3203x_device::negb_reg(UINT32 op)
2287{
2288   UINT32 src = IREG(op & 31);
2289   int dreg = (op >> 16) & 31;
2290   NEGB(dreg, src);
2291}
2292
2293void tms3203x_device::negb_dir(UINT32 op)
2294{
2295   UINT32 src = RMEM(DIRECT(op));
2296   int dreg = (op >> 16) & 31;
2297   NEGB(dreg, src);
2298}
2299
2300void tms3203x_device::negb_ind(UINT32 op)
2301{
2302   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2303   int dreg = (op >> 16) & 31;
2304   NEGB(dreg, src);
2305}
2306
2307void tms3203x_device::negb_imm(UINT32 op)
2308{
2309   UINT32 src = (INT16)op;
2310   int dreg = (op >> 16) & 31;
2311   NEGB(dreg, src);
2312}
2313
2314/*-----------------------------------------------------*/
2315
2316void tms3203x_device::negf_reg(UINT32 op)
2317{
2318   int dreg = (op >> 16) & 7;
2319   negf(m_r[dreg], m_r[op & 7]);
2320}
2321
2322void tms3203x_device::negf_dir(UINT32 op)
2323{
2324   UINT32 res = RMEM(DIRECT(op));
2325   int dreg = (op >> 16) & 7;
2326   LONG2FP(TMR_TEMP1, res);
2327   negf(m_r[dreg], m_r[TMR_TEMP1]);
2328}
2329
2330void tms3203x_device::negf_ind(UINT32 op)
2331{
2332   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2333   int dreg = (op >> 16) & 7;
2334   LONG2FP(TMR_TEMP1, res);
2335   negf(m_r[dreg], m_r[TMR_TEMP1]);
2336}
2337
2338void tms3203x_device::negf_imm(UINT32 op)
2339{
2340   int dreg = (op >> 16) & 7;
2341   SHORT2FP(TMR_TEMP1, op);
2342   negf(m_r[dreg], m_r[TMR_TEMP1]);
2343}
2344
2345/*-----------------------------------------------------*/
2346
2347#define NEGI(dreg, src)                                             \
2348{                                                                   \
2349   UINT32 _res = 0 - src;                                          \
2350   if (!OVM() || !OVERFLOW_SUB(0,src,_res))                        \
2351      IREG(dreg) = _res;                                          \
2352   else                                                            \
2353      IREG(dreg) = ((INT32)src < 0) ? 0x80000000 : 0x7fffffff;    \
2354   if (dreg < 8)                                                   \
2355   {                                                               \
2356      CLR_NZCVUF();                                               \
2357      OR_C_SUB(0,src,_res);                                       \
2358      OR_V_SUB(0,src,_res);                                       \
2359      OR_NZ(_res);                                                \
2360   }                                                               \
2361   else if (dreg >= TMR_BK)                                        \
2362      update_special(dreg);                                       \
2363}
2364
2365void tms3203x_device::negi_reg(UINT32 op)
2366{
2367   UINT32 src = IREG(op & 31);
2368   int dreg = (op >> 16) & 31;
2369   NEGI(dreg, src);
2370}
2371
2372void tms3203x_device::negi_dir(UINT32 op)
2373{
2374   UINT32 src = RMEM(DIRECT(op));
2375   int dreg = (op >> 16) & 31;
2376   NEGI(dreg, src);
2377}
2378
2379void tms3203x_device::negi_ind(UINT32 op)
2380{
2381   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2382   int dreg = (op >> 16) & 31;
2383   NEGI(dreg, src);
2384}
2385
2386void tms3203x_device::negi_imm(UINT32 op)
2387{
2388   UINT32 src = (INT16)op;
2389   int dreg = (op >> 16) & 31;
2390   NEGI(dreg, src);
2391}
2392
2393/*-----------------------------------------------------*/
2394
2395void tms3203x_device::nop_reg(UINT32 op)
2396{
2397}
2398
2399void tms3203x_device::nop_ind(UINT32 op)
2400{
2401   RMEM(INDIRECT_D(op, op >> 8));
2402}
2403
2404/*-----------------------------------------------------*/
2405
2406void tms3203x_device::norm_reg(UINT32 op)
2407{
2408   int dreg = (op >> 16) & 7;
2409   norm(m_r[dreg], m_r[op & 7]);
2410}
2411
2412void tms3203x_device::norm_dir(UINT32 op)
2413{
2414   UINT32 res = RMEM(DIRECT(op));
2415   int dreg = (op >> 16) & 7;
2416   LONG2FP(TMR_TEMP1, res);
2417   norm(m_r[dreg], m_r[TMR_TEMP1]);
2418}
2419
2420void tms3203x_device::norm_ind(UINT32 op)
2421{
2422   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2423   int dreg = (op >> 16) & 7;
2424   LONG2FP(TMR_TEMP1, res);
2425   norm(m_r[dreg], m_r[TMR_TEMP1]);
2426}
2427
2428void tms3203x_device::norm_imm(UINT32 op)
2429{
2430   int dreg = (op >> 16) & 7;
2431   SHORT2FP(TMR_TEMP1, op);
2432   norm(m_r[dreg], m_r[TMR_TEMP1]);
2433}
2434
2435/*-----------------------------------------------------*/
2436
2437#define NOT(dreg, src)                                              \
2438{                                                                   \
2439   UINT32 _res = ~(src);                                           \
2440   IREG(dreg) = _res;                                              \
2441   if (dreg < 8)                                                   \
2442   {                                                               \
2443      CLR_NZVUF();                                                \
2444      OR_NZ(_res);                                                \
2445   }                                                               \
2446   else if (dreg >= TMR_BK)                                        \
2447      update_special(dreg);                                       \
2448}
2449
2450void tms3203x_device::not_reg(UINT32 op)
2451{
2452   UINT32 src = IREG(op & 31);
2453   int dreg = (op >> 16) & 31;
2454   NOT(dreg, src);
2455}
2456
2457void tms3203x_device::not_dir(UINT32 op)
2458{
2459   UINT32 src = RMEM(DIRECT(op));
2460   int dreg = (op >> 16) & 31;
2461   NOT(dreg, src);
2462}
2463
2464void tms3203x_device::not_ind(UINT32 op)
2465{
2466   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2467   int dreg = (op >> 16) & 31;
2468   NOT(dreg, src);
2469}
2470
2471void tms3203x_device::not_imm(UINT32 op)
2472{
2473   UINT32 src = (UINT16)op;
2474   int dreg = (op >> 16) & 31;
2475   NOT(dreg, src);
2476}
2477
2478/*-----------------------------------------------------*/
2479
2480void tms3203x_device::pop(UINT32 op)
2481{
2482   int dreg = (op >> 16) & 31;
2483   UINT32 val = RMEM(IREG(TMR_SP)--);
2484   IREG(dreg) = val;
2485   if (dreg < 8)
2486   {
2487      CLR_NZVUF();
2488      OR_NZ(val);
2489   }
2490   else if (dreg >= TMR_BK)
2491      update_special(dreg);
2492}
2493
2494void tms3203x_device::popf(UINT32 op)
2495{
2496   int dreg = (op >> 16) & 7;
2497   UINT32 val = RMEM(IREG(TMR_SP)--);
2498   LONG2FP(dreg, val);
2499   CLR_NZVUF();
2500   OR_NZF(m_r[dreg]);
2501}
2502
2503void tms3203x_device::push(UINT32 op)
2504{
2505   WMEM(++IREG(TMR_SP), IREG((op >> 16) & 31));
2506}
2507
2508void tms3203x_device::pushf(UINT32 op)
2509{
2510   int dreg = (op >> 16) & 7;
2511   WMEM(++IREG(TMR_SP), FP2LONG(dreg));
2512}
2513
2514/*-----------------------------------------------------*/
2515
2516#define OR(dreg, src1, src2)                                        \
2517{                                                                   \
2518   UINT32 _res = (src1) | (src2);                                  \
2519   IREG(dreg) = _res;                                              \
2520   if (dreg < 8)                                                   \
2521   {                                                               \
2522      CLR_NZVUF();                                                \
2523      OR_NZ(_res);                                                \
2524   }                                                               \
2525   else if (dreg >= TMR_BK)                                        \
2526      update_special(dreg);                                       \
2527}
2528
2529void tms3203x_device::or_reg(UINT32 op)
2530{
2531   UINT32 src = IREG(op & 31);
2532   int dreg = (op >> 16) & 31;
2533   UINT32 dst = IREG(dreg);
2534   OR(dreg, dst, src);
2535}
2536
2537void tms3203x_device::or_dir(UINT32 op)
2538{
2539   UINT32 src = RMEM(DIRECT(op));
2540   int dreg = (op >> 16) & 31;
2541   UINT32 dst = IREG(dreg);
2542   OR(dreg, dst, src);
2543}
2544
2545void tms3203x_device::or_ind(UINT32 op)
2546{
2547   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2548   int dreg = (op >> 16) & 31;
2549   UINT32 dst = IREG(dreg);
2550   OR(dreg, dst, src);
2551}
2552
2553void tms3203x_device::or_imm(UINT32 op)
2554{
2555   UINT32 src = (UINT16)op;
2556   int dreg = (op >> 16) & 31;
2557   UINT32 dst = IREG(dreg);
2558   OR(dreg, dst, src);
2559}
2560
2561/*-----------------------------------------------------*/
2562
2563void tms3203x_device::maxspeed(UINT32 op) { unimplemented(op); }
2564
2565/*-----------------------------------------------------*/
2566
2567#define RND(dreg)                                                   \
2568{                                                                   \
2569   INT32 man = FREGMAN(dreg);                                      \
2570   CLR_NVUF();                                                     \
2571   if (man < 0x7fffff80)                                           \
2572   {                                                               \
2573      m_r[dreg].set_mantissa(((UINT32)man + 0x80) & 0xffffff00);  \
2574      OR_NUF(m_r[dreg]);                                  \
2575   }                                                               \
2576   else if (FREGEXP(dreg) < 127)                                   \
2577   {                                                               \
2578      m_r[dreg].set_mantissa(((UINT32)man + 0x80) & 0x7fffff00);  \
2579      m_r[dreg].set_exponent(FREGEXP(dreg) + 1);          \
2580      OR_NUF(m_r[dreg]);                                  \
2581   }                                                               \
2582   else                                                            \
2583   {                                                               \
2584      m_r[dreg].set_mantissa(0x7fffff00);             \
2585      IREG(TMR_ST) |= VFLAG | LVFLAG;                             \
2586   }                                                               \
2587}
2588
2589void tms3203x_device::rnd_reg(UINT32 op)
2590{
2591   int sreg = op & 7;
2592   int dreg = (op >> 16) & 7;
2593   m_r[dreg] = m_r[sreg];
2594   RND(dreg);
2595}
2596
2597void tms3203x_device::rnd_dir(UINT32 op)
2598{
2599   UINT32 res = RMEM(DIRECT(op));
2600   int dreg = (op >> 16) & 7;
2601   LONG2FP(dreg, res);
2602   RND(dreg);
2603}
2604
2605void tms3203x_device::rnd_ind(UINT32 op)
2606{
2607   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2608   int dreg = (op >> 16) & 7;
2609   LONG2FP(dreg, res);
2610   RND(dreg);
2611}
2612
2613void tms3203x_device::rnd_imm(UINT32 op)
2614{
2615   int dreg = (op >> 16) & 7;
2616   SHORT2FP(dreg, op);
2617   RND(dreg);
2618}
2619
2620/*-----------------------------------------------------*/
2621
2622void tms3203x_device::rol(UINT32 op)
2623{
2624   int dreg = (op >> 16) & 31;
2625   UINT32 res = IREG(dreg);
2626   int newcflag = res >> 31;
2627   res = (res << 1) | newcflag;
2628   IREG(dreg) = res;
2629   if (dreg < 8)
2630   {
2631      CLR_NZCVUF();
2632      OR_NZ(res);
2633      OR_C(newcflag);
2634   }
2635   else if (dreg >= TMR_BK)
2636      update_special(dreg);
2637}
2638
2639void tms3203x_device::rolc(UINT32 op)
2640{
2641   int dreg = (op >> 16) & 31;
2642   UINT32 res = IREG(dreg);
2643   int newcflag = res >> 31;
2644   res = (res << 1) | (IREG(TMR_ST) & CFLAG);
2645   IREG(dreg) = res;
2646   if (dreg < 8)
2647   {
2648      CLR_NZCVUF();
2649      OR_NZ(res);
2650      OR_C(newcflag);
2651   }
2652   else if (dreg >= TMR_BK)
2653      update_special(dreg);
2654}
2655
2656void tms3203x_device::ror(UINT32 op)
2657{
2658   int dreg = (op >> 16) & 31;
2659   UINT32 res = IREG(dreg);
2660   int newcflag = res & 1;
2661   res = (res >> 1) | (newcflag << 31);
2662   IREG(dreg) = res;
2663   if (dreg < 8)
2664   {
2665      CLR_NZCVUF();
2666      OR_NZ(res);
2667      OR_C(newcflag);
2668   }
2669   else if (dreg >= TMR_BK)
2670      update_special(dreg);
2671}
2672
2673void tms3203x_device::rorc(UINT32 op)
2674{
2675   int dreg = (op >> 16) & 31;
2676   UINT32 res = IREG(dreg);
2677   int newcflag = res & 1;
2678   res = (res >> 1) | ((IREG(TMR_ST) & CFLAG) << 31);
2679   IREG(dreg) = res;
2680   if (dreg < 8)
2681   {
2682      CLR_NZCVUF();
2683      OR_NZ(res);
2684      OR_C(newcflag);
2685   }
2686   else if (dreg >= TMR_BK)
2687      update_special(dreg);
2688}
2689
2690/*-----------------------------------------------------*/
2691
2692void tms3203x_device::rtps_reg(UINT32 op)
2693{
2694   IREG(TMR_RC) = IREG(op & 31);
2695   IREG(TMR_RS) = m_pc;
2696   IREG(TMR_RE) = m_pc;
2697   IREG(TMR_ST) |= RMFLAG;
2698   m_icount -= 3*2;
2699   m_delayed = true;
2700}
2701
2702void tms3203x_device::rtps_dir(UINT32 op)
2703{
2704   IREG(TMR_RC) = RMEM(DIRECT(op));
2705   IREG(TMR_RS) = m_pc;
2706   IREG(TMR_RE) = m_pc;
2707   IREG(TMR_ST) |= RMFLAG;
2708   m_icount -= 3*2;
2709   m_delayed = true;
2710}
2711
2712void tms3203x_device::rtps_ind(UINT32 op)
2713{
2714   IREG(TMR_RC) = RMEM(INDIRECT_D(op, op >> 8));
2715   IREG(TMR_RS) = m_pc;
2716   IREG(TMR_RE) = m_pc;
2717   IREG(TMR_ST) |= RMFLAG;
2718   m_icount -= 3*2;
2719   m_delayed = true;
2720}
2721
2722void tms3203x_device::rtps_imm(UINT32 op)
2723{
2724   IREG(TMR_RC) = (UINT16)op;
2725   IREG(TMR_RS) = m_pc;
2726   IREG(TMR_RE) = m_pc;
2727   IREG(TMR_ST) |= RMFLAG;
2728   m_icount -= 3*2;
2729   m_delayed = true;
2730}
2731
2732/*-----------------------------------------------------*/
2733
2734void tms3203x_device::stf_dir(UINT32 op)
2735{
2736   WMEM(DIRECT(op), FP2LONG((op >> 16) & 7));
2737}
2738
2739void tms3203x_device::stf_ind(UINT32 op)
2740{
2741   WMEM(INDIRECT_D(op, op >> 8), FP2LONG((op >> 16) & 7));
2742}
2743
2744/*-----------------------------------------------------*/
2745
2746void tms3203x_device::stfi_dir(UINT32 op) { unimplemented(op); }
2747void tms3203x_device::stfi_ind(UINT32 op) { unimplemented(op); }
2748
2749/*-----------------------------------------------------*/
2750
2751void tms3203x_device::sti_dir(UINT32 op)
2752{
2753   WMEM(DIRECT(op), IREG((op >> 16) & 31));
2754}
2755
2756void tms3203x_device::sti_ind(UINT32 op)
2757{
2758   WMEM(INDIRECT_D(op, op >> 8), IREG((op >> 16) & 31));
2759}
2760
2761/*-----------------------------------------------------*/
2762
2763void tms3203x_device::stii_dir(UINT32 op) { unimplemented(op); }
2764void tms3203x_device::stii_ind(UINT32 op) { unimplemented(op); }
2765
2766/*-----------------------------------------------------*/
2767
2768void tms3203x_device::sigi(UINT32 op) { unimplemented(op); }
2769
2770/*-----------------------------------------------------*/
2771
2772#define SUBB(dreg, src1, src2)                                      \
2773{                                                                   \
2774   UINT32 _res = src1 - src2 - (IREG(TMR_ST) & CFLAG);             \
2775   if (!OVM() || !OVERFLOW_SUB(src1,src2,_res))                    \
2776      IREG(dreg) = _res;                                          \
2777   else                                                            \
2778      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
2779   if (dreg < 8)                                                   \
2780   {                                                               \
2781      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
2782      CLR_NZCVUF();                                               \
2783      OR_C_SBB(src1,src2,tempc);                                  \
2784      OR_V_SUB(src1,src2,_res);                                   \
2785      OR_NZ(_res);                                                \
2786   }                                                               \
2787   else if (dreg >= TMR_BK)                                        \
2788      update_special(dreg);                                       \
2789}
2790
2791void tms3203x_device::subb_reg(UINT32 op)
2792{
2793   UINT32 src = IREG(op & 31);
2794   int dreg = (op >> 16) & 31;
2795   UINT32 dst = IREG(dreg);
2796   SUBB(dreg, dst, src);
2797}
2798
2799void tms3203x_device::subb_dir(UINT32 op)
2800{
2801   UINT32 src = RMEM(DIRECT(op));
2802   int dreg = (op >> 16) & 31;
2803   UINT32 dst = IREG(dreg);
2804   SUBB(dreg, dst, src);
2805}
2806
2807void tms3203x_device::subb_ind(UINT32 op)
2808{
2809   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2810   int dreg = (op >> 16) & 31;
2811   UINT32 dst = IREG(dreg);
2812   SUBB(dreg, dst, src);
2813}
2814
2815void tms3203x_device::subb_imm(UINT32 op)
2816{
2817   UINT32 src = (INT16)op;
2818   int dreg = (op >> 16) & 31;
2819   UINT32 dst = IREG(dreg);
2820   SUBB(dreg, dst, src);
2821}
2822
2823/*-----------------------------------------------------*/
2824
2825#define SUBC(dreg, src)                                             \
2826{                                                                   \
2827   UINT32 dst = IREG(dreg);                                        \
2828   if (dst >= src)                                                 \
2829      IREG(dreg) = ((dst - src) << 1) | 1;                        \
2830   else                                                            \
2831      IREG(dreg) = dst << 1;                                      \
2832   if (dreg >= TMR_BK)                                             \
2833      update_special(dreg);                                       \
2834}
2835
2836void tms3203x_device::subc_reg(UINT32 op)
2837{
2838   UINT32 src = IREG(op & 31);
2839   int dreg = (op >> 16) & 31;
2840   SUBC(dreg, src);
2841}
2842
2843void tms3203x_device::subc_dir(UINT32 op)
2844{
2845   UINT32 src = RMEM(DIRECT(op));
2846   int dreg = (op >> 16) & 31;
2847   SUBC(dreg, src);
2848}
2849
2850void tms3203x_device::subc_ind(UINT32 op)
2851{
2852   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2853   int dreg = (op >> 16) & 31;
2854   SUBC(dreg, src);
2855}
2856
2857void tms3203x_device::subc_imm(UINT32 op)
2858{
2859   UINT32 src = (INT16)op;
2860   int dreg = (op >> 16) & 31;
2861   SUBC(dreg, src);
2862}
2863
2864/*-----------------------------------------------------*/
2865
2866void tms3203x_device::subf_reg(UINT32 op)
2867{
2868   int dreg = (op >> 16) & 7;
2869   subf(m_r[dreg], m_r[dreg], m_r[op & 7]);
2870}
2871
2872void tms3203x_device::subf_dir(UINT32 op)
2873{
2874   UINT32 res = RMEM(DIRECT(op));
2875   int dreg = (op >> 16) & 7;
2876   LONG2FP(TMR_TEMP1, res);
2877   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2878}
2879
2880void tms3203x_device::subf_ind(UINT32 op)
2881{
2882   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2883   int dreg = (op >> 16) & 7;
2884   LONG2FP(TMR_TEMP1, res);
2885   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2886}
2887
2888void tms3203x_device::subf_imm(UINT32 op)
2889{
2890   int dreg = (op >> 16) & 7;
2891   SHORT2FP(TMR_TEMP1, op);
2892   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2893}
2894
2895/*-----------------------------------------------------*/
2896
2897#define SUBI(dreg, src1, src2)                                      \
2898{                                                                   \
2899   UINT32 _res = src1 - src2;                                      \
2900   if (!OVM() || !OVERFLOW_SUB(src1,src2,_res))                    \
2901      IREG(dreg) = _res;                                          \
2902   else                                                            \
2903      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
2904   if (dreg < 8)                                                   \
2905   {                                                               \
2906      CLR_NZCVUF();                                               \
2907      OR_C_SUB(src1,src2,_res);                                   \
2908      OR_V_SUB(src1,src2,_res);                                   \
2909      OR_NZ(_res);                                                \
2910   }                                                               \
2911   else if (dreg >= TMR_BK)                                        \
2912      update_special(dreg);                                       \
2913}
2914
2915void tms3203x_device::subi_reg(UINT32 op)
2916{
2917   UINT32 src = IREG(op & 31);
2918   int dreg = (op >> 16) & 31;
2919   UINT32 dst = IREG(dreg);
2920   SUBI(dreg, dst, src);
2921}
2922
2923void tms3203x_device::subi_dir(UINT32 op)
2924{
2925   UINT32 src = RMEM(DIRECT(op));
2926   int dreg = (op >> 16) & 31;
2927   UINT32 dst = IREG(dreg);
2928   SUBI(dreg, dst, src);
2929}
2930
2931void tms3203x_device::subi_ind(UINT32 op)
2932{
2933   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2934   int dreg = (op >> 16) & 31;
2935   UINT32 dst = IREG(dreg);
2936   SUBI(dreg, dst, src);
2937}
2938
2939void tms3203x_device::subi_imm(UINT32 op)
2940{
2941   UINT32 src = (INT16)op;
2942   int dreg = (op >> 16) & 31;
2943   UINT32 dst = IREG(dreg);
2944   SUBI(dreg, dst, src);
2945}
2946
2947/*-----------------------------------------------------*/
2948
2949void tms3203x_device::subrb_reg(UINT32 op)
2950{
2951   UINT32 src = IREG(op & 31);
2952   int dreg = (op >> 16) & 31;
2953   UINT32 dst = IREG(dreg);
2954   SUBB(dreg, src, dst);
2955}
2956
2957void tms3203x_device::subrb_dir(UINT32 op)
2958{
2959   UINT32 src = RMEM(DIRECT(op));
2960   int dreg = (op >> 16) & 31;
2961   UINT32 dst = IREG(dreg);
2962   SUBB(dreg, src, dst);
2963}
2964
2965void tms3203x_device::subrb_ind(UINT32 op)
2966{
2967   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2968   int dreg = (op >> 16) & 31;
2969   UINT32 dst = IREG(dreg);
2970   SUBB(dreg, src, dst);
2971}
2972
2973void tms3203x_device::subrb_imm(UINT32 op)
2974{
2975   UINT32 src = (INT16)op;
2976   int dreg = (op >> 16) & 31;
2977   UINT32 dst = IREG(dreg);
2978   SUBB(dreg, src, dst);
2979}
2980
2981/*-----------------------------------------------------*/
2982
2983void tms3203x_device::subrf_reg(UINT32 op)
2984{
2985   int dreg = (op >> 16) & 7;
2986   subf(m_r[dreg], m_r[op & 7], m_r[dreg]);
2987}
2988
2989void tms3203x_device::subrf_dir(UINT32 op)
2990{
2991   UINT32 res = RMEM(DIRECT(op));
2992   int dreg = (op >> 16) & 7;
2993   LONG2FP(TMR_TEMP1, res);
2994   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
2995}
2996
2997void tms3203x_device::subrf_ind(UINT32 op)
2998{
2999   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3000   int dreg = (op >> 16) & 7;
3001   LONG2FP(TMR_TEMP1, res);
3002   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
3003}
3004
3005void tms3203x_device::subrf_imm(UINT32 op)
3006{
3007   int dreg = (op >> 16) & 7;
3008   SHORT2FP(TMR_TEMP1, op);
3009   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
3010}
3011
3012/*-----------------------------------------------------*/
3013
3014void tms3203x_device::subri_reg(UINT32 op)
3015{
3016   UINT32 src = IREG(op & 31);
3017   int dreg = (op >> 16) & 31;
3018   UINT32 dst = IREG(dreg);
3019   SUBI(dreg, src, dst);
3020}
3021
3022void tms3203x_device::subri_dir(UINT32 op)
3023{
3024   UINT32 src = RMEM(DIRECT(op));
3025   int dreg = (op >> 16) & 31;
3026   UINT32 dst = IREG(dreg);
3027   SUBI(dreg, src, dst);
3028}
3029
3030void tms3203x_device::subri_ind(UINT32 op)
3031{
3032   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3033   int dreg = (op >> 16) & 31;
3034   UINT32 dst = IREG(dreg);
3035   SUBI(dreg, src, dst);
3036}
3037
3038void tms3203x_device::subri_imm(UINT32 op)
3039{
3040   UINT32 src = (INT16)op;
3041   int dreg = (op >> 16) & 31;
3042   UINT32 dst = IREG(dreg);
3043   SUBI(dreg, src, dst);
3044}
3045
3046/*-----------------------------------------------------*/
3047
3048#define TSTB(src1, src2)                                            \
3049{                                                                   \
3050   UINT32 _res = (src1) & (src2);                                  \
3051   CLR_NZVUF();                                                    \
3052   OR_NZ(_res);                                                    \
3053}
3054
3055void tms3203x_device::tstb_reg(UINT32 op)
3056{
3057   UINT32 src = IREG(op & 31);
3058   UINT32 dst = IREG((op >> 16) & 31);
3059   TSTB(dst, src);
3060}
3061
3062void tms3203x_device::tstb_dir(UINT32 op)
3063{
3064   UINT32 src = RMEM(DIRECT(op));
3065   UINT32 dst = IREG((op >> 16) & 31);
3066   TSTB(dst, src);
3067}
3068
3069void tms3203x_device::tstb_ind(UINT32 op)
3070{
3071   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3072   UINT32 dst = IREG((op >> 16) & 31);
3073   TSTB(dst, src);
3074}
3075
3076void tms3203x_device::tstb_imm(UINT32 op)
3077{
3078   UINT32 src = (UINT16)op;
3079   UINT32 dst = IREG((op >> 16) & 31);
3080   TSTB(dst, src);
3081}
3082
3083/*-----------------------------------------------------*/
3084
3085#define XOR(dreg, src1, src2)                                       \
3086{                                                                   \
3087   UINT32 _res = (src1) ^ (src2);                                  \
3088   IREG(dreg) = _res;                                              \
3089   if (dreg < 8)                                                   \
3090   {                                                               \
3091      CLR_NZVUF();                                                \
3092      OR_NZ(_res);                                                \
3093   }                                                               \
3094   else if (dreg >= TMR_BK)                                        \
3095      update_special(dreg);                                       \
3096}
3097
3098void tms3203x_device::xor_reg(UINT32 op)
3099{
3100   UINT32 src = IREG(op & 31);
3101   int dreg = (op >> 16) & 31;
3102   UINT32 dst = IREG(dreg);
3103   XOR(dreg, dst, src);
3104}
3105
3106void tms3203x_device::xor_dir(UINT32 op)
3107{
3108   UINT32 src = RMEM(DIRECT(op));
3109   int dreg = (op >> 16) & 31;
3110   UINT32 dst = IREG(dreg);
3111   XOR(dreg, dst, src);
3112}
3113
3114void tms3203x_device::xor_ind(UINT32 op)
3115{
3116   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3117   int dreg = (op >> 16) & 31;
3118   UINT32 dst = IREG(dreg);
3119   XOR(dreg, dst, src);
3120}
3121
3122void tms3203x_device::xor_imm(UINT32 op)
3123{
3124   UINT32 src = (UINT16)op;
3125   int dreg = (op >> 16) & 31;
3126   UINT32 dst = IREG(dreg);
3127   XOR(dreg, dst, src);
3128}
3129
3130/*-----------------------------------------------------*/
3131
3132void tms3203x_device::iack_dir(UINT32 op)
3133{
3134   offs_t addr = DIRECT(op);
3135   m_iack_cb(addr, ASSERT_LINE);
3136   RMEM(addr);
3137   m_iack_cb(addr, CLEAR_LINE);
3138}
3139
3140void tms3203x_device::iack_ind(UINT32 op)
3141{
3142   offs_t addr = INDIRECT_D(op, op >> 8);
3143   m_iack_cb(addr, ASSERT_LINE);
3144   RMEM(addr);
3145   m_iack_cb(addr, CLEAR_LINE);
3146}
3147
3148/*-----------------------------------------------------*/
3149
3150void tms3203x_device::addc3_regreg(UINT32 op)
3151{
3152   UINT32 src1 = IREG((op >> 8) & 31);
3153   UINT32 src2 = IREG(op & 31);
3154   int dreg = (op >> 16) & 31;
3155   ADDC(dreg, src1, src2);
3156}
3157
3158void tms3203x_device::addc3_indreg(UINT32 op)
3159{
3160   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3161   UINT32 src2 = IREG(op & 31);
3162   int dreg = (op >> 16) & 31;
3163   ADDC(dreg, src1, src2);
3164}
3165
3166void tms3203x_device::addc3_regind(UINT32 op)
3167{
3168   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3169   UINT32 src1 = IREG((op >> 8) & 31);
3170   int dreg = (op >> 16) & 31;
3171   ADDC(dreg, src1, src2);
3172}
3173
3174void tms3203x_device::addc3_indind(UINT32 op)
3175{
3176   DECLARE_DEF;
3177   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3178   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3179   int dreg = (op >> 16) & 31;
3180   UPDATE_DEF();
3181   ADDC(dreg, src1, src2);
3182}
3183
3184/*-----------------------------------------------------*/
3185
3186void tms3203x_device::addf3_regreg(UINT32 op)
3187{
3188   int sreg1 = (op >> 8) & 7;
3189   int sreg2 = op & 7;
3190   int dreg = (op >> 16) & 7;
3191   addf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3192}
3193
3194void tms3203x_device::addf3_indreg(UINT32 op)
3195{
3196   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3197   int sreg2 = op & 7;
3198   int dreg = (op >> 16) & 7;
3199   LONG2FP(TMR_TEMP1, src1);
3200   addf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3201}
3202
3203void tms3203x_device::addf3_regind(UINT32 op)
3204{
3205   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3206   int sreg1 = (op >> 8) & 7;
3207   int dreg = (op >> 16) & 7;
3208   LONG2FP(TMR_TEMP2, src2);
3209   addf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3210}
3211
3212void tms3203x_device::addf3_indind(UINT32 op)
3213{
3214   DECLARE_DEF;
3215   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3216   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3217   int dreg = (op >> 16) & 7;
3218   UPDATE_DEF();
3219   LONG2FP(TMR_TEMP1, src1);
3220   LONG2FP(TMR_TEMP2, src2);
3221   addf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3222}
3223
3224/*-----------------------------------------------------*/
3225
3226void tms3203x_device::addi3_regreg(UINT32 op)
3227{
3228   UINT32 src1 = IREG((op >> 8) & 31);
3229   UINT32 src2 = IREG(op & 31);
3230   int dreg = (op >> 16) & 31;
3231   ADDI(dreg, src1, src2);
3232}
3233
3234void tms3203x_device::addi3_indreg(UINT32 op)
3235{
3236   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3237   UINT32 src2 = IREG(op & 31);
3238   int dreg = (op >> 16) & 31;
3239   ADDI(dreg, src1, src2);
3240}
3241
3242void tms3203x_device::addi3_regind(UINT32 op)
3243{
3244   // Radikal Bikers confirms via ADDI3 AR3,*AR3++(1),R2 / SUB $0001,R2 sequence
3245   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3246   UINT32 src1 = IREG((op >> 8) & 31);
3247   int dreg = (op >> 16) & 31;
3248   ADDI(dreg, src1, src2);
3249}
3250
3251void tms3203x_device::addi3_indind(UINT32 op)
3252{
3253   DECLARE_DEF;
3254   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3255   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3256   int dreg = (op >> 16) & 31;
3257   UPDATE_DEF();
3258   ADDI(dreg, src1, src2);
3259}
3260
3261/*-----------------------------------------------------*/
3262
3263void tms3203x_device::and3_regreg(UINT32 op)
3264{
3265   UINT32 src1 = IREG((op >> 8) & 31);
3266   UINT32 src2 = IREG(op & 31);
3267   int dreg = (op >> 16) & 31;
3268   AND(dreg, src1, src2);
3269}
3270
3271void tms3203x_device::and3_indreg(UINT32 op)
3272{
3273   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3274   UINT32 src2 = IREG(op & 31);
3275   int dreg = (op >> 16) & 31;
3276   AND(dreg, src1, src2);
3277}
3278
3279void tms3203x_device::and3_regind(UINT32 op)
3280{
3281   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3282   UINT32 src1 = IREG((op >> 8) & 31);
3283   int dreg = (op >> 16) & 31;
3284   AND(dreg, src1, src2);
3285}
3286
3287void tms3203x_device::and3_indind(UINT32 op)
3288{
3289   DECLARE_DEF;
3290   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3291   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3292   int dreg = (op >> 16) & 31;
3293   UPDATE_DEF();
3294   AND(dreg, src1, src2);
3295}
3296
3297/*-----------------------------------------------------*/
3298
3299void tms3203x_device::andn3_regreg(UINT32 op)
3300{
3301   UINT32 src1 = IREG((op >> 8) & 31);
3302   UINT32 src2 = IREG(op & 31);
3303   int dreg = (op >> 16) & 31;
3304   ANDN(dreg, src1, src2);
3305}
3306
3307void tms3203x_device::andn3_indreg(UINT32 op)
3308{
3309   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3310   UINT32 src2 = IREG(op & 31);
3311   int dreg = (op >> 16) & 31;
3312   ANDN(dreg, src1, src2);
3313}
3314
3315void tms3203x_device::andn3_regind(UINT32 op)
3316{
3317   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3318   UINT32 src1 = IREG((op >> 8) & 31);
3319   int dreg = (op >> 16) & 31;
3320   ANDN(dreg, src1, src2);
3321}
3322
3323void tms3203x_device::andn3_indind(UINT32 op)
3324{
3325   DECLARE_DEF;
3326   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3327   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3328   int dreg = (op >> 16) & 31;
3329   UPDATE_DEF();
3330   ANDN(dreg, src1, src2);
3331}
3332
3333/*-----------------------------------------------------*/
3334
3335void tms3203x_device::ash3_regreg(UINT32 op)
3336{
3337   UINT32 src1 = IREG((op >> 8) & 31);
3338   UINT32 src2 = IREG(op & 31);
3339   int dreg = (op >> 16) & 31;
3340   ASH(dreg, src1, src2);
3341}
3342
3343void tms3203x_device::ash3_indreg(UINT32 op)
3344{
3345   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3346   UINT32 src2 = IREG(op & 31);
3347   int dreg = (op >> 16) & 31;
3348   ASH(dreg, src1, src2);
3349}
3350
3351void tms3203x_device::ash3_regind(UINT32 op)
3352{
3353   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3354   UINT32 src1 = IREG((op >> 8) & 31);
3355   int dreg = (op >> 16) & 31;
3356   ASH(dreg, src1, src2);
3357}
3358
3359void tms3203x_device::ash3_indind(UINT32 op)
3360{
3361   DECLARE_DEF;
3362   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3363   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3364   int dreg = (op >> 16) & 31;
3365   UPDATE_DEF();
3366   ASH(dreg, src1, src2);
3367}
3368
3369/*-----------------------------------------------------*/
3370
3371void tms3203x_device::cmpf3_regreg(UINT32 op)
3372{
3373   int sreg1 = (op >> 8) & 7;
3374   int sreg2 = op & 7;
3375   subf(m_r[TMR_TEMP1], m_r[sreg1], m_r[sreg2]);
3376}
3377
3378void tms3203x_device::cmpf3_indreg(UINT32 op)
3379{
3380   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3381   int sreg2 = op & 7;
3382   LONG2FP(TMR_TEMP1, src1);
3383   subf(m_r[TMR_TEMP1], m_r[TMR_TEMP1], m_r[sreg2]);
3384}
3385
3386void tms3203x_device::cmpf3_regind(UINT32 op)
3387{
3388   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3389   int sreg1 = (op >> 8) & 7;
3390   LONG2FP(TMR_TEMP2, src2);
3391   subf(m_r[TMR_TEMP1], m_r[sreg1], m_r[TMR_TEMP2]);
3392}
3393
3394void tms3203x_device::cmpf3_indind(UINT32 op)
3395{
3396   DECLARE_DEF;
3397   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3398   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3399   UPDATE_DEF();
3400   LONG2FP(TMR_TEMP1, src1);
3401   LONG2FP(TMR_TEMP2, src2);
3402   subf(m_r[TMR_TEMP1], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3403}
3404
3405/*-----------------------------------------------------*/
3406
3407void tms3203x_device::cmpi3_regreg(UINT32 op)
3408{
3409   UINT32 src1 = IREG((op >> 8) & 31);
3410   UINT32 src2 = IREG(op & 31);
3411   CMPI(src1, src2);
3412}
3413
3414void tms3203x_device::cmpi3_indreg(UINT32 op)
3415{
3416   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3417   UINT32 src2 = IREG(op & 31);
3418   CMPI(src1, src2);
3419}
3420
3421void tms3203x_device::cmpi3_regind(UINT32 op)
3422{
3423   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3424   UINT32 src1 = IREG((op >> 8) & 31);
3425   CMPI(src1, src2);
3426}
3427
3428void tms3203x_device::cmpi3_indind(UINT32 op)
3429{
3430   DECLARE_DEF;
3431   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3432   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3433   UPDATE_DEF();
3434   CMPI(src1, src2);
3435}
3436
3437/*-----------------------------------------------------*/
3438
3439void tms3203x_device::lsh3_regreg(UINT32 op)
3440{
3441   UINT32 src1 = IREG((op >> 8) & 31);
3442   UINT32 src2 = IREG(op & 31);
3443   int dreg = (op >> 16) & 31;
3444   LSH(dreg, src1, src2);
3445}
3446
3447void tms3203x_device::lsh3_indreg(UINT32 op)
3448{
3449   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3450   UINT32 src2 = IREG(op & 31);
3451   int dreg = (op >> 16) & 31;
3452   LSH(dreg, src1, src2);
3453}
3454
3455void tms3203x_device::lsh3_regind(UINT32 op)
3456{
3457   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3458   UINT32 src1 = IREG((op >> 8) & 31);
3459   int dreg = (op >> 16) & 31;
3460   LSH(dreg, src1, src2);
3461}
3462
3463void tms3203x_device::lsh3_indind(UINT32 op)
3464{
3465   DECLARE_DEF;
3466   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3467   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3468   int dreg = (op >> 16) & 31;
3469   UPDATE_DEF();
3470   LSH(dreg, src1, src2);
3471}
3472
3473/*-----------------------------------------------------*/
3474
3475void tms3203x_device::mpyf3_regreg(UINT32 op)
3476{
3477   int sreg1 = (op >> 8) & 7;
3478   int sreg2 = op & 7;
3479   int dreg = (op >> 16) & 7;
3480   mpyf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3481}
3482
3483void tms3203x_device::mpyf3_indreg(UINT32 op)
3484{
3485   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3486   int sreg2 = op & 7;
3487   int dreg = (op >> 16) & 7;
3488   LONG2FP(TMR_TEMP1, src1);
3489   mpyf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3490}
3491
3492void tms3203x_device::mpyf3_regind(UINT32 op)
3493{
3494   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3495   int sreg1 = (op >> 8) & 7;
3496   int dreg = (op >> 16) & 7;
3497   LONG2FP(TMR_TEMP2, src2);
3498   mpyf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3499}
3500
3501void tms3203x_device::mpyf3_indind(UINT32 op)
3502{
3503   DECLARE_DEF;
3504   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3505   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3506   int dreg = (op >> 16) & 7;
3507   UPDATE_DEF();
3508   LONG2FP(TMR_TEMP1, src1);
3509   LONG2FP(TMR_TEMP2, src2);
3510   mpyf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3511}
3512
3513/*-----------------------------------------------------*/
3514
3515void tms3203x_device::mpyi3_regreg(UINT32 op)
3516{
3517   UINT32 src1 = IREG((op >> 8) & 31);
3518   UINT32 src2 = IREG(op & 31);
3519   int dreg = (op >> 16) & 31;
3520   MPYI(dreg, src1, src2);
3521}
3522
3523void tms3203x_device::mpyi3_indreg(UINT32 op)
3524{
3525   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3526   UINT32 src2 = IREG(op & 31);
3527   int dreg = (op >> 16) & 31;
3528   MPYI(dreg, src1, src2);
3529}
3530
3531void tms3203x_device::mpyi3_regind(UINT32 op)
3532{
3533   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3534   UINT32 src1 = IREG((op >> 8) & 31);
3535   int dreg = (op >> 16) & 31;
3536   MPYI(dreg, src1, src2);
3537}
3538
3539void tms3203x_device::mpyi3_indind(UINT32 op)
3540{
3541   DECLARE_DEF;
3542   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3543   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3544   int dreg = (op >> 16) & 31;
3545   UPDATE_DEF();
3546   MPYI(dreg, src1, src2);
3547}
3548
3549/*-----------------------------------------------------*/
3550
3551void tms3203x_device::or3_regreg(UINT32 op)
3552{
3553   UINT32 src1 = IREG((op >> 8) & 31);
3554   UINT32 src2 = IREG(op & 31);
3555   int dreg = (op >> 16) & 31;
3556   OR(dreg, src1, src2);
3557}
3558
3559void tms3203x_device::or3_indreg(UINT32 op)
3560{
3561   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3562   UINT32 src2 = IREG(op & 31);
3563   int dreg = (op >> 16) & 31;
3564   OR(dreg, src1, src2);
3565}
3566
3567void tms3203x_device::or3_regind(UINT32 op)
3568{
3569   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3570   UINT32 src1 = IREG((op >> 8) & 31);
3571   int dreg = (op >> 16) & 31;
3572   OR(dreg, src1, src2);
3573}
3574
3575void tms3203x_device::or3_indind(UINT32 op)
3576{
3577   DECLARE_DEF;
3578   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3579   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3580   int dreg = (op >> 16) & 31;
3581   UPDATE_DEF();
3582   OR(dreg, src1, src2);
3583}
3584
3585/*-----------------------------------------------------*/
3586
3587void tms3203x_device::subb3_regreg(UINT32 op)
3588{
3589   UINT32 src1 = IREG((op >> 8) & 31);
3590   UINT32 src2 = IREG(op & 31);
3591   int dreg = (op >> 16) & 31;
3592   SUBB(dreg, src1, src2);
3593}
3594
3595void tms3203x_device::subb3_indreg(UINT32 op)
3596{
3597   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3598   UINT32 src2 = IREG(op & 31);
3599   int dreg = (op >> 16) & 31;
3600   SUBB(dreg, src1, src2);
3601}
3602
3603void tms3203x_device::subb3_regind(UINT32 op)
3604{
3605   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3606   UINT32 src1 = IREG((op >> 8) & 31);
3607   int dreg = (op >> 16) & 31;
3608   SUBB(dreg, src1, src2);
3609}
3610
3611void tms3203x_device::subb3_indind(UINT32 op)
3612{
3613   DECLARE_DEF;
3614   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3615   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3616   int dreg = (op >> 16) & 31;
3617   UPDATE_DEF();
3618   SUBB(dreg, src1, src2);
3619}
3620
3621/*-----------------------------------------------------*/
3622
3623void tms3203x_device::subf3_regreg(UINT32 op)
3624{
3625   int sreg1 = (op >> 8) & 7;
3626   int sreg2 = op & 7;
3627   int dreg = (op >> 16) & 7;
3628   subf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3629}
3630
3631void tms3203x_device::subf3_indreg(UINT32 op)
3632{
3633   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3634   int sreg2 = op & 7;
3635   int dreg = (op >> 16) & 7;
3636   LONG2FP(TMR_TEMP1, src1);
3637   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3638}
3639
3640void tms3203x_device::subf3_regind(UINT32 op)
3641{
3642   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3643   int sreg1 = (op >> 8) & 7;
3644   int dreg = (op >> 16) & 7;
3645   LONG2FP(TMR_TEMP2, src2);
3646   subf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3647}
3648
3649void tms3203x_device::subf3_indind(UINT32 op)
3650{
3651   DECLARE_DEF;
3652   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3653   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3654   int dreg = (op >> 16) & 7;
3655   UPDATE_DEF();
3656   LONG2FP(TMR_TEMP1, src1);
3657   LONG2FP(TMR_TEMP2, src2);
3658   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3659}
3660
3661/*-----------------------------------------------------*/
3662
3663void tms3203x_device::subi3_regreg(UINT32 op)
3664{
3665   UINT32 src1 = IREG((op >> 8) & 31);
3666   UINT32 src2 = IREG(op & 31);
3667   int dreg = (op >> 16) & 31;
3668   SUBI(dreg, src1, src2);
3669}
3670
3671void tms3203x_device::subi3_indreg(UINT32 op)
3672{
3673   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3674   UINT32 src2 = IREG(op & 31);
3675   int dreg = (op >> 16) & 31;
3676   SUBI(dreg, src1, src2);
3677}
3678
3679void tms3203x_device::subi3_regind(UINT32 op)
3680{
3681   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3682   UINT32 src1 = IREG((op >> 8) & 31);
3683   int dreg = (op >> 16) & 31;
3684   SUBI(dreg, src1, src2);
3685}
3686
3687void tms3203x_device::subi3_indind(UINT32 op)
3688{
3689   DECLARE_DEF;
3690   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3691   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3692   int dreg = (op >> 16) & 31;
3693   UPDATE_DEF();
3694   SUBI(dreg, src1, src2);
3695}
3696
3697/*-----------------------------------------------------*/
3698
3699void tms3203x_device::tstb3_regreg(UINT32 op)
3700{
3701   UINT32 src1 = IREG((op >> 8) & 31);
3702   UINT32 src2 = IREG(op & 31);
3703   TSTB(src1, src2);
3704}
3705
3706void tms3203x_device::tstb3_indreg(UINT32 op)
3707{
3708   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3709   UINT32 src2 = IREG(op & 31);
3710   TSTB(src1, src2);
3711}
3712
3713void tms3203x_device::tstb3_regind(UINT32 op)
3714{
3715   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3716   UINT32 src1 = IREG((op >> 8) & 31);
3717   TSTB(src1, src2);
3718}
3719
3720void tms3203x_device::tstb3_indind(UINT32 op)
3721{
3722   DECLARE_DEF;
3723   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3724   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3725   UPDATE_DEF();
3726   TSTB(src1, src2);
3727}
3728
3729/*-----------------------------------------------------*/
3730
3731void tms3203x_device::xor3_regreg(UINT32 op)
3732{
3733   UINT32 src1 = IREG((op >> 8) & 31);
3734   UINT32 src2 = IREG(op & 31);
3735   int dreg = (op >> 16) & 31;
3736   XOR(dreg, src1, src2);
3737}
3738
3739void tms3203x_device::xor3_indreg(UINT32 op)
3740{
3741   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3742   UINT32 src2 = IREG(op & 31);
3743   int dreg = (op >> 16) & 31;
3744   XOR(dreg, src1, src2);
3745}
3746
3747void tms3203x_device::xor3_regind(UINT32 op)
3748{
3749   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3750   UINT32 src1 = IREG((op >> 8) & 31);
3751   int dreg = (op >> 16) & 31;
3752   XOR(dreg, src1, src2);
3753}
3754
3755void tms3203x_device::xor3_indind(UINT32 op)
3756{
3757   DECLARE_DEF;
3758   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3759   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3760   int dreg = (op >> 16) & 31;
3761   UPDATE_DEF();
3762   XOR(dreg, src1, src2);
3763}
3764
3765/*-----------------------------------------------------*/
3766
3767void tms3203x_device::ldfu_reg(UINT32 op)
3768{
3769   m_r[(op >> 16) & 7] = m_r[op & 7];
3770}
3771
3772void tms3203x_device::ldfu_dir(UINT32 op)
3773{
3774   UINT32 res = RMEM(DIRECT(op));
3775   int dreg = (op >> 16) & 7;
3776   LONG2FP(dreg, res);
3777}
3778
3779void tms3203x_device::ldfu_ind(UINT32 op)
3780{
3781   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3782   int dreg = (op >> 16) & 7;
3783   LONG2FP(dreg, res);
3784}
3785
3786void tms3203x_device::ldfu_imm(UINT32 op)
3787{
3788   int dreg = (op >> 16) & 7;
3789   SHORT2FP(dreg, op);
3790}
3791
3792/*-----------------------------------------------------*/
3793
3794void tms3203x_device::ldflo_reg(UINT32 op)
3795{
3796   if (CONDITION_LO())
3797      m_r[(op >> 16) & 7] = m_r[op & 7];
3798}
3799
3800void tms3203x_device::ldflo_dir(UINT32 op)
3801{
3802   if (CONDITION_LO())
3803   {
3804      UINT32 res = RMEM(DIRECT(op));
3805      int dreg = (op >> 16) & 7;
3806      LONG2FP(dreg, res);
3807   }
3808}
3809
3810void tms3203x_device::ldflo_ind(UINT32 op)
3811{
3812   if (CONDITION_LO())
3813   {
3814      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3815      int dreg = (op >> 16) & 7;
3816      LONG2FP(dreg, res);
3817   }
3818   else
3819      INDIRECT_D(op, op >> 8);
3820}
3821
3822void tms3203x_device::ldflo_imm(UINT32 op)
3823{
3824   if (CONDITION_LO())
3825   {
3826      int dreg = (op >> 16) & 7;
3827      SHORT2FP(dreg, op);
3828   }
3829}
3830
3831/*-----------------------------------------------------*/
3832
3833void tms3203x_device::ldfls_reg(UINT32 op)
3834{
3835   if (CONDITION_LS())
3836      m_r[(op >> 16) & 7] = m_r[op & 7];
3837}
3838
3839void tms3203x_device::ldfls_dir(UINT32 op)
3840{
3841   if (CONDITION_LS())
3842   {
3843      UINT32 res = RMEM(DIRECT(op));
3844      int dreg = (op >> 16) & 7;
3845      LONG2FP(dreg, res);
3846   }
3847}
3848
3849void tms3203x_device::ldfls_ind(UINT32 op)
3850{
3851   if (CONDITION_LS())
3852   {
3853      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3854      int dreg = (op >> 16) & 7;
3855      LONG2FP(dreg, res);
3856   }
3857   else
3858      INDIRECT_D(op, op >> 8);
3859}
3860
3861void tms3203x_device::ldfls_imm(UINT32 op)
3862{
3863   if (CONDITION_LS())
3864   {
3865      int dreg = (op >> 16) & 7;
3866      SHORT2FP(dreg, op);
3867   }
3868}
3869
3870/*-----------------------------------------------------*/
3871
3872void tms3203x_device::ldfhi_reg(UINT32 op)
3873{
3874   if (CONDITION_HI())
3875      m_r[(op >> 16) & 7] = m_r[op & 7];
3876}
3877
3878void tms3203x_device::ldfhi_dir(UINT32 op)
3879{
3880   if (CONDITION_HI())
3881   {
3882      UINT32 res = RMEM(DIRECT(op));
3883      int dreg = (op >> 16) & 7;
3884      LONG2FP(dreg, res);
3885   }
3886}
3887
3888void tms3203x_device::ldfhi_ind(UINT32 op)
3889{
3890   if (CONDITION_HI())
3891   {
3892      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3893      int dreg = (op >> 16) & 7;
3894      LONG2FP(dreg, res);
3895   }
3896   else
3897      INDIRECT_D(op, op >> 8);
3898}
3899
3900void tms3203x_device::ldfhi_imm(UINT32 op)
3901{
3902   if (CONDITION_HI())
3903   {
3904      int dreg = (op >> 16) & 7;
3905      SHORT2FP(dreg, op);
3906   }
3907}
3908
3909/*-----------------------------------------------------*/
3910
3911void tms3203x_device::ldfhs_reg(UINT32 op)
3912{
3913   if (CONDITION_HS())
3914      m_r[(op >> 16) & 7] = m_r[op & 7];
3915}
3916
3917void tms3203x_device::ldfhs_dir(UINT32 op)
3918{
3919   if (CONDITION_HS())
3920   {
3921      UINT32 res = RMEM(DIRECT(op));
3922      int dreg = (op >> 16) & 7;
3923      LONG2FP(dreg, res);
3924   }
3925}
3926
3927void tms3203x_device::ldfhs_ind(UINT32 op)
3928{
3929   if (CONDITION_HS())
3930   {
3931      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3932      int dreg = (op >> 16) & 7;
3933      LONG2FP(dreg, res);
3934   }
3935   else
3936      INDIRECT_D(op, op >> 8);
3937}
3938
3939void tms3203x_device::ldfhs_imm(UINT32 op)
3940{
3941   if (CONDITION_HS())
3942   {
3943      int dreg = (op >> 16) & 7;
3944      SHORT2FP(dreg, op);
3945   }
3946}
3947
3948/*-----------------------------------------------------*/
3949
3950void tms3203x_device::ldfeq_reg(UINT32 op)
3951{
3952   if (CONDITION_EQ())
3953      m_r[(op >> 16) & 7] = m_r[op & 7];
3954}
3955
3956void tms3203x_device::ldfeq_dir(UINT32 op)
3957{
3958   if (CONDITION_EQ())
3959   {
3960      UINT32 res = RMEM(DIRECT(op));
3961      int dreg = (op >> 16) & 7;
3962      LONG2FP(dreg, res);
3963   }
3964}
3965
3966void tms3203x_device::ldfeq_ind(UINT32 op)
3967{
3968   if (CONDITION_EQ())
3969   {
3970      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3971      int dreg = (op >> 16) & 7;
3972      LONG2FP(dreg, res);
3973   }
3974   else
3975      INDIRECT_D(op, op >> 8);
3976}
3977
3978void tms3203x_device::ldfeq_imm(UINT32 op)
3979{
3980   if (CONDITION_EQ())
3981   {
3982      int dreg = (op >> 16) & 7;
3983      SHORT2FP(dreg, op);
3984   }
3985}
3986
3987/*-----------------------------------------------------*/
3988
3989void tms3203x_device::ldfne_reg(UINT32 op)
3990{
3991   if (CONDITION_NE())
3992      m_r[(op >> 16) & 7] = m_r[op & 7];
3993}
3994
3995void tms3203x_device::ldfne_dir(UINT32 op)
3996{
3997   if (CONDITION_NE())
3998   {
3999      UINT32 res = RMEM(DIRECT(op));
4000      int dreg = (op >> 16) & 7;
4001      LONG2FP(dreg, res);
4002   }
4003}
4004
4005void tms3203x_device::ldfne_ind(UINT32 op)
4006{
4007   if (CONDITION_NE())
4008   {
4009      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4010      int dreg = (op >> 16) & 7;
4011      LONG2FP(dreg, res);
4012   }
4013   else
4014      INDIRECT_D(op, op >> 8);
4015}
4016
4017void tms3203x_device::ldfne_imm(UINT32 op)
4018{
4019   if (CONDITION_NE())
4020   {
4021      int dreg = (op >> 16) & 7;
4022      SHORT2FP(dreg, op);
4023   }
4024}
4025
4026/*-----------------------------------------------------*/
4027
4028void tms3203x_device::ldflt_reg(UINT32 op)
4029{
4030   if (CONDITION_LT())
4031      m_r[(op >> 16) & 7] = m_r[op & 7];
4032}
4033
4034void tms3203x_device::ldflt_dir(UINT32 op)
4035{
4036   if (CONDITION_LT())
4037   {
4038      UINT32 res = RMEM(DIRECT(op));
4039      int dreg = (op >> 16) & 7;
4040      LONG2FP(dreg, res);
4041   }
4042}
4043
4044void tms3203x_device::ldflt_ind(UINT32 op)
4045{
4046   if (CONDITION_LT())
4047   {
4048      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4049      int dreg = (op >> 16) & 7;
4050      LONG2FP(dreg, res);
4051   }
4052   else
4053      INDIRECT_D(op, op >> 8);
4054}
4055
4056void tms3203x_device::ldflt_imm(UINT32 op)
4057{
4058   if (CONDITION_LT())
4059   {
4060      int dreg = (op >> 16) & 7;
4061      SHORT2FP(dreg, op);
4062   }
4063}
4064
4065/*-----------------------------------------------------*/
4066
4067void tms3203x_device::ldfle_reg(UINT32 op)
4068{
4069   if (CONDITION_LE())
4070      m_r[(op >> 16) & 7] = m_r[op & 7];
4071}
4072
4073void tms3203x_device::ldfle_dir(UINT32 op)
4074{
4075   if (CONDITION_LE())
4076   {
4077      UINT32 res = RMEM(DIRECT(op));
4078      int dreg = (op >> 16) & 7;
4079      LONG2FP(dreg, res);
4080   }
4081}
4082
4083void tms3203x_device::ldfle_ind(UINT32 op)
4084{
4085   if (CONDITION_LE())
4086   {
4087      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4088      int dreg = (op >> 16) & 7;
4089      LONG2FP(dreg, res);
4090   }
4091   else
4092      INDIRECT_D(op, op >> 8);
4093}
4094
4095void tms3203x_device::ldfle_imm(UINT32 op)
4096{
4097   if (CONDITION_LE())
4098   {
4099      int dreg = (op >> 16) & 7;
4100      SHORT2FP(dreg, op);
4101   }
4102}
4103
4104/*-----------------------------------------------------*/
4105
4106void tms3203x_device::ldfgt_reg(UINT32 op)
4107{
4108   if (CONDITION_GT())
4109      m_r[(op >> 16) & 7] = m_r[op & 7];
4110}
4111
4112void tms3203x_device::ldfgt_dir(UINT32 op)
4113{
4114   if (CONDITION_GT())
4115   {
4116      UINT32 res = RMEM(DIRECT(op));
4117      int dreg = (op >> 16) & 7;
4118      LONG2FP(dreg, res);
4119   }
4120}
4121
4122void tms3203x_device::ldfgt_ind(UINT32 op)
4123{
4124   if (CONDITION_GT())
4125   {
4126      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4127      int dreg = (op >> 16) & 7;
4128      LONG2FP(dreg, res);
4129   }
4130   else
4131      INDIRECT_D(op, op >> 8);
4132}
4133
4134void tms3203x_device::ldfgt_imm(UINT32 op)
4135{
4136   if (CONDITION_GT())
4137   {
4138      int dreg = (op >> 16) & 7;
4139      SHORT2FP(dreg, op);
4140   }
4141}
4142
4143/*-----------------------------------------------------*/
4144
4145void tms3203x_device::ldfge_reg(UINT32 op)
4146{
4147   if (CONDITION_GE())
4148      m_r[(op >> 16) & 7] = m_r[op & 7];
4149}
4150
4151void tms3203x_device::ldfge_dir(UINT32 op)
4152{
4153   if (CONDITION_GE())
4154   {
4155      UINT32 res = RMEM(DIRECT(op));
4156      int dreg = (op >> 16) & 7;
4157      LONG2FP(dreg, res);
4158   }
4159}
4160
4161void tms3203x_device::ldfge_ind(UINT32 op)
4162{
4163   if (CONDITION_GE())
4164   {
4165      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4166      int dreg = (op >> 16) & 7;
4167      LONG2FP(dreg, res);
4168   }
4169   else
4170      INDIRECT_D(op, op >> 8);
4171}
4172
4173void tms3203x_device::ldfge_imm(UINT32 op)
4174{
4175   if (CONDITION_GE())
4176   {
4177      int dreg = (op >> 16) & 7;
4178      SHORT2FP(dreg, op);
4179   }
4180}
4181
4182/*-----------------------------------------------------*/
4183
4184void tms3203x_device::ldfnv_reg(UINT32 op)
4185{
4186   if (CONDITION_NV())
4187      m_r[(op >> 16) & 7] = m_r[op & 7];
4188}
4189
4190void tms3203x_device::ldfnv_dir(UINT32 op)
4191{
4192   if (CONDITION_NV())
4193   {
4194      UINT32 res = RMEM(DIRECT(op));
4195      int dreg = (op >> 16) & 7;
4196      LONG2FP(dreg, res);
4197   }
4198}
4199
4200void tms3203x_device::ldfnv_ind(UINT32 op)
4201{
4202   if (CONDITION_NV())
4203   {
4204      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4205      int dreg = (op >> 16) & 7;
4206      LONG2FP(dreg, res);
4207   }
4208   else
4209      INDIRECT_D(op, op >> 8);
4210}
4211
4212void tms3203x_device::ldfnv_imm(UINT32 op)
4213{
4214   if (CONDITION_NV())
4215   {
4216      int dreg = (op >> 16) & 7;
4217      SHORT2FP(dreg, op);
4218   }
4219}
4220
4221/*-----------------------------------------------------*/
4222
4223void tms3203x_device::ldfv_reg(UINT32 op)
4224{
4225   if (CONDITION_V())
4226      m_r[(op >> 16) & 7] = m_r[op & 7];
4227}
4228
4229void tms3203x_device::ldfv_dir(UINT32 op)
4230{
4231   if (CONDITION_V())
4232   {
4233      UINT32 res = RMEM(DIRECT(op));
4234      int dreg = (op >> 16) & 7;
4235      LONG2FP(dreg, res);
4236   }
4237}
4238
4239void tms3203x_device::ldfv_ind(UINT32 op)
4240{
4241   if (CONDITION_V())
4242   {
4243      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4244      int dreg = (op >> 16) & 7;
4245      LONG2FP(dreg, res);
4246   }
4247   else
4248      INDIRECT_D(op, op >> 8);
4249}
4250
4251void tms3203x_device::ldfv_imm(UINT32 op)
4252{
4253   if (CONDITION_V())
4254   {
4255      int dreg = (op >> 16) & 7;
4256      SHORT2FP(dreg, op);
4257   }
4258}
4259
4260/*-----------------------------------------------------*/
4261
4262void tms3203x_device::ldfnuf_reg(UINT32 op)
4263{
4264   if (CONDITION_NUF())
4265      m_r[(op >> 16) & 7] = m_r[op & 7];
4266}
4267
4268void tms3203x_device::ldfnuf_dir(UINT32 op)
4269{
4270   if (CONDITION_NUF())
4271   {
4272      UINT32 res = RMEM(DIRECT(op));
4273      int dreg = (op >> 16) & 7;
4274      LONG2FP(dreg, res);
4275   }
4276}
4277
4278void tms3203x_device::ldfnuf_ind(UINT32 op)
4279{
4280   if (CONDITION_NUF())
4281   {
4282      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4283      int dreg = (op >> 16) & 7;
4284      LONG2FP(dreg, res);
4285   }
4286   else
4287      INDIRECT_D(op, op >> 8);
4288}
4289
4290void tms3203x_device::ldfnuf_imm(UINT32 op)
4291{
4292   if (CONDITION_NUF())
4293   {
4294      int dreg = (op >> 16) & 7;
4295      SHORT2FP(dreg, op);
4296   }
4297}
4298
4299/*-----------------------------------------------------*/
4300
4301void tms3203x_device::ldfuf_reg(UINT32 op)
4302{
4303   if (CONDITION_UF())
4304      m_r[(op >> 16) & 7] = m_r[op & 7];
4305}
4306
4307void tms3203x_device::ldfuf_dir(UINT32 op)
4308{
4309   if (CONDITION_UF())
4310   {
4311      UINT32 res = RMEM(DIRECT(op));
4312      int dreg = (op >> 16) & 7;
4313      LONG2FP(dreg, res);
4314   }
4315}
4316
4317void tms3203x_device::ldfuf_ind(UINT32 op)
4318{
4319   if (CONDITION_UF())
4320   {
4321      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4322      int dreg = (op >> 16) & 7;
4323      LONG2FP(dreg, res);
4324   }
4325   else
4326      INDIRECT_D(op, op >> 8);
4327}
4328
4329void tms3203x_device::ldfuf_imm(UINT32 op)
4330{
4331   if (CONDITION_UF())
4332   {
4333      int dreg = (op >> 16) & 7;
4334      SHORT2FP(dreg, op);
4335   }
4336}
4337
4338/*-----------------------------------------------------*/
4339
4340void tms3203x_device::ldfnlv_reg(UINT32 op)
4341{
4342   if (CONDITION_NLV())
4343      m_r[(op >> 16) & 7] = m_r[op & 7];
4344}
4345
4346void tms3203x_device::ldfnlv_dir(UINT32 op)
4347{
4348   if (CONDITION_NLV())
4349   {
4350      UINT32 res = RMEM(DIRECT(op));
4351      int dreg = (op >> 16) & 7;
4352      LONG2FP(dreg, res);
4353   }
4354}
4355
4356void tms3203x_device::ldfnlv_ind(UINT32 op)
4357{
4358   if (CONDITION_NLV())
4359   {
4360      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4361      int dreg = (op >> 16) & 7;
4362      LONG2FP(dreg, res);
4363   }
4364   else
4365      INDIRECT_D(op, op >> 8);
4366}
4367
4368void tms3203x_device::ldfnlv_imm(UINT32 op)
4369{
4370   if (CONDITION_NLV())
4371   {
4372      int dreg = (op >> 16) & 7;
4373      SHORT2FP(dreg, op);
4374   }
4375}
4376
4377/*-----------------------------------------------------*/
4378
4379void tms3203x_device::ldflv_reg(UINT32 op)
4380{
4381   if (CONDITION_LV())
4382      m_r[(op >> 16) & 7] = m_r[op & 7];
4383}
4384
4385void tms3203x_device::ldflv_dir(UINT32 op)
4386{
4387   if (CONDITION_LV())
4388   {
4389      UINT32 res = RMEM(DIRECT(op));
4390      int dreg = (op >> 16) & 7;
4391      LONG2FP(dreg, res);
4392   }
4393}
4394
4395void tms3203x_device::ldflv_ind(UINT32 op)
4396{
4397   if (CONDITION_LV())
4398   {
4399      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4400      int dreg = (op >> 16) & 7;
4401      LONG2FP(dreg, res);
4402   }
4403   else
4404      INDIRECT_D(op, op >> 8);
4405}
4406
4407void tms3203x_device::ldflv_imm(UINT32 op)
4408{
4409   if (CONDITION_LV())
4410   {
4411      int dreg = (op >> 16) & 7;
4412      SHORT2FP(dreg, op);
4413   }
4414}
4415
4416/*-----------------------------------------------------*/
4417
4418void tms3203x_device::ldfnluf_reg(UINT32 op)
4419{
4420   if (CONDITION_NLUF())
4421      m_r[(op >> 16) & 7] = m_r[op & 7];
4422}
4423
4424void tms3203x_device::ldfnluf_dir(UINT32 op)
4425{
4426   if (CONDITION_NLUF())
4427   {
4428      UINT32 res = RMEM(DIRECT(op));
4429      int dreg = (op >> 16) & 7;
4430      LONG2FP(dreg, res);
4431   }
4432}
4433
4434void tms3203x_device::ldfnluf_ind(UINT32 op)
4435{
4436   if (CONDITION_NLUF())
4437   {
4438      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4439      int dreg = (op >> 16) & 7;
4440      LONG2FP(dreg, res);
4441   }
4442   else
4443      INDIRECT_D(op, op >> 8);
4444}
4445
4446void tms3203x_device::ldfnluf_imm(UINT32 op)
4447{
4448   if (CONDITION_NLUF())
4449   {
4450      int dreg = (op >> 16) & 7;
4451      SHORT2FP(dreg, op);
4452   }
4453}
4454
4455/*-----------------------------------------------------*/
4456
4457void tms3203x_device::ldfluf_reg(UINT32 op)
4458{
4459   if (CONDITION_LUF())
4460      m_r[(op >> 16) & 7] = m_r[op & 7];
4461}
4462
4463void tms3203x_device::ldfluf_dir(UINT32 op)
4464{
4465   if (CONDITION_LUF())
4466   {
4467      UINT32 res = RMEM(DIRECT(op));
4468      int dreg = (op >> 16) & 7;
4469      LONG2FP(dreg, res);
4470   }
4471}
4472
4473void tms3203x_device::ldfluf_ind(UINT32 op)
4474{
4475   if (CONDITION_LUF())
4476   {
4477      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4478      int dreg = (op >> 16) & 7;
4479      LONG2FP(dreg, res);
4480   }
4481   else
4482      INDIRECT_D(op, op >> 8);
4483}
4484
4485void tms3203x_device::ldfluf_imm(UINT32 op)
4486{
4487   if (CONDITION_LUF())
4488   {
4489      int dreg = (op >> 16) & 7;
4490      SHORT2FP(dreg, op);
4491   }
4492}
4493
4494/*-----------------------------------------------------*/
4495
4496void tms3203x_device::ldfzuf_reg(UINT32 op)
4497{
4498   if (CONDITION_ZUF())
4499      m_r[(op >> 16) & 7] = m_r[op & 7];
4500}
4501
4502void tms3203x_device::ldfzuf_dir(UINT32 op)
4503{
4504   if (CONDITION_ZUF())
4505   {
4506      UINT32 res = RMEM(DIRECT(op));
4507      int dreg = (op >> 16) & 7;
4508      LONG2FP(dreg, res);
4509   }
4510}
4511
4512void tms3203x_device::ldfzuf_ind(UINT32 op)
4513{
4514   if (CONDITION_ZUF())
4515   {
4516      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4517      int dreg = (op >> 16) & 7;
4518      LONG2FP(dreg, res);
4519   }
4520   else
4521      INDIRECT_D(op, op >> 8);
4522}
4523
4524void tms3203x_device::ldfzuf_imm(UINT32 op)
4525{
4526   if (CONDITION_ZUF())
4527   {
4528      int dreg = (op >> 16) & 7;
4529      SHORT2FP(dreg, op);
4530   }
4531}
4532
4533/*-----------------------------------------------------*/
4534
4535void tms3203x_device::ldiu_reg(UINT32 op)
4536{
4537   int dreg = (op >> 16) & 31;
4538   IREG(dreg) = IREG(op & 31);
4539   if (dreg >= TMR_BK)
4540      update_special(dreg);
4541}
4542
4543void tms3203x_device::ldiu_dir(UINT32 op)
4544{
4545   int dreg = (op >> 16) & 31;
4546   IREG(dreg) = RMEM(DIRECT(op));
4547   if (dreg >= TMR_BK)
4548      update_special(dreg);
4549}
4550
4551void tms3203x_device::ldiu_ind(UINT32 op)
4552{
4553   int dreg = (op >> 16) & 31;
4554   IREG(dreg) = RMEM(INDIRECT_D(op, op >> 8));
4555   if (dreg >= TMR_BK)
4556      update_special(dreg);
4557}
4558
4559void tms3203x_device::ldiu_imm(UINT32 op)
4560{
4561   int dreg = (op >> 16) & 31;
4562   IREG(dreg) = (INT16)op;
4563   if (dreg >= TMR_BK)
4564      update_special(dreg);
4565}
4566
4567/*-----------------------------------------------------*/
4568
4569void tms3203x_device::ldilo_reg(UINT32 op)
4570{
4571   if (CONDITION_LO())
4572   {
4573      int dreg = (op >> 16) & 31;
4574      IREG(dreg) = IREG(op & 31);
4575      if (dreg >= TMR_BK)
4576         update_special(dreg);
4577   }
4578}
4579
4580void tms3203x_device::ldilo_dir(UINT32 op)
4581{
4582   UINT32 val = RMEM(DIRECT(op));
4583   if (CONDITION_LO())
4584   {
4585      int dreg = (op >> 16) & 31;
4586      IREG(dreg) = val;
4587      if (dreg >= TMR_BK)
4588         update_special(dreg);
4589   }
4590}
4591
4592void tms3203x_device::ldilo_ind(UINT32 op)
4593{
4594   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4595   if (CONDITION_LO())
4596   {
4597      int dreg = (op >> 16) & 31;
4598      IREG(dreg) = val;
4599      if (dreg >= TMR_BK)
4600         update_special(dreg);
4601   }
4602}
4603
4604void tms3203x_device::ldilo_imm(UINT32 op)
4605{
4606   if (CONDITION_LO())
4607   {
4608      int dreg = (op >> 16) & 31;
4609      IREG(dreg) = (INT16)op;
4610      if (dreg >= TMR_BK)
4611         update_special(dreg);
4612   }
4613}
4614
4615/*-----------------------------------------------------*/
4616
4617void tms3203x_device::ldils_reg(UINT32 op)
4618{
4619   if (CONDITION_LS())
4620   {
4621      int dreg = (op >> 16) & 31;
4622      IREG(dreg) = IREG(op & 31);
4623      if (dreg >= TMR_BK)
4624         update_special(dreg);
4625   }
4626}
4627
4628void tms3203x_device::ldils_dir(UINT32 op)
4629{
4630   UINT32 val = RMEM(DIRECT(op));
4631   if (CONDITION_LS())
4632   {
4633      int dreg = (op >> 16) & 31;
4634      IREG(dreg) = val;
4635      if (dreg >= TMR_BK)
4636         update_special(dreg);
4637   }
4638}
4639
4640void tms3203x_device::ldils_ind(UINT32 op)
4641{
4642   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4643   if (CONDITION_LS())
4644   {
4645      int dreg = (op >> 16) & 31;
4646      IREG(dreg) = val;
4647      if (dreg >= TMR_BK)
4648         update_special(dreg);
4649   }
4650}
4651
4652void tms3203x_device::ldils_imm(UINT32 op)
4653{
4654   if (CONDITION_LS())
4655   {
4656      int dreg = (op >> 16) & 31;
4657      IREG(dreg) = (INT16)op;
4658      if (dreg >= TMR_BK)
4659         update_special(dreg);
4660   }
4661}
4662
4663/*-----------------------------------------------------*/
4664
4665void tms3203x_device::ldihi_reg(UINT32 op)
4666{
4667   if (CONDITION_HI())
4668   {
4669      int dreg = (op >> 16) & 31;
4670      IREG(dreg) = IREG(op & 31);
4671      if (dreg >= TMR_BK)
4672         update_special(dreg);
4673   }
4674}
4675
4676void tms3203x_device::ldihi_dir(UINT32 op)
4677{
4678   UINT32 val = RMEM(DIRECT(op));
4679   if (CONDITION_HI())
4680   {
4681      int dreg = (op >> 16) & 31;
4682      IREG(dreg) = val;
4683      if (dreg >= TMR_BK)
4684         update_special(dreg);
4685   }
4686}
4687
4688void tms3203x_device::ldihi_ind(UINT32 op)
4689{
4690   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4691   if (CONDITION_HI())
4692   {
4693      int dreg = (op >> 16) & 31;
4694      IREG(dreg) = val;
4695      if (dreg >= TMR_BK)
4696         update_special(dreg);
4697   }
4698}
4699
4700void tms3203x_device::ldihi_imm(UINT32 op)
4701{
4702   if (CONDITION_HI())
4703   {
4704      int dreg = (op >> 16) & 31;
4705      IREG(dreg) = (INT16)op;
4706      if (dreg >= TMR_BK)
4707         update_special(dreg);
4708   }
4709}
4710
4711/*-----------------------------------------------------*/
4712
4713void tms3203x_device::ldihs_reg(UINT32 op)
4714{
4715   if (CONDITION_HS())
4716   {
4717      int dreg = (op >> 16) & 31;
4718      IREG(dreg) = IREG(op & 31);
4719      if (dreg >= TMR_BK)
4720         update_special(dreg);
4721   }
4722}
4723
4724void tms3203x_device::ldihs_dir(UINT32 op)
4725{
4726   UINT32 val = RMEM(DIRECT(op));
4727   if (CONDITION_HS())
4728   {
4729      int dreg = (op >> 16) & 31;
4730      IREG(dreg) = val;
4731      if (dreg >= TMR_BK)
4732         update_special(dreg);
4733   }
4734}
4735
4736void tms3203x_device::ldihs_ind(UINT32 op)
4737{
4738   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4739   if (CONDITION_HS())
4740   {
4741      int dreg = (op >> 16) & 31;
4742      IREG(dreg) = val;
4743      if (dreg >= TMR_BK)
4744         update_special(dreg);
4745   }
4746}
4747
4748void tms3203x_device::ldihs_imm(UINT32 op)
4749{
4750   if (CONDITION_HS())
4751   {
4752      int dreg = (op >> 16) & 31;
4753      IREG(dreg) = (INT16)op;
4754      if (dreg >= TMR_BK)
4755         update_special(dreg);
4756   }
4757}
4758
4759/*-----------------------------------------------------*/
4760
4761void tms3203x_device::ldieq_reg(UINT32 op)
4762{
4763   if (CONDITION_EQ())
4764   {
4765      int dreg = (op >> 16) & 31;
4766      IREG(dreg) = IREG(op & 31);
4767      if (dreg >= TMR_BK)
4768         update_special(dreg);
4769   }
4770}
4771
4772void tms3203x_device::ldieq_dir(UINT32 op)
4773{
4774   UINT32 val = RMEM(DIRECT(op));
4775   if (CONDITION_EQ())
4776   {
4777      int dreg = (op >> 16) & 31;
4778      IREG(dreg) = val;
4779      if (dreg >= TMR_BK)
4780         update_special(dreg);
4781   }
4782}
4783
4784void tms3203x_device::ldieq_ind(UINT32 op)
4785{
4786   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4787   if (CONDITION_EQ())
4788   {
4789      int dreg = (op >> 16) & 31;
4790      IREG(dreg) = val;
4791      if (dreg >= TMR_BK)
4792         update_special(dreg);
4793   }
4794}
4795
4796void tms3203x_device::ldieq_imm(UINT32 op)
4797{
4798   if (CONDITION_EQ())
4799   {
4800      int dreg = (op >> 16) & 31;
4801      IREG(dreg) = (INT16)op;
4802      if (dreg >= TMR_BK)
4803         update_special(dreg);
4804   }
4805}
4806
4807/*-----------------------------------------------------*/
4808
4809void tms3203x_device::ldine_reg(UINT32 op)
4810{
4811   if (CONDITION_NE())
4812   {
4813      int dreg = (op >> 16) & 31;
4814      IREG(dreg) = IREG(op & 31);
4815      if (dreg >= TMR_BK)
4816         update_special(dreg);
4817   }
4818}
4819
4820void tms3203x_device::ldine_dir(UINT32 op)
4821{
4822   UINT32 val = RMEM(DIRECT(op));
4823   if (CONDITION_NE())
4824   {
4825      int dreg = (op >> 16) & 31;
4826      IREG(dreg) = val;
4827      if (dreg >= TMR_BK)
4828         update_special(dreg);
4829   }
4830}
4831
4832void tms3203x_device::ldine_ind(UINT32 op)
4833{
4834   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4835   if (CONDITION_NE())
4836   {
4837      int dreg = (op >> 16) & 31;
4838      IREG(dreg) = val;
4839      if (dreg >= TMR_BK)
4840         update_special(dreg);
4841   }
4842}
4843
4844void tms3203x_device::ldine_imm(UINT32 op)
4845{
4846   if (CONDITION_NE())
4847   {
4848      int dreg = (op >> 16) & 31;
4849      IREG(dreg) = (INT16)op;
4850      if (dreg >= TMR_BK)
4851         update_special(dreg);
4852   }
4853}
4854
4855/*-----------------------------------------------------*/
4856
4857void tms3203x_device::ldilt_reg(UINT32 op)
4858{
4859   if (CONDITION_LT())
4860   {
4861      int dreg = (op >> 16) & 31;
4862      IREG(dreg) = IREG(op & 31);
4863      if (dreg >= TMR_BK)
4864         update_special(dreg);
4865   }
4866}
4867
4868void tms3203x_device::ldilt_dir(UINT32 op)
4869{
4870   UINT32 val = RMEM(DIRECT(op));
4871   if (CONDITION_LT())
4872   {
4873      int dreg = (op >> 16) & 31;
4874      IREG(dreg) = val;
4875      if (dreg >= TMR_BK)
4876         update_special(dreg);
4877   }
4878}
4879
4880void tms3203x_device::ldilt_ind(UINT32 op)
4881{
4882   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4883   if (CONDITION_LT())
4884   {
4885      int dreg = (op >> 16) & 31;
4886      IREG(dreg) = val;
4887      if (dreg >= TMR_BK)
4888         update_special(dreg);
4889   }
4890}
4891
4892void tms3203x_device::ldilt_imm(UINT32 op)
4893{
4894   if (CONDITION_LT())
4895   {
4896      int dreg = (op >> 16) & 31;
4897      IREG(dreg) = (INT16)op;
4898      if (dreg >= TMR_BK)
4899         update_special(dreg);
4900   }
4901}
4902
4903/*-----------------------------------------------------*/
4904
4905void tms3203x_device::ldile_reg(UINT32 op)
4906{
4907   if (CONDITION_LE())
4908   {
4909      int dreg = (op >> 16) & 31;
4910      IREG(dreg) = IREG(op & 31);
4911      if (dreg >= TMR_BK)
4912         update_special(dreg);
4913   }
4914}
4915
4916void tms3203x_device::ldile_dir(UINT32 op)
4917{
4918   UINT32 val = RMEM(DIRECT(op));
4919   if (CONDITION_LE())
4920   {
4921      int dreg = (op >> 16) & 31;
4922      IREG(dreg) = val;
4923      if (dreg >= TMR_BK)
4924         update_special(dreg);
4925   }
4926}
4927
4928void tms3203x_device::ldile_ind(UINT32 op)
4929{
4930   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4931   if (CONDITION_LE())
4932   {
4933      int dreg = (op >> 16) & 31;
4934      IREG(dreg) = val;
4935      if (dreg >= TMR_BK)
4936         update_special(dreg);
4937   }
4938}
4939
4940void tms3203x_device::ldile_imm(UINT32 op)
4941{
4942   if (CONDITION_LE())
4943   {
4944      int dreg = (op >> 16) & 31;
4945      IREG(dreg) = (INT16)op;
4946      if (dreg >= TMR_BK)
4947         update_special(dreg);
4948   }
4949}
4950
4951/*-----------------------------------------------------*/
4952
4953void tms3203x_device::ldigt_reg(UINT32 op)
4954{
4955   if (CONDITION_GT())
4956   {
4957      int dreg = (op >> 16) & 31;
4958      IREG(dreg) = IREG(op & 31);
4959      if (dreg >= TMR_BK)
4960         update_special(dreg);
4961   }
4962}
4963
4964void tms3203x_device::ldigt_dir(UINT32 op)
4965{
4966   UINT32 val = RMEM(DIRECT(op));
4967   if (CONDITION_GT())
4968   {
4969      int dreg = (op >> 16) & 31;
4970      IREG(dreg) = val;
4971      if (dreg >= TMR_BK)
4972         update_special(dreg);
4973   }
4974}
4975
4976void tms3203x_device::ldigt_ind(UINT32 op)
4977{
4978   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4979   if (CONDITION_GT())
4980   {
4981      int dreg = (op >> 16) & 31;
4982      IREG(dreg) = val;
4983      if (dreg >= TMR_BK)
4984         update_special(dreg);
4985   }
4986}
4987
4988void tms3203x_device::ldigt_imm(UINT32 op)
4989{
4990   if (CONDITION_GT())
4991   {
4992      int dreg = (op >> 16) & 31;
4993      IREG(dreg) = (INT16)op;
4994      if (dreg >= TMR_BK)
4995         update_special(dreg);
4996   }
4997}
4998
4999/*-----------------------------------------------------*/
5000
5001void tms3203x_device::ldige_reg(UINT32 op)
5002{
5003   if (CONDITION_GE())
5004   {
5005      int dreg = (op >> 16) & 31;
5006      IREG(dreg) = IREG(op & 31);
5007      if (dreg >= TMR_BK)
5008         update_special(dreg);
5009   }
5010}
5011
5012void tms3203x_device::ldige_dir(UINT32 op)
5013{
5014   UINT32 val = RMEM(DIRECT(op));
5015   if (CONDITION_GE())
5016   {
5017      int dreg = (op >> 16) & 31;
5018      IREG(dreg) = val;
5019      if (dreg >= TMR_BK)
5020         update_special(dreg);
5021   }
5022}
5023
5024void tms3203x_device::ldige_ind(UINT32 op)
5025{
5026   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5027   if (CONDITION_GE())
5028   {
5029      int dreg = (op >> 16) & 31;
5030      IREG(dreg) = val;
5031      if (dreg >= TMR_BK)
5032         update_special(dreg);
5033   }
5034}
5035
5036void tms3203x_device::ldige_imm(UINT32 op)
5037{
5038   if (CONDITION_GE())
5039   {
5040      int dreg = (op >> 16) & 31;
5041      IREG(dreg) = (INT16)op;
5042      if (dreg >= TMR_BK)
5043         update_special(dreg);
5044   }
5045}
5046
5047/*-----------------------------------------------------*/
5048
5049void tms3203x_device::ldinv_reg(UINT32 op)
5050{
5051   if (CONDITION_NV())
5052   {
5053      int dreg = (op >> 16) & 31;
5054      IREG(dreg) = IREG(op & 31);
5055      if (dreg >= TMR_BK)
5056         update_special(dreg);
5057   }
5058}
5059
5060void tms3203x_device::ldinv_dir(UINT32 op)
5061{
5062   UINT32 val = RMEM(DIRECT(op));
5063   if (CONDITION_NV())
5064   {
5065      int dreg = (op >> 16) & 31;
5066      IREG(dreg) = val;
5067      if (dreg >= TMR_BK)
5068         update_special(dreg);
5069   }
5070}
5071
5072void tms3203x_device::ldinv_ind(UINT32 op)
5073{
5074   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5075   if (CONDITION_NV())
5076   {
5077      int dreg = (op >> 16) & 31;
5078      IREG(dreg) = val;
5079      if (dreg >= TMR_BK)
5080         update_special(dreg);
5081   }
5082}
5083
5084void tms3203x_device::ldinv_imm(UINT32 op)
5085{
5086   if (CONDITION_NV())
5087   {
5088      int dreg = (op >> 16) & 31;
5089      IREG(dreg) = (INT16)op;
5090      if (dreg >= TMR_BK)
5091         update_special(dreg);
5092   }
5093}
5094
5095/*-----------------------------------------------------*/
5096
5097void tms3203x_device::ldiuf_reg(UINT32 op)
5098{
5099   if (CONDITION_UF())
5100   {
5101      int dreg = (op >> 16) & 31;
5102      IREG(dreg) = IREG(op & 31);
5103      if (dreg >= TMR_BK)
5104         update_special(dreg);
5105   }
5106}
5107
5108void tms3203x_device::ldiuf_dir(UINT32 op)
5109{
5110   UINT32 val = RMEM(DIRECT(op));
5111   if (CONDITION_UF())
5112   {
5113      int dreg = (op >> 16) & 31;
5114      IREG(dreg) = val;
5115      if (dreg >= TMR_BK)
5116         update_special(dreg);
5117   }
5118}
5119
5120void tms3203x_device::ldiuf_ind(UINT32 op)
5121{
5122   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5123   if (CONDITION_UF())
5124   {
5125      int dreg = (op >> 16) & 31;
5126      IREG(dreg) = val;
5127      if (dreg >= TMR_BK)
5128         update_special(dreg);
5129   }
5130}
5131
5132void tms3203x_device::ldiuf_imm(UINT32 op)
5133{
5134   if (CONDITION_UF())
5135   {
5136      int dreg = (op >> 16) & 31;
5137      IREG(dreg) = (INT16)op;
5138      if (dreg >= TMR_BK)
5139         update_special(dreg);
5140   }
5141}
5142
5143/*-----------------------------------------------------*/
5144
5145void tms3203x_device::ldinuf_reg(UINT32 op)
5146{
5147   if (CONDITION_NUF())
5148   {
5149      int dreg = (op >> 16) & 31;
5150      IREG(dreg) = IREG(op & 31);
5151      if (dreg >= TMR_BK)
5152         update_special(dreg);
5153   }
5154}
5155
5156void tms3203x_device::ldinuf_dir(UINT32 op)
5157{
5158   UINT32 val = RMEM(DIRECT(op));
5159   if (CONDITION_NUF())
5160   {
5161      int dreg = (op >> 16) & 31;
5162      IREG(dreg) = val;
5163      if (dreg >= TMR_BK)
5164         update_special(dreg);
5165   }
5166}
5167
5168void tms3203x_device::ldinuf_ind(UINT32 op)
5169{
5170   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5171   if (CONDITION_NUF())
5172   {
5173      int dreg = (op >> 16) & 31;
5174      IREG(dreg) = val;
5175      if (dreg >= TMR_BK)
5176         update_special(dreg);
5177   }
5178}
5179
5180void tms3203x_device::ldinuf_imm(UINT32 op)
5181{
5182   if (CONDITION_NUF())
5183   {
5184      int dreg = (op >> 16) & 31;
5185      IREG(dreg) = (INT16)op;
5186      if (dreg >= TMR_BK)
5187         update_special(dreg);
5188   }
5189}
5190
5191/*-----------------------------------------------------*/
5192
5193void tms3203x_device::ldiv_reg(UINT32 op)
5194{
5195   if (CONDITION_V())
5196   {
5197      int dreg = (op >> 16) & 31;
5198      IREG(dreg) = IREG(op & 31);
5199      if (dreg >= TMR_BK)
5200         update_special(dreg);
5201   }
5202}
5203
5204void tms3203x_device::ldiv_dir(UINT32 op)
5205{
5206   UINT32 val = RMEM(DIRECT(op));
5207   if (CONDITION_V())
5208   {
5209      int dreg = (op >> 16) & 31;
5210      IREG(dreg) = val;
5211      if (dreg >= TMR_BK)
5212         update_special(dreg);
5213   }
5214}
5215
5216void tms3203x_device::ldiv_ind(UINT32 op)
5217{
5218   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5219   if (CONDITION_V())
5220   {
5221      int dreg = (op >> 16) & 31;
5222      IREG(dreg) = val;
5223      if (dreg >= TMR_BK)
5224         update_special(dreg);
5225   }
5226}
5227
5228void tms3203x_device::ldiv_imm(UINT32 op)
5229{
5230   if (CONDITION_V())
5231   {
5232      int dreg = (op >> 16) & 31;
5233      IREG(dreg) = (INT16)op;
5234      if (dreg >= TMR_BK)
5235         update_special(dreg);
5236   }
5237}
5238
5239/*-----------------------------------------------------*/
5240
5241void tms3203x_device::ldinlv_reg(UINT32 op)
5242{
5243   if (CONDITION_NLV())
5244   {
5245      int dreg = (op >> 16) & 31;
5246      IREG(dreg) = IREG(op & 31);
5247      if (dreg >= TMR_BK)
5248         update_special(dreg);
5249   }
5250}
5251
5252void tms3203x_device::ldinlv_dir(UINT32 op)
5253{
5254   UINT32 val = RMEM(DIRECT(op));
5255   if (CONDITION_NLV())
5256   {
5257      int dreg = (op >> 16) & 31;
5258      IREG(dreg) = val;
5259      if (dreg >= TMR_BK)
5260         update_special(dreg);
5261   }
5262}
5263
5264void tms3203x_device::ldinlv_ind(UINT32 op)
5265{
5266   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5267   if (CONDITION_NLV())
5268   {
5269      int dreg = (op >> 16) & 31;
5270      IREG(dreg) = val;
5271      if (dreg >= TMR_BK)
5272         update_special(dreg);
5273   }
5274}
5275
5276void tms3203x_device::ldinlv_imm(UINT32 op)
5277{
5278   if (CONDITION_NLV())
5279   {
5280      int dreg = (op >> 16) & 31;
5281      IREG(dreg) = (INT16)op;
5282      if (dreg >= TMR_BK)
5283         update_special(dreg);
5284   }
5285}
5286
5287/*-----------------------------------------------------*/
5288
5289void tms3203x_device::ldilv_reg(UINT32 op)
5290{
5291   if (CONDITION_LV())
5292   {
5293      int dreg = (op >> 16) & 31;
5294      IREG(dreg) = IREG(op & 31);
5295      if (dreg >= TMR_BK)
5296         update_special(dreg);
5297   }
5298}
5299
5300void tms3203x_device::ldilv_dir(UINT32 op)
5301{
5302   UINT32 val = RMEM(DIRECT(op));
5303   if (CONDITION_LV())
5304   {
5305      int dreg = (op >> 16) & 31;
5306      IREG(dreg) = val;
5307      if (dreg >= TMR_BK)
5308         update_special(dreg);
5309   }
5310}
5311
5312void tms3203x_device::ldilv_ind(UINT32 op)
5313{
5314   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5315   if (CONDITION_LV())
5316   {
5317      int dreg = (op >> 16) & 31;
5318      IREG(dreg) = val;
5319      if (dreg >= TMR_BK)
5320         update_special(dreg);
5321   }
5322}
5323
5324void tms3203x_device::ldilv_imm(UINT32 op)
5325{
5326   if (CONDITION_LV())
5327   {
5328      int dreg = (op >> 16) & 31;
5329      IREG(dreg) = (INT16)op;
5330      if (dreg >= TMR_BK)
5331         update_special(dreg);
5332   }
5333}
5334
5335/*-----------------------------------------------------*/
5336
5337void tms3203x_device::ldinluf_reg(UINT32 op)
5338{
5339   if (CONDITION_NLUF())
5340   {
5341      int dreg = (op >> 16) & 31;
5342      IREG(dreg) = IREG(op & 31);
5343      if (dreg >= TMR_BK)
5344         update_special(dreg);
5345   }
5346}
5347
5348void tms3203x_device::ldinluf_dir(UINT32 op)
5349{
5350   UINT32 val = RMEM(DIRECT(op));
5351   if (CONDITION_NLUF())
5352   {
5353      int dreg = (op >> 16) & 31;
5354      IREG(dreg) = val;
5355      if (dreg >= TMR_BK)
5356         update_special(dreg);
5357   }
5358}
5359
5360void tms3203x_device::ldinluf_ind(UINT32 op)
5361{
5362   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5363   if (CONDITION_NLUF())
5364   {
5365      int dreg = (op >> 16) & 31;
5366      IREG(dreg) = val;
5367      if (dreg >= TMR_BK)
5368         update_special(dreg);
5369   }
5370}
5371
5372void tms3203x_device::ldinluf_imm(UINT32 op)
5373{
5374   if (CONDITION_NLUF())
5375   {
5376      int dreg = (op >> 16) & 31;
5377      IREG(dreg) = (INT16)op;
5378      if (dreg >= TMR_BK)
5379         update_special(dreg);
5380   }
5381}
5382
5383/*-----------------------------------------------------*/
5384
5385void tms3203x_device::ldiluf_reg(UINT32 op)
5386{
5387   if (CONDITION_LUF())
5388   {
5389      int dreg = (op >> 16) & 31;
5390      IREG(dreg) = IREG(op & 31);
5391      if (dreg >= TMR_BK)
5392         update_special(dreg);
5393   }
5394}
5395
5396void tms3203x_device::ldiluf_dir(UINT32 op)
5397{
5398   UINT32 val = RMEM(DIRECT(op));
5399   if (CONDITION_LUF())
5400   {
5401      int dreg = (op >> 16) & 31;
5402      IREG(dreg) = val;
5403      if (dreg >= TMR_BK)
5404         update_special(dreg);
5405   }
5406}
5407
5408void tms3203x_device::ldiluf_ind(UINT32 op)
5409{
5410   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5411   if (CONDITION_LUF())
5412   {
5413      int dreg = (op >> 16) & 31;
5414      IREG(dreg) = val;
5415      if (dreg >= TMR_BK)
5416         update_special(dreg);
5417   }
5418}
5419
5420void tms3203x_device::ldiluf_imm(UINT32 op)
5421{
5422   if (CONDITION_LUF())
5423   {
5424      int dreg = (op >> 16) & 31;
5425      IREG(dreg) = (INT16)op;
5426      if (dreg >= TMR_BK)
5427         update_special(dreg);
5428   }
5429}
5430
5431/*-----------------------------------------------------*/
5432
5433void tms3203x_device::ldizuf_reg(UINT32 op)
5434{
5435   if (CONDITION_ZUF())
5436   {
5437      int dreg = (op >> 16) & 31;
5438      IREG(dreg) = IREG(op & 31);
5439      if (dreg >= TMR_BK)
5440         update_special(dreg);
5441   }
5442}
5443
5444void tms3203x_device::ldizuf_dir(UINT32 op)
5445{
5446   UINT32 val = RMEM(DIRECT(op));
5447   if (CONDITION_ZUF())
5448   {
5449      int dreg = (op >> 16) & 31;
5450      IREG(dreg) = val;
5451      if (dreg >= TMR_BK)
5452         update_special(dreg);
5453   }
5454}
5455
5456void tms3203x_device::ldizuf_ind(UINT32 op)
5457{
5458   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5459   if (CONDITION_ZUF())
5460   {
5461      int dreg = (op >> 16) & 31;
5462      IREG(dreg) = val;
5463      if (dreg >= TMR_BK)
5464         update_special(dreg);
5465   }
5466}
5467
5468void tms3203x_device::ldizuf_imm(UINT32 op)
5469{
5470   if (CONDITION_ZUF())
5471   {
5472      int dreg = (op >> 16) & 31;
5473      IREG(dreg) = (INT16)op;
5474      if (dreg >= TMR_BK)
5475         update_special(dreg);
5476   }
5477}
5478
5479/*-----------------------------------------------------*/
5480
5481inline void tms3203x_device::execute_delayed(UINT32 newpc)
5482{
5483   m_delayed = true;
5484
5485   if ((machine().debug_flags & DEBUG_FLAG_ENABLED) == 0)
5486   {
5487      execute_one();
5488      execute_one();
5489      execute_one();
5490   }
5491   else
5492   {
5493      debugger_instruction_hook(this, m_pc);
5494      execute_one();
5495      debugger_instruction_hook(this, m_pc);
5496      execute_one();
5497      debugger_instruction_hook(this, m_pc);
5498      execute_one();
5499   }
5500
5501   if (newpc != ~0)
5502      m_pc = newpc;
5503
5504   m_delayed = false;
5505   if (m_irq_pending)
5506   {
5507      m_irq_pending = false;
5508      check_irqs();
5509   }
5510}
5511
5512/*-----------------------------------------------------*/
5513
5514void tms3203x_device::br_imm(UINT32 op)
5515{
5516   m_pc = op & 0xffffff;
5517   m_icount -= 3*2;
5518}
5519
5520void tms3203x_device::brd_imm(UINT32 op)
5521{
5522   execute_delayed(op & 0xffffff);
5523}
5524
5525/*-----------------------------------------------------*/
5526
5527void tms3203x_device::call_imm(UINT32 op)
5528{
5529   WMEM(++IREG(TMR_SP), m_pc);
5530   m_pc = op & 0xffffff;
5531   m_icount -= 3*2;
5532}
5533
5534/*-----------------------------------------------------*/
5535
5536void tms3203x_device::rptb_imm(UINT32 op)
5537{
5538   IREG(TMR_RS) = m_pc;
5539   IREG(TMR_RE) = op & 0xffffff;
5540   IREG(TMR_ST) |= RMFLAG;
5541   m_icount -= 3*2;
5542}
5543
5544/*-----------------------------------------------------*/
5545
5546void tms3203x_device::swi(UINT32 op) { unimplemented(op); }
5547
5548/*-----------------------------------------------------*/
5549
5550void tms3203x_device::brc_reg(UINT32 op)
5551{
5552   if (condition(op >> 16))
5553   {
5554      m_pc = IREG(op & 31);
5555      m_icount -= 3*2;
5556   }
5557}
5558
5559void tms3203x_device::brcd_reg(UINT32 op)
5560{
5561   if (condition(op >> 16))
5562      execute_delayed(IREG(op & 31));
5563   else
5564      execute_delayed(~0);
5565}
5566
5567void tms3203x_device::brc_imm(UINT32 op)
5568{
5569   if (condition(op >> 16))
5570   {
5571      m_pc += (INT16)op;
5572      m_icount -= 3*2;
5573   }
5574}
5575
5576void tms3203x_device::brcd_imm(UINT32 op)
5577{
5578   if (condition(op >> 16))
5579      execute_delayed(m_pc + 2 + (INT16)op);
5580   else
5581      execute_delayed(~0);
5582}
5583
5584/*-----------------------------------------------------*/
5585
5586void tms3203x_device::dbc_reg(UINT32 op)
5587{
5588   int reg = TMR_AR0 + ((op >> 22) & 7);
5589   int res = (IREG(reg) - 1) & 0xffffff;
5590   IREG(reg) = res | (IREG(reg) & 0xff000000);
5591   if (condition(op >> 16) && !(res & 0x800000))
5592   {
5593      m_pc = IREG(op & 31);
5594      m_icount -= 3*2;
5595   }
5596}
5597
5598void tms3203x_device::dbcd_reg(UINT32 op)
5599{
5600   int reg = TMR_AR0 + ((op >> 22) & 7);
5601   int res = (IREG(reg) - 1) & 0xffffff;
5602   IREG(reg) = res | (IREG(reg) & 0xff000000);
5603   if (condition(op >> 16) && !(res & 0x800000))
5604      execute_delayed(IREG(op & 31));
5605   else
5606      execute_delayed(~0);
5607}
5608
5609void tms3203x_device::dbc_imm(UINT32 op)
5610{
5611   int reg = TMR_AR0 + ((op >> 22) & 7);
5612   int res = (IREG(reg) - 1) & 0xffffff;
5613   IREG(reg) = res | (IREG(reg) & 0xff000000);
5614   if (condition(op >> 16) && !(res & 0x800000))
5615   {
5616      m_pc += (INT16)op;
5617      m_icount -= 3*2;
5618   }
5619}
5620
5621void tms3203x_device::dbcd_imm(UINT32 op)
5622{
5623   int reg = TMR_AR0 + ((op >> 22) & 7);
5624   int res = (IREG(reg) - 1) & 0xffffff;
5625   IREG(reg) = res | (IREG(reg) & 0xff000000);
5626   if (condition(op >> 16) && !(res & 0x800000))
5627      execute_delayed(m_pc + 2 + (INT16)op);
5628   else
5629      execute_delayed(~0);
5630}
5631
5632/*-----------------------------------------------------*/
5633
5634void tms3203x_device::callc_reg(UINT32 op)
5635{
5636   if (condition(op >> 16))
5637   {
5638      WMEM(++IREG(TMR_SP), m_pc);
5639      m_pc = IREG(op & 31);
5640      m_icount -= 3*2;
5641   }
5642}
5643
5644void tms3203x_device::callc_imm(UINT32 op)
5645{
5646   if (condition(op >> 16))
5647   {
5648      WMEM(++IREG(TMR_SP), m_pc);
5649      m_pc += (INT16)op;
5650      m_icount -= 3*2;
5651   }
5652}
5653
5654/*-----------------------------------------------------*/
5655
5656void tms3203x_device::trap(int trapnum)
5657{
5658   WMEM(++IREG(TMR_SP), m_pc);
5659   IREG(TMR_ST) &= ~GIEFLAG;
5660   if (m_chip_type == CHIP_TYPE_TMS32032)
5661      m_pc = RMEM(((IREG(TMR_IF) >> 16) << 8) + trapnum);
5662   else
5663      m_pc = RMEM(trapnum);
5664   m_icount -= 4*2;
5665}
5666
5667void tms3203x_device::trapc(UINT32 op)
5668{
5669   if (condition(op >> 16))
5670      trap(op & 0x3f);
5671}
5672
5673/*-----------------------------------------------------*/
5674
5675void tms3203x_device::retic_reg(UINT32 op)
5676{
5677   if (condition(op >> 16))
5678   {
5679      m_pc = RMEM(IREG(TMR_SP)--);
5680      IREG(TMR_ST) |= GIEFLAG;
5681      m_icount -= 3*2;
5682      check_irqs();
5683   }
5684}
5685
5686void tms3203x_device::retsc_reg(UINT32 op)
5687{
5688   if (condition(op >> 16))
5689   {
5690      m_pc = RMEM(IREG(TMR_SP)--);
5691      m_icount -= 3*2;
5692   }
5693}
5694
5695/*-----------------------------------------------------*/
5696
5697void tms3203x_device::mpyaddf_0(UINT32 op)
5698{
5699   // src3 * src4, src1 + src2
5700   DECLARE_DEF;
5701   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5702   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5703   LONG2FP(TMR_TEMP1, src3);
5704   LONG2FP(TMR_TEMP2, src4);
5705   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5706   addf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5707   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5708   UPDATE_DEF();
5709}
5710
5711void tms3203x_device::mpyaddf_1(UINT32 op)
5712{
5713   // src3 * src1, src4 + src2
5714   DECLARE_DEF;
5715   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5716   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5717   LONG2FP(TMR_TEMP1, src3);
5718   LONG2FP(TMR_TEMP2, src4);
5719   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5720   addf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP2], m_r[(op >> 16) & 7]);
5721   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5722   UPDATE_DEF();
5723}
5724
5725void tms3203x_device::mpyaddf_2(UINT32 op)
5726{
5727   // src1 * src2, src3 + src4
5728   DECLARE_DEF;
5729   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5730   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5731   LONG2FP(TMR_TEMP1, src3);
5732   LONG2FP(TMR_TEMP2, src4);
5733   mpyf(m_r[TMR_TEMP3], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5734   addf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5735   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5736   UPDATE_DEF();
5737}
5738
5739void tms3203x_device::mpyaddf_3(UINT32 op)
5740{
5741   // src3 * src1, src2 + src4
5742   DECLARE_DEF;
5743   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5744   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5745   LONG2FP(TMR_TEMP1, src3);
5746   LONG2FP(TMR_TEMP2, src4);
5747   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5748   addf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 16) & 7], m_r[TMR_TEMP2]);
5749   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5750   UPDATE_DEF();
5751}
5752
5753/*-----------------------------------------------------*/
5754
5755void tms3203x_device::mpysubf_0(UINT32 op)
5756{
5757   // src3 * src4, src1 - src2
5758   DECLARE_DEF;
5759   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5760   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5761   LONG2FP(TMR_TEMP1, src3);
5762   LONG2FP(TMR_TEMP2, src4);
5763   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5764   subf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5765   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5766   UPDATE_DEF();
5767}
5768
5769void tms3203x_device::mpysubf_1(UINT32 op)
5770{
5771   // src3 * src1, src4 - src2
5772   DECLARE_DEF;
5773   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5774   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5775   LONG2FP(TMR_TEMP1, src3);
5776   LONG2FP(TMR_TEMP2, src4);
5777   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5778   subf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP2], m_r[(op >> 16) & 7]);
5779   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5780   UPDATE_DEF();
5781}
5782
5783void tms3203x_device::mpysubf_2(UINT32 op)
5784{
5785   // src1 * src2, src3 - src4
5786   DECLARE_DEF;
5787   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5788   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5789   LONG2FP(TMR_TEMP1, src3);
5790   LONG2FP(TMR_TEMP2, src4);
5791   mpyf(m_r[TMR_TEMP3], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5792   subf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5793   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5794   UPDATE_DEF();
5795}
5796
5797void tms3203x_device::mpysubf_3(UINT32 op)
5798{
5799   // src3 * src1, src2 - src4
5800   DECLARE_DEF;
5801   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5802   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5803   LONG2FP(TMR_TEMP1, src3);
5804   LONG2FP(TMR_TEMP2, src4);
5805   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5806   subf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 16) & 7], m_r[TMR_TEMP2]);
5807   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5808   UPDATE_DEF();
5809}
5810
5811/*-----------------------------------------------------*/
5812
5813void tms3203x_device::mpyaddi_0(UINT32 op)
5814{
5815   // src3 * src4, src1 + src2
5816   DECLARE_DEF;
5817   UINT32 src1 = IREG((op >> 19) & 7);
5818   UINT32 src2 = IREG((op >> 16) & 7);
5819   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5820   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5821   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src4 << 8) >> 8);
5822   UINT32 ares = src1 + src2;
5823
5824   CLR_NZVUF();
5825   if (OVM())
5826   {
5827      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5828         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5829      if (OVERFLOW_ADD(src1,src2,ares))
5830         ares = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;
5831   }
5832   IREG((op >> 23) & 1) = mres;
5833   IREG(((op >> 22) & 1) | 2) = ares;
5834   UPDATE_DEF();
5835}
5836
5837void tms3203x_device::mpyaddi_1(UINT32 op)
5838{
5839   // src3 * src1, src4 + src2
5840   DECLARE_DEF;
5841   UINT32 src1 = IREG((op >> 19) & 7);
5842   UINT32 src2 = IREG((op >> 16) & 7);
5843   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5844   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5845   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5846   UINT32 ares = src4 + src2;
5847
5848   CLR_NZVUF();
5849   if (OVM())
5850   {
5851      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5852         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5853      if (OVERFLOW_ADD(src4,src2,ares))
5854         ares = ((INT32)src4 < 0) ? 0x80000000 : 0x7fffffff;
5855   }
5856   IREG((op >> 23) & 1) = mres;
5857   IREG(((op >> 22) & 1) | 2) = ares;
5858   UPDATE_DEF();
5859}
5860
5861void tms3203x_device::mpyaddi_2(UINT32 op)
5862{
5863   // src1 * src2, src3 + src4
5864   DECLARE_DEF;
5865   UINT32 src1 = IREG((op >> 19) & 7);
5866   UINT32 src2 = IREG((op >> 16) & 7);
5867   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5868   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5869   INT64 mres = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);
5870   UINT32 ares = src3 + src4;
5871
5872   CLR_NZVUF();
5873   if (OVM())
5874   {
5875      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5876         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5877      if (OVERFLOW_ADD(src3,src4,ares))
5878         ares = ((INT32)src3 < 0) ? 0x80000000 : 0x7fffffff;
5879   }
5880   IREG((op >> 23) & 1) = mres;
5881   IREG(((op >> 22) & 1) | 2) = ares;
5882   UPDATE_DEF();
5883}
5884
5885void tms3203x_device::mpyaddi_3(UINT32 op)
5886{
5887   // src3 * src1, src2 + src4
5888   DECLARE_DEF;
5889   UINT32 src1 = IREG((op >> 19) & 7);
5890   UINT32 src2 = IREG((op >> 16) & 7);
5891   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5892   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5893   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5894   UINT32 ares = src2 + src4;
5895
5896   CLR_NZVUF();
5897   if (OVM())
5898   {
5899      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5900         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5901      if (OVERFLOW_ADD(src2,src4,ares))
5902         ares = ((INT32)src2 < 0) ? 0x80000000 : 0x7fffffff;
5903   }
5904   IREG((op >> 23) & 1) = mres;
5905   IREG(((op >> 22) & 1) | 2) = ares;
5906   UPDATE_DEF();
5907}
5908
5909/*-----------------------------------------------------*/
5910
5911void tms3203x_device::mpysubi_0(UINT32 op)
5912{
5913   // src3 * src4, src1 - src2
5914   DECLARE_DEF;
5915   UINT32 src1 = IREG((op >> 19) & 7);
5916   UINT32 src2 = IREG((op >> 16) & 7);
5917   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5918   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5919   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src4 << 8) >> 8);
5920   UINT32 ares = src1 - src2;
5921
5922   CLR_NZVUF();
5923   if (OVM())
5924   {
5925      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5926         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5927      if (OVERFLOW_SUB(src1,src2,ares))
5928         ares = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;
5929   }
5930   IREG((op >> 23) & 1) = mres;
5931   IREG(((op >> 22) & 1) | 2) = ares;
5932   UPDATE_DEF();
5933}
5934
5935void tms3203x_device::mpysubi_1(UINT32 op)
5936{
5937   // src3 * src1, src4 - src2
5938   DECLARE_DEF;
5939   UINT32 src1 = IREG((op >> 19) & 7);
5940   UINT32 src2 = IREG((op >> 16) & 7);
5941   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5942   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5943   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5944   UINT32 ares = src4 - src2;
5945
5946   CLR_NZVUF();
5947   if (OVM())
5948   {
5949      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5950         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5951      if (OVERFLOW_SUB(src4,src2,ares))
5952         ares = ((INT32)src4 < 0) ? 0x80000000 : 0x7fffffff;
5953   }
5954   IREG((op >> 23) & 1) = mres;
5955   IREG(((op >> 22) & 1) | 2) = ares;
5956   UPDATE_DEF();
5957}
5958
5959void tms3203x_device::mpysubi_2(UINT32 op)
5960{
5961   // src1 * src2, src3 - src4
5962   DECLARE_DEF;
5963   UINT32 src1 = IREG((op >> 19) & 7);
5964   UINT32 src2 = IREG((op >> 16) & 7);
5965   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5966   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5967   INT64 mres = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);
5968   UINT32 ares = src3 - src4;
5969
5970   CLR_NZVUF();
5971   if (OVM())
5972   {
5973      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5974         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5975      if (OVERFLOW_SUB(src3,src4,ares))
5976         ares = ((INT32)src3 < 0) ? 0x80000000 : 0x7fffffff;
5977   }
5978   IREG((op >> 23) & 1) = mres;
5979   IREG(((op >> 22) & 1) | 2) = ares;
5980   UPDATE_DEF();
5981}
5982
5983void tms3203x_device::mpysubi_3(UINT32 op)
5984{
5985   // src3 * src1, src2 - src4
5986   DECLARE_DEF;
5987   UINT32 src1 = IREG((op >> 19) & 7);
5988   UINT32 src2 = IREG((op >> 16) & 7);
5989   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5990   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5991   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5992   UINT32 ares = src2 - src4;
5993
5994   CLR_NZVUF();
5995   if (OVM())
5996   {
5997      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5998         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5999      if (OVERFLOW_SUB(src2,src4,ares))
6000         ares = ((INT32)src2 < 0) ? 0x80000000 : 0x7fffffff;
6001   }
6002   IREG((op >> 23) & 1) = mres;
6003   IREG(((op >> 22) & 1) | 2) = ares;
6004   UPDATE_DEF();
6005}
6006
6007/*-----------------------------------------------------*/
6008
6009void tms3203x_device::stfstf(UINT32 op)
6010{
6011   DECLARE_DEF;
6012   WMEM(INDIRECT_1_DEF(op, op >> 8), FP2LONG((op >> 16) & 7));
6013   WMEM(INDIRECT_1(op, op), FP2LONG((op >> 22) & 7));
6014   UPDATE_DEF();
6015}
6016
6017void tms3203x_device::stisti(UINT32 op)
6018{
6019   DECLARE_DEF;
6020   WMEM(INDIRECT_1_DEF(op, op >> 8), IREG((op >> 16) & 7));
6021   WMEM(INDIRECT_1(op, op), IREG((op >> 22) & 7));
6022   UPDATE_DEF();
6023}
6024
6025/*-----------------------------------------------------*/
6026
6027void tms3203x_device::ldfldf(UINT32 op)
6028{
6029   DECLARE_DEF;
6030   UINT32 res;
6031   int dreg;
6032
6033   res = RMEM(INDIRECT_1_DEF(op, op >> 8));
6034   dreg = (op >> 19) & 7;
6035   LONG2FP(dreg, res);
6036   res = RMEM(INDIRECT_1(op, op));
6037   dreg = (op >> 22) & 7;
6038   LONG2FP(dreg, res);
6039   UPDATE_DEF();
6040}
6041
6042void tms3203x_device::ldildi(UINT32 op)
6043{
6044   DECLARE_DEF;
6045   IREG((op >> 19) & 7) = RMEM(INDIRECT_1_DEF(op, op >> 8));
6046   IREG((op >> 22) & 7) = RMEM(INDIRECT_1(op, op));
6047   UPDATE_DEF();
6048}
6049
6050/*-----------------------------------------------------*/
6051
6052//  src2 = ind(op)
6053//  dst2 = ind(op >> 8)
6054//  sreg3 = ((op >> 16) & 7)
6055//  sreg1 = ((op >> 19) & 7)
6056//  dreg1 = ((op >> 22) & 7)
6057
6058void tms3203x_device::absfstf(UINT32 op)
6059{
6060   DECLARE_DEF;
6061   UINT32 src3 = FP2LONG((op >> 16) & 7);
6062   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6063   {
6064      int dreg = (op >> 22) & 7;
6065      LONG2FP(TMR_TEMP1, src2);
6066      ABSF(dreg, TMR_TEMP1);
6067   }
6068   WMEM(INDIRECT_1(op, op >> 8), src3);
6069   UPDATE_DEF();
6070}
6071
6072void tms3203x_device::absisti(UINT32 op)
6073{
6074   DECLARE_DEF;
6075   UINT32 src3 = IREG((op >> 16) & 7);
6076   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6077   {
6078      int dreg = (op >> 22) & 7;
6079      ABSI(dreg, src2);
6080   }
6081   WMEM(INDIRECT_1(op, op >> 8), src3);
6082   UPDATE_DEF();
6083}
6084
6085void tms3203x_device::addf3stf(UINT32 op)
6086{
6087   DECLARE_DEF;
6088   UINT32 src3 = FP2LONG((op >> 16) & 7);
6089   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6090   {
6091      LONG2FP(TMR_TEMP1, src2);
6092      addf(m_r[(op >> 22) & 7], m_r[(op >> 19) & 7], m_r[TMR_TEMP1]);
6093   }
6094   WMEM(INDIRECT_1(op, op >> 8), src3);
6095   UPDATE_DEF();
6096}
6097
6098void tms3203x_device::addi3sti(UINT32 op)
6099{
6100   DECLARE_DEF;
6101   UINT32 src3 = IREG((op >> 16) & 7);
6102   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6103   {
6104      int dreg = (op >> 22) & 7;
6105      UINT32 src1 = IREG((op >> 19) & 7);
6106      ADDI(dreg, src1, src2);
6107   }
6108   WMEM(INDIRECT_1(op, op >> 8), src3);
6109   UPDATE_DEF();
6110}
6111
6112void tms3203x_device::and3sti(UINT32 op)
6113{
6114   DECLARE_DEF;
6115   UINT32 src3 = IREG((op >> 16) & 7);
6116   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6117   {
6118      int dreg = (op >> 22) & 7;
6119      UINT32 src1 = IREG((op >> 19) & 7);
6120      AND(dreg, src1, src2);
6121   }
6122   WMEM(INDIRECT_1(op, op >> 8), src3);
6123   UPDATE_DEF();
6124}
6125
6126void tms3203x_device::ash3sti(UINT32 op)
6127{
6128   DECLARE_DEF;
6129   UINT32 src3 = IREG((op >> 16) & 7);
6130   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6131   {
6132      int dreg = (op >> 22) & 7;
6133      UINT32 count = IREG((op >> 19) & 7);
6134      ASH(dreg, src2, count);
6135   }
6136   WMEM(INDIRECT_1(op, op >> 8), src3);
6137   UPDATE_DEF();
6138}
6139
6140void tms3203x_device::fixsti(UINT32 op)
6141{
6142   DECLARE_DEF;
6143   UINT32 src3 = IREG((op >> 16) & 7);
6144   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6145   {
6146      int dreg = (op >> 22) & 7;
6147      LONG2FP(dreg, src2);
6148      float2int(m_r[dreg], 1);
6149   }
6150   WMEM(INDIRECT_1(op, op >> 8), src3);
6151   UPDATE_DEF();
6152}
6153
6154void tms3203x_device::floatstf(UINT32 op)
6155{
6156   DECLARE_DEF;
6157   UINT32 src3 = FP2LONG((op >> 16) & 7);
6158   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6159   {
6160      int dreg = (op >> 22) & 7;
6161      IREG(dreg) = src2;
6162      int2float(m_r[dreg]);
6163   }
6164   WMEM(INDIRECT_1(op, op >> 8), src3);
6165   UPDATE_DEF();
6166}
6167
6168void tms3203x_device::ldfstf(UINT32 op)
6169{
6170   DECLARE_DEF;
6171   UINT32 src3 = FP2LONG((op >> 16) & 7);
6172   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6173   {
6174      int dreg = (op >> 22) & 7;
6175      LONG2FP(dreg, src2);
6176   }
6177   WMEM(INDIRECT_1(op, op >> 8), src3);
6178   UPDATE_DEF();
6179}
6180
6181void tms3203x_device::ldisti(UINT32 op)
6182{
6183   DECLARE_DEF;
6184   UINT32 src3 = IREG((op >> 16) & 7);
6185   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6186   IREG((op >> 22) & 7) = src2;
6187   WMEM(INDIRECT_1(op, op >> 8), src3);
6188   UPDATE_DEF();
6189}
6190
6191void tms3203x_device::lsh3sti(UINT32 op)
6192{
6193   DECLARE_DEF;
6194   UINT32 src3 = IREG((op >> 16) & 7);
6195   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6196   {
6197      int dreg = (op >> 22) & 7;
6198      UINT32 count = IREG((op >> 19) & 7);
6199      LSH(dreg, src2, count);
6200   }
6201   WMEM(INDIRECT_1(op, op >> 8), src3);
6202   UPDATE_DEF();
6203}
6204
6205void tms3203x_device::mpyf3stf(UINT32 op)
6206{
6207   DECLARE_DEF;
6208   UINT32 src3 = FP2LONG((op >> 16) & 7);
6209   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6210   {
6211      LONG2FP(TMR_TEMP1, src2);
6212      mpyf(m_r[(op >> 22) & 7], m_r[(op >> 19) & 7], m_r[TMR_TEMP1]);
6213   }
6214   WMEM(INDIRECT_1(op, op >> 8), src3);
6215   UPDATE_DEF();
6216}
6217
6218void tms3203x_device::mpyi3sti(UINT32 op)
6219{
6220   DECLARE_DEF;
6221   UINT32 src3 = IREG((op >> 16) & 7);
6222   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6223   {
6224      int dreg = (op >> 22) & 7;
6225      UINT32 src1 = IREG((op >> 19) & 7);
6226      MPYI(dreg, src1, src2);
6227   }
6228   WMEM(INDIRECT_1(op, op >> 8), src3);
6229   UPDATE_DEF();
6230}
6231
6232void tms3203x_device::negfstf(UINT32 op)
6233{
6234   DECLARE_DEF;
6235   UINT32 src3 = FP2LONG((op >> 16) & 7);
6236   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6237   {
6238      LONG2FP(TMR_TEMP1, src2);
6239      negf(m_r[(op >> 22) & 7], m_r[TMR_TEMP1]);
6240   }
6241   WMEM(INDIRECT_1(op, op >> 8), src3);
6242   UPDATE_DEF();
6243}
6244
6245void tms3203x_device::negisti(UINT32 op)
6246{
6247   DECLARE_DEF;
6248   UINT32 src3 = IREG((op >> 16) & 7);
6249   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6250   {
6251      int dreg = (op >> 22) & 7;
6252      NEGI(dreg, src2);
6253   }
6254   WMEM(INDIRECT_1(op, op >> 8), src3);
6255   UPDATE_DEF();
6256}
6257
6258void tms3203x_device::notsti(UINT32 op)
6259{
6260   DECLARE_DEF;
6261   UINT32 src3 = IREG((op >> 16) & 7);
6262   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6263   {
6264      int dreg = (op >> 22) & 7;
6265      NOT(dreg, src2);
6266   }
6267   WMEM(INDIRECT_1(op, op >> 8), src3);
6268   UPDATE_DEF();
6269}
6270
6271void tms3203x_device::or3sti(UINT32 op)
6272{
6273   DECLARE_DEF;
6274   UINT32 src3 = IREG((op >> 16) & 7);
6275   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6276   {
6277      int dreg = (op >> 22) & 7;
6278      UINT32 src1 = IREG((op >> 19) & 7);
6279      OR(dreg, src1, src2);
6280   }
6281   WMEM(INDIRECT_1(op, op >> 8), src3);
6282   UPDATE_DEF();
6283}
6284
6285void tms3203x_device::subf3stf(UINT32 op)
6286{
6287   DECLARE_DEF;
6288   UINT32 src3 = FP2LONG((op >> 16) & 7);
6289   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6290   {
6291      LONG2FP(TMR_TEMP1, src2);
6292      subf(m_r[(op >> 22) & 7], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
6293   }
6294   WMEM(INDIRECT_1(op, op >> 8), src3);
6295   UPDATE_DEF();
6296}
6297
6298void tms3203x_device::subi3sti(UINT32 op)
6299{
6300   DECLARE_DEF;
6301   UINT32 src3 = IREG((op >> 16) & 7);
6302   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6303   {
6304      int dreg = (op >> 22) & 7;
6305      UINT32 src1 = IREG((op >> 19) & 7);
6306      SUBI(dreg, src2, src1);
6307   }
6308   WMEM(INDIRECT_1(op, op >> 8), src3);
6309   UPDATE_DEF();
6310}
6311
6312void tms3203x_device::xor3sti(UINT32 op)
6313{
6314   DECLARE_DEF;
6315   UINT32 src3 = IREG((op >> 16) & 7);
6316   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6317   {
6318      int dreg = (op >> 22) & 7;
6319      UINT32 src1 = IREG((op >> 19) & 7);
6320      XOR(dreg, src1, src2);
6321   }
6322   WMEM(INDIRECT_1(op, op >> 8), src3);
6323   UPDATE_DEF();
6324}
6325
6326
6327//**************************************************************************
6328//  FUNCTION TABLE
6329//**************************************************************************
6330
6331UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_d[0x20])(UINT32, UINT8) =
6332{
6333   &tms3203x_device::mod00_d,      &tms3203x_device::mod01_d,      &tms3203x_device::mod02_d,      &tms3203x_device::mod03_d,
6334   &tms3203x_device::mod04_d,      &tms3203x_device::mod05_d,      &tms3203x_device::mod06_d,      &tms3203x_device::mod07_d,
6335   &tms3203x_device::mod08,        &tms3203x_device::mod09,        &tms3203x_device::mod0a,        &tms3203x_device::mod0b,
6336   &tms3203x_device::mod0c,        &tms3203x_device::mod0d,        &tms3203x_device::mod0e,        &tms3203x_device::mod0f,
6337   &tms3203x_device::mod10,        &tms3203x_device::mod11,        &tms3203x_device::mod12,        &tms3203x_device::mod13,
6338   &tms3203x_device::mod14,        &tms3203x_device::mod15,        &tms3203x_device::mod16,        &tms3203x_device::mod17,
6339   &tms3203x_device::mod18,        &tms3203x_device::mod19,        &tms3203x_device::modillegal,   &tms3203x_device::modillegal,
6340   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal
6341};
6342
6343
6344UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1[0x20])(UINT32, UINT8) =
6345{
6346   &tms3203x_device::mod00_1,      &tms3203x_device::mod01_1,      &tms3203x_device::mod02_1,      &tms3203x_device::mod03_1,
6347   &tms3203x_device::mod04_1,      &tms3203x_device::mod05_1,      &tms3203x_device::mod06_1,      &tms3203x_device::mod07_1,
6348   &tms3203x_device::mod08,        &tms3203x_device::mod09,        &tms3203x_device::mod0a,        &tms3203x_device::mod0b,
6349   &tms3203x_device::mod0c,        &tms3203x_device::mod0d,        &tms3203x_device::mod0e,        &tms3203x_device::mod0f,
6350   &tms3203x_device::mod10,        &tms3203x_device::mod11,        &tms3203x_device::mod12,        &tms3203x_device::mod13,
6351   &tms3203x_device::mod14,        &tms3203x_device::mod15,        &tms3203x_device::mod16,        &tms3203x_device::mod17,
6352   &tms3203x_device::mod18,        &tms3203x_device::mod19,        &tms3203x_device::modillegal,   &tms3203x_device::modillegal,
6353   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal
6354};
6355
6356
6357UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1_def[0x20])(UINT32, UINT8, UINT32 *&) =
6358{
6359   &tms3203x_device::mod00_1_def,  &tms3203x_device::mod01_1_def,  &tms3203x_device::mod02_1_def,  &tms3203x_device::mod03_1_def,
6360   &tms3203x_device::mod04_1_def,  &tms3203x_device::mod05_1_def,  &tms3203x_device::mod06_1_def,  &tms3203x_device::mod07_1_def,
6361   &tms3203x_device::mod08_def,    &tms3203x_device::mod09_def,    &tms3203x_device::mod0a_def,    &tms3203x_device::mod0b_def,
6362   &tms3203x_device::mod0c_def,    &tms3203x_device::mod0d_def,    &tms3203x_device::mod0e_def,    &tms3203x_device::mod0f_def,
6363   &tms3203x_device::mod10_def,    &tms3203x_device::mod11_def,    &tms3203x_device::mod12_def,    &tms3203x_device::mod13_def,
6364   &tms3203x_device::mod14_def,    &tms3203x_device::mod15_def,    &tms3203x_device::mod16_def,    &tms3203x_device::mod17_def,
6365   &tms3203x_device::mod18_def,    &tms3203x_device::mod19_def,    &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,
6366   &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def
6367};
6368
6369void (tms3203x_device::*const tms3203x_device::s_tms32031ops[])(UINT32 op) =
6370{
6371   &tms3203x_device::absf_reg,     &tms3203x_device::absf_dir,     &tms3203x_device::absf_ind,     &tms3203x_device::absf_imm,     // 0x00
6372   &tms3203x_device::absi_reg,     &tms3203x_device::absi_dir,     &tms3203x_device::absi_ind,     &tms3203x_device::absi_imm,
6373   &tms3203x_device::addc_reg,     &tms3203x_device::addc_dir,     &tms3203x_device::addc_ind,     &tms3203x_device::addc_imm,
6374   &tms3203x_device::addf_reg,     &tms3203x_device::addf_dir,     &tms3203x_device::addf_ind,     &tms3203x_device::addf_imm,
6375   &tms3203x_device::addi_reg,     &tms3203x_device::addi_dir,     &tms3203x_device::addi_ind,     &tms3203x_device::addi_imm,
6376   &tms3203x_device::and_reg,      &tms3203x_device::and_dir,      &tms3203x_device::and_ind,      &tms3203x_device::and_imm,
6377   &tms3203x_device::andn_reg,     &tms3203x_device::andn_dir,     &tms3203x_device::andn_ind,     &tms3203x_device::andn_imm,
6378   &tms3203x_device::ash_reg,      &tms3203x_device::ash_dir,      &tms3203x_device::ash_ind,      &tms3203x_device::ash_imm,
6379   &tms3203x_device::cmpf_reg,     &tms3203x_device::cmpf_dir,     &tms3203x_device::cmpf_ind,     &tms3203x_device::cmpf_imm,     // 0x08
6380   &tms3203x_device::cmpi_reg,     &tms3203x_device::cmpi_dir,     &tms3203x_device::cmpi_ind,     &tms3203x_device::cmpi_imm,
6381   &tms3203x_device::fix_reg,      &tms3203x_device::fix_dir,      &tms3203x_device::fix_ind,      &tms3203x_device::fix_imm,
6382   &tms3203x_device::float_reg,    &tms3203x_device::float_dir,    &tms3203x_device::float_ind,    &tms3203x_device::float_imm,
6383   &tms3203x_device::idle,         &tms3203x_device::idle,         &tms3203x_device::idle,         &tms3203x_device::idle,
6384   &tms3203x_device::lde_reg,      &tms3203x_device::lde_dir,      &tms3203x_device::lde_ind,      &tms3203x_device::lde_imm,
6385   &tms3203x_device::ldf_reg,      &tms3203x_device::ldf_dir,      &tms3203x_device::ldf_ind,      &tms3203x_device::ldf_imm,
6386   &tms3203x_device::illegal,      &tms3203x_device::ldfi_dir,     &tms3203x_device::ldfi_ind,     &tms3203x_device::illegal,
6387   &tms3203x_device::ldi_reg,      &tms3203x_device::ldi_dir,      &tms3203x_device::ldi_ind,      &tms3203x_device::ldi_imm,      // 0x10
6388   &tms3203x_device::illegal,      &tms3203x_device::ldii_dir,     &tms3203x_device::ldii_ind,     &tms3203x_device::illegal,
6389   &tms3203x_device::ldm_reg,      &tms3203x_device::ldm_dir,      &tms3203x_device::ldm_ind,      &tms3203x_device::ldm_imm,
6390   &tms3203x_device::lsh_reg,      &tms3203x_device::lsh_dir,      &tms3203x_device::lsh_ind,      &tms3203x_device::lsh_imm,
6391   &tms3203x_device::mpyf_reg,     &tms3203x_device::mpyf_dir,     &tms3203x_device::mpyf_ind,     &tms3203x_device::mpyf_imm,
6392   &tms3203x_device::mpyi_reg,     &tms3203x_device::mpyi_dir,     &tms3203x_device::mpyi_ind,     &tms3203x_device::mpyi_imm,
6393   &tms3203x_device::negb_reg,     &tms3203x_device::negb_dir,     &tms3203x_device::negb_ind,     &tms3203x_device::negb_imm,
6394   &tms3203x_device::negf_reg,     &tms3203x_device::negf_dir,     &tms3203x_device::negf_ind,     &tms3203x_device::negf_imm,
6395   &tms3203x_device::negi_reg,     &tms3203x_device::negi_dir,     &tms3203x_device::negi_ind,     &tms3203x_device::negi_imm,     // 0x18
6396   &tms3203x_device::nop_reg,      &tms3203x_device::illegal,      &tms3203x_device::nop_ind,      &tms3203x_device::illegal,
6397   &tms3203x_device::norm_reg,     &tms3203x_device::norm_dir,     &tms3203x_device::norm_ind,     &tms3203x_device::norm_imm,
6398   &tms3203x_device::not_reg,      &tms3203x_device::not_dir,      &tms3203x_device::not_ind,      &tms3203x_device::not_imm,
6399   &tms3203x_device::illegal,      &tms3203x_device::pop,          &tms3203x_device::illegal,      &tms3203x_device::illegal,
6400   &tms3203x_device::illegal,      &tms3203x_device::popf,         &tms3203x_device::illegal,      &tms3203x_device::illegal,
6401   &tms3203x_device::illegal,      &tms3203x_device::push,         &tms3203x_device::illegal,      &tms3203x_device::illegal,
6402   &tms3203x_device::illegal,      &tms3203x_device::pushf,        &tms3203x_device::illegal,      &tms3203x_device::illegal,
6403   &tms3203x_device::or_reg,       &tms3203x_device::or_dir,       &tms3203x_device::or_ind,       &tms3203x_device::or_imm,       // 0x20
6404   &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,
6405   &tms3203x_device::rnd_reg,      &tms3203x_device::rnd_dir,      &tms3203x_device::rnd_ind,      &tms3203x_device::rnd_imm,
6406   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rol,
6407   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rolc,
6408   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::ror,
6409   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rorc,
6410   &tms3203x_device::rtps_reg,     &tms3203x_device::rtps_dir,     &tms3203x_device::rtps_ind,     &tms3203x_device::rtps_imm,
6411   &tms3203x_device::illegal,      &tms3203x_device::stf_dir,      &tms3203x_device::stf_ind,      &tms3203x_device::illegal,      // 0x28
6412   &tms3203x_device::illegal,      &tms3203x_device::stfi_dir,     &tms3203x_device::stfi_ind,     &tms3203x_device::illegal,
6413   &tms3203x_device::illegal,      &tms3203x_device::sti_dir,      &tms3203x_device::sti_ind,      &tms3203x_device::illegal,
6414   &tms3203x_device::illegal,      &tms3203x_device::stii_dir,     &tms3203x_device::stii_ind,     &tms3203x_device::illegal,
6415   &tms3203x_device::sigi,         &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6416   &tms3203x_device::subb_reg,     &tms3203x_device::subb_dir,     &tms3203x_device::subb_ind,     &tms3203x_device::subb_imm,
6417   &tms3203x_device::subc_reg,     &tms3203x_device::subc_dir,     &tms3203x_device::subc_ind,     &tms3203x_device::subc_imm,
6418   &tms3203x_device::subf_reg,     &tms3203x_device::subf_dir,     &tms3203x_device::subf_ind,     &tms3203x_device::subf_imm,
6419   &tms3203x_device::subi_reg,     &tms3203x_device::subi_dir,     &tms3203x_device::subi_ind,     &tms3203x_device::subi_imm,     // 0x30
6420   &tms3203x_device::subrb_reg,    &tms3203x_device::subrb_dir,    &tms3203x_device::subrb_ind,    &tms3203x_device::subrb_imm,
6421   &tms3203x_device::subrf_reg,    &tms3203x_device::subrf_dir,    &tms3203x_device::subrf_ind,    &tms3203x_device::subrf_imm,
6422   &tms3203x_device::subri_reg,    &tms3203x_device::subri_dir,    &tms3203x_device::subri_ind,    &tms3203x_device::subri_imm,
6423   &tms3203x_device::tstb_reg,     &tms3203x_device::tstb_dir,     &tms3203x_device::tstb_ind,     &tms3203x_device::tstb_imm,
6424   &tms3203x_device::xor_reg,      &tms3203x_device::xor_dir,      &tms3203x_device::xor_ind,      &tms3203x_device::xor_imm,
6425   &tms3203x_device::illegal,      &tms3203x_device::iack_dir,     &tms3203x_device::iack_ind,     &tms3203x_device::illegal,
6426   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6427   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x38
6428   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6429   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6430   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6431   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6432   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6433   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6434   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6435
6436   &tms3203x_device::addc3_regreg, &tms3203x_device::addc3_indreg, &tms3203x_device::addc3_regind, &tms3203x_device::addc3_indind, // 0x40
6437   &tms3203x_device::addf3_regreg, &tms3203x_device::addf3_indreg, &tms3203x_device::addf3_regind, &tms3203x_device::addf3_indind,
6438   &tms3203x_device::addi3_regreg, &tms3203x_device::addi3_indreg, &tms3203x_device::addi3_regind, &tms3203x_device::addi3_indind,
6439   &tms3203x_device::and3_regreg,  &tms3203x_device::and3_indreg,  &tms3203x_device::and3_regind,  &tms3203x_device::and3_indind,
6440   &tms3203x_device::andn3_regreg, &tms3203x_device::andn3_indreg, &tms3203x_device::andn3_regind, &tms3203x_device::andn3_indind,
6441   &tms3203x_device::ash3_regreg,  &tms3203x_device::ash3_indreg,  &tms3203x_device::ash3_regind,  &tms3203x_device::ash3_indind,
6442   &tms3203x_device::cmpf3_regreg, &tms3203x_device::cmpf3_indreg, &tms3203x_device::cmpf3_regind, &tms3203x_device::cmpf3_indind,
6443   &tms3203x_device::cmpi3_regreg, &tms3203x_device::cmpi3_indreg, &tms3203x_device::cmpi3_regind, &tms3203x_device::cmpi3_indind,
6444   &tms3203x_device::lsh3_regreg,  &tms3203x_device::lsh3_indreg,  &tms3203x_device::lsh3_regind,  &tms3203x_device::lsh3_indind,  // 0x48
6445   &tms3203x_device::mpyf3_regreg, &tms3203x_device::mpyf3_indreg, &tms3203x_device::mpyf3_regind, &tms3203x_device::mpyf3_indind,
6446   &tms3203x_device::mpyi3_regreg, &tms3203x_device::mpyi3_indreg, &tms3203x_device::mpyi3_regind, &tms3203x_device::mpyi3_indind,
6447   &tms3203x_device::or3_regreg,   &tms3203x_device::or3_indreg,   &tms3203x_device::or3_regind,   &tms3203x_device::or3_indind,
6448   &tms3203x_device::subb3_regreg, &tms3203x_device::subb3_indreg, &tms3203x_device::subb3_regind, &tms3203x_device::subb3_indind,
6449   &tms3203x_device::subf3_regreg, &tms3203x_device::subf3_indreg, &tms3203x_device::subf3_regind, &tms3203x_device::subf3_indind,
6450   &tms3203x_device::subi3_regreg, &tms3203x_device::subi3_indreg, &tms3203x_device::subi3_regind, &tms3203x_device::subi3_indind,
6451   &tms3203x_device::tstb3_regreg, &tms3203x_device::tstb3_indreg, &tms3203x_device::tstb3_regind, &tms3203x_device::tstb3_indind,
6452   &tms3203x_device::xor3_regreg,  &tms3203x_device::xor3_indreg,  &tms3203x_device::xor3_regind,  &tms3203x_device::xor3_indind,  // 0x50
6453   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6454   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6455   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6456   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6457   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6458   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6459   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6460   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x58
6461   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6462   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6463   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6464   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6465   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6466   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6467   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6468   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x60
6469   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6470   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6471   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6472   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6473   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6474   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6475   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6476   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x68
6477   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6478   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6479   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6480   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6481   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6482   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6483   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6484   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x70
6485   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6486   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6487   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6488   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6489   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6490   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6491   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6492   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x78
6493   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6494   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6495   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6496   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6497   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6498   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6499   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6500
6501   &tms3203x_device::ldfu_reg,     &tms3203x_device::ldfu_dir,     &tms3203x_device::ldfu_ind,     &tms3203x_device::ldfu_imm,     // 0x80
6502   &tms3203x_device::ldflo_reg,    &tms3203x_device::ldflo_dir,    &tms3203x_device::ldflo_ind,    &tms3203x_device::ldflo_imm,
6503   &tms3203x_device::ldfls_reg,    &tms3203x_device::ldfls_dir,    &tms3203x_device::ldfls_ind,    &tms3203x_device::ldfls_imm,
6504   &tms3203x_device::ldfhi_reg,    &tms3203x_device::ldfhi_dir,    &tms3203x_device::ldfhi_ind,    &tms3203x_device::ldfhi_imm,
6505   &tms3203x_device::ldfhs_reg,    &tms3203x_device::ldfhs_dir,    &tms3203x_device::ldfhs_ind,    &tms3203x_device::ldfhs_imm,
6506   &tms3203x_device::ldfeq_reg,    &tms3203x_device::ldfeq_dir,    &tms3203x_device::ldfeq_ind,    &tms3203x_device::ldfeq_imm,
6507   &tms3203x_device::ldfne_reg,    &tms3203x_device::ldfne_dir,    &tms3203x_device::ldfne_ind,    &tms3203x_device::ldfne_imm,
6508   &tms3203x_device::ldflt_reg,    &tms3203x_device::ldflt_dir,    &tms3203x_device::ldflt_ind,    &tms3203x_device::ldflt_imm,
6509   &tms3203x_device::ldfle_reg,    &tms3203x_device::ldfle_dir,    &tms3203x_device::ldfle_ind,    &tms3203x_device::ldfle_imm,    // 0x88
6510   &tms3203x_device::ldfgt_reg,    &tms3203x_device::ldfgt_dir,    &tms3203x_device::ldfgt_ind,    &tms3203x_device::ldfgt_imm,
6511   &tms3203x_device::ldfge_reg,    &tms3203x_device::ldfge_dir,    &tms3203x_device::ldfge_ind,    &tms3203x_device::ldfge_imm,
6512   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6513   &tms3203x_device::ldfnv_reg,    &tms3203x_device::ldfnv_dir,    &tms3203x_device::ldfnv_ind,    &tms3203x_device::ldfnv_imm,
6514   &tms3203x_device::ldfv_reg,     &tms3203x_device::ldfv_dir,     &tms3203x_device::ldfv_ind,     &tms3203x_device::ldfv_imm,
6515   &tms3203x_device::ldfnuf_reg,   &tms3203x_device::ldfnuf_dir,   &tms3203x_device::ldfnuf_ind,   &tms3203x_device::ldfnuf_imm,
6516   &tms3203x_device::ldfuf_reg,    &tms3203x_device::ldfuf_dir,    &tms3203x_device::ldfuf_ind,    &tms3203x_device::ldfuf_imm,
6517   &tms3203x_device::ldfnlv_reg,   &tms3203x_device::ldfnlv_dir,   &tms3203x_device::ldfnlv_ind,   &tms3203x_device::ldfnlv_imm,   // 0x90
6518   &tms3203x_device::ldflv_reg,    &tms3203x_device::ldflv_dir,    &tms3203x_device::ldflv_ind,    &tms3203x_device::ldflv_imm,
6519   &tms3203x_device::ldfnluf_reg,  &tms3203x_device::ldfnluf_dir,  &tms3203x_device::ldfnluf_ind,  &tms3203x_device::ldfnluf_imm,
6520   &tms3203x_device::ldfluf_reg,   &tms3203x_device::ldfluf_dir,   &tms3203x_device::ldfluf_ind,   &tms3203x_device::ldfluf_imm,
6521   &tms3203x_device::ldfzuf_reg,   &tms3203x_device::ldfzuf_dir,   &tms3203x_device::ldfzuf_ind,   &tms3203x_device::ldfzuf_imm,
6522   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6523   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6524   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6525   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x98
6526   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6527   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6528   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6529   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6530   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6531   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6532   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6533   &tms3203x_device::ldiu_reg,     &tms3203x_device::ldiu_dir,     &tms3203x_device::ldiu_ind,     &tms3203x_device::ldiu_imm,     // 0xa0
6534   &tms3203x_device::ldilo_reg,    &tms3203x_device::ldilo_dir,    &tms3203x_device::ldilo_ind,    &tms3203x_device::ldilo_imm,
6535   &tms3203x_device::ldils_reg,    &tms3203x_device::ldils_dir,    &tms3203x_device::ldils_ind,    &tms3203x_device::ldils_imm,
6536   &tms3203x_device::ldihi_reg,    &tms3203x_device::ldihi_dir,    &tms3203x_device::ldihi_ind,    &tms3203x_device::ldihi_imm,
6537   &tms3203x_device::ldihs_reg,    &tms3203x_device::ldihs_dir,    &tms3203x_device::ldihs_ind,    &tms3203x_device::ldihs_imm,
6538   &tms3203x_device::ldieq_reg,    &tms3203x_device::ldieq_dir,    &tms3203x_device::ldieq_ind,    &tms3203x_device::ldieq_imm,
6539   &tms3203x_device::ldine_reg,    &tms3203x_device::ldine_dir,    &tms3203x_device::ldine_ind,    &tms3203x_device::ldine_imm,
6540   &tms3203x_device::ldilt_reg,    &tms3203x_device::ldilt_dir,    &tms3203x_device::ldilt_ind,    &tms3203x_device::ldilt_imm,
6541   &tms3203x_device::ldile_reg,    &tms3203x_device::ldile_dir,    &tms3203x_device::ldile_ind,    &tms3203x_device::ldile_imm,    // 0xa8
6542   &tms3203x_device::ldigt_reg,    &tms3203x_device::ldigt_dir,    &tms3203x_device::ldigt_ind,    &tms3203x_device::ldigt_imm,
6543   &tms3203x_device::ldige_reg,    &tms3203x_device::ldige_dir,    &tms3203x_device::ldige_ind,    &tms3203x_device::ldige_imm,
6544   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6545   &tms3203x_device::ldinv_reg,    &tms3203x_device::ldinv_dir,    &tms3203x_device::ldinv_ind,    &tms3203x_device::ldinv_imm,
6546   &tms3203x_device::ldiv_reg,     &tms3203x_device::ldiv_dir,     &tms3203x_device::ldiv_ind,     &tms3203x_device::ldiv_imm,
6547   &tms3203x_device::ldinuf_reg,   &tms3203x_device::ldinuf_dir,   &tms3203x_device::ldinuf_ind,   &tms3203x_device::ldinuf_imm,
6548   &tms3203x_device::ldiuf_reg,    &tms3203x_device::ldiuf_dir,    &tms3203x_device::ldiuf_ind,    &tms3203x_device::ldiuf_imm,
6549   &tms3203x_device::ldinlv_reg,   &tms3203x_device::ldinlv_dir,   &tms3203x_device::ldinlv_ind,   &tms3203x_device::ldinlv_imm,   // 0xb0
6550   &tms3203x_device::ldilv_reg,    &tms3203x_device::ldilv_dir,    &tms3203x_device::ldilv_ind,    &tms3203x_device::ldilv_imm,
6551   &tms3203x_device::ldinluf_reg,  &tms3203x_device::ldinluf_dir,  &tms3203x_device::ldinluf_ind,  &tms3203x_device::ldinluf_imm,
6552   &tms3203x_device::ldiluf_reg,   &tms3203x_device::ldiluf_dir,   &tms3203x_device::ldiluf_ind,   &tms3203x_device::ldiluf_imm,
6553   &tms3203x_device::ldizuf_reg,   &tms3203x_device::ldizuf_dir,   &tms3203x_device::ldizuf_ind,   &tms3203x_device::ldizuf_imm,
6554   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6555   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6556   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6557   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xb8
6558   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6559   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6560   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6561   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6562   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6563   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6564   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6565
6566   &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       // 0xc0
6567   &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,
6568   &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,
6569   &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,
6570   &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,
6571   &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,
6572   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6573   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6574   &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     // 0xc8
6575   &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,
6576   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6577   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6578   &tms3203x_device::swi,          &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6579   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6580   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6581   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6582   &tms3203x_device::brc_reg,      &tms3203x_device::brcd_reg,     &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xd0
6583   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6584   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6585   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6586   &tms3203x_device::brc_imm,      &tms3203x_device::brcd_imm,     &tms3203x_device::illegal,      &tms3203x_device::illegal,
6587   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6588   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6589   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6590   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     // 0xd8
6591   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6592   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6593   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6594   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6595   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6596   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6597   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6598   &tms3203x_device::callc_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xe0
6599   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6600   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6601   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6602   &tms3203x_device::callc_imm,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6603   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6604   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6605   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6606   &tms3203x_device::trapc,        &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xe8
6607   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6608   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6609   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6610   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6611   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6612   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6613   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6614   &tms3203x_device::retic_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xf0
6615   &tms3203x_device::retsc_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6616   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6617   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6618   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6619   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6620   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6621   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6622   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xf8
6623   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6624   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6625   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6626   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6627   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6628   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6629   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6630
6631   &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    // 0x100
6632   &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,
6633   &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,
6634   &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,
6635   &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,
6636   &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,
6637   &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,
6638   &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,
6639   &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    // 0x108
6640   &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,
6641   &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,
6642   &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,
6643   &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,
6644   &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,
6645   &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,
6646   &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,
6647   &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    // 0x110
6648   &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,
6649   &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,
6650   &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,
6651   &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,
6652   &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,
6653   &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,
6654   &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,
6655   &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    // 0x118
6656   &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,
6657   &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,
6658   &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,
6659   &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,
6660   &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,
6661   &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,
6662   &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,
6663   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x120
6664   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6665   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6666   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6667   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6668   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6669   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6670   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6671   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x128
6672   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6673   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6674   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6675   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6676   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6677   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6678   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6679   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x130
6680   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6681   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6682   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6683   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6684   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6685   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6686   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6687   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x138
6688   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6689   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6690   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6691   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6692   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6693   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6694   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6695
6696   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x140
6697   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6698   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6699   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6700   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6701   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6702   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6703   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6704   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x148
6705   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6706   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6707   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6708   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6709   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6710   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6711   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6712   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x150
6713   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6714   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6715   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6716   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6717   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6718   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6719   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6720   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x158
6721   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6722   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6723   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6724   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6725   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6726   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6727   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6728   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x160
6729   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6730   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6731   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6732   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6733   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6734   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6735   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6736   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x168
6737   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6738   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6739   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6740   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6741   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6742   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6743   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6744   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x170
6745   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6746   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6747   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6748   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6749   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6750   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6751   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6752   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x178
6753   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6754   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6755   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6756   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6757   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6758   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6759   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6760
6761   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       // 0x180
6762   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6763   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6764   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6765   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6766   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6767   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6768   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6769   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       // 0x188
6770   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6771   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6772   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6773   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6774   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6775   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6776   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6777   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      // 0x190
6778   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6779   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6780   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6781   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6782   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6783   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6784   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6785   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     // 0x198
6786   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6787   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6788   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6789   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6790   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6791   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6792   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6793   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      // 0x1a0
6794   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6795   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6796   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6797   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6798   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6799   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6800   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6801   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       // 0x1a8
6802   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6803   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6804   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6805   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6806   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6807   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6808   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6809   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       // 0x1b0
6810   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6811   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6812   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6813   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6814   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6815   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6816   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6817   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      // 0x1b8
6818   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6819   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6820   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6821   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6822   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6823   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6824   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6825
6826   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     // 0x1c0
6827   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6828   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6829   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6830   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6831   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6832   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6833   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6834   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      // 0x1c8
6835   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6836   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6837   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6838   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6839   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6840   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6841   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6842   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       // 0x1d0
6843   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6844   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6845   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6846   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6847   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6848   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6849   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6850   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     // 0x1d8
6851   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6852   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6853   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6854   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6855   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6856   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6857   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6858   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1e0
6859   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6860   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6861   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6862   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6863   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6864   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6865   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6866   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1e8
6867   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6868   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6869   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6870   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6871   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6872   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6873   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6874   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1f0
6875   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6876   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6877   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6878   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6879   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6880   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6881   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6882   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1f8
6883   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6884   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6885   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6886   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6887   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6888   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6889   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal
6890};
trunk/src/devices/cpu/tms32031/32031ops.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Aaron Giles
3/***************************************************************************
4
5    32031ops.cpp
6
7    TMS32031/2 emulator
8
9***************************************************************************/
10
11
12//**************************************************************************
13//  COMPILE-TIME OPTIONS
14//**************************************************************************
15
16#define USE_FP              0
17
18
19
20//**************************************************************************
21//  MACROS
22//**************************************************************************
23
24#define IREG(rnum)          (m_r[rnum].i32[0])
25#define FREGEXP(rnum)       (m_r[rnum].exponent())
26#define FREGMAN(rnum)       (m_r[rnum].mantissa())
27
28#define FP2LONG(rnum)       ((FREGEXP(rnum) << 24) | ((UINT32)FREGMAN(rnum) >> 8))
29#define LONG2FP(rnum,v)     do { m_r[rnum].set_mantissa((v) << 8); m_r[rnum].set_exponent((INT32)(v) >> 24); } while (0)
30#define SHORT2FP(rnum,v)    do { \
31                        if ((UINT16)(v) == 0x8000) { m_r[rnum].set_mantissa(0); m_r[rnum].set_exponent(-128); } \
32                        else { m_r[rnum].set_mantissa((v) << 20); m_r[rnum].set_exponent((INT16)(v) >> 12); } \
33                     } while (0)
34
35#define DIRECT(op)              (((IREG(TMR_DP) & 0xff) << 16) | ((UINT16)op))
36#define INDIRECT_D(op,o)        ((this->*s_indirect_d[((o) >> 3) & 31])(op,o))
37#define INDIRECT_1(op,o)        ((this->*s_indirect_1[((o) >> 3) & 31])(op,o))
38#define INDIRECT_1_DEF(op,o)    ((this->*s_indirect_1_def[((o) >> 3) & 31])(op,o,defptr))
39
40#define SIGN(val)           ((val) & 0x80000000)
41
42#define OVERFLOW_SUB(a,b,r) ((INT32)(((a) ^ (b)) & ((a) ^ (r))) < 0)
43#define OVERFLOW_ADD(a,b,r) ((INT32)(((a) ^ (r)) & ((b) ^ (r))) < 0)
44
45#define CLR_FLAGS(f)        do { IREG(TMR_ST) &= ~(f); } while (0)
46#define CLR_NVUF()          CLR_FLAGS(NFLAG | VFLAG | UFFLAG)
47#define CLR_NZVUF()         CLR_FLAGS(NFLAG | ZFLAG | VFLAG | UFFLAG)
48#define CLR_NZCVUF()        CLR_FLAGS(NFLAG | ZFLAG | VFLAG | CFLAG | UFFLAG)
49
50#define OR_C(flag)          do { IREG(TMR_ST) |= flag & CFLAG; } while (0)
51#define OR_NZ(val)          do { IREG(TMR_ST) |= (((val) >> 28) & NFLAG) | (((val) == 0) << 2); } while (0)
52#define OR_NZF(reg)         do { IREG(TMR_ST) |= ((reg.mantissa() >> 28) & NFLAG) | ((reg.exponent() == -128) << 2); } while (0)
53#define OR_NUF(reg)         do { int temp = (reg.exponent() == -128) << 4; IREG(TMR_ST) |= ((reg.mantissa() >> 28) & NFLAG) | (temp) | (temp << 2); } while (0)
54#define OR_V_SUB(a,b,r)     do { UINT32 temp = ((((a) ^ (b)) & ((a) ^ (r))) >> 30) & VFLAG; IREG(TMR_ST) |= temp | (temp << 4); } while (0)
55#define OR_V_ADD(a,b,r)     do { UINT32 temp = ((((a) ^ (r)) & ((b) ^ (r))) >> 30) & VFLAG; IREG(TMR_ST) |= temp | (temp << 4); } while (0)
56#define OR_C_SUB(a,b,r)     do { IREG(TMR_ST) |= ((UINT32)(b) > (UINT32)(a)); } while (0)
57#define OR_C_ADD(a,b,r)     do { IREG(TMR_ST) |= ((UINT32)(a) > (UINT32)(r)); } while (0)
58#define OR_C_SBB(a,b,c)     do { INT64 temp = (INT64)(a) - (UINT32)(b) - (UINT32)(c); IREG(TMR_ST) |= (temp < 0); } while (0)
59#define OR_C_ADC(a,b,c)     do { UINT64 temp = (UINT64)(a) + (UINT32)(b) + (UINT32)(c); IREG(TMR_ST) |= (temp > 0xffffffff); } while (0)
60
61#define OVM()               (IREG(TMR_ST) & OVMFLAG)
62
63#define DECLARE_DEF         UINT32 defval; UINT32 *defptr = &defval
64#define UPDATE_DEF()        *defptr = defval
65
66
67
68//**************************************************************************
69//  IMPLEMENTATION
70//**************************************************************************
71
72void tms3203x_device::illegal(UINT32 op)
73{
74   if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
75   {
76      logerror("Illegal op @ %06X: %08X (tbl=%03X)\n", m_pc - 1, op, op >> 21);
77      debugger_break(machine());
78   }
79}
80
81
82void tms3203x_device::unimplemented(UINT32 op)
83{
84   fatalerror("Unimplemented op @ %06X: %08X (tbl=%03X)\n", m_pc - 1, op, op >> 21);
85}
86
87
88inline void tms3203x_device::execute_one()
89{
90   UINT32 op = ROPCODE(m_pc);
91   m_icount -= 2;  // 2 clocks per cycle
92   m_pc++;
93#if (TMS_3203X_LOG_OPCODE_USAGE)
94   m_hits[op >> 21]++;
95#endif
96   (this->*s_tms32031ops[op >> 21])(op);
97}
98
99
100void tms3203x_device::update_special(int dreg)
101{
102   if (dreg == TMR_BK)
103   {
104      UINT32 temp = IREG(TMR_BK);
105      m_bkmask = temp;
106      while (temp >>= 1)
107         m_bkmask |= temp;
108   }
109   else if (dreg == TMR_IOF)
110   {
111      if (IREG(TMR_IOF) & 0x002)
112         m_xf0_cb((offs_t)0, (IREG(TMR_IOF) >> 2) & 1);
113      if (IREG(TMR_IOF) & 0x020)
114         m_xf1_cb((offs_t)0, (IREG(TMR_IOF) >> 6) & 1);
115   }
116   else if (dreg == TMR_ST || dreg == TMR_IF || dreg == TMR_IE)
117      check_irqs();
118}
119
120
121
122//**************************************************************************
123//  CONDITION CODES
124//**************************************************************************
125
126const UINT32 C_LO = 1 << 1;
127const UINT32 C_LS = 1 << 2;
128const UINT32 C_HI = 1 << 3;
129const UINT32 C_HS = 1 << 4;
130const UINT32 C_EQ = 1 << 5;
131const UINT32 C_NE = 1 << 6;
132const UINT32 C_LT = 1 << 7;
133const UINT32 C_LE = 1 << 8;
134const UINT32 C_GT = 1 << 9;
135const UINT32 C_GE = 1 << 10;
136const UINT32 C_NV = 1 << 12;
137const UINT32 C_V = 1 << 13;
138const UINT32 C_NUF = 1 << 14;
139const UINT32 C_UF = 1 << 15;
140const UINT32 C_NLV = 1 << 16;
141const UINT32 C_LV = 1 << 17;
142const UINT32 C_NLUF = 1 << 18;
143const UINT32 C_LUF = 1 << 19;
144const UINT32 C_ZUF = 1 << 20;
145
146const UINT32 condition_table[0x80] =
147{
148/* ------- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_NLUF,
149/* ------C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_NLUF,
150/* -----V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_NLUF,
151/* -----VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_NLUF,
152/* ----Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
153/* ----Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
154/* ----ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
155/* ----ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
156/* ---N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF,
157/* ---N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF,
158/* ---N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF,
159/* ---N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF,
160/* ---NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
161/* ---NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_NLUF | C_ZUF,
162/* ---NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
163/* ---NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_NLUF | C_ZUF,
164/* --U---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
165/* --U---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
166/* --U--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
167/* --U--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
168/* --U-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
169/* --U-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
170/* --U-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
171/* --U-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
172/* --UN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
173/* --UN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
174/* --UN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
175/* --UN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
176/* --UNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
177/* --UNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_NLUF | C_ZUF,
178/* --UNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
179/* --UNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_NLUF | C_ZUF,
180/* -v----- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_NLUF,
181/* -v----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_NLUF,
182/* -v---V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_NLUF,
183/* -v---VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_NLUF,
184/* -v--Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
185/* -v--Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
186/* -v--ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
187/* -v--ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
188/* -v-N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF,
189/* -v-N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF,
190/* -v-N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF,
191/* -v-N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF,
192/* -v-NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
193/* -v-NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_NLUF | C_ZUF,
194/* -v-NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
195/* -v-NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_NLUF | C_ZUF,
196/* -vU---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
197/* -vU---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
198/* -vU--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
199/* -vU--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
200/* -vU-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
201/* -vU-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
202/* -vU-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
203/* -vU-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
204/* -vUN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
205/* -vUN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
206/* -vUN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
207/* -vUN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
208/* -vUNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
209/* -vUNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_NLUF | C_ZUF,
210/* -vUNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
211/* -vUNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_NLUF | C_ZUF,
212/* u------ */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_LUF,
213/* u-----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_NLV | C_LUF,
214/* u----V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_LUF,
215/* u----VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_NLV | C_LUF,
216/* u---Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
217/* u---Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
218/* u---ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
219/* u---ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
220/* u--N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF,
221/* u--N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF,
222/* u--N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF,
223/* u--N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF,
224/* u--NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
225/* u--NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_NLV | C_LUF  | C_ZUF,
226/* u--NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
227/* u--NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_NLV | C_LUF  | C_ZUF,
228/* u-U---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
229/* u-U---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
230/* u-U--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
231/* u-U--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
232/* u-U-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
233/* u-U-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
234/* u-U-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
235/* u-U-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
236/* u-UN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
237/* u-UN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
238/* u-UN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
239/* u-UN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
240/* u-UNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
241/* u-UNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_NLV | C_LUF  | C_ZUF,
242/* u-UNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
243/* u-UNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_NLV | C_LUF  | C_ZUF,
244/* uv----- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_LUF,
245/* uv----C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_NUF | C_LV  | C_LUF,
246/* uv---V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_LUF,
247/* uv---VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_NUF | C_LV  | C_LUF,
248/* uv--Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
249/* uv--Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
250/* uv--ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
251/* uv--ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
252/* uv-N--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF,
253/* uv-N--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF,
254/* uv-N-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF,
255/* uv-N-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF,
256/* uv-NZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
257/* uv-NZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_NUF | C_LV  | C_LUF  | C_ZUF,
258/* uv-NZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
259/* uv-NZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_NUF | C_LV  | C_LUF  | C_ZUF,
260/* uvU---- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
261/* uvU---C */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
262/* uvU--V- */   1 | C_HI | C_HS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
263/* uvU--VC */   1 | C_LO | C_LS | C_NE | C_GT | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
264/* uvU-Z-- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
265/* uvU-Z-C */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
266/* uvU-ZV- */   1 | C_LS | C_HS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
267/* uvU-ZVC */   1 | C_LO | C_LS | C_EQ | C_LE | C_GE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
268/* uvUN--- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
269/* uvUN--C */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
270/* uvUN-V- */   1 | C_HI | C_HS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
271/* uvUN-VC */   1 | C_LO | C_LS | C_NE | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
272/* uvUNZ-- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
273/* uvUNZ-C */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_NV | C_UF  | C_LV  | C_LUF  | C_ZUF,
274/* uvUNZV- */   1 | C_LS | C_HS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
275/* uvUNZVC */   1 | C_LO | C_LS | C_EQ | C_LT | C_LE | C_V  | C_UF  | C_LV  | C_LUF  | C_ZUF,
276};
277
278#define CONDITION_LO()      (IREG(TMR_ST) & CFLAG)
279#define CONDITION_LS()      (IREG(TMR_ST) & (CFLAG | ZFLAG))
280#define CONDITION_HI()      (!(IREG(TMR_ST) & (CFLAG | ZFLAG)))
281#define CONDITION_HS()      (!(IREG(TMR_ST) & CFLAG))
282#define CONDITION_EQ()      (IREG(TMR_ST) & ZFLAG)
283#define CONDITION_NE()      (!(IREG(TMR_ST) & ZFLAG))
284#define CONDITION_LT()      (IREG(TMR_ST) & NFLAG)
285#define CONDITION_LE()      (IREG(TMR_ST) & (NFLAG | ZFLAG))
286#define CONDITION_GT()      (!(IREG(TMR_ST) & (NFLAG | ZFLAG)))
287#define CONDITION_GE()      (!(IREG(TMR_ST) & NFLAG))
288#define CONDITION_NV()      (!(IREG(TMR_ST) & VFLAG))
289#define CONDITION_V()       (IREG(TMR_ST) & VFLAG)
290#define CONDITION_NUF()     (!(IREG(TMR_ST) & UFFLAG))
291#define CONDITION_UF()      (IREG(TMR_ST) & UFFLAG)
292#define CONDITION_NLV()     (!(IREG(TMR_ST) & LVFLAG))
293#define CONDITION_LV()      (IREG(TMR_ST) & LVFLAG)
294#define CONDITION_NLUF()    (!(IREG(TMR_ST) & LUFFLAG))
295#define CONDITION_LUF()     (IREG(TMR_ST) & LUFFLAG)
296#define CONDITION_ZUF()     (IREG(TMR_ST) & (UFFLAG | ZFLAG))
297
298inline bool tms3203x_device::condition(int which)
299{
300   return (condition_table[IREG(TMR_ST) & (LUFFLAG | LVFLAG | UFFLAG | NFLAG | ZFLAG | VFLAG | CFLAG)] >> (which & 31)) & 1;
301}
302
303
304
305//**************************************************************************
306//  FLOATING POINT HELPERS
307//**************************************************************************
308
309#if USE_FP
310void tms3203x_device::double_to_dsp_with_flags(double val, tmsreg &result)
311{
312   int_double id;
313   id.d = val;
314
315   CLR_NZVUF();
316
317   int mantissa = ((id.i[BYTE_XOR_BE(0)] & 0x000fffff) << 11) | ((id.i[BYTE_XOR_BE(1)] & 0xffe00000) >> 21);
318   int exponent = ((id.i[BYTE_XOR_BE(0)] & 0x7ff00000) >> 20) - 1023;
319   if (exponent <= -128)
320   {
321      result.set_mantissa(0);
322      result.set_exponent(-128);
323      IREG(TMR_ST) |= UFFLAG | LUFFLAG | ZFLAG;
324   }
325   else if (exponent > 127)
326   {
327      if ((INT32)id.i[BYTE_XOR_BE(0)] >= 0)
328         result.set_mantissa(0x7fffffff);
329      else
330      {
331         result.set_mantissa(0x80000001);
332         IREG(TMR_ST) |= NFLAG;
333      }
334      result.set_exponent(127);
335      IREG(TMR_ST) |= VFLAG | LVFLAG;
336   }
337   else if (val == 0)
338   {
339      result.set_mantissa(0);
340      result.set_exponent(-128);
341      IREG(TMR_ST) |= ZFLAG;
342   }
343   else if ((INT32)id.i[BYTE_XOR_BE(0)] >= 0)
344   {
345      result.set_mantissa(mantissa);
346      result.set_exponent(exponent);
347   }
348   else if (mantissa != 0)
349   {
350      result.set_mantissa(0x80000000 | -mantissa);
351      result.set_exponent(exponent);
352      IREG(TMR_ST) |= NFLAG;
353   }
354   else
355   {
356      result.set_mantissa(0x80000000);
357      result.set_exponent(exponent - 1);
358      IREG(TMR_ST) |= NFLAG;
359   }
360}
361#endif
362
363// integer to floating point conversion
364#if USE_FP
365void tms3203x_device::int2float(tmsreg &srcdst)
366{
367   double val = srcdst.mantissa();
368   double_to_dsp_with_flags(val, srcdst);
369}
370#else
371void tms3203x_device::int2float(tmsreg &srcdst)
372{
373   UINT32 man = srcdst.mantissa();
374   int exp, cnt;
375
376   // never overflows or underflows
377   CLR_NZVUF();
378
379   // 0 always has exponent of -128
380   if (man == 0)
381   {
382      man = 0x80000000;
383      exp = -128;
384   }
385
386   // check for -1 here because count_leading_ones will infinite loop
387   else if (man == (UINT32)-1)
388   {
389      man = 0;
390      exp = -1;
391   }
392
393   // positive values; count leading zeros and shift
394   else if ((INT32)man > 0)
395   {
396      cnt = count_leading_zeros(man);
397      man <<= cnt;
398      exp = 31 - cnt;
399   }
400
401   // negative values; count leading ones and shift
402   else
403   {
404      cnt = count_leading_ones(man);
405      man <<= cnt;
406      exp = 31 - cnt;
407   }
408
409   // set the final results and compute NZ
410   srcdst.set_mantissa(man ^ 0x80000000);
411   srcdst.set_exponent(exp);
412   OR_NZF(srcdst);
413}
414#endif
415
416
417// floating point to integer conversion
418#if USE_FP
419void tms3203x_device::float2int(tmsreg &srcdst, int setflags)
420{
421   INT32 val;
422
423   if (setflags) CLR_NZVUF();
424   if (srcdst.exponent() > 30)
425   {
426      if ((INT32)srcdst.mantissa() >= 0)
427         val = 0x7fffffff;
428      else
429         val = 0x80000000;
430      if (setflags) IREG(TMR_ST) |= VFLAG | LVFLAG;
431   }
432   else
433      val = floor(srcdst.as_double());
434   srcdst.set_mantissa(val);
435   if (setflags) OR_NZ(val);
436}
437#else
438void tms3203x_device::float2int(tmsreg &srcdst, bool setflags)
439{
440   INT32 man = srcdst.mantissa();
441   int shift = 31 - srcdst.exponent();
442
443   // never underflows
444   if (setflags) CLR_NZVUF();
445
446   // if we've got too much to handle, overflow
447   if (shift <= 0)
448   {
449      srcdst.set_mantissa((man >= 0) ? 0x7fffffff : 0x80000000);
450      if (setflags) IREG(TMR_ST) |= VFLAG | LVFLAG;
451   }
452
453   // if we're too small, go to 0 or -1
454   else if (shift > 31)
455      srcdst.set_mantissa(man >> 31);
456
457   // we're in the middle; shift it
458   else
459      srcdst.set_mantissa((man >> shift) ^ (1 << (31 - shift)));
460
461   // set the NZ flags
462   if (setflags) OR_NZ(srcdst.mantissa());
463}
464#endif
465
466
467// compute the negative of a floating point value
468#if USE_FP
469void tms3203x_device::negf(tmsreg &dst, tmsreg tmsreg &src)
470{
471   double val = -src.as_double();
472   double_to_dsp_with_flags(val, dst);
473}
474#else
475void tms3203x_device::negf(tmsreg &dst, tmsreg &src)
476{
477   INT32 man = src.mantissa();
478
479   CLR_NZVUF();
480
481   if (src.exponent() == -128)
482   {
483      dst.set_mantissa(0);
484      dst.set_exponent(-128);
485   }
486   else if ((man & 0x7fffffff) != 0)
487   {
488      dst.set_mantissa(-man);
489      dst.set_exponent(src.exponent());
490   }
491   else
492   {
493      dst.set_mantissa(man ^ 0x80000000);
494      if (man == 0)
495         dst.set_exponent(src.exponent() - 1);
496      else
497         dst.set_exponent(src.exponent() + 1);
498   }
499   OR_NZF(dst);
500}
501#endif
502
503
504
505// add two floating point values
506#if USE_FP
507void tms3203x_device::addf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
508{
509   double val = src1.as_double() + src2.as_double();
510   double_to_dsp_with_flags(val, dst);
511}
512#else
513void tms3203x_device::addf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
514{
515   INT64 man;
516   INT64 m1, m2;
517   int exp, cnt;
518
519   // reset over/underflow conditions
520   CLR_NZVUF();
521
522   // first check for 0 operands
523   if (src1.exponent() == -128)
524   {
525      dst = src2;
526      OR_NZF(dst);
527      return;
528   }
529   if (src2.exponent() == -128)
530   {
531      dst = src1;
532      OR_NZF(dst);
533      return;
534   }
535
536   // extract mantissas from 1.0.31 values to 1.1.31 values
537   m1 = (INT64)src1.mantissa() ^ 0x80000000;
538   m2 = (INT64)src2.mantissa() ^ 0x80000000;
539
540   // normalize based on the exponent
541   if (src1.exponent() > src2.exponent())
542   {
543      exp = src1.exponent();
544      cnt = exp - src2.exponent();
545      if (cnt >= 32)
546      {
547         dst = src1;
548         OR_NZF(dst);
549         return;
550      }
551      m2 >>= cnt;
552   }
553   else
554   {
555      exp = src2.exponent();
556      cnt = exp - src1.exponent();
557      if (cnt >= 32)
558      {
559         dst = src2;
560         OR_NZF(dst);
561         return;
562      }
563      m1 >>= cnt;
564   }
565
566   // add
567   man = m1 + m2;
568
569   // if the mantissa is zero, set the exponent appropriately
570   if (man == 0 || exp == -128)
571   {
572      exp = -128;
573      man = 0x80000000;
574   }
575
576   // if the mantissa is >= 2.0 or < -2.0, normalize
577   else if (man >= ((INT64)2 << 31) || man < ((INT64)-2 << 31))
578   {
579      man >>= 1;
580      exp++;
581   }
582
583   // if the mantissa is < 1.0 and > -1.0, normalize
584   else if (man < ((INT64)1 << 31) && man >= ((INT64)-1 << 31))
585   {
586      if (man > 0)
587      {
588         cnt = count_leading_zeros((UINT32)man);
589         man <<= cnt;
590         exp -= cnt;
591      }
592      else
593      {
594         cnt = count_leading_ones((UINT32)man);
595         man <<= cnt;
596         exp -= cnt;
597      }
598   }
599
600   // check for underflow
601   if (exp <= -128)
602   {
603      man = 0x80000000;
604      exp = -128;
605      IREG(TMR_ST) |= UFFLAG | LUFFLAG;
606   }
607
608   // check for overflow
609   else if (exp > 127)
610   {
611      man = (man < 0) ? 0x00000000 : 0xffffffff;
612      exp = 127;
613      IREG(TMR_ST) |= VFLAG | LVFLAG;
614   }
615
616   // store the result back, removing the implicit one and putting
617   // back the sign bit
618   dst.set_mantissa((UINT32)man ^ 0x80000000);
619   dst.set_exponent(exp);
620   OR_NZF(dst);
621}
622#endif
623
624
625// subtract two floating point values
626#if USE_FP
627void tms3203x_device::subf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
628{
629   double val = src1.as_double() - src2.as_double();
630   double_to_dsp_with_flags(val, dst);
631}
632#else
633void tms3203x_device::subf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
634{
635   INT64 man;
636   INT64 m1, m2;
637   int exp, cnt;
638
639   // reset over/underflow conditions
640   CLR_NZVUF();
641
642   // first check for 0 operands
643   if (src2.exponent() == -128)
644   {
645      dst = src1;
646      OR_NZF(dst);
647      return;
648   }
649
650   // extract mantissas from 1.0.31 values to 1.1.31 values
651   m1 = (INT64)src1.mantissa() ^ 0x80000000;
652   m2 = (INT64)src2.mantissa() ^ 0x80000000;
653
654   // normalize based on the exponent
655   if (src1.exponent() > src2.exponent())
656   {
657      exp = src1.exponent();
658      cnt = exp - src2.exponent();
659      if (cnt >= 32)
660      {
661         dst = src1;
662         OR_NZF(dst);
663         return;
664      }
665      m2 >>= cnt;
666   }
667   else
668   {
669      exp = src2.exponent();
670      cnt = exp - src1.exponent();
671      if (cnt >= 32)
672      {
673         negf(dst, src2);
674         return;
675      }
676      m1 >>= cnt;
677   }
678
679   // subtract
680   man = m1 - m2;
681
682   // if the mantissa is zero, set the exponent appropriately
683   if (man == 0 || exp == -128)
684   {
685      exp = -128;
686      man = 0x80000000;
687   }
688
689   // if the mantissa is >= 2.0 or < -2.0, normalize
690   else if (man >= ((INT64)2 << 31) || man < ((INT64)-2 << 31))
691   {
692      man >>= 1;
693      exp++;
694   }
695
696   // if the mantissa is < 1.0 and > -1.0, normalize
697   else if (man < ((INT64)1 << 31) && man >= ((INT64)-1 << 31))
698   {
699      if (man > 0)
700      {
701         cnt = count_leading_zeros((UINT32)man);
702         man <<= cnt;
703         exp -= cnt;
704      }
705      else
706      {
707         cnt = count_leading_ones((UINT32)man);
708         man <<= cnt;
709         exp -= cnt;
710      }
711   }
712
713   // check for underflow
714   if (exp <= -128)
715   {
716      // make sure a 0 result doesn't set underflow
717      if (man != 0 || exp < -128)
718         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
719      man = 0x80000000;
720      exp = -128;
721   }
722
723   // check for overflow
724   else if (exp > 127)
725   {
726      man = (man < 0) ? 0x00000000 : 0xffffffff;
727      exp = 127;
728      IREG(TMR_ST) |= VFLAG | LVFLAG;
729   }
730
731   // store the result back, removing the implicit one and putting
732   // back the sign bit
733   dst.set_mantissa((UINT32)man ^ 0x80000000);
734   dst.set_exponent(exp);
735   OR_NZF(dst);
736}
737#endif
738
739
740// multiply two floating point values
741#if USE_FP
742void tms3203x_device::mpyf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
743{
744   double val = (double)src1.as_float() * (double)src2.as_float();
745   double_to_dsp_with_flags(val, dst);
746}
747#else
748void tms3203x_device::mpyf(tmsreg &dst, tmsreg &src1, tmsreg &src2)
749{
750   // reset over/underflow conditions
751   CLR_NZVUF();
752
753   // first check for 0 multipliers and return 0 in any case
754   if (src1.exponent() == -128 || src2.exponent() == -128)
755   {
756      dst.set_mantissa(0);
757      dst.set_exponent(-128);
758      OR_NZF(dst);
759      return;
760   }
761
762   // convert the mantissas from 1.0.31 numbers to 1.1.23 numbers
763   INT32 m1 = (src1.mantissa() >> 8) ^ 0x800000;
764   INT32 m2 = (src2.mantissa() >> 8) ^ 0x800000;
765
766   // multiply the mantissas and add the exponents
767   INT64 man = (INT64)m1 * (INT64)m2;
768   int exp = src1.exponent() + src2.exponent();
769
770   // chop off the low bits, going from 1.2.46 down to 1.2.31
771   man >>= 46 - 31;
772
773   // if the mantissa is zero, set the exponent appropriately
774   if (man == 0)
775   {
776      exp = -128;
777      man = 0x80000000;
778   }
779
780   // if the mantissa is >= 2.0 or <= -2.0, normalize
781   else if (man >= ((INT64)2 << 31))
782   {
783      man >>= 1;
784      exp++;
785      if (man >= ((INT64)2 << 31))
786      {
787         man >>= 1;
788         exp++;
789      }
790   }
791
792   // if the mantissa is >= 2.0 or <= -2.0, normalize
793   else if (man < ((INT64)-2 << 31))
794   {
795      man >>= 1;
796      exp++;
797   }
798
799   // check for underflow
800   if (exp <= -128)
801   {
802      man = 0x80000000;
803      exp = -128;
804      IREG(TMR_ST) |= UFFLAG | LUFFLAG;
805   }
806
807   // check for overflow
808   else if (exp > 127)
809   {
810      man = (man < 0) ? 0x00000000 : 0xffffffff;
811      exp = 127;
812      IREG(TMR_ST) |= VFLAG | LVFLAG;
813   }
814
815   // store the result back, removing the implicit one and putting
816   // back the sign bit
817   dst.set_mantissa((UINT32)man ^ 0x80000000);
818   dst.set_exponent(exp);
819   OR_NZF(dst);
820}
821#endif
822
823
824// normalize a floating point value
825#if USE_FP
826void tms3203x_device::norm(tmsreg &dst, tmsreg &src)
827{
828   fatalerror("norm not implemented\n");
829}
830#else
831void tms3203x_device::norm(tmsreg &dst, tmsreg &src)
832{
833   INT32 man = src.mantissa();
834   int exp = src.exponent();
835
836   CLR_NZVUF();
837
838   if (exp == -128 || man == 0)
839   {
840      dst.set_mantissa(0);
841      dst.set_exponent(-128);
842      if (man != 0)
843         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
844   }
845   else
846   {
847      int cnt;
848      if (man > 0)
849      {
850         cnt = count_leading_zeros((UINT32)man);
851         man <<= cnt;
852         exp -= cnt;
853      }
854      else
855      {
856         cnt = count_leading_ones((UINT32)man);
857         man <<= cnt;
858         exp -= cnt;
859      }
860
861      // check for underflow
862      if (exp <= -128)
863      {
864         man = 0x00000000;
865         exp = -128;
866         IREG(TMR_ST) |= UFFLAG | LUFFLAG;
867      }
868   }
869
870   dst.set_mantissa(man);
871   dst.set_exponent(exp);
872   OR_NZF(dst);
873}
874#endif
875
876
877
878
879//**************************************************************************
880//  INDIRECT MEMORY REFS
881//**************************************************************************
882
883// immediate displacement variants
884
885UINT32 tms3203x_device::mod00_d(UINT32 op, UINT8 ar)
886{
887   int reg = TMR_AR0 + (ar & 7);
888   return IREG(reg) + (UINT8)op;
889}
890
891UINT32 tms3203x_device::mod01_d(UINT32 op, UINT8 ar)
892{
893   int reg = TMR_AR0 + (ar & 7);
894   return IREG(reg) - (UINT8)op;
895}
896
897UINT32 tms3203x_device::mod02_d(UINT32 op, UINT8 ar)
898{
899   int reg = TMR_AR0 + (ar & 7);
900   IREG(reg) += (UINT8)op;
901   return IREG(reg);
902}
903
904UINT32 tms3203x_device::mod03_d(UINT32 op, UINT8 ar)
905{
906   int reg = TMR_AR0 + (ar & 7);
907   IREG(reg) -= (UINT8)op;
908   return IREG(reg);
909}
910
911UINT32 tms3203x_device::mod04_d(UINT32 op, UINT8 ar)
912{
913   int reg = TMR_AR0 + (ar & 7);
914   UINT32 result = IREG(reg);
915   IREG(reg) += (UINT8)op;
916   return result;
917}
918
919UINT32 tms3203x_device::mod05_d(UINT32 op, UINT8 ar)
920{
921   int reg = TMR_AR0 + (ar & 7);
922   UINT32 result = IREG(reg);
923   IREG(reg) -= (UINT8)op;
924   return result;
925}
926
927UINT32 tms3203x_device::mod06_d(UINT32 op, UINT8 ar)
928{
929   int reg = TMR_AR0 + (ar & 7);
930   UINT32 result = IREG(reg);
931   INT32 temp = (result & m_bkmask) + (UINT8)op;
932   if (temp >= IREG(TMR_BK))
933      temp -= IREG(TMR_BK);
934   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
935   return result;
936}
937
938UINT32 tms3203x_device::mod07_d(UINT32 op, UINT8 ar)
939{
940   int reg = TMR_AR0 + (ar & 7);
941   UINT32 result = IREG(reg);
942   INT32 temp = (result & m_bkmask) - (UINT8)op;
943   if (temp < 0)
944      temp += IREG(TMR_BK);
945   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
946   return result;
947}
948
949
950// immediate displacement variants (implied 1)
951
952UINT32 tms3203x_device::mod00_1(UINT32 op, UINT8 ar)
953{
954   int reg = TMR_AR0 + (ar & 7);
955   return IREG(reg) + 1;
956}
957
958UINT32 tms3203x_device::mod01_1(UINT32 op, UINT8 ar)
959{
960   int reg = TMR_AR0 + (ar & 7);
961   return IREG(reg) - 1;
962}
963
964UINT32 tms3203x_device::mod02_1(UINT32 op, UINT8 ar)
965{
966   int reg = TMR_AR0 + (ar & 7);
967   return ++IREG(reg);
968}
969
970UINT32 tms3203x_device::mod03_1(UINT32 op, UINT8 ar)
971{
972   int reg = TMR_AR0 + (ar & 7);
973   return --IREG(reg);
974}
975
976UINT32 tms3203x_device::mod04_1(UINT32 op, UINT8 ar)
977{
978   int reg = TMR_AR0 + (ar & 7);
979   return IREG(reg)++;
980}
981
982UINT32 tms3203x_device::mod05_1(UINT32 op, UINT8 ar)
983{
984   int reg = TMR_AR0 + (ar & 7);
985   return IREG(reg)--;
986}
987
988UINT32 tms3203x_device::mod06_1(UINT32 op, UINT8 ar)
989{
990   int reg = TMR_AR0 + (ar & 7);
991   UINT32 result = IREG(reg);
992   INT32 temp = (result & m_bkmask) + 1;
993   if (temp >= IREG(TMR_BK))
994      temp -= IREG(TMR_BK);
995   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
996   return result;
997}
998
999UINT32 tms3203x_device::mod07_1(UINT32 op, UINT8 ar)
1000{
1001   int reg = TMR_AR0 + (ar & 7);
1002   UINT32 result = IREG(reg);
1003   INT32 temp = (result & m_bkmask) - 1;
1004   if (temp < 0)
1005      temp += IREG(TMR_BK);
1006   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1007   return result;
1008}
1009
1010
1011// IR0 displacement variants
1012
1013UINT32 tms3203x_device::mod08(UINT32 op, UINT8 ar)
1014{
1015   int reg = TMR_AR0 + (ar & 7);
1016   return IREG(reg) + IREG(TMR_IR0);
1017}
1018
1019UINT32 tms3203x_device::mod09(UINT32 op, UINT8 ar)
1020{
1021   int reg = TMR_AR0 + (ar & 7);
1022   return IREG(reg) - IREG(TMR_IR0);
1023}
1024
1025UINT32 tms3203x_device::mod0a(UINT32 op, UINT8 ar)
1026{
1027   int reg = TMR_AR0 + (ar & 7);
1028   IREG(reg) += IREG(TMR_IR0);
1029   return IREG(reg);
1030}
1031
1032UINT32 tms3203x_device::mod0b(UINT32 op, UINT8 ar)
1033{
1034   int reg = TMR_AR0 + (ar & 7);
1035   IREG(reg) -= IREG(TMR_IR0);
1036   return IREG(reg);
1037}
1038
1039UINT32 tms3203x_device::mod0c(UINT32 op, UINT8 ar)
1040{
1041   int reg = TMR_AR0 + (ar & 7);
1042   UINT32 result = IREG(reg);
1043   IREG(reg) += IREG(TMR_IR0);
1044   return result;
1045}
1046
1047UINT32 tms3203x_device::mod0d(UINT32 op, UINT8 ar)
1048{
1049   int reg = TMR_AR0 + (ar & 7);
1050   UINT32 result = IREG(reg);
1051   IREG(reg) -= IREG(TMR_IR0);
1052   return result;
1053}
1054
1055UINT32 tms3203x_device::mod0e(UINT32 op, UINT8 ar)
1056{
1057   int reg = TMR_AR0 + (ar & 7);
1058   UINT32 result = IREG(reg);
1059   INT32 temp = (result & m_bkmask) + IREG(TMR_IR0);
1060   if (temp >= IREG(TMR_BK))
1061      temp -= IREG(TMR_BK);
1062   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1063   return result;
1064}
1065
1066UINT32 tms3203x_device::mod0f(UINT32 op, UINT8 ar)
1067{
1068   int reg = TMR_AR0 + (ar & 7);
1069   UINT32 result = IREG(reg);
1070   INT32 temp = (result & m_bkmask) - IREG(TMR_IR0);
1071   if (temp < 0)
1072      temp += IREG(TMR_BK);
1073   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1074   return result;
1075}
1076
1077
1078// IR1 displacement variants
1079
1080UINT32 tms3203x_device::mod10(UINT32 op, UINT8 ar)
1081{
1082   int reg = TMR_AR0 + (ar & 7);
1083   return IREG(reg) + IREG(TMR_IR1);
1084}
1085
1086UINT32 tms3203x_device::mod11(UINT32 op, UINT8 ar)
1087{
1088   int reg = TMR_AR0 + (ar & 7);
1089   return IREG(reg) - IREG(TMR_IR1);
1090}
1091
1092UINT32 tms3203x_device::mod12(UINT32 op, UINT8 ar)
1093{
1094   int reg = TMR_AR0 + (ar & 7);
1095   IREG(reg) += IREG(TMR_IR1);
1096   return IREG(reg);
1097}
1098
1099UINT32 tms3203x_device::mod13(UINT32 op, UINT8 ar)
1100{
1101   int reg = TMR_AR0 + (ar & 7);
1102   IREG(reg) -= IREG(TMR_IR1);
1103   return IREG(reg);
1104}
1105
1106UINT32 tms3203x_device::mod14(UINT32 op, UINT8 ar)
1107{
1108   int reg = TMR_AR0 + (ar & 7);
1109   UINT32 result = IREG(reg);
1110   IREG(reg) += IREG(TMR_IR1);
1111   return result;
1112}
1113
1114UINT32 tms3203x_device::mod15(UINT32 op, UINT8 ar)
1115{
1116   int reg = TMR_AR0 + (ar & 7);
1117   UINT32 result = IREG(reg);
1118   IREG(reg) -= IREG(TMR_IR1);
1119   return result;
1120}
1121
1122UINT32 tms3203x_device::mod16(UINT32 op, UINT8 ar)
1123{
1124   int reg = TMR_AR0 + (ar & 7);
1125   UINT32 result = IREG(reg);
1126   INT32 temp = (result & m_bkmask) + IREG(TMR_IR1);
1127   if (temp >= IREG(TMR_BK))
1128      temp -= IREG(TMR_BK);
1129   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1130   return result;
1131}
1132
1133UINT32 tms3203x_device::mod17(UINT32 op, UINT8 ar)
1134{
1135   int reg = TMR_AR0 + (ar & 7);
1136   UINT32 result = IREG(reg);
1137   INT32 temp = (result & m_bkmask) - IREG(TMR_IR1);
1138   if (temp < 0)
1139      temp += IREG(TMR_BK);
1140   IREG(reg) = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1141   return result;
1142}
1143
1144
1145// special variants
1146
1147UINT32 tms3203x_device::mod18(UINT32 op, UINT8 ar)
1148{
1149   int reg = TMR_AR0 + (ar & 7);
1150   return IREG(reg);
1151}
1152
1153UINT32 tms3203x_device::mod19(UINT32 op, UINT8 ar)
1154{
1155   unimplemented(op);
1156   return 0;
1157}
1158
1159UINT32 tms3203x_device::modillegal(UINT32 op, UINT8 ar)
1160{
1161   illegal(op);
1162   return 0;
1163}
1164
1165
1166// immediate displacement variants (implied 1)
1167
1168UINT32 tms3203x_device::mod00_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1169{
1170   int reg = TMR_AR0 + (ar & 7);
1171   return IREG(reg) + 1;
1172}
1173
1174UINT32 tms3203x_device::mod01_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1175{
1176   int reg = TMR_AR0 + (ar & 7);
1177   return IREG(reg) - 1;
1178}
1179
1180UINT32 tms3203x_device::mod02_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1181{
1182   int reg = TMR_AR0 + (ar & 7);
1183   UINT32 defval = IREG(reg) + 1;
1184   *defptrptr = defval;
1185   defptrptr = &IREG(reg);
1186   return defval;
1187}
1188
1189UINT32 tms3203x_device::mod03_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1190{
1191   int reg = TMR_AR0 + (ar & 7);
1192   UINT32 defval = IREG(reg) - 1;
1193   *defptrptr = defval;
1194   defptrptr = &IREG(reg);
1195   return defval;
1196}
1197
1198UINT32 tms3203x_device::mod04_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1199{
1200   int reg = TMR_AR0 + (ar & 7);
1201   *defptrptr = IREG(reg) + 1;
1202   defptrptr = &IREG(reg);
1203   return IREG(reg);
1204}
1205
1206UINT32 tms3203x_device::mod05_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1207{
1208   int reg = TMR_AR0 + (ar & 7);
1209   *defptrptr = IREG(reg) - 1;
1210   defptrptr = &IREG(reg);
1211   return IREG(reg);
1212}
1213
1214UINT32 tms3203x_device::mod06_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1215{
1216   int reg = TMR_AR0 + (ar & 7);
1217   UINT32 result = IREG(reg);
1218   INT32 temp = (result & m_bkmask) + 1;
1219   if (temp >= IREG(TMR_BK))
1220      temp -= IREG(TMR_BK);
1221   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1222   defptrptr = &IREG(reg);
1223   return result;
1224}
1225
1226UINT32 tms3203x_device::mod07_1_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1227{
1228   int reg = TMR_AR0 + (ar & 7);
1229   UINT32 result = IREG(reg);
1230   INT32 temp = (result & m_bkmask) - 1;
1231   if (temp < 0)
1232      temp += IREG(TMR_BK);
1233   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1234   defptrptr = &IREG(reg);
1235   return result;
1236}
1237
1238
1239// IR0 displacement variants
1240
1241UINT32 tms3203x_device::mod08_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1242{
1243   int reg = TMR_AR0 + (ar & 7);
1244   return IREG(reg) + IREG(TMR_IR0);
1245}
1246
1247UINT32 tms3203x_device::mod09_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1248{
1249   int reg = TMR_AR0 + (ar & 7);
1250   return IREG(reg) - IREG(TMR_IR0);
1251}
1252
1253UINT32 tms3203x_device::mod0a_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1254{
1255   int reg = TMR_AR0 + (ar & 7);
1256   UINT32 defval = IREG(reg) + IREG(TMR_IR0);
1257   *defptrptr = defval;
1258   defptrptr = &IREG(reg);
1259   return defval;
1260}
1261
1262UINT32 tms3203x_device::mod0b_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1263{
1264   int reg = TMR_AR0 + (ar & 7);
1265   UINT32 defval = IREG(reg) - IREG(TMR_IR0);
1266   *defptrptr = defval;
1267   defptrptr = &IREG(reg);
1268   return defval;
1269}
1270
1271UINT32 tms3203x_device::mod0c_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1272{
1273   int reg = TMR_AR0 + (ar & 7);
1274   *defptrptr = IREG(reg) + IREG(TMR_IR0);
1275   defptrptr = &IREG(reg);
1276   return IREG(reg);
1277}
1278
1279UINT32 tms3203x_device::mod0d_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1280{
1281   int reg = TMR_AR0 + (ar & 7);
1282   *defptrptr = IREG(reg) - IREG(TMR_IR0);
1283   defptrptr = &IREG(reg);
1284   return IREG(reg);
1285}
1286
1287UINT32 tms3203x_device::mod0e_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1288{
1289   int reg = TMR_AR0 + (ar & 7);
1290   UINT32 result = IREG(reg);
1291   INT32 temp = (result & m_bkmask) + IREG(TMR_IR0);
1292   if (temp >= IREG(TMR_BK))
1293      temp -= IREG(TMR_BK);
1294   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1295   defptrptr = &IREG(reg);
1296   return result;
1297}
1298
1299UINT32 tms3203x_device::mod0f_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1300{
1301   int reg = TMR_AR0 + (ar & 7);
1302   UINT32 result = IREG(reg);
1303   INT32 temp = (result & m_bkmask) - IREG(TMR_IR0);
1304   if (temp < 0)
1305      temp += IREG(TMR_BK);
1306   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1307   defptrptr = &IREG(reg);
1308   return result;
1309}
1310
1311
1312// IR1 displacement variants
1313
1314UINT32 tms3203x_device::mod10_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1315{
1316   int reg = TMR_AR0 + (ar & 7);
1317   return IREG(reg) + IREG(TMR_IR1);
1318}
1319
1320UINT32 tms3203x_device::mod11_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1321{
1322   int reg = TMR_AR0 + (ar & 7);
1323   return IREG(reg) - IREG(TMR_IR1);
1324}
1325
1326UINT32 tms3203x_device::mod12_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1327{
1328   int reg = TMR_AR0 + (ar & 7);
1329   UINT32 defval = IREG(reg) + IREG(TMR_IR1);
1330   *defptrptr = defval;
1331   defptrptr = &IREG(reg);
1332   return defval;
1333}
1334
1335UINT32 tms3203x_device::mod13_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1336{
1337   int reg = TMR_AR0 + (ar & 7);
1338   UINT32 defval = IREG(reg) - IREG(TMR_IR1);
1339   *defptrptr = defval;
1340   defptrptr = &IREG(reg);
1341   return defval;
1342}
1343
1344UINT32 tms3203x_device::mod14_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1345{
1346   int reg = TMR_AR0 + (ar & 7);
1347   *defptrptr = IREG(reg) + IREG(TMR_IR1);
1348   defptrptr = &IREG(reg);
1349   return IREG(reg);
1350}
1351
1352UINT32 tms3203x_device::mod15_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1353{
1354   int reg = TMR_AR0 + (ar & 7);
1355   *defptrptr = IREG(reg) - IREG(TMR_IR1);
1356   defptrptr = &IREG(reg);
1357   return IREG(reg);
1358}
1359
1360UINT32 tms3203x_device::mod16_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1361{
1362   int reg = TMR_AR0 + (ar & 7);
1363   UINT32 result = IREG(reg);
1364   INT32 temp = (result & m_bkmask) + IREG(TMR_IR1);
1365   if (temp >= IREG(TMR_BK))
1366      temp -= IREG(TMR_BK);
1367   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1368   defptrptr = &IREG(reg);
1369   return result;
1370}
1371
1372UINT32 tms3203x_device::mod17_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1373{
1374   int reg = TMR_AR0 + (ar & 7);
1375   UINT32 result = IREG(reg);
1376   INT32 temp = (result & m_bkmask) - IREG(TMR_IR1);
1377   if (temp < 0)
1378      temp += IREG(TMR_BK);
1379   *defptrptr = (IREG(reg) & ~m_bkmask) | (temp & m_bkmask);
1380   defptrptr = &IREG(reg);
1381   return result;
1382}
1383
1384UINT32 tms3203x_device::mod18_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1385{
1386   int reg = TMR_AR0 + (ar & 7);
1387   return IREG(reg);
1388}
1389
1390UINT32 tms3203x_device::mod19_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1391{
1392   unimplemented(op);
1393   return 0;
1394}
1395
1396UINT32 tms3203x_device::modillegal_def(UINT32 op, UINT8 ar, UINT32 *&defptrptr)
1397{
1398   illegal(op);
1399   return 0;
1400}
1401
1402
1403/*-----------------------------------------------------*/
1404
1405#define ABSF(dreg, sreg)                                                \
1406{                                                                       \
1407   INT32 man = FREGMAN(sreg);                                          \
1408   CLR_NZVUF();                                                        \
1409   m_r[dreg] = m_r[sreg];                              \
1410   if (man < 0)                                                        \
1411   {                                                                   \
1412      m_r[dreg].set_mantissa(~man);                           \
1413      if (man == (INT32)0x80000000 && FREGEXP(sreg) == 127)           \
1414         IREG(TMR_ST) |= VFLAG | LVFLAG;                             \
1415   }                                                                   \
1416   OR_NZF(m_r[dreg]);                                          \
1417}
1418
1419void tms3203x_device::absf_reg(UINT32 op)
1420{
1421   int dreg = (op >> 16) & 7;
1422   int sreg = op & 7;
1423   ABSF(dreg, sreg);
1424}
1425
1426void tms3203x_device::absf_dir(UINT32 op)
1427{
1428   UINT32 res = RMEM(DIRECT(op));
1429   int dreg = (op >> 16) & 7;
1430   LONG2FP(TMR_TEMP1, res);
1431   ABSF(dreg, TMR_TEMP1);
1432}
1433
1434void tms3203x_device::absf_ind(UINT32 op)
1435{
1436   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1437   int dreg = (op >> 16) & 7;
1438   LONG2FP(TMR_TEMP1, res);
1439   ABSF(dreg, TMR_TEMP1);
1440}
1441
1442void tms3203x_device::absf_imm(UINT32 op)
1443{
1444   int dreg = (op >> 16) & 7;
1445   SHORT2FP(TMR_TEMP1, op);
1446   ABSF(dreg, TMR_TEMP1);
1447}
1448
1449/*-----------------------------------------------------*/
1450
1451#define ABSI(dreg, src)                                             \
1452{                                                                   \
1453   UINT32 _res = ((INT32)src < 0) ? -src : src;                    \
1454   if (!OVM() || _res != 0x80000000)                                   \
1455      IREG(dreg) = _res;                                          \
1456   else                                                            \
1457      IREG(dreg) = 0x7fffffff;                                    \
1458   if (dreg < 8)                                                   \
1459   {                                                               \
1460      CLR_NZVUF();                                                \
1461      OR_NZ(_res);                                                \
1462      if (_res == 0x80000000)                                     \
1463         IREG(TMR_ST) |= VFLAG | LVFLAG;                         \
1464   }                                                               \
1465   else if (dreg >= TMR_BK)                                        \
1466      update_special(dreg);                                       \
1467}
1468
1469void tms3203x_device::absi_reg(UINT32 op)
1470{
1471   UINT32 src = IREG(op & 31);
1472   int dreg = (op >> 16) & 31;
1473   ABSI(dreg, src);
1474}
1475
1476void tms3203x_device::absi_dir(UINT32 op)
1477{
1478   UINT32 src = RMEM(DIRECT(op));
1479   int dreg = (op >> 16) & 31;
1480   ABSI(dreg, src);
1481}
1482
1483void tms3203x_device::absi_ind(UINT32 op)
1484{
1485   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1486   int dreg = (op >> 16) & 31;
1487   ABSI(dreg, src);
1488}
1489
1490void tms3203x_device::absi_imm(UINT32 op)
1491{
1492   UINT32 src = (INT16)op;
1493   int dreg = (op >> 16) & 31;
1494   ABSI(dreg, src);
1495}
1496
1497/*-----------------------------------------------------*/
1498
1499#define ADDC(dreg, src1, src2)                                      \
1500{                                                                   \
1501   UINT32 _res = src1 + src2 + (IREG(TMR_ST) & CFLAG);             \
1502   if (!OVM() || !OVERFLOW_ADD(src1,src2,_res))                    \
1503      IREG(dreg) = _res;                                          \
1504   else                                                            \
1505      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
1506   if (dreg < 8)                                                   \
1507   {                                                               \
1508      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
1509      CLR_NZCVUF();                                               \
1510      OR_C_ADC(src1,src2,tempc);                                  \
1511      OR_V_ADD(src1,src2,_res);                                   \
1512      OR_NZ(_res);                                                \
1513   }                                                               \
1514   else if (dreg >= TMR_BK)                                        \
1515      update_special(dreg);                                       \
1516}
1517
1518void tms3203x_device::addc_reg(UINT32 op)
1519{
1520   UINT32 src = IREG(op & 31);
1521   int dreg = (op >> 16) & 31;
1522   UINT32 dst = IREG(dreg);
1523   ADDC(dreg, dst, src);
1524}
1525
1526void tms3203x_device::addc_dir(UINT32 op)
1527{
1528   UINT32 src = RMEM(DIRECT(op));
1529   int dreg = (op >> 16) & 31;
1530   UINT32 dst = IREG(dreg);
1531   ADDC(dreg, dst, src);
1532}
1533
1534void tms3203x_device::addc_ind(UINT32 op)
1535{
1536   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1537   int dreg = (op >> 16) & 31;
1538   UINT32 dst = IREG(dreg);
1539   ADDC(dreg, dst, src);
1540}
1541
1542void tms3203x_device::addc_imm(UINT32 op)
1543{
1544   UINT32 src = (INT16)op;
1545   int dreg = (op >> 16) & 31;
1546   UINT32 dst = IREG(dreg);
1547   ADDC(dreg, dst, src);
1548}
1549
1550/*-----------------------------------------------------*/
1551
1552void tms3203x_device::addf_reg(UINT32 op)
1553{
1554   int dreg = (op >> 16) & 7;
1555   addf(m_r[dreg], m_r[dreg], m_r[op & 7]);
1556}
1557
1558void tms3203x_device::addf_dir(UINT32 op)
1559{
1560   UINT32 res = RMEM(DIRECT(op));
1561   int dreg = (op >> 16) & 7;
1562   LONG2FP(TMR_TEMP1, res);
1563   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1564}
1565
1566void tms3203x_device::addf_ind(UINT32 op)
1567{
1568   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1569   int dreg = (op >> 16) & 7;
1570   LONG2FP(TMR_TEMP1, res);
1571   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1572}
1573
1574void tms3203x_device::addf_imm(UINT32 op)
1575{
1576   int dreg = (op >> 16) & 7;
1577   SHORT2FP(TMR_TEMP1, op);
1578   addf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
1579}
1580
1581/*-----------------------------------------------------*/
1582
1583#define ADDI(dreg, src1, src2)                                      \
1584{                                                                   \
1585   UINT32 _res = src1 + src2;                                      \
1586   if (!OVM() || !OVERFLOW_ADD(src1,src2,_res))                    \
1587      IREG(dreg) = _res;                                          \
1588   else                                                            \
1589      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
1590   if (dreg < 8)                                                   \
1591   {                                                               \
1592      CLR_NZCVUF();                                               \
1593      OR_C_ADD(src1,src2,_res);                                   \
1594      OR_V_ADD(src1,src2,_res);                                   \
1595      OR_NZ(_res);                                                \
1596   }                                                               \
1597   else if (dreg >= TMR_BK)                                        \
1598      update_special(dreg);                                       \
1599}
1600
1601void tms3203x_device::addi_reg(UINT32 op)
1602{
1603   UINT32 src = IREG(op & 31);
1604   int dreg = (op >> 16) & 31;
1605   UINT32 dst = IREG(dreg);
1606   ADDI(dreg, dst, src);
1607}
1608
1609void tms3203x_device::addi_dir(UINT32 op)
1610{
1611   UINT32 src = RMEM(DIRECT(op));
1612   int dreg = (op >> 16) & 31;
1613   UINT32 dst = IREG(dreg);
1614   ADDI(dreg, dst, src);
1615}
1616
1617void tms3203x_device::addi_ind(UINT32 op)
1618{
1619   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1620   int dreg = (op >> 16) & 31;
1621   UINT32 dst = IREG(dreg);
1622   ADDI(dreg, dst, src);
1623}
1624
1625void tms3203x_device::addi_imm(UINT32 op)
1626{
1627   UINT32 src = (INT16)op;
1628   int dreg = (op >> 16) & 31;
1629   UINT32 dst = IREG(dreg);
1630   ADDI(dreg, dst, src);
1631}
1632
1633/*-----------------------------------------------------*/
1634
1635#define AND(dreg, src1, src2)                                       \
1636{                                                                   \
1637   UINT32 _res = (src1) & (src2);                                  \
1638   IREG(dreg) = _res;                                              \
1639   if (dreg < 8)                                                   \
1640   {                                                               \
1641      CLR_NZVUF();                                                \
1642      OR_NZ(_res);                                                \
1643   }                                                               \
1644   else if (dreg >= TMR_BK)                                        \
1645      update_special(dreg);                                       \
1646}
1647
1648void tms3203x_device::and_reg(UINT32 op)
1649{
1650   UINT32 src = IREG(op & 31);
1651   int dreg = (op >> 16) & 31;
1652   UINT32 dst = IREG(dreg);
1653   AND(dreg, dst, src);
1654}
1655
1656void tms3203x_device::and_dir(UINT32 op)
1657{
1658   UINT32 src = RMEM(DIRECT(op));
1659   int dreg = (op >> 16) & 31;
1660   UINT32 dst = IREG(dreg);
1661   AND(dreg, dst, src);
1662}
1663
1664void tms3203x_device::and_ind(UINT32 op)
1665{
1666   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1667   int dreg = (op >> 16) & 31;
1668   UINT32 dst = IREG(dreg);
1669   AND(dreg, dst, src);
1670}
1671
1672void tms3203x_device::and_imm(UINT32 op)
1673{
1674   UINT32 src = (UINT16)op;
1675   int dreg = (op >> 16) & 31;
1676   UINT32 dst = IREG(dreg);
1677   AND(dreg, dst, src);
1678}
1679
1680/*-----------------------------------------------------*/
1681
1682#define ANDN(dreg, src1, src2)                                      \
1683{                                                                   \
1684   UINT32 _res = (src1) & ~(src2);                                 \
1685   IREG(dreg) = _res;                                              \
1686   if (dreg < 8)                                                   \
1687   {                                                               \
1688      CLR_NZVUF();                                                \
1689      OR_NZ(_res);                                                \
1690   }                                                               \
1691   else if (dreg >= TMR_BK)                                        \
1692      update_special(dreg);                                       \
1693}
1694
1695void tms3203x_device::andn_reg(UINT32 op)
1696{
1697   UINT32 src = IREG(op & 31);
1698   int dreg = (op >> 16) & 31;
1699   UINT32 dst = IREG(dreg);
1700   ANDN(dreg, dst, src);
1701}
1702
1703void tms3203x_device::andn_dir(UINT32 op)
1704{
1705   UINT32 src = RMEM(DIRECT(op));
1706   int dreg = (op >> 16) & 31;
1707   UINT32 dst = IREG(dreg);
1708   ANDN(dreg, dst, src);
1709}
1710
1711void tms3203x_device::andn_ind(UINT32 op)
1712{
1713   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1714   int dreg = (op >> 16) & 31;
1715   UINT32 dst = IREG(dreg);
1716   ANDN(dreg, dst, src);
1717}
1718
1719void tms3203x_device::andn_imm(UINT32 op)
1720{
1721   UINT32 src = (UINT16)op;
1722   int dreg = (op >> 16) & 31;
1723   UINT32 dst = IREG(dreg);
1724   ANDN(dreg, dst, src);
1725}
1726
1727/*-----------------------------------------------------*/
1728
1729#define ASH(dreg, src, count)                                       \
1730{                                                                   \
1731   UINT32 _res;                                                    \
1732   INT32 _count = (INT16)(count << 9) >> 9;    /* 7 LSBs */        \
1733   if (_count < 0)                                                 \
1734   {                                                               \
1735      if (_count >= -31)                                          \
1736         _res = (INT32)src >> -_count;                           \
1737      else                                                        \
1738         _res = (INT32)src >> 31;                                \
1739   }                                                               \
1740   else                                                            \
1741   {                                                               \
1742      if (_count <= 31)                                           \
1743         _res = (INT32)src << _count;                            \
1744      else                                                        \
1745         _res = 0;                                               \
1746   }                                                               \
1747   IREG(dreg) = _res;                                              \
1748   if (dreg < 8)                                                   \
1749   {                                                               \
1750      CLR_NZCVUF();                                               \
1751      OR_NZ(_res);                                                \
1752      if (_count < 0)                                             \
1753      {                                                           \
1754         if (_count >= -32)                                      \
1755            OR_C(((INT32)src >> (-_count - 1)) & 1);            \
1756         else                                                    \
1757            OR_C(((INT32)src >> 31) & 1);                       \
1758      }                                                           \
1759      else if (_count > 0)                                        \
1760      {                                                           \
1761         if (_count <= 32)                                       \
1762            OR_C(((UINT32)src << (_count - 1)) >> 31);          \
1763      }                                                           \
1764   }                                                               \
1765   else if (dreg >= TMR_BK)                                        \
1766      update_special(dreg);                                       \
1767}
1768
1769void tms3203x_device::ash_reg(UINT32 op)
1770{
1771   int dreg = (op >> 16) & 31;
1772   int count = IREG(op & 31);
1773   UINT32 src = IREG(dreg);
1774   ASH(dreg, src, count);
1775}
1776
1777void tms3203x_device::ash_dir(UINT32 op)
1778{
1779   int dreg = (op >> 16) & 31;
1780   int count = RMEM(DIRECT(op));
1781   UINT32 src = IREG(dreg);
1782   ASH(dreg, src, count);
1783}
1784
1785void tms3203x_device::ash_ind(UINT32 op)
1786{
1787   int dreg = (op >> 16) & 31;
1788   int count = RMEM(INDIRECT_D(op, op >> 8));
1789   UINT32 src = IREG(dreg);
1790   ASH(dreg, src, count);
1791}
1792
1793void tms3203x_device::ash_imm(UINT32 op)
1794{
1795   int dreg = (op >> 16) & 31;
1796   int count = op;
1797   UINT32 src = IREG(dreg);
1798   ASH(dreg, src, count);
1799}
1800
1801/*-----------------------------------------------------*/
1802
1803void tms3203x_device::cmpf_reg(UINT32 op)
1804{
1805   int dreg = (op >> 16) & 7;
1806   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[op & 7]);
1807}
1808
1809void tms3203x_device::cmpf_dir(UINT32 op)
1810{
1811   UINT32 res = RMEM(DIRECT(op));
1812   int dreg = (op >> 16) & 7;
1813   LONG2FP(TMR_TEMP1, res);
1814   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1815}
1816
1817void tms3203x_device::cmpf_ind(UINT32 op)
1818{
1819   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1820   int dreg = (op >> 16) & 7;
1821   LONG2FP(TMR_TEMP1, res);
1822   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1823}
1824
1825void tms3203x_device::cmpf_imm(UINT32 op)
1826{
1827   int dreg = (op >> 16) & 7;
1828   SHORT2FP(TMR_TEMP1, op);
1829   subf(m_r[TMR_TEMP2], m_r[dreg], m_r[TMR_TEMP1]);
1830}
1831
1832/*-----------------------------------------------------*/
1833
1834#define CMPI(src1, src2)                                            \
1835{                                                                   \
1836   UINT32 _res = src1 - src2;                                      \
1837   CLR_NZCVUF();                                                   \
1838   OR_C_SUB(src1,src2,_res);                                       \
1839   OR_V_SUB(src1,src2,_res);                                       \
1840   OR_NZ(_res);                                                    \
1841}
1842
1843void tms3203x_device::cmpi_reg(UINT32 op)
1844{
1845   UINT32 src = IREG(op & 31);
1846   UINT32 dst = IREG((op >> 16) & 31);
1847   CMPI(dst, src);
1848}
1849
1850void tms3203x_device::cmpi_dir(UINT32 op)
1851{
1852   UINT32 src = RMEM(DIRECT(op));
1853   UINT32 dst = IREG((op >> 16) & 31);
1854   CMPI(dst, src);
1855}
1856
1857void tms3203x_device::cmpi_ind(UINT32 op)
1858{
1859   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1860   UINT32 dst = IREG((op >> 16) & 31);
1861   CMPI(dst, src);
1862}
1863
1864void tms3203x_device::cmpi_imm(UINT32 op)
1865{
1866   UINT32 src = (INT16)op;
1867   UINT32 dst = IREG((op >> 16) & 31);
1868   CMPI(dst, src);
1869}
1870
1871/*-----------------------------------------------------*/
1872
1873void tms3203x_device::fix_reg(UINT32 op)
1874{
1875   int dreg = (op >> 16) & 31;
1876   m_r[TMR_TEMP1] = m_r[op & 7];
1877   float2int(m_r[TMR_TEMP1], dreg < 8);
1878   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1879}
1880
1881void tms3203x_device::fix_dir(UINT32 op)
1882{
1883   UINT32 res = RMEM(DIRECT(op));
1884   int dreg = (op >> 16) & 31;
1885   LONG2FP(TMR_TEMP1, res);
1886   float2int(m_r[TMR_TEMP1], dreg < 8);
1887   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1888}
1889
1890void tms3203x_device::fix_ind(UINT32 op)
1891{
1892   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1893   int dreg = (op >> 16) & 31;
1894   LONG2FP(TMR_TEMP1, res);
1895   float2int(m_r[TMR_TEMP1], dreg < 8);
1896   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1897}
1898
1899void tms3203x_device::fix_imm(UINT32 op)
1900{
1901   int dreg = (op >> 16) & 31;
1902   SHORT2FP(TMR_TEMP1, op);
1903   float2int(m_r[TMR_TEMP1], dreg < 8);
1904   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
1905}
1906
1907/*-----------------------------------------------------*/
1908
1909#define FLOAT(dreg, src)                                            \
1910{                                                                   \
1911   IREG(dreg) = src;                                               \
1912   int2float(m_r[dreg]);                                   \
1913}
1914
1915void tms3203x_device::float_reg(UINT32 op)
1916{
1917   UINT32 src = IREG(op & 31);
1918   int dreg = (op >> 16) & 7;
1919   FLOAT(dreg, src);
1920}
1921
1922void tms3203x_device::float_dir(UINT32 op)
1923{
1924   UINT32 src = RMEM(DIRECT(op));
1925   int dreg = (op >> 16) & 7;
1926   FLOAT(dreg, src);
1927}
1928
1929void tms3203x_device::float_ind(UINT32 op)
1930{
1931   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
1932   int dreg = (op >> 16) & 7;
1933   FLOAT(dreg, src);
1934}
1935
1936void tms3203x_device::float_imm(UINT32 op)
1937{
1938   UINT32 src = (INT16)op;
1939   int dreg = (op >> 16) & 7;
1940   FLOAT(dreg, src);
1941}
1942
1943/*-----------------------------------------------------*/
1944
1945void tms3203x_device::idle(UINT32 op)
1946{
1947   m_is_idling = true;
1948   IREG(TMR_ST) |= GIEFLAG;
1949   check_irqs();
1950   if (m_is_idling)
1951      m_icount = 0;
1952}
1953
1954/*-----------------------------------------------------*/
1955
1956void tms3203x_device::lde_reg(UINT32 op)
1957{
1958   int dreg = (op >> 16) & 7;
1959   m_r[dreg].set_exponent(m_r[op & 7].exponent());
1960   if (m_r[dreg].exponent() == -128)
1961      m_r[dreg].set_mantissa(0);
1962}
1963
1964void tms3203x_device::lde_dir(UINT32 op)
1965{
1966   UINT32 res = RMEM(DIRECT(op));
1967   int dreg = (op >> 16) & 7;
1968   LONG2FP(TMR_TEMP1, res);
1969   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1970   if (m_r[dreg].exponent() == -128)
1971      m_r[dreg].set_mantissa(0);
1972}
1973
1974void tms3203x_device::lde_ind(UINT32 op)
1975{
1976   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
1977   int dreg = (op >> 16) & 7;
1978   LONG2FP(TMR_TEMP1, res);
1979   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1980   if (m_r[dreg].exponent() == -128)
1981      m_r[dreg].set_mantissa(0);
1982}
1983
1984void tms3203x_device::lde_imm(UINT32 op)
1985{
1986   int dreg = (op >> 16) & 7;
1987   SHORT2FP(TMR_TEMP1, op);
1988   m_r[dreg].set_exponent(m_r[TMR_TEMP1].exponent());
1989   if (m_r[dreg].exponent() == -128)
1990      m_r[dreg].set_mantissa(0);
1991}
1992
1993/*-----------------------------------------------------*/
1994
1995void tms3203x_device::ldf_reg(UINT32 op)
1996{
1997   int dreg = (op >> 16) & 7;
1998   m_r[dreg] = m_r[op & 7];
1999   CLR_NZVUF();
2000   OR_NZF(m_r[dreg]);
2001}
2002
2003void tms3203x_device::ldf_dir(UINT32 op)
2004{
2005   UINT32 res = RMEM(DIRECT(op));
2006   int dreg = (op >> 16) & 7;
2007   LONG2FP(dreg, res);
2008   CLR_NZVUF();
2009   OR_NZF(m_r[dreg]);
2010}
2011
2012void tms3203x_device::ldf_ind(UINT32 op)
2013{
2014   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2015   int dreg = (op >> 16) & 7;
2016   LONG2FP(dreg, res);
2017   CLR_NZVUF();
2018   OR_NZF(m_r[dreg]);
2019}
2020
2021void tms3203x_device::ldf_imm(UINT32 op)
2022{
2023   int dreg = (op >> 16) & 7;
2024   SHORT2FP(dreg, op);
2025   CLR_NZVUF();
2026   OR_NZF(m_r[dreg]);
2027}
2028
2029/*-----------------------------------------------------*/
2030
2031void tms3203x_device::ldfi_dir(UINT32 op) { unimplemented(op); }
2032void tms3203x_device::ldfi_ind(UINT32 op) { unimplemented(op); }
2033
2034/*-----------------------------------------------------*/
2035
2036#define LDI(dreg, src)                                              \
2037{                                                                   \
2038   IREG(dreg) = src;                                               \
2039   if (dreg < 8)                                                   \
2040   {                                                               \
2041      CLR_NZVUF();                                                \
2042      OR_NZ(src);                                                 \
2043   }                                                               \
2044   else if (dreg >= TMR_BK)                                        \
2045      update_special(dreg);                                       \
2046}
2047
2048void tms3203x_device::ldi_reg(UINT32 op)
2049{
2050   UINT32 src = IREG(op & 31);
2051   int dreg = (op >> 16) & 31;
2052   LDI(dreg, src);
2053}
2054
2055void tms3203x_device::ldi_dir(UINT32 op)
2056{
2057   UINT32 src = RMEM(DIRECT(op));
2058   int dreg = (op >> 16) & 31;
2059   LDI(dreg, src);
2060}
2061
2062void tms3203x_device::ldi_ind(UINT32 op)
2063{
2064   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2065   int dreg = (op >> 16) & 31;
2066   LDI(dreg, src);
2067}
2068
2069void tms3203x_device::ldi_imm(UINT32 op)
2070{
2071   UINT32 src = (INT16)op;
2072   int dreg = (op >> 16) & 31;
2073   LDI(dreg, src);
2074}
2075
2076/*-----------------------------------------------------*/
2077
2078void tms3203x_device::ldii_dir(UINT32 op) { unimplemented(op); }
2079void tms3203x_device::ldii_ind(UINT32 op) { unimplemented(op); }
2080
2081/*-----------------------------------------------------*/
2082
2083void tms3203x_device::ldm_reg(UINT32 op)
2084{
2085   int dreg = (op >> 16) & 7;
2086   m_r[dreg].set_mantissa(m_r[op & 7].mantissa());
2087}
2088
2089void tms3203x_device::ldm_dir(UINT32 op)
2090{
2091   UINT32 res = RMEM(DIRECT(op));
2092   int dreg = (op >> 16) & 7;
2093   m_r[dreg].set_mantissa(res);
2094}
2095
2096void tms3203x_device::ldm_ind(UINT32 op)
2097{
2098   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2099   int dreg = (op >> 16) & 7;
2100   m_r[dreg].set_mantissa(res);
2101}
2102
2103void tms3203x_device::ldm_imm(UINT32 op)
2104{
2105   int dreg = (op >> 16) & 7;
2106   SHORT2FP(TMR_TEMP1, op);
2107   m_r[dreg].set_mantissa(m_r[TMR_TEMP1].mantissa());
2108}
2109
2110/*-----------------------------------------------------*/
2111
2112#define LSH(dreg, src, count)                                       \
2113{                                                                   \
2114   UINT32 _res;                                                    \
2115   INT32 _count = (INT16)(count << 9) >> 9;    /* 7 LSBs */        \
2116   if (_count < 0)                                                 \
2117   {                                                               \
2118      if (_count >= -31)                                          \
2119         _res = (UINT32)src >> -_count;                          \
2120      else                                                        \
2121         _res = 0;                                               \
2122   }                                                               \
2123   else                                                            \
2124   {                                                               \
2125      if (_count <= 31)                                           \
2126         _res = (UINT32)src << _count;                           \
2127      else                                                        \
2128         _res = 0;                                               \
2129   }                                                               \
2130   IREG(dreg) = _res;                                              \
2131   if (dreg < 8)                                                   \
2132   {                                                               \
2133      CLR_NZCVUF();                                               \
2134      OR_NZ(_res);                                                \
2135      if (_count < 0)                                             \
2136      {                                                           \
2137         if (_count >= -32)                                      \
2138            OR_C(((UINT32)src >> (-_count - 1)) & 1);           \
2139      }                                                           \
2140      else if (_count > 0)                                        \
2141      {                                                           \
2142         if (_count <= 32)                                       \
2143            OR_C(((UINT32)src << (_count - 1)) >> 31);          \
2144      }                                                           \
2145   }                                                               \
2146   else if (dreg >= TMR_BK)                                        \
2147      update_special(dreg);                                       \
2148}
2149
2150void tms3203x_device::lsh_reg(UINT32 op)
2151{
2152   int dreg = (op >> 16) & 31;
2153   int count = IREG(op & 31);
2154   UINT32 src = IREG(dreg);
2155   LSH(dreg, src, count);
2156}
2157
2158void tms3203x_device::lsh_dir(UINT32 op)
2159{
2160   int dreg = (op >> 16) & 31;
2161   int count = RMEM(DIRECT(op));
2162   UINT32 src = IREG(dreg);
2163   LSH(dreg, src, count);
2164}
2165
2166void tms3203x_device::lsh_ind(UINT32 op)
2167{
2168   int dreg = (op >> 16) & 31;
2169   int count = RMEM(INDIRECT_D(op, op >> 8));
2170   UINT32 src = IREG(dreg);
2171   LSH(dreg, src, count);
2172}
2173
2174void tms3203x_device::lsh_imm(UINT32 op)
2175{
2176   int dreg = (op >> 16) & 31;
2177   int count = op;
2178   UINT32 src = IREG(dreg);
2179   LSH(dreg, src, count);
2180}
2181
2182/*-----------------------------------------------------*/
2183
2184void tms3203x_device::mpyf_reg(UINT32 op)
2185{
2186   int dreg = (op >> 16) & 31;
2187   mpyf(m_r[dreg], m_r[dreg], m_r[op & 31]);
2188}
2189
2190void tms3203x_device::mpyf_dir(UINT32 op)
2191{
2192   UINT32 res = RMEM(DIRECT(op));
2193   int dreg = (op >> 16) & 31;
2194   LONG2FP(TMR_TEMP1, res);
2195   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2196}
2197
2198void tms3203x_device::mpyf_ind(UINT32 op)
2199{
2200   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2201   int dreg = (op >> 16) & 31;
2202   LONG2FP(TMR_TEMP1, res);
2203   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2204}
2205
2206void tms3203x_device::mpyf_imm(UINT32 op)
2207{
2208   int dreg = (op >> 16) & 31;
2209   SHORT2FP(TMR_TEMP1, op);
2210   mpyf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2211}
2212
2213/*-----------------------------------------------------*/
2214
2215#define MPYI(dreg, src1, src2)                                      \
2216{                                                                   \
2217   INT64 _res = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);\
2218   if (!OVM() || (_res >= -(INT64)0x80000000 && _res <= (INT64)0x7fffffff))        \
2219      IREG(dreg) = _res;                                          \
2220   else                                                            \
2221      IREG(dreg) = (_res < 0) ? 0x80000000 : 0x7fffffff;          \
2222   if (dreg < 8)                                                   \
2223   {                                                               \
2224      CLR_NZVUF();                                                \
2225      OR_NZ((UINT32)_res);                                        \
2226      if (_res < -(INT64)0x80000000 || _res > (INT64)0x7fffffff)  \
2227         IREG(TMR_ST) |= VFLAG | LVFLAG;                         \
2228   }                                                               \
2229   else if (dreg >= TMR_BK)                                        \
2230      update_special(dreg);                                       \
2231}
2232
2233void tms3203x_device::mpyi_reg(UINT32 op)
2234{
2235   UINT32 src = IREG(op & 31);
2236   int dreg = (op >> 16) & 31;
2237   UINT32 dst = IREG(dreg);
2238   MPYI(dreg, dst, src);
2239}
2240
2241void tms3203x_device::mpyi_dir(UINT32 op)
2242{
2243   UINT32 src = RMEM(DIRECT(op));
2244   int dreg = (op >> 16) & 31;
2245   UINT32 dst = IREG(dreg);
2246   MPYI(dreg, dst, src);
2247}
2248
2249void tms3203x_device::mpyi_ind(UINT32 op)
2250{
2251   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2252   int dreg = (op >> 16) & 31;
2253   UINT32 dst = IREG(dreg);
2254   MPYI(dreg, dst, src);
2255}
2256
2257void tms3203x_device::mpyi_imm(UINT32 op)
2258{
2259   UINT32 src = (INT16)op;
2260   int dreg = (op >> 16) & 31;
2261   UINT32 dst = IREG(dreg);
2262   MPYI(dreg, dst, src);
2263}
2264
2265/*-----------------------------------------------------*/
2266
2267#define NEGB(dreg, src)                                             \
2268{                                                                   \
2269   UINT32 _res = 0 - src - (IREG(TMR_ST) & CFLAG);                 \
2270   if (!OVM() || !OVERFLOW_SUB(0,src,_res))                        \
2271      IREG(dreg) = _res;                                          \
2272   else                                                            \
2273      IREG(dreg) = ((INT32)src < 0) ? 0x80000000 : 0x7fffffff;    \
2274   if (dreg < 8)                                                   \
2275   {                                                               \
2276      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
2277      CLR_NZCVUF();                                               \
2278      OR_C_SBB(0,src,tempc);                                      \
2279      OR_V_SUB(0,src,_res);                                       \
2280      OR_NZ(_res);                                                \
2281   }                                                               \
2282   else if (dreg >= TMR_BK)                                        \
2283      update_special(dreg);                                       \
2284}
2285
2286void tms3203x_device::negb_reg(UINT32 op)
2287{
2288   UINT32 src = IREG(op & 31);
2289   int dreg = (op >> 16) & 31;
2290   NEGB(dreg, src);
2291}
2292
2293void tms3203x_device::negb_dir(UINT32 op)
2294{
2295   UINT32 src = RMEM(DIRECT(op));
2296   int dreg = (op >> 16) & 31;
2297   NEGB(dreg, src);
2298}
2299
2300void tms3203x_device::negb_ind(UINT32 op)
2301{
2302   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2303   int dreg = (op >> 16) & 31;
2304   NEGB(dreg, src);
2305}
2306
2307void tms3203x_device::negb_imm(UINT32 op)
2308{
2309   UINT32 src = (INT16)op;
2310   int dreg = (op >> 16) & 31;
2311   NEGB(dreg, src);
2312}
2313
2314/*-----------------------------------------------------*/
2315
2316void tms3203x_device::negf_reg(UINT32 op)
2317{
2318   int dreg = (op >> 16) & 7;
2319   negf(m_r[dreg], m_r[op & 7]);
2320}
2321
2322void tms3203x_device::negf_dir(UINT32 op)
2323{
2324   UINT32 res = RMEM(DIRECT(op));
2325   int dreg = (op >> 16) & 7;
2326   LONG2FP(TMR_TEMP1, res);
2327   negf(m_r[dreg], m_r[TMR_TEMP1]);
2328}
2329
2330void tms3203x_device::negf_ind(UINT32 op)
2331{
2332   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2333   int dreg = (op >> 16) & 7;
2334   LONG2FP(TMR_TEMP1, res);
2335   negf(m_r[dreg], m_r[TMR_TEMP1]);
2336}
2337
2338void tms3203x_device::negf_imm(UINT32 op)
2339{
2340   int dreg = (op >> 16) & 7;
2341   SHORT2FP(TMR_TEMP1, op);
2342   negf(m_r[dreg], m_r[TMR_TEMP1]);
2343}
2344
2345/*-----------------------------------------------------*/
2346
2347#define NEGI(dreg, src)                                             \
2348{                                                                   \
2349   UINT32 _res = 0 - src;                                          \
2350   if (!OVM() || !OVERFLOW_SUB(0,src,_res))                        \
2351      IREG(dreg) = _res;                                          \
2352   else                                                            \
2353      IREG(dreg) = ((INT32)src < 0) ? 0x80000000 : 0x7fffffff;    \
2354   if (dreg < 8)                                                   \
2355   {                                                               \
2356      CLR_NZCVUF();                                               \
2357      OR_C_SUB(0,src,_res);                                       \
2358      OR_V_SUB(0,src,_res);                                       \
2359      OR_NZ(_res);                                                \
2360   }                                                               \
2361   else if (dreg >= TMR_BK)                                        \
2362      update_special(dreg);                                       \
2363}
2364
2365void tms3203x_device::negi_reg(UINT32 op)
2366{
2367   UINT32 src = IREG(op & 31);
2368   int dreg = (op >> 16) & 31;
2369   NEGI(dreg, src);
2370}
2371
2372void tms3203x_device::negi_dir(UINT32 op)
2373{
2374   UINT32 src = RMEM(DIRECT(op));
2375   int dreg = (op >> 16) & 31;
2376   NEGI(dreg, src);
2377}
2378
2379void tms3203x_device::negi_ind(UINT32 op)
2380{
2381   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2382   int dreg = (op >> 16) & 31;
2383   NEGI(dreg, src);
2384}
2385
2386void tms3203x_device::negi_imm(UINT32 op)
2387{
2388   UINT32 src = (INT16)op;
2389   int dreg = (op >> 16) & 31;
2390   NEGI(dreg, src);
2391}
2392
2393/*-----------------------------------------------------*/
2394
2395void tms3203x_device::nop_reg(UINT32 op)
2396{
2397}
2398
2399void tms3203x_device::nop_ind(UINT32 op)
2400{
2401   RMEM(INDIRECT_D(op, op >> 8));
2402}
2403
2404/*-----------------------------------------------------*/
2405
2406void tms3203x_device::norm_reg(UINT32 op)
2407{
2408   int dreg = (op >> 16) & 7;
2409   norm(m_r[dreg], m_r[op & 7]);
2410}
2411
2412void tms3203x_device::norm_dir(UINT32 op)
2413{
2414   UINT32 res = RMEM(DIRECT(op));
2415   int dreg = (op >> 16) & 7;
2416   LONG2FP(TMR_TEMP1, res);
2417   norm(m_r[dreg], m_r[TMR_TEMP1]);
2418}
2419
2420void tms3203x_device::norm_ind(UINT32 op)
2421{
2422   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2423   int dreg = (op >> 16) & 7;
2424   LONG2FP(TMR_TEMP1, res);
2425   norm(m_r[dreg], m_r[TMR_TEMP1]);
2426}
2427
2428void tms3203x_device::norm_imm(UINT32 op)
2429{
2430   int dreg = (op >> 16) & 7;
2431   SHORT2FP(TMR_TEMP1, op);
2432   norm(m_r[dreg], m_r[TMR_TEMP1]);
2433}
2434
2435/*-----------------------------------------------------*/
2436
2437#define NOT(dreg, src)                                              \
2438{                                                                   \
2439   UINT32 _res = ~(src);                                           \
2440   IREG(dreg) = _res;                                              \
2441   if (dreg < 8)                                                   \
2442   {                                                               \
2443      CLR_NZVUF();                                                \
2444      OR_NZ(_res);                                                \
2445   }                                                               \
2446   else if (dreg >= TMR_BK)                                        \
2447      update_special(dreg);                                       \
2448}
2449
2450void tms3203x_device::not_reg(UINT32 op)
2451{
2452   UINT32 src = IREG(op & 31);
2453   int dreg = (op >> 16) & 31;
2454   NOT(dreg, src);
2455}
2456
2457void tms3203x_device::not_dir(UINT32 op)
2458{
2459   UINT32 src = RMEM(DIRECT(op));
2460   int dreg = (op >> 16) & 31;
2461   NOT(dreg, src);
2462}
2463
2464void tms3203x_device::not_ind(UINT32 op)
2465{
2466   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2467   int dreg = (op >> 16) & 31;
2468   NOT(dreg, src);
2469}
2470
2471void tms3203x_device::not_imm(UINT32 op)
2472{
2473   UINT32 src = (UINT16)op;
2474   int dreg = (op >> 16) & 31;
2475   NOT(dreg, src);
2476}
2477
2478/*-----------------------------------------------------*/
2479
2480void tms3203x_device::pop(UINT32 op)
2481{
2482   int dreg = (op >> 16) & 31;
2483   UINT32 val = RMEM(IREG(TMR_SP)--);
2484   IREG(dreg) = val;
2485   if (dreg < 8)
2486   {
2487      CLR_NZVUF();
2488      OR_NZ(val);
2489   }
2490   else if (dreg >= TMR_BK)
2491      update_special(dreg);
2492}
2493
2494void tms3203x_device::popf(UINT32 op)
2495{
2496   int dreg = (op >> 16) & 7;
2497   UINT32 val = RMEM(IREG(TMR_SP)--);
2498   LONG2FP(dreg, val);
2499   CLR_NZVUF();
2500   OR_NZF(m_r[dreg]);
2501}
2502
2503void tms3203x_device::push(UINT32 op)
2504{
2505   WMEM(++IREG(TMR_SP), IREG((op >> 16) & 31));
2506}
2507
2508void tms3203x_device::pushf(UINT32 op)
2509{
2510   int dreg = (op >> 16) & 7;
2511   WMEM(++IREG(TMR_SP), FP2LONG(dreg));
2512}
2513
2514/*-----------------------------------------------------*/
2515
2516#define OR(dreg, src1, src2)                                        \
2517{                                                                   \
2518   UINT32 _res = (src1) | (src2);                                  \
2519   IREG(dreg) = _res;                                              \
2520   if (dreg < 8)                                                   \
2521   {                                                               \
2522      CLR_NZVUF();                                                \
2523      OR_NZ(_res);                                                \
2524   }                                                               \
2525   else if (dreg >= TMR_BK)                                        \
2526      update_special(dreg);                                       \
2527}
2528
2529void tms3203x_device::or_reg(UINT32 op)
2530{
2531   UINT32 src = IREG(op & 31);
2532   int dreg = (op >> 16) & 31;
2533   UINT32 dst = IREG(dreg);
2534   OR(dreg, dst, src);
2535}
2536
2537void tms3203x_device::or_dir(UINT32 op)
2538{
2539   UINT32 src = RMEM(DIRECT(op));
2540   int dreg = (op >> 16) & 31;
2541   UINT32 dst = IREG(dreg);
2542   OR(dreg, dst, src);
2543}
2544
2545void tms3203x_device::or_ind(UINT32 op)
2546{
2547   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2548   int dreg = (op >> 16) & 31;
2549   UINT32 dst = IREG(dreg);
2550   OR(dreg, dst, src);
2551}
2552
2553void tms3203x_device::or_imm(UINT32 op)
2554{
2555   UINT32 src = (UINT16)op;
2556   int dreg = (op >> 16) & 31;
2557   UINT32 dst = IREG(dreg);
2558   OR(dreg, dst, src);
2559}
2560
2561/*-----------------------------------------------------*/
2562
2563void tms3203x_device::maxspeed(UINT32 op) { unimplemented(op); }
2564
2565/*-----------------------------------------------------*/
2566
2567#define RND(dreg)                                                   \
2568{                                                                   \
2569   INT32 man = FREGMAN(dreg);                                      \
2570   CLR_NVUF();                                                     \
2571   if (man < 0x7fffff80)                                           \
2572   {                                                               \
2573      m_r[dreg].set_mantissa(((UINT32)man + 0x80) & 0xffffff00);  \
2574      OR_NUF(m_r[dreg]);                                  \
2575   }                                                               \
2576   else if (FREGEXP(dreg) < 127)                                   \
2577   {                                                               \
2578      m_r[dreg].set_mantissa(((UINT32)man + 0x80) & 0x7fffff00);  \
2579      m_r[dreg].set_exponent(FREGEXP(dreg) + 1);          \
2580      OR_NUF(m_r[dreg]);                                  \
2581   }                                                               \
2582   else                                                            \
2583   {                                                               \
2584      m_r[dreg].set_mantissa(0x7fffff00);             \
2585      IREG(TMR_ST) |= VFLAG | LVFLAG;                             \
2586   }                                                               \
2587}
2588
2589void tms3203x_device::rnd_reg(UINT32 op)
2590{
2591   int sreg = op & 7;
2592   int dreg = (op >> 16) & 7;
2593   m_r[dreg] = m_r[sreg];
2594   RND(dreg);
2595}
2596
2597void tms3203x_device::rnd_dir(UINT32 op)
2598{
2599   UINT32 res = RMEM(DIRECT(op));
2600   int dreg = (op >> 16) & 7;
2601   LONG2FP(dreg, res);
2602   RND(dreg);
2603}
2604
2605void tms3203x_device::rnd_ind(UINT32 op)
2606{
2607   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2608   int dreg = (op >> 16) & 7;
2609   LONG2FP(dreg, res);
2610   RND(dreg);
2611}
2612
2613void tms3203x_device::rnd_imm(UINT32 op)
2614{
2615   int dreg = (op >> 16) & 7;
2616   SHORT2FP(dreg, op);
2617   RND(dreg);
2618}
2619
2620/*-----------------------------------------------------*/
2621
2622void tms3203x_device::rol(UINT32 op)
2623{
2624   int dreg = (op >> 16) & 31;
2625   UINT32 res = IREG(dreg);
2626   int newcflag = res >> 31;
2627   res = (res << 1) | newcflag;
2628   IREG(dreg) = res;
2629   if (dreg < 8)
2630   {
2631      CLR_NZCVUF();
2632      OR_NZ(res);
2633      OR_C(newcflag);
2634   }
2635   else if (dreg >= TMR_BK)
2636      update_special(dreg);
2637}
2638
2639void tms3203x_device::rolc(UINT32 op)
2640{
2641   int dreg = (op >> 16) & 31;
2642   UINT32 res = IREG(dreg);
2643   int newcflag = res >> 31;
2644   res = (res << 1) | (IREG(TMR_ST) & CFLAG);
2645   IREG(dreg) = res;
2646   if (dreg < 8)
2647   {
2648      CLR_NZCVUF();
2649      OR_NZ(res);
2650      OR_C(newcflag);
2651   }
2652   else if (dreg >= TMR_BK)
2653      update_special(dreg);
2654}
2655
2656void tms3203x_device::ror(UINT32 op)
2657{
2658   int dreg = (op >> 16) & 31;
2659   UINT32 res = IREG(dreg);
2660   int newcflag = res & 1;
2661   res = (res >> 1) | (newcflag << 31);
2662   IREG(dreg) = res;
2663   if (dreg < 8)
2664   {
2665      CLR_NZCVUF();
2666      OR_NZ(res);
2667      OR_C(newcflag);
2668   }
2669   else if (dreg >= TMR_BK)
2670      update_special(dreg);
2671}
2672
2673void tms3203x_device::rorc(UINT32 op)
2674{
2675   int dreg = (op >> 16) & 31;
2676   UINT32 res = IREG(dreg);
2677   int newcflag = res & 1;
2678   res = (res >> 1) | ((IREG(TMR_ST) & CFLAG) << 31);
2679   IREG(dreg) = res;
2680   if (dreg < 8)
2681   {
2682      CLR_NZCVUF();
2683      OR_NZ(res);
2684      OR_C(newcflag);
2685   }
2686   else if (dreg >= TMR_BK)
2687      update_special(dreg);
2688}
2689
2690/*-----------------------------------------------------*/
2691
2692void tms3203x_device::rtps_reg(UINT32 op)
2693{
2694   IREG(TMR_RC) = IREG(op & 31);
2695   IREG(TMR_RS) = m_pc;
2696   IREG(TMR_RE) = m_pc;
2697   IREG(TMR_ST) |= RMFLAG;
2698   m_icount -= 3*2;
2699   m_delayed = true;
2700}
2701
2702void tms3203x_device::rtps_dir(UINT32 op)
2703{
2704   IREG(TMR_RC) = RMEM(DIRECT(op));
2705   IREG(TMR_RS) = m_pc;
2706   IREG(TMR_RE) = m_pc;
2707   IREG(TMR_ST) |= RMFLAG;
2708   m_icount -= 3*2;
2709   m_delayed = true;
2710}
2711
2712void tms3203x_device::rtps_ind(UINT32 op)
2713{
2714   IREG(TMR_RC) = RMEM(INDIRECT_D(op, op >> 8));
2715   IREG(TMR_RS) = m_pc;
2716   IREG(TMR_RE) = m_pc;
2717   IREG(TMR_ST) |= RMFLAG;
2718   m_icount -= 3*2;
2719   m_delayed = true;
2720}
2721
2722void tms3203x_device::rtps_imm(UINT32 op)
2723{
2724   IREG(TMR_RC) = (UINT16)op;
2725   IREG(TMR_RS) = m_pc;
2726   IREG(TMR_RE) = m_pc;
2727   IREG(TMR_ST) |= RMFLAG;
2728   m_icount -= 3*2;
2729   m_delayed = true;
2730}
2731
2732/*-----------------------------------------------------*/
2733
2734void tms3203x_device::stf_dir(UINT32 op)
2735{
2736   WMEM(DIRECT(op), FP2LONG((op >> 16) & 7));
2737}
2738
2739void tms3203x_device::stf_ind(UINT32 op)
2740{
2741   WMEM(INDIRECT_D(op, op >> 8), FP2LONG((op >> 16) & 7));
2742}
2743
2744/*-----------------------------------------------------*/
2745
2746void tms3203x_device::stfi_dir(UINT32 op) { unimplemented(op); }
2747void tms3203x_device::stfi_ind(UINT32 op) { unimplemented(op); }
2748
2749/*-----------------------------------------------------*/
2750
2751void tms3203x_device::sti_dir(UINT32 op)
2752{
2753   WMEM(DIRECT(op), IREG((op >> 16) & 31));
2754}
2755
2756void tms3203x_device::sti_ind(UINT32 op)
2757{
2758   WMEM(INDIRECT_D(op, op >> 8), IREG((op >> 16) & 31));
2759}
2760
2761/*-----------------------------------------------------*/
2762
2763void tms3203x_device::stii_dir(UINT32 op) { unimplemented(op); }
2764void tms3203x_device::stii_ind(UINT32 op) { unimplemented(op); }
2765
2766/*-----------------------------------------------------*/
2767
2768void tms3203x_device::sigi(UINT32 op) { unimplemented(op); }
2769
2770/*-----------------------------------------------------*/
2771
2772#define SUBB(dreg, src1, src2)                                      \
2773{                                                                   \
2774   UINT32 _res = src1 - src2 - (IREG(TMR_ST) & CFLAG);             \
2775   if (!OVM() || !OVERFLOW_SUB(src1,src2,_res))                    \
2776      IREG(dreg) = _res;                                          \
2777   else                                                            \
2778      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
2779   if (dreg < 8)                                                   \
2780   {                                                               \
2781      UINT32 tempc = IREG(TMR_ST) & CFLAG;                        \
2782      CLR_NZCVUF();                                               \
2783      OR_C_SBB(src1,src2,tempc);                                  \
2784      OR_V_SUB(src1,src2,_res);                                   \
2785      OR_NZ(_res);                                                \
2786   }                                                               \
2787   else if (dreg >= TMR_BK)                                        \
2788      update_special(dreg);                                       \
2789}
2790
2791void tms3203x_device::subb_reg(UINT32 op)
2792{
2793   UINT32 src = IREG(op & 31);
2794   int dreg = (op >> 16) & 31;
2795   UINT32 dst = IREG(dreg);
2796   SUBB(dreg, dst, src);
2797}
2798
2799void tms3203x_device::subb_dir(UINT32 op)
2800{
2801   UINT32 src = RMEM(DIRECT(op));
2802   int dreg = (op >> 16) & 31;
2803   UINT32 dst = IREG(dreg);
2804   SUBB(dreg, dst, src);
2805}
2806
2807void tms3203x_device::subb_ind(UINT32 op)
2808{
2809   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2810   int dreg = (op >> 16) & 31;
2811   UINT32 dst = IREG(dreg);
2812   SUBB(dreg, dst, src);
2813}
2814
2815void tms3203x_device::subb_imm(UINT32 op)
2816{
2817   UINT32 src = (INT16)op;
2818   int dreg = (op >> 16) & 31;
2819   UINT32 dst = IREG(dreg);
2820   SUBB(dreg, dst, src);
2821}
2822
2823/*-----------------------------------------------------*/
2824
2825#define SUBC(dreg, src)                                             \
2826{                                                                   \
2827   UINT32 dst = IREG(dreg);                                        \
2828   if (dst >= src)                                                 \
2829      IREG(dreg) = ((dst - src) << 1) | 1;                        \
2830   else                                                            \
2831      IREG(dreg) = dst << 1;                                      \
2832   if (dreg >= TMR_BK)                                             \
2833      update_special(dreg);                                       \
2834}
2835
2836void tms3203x_device::subc_reg(UINT32 op)
2837{
2838   UINT32 src = IREG(op & 31);
2839   int dreg = (op >> 16) & 31;
2840   SUBC(dreg, src);
2841}
2842
2843void tms3203x_device::subc_dir(UINT32 op)
2844{
2845   UINT32 src = RMEM(DIRECT(op));
2846   int dreg = (op >> 16) & 31;
2847   SUBC(dreg, src);
2848}
2849
2850void tms3203x_device::subc_ind(UINT32 op)
2851{
2852   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2853   int dreg = (op >> 16) & 31;
2854   SUBC(dreg, src);
2855}
2856
2857void tms3203x_device::subc_imm(UINT32 op)
2858{
2859   UINT32 src = (INT16)op;
2860   int dreg = (op >> 16) & 31;
2861   SUBC(dreg, src);
2862}
2863
2864/*-----------------------------------------------------*/
2865
2866void tms3203x_device::subf_reg(UINT32 op)
2867{
2868   int dreg = (op >> 16) & 7;
2869   subf(m_r[dreg], m_r[dreg], m_r[op & 7]);
2870}
2871
2872void tms3203x_device::subf_dir(UINT32 op)
2873{
2874   UINT32 res = RMEM(DIRECT(op));
2875   int dreg = (op >> 16) & 7;
2876   LONG2FP(TMR_TEMP1, res);
2877   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2878}
2879
2880void tms3203x_device::subf_ind(UINT32 op)
2881{
2882   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
2883   int dreg = (op >> 16) & 7;
2884   LONG2FP(TMR_TEMP1, res);
2885   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2886}
2887
2888void tms3203x_device::subf_imm(UINT32 op)
2889{
2890   int dreg = (op >> 16) & 7;
2891   SHORT2FP(TMR_TEMP1, op);
2892   subf(m_r[dreg], m_r[dreg], m_r[TMR_TEMP1]);
2893}
2894
2895/*-----------------------------------------------------*/
2896
2897#define SUBI(dreg, src1, src2)                                      \
2898{                                                                   \
2899   UINT32 _res = src1 - src2;                                      \
2900   if (!OVM() || !OVERFLOW_SUB(src1,src2,_res))                    \
2901      IREG(dreg) = _res;                                          \
2902   else                                                            \
2903      IREG(dreg) = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;   \
2904   if (dreg < 8)                                                   \
2905   {                                                               \
2906      CLR_NZCVUF();                                               \
2907      OR_C_SUB(src1,src2,_res);                                   \
2908      OR_V_SUB(src1,src2,_res);                                   \
2909      OR_NZ(_res);                                                \
2910   }                                                               \
2911   else if (dreg >= TMR_BK)                                        \
2912      update_special(dreg);                                       \
2913}
2914
2915void tms3203x_device::subi_reg(UINT32 op)
2916{
2917   UINT32 src = IREG(op & 31);
2918   int dreg = (op >> 16) & 31;
2919   UINT32 dst = IREG(dreg);
2920   SUBI(dreg, dst, src);
2921}
2922
2923void tms3203x_device::subi_dir(UINT32 op)
2924{
2925   UINT32 src = RMEM(DIRECT(op));
2926   int dreg = (op >> 16) & 31;
2927   UINT32 dst = IREG(dreg);
2928   SUBI(dreg, dst, src);
2929}
2930
2931void tms3203x_device::subi_ind(UINT32 op)
2932{
2933   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2934   int dreg = (op >> 16) & 31;
2935   UINT32 dst = IREG(dreg);
2936   SUBI(dreg, dst, src);
2937}
2938
2939void tms3203x_device::subi_imm(UINT32 op)
2940{
2941   UINT32 src = (INT16)op;
2942   int dreg = (op >> 16) & 31;
2943   UINT32 dst = IREG(dreg);
2944   SUBI(dreg, dst, src);
2945}
2946
2947/*-----------------------------------------------------*/
2948
2949void tms3203x_device::subrb_reg(UINT32 op)
2950{
2951   UINT32 src = IREG(op & 31);
2952   int dreg = (op >> 16) & 31;
2953   UINT32 dst = IREG(dreg);
2954   SUBB(dreg, src, dst);
2955}
2956
2957void tms3203x_device::subrb_dir(UINT32 op)
2958{
2959   UINT32 src = RMEM(DIRECT(op));
2960   int dreg = (op >> 16) & 31;
2961   UINT32 dst = IREG(dreg);
2962   SUBB(dreg, src, dst);
2963}
2964
2965void tms3203x_device::subrb_ind(UINT32 op)
2966{
2967   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
2968   int dreg = (op >> 16) & 31;
2969   UINT32 dst = IREG(dreg);
2970   SUBB(dreg, src, dst);
2971}
2972
2973void tms3203x_device::subrb_imm(UINT32 op)
2974{
2975   UINT32 src = (INT16)op;
2976   int dreg = (op >> 16) & 31;
2977   UINT32 dst = IREG(dreg);
2978   SUBB(dreg, src, dst);
2979}
2980
2981/*-----------------------------------------------------*/
2982
2983void tms3203x_device::subrf_reg(UINT32 op)
2984{
2985   int dreg = (op >> 16) & 7;
2986   subf(m_r[dreg], m_r[op & 7], m_r[dreg]);
2987}
2988
2989void tms3203x_device::subrf_dir(UINT32 op)
2990{
2991   UINT32 res = RMEM(DIRECT(op));
2992   int dreg = (op >> 16) & 7;
2993   LONG2FP(TMR_TEMP1, res);
2994   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
2995}
2996
2997void tms3203x_device::subrf_ind(UINT32 op)
2998{
2999   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3000   int dreg = (op >> 16) & 7;
3001   LONG2FP(TMR_TEMP1, res);
3002   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
3003}
3004
3005void tms3203x_device::subrf_imm(UINT32 op)
3006{
3007   int dreg = (op >> 16) & 7;
3008   SHORT2FP(TMR_TEMP1, op);
3009   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[dreg]);
3010}
3011
3012/*-----------------------------------------------------*/
3013
3014void tms3203x_device::subri_reg(UINT32 op)
3015{
3016   UINT32 src = IREG(op & 31);
3017   int dreg = (op >> 16) & 31;
3018   UINT32 dst = IREG(dreg);
3019   SUBI(dreg, src, dst);
3020}
3021
3022void tms3203x_device::subri_dir(UINT32 op)
3023{
3024   UINT32 src = RMEM(DIRECT(op));
3025   int dreg = (op >> 16) & 31;
3026   UINT32 dst = IREG(dreg);
3027   SUBI(dreg, src, dst);
3028}
3029
3030void tms3203x_device::subri_ind(UINT32 op)
3031{
3032   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3033   int dreg = (op >> 16) & 31;
3034   UINT32 dst = IREG(dreg);
3035   SUBI(dreg, src, dst);
3036}
3037
3038void tms3203x_device::subri_imm(UINT32 op)
3039{
3040   UINT32 src = (INT16)op;
3041   int dreg = (op >> 16) & 31;
3042   UINT32 dst = IREG(dreg);
3043   SUBI(dreg, src, dst);
3044}
3045
3046/*-----------------------------------------------------*/
3047
3048#define TSTB(src1, src2)                                            \
3049{                                                                   \
3050   UINT32 _res = (src1) & (src2);                                  \
3051   CLR_NZVUF();                                                    \
3052   OR_NZ(_res);                                                    \
3053}
3054
3055void tms3203x_device::tstb_reg(UINT32 op)
3056{
3057   UINT32 src = IREG(op & 31);
3058   UINT32 dst = IREG((op >> 16) & 31);
3059   TSTB(dst, src);
3060}
3061
3062void tms3203x_device::tstb_dir(UINT32 op)
3063{
3064   UINT32 src = RMEM(DIRECT(op));
3065   UINT32 dst = IREG((op >> 16) & 31);
3066   TSTB(dst, src);
3067}
3068
3069void tms3203x_device::tstb_ind(UINT32 op)
3070{
3071   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3072   UINT32 dst = IREG((op >> 16) & 31);
3073   TSTB(dst, src);
3074}
3075
3076void tms3203x_device::tstb_imm(UINT32 op)
3077{
3078   UINT32 src = (UINT16)op;
3079   UINT32 dst = IREG((op >> 16) & 31);
3080   TSTB(dst, src);
3081}
3082
3083/*-----------------------------------------------------*/
3084
3085#define XOR(dreg, src1, src2)                                       \
3086{                                                                   \
3087   UINT32 _res = (src1) ^ (src2);                                  \
3088   IREG(dreg) = _res;                                              \
3089   if (dreg < 8)                                                   \
3090   {                                                               \
3091      CLR_NZVUF();                                                \
3092      OR_NZ(_res);                                                \
3093   }                                                               \
3094   else if (dreg >= TMR_BK)                                        \
3095      update_special(dreg);                                       \
3096}
3097
3098void tms3203x_device::xor_reg(UINT32 op)
3099{
3100   UINT32 src = IREG(op & 31);
3101   int dreg = (op >> 16) & 31;
3102   UINT32 dst = IREG(dreg);
3103   XOR(dreg, dst, src);
3104}
3105
3106void tms3203x_device::xor_dir(UINT32 op)
3107{
3108   UINT32 src = RMEM(DIRECT(op));
3109   int dreg = (op >> 16) & 31;
3110   UINT32 dst = IREG(dreg);
3111   XOR(dreg, dst, src);
3112}
3113
3114void tms3203x_device::xor_ind(UINT32 op)
3115{
3116   UINT32 src = RMEM(INDIRECT_D(op, op >> 8));
3117   int dreg = (op >> 16) & 31;
3118   UINT32 dst = IREG(dreg);
3119   XOR(dreg, dst, src);
3120}
3121
3122void tms3203x_device::xor_imm(UINT32 op)
3123{
3124   UINT32 src = (UINT16)op;
3125   int dreg = (op >> 16) & 31;
3126   UINT32 dst = IREG(dreg);
3127   XOR(dreg, dst, src);
3128}
3129
3130/*-----------------------------------------------------*/
3131
3132void tms3203x_device::iack_dir(UINT32 op)
3133{
3134   offs_t addr = DIRECT(op);
3135   m_iack_cb(addr, ASSERT_LINE);
3136   RMEM(addr);
3137   m_iack_cb(addr, CLEAR_LINE);
3138}
3139
3140void tms3203x_device::iack_ind(UINT32 op)
3141{
3142   offs_t addr = INDIRECT_D(op, op >> 8);
3143   m_iack_cb(addr, ASSERT_LINE);
3144   RMEM(addr);
3145   m_iack_cb(addr, CLEAR_LINE);
3146}
3147
3148/*-----------------------------------------------------*/
3149
3150void tms3203x_device::addc3_regreg(UINT32 op)
3151{
3152   UINT32 src1 = IREG((op >> 8) & 31);
3153   UINT32 src2 = IREG(op & 31);
3154   int dreg = (op >> 16) & 31;
3155   ADDC(dreg, src1, src2);
3156}
3157
3158void tms3203x_device::addc3_indreg(UINT32 op)
3159{
3160   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3161   UINT32 src2 = IREG(op & 31);
3162   int dreg = (op >> 16) & 31;
3163   ADDC(dreg, src1, src2);
3164}
3165
3166void tms3203x_device::addc3_regind(UINT32 op)
3167{
3168   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3169   UINT32 src1 = IREG((op >> 8) & 31);
3170   int dreg = (op >> 16) & 31;
3171   ADDC(dreg, src1, src2);
3172}
3173
3174void tms3203x_device::addc3_indind(UINT32 op)
3175{
3176   DECLARE_DEF;
3177   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3178   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3179   int dreg = (op >> 16) & 31;
3180   UPDATE_DEF();
3181   ADDC(dreg, src1, src2);
3182}
3183
3184/*-----------------------------------------------------*/
3185
3186void tms3203x_device::addf3_regreg(UINT32 op)
3187{
3188   int sreg1 = (op >> 8) & 7;
3189   int sreg2 = op & 7;
3190   int dreg = (op >> 16) & 7;
3191   addf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3192}
3193
3194void tms3203x_device::addf3_indreg(UINT32 op)
3195{
3196   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3197   int sreg2 = op & 7;
3198   int dreg = (op >> 16) & 7;
3199   LONG2FP(TMR_TEMP1, src1);
3200   addf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3201}
3202
3203void tms3203x_device::addf3_regind(UINT32 op)
3204{
3205   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3206   int sreg1 = (op >> 8) & 7;
3207   int dreg = (op >> 16) & 7;
3208   LONG2FP(TMR_TEMP2, src2);
3209   addf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3210}
3211
3212void tms3203x_device::addf3_indind(UINT32 op)
3213{
3214   DECLARE_DEF;
3215   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3216   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3217   int dreg = (op >> 16) & 7;
3218   UPDATE_DEF();
3219   LONG2FP(TMR_TEMP1, src1);
3220   LONG2FP(TMR_TEMP2, src2);
3221   addf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3222}
3223
3224/*-----------------------------------------------------*/
3225
3226void tms3203x_device::addi3_regreg(UINT32 op)
3227{
3228   UINT32 src1 = IREG((op >> 8) & 31);
3229   UINT32 src2 = IREG(op & 31);
3230   int dreg = (op >> 16) & 31;
3231   ADDI(dreg, src1, src2);
3232}
3233
3234void tms3203x_device::addi3_indreg(UINT32 op)
3235{
3236   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3237   UINT32 src2 = IREG(op & 31);
3238   int dreg = (op >> 16) & 31;
3239   ADDI(dreg, src1, src2);
3240}
3241
3242void tms3203x_device::addi3_regind(UINT32 op)
3243{
3244   // Radikal Bikers confirms via ADDI3 AR3,*AR3++(1),R2 / SUB $0001,R2 sequence
3245   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3246   UINT32 src1 = IREG((op >> 8) & 31);
3247   int dreg = (op >> 16) & 31;
3248   ADDI(dreg, src1, src2);
3249}
3250
3251void tms3203x_device::addi3_indind(UINT32 op)
3252{
3253   DECLARE_DEF;
3254   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3255   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3256   int dreg = (op >> 16) & 31;
3257   UPDATE_DEF();
3258   ADDI(dreg, src1, src2);
3259}
3260
3261/*-----------------------------------------------------*/
3262
3263void tms3203x_device::and3_regreg(UINT32 op)
3264{
3265   UINT32 src1 = IREG((op >> 8) & 31);
3266   UINT32 src2 = IREG(op & 31);
3267   int dreg = (op >> 16) & 31;
3268   AND(dreg, src1, src2);
3269}
3270
3271void tms3203x_device::and3_indreg(UINT32 op)
3272{
3273   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3274   UINT32 src2 = IREG(op & 31);
3275   int dreg = (op >> 16) & 31;
3276   AND(dreg, src1, src2);
3277}
3278
3279void tms3203x_device::and3_regind(UINT32 op)
3280{
3281   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3282   UINT32 src1 = IREG((op >> 8) & 31);
3283   int dreg = (op >> 16) & 31;
3284   AND(dreg, src1, src2);
3285}
3286
3287void tms3203x_device::and3_indind(UINT32 op)
3288{
3289   DECLARE_DEF;
3290   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3291   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3292   int dreg = (op >> 16) & 31;
3293   UPDATE_DEF();
3294   AND(dreg, src1, src2);
3295}
3296
3297/*-----------------------------------------------------*/
3298
3299void tms3203x_device::andn3_regreg(UINT32 op)
3300{
3301   UINT32 src1 = IREG((op >> 8) & 31);
3302   UINT32 src2 = IREG(op & 31);
3303   int dreg = (op >> 16) & 31;
3304   ANDN(dreg, src1, src2);
3305}
3306
3307void tms3203x_device::andn3_indreg(UINT32 op)
3308{
3309   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3310   UINT32 src2 = IREG(op & 31);
3311   int dreg = (op >> 16) & 31;
3312   ANDN(dreg, src1, src2);
3313}
3314
3315void tms3203x_device::andn3_regind(UINT32 op)
3316{
3317   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3318   UINT32 src1 = IREG((op >> 8) & 31);
3319   int dreg = (op >> 16) & 31;
3320   ANDN(dreg, src1, src2);
3321}
3322
3323void tms3203x_device::andn3_indind(UINT32 op)
3324{
3325   DECLARE_DEF;
3326   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3327   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3328   int dreg = (op >> 16) & 31;
3329   UPDATE_DEF();
3330   ANDN(dreg, src1, src2);
3331}
3332
3333/*-----------------------------------------------------*/
3334
3335void tms3203x_device::ash3_regreg(UINT32 op)
3336{
3337   UINT32 src1 = IREG((op >> 8) & 31);
3338   UINT32 src2 = IREG(op & 31);
3339   int dreg = (op >> 16) & 31;
3340   ASH(dreg, src1, src2);
3341}
3342
3343void tms3203x_device::ash3_indreg(UINT32 op)
3344{
3345   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3346   UINT32 src2 = IREG(op & 31);
3347   int dreg = (op >> 16) & 31;
3348   ASH(dreg, src1, src2);
3349}
3350
3351void tms3203x_device::ash3_regind(UINT32 op)
3352{
3353   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3354   UINT32 src1 = IREG((op >> 8) & 31);
3355   int dreg = (op >> 16) & 31;
3356   ASH(dreg, src1, src2);
3357}
3358
3359void tms3203x_device::ash3_indind(UINT32 op)
3360{
3361   DECLARE_DEF;
3362   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3363   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3364   int dreg = (op >> 16) & 31;
3365   UPDATE_DEF();
3366   ASH(dreg, src1, src2);
3367}
3368
3369/*-----------------------------------------------------*/
3370
3371void tms3203x_device::cmpf3_regreg(UINT32 op)
3372{
3373   int sreg1 = (op >> 8) & 7;
3374   int sreg2 = op & 7;
3375   subf(m_r[TMR_TEMP1], m_r[sreg1], m_r[sreg2]);
3376}
3377
3378void tms3203x_device::cmpf3_indreg(UINT32 op)
3379{
3380   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3381   int sreg2 = op & 7;
3382   LONG2FP(TMR_TEMP1, src1);
3383   subf(m_r[TMR_TEMP1], m_r[TMR_TEMP1], m_r[sreg2]);
3384}
3385
3386void tms3203x_device::cmpf3_regind(UINT32 op)
3387{
3388   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3389   int sreg1 = (op >> 8) & 7;
3390   LONG2FP(TMR_TEMP2, src2);
3391   subf(m_r[TMR_TEMP1], m_r[sreg1], m_r[TMR_TEMP2]);
3392}
3393
3394void tms3203x_device::cmpf3_indind(UINT32 op)
3395{
3396   DECLARE_DEF;
3397   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3398   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3399   UPDATE_DEF();
3400   LONG2FP(TMR_TEMP1, src1);
3401   LONG2FP(TMR_TEMP2, src2);
3402   subf(m_r[TMR_TEMP1], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3403}
3404
3405/*-----------------------------------------------------*/
3406
3407void tms3203x_device::cmpi3_regreg(UINT32 op)
3408{
3409   UINT32 src1 = IREG((op >> 8) & 31);
3410   UINT32 src2 = IREG(op & 31);
3411   CMPI(src1, src2);
3412}
3413
3414void tms3203x_device::cmpi3_indreg(UINT32 op)
3415{
3416   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3417   UINT32 src2 = IREG(op & 31);
3418   CMPI(src1, src2);
3419}
3420
3421void tms3203x_device::cmpi3_regind(UINT32 op)
3422{
3423   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3424   UINT32 src1 = IREG((op >> 8) & 31);
3425   CMPI(src1, src2);
3426}
3427
3428void tms3203x_device::cmpi3_indind(UINT32 op)
3429{
3430   DECLARE_DEF;
3431   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3432   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3433   UPDATE_DEF();
3434   CMPI(src1, src2);
3435}
3436
3437/*-----------------------------------------------------*/
3438
3439void tms3203x_device::lsh3_regreg(UINT32 op)
3440{
3441   UINT32 src1 = IREG((op >> 8) & 31);
3442   UINT32 src2 = IREG(op & 31);
3443   int dreg = (op >> 16) & 31;
3444   LSH(dreg, src1, src2);
3445}
3446
3447void tms3203x_device::lsh3_indreg(UINT32 op)
3448{
3449   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3450   UINT32 src2 = IREG(op & 31);
3451   int dreg = (op >> 16) & 31;
3452   LSH(dreg, src1, src2);
3453}
3454
3455void tms3203x_device::lsh3_regind(UINT32 op)
3456{
3457   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3458   UINT32 src1 = IREG((op >> 8) & 31);
3459   int dreg = (op >> 16) & 31;
3460   LSH(dreg, src1, src2);
3461}
3462
3463void tms3203x_device::lsh3_indind(UINT32 op)
3464{
3465   DECLARE_DEF;
3466   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3467   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3468   int dreg = (op >> 16) & 31;
3469   UPDATE_DEF();
3470   LSH(dreg, src1, src2);
3471}
3472
3473/*-----------------------------------------------------*/
3474
3475void tms3203x_device::mpyf3_regreg(UINT32 op)
3476{
3477   int sreg1 = (op >> 8) & 7;
3478   int sreg2 = op & 7;
3479   int dreg = (op >> 16) & 7;
3480   mpyf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3481}
3482
3483void tms3203x_device::mpyf3_indreg(UINT32 op)
3484{
3485   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3486   int sreg2 = op & 7;
3487   int dreg = (op >> 16) & 7;
3488   LONG2FP(TMR_TEMP1, src1);
3489   mpyf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3490}
3491
3492void tms3203x_device::mpyf3_regind(UINT32 op)
3493{
3494   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3495   int sreg1 = (op >> 8) & 7;
3496   int dreg = (op >> 16) & 7;
3497   LONG2FP(TMR_TEMP2, src2);
3498   mpyf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3499}
3500
3501void tms3203x_device::mpyf3_indind(UINT32 op)
3502{
3503   DECLARE_DEF;
3504   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3505   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3506   int dreg = (op >> 16) & 7;
3507   UPDATE_DEF();
3508   LONG2FP(TMR_TEMP1, src1);
3509   LONG2FP(TMR_TEMP2, src2);
3510   mpyf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3511}
3512
3513/*-----------------------------------------------------*/
3514
3515void tms3203x_device::mpyi3_regreg(UINT32 op)
3516{
3517   UINT32 src1 = IREG((op >> 8) & 31);
3518   UINT32 src2 = IREG(op & 31);
3519   int dreg = (op >> 16) & 31;
3520   MPYI(dreg, src1, src2);
3521}
3522
3523void tms3203x_device::mpyi3_indreg(UINT32 op)
3524{
3525   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3526   UINT32 src2 = IREG(op & 31);
3527   int dreg = (op >> 16) & 31;
3528   MPYI(dreg, src1, src2);
3529}
3530
3531void tms3203x_device::mpyi3_regind(UINT32 op)
3532{
3533   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3534   UINT32 src1 = IREG((op >> 8) & 31);
3535   int dreg = (op >> 16) & 31;
3536   MPYI(dreg, src1, src2);
3537}
3538
3539void tms3203x_device::mpyi3_indind(UINT32 op)
3540{
3541   DECLARE_DEF;
3542   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3543   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3544   int dreg = (op >> 16) & 31;
3545   UPDATE_DEF();
3546   MPYI(dreg, src1, src2);
3547}
3548
3549/*-----------------------------------------------------*/
3550
3551void tms3203x_device::or3_regreg(UINT32 op)
3552{
3553   UINT32 src1 = IREG((op >> 8) & 31);
3554   UINT32 src2 = IREG(op & 31);
3555   int dreg = (op >> 16) & 31;
3556   OR(dreg, src1, src2);
3557}
3558
3559void tms3203x_device::or3_indreg(UINT32 op)
3560{
3561   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3562   UINT32 src2 = IREG(op & 31);
3563   int dreg = (op >> 16) & 31;
3564   OR(dreg, src1, src2);
3565}
3566
3567void tms3203x_device::or3_regind(UINT32 op)
3568{
3569   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3570   UINT32 src1 = IREG((op >> 8) & 31);
3571   int dreg = (op >> 16) & 31;
3572   OR(dreg, src1, src2);
3573}
3574
3575void tms3203x_device::or3_indind(UINT32 op)
3576{
3577   DECLARE_DEF;
3578   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3579   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3580   int dreg = (op >> 16) & 31;
3581   UPDATE_DEF();
3582   OR(dreg, src1, src2);
3583}
3584
3585/*-----------------------------------------------------*/
3586
3587void tms3203x_device::subb3_regreg(UINT32 op)
3588{
3589   UINT32 src1 = IREG((op >> 8) & 31);
3590   UINT32 src2 = IREG(op & 31);
3591   int dreg = (op >> 16) & 31;
3592   SUBB(dreg, src1, src2);
3593}
3594
3595void tms3203x_device::subb3_indreg(UINT32 op)
3596{
3597   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3598   UINT32 src2 = IREG(op & 31);
3599   int dreg = (op >> 16) & 31;
3600   SUBB(dreg, src1, src2);
3601}
3602
3603void tms3203x_device::subb3_regind(UINT32 op)
3604{
3605   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3606   UINT32 src1 = IREG((op >> 8) & 31);
3607   int dreg = (op >> 16) & 31;
3608   SUBB(dreg, src1, src2);
3609}
3610
3611void tms3203x_device::subb3_indind(UINT32 op)
3612{
3613   DECLARE_DEF;
3614   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3615   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3616   int dreg = (op >> 16) & 31;
3617   UPDATE_DEF();
3618   SUBB(dreg, src1, src2);
3619}
3620
3621/*-----------------------------------------------------*/
3622
3623void tms3203x_device::subf3_regreg(UINT32 op)
3624{
3625   int sreg1 = (op >> 8) & 7;
3626   int sreg2 = op & 7;
3627   int dreg = (op >> 16) & 7;
3628   subf(m_r[dreg], m_r[sreg1], m_r[sreg2]);
3629}
3630
3631void tms3203x_device::subf3_indreg(UINT32 op)
3632{
3633   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3634   int sreg2 = op & 7;
3635   int dreg = (op >> 16) & 7;
3636   LONG2FP(TMR_TEMP1, src1);
3637   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[sreg2]);
3638}
3639
3640void tms3203x_device::subf3_regind(UINT32 op)
3641{
3642   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3643   int sreg1 = (op >> 8) & 7;
3644   int dreg = (op >> 16) & 7;
3645   LONG2FP(TMR_TEMP2, src2);
3646   subf(m_r[dreg], m_r[sreg1], m_r[TMR_TEMP2]);
3647}
3648
3649void tms3203x_device::subf3_indind(UINT32 op)
3650{
3651   DECLARE_DEF;
3652   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3653   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3654   int dreg = (op >> 16) & 7;
3655   UPDATE_DEF();
3656   LONG2FP(TMR_TEMP1, src1);
3657   LONG2FP(TMR_TEMP2, src2);
3658   subf(m_r[dreg], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
3659}
3660
3661/*-----------------------------------------------------*/
3662
3663void tms3203x_device::subi3_regreg(UINT32 op)
3664{
3665   UINT32 src1 = IREG((op >> 8) & 31);
3666   UINT32 src2 = IREG(op & 31);
3667   int dreg = (op >> 16) & 31;
3668   SUBI(dreg, src1, src2);
3669}
3670
3671void tms3203x_device::subi3_indreg(UINT32 op)
3672{
3673   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3674   UINT32 src2 = IREG(op & 31);
3675   int dreg = (op >> 16) & 31;
3676   SUBI(dreg, src1, src2);
3677}
3678
3679void tms3203x_device::subi3_regind(UINT32 op)
3680{
3681   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3682   UINT32 src1 = IREG((op >> 8) & 31);
3683   int dreg = (op >> 16) & 31;
3684   SUBI(dreg, src1, src2);
3685}
3686
3687void tms3203x_device::subi3_indind(UINT32 op)
3688{
3689   DECLARE_DEF;
3690   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3691   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3692   int dreg = (op >> 16) & 31;
3693   UPDATE_DEF();
3694   SUBI(dreg, src1, src2);
3695}
3696
3697/*-----------------------------------------------------*/
3698
3699void tms3203x_device::tstb3_regreg(UINT32 op)
3700{
3701   UINT32 src1 = IREG((op >> 8) & 31);
3702   UINT32 src2 = IREG(op & 31);
3703   TSTB(src1, src2);
3704}
3705
3706void tms3203x_device::tstb3_indreg(UINT32 op)
3707{
3708   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3709   UINT32 src2 = IREG(op & 31);
3710   TSTB(src1, src2);
3711}
3712
3713void tms3203x_device::tstb3_regind(UINT32 op)
3714{
3715   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3716   UINT32 src1 = IREG((op >> 8) & 31);
3717   TSTB(src1, src2);
3718}
3719
3720void tms3203x_device::tstb3_indind(UINT32 op)
3721{
3722   DECLARE_DEF;
3723   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3724   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3725   UPDATE_DEF();
3726   TSTB(src1, src2);
3727}
3728
3729/*-----------------------------------------------------*/
3730
3731void tms3203x_device::xor3_regreg(UINT32 op)
3732{
3733   UINT32 src1 = IREG((op >> 8) & 31);
3734   UINT32 src2 = IREG(op & 31);
3735   int dreg = (op >> 16) & 31;
3736   XOR(dreg, src1, src2);
3737}
3738
3739void tms3203x_device::xor3_indreg(UINT32 op)
3740{
3741   UINT32 src1 = RMEM(INDIRECT_1(op, op >> 8));
3742   UINT32 src2 = IREG(op & 31);
3743   int dreg = (op >> 16) & 31;
3744   XOR(dreg, src1, src2);
3745}
3746
3747void tms3203x_device::xor3_regind(UINT32 op)
3748{
3749   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3750   UINT32 src1 = IREG((op >> 8) & 31);
3751   int dreg = (op >> 16) & 31;
3752   XOR(dreg, src1, src2);
3753}
3754
3755void tms3203x_device::xor3_indind(UINT32 op)
3756{
3757   DECLARE_DEF;
3758   UINT32 src1 = RMEM(INDIRECT_1_DEF(op, op >> 8));
3759   UINT32 src2 = RMEM(INDIRECT_1(op, op));
3760   int dreg = (op >> 16) & 31;
3761   UPDATE_DEF();
3762   XOR(dreg, src1, src2);
3763}
3764
3765/*-----------------------------------------------------*/
3766
3767void tms3203x_device::ldfu_reg(UINT32 op)
3768{
3769   m_r[(op >> 16) & 7] = m_r[op & 7];
3770}
3771
3772void tms3203x_device::ldfu_dir(UINT32 op)
3773{
3774   UINT32 res = RMEM(DIRECT(op));
3775   int dreg = (op >> 16) & 7;
3776   LONG2FP(dreg, res);
3777}
3778
3779void tms3203x_device::ldfu_ind(UINT32 op)
3780{
3781   UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3782   int dreg = (op >> 16) & 7;
3783   LONG2FP(dreg, res);
3784}
3785
3786void tms3203x_device::ldfu_imm(UINT32 op)
3787{
3788   int dreg = (op >> 16) & 7;
3789   SHORT2FP(dreg, op);
3790}
3791
3792/*-----------------------------------------------------*/
3793
3794void tms3203x_device::ldflo_reg(UINT32 op)
3795{
3796   if (CONDITION_LO())
3797      m_r[(op >> 16) & 7] = m_r[op & 7];
3798}
3799
3800void tms3203x_device::ldflo_dir(UINT32 op)
3801{
3802   if (CONDITION_LO())
3803   {
3804      UINT32 res = RMEM(DIRECT(op));
3805      int dreg = (op >> 16) & 7;
3806      LONG2FP(dreg, res);
3807   }
3808}
3809
3810void tms3203x_device::ldflo_ind(UINT32 op)
3811{
3812   if (CONDITION_LO())
3813   {
3814      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3815      int dreg = (op >> 16) & 7;
3816      LONG2FP(dreg, res);
3817   }
3818   else
3819      INDIRECT_D(op, op >> 8);
3820}
3821
3822void tms3203x_device::ldflo_imm(UINT32 op)
3823{
3824   if (CONDITION_LO())
3825   {
3826      int dreg = (op >> 16) & 7;
3827      SHORT2FP(dreg, op);
3828   }
3829}
3830
3831/*-----------------------------------------------------*/
3832
3833void tms3203x_device::ldfls_reg(UINT32 op)
3834{
3835   if (CONDITION_LS())
3836      m_r[(op >> 16) & 7] = m_r[op & 7];
3837}
3838
3839void tms3203x_device::ldfls_dir(UINT32 op)
3840{
3841   if (CONDITION_LS())
3842   {
3843      UINT32 res = RMEM(DIRECT(op));
3844      int dreg = (op >> 16) & 7;
3845      LONG2FP(dreg, res);
3846   }
3847}
3848
3849void tms3203x_device::ldfls_ind(UINT32 op)
3850{
3851   if (CONDITION_LS())
3852   {
3853      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3854      int dreg = (op >> 16) & 7;
3855      LONG2FP(dreg, res);
3856   }
3857   else
3858      INDIRECT_D(op, op >> 8);
3859}
3860
3861void tms3203x_device::ldfls_imm(UINT32 op)
3862{
3863   if (CONDITION_LS())
3864   {
3865      int dreg = (op >> 16) & 7;
3866      SHORT2FP(dreg, op);
3867   }
3868}
3869
3870/*-----------------------------------------------------*/
3871
3872void tms3203x_device::ldfhi_reg(UINT32 op)
3873{
3874   if (CONDITION_HI())
3875      m_r[(op >> 16) & 7] = m_r[op & 7];
3876}
3877
3878void tms3203x_device::ldfhi_dir(UINT32 op)
3879{
3880   if (CONDITION_HI())
3881   {
3882      UINT32 res = RMEM(DIRECT(op));
3883      int dreg = (op >> 16) & 7;
3884      LONG2FP(dreg, res);
3885   }
3886}
3887
3888void tms3203x_device::ldfhi_ind(UINT32 op)
3889{
3890   if (CONDITION_HI())
3891   {
3892      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3893      int dreg = (op >> 16) & 7;
3894      LONG2FP(dreg, res);
3895   }
3896   else
3897      INDIRECT_D(op, op >> 8);
3898}
3899
3900void tms3203x_device::ldfhi_imm(UINT32 op)
3901{
3902   if (CONDITION_HI())
3903   {
3904      int dreg = (op >> 16) & 7;
3905      SHORT2FP(dreg, op);
3906   }
3907}
3908
3909/*-----------------------------------------------------*/
3910
3911void tms3203x_device::ldfhs_reg(UINT32 op)
3912{
3913   if (CONDITION_HS())
3914      m_r[(op >> 16) & 7] = m_r[op & 7];
3915}
3916
3917void tms3203x_device::ldfhs_dir(UINT32 op)
3918{
3919   if (CONDITION_HS())
3920   {
3921      UINT32 res = RMEM(DIRECT(op));
3922      int dreg = (op >> 16) & 7;
3923      LONG2FP(dreg, res);
3924   }
3925}
3926
3927void tms3203x_device::ldfhs_ind(UINT32 op)
3928{
3929   if (CONDITION_HS())
3930   {
3931      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3932      int dreg = (op >> 16) & 7;
3933      LONG2FP(dreg, res);
3934   }
3935   else
3936      INDIRECT_D(op, op >> 8);
3937}
3938
3939void tms3203x_device::ldfhs_imm(UINT32 op)
3940{
3941   if (CONDITION_HS())
3942   {
3943      int dreg = (op >> 16) & 7;
3944      SHORT2FP(dreg, op);
3945   }
3946}
3947
3948/*-----------------------------------------------------*/
3949
3950void tms3203x_device::ldfeq_reg(UINT32 op)
3951{
3952   if (CONDITION_EQ())
3953      m_r[(op >> 16) & 7] = m_r[op & 7];
3954}
3955
3956void tms3203x_device::ldfeq_dir(UINT32 op)
3957{
3958   if (CONDITION_EQ())
3959   {
3960      UINT32 res = RMEM(DIRECT(op));
3961      int dreg = (op >> 16) & 7;
3962      LONG2FP(dreg, res);
3963   }
3964}
3965
3966void tms3203x_device::ldfeq_ind(UINT32 op)
3967{
3968   if (CONDITION_EQ())
3969   {
3970      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
3971      int dreg = (op >> 16) & 7;
3972      LONG2FP(dreg, res);
3973   }
3974   else
3975      INDIRECT_D(op, op >> 8);
3976}
3977
3978void tms3203x_device::ldfeq_imm(UINT32 op)
3979{
3980   if (CONDITION_EQ())
3981   {
3982      int dreg = (op >> 16) & 7;
3983      SHORT2FP(dreg, op);
3984   }
3985}
3986
3987/*-----------------------------------------------------*/
3988
3989void tms3203x_device::ldfne_reg(UINT32 op)
3990{
3991   if (CONDITION_NE())
3992      m_r[(op >> 16) & 7] = m_r[op & 7];
3993}
3994
3995void tms3203x_device::ldfne_dir(UINT32 op)
3996{
3997   if (CONDITION_NE())
3998   {
3999      UINT32 res = RMEM(DIRECT(op));
4000      int dreg = (op >> 16) & 7;
4001      LONG2FP(dreg, res);
4002   }
4003}
4004
4005void tms3203x_device::ldfne_ind(UINT32 op)
4006{
4007   if (CONDITION_NE())
4008   {
4009      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4010      int dreg = (op >> 16) & 7;
4011      LONG2FP(dreg, res);
4012   }
4013   else
4014      INDIRECT_D(op, op >> 8);
4015}
4016
4017void tms3203x_device::ldfne_imm(UINT32 op)
4018{
4019   if (CONDITION_NE())
4020   {
4021      int dreg = (op >> 16) & 7;
4022      SHORT2FP(dreg, op);
4023   }
4024}
4025
4026/*-----------------------------------------------------*/
4027
4028void tms3203x_device::ldflt_reg(UINT32 op)
4029{
4030   if (CONDITION_LT())
4031      m_r[(op >> 16) & 7] = m_r[op & 7];
4032}
4033
4034void tms3203x_device::ldflt_dir(UINT32 op)
4035{
4036   if (CONDITION_LT())
4037   {
4038      UINT32 res = RMEM(DIRECT(op));
4039      int dreg = (op >> 16) & 7;
4040      LONG2FP(dreg, res);
4041   }
4042}
4043
4044void tms3203x_device::ldflt_ind(UINT32 op)
4045{
4046   if (CONDITION_LT())
4047   {
4048      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4049      int dreg = (op >> 16) & 7;
4050      LONG2FP(dreg, res);
4051   }
4052   else
4053      INDIRECT_D(op, op >> 8);
4054}
4055
4056void tms3203x_device::ldflt_imm(UINT32 op)
4057{
4058   if (CONDITION_LT())
4059   {
4060      int dreg = (op >> 16) & 7;
4061      SHORT2FP(dreg, op);
4062   }
4063}
4064
4065/*-----------------------------------------------------*/
4066
4067void tms3203x_device::ldfle_reg(UINT32 op)
4068{
4069   if (CONDITION_LE())
4070      m_r[(op >> 16) & 7] = m_r[op & 7];
4071}
4072
4073void tms3203x_device::ldfle_dir(UINT32 op)
4074{
4075   if (CONDITION_LE())
4076   {
4077      UINT32 res = RMEM(DIRECT(op));
4078      int dreg = (op >> 16) & 7;
4079      LONG2FP(dreg, res);
4080   }
4081}
4082
4083void tms3203x_device::ldfle_ind(UINT32 op)
4084{
4085   if (CONDITION_LE())
4086   {
4087      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4088      int dreg = (op >> 16) & 7;
4089      LONG2FP(dreg, res);
4090   }
4091   else
4092      INDIRECT_D(op, op >> 8);
4093}
4094
4095void tms3203x_device::ldfle_imm(UINT32 op)
4096{
4097   if (CONDITION_LE())
4098   {
4099      int dreg = (op >> 16) & 7;
4100      SHORT2FP(dreg, op);
4101   }
4102}
4103
4104/*-----------------------------------------------------*/
4105
4106void tms3203x_device::ldfgt_reg(UINT32 op)
4107{
4108   if (CONDITION_GT())
4109      m_r[(op >> 16) & 7] = m_r[op & 7];
4110}
4111
4112void tms3203x_device::ldfgt_dir(UINT32 op)
4113{
4114   if (CONDITION_GT())
4115   {
4116      UINT32 res = RMEM(DIRECT(op));
4117      int dreg = (op >> 16) & 7;
4118      LONG2FP(dreg, res);
4119   }
4120}
4121
4122void tms3203x_device::ldfgt_ind(UINT32 op)
4123{
4124   if (CONDITION_GT())
4125   {
4126      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4127      int dreg = (op >> 16) & 7;
4128      LONG2FP(dreg, res);
4129   }
4130   else
4131      INDIRECT_D(op, op >> 8);
4132}
4133
4134void tms3203x_device::ldfgt_imm(UINT32 op)
4135{
4136   if (CONDITION_GT())
4137   {
4138      int dreg = (op >> 16) & 7;
4139      SHORT2FP(dreg, op);
4140   }
4141}
4142
4143/*-----------------------------------------------------*/
4144
4145void tms3203x_device::ldfge_reg(UINT32 op)
4146{
4147   if (CONDITION_GE())
4148      m_r[(op >> 16) & 7] = m_r[op & 7];
4149}
4150
4151void tms3203x_device::ldfge_dir(UINT32 op)
4152{
4153   if (CONDITION_GE())
4154   {
4155      UINT32 res = RMEM(DIRECT(op));
4156      int dreg = (op >> 16) & 7;
4157      LONG2FP(dreg, res);
4158   }
4159}
4160
4161void tms3203x_device::ldfge_ind(UINT32 op)
4162{
4163   if (CONDITION_GE())
4164   {
4165      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4166      int dreg = (op >> 16) & 7;
4167      LONG2FP(dreg, res);
4168   }
4169   else
4170      INDIRECT_D(op, op >> 8);
4171}
4172
4173void tms3203x_device::ldfge_imm(UINT32 op)
4174{
4175   if (CONDITION_GE())
4176   {
4177      int dreg = (op >> 16) & 7;
4178      SHORT2FP(dreg, op);
4179   }
4180}
4181
4182/*-----------------------------------------------------*/
4183
4184void tms3203x_device::ldfnv_reg(UINT32 op)
4185{
4186   if (CONDITION_NV())
4187      m_r[(op >> 16) & 7] = m_r[op & 7];
4188}
4189
4190void tms3203x_device::ldfnv_dir(UINT32 op)
4191{
4192   if (CONDITION_NV())
4193   {
4194      UINT32 res = RMEM(DIRECT(op));
4195      int dreg = (op >> 16) & 7;
4196      LONG2FP(dreg, res);
4197   }
4198}
4199
4200void tms3203x_device::ldfnv_ind(UINT32 op)
4201{
4202   if (CONDITION_NV())
4203   {
4204      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4205      int dreg = (op >> 16) & 7;
4206      LONG2FP(dreg, res);
4207   }
4208   else
4209      INDIRECT_D(op, op >> 8);
4210}
4211
4212void tms3203x_device::ldfnv_imm(UINT32 op)
4213{
4214   if (CONDITION_NV())
4215   {
4216      int dreg = (op >> 16) & 7;
4217      SHORT2FP(dreg, op);
4218   }
4219}
4220
4221/*-----------------------------------------------------*/
4222
4223void tms3203x_device::ldfv_reg(UINT32 op)
4224{
4225   if (CONDITION_V())
4226      m_r[(op >> 16) & 7] = m_r[op & 7];
4227}
4228
4229void tms3203x_device::ldfv_dir(UINT32 op)
4230{
4231   if (CONDITION_V())
4232   {
4233      UINT32 res = RMEM(DIRECT(op));
4234      int dreg = (op >> 16) & 7;
4235      LONG2FP(dreg, res);
4236   }
4237}
4238
4239void tms3203x_device::ldfv_ind(UINT32 op)
4240{
4241   if (CONDITION_V())
4242   {
4243      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4244      int dreg = (op >> 16) & 7;
4245      LONG2FP(dreg, res);
4246   }
4247   else
4248      INDIRECT_D(op, op >> 8);
4249}
4250
4251void tms3203x_device::ldfv_imm(UINT32 op)
4252{
4253   if (CONDITION_V())
4254   {
4255      int dreg = (op >> 16) & 7;
4256      SHORT2FP(dreg, op);
4257   }
4258}
4259
4260/*-----------------------------------------------------*/
4261
4262void tms3203x_device::ldfnuf_reg(UINT32 op)
4263{
4264   if (CONDITION_NUF())
4265      m_r[(op >> 16) & 7] = m_r[op & 7];
4266}
4267
4268void tms3203x_device::ldfnuf_dir(UINT32 op)
4269{
4270   if (CONDITION_NUF())
4271   {
4272      UINT32 res = RMEM(DIRECT(op));
4273      int dreg = (op >> 16) & 7;
4274      LONG2FP(dreg, res);
4275   }
4276}
4277
4278void tms3203x_device::ldfnuf_ind(UINT32 op)
4279{
4280   if (CONDITION_NUF())
4281   {
4282      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4283      int dreg = (op >> 16) & 7;
4284      LONG2FP(dreg, res);
4285   }
4286   else
4287      INDIRECT_D(op, op >> 8);
4288}
4289
4290void tms3203x_device::ldfnuf_imm(UINT32 op)
4291{
4292   if (CONDITION_NUF())
4293   {
4294      int dreg = (op >> 16) & 7;
4295      SHORT2FP(dreg, op);
4296   }
4297}
4298
4299/*-----------------------------------------------------*/
4300
4301void tms3203x_device::ldfuf_reg(UINT32 op)
4302{
4303   if (CONDITION_UF())
4304      m_r[(op >> 16) & 7] = m_r[op & 7];
4305}
4306
4307void tms3203x_device::ldfuf_dir(UINT32 op)
4308{
4309   if (CONDITION_UF())
4310   {
4311      UINT32 res = RMEM(DIRECT(op));
4312      int dreg = (op >> 16) & 7;
4313      LONG2FP(dreg, res);
4314   }
4315}
4316
4317void tms3203x_device::ldfuf_ind(UINT32 op)
4318{
4319   if (CONDITION_UF())
4320   {
4321      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4322      int dreg = (op >> 16) & 7;
4323      LONG2FP(dreg, res);
4324   }
4325   else
4326      INDIRECT_D(op, op >> 8);
4327}
4328
4329void tms3203x_device::ldfuf_imm(UINT32 op)
4330{
4331   if (CONDITION_UF())
4332   {
4333      int dreg = (op >> 16) & 7;
4334      SHORT2FP(dreg, op);
4335   }
4336}
4337
4338/*-----------------------------------------------------*/
4339
4340void tms3203x_device::ldfnlv_reg(UINT32 op)
4341{
4342   if (CONDITION_NLV())
4343      m_r[(op >> 16) & 7] = m_r[op & 7];
4344}
4345
4346void tms3203x_device::ldfnlv_dir(UINT32 op)
4347{
4348   if (CONDITION_NLV())
4349   {
4350      UINT32 res = RMEM(DIRECT(op));
4351      int dreg = (op >> 16) & 7;
4352      LONG2FP(dreg, res);
4353   }
4354}
4355
4356void tms3203x_device::ldfnlv_ind(UINT32 op)
4357{
4358   if (CONDITION_NLV())
4359   {
4360      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4361      int dreg = (op >> 16) & 7;
4362      LONG2FP(dreg, res);
4363   }
4364   else
4365      INDIRECT_D(op, op >> 8);
4366}
4367
4368void tms3203x_device::ldfnlv_imm(UINT32 op)
4369{
4370   if (CONDITION_NLV())
4371   {
4372      int dreg = (op >> 16) & 7;
4373      SHORT2FP(dreg, op);
4374   }
4375}
4376
4377/*-----------------------------------------------------*/
4378
4379void tms3203x_device::ldflv_reg(UINT32 op)
4380{
4381   if (CONDITION_LV())
4382      m_r[(op >> 16) & 7] = m_r[op & 7];
4383}
4384
4385void tms3203x_device::ldflv_dir(UINT32 op)
4386{
4387   if (CONDITION_LV())
4388   {
4389      UINT32 res = RMEM(DIRECT(op));
4390      int dreg = (op >> 16) & 7;
4391      LONG2FP(dreg, res);
4392   }
4393}
4394
4395void tms3203x_device::ldflv_ind(UINT32 op)
4396{
4397   if (CONDITION_LV())
4398   {
4399      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4400      int dreg = (op >> 16) & 7;
4401      LONG2FP(dreg, res);
4402   }
4403   else
4404      INDIRECT_D(op, op >> 8);
4405}
4406
4407void tms3203x_device::ldflv_imm(UINT32 op)
4408{
4409   if (CONDITION_LV())
4410   {
4411      int dreg = (op >> 16) & 7;
4412      SHORT2FP(dreg, op);
4413   }
4414}
4415
4416/*-----------------------------------------------------*/
4417
4418void tms3203x_device::ldfnluf_reg(UINT32 op)
4419{
4420   if (CONDITION_NLUF())
4421      m_r[(op >> 16) & 7] = m_r[op & 7];
4422}
4423
4424void tms3203x_device::ldfnluf_dir(UINT32 op)
4425{
4426   if (CONDITION_NLUF())
4427   {
4428      UINT32 res = RMEM(DIRECT(op));
4429      int dreg = (op >> 16) & 7;
4430      LONG2FP(dreg, res);
4431   }
4432}
4433
4434void tms3203x_device::ldfnluf_ind(UINT32 op)
4435{
4436   if (CONDITION_NLUF())
4437   {
4438      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4439      int dreg = (op >> 16) & 7;
4440      LONG2FP(dreg, res);
4441   }
4442   else
4443      INDIRECT_D(op, op >> 8);
4444}
4445
4446void tms3203x_device::ldfnluf_imm(UINT32 op)
4447{
4448   if (CONDITION_NLUF())
4449   {
4450      int dreg = (op >> 16) & 7;
4451      SHORT2FP(dreg, op);
4452   }
4453}
4454
4455/*-----------------------------------------------------*/
4456
4457void tms3203x_device::ldfluf_reg(UINT32 op)
4458{
4459   if (CONDITION_LUF())
4460      m_r[(op >> 16) & 7] = m_r[op & 7];
4461}
4462
4463void tms3203x_device::ldfluf_dir(UINT32 op)
4464{
4465   if (CONDITION_LUF())
4466   {
4467      UINT32 res = RMEM(DIRECT(op));
4468      int dreg = (op >> 16) & 7;
4469      LONG2FP(dreg, res);
4470   }
4471}
4472
4473void tms3203x_device::ldfluf_ind(UINT32 op)
4474{
4475   if (CONDITION_LUF())
4476   {
4477      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4478      int dreg = (op >> 16) & 7;
4479      LONG2FP(dreg, res);
4480   }
4481   else
4482      INDIRECT_D(op, op >> 8);
4483}
4484
4485void tms3203x_device::ldfluf_imm(UINT32 op)
4486{
4487   if (CONDITION_LUF())
4488   {
4489      int dreg = (op >> 16) & 7;
4490      SHORT2FP(dreg, op);
4491   }
4492}
4493
4494/*-----------------------------------------------------*/
4495
4496void tms3203x_device::ldfzuf_reg(UINT32 op)
4497{
4498   if (CONDITION_ZUF())
4499      m_r[(op >> 16) & 7] = m_r[op & 7];
4500}
4501
4502void tms3203x_device::ldfzuf_dir(UINT32 op)
4503{
4504   if (CONDITION_ZUF())
4505   {
4506      UINT32 res = RMEM(DIRECT(op));
4507      int dreg = (op >> 16) & 7;
4508      LONG2FP(dreg, res);
4509   }
4510}
4511
4512void tms3203x_device::ldfzuf_ind(UINT32 op)
4513{
4514   if (CONDITION_ZUF())
4515   {
4516      UINT32 res = RMEM(INDIRECT_D(op, op >> 8));
4517      int dreg = (op >> 16) & 7;
4518      LONG2FP(dreg, res);
4519   }
4520   else
4521      INDIRECT_D(op, op >> 8);
4522}
4523
4524void tms3203x_device::ldfzuf_imm(UINT32 op)
4525{
4526   if (CONDITION_ZUF())
4527   {
4528      int dreg = (op >> 16) & 7;
4529      SHORT2FP(dreg, op);
4530   }
4531}
4532
4533/*-----------------------------------------------------*/
4534
4535void tms3203x_device::ldiu_reg(UINT32 op)
4536{
4537   int dreg = (op >> 16) & 31;
4538   IREG(dreg) = IREG(op & 31);
4539   if (dreg >= TMR_BK)
4540      update_special(dreg);
4541}
4542
4543void tms3203x_device::ldiu_dir(UINT32 op)
4544{
4545   int dreg = (op >> 16) & 31;
4546   IREG(dreg) = RMEM(DIRECT(op));
4547   if (dreg >= TMR_BK)
4548      update_special(dreg);
4549}
4550
4551void tms3203x_device::ldiu_ind(UINT32 op)
4552{
4553   int dreg = (op >> 16) & 31;
4554   IREG(dreg) = RMEM(INDIRECT_D(op, op >> 8));
4555   if (dreg >= TMR_BK)
4556      update_special(dreg);
4557}
4558
4559void tms3203x_device::ldiu_imm(UINT32 op)
4560{
4561   int dreg = (op >> 16) & 31;
4562   IREG(dreg) = (INT16)op;
4563   if (dreg >= TMR_BK)
4564      update_special(dreg);
4565}
4566
4567/*-----------------------------------------------------*/
4568
4569void tms3203x_device::ldilo_reg(UINT32 op)
4570{
4571   if (CONDITION_LO())
4572   {
4573      int dreg = (op >> 16) & 31;
4574      IREG(dreg) = IREG(op & 31);
4575      if (dreg >= TMR_BK)
4576         update_special(dreg);
4577   }
4578}
4579
4580void tms3203x_device::ldilo_dir(UINT32 op)
4581{
4582   UINT32 val = RMEM(DIRECT(op));
4583   if (CONDITION_LO())
4584   {
4585      int dreg = (op >> 16) & 31;
4586      IREG(dreg) = val;
4587      if (dreg >= TMR_BK)
4588         update_special(dreg);
4589   }
4590}
4591
4592void tms3203x_device::ldilo_ind(UINT32 op)
4593{
4594   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4595   if (CONDITION_LO())
4596   {
4597      int dreg = (op >> 16) & 31;
4598      IREG(dreg) = val;
4599      if (dreg >= TMR_BK)
4600         update_special(dreg);
4601   }
4602}
4603
4604void tms3203x_device::ldilo_imm(UINT32 op)
4605{
4606   if (CONDITION_LO())
4607   {
4608      int dreg = (op >> 16) & 31;
4609      IREG(dreg) = (INT16)op;
4610      if (dreg >= TMR_BK)
4611         update_special(dreg);
4612   }
4613}
4614
4615/*-----------------------------------------------------*/
4616
4617void tms3203x_device::ldils_reg(UINT32 op)
4618{
4619   if (CONDITION_LS())
4620   {
4621      int dreg = (op >> 16) & 31;
4622      IREG(dreg) = IREG(op & 31);
4623      if (dreg >= TMR_BK)
4624         update_special(dreg);
4625   }
4626}
4627
4628void tms3203x_device::ldils_dir(UINT32 op)
4629{
4630   UINT32 val = RMEM(DIRECT(op));
4631   if (CONDITION_LS())
4632   {
4633      int dreg = (op >> 16) & 31;
4634      IREG(dreg) = val;
4635      if (dreg >= TMR_BK)
4636         update_special(dreg);
4637   }
4638}
4639
4640void tms3203x_device::ldils_ind(UINT32 op)
4641{
4642   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4643   if (CONDITION_LS())
4644   {
4645      int dreg = (op >> 16) & 31;
4646      IREG(dreg) = val;
4647      if (dreg >= TMR_BK)
4648         update_special(dreg);
4649   }
4650}
4651
4652void tms3203x_device::ldils_imm(UINT32 op)
4653{
4654   if (CONDITION_LS())
4655   {
4656      int dreg = (op >> 16) & 31;
4657      IREG(dreg) = (INT16)op;
4658      if (dreg >= TMR_BK)
4659         update_special(dreg);
4660   }
4661}
4662
4663/*-----------------------------------------------------*/
4664
4665void tms3203x_device::ldihi_reg(UINT32 op)
4666{
4667   if (CONDITION_HI())
4668   {
4669      int dreg = (op >> 16) & 31;
4670      IREG(dreg) = IREG(op & 31);
4671      if (dreg >= TMR_BK)
4672         update_special(dreg);
4673   }
4674}
4675
4676void tms3203x_device::ldihi_dir(UINT32 op)
4677{
4678   UINT32 val = RMEM(DIRECT(op));
4679   if (CONDITION_HI())
4680   {
4681      int dreg = (op >> 16) & 31;
4682      IREG(dreg) = val;
4683      if (dreg >= TMR_BK)
4684         update_special(dreg);
4685   }
4686}
4687
4688void tms3203x_device::ldihi_ind(UINT32 op)
4689{
4690   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4691   if (CONDITION_HI())
4692   {
4693      int dreg = (op >> 16) & 31;
4694      IREG(dreg) = val;
4695      if (dreg >= TMR_BK)
4696         update_special(dreg);
4697   }
4698}
4699
4700void tms3203x_device::ldihi_imm(UINT32 op)
4701{
4702   if (CONDITION_HI())
4703   {
4704      int dreg = (op >> 16) & 31;
4705      IREG(dreg) = (INT16)op;
4706      if (dreg >= TMR_BK)
4707         update_special(dreg);
4708   }
4709}
4710
4711/*-----------------------------------------------------*/
4712
4713void tms3203x_device::ldihs_reg(UINT32 op)
4714{
4715   if (CONDITION_HS())
4716   {
4717      int dreg = (op >> 16) & 31;
4718      IREG(dreg) = IREG(op & 31);
4719      if (dreg >= TMR_BK)
4720         update_special(dreg);
4721   }
4722}
4723
4724void tms3203x_device::ldihs_dir(UINT32 op)
4725{
4726   UINT32 val = RMEM(DIRECT(op));
4727   if (CONDITION_HS())
4728   {
4729      int dreg = (op >> 16) & 31;
4730      IREG(dreg) = val;
4731      if (dreg >= TMR_BK)
4732         update_special(dreg);
4733   }
4734}
4735
4736void tms3203x_device::ldihs_ind(UINT32 op)
4737{
4738   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4739   if (CONDITION_HS())
4740   {
4741      int dreg = (op >> 16) & 31;
4742      IREG(dreg) = val;
4743      if (dreg >= TMR_BK)
4744         update_special(dreg);
4745   }
4746}
4747
4748void tms3203x_device::ldihs_imm(UINT32 op)
4749{
4750   if (CONDITION_HS())
4751   {
4752      int dreg = (op >> 16) & 31;
4753      IREG(dreg) = (INT16)op;
4754      if (dreg >= TMR_BK)
4755         update_special(dreg);
4756   }
4757}
4758
4759/*-----------------------------------------------------*/
4760
4761void tms3203x_device::ldieq_reg(UINT32 op)
4762{
4763   if (CONDITION_EQ())
4764   {
4765      int dreg = (op >> 16) & 31;
4766      IREG(dreg) = IREG(op & 31);
4767      if (dreg >= TMR_BK)
4768         update_special(dreg);
4769   }
4770}
4771
4772void tms3203x_device::ldieq_dir(UINT32 op)
4773{
4774   UINT32 val = RMEM(DIRECT(op));
4775   if (CONDITION_EQ())
4776   {
4777      int dreg = (op >> 16) & 31;
4778      IREG(dreg) = val;
4779      if (dreg >= TMR_BK)
4780         update_special(dreg);
4781   }
4782}
4783
4784void tms3203x_device::ldieq_ind(UINT32 op)
4785{
4786   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4787   if (CONDITION_EQ())
4788   {
4789      int dreg = (op >> 16) & 31;
4790      IREG(dreg) = val;
4791      if (dreg >= TMR_BK)
4792         update_special(dreg);
4793   }
4794}
4795
4796void tms3203x_device::ldieq_imm(UINT32 op)
4797{
4798   if (CONDITION_EQ())
4799   {
4800      int dreg = (op >> 16) & 31;
4801      IREG(dreg) = (INT16)op;
4802      if (dreg >= TMR_BK)
4803         update_special(dreg);
4804   }
4805}
4806
4807/*-----------------------------------------------------*/
4808
4809void tms3203x_device::ldine_reg(UINT32 op)
4810{
4811   if (CONDITION_NE())
4812   {
4813      int dreg = (op >> 16) & 31;
4814      IREG(dreg) = IREG(op & 31);
4815      if (dreg >= TMR_BK)
4816         update_special(dreg);
4817   }
4818}
4819
4820void tms3203x_device::ldine_dir(UINT32 op)
4821{
4822   UINT32 val = RMEM(DIRECT(op));
4823   if (CONDITION_NE())
4824   {
4825      int dreg = (op >> 16) & 31;
4826      IREG(dreg) = val;
4827      if (dreg >= TMR_BK)
4828         update_special(dreg);
4829   }
4830}
4831
4832void tms3203x_device::ldine_ind(UINT32 op)
4833{
4834   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4835   if (CONDITION_NE())
4836   {
4837      int dreg = (op >> 16) & 31;
4838      IREG(dreg) = val;
4839      if (dreg >= TMR_BK)
4840         update_special(dreg);
4841   }
4842}
4843
4844void tms3203x_device::ldine_imm(UINT32 op)
4845{
4846   if (CONDITION_NE())
4847   {
4848      int dreg = (op >> 16) & 31;
4849      IREG(dreg) = (INT16)op;
4850      if (dreg >= TMR_BK)
4851         update_special(dreg);
4852   }
4853}
4854
4855/*-----------------------------------------------------*/
4856
4857void tms3203x_device::ldilt_reg(UINT32 op)
4858{
4859   if (CONDITION_LT())
4860   {
4861      int dreg = (op >> 16) & 31;
4862      IREG(dreg) = IREG(op & 31);
4863      if (dreg >= TMR_BK)
4864         update_special(dreg);
4865   }
4866}
4867
4868void tms3203x_device::ldilt_dir(UINT32 op)
4869{
4870   UINT32 val = RMEM(DIRECT(op));
4871   if (CONDITION_LT())
4872   {
4873      int dreg = (op >> 16) & 31;
4874      IREG(dreg) = val;
4875      if (dreg >= TMR_BK)
4876         update_special(dreg);
4877   }
4878}
4879
4880void tms3203x_device::ldilt_ind(UINT32 op)
4881{
4882   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4883   if (CONDITION_LT())
4884   {
4885      int dreg = (op >> 16) & 31;
4886      IREG(dreg) = val;
4887      if (dreg >= TMR_BK)
4888         update_special(dreg);
4889   }
4890}
4891
4892void tms3203x_device::ldilt_imm(UINT32 op)
4893{
4894   if (CONDITION_LT())
4895   {
4896      int dreg = (op >> 16) & 31;
4897      IREG(dreg) = (INT16)op;
4898      if (dreg >= TMR_BK)
4899         update_special(dreg);
4900   }
4901}
4902
4903/*-----------------------------------------------------*/
4904
4905void tms3203x_device::ldile_reg(UINT32 op)
4906{
4907   if (CONDITION_LE())
4908   {
4909      int dreg = (op >> 16) & 31;
4910      IREG(dreg) = IREG(op & 31);
4911      if (dreg >= TMR_BK)
4912         update_special(dreg);
4913   }
4914}
4915
4916void tms3203x_device::ldile_dir(UINT32 op)
4917{
4918   UINT32 val = RMEM(DIRECT(op));
4919   if (CONDITION_LE())
4920   {
4921      int dreg = (op >> 16) & 31;
4922      IREG(dreg) = val;
4923      if (dreg >= TMR_BK)
4924         update_special(dreg);
4925   }
4926}
4927
4928void tms3203x_device::ldile_ind(UINT32 op)
4929{
4930   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4931   if (CONDITION_LE())
4932   {
4933      int dreg = (op >> 16) & 31;
4934      IREG(dreg) = val;
4935      if (dreg >= TMR_BK)
4936         update_special(dreg);
4937   }
4938}
4939
4940void tms3203x_device::ldile_imm(UINT32 op)
4941{
4942   if (CONDITION_LE())
4943   {
4944      int dreg = (op >> 16) & 31;
4945      IREG(dreg) = (INT16)op;
4946      if (dreg >= TMR_BK)
4947         update_special(dreg);
4948   }
4949}
4950
4951/*-----------------------------------------------------*/
4952
4953void tms3203x_device::ldigt_reg(UINT32 op)
4954{
4955   if (CONDITION_GT())
4956   {
4957      int dreg = (op >> 16) & 31;
4958      IREG(dreg) = IREG(op & 31);
4959      if (dreg >= TMR_BK)
4960         update_special(dreg);
4961   }
4962}
4963
4964void tms3203x_device::ldigt_dir(UINT32 op)
4965{
4966   UINT32 val = RMEM(DIRECT(op));
4967   if (CONDITION_GT())
4968   {
4969      int dreg = (op >> 16) & 31;
4970      IREG(dreg) = val;
4971      if (dreg >= TMR_BK)
4972         update_special(dreg);
4973   }
4974}
4975
4976void tms3203x_device::ldigt_ind(UINT32 op)
4977{
4978   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
4979   if (CONDITION_GT())
4980   {
4981      int dreg = (op >> 16) & 31;
4982      IREG(dreg) = val;
4983      if (dreg >= TMR_BK)
4984         update_special(dreg);
4985   }
4986}
4987
4988void tms3203x_device::ldigt_imm(UINT32 op)
4989{
4990   if (CONDITION_GT())
4991   {
4992      int dreg = (op >> 16) & 31;
4993      IREG(dreg) = (INT16)op;
4994      if (dreg >= TMR_BK)
4995         update_special(dreg);
4996   }
4997}
4998
4999/*-----------------------------------------------------*/
5000
5001void tms3203x_device::ldige_reg(UINT32 op)
5002{
5003   if (CONDITION_GE())
5004   {
5005      int dreg = (op >> 16) & 31;
5006      IREG(dreg) = IREG(op & 31);
5007      if (dreg >= TMR_BK)
5008         update_special(dreg);
5009   }
5010}
5011
5012void tms3203x_device::ldige_dir(UINT32 op)
5013{
5014   UINT32 val = RMEM(DIRECT(op));
5015   if (CONDITION_GE())
5016   {
5017      int dreg = (op >> 16) & 31;
5018      IREG(dreg) = val;
5019      if (dreg >= TMR_BK)
5020         update_special(dreg);
5021   }
5022}
5023
5024void tms3203x_device::ldige_ind(UINT32 op)
5025{
5026   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5027   if (CONDITION_GE())
5028   {
5029      int dreg = (op >> 16) & 31;
5030      IREG(dreg) = val;
5031      if (dreg >= TMR_BK)
5032         update_special(dreg);
5033   }
5034}
5035
5036void tms3203x_device::ldige_imm(UINT32 op)
5037{
5038   if (CONDITION_GE())
5039   {
5040      int dreg = (op >> 16) & 31;
5041      IREG(dreg) = (INT16)op;
5042      if (dreg >= TMR_BK)
5043         update_special(dreg);
5044   }
5045}
5046
5047/*-----------------------------------------------------*/
5048
5049void tms3203x_device::ldinv_reg(UINT32 op)
5050{
5051   if (CONDITION_NV())
5052   {
5053      int dreg = (op >> 16) & 31;
5054      IREG(dreg) = IREG(op & 31);
5055      if (dreg >= TMR_BK)
5056         update_special(dreg);
5057   }
5058}
5059
5060void tms3203x_device::ldinv_dir(UINT32 op)
5061{
5062   UINT32 val = RMEM(DIRECT(op));
5063   if (CONDITION_NV())
5064   {
5065      int dreg = (op >> 16) & 31;
5066      IREG(dreg) = val;
5067      if (dreg >= TMR_BK)
5068         update_special(dreg);
5069   }
5070}
5071
5072void tms3203x_device::ldinv_ind(UINT32 op)
5073{
5074   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5075   if (CONDITION_NV())
5076   {
5077      int dreg = (op >> 16) & 31;
5078      IREG(dreg) = val;
5079      if (dreg >= TMR_BK)
5080         update_special(dreg);
5081   }
5082}
5083
5084void tms3203x_device::ldinv_imm(UINT32 op)
5085{
5086   if (CONDITION_NV())
5087   {
5088      int dreg = (op >> 16) & 31;
5089      IREG(dreg) = (INT16)op;
5090      if (dreg >= TMR_BK)
5091         update_special(dreg);
5092   }
5093}
5094
5095/*-----------------------------------------------------*/
5096
5097void tms3203x_device::ldiuf_reg(UINT32 op)
5098{
5099   if (CONDITION_UF())
5100   {
5101      int dreg = (op >> 16) & 31;
5102      IREG(dreg) = IREG(op & 31);
5103      if (dreg >= TMR_BK)
5104         update_special(dreg);
5105   }
5106}
5107
5108void tms3203x_device::ldiuf_dir(UINT32 op)
5109{
5110   UINT32 val = RMEM(DIRECT(op));
5111   if (CONDITION_UF())
5112   {
5113      int dreg = (op >> 16) & 31;
5114      IREG(dreg) = val;
5115      if (dreg >= TMR_BK)
5116         update_special(dreg);
5117   }
5118}
5119
5120void tms3203x_device::ldiuf_ind(UINT32 op)
5121{
5122   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5123   if (CONDITION_UF())
5124   {
5125      int dreg = (op >> 16) & 31;
5126      IREG(dreg) = val;
5127      if (dreg >= TMR_BK)
5128         update_special(dreg);
5129   }
5130}
5131
5132void tms3203x_device::ldiuf_imm(UINT32 op)
5133{
5134   if (CONDITION_UF())
5135   {
5136      int dreg = (op >> 16) & 31;
5137      IREG(dreg) = (INT16)op;
5138      if (dreg >= TMR_BK)
5139         update_special(dreg);
5140   }
5141}
5142
5143/*-----------------------------------------------------*/
5144
5145void tms3203x_device::ldinuf_reg(UINT32 op)
5146{
5147   if (CONDITION_NUF())
5148   {
5149      int dreg = (op >> 16) & 31;
5150      IREG(dreg) = IREG(op & 31);
5151      if (dreg >= TMR_BK)
5152         update_special(dreg);
5153   }
5154}
5155
5156void tms3203x_device::ldinuf_dir(UINT32 op)
5157{
5158   UINT32 val = RMEM(DIRECT(op));
5159   if (CONDITION_NUF())
5160   {
5161      int dreg = (op >> 16) & 31;
5162      IREG(dreg) = val;
5163      if (dreg >= TMR_BK)
5164         update_special(dreg);
5165   }
5166}
5167
5168void tms3203x_device::ldinuf_ind(UINT32 op)
5169{
5170   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5171   if (CONDITION_NUF())
5172   {
5173      int dreg = (op >> 16) & 31;
5174      IREG(dreg) = val;
5175      if (dreg >= TMR_BK)
5176         update_special(dreg);
5177   }
5178}
5179
5180void tms3203x_device::ldinuf_imm(UINT32 op)
5181{
5182   if (CONDITION_NUF())
5183   {
5184      int dreg = (op >> 16) & 31;
5185      IREG(dreg) = (INT16)op;
5186      if (dreg >= TMR_BK)
5187         update_special(dreg);
5188   }
5189}
5190
5191/*-----------------------------------------------------*/
5192
5193void tms3203x_device::ldiv_reg(UINT32 op)
5194{
5195   if (CONDITION_V())
5196   {
5197      int dreg = (op >> 16) & 31;
5198      IREG(dreg) = IREG(op & 31);
5199      if (dreg >= TMR_BK)
5200         update_special(dreg);
5201   }
5202}
5203
5204void tms3203x_device::ldiv_dir(UINT32 op)
5205{
5206   UINT32 val = RMEM(DIRECT(op));
5207   if (CONDITION_V())
5208   {
5209      int dreg = (op >> 16) & 31;
5210      IREG(dreg) = val;
5211      if (dreg >= TMR_BK)
5212         update_special(dreg);
5213   }
5214}
5215
5216void tms3203x_device::ldiv_ind(UINT32 op)
5217{
5218   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5219   if (CONDITION_V())
5220   {
5221      int dreg = (op >> 16) & 31;
5222      IREG(dreg) = val;
5223      if (dreg >= TMR_BK)
5224         update_special(dreg);
5225   }
5226}
5227
5228void tms3203x_device::ldiv_imm(UINT32 op)
5229{
5230   if (CONDITION_V())
5231   {
5232      int dreg = (op >> 16) & 31;
5233      IREG(dreg) = (INT16)op;
5234      if (dreg >= TMR_BK)
5235         update_special(dreg);
5236   }
5237}
5238
5239/*-----------------------------------------------------*/
5240
5241void tms3203x_device::ldinlv_reg(UINT32 op)
5242{
5243   if (CONDITION_NLV())
5244   {
5245      int dreg = (op >> 16) & 31;
5246      IREG(dreg) = IREG(op & 31);
5247      if (dreg >= TMR_BK)
5248         update_special(dreg);
5249   }
5250}
5251
5252void tms3203x_device::ldinlv_dir(UINT32 op)
5253{
5254   UINT32 val = RMEM(DIRECT(op));
5255   if (CONDITION_NLV())
5256   {
5257      int dreg = (op >> 16) & 31;
5258      IREG(dreg) = val;
5259      if (dreg >= TMR_BK)
5260         update_special(dreg);
5261   }
5262}
5263
5264void tms3203x_device::ldinlv_ind(UINT32 op)
5265{
5266   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5267   if (CONDITION_NLV())
5268   {
5269      int dreg = (op >> 16) & 31;
5270      IREG(dreg) = val;
5271      if (dreg >= TMR_BK)
5272         update_special(dreg);
5273   }
5274}
5275
5276void tms3203x_device::ldinlv_imm(UINT32 op)
5277{
5278   if (CONDITION_NLV())
5279   {
5280      int dreg = (op >> 16) & 31;
5281      IREG(dreg) = (INT16)op;
5282      if (dreg >= TMR_BK)
5283         update_special(dreg);
5284   }
5285}
5286
5287/*-----------------------------------------------------*/
5288
5289void tms3203x_device::ldilv_reg(UINT32 op)
5290{
5291   if (CONDITION_LV())
5292   {
5293      int dreg = (op >> 16) & 31;
5294      IREG(dreg) = IREG(op & 31);
5295      if (dreg >= TMR_BK)
5296         update_special(dreg);
5297   }
5298}
5299
5300void tms3203x_device::ldilv_dir(UINT32 op)
5301{
5302   UINT32 val = RMEM(DIRECT(op));
5303   if (CONDITION_LV())
5304   {
5305      int dreg = (op >> 16) & 31;
5306      IREG(dreg) = val;
5307      if (dreg >= TMR_BK)
5308         update_special(dreg);
5309   }
5310}
5311
5312void tms3203x_device::ldilv_ind(UINT32 op)
5313{
5314   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5315   if (CONDITION_LV())
5316   {
5317      int dreg = (op >> 16) & 31;
5318      IREG(dreg) = val;
5319      if (dreg >= TMR_BK)
5320         update_special(dreg);
5321   }
5322}
5323
5324void tms3203x_device::ldilv_imm(UINT32 op)
5325{
5326   if (CONDITION_LV())
5327   {
5328      int dreg = (op >> 16) & 31;
5329      IREG(dreg) = (INT16)op;
5330      if (dreg >= TMR_BK)
5331         update_special(dreg);
5332   }
5333}
5334
5335/*-----------------------------------------------------*/
5336
5337void tms3203x_device::ldinluf_reg(UINT32 op)
5338{
5339   if (CONDITION_NLUF())
5340   {
5341      int dreg = (op >> 16) & 31;
5342      IREG(dreg) = IREG(op & 31);
5343      if (dreg >= TMR_BK)
5344         update_special(dreg);
5345   }
5346}
5347
5348void tms3203x_device::ldinluf_dir(UINT32 op)
5349{
5350   UINT32 val = RMEM(DIRECT(op));
5351   if (CONDITION_NLUF())
5352   {
5353      int dreg = (op >> 16) & 31;
5354      IREG(dreg) = val;
5355      if (dreg >= TMR_BK)
5356         update_special(dreg);
5357   }
5358}
5359
5360void tms3203x_device::ldinluf_ind(UINT32 op)
5361{
5362   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5363   if (CONDITION_NLUF())
5364   {
5365      int dreg = (op >> 16) & 31;
5366      IREG(dreg) = val;
5367      if (dreg >= TMR_BK)
5368         update_special(dreg);
5369   }
5370}
5371
5372void tms3203x_device::ldinluf_imm(UINT32 op)
5373{
5374   if (CONDITION_NLUF())
5375   {
5376      int dreg = (op >> 16) & 31;
5377      IREG(dreg) = (INT16)op;
5378      if (dreg >= TMR_BK)
5379         update_special(dreg);
5380   }
5381}
5382
5383/*-----------------------------------------------------*/
5384
5385void tms3203x_device::ldiluf_reg(UINT32 op)
5386{
5387   if (CONDITION_LUF())
5388   {
5389      int dreg = (op >> 16) & 31;
5390      IREG(dreg) = IREG(op & 31);
5391      if (dreg >= TMR_BK)
5392         update_special(dreg);
5393   }
5394}
5395
5396void tms3203x_device::ldiluf_dir(UINT32 op)
5397{
5398   UINT32 val = RMEM(DIRECT(op));
5399   if (CONDITION_LUF())
5400   {
5401      int dreg = (op >> 16) & 31;
5402      IREG(dreg) = val;
5403      if (dreg >= TMR_BK)
5404         update_special(dreg);
5405   }
5406}
5407
5408void tms3203x_device::ldiluf_ind(UINT32 op)
5409{
5410   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5411   if (CONDITION_LUF())
5412   {
5413      int dreg = (op >> 16) & 31;
5414      IREG(dreg) = val;
5415      if (dreg >= TMR_BK)
5416         update_special(dreg);
5417   }
5418}
5419
5420void tms3203x_device::ldiluf_imm(UINT32 op)
5421{
5422   if (CONDITION_LUF())
5423   {
5424      int dreg = (op >> 16) & 31;
5425      IREG(dreg) = (INT16)op;
5426      if (dreg >= TMR_BK)
5427         update_special(dreg);
5428   }
5429}
5430
5431/*-----------------------------------------------------*/
5432
5433void tms3203x_device::ldizuf_reg(UINT32 op)
5434{
5435   if (CONDITION_ZUF())
5436   {
5437      int dreg = (op >> 16) & 31;
5438      IREG(dreg) = IREG(op & 31);
5439      if (dreg >= TMR_BK)
5440         update_special(dreg);
5441   }
5442}
5443
5444void tms3203x_device::ldizuf_dir(UINT32 op)
5445{
5446   UINT32 val = RMEM(DIRECT(op));
5447   if (CONDITION_ZUF())
5448   {
5449      int dreg = (op >> 16) & 31;
5450      IREG(dreg) = val;
5451      if (dreg >= TMR_BK)
5452         update_special(dreg);
5453   }
5454}
5455
5456void tms3203x_device::ldizuf_ind(UINT32 op)
5457{
5458   UINT32 val = RMEM(INDIRECT_D(op, op >> 8));
5459   if (CONDITION_ZUF())
5460   {
5461      int dreg = (op >> 16) & 31;
5462      IREG(dreg) = val;
5463      if (dreg >= TMR_BK)
5464         update_special(dreg);
5465   }
5466}
5467
5468void tms3203x_device::ldizuf_imm(UINT32 op)
5469{
5470   if (CONDITION_ZUF())
5471   {
5472      int dreg = (op >> 16) & 31;
5473      IREG(dreg) = (INT16)op;
5474      if (dreg >= TMR_BK)
5475         update_special(dreg);
5476   }
5477}
5478
5479/*-----------------------------------------------------*/
5480
5481inline void tms3203x_device::execute_delayed(UINT32 newpc)
5482{
5483   m_delayed = true;
5484
5485   if ((machine().debug_flags & DEBUG_FLAG_ENABLED) == 0)
5486   {
5487      execute_one();
5488      execute_one();
5489      execute_one();
5490   }
5491   else
5492   {
5493      debugger_instruction_hook(this, m_pc);
5494      execute_one();
5495      debugger_instruction_hook(this, m_pc);
5496      execute_one();
5497      debugger_instruction_hook(this, m_pc);
5498      execute_one();
5499   }
5500
5501   if (newpc != ~0)
5502      m_pc = newpc;
5503
5504   m_delayed = false;
5505   if (m_irq_pending)
5506   {
5507      m_irq_pending = false;
5508      check_irqs();
5509   }
5510}
5511
5512/*-----------------------------------------------------*/
5513
5514void tms3203x_device::br_imm(UINT32 op)
5515{
5516   m_pc = op & 0xffffff;
5517   m_icount -= 3*2;
5518}
5519
5520void tms3203x_device::brd_imm(UINT32 op)
5521{
5522   execute_delayed(op & 0xffffff);
5523}
5524
5525/*-----------------------------------------------------*/
5526
5527void tms3203x_device::call_imm(UINT32 op)
5528{
5529   WMEM(++IREG(TMR_SP), m_pc);
5530   m_pc = op & 0xffffff;
5531   m_icount -= 3*2;
5532}
5533
5534/*-----------------------------------------------------*/
5535
5536void tms3203x_device::rptb_imm(UINT32 op)
5537{
5538   IREG(TMR_RS) = m_pc;
5539   IREG(TMR_RE) = op & 0xffffff;
5540   IREG(TMR_ST) |= RMFLAG;
5541   m_icount -= 3*2;
5542}
5543
5544/*-----------------------------------------------------*/
5545
5546void tms3203x_device::swi(UINT32 op) { unimplemented(op); }
5547
5548/*-----------------------------------------------------*/
5549
5550void tms3203x_device::brc_reg(UINT32 op)
5551{
5552   if (condition(op >> 16))
5553   {
5554      m_pc = IREG(op & 31);
5555      m_icount -= 3*2;
5556   }
5557}
5558
5559void tms3203x_device::brcd_reg(UINT32 op)
5560{
5561   if (condition(op >> 16))
5562      execute_delayed(IREG(op & 31));
5563   else
5564      execute_delayed(~0);
5565}
5566
5567void tms3203x_device::brc_imm(UINT32 op)
5568{
5569   if (condition(op >> 16))
5570   {
5571      m_pc += (INT16)op;
5572      m_icount -= 3*2;
5573   }
5574}
5575
5576void tms3203x_device::brcd_imm(UINT32 op)
5577{
5578   if (condition(op >> 16))
5579      execute_delayed(m_pc + 2 + (INT16)op);
5580   else
5581      execute_delayed(~0);
5582}
5583
5584/*-----------------------------------------------------*/
5585
5586void tms3203x_device::dbc_reg(UINT32 op)
5587{
5588   int reg = TMR_AR0 + ((op >> 22) & 7);
5589   int res = (IREG(reg) - 1) & 0xffffff;
5590   IREG(reg) = res | (IREG(reg) & 0xff000000);
5591   if (condition(op >> 16) && !(res & 0x800000))
5592   {
5593      m_pc = IREG(op & 31);
5594      m_icount -= 3*2;
5595   }
5596}
5597
5598void tms3203x_device::dbcd_reg(UINT32 op)
5599{
5600   int reg = TMR_AR0 + ((op >> 22) & 7);
5601   int res = (IREG(reg) - 1) & 0xffffff;
5602   IREG(reg) = res | (IREG(reg) & 0xff000000);
5603   if (condition(op >> 16) && !(res & 0x800000))
5604      execute_delayed(IREG(op & 31));
5605   else
5606      execute_delayed(~0);
5607}
5608
5609void tms3203x_device::dbc_imm(UINT32 op)
5610{
5611   int reg = TMR_AR0 + ((op >> 22) & 7);
5612   int res = (IREG(reg) - 1) & 0xffffff;
5613   IREG(reg) = res | (IREG(reg) & 0xff000000);
5614   if (condition(op >> 16) && !(res & 0x800000))
5615   {
5616      m_pc += (INT16)op;
5617      m_icount -= 3*2;
5618   }
5619}
5620
5621void tms3203x_device::dbcd_imm(UINT32 op)
5622{
5623   int reg = TMR_AR0 + ((op >> 22) & 7);
5624   int res = (IREG(reg) - 1) & 0xffffff;
5625   IREG(reg) = res | (IREG(reg) & 0xff000000);
5626   if (condition(op >> 16) && !(res & 0x800000))
5627      execute_delayed(m_pc + 2 + (INT16)op);
5628   else
5629      execute_delayed(~0);
5630}
5631
5632/*-----------------------------------------------------*/
5633
5634void tms3203x_device::callc_reg(UINT32 op)
5635{
5636   if (condition(op >> 16))
5637   {
5638      WMEM(++IREG(TMR_SP), m_pc);
5639      m_pc = IREG(op & 31);
5640      m_icount -= 3*2;
5641   }
5642}
5643
5644void tms3203x_device::callc_imm(UINT32 op)
5645{
5646   if (condition(op >> 16))
5647   {
5648      WMEM(++IREG(TMR_SP), m_pc);
5649      m_pc += (INT16)op;
5650      m_icount -= 3*2;
5651   }
5652}
5653
5654/*-----------------------------------------------------*/
5655
5656void tms3203x_device::trap(int trapnum)
5657{
5658   WMEM(++IREG(TMR_SP), m_pc);
5659   IREG(TMR_ST) &= ~GIEFLAG;
5660   if (m_chip_type == CHIP_TYPE_TMS32032)
5661      m_pc = RMEM(((IREG(TMR_IF) >> 16) << 8) + trapnum);
5662   else
5663      m_pc = RMEM(trapnum);
5664   m_icount -= 4*2;
5665}
5666
5667void tms3203x_device::trapc(UINT32 op)
5668{
5669   if (condition(op >> 16))
5670      trap(op & 0x3f);
5671}
5672
5673/*-----------------------------------------------------*/
5674
5675void tms3203x_device::retic_reg(UINT32 op)
5676{
5677   if (condition(op >> 16))
5678   {
5679      m_pc = RMEM(IREG(TMR_SP)--);
5680      IREG(TMR_ST) |= GIEFLAG;
5681      m_icount -= 3*2;
5682      check_irqs();
5683   }
5684}
5685
5686void tms3203x_device::retsc_reg(UINT32 op)
5687{
5688   if (condition(op >> 16))
5689   {
5690      m_pc = RMEM(IREG(TMR_SP)--);
5691      m_icount -= 3*2;
5692   }
5693}
5694
5695/*-----------------------------------------------------*/
5696
5697void tms3203x_device::mpyaddf_0(UINT32 op)
5698{
5699   // src3 * src4, src1 + src2
5700   DECLARE_DEF;
5701   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5702   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5703   LONG2FP(TMR_TEMP1, src3);
5704   LONG2FP(TMR_TEMP2, src4);
5705   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5706   addf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5707   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5708   UPDATE_DEF();
5709}
5710
5711void tms3203x_device::mpyaddf_1(UINT32 op)
5712{
5713   // src3 * src1, src4 + src2
5714   DECLARE_DEF;
5715   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5716   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5717   LONG2FP(TMR_TEMP1, src3);
5718   LONG2FP(TMR_TEMP2, src4);
5719   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5720   addf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP2], m_r[(op >> 16) & 7]);
5721   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5722   UPDATE_DEF();
5723}
5724
5725void tms3203x_device::mpyaddf_2(UINT32 op)
5726{
5727   // src1 * src2, src3 + src4
5728   DECLARE_DEF;
5729   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5730   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5731   LONG2FP(TMR_TEMP1, src3);
5732   LONG2FP(TMR_TEMP2, src4);
5733   mpyf(m_r[TMR_TEMP3], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5734   addf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5735   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5736   UPDATE_DEF();
5737}
5738
5739void tms3203x_device::mpyaddf_3(UINT32 op)
5740{
5741   // src3 * src1, src2 + src4
5742   DECLARE_DEF;
5743   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5744   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5745   LONG2FP(TMR_TEMP1, src3);
5746   LONG2FP(TMR_TEMP2, src4);
5747   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5748   addf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 16) & 7], m_r[TMR_TEMP2]);
5749   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5750   UPDATE_DEF();
5751}
5752
5753/*-----------------------------------------------------*/
5754
5755void tms3203x_device::mpysubf_0(UINT32 op)
5756{
5757   // src3 * src4, src1 - src2
5758   DECLARE_DEF;
5759   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5760   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5761   LONG2FP(TMR_TEMP1, src3);
5762   LONG2FP(TMR_TEMP2, src4);
5763   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5764   subf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5765   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5766   UPDATE_DEF();
5767}
5768
5769void tms3203x_device::mpysubf_1(UINT32 op)
5770{
5771   // src3 * src1, src4 - src2
5772   DECLARE_DEF;
5773   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5774   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5775   LONG2FP(TMR_TEMP1, src3);
5776   LONG2FP(TMR_TEMP2, src4);
5777   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5778   subf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP2], m_r[(op >> 16) & 7]);
5779   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5780   UPDATE_DEF();
5781}
5782
5783void tms3203x_device::mpysubf_2(UINT32 op)
5784{
5785   // src1 * src2, src3 - src4
5786   DECLARE_DEF;
5787   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5788   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5789   LONG2FP(TMR_TEMP1, src3);
5790   LONG2FP(TMR_TEMP2, src4);
5791   mpyf(m_r[TMR_TEMP3], m_r[(op >> 19) & 7], m_r[(op >> 16) & 7]);
5792   subf(m_r[((op >> 22) & 1) | 2], m_r[TMR_TEMP1], m_r[TMR_TEMP2]);
5793   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5794   UPDATE_DEF();
5795}
5796
5797void tms3203x_device::mpysubf_3(UINT32 op)
5798{
5799   // src3 * src1, src2 - src4
5800   DECLARE_DEF;
5801   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5802   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5803   LONG2FP(TMR_TEMP1, src3);
5804   LONG2FP(TMR_TEMP2, src4);
5805   mpyf(m_r[TMR_TEMP3], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
5806   subf(m_r[((op >> 22) & 1) | 2], m_r[(op >> 16) & 7], m_r[TMR_TEMP2]);
5807   m_r[(op >> 23) & 1] = m_r[TMR_TEMP3];
5808   UPDATE_DEF();
5809}
5810
5811/*-----------------------------------------------------*/
5812
5813void tms3203x_device::mpyaddi_0(UINT32 op)
5814{
5815   // src3 * src4, src1 + src2
5816   DECLARE_DEF;
5817   UINT32 src1 = IREG((op >> 19) & 7);
5818   UINT32 src2 = IREG((op >> 16) & 7);
5819   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5820   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5821   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src4 << 8) >> 8);
5822   UINT32 ares = src1 + src2;
5823
5824   CLR_NZVUF();
5825   if (OVM())
5826   {
5827      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5828         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5829      if (OVERFLOW_ADD(src1,src2,ares))
5830         ares = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;
5831   }
5832   IREG((op >> 23) & 1) = mres;
5833   IREG(((op >> 22) & 1) | 2) = ares;
5834   UPDATE_DEF();
5835}
5836
5837void tms3203x_device::mpyaddi_1(UINT32 op)
5838{
5839   // src3 * src1, src4 + src2
5840   DECLARE_DEF;
5841   UINT32 src1 = IREG((op >> 19) & 7);
5842   UINT32 src2 = IREG((op >> 16) & 7);
5843   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5844   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5845   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5846   UINT32 ares = src4 + src2;
5847
5848   CLR_NZVUF();
5849   if (OVM())
5850   {
5851      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5852         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5853      if (OVERFLOW_ADD(src4,src2,ares))
5854         ares = ((INT32)src4 < 0) ? 0x80000000 : 0x7fffffff;
5855   }
5856   IREG((op >> 23) & 1) = mres;
5857   IREG(((op >> 22) & 1) | 2) = ares;
5858   UPDATE_DEF();
5859}
5860
5861void tms3203x_device::mpyaddi_2(UINT32 op)
5862{
5863   // src1 * src2, src3 + src4
5864   DECLARE_DEF;
5865   UINT32 src1 = IREG((op >> 19) & 7);
5866   UINT32 src2 = IREG((op >> 16) & 7);
5867   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5868   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5869   INT64 mres = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);
5870   UINT32 ares = src3 + src4;
5871
5872   CLR_NZVUF();
5873   if (OVM())
5874   {
5875      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5876         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5877      if (OVERFLOW_ADD(src3,src4,ares))
5878         ares = ((INT32)src3 < 0) ? 0x80000000 : 0x7fffffff;
5879   }
5880   IREG((op >> 23) & 1) = mres;
5881   IREG(((op >> 22) & 1) | 2) = ares;
5882   UPDATE_DEF();
5883}
5884
5885void tms3203x_device::mpyaddi_3(UINT32 op)
5886{
5887   // src3 * src1, src2 + src4
5888   DECLARE_DEF;
5889   UINT32 src1 = IREG((op >> 19) & 7);
5890   UINT32 src2 = IREG((op >> 16) & 7);
5891   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5892   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5893   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5894   UINT32 ares = src2 + src4;
5895
5896   CLR_NZVUF();
5897   if (OVM())
5898   {
5899      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5900         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5901      if (OVERFLOW_ADD(src2,src4,ares))
5902         ares = ((INT32)src2 < 0) ? 0x80000000 : 0x7fffffff;
5903   }
5904   IREG((op >> 23) & 1) = mres;
5905   IREG(((op >> 22) & 1) | 2) = ares;
5906   UPDATE_DEF();
5907}
5908
5909/*-----------------------------------------------------*/
5910
5911void tms3203x_device::mpysubi_0(UINT32 op)
5912{
5913   // src3 * src4, src1 - src2
5914   DECLARE_DEF;
5915   UINT32 src1 = IREG((op >> 19) & 7);
5916   UINT32 src2 = IREG((op >> 16) & 7);
5917   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5918   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5919   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src4 << 8) >> 8);
5920   UINT32 ares = src1 - src2;
5921
5922   CLR_NZVUF();
5923   if (OVM())
5924   {
5925      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5926         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5927      if (OVERFLOW_SUB(src1,src2,ares))
5928         ares = ((INT32)src1 < 0) ? 0x80000000 : 0x7fffffff;
5929   }
5930   IREG((op >> 23) & 1) = mres;
5931   IREG(((op >> 22) & 1) | 2) = ares;
5932   UPDATE_DEF();
5933}
5934
5935void tms3203x_device::mpysubi_1(UINT32 op)
5936{
5937   // src3 * src1, src4 - src2
5938   DECLARE_DEF;
5939   UINT32 src1 = IREG((op >> 19) & 7);
5940   UINT32 src2 = IREG((op >> 16) & 7);
5941   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5942   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5943   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5944   UINT32 ares = src4 - src2;
5945
5946   CLR_NZVUF();
5947   if (OVM())
5948   {
5949      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5950         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5951      if (OVERFLOW_SUB(src4,src2,ares))
5952         ares = ((INT32)src4 < 0) ? 0x80000000 : 0x7fffffff;
5953   }
5954   IREG((op >> 23) & 1) = mres;
5955   IREG(((op >> 22) & 1) | 2) = ares;
5956   UPDATE_DEF();
5957}
5958
5959void tms3203x_device::mpysubi_2(UINT32 op)
5960{
5961   // src1 * src2, src3 - src4
5962   DECLARE_DEF;
5963   UINT32 src1 = IREG((op >> 19) & 7);
5964   UINT32 src2 = IREG((op >> 16) & 7);
5965   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5966   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5967   INT64 mres = (INT64)((INT32)(src1 << 8) >> 8) * (INT64)((INT32)(src2 << 8) >> 8);
5968   UINT32 ares = src3 - src4;
5969
5970   CLR_NZVUF();
5971   if (OVM())
5972   {
5973      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5974         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5975      if (OVERFLOW_SUB(src3,src4,ares))
5976         ares = ((INT32)src3 < 0) ? 0x80000000 : 0x7fffffff;
5977   }
5978   IREG((op >> 23) & 1) = mres;
5979   IREG(((op >> 22) & 1) | 2) = ares;
5980   UPDATE_DEF();
5981}
5982
5983void tms3203x_device::mpysubi_3(UINT32 op)
5984{
5985   // src3 * src1, src2 - src4
5986   DECLARE_DEF;
5987   UINT32 src1 = IREG((op >> 19) & 7);
5988   UINT32 src2 = IREG((op >> 16) & 7);
5989   UINT32 src3 = RMEM(INDIRECT_1_DEF(op, op >> 8));
5990   UINT32 src4 = RMEM(INDIRECT_1(op, op));
5991   INT64 mres = (INT64)((INT32)(src3 << 8) >> 8) * (INT64)((INT32)(src1 << 8) >> 8);
5992   UINT32 ares = src2 - src4;
5993
5994   CLR_NZVUF();
5995   if (OVM())
5996   {
5997      if (mres < -(INT64)0x80000000 || mres > (INT64)0x7fffffff)
5998         mres = (mres < 0) ? 0x80000000 : 0x7fffffff;
5999      if (OVERFLOW_SUB(src2,src4,ares))
6000         ares = ((INT32)src2 < 0) ? 0x80000000 : 0x7fffffff;
6001   }
6002   IREG((op >> 23) & 1) = mres;
6003   IREG(((op >> 22) & 1) | 2) = ares;
6004   UPDATE_DEF();
6005}
6006
6007/*-----------------------------------------------------*/
6008
6009void tms3203x_device::stfstf(UINT32 op)
6010{
6011   DECLARE_DEF;
6012   WMEM(INDIRECT_1_DEF(op, op >> 8), FP2LONG((op >> 16) & 7));
6013   WMEM(INDIRECT_1(op, op), FP2LONG((op >> 22) & 7));
6014   UPDATE_DEF();
6015}
6016
6017void tms3203x_device::stisti(UINT32 op)
6018{
6019   DECLARE_DEF;
6020   WMEM(INDIRECT_1_DEF(op, op >> 8), IREG((op >> 16) & 7));
6021   WMEM(INDIRECT_1(op, op), IREG((op >> 22) & 7));
6022   UPDATE_DEF();
6023}
6024
6025/*-----------------------------------------------------*/
6026
6027void tms3203x_device::ldfldf(UINT32 op)
6028{
6029   DECLARE_DEF;
6030   UINT32 res;
6031   int dreg;
6032
6033   res = RMEM(INDIRECT_1_DEF(op, op >> 8));
6034   dreg = (op >> 19) & 7;
6035   LONG2FP(dreg, res);
6036   res = RMEM(INDIRECT_1(op, op));
6037   dreg = (op >> 22) & 7;
6038   LONG2FP(dreg, res);
6039   UPDATE_DEF();
6040}
6041
6042void tms3203x_device::ldildi(UINT32 op)
6043{
6044   DECLARE_DEF;
6045   IREG((op >> 19) & 7) = RMEM(INDIRECT_1_DEF(op, op >> 8));
6046   IREG((op >> 22) & 7) = RMEM(INDIRECT_1(op, op));
6047   UPDATE_DEF();
6048}
6049
6050/*-----------------------------------------------------*/
6051
6052//  src2 = ind(op)
6053//  dst2 = ind(op >> 8)
6054//  sreg3 = ((op >> 16) & 7)
6055//  sreg1 = ((op >> 19) & 7)
6056//  dreg1 = ((op >> 22) & 7)
6057
6058void tms3203x_device::absfstf(UINT32 op)
6059{
6060   DECLARE_DEF;
6061   UINT32 src3 = FP2LONG((op >> 16) & 7);
6062   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6063   {
6064      int dreg = (op >> 22) & 7;
6065      LONG2FP(TMR_TEMP1, src2);
6066      ABSF(dreg, TMR_TEMP1);
6067   }
6068   WMEM(INDIRECT_1(op, op >> 8), src3);
6069   UPDATE_DEF();
6070}
6071
6072void tms3203x_device::absisti(UINT32 op)
6073{
6074   DECLARE_DEF;
6075   UINT32 src3 = IREG((op >> 16) & 7);
6076   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6077   {
6078      int dreg = (op >> 22) & 7;
6079      ABSI(dreg, src2);
6080   }
6081   WMEM(INDIRECT_1(op, op >> 8), src3);
6082   UPDATE_DEF();
6083}
6084
6085void tms3203x_device::addf3stf(UINT32 op)
6086{
6087   DECLARE_DEF;
6088   UINT32 src3 = FP2LONG((op >> 16) & 7);
6089   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6090   {
6091      LONG2FP(TMR_TEMP1, src2);
6092      addf(m_r[(op >> 22) & 7], m_r[(op >> 19) & 7], m_r[TMR_TEMP1]);
6093   }
6094   WMEM(INDIRECT_1(op, op >> 8), src3);
6095   UPDATE_DEF();
6096}
6097
6098void tms3203x_device::addi3sti(UINT32 op)
6099{
6100   DECLARE_DEF;
6101   UINT32 src3 = IREG((op >> 16) & 7);
6102   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6103   {
6104      int dreg = (op >> 22) & 7;
6105      UINT32 src1 = IREG((op >> 19) & 7);
6106      ADDI(dreg, src1, src2);
6107   }
6108   WMEM(INDIRECT_1(op, op >> 8), src3);
6109   UPDATE_DEF();
6110}
6111
6112void tms3203x_device::and3sti(UINT32 op)
6113{
6114   DECLARE_DEF;
6115   UINT32 src3 = IREG((op >> 16) & 7);
6116   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6117   {
6118      int dreg = (op >> 22) & 7;
6119      UINT32 src1 = IREG((op >> 19) & 7);
6120      AND(dreg, src1, src2);
6121   }
6122   WMEM(INDIRECT_1(op, op >> 8), src3);
6123   UPDATE_DEF();
6124}
6125
6126void tms3203x_device::ash3sti(UINT32 op)
6127{
6128   DECLARE_DEF;
6129   UINT32 src3 = IREG((op >> 16) & 7);
6130   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6131   {
6132      int dreg = (op >> 22) & 7;
6133      UINT32 count = IREG((op >> 19) & 7);
6134      ASH(dreg, src2, count);
6135   }
6136   WMEM(INDIRECT_1(op, op >> 8), src3);
6137   UPDATE_DEF();
6138}
6139
6140void tms3203x_device::fixsti(UINT32 op)
6141{
6142   DECLARE_DEF;
6143   UINT32 src3 = IREG((op >> 16) & 7);
6144   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6145   {
6146      int dreg = (op >> 22) & 7;
6147      LONG2FP(dreg, src2);
6148      float2int(m_r[dreg], 1);
6149   }
6150   WMEM(INDIRECT_1(op, op >> 8), src3);
6151   UPDATE_DEF();
6152}
6153
6154void tms3203x_device::floatstf(UINT32 op)
6155{
6156   DECLARE_DEF;
6157   UINT32 src3 = FP2LONG((op >> 16) & 7);
6158   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6159   {
6160      int dreg = (op >> 22) & 7;
6161      IREG(dreg) = src2;
6162      int2float(m_r[dreg]);
6163   }
6164   WMEM(INDIRECT_1(op, op >> 8), src3);
6165   UPDATE_DEF();
6166}
6167
6168void tms3203x_device::ldfstf(UINT32 op)
6169{
6170   DECLARE_DEF;
6171   UINT32 src3 = FP2LONG((op >> 16) & 7);
6172   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6173   {
6174      int dreg = (op >> 22) & 7;
6175      LONG2FP(dreg, src2);
6176   }
6177   WMEM(INDIRECT_1(op, op >> 8), src3);
6178   UPDATE_DEF();
6179}
6180
6181void tms3203x_device::ldisti(UINT32 op)
6182{
6183   DECLARE_DEF;
6184   UINT32 src3 = IREG((op >> 16) & 7);
6185   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6186   IREG((op >> 22) & 7) = src2;
6187   WMEM(INDIRECT_1(op, op >> 8), src3);
6188   UPDATE_DEF();
6189}
6190
6191void tms3203x_device::lsh3sti(UINT32 op)
6192{
6193   DECLARE_DEF;
6194   UINT32 src3 = IREG((op >> 16) & 7);
6195   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6196   {
6197      int dreg = (op >> 22) & 7;
6198      UINT32 count = IREG((op >> 19) & 7);
6199      LSH(dreg, src2, count);
6200   }
6201   WMEM(INDIRECT_1(op, op >> 8), src3);
6202   UPDATE_DEF();
6203}
6204
6205void tms3203x_device::mpyf3stf(UINT32 op)
6206{
6207   DECLARE_DEF;
6208   UINT32 src3 = FP2LONG((op >> 16) & 7);
6209   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6210   {
6211      LONG2FP(TMR_TEMP1, src2);
6212      mpyf(m_r[(op >> 22) & 7], m_r[(op >> 19) & 7], m_r[TMR_TEMP1]);
6213   }
6214   WMEM(INDIRECT_1(op, op >> 8), src3);
6215   UPDATE_DEF();
6216}
6217
6218void tms3203x_device::mpyi3sti(UINT32 op)
6219{
6220   DECLARE_DEF;
6221   UINT32 src3 = IREG((op >> 16) & 7);
6222   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6223   {
6224      int dreg = (op >> 22) & 7;
6225      UINT32 src1 = IREG((op >> 19) & 7);
6226      MPYI(dreg, src1, src2);
6227   }
6228   WMEM(INDIRECT_1(op, op >> 8), src3);
6229   UPDATE_DEF();
6230}
6231
6232void tms3203x_device::negfstf(UINT32 op)
6233{
6234   DECLARE_DEF;
6235   UINT32 src3 = FP2LONG((op >> 16) & 7);
6236   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6237   {
6238      LONG2FP(TMR_TEMP1, src2);
6239      negf(m_r[(op >> 22) & 7], m_r[TMR_TEMP1]);
6240   }
6241   WMEM(INDIRECT_1(op, op >> 8), src3);
6242   UPDATE_DEF();
6243}
6244
6245void tms3203x_device::negisti(UINT32 op)
6246{
6247   DECLARE_DEF;
6248   UINT32 src3 = IREG((op >> 16) & 7);
6249   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6250   {
6251      int dreg = (op >> 22) & 7;
6252      NEGI(dreg, src2);
6253   }
6254   WMEM(INDIRECT_1(op, op >> 8), src3);
6255   UPDATE_DEF();
6256}
6257
6258void tms3203x_device::notsti(UINT32 op)
6259{
6260   DECLARE_DEF;
6261   UINT32 src3 = IREG((op >> 16) & 7);
6262   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6263   {
6264      int dreg = (op >> 22) & 7;
6265      NOT(dreg, src2);
6266   }
6267   WMEM(INDIRECT_1(op, op >> 8), src3);
6268   UPDATE_DEF();
6269}
6270
6271void tms3203x_device::or3sti(UINT32 op)
6272{
6273   DECLARE_DEF;
6274   UINT32 src3 = IREG((op >> 16) & 7);
6275   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6276   {
6277      int dreg = (op >> 22) & 7;
6278      UINT32 src1 = IREG((op >> 19) & 7);
6279      OR(dreg, src1, src2);
6280   }
6281   WMEM(INDIRECT_1(op, op >> 8), src3);
6282   UPDATE_DEF();
6283}
6284
6285void tms3203x_device::subf3stf(UINT32 op)
6286{
6287   DECLARE_DEF;
6288   UINT32 src3 = FP2LONG((op >> 16) & 7);
6289   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6290   {
6291      LONG2FP(TMR_TEMP1, src2);
6292      subf(m_r[(op >> 22) & 7], m_r[TMR_TEMP1], m_r[(op >> 19) & 7]);
6293   }
6294   WMEM(INDIRECT_1(op, op >> 8), src3);
6295   UPDATE_DEF();
6296}
6297
6298void tms3203x_device::subi3sti(UINT32 op)
6299{
6300   DECLARE_DEF;
6301   UINT32 src3 = IREG((op >> 16) & 7);
6302   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6303   {
6304      int dreg = (op >> 22) & 7;
6305      UINT32 src1 = IREG((op >> 19) & 7);
6306      SUBI(dreg, src2, src1);
6307   }
6308   WMEM(INDIRECT_1(op, op >> 8), src3);
6309   UPDATE_DEF();
6310}
6311
6312void tms3203x_device::xor3sti(UINT32 op)
6313{
6314   DECLARE_DEF;
6315   UINT32 src3 = IREG((op >> 16) & 7);
6316   UINT32 src2 = RMEM(INDIRECT_1_DEF(op, op));
6317   {
6318      int dreg = (op >> 22) & 7;
6319      UINT32 src1 = IREG((op >> 19) & 7);
6320      XOR(dreg, src1, src2);
6321   }
6322   WMEM(INDIRECT_1(op, op >> 8), src3);
6323   UPDATE_DEF();
6324}
6325
6326
6327//**************************************************************************
6328//  FUNCTION TABLE
6329//**************************************************************************
6330
6331UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_d[0x20])(UINT32, UINT8) =
6332{
6333   &tms3203x_device::mod00_d,      &tms3203x_device::mod01_d,      &tms3203x_device::mod02_d,      &tms3203x_device::mod03_d,
6334   &tms3203x_device::mod04_d,      &tms3203x_device::mod05_d,      &tms3203x_device::mod06_d,      &tms3203x_device::mod07_d,
6335   &tms3203x_device::mod08,        &tms3203x_device::mod09,        &tms3203x_device::mod0a,        &tms3203x_device::mod0b,
6336   &tms3203x_device::mod0c,        &tms3203x_device::mod0d,        &tms3203x_device::mod0e,        &tms3203x_device::mod0f,
6337   &tms3203x_device::mod10,        &tms3203x_device::mod11,        &tms3203x_device::mod12,        &tms3203x_device::mod13,
6338   &tms3203x_device::mod14,        &tms3203x_device::mod15,        &tms3203x_device::mod16,        &tms3203x_device::mod17,
6339   &tms3203x_device::mod18,        &tms3203x_device::mod19,        &tms3203x_device::modillegal,   &tms3203x_device::modillegal,
6340   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal
6341};
6342
6343
6344UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1[0x20])(UINT32, UINT8) =
6345{
6346   &tms3203x_device::mod00_1,      &tms3203x_device::mod01_1,      &tms3203x_device::mod02_1,      &tms3203x_device::mod03_1,
6347   &tms3203x_device::mod04_1,      &tms3203x_device::mod05_1,      &tms3203x_device::mod06_1,      &tms3203x_device::mod07_1,
6348   &tms3203x_device::mod08,        &tms3203x_device::mod09,        &tms3203x_device::mod0a,        &tms3203x_device::mod0b,
6349   &tms3203x_device::mod0c,        &tms3203x_device::mod0d,        &tms3203x_device::mod0e,        &tms3203x_device::mod0f,
6350   &tms3203x_device::mod10,        &tms3203x_device::mod11,        &tms3203x_device::mod12,        &tms3203x_device::mod13,
6351   &tms3203x_device::mod14,        &tms3203x_device::mod15,        &tms3203x_device::mod16,        &tms3203x_device::mod17,
6352   &tms3203x_device::mod18,        &tms3203x_device::mod19,        &tms3203x_device::modillegal,   &tms3203x_device::modillegal,
6353   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal,   &tms3203x_device::modillegal
6354};
6355
6356
6357UINT32 (tms3203x_device::*const tms3203x_device::s_indirect_1_def[0x20])(UINT32, UINT8, UINT32 *&) =
6358{
6359   &tms3203x_device::mod00_1_def,  &tms3203x_device::mod01_1_def,  &tms3203x_device::mod02_1_def,  &tms3203x_device::mod03_1_def,
6360   &tms3203x_device::mod04_1_def,  &tms3203x_device::mod05_1_def,  &tms3203x_device::mod06_1_def,  &tms3203x_device::mod07_1_def,
6361   &tms3203x_device::mod08_def,    &tms3203x_device::mod09_def,    &tms3203x_device::mod0a_def,    &tms3203x_device::mod0b_def,
6362   &tms3203x_device::mod0c_def,    &tms3203x_device::mod0d_def,    &tms3203x_device::mod0e_def,    &tms3203x_device::mod0f_def,
6363   &tms3203x_device::mod10_def,    &tms3203x_device::mod11_def,    &tms3203x_device::mod12_def,    &tms3203x_device::mod13_def,
6364   &tms3203x_device::mod14_def,    &tms3203x_device::mod15_def,    &tms3203x_device::mod16_def,    &tms3203x_device::mod17_def,
6365   &tms3203x_device::mod18_def,    &tms3203x_device::mod19_def,    &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,
6366   &tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def,&tms3203x_device::modillegal_def
6367};
6368
6369void (tms3203x_device::*const tms3203x_device::s_tms32031ops[])(UINT32 op) =
6370{
6371   &tms3203x_device::absf_reg,     &tms3203x_device::absf_dir,     &tms3203x_device::absf_ind,     &tms3203x_device::absf_imm,     // 0x00
6372   &tms3203x_device::absi_reg,     &tms3203x_device::absi_dir,     &tms3203x_device::absi_ind,     &tms3203x_device::absi_imm,
6373   &tms3203x_device::addc_reg,     &tms3203x_device::addc_dir,     &tms3203x_device::addc_ind,     &tms3203x_device::addc_imm,
6374   &tms3203x_device::addf_reg,     &tms3203x_device::addf_dir,     &tms3203x_device::addf_ind,     &tms3203x_device::addf_imm,
6375   &tms3203x_device::addi_reg,     &tms3203x_device::addi_dir,     &tms3203x_device::addi_ind,     &tms3203x_device::addi_imm,
6376   &tms3203x_device::and_reg,      &tms3203x_device::and_dir,      &tms3203x_device::and_ind,      &tms3203x_device::and_imm,
6377   &tms3203x_device::andn_reg,     &tms3203x_device::andn_dir,     &tms3203x_device::andn_ind,     &tms3203x_device::andn_imm,
6378   &tms3203x_device::ash_reg,      &tms3203x_device::ash_dir,      &tms3203x_device::ash_ind,      &tms3203x_device::ash_imm,
6379   &tms3203x_device::cmpf_reg,     &tms3203x_device::cmpf_dir,     &tms3203x_device::cmpf_ind,     &tms3203x_device::cmpf_imm,     // 0x08
6380   &tms3203x_device::cmpi_reg,     &tms3203x_device::cmpi_dir,     &tms3203x_device::cmpi_ind,     &tms3203x_device::cmpi_imm,
6381   &tms3203x_device::fix_reg,      &tms3203x_device::fix_dir,      &tms3203x_device::fix_ind,      &tms3203x_device::fix_imm,
6382   &tms3203x_device::float_reg,    &tms3203x_device::float_dir,    &tms3203x_device::float_ind,    &tms3203x_device::float_imm,
6383   &tms3203x_device::idle,         &tms3203x_device::idle,         &tms3203x_device::idle,         &tms3203x_device::idle,
6384   &tms3203x_device::lde_reg,      &tms3203x_device::lde_dir,      &tms3203x_device::lde_ind,      &tms3203x_device::lde_imm,
6385   &tms3203x_device::ldf_reg,      &tms3203x_device::ldf_dir,      &tms3203x_device::ldf_ind,      &tms3203x_device::ldf_imm,
6386   &tms3203x_device::illegal,      &tms3203x_device::ldfi_dir,     &tms3203x_device::ldfi_ind,     &tms3203x_device::illegal,
6387   &tms3203x_device::ldi_reg,      &tms3203x_device::ldi_dir,      &tms3203x_device::ldi_ind,      &tms3203x_device::ldi_imm,      // 0x10
6388   &tms3203x_device::illegal,      &tms3203x_device::ldii_dir,     &tms3203x_device::ldii_ind,     &tms3203x_device::illegal,
6389   &tms3203x_device::ldm_reg,      &tms3203x_device::ldm_dir,      &tms3203x_device::ldm_ind,      &tms3203x_device::ldm_imm,
6390   &tms3203x_device::lsh_reg,      &tms3203x_device::lsh_dir,      &tms3203x_device::lsh_ind,      &tms3203x_device::lsh_imm,
6391   &tms3203x_device::mpyf_reg,     &tms3203x_device::mpyf_dir,     &tms3203x_device::mpyf_ind,     &tms3203x_device::mpyf_imm,
6392   &tms3203x_device::mpyi_reg,     &tms3203x_device::mpyi_dir,     &tms3203x_device::mpyi_ind,     &tms3203x_device::mpyi_imm,
6393   &tms3203x_device::negb_reg,     &tms3203x_device::negb_dir,     &tms3203x_device::negb_ind,     &tms3203x_device::negb_imm,
6394   &tms3203x_device::negf_reg,     &tms3203x_device::negf_dir,     &tms3203x_device::negf_ind,     &tms3203x_device::negf_imm,
6395   &tms3203x_device::negi_reg,     &tms3203x_device::negi_dir,     &tms3203x_device::negi_ind,     &tms3203x_device::negi_imm,     // 0x18
6396   &tms3203x_device::nop_reg,      &tms3203x_device::illegal,      &tms3203x_device::nop_ind,      &tms3203x_device::illegal,
6397   &tms3203x_device::norm_reg,     &tms3203x_device::norm_dir,     &tms3203x_device::norm_ind,     &tms3203x_device::norm_imm,
6398   &tms3203x_device::not_reg,      &tms3203x_device::not_dir,      &tms3203x_device::not_ind,      &tms3203x_device::not_imm,
6399   &tms3203x_device::illegal,      &tms3203x_device::pop,          &tms3203x_device::illegal,      &tms3203x_device::illegal,
6400   &tms3203x_device::illegal,      &tms3203x_device::popf,         &tms3203x_device::illegal,      &tms3203x_device::illegal,
6401   &tms3203x_device::illegal,      &tms3203x_device::push,         &tms3203x_device::illegal,      &tms3203x_device::illegal,
6402   &tms3203x_device::illegal,      &tms3203x_device::pushf,        &tms3203x_device::illegal,      &tms3203x_device::illegal,
6403   &tms3203x_device::or_reg,       &tms3203x_device::or_dir,       &tms3203x_device::or_ind,       &tms3203x_device::or_imm,       // 0x20
6404   &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,     &tms3203x_device::maxspeed,
6405   &tms3203x_device::rnd_reg,      &tms3203x_device::rnd_dir,      &tms3203x_device::rnd_ind,      &tms3203x_device::rnd_imm,
6406   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rol,
6407   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rolc,
6408   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::ror,
6409   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::rorc,
6410   &tms3203x_device::rtps_reg,     &tms3203x_device::rtps_dir,     &tms3203x_device::rtps_ind,     &tms3203x_device::rtps_imm,
6411   &tms3203x_device::illegal,      &tms3203x_device::stf_dir,      &tms3203x_device::stf_ind,      &tms3203x_device::illegal,      // 0x28
6412   &tms3203x_device::illegal,      &tms3203x_device::stfi_dir,     &tms3203x_device::stfi_ind,     &tms3203x_device::illegal,
6413   &tms3203x_device::illegal,      &tms3203x_device::sti_dir,      &tms3203x_device::sti_ind,      &tms3203x_device::illegal,
6414   &tms3203x_device::illegal,      &tms3203x_device::stii_dir,     &tms3203x_device::stii_ind,     &tms3203x_device::illegal,
6415   &tms3203x_device::sigi,         &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6416   &tms3203x_device::subb_reg,     &tms3203x_device::subb_dir,     &tms3203x_device::subb_ind,     &tms3203x_device::subb_imm,
6417   &tms3203x_device::subc_reg,     &tms3203x_device::subc_dir,     &tms3203x_device::subc_ind,     &tms3203x_device::subc_imm,
6418   &tms3203x_device::subf_reg,     &tms3203x_device::subf_dir,     &tms3203x_device::subf_ind,     &tms3203x_device::subf_imm,
6419   &tms3203x_device::subi_reg,     &tms3203x_device::subi_dir,     &tms3203x_device::subi_ind,     &tms3203x_device::subi_imm,     // 0x30
6420   &tms3203x_device::subrb_reg,    &tms3203x_device::subrb_dir,    &tms3203x_device::subrb_ind,    &tms3203x_device::subrb_imm,
6421   &tms3203x_device::subrf_reg,    &tms3203x_device::subrf_dir,    &tms3203x_device::subrf_ind,    &tms3203x_device::subrf_imm,
6422   &tms3203x_device::subri_reg,    &tms3203x_device::subri_dir,    &tms3203x_device::subri_ind,    &tms3203x_device::subri_imm,
6423   &tms3203x_device::tstb_reg,     &tms3203x_device::tstb_dir,     &tms3203x_device::tstb_ind,     &tms3203x_device::tstb_imm,
6424   &tms3203x_device::xor_reg,      &tms3203x_device::xor_dir,      &tms3203x_device::xor_ind,      &tms3203x_device::xor_imm,
6425   &tms3203x_device::illegal,      &tms3203x_device::iack_dir,     &tms3203x_device::iack_ind,     &tms3203x_device::illegal,
6426   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6427   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x38
6428   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6429   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6430   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6431   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6432   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6433   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6434   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6435
6436   &tms3203x_device::addc3_regreg, &tms3203x_device::addc3_indreg, &tms3203x_device::addc3_regind, &tms3203x_device::addc3_indind, // 0x40
6437   &tms3203x_device::addf3_regreg, &tms3203x_device::addf3_indreg, &tms3203x_device::addf3_regind, &tms3203x_device::addf3_indind,
6438   &tms3203x_device::addi3_regreg, &tms3203x_device::addi3_indreg, &tms3203x_device::addi3_regind, &tms3203x_device::addi3_indind,
6439   &tms3203x_device::and3_regreg,  &tms3203x_device::and3_indreg,  &tms3203x_device::and3_regind,  &tms3203x_device::and3_indind,
6440   &tms3203x_device::andn3_regreg, &tms3203x_device::andn3_indreg, &tms3203x_device::andn3_regind, &tms3203x_device::andn3_indind,
6441   &tms3203x_device::ash3_regreg,  &tms3203x_device::ash3_indreg,  &tms3203x_device::ash3_regind,  &tms3203x_device::ash3_indind,
6442   &tms3203x_device::cmpf3_regreg, &tms3203x_device::cmpf3_indreg, &tms3203x_device::cmpf3_regind, &tms3203x_device::cmpf3_indind,
6443   &tms3203x_device::cmpi3_regreg, &tms3203x_device::cmpi3_indreg, &tms3203x_device::cmpi3_regind, &tms3203x_device::cmpi3_indind,
6444   &tms3203x_device::lsh3_regreg,  &tms3203x_device::lsh3_indreg,  &tms3203x_device::lsh3_regind,  &tms3203x_device::lsh3_indind,  // 0x48
6445   &tms3203x_device::mpyf3_regreg, &tms3203x_device::mpyf3_indreg, &tms3203x_device::mpyf3_regind, &tms3203x_device::mpyf3_indind,
6446   &tms3203x_device::mpyi3_regreg, &tms3203x_device::mpyi3_indreg, &tms3203x_device::mpyi3_regind, &tms3203x_device::mpyi3_indind,
6447   &tms3203x_device::or3_regreg,   &tms3203x_device::or3_indreg,   &tms3203x_device::or3_regind,   &tms3203x_device::or3_indind,
6448   &tms3203x_device::subb3_regreg, &tms3203x_device::subb3_indreg, &tms3203x_device::subb3_regind, &tms3203x_device::subb3_indind,
6449   &tms3203x_device::subf3_regreg, &tms3203x_device::subf3_indreg, &tms3203x_device::subf3_regind, &tms3203x_device::subf3_indind,
6450   &tms3203x_device::subi3_regreg, &tms3203x_device::subi3_indreg, &tms3203x_device::subi3_regind, &tms3203x_device::subi3_indind,
6451   &tms3203x_device::tstb3_regreg, &tms3203x_device::tstb3_indreg, &tms3203x_device::tstb3_regind, &tms3203x_device::tstb3_indind,
6452   &tms3203x_device::xor3_regreg,  &tms3203x_device::xor3_indreg,  &tms3203x_device::xor3_regind,  &tms3203x_device::xor3_indind,  // 0x50
6453   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6454   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6455   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6456   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6457   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6458   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6459   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6460   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x58
6461   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6462   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6463   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6464   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6465   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6466   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6467   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6468   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x60
6469   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6470   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6471   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6472   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6473   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6474   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6475   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6476   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x68
6477   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6478   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6479   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6480   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6481   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6482   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6483   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6484   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x70
6485   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6486   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6487   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6488   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6489   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6490   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6491   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6492   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x78
6493   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6494   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6495   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6496   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6497   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6498   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6499   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6500
6501   &tms3203x_device::ldfu_reg,     &tms3203x_device::ldfu_dir,     &tms3203x_device::ldfu_ind,     &tms3203x_device::ldfu_imm,     // 0x80
6502   &tms3203x_device::ldflo_reg,    &tms3203x_device::ldflo_dir,    &tms3203x_device::ldflo_ind,    &tms3203x_device::ldflo_imm,
6503   &tms3203x_device::ldfls_reg,    &tms3203x_device::ldfls_dir,    &tms3203x_device::ldfls_ind,    &tms3203x_device::ldfls_imm,
6504   &tms3203x_device::ldfhi_reg,    &tms3203x_device::ldfhi_dir,    &tms3203x_device::ldfhi_ind,    &tms3203x_device::ldfhi_imm,
6505   &tms3203x_device::ldfhs_reg,    &tms3203x_device::ldfhs_dir,    &tms3203x_device::ldfhs_ind,    &tms3203x_device::ldfhs_imm,
6506   &tms3203x_device::ldfeq_reg,    &tms3203x_device::ldfeq_dir,    &tms3203x_device::ldfeq_ind,    &tms3203x_device::ldfeq_imm,
6507   &tms3203x_device::ldfne_reg,    &tms3203x_device::ldfne_dir,    &tms3203x_device::ldfne_ind,    &tms3203x_device::ldfne_imm,
6508   &tms3203x_device::ldflt_reg,    &tms3203x_device::ldflt_dir,    &tms3203x_device::ldflt_ind,    &tms3203x_device::ldflt_imm,
6509   &tms3203x_device::ldfle_reg,    &tms3203x_device::ldfle_dir,    &tms3203x_device::ldfle_ind,    &tms3203x_device::ldfle_imm,    // 0x88
6510   &tms3203x_device::ldfgt_reg,    &tms3203x_device::ldfgt_dir,    &tms3203x_device::ldfgt_ind,    &tms3203x_device::ldfgt_imm,
6511   &tms3203x_device::ldfge_reg,    &tms3203x_device::ldfge_dir,    &tms3203x_device::ldfge_ind,    &tms3203x_device::ldfge_imm,
6512   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6513   &tms3203x_device::ldfnv_reg,    &tms3203x_device::ldfnv_dir,    &tms3203x_device::ldfnv_ind,    &tms3203x_device::ldfnv_imm,
6514   &tms3203x_device::ldfv_reg,     &tms3203x_device::ldfv_dir,     &tms3203x_device::ldfv_ind,     &tms3203x_device::ldfv_imm,
6515   &tms3203x_device::ldfnuf_reg,   &tms3203x_device::ldfnuf_dir,   &tms3203x_device::ldfnuf_ind,   &tms3203x_device::ldfnuf_imm,
6516   &tms3203x_device::ldfuf_reg,    &tms3203x_device::ldfuf_dir,    &tms3203x_device::ldfuf_ind,    &tms3203x_device::ldfuf_imm,
6517   &tms3203x_device::ldfnlv_reg,   &tms3203x_device::ldfnlv_dir,   &tms3203x_device::ldfnlv_ind,   &tms3203x_device::ldfnlv_imm,   // 0x90
6518   &tms3203x_device::ldflv_reg,    &tms3203x_device::ldflv_dir,    &tms3203x_device::ldflv_ind,    &tms3203x_device::ldflv_imm,
6519   &tms3203x_device::ldfnluf_reg,  &tms3203x_device::ldfnluf_dir,  &tms3203x_device::ldfnluf_ind,  &tms3203x_device::ldfnluf_imm,
6520   &tms3203x_device::ldfluf_reg,   &tms3203x_device::ldfluf_dir,   &tms3203x_device::ldfluf_ind,   &tms3203x_device::ldfluf_imm,
6521   &tms3203x_device::ldfzuf_reg,   &tms3203x_device::ldfzuf_dir,   &tms3203x_device::ldfzuf_ind,   &tms3203x_device::ldfzuf_imm,
6522   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6523   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6524   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6525   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x98
6526   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6527   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6528   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6529   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6530   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6531   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6532   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6533   &tms3203x_device::ldiu_reg,     &tms3203x_device::ldiu_dir,     &tms3203x_device::ldiu_ind,     &tms3203x_device::ldiu_imm,     // 0xa0
6534   &tms3203x_device::ldilo_reg,    &tms3203x_device::ldilo_dir,    &tms3203x_device::ldilo_ind,    &tms3203x_device::ldilo_imm,
6535   &tms3203x_device::ldils_reg,    &tms3203x_device::ldils_dir,    &tms3203x_device::ldils_ind,    &tms3203x_device::ldils_imm,
6536   &tms3203x_device::ldihi_reg,    &tms3203x_device::ldihi_dir,    &tms3203x_device::ldihi_ind,    &tms3203x_device::ldihi_imm,
6537   &tms3203x_device::ldihs_reg,    &tms3203x_device::ldihs_dir,    &tms3203x_device::ldihs_ind,    &tms3203x_device::ldihs_imm,
6538   &tms3203x_device::ldieq_reg,    &tms3203x_device::ldieq_dir,    &tms3203x_device::ldieq_ind,    &tms3203x_device::ldieq_imm,
6539   &tms3203x_device::ldine_reg,    &tms3203x_device::ldine_dir,    &tms3203x_device::ldine_ind,    &tms3203x_device::ldine_imm,
6540   &tms3203x_device::ldilt_reg,    &tms3203x_device::ldilt_dir,    &tms3203x_device::ldilt_ind,    &tms3203x_device::ldilt_imm,
6541   &tms3203x_device::ldile_reg,    &tms3203x_device::ldile_dir,    &tms3203x_device::ldile_ind,    &tms3203x_device::ldile_imm,    // 0xa8
6542   &tms3203x_device::ldigt_reg,    &tms3203x_device::ldigt_dir,    &tms3203x_device::ldigt_ind,    &tms3203x_device::ldigt_imm,
6543   &tms3203x_device::ldige_reg,    &tms3203x_device::ldige_dir,    &tms3203x_device::ldige_ind,    &tms3203x_device::ldige_imm,
6544   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6545   &tms3203x_device::ldinv_reg,    &tms3203x_device::ldinv_dir,    &tms3203x_device::ldinv_ind,    &tms3203x_device::ldinv_imm,
6546   &tms3203x_device::ldiv_reg,     &tms3203x_device::ldiv_dir,     &tms3203x_device::ldiv_ind,     &tms3203x_device::ldiv_imm,
6547   &tms3203x_device::ldinuf_reg,   &tms3203x_device::ldinuf_dir,   &tms3203x_device::ldinuf_ind,   &tms3203x_device::ldinuf_imm,
6548   &tms3203x_device::ldiuf_reg,    &tms3203x_device::ldiuf_dir,    &tms3203x_device::ldiuf_ind,    &tms3203x_device::ldiuf_imm,
6549   &tms3203x_device::ldinlv_reg,   &tms3203x_device::ldinlv_dir,   &tms3203x_device::ldinlv_ind,   &tms3203x_device::ldinlv_imm,   // 0xb0
6550   &tms3203x_device::ldilv_reg,    &tms3203x_device::ldilv_dir,    &tms3203x_device::ldilv_ind,    &tms3203x_device::ldilv_imm,
6551   &tms3203x_device::ldinluf_reg,  &tms3203x_device::ldinluf_dir,  &tms3203x_device::ldinluf_ind,  &tms3203x_device::ldinluf_imm,
6552   &tms3203x_device::ldiluf_reg,   &tms3203x_device::ldiluf_dir,   &tms3203x_device::ldiluf_ind,   &tms3203x_device::ldiluf_imm,
6553   &tms3203x_device::ldizuf_reg,   &tms3203x_device::ldizuf_dir,   &tms3203x_device::ldizuf_ind,   &tms3203x_device::ldizuf_imm,
6554   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6555   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6556   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6557   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xb8
6558   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6559   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6560   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6561   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6562   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6563   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6564   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6565
6566   &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       // 0xc0
6567   &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,       &tms3203x_device::br_imm,
6568   &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,
6569   &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,      &tms3203x_device::brd_imm,
6570   &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,
6571   &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,     &tms3203x_device::call_imm,
6572   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6573   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6574   &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     // 0xc8
6575   &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,     &tms3203x_device::rptb_imm,
6576   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6577   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6578   &tms3203x_device::swi,          &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6579   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6580   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6581   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6582   &tms3203x_device::brc_reg,      &tms3203x_device::brcd_reg,     &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xd0
6583   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6584   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6585   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6586   &tms3203x_device::brc_imm,      &tms3203x_device::brcd_imm,     &tms3203x_device::illegal,      &tms3203x_device::illegal,
6587   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6588   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6589   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6590   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     // 0xd8
6591   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6592   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6593   &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,     &tms3203x_device::dbc_reg,      &tms3203x_device::dbcd_reg,
6594   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6595   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6596   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6597   &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,     &tms3203x_device::dbc_imm,      &tms3203x_device::dbcd_imm,
6598   &tms3203x_device::callc_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xe0
6599   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6600   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6601   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6602   &tms3203x_device::callc_imm,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6603   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6604   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6605   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6606   &tms3203x_device::trapc,        &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xe8
6607   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6608   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6609   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6610   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6611   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6612   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6613   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6614   &tms3203x_device::retic_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xf0
6615   &tms3203x_device::retsc_reg,    &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6616   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6617   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6618   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6619   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6620   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6621   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6622   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0xf8
6623   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6624   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6625   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6626   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6627   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6628   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6629   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6630
6631   &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    // 0x100
6632   &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,    &tms3203x_device::mpyaddf_0,
6633   &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,
6634   &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,    &tms3203x_device::mpyaddf_1,
6635   &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,
6636   &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,    &tms3203x_device::mpyaddf_2,
6637   &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,
6638   &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,    &tms3203x_device::mpyaddf_3,
6639   &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    // 0x108
6640   &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,    &tms3203x_device::mpysubf_0,
6641   &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,
6642   &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,    &tms3203x_device::mpysubf_1,
6643   &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,
6644   &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,    &tms3203x_device::mpysubf_2,
6645   &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,
6646   &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,    &tms3203x_device::mpysubf_3,
6647   &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    // 0x110
6648   &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,    &tms3203x_device::mpyaddi_0,
6649   &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,
6650   &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,    &tms3203x_device::mpyaddi_1,
6651   &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,
6652   &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,    &tms3203x_device::mpyaddi_2,
6653   &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,
6654   &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,    &tms3203x_device::mpyaddi_3,
6655   &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    // 0x118
6656   &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,    &tms3203x_device::mpysubi_0,
6657   &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,
6658   &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,    &tms3203x_device::mpysubi_1,
6659   &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,
6660   &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,    &tms3203x_device::mpysubi_2,
6661   &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,
6662   &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,    &tms3203x_device::mpysubi_3,
6663   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x120
6664   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6665   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6666   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6667   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6668   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6669   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6670   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6671   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x128
6672   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6673   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6674   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6675   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6676   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6677   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6678   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6679   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x130
6680   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6681   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6682   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6683   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6684   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6685   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6686   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6687   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x138
6688   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6689   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6690   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6691   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6692   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6693   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6694   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6695
6696   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x140
6697   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6698   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6699   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6700   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6701   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6702   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6703   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6704   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x148
6705   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6706   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6707   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6708   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6709   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6710   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6711   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6712   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x150
6713   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6714   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6715   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6716   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6717   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6718   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6719   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6720   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x158
6721   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6722   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6723   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6724   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6725   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6726   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6727   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6728   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x160
6729   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6730   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6731   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6732   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6733   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6734   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6735   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6736   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x168
6737   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6738   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6739   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6740   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6741   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6742   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6743   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6744   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x170
6745   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6746   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6747   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6748   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6749   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6750   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6751   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6752   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x178
6753   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6754   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6755   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6756   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6757   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6758   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6759   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6760
6761   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       // 0x180
6762   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6763   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6764   &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,       &tms3203x_device::stfstf,
6765   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6766   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6767   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6768   &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,       &tms3203x_device::stisti,
6769   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       // 0x188
6770   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6771   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6772   &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,       &tms3203x_device::ldfldf,
6773   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6774   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6775   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6776   &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,       &tms3203x_device::ldildi,
6777   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      // 0x190
6778   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6779   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6780   &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,      &tms3203x_device::absfstf,
6781   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6782   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6783   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6784   &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,      &tms3203x_device::absisti,
6785   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     // 0x198
6786   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6787   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6788   &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,     &tms3203x_device::addf3stf,
6789   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6790   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6791   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6792   &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,     &tms3203x_device::addi3sti,
6793   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      // 0x1a0
6794   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6795   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6796   &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,      &tms3203x_device::and3sti,
6797   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6798   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6799   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6800   &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,      &tms3203x_device::ash3sti,
6801   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       // 0x1a8
6802   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6803   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6804   &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,       &tms3203x_device::fixsti,
6805   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6806   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6807   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6808   &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,     &tms3203x_device::floatstf,
6809   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       // 0x1b0
6810   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6811   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6812   &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,       &tms3203x_device::ldfstf,
6813   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6814   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6815   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6816   &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,       &tms3203x_device::ldisti,
6817   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      // 0x1b8
6818   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6819   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6820   &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,      &tms3203x_device::lsh3sti,
6821   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6822   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6823   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6824   &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,     &tms3203x_device::mpyf3stf,
6825
6826   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     // 0x1c0
6827   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6828   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6829   &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,     &tms3203x_device::mpyi3sti,
6830   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6831   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6832   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6833   &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,      &tms3203x_device::negfstf,
6834   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      // 0x1c8
6835   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6836   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6837   &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,      &tms3203x_device::negisti,
6838   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6839   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6840   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6841   &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,       &tms3203x_device::notsti,
6842   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       // 0x1d0
6843   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6844   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6845   &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,       &tms3203x_device::or3sti,
6846   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6847   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6848   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6849   &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,     &tms3203x_device::subf3stf,
6850   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     // 0x1d8
6851   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6852   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6853   &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,     &tms3203x_device::subi3sti,
6854   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6855   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6856   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6857   &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,      &tms3203x_device::xor3sti,
6858   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1e0
6859   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6860   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6861   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6862   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6863   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6864   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6865   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6866   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1e8
6867   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6868   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6869   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6870   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6871   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6872   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6873   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6874   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1f0
6875   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6876   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6877   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6878   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6879   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6880   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6881   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6882   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      // 0x1f8
6883   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6884   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6885   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6886   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6887   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6888   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,
6889   &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal,      &tms3203x_device::illegal
6890};
trunk/src/devices/cpu/tms32031/tms32031.cpp
r250291r250292
846846//  CORE OPCODES
847847//**************************************************************************
848848
849#include "32031ops.cpp"
849#include "32031ops.inc"
trunk/src/devices/cpu/tms32051/32051ops.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Ville Linde
3// stack is LIFO and is 8 levels deep, there is no stackpointer on the real chip
4void tms32051_device::PUSH_STACK(UINT16 pc)
5{
6   m_pcstack_ptr = (m_pcstack_ptr - 1) & 7;
7   m_pcstack[m_pcstack_ptr] = pc;
8}
9
10UINT16 tms32051_device::POP_STACK()
11{
12   UINT16 pc = m_pcstack[m_pcstack_ptr];
13   m_pcstack_ptr = (m_pcstack_ptr + 1) & 7;
14   m_pcstack[(m_pcstack_ptr + 7) & 7] = m_pcstack[(m_pcstack_ptr + 6) & 7];
15   return pc;
16}
17
18INT32 tms32051_device::SUB(UINT32 a, UINT32 b)
19{
20   UINT32 res = a - b;
21
22   // C is cleared if borrow was generated
23   m_st1.c = (b > a) ? 0 : 1;
24
25   // check overflow
26   if ((a ^ b) & (a ^ res) & 0x80000000)
27   {
28      if (m_st0.ovm)  // overflow saturation mode
29      {
30         res = ((INT32)(res) < 0) ? 0x7fffffff : 0x80000000;
31      }
32
33      // set OV, this is a sticky flag
34      m_st0.ov = 1;
35   }
36
37   return (INT32)(res);
38}
39
40INT32 tms32051_device::ADD(UINT32 a, UINT32 b)
41{
42   UINT32 res = a + b;
43
44   // C is set if carry was generated
45   m_st1.c = (a > res) ? 1 : 0;
46
47   // check overflow
48   if ((a ^ res) & (b ^ res) & 0x80000000)
49   {
50      if (m_st0.ovm)  // overflow saturation mode
51      {
52         res = ((INT32)(res) < 0) ? 0x7fffffff : 0x80000000;
53      }
54
55      // set OV, this is a sticky flag
56      m_st0.ov = 1;
57   }
58
59   return (INT32)(res);
60}
61
62
63void tms32051_device::UPDATE_AR(int ar, int step)
64{
65   int cenb1 = (m_cbcr >> 3) & 0x1;
66   int car1 = m_cbcr & 0x7;
67   int cenb2 = (m_cbcr >> 7) & 0x1;
68   int car2 = (m_cbcr >> 4) & 0x7;
69
70   if (cenb1 && ar == car1)
71   {
72      // update circular buffer 1, note that it only checks ==
73      if (m_ar[ar] == m_cber1)
74      {
75         m_ar[ar] = m_cbsr1;
76      }
77      else
78      {
79         m_ar[ar] += step;
80      }
81   }
82   else if (cenb2 && ar == car2)
83   {
84      // update circular buffer 2, note that it only checks ==
85      if (m_ar[ar] == m_cber2)
86      {
87         m_ar[ar] = m_cbsr2;
88      }
89      else
90      {
91         m_ar[ar] += step;
92      }
93   }
94   else
95   {
96      m_ar[ar] += step;
97   }
98}
99
100void tms32051_device::UPDATE_ARP(int nar)
101{
102   m_st1.arb = m_st0.arp;
103   m_st0.arp = nar;
104}
105
106UINT16 tms32051_device::GET_ADDRESS()
107{
108   if (m_op & 0x80)        // Indirect Addressing
109   {
110      UINT16 ea;
111      int arp = m_st0.arp;
112      int nar = m_op & 0x7;
113
114      ea = m_ar[arp];
115
116      switch ((m_op >> 3) & 0xf)
117      {
118         case 0x0:   // *            (no operation)
119         {
120            break;
121         }
122         case 0x1:   // *, ARn       (NAR -> ARP)
123         {
124            UPDATE_ARP(nar);
125            break;
126         }
127         case 0x2:   // *-           ((CurrentAR)-1 -> CurrentAR)
128         {
129            UPDATE_AR(arp, -1);
130            break;
131         }
132         case 0x3:   // *-, ARn      ((CurrentAR)-1 -> CurrentAR, NAR -> ARP)
133         {
134            UPDATE_AR(arp, -1);
135            UPDATE_ARP(nar);
136            break;
137         }
138         case 0x4:   // *+           ((CurrentAR)+1 -> CurrentAR)
139         {
140            UPDATE_AR(arp, 1);
141            break;
142         }
143         case 0x5:   // *+, ARn      ((CurrentAR)+1 -> CurrentAR, NAR -> ARP)
144         {
145            UPDATE_AR(arp, 1);
146            UPDATE_ARP(nar);
147            break;
148         }
149         case 0xa:   // *0-          ((CurrentAR) - INDX)
150         {
151            UPDATE_AR(arp, -m_indx);
152            break;
153         }
154         case 0xb:   // *0-, ARn     ((CurrentAR) - INDX -> CurrentAR, NAR -> ARP)
155         {
156            UPDATE_AR(arp, -m_indx);
157            UPDATE_ARP(nar);
158            break;
159         }
160         case 0xc:   // *0+          ((CurrentAR) + INDX -> CurrentAR)
161         {
162            UPDATE_AR(arp, m_indx);
163            break;
164         }
165         case 0xd:   // *0+, ARn     ((CurrentAR) + INDX -> CurrentAR, NAR -> ARP)
166         {
167            UPDATE_AR(arp, m_indx);
168            UPDATE_ARP(nar);
169            break;
170         }
171
172         default:    fatalerror("32051: GET_ADDRESS: unimplemented indirect addressing mode %d at %04X (%04X)\n", (m_op >> 3) & 0xf, m_pc, m_op);
173      }
174
175      return ea;
176   }
177   else                    // Direct Addressing
178   {
179      return m_st0.dp | (m_op & 0x7f);
180   }
181}
182
183int tms32051_device::GET_ZLVC_CONDITION(int zlvc, int zlvc_mask)
184{
185   if (zlvc_mask & 0x2)        // OV-bit
186   {
187      if ((zlvc & 0x2) && m_st0.ov)                           // OV
188      {
189         // clear OV
190         m_st0.ov = 0;
191
192         return 1;
193      }
194      else if ((zlvc & 0x2) == 0 && m_st0.ov == 0)            // NOV
195         return 1;
196   }
197   if (zlvc_mask & 0x1)        // C-bit
198   {
199      if ((zlvc & 0x1) && m_st1.c)                            // C
200         return 1;
201      else if ((zlvc & 0x1) == 0 && m_st1.c == 0)         // NC
202         return 1;
203   }
204   if (zlvc_mask & 0x8)        // Z-bit
205   {
206      if ((zlvc & 0x8) && (INT32)(m_acc) == 0)                // EQ
207         return 1;
208      else if ((zlvc & 0x8) == 0 && (INT32)(m_acc) != 0)  // NEQ
209         return 1;
210   }
211   if (zlvc_mask & 0x4)        // L-bit
212   {
213      if ((zlvc & 0x4) && (INT32)(m_acc) < 0)             // LT
214         return 1;
215      else if ((zlvc & 0x4) == 0 && (INT32)(m_acc) > 0)       // GT
216         return 1;
217   }
218   return 0;
219}
220
221int tms32051_device::GET_TP_CONDITION(int tp)
222{
223   switch (tp)
224   {
225      case 0:     // BIO pin low
226      {
227         // TODO
228         return 0;
229      }
230      case 1:     // TC = 1
231      {
232         return m_st1.tc;
233      }
234      case 2:     // TC = 0
235      {
236         return m_st1.tc ^ 1;
237      }
238      case 3:     // always false
239      {
240         return 0;
241      }
242   }
243   return 0;
244}
245
246INT32 tms32051_device::PREG_PSCALER(INT32 preg)
247{
248   switch (m_st1.pm & 3)
249   {
250      case 0:     // No shift
251      {
252         return preg;
253      }
254      case 1:     // Left-shifted 1 bit, LSB zero-filled
255      {
256         return preg << 1;
257      }
258      case 2:     // Left-shifted 4 bits, 4 LSBs zero-filled
259      {
260         return preg << 4;
261      }
262      case 3:     // Right-shifted 6 bits, sign-extended, 6 LSBs lost
263      {
264         return (INT32)(preg >> 6);
265      }
266   }
267   return 0;
268}
269
270
271
272void tms32051_device::op_invalid()
273{
274   fatalerror("32051: invalid op at %08X\n", m_pc-1);
275}
276
277/*****************************************************************************/
278
279void tms32051_device::op_abs()
280{
281   fatalerror("32051: unimplemented op abs at %08X\n", m_pc-1);
282}
283
284void tms32051_device::op_adcb()
285{
286   fatalerror("32051: unimplemented op adcb at %08X\n", m_pc-1);
287}
288
289void tms32051_device::op_add_mem()
290{
291   INT32 d;
292   UINT16 ea = GET_ADDRESS();
293   UINT16 data = DM_READ16(ea);
294   int shift = (m_op >> 8) & 0xf;
295
296   if (m_st1.sxm)
297   {
298      d = (INT32)(INT16)(data) << shift;
299   }
300   else
301   {
302      d = (UINT32)(UINT16)(data) << shift;
303   }
304
305   m_acc = ADD(m_acc, d);
306
307   CYCLES(1);
308}
309
310void tms32051_device::op_add_simm()
311{
312   UINT16 imm = m_op & 0xff;
313
314   m_acc = ADD(m_acc, imm);
315
316   CYCLES(1);
317}
318
319void tms32051_device::op_add_limm()
320{
321   INT32 d;
322   UINT16 imm = ROPCODE();
323   int shift = m_op & 0xf;
324
325   if (m_st1.sxm)
326   {
327      d = (INT32)(INT16)(imm) << shift;
328   }
329   else
330   {
331      d = (UINT32)(UINT16)(imm) << shift;
332   }
333
334   m_acc = ADD(m_acc, d);
335
336   CYCLES(2);
337}
338
339void tms32051_device::op_add_s16_mem()
340{
341   UINT16 ea = GET_ADDRESS();
342   UINT32 data = DM_READ16(ea) << 16;
343
344   m_acc = ADD(m_acc, data);
345
346   CYCLES(1);
347}
348
349void tms32051_device::op_addb()
350{
351   m_acc = ADD(m_acc, m_accb);
352
353   CYCLES(1);
354}
355
356void tms32051_device::op_addc()
357{
358   fatalerror("32051: unimplemented op addc at %08X\n", m_pc-1);
359}
360
361void tms32051_device::op_adds()
362{
363   fatalerror("32051: unimplemented op adds at %08X\n", m_pc-1);
364}
365
366void tms32051_device::op_addt()
367{
368   fatalerror("32051: unimplemented op addt at %08X\n", m_pc-1);
369}
370
371void tms32051_device::op_and_mem()
372{
373   fatalerror("32051: unimplemented op and mem at %08X\n", m_pc-1);
374}
375
376void tms32051_device::op_and_limm()
377{
378   UINT32 imm = ROPCODE();
379   int shift = m_op & 0xf;
380
381   m_acc &= imm << shift;
382
383   CYCLES(2);
384}
385
386void tms32051_device::op_and_s16_limm()
387{
388   fatalerror("32051: unimplemented op and s16 limm at %08X\n", m_pc-1);
389}
390
391void tms32051_device::op_andb()
392{
393   fatalerror("32051: unimplemented op andb at %08X\n", m_pc-1);
394}
395
396void tms32051_device::op_bsar()
397{
398   int shift = (m_op & 0xf) + 1;
399
400   if (m_st1.sxm)
401   {
402      m_acc = (INT32)(m_acc) >> shift;
403   }
404   else
405   {
406      m_acc = (UINT32)(m_acc) >> shift;
407   }
408
409   CYCLES(1);
410}
411
412void tms32051_device::op_cmpl()
413{
414   m_acc = ~(UINT32)(m_acc);
415
416   CYCLES(1);
417}
418
419void tms32051_device::op_crgt()
420{
421   if (m_acc >= m_accb)
422   {
423      m_accb = m_acc;
424      m_st1.c = 1;
425   }
426   else
427   {
428      m_acc = m_accb;
429      m_st1.c = 0;
430   }
431
432   CYCLES(1);
433}
434
435void tms32051_device::op_crlt()
436{
437   if (m_acc >= m_accb)
438   {
439      m_acc = m_accb;
440      m_st1.c = 0;
441   }
442   else
443   {
444      m_accb = m_acc;
445      m_st1.c = 1;
446   }
447
448   CYCLES(1);
449}
450
451void tms32051_device::op_exar()
452{
453   INT32 tmp = m_acc;
454   m_acc = m_accb;
455   m_accb = tmp;
456
457   CYCLES(1);
458}
459
460void tms32051_device::op_lacb()
461{
462   m_acc = m_accb;
463
464   CYCLES(1);
465}
466
467void tms32051_device::op_lacc_mem()
468{
469   int shift = (m_op >> 8) & 0xf;
470   UINT16 ea = GET_ADDRESS();
471   UINT16 data = DM_READ16(ea);
472
473   if (m_st1.sxm)
474   {
475      m_acc = (INT32)(INT16)(data) << shift;
476   }
477   else
478   {
479      m_acc = (UINT32)(UINT16)(data) << shift;
480   }
481
482   CYCLES(1);
483}
484
485void tms32051_device::op_lacc_limm()
486{
487   UINT16 imm = ROPCODE();
488   int shift = m_op & 0xf;
489
490   if (m_st1.sxm)
491   {
492      m_acc = (INT32)(INT16)(imm) << shift;
493   }
494   else
495   {
496      m_acc = (UINT32)(UINT16)(imm) << shift;
497   }
498
499   CYCLES(1);
500}
501
502void tms32051_device::op_lacc_s16_mem()
503{
504   UINT16 ea = GET_ADDRESS();
505   m_acc = DM_READ16(ea) << 16;
506
507   CYCLES(1);
508}
509
510void tms32051_device::op_lacl_simm()
511{
512   m_acc = m_op & 0xff;
513
514   CYCLES(1);
515}
516
517void tms32051_device::op_lacl_mem()
518{
519   UINT16 ea = GET_ADDRESS();
520   m_acc = DM_READ16(ea) & 0xffff;
521
522   CYCLES(1);
523}
524
525void tms32051_device::op_lact()
526{
527   fatalerror("32051: unimplemented op lact at %08X\n", m_pc-1);
528}
529
530void tms32051_device::op_lamm()
531{
532   UINT16 ea = GET_ADDRESS() & 0x7f;
533   m_acc = DM_READ16(ea) & 0xffff;
534
535   CYCLES(1);
536}
537
538void tms32051_device::op_neg()
539{
540   if ((UINT32)(m_acc) == 0x80000000)
541   {
542      m_st0.ov = 1;
543      m_st1.c = 0;
544      m_acc = (m_st0.ovm) ? 0x7fffffff : 0x80000000;
545   }
546   else
547   {
548      m_acc = 0 - (UINT32)(m_acc);
549      m_st1.c = (m_acc == 0) ? 1 : 0;
550   }
551
552   CYCLES(1);
553}
554
555void tms32051_device::op_norm()
556{
557   fatalerror("32051: unimplemented op norm at %08X\n", m_pc-1);
558}
559
560void tms32051_device::op_or_mem()
561{
562   UINT16 ea = GET_ADDRESS();
563   UINT16 data = DM_READ16(ea);
564
565   m_acc |= (UINT32)(data);
566
567   CYCLES(1);
568}
569
570void tms32051_device::op_or_limm()
571{
572   UINT32 imm = ROPCODE();
573   int shift = m_op & 0xf;
574
575   m_acc |= imm << shift;
576
577   CYCLES(1);
578}
579
580void tms32051_device::op_or_s16_limm()
581{
582   fatalerror("32051: unimplemented op or s16 limm at %08X\n", m_pc-1);
583}
584
585void tms32051_device::op_orb()
586{
587   m_acc |= m_accb;
588
589   CYCLES(1);
590}
591
592void tms32051_device::op_rol()
593{
594   fatalerror("32051: unimplemented op rol at %08X\n", m_pc-1);
595}
596
597void tms32051_device::op_rolb()
598{
599   UINT32 acc = m_acc;
600   UINT32 accb = m_accb;
601   UINT32 c = m_st1.c & 1;
602
603   m_acc = (acc << 1) | ((accb >> 31) & 1);
604   m_accb = (accb << 1) | c;
605   m_st1.c = (acc >> 31) & 1;
606
607   CYCLES(1);
608}
609
610void tms32051_device::op_ror()
611{
612   fatalerror("32051: unimplemented op ror at %08X\n", m_pc-1);
613}
614
615void tms32051_device::op_rorb()
616{
617   fatalerror("32051: unimplemented op rorb at %08X\n", m_pc-1);
618}
619
620void tms32051_device::op_sacb()
621{
622   m_accb = m_acc;
623
624   CYCLES(1);
625}
626
627void tms32051_device::op_sach()
628{
629   UINT16 ea = GET_ADDRESS();
630   int shift = (m_op >> 8) & 0x7;
631
632   DM_WRITE16(ea, (UINT16)((m_acc << shift) >> 16));
633   CYCLES(1);
634}
635
636void tms32051_device::op_sacl()
637{
638   UINT16 ea = GET_ADDRESS();
639   int shift = (m_op >> 8) & 0x7;
640
641   DM_WRITE16(ea, (UINT16)(m_acc << shift));
642   CYCLES(1);
643}
644
645void tms32051_device::op_samm()
646{
647   UINT16 ea = GET_ADDRESS();
648   ea &= 0x7f;
649
650   DM_WRITE16(ea, (UINT16)(m_acc));
651   CYCLES(1);
652}
653
654void tms32051_device::op_sath()
655{
656   fatalerror("32051: unimplemented op sath at %08X\n", m_pc-1);
657}
658
659void tms32051_device::op_satl()
660{
661   fatalerror("32051: unimplemented op satl at %08X\n", m_pc-1);
662}
663
664void tms32051_device::op_sbb()
665{
666   m_acc = SUB(m_acc, m_accb);
667
668   CYCLES(1);
669}
670
671void tms32051_device::op_sbbb()
672{
673   fatalerror("32051: unimplemented op sbbb at %08X\n", m_pc-1);
674}
675
676void tms32051_device::op_sfl()
677{
678   m_st1.c = (m_acc >> 31) & 1;
679   m_acc = m_acc << 1;
680
681   CYCLES(1);
682}
683
684void tms32051_device::op_sflb()
685{
686   UINT32 acc = m_acc;
687   UINT32 accb = m_accb;
688
689   m_acc = (acc << 1) | ((accb >> 31) & 1);
690   m_accb = (accb << 1);
691   m_st1.c = (acc >> 31) & 1;
692
693   CYCLES(1);
694}
695
696void tms32051_device::op_sfr()
697{
698   m_st1.c = m_acc & 1;
699
700   if (m_st1.sxm)
701   {
702      m_acc = (INT32)(m_acc) >> 1;
703   }
704   else
705   {
706      m_acc = (UINT32)(m_acc) >> 1;
707   }
708
709   CYCLES(1);
710}
711
712void tms32051_device::op_sfrb()
713{
714   fatalerror("32051: unimplemented op sfrb at %08X\n", m_pc-1);
715}
716
717void tms32051_device::op_sub_mem()
718{
719   INT32 d;
720   UINT16 ea = GET_ADDRESS();
721   UINT16 data = DM_READ16(ea);
722   int shift = (m_op >> 8) & 0xf;
723
724   if (m_st1.sxm)
725   {
726      d = (INT32)(INT16)(data) << shift;
727   }
728   else
729   {
730      d = (UINT32)(UINT16)(data) << shift;
731   }
732
733   m_acc = SUB(m_acc, d);
734
735   CYCLES(1);
736}
737
738void tms32051_device::op_sub_s16_mem()
739{
740   fatalerror("32051: unimplemented op sub s16 mem at %08X\n", m_pc-1);
741}
742
743void tms32051_device::op_sub_simm()
744{
745   UINT16 imm = m_op & 0xff;
746
747   m_acc = SUB(m_acc, imm);
748
749   CYCLES(1);
750}
751
752void tms32051_device::op_sub_limm()
753{
754   INT32 d;
755   UINT16 imm = ROPCODE();
756   int shift = m_op & 0xf;
757
758   if (m_st1.sxm)
759   {
760      d = (INT32)(INT16)(imm) << shift;
761   }
762   else
763   {
764      d = (UINT32)(UINT16)(imm) << shift;
765   }
766
767   m_acc = SUB(m_acc, d);
768
769   CYCLES(2);
770}
771
772void tms32051_device::op_subb()
773{
774   fatalerror("32051: unimplemented op subb at %08X\n", m_pc-1);
775}
776
777void tms32051_device::op_subc()
778{
779   fatalerror("32051: unimplemented op subc at %08X\n", m_pc-1);
780}
781
782void tms32051_device::op_subs()
783{
784   fatalerror("32051: unimplemented op subs at %08X\n", m_pc-1);
785}
786
787void tms32051_device::op_subt()
788{
789   fatalerror("32051: unimplemented op subt at %08X\n", m_pc-1);
790}
791
792void tms32051_device::op_xor_mem()
793{
794   UINT16 ea = GET_ADDRESS();
795   UINT16 data = DM_READ16(ea);
796
797   m_acc ^= (UINT32)(data);
798
799   CYCLES(1);
800}
801
802void tms32051_device::op_xor_limm()
803{
804   UINT32 imm = ROPCODE();
805   int shift = m_op & 0xf;
806
807   m_acc ^= imm << shift;
808
809   CYCLES(1);
810}
811
812void tms32051_device::op_xor_s16_limm()
813{
814   fatalerror("32051: unimplemented op xor s16 limm at %08X\n", m_pc-1);
815}
816
817void tms32051_device::op_xorb()
818{
819   fatalerror("32051: unimplemented op xorb at %08X\n", m_pc-1);
820}
821
822void tms32051_device::op_zalr()
823{
824   fatalerror("32051: unimplemented op zalr at %08X\n", m_pc-1);
825}
826
827void tms32051_device::op_zap()
828{
829   m_acc = 0;
830   m_preg = 0;
831
832   CYCLES(1);
833}
834
835/*****************************************************************************/
836
837void tms32051_device::op_adrk()
838{
839   UINT16 imm = m_op & 0xff;
840   UPDATE_AR(m_st0.arp, imm);
841
842   CYCLES(1);
843}
844
845void tms32051_device::op_cmpr()
846{
847   m_st1.tc = 0;
848
849   switch (m_op & 0x3)
850   {
851      case 0:         // (CurrentAR) == ARCR
852      {
853         if (m_ar[m_st0.arp] == m_arcr)
854         {
855            m_st1.tc = 1;
856         }
857         break;
858      }
859      case 1:         // (CurrentAR) < ARCR
860      {
861         if (m_ar[m_st0.arp] < m_arcr)
862         {
863            m_st1.tc = 1;
864         }
865         break;
866      }
867      case 2:         // (CurrentAR) > ARCR
868      {
869         if (m_ar[m_st0.arp] > m_arcr)
870         {
871            m_st1.tc = 1;
872         }
873         break;
874      }
875      case 3:         // (CurrentAR) != ARCR
876      {
877         if (m_ar[m_st0.arp] != m_arcr)
878         {
879            m_st1.tc = 1;
880         }
881         break;
882      }
883   }
884
885   CYCLES(1);
886}
887
888void tms32051_device::op_lar_mem()
889{
890   int arx = (m_op >> 8) & 0x7;
891   UINT16 ea = GET_ADDRESS();
892   UINT16 data = DM_READ16(ea);
893
894   m_ar[arx] = data;
895
896   CYCLES(2);
897}
898
899void tms32051_device::op_lar_simm()
900{
901   int arx = (m_op >> 8) & 0x7;
902   m_ar[arx] = m_op & 0xff;
903
904   CYCLES(2);
905}
906
907void tms32051_device::op_lar_limm()
908{
909   int arx = m_op & 0x7;
910   UINT16 imm = ROPCODE();
911   m_ar[arx] = imm;
912
913   CYCLES(2);
914}
915
916void tms32051_device::op_ldp_mem()
917{
918   fatalerror("32051: unimplemented op ldp mem at %08X\n", m_pc-1);
919}
920
921void tms32051_device::op_ldp_imm()
922{
923   m_st0.dp = (m_op & 0x1ff) << 7;
924   CYCLES(2);
925}
926
927void tms32051_device::op_mar()
928{
929   // direct addressing is NOP
930   if (m_op & 0x80)
931   {
932      GET_ADDRESS();
933   }
934   CYCLES(1);
935}
936
937void tms32051_device::op_sar()
938{
939   int arx = (m_op >> 8) & 0x7;
940   UINT16 ar = m_ar[arx];
941   UINT16 ea = GET_ADDRESS();
942   DM_WRITE16(ea, ar);
943
944   CYCLES(1);
945}
946
947void tms32051_device::op_sbrk()
948{
949   UINT16 imm = m_op & 0xff;
950   UPDATE_AR(m_st0.arp, -imm);
951
952   CYCLES(1);
953}
954
955/*****************************************************************************/
956
957void tms32051_device::op_b()
958{
959   UINT16 pma = ROPCODE();
960   GET_ADDRESS();      // update AR/ARP
961
962   CHANGE_PC(pma);
963   CYCLES(4);
964}
965
966void tms32051_device::op_bacc()
967{
968   CHANGE_PC((UINT16)(m_acc));
969
970   CYCLES(4);
971}
972
973void tms32051_device::op_baccd()
974{
975   UINT16 pc = (UINT16)(m_acc);
976
977   delay_slot(m_pc);
978   CHANGE_PC(pc);
979
980   CYCLES(2);
981}
982
983void tms32051_device::op_banz()
984{
985   UINT16 pma = ROPCODE();
986
987   if (m_ar[m_st0.arp] != 0)
988   {
989      CHANGE_PC(pma);
990      CYCLES(4);
991   }
992   else
993   {
994      CYCLES(2);
995   }
996
997   GET_ADDRESS();      // modify AR/ARP
998}
999
1000void tms32051_device::op_banzd()
1001{
1002   fatalerror("32051: unimplemented op banzd at %08X\n", m_pc-1);
1003}
1004
1005void tms32051_device::op_bcnd()
1006{
1007   UINT16 pma = ROPCODE();
1008
1009   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1010   {
1011      CHANGE_PC(pma);
1012      CYCLES(4);
1013   }
1014   else
1015   {
1016      CYCLES(2);
1017   }
1018}
1019
1020void tms32051_device::op_bcndd()
1021{
1022   UINT16 pma = ROPCODE();
1023
1024   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1025   {
1026      delay_slot(m_pc);
1027      CHANGE_PC(pma);
1028      CYCLES(4);
1029   }
1030   else
1031   {
1032      CYCLES(2);
1033   }
1034}
1035
1036void tms32051_device::op_bd()
1037{
1038   UINT16 pma = ROPCODE();
1039   GET_ADDRESS();      // update AR/ARP
1040
1041   delay_slot(m_pc);
1042   CHANGE_PC(pma);
1043   CYCLES(2);
1044}
1045
1046void tms32051_device::op_cala()
1047{
1048   PUSH_STACK(m_pc);
1049
1050   CHANGE_PC(m_acc);
1051
1052   CYCLES(4);
1053}
1054
1055void tms32051_device::op_calad()
1056{
1057   UINT16 pma = m_acc;
1058   PUSH_STACK(m_pc+2);
1059
1060   delay_slot(m_pc);
1061   CHANGE_PC(pma);
1062
1063   CYCLES(4);
1064}
1065
1066void tms32051_device::op_call()
1067{
1068   UINT16 pma = ROPCODE();
1069   GET_ADDRESS();      // update AR/ARP
1070   PUSH_STACK(m_pc);
1071
1072   CHANGE_PC(pma);
1073
1074   CYCLES(4);
1075}
1076
1077void tms32051_device::op_calld()
1078{
1079   UINT16 pma = ROPCODE();
1080   GET_ADDRESS();      // update AR/ARP
1081   PUSH_STACK(m_pc+2);
1082
1083   delay_slot(m_pc);
1084   CHANGE_PC(pma);
1085
1086   CYCLES(4);
1087}
1088
1089void tms32051_device::op_cc()
1090{
1091   fatalerror("32051: unimplemented op cc at %08X\n", m_pc-1);
1092}
1093
1094void tms32051_device::op_ccd()
1095{
1096   UINT16 pma = ROPCODE();
1097
1098   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1099   {
1100      PUSH_STACK(m_pc+2);
1101
1102      delay_slot(m_pc);
1103      CHANGE_PC(pma);
1104   }
1105
1106   CYCLES(2);
1107}
1108
1109void tms32051_device::op_intr()
1110{
1111   fatalerror("32051: unimplemented op intr at %08X\n", m_pc-1);
1112}
1113
1114void tms32051_device::op_nmi()
1115{
1116   fatalerror("32051: unimplemented op nmi at %08X\n", m_pc-1);
1117}
1118
1119void tms32051_device::op_retc()
1120{
1121   if ((m_op & 0x3ff) == 0x300 || GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1122   {
1123      UINT16 pc = POP_STACK();
1124      CHANGE_PC(pc);
1125      CYCLES(4);
1126   }
1127   else
1128   {
1129      CYCLES(2);
1130   }
1131}
1132
1133void tms32051_device::op_retcd()
1134{
1135   if ((m_op & 0x3ff) == 0x300 || GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1136   {
1137      UINT16 pc = POP_STACK();
1138      delay_slot(m_pc);
1139      CHANGE_PC(pc);
1140      CYCLES(4);
1141   }
1142   else
1143   {
1144      CYCLES(2);
1145   }
1146}
1147
1148void tms32051_device::op_rete()
1149{
1150   UINT16 pc = POP_STACK();
1151   CHANGE_PC(pc);
1152
1153   m_st0.intm = 0;
1154
1155   restore_interrupt_context();
1156
1157   CYCLES(4);
1158}
1159
1160void tms32051_device::op_reti()
1161{
1162   fatalerror("32051: unimplemented op reti at %08X\n", m_pc-1);
1163}
1164
1165void tms32051_device::op_trap()
1166{
1167   fatalerror("32051: unimplemented op trap at %08X\n", m_pc-1);
1168}
1169
1170void tms32051_device::op_xc()
1171{
1172   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1173   {
1174      CYCLES(1);
1175   }
1176   else
1177   {
1178      int n = ((m_op >> 12) & 0x1) + 1;
1179      CHANGE_PC(m_pc + n);
1180      CYCLES(1 + n);
1181   }
1182}
1183
1184/*****************************************************************************/
1185
1186void tms32051_device::op_bldd_slimm()
1187{
1188   UINT16 pfc = ROPCODE();
1189
1190   while (m_rptc > -1)
1191   {
1192      UINT16 ea = GET_ADDRESS();
1193      UINT16 data = DM_READ16(pfc);
1194      DM_WRITE16(ea, data);
1195      pfc++;
1196      CYCLES(2);
1197
1198      m_rptc--;
1199   };
1200}
1201
1202void tms32051_device::op_bldd_dlimm()
1203{
1204   UINT16 pfc = ROPCODE();
1205
1206   while (m_rptc > -1)
1207   {
1208      UINT16 ea = GET_ADDRESS();
1209      UINT16 data = DM_READ16(ea);
1210      DM_WRITE16(pfc, data);
1211      pfc++;
1212      CYCLES(2);
1213
1214      m_rptc--;
1215   };
1216}
1217
1218void tms32051_device::op_bldd_sbmar()
1219{
1220   UINT16 pfc = m_bmar;
1221
1222   while (m_rptc > -1)
1223   {
1224      UINT16 ea = GET_ADDRESS();
1225      UINT16 data = DM_READ16(pfc);
1226      DM_WRITE16(ea, data);
1227      pfc++;
1228      CYCLES(2);
1229
1230      m_rptc--;
1231   };
1232}
1233
1234void tms32051_device::op_bldd_dbmar()
1235{
1236   UINT16 pfc = m_bmar;
1237
1238   while (m_rptc > -1)
1239   {
1240      UINT16 ea = GET_ADDRESS();
1241      UINT16 data = DM_READ16(ea);
1242      DM_WRITE16(pfc, data);
1243      pfc++;
1244      CYCLES(2);
1245
1246      m_rptc--;
1247   };
1248}
1249
1250void tms32051_device::op_bldp()
1251{
1252   UINT16 pfc = m_bmar;
1253
1254   while (m_rptc > -1)
1255   {
1256      UINT16 ea = GET_ADDRESS();
1257      UINT16 data = DM_READ16(ea);
1258      PM_WRITE16(pfc, data);
1259      pfc++;
1260      CYCLES(1);
1261
1262      m_rptc--;
1263   };
1264}
1265
1266void tms32051_device::op_blpd_bmar()
1267{
1268   fatalerror("32051: unimplemented op bpld bmar at %08X\n", m_pc-1);
1269}
1270
1271void tms32051_device::op_blpd_imm()
1272{
1273   UINT16 pfc = ROPCODE();
1274
1275   while (m_rptc > -1)
1276   {
1277      UINT16 ea = GET_ADDRESS();
1278      UINT16 data = PM_READ16(pfc);
1279      DM_WRITE16(ea, data);
1280      pfc++;
1281      CYCLES(2);
1282
1283      m_rptc--;
1284   };
1285}
1286
1287/*****************************************************************************/
1288
1289void tms32051_device::op_dmov()
1290{
1291   fatalerror("32051: unimplemented op dmov at %08X\n", m_pc-1);
1292}
1293
1294void tms32051_device::op_in()
1295{
1296   fatalerror("32051: unimplemented op in at %08X\n", m_pc-1);
1297}
1298
1299void tms32051_device::op_lmmr()
1300{
1301   UINT16 pfc = ROPCODE();
1302
1303   while (m_rptc > -1)
1304   {
1305      UINT16 ea = GET_ADDRESS();
1306      UINT16 data = DM_READ16(pfc);
1307      DM_WRITE16(ea & 0x7f, data);
1308      pfc++;
1309      CYCLES(2);
1310
1311      m_rptc--;
1312   };
1313}
1314
1315void tms32051_device::op_out()
1316{
1317   fatalerror("32051: unimplemented op out at %08X\n", m_pc-1);
1318}
1319
1320void tms32051_device::op_smmr()
1321{
1322   UINT16 pfc = ROPCODE();
1323
1324   while (m_rptc > -1)
1325   {
1326      UINT16 ea = GET_ADDRESS();
1327      UINT16 data = DM_READ16(ea & 0x7f);
1328      DM_WRITE16(pfc, data);
1329      pfc++;
1330      CYCLES(2);
1331
1332      m_rptc--;
1333   };
1334}
1335
1336void tms32051_device::op_tblr()
1337{
1338   UINT16 pfc = (UINT16)(m_acc);
1339
1340   while (m_rptc > -1)
1341   {
1342      UINT16 ea = GET_ADDRESS();
1343      UINT16 data = PM_READ16(pfc);
1344      DM_WRITE16(ea, data);
1345      pfc++;
1346      CYCLES(2);
1347
1348      m_rptc--;
1349   };
1350}
1351
1352void tms32051_device::op_tblw()
1353{
1354   UINT16 pfc = (UINT16)(m_acc);
1355
1356   while (m_rptc > -1)
1357   {
1358      UINT16 ea = GET_ADDRESS();
1359      UINT16 data = DM_READ16(ea);
1360      PM_WRITE16(pfc, data);
1361      pfc++;
1362      CYCLES(2);
1363
1364      m_rptc--;
1365   };
1366}
1367
1368/*****************************************************************************/
1369
1370void tms32051_device::op_apl_dbmr()
1371{
1372   UINT16 ea = GET_ADDRESS();
1373   UINT16 data = DM_READ16(ea);
1374   data &= m_dbmr;
1375   DM_WRITE16(ea, data);
1376   CYCLES(1);
1377}
1378
1379void tms32051_device::op_apl_imm()
1380{
1381   UINT16 ea = GET_ADDRESS();
1382   UINT16 imm = ROPCODE();
1383   UINT16 data = DM_READ16(ea);
1384   data &= imm;
1385   DM_WRITE16(ea, data);
1386   CYCLES(1);
1387}
1388
1389void tms32051_device::op_cpl_dbmr()
1390{
1391   fatalerror("32051: unimplemented op cpl dbmr at %08X\n", m_pc-1);
1392}
1393
1394void tms32051_device::op_cpl_imm()
1395{
1396   UINT16 imm = ROPCODE();
1397   UINT16 ea = GET_ADDRESS();
1398   UINT16 data = DM_READ16(ea);
1399
1400   m_st1.tc = (data == imm) ? 1 : 0;
1401
1402   CYCLES(1);
1403}
1404
1405void tms32051_device::op_opl_dbmr()
1406{
1407   UINT16 ea = GET_ADDRESS();
1408   UINT16 data = DM_READ16(ea);
1409   data |= m_dbmr;
1410   DM_WRITE16(ea, data);
1411   CYCLES(1);
1412}
1413
1414void tms32051_device::op_opl_imm()
1415{
1416   UINT16 ea = GET_ADDRESS();
1417   UINT16 imm = ROPCODE();
1418   UINT16 data = DM_READ16(ea);
1419   data |= imm;
1420   DM_WRITE16(ea, data);
1421   CYCLES(1);
1422}
1423
1424void tms32051_device::op_splk()
1425{
1426   UINT16 ea = GET_ADDRESS();
1427   UINT16 imm = ROPCODE();
1428
1429   DM_WRITE16(ea, imm);
1430
1431   CYCLES(2);
1432}
1433
1434void tms32051_device::op_xpl_dbmr()
1435{
1436   fatalerror("32051: unimplemented op xpl dbmr at %08X\n", m_pc-1);
1437}
1438
1439void tms32051_device::op_xpl_imm()
1440{
1441   fatalerror("32051: unimplemented op xpl imm at %08X\n", m_pc-1);
1442}
1443
1444void tms32051_device::op_apac()
1445{
1446   INT32 spreg = PREG_PSCALER(m_preg);
1447   m_acc = ADD(m_acc, spreg);
1448
1449   CYCLES(1);
1450}
1451
1452void tms32051_device::op_lph()
1453{
1454   fatalerror("32051: unimplemented op lph at %08X\n", m_pc-1);
1455}
1456
1457void tms32051_device::op_lt()
1458{
1459   UINT16 ea = GET_ADDRESS();
1460   UINT16 data = DM_READ16(ea);
1461
1462   m_treg0 = data;
1463   if (m_pmst.trm == 0)
1464   {
1465      m_treg1 = data;
1466      m_treg2 = data;
1467   }
1468
1469   CYCLES(1);
1470}
1471
1472void tms32051_device::op_lta()
1473{
1474   INT32 spreg;
1475   UINT16 ea = GET_ADDRESS();
1476   UINT16 data = DM_READ16(ea);
1477
1478   m_treg0 = data;
1479   spreg = PREG_PSCALER(m_preg);
1480   m_acc = ADD(m_acc, spreg);
1481   if (m_pmst.trm == 0)
1482   {
1483      m_treg1 = data;
1484      m_treg2 = data;
1485   }
1486
1487   CYCLES(1);
1488}
1489
1490void tms32051_device::op_ltd()
1491{
1492   fatalerror("32051: unimplemented op ltd at %08X\n", m_pc-1);
1493}
1494
1495void tms32051_device::op_ltp()
1496{
1497   fatalerror("32051: unimplemented op ltp at %08X\n", m_pc-1);
1498}
1499
1500void tms32051_device::op_lts()
1501{
1502   fatalerror("32051: unimplemented op lts at %08X\n", m_pc-1);
1503}
1504
1505void tms32051_device::op_mac()
1506{
1507   fatalerror("32051: unimplemented op mac at %08X\n", m_pc-1);
1508}
1509
1510void tms32051_device::op_macd()
1511{
1512   fatalerror("32051: unimplemented op macd at %08X\n", m_pc-1);
1513}
1514
1515void tms32051_device::op_madd()
1516{
1517   fatalerror("32051: unimplemented op madd at %08X\n", m_pc-1);
1518}
1519
1520void tms32051_device::op_mads()
1521{
1522   fatalerror("32051: unimplemented op mads at %08X\n", m_pc-1);
1523}
1524
1525void tms32051_device::op_mpy_mem()
1526{
1527   UINT16 ea = GET_ADDRESS();
1528   INT16 data = DM_READ16(ea);
1529
1530   m_preg = (INT32)(data) * (INT32)(INT16)(m_treg0);
1531
1532   CYCLES(1);
1533}
1534
1535void tms32051_device::op_mpy_simm()
1536{
1537   fatalerror("32051: unimplemented op mpy simm at %08X\n", m_pc-1);
1538}
1539
1540void tms32051_device::op_mpy_limm()
1541{
1542   fatalerror("32051: unimplemented op mpy limm at %08X\n", m_pc-1);
1543}
1544
1545void tms32051_device::op_mpya()
1546{
1547   fatalerror("32051: unimplemented op mpya at %08X\n", m_pc-1);
1548}
1549
1550void tms32051_device::op_mpys()
1551{
1552   fatalerror("32051: unimplemented op mpys at %08X\n", m_pc-1);
1553}
1554
1555void tms32051_device::op_mpyu()
1556{
1557   fatalerror("32051: unimplemented op mpyu at %08X\n", m_pc-1);
1558}
1559
1560void tms32051_device::op_pac()
1561{
1562   fatalerror("32051: unimplemented op pac at %08X\n", m_pc-1);
1563}
1564
1565void tms32051_device::op_spac()
1566{
1567   fatalerror("32051: unimplemented op spac at %08X\n", m_pc-1);
1568}
1569
1570void tms32051_device::op_sph()
1571{
1572   UINT16 ea = GET_ADDRESS();
1573   UINT16 spreg = (UINT16)(PREG_PSCALER(m_preg) >> 16);
1574   DM_WRITE16(ea, spreg);
1575
1576   CYCLES(1);
1577}
1578
1579void tms32051_device::op_spl()
1580{
1581   fatalerror("32051: unimplemented op spl at %08X\n", m_pc-1);
1582}
1583
1584void tms32051_device::op_spm()
1585{
1586   m_st1.pm = m_op & 0x3;
1587
1588   CYCLES(1);
1589}
1590
1591void tms32051_device::op_sqra()
1592{
1593   fatalerror("32051: unimplemented op sqra at %08X\n", m_pc-1);
1594}
1595
1596void tms32051_device::op_sqrs()
1597{
1598   fatalerror("32051: unimplemented op sqrs at %08X\n", m_pc-1);
1599}
1600
1601void tms32051_device::op_zpr()
1602{
1603   fatalerror("32051: unimplemented op zpr at %08X\n", m_pc-1);
1604}
1605
1606void tms32051_device::op_bit()
1607{
1608   UINT16 ea = GET_ADDRESS();
1609   UINT16 data = DM_READ16(ea);
1610
1611   m_st1.tc = (data >> (~m_op >> 8 & 0xf)) & 1;
1612
1613   CYCLES(1);
1614}
1615
1616void tms32051_device::op_bitt()
1617{
1618   UINT16 ea = GET_ADDRESS();
1619   UINT16 data = DM_READ16(ea);
1620
1621   m_st1.tc = (data >> (~m_treg2 & 0xf)) & 1;
1622
1623   CYCLES(1);
1624}
1625
1626void tms32051_device::op_clrc_ov()
1627{
1628   m_st0.ovm = 0;
1629
1630   CYCLES(1);
1631}
1632
1633void tms32051_device::op_clrc_ext()
1634{
1635   m_st1.sxm = 0;
1636
1637   CYCLES(1);
1638}
1639
1640void tms32051_device::op_clrc_hold()
1641{
1642   fatalerror("32051: unimplemented op clrc hold at %08X\n", m_pc-1);
1643}
1644
1645void tms32051_device::op_clrc_tc()
1646{
1647   fatalerror("32051: unimplemented op clrc tc at %08X\n", m_pc-1);
1648}
1649
1650void tms32051_device::op_clrc_carry()
1651{
1652   fatalerror("32051: unimplemented op clrc carry at %08X\n", m_pc-1);
1653}
1654
1655void tms32051_device::op_clrc_cnf()
1656{
1657   m_st1.cnf = 0;
1658
1659   CYCLES(1);
1660}
1661
1662void tms32051_device::op_clrc_intm()
1663{
1664   m_st0.intm = 0;
1665
1666   check_interrupts();
1667
1668   CYCLES(1);
1669}
1670
1671void tms32051_device::op_clrc_xf()
1672{
1673   fatalerror("32051: unimplemented op clrc xf at %08X\n", m_pc-1);
1674}
1675
1676void tms32051_device::op_idle()
1677{
1678   fatalerror("32051: unimplemented op idle at %08X\n", m_pc-1);
1679}
1680
1681void tms32051_device::op_idle2()
1682{
1683   fatalerror("32051: unimplemented op idle2 at %08X\n", m_pc-1);
1684}
1685
1686void tms32051_device::op_lst_st0()
1687{
1688   fatalerror("32051: unimplemented op lst st0 at %08X\n", m_pc-1);
1689}
1690
1691void tms32051_device::op_lst_st1()
1692{
1693   fatalerror("32051: unimplemented op lst st1 at %08X\n", m_pc-1);
1694}
1695
1696void tms32051_device::op_pop()
1697{
1698   m_acc = POP_STACK();
1699
1700   CYCLES(1);
1701}
1702
1703void tms32051_device::op_popd()
1704{
1705   fatalerror("32051: unimplemented op popd at %08X\n", m_pc-1);
1706}
1707
1708void tms32051_device::op_pshd()
1709{
1710   fatalerror("32051: unimplemented op pshd at %08X\n", m_pc-1);
1711}
1712
1713void tms32051_device::op_push()
1714{
1715   fatalerror("32051: unimplemented op push at %08X\n", m_pc-1);
1716}
1717
1718void tms32051_device::op_rpt_mem()
1719{
1720   UINT16 ea = GET_ADDRESS();
1721   UINT16 data = DM_READ16(ea);
1722   m_rptc = data;
1723   m_rpt_start = m_pc;
1724   m_rpt_end = m_pc;
1725
1726   CYCLES(1);
1727}
1728
1729void tms32051_device::op_rpt_limm()
1730{
1731   m_rptc = (UINT16)ROPCODE();
1732   m_rpt_start = m_pc;
1733   m_rpt_end = m_pc;
1734
1735   CYCLES(2);
1736}
1737
1738void tms32051_device::op_rpt_simm()
1739{
1740   m_rptc = (m_op & 0xff);
1741   m_rpt_start = m_pc;
1742   m_rpt_end = m_pc;
1743
1744   CYCLES(1);
1745}
1746
1747void tms32051_device::op_rptb()
1748{
1749   UINT16 pma = ROPCODE();
1750   m_pmst.braf = 1;
1751   m_pasr = m_pc;
1752   m_paer = pma + 1;
1753
1754   CYCLES(2);
1755}
1756
1757void tms32051_device::op_rptz()
1758{
1759   fatalerror("32051: unimplemented op rptz at %08X\n", m_pc-1);
1760}
1761
1762void tms32051_device::op_setc_ov()
1763{
1764   m_st0.ovm = 1;
1765
1766   CYCLES(1);
1767}
1768
1769void tms32051_device::op_setc_ext()
1770{
1771   m_st1.sxm = 1;
1772
1773   CYCLES(1);
1774}
1775
1776void tms32051_device::op_setc_hold()
1777{
1778   fatalerror("32051: unimplemented op setc hold at %08X\n", m_pc-1);
1779}
1780
1781void tms32051_device::op_setc_tc()
1782{
1783   fatalerror("32051: unimplemented op setc tc at %08X\n", m_pc-1);
1784}
1785
1786void tms32051_device::op_setc_carry()
1787{
1788   fatalerror("32051: unimplemented op setc carry at %08X\n", m_pc-1);
1789}
1790
1791void tms32051_device::op_setc_xf()
1792{
1793   fatalerror("32051: unimplemented op setc xf at %08X\n", m_pc-1);
1794}
1795
1796void tms32051_device::op_setc_cnf()
1797{
1798   m_st1.cnf = 1;
1799
1800   CYCLES(1);
1801}
1802
1803void tms32051_device::op_setc_intm()
1804{
1805   m_st0.intm = 1;
1806
1807   check_interrupts();
1808
1809   CYCLES(1);
1810}
1811
1812void tms32051_device::op_sst_st0()
1813{
1814   fatalerror("32051: unimplemented op sst st0 at %08X\n", m_pc-1);
1815}
1816
1817void tms32051_device::op_sst_st1()
1818{
1819   fatalerror("32051: unimplemented op sst st1 at %08X\n", m_pc-1);
1820}
trunk/src/devices/cpu/tms32051/32051ops.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Ville Linde
3// stack is LIFO and is 8 levels deep, there is no stackpointer on the real chip
4void tms32051_device::PUSH_STACK(UINT16 pc)
5{
6   m_pcstack_ptr = (m_pcstack_ptr - 1) & 7;
7   m_pcstack[m_pcstack_ptr] = pc;
8}
9
10UINT16 tms32051_device::POP_STACK()
11{
12   UINT16 pc = m_pcstack[m_pcstack_ptr];
13   m_pcstack_ptr = (m_pcstack_ptr + 1) & 7;
14   m_pcstack[(m_pcstack_ptr + 7) & 7] = m_pcstack[(m_pcstack_ptr + 6) & 7];
15   return pc;
16}
17
18INT32 tms32051_device::SUB(UINT32 a, UINT32 b)
19{
20   UINT32 res = a - b;
21
22   // C is cleared if borrow was generated
23   m_st1.c = (b > a) ? 0 : 1;
24
25   // check overflow
26   if ((a ^ b) & (a ^ res) & 0x80000000)
27   {
28      if (m_st0.ovm)  // overflow saturation mode
29      {
30         res = ((INT32)(res) < 0) ? 0x7fffffff : 0x80000000;
31      }
32
33      // set OV, this is a sticky flag
34      m_st0.ov = 1;
35   }
36
37   return (INT32)(res);
38}
39
40INT32 tms32051_device::ADD(UINT32 a, UINT32 b)
41{
42   UINT32 res = a + b;
43
44   // C is set if carry was generated
45   m_st1.c = (a > res) ? 1 : 0;
46
47   // check overflow
48   if ((a ^ res) & (b ^ res) & 0x80000000)
49   {
50      if (m_st0.ovm)  // overflow saturation mode
51      {
52         res = ((INT32)(res) < 0) ? 0x7fffffff : 0x80000000;
53      }
54
55      // set OV, this is a sticky flag
56      m_st0.ov = 1;
57   }
58
59   return (INT32)(res);
60}
61
62
63void tms32051_device::UPDATE_AR(int ar, int step)
64{
65   int cenb1 = (m_cbcr >> 3) & 0x1;
66   int car1 = m_cbcr & 0x7;
67   int cenb2 = (m_cbcr >> 7) & 0x1;
68   int car2 = (m_cbcr >> 4) & 0x7;
69
70   if (cenb1 && ar == car1)
71   {
72      // update circular buffer 1, note that it only checks ==
73      if (m_ar[ar] == m_cber1)
74      {
75         m_ar[ar] = m_cbsr1;
76      }
77      else
78      {
79         m_ar[ar] += step;
80      }
81   }
82   else if (cenb2 && ar == car2)
83   {
84      // update circular buffer 2, note that it only checks ==
85      if (m_ar[ar] == m_cber2)
86      {
87         m_ar[ar] = m_cbsr2;
88      }
89      else
90      {
91         m_ar[ar] += step;
92      }
93   }
94   else
95   {
96      m_ar[ar] += step;
97   }
98}
99
100void tms32051_device::UPDATE_ARP(int nar)
101{
102   m_st1.arb = m_st0.arp;
103   m_st0.arp = nar;
104}
105
106UINT16 tms32051_device::GET_ADDRESS()
107{
108   if (m_op & 0x80)        // Indirect Addressing
109   {
110      UINT16 ea;
111      int arp = m_st0.arp;
112      int nar = m_op & 0x7;
113
114      ea = m_ar[arp];
115
116      switch ((m_op >> 3) & 0xf)
117      {
118         case 0x0:   // *            (no operation)
119         {
120            break;
121         }
122         case 0x1:   // *, ARn       (NAR -> ARP)
123         {
124            UPDATE_ARP(nar);
125            break;
126         }
127         case 0x2:   // *-           ((CurrentAR)-1 -> CurrentAR)
128         {
129            UPDATE_AR(arp, -1);
130            break;
131         }
132         case 0x3:   // *-, ARn      ((CurrentAR)-1 -> CurrentAR, NAR -> ARP)
133         {
134            UPDATE_AR(arp, -1);
135            UPDATE_ARP(nar);
136            break;
137         }
138         case 0x4:   // *+           ((CurrentAR)+1 -> CurrentAR)
139         {
140            UPDATE_AR(arp, 1);
141            break;
142         }
143         case 0x5:   // *+, ARn      ((CurrentAR)+1 -> CurrentAR, NAR -> ARP)
144         {
145            UPDATE_AR(arp, 1);
146            UPDATE_ARP(nar);
147            break;
148         }
149         case 0xa:   // *0-          ((CurrentAR) - INDX)
150         {
151            UPDATE_AR(arp, -m_indx);
152            break;
153         }
154         case 0xb:   // *0-, ARn     ((CurrentAR) - INDX -> CurrentAR, NAR -> ARP)
155         {
156            UPDATE_AR(arp, -m_indx);
157            UPDATE_ARP(nar);
158            break;
159         }
160         case 0xc:   // *0+          ((CurrentAR) + INDX -> CurrentAR)
161         {
162            UPDATE_AR(arp, m_indx);
163            break;
164         }
165         case 0xd:   // *0+, ARn     ((CurrentAR) + INDX -> CurrentAR, NAR -> ARP)
166         {
167            UPDATE_AR(arp, m_indx);
168            UPDATE_ARP(nar);
169            break;
170         }
171
172         default:    fatalerror("32051: GET_ADDRESS: unimplemented indirect addressing mode %d at %04X (%04X)\n", (m_op >> 3) & 0xf, m_pc, m_op);
173      }
174
175      return ea;
176   }
177   else                    // Direct Addressing
178   {
179      return m_st0.dp | (m_op & 0x7f);
180   }
181}
182
183int tms32051_device::GET_ZLVC_CONDITION(int zlvc, int zlvc_mask)
184{
185   if (zlvc_mask & 0x2)        // OV-bit
186   {
187      if ((zlvc & 0x2) && m_st0.ov)                           // OV
188      {
189         // clear OV
190         m_st0.ov = 0;
191
192         return 1;
193      }
194      else if ((zlvc & 0x2) == 0 && m_st0.ov == 0)            // NOV
195         return 1;
196   }
197   if (zlvc_mask & 0x1)        // C-bit
198   {
199      if ((zlvc & 0x1) && m_st1.c)                            // C
200         return 1;
201      else if ((zlvc & 0x1) == 0 && m_st1.c == 0)         // NC
202         return 1;
203   }
204   if (zlvc_mask & 0x8)        // Z-bit
205   {
206      if ((zlvc & 0x8) && (INT32)(m_acc) == 0)                // EQ
207         return 1;
208      else if ((zlvc & 0x8) == 0 && (INT32)(m_acc) != 0)  // NEQ
209         return 1;
210   }
211   if (zlvc_mask & 0x4)        // L-bit
212   {
213      if ((zlvc & 0x4) && (INT32)(m_acc) < 0)             // LT
214         return 1;
215      else if ((zlvc & 0x4) == 0 && (INT32)(m_acc) > 0)       // GT
216         return 1;
217   }
218   return 0;
219}
220
221int tms32051_device::GET_TP_CONDITION(int tp)
222{
223   switch (tp)
224   {
225      case 0:     // BIO pin low
226      {
227         // TODO
228         return 0;
229      }
230      case 1:     // TC = 1
231      {
232         return m_st1.tc;
233      }
234      case 2:     // TC = 0
235      {
236         return m_st1.tc ^ 1;
237      }
238      case 3:     // always false
239      {
240         return 0;
241      }
242   }
243   return 0;
244}
245
246INT32 tms32051_device::PREG_PSCALER(INT32 preg)
247{
248   switch (m_st1.pm & 3)
249   {
250      case 0:     // No shift
251      {
252         return preg;
253      }
254      case 1:     // Left-shifted 1 bit, LSB zero-filled
255      {
256         return preg << 1;
257      }
258      case 2:     // Left-shifted 4 bits, 4 LSBs zero-filled
259      {
260         return preg << 4;
261      }
262      case 3:     // Right-shifted 6 bits, sign-extended, 6 LSBs lost
263      {
264         return (INT32)(preg >> 6);
265      }
266   }
267   return 0;
268}
269
270
271
272void tms32051_device::op_invalid()
273{
274   fatalerror("32051: invalid op at %08X\n", m_pc-1);
275}
276
277/*****************************************************************************/
278
279void tms32051_device::op_abs()
280{
281   fatalerror("32051: unimplemented op abs at %08X\n", m_pc-1);
282}
283
284void tms32051_device::op_adcb()
285{
286   fatalerror("32051: unimplemented op adcb at %08X\n", m_pc-1);
287}
288
289void tms32051_device::op_add_mem()
290{
291   INT32 d;
292   UINT16 ea = GET_ADDRESS();
293   UINT16 data = DM_READ16(ea);
294   int shift = (m_op >> 8) & 0xf;
295
296   if (m_st1.sxm)
297   {
298      d = (INT32)(INT16)(data) << shift;
299   }
300   else
301   {
302      d = (UINT32)(UINT16)(data) << shift;
303   }
304
305   m_acc = ADD(m_acc, d);
306
307   CYCLES(1);
308}
309
310void tms32051_device::op_add_simm()
311{
312   UINT16 imm = m_op & 0xff;
313
314   m_acc = ADD(m_acc, imm);
315
316   CYCLES(1);
317}
318
319void tms32051_device::op_add_limm()
320{
321   INT32 d;
322   UINT16 imm = ROPCODE();
323   int shift = m_op & 0xf;
324
325   if (m_st1.sxm)
326   {
327      d = (INT32)(INT16)(imm) << shift;
328   }
329   else
330   {
331      d = (UINT32)(UINT16)(imm) << shift;
332   }
333
334   m_acc = ADD(m_acc, d);
335
336   CYCLES(2);
337}
338
339void tms32051_device::op_add_s16_mem()
340{
341   UINT16 ea = GET_ADDRESS();
342   UINT32 data = DM_READ16(ea) << 16;
343
344   m_acc = ADD(m_acc, data);
345
346   CYCLES(1);
347}
348
349void tms32051_device::op_addb()
350{
351   m_acc = ADD(m_acc, m_accb);
352
353   CYCLES(1);
354}
355
356void tms32051_device::op_addc()
357{
358   fatalerror("32051: unimplemented op addc at %08X\n", m_pc-1);
359}
360
361void tms32051_device::op_adds()
362{
363   fatalerror("32051: unimplemented op adds at %08X\n", m_pc-1);
364}
365
366void tms32051_device::op_addt()
367{
368   fatalerror("32051: unimplemented op addt at %08X\n", m_pc-1);
369}
370
371void tms32051_device::op_and_mem()
372{
373   fatalerror("32051: unimplemented op and mem at %08X\n", m_pc-1);
374}
375
376void tms32051_device::op_and_limm()
377{
378   UINT32 imm = ROPCODE();
379   int shift = m_op & 0xf;
380
381   m_acc &= imm << shift;
382
383   CYCLES(2);
384}
385
386void tms32051_device::op_and_s16_limm()
387{
388   fatalerror("32051: unimplemented op and s16 limm at %08X\n", m_pc-1);
389}
390
391void tms32051_device::op_andb()
392{
393   fatalerror("32051: unimplemented op andb at %08X\n", m_pc-1);
394}
395
396void tms32051_device::op_bsar()
397{
398   int shift = (m_op & 0xf) + 1;
399
400   if (m_st1.sxm)
401   {
402      m_acc = (INT32)(m_acc) >> shift;
403   }
404   else
405   {
406      m_acc = (UINT32)(m_acc) >> shift;
407   }
408
409   CYCLES(1);
410}
411
412void tms32051_device::op_cmpl()
413{
414   m_acc = ~(UINT32)(m_acc);
415
416   CYCLES(1);
417}
418
419void tms32051_device::op_crgt()
420{
421   if (m_acc >= m_accb)
422   {
423      m_accb = m_acc;
424      m_st1.c = 1;
425   }
426   else
427   {
428      m_acc = m_accb;
429      m_st1.c = 0;
430   }
431
432   CYCLES(1);
433}
434
435void tms32051_device::op_crlt()
436{
437   if (m_acc >= m_accb)
438   {
439      m_acc = m_accb;
440      m_st1.c = 0;
441   }
442   else
443   {
444      m_accb = m_acc;
445      m_st1.c = 1;
446   }
447
448   CYCLES(1);
449}
450
451void tms32051_device::op_exar()
452{
453   INT32 tmp = m_acc;
454   m_acc = m_accb;
455   m_accb = tmp;
456
457   CYCLES(1);
458}
459
460void tms32051_device::op_lacb()
461{
462   m_acc = m_accb;
463
464   CYCLES(1);
465}
466
467void tms32051_device::op_lacc_mem()
468{
469   int shift = (m_op >> 8) & 0xf;
470   UINT16 ea = GET_ADDRESS();
471   UINT16 data = DM_READ16(ea);
472
473   if (m_st1.sxm)
474   {
475      m_acc = (INT32)(INT16)(data) << shift;
476   }
477   else
478   {
479      m_acc = (UINT32)(UINT16)(data) << shift;
480   }
481
482   CYCLES(1);
483}
484
485void tms32051_device::op_lacc_limm()
486{
487   UINT16 imm = ROPCODE();
488   int shift = m_op & 0xf;
489
490   if (m_st1.sxm)
491   {
492      m_acc = (INT32)(INT16)(imm) << shift;
493   }
494   else
495   {
496      m_acc = (UINT32)(UINT16)(imm) << shift;
497   }
498
499   CYCLES(1);
500}
501
502void tms32051_device::op_lacc_s16_mem()
503{
504   UINT16 ea = GET_ADDRESS();
505   m_acc = DM_READ16(ea) << 16;
506
507   CYCLES(1);
508}
509
510void tms32051_device::op_lacl_simm()
511{
512   m_acc = m_op & 0xff;
513
514   CYCLES(1);
515}
516
517void tms32051_device::op_lacl_mem()
518{
519   UINT16 ea = GET_ADDRESS();
520   m_acc = DM_READ16(ea) & 0xffff;
521
522   CYCLES(1);
523}
524
525void tms32051_device::op_lact()
526{
527   fatalerror("32051: unimplemented op lact at %08X\n", m_pc-1);
528}
529
530void tms32051_device::op_lamm()
531{
532   UINT16 ea = GET_ADDRESS() & 0x7f;
533   m_acc = DM_READ16(ea) & 0xffff;
534
535   CYCLES(1);
536}
537
538void tms32051_device::op_neg()
539{
540   if ((UINT32)(m_acc) == 0x80000000)
541   {
542      m_st0.ov = 1;
543      m_st1.c = 0;
544      m_acc = (m_st0.ovm) ? 0x7fffffff : 0x80000000;
545   }
546   else
547   {
548      m_acc = 0 - (UINT32)(m_acc);
549      m_st1.c = (m_acc == 0) ? 1 : 0;
550   }
551
552   CYCLES(1);
553}
554
555void tms32051_device::op_norm()
556{
557   fatalerror("32051: unimplemented op norm at %08X\n", m_pc-1);
558}
559
560void tms32051_device::op_or_mem()
561{
562   UINT16 ea = GET_ADDRESS();
563   UINT16 data = DM_READ16(ea);
564
565   m_acc |= (UINT32)(data);
566
567   CYCLES(1);
568}
569
570void tms32051_device::op_or_limm()
571{
572   UINT32 imm = ROPCODE();
573   int shift = m_op & 0xf;
574
575   m_acc |= imm << shift;
576
577   CYCLES(1);
578}
579
580void tms32051_device::op_or_s16_limm()
581{
582   fatalerror("32051: unimplemented op or s16 limm at %08X\n", m_pc-1);
583}
584
585void tms32051_device::op_orb()
586{
587   m_acc |= m_accb;
588
589   CYCLES(1);
590}
591
592void tms32051_device::op_rol()
593{
594   fatalerror("32051: unimplemented op rol at %08X\n", m_pc-1);
595}
596
597void tms32051_device::op_rolb()
598{
599   UINT32 acc = m_acc;
600   UINT32 accb = m_accb;
601   UINT32 c = m_st1.c & 1;
602
603   m_acc = (acc << 1) | ((accb >> 31) & 1);
604   m_accb = (accb << 1) | c;
605   m_st1.c = (acc >> 31) & 1;
606
607   CYCLES(1);
608}
609
610void tms32051_device::op_ror()
611{
612   fatalerror("32051: unimplemented op ror at %08X\n", m_pc-1);
613}
614
615void tms32051_device::op_rorb()
616{
617   fatalerror("32051: unimplemented op rorb at %08X\n", m_pc-1);
618}
619
620void tms32051_device::op_sacb()
621{
622   m_accb = m_acc;
623
624   CYCLES(1);
625}
626
627void tms32051_device::op_sach()
628{
629   UINT16 ea = GET_ADDRESS();
630   int shift = (m_op >> 8) & 0x7;
631
632   DM_WRITE16(ea, (UINT16)((m_acc << shift) >> 16));
633   CYCLES(1);
634}
635
636void tms32051_device::op_sacl()
637{
638   UINT16 ea = GET_ADDRESS();
639   int shift = (m_op >> 8) & 0x7;
640
641   DM_WRITE16(ea, (UINT16)(m_acc << shift));
642   CYCLES(1);
643}
644
645void tms32051_device::op_samm()
646{
647   UINT16 ea = GET_ADDRESS();
648   ea &= 0x7f;
649
650   DM_WRITE16(ea, (UINT16)(m_acc));
651   CYCLES(1);
652}
653
654void tms32051_device::op_sath()
655{
656   fatalerror("32051: unimplemented op sath at %08X\n", m_pc-1);
657}
658
659void tms32051_device::op_satl()
660{
661   fatalerror("32051: unimplemented op satl at %08X\n", m_pc-1);
662}
663
664void tms32051_device::op_sbb()
665{
666   m_acc = SUB(m_acc, m_accb);
667
668   CYCLES(1);
669}
670
671void tms32051_device::op_sbbb()
672{
673   fatalerror("32051: unimplemented op sbbb at %08X\n", m_pc-1);
674}
675
676void tms32051_device::op_sfl()
677{
678   m_st1.c = (m_acc >> 31) & 1;
679   m_acc = m_acc << 1;
680
681   CYCLES(1);
682}
683
684void tms32051_device::op_sflb()
685{
686   UINT32 acc = m_acc;
687   UINT32 accb = m_accb;
688
689   m_acc = (acc << 1) | ((accb >> 31) & 1);
690   m_accb = (accb << 1);
691   m_st1.c = (acc >> 31) & 1;
692
693   CYCLES(1);
694}
695
696void tms32051_device::op_sfr()
697{
698   m_st1.c = m_acc & 1;
699
700   if (m_st1.sxm)
701   {
702      m_acc = (INT32)(m_acc) >> 1;
703   }
704   else
705   {
706      m_acc = (UINT32)(m_acc) >> 1;
707   }
708
709   CYCLES(1);
710}
711
712void tms32051_device::op_sfrb()
713{
714   fatalerror("32051: unimplemented op sfrb at %08X\n", m_pc-1);
715}
716
717void tms32051_device::op_sub_mem()
718{
719   INT32 d;
720   UINT16 ea = GET_ADDRESS();
721   UINT16 data = DM_READ16(ea);
722   int shift = (m_op >> 8) & 0xf;
723
724   if (m_st1.sxm)
725   {
726      d = (INT32)(INT16)(data) << shift;
727   }
728   else
729   {
730      d = (UINT32)(UINT16)(data) << shift;
731   }
732
733   m_acc = SUB(m_acc, d);
734
735   CYCLES(1);
736}
737
738void tms32051_device::op_sub_s16_mem()
739{
740   fatalerror("32051: unimplemented op sub s16 mem at %08X\n", m_pc-1);
741}
742
743void tms32051_device::op_sub_simm()
744{
745   UINT16 imm = m_op & 0xff;
746
747   m_acc = SUB(m_acc, imm);
748
749   CYCLES(1);
750}
751
752void tms32051_device::op_sub_limm()
753{
754   INT32 d;
755   UINT16 imm = ROPCODE();
756   int shift = m_op & 0xf;
757
758   if (m_st1.sxm)
759   {
760      d = (INT32)(INT16)(imm) << shift;
761   }
762   else
763   {
764      d = (UINT32)(UINT16)(imm) << shift;
765   }
766
767   m_acc = SUB(m_acc, d);
768
769   CYCLES(2);
770}
771
772void tms32051_device::op_subb()
773{
774   fatalerror("32051: unimplemented op subb at %08X\n", m_pc-1);
775}
776
777void tms32051_device::op_subc()
778{
779   fatalerror("32051: unimplemented op subc at %08X\n", m_pc-1);
780}
781
782void tms32051_device::op_subs()
783{
784   fatalerror("32051: unimplemented op subs at %08X\n", m_pc-1);
785}
786
787void tms32051_device::op_subt()
788{
789   fatalerror("32051: unimplemented op subt at %08X\n", m_pc-1);
790}
791
792void tms32051_device::op_xor_mem()
793{
794   UINT16 ea = GET_ADDRESS();
795   UINT16 data = DM_READ16(ea);
796
797   m_acc ^= (UINT32)(data);
798
799   CYCLES(1);
800}
801
802void tms32051_device::op_xor_limm()
803{
804   UINT32 imm = ROPCODE();
805   int shift = m_op & 0xf;
806
807   m_acc ^= imm << shift;
808
809   CYCLES(1);
810}
811
812void tms32051_device::op_xor_s16_limm()
813{
814   fatalerror("32051: unimplemented op xor s16 limm at %08X\n", m_pc-1);
815}
816
817void tms32051_device::op_xorb()
818{
819   fatalerror("32051: unimplemented op xorb at %08X\n", m_pc-1);
820}
821
822void tms32051_device::op_zalr()
823{
824   fatalerror("32051: unimplemented op zalr at %08X\n", m_pc-1);
825}
826
827void tms32051_device::op_zap()
828{
829   m_acc = 0;
830   m_preg = 0;
831
832   CYCLES(1);
833}
834
835/*****************************************************************************/
836
837void tms32051_device::op_adrk()
838{
839   UINT16 imm = m_op & 0xff;
840   UPDATE_AR(m_st0.arp, imm);
841
842   CYCLES(1);
843}
844
845void tms32051_device::op_cmpr()
846{
847   m_st1.tc = 0;
848
849   switch (m_op & 0x3)
850   {
851      case 0:         // (CurrentAR) == ARCR
852      {
853         if (m_ar[m_st0.arp] == m_arcr)
854         {
855            m_st1.tc = 1;
856         }
857         break;
858      }
859      case 1:         // (CurrentAR) < ARCR
860      {
861         if (m_ar[m_st0.arp] < m_arcr)
862         {
863            m_st1.tc = 1;
864         }
865         break;
866      }
867      case 2:         // (CurrentAR) > ARCR
868      {
869         if (m_ar[m_st0.arp] > m_arcr)
870         {
871            m_st1.tc = 1;
872         }
873         break;
874      }
875      case 3:         // (CurrentAR) != ARCR
876      {
877         if (m_ar[m_st0.arp] != m_arcr)
878         {
879            m_st1.tc = 1;
880         }
881         break;
882      }
883   }
884
885   CYCLES(1);
886}
887
888void tms32051_device::op_lar_mem()
889{
890   int arx = (m_op >> 8) & 0x7;
891   UINT16 ea = GET_ADDRESS();
892   UINT16 data = DM_READ16(ea);
893
894   m_ar[arx] = data;
895
896   CYCLES(2);
897}
898
899void tms32051_device::op_lar_simm()
900{
901   int arx = (m_op >> 8) & 0x7;
902   m_ar[arx] = m_op & 0xff;
903
904   CYCLES(2);
905}
906
907void tms32051_device::op_lar_limm()
908{
909   int arx = m_op & 0x7;
910   UINT16 imm = ROPCODE();
911   m_ar[arx] = imm;
912
913   CYCLES(2);
914}
915
916void tms32051_device::op_ldp_mem()
917{
918   fatalerror("32051: unimplemented op ldp mem at %08X\n", m_pc-1);
919}
920
921void tms32051_device::op_ldp_imm()
922{
923   m_st0.dp = (m_op & 0x1ff) << 7;
924   CYCLES(2);
925}
926
927void tms32051_device::op_mar()
928{
929   // direct addressing is NOP
930   if (m_op & 0x80)
931   {
932      GET_ADDRESS();
933   }
934   CYCLES(1);
935}
936
937void tms32051_device::op_sar()
938{
939   int arx = (m_op >> 8) & 0x7;
940   UINT16 ar = m_ar[arx];
941   UINT16 ea = GET_ADDRESS();
942   DM_WRITE16(ea, ar);
943
944   CYCLES(1);
945}
946
947void tms32051_device::op_sbrk()
948{
949   UINT16 imm = m_op & 0xff;
950   UPDATE_AR(m_st0.arp, -imm);
951
952   CYCLES(1);
953}
954
955/*****************************************************************************/
956
957void tms32051_device::op_b()
958{
959   UINT16 pma = ROPCODE();
960   GET_ADDRESS();      // update AR/ARP
961
962   CHANGE_PC(pma);
963   CYCLES(4);
964}
965
966void tms32051_device::op_bacc()
967{
968   CHANGE_PC((UINT16)(m_acc));
969
970   CYCLES(4);
971}
972
973void tms32051_device::op_baccd()
974{
975   UINT16 pc = (UINT16)(m_acc);
976
977   delay_slot(m_pc);
978   CHANGE_PC(pc);
979
980   CYCLES(2);
981}
982
983void tms32051_device::op_banz()
984{
985   UINT16 pma = ROPCODE();
986
987   if (m_ar[m_st0.arp] != 0)
988   {
989      CHANGE_PC(pma);
990      CYCLES(4);
991   }
992   else
993   {
994      CYCLES(2);
995   }
996
997   GET_ADDRESS();      // modify AR/ARP
998}
999
1000void tms32051_device::op_banzd()
1001{
1002   fatalerror("32051: unimplemented op banzd at %08X\n", m_pc-1);
1003}
1004
1005void tms32051_device::op_bcnd()
1006{
1007   UINT16 pma = ROPCODE();
1008
1009   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1010   {
1011      CHANGE_PC(pma);
1012      CYCLES(4);
1013   }
1014   else
1015   {
1016      CYCLES(2);
1017   }
1018}
1019
1020void tms32051_device::op_bcndd()
1021{
1022   UINT16 pma = ROPCODE();
1023
1024   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1025   {
1026      delay_slot(m_pc);
1027      CHANGE_PC(pma);
1028      CYCLES(4);
1029   }
1030   else
1031   {
1032      CYCLES(2);
1033   }
1034}
1035
1036void tms32051_device::op_bd()
1037{
1038   UINT16 pma = ROPCODE();
1039   GET_ADDRESS();      // update AR/ARP
1040
1041   delay_slot(m_pc);
1042   CHANGE_PC(pma);
1043   CYCLES(2);
1044}
1045
1046void tms32051_device::op_cala()
1047{
1048   PUSH_STACK(m_pc);
1049
1050   CHANGE_PC(m_acc);
1051
1052   CYCLES(4);
1053}
1054
1055void tms32051_device::op_calad()
1056{
1057   UINT16 pma = m_acc;
1058   PUSH_STACK(m_pc+2);
1059
1060   delay_slot(m_pc);
1061   CHANGE_PC(pma);
1062
1063   CYCLES(4);
1064}
1065
1066void tms32051_device::op_call()
1067{
1068   UINT16 pma = ROPCODE();
1069   GET_ADDRESS();      // update AR/ARP
1070   PUSH_STACK(m_pc);
1071
1072   CHANGE_PC(pma);
1073
1074   CYCLES(4);
1075}
1076
1077void tms32051_device::op_calld()
1078{
1079   UINT16 pma = ROPCODE();
1080   GET_ADDRESS();      // update AR/ARP
1081   PUSH_STACK(m_pc+2);
1082
1083   delay_slot(m_pc);
1084   CHANGE_PC(pma);
1085
1086   CYCLES(4);
1087}
1088
1089void tms32051_device::op_cc()
1090{
1091   fatalerror("32051: unimplemented op cc at %08X\n", m_pc-1);
1092}
1093
1094void tms32051_device::op_ccd()
1095{
1096   UINT16 pma = ROPCODE();
1097
1098   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1099   {
1100      PUSH_STACK(m_pc+2);
1101
1102      delay_slot(m_pc);
1103      CHANGE_PC(pma);
1104   }
1105
1106   CYCLES(2);
1107}
1108
1109void tms32051_device::op_intr()
1110{
1111   fatalerror("32051: unimplemented op intr at %08X\n", m_pc-1);
1112}
1113
1114void tms32051_device::op_nmi()
1115{
1116   fatalerror("32051: unimplemented op nmi at %08X\n", m_pc-1);
1117}
1118
1119void tms32051_device::op_retc()
1120{
1121   if ((m_op & 0x3ff) == 0x300 || GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1122   {
1123      UINT16 pc = POP_STACK();
1124      CHANGE_PC(pc);
1125      CYCLES(4);
1126   }
1127   else
1128   {
1129      CYCLES(2);
1130   }
1131}
1132
1133void tms32051_device::op_retcd()
1134{
1135   if ((m_op & 0x3ff) == 0x300 || GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1136   {
1137      UINT16 pc = POP_STACK();
1138      delay_slot(m_pc);
1139      CHANGE_PC(pc);
1140      CYCLES(4);
1141   }
1142   else
1143   {
1144      CYCLES(2);
1145   }
1146}
1147
1148void tms32051_device::op_rete()
1149{
1150   UINT16 pc = POP_STACK();
1151   CHANGE_PC(pc);
1152
1153   m_st0.intm = 0;
1154
1155   restore_interrupt_context();
1156
1157   CYCLES(4);
1158}
1159
1160void tms32051_device::op_reti()
1161{
1162   fatalerror("32051: unimplemented op reti at %08X\n", m_pc-1);
1163}
1164
1165void tms32051_device::op_trap()
1166{
1167   fatalerror("32051: unimplemented op trap at %08X\n", m_pc-1);
1168}
1169
1170void tms32051_device::op_xc()
1171{
1172   if (GET_ZLVC_CONDITION((m_op >> 4) & 0xf, m_op & 0xf) || GET_TP_CONDITION((m_op >> 8) & 0x3))
1173   {
1174      CYCLES(1);
1175   }
1176   else
1177   {
1178      int n = ((m_op >> 12) & 0x1) + 1;
1179      CHANGE_PC(m_pc + n);
1180      CYCLES(1 + n);
1181   }
1182}
1183
1184/*****************************************************************************/
1185
1186void tms32051_device::op_bldd_slimm()
1187{
1188   UINT16 pfc = ROPCODE();
1189
1190   while (m_rptc > -1)
1191   {
1192      UINT16 ea = GET_ADDRESS();
1193      UINT16 data = DM_READ16(pfc);
1194      DM_WRITE16(ea, data);
1195      pfc++;
1196      CYCLES(2);
1197
1198      m_rptc--;
1199   };
1200}
1201
1202void tms32051_device::op_bldd_dlimm()
1203{
1204   UINT16 pfc = ROPCODE();
1205
1206   while (m_rptc > -1)
1207   {
1208      UINT16 ea = GET_ADDRESS();
1209      UINT16 data = DM_READ16(ea);
1210      DM_WRITE16(pfc, data);
1211      pfc++;
1212      CYCLES(2);
1213
1214      m_rptc--;
1215   };
1216}
1217
1218void tms32051_device::op_bldd_sbmar()
1219{
1220   UINT16 pfc = m_bmar;
1221
1222   while (m_rptc > -1)
1223   {
1224      UINT16 ea = GET_ADDRESS();
1225      UINT16 data = DM_READ16(pfc);
1226      DM_WRITE16(ea, data);
1227      pfc++;
1228      CYCLES(2);
1229
1230      m_rptc--;
1231   };
1232}
1233
1234void tms32051_device::op_bldd_dbmar()
1235{
1236   UINT16 pfc = m_bmar;
1237
1238   while (m_rptc > -1)
1239   {
1240      UINT16 ea = GET_ADDRESS();
1241      UINT16 data = DM_READ16(ea);
1242      DM_WRITE16(pfc, data);
1243      pfc++;
1244      CYCLES(2);
1245
1246      m_rptc--;
1247   };
1248}
1249
1250void tms32051_device::op_bldp()
1251{
1252   UINT16 pfc = m_bmar;
1253
1254   while (m_rptc > -1)
1255   {
1256      UINT16 ea = GET_ADDRESS();
1257      UINT16 data = DM_READ16(ea);
1258      PM_WRITE16(pfc, data);
1259      pfc++;
1260      CYCLES(1);
1261
1262      m_rptc--;
1263   };
1264}
1265
1266void tms32051_device::op_blpd_bmar()
1267{
1268   fatalerror("32051: unimplemented op bpld bmar at %08X\n", m_pc-1);
1269}
1270
1271void tms32051_device::op_blpd_imm()
1272{
1273   UINT16 pfc = ROPCODE();
1274
1275   while (m_rptc > -1)
1276   {
1277      UINT16 ea = GET_ADDRESS();
1278      UINT16 data = PM_READ16(pfc);
1279      DM_WRITE16(ea, data);
1280      pfc++;
1281      CYCLES(2);
1282
1283      m_rptc--;
1284   };
1285}
1286
1287/*****************************************************************************/
1288
1289void tms32051_device::op_dmov()
1290{
1291   fatalerror("32051: unimplemented op dmov at %08X\n", m_pc-1);
1292}
1293
1294void tms32051_device::op_in()
1295{
1296   fatalerror("32051: unimplemented op in at %08X\n", m_pc-1);
1297}
1298
1299void tms32051_device::op_lmmr()
1300{
1301   UINT16 pfc = ROPCODE();
1302
1303   while (m_rptc > -1)
1304   {
1305      UINT16 ea = GET_ADDRESS();
1306      UINT16 data = DM_READ16(pfc);
1307      DM_WRITE16(ea & 0x7f, data);
1308      pfc++;
1309      CYCLES(2);
1310
1311      m_rptc--;
1312   };
1313}
1314
1315void tms32051_device::op_out()
1316{
1317   fatalerror("32051: unimplemented op out at %08X\n", m_pc-1);
1318}
1319
1320void tms32051_device::op_smmr()
1321{
1322   UINT16 pfc = ROPCODE();
1323
1324   while (m_rptc > -1)
1325   {
1326      UINT16 ea = GET_ADDRESS();
1327      UINT16 data = DM_READ16(ea & 0x7f);
1328      DM_WRITE16(pfc, data);
1329      pfc++;
1330      CYCLES(2);
1331
1332      m_rptc--;
1333   };
1334}
1335
1336void tms32051_device::op_tblr()
1337{
1338   UINT16 pfc = (UINT16)(m_acc);
1339
1340   while (m_rptc > -1)
1341   {
1342      UINT16 ea = GET_ADDRESS();
1343      UINT16 data = PM_READ16(pfc);
1344      DM_WRITE16(ea, data);
1345      pfc++;
1346      CYCLES(2);
1347
1348      m_rptc--;
1349   };
1350}
1351
1352void tms32051_device::op_tblw()
1353{
1354   UINT16 pfc = (UINT16)(m_acc);
1355
1356   while (m_rptc > -1)
1357   {
1358      UINT16 ea = GET_ADDRESS();
1359      UINT16 data = DM_READ16(ea);
1360      PM_WRITE16(pfc, data);
1361      pfc++;
1362      CYCLES(2);
1363
1364      m_rptc--;
1365   };
1366}
1367
1368/*****************************************************************************/
1369
1370void tms32051_device::op_apl_dbmr()
1371{
1372   UINT16 ea = GET_ADDRESS();
1373   UINT16 data = DM_READ16(ea);
1374   data &= m_dbmr;
1375   DM_WRITE16(ea, data);
1376   CYCLES(1);
1377}
1378
1379void tms32051_device::op_apl_imm()
1380{
1381   UINT16 ea = GET_ADDRESS();
1382   UINT16 imm = ROPCODE();
1383   UINT16 data = DM_READ16(ea);
1384   data &= imm;
1385   DM_WRITE16(ea, data);
1386   CYCLES(1);
1387}
1388
1389void tms32051_device::op_cpl_dbmr()
1390{
1391   fatalerror("32051: unimplemented op cpl dbmr at %08X\n", m_pc-1);
1392}
1393
1394void tms32051_device::op_cpl_imm()
1395{
1396   UINT16 imm = ROPCODE();
1397   UINT16 ea = GET_ADDRESS();
1398   UINT16 data = DM_READ16(ea);
1399
1400   m_st1.tc = (data == imm) ? 1 : 0;
1401
1402   CYCLES(1);
1403}
1404
1405void tms32051_device::op_opl_dbmr()
1406{
1407   UINT16 ea = GET_ADDRESS();
1408   UINT16 data = DM_READ16(ea);
1409   data |= m_dbmr;
1410   DM_WRITE16(ea, data);
1411   CYCLES(1);
1412}
1413
1414void tms32051_device::op_opl_imm()
1415{
1416   UINT16 ea = GET_ADDRESS();
1417   UINT16 imm = ROPCODE();
1418   UINT16 data = DM_READ16(ea);
1419   data |= imm;
1420   DM_WRITE16(ea, data);
1421   CYCLES(1);
1422}
1423
1424void tms32051_device::op_splk()
1425{
1426   UINT16 ea = GET_ADDRESS();
1427   UINT16 imm = ROPCODE();
1428
1429   DM_WRITE16(ea, imm);
1430
1431   CYCLES(2);
1432}
1433
1434void tms32051_device::op_xpl_dbmr()
1435{
1436   fatalerror("32051: unimplemented op xpl dbmr at %08X\n", m_pc-1);
1437}
1438
1439void tms32051_device::op_xpl_imm()
1440{
1441   fatalerror("32051: unimplemented op xpl imm at %08X\n", m_pc-1);
1442}
1443
1444void tms32051_device::op_apac()
1445{
1446   INT32 spreg = PREG_PSCALER(m_preg);
1447   m_acc = ADD(m_acc, spreg);
1448
1449   CYCLES(1);
1450}
1451
1452void tms32051_device::op_lph()
1453{
1454   fatalerror("32051: unimplemented op lph at %08X\n", m_pc-1);
1455}
1456
1457void tms32051_device::op_lt()
1458{
1459   UINT16 ea = GET_ADDRESS();
1460   UINT16 data = DM_READ16(ea);
1461
1462   m_treg0 = data;
1463   if (m_pmst.trm == 0)
1464   {
1465      m_treg1 = data;
1466      m_treg2 = data;
1467   }
1468
1469   CYCLES(1);
1470}
1471
1472void tms32051_device::op_lta()
1473{
1474   INT32 spreg;
1475   UINT16 ea = GET_ADDRESS();
1476   UINT16 data = DM_READ16(ea);
1477
1478   m_treg0 = data;
1479   spreg = PREG_PSCALER(m_preg);
1480   m_acc = ADD(m_acc, spreg);
1481   if (m_pmst.trm == 0)
1482   {
1483      m_treg1 = data;
1484      m_treg2 = data;
1485   }
1486
1487   CYCLES(1);
1488}
1489
1490void tms32051_device::op_ltd()
1491{
1492   fatalerror("32051: unimplemented op ltd at %08X\n", m_pc-1);
1493}
1494
1495void tms32051_device::op_ltp()
1496{
1497   fatalerror("32051: unimplemented op ltp at %08X\n", m_pc-1);
1498}
1499
1500void tms32051_device::op_lts()
1501{
1502   fatalerror("32051: unimplemented op lts at %08X\n", m_pc-1);
1503}
1504
1505void tms32051_device::op_mac()
1506{
1507   fatalerror("32051: unimplemented op mac at %08X\n", m_pc-1);
1508}
1509
1510void tms32051_device::op_macd()
1511{
1512   fatalerror("32051: unimplemented op macd at %08X\n", m_pc-1);
1513}
1514
1515void tms32051_device::op_madd()
1516{
1517   fatalerror("32051: unimplemented op madd at %08X\n", m_pc-1);
1518}
1519
1520void tms32051_device::op_mads()
1521{
1522   fatalerror("32051: unimplemented op mads at %08X\n", m_pc-1);
1523}
1524
1525void tms32051_device::op_mpy_mem()
1526{
1527   UINT16 ea = GET_ADDRESS();
1528   INT16 data = DM_READ16(ea);
1529
1530   m_preg = (INT32)(data) * (INT32)(INT16)(m_treg0);
1531
1532   CYCLES(1);
1533}
1534
1535void tms32051_device::op_mpy_simm()
1536{
1537   fatalerror("32051: unimplemented op mpy simm at %08X\n", m_pc-1);
1538}
1539
1540void tms32051_device::op_mpy_limm()
1541{
1542   fatalerror("32051: unimplemented op mpy limm at %08X\n", m_pc-1);
1543}
1544
1545void tms32051_device::op_mpya()
1546{
1547   fatalerror("32051: unimplemented op mpya at %08X\n", m_pc-1);
1548}
1549
1550void tms32051_device::op_mpys()
1551{
1552   fatalerror("32051: unimplemented op mpys at %08X\n", m_pc-1);
1553}
1554
1555void tms32051_device::op_mpyu()
1556{
1557   fatalerror("32051: unimplemented op mpyu at %08X\n", m_pc-1);
1558}
1559
1560void tms32051_device::op_pac()
1561{
1562   fatalerror("32051: unimplemented op pac at %08X\n", m_pc-1);
1563}
1564
1565void tms32051_device::op_spac()
1566{
1567   fatalerror("32051: unimplemented op spac at %08X\n", m_pc-1);
1568}
1569
1570void tms32051_device::op_sph()
1571{
1572   UINT16 ea = GET_ADDRESS();
1573   UINT16 spreg = (UINT16)(PREG_PSCALER(m_preg) >> 16);
1574   DM_WRITE16(ea, spreg);
1575
1576   CYCLES(1);
1577}
1578
1579void tms32051_device::op_spl()
1580{
1581   fatalerror("32051: unimplemented op spl at %08X\n", m_pc-1);
1582}
1583
1584void tms32051_device::op_spm()
1585{
1586   m_st1.pm = m_op & 0x3;
1587
1588   CYCLES(1);
1589}
1590
1591void tms32051_device::op_sqra()
1592{
1593   fatalerror("32051: unimplemented op sqra at %08X\n", m_pc-1);
1594}
1595
1596void tms32051_device::op_sqrs()
1597{
1598   fatalerror("32051: unimplemented op sqrs at %08X\n", m_pc-1);
1599}
1600
1601void tms32051_device::op_zpr()
1602{
1603   fatalerror("32051: unimplemented op zpr at %08X\n", m_pc-1);
1604}
1605
1606void tms32051_device::op_bit()
1607{
1608   UINT16 ea = GET_ADDRESS();
1609   UINT16 data = DM_READ16(ea);
1610
1611   m_st1.tc = (data >> (~m_op >> 8 & 0xf)) & 1;
1612
1613   CYCLES(1);
1614}
1615
1616void tms32051_device::op_bitt()
1617{
1618   UINT16 ea = GET_ADDRESS();
1619   UINT16 data = DM_READ16(ea);
1620
1621   m_st1.tc = (data >> (~m_treg2 & 0xf)) & 1;
1622
1623   CYCLES(1);
1624}
1625
1626void tms32051_device::op_clrc_ov()
1627{
1628   m_st0.ovm = 0;
1629
1630   CYCLES(1);
1631}
1632
1633void tms32051_device::op_clrc_ext()
1634{
1635   m_st1.sxm = 0;
1636
1637   CYCLES(1);
1638}
1639
1640void tms32051_device::op_clrc_hold()
1641{
1642   fatalerror("32051: unimplemented op clrc hold at %08X\n", m_pc-1);
1643}
1644
1645void tms32051_device::op_clrc_tc()
1646{
1647   fatalerror("32051: unimplemented op clrc tc at %08X\n", m_pc-1);
1648}
1649
1650void tms32051_device::op_clrc_carry()
1651{
1652   fatalerror("32051: unimplemented op clrc carry at %08X\n", m_pc-1);
1653}
1654
1655void tms32051_device::op_clrc_cnf()
1656{
1657   m_st1.cnf = 0;
1658
1659   CYCLES(1);
1660}
1661
1662void tms32051_device::op_clrc_intm()
1663{
1664   m_st0.intm = 0;
1665
1666   check_interrupts();
1667
1668   CYCLES(1);
1669}
1670
1671void tms32051_device::op_clrc_xf()
1672{
1673   fatalerror("32051: unimplemented op clrc xf at %08X\n", m_pc-1);
1674}
1675
1676void tms32051_device::op_idle()
1677{
1678   fatalerror("32051: unimplemented op idle at %08X\n", m_pc-1);
1679}
1680
1681void tms32051_device::op_idle2()
1682{
1683   fatalerror("32051: unimplemented op idle2 at %08X\n", m_pc-1);
1684}
1685
1686void tms32051_device::op_lst_st0()
1687{
1688   fatalerror("32051: unimplemented op lst st0 at %08X\n", m_pc-1);
1689}
1690
1691void tms32051_device::op_lst_st1()
1692{
1693   fatalerror("32051: unimplemented op lst st1 at %08X\n", m_pc-1);
1694}
1695
1696void tms32051_device::op_pop()
1697{
1698   m_acc = POP_STACK();
1699
1700   CYCLES(1);
1701}
1702
1703void tms32051_device::op_popd()
1704{
1705   fatalerror("32051: unimplemented op popd at %08X\n", m_pc-1);
1706}
1707
1708void tms32051_device::op_pshd()
1709{
1710   fatalerror("32051: unimplemented op pshd at %08X\n", m_pc-1);
1711}
1712
1713void tms32051_device::op_push()
1714{
1715   fatalerror("32051: unimplemented op push at %08X\n", m_pc-1);
1716}
1717
1718void tms32051_device::op_rpt_mem()
1719{
1720   UINT16 ea = GET_ADDRESS();
1721   UINT16 data = DM_READ16(ea);
1722   m_rptc = data;
1723   m_rpt_start = m_pc;
1724   m_rpt_end = m_pc;
1725
1726   CYCLES(1);
1727}
1728
1729void tms32051_device::op_rpt_limm()
1730{
1731   m_rptc = (UINT16)ROPCODE();
1732   m_rpt_start = m_pc;
1733   m_rpt_end = m_pc;
1734
1735   CYCLES(2);
1736}
1737
1738void tms32051_device::op_rpt_simm()
1739{
1740   m_rptc = (m_op & 0xff);
1741   m_rpt_start = m_pc;
1742   m_rpt_end = m_pc;
1743
1744   CYCLES(1);
1745}
1746
1747void tms32051_device::op_rptb()
1748{
1749   UINT16 pma = ROPCODE();
1750   m_pmst.braf = 1;
1751   m_pasr = m_pc;
1752   m_paer = pma + 1;
1753
1754   CYCLES(2);
1755}
1756
1757void tms32051_device::op_rptz()
1758{
1759   fatalerror("32051: unimplemented op rptz at %08X\n", m_pc-1);
1760}
1761
1762void tms32051_device::op_setc_ov()
1763{
1764   m_st0.ovm = 1;
1765
1766   CYCLES(1);
1767}
1768
1769void tms32051_device::op_setc_ext()
1770{
1771   m_st1.sxm = 1;
1772
1773   CYCLES(1);
1774}
1775
1776void tms32051_device::op_setc_hold()
1777{
1778   fatalerror("32051: unimplemented op setc hold at %08X\n", m_pc-1);
1779}
1780
1781void tms32051_device::op_setc_tc()
1782{
1783   fatalerror("32051: unimplemented op setc tc at %08X\n", m_pc-1);
1784}
1785
1786void tms32051_device::op_setc_carry()
1787{
1788   fatalerror("32051: unimplemented op setc carry at %08X\n", m_pc-1);
1789}
1790
1791void tms32051_device::op_setc_xf()
1792{
1793   fatalerror("32051: unimplemented op setc xf at %08X\n", m_pc-1);
1794}
1795
1796void tms32051_device::op_setc_cnf()
1797{
1798   m_st1.cnf = 1;
1799
1800   CYCLES(1);
1801}
1802
1803void tms32051_device::op_setc_intm()
1804{
1805   m_st0.intm = 1;
1806
1807   check_interrupts();
1808
1809   CYCLES(1);
1810}
1811
1812void tms32051_device::op_sst_st0()
1813{
1814   fatalerror("32051: unimplemented op sst st0 at %08X\n", m_pc-1);
1815}
1816
1817void tms32051_device::op_sst_st1()
1818{
1819   fatalerror("32051: unimplemented op sst st1 at %08X\n", m_pc-1);
1820}
trunk/src/devices/cpu/tms32051/tms32051.cpp
r250291r250292
105105   m_data->write_word(address << 1, data);
106106}
107107
108#include "32051ops.cpp"
108#include "32051ops.inc"
109109#include "32051ops.h"
110110
111111void tms32051_device::op_group_be()
trunk/src/devices/cpu/tms34010/34010fld.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12
13
14/***************************************************************************
15    FIELD WRITE FUNCTIONS
16***************************************************************************/
17
18void tms340x0_device::wfield_01(offs_t offset, UINT32 data)
19{
20   WFIELDMAC(0x01,16);
21}
22
23void tms340x0_device::wfield_02(offs_t offset, UINT32 data)
24{
25   WFIELDMAC(0x03,15);
26}
27
28void tms340x0_device::wfield_03(offs_t offset, UINT32 data)
29{
30   WFIELDMAC(0x07,14);
31}
32
33void tms340x0_device::wfield_04(offs_t offset, UINT32 data)
34{
35   WFIELDMAC(0x0f,13);
36}
37
38void tms340x0_device::wfield_05(offs_t offset, UINT32 data)
39{
40   WFIELDMAC(0x1f,12);
41}
42
43void tms340x0_device::wfield_06(offs_t offset, UINT32 data)
44{
45   WFIELDMAC(0x3f,11);
46}
47
48void tms340x0_device::wfield_07(offs_t offset, UINT32 data)
49{
50   WFIELDMAC(0x7f,10);
51}
52
53void tms340x0_device::wfield_08(offs_t offset, UINT32 data)
54{
55   WFIELDMAC_8();
56}
57
58void tms340x0_device::wfield_09(offs_t offset, UINT32 data)
59{
60   WFIELDMAC(0x1ff,8);
61}
62
63void tms340x0_device::wfield_10(offs_t offset, UINT32 data)
64{
65   WFIELDMAC(0x3ff,7);
66}
67
68void tms340x0_device::wfield_11(offs_t offset, UINT32 data)
69{
70   WFIELDMAC(0x7ff,6);
71}
72
73void tms340x0_device::wfield_12(offs_t offset, UINT32 data)
74{
75   WFIELDMAC(0xfff,5);
76}
77
78void tms340x0_device::wfield_13(offs_t offset, UINT32 data)
79{
80   WFIELDMAC(0x1fff,4);
81}
82
83void tms340x0_device::wfield_14(offs_t offset, UINT32 data)
84{
85   WFIELDMAC(0x3fff,3);
86}
87
88void tms340x0_device::wfield_15(offs_t offset, UINT32 data)
89{
90   WFIELDMAC(0x7fff,2);
91}
92
93void tms340x0_device::wfield_16(offs_t offset, UINT32 data)
94{
95   if (offset & 0x0f)
96   {
97      WFIELDMAC(0xffff,1);
98   }
99   else
100   {
101      TMS34010_WRMEM_WORD(TOBYTE(offset),data);
102   }
103}
104
105void tms340x0_device::wfield_17(offs_t offset, UINT32 data)
106{
107   WFIELDMAC(0x1ffff,0);
108}
109
110void tms340x0_device::wfield_18(offs_t offset, UINT32 data)
111{
112   WFIELDMAC_BIG(0x3ffff,15);
113}
114
115void tms340x0_device::wfield_19(offs_t offset, UINT32 data)
116{
117   WFIELDMAC_BIG(0x7ffff,14);
118}
119
120void tms340x0_device::wfield_20(offs_t offset, UINT32 data)
121{
122   WFIELDMAC_BIG(0xfffff,13);
123}
124
125void tms340x0_device::wfield_21(offs_t offset, UINT32 data)
126{
127   WFIELDMAC_BIG(0x1fffff,12);
128}
129
130void tms340x0_device::wfield_22(offs_t offset, UINT32 data)
131{
132   WFIELDMAC_BIG(0x3fffff,11);
133}
134
135void tms340x0_device::wfield_23(offs_t offset, UINT32 data)
136{
137   WFIELDMAC_BIG(0x7fffff,10);
138}
139
140void tms340x0_device::wfield_24(offs_t offset, UINT32 data)
141{
142   WFIELDMAC_BIG(0xffffff,9);
143}
144
145void tms340x0_device::wfield_25(offs_t offset, UINT32 data)
146{
147   WFIELDMAC_BIG(0x1ffffff,8);
148}
149
150void tms340x0_device::wfield_26(offs_t offset, UINT32 data)
151{
152   WFIELDMAC_BIG(0x3ffffff,7);
153}
154
155void tms340x0_device::wfield_27(offs_t offset, UINT32 data)
156{
157   WFIELDMAC_BIG(0x7ffffff,6);
158}
159
160void tms340x0_device::wfield_28(offs_t offset, UINT32 data)
161{
162   WFIELDMAC_BIG(0xfffffff,5);
163}
164
165void tms340x0_device::wfield_29(offs_t offset, UINT32 data)
166{
167   WFIELDMAC_BIG(0x1fffffff,4);
168}
169
170void tms340x0_device::wfield_30(offs_t offset, UINT32 data)
171{
172   WFIELDMAC_BIG(0x3fffffff,3);
173}
174
175void tms340x0_device::wfield_31(offs_t offset, UINT32 data)
176{
177   WFIELDMAC_BIG(0x7fffffff,2);
178}
179
180void tms340x0_device::wfield_32(offs_t offset, UINT32 data)
181{
182   WFIELDMAC_32();
183}
184
185
186const tms340x0_device::wfield_func tms340x0_device::s_wfield_functions[32] =
187{
188   &tms340x0_device::wfield_32, &tms340x0_device::wfield_01, &tms340x0_device::wfield_02, &tms340x0_device::wfield_03, &tms340x0_device::wfield_04, &tms340x0_device::wfield_05,
189   &tms340x0_device::wfield_06, &tms340x0_device::wfield_07, &tms340x0_device::wfield_08, &tms340x0_device::wfield_09, &tms340x0_device::wfield_10, &tms340x0_device::wfield_11,
190   &tms340x0_device::wfield_12, &tms340x0_device::wfield_13, &tms340x0_device::wfield_14, &tms340x0_device::wfield_15, &tms340x0_device::wfield_16, &tms340x0_device::wfield_17,
191   &tms340x0_device::wfield_18, &tms340x0_device::wfield_19, &tms340x0_device::wfield_20, &tms340x0_device::wfield_21, &tms340x0_device::wfield_22, &tms340x0_device::wfield_23,
192   &tms340x0_device::wfield_24, &tms340x0_device::wfield_25, &tms340x0_device::wfield_26, &tms340x0_device::wfield_27, &tms340x0_device::wfield_28, &tms340x0_device::wfield_29,
193   &tms340x0_device::wfield_30, &tms340x0_device::wfield_31
194};
195
196
197
198/***************************************************************************
199    FIELD READ FUNCTIONS (ZERO-EXTEND)
200***************************************************************************/
201
202UINT32 tms340x0_device::rfield_z_01(offs_t offset)
203{
204   UINT32 ret;
205   RFIELDMAC(0x01,16);
206   return ret;
207}
208
209UINT32 tms340x0_device::rfield_z_02(offs_t offset)
210{
211   UINT32 ret;
212   RFIELDMAC(0x03,15);
213   return ret;
214}
215
216UINT32 tms340x0_device::rfield_z_03(offs_t offset)
217{
218   UINT32 ret;
219   RFIELDMAC(0x07,14);
220   return ret;
221}
222
223UINT32 tms340x0_device::rfield_z_04(offs_t offset)
224{
225   UINT32 ret;
226   RFIELDMAC(0x0f,13);
227   return ret;
228}
229
230UINT32 tms340x0_device::rfield_z_05(offs_t offset)
231{
232   UINT32 ret;
233   RFIELDMAC(0x1f,12);
234   return ret;
235}
236
237UINT32 tms340x0_device::rfield_z_06(offs_t offset)
238{
239   UINT32 ret;
240   RFIELDMAC(0x3f,11);
241   return ret;
242}
243
244UINT32 tms340x0_device::rfield_z_07(offs_t offset)
245{
246   UINT32 ret;
247   RFIELDMAC(0x7f,10);
248   return ret;
249}
250
251UINT32 tms340x0_device::rfield_z_08(offs_t offset)
252{
253   UINT32 ret;
254   RFIELDMAC_8();
255   return ret;
256}
257
258UINT32 tms340x0_device::rfield_z_09(offs_t offset)
259{
260   UINT32 ret;
261   RFIELDMAC(0x1ff,8);
262   return ret;
263}
264
265UINT32 tms340x0_device::rfield_z_10(offs_t offset)
266{
267   UINT32 ret;
268   RFIELDMAC(0x3ff,7);
269   return ret;
270}
271
272UINT32 tms340x0_device::rfield_z_11(offs_t offset)
273{
274   UINT32 ret;
275   RFIELDMAC(0x7ff,6);
276   return ret;
277}
278
279UINT32 tms340x0_device::rfield_z_12(offs_t offset)
280{
281   UINT32 ret;
282   RFIELDMAC(0xfff,5);
283   return ret;
284}
285
286UINT32 tms340x0_device::rfield_z_13(offs_t offset)
287{
288   UINT32 ret;
289   RFIELDMAC(0x1fff,4);
290   return ret;
291}
292
293UINT32 tms340x0_device::rfield_z_14(offs_t offset)
294{
295   UINT32 ret;
296   RFIELDMAC(0x3fff,3);
297   return ret;
298}
299
300UINT32 tms340x0_device::rfield_z_15(offs_t offset)
301{
302   UINT32 ret;
303   RFIELDMAC(0x7fff,2);
304   return ret;
305}
306
307UINT32 tms340x0_device::rfield_z_16(offs_t offset)
308{
309   UINT32 ret;
310   if (offset & 0x0f)
311   {
312      RFIELDMAC(0xffff,1);
313   }
314
315   else
316      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
317   return ret;
318}
319
320UINT32 tms340x0_device::rfield_z_17(offs_t offset)
321{
322   UINT32 ret;
323   RFIELDMAC(0x1ffff,0);
324   return ret;
325}
326
327UINT32 tms340x0_device::rfield_z_18(offs_t offset)
328{
329   UINT32 ret;
330   RFIELDMAC_BIG(0x3ffff,15);
331   return ret;
332}
333
334UINT32 tms340x0_device::rfield_z_19(offs_t offset)
335{
336   UINT32 ret;
337   RFIELDMAC_BIG(0x7ffff,14);
338   return ret;
339}
340
341UINT32 tms340x0_device::rfield_z_20(offs_t offset)
342{
343   UINT32 ret;
344   RFIELDMAC_BIG(0xfffff,13);
345   return ret;
346}
347
348UINT32 tms340x0_device::rfield_z_21(offs_t offset)
349{
350   UINT32 ret;
351   RFIELDMAC_BIG(0x1fffff,12);
352   return ret;
353}
354
355UINT32 tms340x0_device::rfield_z_22(offs_t offset)
356{
357   UINT32 ret;
358   RFIELDMAC_BIG(0x3fffff,11);
359   return ret;
360}
361
362UINT32 tms340x0_device::rfield_z_23(offs_t offset)
363{
364   UINT32 ret;
365   RFIELDMAC_BIG(0x7fffff,10);
366   return ret;
367}
368
369UINT32 tms340x0_device::rfield_z_24(offs_t offset)
370{
371   UINT32 ret;
372   RFIELDMAC_BIG(0xffffff,9);
373   return ret;
374}
375
376UINT32 tms340x0_device::rfield_z_25(offs_t offset)
377{
378   UINT32 ret;
379   RFIELDMAC_BIG(0x1ffffff,8);
380   return ret;
381}
382
383UINT32 tms340x0_device::rfield_z_26(offs_t offset)
384{
385   UINT32 ret;
386   RFIELDMAC_BIG(0x3ffffff,7);
387   return ret;
388}
389
390UINT32 tms340x0_device::rfield_z_27(offs_t offset)
391{
392   UINT32 ret;
393   RFIELDMAC_BIG(0x7ffffff,6);
394   return ret;
395}
396
397UINT32 tms340x0_device::rfield_z_28(offs_t offset)
398{
399   UINT32 ret;
400   RFIELDMAC_BIG(0xfffffff,5);
401   return ret;
402}
403
404UINT32 tms340x0_device::rfield_z_29(offs_t offset)
405{
406   UINT32 ret;
407   RFIELDMAC_BIG(0x1fffffff,4);
408   return ret;
409}
410
411UINT32 tms340x0_device::rfield_z_30(offs_t offset)
412{
413   UINT32 ret;
414   RFIELDMAC_BIG(0x3fffffff,3);
415   return ret;
416}
417
418UINT32 tms340x0_device::rfield_z_31(offs_t offset)
419{
420   UINT32 ret;
421   RFIELDMAC_BIG(0x7fffffff,2);
422   return ret;
423}
424
425UINT32 tms340x0_device::rfield_32(offs_t offset)
426{
427   RFIELDMAC_32();
428}
429
430
431/***************************************************************************
432    FIELD READ FUNCTIONS (SIGN-EXTEND)
433***************************************************************************/
434
435UINT32 tms340x0_device::rfield_s_01(offs_t offset)
436{
437   UINT32 ret;
438   RFIELDMAC(0x01,16);
439   return ((INT32)(ret << 31)) >> 31;
440}
441
442UINT32 tms340x0_device::rfield_s_02(offs_t offset)
443{
444   UINT32 ret;
445   RFIELDMAC(0x03,15);
446   return ((INT32)(ret << 30)) >> 30;
447}
448
449UINT32 tms340x0_device::rfield_s_03(offs_t offset)
450{
451   UINT32 ret;
452   RFIELDMAC(0x07,14);
453   return ((INT32)(ret << 29)) >> 29;
454}
455
456UINT32 tms340x0_device::rfield_s_04(offs_t offset)
457{
458   UINT32 ret;
459   RFIELDMAC(0x0f,13);
460   return ((INT32)(ret << 28)) >> 28;
461}
462
463UINT32 tms340x0_device::rfield_s_05(offs_t offset)
464{
465   UINT32 ret;
466   RFIELDMAC(0x1f,12);
467   return ((INT32)(ret << 27)) >> 27;
468}
469
470UINT32 tms340x0_device::rfield_s_06(offs_t offset)
471{
472   UINT32 ret;
473   RFIELDMAC(0x3f,11);
474   return ((INT32)(ret << 26)) >> 26;
475}
476
477UINT32 tms340x0_device::rfield_s_07(offs_t offset)
478{
479   UINT32 ret;
480   RFIELDMAC(0x7f,10);
481   return ((INT32)(ret << 25)) >> 25;
482}
483
484UINT32 tms340x0_device::rfield_s_08(offs_t offset)
485{
486   UINT32 ret;
487   if (offset & 0x07)
488   {
489      RFIELDMAC(0xff,9);
490   }
491
492   else
493      ret = TMS34010_RDMEM(TOBYTE(offset));
494   return (INT32)(INT8)ret;
495}
496
497UINT32 tms340x0_device::rfield_s_09(offs_t offset)
498{
499   UINT32 ret;
500   RFIELDMAC(0x1ff,8);
501   return ((INT32)(ret << 23)) >> 23;
502}
503
504UINT32 tms340x0_device::rfield_s_10(offs_t offset)
505{
506   UINT32 ret;
507   RFIELDMAC(0x3ff,7);
508   return ((INT32)(ret << 22)) >> 22;
509}
510
511UINT32 tms340x0_device::rfield_s_11(offs_t offset)
512{
513   UINT32 ret;
514   RFIELDMAC(0x7ff,6);
515   return ((INT32)(ret << 21)) >> 21;
516}
517
518UINT32 tms340x0_device::rfield_s_12(offs_t offset)
519{
520   UINT32 ret;
521   RFIELDMAC(0xfff,5);
522   return ((INT32)(ret << 20)) >> 20;
523}
524
525UINT32 tms340x0_device::rfield_s_13(offs_t offset)
526{
527   UINT32 ret;
528   RFIELDMAC(0x1fff,4);
529   return ((INT32)(ret << 19)) >> 19;
530}
531
532UINT32 tms340x0_device::rfield_s_14(offs_t offset)
533{
534   UINT32 ret;
535   RFIELDMAC(0x3fff,3);
536   return ((INT32)(ret << 18)) >> 18;
537}
538
539UINT32 tms340x0_device::rfield_s_15(offs_t offset)
540{
541   UINT32 ret;
542   RFIELDMAC(0x7fff,2);
543   return ((INT32)(ret << 17)) >> 17;
544}
545
546UINT32 tms340x0_device::rfield_s_16(offs_t offset)
547{
548   UINT32 ret;
549   if (offset & 0x0f)
550   {
551      RFIELDMAC(0xffff,1);
552   }
553
554   else
555   {
556      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
557   }
558
559   return (INT32)(INT16)ret;
560}
561
562UINT32 tms340x0_device::rfield_s_17(offs_t offset)
563{
564   UINT32 ret;
565   RFIELDMAC(0x1ffff,0);
566   return ((INT32)(ret << 15)) >> 15;
567}
568
569UINT32 tms340x0_device::rfield_s_18(offs_t offset)
570{
571   UINT32 ret;
572   RFIELDMAC_BIG(0x3ffff,15);
573   return ((INT32)(ret << 14)) >> 14;
574}
575
576UINT32 tms340x0_device::rfield_s_19(offs_t offset)
577{
578   UINT32 ret;
579   RFIELDMAC_BIG(0x7ffff,14);
580   return ((INT32)(ret << 13)) >> 13;
581}
582
583UINT32 tms340x0_device::rfield_s_20(offs_t offset)
584{
585   UINT32 ret;
586   RFIELDMAC_BIG(0xfffff,13);
587   return ((INT32)(ret << 12)) >> 12;
588}
589
590UINT32 tms340x0_device::rfield_s_21(offs_t offset)
591{
592   UINT32 ret;
593   RFIELDMAC_BIG(0x1fffff,12);
594   return ((INT32)(ret << 11)) >> 11;
595}
596
597UINT32 tms340x0_device::rfield_s_22(offs_t offset)
598{
599   UINT32 ret;
600   RFIELDMAC_BIG(0x3fffff,11);
601   return ((INT32)(ret << 10)) >> 10;
602}
603
604UINT32 tms340x0_device::rfield_s_23(offs_t offset)
605{
606   UINT32 ret;
607   RFIELDMAC_BIG(0x7fffff,10);
608   return ((INT32)(ret << 9)) >> 9;
609}
610
611UINT32 tms340x0_device::rfield_s_24(offs_t offset)
612{
613   UINT32 ret;
614   RFIELDMAC_BIG(0xffffff,9);
615   return ((INT32)(ret << 8)) >> 8;
616}
617
618UINT32 tms340x0_device::rfield_s_25(offs_t offset)
619{
620   UINT32 ret;
621   RFIELDMAC_BIG(0x1ffffff,8);
622   return ((INT32)(ret << 7)) >> 7;
623}
624
625UINT32 tms340x0_device::rfield_s_26(offs_t offset)
626{
627   UINT32 ret;
628   RFIELDMAC_BIG(0x3ffffff,7);
629   return ((INT32)(ret << 6)) >> 6;
630}
631
632UINT32 tms340x0_device::rfield_s_27(offs_t offset)
633{
634   UINT32 ret;
635   RFIELDMAC_BIG(0x7ffffff,6);
636   return ((INT32)(ret << 5)) >> 5;
637}
638
639UINT32 tms340x0_device::rfield_s_28(offs_t offset)
640{
641   UINT32 ret;
642   RFIELDMAC_BIG(0xfffffff,5);
643   return ((INT32)(ret << 4)) >> 4;
644}
645
646UINT32 tms340x0_device::rfield_s_29(offs_t offset)
647{
648   UINT32 ret;
649   RFIELDMAC_BIG(0x1fffffff,4);
650   return ((INT32)(ret << 3)) >> 3;
651}
652
653UINT32 tms340x0_device::rfield_s_30(offs_t offset)
654{
655   UINT32 ret;
656   RFIELDMAC_BIG(0x3fffffff,3);
657   return ((INT32)(ret << 2)) >> 2;
658}
659
660UINT32 tms340x0_device::rfield_s_31(offs_t offset)
661{
662   UINT32 ret;
663   RFIELDMAC_BIG(0x7fffffff,2);
664   return ((INT32)(ret << 1)) >> 1;
665}
666
667const tms340x0_device::rfield_func tms340x0_device::s_rfield_functions[64] =
668{
669   &tms340x0_device::rfield_32  , &tms340x0_device::rfield_z_01, &tms340x0_device::rfield_z_02, &tms340x0_device::rfield_z_03, &tms340x0_device::rfield_z_04, &tms340x0_device::rfield_z_05,
670   &tms340x0_device::rfield_z_06, &tms340x0_device::rfield_z_07, &tms340x0_device::rfield_z_08, &tms340x0_device::rfield_z_09, &tms340x0_device::rfield_z_10, &tms340x0_device::rfield_z_11,
671   &tms340x0_device::rfield_z_12, &tms340x0_device::rfield_z_13, &tms340x0_device::rfield_z_14, &tms340x0_device::rfield_z_15, &tms340x0_device::rfield_z_16, &tms340x0_device::rfield_z_17,
672   &tms340x0_device::rfield_z_18, &tms340x0_device::rfield_z_19, &tms340x0_device::rfield_z_20, &tms340x0_device::rfield_z_21, &tms340x0_device::rfield_z_22, &tms340x0_device::rfield_z_23,
673   &tms340x0_device::rfield_z_24, &tms340x0_device::rfield_z_25, &tms340x0_device::rfield_z_26, &tms340x0_device::rfield_z_27, &tms340x0_device::rfield_z_28, &tms340x0_device::rfield_z_29,
674   &tms340x0_device::rfield_z_30, &tms340x0_device::rfield_z_31,
675   &tms340x0_device::rfield_32  , &tms340x0_device::rfield_s_01, &tms340x0_device::rfield_s_02, &tms340x0_device::rfield_s_03, &tms340x0_device::rfield_s_04, &tms340x0_device::rfield_s_05,
676   &tms340x0_device::rfield_s_06, &tms340x0_device::rfield_s_07, &tms340x0_device::rfield_s_08, &tms340x0_device::rfield_s_09, &tms340x0_device::rfield_s_10, &tms340x0_device::rfield_s_11,
677   &tms340x0_device::rfield_s_12, &tms340x0_device::rfield_s_13, &tms340x0_device::rfield_s_14, &tms340x0_device::rfield_s_15, &tms340x0_device::rfield_s_16, &tms340x0_device::rfield_s_17,
678   &tms340x0_device::rfield_s_18, &tms340x0_device::rfield_s_19, &tms340x0_device::rfield_s_20, &tms340x0_device::rfield_s_21, &tms340x0_device::rfield_s_22, &tms340x0_device::rfield_s_23,
679   &tms340x0_device::rfield_s_24, &tms340x0_device::rfield_s_25, &tms340x0_device::rfield_s_26, &tms340x0_device::rfield_s_27, &tms340x0_device::rfield_s_28, &tms340x0_device::rfield_s_29,
680   &tms340x0_device::rfield_s_30, &tms340x0_device::rfield_s_31
681};
trunk/src/devices/cpu/tms34010/34010fld.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12
13
14/***************************************************************************
15    FIELD WRITE FUNCTIONS
16***************************************************************************/
17
18void tms340x0_device::wfield_01(offs_t offset, UINT32 data)
19{
20   WFIELDMAC(0x01,16);
21}
22
23void tms340x0_device::wfield_02(offs_t offset, UINT32 data)
24{
25   WFIELDMAC(0x03,15);
26}
27
28void tms340x0_device::wfield_03(offs_t offset, UINT32 data)
29{
30   WFIELDMAC(0x07,14);
31}
32
33void tms340x0_device::wfield_04(offs_t offset, UINT32 data)
34{
35   WFIELDMAC(0x0f,13);
36}
37
38void tms340x0_device::wfield_05(offs_t offset, UINT32 data)
39{
40   WFIELDMAC(0x1f,12);
41}
42
43void tms340x0_device::wfield_06(offs_t offset, UINT32 data)
44{
45   WFIELDMAC(0x3f,11);
46}
47
48void tms340x0_device::wfield_07(offs_t offset, UINT32 data)
49{
50   WFIELDMAC(0x7f,10);
51}
52
53void tms340x0_device::wfield_08(offs_t offset, UINT32 data)
54{
55   WFIELDMAC_8();
56}
57
58void tms340x0_device::wfield_09(offs_t offset, UINT32 data)
59{
60   WFIELDMAC(0x1ff,8);
61}
62
63void tms340x0_device::wfield_10(offs_t offset, UINT32 data)
64{
65   WFIELDMAC(0x3ff,7);
66}
67
68void tms340x0_device::wfield_11(offs_t offset, UINT32 data)
69{
70   WFIELDMAC(0x7ff,6);
71}
72
73void tms340x0_device::wfield_12(offs_t offset, UINT32 data)
74{
75   WFIELDMAC(0xfff,5);
76}
77
78void tms340x0_device::wfield_13(offs_t offset, UINT32 data)
79{
80   WFIELDMAC(0x1fff,4);
81}
82
83void tms340x0_device::wfield_14(offs_t offset, UINT32 data)
84{
85   WFIELDMAC(0x3fff,3);
86}
87
88void tms340x0_device::wfield_15(offs_t offset, UINT32 data)
89{
90   WFIELDMAC(0x7fff,2);
91}
92
93void tms340x0_device::wfield_16(offs_t offset, UINT32 data)
94{
95   if (offset & 0x0f)
96   {
97      WFIELDMAC(0xffff,1);
98   }
99   else
100   {
101      TMS34010_WRMEM_WORD(TOBYTE(offset),data);
102   }
103}
104
105void tms340x0_device::wfield_17(offs_t offset, UINT32 data)
106{
107   WFIELDMAC(0x1ffff,0);
108}
109
110void tms340x0_device::wfield_18(offs_t offset, UINT32 data)
111{
112   WFIELDMAC_BIG(0x3ffff,15);
113}
114
115void tms340x0_device::wfield_19(offs_t offset, UINT32 data)
116{
117   WFIELDMAC_BIG(0x7ffff,14);
118}
119
120void tms340x0_device::wfield_20(offs_t offset, UINT32 data)
121{
122   WFIELDMAC_BIG(0xfffff,13);
123}
124
125void tms340x0_device::wfield_21(offs_t offset, UINT32 data)
126{
127   WFIELDMAC_BIG(0x1fffff,12);
128}
129
130void tms340x0_device::wfield_22(offs_t offset, UINT32 data)
131{
132   WFIELDMAC_BIG(0x3fffff,11);
133}
134
135void tms340x0_device::wfield_23(offs_t offset, UINT32 data)
136{
137   WFIELDMAC_BIG(0x7fffff,10);
138}
139
140void tms340x0_device::wfield_24(offs_t offset, UINT32 data)
141{
142   WFIELDMAC_BIG(0xffffff,9);
143}
144
145void tms340x0_device::wfield_25(offs_t offset, UINT32 data)
146{
147   WFIELDMAC_BIG(0x1ffffff,8);
148}
149
150void tms340x0_device::wfield_26(offs_t offset, UINT32 data)
151{
152   WFIELDMAC_BIG(0x3ffffff,7);
153}
154
155void tms340x0_device::wfield_27(offs_t offset, UINT32 data)
156{
157   WFIELDMAC_BIG(0x7ffffff,6);
158}
159
160void tms340x0_device::wfield_28(offs_t offset, UINT32 data)
161{
162   WFIELDMAC_BIG(0xfffffff,5);
163}
164
165void tms340x0_device::wfield_29(offs_t offset, UINT32 data)
166{
167   WFIELDMAC_BIG(0x1fffffff,4);
168}
169
170void tms340x0_device::wfield_30(offs_t offset, UINT32 data)
171{
172   WFIELDMAC_BIG(0x3fffffff,3);
173}
174
175void tms340x0_device::wfield_31(offs_t offset, UINT32 data)
176{
177   WFIELDMAC_BIG(0x7fffffff,2);
178}
179
180void tms340x0_device::wfield_32(offs_t offset, UINT32 data)
181{
182   WFIELDMAC_32();
183}
184
185
186const tms340x0_device::wfield_func tms340x0_device::s_wfield_functions[32] =
187{
188   &tms340x0_device::wfield_32, &tms340x0_device::wfield_01, &tms340x0_device::wfield_02, &tms340x0_device::wfield_03, &tms340x0_device::wfield_04, &tms340x0_device::wfield_05,
189   &tms340x0_device::wfield_06, &tms340x0_device::wfield_07, &tms340x0_device::wfield_08, &tms340x0_device::wfield_09, &tms340x0_device::wfield_10, &tms340x0_device::wfield_11,
190   &tms340x0_device::wfield_12, &tms340x0_device::wfield_13, &tms340x0_device::wfield_14, &tms340x0_device::wfield_15, &tms340x0_device::wfield_16, &tms340x0_device::wfield_17,
191   &tms340x0_device::wfield_18, &tms340x0_device::wfield_19, &tms340x0_device::wfield_20, &tms340x0_device::wfield_21, &tms340x0_device::wfield_22, &tms340x0_device::wfield_23,
192   &tms340x0_device::wfield_24, &tms340x0_device::wfield_25, &tms340x0_device::wfield_26, &tms340x0_device::wfield_27, &tms340x0_device::wfield_28, &tms340x0_device::wfield_29,
193   &tms340x0_device::wfield_30, &tms340x0_device::wfield_31
194};
195
196
197
198/***************************************************************************
199    FIELD READ FUNCTIONS (ZERO-EXTEND)
200***************************************************************************/
201
202UINT32 tms340x0_device::rfield_z_01(offs_t offset)
203{
204   UINT32 ret;
205   RFIELDMAC(0x01,16);
206   return ret;
207}
208
209UINT32 tms340x0_device::rfield_z_02(offs_t offset)
210{
211   UINT32 ret;
212   RFIELDMAC(0x03,15);
213   return ret;
214}
215
216UINT32 tms340x0_device::rfield_z_03(offs_t offset)
217{
218   UINT32 ret;
219   RFIELDMAC(0x07,14);
220   return ret;
221}
222
223UINT32 tms340x0_device::rfield_z_04(offs_t offset)
224{
225   UINT32 ret;
226   RFIELDMAC(0x0f,13);
227   return ret;
228}
229
230UINT32 tms340x0_device::rfield_z_05(offs_t offset)
231{
232   UINT32 ret;
233   RFIELDMAC(0x1f,12);
234   return ret;
235}
236
237UINT32 tms340x0_device::rfield_z_06(offs_t offset)
238{
239   UINT32 ret;
240   RFIELDMAC(0x3f,11);
241   return ret;
242}
243
244UINT32 tms340x0_device::rfield_z_07(offs_t offset)
245{
246   UINT32 ret;
247   RFIELDMAC(0x7f,10);
248   return ret;
249}
250
251UINT32 tms340x0_device::rfield_z_08(offs_t offset)
252{
253   UINT32 ret;
254   RFIELDMAC_8();
255   return ret;
256}
257
258UINT32 tms340x0_device::rfield_z_09(offs_t offset)
259{
260   UINT32 ret;
261   RFIELDMAC(0x1ff,8);
262   return ret;
263}
264
265UINT32 tms340x0_device::rfield_z_10(offs_t offset)
266{
267   UINT32 ret;
268   RFIELDMAC(0x3ff,7);
269   return ret;
270}
271
272UINT32 tms340x0_device::rfield_z_11(offs_t offset)
273{
274   UINT32 ret;
275   RFIELDMAC(0x7ff,6);
276   return ret;
277}
278
279UINT32 tms340x0_device::rfield_z_12(offs_t offset)
280{
281   UINT32 ret;
282   RFIELDMAC(0xfff,5);
283   return ret;
284}
285
286UINT32 tms340x0_device::rfield_z_13(offs_t offset)
287{
288   UINT32 ret;
289   RFIELDMAC(0x1fff,4);
290   return ret;
291}
292
293UINT32 tms340x0_device::rfield_z_14(offs_t offset)
294{
295   UINT32 ret;
296   RFIELDMAC(0x3fff,3);
297   return ret;
298}
299
300UINT32 tms340x0_device::rfield_z_15(offs_t offset)
301{
302   UINT32 ret;
303   RFIELDMAC(0x7fff,2);
304   return ret;
305}
306
307UINT32 tms340x0_device::rfield_z_16(offs_t offset)
308{
309   UINT32 ret;
310   if (offset & 0x0f)
311   {
312      RFIELDMAC(0xffff,1);
313   }
314
315   else
316      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
317   return ret;
318}
319
320UINT32 tms340x0_device::rfield_z_17(offs_t offset)
321{
322   UINT32 ret;
323   RFIELDMAC(0x1ffff,0);
324   return ret;
325}
326
327UINT32 tms340x0_device::rfield_z_18(offs_t offset)
328{
329   UINT32 ret;
330   RFIELDMAC_BIG(0x3ffff,15);
331   return ret;
332}
333
334UINT32 tms340x0_device::rfield_z_19(offs_t offset)
335{
336   UINT32 ret;
337   RFIELDMAC_BIG(0x7ffff,14);
338   return ret;
339}
340
341UINT32 tms340x0_device::rfield_z_20(offs_t offset)
342{
343   UINT32 ret;
344   RFIELDMAC_BIG(0xfffff,13);
345   return ret;
346}
347
348UINT32 tms340x0_device::rfield_z_21(offs_t offset)
349{
350   UINT32 ret;
351   RFIELDMAC_BIG(0x1fffff,12);
352   return ret;
353}
354
355UINT32 tms340x0_device::rfield_z_22(offs_t offset)
356{
357   UINT32 ret;
358   RFIELDMAC_BIG(0x3fffff,11);
359   return ret;
360}
361
362UINT32 tms340x0_device::rfield_z_23(offs_t offset)
363{
364   UINT32 ret;
365   RFIELDMAC_BIG(0x7fffff,10);
366   return ret;
367}
368
369UINT32 tms340x0_device::rfield_z_24(offs_t offset)
370{
371   UINT32 ret;
372   RFIELDMAC_BIG(0xffffff,9);
373   return ret;
374}
375
376UINT32 tms340x0_device::rfield_z_25(offs_t offset)
377{
378   UINT32 ret;
379   RFIELDMAC_BIG(0x1ffffff,8);
380   return ret;
381}
382
383UINT32 tms340x0_device::rfield_z_26(offs_t offset)
384{
385   UINT32 ret;
386   RFIELDMAC_BIG(0x3ffffff,7);
387   return ret;
388}
389
390UINT32 tms340x0_device::rfield_z_27(offs_t offset)
391{
392   UINT32 ret;
393   RFIELDMAC_BIG(0x7ffffff,6);
394   return ret;
395}
396
397UINT32 tms340x0_device::rfield_z_28(offs_t offset)
398{
399   UINT32 ret;
400   RFIELDMAC_BIG(0xfffffff,5);
401   return ret;
402}
403
404UINT32 tms340x0_device::rfield_z_29(offs_t offset)
405{
406   UINT32 ret;
407   RFIELDMAC_BIG(0x1fffffff,4);
408   return ret;
409}
410
411UINT32 tms340x0_device::rfield_z_30(offs_t offset)
412{
413   UINT32 ret;
414   RFIELDMAC_BIG(0x3fffffff,3);
415   return ret;
416}
417
418UINT32 tms340x0_device::rfield_z_31(offs_t offset)
419{
420   UINT32 ret;
421   RFIELDMAC_BIG(0x7fffffff,2);
422   return ret;
423}
424
425UINT32 tms340x0_device::rfield_32(offs_t offset)
426{
427   RFIELDMAC_32();
428}
429
430
431/***************************************************************************
432    FIELD READ FUNCTIONS (SIGN-EXTEND)
433***************************************************************************/
434
435UINT32 tms340x0_device::rfield_s_01(offs_t offset)
436{
437   UINT32 ret;
438   RFIELDMAC(0x01,16);
439   return ((INT32)(ret << 31)) >> 31;
440}
441
442UINT32 tms340x0_device::rfield_s_02(offs_t offset)
443{
444   UINT32 ret;
445   RFIELDMAC(0x03,15);
446   return ((INT32)(ret << 30)) >> 30;
447}
448
449UINT32 tms340x0_device::rfield_s_03(offs_t offset)
450{
451   UINT32 ret;
452   RFIELDMAC(0x07,14);
453   return ((INT32)(ret << 29)) >> 29;
454}
455
456UINT32 tms340x0_device::rfield_s_04(offs_t offset)
457{
458   UINT32 ret;
459   RFIELDMAC(0x0f,13);
460   return ((INT32)(ret << 28)) >> 28;
461}
462
463UINT32 tms340x0_device::rfield_s_05(offs_t offset)
464{
465   UINT32 ret;
466   RFIELDMAC(0x1f,12);
467   return ((INT32)(ret << 27)) >> 27;
468}
469
470UINT32 tms340x0_device::rfield_s_06(offs_t offset)
471{
472   UINT32 ret;
473   RFIELDMAC(0x3f,11);
474   return ((INT32)(ret << 26)) >> 26;
475}
476
477UINT32 tms340x0_device::rfield_s_07(offs_t offset)
478{
479   UINT32 ret;
480   RFIELDMAC(0x7f,10);
481   return ((INT32)(ret << 25)) >> 25;
482}
483
484UINT32 tms340x0_device::rfield_s_08(offs_t offset)
485{
486   UINT32 ret;
487   if (offset & 0x07)
488   {
489      RFIELDMAC(0xff,9);
490   }
491
492   else
493      ret = TMS34010_RDMEM(TOBYTE(offset));
494   return (INT32)(INT8)ret;
495}
496
497UINT32 tms340x0_device::rfield_s_09(offs_t offset)
498{
499   UINT32 ret;
500   RFIELDMAC(0x1ff,8);
501   return ((INT32)(ret << 23)) >> 23;
502}
503
504UINT32 tms340x0_device::rfield_s_10(offs_t offset)
505{
506   UINT32 ret;
507   RFIELDMAC(0x3ff,7);
508   return ((INT32)(ret << 22)) >> 22;
509}
510
511UINT32 tms340x0_device::rfield_s_11(offs_t offset)
512{
513   UINT32 ret;
514   RFIELDMAC(0x7ff,6);
515   return ((INT32)(ret << 21)) >> 21;
516}
517
518UINT32 tms340x0_device::rfield_s_12(offs_t offset)
519{
520   UINT32 ret;
521   RFIELDMAC(0xfff,5);
522   return ((INT32)(ret << 20)) >> 20;
523}
524
525UINT32 tms340x0_device::rfield_s_13(offs_t offset)
526{
527   UINT32 ret;
528   RFIELDMAC(0x1fff,4);
529   return ((INT32)(ret << 19)) >> 19;
530}
531
532UINT32 tms340x0_device::rfield_s_14(offs_t offset)
533{
534   UINT32 ret;
535   RFIELDMAC(0x3fff,3);
536   return ((INT32)(ret << 18)) >> 18;
537}
538
539UINT32 tms340x0_device::rfield_s_15(offs_t offset)
540{
541   UINT32 ret;
542   RFIELDMAC(0x7fff,2);
543   return ((INT32)(ret << 17)) >> 17;
544}
545
546UINT32 tms340x0_device::rfield_s_16(offs_t offset)
547{
548   UINT32 ret;
549   if (offset & 0x0f)
550   {
551      RFIELDMAC(0xffff,1);
552   }
553
554   else
555   {
556      ret = TMS34010_RDMEM_WORD(TOBYTE(offset));
557   }
558
559   return (INT32)(INT16)ret;
560}
561
562UINT32 tms340x0_device::rfield_s_17(offs_t offset)
563{
564   UINT32 ret;
565   RFIELDMAC(0x1ffff,0);
566   return ((INT32)(ret << 15)) >> 15;
567}
568
569UINT32 tms340x0_device::rfield_s_18(offs_t offset)
570{
571   UINT32 ret;
572   RFIELDMAC_BIG(0x3ffff,15);
573   return ((INT32)(ret << 14)) >> 14;
574}
575
576UINT32 tms340x0_device::rfield_s_19(offs_t offset)
577{
578   UINT32 ret;
579   RFIELDMAC_BIG(0x7ffff,14);
580   return ((INT32)(ret << 13)) >> 13;
581}
582
583UINT32 tms340x0_device::rfield_s_20(offs_t offset)
584{
585   UINT32 ret;
586   RFIELDMAC_BIG(0xfffff,13);
587   return ((INT32)(ret << 12)) >> 12;
588}
589
590UINT32 tms340x0_device::rfield_s_21(offs_t offset)
591{
592   UINT32 ret;
593   RFIELDMAC_BIG(0x1fffff,12);
594   return ((INT32)(ret << 11)) >> 11;
595}
596
597UINT32 tms340x0_device::rfield_s_22(offs_t offset)
598{
599   UINT32 ret;
600   RFIELDMAC_BIG(0x3fffff,11);
601   return ((INT32)(ret << 10)) >> 10;
602}
603
604UINT32 tms340x0_device::rfield_s_23(offs_t offset)
605{
606   UINT32 ret;
607   RFIELDMAC_BIG(0x7fffff,10);
608   return ((INT32)(ret << 9)) >> 9;
609}
610
611UINT32 tms340x0_device::rfield_s_24(offs_t offset)
612{
613   UINT32 ret;
614   RFIELDMAC_BIG(0xffffff,9);
615   return ((INT32)(ret << 8)) >> 8;
616}
617
618UINT32 tms340x0_device::rfield_s_25(offs_t offset)
619{
620   UINT32 ret;
621   RFIELDMAC_BIG(0x1ffffff,8);
622   return ((INT32)(ret << 7)) >> 7;
623}
624
625UINT32 tms340x0_device::rfield_s_26(offs_t offset)
626{
627   UINT32 ret;
628   RFIELDMAC_BIG(0x3ffffff,7);
629   return ((INT32)(ret << 6)) >> 6;
630}
631
632UINT32 tms340x0_device::rfield_s_27(offs_t offset)
633{
634   UINT32 ret;
635   RFIELDMAC_BIG(0x7ffffff,6);
636   return ((INT32)(ret << 5)) >> 5;
637}
638
639UINT32 tms340x0_device::rfield_s_28(offs_t offset)
640{
641   UINT32 ret;
642   RFIELDMAC_BIG(0xfffffff,5);
643   return ((INT32)(ret << 4)) >> 4;
644}
645
646UINT32 tms340x0_device::rfield_s_29(offs_t offset)
647{
648   UINT32 ret;
649   RFIELDMAC_BIG(0x1fffffff,4);
650   return ((INT32)(ret << 3)) >> 3;
651}
652
653UINT32 tms340x0_device::rfield_s_30(offs_t offset)
654{
655   UINT32 ret;
656   RFIELDMAC_BIG(0x3fffffff,3);
657   return ((INT32)(ret << 2)) >> 2;
658}
659
660UINT32 tms340x0_device::rfield_s_31(offs_t offset)
661{
662   UINT32 ret;
663   RFIELDMAC_BIG(0x7fffffff,2);
664   return ((INT32)(ret << 1)) >> 1;
665}
666
667const tms340x0_device::rfield_func tms340x0_device::s_rfield_functions[64] =
668{
669   &tms340x0_device::rfield_32  , &tms340x0_device::rfield_z_01, &tms340x0_device::rfield_z_02, &tms340x0_device::rfield_z_03, &tms340x0_device::rfield_z_04, &tms340x0_device::rfield_z_05,
670   &tms340x0_device::rfield_z_06, &tms340x0_device::rfield_z_07, &tms340x0_device::rfield_z_08, &tms340x0_device::rfield_z_09, &tms340x0_device::rfield_z_10, &tms340x0_device::rfield_z_11,
671   &tms340x0_device::rfield_z_12, &tms340x0_device::rfield_z_13, &tms340x0_device::rfield_z_14, &tms340x0_device::rfield_z_15, &tms340x0_device::rfield_z_16, &tms340x0_device::rfield_z_17,
672   &tms340x0_device::rfield_z_18, &tms340x0_device::rfield_z_19, &tms340x0_device::rfield_z_20, &tms340x0_device::rfield_z_21, &tms340x0_device::rfield_z_22, &tms340x0_device::rfield_z_23,
673   &tms340x0_device::rfield_z_24, &tms340x0_device::rfield_z_25, &tms340x0_device::rfield_z_26, &tms340x0_device::rfield_z_27, &tms340x0_device::rfield_z_28, &tms340x0_device::rfield_z_29,
674   &tms340x0_device::rfield_z_30, &tms340x0_device::rfield_z_31,
675   &tms340x0_device::rfield_32  , &tms340x0_device::rfield_s_01, &tms340x0_device::rfield_s_02, &tms340x0_device::rfield_s_03, &tms340x0_device::rfield_s_04, &tms340x0_device::rfield_s_05,
676   &tms340x0_device::rfield_s_06, &tms340x0_device::rfield_s_07, &tms340x0_device::rfield_s_08, &tms340x0_device::rfield_s_09, &tms340x0_device::rfield_s_10, &tms340x0_device::rfield_s_11,
677   &tms340x0_device::rfield_s_12, &tms340x0_device::rfield_s_13, &tms340x0_device::rfield_s_14, &tms340x0_device::rfield_s_15, &tms340x0_device::rfield_s_16, &tms340x0_device::rfield_s_17,
678   &tms340x0_device::rfield_s_18, &tms340x0_device::rfield_s_19, &tms340x0_device::rfield_s_20, &tms340x0_device::rfield_s_21, &tms340x0_device::rfield_s_22, &tms340x0_device::rfield_s_23,
679   &tms340x0_device::rfield_s_24, &tms340x0_device::rfield_s_25, &tms340x0_device::rfield_s_26, &tms340x0_device::rfield_s_27, &tms340x0_device::rfield_s_28, &tms340x0_device::rfield_s_29,
680   &tms340x0_device::rfield_s_30, &tms340x0_device::rfield_s_31
681};
trunk/src/devices/cpu/tms34010/34010gfx.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari,Aaron Giles
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12#ifndef RECURSIVE_INCLUDE
13
14
15#define LOG_GFX_OPS 0
16#define LOGGFX(x) do { if (LOG_GFX_OPS && machine().input().code_pressed(KEYCODE_L)) logerror x; } while (0)
17
18
19/* Graphics Instructions */
20
21void tms340x0_device::line(UINT16 op)
22{
23   if (!P_FLAG())
24   {
25      if (WINDOW_CHECKING() != 0 && WINDOW_CHECKING() != 3)
26         logerror("LINE XY  %08X - Window Checking Mode %d not supported\n", m_pc, WINDOW_CHECKING());
27
28      m_st |= STBIT_P;
29      TEMP() = (op & 0x80) ? 1 : 0;  /* boundary value depends on the algorithm */
30      LOGGFX(("%08X(%3d):LINE (%d,%d)-(%d,%d)\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DADDR_X() + DYDX_X(), DADDR_Y() + DYDX_Y()));
31   }
32
33   if (COUNT() > 0)
34   {
35      INT16 x1,y1;
36
37      COUNT()--;
38      if (WINDOW_CHECKING() != 3 ||
39         (DADDR_X() >= WSTART_X() && DADDR_X() <= WEND_X() &&
40            DADDR_Y() >= WSTART_Y() && DADDR_Y() <= WEND_Y()))
41         WPIXEL(DXYTOL(DADDR_XY()),COLOR1());
42
43      if (SADDR() >= TEMP())
44      {
45         SADDR() += DYDX_Y()*2 - DYDX_X()*2;
46         x1 = INC1_X();
47         y1 = INC1_Y();
48      }
49      else
50      {
51         SADDR() += DYDX_Y()*2;
52         x1 = INC2_X();
53         y1 = INC2_Y();
54      }
55      DADDR_X() += x1;
56      DADDR_Y() += y1;
57
58      COUNT_UNKNOWN_CYCLES(2);
59      m_pc -= 0x10;  /* not done yet, check for interrupts and restart instruction */
60      return;
61   }
62   m_st &= ~STBIT_P;
63}
64
65
66/*
67cases:
68* window modes (0,1,2,3)
69* boolean/arithmetic ops (16+6)
70* transparency (on/off)
71* plane masking
72* directions (left->right/right->left, top->bottom/bottom->top)
73*/
74
75int tms340x0_device::apply_window(const char *inst_name,int srcbpp, UINT32 *srcaddr, XY *dst, int *dx, int *dy)
76{
77   /* apply the window */
78   if (WINDOW_CHECKING() == 0)
79      return 0;
80   else
81   {
82      int sx = dst->x;
83      int sy = dst->y;
84      int ex = sx + *dx - 1;
85      int ey = sy + *dy - 1;
86      int diff, cycles = 3;
87
88      if (WINDOW_CHECKING() == 2)
89         logerror("%08x: %s apply_window window mode %d not supported!\n", pc(), inst_name, WINDOW_CHECKING());
90
91      CLR_V();
92      if (WINDOW_CHECKING() == 1)
93         SET_V_LOG(1);
94
95      /* clip X */
96      diff = WSTART_X() - sx;
97      if (diff > 0)
98      {
99         if (srcaddr)
100            *srcaddr += diff * srcbpp;
101         sx += diff;
102         SET_V_LOG(1);
103      }
104      diff = ex - WEND_X();
105      if (diff > 0)
106      {
107         ex -= diff;
108         SET_V_LOG(1);
109      }
110
111
112      /* clip Y */
113      diff = WSTART_Y() - sy;
114      if (diff > 0)
115      {
116         if (srcaddr)
117            *srcaddr += diff * m_convsp;
118
119         sy += diff;
120         SET_V_LOG(1);
121      }
122      diff = ey - WEND_Y();
123      if (diff > 0)
124      {
125         ey -= diff;
126         SET_V_LOG(1);
127      }
128
129      /* compute cycles */
130      if (*dx != ex - sx + 1 || *dy != ey - sy + 1)
131      {
132         if (dst->x != sx || dst->y != sy)
133            cycles += 11;
134         else
135            cycles += 3;
136      }
137      else if (dst->x != sx || dst->y != sy)
138         cycles += 7;
139
140      /* update the values */
141      dst->x = sx;
142      dst->y = sy;
143      *dx = ex - sx + 1;
144      *dy = ey - sy + 1;
145      return cycles;
146   }
147}
148
149
150/*******************************************************************
151
152    About the timing of gfx operations:
153
154    The 34010 manual lists a fairly intricate and accurate way of
155    computing cycle timings for graphics ops. However, there are
156    enough typos and misleading statements to make the reliability
157    of the timing info questionable.
158
159    So, to address this, here is a simplified approximate version
160    of the timing.
161
162        timing = setup + (srcwords * 2 + dstwords * gfxop) * rows
163
164    Each read access takes 2 cycles. Each gfx operation has
165    its own timing as specified in the 34010 manual. So, it's 2
166    cycles per read plus gfxop cycles per operation. Pretty
167    simple, no?
168
169*******************************************************************/
170
171int tms340x0_device::compute_fill_cycles(int left_partials, int right_partials, int full_words, int op_timing)
172{
173   int dstwords;
174
175   if (left_partials) full_words += 1;
176   if (right_partials) full_words += 1;
177   dstwords = full_words;
178
179   return (dstwords * op_timing);
180}
181
182int tms340x0_device::compute_pixblt_cycles(int left_partials, int right_partials, int full_words, int op_timing)
183{
184   int srcwords, dstwords;
185
186   if (left_partials) full_words += 1;
187   if (right_partials) full_words += 1;
188   srcwords = full_words;
189   dstwords = full_words;
190
191   return (dstwords * op_timing + srcwords * 2) + 2;
192}
193
194int tms340x0_device::compute_pixblt_b_cycles(int left_partials, int right_partials, int full_words, int rows, int op_timing, int bpp)
195{
196   int srcwords, dstwords;
197
198   if (left_partials) full_words += 1;
199   if (right_partials) full_words += 1;
200   srcwords = full_words * bpp / 16;
201   dstwords = full_words;
202
203   return (dstwords * op_timing + srcwords * 2) * rows + 2;
204}
205
206
207/* Shift register handling */
208void tms340x0_device::memory_w(address_space &space, offs_t offset,UINT16 data)
209{
210   space.write_word(offset, data);
211}
212
213UINT16 tms340x0_device::memory_r(address_space &space, offs_t offset)
214{
215   return space.read_word(offset);
216}
217
218void tms340x0_device::shiftreg_w(address_space &space, offs_t offset,UINT16 data)
219{
220   if (!m_from_shiftreg_cb.isnull())
221      m_from_shiftreg_cb(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
222   else
223      logerror("From ShiftReg function not set. PC = %08X\n", m_pc);
224}
225
226UINT16 tms340x0_device::shiftreg_r(address_space &space, offs_t offset)
227{
228   if (!m_to_shiftreg_cb.isnull())
229      m_to_shiftreg_cb(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
230   else
231      logerror("To ShiftReg function not set. PC = %08X\n", m_pc);
232   return m_shiftreg[0];
233}
234
235UINT16 tms340x0_device::dummy_shiftreg_r(address_space &space, offs_t offset)
236{
237   return m_shiftreg[0];
238}
239
240
241
242/* Pixel operations */
243UINT32 tms340x0_device::pixel_op00(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix; }
244UINT32 tms340x0_device::pixel_op01(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & dstpix; }
245UINT32 tms340x0_device::pixel_op02(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & ~dstpix; }
246UINT32 tms340x0_device::pixel_op03(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return 0; }
247UINT32 tms340x0_device::pixel_op04(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | ~dstpix) & mask; }
248UINT32 tms340x0_device::pixel_op05(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix ^ dstpix) & mask; }
249UINT32 tms340x0_device::pixel_op06(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~dstpix & mask; }
250UINT32 tms340x0_device::pixel_op07(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix | dstpix) & mask; }
251UINT32 tms340x0_device::pixel_op08(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | dstpix) & mask; }
252UINT32 tms340x0_device::pixel_op09(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return dstpix & mask; }
253UINT32 tms340x0_device::pixel_op10(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix ^ dstpix) & mask; }
254UINT32 tms340x0_device::pixel_op11(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
255UINT32 tms340x0_device::pixel_op12(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return mask; }
256UINT32 tms340x0_device::pixel_op13(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
257UINT32 tms340x0_device::pixel_op14(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix & dstpix) & mask; }
258UINT32 tms340x0_device::pixel_op15(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix ^ mask; }
259UINT32 tms340x0_device::pixel_op16(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix + dstpix) & mask; }
260UINT32 tms340x0_device::pixel_op17(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix + (dstpix & mask); return (tmp > mask) ? mask : tmp; }
261UINT32 tms340x0_device::pixel_op18(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (dstpix - srcpix) & mask; }
262UINT32 tms340x0_device::pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix - (dstpix & mask); return (tmp < 0) ? 0 : tmp; }
263UINT32 tms340x0_device::pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; }
264UINT32 tms340x0_device::pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; }
265
266const tms340x0_device::pixel_op_func tms340x0_device::s_pixel_op_table[32] =
267{
268   &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op01, &tms340x0_device::pixel_op02, &tms340x0_device::pixel_op03, &tms340x0_device::pixel_op04, &tms340x0_device::pixel_op05, &tms340x0_device::pixel_op06, &tms340x0_device::pixel_op07,
269   &tms340x0_device::pixel_op08, &tms340x0_device::pixel_op09, &tms340x0_device::pixel_op10, &tms340x0_device::pixel_op11, &tms340x0_device::pixel_op12, &tms340x0_device::pixel_op13, &tms340x0_device::pixel_op14, &tms340x0_device::pixel_op15,
270   &tms340x0_device::pixel_op16, &tms340x0_device::pixel_op17, &tms340x0_device::pixel_op18, &tms340x0_device::pixel_op19, &tms340x0_device::pixel_op20, &tms340x0_device::pixel_op21, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00,
271   &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00
272};
273const UINT8 tms340x0_device::s_pixel_op_timing_table[33] =
274{
275   2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,6,5,5,2,2,2,2,2,2,2,2,2,2,2
276};
277
278
279/* tables */
280const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_op_table[] =
281{
282   &tms340x0_device::pixblt_1_op0,   &tms340x0_device::pixblt_1_op0_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
283   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
284   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
285   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
286   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
287   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
288   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
289   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
290   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
291   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
292   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
293   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
294   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
295   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
296   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
297   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
298
299   &tms340x0_device::pixblt_2_op0,   &tms340x0_device::pixblt_2_op0_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
300   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
301   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
302   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
303   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
304   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
305   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
306   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
307   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
308   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
309   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
310   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
311   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
312   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
313   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
314   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
315
316   &tms340x0_device::pixblt_4_op0,   &tms340x0_device::pixblt_4_op0_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
317   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
318   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
319   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
320   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
321   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
322   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
323   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
324   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
325   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
326   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
327   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
328   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
329   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
330   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
331   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
332
333   &tms340x0_device::pixblt_8_op0,   &tms340x0_device::pixblt_8_op0_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
334   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
335   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
336   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
337   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
338   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
339   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
340   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
341   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
342   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
343   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
344   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
345   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
346   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
347   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
348   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
349
350   &tms340x0_device::pixblt_16_op0,  &tms340x0_device::pixblt_16_op0_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
351   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
352   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
353   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
354   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
355   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
356   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
357   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
358   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
359   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
360   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
361   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
362   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
363   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
364   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
365   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans
366};
367
368const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_r_op_table[] =
369{
370   &tms340x0_device::pixblt_r_1_op0, &tms340x0_device::pixblt_r_1_op0_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
371   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
372   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
373   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
374   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
375   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
376   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
377   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
378   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
379   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
380   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
381   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
382   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
383   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
384   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
385   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
386
387   &tms340x0_device::pixblt_r_2_op0, &tms340x0_device::pixblt_r_2_op0_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
388   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
389   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
390   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
391   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
392   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
393   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
394   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
395   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
396   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
397   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
398   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
399   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
400   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
401   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
402   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
403
404   &tms340x0_device::pixblt_r_4_op0, &tms340x0_device::pixblt_r_4_op0_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
405   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
406   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
407   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
408   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
409   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
410   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
411   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
412   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
413   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
414   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
415   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
416   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
417   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
418   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
419   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
420
421   &tms340x0_device::pixblt_r_8_op0, &tms340x0_device::pixblt_r_8_op0_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
422   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
423   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
424   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
425   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
426   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
427   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
428   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
429   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
430   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
431   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
432   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
433   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
434   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
435   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
436   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
437
438   &tms340x0_device::pixblt_r_16_op0,&tms340x0_device::pixblt_r_16_op0_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
439   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
440   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
441   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
442   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
443   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
444   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
445   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
446   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
447   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
448   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
449   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
450   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
451   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
452   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
453   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans
454};
455
456const tms340x0_device::pixblt_b_op_func tms340x0_device::s_pixblt_b_op_table[] =
457{
458   &tms340x0_device::pixblt_b_1_op0, &tms340x0_device::pixblt_b_1_op0_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
459   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
460   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
461   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
462   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
463   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
464   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
465   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
466   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
467   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
468   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
469   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
470   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
471   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
472   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
473   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
474
475   &tms340x0_device::pixblt_b_2_op0, &tms340x0_device::pixblt_b_2_op0_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
476   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
477   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
478   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
479   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
480   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
481   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
482   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
483   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
484   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
485   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
486   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
487   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
488   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
489   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
490   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
491
492   &tms340x0_device::pixblt_b_4_op0, &tms340x0_device::pixblt_b_4_op0_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
493   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
494   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
495   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
496   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
497   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
498   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
499   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
500   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
501   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
502   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
503   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
504   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
505   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
506   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
507   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
508
509   &tms340x0_device::pixblt_b_8_op0, &tms340x0_device::pixblt_b_8_op0_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
510   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
511   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
512   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
513   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
514   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
515   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
516   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
517   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
518   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
519   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
520   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
521   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
522   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
523   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
524   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
525
526   &tms340x0_device::pixblt_b_16_op0,&tms340x0_device::pixblt_b_16_op0_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
527   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
528   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
529   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
530   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
531   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
532   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
533   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
534   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
535   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
536   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
537   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
538   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
539   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
540   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
541   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans
542};
543
544const tms340x0_device::pixblt_b_op_func tms340x0_device::s_fill_op_table[] =
545{
546   &tms340x0_device::fill_1_op0,     &tms340x0_device::fill_1_op0_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
547   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
548   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
549   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
550   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
551   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
552   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
553   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
554   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
555   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
556   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
557   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
558   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
559   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
560   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
561   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
562
563   &tms340x0_device::fill_2_op0,     &tms340x0_device::fill_2_op0_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
564   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
565   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
566   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
567   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
568   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
569   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
570   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
571   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
572   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
573   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
574   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
575   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
576   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
577   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
578   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
579
580   &tms340x0_device::fill_4_op0,     &tms340x0_device::fill_4_op0_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
581   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
582   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
583   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
584   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
585   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
586   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
587   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
588   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
589   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
590   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
591   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
592   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
593   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
594   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
595   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
596
597   &tms340x0_device::fill_8_op0,     &tms340x0_device::fill_8_op0_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
598   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
599   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
600   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
601   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
602   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
603   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
604   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
605   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
606   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
607   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
608   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
609   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
610   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
611   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
612   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
613
614   &tms340x0_device::fill_16_op0,    &tms340x0_device::fill_16_op0_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
615   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
616   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
617   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
618   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
619   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
620   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
621   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
622   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
623   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
624   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
625   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
626   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
627   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
628   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
629   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans
630};
631
632
633#define RECURSIVE_INCLUDE
634
635/* non-transparent replace ops */
636#define PIXEL_OP(src, mask, pixel)      pixel = pixel
637#define PIXEL_OP_TIMING                 2
638#define PIXEL_OP_REQUIRES_SOURCE        0
639#define TRANSPARENCY                    0
640
641   /* 1bpp cases */
642   #define BITS_PER_PIXEL                  1
643   #define FUNCTION_NAME(base)             base##_1_op0
644   #include "34010gfx.cpp"
645   #undef FUNCTION_NAME
646   #undef BITS_PER_PIXEL
647
648   /* 2bpp cases */
649   #define BITS_PER_PIXEL                  2
650   #define FUNCTION_NAME(base)             base##_2_op0
651   #include "34010gfx.cpp"
652   #undef FUNCTION_NAME
653   #undef BITS_PER_PIXEL
654
655   /* 4bpp cases */
656   #define BITS_PER_PIXEL                  4
657   #define FUNCTION_NAME(base)             base##_4_op0
658   #include "34010gfx.cpp"
659   #undef FUNCTION_NAME
660   #undef BITS_PER_PIXEL
661
662   /* 8bpp cases */
663   #define BITS_PER_PIXEL                  8
664   #define FUNCTION_NAME(base)             base##_8_op0
665   #include "34010gfx.cpp"
666   #undef FUNCTION_NAME
667   #undef BITS_PER_PIXEL
668
669   /* 16bpp cases */
670   #define BITS_PER_PIXEL                  16
671   #define FUNCTION_NAME(base)             base##_16_op0
672   #include "34010gfx.cpp"
673   #undef FUNCTION_NAME
674   #undef BITS_PER_PIXEL
675
676#undef TRANSPARENCY
677#undef PIXEL_OP_REQUIRES_SOURCE
678#undef PIXEL_OP_TIMING
679#undef PIXEL_OP
680
681
682#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
683#define PIXEL_OP_TIMING                 m_pixel_op_timing
684#define PIXEL_OP_REQUIRES_SOURCE        1
685#define TRANSPARENCY                    0
686
687   /* 1bpp cases */
688   #define BITS_PER_PIXEL                  1
689   #define FUNCTION_NAME(base)             base##_1_opx
690   #include "34010gfx.cpp"
691   #undef FUNCTION_NAME
692   #undef BITS_PER_PIXEL
693
694   /* 2bpp cases */
695   #define BITS_PER_PIXEL                  2
696   #define FUNCTION_NAME(base)             base##_2_opx
697   #include "34010gfx.cpp"
698   #undef FUNCTION_NAME
699   #undef BITS_PER_PIXEL
700
701   /* 4bpp cases */
702   #define BITS_PER_PIXEL                  4
703   #define FUNCTION_NAME(base)             base##_4_opx
704   #include "34010gfx.cpp"
705   #undef FUNCTION_NAME
706   #undef BITS_PER_PIXEL
707
708   /* 8bpp cases */
709   #define BITS_PER_PIXEL                  8
710   #define FUNCTION_NAME(base)             base##_8_opx
711   #include "34010gfx.cpp"
712   #undef FUNCTION_NAME
713   #undef BITS_PER_PIXEL
714
715   /* 16bpp cases */
716   #define BITS_PER_PIXEL                  16
717   #define FUNCTION_NAME(base)             base##_16_opx
718   #include "34010gfx.cpp"
719   #undef FUNCTION_NAME
720   #undef BITS_PER_PIXEL
721
722#undef TRANSPARENCY
723#undef PIXEL_OP_REQUIRES_SOURCE
724#undef PIXEL_OP_TIMING
725#undef PIXEL_OP
726
727
728/* transparent replace ops */
729#define PIXEL_OP(src, mask, pixel)      pixel = pixel
730#define PIXEL_OP_REQUIRES_SOURCE        0
731#define PIXEL_OP_TIMING                 4
732#define TRANSPARENCY                    1
733
734   /* 1bpp cases */
735   #define BITS_PER_PIXEL                  1
736   #define FUNCTION_NAME(base)             base##_1_op0_trans
737   #include "34010gfx.cpp"
738   #undef FUNCTION_NAME
739   #undef BITS_PER_PIXEL
740
741   /* 2bpp cases */
742   #define BITS_PER_PIXEL                  2
743   #define FUNCTION_NAME(base)             base##_2_op0_trans
744   #include "34010gfx.cpp"
745   #undef FUNCTION_NAME
746   #undef BITS_PER_PIXEL
747
748   /* 4bpp cases */
749   #define BITS_PER_PIXEL                  4
750   #define FUNCTION_NAME(base)             base##_4_op0_trans
751   #include "34010gfx.cpp"
752   #undef FUNCTION_NAME
753   #undef BITS_PER_PIXEL
754
755   /* 8bpp cases */
756   #define BITS_PER_PIXEL                  8
757   #define FUNCTION_NAME(base)             base##_8_op0_trans
758   #include "34010gfx.cpp"
759   #undef FUNCTION_NAME
760   #undef BITS_PER_PIXEL
761
762   /* 16bpp cases */
763   #define BITS_PER_PIXEL                  16
764   #define FUNCTION_NAME(base)             base##_16_op0_trans
765   #include "34010gfx.cpp"
766   #undef FUNCTION_NAME
767   #undef BITS_PER_PIXEL
768
769#undef TRANSPARENCY
770#undef PIXEL_OP_REQUIRES_SOURCE
771#undef PIXEL_OP_TIMING
772#undef PIXEL_OP
773
774
775#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
776#define PIXEL_OP_REQUIRES_SOURCE        1
777#define PIXEL_OP_TIMING                 (2+m_pixel_op_timing)
778#define TRANSPARENCY                    1
779
780   /* 1bpp cases */
781   #define BITS_PER_PIXEL                  1
782   #define FUNCTION_NAME(base)             base##_1_opx_trans
783   #include "34010gfx.cpp"
784   #undef FUNCTION_NAME
785   #undef BITS_PER_PIXEL
786
787   /* 2bpp cases */
788   #define BITS_PER_PIXEL                  2
789   #define FUNCTION_NAME(base)             base##_2_opx_trans
790   #include "34010gfx.cpp"
791   #undef FUNCTION_NAME
792   #undef BITS_PER_PIXEL
793
794   /* 4bpp cases */
795   #define BITS_PER_PIXEL                  4
796   #define FUNCTION_NAME(base)             base##_4_opx_trans
797   #include "34010gfx.cpp"
798   #undef FUNCTION_NAME
799   #undef BITS_PER_PIXEL
800
801   /* 8bpp cases */
802   #define BITS_PER_PIXEL                  8
803   #define FUNCTION_NAME(base)             base##_8_opx_trans
804   #include "34010gfx.cpp"
805   #undef FUNCTION_NAME
806   #undef BITS_PER_PIXEL
807
808   /* 16bpp cases */
809   #define BITS_PER_PIXEL                  16
810   #define FUNCTION_NAME(base)             base##_16_opx_trans
811   #include "34010gfx.cpp"
812   #undef FUNCTION_NAME
813   #undef BITS_PER_PIXEL
814
815#undef TRANSPARENCY
816#undef PIXEL_OP_REQUIRES_SOURCE
817#undef PIXEL_OP_TIMING
818#undef PIXEL_OP
819
820static const UINT8 pixelsize_lookup[32] =
821{
822   0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
823};
824
825
826void tms340x0_device::pixblt_b_l(UINT16 op)
827{
828   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
829   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
830   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
831   int ix = trans | (rop << 1) | (psize << 6);
832   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT B,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
833   m_pixel_op = s_pixel_op_table[rop];
834   m_pixel_op_timing = s_pixel_op_timing_table[rop];
835   (this->*s_pixblt_b_op_table[ix])(1);
836}
837
838void tms340x0_device::pixblt_b_xy(UINT16 op)
839{
840   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
841   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
842   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
843   int ix = trans | (rop << 1) | (psize << 6);
844   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT B,XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
845   m_pixel_op = s_pixel_op_table[rop];
846   m_pixel_op_timing = s_pixel_op_timing_table[rop];
847   (this->*s_pixblt_b_op_table[ix])(0);
848}
849
850void tms340x0_device::pixblt_l_l(UINT16 op)
851{
852   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
853   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
854   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
855   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
856   int ix = trans | (rop << 1) | (psize << 6);
857   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT L,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
858   m_pixel_op = s_pixel_op_table[rop];
859   m_pixel_op_timing = s_pixel_op_timing_table[rop];
860   if (!pbh)
861      (this->*s_pixblt_op_table[ix])(1, 1);
862   else
863      (this->*s_pixblt_r_op_table[ix])(1, 1);
864}
865
866void tms340x0_device::pixblt_l_xy(UINT16 op)
867{
868   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
869   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
870   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
871   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
872   int ix = trans | (rop << 1) | (psize << 6);
873   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT L,XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
874   m_pixel_op = s_pixel_op_table[rop];
875   m_pixel_op_timing = s_pixel_op_timing_table[rop];
876   if (!pbh)
877      (this->*s_pixblt_op_table[ix])(1, 0);
878   else
879      (this->*s_pixblt_r_op_table[ix])(1, 0);
880}
881
882void tms340x0_device::pixblt_xy_l(UINT16 op)
883{
884   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
885   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
886   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
887   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
888   int ix = trans | (rop << 1) | (psize << 6);
889   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT XY,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
890   m_pixel_op = s_pixel_op_table[rop];
891   m_pixel_op_timing = s_pixel_op_timing_table[rop];
892   if (!pbh)
893      (this->*s_pixblt_op_table[ix])(0, 1);
894   else
895      (this->*s_pixblt_r_op_table[ix])(0, 1);
896}
897
898void tms340x0_device::pixblt_xy_xy(UINT16 op)
899{
900   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
901   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
902   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
903   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
904   int ix = trans | (rop << 1) | (psize << 6);
905   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT XY,XY (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
906   m_pixel_op = s_pixel_op_table[rop];
907   m_pixel_op_timing = s_pixel_op_timing_table[rop];
908   if (!pbh)
909      (this->*s_pixblt_op_table[ix])(0, 0);
910   else
911      (this->*s_pixblt_r_op_table[ix])(0, 0);
912}
913
914void tms340x0_device::fill_l(UINT16 op)
915{
916   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
917   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
918   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
919   int ix = trans | (rop << 1) | (psize << 6);
920   if (!P_FLAG()) LOGGFX(("%08X(%3d):FILL L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
921   m_pixel_op = s_pixel_op_table[rop];
922   m_pixel_op_timing = s_pixel_op_timing_table[rop];
923   (this->*s_fill_op_table[ix])(1);
924}
925
926void tms340x0_device::fill_xy(UINT16 op)
927{
928   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
929   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
930   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
931   int ix = trans | (rop << 1) | (psize << 6);
932   if (!P_FLAG()) LOGGFX(("%08X(%3d):FILL XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
933   m_pixel_op = s_pixel_op_table[rop];
934   m_pixel_op_timing = s_pixel_op_timing_table[rop];
935   (this->*s_fill_op_table[ix])(0);
936}
937
938
939#else
940
941
942#undef PIXELS_PER_WORD
943#undef PIXEL_MASK
944
945#define PIXELS_PER_WORD (16 / BITS_PER_PIXEL)
946#define PIXEL_MASK ((1 << BITS_PER_PIXEL) - 1)
947
948void FUNCTION_NAME(tms340x0_device::pixblt)(int src_is_linear, int dst_is_linear)
949{
950   /* if this is the first time through, perform the operation */
951   if (!P_FLAG())
952   {
953      int dx, dy, x, y, /*words,*/ yreverse;
954      word_write_func word_write;
955      word_read_func word_read;
956      UINT32 readwrites = 0;
957      UINT32 saddr, daddr;
958      XY dstxy = { 0 };
959
960      /* determine read/write functions */
961      if (IOREG(REG_DPYCTL) & 0x0800)
962      {
963         word_write = &tms340x0_device::shiftreg_w;
964         word_read = &tms340x0_device::shiftreg_r;
965      }
966      else
967      {
968         word_write = &tms340x0_device::memory_w;
969         word_read = &tms340x0_device::memory_r;
970      }
971
972      /* compute the starting addresses */
973      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
974
975      /* compute the bounds of the operation */
976      dx = (INT16)DYDX_X();
977      dy = (INT16)DYDX_Y();
978
979      /* apply the window for non-linear destinations */
980      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
981      if (!dst_is_linear)
982      {
983         dstxy = DADDR_XY();
984         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
985         daddr = DXYTOL(dstxy);
986      }
987      else
988         daddr = DADDR();
989      daddr &= ~(BITS_PER_PIXEL - 1);
990      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
991
992      /* bail if we're clipped */
993      if (dx <= 0 || dy <= 0)
994         return;
995
996      /* window mode 1: just return and interrupt if we are within the window */
997      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
998      {
999         CLR_V();
1000         DADDR_XY() = dstxy;
1001         DYDX_X() = dx;
1002         DYDX_Y() = dy;
1003         IOREG(REG_INTPEND) |= TMS34010_WV;
1004         check_interrupt();
1005         return;
1006      }
1007
1008      /* handle flipping the addresses */
1009      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
1010      if (!src_is_linear || !dst_is_linear)
1011      {
1012         if (yreverse)
1013         {
1014            saddr += (dy - 1) * m_convsp;
1015            daddr += (dy - 1) * m_convdp;
1016         }
1017      }
1018
1019      m_st |= STBIT_P;
1020
1021      /* loop over rows */
1022      for (y = 0; y < dy; y++)
1023      {
1024         UINT32 srcwordaddr = saddr >> 4;
1025         UINT32 dstwordaddr = daddr >> 4;
1026         UINT8 srcbit = saddr & 15;
1027         UINT8 dstbit = daddr & 15;
1028         UINT32 srcword, dstword = 0;
1029
1030         /* fetch the initial source word */
1031         srcword = (this->*word_read)(*m_program, srcwordaddr++ << 1);
1032         readwrites++;
1033
1034         /* fetch the initial dest word */
1035         if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY || (daddr & 0x0f) != 0)
1036         {
1037            dstword = (this->*word_read)(*m_program, dstwordaddr << 1);
1038            readwrites++;
1039         }
1040
1041         /* loop over pixels */
1042         for (x = 0; x < dx; x++)
1043         {
1044            UINT32 dstmask;
1045            UINT32 pixel;
1046
1047            /* fetch more words if necessary */
1048            if (srcbit + BITS_PER_PIXEL > 16)
1049            {
1050               srcword |= (this->*word_read)(*m_program, srcwordaddr++ << 1) << 16;
1051               readwrites++;
1052            }
1053
1054            /* extract pixel from source */
1055            pixel = (srcword >> srcbit) & PIXEL_MASK;
1056            srcbit += BITS_PER_PIXEL;
1057            if (srcbit > 16)
1058            {
1059               srcbit -= 16;
1060               srcword >>= 16;
1061            }
1062
1063            /* fetch additional destination word if necessary */
1064            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1065               if (dstbit + BITS_PER_PIXEL > 16)
1066               {
1067                  dstword |= (this->*word_read)(*m_program, (dstwordaddr + 1) << 1) << 16;
1068                  readwrites++;
1069               }
1070
1071            /* apply pixel operations */
1072            pixel <<= dstbit;
1073            dstmask = PIXEL_MASK << dstbit;
1074            PIXEL_OP(dstword, dstmask, pixel);
1075            if (!TRANSPARENCY || pixel != 0)
1076               dstword = (dstword & ~dstmask) | pixel;
1077
1078            /* flush destination words */
1079            dstbit += BITS_PER_PIXEL;
1080            if (dstbit > 16)
1081            {
1082               (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
1083               readwrites++;
1084               dstbit -= 16;
1085               dstword >>= 16;
1086            }
1087         }
1088
1089         /* flush any remaining words */
1090         if (dstbit > 0)
1091         {
1092            /* if we're right-partial, read and mask the remaining bits */
1093            if (dstbit != 16)
1094            {
1095               UINT16 origdst = (this->*word_read)(*m_program, dstwordaddr << 1);
1096               UINT16 mask = 0xffff << dstbit;
1097               dstword = (dstword & ~mask) | (origdst & mask);
1098               readwrites++;
1099            }
1100
1101            (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
1102            readwrites++;
1103         }
1104
1105
1106
1107#if 0
1108         int left_partials, right_partials, full_words, bitshift, bitshift_alt;
1109         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1110         UINT32 swordaddr, dwordaddr;
1111
1112         /* determine the bit shift to get from source to dest */
1113         bitshift = ((daddr & 15) - (saddr & 15)) & 15;
1114         bitshift_alt = (16 - bitshift) & 15;
1115
1116         /* how many left and right partial pixels do we have? */
1117         left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1118         right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1119         full_words = dx - left_partials - right_partials;
1120         if (full_words < 0)
1121            left_partials = dx, right_partials = full_words = 0;
1122         else
1123            full_words /= PIXELS_PER_WORD;
1124
1125         /* compute cycles */
1126         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1127
1128         /* use word addresses each row */
1129         swordaddr = saddr >> 4;
1130         dwordaddr = daddr >> 4;
1131
1132         /* fetch the initial source word */
1133         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1134         srcmask = PIXEL_MASK << (saddr & 15);
1135
1136         /* handle the left partial word */
1137         if (left_partials != 0)
1138         {
1139            /* fetch the destination word */
1140            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1141            dstmask = PIXEL_MASK << (daddr & 15);
1142
1143            /* loop over partials */
1144            for (x = 0; x < left_partials; x++)
1145            {
1146               /* fetch another word if necessary */
1147               if (srcmask == 0)
1148               {
1149                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1150                  srcmask = PIXEL_MASK;
1151               }
1152
1153               /* process the pixel */
1154               pixel = srcword & srcmask;
1155               if (dstmask > srcmask)
1156                  pixel <<= bitshift;
1157               else
1158                  pixel >>= bitshift_alt;
1159               PIXEL_OP(dstword, dstmask, pixel);
1160               if (!TRANSPARENCY || pixel != 0)
1161                  dstword = (dstword & ~dstmask) | pixel;
1162
1163               /* update the source */
1164               srcmask <<= BITS_PER_PIXEL;
1165
1166               /* update the destination */
1167               dstmask <<= BITS_PER_PIXEL;
1168            }
1169
1170            /* write the result */
1171            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1172         }
1173
1174         /* loop over full words */
1175         for (words = 0; words < full_words; words++)
1176         {
1177            /* fetch the destination word (if necessary) */
1178            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1179               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1180            else
1181               dstword = 0;
1182            dstmask = PIXEL_MASK;
1183
1184            /* loop over partials */
1185            for (x = 0; x < PIXELS_PER_WORD; x++)
1186            {
1187               /* fetch another word if necessary */
1188               if (srcmask == 0)
1189               {
1190                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1191                  srcmask = PIXEL_MASK;
1192               }
1193
1194               /* process the pixel */
1195               pixel = srcword & srcmask;
1196               if (dstmask > srcmask)
1197                  pixel <<= bitshift;
1198               else
1199                  pixel >>= bitshift_alt;
1200               PIXEL_OP(dstword, dstmask, pixel);
1201               if (!TRANSPARENCY || pixel != 0)
1202                  dstword = (dstword & ~dstmask) | pixel;
1203
1204               /* update the source */
1205               srcmask <<= BITS_PER_PIXEL;
1206
1207               /* update the destination */
1208               dstmask <<= BITS_PER_PIXEL;
1209            }
1210
1211            /* write the result */
1212            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1213         }
1214
1215         /* handle the right partial word */
1216         if (right_partials != 0)
1217         {
1218            /* fetch the destination word */
1219            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1220            dstmask = PIXEL_MASK;
1221
1222            /* loop over partials */
1223            for (x = 0; x < right_partials; x++)
1224            {
1225               /* fetch another word if necessary */
1226               if (srcmask == 0)
1227               {
1228      LOGGFX(("  right fetch @ %08x\n", swordaddr));
1229                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1230                  srcmask = PIXEL_MASK;
1231               }
1232
1233               /* process the pixel */
1234               pixel = srcword & srcmask;
1235               if (dstmask > srcmask)
1236                  pixel <<= bitshift;
1237               else
1238                  pixel >>= bitshift_alt;
1239               PIXEL_OP(dstword, dstmask, pixel);
1240               if (!TRANSPARENCY || pixel != 0)
1241                  dstword = (dstword & ~dstmask) | pixel;
1242
1243               /* update the source */
1244               srcmask <<= BITS_PER_PIXEL;
1245
1246               /* update the destination */
1247               dstmask <<= BITS_PER_PIXEL;
1248            }
1249
1250            /* write the result */
1251            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1252         }
1253#endif
1254
1255         /* update for next row */
1256         if (!yreverse)
1257         {
1258            saddr += SPTCH();
1259            daddr += DPTCH();
1260         }
1261         else
1262         {
1263            saddr -= SPTCH();
1264            daddr -= DPTCH();
1265         }
1266      }
1267
1268      m_gfxcycles += readwrites * 2 + dx * dy * (PIXEL_OP_TIMING - 2);
1269
1270      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1271   }
1272
1273   /* eat cycles */
1274   if (m_gfxcycles > m_icount)
1275   {
1276      m_gfxcycles -= m_icount;
1277      m_icount = 0;
1278      m_pc -= 0x10;
1279   }
1280   else
1281   {
1282      m_icount -= m_gfxcycles;
1283      m_st &= ~STBIT_P;
1284      if (src_is_linear && dst_is_linear)
1285         SADDR() += DYDX_Y() * SPTCH();
1286      else if (src_is_linear)
1287         SADDR() += DYDX_Y() * SPTCH();
1288      else
1289         SADDR_Y() += DYDX_Y();
1290      if (dst_is_linear)
1291         DADDR() += DYDX_Y() * DPTCH();
1292      else
1293         DADDR_Y() += DYDX_Y();
1294   }
1295}
1296
1297void FUNCTION_NAME(tms340x0_device::pixblt_r)(int src_is_linear, int dst_is_linear)
1298{
1299   /* if this is the first time through, perform the operation */
1300   if (!P_FLAG())
1301   {
1302      int dx, dy, x, y, words, yreverse;
1303      word_write_func word_write;
1304      word_read_func word_read;
1305      UINT32 saddr, daddr;
1306      XY dstxy = { 0 };
1307
1308      /* determine read/write functions */
1309      if (IOREG(REG_DPYCTL) & 0x0800)
1310      {
1311         word_write = &tms340x0_device::shiftreg_w;
1312         word_read = &tms340x0_device::shiftreg_r;
1313      }
1314      else
1315      {
1316         word_write = &tms340x0_device::memory_w;
1317         word_read = &tms340x0_device::memory_r;
1318      }
1319
1320      /* compute the starting addresses */
1321      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
1322if ((saddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd saddr\n", BITS_PER_PIXEL);
1323      saddr &= ~(BITS_PER_PIXEL - 1);
1324
1325      /* compute the bounds of the operation */
1326      dx = (INT16)DYDX_X();
1327      dy = (INT16)DYDX_Y();
1328
1329      /* apply the window for non-linear destinations */
1330      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
1331      if (!dst_is_linear)
1332      {
1333         dstxy = DADDR_XY();
1334         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT R", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
1335         daddr = DXYTOL(dstxy);
1336      }
1337      else
1338         daddr = DADDR();
1339if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd daddr\n", BITS_PER_PIXEL);
1340      daddr &= ~(BITS_PER_PIXEL - 1);
1341      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
1342
1343      /* bail if we're clipped */
1344      if (dx <= 0 || dy <= 0)
1345         return;
1346
1347      /* window mode 1: just return and interrupt if we are within the window */
1348      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1349      {
1350         CLR_V();
1351         DADDR_XY() = dstxy;
1352         DYDX_X() = dx;
1353         DYDX_Y() = dy;
1354         IOREG(REG_INTPEND) |= TMS34010_WV;
1355         check_interrupt();
1356         return;
1357      }
1358
1359      /* handle flipping the addresses */
1360      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
1361      if (!src_is_linear || !dst_is_linear)
1362      {
1363         saddr += dx * BITS_PER_PIXEL;
1364         daddr += dx * BITS_PER_PIXEL;
1365         if (yreverse)
1366         {
1367            saddr += (dy - 1) * m_convsp;
1368            daddr += (dy - 1) * m_convdp;
1369         }
1370      }
1371
1372      m_st |= STBIT_P;
1373
1374      /* loop over rows */
1375      for (y = 0; y < dy; y++)
1376      {
1377         int left_partials, right_partials, full_words, bitshift, bitshift_alt;
1378         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1379         UINT32 swordaddr, dwordaddr;
1380
1381         /* determine the bit shift to get from source to dest */
1382         bitshift = ((daddr & 15) - (saddr & 15)) & 15;
1383         bitshift_alt = (16 - bitshift) & 15;
1384
1385         /* how many left and right partial pixels do we have? */
1386         left_partials = (PIXELS_PER_WORD - (((daddr - dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1387         right_partials = (daddr & 15) / BITS_PER_PIXEL;
1388         full_words = dx - left_partials - right_partials;
1389         if (full_words < 0)
1390            right_partials = dx, left_partials = full_words = 0;
1391         else
1392            full_words /= PIXELS_PER_WORD;
1393
1394         /* compute cycles */
1395         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1396
1397         /* use word addresses each row */
1398         swordaddr = (saddr + 15) >> 4;
1399         dwordaddr = (daddr + 15) >> 4;
1400
1401         /* fetch the initial source word */
1402         srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1403         srcmask = PIXEL_MASK << ((saddr - BITS_PER_PIXEL) & 15);
1404
1405         /* handle the right partial word */
1406         if (right_partials != 0)
1407         {
1408            /* fetch the destination word */
1409            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
1410            dstmask = PIXEL_MASK << ((daddr - BITS_PER_PIXEL) & 15);
1411
1412            /* loop over partials */
1413            for (x = 0; x < right_partials; x++)
1414            {
1415               /* fetch source pixel if necessary */
1416               if (srcmask == 0)
1417               {
1418                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1419                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1420               }
1421
1422               /* process the pixel */
1423               pixel = srcword & srcmask;
1424               if (dstmask > srcmask)
1425                  pixel <<= bitshift;
1426               else
1427                  pixel >>= bitshift_alt;
1428               PIXEL_OP(dstword, dstmask, pixel);
1429               if (!TRANSPARENCY || pixel != 0)
1430                  dstword = (dstword & ~dstmask) | pixel;
1431
1432#if (BITS_PER_PIXEL<16)
1433               /* update the source */
1434               srcmask >>= BITS_PER_PIXEL;
1435
1436               /* update the destination */
1437               dstmask >>= BITS_PER_PIXEL;
1438#else
1439               srcmask = 0;
1440               dstmask = 0;
1441#endif
1442            }
1443
1444            /* write the result */
1445            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1446         }
1447
1448         /* loop over full words */
1449         for (words = 0; words < full_words; words++)
1450         {
1451            /* fetch the destination word (if necessary) */
1452            dwordaddr--;
1453            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1454               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1455            else
1456               dstword = 0;
1457            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1458
1459            /* loop over partials */
1460            for (x = 0; x < PIXELS_PER_WORD; x++)
1461            {
1462               /* fetch source pixel if necessary */
1463               if (srcmask == 0)
1464               {
1465                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1466                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1467               }
1468
1469               /* process the pixel */
1470               pixel = srcword & srcmask;
1471               if (dstmask > srcmask)
1472                  pixel <<= bitshift;
1473               else
1474                  pixel >>= bitshift_alt;
1475               PIXEL_OP(dstword, dstmask, pixel);
1476               if (!TRANSPARENCY || pixel != 0)
1477                  dstword = (dstword & ~dstmask) | pixel;
1478
1479#if (BITS_PER_PIXEL<16)
1480               /* update the source */
1481               srcmask >>= BITS_PER_PIXEL;
1482
1483               /* update the destination */
1484               dstmask >>= BITS_PER_PIXEL;
1485#else
1486               srcmask = 0;
1487               dstmask = 0;
1488#endif
1489            }
1490
1491            /* write the result */
1492            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1493         }
1494
1495         /* handle the left partial word */
1496         if (left_partials != 0)
1497         {
1498            /* fetch the destination word */
1499            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
1500            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1501
1502            /* loop over partials */
1503            for (x = 0; x < left_partials; x++)
1504            {
1505               /* fetch the source pixel if necessary */
1506               if (srcmask == 0)
1507               {
1508                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1509                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1510               }
1511
1512               /* process the pixel */
1513               pixel = srcword & srcmask;
1514               if (dstmask > srcmask)
1515                  pixel <<= bitshift;
1516               else
1517                  pixel >>= bitshift_alt;
1518               PIXEL_OP(dstword, dstmask, pixel);
1519               if (!TRANSPARENCY || pixel != 0)
1520                  dstword = (dstword & ~dstmask) | pixel;
1521
1522#if (BITS_PER_PIXEL<16)
1523               /* update the source */
1524               srcmask >>= BITS_PER_PIXEL;
1525
1526               /* update the destination */
1527               dstmask >>= BITS_PER_PIXEL;
1528#else
1529               srcmask = 0;
1530               dstmask = 0;
1531#endif
1532            }
1533
1534            /* write the result */
1535            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1536         }
1537
1538         /* update for next row */
1539         if (!yreverse)
1540         {
1541            saddr += SPTCH();
1542            daddr += DPTCH();
1543         }
1544         else
1545         {
1546            saddr -= SPTCH();
1547            daddr -= DPTCH();
1548         }
1549      }
1550      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1551   }
1552
1553   /* eat cycles */
1554   if (m_gfxcycles > m_icount)
1555   {
1556      m_gfxcycles -= m_icount;
1557      m_icount = 0;
1558      m_pc -= 0x10;
1559   }
1560   else
1561   {
1562      m_icount -= m_gfxcycles;
1563      m_st &= ~STBIT_P;
1564      if (src_is_linear && dst_is_linear)
1565         SADDR() += DYDX_Y() * SPTCH();
1566      else if (src_is_linear)
1567         SADDR() += DYDX_Y() * SPTCH();
1568      else
1569         SADDR_Y() += DYDX_Y();
1570      if (dst_is_linear)
1571         DADDR() += DYDX_Y() * DPTCH();
1572      else
1573         DADDR_Y() += DYDX_Y();
1574   }
1575}
1576
1577void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear)
1578{
1579   /* if this is the first time through, perform the operation */
1580   if (!P_FLAG())
1581   {
1582      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1583      word_write_func word_write;
1584      word_read_func word_read;
1585      UINT32 saddr, daddr;
1586      XY dstxy = { 0 };
1587
1588      /* determine read/write functions */
1589      if (IOREG(REG_DPYCTL) & 0x0800)
1590      {
1591         word_write = &tms340x0_device::shiftreg_w;
1592         word_read = &tms340x0_device::shiftreg_r;
1593      }
1594      else
1595      {
1596         word_write = &tms340x0_device::memory_w;
1597         word_read = &tms340x0_device::memory_r;
1598      }
1599
1600      /* compute the starting addresses */
1601      saddr = SADDR();
1602
1603      /* compute the bounds of the operation */
1604      dx = (INT16)DYDX_X();
1605      dy = (INT16)DYDX_Y();
1606
1607      /* apply the window for non-linear destinations */
1608      m_gfxcycles = 4;
1609      if (!dst_is_linear)
1610      {
1611         dstxy = DADDR_XY();
1612         m_gfxcycles += 2 + apply_window("PIXBLT B", 1, &saddr, &dstxy, &dx, &dy);
1613         daddr = DXYTOL(dstxy);
1614      }
1615      else
1616         daddr = DADDR();
1617      daddr &= ~(BITS_PER_PIXEL - 1);
1618      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
1619
1620      /* bail if we're clipped */
1621      if (dx <= 0 || dy <= 0)
1622         return;
1623
1624      /* window mode 1: just return and interrupt if we are within the window */
1625      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1626      {
1627         CLR_V();
1628         DADDR_XY() = dstxy;
1629         DYDX_X() = dx;
1630         DYDX_Y() = dy;
1631         IOREG(REG_INTPEND) |= TMS34010_WV;
1632         check_interrupt();
1633         return;
1634      }
1635
1636      /* how many left and right partial pixels do we have? */
1637      left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1638      right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1639      full_words = dx - left_partials - right_partials;
1640      if (full_words < 0)
1641         left_partials = dx, right_partials = full_words = 0;
1642      else
1643         full_words /= PIXELS_PER_WORD;
1644
1645      /* compute cycles */
1646      m_gfxcycles += compute_pixblt_b_cycles(left_partials, right_partials, full_words, dy, PIXEL_OP_TIMING, BITS_PER_PIXEL);
1647      m_st |= STBIT_P;
1648
1649      /* loop over rows */
1650      for (y = 0; y < dy; y++)
1651      {
1652         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1653         UINT32 swordaddr, dwordaddr;
1654
1655         /* use byte addresses each row */
1656         swordaddr = saddr >> 4;
1657         dwordaddr = daddr >> 4;
1658
1659         /* fetch the initial source word */
1660         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1661         srcmask = 1 << (saddr & 15);
1662
1663         /* handle the left partial word */
1664         if (left_partials != 0)
1665         {
1666            /* fetch the destination word */
1667            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1668            dstmask = PIXEL_MASK << (daddr & 15);
1669
1670            /* loop over partials */
1671            for (x = 0; x < left_partials; x++)
1672            {
1673               /* process the pixel */
1674               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1675               pixel &= dstmask;
1676               PIXEL_OP(dstword, dstmask, pixel);
1677               if (!TRANSPARENCY || pixel != 0)
1678                  dstword = (dstword & ~dstmask) | pixel;
1679
1680               /* update the source */
1681               srcmask <<= 1;
1682               if (srcmask == 0)
1683               {
1684                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1685                  srcmask = 0x0001;
1686               }
1687
1688               /* update the destination */
1689               dstmask = dstmask << BITS_PER_PIXEL;
1690            }
1691
1692            /* write the result */
1693            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1694         }
1695
1696         /* loop over full words */
1697         for (words = 0; words < full_words; words++)
1698         {
1699            /* fetch the destination word (if necessary) */
1700            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1701               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1702            else
1703               dstword = 0;
1704            dstmask = PIXEL_MASK;
1705
1706            /* loop over partials */
1707            for (x = 0; x < PIXELS_PER_WORD; x++)
1708            {
1709               /* process the pixel */
1710               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1711               pixel &= dstmask;
1712               PIXEL_OP(dstword, dstmask, pixel);
1713               if (!TRANSPARENCY || pixel != 0)
1714                  dstword = (dstword & ~dstmask) | pixel;
1715
1716               /* update the source */
1717               srcmask <<= 1;
1718               if (srcmask == 0)
1719               {
1720                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1721                  srcmask = 0x0001;
1722               }
1723
1724               /* update the destination */
1725               dstmask = dstmask << BITS_PER_PIXEL;
1726            }
1727
1728            /* write the result */
1729            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1730         }
1731
1732         /* handle the right partial word */
1733         if (right_partials != 0)
1734         {
1735            /* fetch the destination word */
1736            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1737            dstmask = PIXEL_MASK;
1738
1739            /* loop over partials */
1740            for (x = 0; x < right_partials; x++)
1741            {
1742               /* process the pixel */
1743               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1744               pixel &= dstmask;
1745               PIXEL_OP(dstword, dstmask, pixel);
1746               if (!TRANSPARENCY || pixel != 0)
1747                  dstword = (dstword & ~dstmask) | pixel;
1748
1749               /* update the source */
1750               srcmask <<= 1;
1751               if (srcmask == 0)
1752               {
1753                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1754                  srcmask = 0x0001;
1755               }
1756
1757               /* update the destination */
1758               dstmask = dstmask << BITS_PER_PIXEL;
1759            }
1760
1761            /* write the result */
1762            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1763         }
1764
1765         /* update for next row */
1766         saddr += SPTCH();
1767         daddr += DPTCH();
1768      }
1769      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1770   }
1771
1772   /* eat cycles */
1773   if (m_gfxcycles > m_icount)
1774   {
1775      m_gfxcycles -= m_icount;
1776      m_icount = 0;
1777      m_pc -= 0x10;
1778   }
1779   else
1780   {
1781      m_icount -= m_gfxcycles;
1782      m_st &= ~STBIT_P;
1783      SADDR() += DYDX_Y() * SPTCH();
1784      if (dst_is_linear)
1785         DADDR() += DYDX_Y() * DPTCH();
1786      else
1787         DADDR_Y() += DYDX_Y();
1788   }
1789}
1790
1791void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear)
1792{
1793   /* if this is the first time through, perform the operation */
1794   if (!P_FLAG())
1795   {
1796      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1797      word_write_func word_write;
1798      word_read_func word_read;
1799      UINT32 daddr;
1800      XY dstxy = { 0 };
1801
1802      /* determine read/write functions */
1803      if (IOREG(REG_DPYCTL) & 0x0800)
1804      {
1805         word_write = &tms340x0_device::shiftreg_w;
1806         word_read = &tms340x0_device::dummy_shiftreg_r;
1807      }
1808      else
1809      {
1810         word_write = &tms340x0_device::memory_w;
1811         word_read = &tms340x0_device::memory_r;
1812      }
1813
1814      /* compute the bounds of the operation */
1815      dx = (INT16)DYDX_X();
1816      dy = (INT16)DYDX_Y();
1817
1818      /* apply the window for non-linear destinations */
1819      m_gfxcycles = 4;
1820      if (!dst_is_linear)
1821      {
1822         dstxy = DADDR_XY();
1823         m_gfxcycles += 2 + apply_window("FILL", 0, NULL, &dstxy, &dx, &dy);
1824         daddr = DXYTOL(dstxy);
1825      }
1826      else
1827         daddr = DADDR();
1828      daddr &= ~(BITS_PER_PIXEL - 1);
1829      LOGGFX(("  daddr=%08X\n", daddr));
1830
1831      /* bail if we're clipped */
1832      if (dx <= 0 || dy <= 0)
1833         return;
1834
1835      /* window mode 1: just return and interrupt if we are within the window */
1836      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1837      {
1838         CLR_V();
1839         DADDR_XY() = dstxy;
1840         DYDX_X() = dx;
1841         DYDX_Y() = dy;
1842         IOREG(REG_INTPEND) |= TMS34010_WV;
1843         check_interrupt();
1844         return;
1845      }
1846
1847      /* how many left and right partial pixels do we have? */
1848      left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1849      right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1850      full_words = dx - left_partials - right_partials;
1851      if (full_words < 0)
1852         left_partials = dx, right_partials = full_words = 0;
1853      else
1854         full_words /= PIXELS_PER_WORD;
1855
1856      /* compute cycles */
1857      m_gfxcycles += 2;
1858      m_st |= STBIT_P;
1859
1860      /* loop over rows */
1861      for (y = 0; y < dy; y++)
1862      {
1863         UINT16 dstword, dstmask, pixel;
1864         UINT32 dwordaddr;
1865
1866         /* use byte addresses each row */
1867         dwordaddr = daddr >> 4;
1868
1869         /* compute cycles */
1870         m_gfxcycles += compute_fill_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1871
1872         /* handle the left partial word */
1873         if (left_partials != 0)
1874         {
1875            /* fetch the destination word */
1876            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1877            dstmask = PIXEL_MASK << (daddr & 15);
1878
1879            /* loop over partials */
1880            for (x = 0; x < left_partials; x++)
1881            {
1882               /* process the pixel */
1883               pixel = COLOR1() & dstmask;
1884               PIXEL_OP(dstword, dstmask, pixel);
1885               if (!TRANSPARENCY || pixel != 0)
1886                  dstword = (dstword & ~dstmask) | pixel;
1887
1888               /* update the destination */
1889               dstmask = dstmask << BITS_PER_PIXEL;
1890            }
1891
1892            /* write the result */
1893            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1894         }
1895
1896         /* loop over full words */
1897         for (words = 0; words < full_words; words++)
1898         {
1899            /* fetch the destination word (if necessary) */
1900            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1901               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1902            else
1903               dstword = 0;
1904            dstmask = PIXEL_MASK;
1905
1906            /* loop over partials */
1907            for (x = 0; x < PIXELS_PER_WORD; x++)
1908            {
1909               /* process the pixel */
1910               pixel = COLOR1() & dstmask;
1911               PIXEL_OP(dstword, dstmask, pixel);
1912               if (!TRANSPARENCY || pixel != 0)
1913                  dstword = (dstword & ~dstmask) | pixel;
1914
1915               /* update the destination */
1916               dstmask = dstmask << BITS_PER_PIXEL;
1917            }
1918
1919            /* write the result */
1920            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1921         }
1922
1923         /* handle the right partial word */
1924         if (right_partials != 0)
1925         {
1926            /* fetch the destination word */
1927            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1928            dstmask = PIXEL_MASK;
1929
1930            /* loop over partials */
1931            for (x = 0; x < right_partials; x++)
1932            {
1933               /* process the pixel */
1934               pixel = COLOR1() & dstmask;
1935               PIXEL_OP(dstword, dstmask, pixel);
1936               if (!TRANSPARENCY || pixel != 0)
1937                  dstword = (dstword & ~dstmask) | pixel;
1938
1939               /* update the destination */
1940               dstmask = dstmask << BITS_PER_PIXEL;
1941            }
1942
1943            /* write the result */
1944            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1945         }
1946
1947         /* update for next row */
1948         daddr += DPTCH();
1949      }
1950
1951      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1952   }
1953
1954   /* eat cycles */
1955   if (m_gfxcycles > m_icount)
1956   {
1957      m_gfxcycles -= m_icount;
1958      m_icount = 0;
1959      m_pc -= 0x10;
1960   }
1961   else
1962   {
1963      m_icount -= m_gfxcycles;
1964      m_st &= ~STBIT_P;
1965      if (dst_is_linear)
1966         DADDR() += DYDX_Y() * DPTCH();
1967      else
1968         DADDR_Y() += DYDX_Y();
1969   }
1970}
1971
1972#endif
trunk/src/devices/cpu/tms34010/34010gfx.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari,Aaron Giles
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12#ifndef RECURSIVE_INCLUDE
13
14
15#define LOG_GFX_OPS 0
16#define LOGGFX(x) do { if (LOG_GFX_OPS && machine().input().code_pressed(KEYCODE_L)) logerror x; } while (0)
17
18
19/* Graphics Instructions */
20
21void tms340x0_device::line(UINT16 op)
22{
23   if (!P_FLAG())
24   {
25      if (WINDOW_CHECKING() != 0 && WINDOW_CHECKING() != 3)
26         logerror("LINE XY  %08X - Window Checking Mode %d not supported\n", m_pc, WINDOW_CHECKING());
27
28      m_st |= STBIT_P;
29      TEMP() = (op & 0x80) ? 1 : 0;  /* boundary value depends on the algorithm */
30      LOGGFX(("%08X(%3d):LINE (%d,%d)-(%d,%d)\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DADDR_X() + DYDX_X(), DADDR_Y() + DYDX_Y()));
31   }
32
33   if (COUNT() > 0)
34   {
35      INT16 x1,y1;
36
37      COUNT()--;
38      if (WINDOW_CHECKING() != 3 ||
39         (DADDR_X() >= WSTART_X() && DADDR_X() <= WEND_X() &&
40            DADDR_Y() >= WSTART_Y() && DADDR_Y() <= WEND_Y()))
41         WPIXEL(DXYTOL(DADDR_XY()),COLOR1());
42
43      if (SADDR() >= TEMP())
44      {
45         SADDR() += DYDX_Y()*2 - DYDX_X()*2;
46         x1 = INC1_X();
47         y1 = INC1_Y();
48      }
49      else
50      {
51         SADDR() += DYDX_Y()*2;
52         x1 = INC2_X();
53         y1 = INC2_Y();
54      }
55      DADDR_X() += x1;
56      DADDR_Y() += y1;
57
58      COUNT_UNKNOWN_CYCLES(2);
59      m_pc -= 0x10;  /* not done yet, check for interrupts and restart instruction */
60      return;
61   }
62   m_st &= ~STBIT_P;
63}
64
65
66/*
67cases:
68* window modes (0,1,2,3)
69* boolean/arithmetic ops (16+6)
70* transparency (on/off)
71* plane masking
72* directions (left->right/right->left, top->bottom/bottom->top)
73*/
74
75int tms340x0_device::apply_window(const char *inst_name,int srcbpp, UINT32 *srcaddr, XY *dst, int *dx, int *dy)
76{
77   /* apply the window */
78   if (WINDOW_CHECKING() == 0)
79      return 0;
80   else
81   {
82      int sx = dst->x;
83      int sy = dst->y;
84      int ex = sx + *dx - 1;
85      int ey = sy + *dy - 1;
86      int diff, cycles = 3;
87
88      if (WINDOW_CHECKING() == 2)
89         logerror("%08x: %s apply_window window mode %d not supported!\n", pc(), inst_name, WINDOW_CHECKING());
90
91      CLR_V();
92      if (WINDOW_CHECKING() == 1)
93         SET_V_LOG(1);
94
95      /* clip X */
96      diff = WSTART_X() - sx;
97      if (diff > 0)
98      {
99         if (srcaddr)
100            *srcaddr += diff * srcbpp;
101         sx += diff;
102         SET_V_LOG(1);
103      }
104      diff = ex - WEND_X();
105      if (diff > 0)
106      {
107         ex -= diff;
108         SET_V_LOG(1);
109      }
110
111
112      /* clip Y */
113      diff = WSTART_Y() - sy;
114      if (diff > 0)
115      {
116         if (srcaddr)
117            *srcaddr += diff * m_convsp;
118
119         sy += diff;
120         SET_V_LOG(1);
121      }
122      diff = ey - WEND_Y();
123      if (diff > 0)
124      {
125         ey -= diff;
126         SET_V_LOG(1);
127      }
128
129      /* compute cycles */
130      if (*dx != ex - sx + 1 || *dy != ey - sy + 1)
131      {
132         if (dst->x != sx || dst->y != sy)
133            cycles += 11;
134         else
135            cycles += 3;
136      }
137      else if (dst->x != sx || dst->y != sy)
138         cycles += 7;
139
140      /* update the values */
141      dst->x = sx;
142      dst->y = sy;
143      *dx = ex - sx + 1;
144      *dy = ey - sy + 1;
145      return cycles;
146   }
147}
148
149
150/*******************************************************************
151
152    About the timing of gfx operations:
153
154    The 34010 manual lists a fairly intricate and accurate way of
155    computing cycle timings for graphics ops. However, there are
156    enough typos and misleading statements to make the reliability
157    of the timing info questionable.
158
159    So, to address this, here is a simplified approximate version
160    of the timing.
161
162        timing = setup + (srcwords * 2 + dstwords * gfxop) * rows
163
164    Each read access takes 2 cycles. Each gfx operation has
165    its own timing as specified in the 34010 manual. So, it's 2
166    cycles per read plus gfxop cycles per operation. Pretty
167    simple, no?
168
169*******************************************************************/
170
171int tms340x0_device::compute_fill_cycles(int left_partials, int right_partials, int full_words, int op_timing)
172{
173   int dstwords;
174
175   if (left_partials) full_words += 1;
176   if (right_partials) full_words += 1;
177   dstwords = full_words;
178
179   return (dstwords * op_timing);
180}
181
182int tms340x0_device::compute_pixblt_cycles(int left_partials, int right_partials, int full_words, int op_timing)
183{
184   int srcwords, dstwords;
185
186   if (left_partials) full_words += 1;
187   if (right_partials) full_words += 1;
188   srcwords = full_words;
189   dstwords = full_words;
190
191   return (dstwords * op_timing + srcwords * 2) + 2;
192}
193
194int tms340x0_device::compute_pixblt_b_cycles(int left_partials, int right_partials, int full_words, int rows, int op_timing, int bpp)
195{
196   int srcwords, dstwords;
197
198   if (left_partials) full_words += 1;
199   if (right_partials) full_words += 1;
200   srcwords = full_words * bpp / 16;
201   dstwords = full_words;
202
203   return (dstwords * op_timing + srcwords * 2) * rows + 2;
204}
205
206
207/* Shift register handling */
208void tms340x0_device::memory_w(address_space &space, offs_t offset,UINT16 data)
209{
210   space.write_word(offset, data);
211}
212
213UINT16 tms340x0_device::memory_r(address_space &space, offs_t offset)
214{
215   return space.read_word(offset);
216}
217
218void tms340x0_device::shiftreg_w(address_space &space, offs_t offset,UINT16 data)
219{
220   if (!m_from_shiftreg_cb.isnull())
221      m_from_shiftreg_cb(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
222   else
223      logerror("From ShiftReg function not set. PC = %08X\n", m_pc);
224}
225
226UINT16 tms340x0_device::shiftreg_r(address_space &space, offs_t offset)
227{
228   if (!m_to_shiftreg_cb.isnull())
229      m_to_shiftreg_cb(space, (UINT32)(offset << 3) & ~15, &m_shiftreg[0]);
230   else
231      logerror("To ShiftReg function not set. PC = %08X\n", m_pc);
232   return m_shiftreg[0];
233}
234
235UINT16 tms340x0_device::dummy_shiftreg_r(address_space &space, offs_t offset)
236{
237   return m_shiftreg[0];
238}
239
240
241
242/* Pixel operations */
243UINT32 tms340x0_device::pixel_op00(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix; }
244UINT32 tms340x0_device::pixel_op01(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & dstpix; }
245UINT32 tms340x0_device::pixel_op02(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix & ~dstpix; }
246UINT32 tms340x0_device::pixel_op03(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return 0; }
247UINT32 tms340x0_device::pixel_op04(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | ~dstpix) & mask; }
248UINT32 tms340x0_device::pixel_op05(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix ^ dstpix) & mask; }
249UINT32 tms340x0_device::pixel_op06(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~dstpix & mask; }
250UINT32 tms340x0_device::pixel_op07(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix | dstpix) & mask; }
251UINT32 tms340x0_device::pixel_op08(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix | dstpix) & mask; }
252UINT32 tms340x0_device::pixel_op09(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return dstpix & mask; }
253UINT32 tms340x0_device::pixel_op10(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix ^ dstpix) & mask; }
254UINT32 tms340x0_device::pixel_op11(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
255UINT32 tms340x0_device::pixel_op12(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return mask; }
256UINT32 tms340x0_device::pixel_op13(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (~srcpix & dstpix) & mask; }
257UINT32 tms340x0_device::pixel_op14(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return ~(srcpix & dstpix) & mask; }
258UINT32 tms340x0_device::pixel_op15(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return srcpix ^ mask; }
259UINT32 tms340x0_device::pixel_op16(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (srcpix + dstpix) & mask; }
260UINT32 tms340x0_device::pixel_op17(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix + (dstpix & mask); return (tmp > mask) ? mask : tmp; }
261UINT32 tms340x0_device::pixel_op18(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { return (dstpix - srcpix) & mask; }
262UINT32 tms340x0_device::pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp = srcpix - (dstpix & mask); return (tmp < 0) ? 0 : tmp; }
263UINT32 tms340x0_device::pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; }
264UINT32 tms340x0_device::pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; }
265
266const tms340x0_device::pixel_op_func tms340x0_device::s_pixel_op_table[32] =
267{
268   &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op01, &tms340x0_device::pixel_op02, &tms340x0_device::pixel_op03, &tms340x0_device::pixel_op04, &tms340x0_device::pixel_op05, &tms340x0_device::pixel_op06, &tms340x0_device::pixel_op07,
269   &tms340x0_device::pixel_op08, &tms340x0_device::pixel_op09, &tms340x0_device::pixel_op10, &tms340x0_device::pixel_op11, &tms340x0_device::pixel_op12, &tms340x0_device::pixel_op13, &tms340x0_device::pixel_op14, &tms340x0_device::pixel_op15,
270   &tms340x0_device::pixel_op16, &tms340x0_device::pixel_op17, &tms340x0_device::pixel_op18, &tms340x0_device::pixel_op19, &tms340x0_device::pixel_op20, &tms340x0_device::pixel_op21, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00,
271   &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00, &tms340x0_device::pixel_op00
272};
273const UINT8 tms340x0_device::s_pixel_op_timing_table[33] =
274{
275   2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,6,5,5,2,2,2,2,2,2,2,2,2,2,2
276};
277
278
279/* tables */
280const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_op_table[] =
281{
282   &tms340x0_device::pixblt_1_op0,   &tms340x0_device::pixblt_1_op0_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
283   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
284   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
285   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
286   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
287   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
288   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
289   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
290   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
291   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
292   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
293   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
294   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
295   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
296   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
297   &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,     &tms340x0_device::pixblt_1_opx,   &tms340x0_device::pixblt_1_opx_trans,
298
299   &tms340x0_device::pixblt_2_op0,   &tms340x0_device::pixblt_2_op0_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
300   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
301   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
302   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
303   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
304   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
305   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
306   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
307   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
308   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
309   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
310   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
311   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
312   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
313   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
314   &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,     &tms340x0_device::pixblt_2_opx,   &tms340x0_device::pixblt_2_opx_trans,
315
316   &tms340x0_device::pixblt_4_op0,   &tms340x0_device::pixblt_4_op0_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
317   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
318   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
319   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
320   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
321   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
322   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
323   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
324   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
325   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
326   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
327   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
328   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
329   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
330   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
331   &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,     &tms340x0_device::pixblt_4_opx,   &tms340x0_device::pixblt_4_opx_trans,
332
333   &tms340x0_device::pixblt_8_op0,   &tms340x0_device::pixblt_8_op0_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
334   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
335   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
336   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
337   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
338   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
339   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
340   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
341   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
342   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
343   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
344   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
345   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
346   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
347   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
348   &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,     &tms340x0_device::pixblt_8_opx,   &tms340x0_device::pixblt_8_opx_trans,
349
350   &tms340x0_device::pixblt_16_op0,  &tms340x0_device::pixblt_16_op0_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
351   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
352   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
353   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
354   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
355   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
356   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
357   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
358   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
359   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
360   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
361   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
362   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
363   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
364   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,
365   &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans,    &tms340x0_device::pixblt_16_opx,  &tms340x0_device::pixblt_16_opx_trans
366};
367
368const tms340x0_device::pixblt_op_func tms340x0_device::s_pixblt_r_op_table[] =
369{
370   &tms340x0_device::pixblt_r_1_op0, &tms340x0_device::pixblt_r_1_op0_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
371   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
372   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
373   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
374   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
375   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
376   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
377   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
378   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
379   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
380   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
381   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
382   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
383   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
384   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
385   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,   &tms340x0_device::pixblt_r_1_opx, &tms340x0_device::pixblt_r_1_opx_trans,
386
387   &tms340x0_device::pixblt_r_2_op0, &tms340x0_device::pixblt_r_2_op0_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
388   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
389   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
390   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
391   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
392   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
393   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
394   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
395   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
396   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
397   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
398   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
399   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
400   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
401   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
402   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,   &tms340x0_device::pixblt_r_2_opx, &tms340x0_device::pixblt_r_2_opx_trans,
403
404   &tms340x0_device::pixblt_r_4_op0, &tms340x0_device::pixblt_r_4_op0_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
405   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
406   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
407   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
408   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
409   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
410   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
411   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
412   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
413   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
414   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
415   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
416   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
417   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
418   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
419   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,   &tms340x0_device::pixblt_r_4_opx, &tms340x0_device::pixblt_r_4_opx_trans,
420
421   &tms340x0_device::pixblt_r_8_op0, &tms340x0_device::pixblt_r_8_op0_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
422   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
423   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
424   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
425   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
426   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
427   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
428   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
429   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
430   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
431   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
432   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
433   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
434   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
435   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
436   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,   &tms340x0_device::pixblt_r_8_opx, &tms340x0_device::pixblt_r_8_opx_trans,
437
438   &tms340x0_device::pixblt_r_16_op0,&tms340x0_device::pixblt_r_16_op0_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
439   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
440   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
441   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
442   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
443   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
444   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
445   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
446   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
447   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
448   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
449   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
450   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
451   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
452   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,
453   &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans,  &tms340x0_device::pixblt_r_16_opx,&tms340x0_device::pixblt_r_16_opx_trans
454};
455
456const tms340x0_device::pixblt_b_op_func tms340x0_device::s_pixblt_b_op_table[] =
457{
458   &tms340x0_device::pixblt_b_1_op0, &tms340x0_device::pixblt_b_1_op0_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
459   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
460   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
461   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
462   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
463   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
464   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
465   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
466   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
467   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
468   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
469   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
470   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
471   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
472   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
473   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,   &tms340x0_device::pixblt_b_1_opx, &tms340x0_device::pixblt_b_1_opx_trans,
474
475   &tms340x0_device::pixblt_b_2_op0, &tms340x0_device::pixblt_b_2_op0_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
476   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
477   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
478   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
479   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
480   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
481   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
482   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
483   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
484   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
485   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
486   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
487   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
488   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
489   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
490   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,   &tms340x0_device::pixblt_b_2_opx, &tms340x0_device::pixblt_b_2_opx_trans,
491
492   &tms340x0_device::pixblt_b_4_op0, &tms340x0_device::pixblt_b_4_op0_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
493   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
494   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
495   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
496   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
497   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
498   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
499   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
500   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
501   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
502   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
503   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
504   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
505   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
506   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
507   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,   &tms340x0_device::pixblt_b_4_opx, &tms340x0_device::pixblt_b_4_opx_trans,
508
509   &tms340x0_device::pixblt_b_8_op0, &tms340x0_device::pixblt_b_8_op0_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
510   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
511   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
512   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
513   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
514   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
515   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
516   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
517   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
518   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
519   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
520   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
521   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
522   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
523   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
524   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,   &tms340x0_device::pixblt_b_8_opx, &tms340x0_device::pixblt_b_8_opx_trans,
525
526   &tms340x0_device::pixblt_b_16_op0,&tms340x0_device::pixblt_b_16_op0_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
527   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
528   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
529   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
530   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
531   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
532   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
533   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
534   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
535   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
536   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
537   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
538   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
539   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
540   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,
541   &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans,  &tms340x0_device::pixblt_b_16_opx,&tms340x0_device::pixblt_b_16_opx_trans
542};
543
544const tms340x0_device::pixblt_b_op_func tms340x0_device::s_fill_op_table[] =
545{
546   &tms340x0_device::fill_1_op0,     &tms340x0_device::fill_1_op0_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
547   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
548   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
549   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
550   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
551   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
552   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
553   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
554   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
555   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
556   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
557   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
558   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
559   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
560   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
561   &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,       &tms340x0_device::fill_1_opx,     &tms340x0_device::fill_1_opx_trans,
562
563   &tms340x0_device::fill_2_op0,     &tms340x0_device::fill_2_op0_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
564   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
565   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
566   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
567   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
568   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
569   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
570   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
571   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
572   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
573   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
574   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
575   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
576   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
577   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
578   &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,       &tms340x0_device::fill_2_opx,     &tms340x0_device::fill_2_opx_trans,
579
580   &tms340x0_device::fill_4_op0,     &tms340x0_device::fill_4_op0_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
581   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
582   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
583   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
584   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
585   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
586   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
587   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
588   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
589   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
590   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
591   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
592   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
593   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
594   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
595   &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,       &tms340x0_device::fill_4_opx,     &tms340x0_device::fill_4_opx_trans,
596
597   &tms340x0_device::fill_8_op0,     &tms340x0_device::fill_8_op0_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
598   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
599   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
600   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
601   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
602   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
603   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
604   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
605   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
606   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
607   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
608   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
609   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
610   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
611   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
612   &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,       &tms340x0_device::fill_8_opx,     &tms340x0_device::fill_8_opx_trans,
613
614   &tms340x0_device::fill_16_op0,    &tms340x0_device::fill_16_op0_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
615   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
616   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
617   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
618   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
619   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
620   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
621   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
622   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
623   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
624   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
625   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
626   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
627   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
628   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,
629   &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans,      &tms340x0_device::fill_16_opx,    &tms340x0_device::fill_16_opx_trans
630};
631
632
633#define RECURSIVE_INCLUDE
634
635/* non-transparent replace ops */
636#define PIXEL_OP(src, mask, pixel)      pixel = pixel
637#define PIXEL_OP_TIMING                 2
638#define PIXEL_OP_REQUIRES_SOURCE        0
639#define TRANSPARENCY                    0
640
641   /* 1bpp cases */
642   #define BITS_PER_PIXEL                  1
643   #define FUNCTION_NAME(base)             base##_1_op0
644   #include "34010gfx.inc"
645   #undef FUNCTION_NAME
646   #undef BITS_PER_PIXEL
647
648   /* 2bpp cases */
649   #define BITS_PER_PIXEL                  2
650   #define FUNCTION_NAME(base)             base##_2_op0
651   #include "34010gfx.inc"
652   #undef FUNCTION_NAME
653   #undef BITS_PER_PIXEL
654
655   /* 4bpp cases */
656   #define BITS_PER_PIXEL                  4
657   #define FUNCTION_NAME(base)             base##_4_op0
658   #include "34010gfx.inc"
659   #undef FUNCTION_NAME
660   #undef BITS_PER_PIXEL
661
662   /* 8bpp cases */
663   #define BITS_PER_PIXEL                  8
664   #define FUNCTION_NAME(base)             base##_8_op0
665   #include "34010gfx.inc"
666   #undef FUNCTION_NAME
667   #undef BITS_PER_PIXEL
668
669   /* 16bpp cases */
670   #define BITS_PER_PIXEL                  16
671   #define FUNCTION_NAME(base)             base##_16_op0
672   #include "34010gfx.inc"
673   #undef FUNCTION_NAME
674   #undef BITS_PER_PIXEL
675
676#undef TRANSPARENCY
677#undef PIXEL_OP_REQUIRES_SOURCE
678#undef PIXEL_OP_TIMING
679#undef PIXEL_OP
680
681
682#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
683#define PIXEL_OP_TIMING                 m_pixel_op_timing
684#define PIXEL_OP_REQUIRES_SOURCE        1
685#define TRANSPARENCY                    0
686
687   /* 1bpp cases */
688   #define BITS_PER_PIXEL                  1
689   #define FUNCTION_NAME(base)             base##_1_opx
690   #include "34010gfx.inc"
691   #undef FUNCTION_NAME
692   #undef BITS_PER_PIXEL
693
694   /* 2bpp cases */
695   #define BITS_PER_PIXEL                  2
696   #define FUNCTION_NAME(base)             base##_2_opx
697   #include "34010gfx.inc"
698   #undef FUNCTION_NAME
699   #undef BITS_PER_PIXEL
700
701   /* 4bpp cases */
702   #define BITS_PER_PIXEL                  4
703   #define FUNCTION_NAME(base)             base##_4_opx
704   #include "34010gfx.inc"
705   #undef FUNCTION_NAME
706   #undef BITS_PER_PIXEL
707
708   /* 8bpp cases */
709   #define BITS_PER_PIXEL                  8
710   #define FUNCTION_NAME(base)             base##_8_opx
711   #include "34010gfx.inc"
712   #undef FUNCTION_NAME
713   #undef BITS_PER_PIXEL
714
715   /* 16bpp cases */
716   #define BITS_PER_PIXEL                  16
717   #define FUNCTION_NAME(base)             base##_16_opx
718   #include "34010gfx.inc"
719   #undef FUNCTION_NAME
720   #undef BITS_PER_PIXEL
721
722#undef TRANSPARENCY
723#undef PIXEL_OP_REQUIRES_SOURCE
724#undef PIXEL_OP_TIMING
725#undef PIXEL_OP
726
727
728/* transparent replace ops */
729#define PIXEL_OP(src, mask, pixel)      pixel = pixel
730#define PIXEL_OP_REQUIRES_SOURCE        0
731#define PIXEL_OP_TIMING                 4
732#define TRANSPARENCY                    1
733
734   /* 1bpp cases */
735   #define BITS_PER_PIXEL                  1
736   #define FUNCTION_NAME(base)             base##_1_op0_trans
737   #include "34010gfx.inc"
738   #undef FUNCTION_NAME
739   #undef BITS_PER_PIXEL
740
741   /* 2bpp cases */
742   #define BITS_PER_PIXEL                  2
743   #define FUNCTION_NAME(base)             base##_2_op0_trans
744   #include "34010gfx.inc"
745   #undef FUNCTION_NAME
746   #undef BITS_PER_PIXEL
747
748   /* 4bpp cases */
749   #define BITS_PER_PIXEL                  4
750   #define FUNCTION_NAME(base)             base##_4_op0_trans
751   #include "34010gfx.inc"
752   #undef FUNCTION_NAME
753   #undef BITS_PER_PIXEL
754
755   /* 8bpp cases */
756   #define BITS_PER_PIXEL                  8
757   #define FUNCTION_NAME(base)             base##_8_op0_trans
758   #include "34010gfx.inc"
759   #undef FUNCTION_NAME
760   #undef BITS_PER_PIXEL
761
762   /* 16bpp cases */
763   #define BITS_PER_PIXEL                  16
764   #define FUNCTION_NAME(base)             base##_16_op0_trans
765   #include "34010gfx.inc"
766   #undef FUNCTION_NAME
767   #undef BITS_PER_PIXEL
768
769#undef TRANSPARENCY
770#undef PIXEL_OP_REQUIRES_SOURCE
771#undef PIXEL_OP_TIMING
772#undef PIXEL_OP
773
774
775#define PIXEL_OP(src, mask, pixel)      pixel = (this->*m_pixel_op)(src, mask, pixel)
776#define PIXEL_OP_REQUIRES_SOURCE        1
777#define PIXEL_OP_TIMING                 (2+m_pixel_op_timing)
778#define TRANSPARENCY                    1
779
780   /* 1bpp cases */
781   #define BITS_PER_PIXEL                  1
782   #define FUNCTION_NAME(base)             base##_1_opx_trans
783   #include "34010gfx.inc"
784   #undef FUNCTION_NAME
785   #undef BITS_PER_PIXEL
786
787   /* 2bpp cases */
788   #define BITS_PER_PIXEL                  2
789   #define FUNCTION_NAME(base)             base##_2_opx_trans
790   #include "34010gfx.inc"
791   #undef FUNCTION_NAME
792   #undef BITS_PER_PIXEL
793
794   /* 4bpp cases */
795   #define BITS_PER_PIXEL                  4
796   #define FUNCTION_NAME(base)             base##_4_opx_trans
797   #include "34010gfx.inc"
798   #undef FUNCTION_NAME
799   #undef BITS_PER_PIXEL
800
801   /* 8bpp cases */
802   #define BITS_PER_PIXEL                  8
803   #define FUNCTION_NAME(base)             base##_8_opx_trans
804   #include "34010gfx.inc"
805   #undef FUNCTION_NAME
806   #undef BITS_PER_PIXEL
807
808   /* 16bpp cases */
809   #define BITS_PER_PIXEL                  16
810   #define FUNCTION_NAME(base)             base##_16_opx_trans
811   #include "34010gfx.inc"
812   #undef FUNCTION_NAME
813   #undef BITS_PER_PIXEL
814
815#undef TRANSPARENCY
816#undef PIXEL_OP_REQUIRES_SOURCE
817#undef PIXEL_OP_TIMING
818#undef PIXEL_OP
819
820static const UINT8 pixelsize_lookup[32] =
821{
822   0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
823};
824
825
826void tms340x0_device::pixblt_b_l(UINT16 op)
827{
828   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
829   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
830   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
831   int ix = trans | (rop << 1) | (psize << 6);
832   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT B,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
833   m_pixel_op = s_pixel_op_table[rop];
834   m_pixel_op_timing = s_pixel_op_timing_table[rop];
835   (this->*s_pixblt_b_op_table[ix])(1);
836}
837
838void tms340x0_device::pixblt_b_xy(UINT16 op)
839{
840   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
841   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
842   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
843   int ix = trans | (rop << 1) | (psize << 6);
844   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT B,XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
845   m_pixel_op = s_pixel_op_table[rop];
846   m_pixel_op_timing = s_pixel_op_timing_table[rop];
847   (this->*s_pixblt_b_op_table[ix])(0);
848}
849
850void tms340x0_device::pixblt_l_l(UINT16 op)
851{
852   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
853   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
854   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
855   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
856   int ix = trans | (rop << 1) | (psize << 6);
857   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT L,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
858   m_pixel_op = s_pixel_op_table[rop];
859   m_pixel_op_timing = s_pixel_op_timing_table[rop];
860   if (!pbh)
861      (this->*s_pixblt_op_table[ix])(1, 1);
862   else
863      (this->*s_pixblt_r_op_table[ix])(1, 1);
864}
865
866void tms340x0_device::pixblt_l_xy(UINT16 op)
867{
868   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
869   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
870   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
871   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
872   int ix = trans | (rop << 1) | (psize << 6);
873   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT L,XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
874   m_pixel_op = s_pixel_op_table[rop];
875   m_pixel_op_timing = s_pixel_op_timing_table[rop];
876   if (!pbh)
877      (this->*s_pixblt_op_table[ix])(1, 0);
878   else
879      (this->*s_pixblt_r_op_table[ix])(1, 0);
880}
881
882void tms340x0_device::pixblt_xy_l(UINT16 op)
883{
884   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
885   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
886   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
887   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
888   int ix = trans | (rop << 1) | (psize << 6);
889   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT XY,L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
890   m_pixel_op = s_pixel_op_table[rop];
891   m_pixel_op_timing = s_pixel_op_timing_table[rop];
892   if (!pbh)
893      (this->*s_pixblt_op_table[ix])(0, 1);
894   else
895      (this->*s_pixblt_r_op_table[ix])(0, 1);
896}
897
898void tms340x0_device::pixblt_xy_xy(UINT16 op)
899{
900   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
901   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
902   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
903   int pbh = (IOREG(REG_CONTROL) >> 8) & 1;
904   int ix = trans | (rop << 1) | (psize << 6);
905   if (!P_FLAG()) LOGGFX(("%08X(%3d):PIXBLT XY,XY (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
906   m_pixel_op = s_pixel_op_table[rop];
907   m_pixel_op_timing = s_pixel_op_timing_table[rop];
908   if (!pbh)
909      (this->*s_pixblt_op_table[ix])(0, 0);
910   else
911      (this->*s_pixblt_r_op_table[ix])(0, 0);
912}
913
914void tms340x0_device::fill_l(UINT16 op)
915{
916   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
917   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
918   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
919   int ix = trans | (rop << 1) | (psize << 6);
920   if (!P_FLAG()) LOGGFX(("%08X(%3d):FILL L (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
921   m_pixel_op = s_pixel_op_table[rop];
922   m_pixel_op_timing = s_pixel_op_timing_table[rop];
923   (this->*s_fill_op_table[ix])(1);
924}
925
926void tms340x0_device::fill_xy(UINT16 op)
927{
928   int psize = pixelsize_lookup[IOREG(REG_PSIZE) & 0x1f];
929   int trans = (IOREG(REG_CONTROL) & 0x20) >> 5;
930   int rop = (IOREG(REG_CONTROL) >> 10) & 0x1f;
931   int ix = trans | (rop << 1) | (psize << 6);
932   if (!P_FLAG()) LOGGFX(("%08X(%3d):FILL XY (%d,%d) (%dx%d) depth=%d\n", m_pc, m_screen->vpos(), DADDR_X(), DADDR_Y(), DYDX_X(), DYDX_Y(), IOREG(REG_PSIZE) ? IOREG(REG_PSIZE) : 32));
933   m_pixel_op = s_pixel_op_table[rop];
934   m_pixel_op_timing = s_pixel_op_timing_table[rop];
935   (this->*s_fill_op_table[ix])(0);
936}
937
938
939#else
940
941
942#undef PIXELS_PER_WORD
943#undef PIXEL_MASK
944
945#define PIXELS_PER_WORD (16 / BITS_PER_PIXEL)
946#define PIXEL_MASK ((1 << BITS_PER_PIXEL) - 1)
947
948void FUNCTION_NAME(tms340x0_device::pixblt)(int src_is_linear, int dst_is_linear)
949{
950   /* if this is the first time through, perform the operation */
951   if (!P_FLAG())
952   {
953      int dx, dy, x, y, /*words,*/ yreverse;
954      word_write_func word_write;
955      word_read_func word_read;
956      UINT32 readwrites = 0;
957      UINT32 saddr, daddr;
958      XY dstxy = { 0 };
959
960      /* determine read/write functions */
961      if (IOREG(REG_DPYCTL) & 0x0800)
962      {
963         word_write = &tms340x0_device::shiftreg_w;
964         word_read = &tms340x0_device::shiftreg_r;
965      }
966      else
967      {
968         word_write = &tms340x0_device::memory_w;
969         word_read = &tms340x0_device::memory_r;
970      }
971
972      /* compute the starting addresses */
973      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
974
975      /* compute the bounds of the operation */
976      dx = (INT16)DYDX_X();
977      dy = (INT16)DYDX_Y();
978
979      /* apply the window for non-linear destinations */
980      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
981      if (!dst_is_linear)
982      {
983         dstxy = DADDR_XY();
984         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
985         daddr = DXYTOL(dstxy);
986      }
987      else
988         daddr = DADDR();
989      daddr &= ~(BITS_PER_PIXEL - 1);
990      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
991
992      /* bail if we're clipped */
993      if (dx <= 0 || dy <= 0)
994         return;
995
996      /* window mode 1: just return and interrupt if we are within the window */
997      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
998      {
999         CLR_V();
1000         DADDR_XY() = dstxy;
1001         DYDX_X() = dx;
1002         DYDX_Y() = dy;
1003         IOREG(REG_INTPEND) |= TMS34010_WV;
1004         check_interrupt();
1005         return;
1006      }
1007
1008      /* handle flipping the addresses */
1009      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
1010      if (!src_is_linear || !dst_is_linear)
1011      {
1012         if (yreverse)
1013         {
1014            saddr += (dy - 1) * m_convsp;
1015            daddr += (dy - 1) * m_convdp;
1016         }
1017      }
1018
1019      m_st |= STBIT_P;
1020
1021      /* loop over rows */
1022      for (y = 0; y < dy; y++)
1023      {
1024         UINT32 srcwordaddr = saddr >> 4;
1025         UINT32 dstwordaddr = daddr >> 4;
1026         UINT8 srcbit = saddr & 15;
1027         UINT8 dstbit = daddr & 15;
1028         UINT32 srcword, dstword = 0;
1029
1030         /* fetch the initial source word */
1031         srcword = (this->*word_read)(*m_program, srcwordaddr++ << 1);
1032         readwrites++;
1033
1034         /* fetch the initial dest word */
1035         if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY || (daddr & 0x0f) != 0)
1036         {
1037            dstword = (this->*word_read)(*m_program, dstwordaddr << 1);
1038            readwrites++;
1039         }
1040
1041         /* loop over pixels */
1042         for (x = 0; x < dx; x++)
1043         {
1044            UINT32 dstmask;
1045            UINT32 pixel;
1046
1047            /* fetch more words if necessary */
1048            if (srcbit + BITS_PER_PIXEL > 16)
1049            {
1050               srcword |= (this->*word_read)(*m_program, srcwordaddr++ << 1) << 16;
1051               readwrites++;
1052            }
1053
1054            /* extract pixel from source */
1055            pixel = (srcword >> srcbit) & PIXEL_MASK;
1056            srcbit += BITS_PER_PIXEL;
1057            if (srcbit > 16)
1058            {
1059               srcbit -= 16;
1060               srcword >>= 16;
1061            }
1062
1063            /* fetch additional destination word if necessary */
1064            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1065               if (dstbit + BITS_PER_PIXEL > 16)
1066               {
1067                  dstword |= (this->*word_read)(*m_program, (dstwordaddr + 1) << 1) << 16;
1068                  readwrites++;
1069               }
1070
1071            /* apply pixel operations */
1072            pixel <<= dstbit;
1073            dstmask = PIXEL_MASK << dstbit;
1074            PIXEL_OP(dstword, dstmask, pixel);
1075            if (!TRANSPARENCY || pixel != 0)
1076               dstword = (dstword & ~dstmask) | pixel;
1077
1078            /* flush destination words */
1079            dstbit += BITS_PER_PIXEL;
1080            if (dstbit > 16)
1081            {
1082               (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
1083               readwrites++;
1084               dstbit -= 16;
1085               dstword >>= 16;
1086            }
1087         }
1088
1089         /* flush any remaining words */
1090         if (dstbit > 0)
1091         {
1092            /* if we're right-partial, read and mask the remaining bits */
1093            if (dstbit != 16)
1094            {
1095               UINT16 origdst = (this->*word_read)(*m_program, dstwordaddr << 1);
1096               UINT16 mask = 0xffff << dstbit;
1097               dstword = (dstword & ~mask) | (origdst & mask);
1098               readwrites++;
1099            }
1100
1101            (this->*word_write)(*m_program, dstwordaddr++ << 1, dstword);
1102            readwrites++;
1103         }
1104
1105
1106
1107#if 0
1108         int left_partials, right_partials, full_words, bitshift, bitshift_alt;
1109         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1110         UINT32 swordaddr, dwordaddr;
1111
1112         /* determine the bit shift to get from source to dest */
1113         bitshift = ((daddr & 15) - (saddr & 15)) & 15;
1114         bitshift_alt = (16 - bitshift) & 15;
1115
1116         /* how many left and right partial pixels do we have? */
1117         left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1118         right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1119         full_words = dx - left_partials - right_partials;
1120         if (full_words < 0)
1121            left_partials = dx, right_partials = full_words = 0;
1122         else
1123            full_words /= PIXELS_PER_WORD;
1124
1125         /* compute cycles */
1126         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1127
1128         /* use word addresses each row */
1129         swordaddr = saddr >> 4;
1130         dwordaddr = daddr >> 4;
1131
1132         /* fetch the initial source word */
1133         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1134         srcmask = PIXEL_MASK << (saddr & 15);
1135
1136         /* handle the left partial word */
1137         if (left_partials != 0)
1138         {
1139            /* fetch the destination word */
1140            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1141            dstmask = PIXEL_MASK << (daddr & 15);
1142
1143            /* loop over partials */
1144            for (x = 0; x < left_partials; x++)
1145            {
1146               /* fetch another word if necessary */
1147               if (srcmask == 0)
1148               {
1149                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1150                  srcmask = PIXEL_MASK;
1151               }
1152
1153               /* process the pixel */
1154               pixel = srcword & srcmask;
1155               if (dstmask > srcmask)
1156                  pixel <<= bitshift;
1157               else
1158                  pixel >>= bitshift_alt;
1159               PIXEL_OP(dstword, dstmask, pixel);
1160               if (!TRANSPARENCY || pixel != 0)
1161                  dstword = (dstword & ~dstmask) | pixel;
1162
1163               /* update the source */
1164               srcmask <<= BITS_PER_PIXEL;
1165
1166               /* update the destination */
1167               dstmask <<= BITS_PER_PIXEL;
1168            }
1169
1170            /* write the result */
1171            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1172         }
1173
1174         /* loop over full words */
1175         for (words = 0; words < full_words; words++)
1176         {
1177            /* fetch the destination word (if necessary) */
1178            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1179               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1180            else
1181               dstword = 0;
1182            dstmask = PIXEL_MASK;
1183
1184            /* loop over partials */
1185            for (x = 0; x < PIXELS_PER_WORD; x++)
1186            {
1187               /* fetch another word if necessary */
1188               if (srcmask == 0)
1189               {
1190                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1191                  srcmask = PIXEL_MASK;
1192               }
1193
1194               /* process the pixel */
1195               pixel = srcword & srcmask;
1196               if (dstmask > srcmask)
1197                  pixel <<= bitshift;
1198               else
1199                  pixel >>= bitshift_alt;
1200               PIXEL_OP(dstword, dstmask, pixel);
1201               if (!TRANSPARENCY || pixel != 0)
1202                  dstword = (dstword & ~dstmask) | pixel;
1203
1204               /* update the source */
1205               srcmask <<= BITS_PER_PIXEL;
1206
1207               /* update the destination */
1208               dstmask <<= BITS_PER_PIXEL;
1209            }
1210
1211            /* write the result */
1212            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1213         }
1214
1215         /* handle the right partial word */
1216         if (right_partials != 0)
1217         {
1218            /* fetch the destination word */
1219            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1220            dstmask = PIXEL_MASK;
1221
1222            /* loop over partials */
1223            for (x = 0; x < right_partials; x++)
1224            {
1225               /* fetch another word if necessary */
1226               if (srcmask == 0)
1227               {
1228      LOGGFX(("  right fetch @ %08x\n", swordaddr));
1229                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1230                  srcmask = PIXEL_MASK;
1231               }
1232
1233               /* process the pixel */
1234               pixel = srcword & srcmask;
1235               if (dstmask > srcmask)
1236                  pixel <<= bitshift;
1237               else
1238                  pixel >>= bitshift_alt;
1239               PIXEL_OP(dstword, dstmask, pixel);
1240               if (!TRANSPARENCY || pixel != 0)
1241                  dstword = (dstword & ~dstmask) | pixel;
1242
1243               /* update the source */
1244               srcmask <<= BITS_PER_PIXEL;
1245
1246               /* update the destination */
1247               dstmask <<= BITS_PER_PIXEL;
1248            }
1249
1250            /* write the result */
1251            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1252         }
1253#endif
1254
1255         /* update for next row */
1256         if (!yreverse)
1257         {
1258            saddr += SPTCH();
1259            daddr += DPTCH();
1260         }
1261         else
1262         {
1263            saddr -= SPTCH();
1264            daddr -= DPTCH();
1265         }
1266      }
1267
1268      m_gfxcycles += readwrites * 2 + dx * dy * (PIXEL_OP_TIMING - 2);
1269
1270      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1271   }
1272
1273   /* eat cycles */
1274   if (m_gfxcycles > m_icount)
1275   {
1276      m_gfxcycles -= m_icount;
1277      m_icount = 0;
1278      m_pc -= 0x10;
1279   }
1280   else
1281   {
1282      m_icount -= m_gfxcycles;
1283      m_st &= ~STBIT_P;
1284      if (src_is_linear && dst_is_linear)
1285         SADDR() += DYDX_Y() * SPTCH();
1286      else if (src_is_linear)
1287         SADDR() += DYDX_Y() * SPTCH();
1288      else
1289         SADDR_Y() += DYDX_Y();
1290      if (dst_is_linear)
1291         DADDR() += DYDX_Y() * DPTCH();
1292      else
1293         DADDR_Y() += DYDX_Y();
1294   }
1295}
1296
1297void FUNCTION_NAME(tms340x0_device::pixblt_r)(int src_is_linear, int dst_is_linear)
1298{
1299   /* if this is the first time through, perform the operation */
1300   if (!P_FLAG())
1301   {
1302      int dx, dy, x, y, words, yreverse;
1303      word_write_func word_write;
1304      word_read_func word_read;
1305      UINT32 saddr, daddr;
1306      XY dstxy = { 0 };
1307
1308      /* determine read/write functions */
1309      if (IOREG(REG_DPYCTL) & 0x0800)
1310      {
1311         word_write = &tms340x0_device::shiftreg_w;
1312         word_read = &tms340x0_device::shiftreg_r;
1313      }
1314      else
1315      {
1316         word_write = &tms340x0_device::memory_w;
1317         word_read = &tms340x0_device::memory_r;
1318      }
1319
1320      /* compute the starting addresses */
1321      saddr = src_is_linear ? SADDR() : SXYTOL(SADDR_XY());
1322if ((saddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd saddr\n", BITS_PER_PIXEL);
1323      saddr &= ~(BITS_PER_PIXEL - 1);
1324
1325      /* compute the bounds of the operation */
1326      dx = (INT16)DYDX_X();
1327      dy = (INT16)DYDX_Y();
1328
1329      /* apply the window for non-linear destinations */
1330      m_gfxcycles = 7 + (src_is_linear ? 0 : 2);
1331      if (!dst_is_linear)
1332      {
1333         dstxy = DADDR_XY();
1334         m_gfxcycles += 2 + (!src_is_linear) + apply_window("PIXBLT R", BITS_PER_PIXEL, &saddr, &dstxy, &dx, &dy);
1335         daddr = DXYTOL(dstxy);
1336      }
1337      else
1338         daddr = DADDR();
1339if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd daddr\n", BITS_PER_PIXEL);
1340      daddr &= ~(BITS_PER_PIXEL - 1);
1341      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
1342
1343      /* bail if we're clipped */
1344      if (dx <= 0 || dy <= 0)
1345         return;
1346
1347      /* window mode 1: just return and interrupt if we are within the window */
1348      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1349      {
1350         CLR_V();
1351         DADDR_XY() = dstxy;
1352         DYDX_X() = dx;
1353         DYDX_Y() = dy;
1354         IOREG(REG_INTPEND) |= TMS34010_WV;
1355         check_interrupt();
1356         return;
1357      }
1358
1359      /* handle flipping the addresses */
1360      yreverse = (IOREG(REG_CONTROL) >> 9) & 1;
1361      if (!src_is_linear || !dst_is_linear)
1362      {
1363         saddr += dx * BITS_PER_PIXEL;
1364         daddr += dx * BITS_PER_PIXEL;
1365         if (yreverse)
1366         {
1367            saddr += (dy - 1) * m_convsp;
1368            daddr += (dy - 1) * m_convdp;
1369         }
1370      }
1371
1372      m_st |= STBIT_P;
1373
1374      /* loop over rows */
1375      for (y = 0; y < dy; y++)
1376      {
1377         int left_partials, right_partials, full_words, bitshift, bitshift_alt;
1378         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1379         UINT32 swordaddr, dwordaddr;
1380
1381         /* determine the bit shift to get from source to dest */
1382         bitshift = ((daddr & 15) - (saddr & 15)) & 15;
1383         bitshift_alt = (16 - bitshift) & 15;
1384
1385         /* how many left and right partial pixels do we have? */
1386         left_partials = (PIXELS_PER_WORD - (((daddr - dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1387         right_partials = (daddr & 15) / BITS_PER_PIXEL;
1388         full_words = dx - left_partials - right_partials;
1389         if (full_words < 0)
1390            right_partials = dx, left_partials = full_words = 0;
1391         else
1392            full_words /= PIXELS_PER_WORD;
1393
1394         /* compute cycles */
1395         m_gfxcycles += compute_pixblt_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1396
1397         /* use word addresses each row */
1398         swordaddr = (saddr + 15) >> 4;
1399         dwordaddr = (daddr + 15) >> 4;
1400
1401         /* fetch the initial source word */
1402         srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1403         srcmask = PIXEL_MASK << ((saddr - BITS_PER_PIXEL) & 15);
1404
1405         /* handle the right partial word */
1406         if (right_partials != 0)
1407         {
1408            /* fetch the destination word */
1409            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
1410            dstmask = PIXEL_MASK << ((daddr - BITS_PER_PIXEL) & 15);
1411
1412            /* loop over partials */
1413            for (x = 0; x < right_partials; x++)
1414            {
1415               /* fetch source pixel if necessary */
1416               if (srcmask == 0)
1417               {
1418                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1419                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1420               }
1421
1422               /* process the pixel */
1423               pixel = srcword & srcmask;
1424               if (dstmask > srcmask)
1425                  pixel <<= bitshift;
1426               else
1427                  pixel >>= bitshift_alt;
1428               PIXEL_OP(dstword, dstmask, pixel);
1429               if (!TRANSPARENCY || pixel != 0)
1430                  dstword = (dstword & ~dstmask) | pixel;
1431
1432#if (BITS_PER_PIXEL<16)
1433               /* update the source */
1434               srcmask >>= BITS_PER_PIXEL;
1435
1436               /* update the destination */
1437               dstmask >>= BITS_PER_PIXEL;
1438#else
1439               srcmask = 0;
1440               dstmask = 0;
1441#endif
1442            }
1443
1444            /* write the result */
1445            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1446         }
1447
1448         /* loop over full words */
1449         for (words = 0; words < full_words; words++)
1450         {
1451            /* fetch the destination word (if necessary) */
1452            dwordaddr--;
1453            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1454               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1455            else
1456               dstword = 0;
1457            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1458
1459            /* loop over partials */
1460            for (x = 0; x < PIXELS_PER_WORD; x++)
1461            {
1462               /* fetch source pixel if necessary */
1463               if (srcmask == 0)
1464               {
1465                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1466                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1467               }
1468
1469               /* process the pixel */
1470               pixel = srcword & srcmask;
1471               if (dstmask > srcmask)
1472                  pixel <<= bitshift;
1473               else
1474                  pixel >>= bitshift_alt;
1475               PIXEL_OP(dstword, dstmask, pixel);
1476               if (!TRANSPARENCY || pixel != 0)
1477                  dstword = (dstword & ~dstmask) | pixel;
1478
1479#if (BITS_PER_PIXEL<16)
1480               /* update the source */
1481               srcmask >>= BITS_PER_PIXEL;
1482
1483               /* update the destination */
1484               dstmask >>= BITS_PER_PIXEL;
1485#else
1486               srcmask = 0;
1487               dstmask = 0;
1488#endif
1489            }
1490
1491            /* write the result */
1492            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1493         }
1494
1495         /* handle the left partial word */
1496         if (left_partials != 0)
1497         {
1498            /* fetch the destination word */
1499            dstword = (this->*word_read)(*m_program, --dwordaddr << 1);
1500            dstmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1501
1502            /* loop over partials */
1503            for (x = 0; x < left_partials; x++)
1504            {
1505               /* fetch the source pixel if necessary */
1506               if (srcmask == 0)
1507               {
1508                  srcword = (this->*word_read)(*m_program, --swordaddr << 1);
1509                  srcmask = PIXEL_MASK << (16 - BITS_PER_PIXEL);
1510               }
1511
1512               /* process the pixel */
1513               pixel = srcword & srcmask;
1514               if (dstmask > srcmask)
1515                  pixel <<= bitshift;
1516               else
1517                  pixel >>= bitshift_alt;
1518               PIXEL_OP(dstword, dstmask, pixel);
1519               if (!TRANSPARENCY || pixel != 0)
1520                  dstword = (dstword & ~dstmask) | pixel;
1521
1522#if (BITS_PER_PIXEL<16)
1523               /* update the source */
1524               srcmask >>= BITS_PER_PIXEL;
1525
1526               /* update the destination */
1527               dstmask >>= BITS_PER_PIXEL;
1528#else
1529               srcmask = 0;
1530               dstmask = 0;
1531#endif
1532            }
1533
1534            /* write the result */
1535            (this->*word_write)(*m_program, dwordaddr << 1, dstword);
1536         }
1537
1538         /* update for next row */
1539         if (!yreverse)
1540         {
1541            saddr += SPTCH();
1542            daddr += DPTCH();
1543         }
1544         else
1545         {
1546            saddr -= SPTCH();
1547            daddr -= DPTCH();
1548         }
1549      }
1550      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1551   }
1552
1553   /* eat cycles */
1554   if (m_gfxcycles > m_icount)
1555   {
1556      m_gfxcycles -= m_icount;
1557      m_icount = 0;
1558      m_pc -= 0x10;
1559   }
1560   else
1561   {
1562      m_icount -= m_gfxcycles;
1563      m_st &= ~STBIT_P;
1564      if (src_is_linear && dst_is_linear)
1565         SADDR() += DYDX_Y() * SPTCH();
1566      else if (src_is_linear)
1567         SADDR() += DYDX_Y() * SPTCH();
1568      else
1569         SADDR_Y() += DYDX_Y();
1570      if (dst_is_linear)
1571         DADDR() += DYDX_Y() * DPTCH();
1572      else
1573         DADDR_Y() += DYDX_Y();
1574   }
1575}
1576
1577void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear)
1578{
1579   /* if this is the first time through, perform the operation */
1580   if (!P_FLAG())
1581   {
1582      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1583      word_write_func word_write;
1584      word_read_func word_read;
1585      UINT32 saddr, daddr;
1586      XY dstxy = { 0 };
1587
1588      /* determine read/write functions */
1589      if (IOREG(REG_DPYCTL) & 0x0800)
1590      {
1591         word_write = &tms340x0_device::shiftreg_w;
1592         word_read = &tms340x0_device::shiftreg_r;
1593      }
1594      else
1595      {
1596         word_write = &tms340x0_device::memory_w;
1597         word_read = &tms340x0_device::memory_r;
1598      }
1599
1600      /* compute the starting addresses */
1601      saddr = SADDR();
1602
1603      /* compute the bounds of the operation */
1604      dx = (INT16)DYDX_X();
1605      dy = (INT16)DYDX_Y();
1606
1607      /* apply the window for non-linear destinations */
1608      m_gfxcycles = 4;
1609      if (!dst_is_linear)
1610      {
1611         dstxy = DADDR_XY();
1612         m_gfxcycles += 2 + apply_window("PIXBLT B", 1, &saddr, &dstxy, &dx, &dy);
1613         daddr = DXYTOL(dstxy);
1614      }
1615      else
1616         daddr = DADDR();
1617      daddr &= ~(BITS_PER_PIXEL - 1);
1618      LOGGFX(("  saddr=%08X daddr=%08X sptch=%08X dptch=%08X\n", saddr, daddr, SPTCH(), DPTCH()));
1619
1620      /* bail if we're clipped */
1621      if (dx <= 0 || dy <= 0)
1622         return;
1623
1624      /* window mode 1: just return and interrupt if we are within the window */
1625      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1626      {
1627         CLR_V();
1628         DADDR_XY() = dstxy;
1629         DYDX_X() = dx;
1630         DYDX_Y() = dy;
1631         IOREG(REG_INTPEND) |= TMS34010_WV;
1632         check_interrupt();
1633         return;
1634      }
1635
1636      /* how many left and right partial pixels do we have? */
1637      left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1638      right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1639      full_words = dx - left_partials - right_partials;
1640      if (full_words < 0)
1641         left_partials = dx, right_partials = full_words = 0;
1642      else
1643         full_words /= PIXELS_PER_WORD;
1644
1645      /* compute cycles */
1646      m_gfxcycles += compute_pixblt_b_cycles(left_partials, right_partials, full_words, dy, PIXEL_OP_TIMING, BITS_PER_PIXEL);
1647      m_st |= STBIT_P;
1648
1649      /* loop over rows */
1650      for (y = 0; y < dy; y++)
1651      {
1652         UINT16 srcword, srcmask, dstword, dstmask, pixel;
1653         UINT32 swordaddr, dwordaddr;
1654
1655         /* use byte addresses each row */
1656         swordaddr = saddr >> 4;
1657         dwordaddr = daddr >> 4;
1658
1659         /* fetch the initial source word */
1660         srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1661         srcmask = 1 << (saddr & 15);
1662
1663         /* handle the left partial word */
1664         if (left_partials != 0)
1665         {
1666            /* fetch the destination word */
1667            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1668            dstmask = PIXEL_MASK << (daddr & 15);
1669
1670            /* loop over partials */
1671            for (x = 0; x < left_partials; x++)
1672            {
1673               /* process the pixel */
1674               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1675               pixel &= dstmask;
1676               PIXEL_OP(dstword, dstmask, pixel);
1677               if (!TRANSPARENCY || pixel != 0)
1678                  dstword = (dstword & ~dstmask) | pixel;
1679
1680               /* update the source */
1681               srcmask <<= 1;
1682               if (srcmask == 0)
1683               {
1684                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1685                  srcmask = 0x0001;
1686               }
1687
1688               /* update the destination */
1689               dstmask = dstmask << BITS_PER_PIXEL;
1690            }
1691
1692            /* write the result */
1693            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1694         }
1695
1696         /* loop over full words */
1697         for (words = 0; words < full_words; words++)
1698         {
1699            /* fetch the destination word (if necessary) */
1700            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1701               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1702            else
1703               dstword = 0;
1704            dstmask = PIXEL_MASK;
1705
1706            /* loop over partials */
1707            for (x = 0; x < PIXELS_PER_WORD; x++)
1708            {
1709               /* process the pixel */
1710               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1711               pixel &= dstmask;
1712               PIXEL_OP(dstword, dstmask, pixel);
1713               if (!TRANSPARENCY || pixel != 0)
1714                  dstword = (dstword & ~dstmask) | pixel;
1715
1716               /* update the source */
1717               srcmask <<= 1;
1718               if (srcmask == 0)
1719               {
1720                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1721                  srcmask = 0x0001;
1722               }
1723
1724               /* update the destination */
1725               dstmask = dstmask << BITS_PER_PIXEL;
1726            }
1727
1728            /* write the result */
1729            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1730         }
1731
1732         /* handle the right partial word */
1733         if (right_partials != 0)
1734         {
1735            /* fetch the destination word */
1736            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1737            dstmask = PIXEL_MASK;
1738
1739            /* loop over partials */
1740            for (x = 0; x < right_partials; x++)
1741            {
1742               /* process the pixel */
1743               pixel = (srcword & srcmask) ? COLOR1() : COLOR0();
1744               pixel &= dstmask;
1745               PIXEL_OP(dstword, dstmask, pixel);
1746               if (!TRANSPARENCY || pixel != 0)
1747                  dstword = (dstword & ~dstmask) | pixel;
1748
1749               /* update the source */
1750               srcmask <<= 1;
1751               if (srcmask == 0)
1752               {
1753                  srcword = (this->*word_read)(*m_program, swordaddr++ << 1);
1754                  srcmask = 0x0001;
1755               }
1756
1757               /* update the destination */
1758               dstmask = dstmask << BITS_PER_PIXEL;
1759            }
1760
1761            /* write the result */
1762            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1763         }
1764
1765         /* update for next row */
1766         saddr += SPTCH();
1767         daddr += DPTCH();
1768      }
1769      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1770   }
1771
1772   /* eat cycles */
1773   if (m_gfxcycles > m_icount)
1774   {
1775      m_gfxcycles -= m_icount;
1776      m_icount = 0;
1777      m_pc -= 0x10;
1778   }
1779   else
1780   {
1781      m_icount -= m_gfxcycles;
1782      m_st &= ~STBIT_P;
1783      SADDR() += DYDX_Y() * SPTCH();
1784      if (dst_is_linear)
1785         DADDR() += DYDX_Y() * DPTCH();
1786      else
1787         DADDR_Y() += DYDX_Y();
1788   }
1789}
1790
1791void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear)
1792{
1793   /* if this is the first time through, perform the operation */
1794   if (!P_FLAG())
1795   {
1796      int dx, dy, x, y, words, left_partials, right_partials, full_words;
1797      word_write_func word_write;
1798      word_read_func word_read;
1799      UINT32 daddr;
1800      XY dstxy = { 0 };
1801
1802      /* determine read/write functions */
1803      if (IOREG(REG_DPYCTL) & 0x0800)
1804      {
1805         word_write = &tms340x0_device::shiftreg_w;
1806         word_read = &tms340x0_device::dummy_shiftreg_r;
1807      }
1808      else
1809      {
1810         word_write = &tms340x0_device::memory_w;
1811         word_read = &tms340x0_device::memory_r;
1812      }
1813
1814      /* compute the bounds of the operation */
1815      dx = (INT16)DYDX_X();
1816      dy = (INT16)DYDX_Y();
1817
1818      /* apply the window for non-linear destinations */
1819      m_gfxcycles = 4;
1820      if (!dst_is_linear)
1821      {
1822         dstxy = DADDR_XY();
1823         m_gfxcycles += 2 + apply_window("FILL", 0, NULL, &dstxy, &dx, &dy);
1824         daddr = DXYTOL(dstxy);
1825      }
1826      else
1827         daddr = DADDR();
1828      daddr &= ~(BITS_PER_PIXEL - 1);
1829      LOGGFX(("  daddr=%08X\n", daddr));
1830
1831      /* bail if we're clipped */
1832      if (dx <= 0 || dy <= 0)
1833         return;
1834
1835      /* window mode 1: just return and interrupt if we are within the window */
1836      if (WINDOW_CHECKING() == 1 && !dst_is_linear)
1837      {
1838         CLR_V();
1839         DADDR_XY() = dstxy;
1840         DYDX_X() = dx;
1841         DYDX_Y() = dy;
1842         IOREG(REG_INTPEND) |= TMS34010_WV;
1843         check_interrupt();
1844         return;
1845      }
1846
1847      /* how many left and right partial pixels do we have? */
1848      left_partials = (PIXELS_PER_WORD - ((daddr & 15) / BITS_PER_PIXEL)) & (PIXELS_PER_WORD - 1);
1849      right_partials = ((daddr + dx * BITS_PER_PIXEL) & 15) / BITS_PER_PIXEL;
1850      full_words = dx - left_partials - right_partials;
1851      if (full_words < 0)
1852         left_partials = dx, right_partials = full_words = 0;
1853      else
1854         full_words /= PIXELS_PER_WORD;
1855
1856      /* compute cycles */
1857      m_gfxcycles += 2;
1858      m_st |= STBIT_P;
1859
1860      /* loop over rows */
1861      for (y = 0; y < dy; y++)
1862      {
1863         UINT16 dstword, dstmask, pixel;
1864         UINT32 dwordaddr;
1865
1866         /* use byte addresses each row */
1867         dwordaddr = daddr >> 4;
1868
1869         /* compute cycles */
1870         m_gfxcycles += compute_fill_cycles(left_partials, right_partials, full_words, PIXEL_OP_TIMING);
1871
1872         /* handle the left partial word */
1873         if (left_partials != 0)
1874         {
1875            /* fetch the destination word */
1876            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1877            dstmask = PIXEL_MASK << (daddr & 15);
1878
1879            /* loop over partials */
1880            for (x = 0; x < left_partials; x++)
1881            {
1882               /* process the pixel */
1883               pixel = COLOR1() & dstmask;
1884               PIXEL_OP(dstword, dstmask, pixel);
1885               if (!TRANSPARENCY || pixel != 0)
1886                  dstword = (dstword & ~dstmask) | pixel;
1887
1888               /* update the destination */
1889               dstmask = dstmask << BITS_PER_PIXEL;
1890            }
1891
1892            /* write the result */
1893            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1894         }
1895
1896         /* loop over full words */
1897         for (words = 0; words < full_words; words++)
1898         {
1899            /* fetch the destination word (if necessary) */
1900            if (PIXEL_OP_REQUIRES_SOURCE || TRANSPARENCY)
1901               dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1902            else
1903               dstword = 0;
1904            dstmask = PIXEL_MASK;
1905
1906            /* loop over partials */
1907            for (x = 0; x < PIXELS_PER_WORD; x++)
1908            {
1909               /* process the pixel */
1910               pixel = COLOR1() & dstmask;
1911               PIXEL_OP(dstword, dstmask, pixel);
1912               if (!TRANSPARENCY || pixel != 0)
1913                  dstword = (dstword & ~dstmask) | pixel;
1914
1915               /* update the destination */
1916               dstmask = dstmask << BITS_PER_PIXEL;
1917            }
1918
1919            /* write the result */
1920            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1921         }
1922
1923         /* handle the right partial word */
1924         if (right_partials != 0)
1925         {
1926            /* fetch the destination word */
1927            dstword = (this->*word_read)(*m_program, dwordaddr << 1);
1928            dstmask = PIXEL_MASK;
1929
1930            /* loop over partials */
1931            for (x = 0; x < right_partials; x++)
1932            {
1933               /* process the pixel */
1934               pixel = COLOR1() & dstmask;
1935               PIXEL_OP(dstword, dstmask, pixel);
1936               if (!TRANSPARENCY || pixel != 0)
1937                  dstword = (dstword & ~dstmask) | pixel;
1938
1939               /* update the destination */
1940               dstmask = dstmask << BITS_PER_PIXEL;
1941            }
1942
1943            /* write the result */
1944            (this->*word_write)(*m_program, dwordaddr++ << 1, dstword);
1945         }
1946
1947         /* update for next row */
1948         daddr += DPTCH();
1949      }
1950
1951      LOGGFX(("  (%d cycles)\n", m_gfxcycles));
1952   }
1953
1954   /* eat cycles */
1955   if (m_gfxcycles > m_icount)
1956   {
1957      m_gfxcycles -= m_icount;
1958      m_icount = 0;
1959      m_pc -= 0x10;
1960   }
1961   else
1962   {
1963      m_icount -= m_gfxcycles;
1964      m_st &= ~STBIT_P;
1965      if (dst_is_linear)
1966         DADDR() += DYDX_Y() * DPTCH();
1967      else
1968         DADDR_Y() += DYDX_Y();
1969   }
1970}
1971
1972#endif
trunk/src/devices/cpu/tms34010/34010ops.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12
13
14/***************************************************************************
15    MISC MACROS
16***************************************************************************/
17
18#define ZEXTEND(val,width) if (width) (val) &= ((UINT32)0xffffffff >> (32 - (width)))
19#define SEXTEND(val,width) if (width) (val) = (INT32)((val) << (32 - (width))) >> (32 - (width))
20
21#define SXYTOL(val)   ((((INT16)(val).y * m_convsp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
22#define DXYTOL(val)   ((((INT16)(val).y * m_convdp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
23#define MXYTOL(val)   ((((INT16)(val).y * m_convmp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
24
25#define COUNT_CYCLES(x)   m_icount -= x
26#define COUNT_UNKNOWN_CYCLES(x) COUNT_CYCLES(x)
27
28#define CORRECT_ODD_PC(x) do { if (m_pc & 0x0f) logerror("%s to PC=%08X\n", x, m_pc); m_pc &= ~0x0f; } while (0)
29
30
31
32/***************************************************************************
33    FLAG HANDLING MACROS
34***************************************************************************/
35
36#define SIGN(val)           ((val) & 0x80000000)
37
38#define CLR_Z()                m_st &= ~STBIT_Z
39#define CLR_V()                m_st &= ~STBIT_V
40#define CLR_C()                m_st &= ~STBIT_C
41#define CLR_N()                m_st &= ~STBIT_N
42#define CLR_NZ()               m_st &= ~(STBIT_N | STBIT_Z)
43#define CLR_CZ()               m_st &= ~(STBIT_C | STBIT_Z)
44#define CLR_ZV()               m_st &= ~(STBIT_Z | STBIT_V)
45#define CLR_NZV()              m_st &= ~(STBIT_N | STBIT_Z | STBIT_V)
46#define CLR_NCZ()              m_st &= ~(STBIT_N | STBIT_C | STBIT_Z)
47#define CLR_NCZV()             m_st &= ~(STBIT_N | STBIT_C | STBIT_Z | STBIT_V)
48
49#define SET_V_BIT_LO(val,bit) m_st |= ((val) << (28 - (bit))) & STBIT_V
50#define SET_V_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 28)) & STBIT_V
51#define SET_V_LOG(val)        m_st |= (val) << 28
52#define SET_Z_BIT_LO(val,bit) m_st |= ((val) << (29 - (bit))) & STBIT_Z
53#define SET_Z_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 29)) & STBIT_Z
54#define SET_Z_LOG(val)        m_st |= (val) << 29
55#define SET_C_BIT_LO(val,bit) m_st |= ((val) << (30 - (bit))) & STBIT_C
56#define SET_C_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 30)) & STBIT_C
57#define SET_C_LOG(val)        m_st |= (val) << 30
58#define SET_N_BIT(val,bit)    m_st |= ((val) << (31 - (bit))) & STBIT_N
59#define SET_N_LOG(val)        m_st |= (val) << 31
60
61#define SET_Z_VAL(val)        SET_Z_LOG((val) == 0)
62#define SET_N_VAL(val)        SET_N_BIT(val, 31)
63#define SET_NZ_VAL(val)       SET_Z_VAL(val); SET_N_VAL(val)
64#define SET_V_SUB(a,b,r)      SET_V_BIT_HI(((a) ^ (b)) & ((a) ^ (r)), 31)
65#define SET_V_ADD(a,b,r)      SET_V_BIT_HI(~((a) ^ (b)) & ((a) ^ (r)), 31)
66#define SET_C_SUB(a,b)        SET_C_LOG((UINT32)(b) > (UINT32)(a))
67#define SET_C_ADD(a,b)        SET_C_LOG((UINT32)~(a) < (UINT32)(b))
68#define SET_NZV_SUB(a,b,r)    SET_NZ_VAL(r); SET_V_SUB(a,b,r)
69#define SET_NZCV_SUB(a,b,r)   SET_NZV_SUB(a,b,r); SET_C_SUB(a,b)
70#define SET_NZCV_ADD(a,b,r)   SET_NZ_VAL(r); SET_V_ADD(a,b,r); SET_C_ADD(a,b)
71
72static const UINT8 fw_inc[32] = { 32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
73
74
75/***************************************************************************
76    UNIMPLEMENTED INSTRUCTION
77***************************************************************************/
78
79void tms340x0_device::unimpl(UINT16 op)
80{
81   /* kludge for Super High Impact -- this doesn't seem to cause */
82   /* an illegal opcode exception */
83   if (m_direct->read_word(TOBYTE(m_pc - 0x10)) == 0x0007)
84      return;
85
86   /* 9 Ball Shootout calls to FFDF7468, expecting it */
87   /* to execute the next instruction from FFDF7470 */
88   /* but the instruction at FFDF7460 is an 0x0001 */
89   if (m_direct->read_word(TOBYTE(m_pc - 0x10)) == 0x0001)
90      return;
91
92   PUSH(m_pc);
93   PUSH(m_st);
94   RESET_ST();
95   m_pc = RLONG(0xfffffc20);
96   COUNT_UNKNOWN_CYCLES(16);
97
98   /* extra check to prevent bad things */
99   if (m_pc == 0 || s_opcode_table[m_direct->read_word(TOBYTE(m_pc)) >> 4] == &tms34010_device::unimpl)
100   {
101      set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
102      debugger_break(machine());
103   }
104}
105
106
107
108/***************************************************************************
109    X/Y OPERATIONS
110***************************************************************************/
111
112#define ADD_XY(R)                               \
113{                                               \
114   XY  a =  R##REG_XY(SRCREG(op));                 \
115   XY *b = &R##REG_XY(DSTREG(op));                 \
116   CLR_NCZV();                                  \
117   b->x += a.x;                                \
118   b->y += a.y;                                \
119   SET_N_LOG(b->x == 0);                      \
120   SET_C_BIT_LO(b->y, 15);                        \
121   SET_Z_LOG(b->y == 0);                      \
122   SET_V_BIT_LO(b->x, 15);                        \
123   COUNT_CYCLES(1);                            \
124}
125void tms340x0_device::add_xy_a(UINT16 op) { ADD_XY(A); }
126void tms340x0_device::add_xy_b(UINT16 op) { ADD_XY(B); }
127
128#define SUB_XY(R)                               \
129{                                               \
130   XY  a =  R##REG_XY(SRCREG(op));                 \
131   XY *b = &R##REG_XY(DSTREG(op));                 \
132   CLR_NCZV();                                  \
133   SET_N_LOG(a.x == b->x);                        \
134   SET_C_LOG(a.y > b->y);                     \
135   SET_Z_LOG(a.y == b->y);                        \
136   SET_V_LOG(a.x > b->x);                     \
137   b->x -= a.x;                                \
138   b->y -= a.y;                                \
139   COUNT_CYCLES(1);                            \
140}
141void tms340x0_device::sub_xy_a(UINT16 op) { SUB_XY(A); }
142void tms340x0_device::sub_xy_b(UINT16 op) { SUB_XY(B); }
143
144#define CMP_XY(R)                               \
145{                                               \
146   INT16 res;                                  \
147   XY a = R##REG_XY(DSTREG(op));                   \
148   XY b = R##REG_XY(SRCREG(op));                   \
149   CLR_NCZV();                                  \
150   res = a.x-b.x;                              \
151   SET_N_LOG(res == 0);                       \
152   SET_V_BIT_LO(res, 15);                     \
153   res = a.y-b.y;                              \
154   SET_Z_LOG(res == 0);                       \
155   SET_C_BIT_LO(res, 15);                     \
156   COUNT_CYCLES(1);                            \
157}
158void tms340x0_device::cmp_xy_a(UINT16 op) { CMP_XY(A); }
159void tms340x0_device::cmp_xy_b(UINT16 op) { CMP_XY(B); }
160
161#define CPW(R)                                  \
162{                                               \
163   INT32 res = 0;                              \
164   INT16 x = R##REG_X(SRCREG(op));                 \
165   INT16 y = R##REG_Y(SRCREG(op));                 \
166                                    \
167   CLR_V();                                     \
168   res |= ((WSTART_X() > x) ? 0x20  : 0);       \
169   res |= ((x > WEND_X())   ? 0x40  : 0);       \
170   res |= ((WSTART_Y() > y) ? 0x80  : 0);       \
171   res |= ((y > WEND_Y())   ? 0x100 : 0);       \
172   R##REG(DSTREG(op)) = res;                       \
173   SET_V_LOG(res != 0);                       \
174   COUNT_CYCLES(1);                            \
175}
176void tms340x0_device::cpw_a(UINT16 op) { CPW(A); }
177void tms340x0_device::cpw_b(UINT16 op) { CPW(B); }
178
179#define CVXYL(R)                                    \
180{                                                   \
181   R##REG(DSTREG(op)) = DXYTOL(R##REG_XY(SRCREG(op)));     \
182   COUNT_CYCLES(3);                                \
183}
184void tms340x0_device::cvxyl_a(UINT16 op) { CVXYL(A); }
185void tms340x0_device::cvxyl_b(UINT16 op) { CVXYL(B); }
186
187#define MOVX(R)                                     \
188{                                                   \
189   R##REG(DSTREG(op)) = (R##REG(DSTREG(op)) & 0xffff0000) | (UINT16)R##REG(SRCREG(op));    \
190   COUNT_CYCLES(1);                                                                    \
191}
192void tms340x0_device::movx_a(UINT16 op) { MOVX(A); }
193void tms340x0_device::movx_b(UINT16 op) { MOVX(B); }
194
195#define MOVY(R)                                     \
196{                                                   \
197   R##REG(DSTREG(op)) = (R##REG(SRCREG(op)) & 0xffff0000) | (UINT16)R##REG(DSTREG(op));    \
198   COUNT_CYCLES(1);                                                                    \
199}
200void tms340x0_device::movy_a(UINT16 op) { MOVY(A); }
201void tms340x0_device::movy_b(UINT16 op) { MOVY(B); }
202
203
204
205/***************************************************************************
206    PIXEL TRANSFER OPERATIONS
207***************************************************************************/
208
209#define PIXT_RI(R)                                  \
210{                                                   \
211   WPIXEL(R##REG(DSTREG(op)),R##REG(SRCREG(op)));  \
212   COUNT_UNKNOWN_CYCLES(2);                        \
213}
214void tms340x0_device::pixt_ri_a(UINT16 op) { PIXT_RI(A); }
215void tms340x0_device::pixt_ri_b(UINT16 op) { PIXT_RI(B); }
216
217#define PIXT_RIXY(R)                                                                \
218{                                                                                   \
219   if (WINDOW_CHECKING() != 0)                                                      \
220   {                                                                               \
221      CLR_V();                                                                     \
222      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
223         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
224      {                                                                           \
225         SET_V_LOG(1);                                                          \
226         goto skip;                                                              \
227      }                                                                           \
228      if (WINDOW_CHECKING() == 1) goto skip;                                       \
229   }                                                                               \
230   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),R##REG(SRCREG(op)));                               \
231skip:                                                                               \
232   COUNT_UNKNOWN_CYCLES(4);                                                        \
233}
234void tms340x0_device::pixt_rixy_a(UINT16 op) { PIXT_RIXY(A); }
235void tms340x0_device::pixt_rixy_b(UINT16 op) { PIXT_RIXY(B); }
236
237#define PIXT_IR(R)                                  \
238{                                                   \
239   INT32 temp = RPIXEL(R##REG(SRCREG(op)));            \
240   CLR_V();                                         \
241   R##REG(DSTREG(op)) = temp;                          \
242   SET_V_LOG(temp != 0);                          \
243   COUNT_CYCLES(4);                                \
244}
245void tms340x0_device::pixt_ir_a(UINT16 op) { PIXT_IR(A); }
246void tms340x0_device::pixt_ir_b(UINT16 op) { PIXT_IR(B); }
247
248#define PIXT_II(R)                                  \
249{                                                   \
250   WPIXEL(R##REG(DSTREG(op)),RPIXEL(R##REG(SRCREG(op))));  \
251   COUNT_UNKNOWN_CYCLES(4);                        \
252}
253void tms340x0_device::pixt_ii_a(UINT16 op) { PIXT_II(A); }
254void tms340x0_device::pixt_ii_b(UINT16 op) { PIXT_II(B); }
255
256#define PIXT_IXYR(R)                                \
257{                                                   \
258   INT32 temp = RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))); \
259   CLR_V();                                         \
260   R##REG(DSTREG(op)) = temp;                          \
261   SET_V_LOG(temp != 0);                          \
262   COUNT_CYCLES(6);                                \
263}
264void tms340x0_device::pixt_ixyr_a(UINT16 op) { PIXT_IXYR(A); }
265void tms340x0_device::pixt_ixyr_b(UINT16 op) { PIXT_IXYR(B); }
266
267#define PIXT_IXYIXY(R)                                                              \
268{                                                                                   \
269   if (WINDOW_CHECKING() != 0)                                                      \
270   {                                                                               \
271      CLR_V();                                                                     \
272      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
273         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
274      {                                                                           \
275         SET_V_LOG(1);                                                          \
276         goto skip;                                                              \
277      }                                                                           \
278      if (WINDOW_CHECKING() == 1) goto skip;                                       \
279   }                                                                               \
280   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))));            \
281skip:                                                                               \
282   COUNT_UNKNOWN_CYCLES(7);                                                        \
283}
284void tms340x0_device::pixt_ixyixy_a(UINT16 op) { PIXT_IXYIXY(A); }
285void tms340x0_device::pixt_ixyixy_b(UINT16 op) { PIXT_IXYIXY(B); }
286
287#define DRAV(R)                                                                     \
288{                                                                                   \
289   if (WINDOW_CHECKING() != 0)                                                      \
290   {                                                                               \
291      CLR_V();                                                                     \
292      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
293         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
294      {                                                                           \
295         SET_V_LOG(1);                                                          \
296         goto skip;                                                              \
297      }                                                                           \
298      if (WINDOW_CHECKING() == 1) goto skip;                                       \
299   }                                                                               \
300   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),COLOR1());                                      \
301skip:                                                                               \
302   R##REG_X(DSTREG(op)) += R##REG_X(SRCREG(op));                                           \
303   R##REG_Y(DSTREG(op)) += R##REG_Y(SRCREG(op));                                           \
304   COUNT_UNKNOWN_CYCLES(4);                                                        \
305}
306void tms340x0_device::drav_a(UINT16 op) { DRAV(A); }
307void tms340x0_device::drav_b(UINT16 op) { DRAV(B); }
308
309
310
311/***************************************************************************
312    ARITHMETIC OPERATIONS
313***************************************************************************/
314
315#define ABS(R)                                              \
316{                                                           \
317   INT32 *rd = &R##REG(DSTREG(op));                            \
318   INT32 r = 0 - *rd;                                      \
319   CLR_NZV();                                               \
320   if (r > 0) *rd = r;                                     \
321   SET_NZ_VAL(r);                                         \
322   SET_V_LOG(r == (INT32)0x80000000);                     \
323   COUNT_CYCLES(1);                                        \
324}
325void tms340x0_device::abs_a(UINT16 op) { ABS(A); }
326void tms340x0_device::abs_b(UINT16 op) { ABS(B); }
327
328#define ADD(R)                                              \
329{                                                           \
330   INT32 a = R##REG(SRCREG(op));                               \
331   INT32 *rd = &R##REG(DSTREG(op));                            \
332   INT32 b = *rd;                                          \
333   INT32 r = a + b;                                        \
334   CLR_NCZV();                                              \
335   *rd = r;                                                \
336   SET_NZCV_ADD(a,b,r);                                    \
337   COUNT_CYCLES(1);                                        \
338}
339void tms340x0_device::add_a(UINT16 op) { ADD(A); }
340void tms340x0_device::add_b(UINT16 op) { ADD(B); }
341
342#define ADDC(R)                                             \
343{                                                           \
344   /* I'm not sure to which side the carry is added to, should */  \
345   /* verify it against the examples */                    \
346   INT32 a = R##REG(SRCREG(op));                               \
347   INT32 *rd = &R##REG(DSTREG(op));                            \
348   INT32 b = *rd;                                          \
349   INT32 r = a + b + (C_FLAG() ? 1 : 0);                        \
350   CLR_NCZV();                                              \
351   *rd = r;                                                \
352   SET_NZCV_ADD(a,b,r);                                    \
353   COUNT_CYCLES(1);                                        \
354}
355void tms340x0_device::addc_a(UINT16 op) { ADDC(A); }
356void tms340x0_device::addc_b(UINT16 op) { ADDC(B); }
357
358#define ADDI_W(R)                                           \
359{                                                           \
360   INT32 a = PARAM_WORD();                              \
361   INT32 *rd = &R##REG(DSTREG(op));                            \
362   INT32 b = *rd;                                          \
363   INT32 r = a + b;                                        \
364   CLR_NCZV();                                              \
365   *rd = r;                                                \
366   SET_NZCV_ADD(a,b,r);                                    \
367   COUNT_CYCLES(2);                                        \
368}
369void tms340x0_device::addi_w_a(UINT16 op) { ADDI_W(A); }
370void tms340x0_device::addi_w_b(UINT16 op) { ADDI_W(B); }
371
372#define ADDI_L(R)                                           \
373{                                                           \
374   INT32 a = PARAM_LONG();                              \
375   INT32 *rd = &R##REG(DSTREG(op));                            \
376   INT32 b = *rd;                                          \
377   INT32 r = a + b;                                        \
378   CLR_NCZV();                                              \
379   *rd = r;                                                \
380   SET_NZCV_ADD(a,b,r);                                    \
381   COUNT_CYCLES(3);                                        \
382}
383void tms340x0_device::addi_l_a(UINT16 op) { ADDI_L(A); }
384void tms340x0_device::addi_l_b(UINT16 op) { ADDI_L(B); }
385
386#define ADDK(R)                                             \
387{                                                           \
388   INT32 a = fw_inc[PARAM_K(op)];                              \
389   INT32 *rd = &R##REG(DSTREG(op));                            \
390   INT32 b = *rd;                                          \
391   INT32 r = a + b;                                        \
392   CLR_NCZV();                                              \
393   *rd = r;                                                \
394   SET_NZCV_ADD(a,b,r);                                    \
395   COUNT_CYCLES(1);                                        \
396}
397void tms340x0_device::addk_a(UINT16 op) { ADDK(A); }
398void tms340x0_device::addk_b(UINT16 op) { ADDK(B); }
399
400#define AND(R)                                              \
401{                                                           \
402   INT32 *rd = &R##REG(DSTREG(op));                            \
403   CLR_Z();                                                 \
404   *rd &= R##REG(SRCREG(op));                                  \
405   SET_Z_VAL(*rd);                                            \
406   COUNT_CYCLES(1);                                        \
407}
408void tms340x0_device::and_a(UINT16 op) { AND(A); }
409void tms340x0_device::and_b(UINT16 op) { AND(B); }
410
411#define ANDI(R)                                             \
412{                                                           \
413   INT32 *rd = &R##REG(DSTREG(op));                            \
414   CLR_Z();                                                 \
415   *rd &= ~PARAM_LONG();                                \
416   SET_Z_VAL(*rd);                                            \
417   COUNT_CYCLES(3);                                        \
418}
419void tms340x0_device::andi_a(UINT16 op) { ANDI(A); }
420void tms340x0_device::andi_b(UINT16 op) { ANDI(B); }
421
422#define ANDN(R)                                             \
423{                                                           \
424   INT32 *rd = &R##REG(DSTREG(op));                            \
425   CLR_Z();                                                 \
426   *rd &= ~R##REG(SRCREG(op));                                 \
427   SET_Z_VAL(*rd);                                            \
428   COUNT_CYCLES(1);                                        \
429}
430void tms340x0_device::andn_a(UINT16 op) { ANDN(A); }
431void tms340x0_device::andn_b(UINT16 op) { ANDN(B); }
432
433#define BTST_K(R)                                           \
434{                                                           \
435   int bit = 31 - PARAM_K(op);                                 \
436   CLR_Z();                                                 \
437   if (bit <= 29)                                          \
438      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
439   else                                                    \
440      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
441   COUNT_CYCLES(1);                                        \
442}
443void tms340x0_device::btst_k_a(UINT16 op) { BTST_K(A); }
444void tms340x0_device::btst_k_b(UINT16 op) { BTST_K(B); }
445
446#define BTST_R(R)                                           \
447{                                                           \
448   int bit = R##REG(SRCREG(op)) & 0x1f;                        \
449   CLR_Z();                                                 \
450   if (bit <= 29)                                          \
451      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
452   else                                                    \
453      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
454   COUNT_CYCLES(2);                                        \
455}
456void tms340x0_device::btst_r_a(UINT16 op) { BTST_R(A); }
457void tms340x0_device::btst_r_b(UINT16 op) { BTST_R(B); }
458
459void tms340x0_device::clrc(UINT16 op)
460{
461   CLR_C();
462   COUNT_CYCLES(1);
463}
464
465#define CMP(R)                                              \
466{                                                           \
467   INT32 *rs = &R##REG(SRCREG(op));                            \
468   INT32 *rd = &R##REG(DSTREG(op));                            \
469   INT32 r = *rd - *rs;                                    \
470   CLR_NCZV();                                              \
471   SET_NZCV_SUB(*rd,*rs,r);                                \
472   COUNT_CYCLES(1);                                        \
473}
474void tms340x0_device::cmp_a(UINT16 op) { CMP(A); }
475void tms340x0_device::cmp_b(UINT16 op) { CMP(B); }
476
477#define CMPI_W(R)                                           \
478{                                                           \
479   INT32 *rd = &R##REG(DSTREG(op));                            \
480   INT32 t = (INT16)~PARAM_WORD();                      \
481   INT32 r = *rd - t;                                      \
482   CLR_NCZV();                                              \
483   SET_NZCV_SUB(*rd,t,r);                                  \
484   COUNT_CYCLES(2);                                        \
485}
486void tms340x0_device::cmpi_w_a(UINT16 op) { CMPI_W(A); }
487void tms340x0_device::cmpi_w_b(UINT16 op) { CMPI_W(B); }
488
489#define CMPI_L(R)                                           \
490{                                                           \
491   INT32 *rd = &R##REG(DSTREG(op));                            \
492   INT32 t = ~PARAM_LONG();                             \
493   INT32 r = *rd - t;                                      \
494   CLR_NCZV();                                              \
495   SET_NZCV_SUB(*rd,t,r);                                  \
496   COUNT_CYCLES(3);                                        \
497}
498void tms340x0_device::cmpi_l_a(UINT16 op) { CMPI_L(A); }
499void tms340x0_device::cmpi_l_b(UINT16 op) { CMPI_L(B); }
500
501void tms340x0_device::dint(UINT16 op)
502{
503   m_st &= ~STBIT_IE;
504   COUNT_CYCLES(3);
505}
506
507#define DIVS(R)                                             \
508{                                                           \
509   INT32 *rs  = &R##REG(SRCREG(op));                           \
510   INT32 *rd1 = &R##REG(DSTREG(op));                           \
511   CLR_NZV();                                               \
512   if (!(DSTREG(op) & 1))                                      \
513   {                                                       \
514      if (!*rs)                                           \
515      {                                                   \
516         SET_V_LOG(1);                                  \
517      }                                                   \
518      else                                                \
519      {                                                   \
520         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
521         INT64 dividend = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
522         INT64 quotient = dividend / *rs;                \
523         INT32 remainder = dividend % *rs;               \
524         UINT32 signbits = (INT32)quotient >> 31;        \
525         if (EXTRACT_64HI(quotient) != signbits)         \
526         {                                               \
527            SET_V_LOG(1);                              \
528         }                                               \
529         else                                            \
530         {                                               \
531            *rd1 = quotient;                            \
532            *rd2 = remainder;                           \
533            SET_NZ_VAL(*rd1);                          \
534         }                                               \
535      }                                                   \
536      COUNT_CYCLES(40);                                   \
537   }                                                       \
538   else                                                    \
539   {                                                       \
540      if (!*rs)                                           \
541      {                                                   \
542         SET_V_LOG(1);                                  \
543      }                                                   \
544      else                                                \
545      {                                                   \
546         *rd1 /= *rs;                                    \
547         SET_NZ_VAL(*rd1);                              \
548      }                                                   \
549      COUNT_CYCLES(39);                                   \
550   }                                                       \
551}
552void tms340x0_device::divs_a(UINT16 op) { DIVS(A); }
553void tms340x0_device::divs_b(UINT16 op) { DIVS(B); }
554
555#define DIVU(R)                                             \
556{                                                           \
557   INT32 *rs  = &R##REG(SRCREG(op));                           \
558   INT32 *rd1 = &R##REG(DSTREG(op));                           \
559   CLR_ZV();                                                    \
560   if (!(DSTREG(op) & 1))                                      \
561   {                                                       \
562      if (!*rs)                                           \
563      {                                                   \
564         SET_V_LOG(1);                                  \
565      }                                                   \
566      else                                                \
567      {                                                   \
568         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
569         UINT64 dividend  = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
570         UINT64 quotient  = dividend / (UINT32)*rs;      \
571         UINT32 remainder = dividend % (UINT32)*rs;      \
572         if (EXTRACT_64HI(quotient) != 0)                \
573         {                                               \
574            SET_V_LOG(1);                              \
575         }                                               \
576         else                                            \
577         {                                               \
578            *rd1 = quotient;                            \
579            *rd2 = remainder;                           \
580            SET_Z_VAL(*rd1);                           \
581         }                                               \
582      }                                                   \
583   }                                                       \
584   else                                                    \
585   {                                                       \
586      if (!*rs)                                           \
587      {                                                   \
588         SET_V_LOG(1);                                  \
589      }                                                   \
590      else                                                \
591      {                                                   \
592         *rd1 = (UINT32)*rd1 / (UINT32)*rs;              \
593         SET_Z_VAL(*rd1);                               \
594      }                                                   \
595   }                                                       \
596   COUNT_CYCLES(37);                                       \
597}
598void tms340x0_device::divu_a(UINT16 op) { DIVU(A); }
599void tms340x0_device::divu_b(UINT16 op) { DIVU(B); }
600
601void tms340x0_device::eint(UINT16 op)
602{
603   m_st |= STBIT_IE;
604   check_interrupt();
605   COUNT_CYCLES(3);
606}
607
608#define EXGF(F,R)                                               \
609{                                                               \
610   UINT8 shift = F ? 6 : 0;                                    \
611   INT32 *rd = &R##REG(DSTREG(op));                                \
612   UINT32 temp = (m_st >> shift) & 0x3f;                    \
613   m_st &= ~(0x3f << shift);                                \
614   m_st |= (*rd & 0x3f) << shift;                           \
615   *rd = temp;                                                 \
616   COUNT_CYCLES(1);                                            \
617}
618void tms340x0_device::exgf0_a(UINT16 op) { EXGF(0,A); }
619void tms340x0_device::exgf0_b(UINT16 op) { EXGF(0,B); }
620void tms340x0_device::exgf1_a(UINT16 op) { EXGF(1,A); }
621void tms340x0_device::exgf1_b(UINT16 op) { EXGF(1,B); }
622
623#define LMO(R)                                                  \
624{                                                               \
625   UINT32 res = 0;                                             \
626   UINT32 rs  = R##REG(SRCREG(op));                                \
627      INT32 *rd = &R##REG(DSTREG(op));                                \
628   CLR_Z();                                                     \
629   SET_Z_VAL(rs);                                             \
630   if (rs)                                                     \
631   {                                                           \
632      while (!(rs & 0x80000000))                              \
633      {                                                       \
634         res++;                                              \
635         rs <<= 1;                                           \
636      }                                                       \
637   }                                                           \
638   *rd = res;                                                  \
639   COUNT_CYCLES(1);                                            \
640}
641void tms340x0_device::lmo_a(UINT16 op) { LMO(A); }
642void tms340x0_device::lmo_b(UINT16 op) { LMO(B); }
643
644#define MMFM(R)                                                 \
645{                                                               \
646   INT32 i;                                                    \
647   UINT16 l = (UINT16) PARAM_WORD();                        \
648   COUNT_CYCLES(3);                                            \
649   {                                                           \
650      INT32 rd = DSTREG(op);                                      \
651      for (i = 15; i >= 0 ; i--)                              \
652      {                                                       \
653         if (l & 0x8000)                                     \
654         {                                                   \
655            R##REG(i) = RLONG(R##REG(rd));                 \
656            R##REG(rd) += 0x20;                             \
657            COUNT_CYCLES(4);                                \
658         }                                                   \
659         l <<= 1;                                            \
660      }                                                       \
661   }                                                           \
662}
663void tms340x0_device::mmfm_a(UINT16 op) { MMFM(A); }
664void tms340x0_device::mmfm_b(UINT16 op) { MMFM(B); }
665
666#define MMTM(R)                                                 \
667{                                                               \
668   UINT32 i;                                                   \
669   UINT16 l = (UINT16) PARAM_WORD();                        \
670   COUNT_CYCLES(2);                                            \
671   {                                                           \
672      INT32 rd = DSTREG(op);                                      \
673      if (m_is_34020)                                      \
674      {                                                       \
675         CLR_N();                                             \
676         SET_N_VAL(R##REG(rd) ^ 0x80000000);                    \
677      }                                                       \
678      for (i = 0; i  < 16; i++)                               \
679      {                                                       \
680         if (l & 0x8000)                                     \
681         {                                                   \
682            R##REG(rd) -= 0x20;                             \
683            WLONG(R##REG(rd),R##REG(i));                   \
684            COUNT_CYCLES(4);                                \
685         }                                                   \
686         l <<= 1;                                            \
687      }                                                       \
688   }                                                           \
689}
690void tms340x0_device::mmtm_a(UINT16 op) { MMTM(A); }
691void tms340x0_device::mmtm_b(UINT16 op) { MMTM(B); }
692
693#define MODS(R)                                                 \
694{                                                               \
695   INT32 *rs = &R##REG(SRCREG(op));                                \
696   INT32 *rd = &R##REG(DSTREG(op));                                \
697   CLR_NZV();                                                   \
698   if (*rs != 0)                                               \
699   {                                                           \
700      *rd %= *rs;                                             \
701      SET_NZ_VAL(*rd);                                       \
702   }                                                           \
703   else                                                        \
704      SET_V_LOG(1);                                          \
705   COUNT_CYCLES(40);                                           \
706}
707void tms340x0_device::mods_a(UINT16 op) { MODS(A); }
708void tms340x0_device::mods_b(UINT16 op) { MODS(B); }
709
710#define MODU(R)                                                 \
711{                                                               \
712   INT32 *rs = &R##REG(SRCREG(op));                                \
713   INT32 *rd = &R##REG(DSTREG(op));                                \
714   CLR_ZV();                                                        \
715   if (*rs != 0)                                               \
716   {                                                           \
717      *rd = (UINT32)*rd % (UINT32)*rs;                        \
718      SET_Z_VAL(*rd);                                            \
719   }                                                           \
720   else                                                        \
721      SET_V_LOG(1);                                          \
722   COUNT_CYCLES(35);                                           \
723}
724void tms340x0_device::modu_a(UINT16 op) { MODU(A); }
725void tms340x0_device::modu_b(UINT16 op) { MODU(B); }
726
727#define MPYS(R)                                                 \
728{                                                               \
729   INT32 *rd1 = &R##REG(DSTREG(op));                               \
730   INT32 m1 = R##REG(SRCREG(op));                                  \
731   INT64 product;                                              \
732                                                \
733   SEXTEND(m1, FW(1));                                         \
734   CLR_NZ();                                                        \
735   product = mul_32x32(m1, *rd1);                          \
736   SET_Z_LOG(product == 0);                                   \
737   SET_N_BIT(product >> 32, 31);                              \
738                                                \
739   *rd1             = EXTRACT_64HI(product);                       \
740   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
741                                                \
742   COUNT_CYCLES(20);                                           \
743}
744void tms340x0_device::mpys_a(UINT16 op) { MPYS(A); }
745void tms340x0_device::mpys_b(UINT16 op) { MPYS(B); }
746
747#define MPYU(R)                                                 \
748{                                                               \
749   INT32 *rd1 = &R##REG(DSTREG(op));                               \
750   UINT32 m1 = R##REG(SRCREG(op));                                 \
751   UINT64 product;                                             \
752                                                \
753   ZEXTEND(m1, FW(1));                                         \
754   CLR_Z();                                                     \
755   product = mulu_32x32(m1, *rd1);                     \
756   SET_Z_LOG(product == 0);                                   \
757                                                \
758   *rd1             = EXTRACT_64HI(product);                       \
759   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
760                                                \
761   COUNT_CYCLES(21);                                           \
762}
763void tms340x0_device::mpyu_a(UINT16 op) { MPYU(A); }
764void tms340x0_device::mpyu_b(UINT16 op) { MPYU(B); }
765
766#define NEG(R)                                                  \
767{                                                               \
768   INT32 *rd = &R##REG(DSTREG(op));                                \
769   INT32 r = 0 - *rd;                                          \
770   CLR_NCZV();                                                  \
771   SET_NZCV_SUB(0,*rd,r);                                      \
772   *rd = r;                                                    \
773   COUNT_CYCLES(1);                                            \
774}
775void tms340x0_device::neg_a(UINT16 op) { NEG(A); }
776void tms340x0_device::neg_b(UINT16 op) { NEG(B); }
777
778#define NEGB(R)                                                 \
779{                                                               \
780   INT32 *rd = &R##REG(DSTREG(op));                                \
781   INT32 t = *rd + (C_FLAG() ? 1 : 0);                          \
782   INT32 r = 0 - t;                                            \
783   CLR_NCZV();                                                  \
784   SET_NZCV_SUB(0,t,r);                                        \
785   *rd = r;                                                    \
786   COUNT_CYCLES(1);                                            \
787}
788void tms340x0_device::negb_a(UINT16 op) { NEGB(A); }
789void tms340x0_device::negb_b(UINT16 op) { NEGB(B); }
790
791void tms340x0_device::nop(UINT16 op)
792{
793   COUNT_CYCLES(1);
794}
795
796#define NOT(R)                                                  \
797{                                                               \
798   INT32 *rd = &R##REG(DSTREG(op));                                \
799   CLR_Z();                                                     \
800   *rd = ~(*rd);                                               \
801   SET_Z_VAL(*rd);                                                \
802   COUNT_CYCLES(1);                                            \
803}
804void tms340x0_device::not_a(UINT16 op) { NOT(A); }
805void tms340x0_device::not_b(UINT16 op) { NOT(B); }
806
807#define OR(R)                                                   \
808{                                                               \
809   INT32 *rd = &R##REG(DSTREG(op));                                \
810   CLR_Z();                                                     \
811   *rd |= R##REG(SRCREG(op));                                      \
812   SET_Z_VAL(*rd);                                                \
813   COUNT_CYCLES(1);                                            \
814}
815void tms340x0_device::or_a(UINT16 op) { OR(A); }
816void tms340x0_device::or_b(UINT16 op) { OR(B); }
817
818#define ORI(R)                                                  \
819{                                                               \
820   INT32 *rd = &R##REG(DSTREG(op));                                \
821   CLR_Z();                                                     \
822   *rd |= PARAM_LONG();                                     \
823   SET_Z_VAL(*rd);                                                \
824   COUNT_CYCLES(3);                                            \
825}
826void tms340x0_device::ori_a(UINT16 op) { ORI(A); }
827void tms340x0_device::ori_b(UINT16 op) { ORI(B); }
828
829void tms340x0_device::setc(UINT16 op)
830{
831   SET_C_LOG(1);
832   COUNT_CYCLES(1);
833}
834
835#define SETF(F)                                                 \
836{                                                               \
837   UINT8 shift = F ? 6 : 0;                                    \
838   m_st &= ~(0x3f << shift);                                \
839   m_st |= (op & 0x3f) << shift;                        \
840   COUNT_CYCLES(1+F);                                          \
841}
842void tms340x0_device::setf0(UINT16 op) { SETF(0); }
843void tms340x0_device::setf1(UINT16 op) { SETF(1); }
844
845#define SEXT(F,R)                                               \
846{                                                               \
847   INT32 *rd = &R##REG(DSTREG(op));                                \
848   CLR_NZ();                                                        \
849   SEXTEND(*rd,FW(F));                                         \
850   SET_NZ_VAL(*rd);                                           \
851   COUNT_CYCLES(3);                                            \
852}
853void tms340x0_device::sext0_a(UINT16 op) { SEXT(0,A); }
854void tms340x0_device::sext0_b(UINT16 op) { SEXT(0,B); }
855void tms340x0_device::sext1_a(UINT16 op) { SEXT(1,A); }
856void tms340x0_device::sext1_b(UINT16 op) { SEXT(1,B); }
857
858#define RL(R,K)                                                 \
859{                                                               \
860   INT32 *rd = &R##REG(DSTREG(op));                                \
861   INT32 res = *rd;                                            \
862   INT32 k = (K);                                              \
863   CLR_CZ();                                                        \
864   if (k)                                                      \
865   {                                                           \
866      res<<=(k-1);                                            \
867      SET_C_BIT_HI(res, 31);                                 \
868      res<<=1;                                                \
869      res |= (((UINT32)*rd)>>((-k)&0x1f));                    \
870      *rd = res;                                              \
871   }                                                           \
872   SET_Z_VAL(res);                                                \
873   COUNT_CYCLES(1);                                            \
874}
875void tms340x0_device::rl_k_a(UINT16 op) { RL(A,PARAM_K(op)); }
876void tms340x0_device::rl_k_b(UINT16 op) { RL(B,PARAM_K(op)); }
877void tms340x0_device::rl_r_a(UINT16 op) { RL(A,AREG(SRCREG(op))&0x1f); }
878void tms340x0_device::rl_r_b(UINT16 op) { RL(B,BREG(SRCREG(op))&0x1f); }
879
880#define SLA(R,K)                                                \
881{                                                               \
882      INT32 *rd = &R##REG(DSTREG(op));                                \
883   UINT32 res = *rd;                                           \
884      INT32 k = K;                                                \
885   CLR_NCZV();                                                  \
886   if (k)                                                      \
887   {                                                           \
888      UINT32 mask = (0xffffffff<<(31-k))&0x7fffffff;          \
889      UINT32 res2 = SIGN(res) ? res^mask : res;               \
890      SET_V_LOG((res2 & mask) != 0);                         \
891                                                \
892      res<<=(k-1);                                            \
893      SET_C_BIT_HI(res, 31);                                 \
894      res<<=1;                                                \
895      *rd = res;                                              \
896   }                                                           \
897   SET_NZ_VAL(res);                                           \
898   COUNT_CYCLES(3);                                            \
899}
900void tms340x0_device::sla_k_a(UINT16 op) { SLA(A,PARAM_K(op)); }
901void tms340x0_device::sla_k_b(UINT16 op) { SLA(B,PARAM_K(op)); }
902void tms340x0_device::sla_r_a(UINT16 op) { SLA(A,AREG(SRCREG(op))&0x1f); }
903void tms340x0_device::sla_r_b(UINT16 op) { SLA(B,BREG(SRCREG(op))&0x1f); }
904
905#define SLL(R,K)                                                \
906{                                                               \
907      INT32 *rd = &R##REG(DSTREG(op));                                \
908   UINT32 res = *rd;                                           \
909      INT32 k = K;                                                \
910   CLR_CZ();                                                        \
911   if (k)                                                      \
912   {                                                           \
913      res<<=(k-1);                                            \
914      SET_C_BIT_HI(res, 31);                                 \
915      res<<=1;                                                \
916      *rd = res;                                              \
917   }                                                           \
918   SET_Z_VAL(res);                                                \
919   COUNT_CYCLES(1);                                            \
920}
921void tms340x0_device::sll_k_a(UINT16 op) { SLL(A,PARAM_K(op)); }
922void tms340x0_device::sll_k_b(UINT16 op) { SLL(B,PARAM_K(op)); }
923void tms340x0_device::sll_r_a(UINT16 op) { SLL(A,AREG(SRCREG(op))&0x1f); }
924void tms340x0_device::sll_r_b(UINT16 op) { SLL(B,BREG(SRCREG(op))&0x1f); }
925
926#define SRA(R,K)                                                \
927{                                                               \
928   INT32 *rd = &R##REG(DSTREG(op));                                \
929   INT32 res = *rd;                                            \
930   INT32 k = (-(K)) & 0x1f;                                    \
931   CLR_NCZ();                                                   \
932   if (k)                                                      \
933   {                                                           \
934      res>>=(k-1);                                            \
935      SET_C_BIT_LO(res, 0);                                  \
936      res>>=1;                                                \
937      *rd = res;                                              \
938   }                                                           \
939   SET_NZ_VAL(res);                                           \
940   COUNT_CYCLES(1);                                            \
941}
942void tms340x0_device::sra_k_a(UINT16 op) { SRA(A,PARAM_K(op)); }
943void tms340x0_device::sra_k_b(UINT16 op) { SRA(B,PARAM_K(op)); }
944void tms340x0_device::sra_r_a(UINT16 op) { SRA(A,AREG(SRCREG(op))); }
945void tms340x0_device::sra_r_b(UINT16 op) { SRA(B,BREG(SRCREG(op))); }
946
947#define SRL(R,K)                                                \
948{                                                               \
949      INT32 *rd = &R##REG(DSTREG(op));                                \
950   UINT32 res = *rd;                                           \
951      INT32 k = (-(K)) & 0x1f;                                    \
952   CLR_CZ();                                                        \
953   if (k)                                                      \
954   {                                                           \
955      res>>=(k-1);                                            \
956      SET_C_BIT_LO(res, 0);                                  \
957      res>>=1;                                                \
958      *rd = res;                                              \
959   }                                                           \
960   SET_Z_VAL(res);                                                \
961   COUNT_CYCLES(1);                                            \
962}
963void tms340x0_device::srl_k_a(UINT16 op) { SRL(A,PARAM_K(op)); }
964void tms340x0_device::srl_k_b(UINT16 op) { SRL(B,PARAM_K(op)); }
965void tms340x0_device::srl_r_a(UINT16 op) { SRL(A,AREG(SRCREG(op))); }
966void tms340x0_device::srl_r_b(UINT16 op) { SRL(B,BREG(SRCREG(op))); }
967
968#define SUB(R)                                                  \
969{                                                               \
970   INT32 *rs = &R##REG(SRCREG(op));                                \
971   INT32 *rd = &R##REG(DSTREG(op));                                \
972   INT32 r = *rd - *rs;                                        \
973   CLR_NCZV();                                                  \
974   SET_NZCV_SUB(*rd,*rs,r);                                    \
975   *rd = r;                                                    \
976   COUNT_CYCLES(1);                                            \
977}
978void tms340x0_device::sub_a(UINT16 op) { SUB(A); }
979void tms340x0_device::sub_b(UINT16 op) { SUB(B); }
980
981#define SUBB(R)                                                 \
982{                                                               \
983   INT32 *rd = &R##REG(DSTREG(op));                                \
984   INT32 t = R##REG(SRCREG(op));                                   \
985   INT32 r = *rd - t - (C_FLAG() ? 1 : 0);                      \
986   CLR_NCZV();                                                  \
987   SET_NZCV_SUB(*rd,t,r);                                      \
988   *rd = r;                                                    \
989   COUNT_CYCLES(1);                                            \
990}
991void tms340x0_device::subb_a(UINT16 op) { SUBB(A); }
992void tms340x0_device::subb_b(UINT16 op) { SUBB(B); }
993
994#define SUBI_W(R)                                               \
995{                                                               \
996   INT32 *rd = &R##REG(DSTREG(op));                                \
997   INT32 r;                                                    \
998   INT32 t = ~PARAM_WORD();                                 \
999   CLR_NCZV();                                                  \
1000   r = *rd - t;                                                \
1001   SET_NZCV_SUB(*rd,t,r);                                      \
1002   *rd = r;                                                    \
1003   COUNT_CYCLES(2);                                            \
1004}
1005void tms340x0_device::subi_w_a(UINT16 op) { SUBI_W(A); }
1006void tms340x0_device::subi_w_b(UINT16 op) { SUBI_W(B); }
1007
1008#define SUBI_L(R)                                               \
1009{                                                               \
1010   INT32 *rd = &R##REG(DSTREG(op));                                \
1011   INT32 t = ~PARAM_LONG();                                 \
1012   INT32 r = *rd - t;                                          \
1013   CLR_NCZV();                                                  \
1014   SET_NZCV_SUB(*rd,t,r);                                      \
1015   *rd = r;                                                    \
1016   COUNT_CYCLES(3);                                            \
1017}
1018void tms340x0_device::subi_l_a(UINT16 op) { SUBI_L(A); }
1019void tms340x0_device::subi_l_b(UINT16 op) { SUBI_L(B); }
1020
1021#define SUBK(R)                                                 \
1022{                                                               \
1023   INT32 *rd = &R##REG(DSTREG(op));                                \
1024   INT32 t = fw_inc[PARAM_K(op)];                                  \
1025   INT32 r = *rd - t;                                          \
1026   CLR_NCZV();                                                  \
1027   SET_NZCV_SUB(*rd,t,r);                                      \
1028   *rd = r;                                                    \
1029   COUNT_CYCLES(1);                                            \
1030}
1031void tms340x0_device::subk_a(UINT16 op) { SUBK(A); }
1032void tms340x0_device::subk_b(UINT16 op) { SUBK(B); }
1033
1034#define XOR(R)                                                  \
1035{                                                               \
1036   INT32 *rd = &R##REG(DSTREG(op));                                \
1037   CLR_Z();                                                     \
1038   *rd ^= R##REG(SRCREG(op));                                      \
1039   SET_Z_VAL(*rd);                                                \
1040   COUNT_CYCLES(1);                                            \
1041}
1042void tms340x0_device::xor_a(UINT16 op) { XOR(A); }
1043void tms340x0_device::xor_b(UINT16 op) { XOR(B); }
1044
1045#define XORI(R)                                                 \
1046{                                                               \
1047   INT32 *rd = &R##REG(DSTREG(op));                                \
1048   CLR_Z();                                                     \
1049   *rd ^= PARAM_LONG();                                     \
1050   SET_Z_VAL(*rd);                                                \
1051   COUNT_CYCLES(3);                                            \
1052}
1053void tms340x0_device::xori_a(UINT16 op) { XORI(A); }
1054void tms340x0_device::xori_b(UINT16 op) { XORI(B); }
1055
1056#define ZEXT(F,R)                                               \
1057{                                                               \
1058   INT32 *rd = &R##REG(DSTREG(op));                                \
1059   CLR_Z();                                                     \
1060   ZEXTEND(*rd,FW(F));                                         \
1061   SET_Z_VAL(*rd);                                                \
1062   COUNT_CYCLES(1);                                            \
1063}
1064void tms340x0_device::zext0_a(UINT16 op) { ZEXT(0,A); }
1065void tms340x0_device::zext0_b(UINT16 op) { ZEXT(0,B); }
1066void tms340x0_device::zext1_a(UINT16 op) { ZEXT(1,A); }
1067void tms340x0_device::zext1_b(UINT16 op) { ZEXT(1,B); }
1068
1069
1070
1071/***************************************************************************
1072    MOVE INSTRUCTIONS
1073***************************************************************************/
1074
1075#define MOVI_W(R)                                               \
1076{                                                               \
1077   INT32 *rd = &R##REG(DSTREG(op));                                \
1078   CLR_NZV();                                                   \
1079   *rd=PARAM_WORD();                                        \
1080   SET_NZ_VAL(*rd);                                           \
1081   COUNT_CYCLES(2);                                            \
1082}
1083void tms340x0_device::movi_w_a(UINT16 op) { MOVI_W(A); }
1084void tms340x0_device::movi_w_b(UINT16 op) { MOVI_W(B); }
1085
1086#define MOVI_L(R)                                               \
1087{                                                               \
1088   INT32 *rd = &R##REG(DSTREG(op));                                \
1089   CLR_NZV();                                                   \
1090   *rd=PARAM_LONG();                                        \
1091   SET_NZ_VAL(*rd);                                           \
1092   COUNT_CYCLES(3);                                            \
1093}
1094void tms340x0_device::movi_l_a(UINT16 op) { MOVI_L(A); }
1095void tms340x0_device::movi_l_b(UINT16 op) { MOVI_L(B); }
1096
1097#define MOVK(R)                                                 \
1098{                                                               \
1099   INT32 k = PARAM_K(op); if (!k) k = 32;                          \
1100   R##REG(DSTREG(op)) = k;                                         \
1101   COUNT_CYCLES(1);                                            \
1102}
1103void tms340x0_device::movk_a(UINT16 op) { MOVK(A); }
1104void tms340x0_device::movk_b(UINT16 op) { MOVK(B); }
1105
1106#define MOVB_RN(R)                                              \
1107{                                                               \
1108   WBYTE(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                      \
1109   COUNT_CYCLES(1);                                            \
1110}
1111void tms340x0_device::movb_rn_a(UINT16 op) { MOVB_RN(A); }
1112void tms340x0_device::movb_rn_b(UINT16 op) { MOVB_RN(B); }
1113
1114#define MOVB_NR(R)                                              \
1115{                                                               \
1116   INT32 *rd = &R##REG(DSTREG(op));                                \
1117   CLR_NZV();                                                   \
1118   *rd = (INT8)RBYTE(R##REG(SRCREG(op)));                     \
1119   SET_NZ_VAL(*rd);                                           \
1120   COUNT_CYCLES(3);                                            \
1121}
1122void tms340x0_device::movb_nr_a(UINT16 op) { MOVB_NR(A); }
1123void tms340x0_device::movb_nr_b(UINT16 op) { MOVB_NR(B); }
1124
1125#define MOVB_NN(R)                                              \
1126{                                                               \
1127   WBYTE(R##REG(DSTREG(op)),(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))));\
1128   COUNT_CYCLES(3);                                            \
1129}
1130void tms340x0_device::movb_nn_a(UINT16 op) { MOVB_NN(A); }
1131void tms340x0_device::movb_nn_b(UINT16 op) { MOVB_NN(B); }
1132
1133#define MOVB_R_NO(R)                                            \
1134{                                                               \
1135   INT32 o = PARAM_WORD();                                  \
1136   WBYTE(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                        \
1137   COUNT_CYCLES(3);                                            \
1138}
1139void tms340x0_device::movb_r_no_a(UINT16 op) { MOVB_R_NO(A); }
1140void tms340x0_device::movb_r_no_b(UINT16 op) { MOVB_R_NO(B); }
1141
1142#define MOVB_NO_R(R)                                            \
1143{                                                               \
1144   INT32 *rd = &R##REG(DSTREG(op));                                \
1145   INT32 o = PARAM_WORD();                                  \
1146   CLR_NZV();                                                   \
1147   *rd = (INT8)RBYTE(R##REG(SRCREG(op))+o);                   \
1148   SET_NZ_VAL(*rd);                                           \
1149   COUNT_CYCLES(5);                                            \
1150}
1151void tms340x0_device::movb_no_r_a(UINT16 op) { MOVB_NO_R(A); }
1152void tms340x0_device::movb_no_r_b(UINT16 op) { MOVB_NO_R(B); }
1153
1154#define MOVB_NO_NO(R)                                           \
1155{                                                               \
1156   INT32 o1 = PARAM_WORD();                                 \
1157   INT32 o2 = PARAM_WORD();                                 \
1158   WBYTE(R##REG(DSTREG(op))+o2,(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))+o1)); \
1159   COUNT_CYCLES(5);                                            \
1160}
1161void tms340x0_device::movb_no_no_a(UINT16 op) { MOVB_NO_NO(A); }
1162void tms340x0_device::movb_no_no_b(UINT16 op) { MOVB_NO_NO(B); }
1163
1164#define MOVB_RA(R)                                              \
1165{                                                               \
1166   WBYTE(PARAM_LONG(),R##REG(DSTREG(op)));                     \
1167   COUNT_CYCLES(1);                                            \
1168}
1169void tms340x0_device::movb_ra_a(UINT16 op) { MOVB_RA(A); }
1170void tms340x0_device::movb_ra_b(UINT16 op) { MOVB_RA(B); }
1171
1172#define MOVB_AR(R)                                              \
1173{                                                               \
1174   INT32 *rd = &R##REG(DSTREG(op));                                \
1175   CLR_NZV();                                                   \
1176   *rd = (INT8)RBYTE(PARAM_LONG());                    \
1177   SET_NZ_VAL(*rd);                                           \
1178   COUNT_CYCLES(5);                                            \
1179}
1180void tms340x0_device::movb_ar_a(UINT16 op) { MOVB_AR(A); }
1181void tms340x0_device::movb_ar_b(UINT16 op) { MOVB_AR(B); }
1182
1183void tms340x0_device::movb_aa(UINT16 op)
1184{
1185   UINT32 bitaddrs=PARAM_LONG();
1186   WBYTE(PARAM_LONG(),(UINT32)(UINT8)RBYTE(bitaddrs));
1187   COUNT_CYCLES(6);
1188}
1189
1190#define MOVE_RR(RS,RD)                                          \
1191{                                                               \
1192   INT32 *rd = &RD##REG(DSTREG(op));                               \
1193   CLR_NZV();                                                   \
1194   *rd = RS##REG(SRCREG(op));                                      \
1195   SET_NZ_VAL(*rd);                                           \
1196   COUNT_CYCLES(1);                                            \
1197}
1198void tms340x0_device::move_rr_a (UINT16 op) { MOVE_RR(A,A); }
1199void tms340x0_device::move_rr_b (UINT16 op) { MOVE_RR(B,B); }
1200void tms340x0_device::move_rr_ax(UINT16 op) { MOVE_RR(A,B); }
1201void tms340x0_device::move_rr_bx(UINT16 op) { MOVE_RR(B,A); }
1202
1203#define MOVE_RN(F,R)                                            \
1204{                                                               \
1205   WFIELD##F(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                   \
1206   COUNT_CYCLES(1);                                            \
1207}
1208void tms340x0_device::move0_rn_a (UINT16 op) { MOVE_RN(0,A); }
1209void tms340x0_device::move0_rn_b (UINT16 op) { MOVE_RN(0,B); }
1210void tms340x0_device::move1_rn_a (UINT16 op) { MOVE_RN(1,A); }
1211void tms340x0_device::move1_rn_b (UINT16 op) { MOVE_RN(1,B); }
1212
1213#define MOVE_R_DN(F,R)                                          \
1214{                                                               \
1215   INT32 *rd = &R##REG(DSTREG(op));                                \
1216   *rd-=fw_inc[FW(F)];                                         \
1217   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1218   COUNT_CYCLES(2);                                            \
1219}
1220void tms340x0_device::move0_r_dn_a (UINT16 op) { MOVE_R_DN(0,A); }
1221void tms340x0_device::move0_r_dn_b (UINT16 op) { MOVE_R_DN(0,B); }
1222void tms340x0_device::move1_r_dn_a (UINT16 op) { MOVE_R_DN(1,A); }
1223void tms340x0_device::move1_r_dn_b (UINT16 op) { MOVE_R_DN(1,B); }
1224
1225#define MOVE_R_NI(F,R)                                          \
1226{                                                               \
1227   INT32 *rd = &R##REG(DSTREG(op));                                \
1228   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1229   *rd+=fw_inc[FW(F)];                                         \
1230   COUNT_CYCLES(1);                                            \
1231}
1232void tms340x0_device::move0_r_ni_a (UINT16 op) { MOVE_R_NI(0,A); }
1233void tms340x0_device::move0_r_ni_b (UINT16 op) { MOVE_R_NI(0,B); }
1234void tms340x0_device::move1_r_ni_a (UINT16 op) { MOVE_R_NI(1,A); }
1235void tms340x0_device::move1_r_ni_b (UINT16 op) { MOVE_R_NI(1,B); }
1236
1237#define MOVE_NR(F,R)                                            \
1238{                                                               \
1239   INT32 *rd = &R##REG(DSTREG(op));                                \
1240   CLR_NZV();                                                   \
1241   *rd = RFIELD##F(R##REG(SRCREG(op)));                            \
1242   SET_NZ_VAL(*rd);                                           \
1243   COUNT_CYCLES(3);                                            \
1244}
1245void tms340x0_device::move0_nr_a (UINT16 op) { MOVE_NR(0,A); }
1246void tms340x0_device::move0_nr_b (UINT16 op) { MOVE_NR(0,B); }
1247void tms340x0_device::move1_nr_a (UINT16 op) { MOVE_NR(1,A); }
1248void tms340x0_device::move1_nr_b (UINT16 op) { MOVE_NR(1,B); }
1249
1250#define MOVE_DN_R(F,R)                                          \
1251{                                                               \
1252   INT32 *rd = &R##REG(DSTREG(op));                                \
1253   INT32 *rs = &R##REG(SRCREG(op));                                \
1254   CLR_NZV();                                                   \
1255   *rs-=fw_inc[FW(F)];                                         \
1256   *rd = RFIELD##F(*rs);                                       \
1257   SET_NZ_VAL(*rd);                                           \
1258   COUNT_CYCLES(4);                                            \
1259}
1260void tms340x0_device::move0_dn_r_a (UINT16 op) { MOVE_DN_R(0,A); }
1261void tms340x0_device::move0_dn_r_b (UINT16 op) { MOVE_DN_R(0,B); }
1262void tms340x0_device::move1_dn_r_a (UINT16 op) { MOVE_DN_R(1,A); }
1263void tms340x0_device::move1_dn_r_b (UINT16 op) { MOVE_DN_R(1,B); }
1264
1265#define MOVE_NI_R(F,R)                                          \
1266{                                                               \
1267   INT32 *rd = &R##REG(DSTREG(op));                                \
1268   INT32 *rs = &R##REG(SRCREG(op));                                \
1269   INT32 data = RFIELD##F(*rs);                                \
1270   CLR_NZV();                                                   \
1271   *rs+=fw_inc[FW(F)];                                         \
1272   *rd = data;                                                 \
1273   SET_NZ_VAL(*rd);                                           \
1274   COUNT_CYCLES(3);                                            \
1275}
1276void tms340x0_device::move0_ni_r_a (UINT16 op) { MOVE_NI_R(0,A); }
1277void tms340x0_device::move0_ni_r_b (UINT16 op) { MOVE_NI_R(0,B); }
1278void tms340x0_device::move1_ni_r_a (UINT16 op) { MOVE_NI_R(1,A); }
1279void tms340x0_device::move1_ni_r_b (UINT16 op) { MOVE_NI_R(1,B); }
1280
1281#define MOVE_NN(F,R)                                            \
1282{                                                               \
1283   WFIELD##F(R##REG(DSTREG(op)),RFIELD##F(R##REG(SRCREG(op))));        \
1284   COUNT_CYCLES(3);                                            \
1285}
1286void tms340x0_device::move0_nn_a (UINT16 op) { MOVE_NN(0,A); }
1287void tms340x0_device::move0_nn_b (UINT16 op) { MOVE_NN(0,B); }
1288void tms340x0_device::move1_nn_a (UINT16 op) { MOVE_NN(1,A); }
1289void tms340x0_device::move1_nn_b (UINT16 op) { MOVE_NN(1,B); }
1290
1291#define MOVE_DN_DN(F,R)                                         \
1292{                                                               \
1293   INT32 *rd = &R##REG(DSTREG(op));                                \
1294   INT32 *rs = &R##REG(SRCREG(op));                                \
1295   INT32 data;                                                 \
1296   *rs-=fw_inc[FW(F)];                                         \
1297   data = RFIELD##F(*rs);                                      \
1298   *rd-=fw_inc[FW(F)];                                         \
1299   WFIELD##F(*rd,data);                                        \
1300   COUNT_CYCLES(4);                                            \
1301}
1302void tms340x0_device::move0_dn_dn_a (UINT16 op) { MOVE_DN_DN(0,A); }
1303void tms340x0_device::move0_dn_dn_b (UINT16 op) { MOVE_DN_DN(0,B); }
1304void tms340x0_device::move1_dn_dn_a (UINT16 op) { MOVE_DN_DN(1,A); }
1305void tms340x0_device::move1_dn_dn_b (UINT16 op) { MOVE_DN_DN(1,B); }
1306
1307#define MOVE_NI_NI(F,R)                                         \
1308{                                                               \
1309   INT32 *rd = &R##REG(DSTREG(op));                                \
1310   INT32 *rs = &R##REG(SRCREG(op));                                \
1311   INT32 data = RFIELD##F(*rs);                                \
1312   *rs+=fw_inc[FW(F)];                                         \
1313   WFIELD##F(*rd,data);                                        \
1314   *rd+=fw_inc[FW(F)];                                         \
1315   COUNT_CYCLES(4);                                            \
1316}
1317void tms340x0_device::move0_ni_ni_a (UINT16 op) { MOVE_NI_NI(0,A); }
1318void tms340x0_device::move0_ni_ni_b (UINT16 op) { MOVE_NI_NI(0,B); }
1319void tms340x0_device::move1_ni_ni_a (UINT16 op) { MOVE_NI_NI(1,A); }
1320void tms340x0_device::move1_ni_ni_b (UINT16 op) { MOVE_NI_NI(1,B); }
1321
1322#define MOVE_R_NO(F,R)                                          \
1323{                                                               \
1324   INT32 o = PARAM_WORD();                                  \
1325   WFIELD##F(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                 \
1326   COUNT_CYCLES(3);                                            \
1327}
1328void tms340x0_device::move0_r_no_a (UINT16 op) { MOVE_R_NO(0,A); }
1329void tms340x0_device::move0_r_no_b (UINT16 op) { MOVE_R_NO(0,B); }
1330void tms340x0_device::move1_r_no_a (UINT16 op) { MOVE_R_NO(1,A); }
1331void tms340x0_device::move1_r_no_b (UINT16 op) { MOVE_R_NO(1,B); }
1332
1333#define MOVE_NO_R(F,R)                                          \
1334{                                                               \
1335   INT32 *rd = &R##REG(DSTREG(op));                                \
1336   INT32 o = PARAM_WORD();                                  \
1337   CLR_NZV();                                                   \
1338   *rd = RFIELD##F(R##REG(SRCREG(op))+o);                          \
1339   SET_NZ_VAL(*rd);                                           \
1340   COUNT_CYCLES(5);                                            \
1341}
1342void tms340x0_device::move0_no_r_a (UINT16 op) { MOVE_NO_R(0,A); }
1343void tms340x0_device::move0_no_r_b (UINT16 op) { MOVE_NO_R(0,B); }
1344void tms340x0_device::move1_no_r_a (UINT16 op) { MOVE_NO_R(1,A); }
1345void tms340x0_device::move1_no_r_b (UINT16 op) { MOVE_NO_R(1,B); }
1346
1347#define MOVE_NO_NI(F,R)                                         \
1348{                                                               \
1349   INT32 *rd = &R##REG(DSTREG(op));                                \
1350   INT32 o = PARAM_WORD();                                  \
1351   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o);                   \
1352   WFIELD##F(*rd,data);                                        \
1353   *rd+=fw_inc[FW(F)];                                         \
1354   COUNT_CYCLES(5);                                            \
1355}
1356void tms340x0_device::move0_no_ni_a (UINT16 op) { MOVE_NO_NI(0,A); }
1357void tms340x0_device::move0_no_ni_b (UINT16 op) { MOVE_NO_NI(0,B); }
1358void tms340x0_device::move1_no_ni_a (UINT16 op) { MOVE_NO_NI(1,A); }
1359void tms340x0_device::move1_no_ni_b (UINT16 op) { MOVE_NO_NI(1,B); }
1360
1361#define MOVE_NO_NO(F,R)                                         \
1362{                                                               \
1363   INT32 o1 = PARAM_WORD();                                 \
1364   INT32 o2 = PARAM_WORD();                                 \
1365   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o1);                  \
1366   WFIELD##F(R##REG(DSTREG(op))+o2,data);                          \
1367   COUNT_CYCLES(5);                                            \
1368}
1369void tms340x0_device::move0_no_no_a (UINT16 op) { MOVE_NO_NO(0,A); }
1370void tms340x0_device::move0_no_no_b (UINT16 op) { MOVE_NO_NO(0,B); }
1371void tms340x0_device::move1_no_no_a (UINT16 op) { MOVE_NO_NO(1,A); }
1372void tms340x0_device::move1_no_no_b (UINT16 op) { MOVE_NO_NO(1,B); }
1373
1374#define MOVE_RA(F,R)                                            \
1375{                                                               \
1376   WFIELD##F(PARAM_LONG(),R##REG(DSTREG(op)));                  \
1377   COUNT_CYCLES(3);                                            \
1378}
1379void tms340x0_device::move0_ra_a (UINT16 op) { MOVE_RA(0,A); }
1380void tms340x0_device::move0_ra_b (UINT16 op) { MOVE_RA(0,B); }
1381void tms340x0_device::move1_ra_a (UINT16 op) { MOVE_RA(1,A); }
1382void tms340x0_device::move1_ra_b (UINT16 op) { MOVE_RA(1,B); }
1383
1384#define MOVE_AR(F,R)                                            \
1385{                                                               \
1386   INT32 *rd = &R##REG(DSTREG(op));                                \
1387   CLR_NZV();                                                   \
1388   *rd = RFIELD##F(PARAM_LONG());                           \
1389   SET_NZ_VAL(*rd);                                           \
1390   COUNT_CYCLES(5);                                            \
1391}
1392void tms340x0_device::move0_ar_a (UINT16 op) { MOVE_AR(0,A); }
1393void tms340x0_device::move0_ar_b (UINT16 op) { MOVE_AR(0,B); }
1394void tms340x0_device::move1_ar_a (UINT16 op) { MOVE_AR(1,A); }
1395void tms340x0_device::move1_ar_b (UINT16 op) { MOVE_AR(1,B); }
1396
1397#define MOVE_A_NI(F,R)                                          \
1398{                                                               \
1399   INT32 *rd = &R##REG(DSTREG(op));                                \
1400   WFIELD##F(*rd,RFIELD##F(PARAM_LONG()));                  \
1401   *rd+=fw_inc[FW(F)];                                         \
1402   COUNT_CYCLES(5);                                            \
1403}
1404void tms340x0_device::move0_a_ni_a (UINT16 op) { MOVE_A_NI(0,A); }
1405void tms340x0_device::move0_a_ni_b (UINT16 op) { MOVE_A_NI(0,B); }
1406void tms340x0_device::move1_a_ni_a (UINT16 op) { MOVE_A_NI(1,A); }
1407void tms340x0_device::move1_a_ni_b (UINT16 op) { MOVE_A_NI(1,B); }
1408
1409#define MOVE_AA(F)                                              \
1410{                                                               \
1411   UINT32 bitaddrs=PARAM_LONG();                            \
1412   WFIELD##F(PARAM_LONG(),RFIELD##F(bitaddrs));             \
1413   COUNT_CYCLES(7);                                            \
1414}
1415void tms340x0_device::move0_aa (UINT16 op) { MOVE_AA(0); }
1416void tms340x0_device::move1_aa (UINT16 op) { MOVE_AA(1); }
1417
1418
1419
1420/***************************************************************************
1421    PROGRAM CONTROL INSTRUCTIONS
1422***************************************************************************/
1423
1424#define CALL(R)                                                 \
1425{                                                               \
1426   PUSH(m_pc);                                                 \
1427   m_pc = R##REG(DSTREG(op));                                       \
1428   CORRECT_ODD_PC("CALL");                                     \
1429   COUNT_CYCLES(3);                                            \
1430}
1431void tms340x0_device::call_a (UINT16 op) { CALL(A); }
1432void tms340x0_device::call_b (UINT16 op) { CALL(B); }
1433
1434void tms340x0_device::callr(UINT16 op)
1435{
1436   PUSH(m_pc+0x10);
1437   m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;
1438   COUNT_CYCLES(3);
1439}
1440
1441void tms340x0_device::calla(UINT16 op)
1442{
1443   PUSH(m_pc+0x20);
1444   m_pc = PARAM_LONG_NO_INC();
1445   CORRECT_ODD_PC("CALLA");
1446   COUNT_CYCLES(4);
1447}
1448
1449#define DSJ(R)                                                  \
1450{                                                               \
1451   if (--R##REG(DSTREG(op)))                                       \
1452   {                                                           \
1453      m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                    \
1454      COUNT_CYCLES(3);                                        \
1455   }                                                           \
1456   else                                                        \
1457   {                                                           \
1458      SKIP_WORD();                                             \
1459      COUNT_CYCLES(2);                                        \
1460   }                                                           \
1461}
1462void tms340x0_device::dsj_a (UINT16 op) { DSJ(A); }
1463void tms340x0_device::dsj_b (UINT16 op) { DSJ(B); }
1464
1465#define DSJEQ(R)                                                \
1466{                                                               \
1467   if (Z_FLAG())                                                    \
1468   {                                                           \
1469      if (--R##REG(DSTREG(op)))                                   \
1470      {                                                       \
1471         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1472         COUNT_CYCLES(3);                                    \
1473      }                                                       \
1474      else                                                    \
1475      {                                                       \
1476         SKIP_WORD();                                         \
1477         COUNT_CYCLES(2);                                    \
1478      }                                                       \
1479   }                                                           \
1480   else                                                        \
1481   {                                                           \
1482      SKIP_WORD();                                             \
1483      COUNT_CYCLES(2);                                        \
1484   }                                                           \
1485}
1486void tms340x0_device::dsjeq_a (UINT16 op) { DSJEQ(A); }
1487void tms340x0_device::dsjeq_b (UINT16 op) { DSJEQ(B); }
1488
1489#define DSJNE(R)                                                \
1490{                                                               \
1491   if (!Z_FLAG())                                               \
1492   {                                                           \
1493      if (--R##REG(DSTREG(op)))                                   \
1494      {                                                       \
1495         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1496         COUNT_CYCLES(3);                                    \
1497      }                                                       \
1498      else                                                    \
1499      {                                                       \
1500         SKIP_WORD();                                         \
1501         COUNT_CYCLES(2);                                    \
1502      }                                                       \
1503   }                                                           \
1504   else                                                        \
1505   {                                                           \
1506      SKIP_WORD();                                             \
1507      COUNT_CYCLES(2);                                        \
1508   }                                                           \
1509}
1510void tms340x0_device::dsjne_a (UINT16 op) { DSJNE(A); }
1511void tms340x0_device::dsjne_b (UINT16 op) { DSJNE(B); }
1512
1513#define DSJS(R)                                                 \
1514{                                                               \
1515   if (op & 0x0400)                                        \
1516   {                                                           \
1517      if (--R##REG(DSTREG(op)))                                   \
1518      {                                                       \
1519         m_pc -= ((PARAM_K(op))<<4);                              \
1520         COUNT_CYCLES(2);                                    \
1521      }                                                       \
1522      else                                                    \
1523         COUNT_CYCLES(3);                                    \
1524   }                                                           \
1525   else                                                        \
1526   {                                                           \
1527      if (--R##REG(DSTREG(op)))                                   \
1528      {                                                       \
1529         m_pc += ((PARAM_K(op))<<4);                              \
1530         COUNT_CYCLES(2);                                    \
1531      }                                                       \
1532      else                                                    \
1533         COUNT_CYCLES(3);                                    \
1534   }                                                           \
1535}
1536void tms340x0_device::dsjs_a (UINT16 op) { DSJS(A); }
1537void tms340x0_device::dsjs_b (UINT16 op) { DSJS(B); }
1538
1539void tms340x0_device::emu(UINT16 op)
1540{
1541   /* in RUN state, this instruction is a NOP */
1542   COUNT_CYCLES(6);
1543}
1544
1545#define EXGPC(R)                                                \
1546{                                                               \
1547   INT32 *rd = &R##REG(DSTREG(op));                                \
1548   INT32 temppc = *rd;                                         \
1549   *rd = m_pc;                                                  \
1550   m_pc = temppc;                                               \
1551   CORRECT_ODD_PC("EXGPC");                                    \
1552   COUNT_CYCLES(2);                                            \
1553}
1554void tms340x0_device::exgpc_a (UINT16 op) { EXGPC(A); }
1555void tms340x0_device::exgpc_b (UINT16 op) { EXGPC(B); }
1556
1557#define GETPC(R)                                                \
1558{                                                               \
1559   R##REG(DSTREG(op)) = m_pc;                                       \
1560   COUNT_CYCLES(1);                                            \
1561}
1562void tms340x0_device::getpc_a (UINT16 op) { GETPC(A); }
1563void tms340x0_device::getpc_b (UINT16 op) { GETPC(B); }
1564
1565#define GETST(R)                                                \
1566{                                                               \
1567   R##REG(DSTREG(op)) = m_st;                               \
1568   COUNT_CYCLES(1);                                            \
1569}
1570void tms340x0_device::getst_a (UINT16 op) { GETST(A); }
1571void tms340x0_device::getst_b (UINT16 op) { GETST(B); }
1572
1573#define j_xx_8(TAKE)                                            \
1574{                                                               \
1575   if (DSTREG(op))                                                 \
1576   {                                                           \
1577      if (TAKE)                                               \
1578      {                                                       \
1579         m_pc += (PARAM_REL8(op) << 4);                           \
1580         COUNT_CYCLES(2);                                    \
1581      }                                                       \
1582      else                                                    \
1583         COUNT_CYCLES(1);                                    \
1584   }                                                           \
1585   else                                                        \
1586   {                                                           \
1587      if (TAKE)                                               \
1588      {                                                       \
1589         m_pc = PARAM_LONG_NO_INC();                       \
1590         CORRECT_ODD_PC("J_XX_8");                           \
1591         COUNT_CYCLES(3);                                    \
1592      }                                                       \
1593      else                                                    \
1594      {                                                       \
1595         SKIP_LONG();                                         \
1596         COUNT_CYCLES(4);                                    \
1597      }                                                       \
1598   }                                                           \
1599}
1600
1601#define j_xx_0(TAKE)                                            \
1602{                                                               \
1603   if (DSTREG(op))                                             \
1604   {                                                           \
1605      if (TAKE)                                               \
1606      {                                                       \
1607         m_pc += (PARAM_REL8(op) << 4);                           \
1608         COUNT_CYCLES(2);                                    \
1609      }                                                       \
1610      else                                                    \
1611         COUNT_CYCLES(1);                                    \
1612   }                                                           \
1613   else                                                        \
1614   {                                                           \
1615      if (TAKE)                                               \
1616      {                                                       \
1617         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1618         COUNT_CYCLES(3);                                    \
1619      }                                                       \
1620      else                                                    \
1621      {                                                       \
1622         SKIP_WORD();                                         \
1623         COUNT_CYCLES(2);                                    \
1624      }                                                       \
1625   }                                                           \
1626}
1627
1628#define j_xx_x(TAKE)                                            \
1629{                                                               \
1630   if (TAKE)                                                   \
1631   {                                                           \
1632      m_pc += (PARAM_REL8(op) << 4);                               \
1633      COUNT_CYCLES(2);                                        \
1634   }                                                           \
1635   else                                                        \
1636      COUNT_CYCLES(1);                                        \
1637}
1638
1639void tms340x0_device::j_UC_0(UINT16 op)
1640{
1641   j_xx_0(1);
1642}
1643void tms340x0_device::j_UC_8(UINT16 op)
1644{
1645   j_xx_8(1);
1646}
1647void tms340x0_device::j_UC_x(UINT16 op)
1648{
1649   j_xx_x(1);
1650}
1651void tms340x0_device::j_P_0(UINT16 op)
1652{
1653   j_xx_0(!N_FLAG() && !Z_FLAG());
1654}
1655void tms340x0_device::j_P_8(UINT16 op)
1656{
1657   j_xx_8(!N_FLAG() && !Z_FLAG());
1658}
1659void tms340x0_device::j_P_x(UINT16 op)
1660{
1661   j_xx_x(!N_FLAG() && !Z_FLAG());
1662}
1663void tms340x0_device::j_LS_0(UINT16 op)
1664{
1665   j_xx_0(C_FLAG() || Z_FLAG());
1666}
1667void tms340x0_device::j_LS_8(UINT16 op)
1668{
1669   j_xx_8(C_FLAG() || Z_FLAG());
1670}
1671void tms340x0_device::j_LS_x(UINT16 op)
1672{
1673   j_xx_x(C_FLAG() || Z_FLAG());
1674}
1675void tms340x0_device::j_HI_0(UINT16 op)
1676{
1677   j_xx_0(!C_FLAG() && !Z_FLAG());
1678}
1679void tms340x0_device::j_HI_8(UINT16 op)
1680{
1681   j_xx_8(!C_FLAG() && !Z_FLAG());
1682}
1683void tms340x0_device::j_HI_x(UINT16 op)
1684{
1685   j_xx_x(!C_FLAG() && !Z_FLAG());
1686}
1687void tms340x0_device::j_LT_0(UINT16 op)
1688{
1689   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1690}
1691void tms340x0_device::j_LT_8(UINT16 op)
1692{
1693   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1694}
1695void tms340x0_device::j_LT_x(UINT16 op)
1696{
1697   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1698}
1699void tms340x0_device::j_GE_0(UINT16 op)
1700{
1701   j_xx_0((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1702}
1703void tms340x0_device::j_GE_8(UINT16 op)
1704{
1705   j_xx_8((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1706}
1707void tms340x0_device::j_GE_x(UINT16 op)
1708{
1709   j_xx_x((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1710}
1711void tms340x0_device::j_LE_0(UINT16 op)
1712{
1713   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1714}
1715void tms340x0_device::j_LE_8(UINT16 op)
1716{
1717   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1718}
1719void tms340x0_device::j_LE_x(UINT16 op)
1720{
1721   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1722}
1723void tms340x0_device::j_GT_0(UINT16 op)
1724{
1725   j_xx_0((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1726}
1727void tms340x0_device::j_GT_8(UINT16 op)
1728{
1729   j_xx_8((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1730}
1731void tms340x0_device::j_GT_x(UINT16 op)
1732{
1733   j_xx_x((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1734}
1735void tms340x0_device::j_C_0(UINT16 op)
1736{
1737   j_xx_0(C_FLAG());
1738}
1739void tms340x0_device::j_C_8(UINT16 op)
1740{
1741   j_xx_8(C_FLAG());
1742}
1743void tms340x0_device::j_C_x(UINT16 op)
1744{
1745   j_xx_x(C_FLAG());
1746}
1747void tms340x0_device::j_NC_0(UINT16 op)
1748{
1749   j_xx_0(!C_FLAG());
1750}
1751void tms340x0_device::j_NC_8(UINT16 op)
1752{
1753   j_xx_8(!C_FLAG());
1754}
1755void tms340x0_device::j_NC_x(UINT16 op)
1756{
1757   j_xx_x(!C_FLAG());
1758}
1759void tms340x0_device::j_EQ_0(UINT16 op)
1760{
1761   j_xx_0(Z_FLAG());
1762}
1763void tms340x0_device::j_EQ_8(UINT16 op)
1764{
1765   j_xx_8(Z_FLAG());
1766}
1767void tms340x0_device::j_EQ_x(UINT16 op)
1768{
1769   j_xx_x(Z_FLAG());
1770}
1771void tms340x0_device::j_NE_0(UINT16 op)
1772{
1773   j_xx_0(!Z_FLAG());
1774}
1775void tms340x0_device::j_NE_8(UINT16 op)
1776{
1777   j_xx_8(!Z_FLAG());
1778}
1779void tms340x0_device::j_NE_x(UINT16 op)
1780{
1781   j_xx_x(!Z_FLAG());
1782}
1783void tms340x0_device::j_V_0(UINT16 op)
1784{
1785   j_xx_0(V_FLAG());
1786}
1787void tms340x0_device::j_V_8(UINT16 op)
1788{
1789   j_xx_8(V_FLAG());
1790}
1791void tms340x0_device::j_V_x(UINT16 op)
1792{
1793   j_xx_x(V_FLAG());
1794}
1795void tms340x0_device::j_NV_0(UINT16 op)
1796{
1797   j_xx_0(!V_FLAG());
1798}
1799void tms340x0_device::j_NV_8(UINT16 op)
1800{
1801   j_xx_8(!V_FLAG());
1802}
1803void tms340x0_device::j_NV_x(UINT16 op)
1804{
1805   j_xx_x(!V_FLAG());
1806}
1807void tms340x0_device::j_N_0(UINT16 op)
1808{
1809   j_xx_0(N_FLAG());
1810}
1811void tms340x0_device::j_N_8(UINT16 op)
1812{
1813   j_xx_8(N_FLAG());
1814}
1815void tms340x0_device::j_N_x(UINT16 op)
1816{
1817   j_xx_x(N_FLAG());
1818}
1819void tms340x0_device::j_NN_0(UINT16 op)
1820{
1821   j_xx_0(!N_FLAG());
1822}
1823void tms340x0_device::j_NN_8(UINT16 op)
1824{
1825   j_xx_8(!N_FLAG());
1826}
1827void tms340x0_device::j_NN_x(UINT16 op)
1828{
1829   j_xx_x(!N_FLAG());
1830}
1831
1832#define JUMP(R)                                                 \
1833{                                                               \
1834   m_pc = R##REG(DSTREG(op));                                       \
1835   CORRECT_ODD_PC("JUMP");                                     \
1836   COUNT_CYCLES(2);                                            \
1837}
1838void tms340x0_device::jump_a (UINT16 op) { JUMP(A); }
1839void tms340x0_device::jump_b (UINT16 op) { JUMP(B); }
1840
1841void tms340x0_device::popst(UINT16 op)
1842{
1843   SET_ST(POP());
1844   COUNT_CYCLES(8);
1845}
1846
1847void tms340x0_device::pushst(UINT16 op)
1848{
1849   PUSH(m_st);
1850   COUNT_CYCLES(2);
1851}
1852
1853#define PUTST(R)                                                \
1854{                                                               \
1855   SET_ST(R##REG(DSTREG(op)));                                \
1856   COUNT_CYCLES(3);                                            \
1857}
1858void tms340x0_device::putst_a (UINT16 op) { PUTST(A); }
1859void tms340x0_device::putst_b (UINT16 op) { PUTST(B); }
1860
1861void tms340x0_device::reti(UINT16 op)
1862{
1863   INT32 st = POP();
1864   m_pc = POP();
1865   CORRECT_ODD_PC("RETI");
1866   SET_ST(st);
1867   COUNT_CYCLES(11);
1868}
1869
1870void tms340x0_device::rets(UINT16 op)
1871{
1872   UINT32 offs;
1873   m_pc = POP();
1874   CORRECT_ODD_PC("RETS");
1875   offs = PARAM_N(op);
1876   if (offs)
1877   {
1878      SP()+=(offs<<4);
1879   }
1880   COUNT_CYCLES(7);
1881}
1882
1883#define REV(R)                                                  \
1884{                                                               \
1885   R##REG(DSTREG(op)) = 0x0008;                                    \
1886   COUNT_CYCLES(1);                                            \
1887}
1888void tms340x0_device::rev_a (UINT16 op) { REV(A); }
1889void tms340x0_device::rev_b (UINT16 op) { REV(B); }
1890
1891void tms340x0_device::trap(UINT16 op)
1892{
1893   UINT32 t = PARAM_N(op);
1894   if (t)
1895   {
1896      PUSH(m_pc);
1897      PUSH(m_st);
1898   }
1899   RESET_ST();
1900   m_pc = RLONG(0xffffffe0-(t<<5));
1901   CORRECT_ODD_PC("TRAP");
1902   COUNT_CYCLES(16);
1903}
1904
1905
1906
1907/***************************************************************************
1908    34020 INSTRUCTIONS
1909***************************************************************************/
1910
1911/************************************
1912
1913New 34020 ops:
1914
1915    0000 1100 000R dddd = ADDXYI IL,Rd
1916    iiii iiii iiii iiii
1917    iiii iiii iiii iiii
1918
1919    0000 0000 1111 00SD = BLMOVE S,D
1920
1921    0000 0110 0000 0000 = CEXEC S,c,ID,L
1922    cccc cccc S000 0000
1923    iiic cccc cccc cccc
1924
1925    1101 1000 0ccc cccS = CEXEC S,c,ID
1926    iiic cccc cccc cccc
1927
1928    0000 1000 1111 0010 = CLIP
1929
1930    0000 0110 011R dddd = CMOVCG Rd1,Rd2,S,c,ID
1931    cccc cccc S00R dddd
1932    iiic cccc cccc cccc
1933
1934    0000 0110 101R dddd = CMOVCM *Rd+,n,S,c,ID
1935    cccc cccc S00n nnnn
1936    iiic cccc cccc cccc
1937
1938    0000 0110 110R dddd = CMOVCM -*Rd,n,S,c,ID
1939    cccc cccc S00n nnnn
1940    iiic cccc cccc cccc
1941
1942    0000 0110 0110 0000 = CMOVCS c,ID
1943    cccc cccc 0000 0001
1944    iiic cccc cccc cccc
1945
1946    0000 0110 001R ssss = CMOVGC Rs,c,ID
1947    cccc cccc 0000 0000
1948    iiic cccc cccc cccc
1949
1950    0000 0110 010R ssss = CMOVGC Rs1,Rs2,S,c,ID
1951    cccc cccc S00R ssss
1952    iiic cccc cccc cccc
1953
1954    0000 0110 100n nnnn = CMOVMC *Rs+,n,S,c,ID
1955    cccc cccc S00R ssss
1956    iiic cccc cccc cccc
1957
1958    0000 1000 001n nnnn = CMOVMC -*Rs,n,S,c,ID
1959    cccc cccc S00R ssss
1960    iiic cccc cccc cccc
1961
1962    0000 0110 111R dddd = CMOVMC *Rs+,Rd,S,c,ID
1963    cccc cccc S00R ssss
1964    iiic cccc cccc cccc
1965
1966    0011 01kk kkkR dddd = CMPK k,Rd
1967
1968    0000 1010 100R dddd = CVDXYL Rd
1969
1970    0000 1010 011R dddd = CVMXYL Rd
1971
1972    1110 101s sssR dddd = CVSXYL Rs,Rd
1973
1974    0000 0010 101R dddd = EXGPS Rd
1975
1976    1101 1110 Z001 1010 = FLINE Z
1977
1978    0000 1010 1011 1011 = FPIXEQ
1979
1980    0000 1010 1101 1011 = FPIXNE
1981
1982    0000 0010 110R dddd = GETPS Rd
1983
1984    0000 0000 0100 0000 = IDLE
1985
1986    0000 1100 0101 0111 = LINIT
1987
1988    0000 0000 1000 0000 = MWAIT
1989
1990    0000 1010 0011 0111 = PFILL XY
1991
1992    0000 1110 0001 0111 = PIXBLT L,M,L
1993
1994    0000 1000 0110 0000 = RETM
1995
1996    0111 101s sssR dddd = RMO Rs,Rd
1997
1998    0000 0010 100R dddd = RPIX Rd
1999
2000    0000 0010 0111 0011 = SETCDP
2001
2002    0000 0010 1111 1011 = SETCMP
2003
2004    0000 0010 0101 0001 = SETCSP
2005
2006    0111 111s sssR dddd = SWAPF *Rs,Rd,0
2007
2008    0000 1110 1111 1010 = TFILL XY
2009
2010    0000 1000 0000 1111 = TRAPL
2011
2012    0000 1000 0101 0111 = VBLT B,L
2013
2014    0000 1010 0101 0111 = VFILL L
2015
2016    0000 1010 0000 0000 = VLCOL
2017
2018************************************/
2019
2020
2021#define ADD_XYI(R)                              \
2022{                                               \
2023   UINT32 a = PARAM_LONG();                 \
2024   XY *b = &R##REG_XY(DSTREG(op));                 \
2025   CLR_NCZV();                                  \
2026   b->x += (INT16)(a & 0xffff);                \
2027   b->y += ((INT32)a >> 16);                   \
2028   SET_N_LOG(b->x == 0);                      \
2029   SET_C_BIT_LO(b->y, 15);                        \
2030   SET_Z_LOG(b->y == 0);                      \
2031   SET_V_BIT_LO(b->x, 15);                        \
2032   COUNT_CYCLES(1);                            \
2033}
2034void tms340x0_device::addxyi_a(UINT16 op)
2035{
2036   if (!m_is_34020) { unimpl(op); return; }
2037   ADD_XYI(A);
2038}
2039void tms340x0_device::addxyi_b(UINT16 op)
2040{
2041   if (!m_is_34020) { unimpl(op); return; }
2042   ADD_XYI(B);
2043}
2044
2045void tms340x0_device::blmove(UINT16 op)
2046{
2047   offs_t src = BREG(0);
2048   offs_t dst = BREG(2);
2049   offs_t bits = BREG(7);
2050
2051   if (!m_is_34020) { unimpl(op); return; }
2052
2053   /* src and dst are aligned */
2054   if (!(src & 0x0f) && !(dst & 0x0f))
2055   {
2056      while (bits >= 16 && m_icount > 0)
2057      {
2058         TMS34010_WRMEM_WORD(TOBYTE(dst), TMS34010_RDMEM_WORD(TOBYTE(src)));
2059         src += 0x10;
2060         dst += 0x10;
2061         bits -= 0x10;
2062         m_icount -= 2;
2063      }
2064      if (bits != 0 && m_icount > 0)
2065      {
2066         (this->*s_wfield_functions[bits])(dst, (this->*s_rfield_functions[bits])(src));
2067         dst += bits;
2068         src += bits;
2069         bits = 0;
2070         m_icount -= 2;
2071      }
2072   }
2073
2074   /* src is aligned, dst is not */
2075   else if (!(src & 0x0f))
2076   {
2077      logerror("020:BLMOVE with aligned src and unaligned dst\n");
2078   }
2079
2080   /* dst is aligned, src is not */
2081   else if (!(dst & 0x0f))
2082   {
2083      logerror("020:BLMOVE with unaligned src and aligned dst\n");
2084   }
2085
2086   /* neither are aligned */
2087   else
2088   {
2089      logerror("020:BLMOVE with completely unaligned src and dst\n");
2090   }
2091
2092   /* update the final results */
2093   BREG(0) = src;
2094   BREG(2) = dst;
2095   BREG(7) = bits;
2096
2097   /* if we're not done yet, back up the PC */
2098   if (bits != 0)
2099      m_pc -= 0x10;
2100}
2101
2102void tms340x0_device::cexec_l(UINT16 op)
2103{
2104   if (!m_is_34020) { unimpl(op); return; }
2105   logerror("020:cexec_l\n");
2106}
2107
2108void tms340x0_device::cexec_s(UINT16 op)
2109{
2110   if (!m_is_34020) { unimpl(op); return; }
2111   logerror("020:cexec_s\n");
2112}
2113
2114void tms340x0_device::clip(UINT16 op)
2115{
2116   if (!m_is_34020) { unimpl(op); return; }
2117   logerror("020:clip\n");
2118}
2119
2120void tms340x0_device::cmovcg_a(UINT16 op)
2121{
2122   if (!m_is_34020) { unimpl(op); return; }
2123   logerror("020:cmovcg_a\n");
2124}
2125
2126void tms340x0_device::cmovcg_b(UINT16 op)
2127{
2128   if (!m_is_34020) { unimpl(op); return; }
2129   logerror("020:cmovcg_b\n");
2130}
2131
2132void tms340x0_device::cmovcm_f(UINT16 op)
2133{
2134   if (!m_is_34020) { unimpl(op); return; }
2135   logerror("020:cmovcm_f\n");
2136}
2137
2138void tms340x0_device::cmovcm_b(UINT16 op)
2139{
2140   if (!m_is_34020) { unimpl(op); return; }
2141   logerror("020:cmovcm_b\n");
2142}
2143
2144void tms340x0_device::cmovgc_a(UINT16 op)
2145{
2146   if (!m_is_34020) { unimpl(op); return; }
2147   logerror("020:cmovgc_a\n");
2148}
2149
2150void tms340x0_device::cmovgc_b(UINT16 op)
2151{
2152   if (!m_is_34020) { unimpl(op); return; }
2153   logerror("020:cmovgc_b\n");
2154}
2155
2156void tms340x0_device::cmovgc_a_s(UINT16 op)
2157{
2158   if (!m_is_34020) { unimpl(op); return; }
2159   logerror("020:cmovgc_a_s\n");
2160}
2161
2162void tms340x0_device::cmovgc_b_s(UINT16 op)
2163{
2164   if (!m_is_34020) { unimpl(op); return; }
2165   logerror("020:cmovgc_b_s\n");
2166}
2167
2168void tms340x0_device::cmovmc_f(UINT16 op)
2169{
2170   if (!m_is_34020) { unimpl(op); return; }
2171   logerror("020:cmovmc_f\n");
2172}
2173
2174void tms340x0_device::cmovmc_f_va(UINT16 op)
2175{
2176   if (!m_is_34020) { unimpl(op); return; }
2177   logerror("020:cmovmc_f_va\n");
2178}
2179
2180void tms340x0_device::cmovmc_f_vb(UINT16 op)
2181{
2182   if (!m_is_34020) { unimpl(op); return; }
2183   logerror("020:cmovmc_f_vb\n");
2184}
2185
2186void tms340x0_device::cmovmc_b(UINT16 op)
2187{
2188   if (!m_is_34020) { unimpl(op); return; }
2189   logerror("020:cmovmc_b\n");
2190}
2191
2192#define CMPK(R)                                             \
2193{                                                           \
2194   INT32 r;                                                \
2195   INT32 *rd = &R##REG(DSTREG(op));                            \
2196   INT32 t = PARAM_K(op); if (!t) t = 32;                      \
2197   CLR_NCZV();                                              \
2198   r = *rd - t;                                            \
2199   SET_NZCV_SUB(*rd,t,r);                                  \
2200   COUNT_CYCLES(1);                                        \
2201}
2202void tms340x0_device::cmp_k_a(UINT16 op)
2203{
2204   if (!m_is_34020) { unimpl(op); return; }
2205   CMPK(A);
2206}
2207void tms340x0_device::cmp_k_b(UINT16 op)
2208{
2209   if (!m_is_34020) { unimpl(op); return; }
2210   CMPK(B);
2211}
2212
2213void tms340x0_device::cvdxyl_a(UINT16 op)
2214{
2215   if (!m_is_34020) { unimpl(op); return; }
2216   logerror("020:cvdxyl_a\n");
2217}
2218
2219void tms340x0_device::cvdxyl_b(UINT16 op)
2220{
2221   if (!m_is_34020) { unimpl(op); return; }
2222   logerror("020:cvdxyl_b\n");
2223}
2224
2225void tms340x0_device::cvmxyl_a(UINT16 op)
2226{
2227   if (!m_is_34020) { unimpl(op); return; }
2228   logerror("020:cvmxyl_a\n");
2229}
2230
2231void tms340x0_device::cvmxyl_b(UINT16 op)
2232{
2233   if (!m_is_34020) { unimpl(op); return; }
2234   logerror("020:cvmxyl_b\n");
2235}
2236
2237void tms340x0_device::cvsxyl_a(UINT16 op)
2238{
2239   if (!m_is_34020) { unimpl(op); return; }
2240   logerror("020:cvsxyl_a\n");
2241}
2242
2243void tms340x0_device::cvsxyl_b(UINT16 op)
2244{
2245   if (!m_is_34020) { unimpl(op); return; }
2246   logerror("020:cvsxyl_b\n");
2247}
2248
2249void tms340x0_device::exgps_a(UINT16 op)
2250{
2251   if (!m_is_34020) { unimpl(op); return; }
2252   logerror("020:exgps_a\n");
2253}
2254
2255void tms340x0_device::exgps_b(UINT16 op)
2256{
2257   if (!m_is_34020) { unimpl(op); return; }
2258   logerror("020:exgps_b\n");
2259}
2260
2261void tms340x0_device::fline(UINT16 op)
2262{
2263   if (!m_is_34020) { unimpl(op); return; }
2264   logerror("020:fline\n");
2265}
2266
2267void tms340x0_device::fpixeq(UINT16 op)
2268{
2269   if (!m_is_34020) { unimpl(op); return; }
2270   logerror("020:fpixeq\n");
2271}
2272
2273void tms340x0_device::fpixne(UINT16 op)
2274{
2275   if (!m_is_34020) { unimpl(op); return; }
2276   logerror("020:fpixne\n");
2277}
2278
2279void tms340x0_device::getps_a(UINT16 op)
2280{
2281   if (!m_is_34020) { unimpl(op); return; }
2282   logerror("020:getps_a\n");
2283}
2284
2285void tms340x0_device::getps_b(UINT16 op)
2286{
2287   if (!m_is_34020) { unimpl(op); return; }
2288   logerror("020:getps_b\n");
2289}
2290
2291void tms340x0_device::idle(UINT16 op)
2292{
2293   if (!m_is_34020) { unimpl(op); return; }
2294   logerror("020:idle\n");
2295}
2296
2297void tms340x0_device::linit(UINT16 op)
2298{
2299   if (!m_is_34020) { unimpl(op); return; }
2300   logerror("020:linit\n");
2301}
2302
2303void tms340x0_device::mwait(UINT16 op)
2304{
2305   if (!m_is_34020) { unimpl(op); return; }
2306}
2307
2308void tms340x0_device::pfill_xy(UINT16 op)
2309{
2310   if (!m_is_34020) { unimpl(op); return; }
2311   logerror("020:pfill_xy\n");
2312}
2313
2314void tms340x0_device::pixblt_l_m_l(UINT16 op)
2315{
2316   if (!m_is_34020) { unimpl(op); return; }
2317   logerror("020:pixblt_l_m_l\n");
2318}
2319
2320void tms340x0_device::retm(UINT16 op)
2321{
2322   if (!m_is_34020) { unimpl(op); return; }
2323   logerror("020:retm\n");
2324}
2325
2326#define RMO(R)                                                  \
2327{                                                               \
2328   UINT32 res = 0;                                             \
2329   UINT32 rs  = R##REG(SRCREG(op));                                \
2330      INT32 *rd = &R##REG(DSTREG(op));                                \
2331   CLR_Z();                                                     \
2332   SET_Z_VAL(rs);                                             \
2333   if (rs)                                                     \
2334   {                                                           \
2335      while (!(rs & 0x00000001))                              \
2336      {                                                       \
2337         res++;                                              \
2338         rs >>= 1;                                           \
2339      }                                                       \
2340   }                                                           \
2341   *rd = res;                                                  \
2342   COUNT_CYCLES(1);                                            \
2343}
2344
2345void tms340x0_device::rmo_a(UINT16 op) { RMO(A); }
2346void tms340x0_device::rmo_b(UINT16 op) { RMO(B); }
2347
2348#define RPIX(R)                                 \
2349{                                               \
2350   UINT32 v = R##REG(DSTREG(op));                  \
2351   switch (m_pixelshift)                    \
2352   {                                           \
2353      case 0:                                 \
2354         v = (v & 1) ? 0xffffffff : 0x00000000;\
2355         COUNT_CYCLES(8);                    \
2356         break;                              \
2357      case 1:                                 \
2358         v &= 3;                             \
2359         v |= v << 2;                        \
2360         v |= v << 4;                        \
2361         v |= v << 8;                        \
2362         v |= v << 16;                       \
2363         COUNT_CYCLES(7);                    \
2364         break;                              \
2365      case 2:                                 \
2366         v &= 0x0f;                          \
2367         v |= v << 4;                        \
2368         v |= v << 8;                        \
2369         v |= v << 16;                       \
2370         COUNT_CYCLES(6);                    \
2371         break;                              \
2372      case 3:                                 \
2373         v &= 0xff;                          \
2374         v |= v << 8;                        \
2375         v |= v << 16;                       \
2376         COUNT_CYCLES(5);                    \
2377         break;                              \
2378      case 4:                                 \
2379         v &= 0xffff;                        \
2380         v |= v << 16;                       \
2381         COUNT_CYCLES(4);                    \
2382         break;                              \
2383      case 5:                                 \
2384         COUNT_CYCLES(2);                    \
2385         break;                              \
2386   }                                           \
2387   R##REG(DSTREG(op)) = v;                         \
2388}
2389
2390void tms340x0_device::rpix_a(UINT16 op)
2391{
2392   if (!m_is_34020) { unimpl(op); return; }
2393   RPIX(A);
2394}
2395
2396void tms340x0_device::rpix_b(UINT16 op)
2397{
2398   if (!m_is_34020) { unimpl(op); return; }
2399   RPIX(B);
2400}
2401
2402void tms340x0_device::setcdp(UINT16 op)
2403{
2404   if (!m_is_34020) { unimpl(op); return; }
2405   logerror("020:setcdp\n");
2406}
2407
2408void tms340x0_device::setcmp(UINT16 op)
2409{
2410   if (!m_is_34020) { unimpl(op); return; }
2411   logerror("020:setcmp\n");
2412}
2413
2414void tms340x0_device::setcsp(UINT16 op)
2415{
2416   if (!m_is_34020) { unimpl(op); return; }
2417   logerror("020:setcsp\n");
2418}
2419
2420void tms340x0_device::swapf_a(UINT16 op)
2421{
2422   if (!m_is_34020) { unimpl(op); return; }
2423   logerror("020:swapf_a\n");
2424}
2425
2426void tms340x0_device::swapf_b(UINT16 op)
2427{
2428   if (!m_is_34020) { unimpl(op); return; }
2429   logerror("020:swapf_b\n");
2430}
2431
2432void tms340x0_device::tfill_xy(UINT16 op)
2433{
2434   if (!m_is_34020) { unimpl(op); return; }
2435   logerror("020:tfill_xy\n");
2436}
2437
2438void tms340x0_device::trapl(UINT16 op)
2439{
2440   if (!m_is_34020) { unimpl(op); return; }
2441   logerror("020:trapl\n");
2442}
2443
2444void tms340x0_device::vblt_b_l(UINT16 op)
2445{
2446   if (!m_is_34020) { unimpl(op); return; }
2447   logerror("020:vblt_b_l\n");
2448}
2449
2450void tms340x0_device::vfill_l(UINT16 op)
2451{
2452   if (!m_is_34020) { unimpl(op); return; }
2453   logerror("020:vfill_l\n");
2454}
2455
2456void tms340x0_device::vlcol(UINT16 op)
2457{
2458   if (!m_is_34020) { unimpl(op); return; }
2459   logerror("020:vlcol\n");
2460}
trunk/src/devices/cpu/tms34010/34010ops.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/***************************************************************************
4
5    TMS34010: Portable Texas Instruments TMS34010 emulator
6
7    Copyright Alex Pasadyn/Zsolt Vasvari
8    Parts based on code by Aaron Giles
9
10***************************************************************************/
11
12
13
14/***************************************************************************
15    MISC MACROS
16***************************************************************************/
17
18#define ZEXTEND(val,width) if (width) (val) &= ((UINT32)0xffffffff >> (32 - (width)))
19#define SEXTEND(val,width) if (width) (val) = (INT32)((val) << (32 - (width))) >> (32 - (width))
20
21#define SXYTOL(val)   ((((INT16)(val).y * m_convsp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
22#define DXYTOL(val)   ((((INT16)(val).y * m_convdp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
23#define MXYTOL(val)   ((((INT16)(val).y * m_convmp) + ((INT16)(val).x << m_pixelshift)) + OFFSET())
24
25#define COUNT_CYCLES(x)   m_icount -= x
26#define COUNT_UNKNOWN_CYCLES(x) COUNT_CYCLES(x)
27
28#define CORRECT_ODD_PC(x) do { if (m_pc & 0x0f) logerror("%s to PC=%08X\n", x, m_pc); m_pc &= ~0x0f; } while (0)
29
30
31
32/***************************************************************************
33    FLAG HANDLING MACROS
34***************************************************************************/
35
36#define SIGN(val)           ((val) & 0x80000000)
37
38#define CLR_Z()                m_st &= ~STBIT_Z
39#define CLR_V()                m_st &= ~STBIT_V
40#define CLR_C()                m_st &= ~STBIT_C
41#define CLR_N()                m_st &= ~STBIT_N
42#define CLR_NZ()               m_st &= ~(STBIT_N | STBIT_Z)
43#define CLR_CZ()               m_st &= ~(STBIT_C | STBIT_Z)
44#define CLR_ZV()               m_st &= ~(STBIT_Z | STBIT_V)
45#define CLR_NZV()              m_st &= ~(STBIT_N | STBIT_Z | STBIT_V)
46#define CLR_NCZ()              m_st &= ~(STBIT_N | STBIT_C | STBIT_Z)
47#define CLR_NCZV()             m_st &= ~(STBIT_N | STBIT_C | STBIT_Z | STBIT_V)
48
49#define SET_V_BIT_LO(val,bit) m_st |= ((val) << (28 - (bit))) & STBIT_V
50#define SET_V_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 28)) & STBIT_V
51#define SET_V_LOG(val)        m_st |= (val) << 28
52#define SET_Z_BIT_LO(val,bit) m_st |= ((val) << (29 - (bit))) & STBIT_Z
53#define SET_Z_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 29)) & STBIT_Z
54#define SET_Z_LOG(val)        m_st |= (val) << 29
55#define SET_C_BIT_LO(val,bit) m_st |= ((val) << (30 - (bit))) & STBIT_C
56#define SET_C_BIT_HI(val,bit) m_st |= ((val) >> ((bit) - 30)) & STBIT_C
57#define SET_C_LOG(val)        m_st |= (val) << 30
58#define SET_N_BIT(val,bit)    m_st |= ((val) << (31 - (bit))) & STBIT_N
59#define SET_N_LOG(val)        m_st |= (val) << 31
60
61#define SET_Z_VAL(val)        SET_Z_LOG((val) == 0)
62#define SET_N_VAL(val)        SET_N_BIT(val, 31)
63#define SET_NZ_VAL(val)       SET_Z_VAL(val); SET_N_VAL(val)
64#define SET_V_SUB(a,b,r)      SET_V_BIT_HI(((a) ^ (b)) & ((a) ^ (r)), 31)
65#define SET_V_ADD(a,b,r)      SET_V_BIT_HI(~((a) ^ (b)) & ((a) ^ (r)), 31)
66#define SET_C_SUB(a,b)        SET_C_LOG((UINT32)(b) > (UINT32)(a))
67#define SET_C_ADD(a,b)        SET_C_LOG((UINT32)~(a) < (UINT32)(b))
68#define SET_NZV_SUB(a,b,r)    SET_NZ_VAL(r); SET_V_SUB(a,b,r)
69#define SET_NZCV_SUB(a,b,r)   SET_NZV_SUB(a,b,r); SET_C_SUB(a,b)
70#define SET_NZCV_ADD(a,b,r)   SET_NZ_VAL(r); SET_V_ADD(a,b,r); SET_C_ADD(a,b)
71
72static const UINT8 fw_inc[32] = { 32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
73
74
75/***************************************************************************
76    UNIMPLEMENTED INSTRUCTION
77***************************************************************************/
78
79void tms340x0_device::unimpl(UINT16 op)
80{
81   /* kludge for Super High Impact -- this doesn't seem to cause */
82   /* an illegal opcode exception */
83   if (m_direct->read_word(TOBYTE(m_pc - 0x10)) == 0x0007)
84      return;
85
86   /* 9 Ball Shootout calls to FFDF7468, expecting it */
87   /* to execute the next instruction from FFDF7470 */
88   /* but the instruction at FFDF7460 is an 0x0001 */
89   if (m_direct->read_word(TOBYTE(m_pc - 0x10)) == 0x0001)
90      return;
91
92   PUSH(m_pc);
93   PUSH(m_st);
94   RESET_ST();
95   m_pc = RLONG(0xfffffc20);
96   COUNT_UNKNOWN_CYCLES(16);
97
98   /* extra check to prevent bad things */
99   if (m_pc == 0 || s_opcode_table[m_direct->read_word(TOBYTE(m_pc)) >> 4] == &tms34010_device::unimpl)
100   {
101      set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
102      debugger_break(machine());
103   }
104}
105
106
107
108/***************************************************************************
109    X/Y OPERATIONS
110***************************************************************************/
111
112#define ADD_XY(R)                               \
113{                                               \
114   XY  a =  R##REG_XY(SRCREG(op));                 \
115   XY *b = &R##REG_XY(DSTREG(op));                 \
116   CLR_NCZV();                                  \
117   b->x += a.x;                                \
118   b->y += a.y;                                \
119   SET_N_LOG(b->x == 0);                      \
120   SET_C_BIT_LO(b->y, 15);                        \
121   SET_Z_LOG(b->y == 0);                      \
122   SET_V_BIT_LO(b->x, 15);                        \
123   COUNT_CYCLES(1);                            \
124}
125void tms340x0_device::add_xy_a(UINT16 op) { ADD_XY(A); }
126void tms340x0_device::add_xy_b(UINT16 op) { ADD_XY(B); }
127
128#define SUB_XY(R)                               \
129{                                               \
130   XY  a =  R##REG_XY(SRCREG(op));                 \
131   XY *b = &R##REG_XY(DSTREG(op));                 \
132   CLR_NCZV();                                  \
133   SET_N_LOG(a.x == b->x);                        \
134   SET_C_LOG(a.y > b->y);                     \
135   SET_Z_LOG(a.y == b->y);                        \
136   SET_V_LOG(a.x > b->x);                     \
137   b->x -= a.x;                                \
138   b->y -= a.y;                                \
139   COUNT_CYCLES(1);                            \
140}
141void tms340x0_device::sub_xy_a(UINT16 op) { SUB_XY(A); }
142void tms340x0_device::sub_xy_b(UINT16 op) { SUB_XY(B); }
143
144#define CMP_XY(R)                               \
145{                                               \
146   INT16 res;                                  \
147   XY a = R##REG_XY(DSTREG(op));                   \
148   XY b = R##REG_XY(SRCREG(op));                   \
149   CLR_NCZV();                                  \
150   res = a.x-b.x;                              \
151   SET_N_LOG(res == 0);                       \
152   SET_V_BIT_LO(res, 15);                     \
153   res = a.y-b.y;                              \
154   SET_Z_LOG(res == 0);                       \
155   SET_C_BIT_LO(res, 15);                     \
156   COUNT_CYCLES(1);                            \
157}
158void tms340x0_device::cmp_xy_a(UINT16 op) { CMP_XY(A); }
159void tms340x0_device::cmp_xy_b(UINT16 op) { CMP_XY(B); }
160
161#define CPW(R)                                  \
162{                                               \
163   INT32 res = 0;                              \
164   INT16 x = R##REG_X(SRCREG(op));                 \
165   INT16 y = R##REG_Y(SRCREG(op));                 \
166                                    \
167   CLR_V();                                     \
168   res |= ((WSTART_X() > x) ? 0x20  : 0);       \
169   res |= ((x > WEND_X())   ? 0x40  : 0);       \
170   res |= ((WSTART_Y() > y) ? 0x80  : 0);       \
171   res |= ((y > WEND_Y())   ? 0x100 : 0);       \
172   R##REG(DSTREG(op)) = res;                       \
173   SET_V_LOG(res != 0);                       \
174   COUNT_CYCLES(1);                            \
175}
176void tms340x0_device::cpw_a(UINT16 op) { CPW(A); }
177void tms340x0_device::cpw_b(UINT16 op) { CPW(B); }
178
179#define CVXYL(R)                                    \
180{                                                   \
181   R##REG(DSTREG(op)) = DXYTOL(R##REG_XY(SRCREG(op)));     \
182   COUNT_CYCLES(3);                                \
183}
184void tms340x0_device::cvxyl_a(UINT16 op) { CVXYL(A); }
185void tms340x0_device::cvxyl_b(UINT16 op) { CVXYL(B); }
186
187#define MOVX(R)                                     \
188{                                                   \
189   R##REG(DSTREG(op)) = (R##REG(DSTREG(op)) & 0xffff0000) | (UINT16)R##REG(SRCREG(op));    \
190   COUNT_CYCLES(1);                                                                    \
191}
192void tms340x0_device::movx_a(UINT16 op) { MOVX(A); }
193void tms340x0_device::movx_b(UINT16 op) { MOVX(B); }
194
195#define MOVY(R)                                     \
196{                                                   \
197   R##REG(DSTREG(op)) = (R##REG(SRCREG(op)) & 0xffff0000) | (UINT16)R##REG(DSTREG(op));    \
198   COUNT_CYCLES(1);                                                                    \
199}
200void tms340x0_device::movy_a(UINT16 op) { MOVY(A); }
201void tms340x0_device::movy_b(UINT16 op) { MOVY(B); }
202
203
204
205/***************************************************************************
206    PIXEL TRANSFER OPERATIONS
207***************************************************************************/
208
209#define PIXT_RI(R)                                  \
210{                                                   \
211   WPIXEL(R##REG(DSTREG(op)),R##REG(SRCREG(op)));  \
212   COUNT_UNKNOWN_CYCLES(2);                        \
213}
214void tms340x0_device::pixt_ri_a(UINT16 op) { PIXT_RI(A); }
215void tms340x0_device::pixt_ri_b(UINT16 op) { PIXT_RI(B); }
216
217#define PIXT_RIXY(R)                                                                \
218{                                                                                   \
219   if (WINDOW_CHECKING() != 0)                                                      \
220   {                                                                               \
221      CLR_V();                                                                     \
222      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
223         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
224      {                                                                           \
225         SET_V_LOG(1);                                                          \
226         goto skip;                                                              \
227      }                                                                           \
228      if (WINDOW_CHECKING() == 1) goto skip;                                       \
229   }                                                                               \
230   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),R##REG(SRCREG(op)));                               \
231skip:                                                                               \
232   COUNT_UNKNOWN_CYCLES(4);                                                        \
233}
234void tms340x0_device::pixt_rixy_a(UINT16 op) { PIXT_RIXY(A); }
235void tms340x0_device::pixt_rixy_b(UINT16 op) { PIXT_RIXY(B); }
236
237#define PIXT_IR(R)                                  \
238{                                                   \
239   INT32 temp = RPIXEL(R##REG(SRCREG(op)));            \
240   CLR_V();                                         \
241   R##REG(DSTREG(op)) = temp;                          \
242   SET_V_LOG(temp != 0);                          \
243   COUNT_CYCLES(4);                                \
244}
245void tms340x0_device::pixt_ir_a(UINT16 op) { PIXT_IR(A); }
246void tms340x0_device::pixt_ir_b(UINT16 op) { PIXT_IR(B); }
247
248#define PIXT_II(R)                                  \
249{                                                   \
250   WPIXEL(R##REG(DSTREG(op)),RPIXEL(R##REG(SRCREG(op))));  \
251   COUNT_UNKNOWN_CYCLES(4);                        \
252}
253void tms340x0_device::pixt_ii_a(UINT16 op) { PIXT_II(A); }
254void tms340x0_device::pixt_ii_b(UINT16 op) { PIXT_II(B); }
255
256#define PIXT_IXYR(R)                                \
257{                                                   \
258   INT32 temp = RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))); \
259   CLR_V();                                         \
260   R##REG(DSTREG(op)) = temp;                          \
261   SET_V_LOG(temp != 0);                          \
262   COUNT_CYCLES(6);                                \
263}
264void tms340x0_device::pixt_ixyr_a(UINT16 op) { PIXT_IXYR(A); }
265void tms340x0_device::pixt_ixyr_b(UINT16 op) { PIXT_IXYR(B); }
266
267#define PIXT_IXYIXY(R)                                                              \
268{                                                                                   \
269   if (WINDOW_CHECKING() != 0)                                                      \
270   {                                                                               \
271      CLR_V();                                                                     \
272      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
273         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
274      {                                                                           \
275         SET_V_LOG(1);                                                          \
276         goto skip;                                                              \
277      }                                                                           \
278      if (WINDOW_CHECKING() == 1) goto skip;                                       \
279   }                                                                               \
280   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),RPIXEL(SXYTOL(R##REG_XY(SRCREG(op)))));            \
281skip:                                                                               \
282   COUNT_UNKNOWN_CYCLES(7);                                                        \
283}
284void tms340x0_device::pixt_ixyixy_a(UINT16 op) { PIXT_IXYIXY(A); }
285void tms340x0_device::pixt_ixyixy_b(UINT16 op) { PIXT_IXYIXY(B); }
286
287#define DRAV(R)                                                                     \
288{                                                                                   \
289   if (WINDOW_CHECKING() != 0)                                                      \
290   {                                                                               \
291      CLR_V();                                                                     \
292      if (R##REG_X(DSTREG(op)) < WSTART_X() || R##REG_X(DSTREG(op)) > WEND_X() ||               \
293         R##REG_Y(DSTREG(op)) < WSTART_Y() || R##REG_Y(DSTREG(op)) > WEND_Y())             \
294      {                                                                           \
295         SET_V_LOG(1);                                                          \
296         goto skip;                                                              \
297      }                                                                           \
298      if (WINDOW_CHECKING() == 1) goto skip;                                       \
299   }                                                                               \
300   WPIXEL(DXYTOL(R##REG_XY(DSTREG(op))),COLOR1());                                      \
301skip:                                                                               \
302   R##REG_X(DSTREG(op)) += R##REG_X(SRCREG(op));                                           \
303   R##REG_Y(DSTREG(op)) += R##REG_Y(SRCREG(op));                                           \
304   COUNT_UNKNOWN_CYCLES(4);                                                        \
305}
306void tms340x0_device::drav_a(UINT16 op) { DRAV(A); }
307void tms340x0_device::drav_b(UINT16 op) { DRAV(B); }
308
309
310
311/***************************************************************************
312    ARITHMETIC OPERATIONS
313***************************************************************************/
314
315#define ABS(R)                                              \
316{                                                           \
317   INT32 *rd = &R##REG(DSTREG(op));                            \
318   INT32 r = 0 - *rd;                                      \
319   CLR_NZV();                                               \
320   if (r > 0) *rd = r;                                     \
321   SET_NZ_VAL(r);                                         \
322   SET_V_LOG(r == (INT32)0x80000000);                     \
323   COUNT_CYCLES(1);                                        \
324}
325void tms340x0_device::abs_a(UINT16 op) { ABS(A); }
326void tms340x0_device::abs_b(UINT16 op) { ABS(B); }
327
328#define ADD(R)                                              \
329{                                                           \
330   INT32 a = R##REG(SRCREG(op));                               \
331   INT32 *rd = &R##REG(DSTREG(op));                            \
332   INT32 b = *rd;                                          \
333   INT32 r = a + b;                                        \
334   CLR_NCZV();                                              \
335   *rd = r;                                                \
336   SET_NZCV_ADD(a,b,r);                                    \
337   COUNT_CYCLES(1);                                        \
338}
339void tms340x0_device::add_a(UINT16 op) { ADD(A); }
340void tms340x0_device::add_b(UINT16 op) { ADD(B); }
341
342#define ADDC(R)                                             \
343{                                                           \
344   /* I'm not sure to which side the carry is added to, should */  \
345   /* verify it against the examples */                    \
346   INT32 a = R##REG(SRCREG(op));                               \
347   INT32 *rd = &R##REG(DSTREG(op));                            \
348   INT32 b = *rd;                                          \
349   INT32 r = a + b + (C_FLAG() ? 1 : 0);                        \
350   CLR_NCZV();                                              \
351   *rd = r;                                                \
352   SET_NZCV_ADD(a,b,r);                                    \
353   COUNT_CYCLES(1);                                        \
354}
355void tms340x0_device::addc_a(UINT16 op) { ADDC(A); }
356void tms340x0_device::addc_b(UINT16 op) { ADDC(B); }
357
358#define ADDI_W(R)                                           \
359{                                                           \
360   INT32 a = PARAM_WORD();                              \
361   INT32 *rd = &R##REG(DSTREG(op));                            \
362   INT32 b = *rd;                                          \
363   INT32 r = a + b;                                        \
364   CLR_NCZV();                                              \
365   *rd = r;                                                \
366   SET_NZCV_ADD(a,b,r);                                    \
367   COUNT_CYCLES(2);                                        \
368}
369void tms340x0_device::addi_w_a(UINT16 op) { ADDI_W(A); }
370void tms340x0_device::addi_w_b(UINT16 op) { ADDI_W(B); }
371
372#define ADDI_L(R)                                           \
373{                                                           \
374   INT32 a = PARAM_LONG();                              \
375   INT32 *rd = &R##REG(DSTREG(op));                            \
376   INT32 b = *rd;                                          \
377   INT32 r = a + b;                                        \
378   CLR_NCZV();                                              \
379   *rd = r;                                                \
380   SET_NZCV_ADD(a,b,r);                                    \
381   COUNT_CYCLES(3);                                        \
382}
383void tms340x0_device::addi_l_a(UINT16 op) { ADDI_L(A); }
384void tms340x0_device::addi_l_b(UINT16 op) { ADDI_L(B); }
385
386#define ADDK(R)                                             \
387{                                                           \
388   INT32 a = fw_inc[PARAM_K(op)];                              \
389   INT32 *rd = &R##REG(DSTREG(op));                            \
390   INT32 b = *rd;                                          \
391   INT32 r = a + b;                                        \
392   CLR_NCZV();                                              \
393   *rd = r;                                                \
394   SET_NZCV_ADD(a,b,r);                                    \
395   COUNT_CYCLES(1);                                        \
396}
397void tms340x0_device::addk_a(UINT16 op) { ADDK(A); }
398void tms340x0_device::addk_b(UINT16 op) { ADDK(B); }
399
400#define AND(R)                                              \
401{                                                           \
402   INT32 *rd = &R##REG(DSTREG(op));                            \
403   CLR_Z();                                                 \
404   *rd &= R##REG(SRCREG(op));                                  \
405   SET_Z_VAL(*rd);                                            \
406   COUNT_CYCLES(1);                                        \
407}
408void tms340x0_device::and_a(UINT16 op) { AND(A); }
409void tms340x0_device::and_b(UINT16 op) { AND(B); }
410
411#define ANDI(R)                                             \
412{                                                           \
413   INT32 *rd = &R##REG(DSTREG(op));                            \
414   CLR_Z();                                                 \
415   *rd &= ~PARAM_LONG();                                \
416   SET_Z_VAL(*rd);                                            \
417   COUNT_CYCLES(3);                                        \
418}
419void tms340x0_device::andi_a(UINT16 op) { ANDI(A); }
420void tms340x0_device::andi_b(UINT16 op) { ANDI(B); }
421
422#define ANDN(R)                                             \
423{                                                           \
424   INT32 *rd = &R##REG(DSTREG(op));                            \
425   CLR_Z();                                                 \
426   *rd &= ~R##REG(SRCREG(op));                                 \
427   SET_Z_VAL(*rd);                                            \
428   COUNT_CYCLES(1);                                        \
429}
430void tms340x0_device::andn_a(UINT16 op) { ANDN(A); }
431void tms340x0_device::andn_b(UINT16 op) { ANDN(B); }
432
433#define BTST_K(R)                                           \
434{                                                           \
435   int bit = 31 - PARAM_K(op);                                 \
436   CLR_Z();                                                 \
437   if (bit <= 29)                                          \
438      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
439   else                                                    \
440      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
441   COUNT_CYCLES(1);                                        \
442}
443void tms340x0_device::btst_k_a(UINT16 op) { BTST_K(A); }
444void tms340x0_device::btst_k_b(UINT16 op) { BTST_K(B); }
445
446#define BTST_R(R)                                           \
447{                                                           \
448   int bit = R##REG(SRCREG(op)) & 0x1f;                        \
449   CLR_Z();                                                 \
450   if (bit <= 29)                                          \
451      SET_Z_BIT_LO(~R##REG(DSTREG(op)), bit);                    \
452   else                                                    \
453      SET_Z_BIT_HI(~R##REG(DSTREG(op)), bit);                    \
454   COUNT_CYCLES(2);                                        \
455}
456void tms340x0_device::btst_r_a(UINT16 op) { BTST_R(A); }
457void tms340x0_device::btst_r_b(UINT16 op) { BTST_R(B); }
458
459void tms340x0_device::clrc(UINT16 op)
460{
461   CLR_C();
462   COUNT_CYCLES(1);
463}
464
465#define CMP(R)                                              \
466{                                                           \
467   INT32 *rs = &R##REG(SRCREG(op));                            \
468   INT32 *rd = &R##REG(DSTREG(op));                            \
469   INT32 r = *rd - *rs;                                    \
470   CLR_NCZV();                                              \
471   SET_NZCV_SUB(*rd,*rs,r);                                \
472   COUNT_CYCLES(1);                                        \
473}
474void tms340x0_device::cmp_a(UINT16 op) { CMP(A); }
475void tms340x0_device::cmp_b(UINT16 op) { CMP(B); }
476
477#define CMPI_W(R)                                           \
478{                                                           \
479   INT32 *rd = &R##REG(DSTREG(op));                            \
480   INT32 t = (INT16)~PARAM_WORD();                      \
481   INT32 r = *rd - t;                                      \
482   CLR_NCZV();                                              \
483   SET_NZCV_SUB(*rd,t,r);                                  \
484   COUNT_CYCLES(2);                                        \
485}
486void tms340x0_device::cmpi_w_a(UINT16 op) { CMPI_W(A); }
487void tms340x0_device::cmpi_w_b(UINT16 op) { CMPI_W(B); }
488
489#define CMPI_L(R)                                           \
490{                                                           \
491   INT32 *rd = &R##REG(DSTREG(op));                            \
492   INT32 t = ~PARAM_LONG();                             \
493   INT32 r = *rd - t;                                      \
494   CLR_NCZV();                                              \
495   SET_NZCV_SUB(*rd,t,r);                                  \
496   COUNT_CYCLES(3);                                        \
497}
498void tms340x0_device::cmpi_l_a(UINT16 op) { CMPI_L(A); }
499void tms340x0_device::cmpi_l_b(UINT16 op) { CMPI_L(B); }
500
501void tms340x0_device::dint(UINT16 op)
502{
503   m_st &= ~STBIT_IE;
504   COUNT_CYCLES(3);
505}
506
507#define DIVS(R)                                             \
508{                                                           \
509   INT32 *rs  = &R##REG(SRCREG(op));                           \
510   INT32 *rd1 = &R##REG(DSTREG(op));                           \
511   CLR_NZV();                                               \
512   if (!(DSTREG(op) & 1))                                      \
513   {                                                       \
514      if (!*rs)                                           \
515      {                                                   \
516         SET_V_LOG(1);                                  \
517      }                                                   \
518      else                                                \
519      {                                                   \
520         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
521         INT64 dividend = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
522         INT64 quotient = dividend / *rs;                \
523         INT32 remainder = dividend % *rs;               \
524         UINT32 signbits = (INT32)quotient >> 31;        \
525         if (EXTRACT_64HI(quotient) != signbits)         \
526         {                                               \
527            SET_V_LOG(1);                              \
528         }                                               \
529         else                                            \
530         {                                               \
531            *rd1 = quotient;                            \
532            *rd2 = remainder;                           \
533            SET_NZ_VAL(*rd1);                          \
534         }                                               \
535      }                                                   \
536      COUNT_CYCLES(40);                                   \
537   }                                                       \
538   else                                                    \
539   {                                                       \
540      if (!*rs)                                           \
541      {                                                   \
542         SET_V_LOG(1);                                  \
543      }                                                   \
544      else                                                \
545      {                                                   \
546         *rd1 /= *rs;                                    \
547         SET_NZ_VAL(*rd1);                              \
548      }                                                   \
549      COUNT_CYCLES(39);                                   \
550   }                                                       \
551}
552void tms340x0_device::divs_a(UINT16 op) { DIVS(A); }
553void tms340x0_device::divs_b(UINT16 op) { DIVS(B); }
554
555#define DIVU(R)                                             \
556{                                                           \
557   INT32 *rs  = &R##REG(SRCREG(op));                           \
558   INT32 *rd1 = &R##REG(DSTREG(op));                           \
559   CLR_ZV();                                                    \
560   if (!(DSTREG(op) & 1))                                      \
561   {                                                       \
562      if (!*rs)                                           \
563      {                                                   \
564         SET_V_LOG(1);                                  \
565      }                                                   \
566      else                                                \
567      {                                                   \
568         INT32 *rd2 = &R##REG(DSTREG(op)+1);                 \
569         UINT64 dividend  = ((UINT64)*rd1 << 32) | (UINT32)*rd2; \
570         UINT64 quotient  = dividend / (UINT32)*rs;      \
571         UINT32 remainder = dividend % (UINT32)*rs;      \
572         if (EXTRACT_64HI(quotient) != 0)                \
573         {                                               \
574            SET_V_LOG(1);                              \
575         }                                               \
576         else                                            \
577         {                                               \
578            *rd1 = quotient;                            \
579            *rd2 = remainder;                           \
580            SET_Z_VAL(*rd1);                           \
581         }                                               \
582      }                                                   \
583   }                                                       \
584   else                                                    \
585   {                                                       \
586      if (!*rs)                                           \
587      {                                                   \
588         SET_V_LOG(1);                                  \
589      }                                                   \
590      else                                                \
591      {                                                   \
592         *rd1 = (UINT32)*rd1 / (UINT32)*rs;              \
593         SET_Z_VAL(*rd1);                               \
594      }                                                   \
595   }                                                       \
596   COUNT_CYCLES(37);                                       \
597}
598void tms340x0_device::divu_a(UINT16 op) { DIVU(A); }
599void tms340x0_device::divu_b(UINT16 op) { DIVU(B); }
600
601void tms340x0_device::eint(UINT16 op)
602{
603   m_st |= STBIT_IE;
604   check_interrupt();
605   COUNT_CYCLES(3);
606}
607
608#define EXGF(F,R)                                               \
609{                                                               \
610   UINT8 shift = F ? 6 : 0;                                    \
611   INT32 *rd = &R##REG(DSTREG(op));                                \
612   UINT32 temp = (m_st >> shift) & 0x3f;                    \
613   m_st &= ~(0x3f << shift);                                \
614   m_st |= (*rd & 0x3f) << shift;                           \
615   *rd = temp;                                                 \
616   COUNT_CYCLES(1);                                            \
617}
618void tms340x0_device::exgf0_a(UINT16 op) { EXGF(0,A); }
619void tms340x0_device::exgf0_b(UINT16 op) { EXGF(0,B); }
620void tms340x0_device::exgf1_a(UINT16 op) { EXGF(1,A); }
621void tms340x0_device::exgf1_b(UINT16 op) { EXGF(1,B); }
622
623#define LMO(R)                                                  \
624{                                                               \
625   UINT32 res = 0;                                             \
626   UINT32 rs  = R##REG(SRCREG(op));                                \
627      INT32 *rd = &R##REG(DSTREG(op));                                \
628   CLR_Z();                                                     \
629   SET_Z_VAL(rs);                                             \
630   if (rs)                                                     \
631   {                                                           \
632      while (!(rs & 0x80000000))                              \
633      {                                                       \
634         res++;                                              \
635         rs <<= 1;                                           \
636      }                                                       \
637   }                                                           \
638   *rd = res;                                                  \
639   COUNT_CYCLES(1);                                            \
640}
641void tms340x0_device::lmo_a(UINT16 op) { LMO(A); }
642void tms340x0_device::lmo_b(UINT16 op) { LMO(B); }
643
644#define MMFM(R)                                                 \
645{                                                               \
646   INT32 i;                                                    \
647   UINT16 l = (UINT16) PARAM_WORD();                        \
648   COUNT_CYCLES(3);                                            \
649   {                                                           \
650      INT32 rd = DSTREG(op);                                      \
651      for (i = 15; i >= 0 ; i--)                              \
652      {                                                       \
653         if (l & 0x8000)                                     \
654         {                                                   \
655            R##REG(i) = RLONG(R##REG(rd));                 \
656            R##REG(rd) += 0x20;                             \
657            COUNT_CYCLES(4);                                \
658         }                                                   \
659         l <<= 1;                                            \
660      }                                                       \
661   }                                                           \
662}
663void tms340x0_device::mmfm_a(UINT16 op) { MMFM(A); }
664void tms340x0_device::mmfm_b(UINT16 op) { MMFM(B); }
665
666#define MMTM(R)                                                 \
667{                                                               \
668   UINT32 i;                                                   \
669   UINT16 l = (UINT16) PARAM_WORD();                        \
670   COUNT_CYCLES(2);                                            \
671   {                                                           \
672      INT32 rd = DSTREG(op);                                      \
673      if (m_is_34020)                                      \
674      {                                                       \
675         CLR_N();                                             \
676         SET_N_VAL(R##REG(rd) ^ 0x80000000);                    \
677      }                                                       \
678      for (i = 0; i  < 16; i++)                               \
679      {                                                       \
680         if (l & 0x8000)                                     \
681         {                                                   \
682            R##REG(rd) -= 0x20;                             \
683            WLONG(R##REG(rd),R##REG(i));                   \
684            COUNT_CYCLES(4);                                \
685         }                                                   \
686         l <<= 1;                                            \
687      }                                                       \
688   }                                                           \
689}
690void tms340x0_device::mmtm_a(UINT16 op) { MMTM(A); }
691void tms340x0_device::mmtm_b(UINT16 op) { MMTM(B); }
692
693#define MODS(R)                                                 \
694{                                                               \
695   INT32 *rs = &R##REG(SRCREG(op));                                \
696   INT32 *rd = &R##REG(DSTREG(op));                                \
697   CLR_NZV();                                                   \
698   if (*rs != 0)                                               \
699   {                                                           \
700      *rd %= *rs;                                             \
701      SET_NZ_VAL(*rd);                                       \
702   }                                                           \
703   else                                                        \
704      SET_V_LOG(1);                                          \
705   COUNT_CYCLES(40);                                           \
706}
707void tms340x0_device::mods_a(UINT16 op) { MODS(A); }
708void tms340x0_device::mods_b(UINT16 op) { MODS(B); }
709
710#define MODU(R)                                                 \
711{                                                               \
712   INT32 *rs = &R##REG(SRCREG(op));                                \
713   INT32 *rd = &R##REG(DSTREG(op));                                \
714   CLR_ZV();                                                        \
715   if (*rs != 0)                                               \
716   {                                                           \
717      *rd = (UINT32)*rd % (UINT32)*rs;                        \
718      SET_Z_VAL(*rd);                                            \
719   }                                                           \
720   else                                                        \
721      SET_V_LOG(1);                                          \
722   COUNT_CYCLES(35);                                           \
723}
724void tms340x0_device::modu_a(UINT16 op) { MODU(A); }
725void tms340x0_device::modu_b(UINT16 op) { MODU(B); }
726
727#define MPYS(R)                                                 \
728{                                                               \
729   INT32 *rd1 = &R##REG(DSTREG(op));                               \
730   INT32 m1 = R##REG(SRCREG(op));                                  \
731   INT64 product;                                              \
732                                                \
733   SEXTEND(m1, FW(1));                                         \
734   CLR_NZ();                                                        \
735   product = mul_32x32(m1, *rd1);                          \
736   SET_Z_LOG(product == 0);                                   \
737   SET_N_BIT(product >> 32, 31);                              \
738                                                \
739   *rd1             = EXTRACT_64HI(product);                       \
740   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
741                                                \
742   COUNT_CYCLES(20);                                           \
743}
744void tms340x0_device::mpys_a(UINT16 op) { MPYS(A); }
745void tms340x0_device::mpys_b(UINT16 op) { MPYS(B); }
746
747#define MPYU(R)                                                 \
748{                                                               \
749   INT32 *rd1 = &R##REG(DSTREG(op));                               \
750   UINT32 m1 = R##REG(SRCREG(op));                                 \
751   UINT64 product;                                             \
752                                                \
753   ZEXTEND(m1, FW(1));                                         \
754   CLR_Z();                                                     \
755   product = mulu_32x32(m1, *rd1);                     \
756   SET_Z_LOG(product == 0);                                   \
757                                                \
758   *rd1             = EXTRACT_64HI(product);                       \
759   R##REG(DSTREG(op)|1) = EXTRACT_64LO(product);                       \
760                                                \
761   COUNT_CYCLES(21);                                           \
762}
763void tms340x0_device::mpyu_a(UINT16 op) { MPYU(A); }
764void tms340x0_device::mpyu_b(UINT16 op) { MPYU(B); }
765
766#define NEG(R)                                                  \
767{                                                               \
768   INT32 *rd = &R##REG(DSTREG(op));                                \
769   INT32 r = 0 - *rd;                                          \
770   CLR_NCZV();                                                  \
771   SET_NZCV_SUB(0,*rd,r);                                      \
772   *rd = r;                                                    \
773   COUNT_CYCLES(1);                                            \
774}
775void tms340x0_device::neg_a(UINT16 op) { NEG(A); }
776void tms340x0_device::neg_b(UINT16 op) { NEG(B); }
777
778#define NEGB(R)                                                 \
779{                                                               \
780   INT32 *rd = &R##REG(DSTREG(op));                                \
781   INT32 t = *rd + (C_FLAG() ? 1 : 0);                          \
782   INT32 r = 0 - t;                                            \
783   CLR_NCZV();                                                  \
784   SET_NZCV_SUB(0,t,r);                                        \
785   *rd = r;                                                    \
786   COUNT_CYCLES(1);                                            \
787}
788void tms340x0_device::negb_a(UINT16 op) { NEGB(A); }
789void tms340x0_device::negb_b(UINT16 op) { NEGB(B); }
790
791void tms340x0_device::nop(UINT16 op)
792{
793   COUNT_CYCLES(1);
794}
795
796#define NOT(R)                                                  \
797{                                                               \
798   INT32 *rd = &R##REG(DSTREG(op));                                \
799   CLR_Z();                                                     \
800   *rd = ~(*rd);                                               \
801   SET_Z_VAL(*rd);                                                \
802   COUNT_CYCLES(1);                                            \
803}
804void tms340x0_device::not_a(UINT16 op) { NOT(A); }
805void tms340x0_device::not_b(UINT16 op) { NOT(B); }
806
807#define OR(R)                                                   \
808{                                                               \
809   INT32 *rd = &R##REG(DSTREG(op));                                \
810   CLR_Z();                                                     \
811   *rd |= R##REG(SRCREG(op));                                      \
812   SET_Z_VAL(*rd);                                                \
813   COUNT_CYCLES(1);                                            \
814}
815void tms340x0_device::or_a(UINT16 op) { OR(A); }
816void tms340x0_device::or_b(UINT16 op) { OR(B); }
817
818#define ORI(R)                                                  \
819{                                                               \
820   INT32 *rd = &R##REG(DSTREG(op));                                \
821   CLR_Z();                                                     \
822   *rd |= PARAM_LONG();                                     \
823   SET_Z_VAL(*rd);                                                \
824   COUNT_CYCLES(3);                                            \
825}
826void tms340x0_device::ori_a(UINT16 op) { ORI(A); }
827void tms340x0_device::ori_b(UINT16 op) { ORI(B); }
828
829void tms340x0_device::setc(UINT16 op)
830{
831   SET_C_LOG(1);
832   COUNT_CYCLES(1);
833}
834
835#define SETF(F)                                                 \
836{                                                               \
837   UINT8 shift = F ? 6 : 0;                                    \
838   m_st &= ~(0x3f << shift);                                \
839   m_st |= (op & 0x3f) << shift;                        \
840   COUNT_CYCLES(1+F);                                          \
841}
842void tms340x0_device::setf0(UINT16 op) { SETF(0); }
843void tms340x0_device::setf1(UINT16 op) { SETF(1); }
844
845#define SEXT(F,R)                                               \
846{                                                               \
847   INT32 *rd = &R##REG(DSTREG(op));                                \
848   CLR_NZ();                                                        \
849   SEXTEND(*rd,FW(F));                                         \
850   SET_NZ_VAL(*rd);                                           \
851   COUNT_CYCLES(3);                                            \
852}
853void tms340x0_device::sext0_a(UINT16 op) { SEXT(0,A); }
854void tms340x0_device::sext0_b(UINT16 op) { SEXT(0,B); }
855void tms340x0_device::sext1_a(UINT16 op) { SEXT(1,A); }
856void tms340x0_device::sext1_b(UINT16 op) { SEXT(1,B); }
857
858#define RL(R,K)                                                 \
859{                                                               \
860   INT32 *rd = &R##REG(DSTREG(op));                                \
861   INT32 res = *rd;                                            \
862   INT32 k = (K);                                              \
863   CLR_CZ();                                                        \
864   if (k)                                                      \
865   {                                                           \
866      res<<=(k-1);                                            \
867      SET_C_BIT_HI(res, 31);                                 \
868      res<<=1;                                                \
869      res |= (((UINT32)*rd)>>((-k)&0x1f));                    \
870      *rd = res;                                              \
871   }                                                           \
872   SET_Z_VAL(res);                                                \
873   COUNT_CYCLES(1);                                            \
874}
875void tms340x0_device::rl_k_a(UINT16 op) { RL(A,PARAM_K(op)); }
876void tms340x0_device::rl_k_b(UINT16 op) { RL(B,PARAM_K(op)); }
877void tms340x0_device::rl_r_a(UINT16 op) { RL(A,AREG(SRCREG(op))&0x1f); }
878void tms340x0_device::rl_r_b(UINT16 op) { RL(B,BREG(SRCREG(op))&0x1f); }
879
880#define SLA(R,K)                                                \
881{                                                               \
882      INT32 *rd = &R##REG(DSTREG(op));                                \
883   UINT32 res = *rd;                                           \
884      INT32 k = K;                                                \
885   CLR_NCZV();                                                  \
886   if (k)                                                      \
887   {                                                           \
888      UINT32 mask = (0xffffffff<<(31-k))&0x7fffffff;          \
889      UINT32 res2 = SIGN(res) ? res^mask : res;               \
890      SET_V_LOG((res2 & mask) != 0);                         \
891                                                \
892      res<<=(k-1);                                            \
893      SET_C_BIT_HI(res, 31);                                 \
894      res<<=1;                                                \
895      *rd = res;                                              \
896   }                                                           \
897   SET_NZ_VAL(res);                                           \
898   COUNT_CYCLES(3);                                            \
899}
900void tms340x0_device::sla_k_a(UINT16 op) { SLA(A,PARAM_K(op)); }
901void tms340x0_device::sla_k_b(UINT16 op) { SLA(B,PARAM_K(op)); }
902void tms340x0_device::sla_r_a(UINT16 op) { SLA(A,AREG(SRCREG(op))&0x1f); }
903void tms340x0_device::sla_r_b(UINT16 op) { SLA(B,BREG(SRCREG(op))&0x1f); }
904
905#define SLL(R,K)                                                \
906{                                                               \
907      INT32 *rd = &R##REG(DSTREG(op));                                \
908   UINT32 res = *rd;                                           \
909      INT32 k = K;                                                \
910   CLR_CZ();                                                        \
911   if (k)                                                      \
912   {                                                           \
913      res<<=(k-1);                                            \
914      SET_C_BIT_HI(res, 31);                                 \
915      res<<=1;                                                \
916      *rd = res;                                              \
917   }                                                           \
918   SET_Z_VAL(res);                                                \
919   COUNT_CYCLES(1);                                            \
920}
921void tms340x0_device::sll_k_a(UINT16 op) { SLL(A,PARAM_K(op)); }
922void tms340x0_device::sll_k_b(UINT16 op) { SLL(B,PARAM_K(op)); }
923void tms340x0_device::sll_r_a(UINT16 op) { SLL(A,AREG(SRCREG(op))&0x1f); }
924void tms340x0_device::sll_r_b(UINT16 op) { SLL(B,BREG(SRCREG(op))&0x1f); }
925
926#define SRA(R,K)                                                \
927{                                                               \
928   INT32 *rd = &R##REG(DSTREG(op));                                \
929   INT32 res = *rd;                                            \
930   INT32 k = (-(K)) & 0x1f;                                    \
931   CLR_NCZ();                                                   \
932   if (k)                                                      \
933   {                                                           \
934      res>>=(k-1);                                            \
935      SET_C_BIT_LO(res, 0);                                  \
936      res>>=1;                                                \
937      *rd = res;                                              \
938   }                                                           \
939   SET_NZ_VAL(res);                                           \
940   COUNT_CYCLES(1);                                            \
941}
942void tms340x0_device::sra_k_a(UINT16 op) { SRA(A,PARAM_K(op)); }
943void tms340x0_device::sra_k_b(UINT16 op) { SRA(B,PARAM_K(op)); }
944void tms340x0_device::sra_r_a(UINT16 op) { SRA(A,AREG(SRCREG(op))); }
945void tms340x0_device::sra_r_b(UINT16 op) { SRA(B,BREG(SRCREG(op))); }
946
947#define SRL(R,K)                                                \
948{                                                               \
949      INT32 *rd = &R##REG(DSTREG(op));                                \
950   UINT32 res = *rd;                                           \
951      INT32 k = (-(K)) & 0x1f;                                    \
952   CLR_CZ();                                                        \
953   if (k)                                                      \
954   {                                                           \
955      res>>=(k-1);                                            \
956      SET_C_BIT_LO(res, 0);                                  \
957      res>>=1;                                                \
958      *rd = res;                                              \
959   }                                                           \
960   SET_Z_VAL(res);                                                \
961   COUNT_CYCLES(1);                                            \
962}
963void tms340x0_device::srl_k_a(UINT16 op) { SRL(A,PARAM_K(op)); }
964void tms340x0_device::srl_k_b(UINT16 op) { SRL(B,PARAM_K(op)); }
965void tms340x0_device::srl_r_a(UINT16 op) { SRL(A,AREG(SRCREG(op))); }
966void tms340x0_device::srl_r_b(UINT16 op) { SRL(B,BREG(SRCREG(op))); }
967
968#define SUB(R)                                                  \
969{                                                               \
970   INT32 *rs = &R##REG(SRCREG(op));                                \
971   INT32 *rd = &R##REG(DSTREG(op));                                \
972   INT32 r = *rd - *rs;                                        \
973   CLR_NCZV();                                                  \
974   SET_NZCV_SUB(*rd,*rs,r);                                    \
975   *rd = r;                                                    \
976   COUNT_CYCLES(1);                                            \
977}
978void tms340x0_device::sub_a(UINT16 op) { SUB(A); }
979void tms340x0_device::sub_b(UINT16 op) { SUB(B); }
980
981#define SUBB(R)                                                 \
982{                                                               \
983   INT32 *rd = &R##REG(DSTREG(op));                                \
984   INT32 t = R##REG(SRCREG(op));                                   \
985   INT32 r = *rd - t - (C_FLAG() ? 1 : 0);                      \
986   CLR_NCZV();                                                  \
987   SET_NZCV_SUB(*rd,t,r);                                      \
988   *rd = r;                                                    \
989   COUNT_CYCLES(1);                                            \
990}
991void tms340x0_device::subb_a(UINT16 op) { SUBB(A); }
992void tms340x0_device::subb_b(UINT16 op) { SUBB(B); }
993
994#define SUBI_W(R)                                               \
995{                                                               \
996   INT32 *rd = &R##REG(DSTREG(op));                                \
997   INT32 r;                                                    \
998   INT32 t = ~PARAM_WORD();                                 \
999   CLR_NCZV();                                                  \
1000   r = *rd - t;                                                \
1001   SET_NZCV_SUB(*rd,t,r);                                      \
1002   *rd = r;                                                    \
1003   COUNT_CYCLES(2);                                            \
1004}
1005void tms340x0_device::subi_w_a(UINT16 op) { SUBI_W(A); }
1006void tms340x0_device::subi_w_b(UINT16 op) { SUBI_W(B); }
1007
1008#define SUBI_L(R)                                               \
1009{                                                               \
1010   INT32 *rd = &R##REG(DSTREG(op));                                \
1011   INT32 t = ~PARAM_LONG();                                 \
1012   INT32 r = *rd - t;                                          \
1013   CLR_NCZV();                                                  \
1014   SET_NZCV_SUB(*rd,t,r);                                      \
1015   *rd = r;                                                    \
1016   COUNT_CYCLES(3);                                            \
1017}
1018void tms340x0_device::subi_l_a(UINT16 op) { SUBI_L(A); }
1019void tms340x0_device::subi_l_b(UINT16 op) { SUBI_L(B); }
1020
1021#define SUBK(R)                                                 \
1022{                                                               \
1023   INT32 *rd = &R##REG(DSTREG(op));                                \
1024   INT32 t = fw_inc[PARAM_K(op)];                                  \
1025   INT32 r = *rd - t;                                          \
1026   CLR_NCZV();                                                  \
1027   SET_NZCV_SUB(*rd,t,r);                                      \
1028   *rd = r;                                                    \
1029   COUNT_CYCLES(1);                                            \
1030}
1031void tms340x0_device::subk_a(UINT16 op) { SUBK(A); }
1032void tms340x0_device::subk_b(UINT16 op) { SUBK(B); }
1033
1034#define XOR(R)                                                  \
1035{                                                               \
1036   INT32 *rd = &R##REG(DSTREG(op));                                \
1037   CLR_Z();                                                     \
1038   *rd ^= R##REG(SRCREG(op));                                      \
1039   SET_Z_VAL(*rd);                                                \
1040   COUNT_CYCLES(1);                                            \
1041}
1042void tms340x0_device::xor_a(UINT16 op) { XOR(A); }
1043void tms340x0_device::xor_b(UINT16 op) { XOR(B); }
1044
1045#define XORI(R)                                                 \
1046{                                                               \
1047   INT32 *rd = &R##REG(DSTREG(op));                                \
1048   CLR_Z();                                                     \
1049   *rd ^= PARAM_LONG();                                     \
1050   SET_Z_VAL(*rd);                                                \
1051   COUNT_CYCLES(3);                                            \
1052}
1053void tms340x0_device::xori_a(UINT16 op) { XORI(A); }
1054void tms340x0_device::xori_b(UINT16 op) { XORI(B); }
1055
1056#define ZEXT(F,R)                                               \
1057{                                                               \
1058   INT32 *rd = &R##REG(DSTREG(op));                                \
1059   CLR_Z();                                                     \
1060   ZEXTEND(*rd,FW(F));                                         \
1061   SET_Z_VAL(*rd);                                                \
1062   COUNT_CYCLES(1);                                            \
1063}
1064void tms340x0_device::zext0_a(UINT16 op) { ZEXT(0,A); }
1065void tms340x0_device::zext0_b(UINT16 op) { ZEXT(0,B); }
1066void tms340x0_device::zext1_a(UINT16 op) { ZEXT(1,A); }
1067void tms340x0_device::zext1_b(UINT16 op) { ZEXT(1,B); }
1068
1069
1070
1071/***************************************************************************
1072    MOVE INSTRUCTIONS
1073***************************************************************************/
1074
1075#define MOVI_W(R)                                               \
1076{                                                               \
1077   INT32 *rd = &R##REG(DSTREG(op));                                \
1078   CLR_NZV();                                                   \
1079   *rd=PARAM_WORD();                                        \
1080   SET_NZ_VAL(*rd);                                           \
1081   COUNT_CYCLES(2);                                            \
1082}
1083void tms340x0_device::movi_w_a(UINT16 op) { MOVI_W(A); }
1084void tms340x0_device::movi_w_b(UINT16 op) { MOVI_W(B); }
1085
1086#define MOVI_L(R)                                               \
1087{                                                               \
1088   INT32 *rd = &R##REG(DSTREG(op));                                \
1089   CLR_NZV();                                                   \
1090   *rd=PARAM_LONG();                                        \
1091   SET_NZ_VAL(*rd);                                           \
1092   COUNT_CYCLES(3);                                            \
1093}
1094void tms340x0_device::movi_l_a(UINT16 op) { MOVI_L(A); }
1095void tms340x0_device::movi_l_b(UINT16 op) { MOVI_L(B); }
1096
1097#define MOVK(R)                                                 \
1098{                                                               \
1099   INT32 k = PARAM_K(op); if (!k) k = 32;                          \
1100   R##REG(DSTREG(op)) = k;                                         \
1101   COUNT_CYCLES(1);                                            \
1102}
1103void tms340x0_device::movk_a(UINT16 op) { MOVK(A); }
1104void tms340x0_device::movk_b(UINT16 op) { MOVK(B); }
1105
1106#define MOVB_RN(R)                                              \
1107{                                                               \
1108   WBYTE(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                      \
1109   COUNT_CYCLES(1);                                            \
1110}
1111void tms340x0_device::movb_rn_a(UINT16 op) { MOVB_RN(A); }
1112void tms340x0_device::movb_rn_b(UINT16 op) { MOVB_RN(B); }
1113
1114#define MOVB_NR(R)                                              \
1115{                                                               \
1116   INT32 *rd = &R##REG(DSTREG(op));                                \
1117   CLR_NZV();                                                   \
1118   *rd = (INT8)RBYTE(R##REG(SRCREG(op)));                     \
1119   SET_NZ_VAL(*rd);                                           \
1120   COUNT_CYCLES(3);                                            \
1121}
1122void tms340x0_device::movb_nr_a(UINT16 op) { MOVB_NR(A); }
1123void tms340x0_device::movb_nr_b(UINT16 op) { MOVB_NR(B); }
1124
1125#define MOVB_NN(R)                                              \
1126{                                                               \
1127   WBYTE(R##REG(DSTREG(op)),(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))));\
1128   COUNT_CYCLES(3);                                            \
1129}
1130void tms340x0_device::movb_nn_a(UINT16 op) { MOVB_NN(A); }
1131void tms340x0_device::movb_nn_b(UINT16 op) { MOVB_NN(B); }
1132
1133#define MOVB_R_NO(R)                                            \
1134{                                                               \
1135   INT32 o = PARAM_WORD();                                  \
1136   WBYTE(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                        \
1137   COUNT_CYCLES(3);                                            \
1138}
1139void tms340x0_device::movb_r_no_a(UINT16 op) { MOVB_R_NO(A); }
1140void tms340x0_device::movb_r_no_b(UINT16 op) { MOVB_R_NO(B); }
1141
1142#define MOVB_NO_R(R)                                            \
1143{                                                               \
1144   INT32 *rd = &R##REG(DSTREG(op));                                \
1145   INT32 o = PARAM_WORD();                                  \
1146   CLR_NZV();                                                   \
1147   *rd = (INT8)RBYTE(R##REG(SRCREG(op))+o);                   \
1148   SET_NZ_VAL(*rd);                                           \
1149   COUNT_CYCLES(5);                                            \
1150}
1151void tms340x0_device::movb_no_r_a(UINT16 op) { MOVB_NO_R(A); }
1152void tms340x0_device::movb_no_r_b(UINT16 op) { MOVB_NO_R(B); }
1153
1154#define MOVB_NO_NO(R)                                           \
1155{                                                               \
1156   INT32 o1 = PARAM_WORD();                                 \
1157   INT32 o2 = PARAM_WORD();                                 \
1158   WBYTE(R##REG(DSTREG(op))+o2,(UINT32)(UINT8)RBYTE(R##REG(SRCREG(op))+o1)); \
1159   COUNT_CYCLES(5);                                            \
1160}
1161void tms340x0_device::movb_no_no_a(UINT16 op) { MOVB_NO_NO(A); }
1162void tms340x0_device::movb_no_no_b(UINT16 op) { MOVB_NO_NO(B); }
1163
1164#define MOVB_RA(R)                                              \
1165{                                                               \
1166   WBYTE(PARAM_LONG(),R##REG(DSTREG(op)));                     \
1167   COUNT_CYCLES(1);                                            \
1168}
1169void tms340x0_device::movb_ra_a(UINT16 op) { MOVB_RA(A); }
1170void tms340x0_device::movb_ra_b(UINT16 op) { MOVB_RA(B); }
1171
1172#define MOVB_AR(R)                                              \
1173{                                                               \
1174   INT32 *rd = &R##REG(DSTREG(op));                                \
1175   CLR_NZV();                                                   \
1176   *rd = (INT8)RBYTE(PARAM_LONG());                    \
1177   SET_NZ_VAL(*rd);                                           \
1178   COUNT_CYCLES(5);                                            \
1179}
1180void tms340x0_device::movb_ar_a(UINT16 op) { MOVB_AR(A); }
1181void tms340x0_device::movb_ar_b(UINT16 op) { MOVB_AR(B); }
1182
1183void tms340x0_device::movb_aa(UINT16 op)
1184{
1185   UINT32 bitaddrs=PARAM_LONG();
1186   WBYTE(PARAM_LONG(),(UINT32)(UINT8)RBYTE(bitaddrs));
1187   COUNT_CYCLES(6);
1188}
1189
1190#define MOVE_RR(RS,RD)                                          \
1191{                                                               \
1192   INT32 *rd = &RD##REG(DSTREG(op));                               \
1193   CLR_NZV();                                                   \
1194   *rd = RS##REG(SRCREG(op));                                      \
1195   SET_NZ_VAL(*rd);                                           \
1196   COUNT_CYCLES(1);                                            \
1197}
1198void tms340x0_device::move_rr_a (UINT16 op) { MOVE_RR(A,A); }
1199void tms340x0_device::move_rr_b (UINT16 op) { MOVE_RR(B,B); }
1200void tms340x0_device::move_rr_ax(UINT16 op) { MOVE_RR(A,B); }
1201void tms340x0_device::move_rr_bx(UINT16 op) { MOVE_RR(B,A); }
1202
1203#define MOVE_RN(F,R)                                            \
1204{                                                               \
1205   WFIELD##F(R##REG(DSTREG(op)),R##REG(SRCREG(op)));                   \
1206   COUNT_CYCLES(1);                                            \
1207}
1208void tms340x0_device::move0_rn_a (UINT16 op) { MOVE_RN(0,A); }
1209void tms340x0_device::move0_rn_b (UINT16 op) { MOVE_RN(0,B); }
1210void tms340x0_device::move1_rn_a (UINT16 op) { MOVE_RN(1,A); }
1211void tms340x0_device::move1_rn_b (UINT16 op) { MOVE_RN(1,B); }
1212
1213#define MOVE_R_DN(F,R)                                          \
1214{                                                               \
1215   INT32 *rd = &R##REG(DSTREG(op));                                \
1216   *rd-=fw_inc[FW(F)];                                         \
1217   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1218   COUNT_CYCLES(2);                                            \
1219}
1220void tms340x0_device::move0_r_dn_a (UINT16 op) { MOVE_R_DN(0,A); }
1221void tms340x0_device::move0_r_dn_b (UINT16 op) { MOVE_R_DN(0,B); }
1222void tms340x0_device::move1_r_dn_a (UINT16 op) { MOVE_R_DN(1,A); }
1223void tms340x0_device::move1_r_dn_b (UINT16 op) { MOVE_R_DN(1,B); }
1224
1225#define MOVE_R_NI(F,R)                                          \
1226{                                                               \
1227   INT32 *rd = &R##REG(DSTREG(op));                                \
1228   WFIELD##F(*rd,R##REG(SRCREG(op)));                              \
1229   *rd+=fw_inc[FW(F)];                                         \
1230   COUNT_CYCLES(1);                                            \
1231}
1232void tms340x0_device::move0_r_ni_a (UINT16 op) { MOVE_R_NI(0,A); }
1233void tms340x0_device::move0_r_ni_b (UINT16 op) { MOVE_R_NI(0,B); }
1234void tms340x0_device::move1_r_ni_a (UINT16 op) { MOVE_R_NI(1,A); }
1235void tms340x0_device::move1_r_ni_b (UINT16 op) { MOVE_R_NI(1,B); }
1236
1237#define MOVE_NR(F,R)                                            \
1238{                                                               \
1239   INT32 *rd = &R##REG(DSTREG(op));                                \
1240   CLR_NZV();                                                   \
1241   *rd = RFIELD##F(R##REG(SRCREG(op)));                            \
1242   SET_NZ_VAL(*rd);                                           \
1243   COUNT_CYCLES(3);                                            \
1244}
1245void tms340x0_device::move0_nr_a (UINT16 op) { MOVE_NR(0,A); }
1246void tms340x0_device::move0_nr_b (UINT16 op) { MOVE_NR(0,B); }
1247void tms340x0_device::move1_nr_a (UINT16 op) { MOVE_NR(1,A); }
1248void tms340x0_device::move1_nr_b (UINT16 op) { MOVE_NR(1,B); }
1249
1250#define MOVE_DN_R(F,R)                                          \
1251{                                                               \
1252   INT32 *rd = &R##REG(DSTREG(op));                                \
1253   INT32 *rs = &R##REG(SRCREG(op));                                \
1254   CLR_NZV();                                                   \
1255   *rs-=fw_inc[FW(F)];                                         \
1256   *rd = RFIELD##F(*rs);                                       \
1257   SET_NZ_VAL(*rd);                                           \
1258   COUNT_CYCLES(4);                                            \
1259}
1260void tms340x0_device::move0_dn_r_a (UINT16 op) { MOVE_DN_R(0,A); }
1261void tms340x0_device::move0_dn_r_b (UINT16 op) { MOVE_DN_R(0,B); }
1262void tms340x0_device::move1_dn_r_a (UINT16 op) { MOVE_DN_R(1,A); }
1263void tms340x0_device::move1_dn_r_b (UINT16 op) { MOVE_DN_R(1,B); }
1264
1265#define MOVE_NI_R(F,R)                                          \
1266{                                                               \
1267   INT32 *rd = &R##REG(DSTREG(op));                                \
1268   INT32 *rs = &R##REG(SRCREG(op));                                \
1269   INT32 data = RFIELD##F(*rs);                                \
1270   CLR_NZV();                                                   \
1271   *rs+=fw_inc[FW(F)];                                         \
1272   *rd = data;                                                 \
1273   SET_NZ_VAL(*rd);                                           \
1274   COUNT_CYCLES(3);                                            \
1275}
1276void tms340x0_device::move0_ni_r_a (UINT16 op) { MOVE_NI_R(0,A); }
1277void tms340x0_device::move0_ni_r_b (UINT16 op) { MOVE_NI_R(0,B); }
1278void tms340x0_device::move1_ni_r_a (UINT16 op) { MOVE_NI_R(1,A); }
1279void tms340x0_device::move1_ni_r_b (UINT16 op) { MOVE_NI_R(1,B); }
1280
1281#define MOVE_NN(F,R)                                            \
1282{                                                               \
1283   WFIELD##F(R##REG(DSTREG(op)),RFIELD##F(R##REG(SRCREG(op))));        \
1284   COUNT_CYCLES(3);                                            \
1285}
1286void tms340x0_device::move0_nn_a (UINT16 op) { MOVE_NN(0,A); }
1287void tms340x0_device::move0_nn_b (UINT16 op) { MOVE_NN(0,B); }
1288void tms340x0_device::move1_nn_a (UINT16 op) { MOVE_NN(1,A); }
1289void tms340x0_device::move1_nn_b (UINT16 op) { MOVE_NN(1,B); }
1290
1291#define MOVE_DN_DN(F,R)                                         \
1292{                                                               \
1293   INT32 *rd = &R##REG(DSTREG(op));                                \
1294   INT32 *rs = &R##REG(SRCREG(op));                                \
1295   INT32 data;                                                 \
1296   *rs-=fw_inc[FW(F)];                                         \
1297   data = RFIELD##F(*rs);                                      \
1298   *rd-=fw_inc[FW(F)];                                         \
1299   WFIELD##F(*rd,data);                                        \
1300   COUNT_CYCLES(4);                                            \
1301}
1302void tms340x0_device::move0_dn_dn_a (UINT16 op) { MOVE_DN_DN(0,A); }
1303void tms340x0_device::move0_dn_dn_b (UINT16 op) { MOVE_DN_DN(0,B); }
1304void tms340x0_device::move1_dn_dn_a (UINT16 op) { MOVE_DN_DN(1,A); }
1305void tms340x0_device::move1_dn_dn_b (UINT16 op) { MOVE_DN_DN(1,B); }
1306
1307#define MOVE_NI_NI(F,R)                                         \
1308{                                                               \
1309   INT32 *rd = &R##REG(DSTREG(op));                                \
1310   INT32 *rs = &R##REG(SRCREG(op));                                \
1311   INT32 data = RFIELD##F(*rs);                                \
1312   *rs+=fw_inc[FW(F)];                                         \
1313   WFIELD##F(*rd,data);                                        \
1314   *rd+=fw_inc[FW(F)];                                         \
1315   COUNT_CYCLES(4);                                            \
1316}
1317void tms340x0_device::move0_ni_ni_a (UINT16 op) { MOVE_NI_NI(0,A); }
1318void tms340x0_device::move0_ni_ni_b (UINT16 op) { MOVE_NI_NI(0,B); }
1319void tms340x0_device::move1_ni_ni_a (UINT16 op) { MOVE_NI_NI(1,A); }
1320void tms340x0_device::move1_ni_ni_b (UINT16 op) { MOVE_NI_NI(1,B); }
1321
1322#define MOVE_R_NO(F,R)                                          \
1323{                                                               \
1324   INT32 o = PARAM_WORD();                                  \
1325   WFIELD##F(R##REG(DSTREG(op))+o,R##REG(SRCREG(op)));                 \
1326   COUNT_CYCLES(3);                                            \
1327}
1328void tms340x0_device::move0_r_no_a (UINT16 op) { MOVE_R_NO(0,A); }
1329void tms340x0_device::move0_r_no_b (UINT16 op) { MOVE_R_NO(0,B); }
1330void tms340x0_device::move1_r_no_a (UINT16 op) { MOVE_R_NO(1,A); }
1331void tms340x0_device::move1_r_no_b (UINT16 op) { MOVE_R_NO(1,B); }
1332
1333#define MOVE_NO_R(F,R)                                          \
1334{                                                               \
1335   INT32 *rd = &R##REG(DSTREG(op));                                \
1336   INT32 o = PARAM_WORD();                                  \
1337   CLR_NZV();                                                   \
1338   *rd = RFIELD##F(R##REG(SRCREG(op))+o);                          \
1339   SET_NZ_VAL(*rd);                                           \
1340   COUNT_CYCLES(5);                                            \
1341}
1342void tms340x0_device::move0_no_r_a (UINT16 op) { MOVE_NO_R(0,A); }
1343void tms340x0_device::move0_no_r_b (UINT16 op) { MOVE_NO_R(0,B); }
1344void tms340x0_device::move1_no_r_a (UINT16 op) { MOVE_NO_R(1,A); }
1345void tms340x0_device::move1_no_r_b (UINT16 op) { MOVE_NO_R(1,B); }
1346
1347#define MOVE_NO_NI(F,R)                                         \
1348{                                                               \
1349   INT32 *rd = &R##REG(DSTREG(op));                                \
1350   INT32 o = PARAM_WORD();                                  \
1351   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o);                   \
1352   WFIELD##F(*rd,data);                                        \
1353   *rd+=fw_inc[FW(F)];                                         \
1354   COUNT_CYCLES(5);                                            \
1355}
1356void tms340x0_device::move0_no_ni_a (UINT16 op) { MOVE_NO_NI(0,A); }
1357void tms340x0_device::move0_no_ni_b (UINT16 op) { MOVE_NO_NI(0,B); }
1358void tms340x0_device::move1_no_ni_a (UINT16 op) { MOVE_NO_NI(1,A); }
1359void tms340x0_device::move1_no_ni_b (UINT16 op) { MOVE_NO_NI(1,B); }
1360
1361#define MOVE_NO_NO(F,R)                                         \
1362{                                                               \
1363   INT32 o1 = PARAM_WORD();                                 \
1364   INT32 o2 = PARAM_WORD();                                 \
1365   INT32 data = RFIELD##F(R##REG(SRCREG(op))+o1);                  \
1366   WFIELD##F(R##REG(DSTREG(op))+o2,data);                          \
1367   COUNT_CYCLES(5);                                            \
1368}
1369void tms340x0_device::move0_no_no_a (UINT16 op) { MOVE_NO_NO(0,A); }
1370void tms340x0_device::move0_no_no_b (UINT16 op) { MOVE_NO_NO(0,B); }
1371void tms340x0_device::move1_no_no_a (UINT16 op) { MOVE_NO_NO(1,A); }
1372void tms340x0_device::move1_no_no_b (UINT16 op) { MOVE_NO_NO(1,B); }
1373
1374#define MOVE_RA(F,R)                                            \
1375{                                                               \
1376   WFIELD##F(PARAM_LONG(),R##REG(DSTREG(op)));                  \
1377   COUNT_CYCLES(3);                                            \
1378}
1379void tms340x0_device::move0_ra_a (UINT16 op) { MOVE_RA(0,A); }
1380void tms340x0_device::move0_ra_b (UINT16 op) { MOVE_RA(0,B); }
1381void tms340x0_device::move1_ra_a (UINT16 op) { MOVE_RA(1,A); }
1382void tms340x0_device::move1_ra_b (UINT16 op) { MOVE_RA(1,B); }
1383
1384#define MOVE_AR(F,R)                                            \
1385{                                                               \
1386   INT32 *rd = &R##REG(DSTREG(op));                                \
1387   CLR_NZV();                                                   \
1388   *rd = RFIELD##F(PARAM_LONG());                           \
1389   SET_NZ_VAL(*rd);                                           \
1390   COUNT_CYCLES(5);                                            \
1391}
1392void tms340x0_device::move0_ar_a (UINT16 op) { MOVE_AR(0,A); }
1393void tms340x0_device::move0_ar_b (UINT16 op) { MOVE_AR(0,B); }
1394void tms340x0_device::move1_ar_a (UINT16 op) { MOVE_AR(1,A); }
1395void tms340x0_device::move1_ar_b (UINT16 op) { MOVE_AR(1,B); }
1396
1397#define MOVE_A_NI(F,R)                                          \
1398{                                                               \
1399   INT32 *rd = &R##REG(DSTREG(op));                                \
1400   WFIELD##F(*rd,RFIELD##F(PARAM_LONG()));                  \
1401   *rd+=fw_inc[FW(F)];                                         \
1402   COUNT_CYCLES(5);                                            \
1403}
1404void tms340x0_device::move0_a_ni_a (UINT16 op) { MOVE_A_NI(0,A); }
1405void tms340x0_device::move0_a_ni_b (UINT16 op) { MOVE_A_NI(0,B); }
1406void tms340x0_device::move1_a_ni_a (UINT16 op) { MOVE_A_NI(1,A); }
1407void tms340x0_device::move1_a_ni_b (UINT16 op) { MOVE_A_NI(1,B); }
1408
1409#define MOVE_AA(F)                                              \
1410{                                                               \
1411   UINT32 bitaddrs=PARAM_LONG();                            \
1412   WFIELD##F(PARAM_LONG(),RFIELD##F(bitaddrs));             \
1413   COUNT_CYCLES(7);                                            \
1414}
1415void tms340x0_device::move0_aa (UINT16 op) { MOVE_AA(0); }
1416void tms340x0_device::move1_aa (UINT16 op) { MOVE_AA(1); }
1417
1418
1419
1420/***************************************************************************
1421    PROGRAM CONTROL INSTRUCTIONS
1422***************************************************************************/
1423
1424#define CALL(R)                                                 \
1425{                                                               \
1426   PUSH(m_pc);                                                 \
1427   m_pc = R##REG(DSTREG(op));                                       \
1428   CORRECT_ODD_PC("CALL");                                     \
1429   COUNT_CYCLES(3);                                            \
1430}
1431void tms340x0_device::call_a (UINT16 op) { CALL(A); }
1432void tms340x0_device::call_b (UINT16 op) { CALL(B); }
1433
1434void tms340x0_device::callr(UINT16 op)
1435{
1436   PUSH(m_pc+0x10);
1437   m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;
1438   COUNT_CYCLES(3);
1439}
1440
1441void tms340x0_device::calla(UINT16 op)
1442{
1443   PUSH(m_pc+0x20);
1444   m_pc = PARAM_LONG_NO_INC();
1445   CORRECT_ODD_PC("CALLA");
1446   COUNT_CYCLES(4);
1447}
1448
1449#define DSJ(R)                                                  \
1450{                                                               \
1451   if (--R##REG(DSTREG(op)))                                       \
1452   {                                                           \
1453      m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                    \
1454      COUNT_CYCLES(3);                                        \
1455   }                                                           \
1456   else                                                        \
1457   {                                                           \
1458      SKIP_WORD();                                             \
1459      COUNT_CYCLES(2);                                        \
1460   }                                                           \
1461}
1462void tms340x0_device::dsj_a (UINT16 op) { DSJ(A); }
1463void tms340x0_device::dsj_b (UINT16 op) { DSJ(B); }
1464
1465#define DSJEQ(R)                                                \
1466{                                                               \
1467   if (Z_FLAG())                                                    \
1468   {                                                           \
1469      if (--R##REG(DSTREG(op)))                                   \
1470      {                                                       \
1471         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1472         COUNT_CYCLES(3);                                    \
1473      }                                                       \
1474      else                                                    \
1475      {                                                       \
1476         SKIP_WORD();                                         \
1477         COUNT_CYCLES(2);                                    \
1478      }                                                       \
1479   }                                                           \
1480   else                                                        \
1481   {                                                           \
1482      SKIP_WORD();                                             \
1483      COUNT_CYCLES(2);                                        \
1484   }                                                           \
1485}
1486void tms340x0_device::dsjeq_a (UINT16 op) { DSJEQ(A); }
1487void tms340x0_device::dsjeq_b (UINT16 op) { DSJEQ(B); }
1488
1489#define DSJNE(R)                                                \
1490{                                                               \
1491   if (!Z_FLAG())                                               \
1492   {                                                           \
1493      if (--R##REG(DSTREG(op)))                                   \
1494      {                                                       \
1495         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1496         COUNT_CYCLES(3);                                    \
1497      }                                                       \
1498      else                                                    \
1499      {                                                       \
1500         SKIP_WORD();                                         \
1501         COUNT_CYCLES(2);                                    \
1502      }                                                       \
1503   }                                                           \
1504   else                                                        \
1505   {                                                           \
1506      SKIP_WORD();                                             \
1507      COUNT_CYCLES(2);                                        \
1508   }                                                           \
1509}
1510void tms340x0_device::dsjne_a (UINT16 op) { DSJNE(A); }
1511void tms340x0_device::dsjne_b (UINT16 op) { DSJNE(B); }
1512
1513#define DSJS(R)                                                 \
1514{                                                               \
1515   if (op & 0x0400)                                        \
1516   {                                                           \
1517      if (--R##REG(DSTREG(op)))                                   \
1518      {                                                       \
1519         m_pc -= ((PARAM_K(op))<<4);                              \
1520         COUNT_CYCLES(2);                                    \
1521      }                                                       \
1522      else                                                    \
1523         COUNT_CYCLES(3);                                    \
1524   }                                                           \
1525   else                                                        \
1526   {                                                           \
1527      if (--R##REG(DSTREG(op)))                                   \
1528      {                                                       \
1529         m_pc += ((PARAM_K(op))<<4);                              \
1530         COUNT_CYCLES(2);                                    \
1531      }                                                       \
1532      else                                                    \
1533         COUNT_CYCLES(3);                                    \
1534   }                                                           \
1535}
1536void tms340x0_device::dsjs_a (UINT16 op) { DSJS(A); }
1537void tms340x0_device::dsjs_b (UINT16 op) { DSJS(B); }
1538
1539void tms340x0_device::emu(UINT16 op)
1540{
1541   /* in RUN state, this instruction is a NOP */
1542   COUNT_CYCLES(6);
1543}
1544
1545#define EXGPC(R)                                                \
1546{                                                               \
1547   INT32 *rd = &R##REG(DSTREG(op));                                \
1548   INT32 temppc = *rd;                                         \
1549   *rd = m_pc;                                                  \
1550   m_pc = temppc;                                               \
1551   CORRECT_ODD_PC("EXGPC");                                    \
1552   COUNT_CYCLES(2);                                            \
1553}
1554void tms340x0_device::exgpc_a (UINT16 op) { EXGPC(A); }
1555void tms340x0_device::exgpc_b (UINT16 op) { EXGPC(B); }
1556
1557#define GETPC(R)                                                \
1558{                                                               \
1559   R##REG(DSTREG(op)) = m_pc;                                       \
1560   COUNT_CYCLES(1);                                            \
1561}
1562void tms340x0_device::getpc_a (UINT16 op) { GETPC(A); }
1563void tms340x0_device::getpc_b (UINT16 op) { GETPC(B); }
1564
1565#define GETST(R)                                                \
1566{                                                               \
1567   R##REG(DSTREG(op)) = m_st;                               \
1568   COUNT_CYCLES(1);                                            \
1569}
1570void tms340x0_device::getst_a (UINT16 op) { GETST(A); }
1571void tms340x0_device::getst_b (UINT16 op) { GETST(B); }
1572
1573#define j_xx_8(TAKE)                                            \
1574{                                                               \
1575   if (DSTREG(op))                                                 \
1576   {                                                           \
1577      if (TAKE)                                               \
1578      {                                                       \
1579         m_pc += (PARAM_REL8(op) << 4);                           \
1580         COUNT_CYCLES(2);                                    \
1581      }                                                       \
1582      else                                                    \
1583         COUNT_CYCLES(1);                                    \
1584   }                                                           \
1585   else                                                        \
1586   {                                                           \
1587      if (TAKE)                                               \
1588      {                                                       \
1589         m_pc = PARAM_LONG_NO_INC();                       \
1590         CORRECT_ODD_PC("J_XX_8");                           \
1591         COUNT_CYCLES(3);                                    \
1592      }                                                       \
1593      else                                                    \
1594      {                                                       \
1595         SKIP_LONG();                                         \
1596         COUNT_CYCLES(4);                                    \
1597      }                                                       \
1598   }                                                           \
1599}
1600
1601#define j_xx_0(TAKE)                                            \
1602{                                                               \
1603   if (DSTREG(op))                                             \
1604   {                                                           \
1605      if (TAKE)                                               \
1606      {                                                       \
1607         m_pc += (PARAM_REL8(op) << 4);                           \
1608         COUNT_CYCLES(2);                                    \
1609      }                                                       \
1610      else                                                    \
1611         COUNT_CYCLES(1);                                    \
1612   }                                                           \
1613   else                                                        \
1614   {                                                           \
1615      if (TAKE)                                               \
1616      {                                                       \
1617         m_pc += (PARAM_WORD_NO_INC()<<4)+0x10;                \
1618         COUNT_CYCLES(3);                                    \
1619      }                                                       \
1620      else                                                    \
1621      {                                                       \
1622         SKIP_WORD();                                         \
1623         COUNT_CYCLES(2);                                    \
1624      }                                                       \
1625   }                                                           \
1626}
1627
1628#define j_xx_x(TAKE)                                            \
1629{                                                               \
1630   if (TAKE)                                                   \
1631   {                                                           \
1632      m_pc += (PARAM_REL8(op) << 4);                               \
1633      COUNT_CYCLES(2);                                        \
1634   }                                                           \
1635   else                                                        \
1636      COUNT_CYCLES(1);                                        \
1637}
1638
1639void tms340x0_device::j_UC_0(UINT16 op)
1640{
1641   j_xx_0(1);
1642}
1643void tms340x0_device::j_UC_8(UINT16 op)
1644{
1645   j_xx_8(1);
1646}
1647void tms340x0_device::j_UC_x(UINT16 op)
1648{
1649   j_xx_x(1);
1650}
1651void tms340x0_device::j_P_0(UINT16 op)
1652{
1653   j_xx_0(!N_FLAG() && !Z_FLAG());
1654}
1655void tms340x0_device::j_P_8(UINT16 op)
1656{
1657   j_xx_8(!N_FLAG() && !Z_FLAG());
1658}
1659void tms340x0_device::j_P_x(UINT16 op)
1660{
1661   j_xx_x(!N_FLAG() && !Z_FLAG());
1662}
1663void tms340x0_device::j_LS_0(UINT16 op)
1664{
1665   j_xx_0(C_FLAG() || Z_FLAG());
1666}
1667void tms340x0_device::j_LS_8(UINT16 op)
1668{
1669   j_xx_8(C_FLAG() || Z_FLAG());
1670}
1671void tms340x0_device::j_LS_x(UINT16 op)
1672{
1673   j_xx_x(C_FLAG() || Z_FLAG());
1674}
1675void tms340x0_device::j_HI_0(UINT16 op)
1676{
1677   j_xx_0(!C_FLAG() && !Z_FLAG());
1678}
1679void tms340x0_device::j_HI_8(UINT16 op)
1680{
1681   j_xx_8(!C_FLAG() && !Z_FLAG());
1682}
1683void tms340x0_device::j_HI_x(UINT16 op)
1684{
1685   j_xx_x(!C_FLAG() && !Z_FLAG());
1686}
1687void tms340x0_device::j_LT_0(UINT16 op)
1688{
1689   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1690}
1691void tms340x0_device::j_LT_8(UINT16 op)
1692{
1693   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1694}
1695void tms340x0_device::j_LT_x(UINT16 op)
1696{
1697   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()));
1698}
1699void tms340x0_device::j_GE_0(UINT16 op)
1700{
1701   j_xx_0((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1702}
1703void tms340x0_device::j_GE_8(UINT16 op)
1704{
1705   j_xx_8((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1706}
1707void tms340x0_device::j_GE_x(UINT16 op)
1708{
1709   j_xx_x((N_FLAG() && V_FLAG()) || (!N_FLAG() && !V_FLAG()));
1710}
1711void tms340x0_device::j_LE_0(UINT16 op)
1712{
1713   j_xx_0((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1714}
1715void tms340x0_device::j_LE_8(UINT16 op)
1716{
1717   j_xx_8((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1718}
1719void tms340x0_device::j_LE_x(UINT16 op)
1720{
1721   j_xx_x((N_FLAG() && !V_FLAG()) || (!N_FLAG() && V_FLAG()) || Z_FLAG());
1722}
1723void tms340x0_device::j_GT_0(UINT16 op)
1724{
1725   j_xx_0((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1726}
1727void tms340x0_device::j_GT_8(UINT16 op)
1728{
1729   j_xx_8((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1730}
1731void tms340x0_device::j_GT_x(UINT16 op)
1732{
1733   j_xx_x((N_FLAG() && V_FLAG() && !Z_FLAG()) || (!N_FLAG() && !V_FLAG() && !Z_FLAG()));
1734}
1735void tms340x0_device::j_C_0(UINT16 op)
1736{
1737   j_xx_0(C_FLAG());
1738}
1739void tms340x0_device::j_C_8(UINT16 op)
1740{
1741   j_xx_8(C_FLAG());
1742}
1743void tms340x0_device::j_C_x(UINT16 op)
1744{
1745   j_xx_x(C_FLAG());
1746}
1747void tms340x0_device::j_NC_0(UINT16 op)
1748{
1749   j_xx_0(!C_FLAG());
1750}
1751void tms340x0_device::j_NC_8(UINT16 op)
1752{
1753   j_xx_8(!C_FLAG());
1754}
1755void tms340x0_device::j_NC_x(UINT16 op)
1756{
1757   j_xx_x(!C_FLAG());
1758}
1759void tms340x0_device::j_EQ_0(UINT16 op)
1760{
1761   j_xx_0(Z_FLAG());
1762}
1763void tms340x0_device::j_EQ_8(UINT16 op)
1764{
1765   j_xx_8(Z_FLAG());
1766}
1767void tms340x0_device::j_EQ_x(UINT16 op)
1768{
1769   j_xx_x(Z_FLAG());
1770}
1771void tms340x0_device::j_NE_0(UINT16 op)
1772{
1773   j_xx_0(!Z_FLAG());
1774}
1775void tms340x0_device::j_NE_8(UINT16 op)
1776{
1777   j_xx_8(!Z_FLAG());
1778}
1779void tms340x0_device::j_NE_x(UINT16 op)
1780{
1781   j_xx_x(!Z_FLAG());
1782}
1783void tms340x0_device::j_V_0(UINT16 op)
1784{
1785   j_xx_0(V_FLAG());
1786}
1787void tms340x0_device::j_V_8(UINT16 op)
1788{
1789   j_xx_8(V_FLAG());
1790}
1791void tms340x0_device::j_V_x(UINT16 op)
1792{
1793   j_xx_x(V_FLAG());
1794}
1795void tms340x0_device::j_NV_0(UINT16 op)
1796{
1797   j_xx_0(!V_FLAG());
1798}
1799void tms340x0_device::j_NV_8(UINT16 op)
1800{
1801   j_xx_8(!V_FLAG());
1802}
1803void tms340x0_device::j_NV_x(UINT16 op)
1804{
1805   j_xx_x(!V_FLAG());
1806}
1807void tms340x0_device::j_N_0(UINT16 op)
1808{
1809   j_xx_0(N_FLAG());
1810}
1811void tms340x0_device::j_N_8(UINT16 op)
1812{
1813   j_xx_8(N_FLAG());
1814}
1815void tms340x0_device::j_N_x(UINT16 op)
1816{
1817   j_xx_x(N_FLAG());
1818}
1819void tms340x0_device::j_NN_0(UINT16 op)
1820{
1821   j_xx_0(!N_FLAG());
1822}
1823void tms340x0_device::j_NN_8(UINT16 op)
1824{
1825   j_xx_8(!N_FLAG());
1826}
1827void tms340x0_device::j_NN_x(UINT16 op)
1828{
1829   j_xx_x(!N_FLAG());
1830}
1831
1832#define JUMP(R)                                                 \
1833{                                                               \
1834   m_pc = R##REG(DSTREG(op));                                       \
1835   CORRECT_ODD_PC("JUMP");                                     \
1836   COUNT_CYCLES(2);                                            \
1837}
1838void tms340x0_device::jump_a (UINT16 op) { JUMP(A); }
1839void tms340x0_device::jump_b (UINT16 op) { JUMP(B); }
1840
1841void tms340x0_device::popst(UINT16 op)
1842{
1843   SET_ST(POP());
1844   COUNT_CYCLES(8);
1845}
1846
1847void tms340x0_device::pushst(UINT16 op)
1848{
1849   PUSH(m_st);
1850   COUNT_CYCLES(2);
1851}
1852
1853#define PUTST(R)                                                \
1854{                                                               \
1855   SET_ST(R##REG(DSTREG(op)));                                \
1856   COUNT_CYCLES(3);                                            \
1857}
1858void tms340x0_device::putst_a (UINT16 op) { PUTST(A); }
1859void tms340x0_device::putst_b (UINT16 op) { PUTST(B); }
1860
1861void tms340x0_device::reti(UINT16 op)
1862{
1863   INT32 st = POP();
1864   m_pc = POP();
1865   CORRECT_ODD_PC("RETI");
1866   SET_ST(st);
1867   COUNT_CYCLES(11);
1868}
1869
1870void tms340x0_device::rets(UINT16 op)
1871{
1872   UINT32 offs;
1873   m_pc = POP();
1874   CORRECT_ODD_PC("RETS");
1875   offs = PARAM_N(op);
1876   if (offs)
1877   {
1878      SP()+=(offs<<4);
1879   }
1880   COUNT_CYCLES(7);
1881}
1882
1883#define REV(R)                                                  \
1884{                                                               \
1885   R##REG(DSTREG(op)) = 0x0008;                                    \
1886   COUNT_CYCLES(1);                                            \
1887}
1888void tms340x0_device::rev_a (UINT16 op) { REV(A); }
1889void tms340x0_device::rev_b (UINT16 op) { REV(B); }
1890
1891void tms340x0_device::trap(UINT16 op)
1892{
1893   UINT32 t = PARAM_N(op);
1894   if (t)
1895   {
1896      PUSH(m_pc);
1897      PUSH(m_st);
1898   }
1899   RESET_ST();
1900   m_pc = RLONG(0xffffffe0-(t<<5));
1901   CORRECT_ODD_PC("TRAP");
1902   COUNT_CYCLES(16);
1903}
1904
1905
1906
1907/***************************************************************************
1908    34020 INSTRUCTIONS
1909***************************************************************************/
1910
1911/************************************
1912
1913New 34020 ops:
1914
1915    0000 1100 000R dddd = ADDXYI IL,Rd
1916    iiii iiii iiii iiii
1917    iiii iiii iiii iiii
1918
1919    0000 0000 1111 00SD = BLMOVE S,D
1920
1921    0000 0110 0000 0000 = CEXEC S,c,ID,L
1922    cccc cccc S000 0000
1923    iiic cccc cccc cccc
1924
1925    1101 1000 0ccc cccS = CEXEC S,c,ID
1926    iiic cccc cccc cccc
1927
1928    0000 1000 1111 0010 = CLIP
1929
1930    0000 0110 011R dddd = CMOVCG Rd1,Rd2,S,c,ID
1931    cccc cccc S00R dddd
1932    iiic cccc cccc cccc
1933
1934    0000 0110 101R dddd = CMOVCM *Rd+,n,S,c,ID
1935    cccc cccc S00n nnnn
1936    iiic cccc cccc cccc
1937
1938    0000 0110 110R dddd = CMOVCM -*Rd,n,S,c,ID
1939    cccc cccc S00n nnnn
1940    iiic cccc cccc cccc
1941
1942    0000 0110 0110 0000 = CMOVCS c,ID
1943    cccc cccc 0000 0001
1944    iiic cccc cccc cccc
1945
1946    0000 0110 001R ssss = CMOVGC Rs,c,ID
1947    cccc cccc 0000 0000
1948    iiic cccc cccc cccc
1949
1950    0000 0110 010R ssss = CMOVGC Rs1,Rs2,S,c,ID
1951    cccc cccc S00R ssss
1952    iiic cccc cccc cccc
1953
1954    0000 0110 100n nnnn = CMOVMC *Rs+,n,S,c,ID
1955    cccc cccc S00R ssss
1956    iiic cccc cccc cccc
1957
1958    0000 1000 001n nnnn = CMOVMC -*Rs,n,S,c,ID
1959    cccc cccc S00R ssss
1960    iiic cccc cccc cccc
1961
1962    0000 0110 111R dddd = CMOVMC *Rs+,Rd,S,c,ID
1963    cccc cccc S00R ssss
1964    iiic cccc cccc cccc
1965
1966    0011 01kk kkkR dddd = CMPK k,Rd
1967
1968    0000 1010 100R dddd = CVDXYL Rd
1969
1970    0000 1010 011R dddd = CVMXYL Rd
1971
1972    1110 101s sssR dddd = CVSXYL Rs,Rd
1973
1974    0000 0010 101R dddd = EXGPS Rd
1975
1976    1101 1110 Z001 1010 = FLINE Z
1977
1978    0000 1010 1011 1011 = FPIXEQ
1979
1980    0000 1010 1101 1011 = FPIXNE
1981
1982    0000 0010 110R dddd = GETPS Rd
1983
1984    0000 0000 0100 0000 = IDLE
1985
1986    0000 1100 0101 0111 = LINIT
1987
1988    0000 0000 1000 0000 = MWAIT
1989
1990    0000 1010 0011 0111 = PFILL XY
1991
1992    0000 1110 0001 0111 = PIXBLT L,M,L
1993
1994    0000 1000 0110 0000 = RETM
1995
1996    0111 101s sssR dddd = RMO Rs,Rd
1997
1998    0000 0010 100R dddd = RPIX Rd
1999
2000    0000 0010 0111 0011 = SETCDP
2001
2002    0000 0010 1111 1011 = SETCMP
2003
2004    0000 0010 0101 0001 = SETCSP
2005
2006    0111 111s sssR dddd = SWAPF *Rs,Rd,0
2007
2008    0000 1110 1111 1010 = TFILL XY
2009
2010    0000 1000 0000 1111 = TRAPL
2011
2012    0000 1000 0101 0111 = VBLT B,L
2013
2014    0000 1010 0101 0111 = VFILL L
2015
2016    0000 1010 0000 0000 = VLCOL
2017
2018************************************/
2019
2020
2021#define ADD_XYI(R)                              \
2022{                                               \
2023   UINT32 a = PARAM_LONG();                 \
2024   XY *b = &R##REG_XY(DSTREG(op));                 \
2025   CLR_NCZV();                                  \
2026   b->x += (INT16)(a & 0xffff);                \
2027   b->y += ((INT32)a >> 16);                   \
2028   SET_N_LOG(b->x == 0);                      \
2029   SET_C_BIT_LO(b->y, 15);                        \
2030   SET_Z_LOG(b->y == 0);                      \
2031   SET_V_BIT_LO(b->x, 15);                        \
2032   COUNT_CYCLES(1);                            \
2033}
2034void tms340x0_device::addxyi_a(UINT16 op)
2035{
2036   if (!m_is_34020) { unimpl(op); return; }
2037   ADD_XYI(A);
2038}
2039void tms340x0_device::addxyi_b(UINT16 op)
2040{
2041   if (!m_is_34020) { unimpl(op); return; }
2042   ADD_XYI(B);
2043}
2044
2045void tms340x0_device::blmove(UINT16 op)
2046{
2047   offs_t src = BREG(0);
2048   offs_t dst = BREG(2);
2049   offs_t bits = BREG(7);
2050
2051   if (!m_is_34020) { unimpl(op); return; }
2052
2053   /* src and dst are aligned */
2054   if (!(src & 0x0f) && !(dst & 0x0f))
2055   {
2056      while (bits >= 16 && m_icount > 0)
2057      {
2058         TMS34010_WRMEM_WORD(TOBYTE(dst), TMS34010_RDMEM_WORD(TOBYTE(src)));
2059         src += 0x10;
2060         dst += 0x10;
2061         bits -= 0x10;
2062         m_icount -= 2;
2063      }
2064      if (bits != 0 && m_icount > 0)
2065      {
2066         (this->*s_wfield_functions[bits])(dst, (this->*s_rfield_functions[bits])(src));
2067         dst += bits;
2068         src += bits;
2069         bits = 0;
2070         m_icount -= 2;
2071      }
2072   }
2073
2074   /* src is aligned, dst is not */
2075   else if (!(src & 0x0f))
2076   {
2077      logerror("020:BLMOVE with aligned src and unaligned dst\n");
2078   }
2079
2080   /* dst is aligned, src is not */
2081   else if (!(dst & 0x0f))
2082   {
2083      logerror("020:BLMOVE with unaligned src and aligned dst\n");
2084   }
2085
2086   /* neither are aligned */
2087   else
2088   {
2089      logerror("020:BLMOVE with completely unaligned src and dst\n");
2090   }
2091
2092   /* update the final results */
2093   BREG(0) = src;
2094   BREG(2) = dst;
2095   BREG(7) = bits;
2096
2097   /* if we're not done yet, back up the PC */
2098   if (bits != 0)
2099      m_pc -= 0x10;
2100}
2101
2102void tms340x0_device::cexec_l(UINT16 op)
2103{
2104   if (!m_is_34020) { unimpl(op); return; }
2105   logerror("020:cexec_l\n");
2106}
2107
2108void tms340x0_device::cexec_s(UINT16 op)
2109{
2110   if (!m_is_34020) { unimpl(op); return; }
2111   logerror("020:cexec_s\n");
2112}
2113
2114void tms340x0_device::clip(UINT16 op)
2115{
2116   if (!m_is_34020) { unimpl(op); return; }
2117   logerror("020:clip\n");
2118}
2119
2120void tms340x0_device::cmovcg_a(UINT16 op)
2121{
2122   if (!m_is_34020) { unimpl(op); return; }
2123   logerror("020:cmovcg_a\n");
2124}
2125
2126void tms340x0_device::cmovcg_b(UINT16 op)
2127{
2128   if (!m_is_34020) { unimpl(op); return; }
2129   logerror("020:cmovcg_b\n");
2130}
2131
2132void tms340x0_device::cmovcm_f(UINT16 op)
2133{
2134   if (!m_is_34020) { unimpl(op); return; }
2135   logerror("020:cmovcm_f\n");
2136}
2137
2138void tms340x0_device::cmovcm_b(UINT16 op)
2139{
2140   if (!m_is_34020) { unimpl(op); return; }
2141   logerror("020:cmovcm_b\n");
2142}
2143
2144void tms340x0_device::cmovgc_a(UINT16 op)
2145{
2146   if (!m_is_34020) { unimpl(op); return; }
2147   logerror("020:cmovgc_a\n");
2148}
2149
2150void tms340x0_device::cmovgc_b(UINT16 op)
2151{
2152   if (!m_is_34020) { unimpl(op); return; }
2153   logerror("020:cmovgc_b\n");
2154}
2155
2156void tms340x0_device::cmovgc_a_s(UINT16 op)
2157{
2158   if (!m_is_34020) { unimpl(op); return; }
2159   logerror("020:cmovgc_a_s\n");
2160}
2161
2162void tms340x0_device::cmovgc_b_s(UINT16 op)
2163{
2164   if (!m_is_34020) { unimpl(op); return; }
2165   logerror("020:cmovgc_b_s\n");
2166}
2167
2168void tms340x0_device::cmovmc_f(UINT16 op)
2169{
2170   if (!m_is_34020) { unimpl(op); return; }
2171   logerror("020:cmovmc_f\n");
2172}
2173
2174void tms340x0_device::cmovmc_f_va(UINT16 op)
2175{
2176   if (!m_is_34020) { unimpl(op); return; }
2177   logerror("020:cmovmc_f_va\n");
2178}
2179
2180void tms340x0_device::cmovmc_f_vb(UINT16 op)
2181{
2182   if (!m_is_34020) { unimpl(op); return; }
2183   logerror("020:cmovmc_f_vb\n");
2184}
2185
2186void tms340x0_device::cmovmc_b(UINT16 op)
2187{
2188   if (!m_is_34020) { unimpl(op); return; }
2189   logerror("020:cmovmc_b\n");
2190}
2191
2192#define CMPK(R)                                             \
2193{                                                           \
2194   INT32 r;                                                \
2195   INT32 *rd = &R##REG(DSTREG(op));                            \
2196   INT32 t = PARAM_K(op); if (!t) t = 32;                      \
2197   CLR_NCZV();                                              \
2198   r = *rd - t;                                            \
2199   SET_NZCV_SUB(*rd,t,r);                                  \
2200   COUNT_CYCLES(1);                                        \
2201}
2202void tms340x0_device::cmp_k_a(UINT16 op)
2203{
2204   if (!m_is_34020) { unimpl(op); return; }
2205   CMPK(A);
2206}
2207void tms340x0_device::cmp_k_b(UINT16 op)
2208{
2209   if (!m_is_34020) { unimpl(op); return; }
2210   CMPK(B);
2211}
2212
2213void tms340x0_device::cvdxyl_a(UINT16 op)
2214{
2215   if (!m_is_34020) { unimpl(op); return; }
2216   logerror("020:cvdxyl_a\n");
2217}
2218
2219void tms340x0_device::cvdxyl_b(UINT16 op)
2220{
2221   if (!m_is_34020) { unimpl(op); return; }
2222   logerror("020:cvdxyl_b\n");
2223}
2224
2225void tms340x0_device::cvmxyl_a(UINT16 op)
2226{
2227   if (!m_is_34020) { unimpl(op); return; }
2228   logerror("020:cvmxyl_a\n");
2229}
2230
2231void tms340x0_device::cvmxyl_b(UINT16 op)
2232{
2233   if (!m_is_34020) { unimpl(op); return; }
2234   logerror("020:cvmxyl_b\n");
2235}
2236
2237void tms340x0_device::cvsxyl_a(UINT16 op)
2238{
2239   if (!m_is_34020) { unimpl(op); return; }
2240   logerror("020:cvsxyl_a\n");
2241}
2242
2243void tms340x0_device::cvsxyl_b(UINT16 op)
2244{
2245   if (!m_is_34020) { unimpl(op); return; }
2246   logerror("020:cvsxyl_b\n");
2247}
2248
2249void tms340x0_device::exgps_a(UINT16 op)
2250{
2251   if (!m_is_34020) { unimpl(op); return; }
2252   logerror("020:exgps_a\n");
2253}
2254
2255void tms340x0_device::exgps_b(UINT16 op)
2256{
2257   if (!m_is_34020) { unimpl(op); return; }
2258   logerror("020:exgps_b\n");
2259}
2260
2261void tms340x0_device::fline(UINT16 op)
2262{
2263   if (!m_is_34020) { unimpl(op); return; }
2264   logerror("020:fline\n");
2265}
2266
2267void tms340x0_device::fpixeq(UINT16 op)
2268{
2269   if (!m_is_34020) { unimpl(op); return; }
2270   logerror("020:fpixeq\n");
2271}
2272
2273void tms340x0_device::fpixne(UINT16 op)
2274{
2275   if (!m_is_34020) { unimpl(op); return; }
2276   logerror("020:fpixne\n");
2277}
2278
2279void tms340x0_device::getps_a(UINT16 op)
2280{
2281   if (!m_is_34020) { unimpl(op); return; }
2282   logerror("020:getps_a\n");
2283}
2284
2285void tms340x0_device::getps_b(UINT16 op)
2286{
2287   if (!m_is_34020) { unimpl(op); return; }
2288   logerror("020:getps_b\n");
2289}
2290
2291void tms340x0_device::idle(UINT16 op)
2292{
2293   if (!m_is_34020) { unimpl(op); return; }
2294   logerror("020:idle\n");
2295}
2296
2297void tms340x0_device::linit(UINT16 op)
2298{
2299   if (!m_is_34020) { unimpl(op); return; }
2300   logerror("020:linit\n");
2301}
2302
2303void tms340x0_device::mwait(UINT16 op)
2304{
2305   if (!m_is_34020) { unimpl(op); return; }
2306}
2307
2308void tms340x0_device::pfill_xy(UINT16 op)
2309{
2310   if (!m_is_34020) { unimpl(op); return; }
2311   logerror("020:pfill_xy\n");
2312}
2313
2314void tms340x0_device::pixblt_l_m_l(UINT16 op)
2315{
2316   if (!m_is_34020) { unimpl(op); return; }
2317   logerror("020:pixblt_l_m_l\n");
2318}
2319
2320void tms340x0_device::retm(UINT16 op)
2321{
2322   if (!m_is_34020) { unimpl(op); return; }
2323   logerror("020:retm\n");
2324}
2325
2326#define RMO(R)                                                  \
2327{                                                               \
2328   UINT32 res = 0;                                             \
2329   UINT32 rs  = R##REG(SRCREG(op));                                \
2330      INT32 *rd = &R##REG(DSTREG(op));                                \
2331   CLR_Z();                                                     \
2332   SET_Z_VAL(rs);                                             \
2333   if (rs)                                                     \
2334   {                                                           \
2335      while (!(rs & 0x00000001))                              \
2336      {                                                       \
2337         res++;                                              \
2338         rs >>= 1;                                           \
2339      }                                                       \
2340   }                                                           \
2341   *rd = res;                                                  \
2342   COUNT_CYCLES(1);                                            \
2343}
2344
2345void tms340x0_device::rmo_a(UINT16 op) { RMO(A); }
2346void tms340x0_device::rmo_b(UINT16 op) { RMO(B); }
2347
2348#define RPIX(R)                                 \
2349{                                               \
2350   UINT32 v = R##REG(DSTREG(op));                  \
2351   switch (m_pixelshift)                    \
2352   {                                           \
2353      case 0:                                 \
2354         v = (v & 1) ? 0xffffffff : 0x00000000;\
2355         COUNT_CYCLES(8);                    \
2356         break;                              \
2357      case 1:                                 \
2358         v &= 3;                             \
2359         v |= v << 2;                        \
2360         v |= v << 4;                        \
2361         v |= v << 8;                        \
2362         v |= v << 16;                       \
2363         COUNT_CYCLES(7);                    \
2364         break;                              \
2365      case 2:                                 \
2366         v &= 0x0f;                          \
2367         v |= v << 4;                        \
2368         v |= v << 8;                        \
2369         v |= v << 16;                       \
2370         COUNT_CYCLES(6);                    \
2371         break;                              \
2372      case 3:                                 \
2373         v &= 0xff;                          \
2374         v |= v << 8;                        \
2375         v |= v << 16;                       \
2376         COUNT_CYCLES(5);                    \
2377         break;                              \
2378      case 4:                                 \
2379         v &= 0xffff;                        \
2380         v |= v << 16;                       \
2381         COUNT_CYCLES(4);                    \
2382         break;                              \
2383      case 5:                                 \
2384         COUNT_CYCLES(2);                    \
2385         break;                              \
2386   }                                           \
2387   R##REG(DSTREG(op)) = v;                         \
2388}
2389
2390void tms340x0_device::rpix_a(UINT16 op)
2391{
2392   if (!m_is_34020) { unimpl(op); return; }
2393   RPIX(A);
2394}
2395
2396void tms340x0_device::rpix_b(UINT16 op)
2397{
2398   if (!m_is_34020) { unimpl(op); return; }
2399   RPIX(B);
2400}
2401
2402void tms340x0_device::setcdp(UINT16 op)
2403{
2404   if (!m_is_34020) { unimpl(op); return; }
2405   logerror("020:setcdp\n");
2406}
2407
2408void tms340x0_device::setcmp(UINT16 op)
2409{
2410   if (!m_is_34020) { unimpl(op); return; }
2411   logerror("020:setcmp\n");
2412}
2413
2414void tms340x0_device::setcsp(UINT16 op)
2415{
2416   if (!m_is_34020) { unimpl(op); return; }
2417   logerror("020:setcsp\n");
2418}
2419
2420void tms340x0_device::swapf_a(UINT16 op)
2421{
2422   if (!m_is_34020) { unimpl(op); return; }
2423   logerror("020:swapf_a\n");
2424}
2425
2426void tms340x0_device::swapf_b(UINT16 op)
2427{
2428   if (!m_is_34020) { unimpl(op); return; }
2429   logerror("020:swapf_b\n");
2430}
2431
2432void tms340x0_device::tfill_xy(UINT16 op)
2433{
2434   if (!m_is_34020) { unimpl(op); return; }
2435   logerror("020:tfill_xy\n");
2436}
2437
2438void tms340x0_device::trapl(UINT16 op)
2439{
2440   if (!m_is_34020) { unimpl(op); return; }
2441   logerror("020:trapl\n");
2442}
2443
2444void tms340x0_device::vblt_b_l(UINT16 op)
2445{
2446   if (!m_is_34020) { unimpl(op); return; }
2447   logerror("020:vblt_b_l\n");
2448}
2449
2450void tms340x0_device::vfill_l(UINT16 op)
2451{
2452   if (!m_is_34020) { unimpl(op); return; }
2453   logerror("020:vfill_l\n");
2454}
2455
2456void tms340x0_device::vlcol(UINT16 op)
2457{
2458   if (!m_is_34020) { unimpl(op); return; }
2459   logerror("020:vlcol\n");
2460}
trunk/src/devices/cpu/tms34010/34010tbl.cpp
r250291r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/*** TMS34010: Portable TMS34010 emulator ***********************************
4
5    Copyright Alex Pasadyn/Zsolt Vasvari
6
7    Opcode Table
8
9*****************************************************************************/
10
11/* Opcode Table */
12const tms340x0_device::opcode_func tms340x0_device::s_opcode_table[65536 >> 4] =
13{
14   /* 0x0000 0x0010 0x0020 0x0030 ... 0x00f0 */
15   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::rev_a,      &tms340x0_device::rev_b,      &tms340x0_device::idle,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
16   &tms340x0_device::mwait,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::blmove,
17   /* 0x0100 */
18   &tms340x0_device::emu,        &tms340x0_device::unimpl,     &tms340x0_device::exgpc_a,    &tms340x0_device::exgpc_b,    &tms340x0_device::getpc_a,    &tms340x0_device::getpc_b,    &tms340x0_device::jump_a,     &tms340x0_device::jump_b,
19   &tms340x0_device::getst_a,    &tms340x0_device::getst_b,    &tms340x0_device::putst_a,    &tms340x0_device::putst_b,    &tms340x0_device::popst,      &tms340x0_device::unimpl,     &tms340x0_device::pushst,     &tms340x0_device::unimpl,
20   /* 0x0200 */
21   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::setcsp,     &tms340x0_device::unimpl,     &tms340x0_device::setcdp,
22   &tms340x0_device::rpix_a,     &tms340x0_device::rpix_b,     &tms340x0_device::exgps_a,    &tms340x0_device::exgps_b,    &tms340x0_device::getps_a,    &tms340x0_device::getps_b,    &tms340x0_device::unimpl,     &tms340x0_device::setcmp,
23   /* 0x0300 */
24   &tms340x0_device::nop,        &tms340x0_device::unimpl,     &tms340x0_device::clrc,       &tms340x0_device::unimpl,     &tms340x0_device::movb_aa,    &tms340x0_device::unimpl,     &tms340x0_device::dint,       &tms340x0_device::unimpl,
25   &tms340x0_device::abs_a,      &tms340x0_device::abs_b,      &tms340x0_device::neg_a,      &tms340x0_device::neg_b,      &tms340x0_device::negb_a,     &tms340x0_device::negb_b,     &tms340x0_device::not_a,      &tms340x0_device::not_b,
26   /* 0x0400 */
27   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
28   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
29   /* 0x0500 */
30   &tms340x0_device::sext0_a,    &tms340x0_device::sext0_b,    &tms340x0_device::zext0_a,    &tms340x0_device::zext0_b,    &tms340x0_device::setf0,      &tms340x0_device::setf0,      &tms340x0_device::setf0,      &tms340x0_device::setf0,
31   &tms340x0_device::move0_ra_a, &tms340x0_device::move0_ra_b, &tms340x0_device::move0_ar_a, &tms340x0_device::move0_ar_b, &tms340x0_device::move0_aa,   &tms340x0_device::unimpl,     &tms340x0_device::movb_ra_a,  &tms340x0_device::movb_ra_b,
32   /* 0x0600 */
33   &tms340x0_device::cexec_l,    &tms340x0_device::unimpl,     &tms340x0_device::cmovgc_a,   &tms340x0_device::cmovgc_b,   &tms340x0_device::cmovgc_a_s, &tms340x0_device::cmovgc_b_s, &tms340x0_device::cmovcg_a,   &tms340x0_device::cmovcg_b,
34   &tms340x0_device::cmovmc_f,   &tms340x0_device::cmovmc_f,   &tms340x0_device::cmovcm_f,   &tms340x0_device::cmovcm_f,   &tms340x0_device::cmovcm_b,   &tms340x0_device::cmovcm_b,   &tms340x0_device::cmovmc_f_va,&tms340x0_device::cmovmc_f_vb,
35   /* 0x0700 */
36   &tms340x0_device::sext1_a,    &tms340x0_device::sext1_b,    &tms340x0_device::zext1_a,    &tms340x0_device::zext1_b,    &tms340x0_device::setf1,      &tms340x0_device::setf1,      &tms340x0_device::setf1,      &tms340x0_device::setf1,
37   &tms340x0_device::move1_ra_a, &tms340x0_device::move1_ra_b, &tms340x0_device::move1_ar_a, &tms340x0_device::move1_ar_b, &tms340x0_device::move1_aa,   &tms340x0_device::unimpl,     &tms340x0_device::movb_ar_a,  &tms340x0_device::movb_ar_b,
38   /* 0x0800 */
39   &tms340x0_device::trapl,      &tms340x0_device::unimpl,     &tms340x0_device::cmovmc_b,   &tms340x0_device::cmovmc_b,   &tms340x0_device::unimpl,     &tms340x0_device::vblt_b_l,   &tms340x0_device::retm,       &tms340x0_device::unimpl,
40   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::clip,
41   /* 0x0900 */
42   &tms340x0_device::trap,       &tms340x0_device::trap,       &tms340x0_device::call_a,     &tms340x0_device::call_b,     &tms340x0_device::reti,       &tms340x0_device::unimpl,     &tms340x0_device::rets,       &tms340x0_device::rets,
43   &tms340x0_device::mmtm_a,     &tms340x0_device::mmtm_b,     &tms340x0_device::mmfm_a,     &tms340x0_device::mmfm_b,     &tms340x0_device::movi_w_a,   &tms340x0_device::movi_w_b,   &tms340x0_device::movi_l_a,   &tms340x0_device::movi_l_b,
44   /* 0x0a00 */
45   &tms340x0_device::vlcol,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::pfill_xy,   &tms340x0_device::unimpl,     &tms340x0_device::vfill_l,    &tms340x0_device::cvmxyl_a,   &tms340x0_device::cvmxyl_b,
46   &tms340x0_device::cvdxyl_a,   &tms340x0_device::cvdxyl_b,   &tms340x0_device::unimpl,     &tms340x0_device::fpixeq,     &tms340x0_device::unimpl,     &tms340x0_device::fpixne,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
47   /* 0x0b00 */
48   &tms340x0_device::addi_w_a,   &tms340x0_device::addi_w_b,   &tms340x0_device::addi_l_a,   &tms340x0_device::addi_l_b,   &tms340x0_device::cmpi_w_a,   &tms340x0_device::cmpi_w_b,   &tms340x0_device::cmpi_l_a,   &tms340x0_device::cmpi_l_b,
49   &tms340x0_device::andi_a,     &tms340x0_device::andi_b,     &tms340x0_device::ori_a,      &tms340x0_device::ori_b,      &tms340x0_device::xori_a,     &tms340x0_device::xori_b,     &tms340x0_device::subi_w_a,   &tms340x0_device::subi_w_b,
50   /* 0x0c00 */
51   &tms340x0_device::addxyi_a,   &tms340x0_device::addxyi_b,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::linit,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
52   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
53   /* 0x0d00 */
54   &tms340x0_device::subi_l_a,   &tms340x0_device::subi_l_b,   &tms340x0_device::unimpl,     &tms340x0_device::callr,      &tms340x0_device::unimpl,     &tms340x0_device::calla,      &tms340x0_device::eint,       &tms340x0_device::unimpl,
55   &tms340x0_device::dsj_a,      &tms340x0_device::dsj_b,      &tms340x0_device::dsjeq_a,    &tms340x0_device::dsjeq_b,    &tms340x0_device::dsjne_a,    &tms340x0_device::dsjne_b,    &tms340x0_device::setc,       &tms340x0_device::unimpl,
56   /* 0x0e00 */
57   &tms340x0_device::unimpl,     &tms340x0_device::pixblt_l_m_l,&tms340x0_device::unimpl,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
58   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::tfill_xy,
59   /* 0x0f00 */
60   &tms340x0_device::pixblt_l_l, &tms340x0_device::unimpl,     &tms340x0_device::pixblt_l_xy,&tms340x0_device::unimpl,     &tms340x0_device::pixblt_xy_l,&tms340x0_device::unimpl,     &tms340x0_device::pixblt_xy_xy,&tms340x0_device::unimpl,
61   &tms340x0_device::pixblt_b_l, &tms340x0_device::unimpl,     &tms340x0_device::pixblt_b_xy,&tms340x0_device::unimpl,     &tms340x0_device::fill_l,     &tms340x0_device::unimpl,     &tms340x0_device::fill_xy,    &tms340x0_device::unimpl,
62   /* 0x1000 */
63   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
64   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
65   /* 0x1100 */
66   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
67   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
68   /* 0x1200 */
69   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
70   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
71   /* 0x1300 */
72   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
73   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
74   /* 0x1400 */
75   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
76   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
77   /* 0x1500 */
78   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
79   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
80   /* 0x1600 */
81   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
82   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
83   /* 0x1700 */
84   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
85   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
86   /* 0x1800 */
87   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
88   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
89   /* 0x1900 */
90   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
91   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
92   /* 0x1a00 */
93   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
94   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
95   /* 0x1b00 */
96   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
97   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
98   /* 0x1c00 */
99   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
100   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
101   /* 0x1d00 */
102   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
103   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
104   /* 0x1e00 */
105   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
106   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
107   /* 0x1f00 */
108   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
109   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
110   /* 0x2000 */
111   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
112   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
113   /* 0x2100 */
114   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
115   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
116   /* 0x2200 */
117   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
118   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
119   /* 0x2300 */
120   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
121   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
122   /* 0x2400 */
123   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
124   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
125   /* 0x2500 */
126   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
127   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
128   /* 0x2600 */
129   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
130   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
131   /* 0x2700 */
132   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
133   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
134   /* 0x2800 */
135   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
136   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
137   /* 0x2900 */
138   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
139   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
140   /* 0x2a00 */
141   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
142   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
143   /* 0x2b00 */
144   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
145   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
146   /* 0x2c00 */
147   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
148   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
149   /* 0x2d00 */
150   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
151   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
152   /* 0x2e00 */
153   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
154   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
155   /* 0x2f00 */
156   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
157   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
158   /* 0x3000 */
159   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
160   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
161   /* 0x3100 */
162   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
163   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
164   /* 0x3200 */
165   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
166   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
167   /* 0x3300 */
168   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
169   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
170   /* 0x3400 */
171   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
172   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
173   /* 0x3500 */
174   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
175   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
176   /* 0x3600 */
177   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
178   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
179   /* 0x3700 */
180   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
181   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
182   /* 0x3800 */
183   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
184   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
185   /* 0x3900 */
186   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
187   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
188   /* 0x3a00 */
189   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
190   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
191   /* 0x3b00 */
192   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
193   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
194   /* 0x3c00 */
195   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
196   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
197   /* 0x3d00 */
198   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
199   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
200   /* 0x3e00 */
201   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
202   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
203   /* 0x3f00 */
204   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
205   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
206   /* 0x4000 */
207   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
208   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
209   /* 0x4100 */
210   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
211   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
212   /* 0x4200 */
213   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
214   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
215   /* 0x4300 */
216   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
217   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
218   /* 0x4400 */
219   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
220   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
221   /* 0x4500 */
222   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
223   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
224   /* 0x4600 */
225   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
226   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
227   /* 0x4700 */
228   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
229   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
230   /* 0x4800 */
231   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
232   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
233   /* 0x4900 */
234   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
235   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
236   /* 0x4a00 */
237   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
238   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
239   /* 0x4b00 */
240   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
241   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
242   /* 0x4c00 */
243   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
244   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
245   /* 0x4d00 */
246   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
247   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
248   /* 0x4e00 */
249   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
250   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
251   /* 0x4f00 */
252   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
253   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
254   /* 0x5000 */
255   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
256   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
257   /* 0x5100 */
258   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
259   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
260   /* 0x5200 */
261   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
262   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
263   /* 0x5300 */
264   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
265   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
266   /* 0x5400 */
267   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
268   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
269   /* 0x5500 */
270   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
271   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
272   /* 0x5600 */
273   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
274   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
275   /* 0x5700 */
276   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
277   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
278   /* 0x5800 */
279   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
280   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
281   /* 0x5900 */
282   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
283   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
284   /* 0x5a00 */
285   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
286   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
287   /* 0x5b00 */
288   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
289   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
290   /* 0x5c00 */
291   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
292   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
293   /* 0x5d00 */
294   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
295   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
296   /* 0x5e00 */
297   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
298   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
299   /* 0x5f00 */
300   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
301   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
302   /* 0x6000 */
303   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
304   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
305   /* 0x6100 */
306   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
307   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
308   /* 0x6200 */
309   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
310   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
311   /* 0x6300 */
312   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
313   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
314   /* 0x6400 */
315   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
316   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
317   /* 0x6500 */
318   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
319   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
320   /* 0x6600 */
321   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
322   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
323   /* 0x6700 */
324   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
325   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
326   /* 0x6800 */
327   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
328   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
329   /* 0x6900 */
330   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
331   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
332   /* 0x6a00 */
333   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
334   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
335   /* 0x6b00 */
336   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
337   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
338   /* 0x6c00 */
339   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
340   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
341   /* 0x6d00 */
342   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
343   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
344   /* 0x6e00 */
345   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
346   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
347   /* 0x6f00 */
348   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
349   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
350   /* 0x7000 */
351   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
352   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
353   /* 0x7100 */
354   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
355   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
356   /* 0x7200 */
357   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
358   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
359   /* 0x7300 */
360   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
361   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
362   /* 0x7400 */
363   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
364   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
365   /* 0x7500 */
366   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
367   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
368   /* 0x7600 */
369   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
370   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
371   /* 0x7700 */
372   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
373   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
374   /* 0x7800 */
375   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
376   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
377   /* 0x7900 */
378   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
379   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
380   /* 0x7a00 */
381   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
382   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
383   /* 0x7b00 */
384   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
385   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
386   /* 0x7c00 */
387   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
388   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
389   /* 0x7d00 */
390   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
391   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
392   /* 0x7e00 */
393   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
394   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
395   /* 0x7f00 */
396   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
397   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
398   /* 0x8000 */
399   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
400   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
401   /* 0x8100 */
402   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
403   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
404   /* 0x8200 */
405   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
406   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
407   /* 0x8300 */
408   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
409   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
410   /* 0x8400 */
411   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
412   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
413   /* 0x8500 */
414   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
415   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
416   /* 0x8600 */
417   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
418   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
419   /* 0x8700 */
420   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
421   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
422   /* 0x8800 */
423   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
424   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
425   /* 0x8900 */
426   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
427   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
428   /* 0x8a00 */
429   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
430   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
431   /* 0x8b00 */
432   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
433   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
434   /* 0x8c00 */
435   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
436   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
437   /* 0x8d00 */
438   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
439   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
440   /* 0x8e00 */
441   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
442   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
443   /* 0x8f00 */
444   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
445   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
446   /* 0x9000 */
447   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
448   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
449   /* 0x9100 */
450   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
451   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
452   /* 0x9200 */
453   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
454   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
455   /* 0x9300 */
456   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
457   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
458   /* 0x9400 */
459   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
460   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
461   /* 0x9500 */
462   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
463   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
464   /* 0x9600 */
465   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
466   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
467   /* 0x9700 */
468   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
469   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
470   /* 0x9800 */
471   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
472   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
473   /* 0x9900 */
474   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
475   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
476   /* 0x9a00 */
477   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
478   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
479   /* 0x9b00 */
480   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
481   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
482   /* 0x9c00 */
483   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
484   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
485   /* 0x9d00 */
486   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
487   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
488   /* 0x9e00 */
489   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
490   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
491   /* 0x9f00 */
492   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
493   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
494   /* 0xa000 */
495   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
496   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
497   /* 0xa100 */
498   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
499   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
500   /* 0xa200 */
501   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
502   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
503   /* 0xa300 */
504   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
505   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
506   /* 0xa400 */
507   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
508   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
509   /* 0xa500 */
510   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
511   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
512   /* 0xa600 */
513   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
514   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
515   /* 0xa700 */
516   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
517   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
518   /* 0xa800 */
519   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
520   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
521   /* 0xa900 */
522   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
523   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
524   /* 0xaa00 */
525   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
526   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
527   /* 0xab00 */
528   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
529   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
530   /* 0xac00 */
531   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
532   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
533   /* 0xad00 */
534   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
535   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
536   /* 0xae00 */
537   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
538   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
539   /* 0xaf00 */
540   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
541   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
542   /* 0xb000 */
543   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
544   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
545   /* 0xb100 */
546   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
547   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
548   /* 0xb200 */
549   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
550   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
551   /* 0xb300 */
552   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
553   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
554   /* 0xb400 */
555   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
556   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
557   /* 0xb500 */
558   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
559   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
560   /* 0xb600 */
561   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
562   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
563   /* 0xb700 */
564   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
565   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
566   /* 0xb800 */
567   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
568   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
569   /* 0xb900 */
570   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
571   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
572   /* 0xba00 */
573   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
574   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
575   /* 0xbb00 */
576   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
577   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
578   /* 0xbc00 */
579   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
580   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
581   /* 0xbd00 */
582   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
583   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
584   /* 0xbe00 */
585   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
586   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
587   /* 0xbf00 */
588   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
589   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
590   /* 0xc000 */
591   &tms340x0_device::j_UC_0,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,
592   &tms340x0_device::j_UC_8,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,
593   /* 0xc100 */
594   &tms340x0_device::j_P_0,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,
595   &tms340x0_device::j_P_8,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,
596   /* 0xc200 */
597   &tms340x0_device::j_LS_0,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,
598   &tms340x0_device::j_LS_8,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,
599   /* 0xc300 */
600   &tms340x0_device::j_HI_0,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,
601   &tms340x0_device::j_HI_8,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,
602   /* 0xc400 */
603   &tms340x0_device::j_LT_0,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,
604   &tms340x0_device::j_LT_8,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,
605   /* 0xc500 */
606   &tms340x0_device::j_GE_0,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,
607   &tms340x0_device::j_GE_8,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,
608   /* 0xc600 */
609   &tms340x0_device::j_LE_0,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,
610   &tms340x0_device::j_LE_8,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,
611   /* 0xc700 */
612   &tms340x0_device::j_GT_0,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,
613   &tms340x0_device::j_GT_8,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,
614   /* 0xc800 */
615   &tms340x0_device::j_C_0,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,
616   &tms340x0_device::j_C_8,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,
617   /* 0xc900 */
618   &tms340x0_device::j_NC_0,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,
619   &tms340x0_device::j_NC_8,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,
620   /* 0xca00 */
621   &tms340x0_device::j_EQ_0,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,
622   &tms340x0_device::j_EQ_8,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,
623   /* 0xcb00 */
624   &tms340x0_device::j_NE_0,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,
625   &tms340x0_device::j_NE_8,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,
626   /* 0xcc00 */
627   &tms340x0_device::j_V_0,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,
628   &tms340x0_device::j_V_8,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,
629   /* 0xcd00 */
630   &tms340x0_device::j_NV_0,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,
631   &tms340x0_device::j_NV_8,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,
632   /* 0xce00 */
633   &tms340x0_device::j_N_0,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,
634   &tms340x0_device::j_N_8,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,
635   /* 0xcf00 */
636   &tms340x0_device::j_NN_0,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,
637   &tms340x0_device::j_NN_8,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,
638   /* 0xd000 */
639   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
640   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
641   /* 0xd100 */
642   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
643   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
644   /* 0xd200 */
645   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
646   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
647   /* 0xd300 */
648   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
649   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
650   /* 0xd400 */
651   &tms340x0_device::move0_a_ni_a,&tms340x0_device::move0_a_ni_b,&tms340x0_device::unimpl,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
652   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
653   /* 0xd500 */
654   &tms340x0_device::exgf0_a,    &tms340x0_device::exgf0_b,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
655   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
656   /* 0xd600 */
657   &tms340x0_device::move1_a_ni_a,&tms340x0_device::move1_a_ni_b,&tms340x0_device::unimpl,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
658   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
659   /* 0xd700 */
660   &tms340x0_device::exgf1_a,    &tms340x0_device::exgf1_b,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
661   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
662   /* 0xd800 */
663   &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,
664   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
665   /* 0xd900 */
666   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
667   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
668   /* 0xda00 */
669   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
670   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
671   /* 0xdb00 */
672   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
673   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
674   /* 0xdc00 */
675   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
676   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
677   /* 0xdd00 */
678   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
679   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
680   /* 0xde00 */
681   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
682   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
683   /* 0xdf00 */
684   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
685   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
686   /* 0xe000 */
687   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
688   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
689   /* 0xe100 */
690   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
691   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
692   /* 0xe200 */
693   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
694   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
695   /* 0xe300 */
696   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
697   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
698   /* 0xe400 */
699   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
700   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
701   /* 0xe500 */
702   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
703   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
704   /* 0xe600 */
705   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
706   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
707   /* 0xe700 */
708   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
709   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
710   /* 0xe800 */
711   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
712   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
713   /* 0xe900 */
714   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
715   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
716   /* 0xea00 */
717   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
718   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
719   /* 0xeb00 */
720   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
721   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
722   /* 0xec00 */
723   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
724   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
725   /* 0xed00 */
726   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
727   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
728   /* 0xee00 */
729   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
730   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
731   /* 0xef00 */
732   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
733   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
734   /* 0xf000 */
735   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
736   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
737   /* 0xf100 */
738   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
739   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
740   /* 0xf200 */
741   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
742   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
743   /* 0xf300 */
744   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
745   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
746   /* 0xf400 */
747   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
748   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
749   /* 0xf500 */
750   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
751   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
752   /* 0xf600 */
753   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
754   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
755   /* 0xf700 */
756   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
757   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
758   /* 0xf800 */
759   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
760   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
761   /* 0xf900 */
762   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
763   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
764   /* 0xfa00 */
765   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
766   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
767   /* 0xfb00 */
768   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
769   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
770   /* 0xfc00 */
771   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
772   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
773   /* 0xfd00 */
774   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
775   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
776   /* 0xfe00 */
777   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
778   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
779   /* 0xff00 */
780   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
781   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl
782};
trunk/src/devices/cpu/tms34010/34010tbl.inc
r0r250292
1// license:BSD-3-Clause
2// copyright-holders:Alex Pasadyn,Zsolt Vasvari
3/*** TMS34010: Portable TMS34010 emulator ***********************************
4
5    Copyright Alex Pasadyn/Zsolt Vasvari
6
7    Opcode Table
8
9*****************************************************************************/
10
11/* Opcode Table */
12const tms340x0_device::opcode_func tms340x0_device::s_opcode_table[65536 >> 4] =
13{
14   /* 0x0000 0x0010 0x0020 0x0030 ... 0x00f0 */
15   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::rev_a,      &tms340x0_device::rev_b,      &tms340x0_device::idle,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
16   &tms340x0_device::mwait,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::blmove,
17   /* 0x0100 */
18   &tms340x0_device::emu,        &tms340x0_device::unimpl,     &tms340x0_device::exgpc_a,    &tms340x0_device::exgpc_b,    &tms340x0_device::getpc_a,    &tms340x0_device::getpc_b,    &tms340x0_device::jump_a,     &tms340x0_device::jump_b,
19   &tms340x0_device::getst_a,    &tms340x0_device::getst_b,    &tms340x0_device::putst_a,    &tms340x0_device::putst_b,    &tms340x0_device::popst,      &tms340x0_device::unimpl,     &tms340x0_device::pushst,     &tms340x0_device::unimpl,
20   /* 0x0200 */
21   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::setcsp,     &tms340x0_device::unimpl,     &tms340x0_device::setcdp,
22   &tms340x0_device::rpix_a,     &tms340x0_device::rpix_b,     &tms340x0_device::exgps_a,    &tms340x0_device::exgps_b,    &tms340x0_device::getps_a,    &tms340x0_device::getps_b,    &tms340x0_device::unimpl,     &tms340x0_device::setcmp,
23   /* 0x0300 */
24   &tms340x0_device::nop,        &tms340x0_device::unimpl,     &tms340x0_device::clrc,       &tms340x0_device::unimpl,     &tms340x0_device::movb_aa,    &tms340x0_device::unimpl,     &tms340x0_device::dint,       &tms340x0_device::unimpl,
25   &tms340x0_device::abs_a,      &tms340x0_device::abs_b,      &tms340x0_device::neg_a,      &tms340x0_device::neg_b,      &tms340x0_device::negb_a,     &tms340x0_device::negb_b,     &tms340x0_device::not_a,      &tms340x0_device::not_b,
26   /* 0x0400 */
27   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
28   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
29   /* 0x0500 */
30   &tms340x0_device::sext0_a,    &tms340x0_device::sext0_b,    &tms340x0_device::zext0_a,    &tms340x0_device::zext0_b,    &tms340x0_device::setf0,      &tms340x0_device::setf0,      &tms340x0_device::setf0,      &tms340x0_device::setf0,
31   &tms340x0_device::move0_ra_a, &tms340x0_device::move0_ra_b, &tms340x0_device::move0_ar_a, &tms340x0_device::move0_ar_b, &tms340x0_device::move0_aa,   &tms340x0_device::unimpl,     &tms340x0_device::movb_ra_a,  &tms340x0_device::movb_ra_b,
32   /* 0x0600 */
33   &tms340x0_device::cexec_l,    &tms340x0_device::unimpl,     &tms340x0_device::cmovgc_a,   &tms340x0_device::cmovgc_b,   &tms340x0_device::cmovgc_a_s, &tms340x0_device::cmovgc_b_s, &tms340x0_device::cmovcg_a,   &tms340x0_device::cmovcg_b,
34   &tms340x0_device::cmovmc_f,   &tms340x0_device::cmovmc_f,   &tms340x0_device::cmovcm_f,   &tms340x0_device::cmovcm_f,   &tms340x0_device::cmovcm_b,   &tms340x0_device::cmovcm_b,   &tms340x0_device::cmovmc_f_va,&tms340x0_device::cmovmc_f_vb,
35   /* 0x0700 */
36   &tms340x0_device::sext1_a,    &tms340x0_device::sext1_b,    &tms340x0_device::zext1_a,    &tms340x0_device::zext1_b,    &tms340x0_device::setf1,      &tms340x0_device::setf1,      &tms340x0_device::setf1,      &tms340x0_device::setf1,
37   &tms340x0_device::move1_ra_a, &tms340x0_device::move1_ra_b, &tms340x0_device::move1_ar_a, &tms340x0_device::move1_ar_b, &tms340x0_device::move1_aa,   &tms340x0_device::unimpl,     &tms340x0_device::movb_ar_a,  &tms340x0_device::movb_ar_b,
38   /* 0x0800 */
39   &tms340x0_device::trapl,      &tms340x0_device::unimpl,     &tms340x0_device::cmovmc_b,   &tms340x0_device::cmovmc_b,   &tms340x0_device::unimpl,     &tms340x0_device::vblt_b_l,   &tms340x0_device::retm,       &tms340x0_device::unimpl,
40   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::clip,
41   /* 0x0900 */
42   &tms340x0_device::trap,       &tms340x0_device::trap,       &tms340x0_device::call_a,     &tms340x0_device::call_b,     &tms340x0_device::reti,       &tms340x0_device::unimpl,     &tms340x0_device::rets,       &tms340x0_device::rets,
43   &tms340x0_device::mmtm_a,     &tms340x0_device::mmtm_b,     &tms340x0_device::mmfm_a,     &tms340x0_device::mmfm_b,     &tms340x0_device::movi_w_a,   &tms340x0_device::movi_w_b,   &tms340x0_device::movi_l_a,   &tms340x0_device::movi_l_b,
44   /* 0x0a00 */
45   &tms340x0_device::vlcol,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::pfill_xy,   &tms340x0_device::unimpl,     &tms340x0_device::vfill_l,    &tms340x0_device::cvmxyl_a,   &tms340x0_device::cvmxyl_b,
46   &tms340x0_device::cvdxyl_a,   &tms340x0_device::cvdxyl_b,   &tms340x0_device::unimpl,     &tms340x0_device::fpixeq,     &tms340x0_device::unimpl,     &tms340x0_device::fpixne,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
47   /* 0x0b00 */
48   &tms340x0_device::addi_w_a,   &tms340x0_device::addi_w_b,   &tms340x0_device::addi_l_a,   &tms340x0_device::addi_l_b,   &tms340x0_device::cmpi_w_a,   &tms340x0_device::cmpi_w_b,   &tms340x0_device::cmpi_l_a,   &tms340x0_device::cmpi_l_b,
49   &tms340x0_device::andi_a,     &tms340x0_device::andi_b,     &tms340x0_device::ori_a,      &tms340x0_device::ori_b,      &tms340x0_device::xori_a,     &tms340x0_device::xori_b,     &tms340x0_device::subi_w_a,   &tms340x0_device::subi_w_b,
50   /* 0x0c00 */
51   &tms340x0_device::addxyi_a,   &tms340x0_device::addxyi_b,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::linit,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
52   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
53   /* 0x0d00 */
54   &tms340x0_device::subi_l_a,   &tms340x0_device::subi_l_b,   &tms340x0_device::unimpl,     &tms340x0_device::callr,      &tms340x0_device::unimpl,     &tms340x0_device::calla,      &tms340x0_device::eint,       &tms340x0_device::unimpl,
55   &tms340x0_device::dsj_a,      &tms340x0_device::dsj_b,      &tms340x0_device::dsjeq_a,    &tms340x0_device::dsjeq_b,    &tms340x0_device::dsjne_a,    &tms340x0_device::dsjne_b,    &tms340x0_device::setc,       &tms340x0_device::unimpl,
56   /* 0x0e00 */
57   &tms340x0_device::unimpl,     &tms340x0_device::pixblt_l_m_l,&tms340x0_device::unimpl,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
58   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::tfill_xy,
59   /* 0x0f00 */
60   &tms340x0_device::pixblt_l_l, &tms340x0_device::unimpl,     &tms340x0_device::pixblt_l_xy,&tms340x0_device::unimpl,     &tms340x0_device::pixblt_xy_l,&tms340x0_device::unimpl,     &tms340x0_device::pixblt_xy_xy,&tms340x0_device::unimpl,
61   &tms340x0_device::pixblt_b_l, &tms340x0_device::unimpl,     &tms340x0_device::pixblt_b_xy,&tms340x0_device::unimpl,     &tms340x0_device::fill_l,     &tms340x0_device::unimpl,     &tms340x0_device::fill_xy,    &tms340x0_device::unimpl,
62   /* 0x1000 */
63   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
64   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
65   /* 0x1100 */
66   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
67   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
68   /* 0x1200 */
69   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
70   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
71   /* 0x1300 */
72   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
73   &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,     &tms340x0_device::addk_a,     &tms340x0_device::addk_b,
74   /* 0x1400 */
75   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
76   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
77   /* 0x1500 */
78   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
79   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
80   /* 0x1600 */
81   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
82   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
83   /* 0x1700 */
84   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
85   &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,     &tms340x0_device::subk_a,     &tms340x0_device::subk_b,
86   /* 0x1800 */
87   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
88   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
89   /* 0x1900 */
90   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
91   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
92   /* 0x1a00 */
93   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
94   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
95   /* 0x1b00 */
96   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
97   &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,     &tms340x0_device::movk_a,     &tms340x0_device::movk_b,
98   /* 0x1c00 */
99   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
100   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
101   /* 0x1d00 */
102   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
103   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
104   /* 0x1e00 */
105   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
106   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
107   /* 0x1f00 */
108   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
109   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,   &tms340x0_device::btst_k_a,   &tms340x0_device::btst_k_b,
110   /* 0x2000 */
111   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
112   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
113   /* 0x2100 */
114   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
115   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
116   /* 0x2200 */
117   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
118   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
119   /* 0x2300 */
120   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
121   &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,    &tms340x0_device::sla_k_a,    &tms340x0_device::sla_k_b,
122   /* 0x2400 */
123   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
124   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
125   /* 0x2500 */
126   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
127   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
128   /* 0x2600 */
129   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
130   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
131   /* 0x2700 */
132   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
133   &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,    &tms340x0_device::sll_k_a,    &tms340x0_device::sll_k_b,
134   /* 0x2800 */
135   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
136   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
137   /* 0x2900 */
138   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
139   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
140   /* 0x2a00 */
141   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
142   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
143   /* 0x2b00 */
144   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
145   &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,    &tms340x0_device::sra_k_a,    &tms340x0_device::sra_k_b,
146   /* 0x2c00 */
147   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
148   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
149   /* 0x2d00 */
150   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
151   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
152   /* 0x2e00 */
153   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
154   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
155   /* 0x2f00 */
156   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
157   &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,    &tms340x0_device::srl_k_a,    &tms340x0_device::srl_k_b,
158   /* 0x3000 */
159   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
160   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
161   /* 0x3100 */
162   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
163   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
164   /* 0x3200 */
165   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
166   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
167   /* 0x3300 */
168   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
169   &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,     &tms340x0_device::rl_k_a,     &tms340x0_device::rl_k_b,
170   /* 0x3400 */
171   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
172   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
173   /* 0x3500 */
174   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
175   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
176   /* 0x3600 */
177   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
178   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
179   /* 0x3700 */
180   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
181   &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,    &tms340x0_device::cmp_k_a,    &tms340x0_device::cmp_k_b,
182   /* 0x3800 */
183   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
184   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
185   /* 0x3900 */
186   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
187   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
188   /* 0x3a00 */
189   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
190   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
191   /* 0x3b00 */
192   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
193   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
194   /* 0x3c00 */
195   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
196   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
197   /* 0x3d00 */
198   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
199   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
200   /* 0x3e00 */
201   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
202   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
203   /* 0x3f00 */
204   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
205   &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,     &tms340x0_device::dsjs_a,     &tms340x0_device::dsjs_b,
206   /* 0x4000 */
207   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
208   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
209   /* 0x4100 */
210   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
211   &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,      &tms340x0_device::add_a,      &tms340x0_device::add_b,
212   /* 0x4200 */
213   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
214   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
215   /* 0x4300 */
216   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
217   &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,     &tms340x0_device::addc_a,     &tms340x0_device::addc_b,
218   /* 0x4400 */
219   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
220   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
221   /* 0x4500 */
222   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
223   &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,      &tms340x0_device::sub_a,      &tms340x0_device::sub_b,
224   /* 0x4600 */
225   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
226   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
227   /* 0x4700 */
228   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
229   &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,     &tms340x0_device::subb_a,     &tms340x0_device::subb_b,
230   /* 0x4800 */
231   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
232   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
233   /* 0x4900 */
234   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
235   &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,      &tms340x0_device::cmp_a,      &tms340x0_device::cmp_b,
236   /* 0x4a00 */
237   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
238   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
239   /* 0x4b00 */
240   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
241   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,   &tms340x0_device::btst_r_a,   &tms340x0_device::btst_r_b,
242   /* 0x4c00 */
243   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
244   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
245   /* 0x4d00 */
246   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
247   &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,  &tms340x0_device::move_rr_a,  &tms340x0_device::move_rr_b,
248   /* 0x4e00 */
249   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
250   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
251   /* 0x4f00 */
252   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
253   &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx, &tms340x0_device::move_rr_ax, &tms340x0_device::move_rr_bx,
254   /* 0x5000 */
255   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
256   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
257   /* 0x5100 */
258   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
259   &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,      &tms340x0_device::and_a,      &tms340x0_device::and_b,
260   /* 0x5200 */
261   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
262   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
263   /* 0x5300 */
264   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
265   &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,     &tms340x0_device::andn_a,     &tms340x0_device::andn_b,
266   /* 0x5400 */
267   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
268   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
269   /* 0x5500 */
270   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
271   &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,       &tms340x0_device::or_a,       &tms340x0_device::or_b,
272   /* 0x5600 */
273   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
274   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
275   /* 0x5700 */
276   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
277   &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,      &tms340x0_device::xor_a,      &tms340x0_device::xor_b,
278   /* 0x5800 */
279   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
280   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
281   /* 0x5900 */
282   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
283   &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,     &tms340x0_device::divs_a,     &tms340x0_device::divs_b,
284   /* 0x5a00 */
285   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
286   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
287   /* 0x5b00 */
288   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
289   &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,     &tms340x0_device::divu_a,     &tms340x0_device::divu_b,
290   /* 0x5c00 */
291   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
292   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
293   /* 0x5d00 */
294   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
295   &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,     &tms340x0_device::mpys_a,     &tms340x0_device::mpys_b,
296   /* 0x5e00 */
297   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
298   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
299   /* 0x5f00 */
300   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
301   &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,     &tms340x0_device::mpyu_a,     &tms340x0_device::mpyu_b,
302   /* 0x6000 */
303   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
304   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
305   /* 0x6100 */
306   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
307   &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,    &tms340x0_device::sla_r_a,    &tms340x0_device::sla_r_b,
308   /* 0x6200 */
309   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
310   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
311   /* 0x6300 */
312   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
313   &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,    &tms340x0_device::sll_r_a,    &tms340x0_device::sll_r_b,
314   /* 0x6400 */
315   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
316   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
317   /* 0x6500 */
318   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
319   &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,    &tms340x0_device::sra_r_a,    &tms340x0_device::sra_r_b,
320   /* 0x6600 */
321   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
322   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
323   /* 0x6700 */
324   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
325   &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,    &tms340x0_device::srl_r_a,    &tms340x0_device::srl_r_b,
326   /* 0x6800 */
327   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
328   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
329   /* 0x6900 */
330   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
331   &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,     &tms340x0_device::rl_r_a,     &tms340x0_device::rl_r_b,
332   /* 0x6a00 */
333   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
334   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
335   /* 0x6b00 */
336   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
337   &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,      &tms340x0_device::lmo_a,      &tms340x0_device::lmo_b,
338   /* 0x6c00 */
339   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
340   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
341   /* 0x6d00 */
342   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
343   &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,     &tms340x0_device::mods_a,     &tms340x0_device::mods_b,
344   /* 0x6e00 */
345   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
346   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
347   /* 0x6f00 */
348   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
349   &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,     &tms340x0_device::modu_a,     &tms340x0_device::modu_b,
350   /* 0x7000 */
351   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
352   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
353   /* 0x7100 */
354   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
355   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
356   /* 0x7200 */
357   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
358   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
359   /* 0x7300 */
360   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
361   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
362   /* 0x7400 */
363   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
364   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
365   /* 0x7500 */
366   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
367   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
368   /* 0x7600 */
369   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
370   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
371   /* 0x7700 */
372   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
373   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
374   /* 0x7800 */
375   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
376   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
377   /* 0x7900 */
378   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
379   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
380   /* 0x7a00 */
381   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
382   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
383   /* 0x7b00 */
384   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
385   &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,      &tms340x0_device::rmo_a,      &tms340x0_device::rmo_b,
386   /* 0x7c00 */
387   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
388   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
389   /* 0x7d00 */
390   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
391   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
392   /* 0x7e00 */
393   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
394   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
395   /* 0x7f00 */
396   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
397   &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,    &tms340x0_device::swapf_a,    &tms340x0_device::swapf_b,
398   /* 0x8000 */
399   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
400   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
401   /* 0x8100 */
402   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
403   &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b, &tms340x0_device::move0_rn_a, &tms340x0_device::move0_rn_b,
404   /* 0x8200 */
405   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
406   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
407   /* 0x8300 */
408   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
409   &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b, &tms340x0_device::move1_rn_a, &tms340x0_device::move1_rn_b,
410   /* 0x8400 */
411   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
412   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
413   /* 0x8500 */
414   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
415   &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b, &tms340x0_device::move0_nr_a, &tms340x0_device::move0_nr_b,
416   /* 0x8600 */
417   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
418   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
419   /* 0x8700 */
420   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
421   &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b, &tms340x0_device::move1_nr_a, &tms340x0_device::move1_nr_b,
422   /* 0x8800 */
423   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
424   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
425   /* 0x8900 */
426   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
427   &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b, &tms340x0_device::move0_nn_a, &tms340x0_device::move0_nn_b,
428   /* 0x8a00 */
429   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
430   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
431   /* 0x8b00 */
432   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
433   &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b, &tms340x0_device::move1_nn_a, &tms340x0_device::move1_nn_b,
434   /* 0x8c00 */
435   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
436   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
437   /* 0x8d00 */
438   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
439   &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,  &tms340x0_device::movb_rn_a,  &tms340x0_device::movb_rn_b,
440   /* 0x8e00 */
441   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
442   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
443   /* 0x8f00 */
444   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
445   &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,  &tms340x0_device::movb_nr_a,  &tms340x0_device::movb_nr_b,
446   /* 0x9000 */
447   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
448   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
449   /* 0x9100 */
450   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
451   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,   &tms340x0_device::move0_r_ni_a,   &tms340x0_device::move0_r_ni_b,
452   /* 0x9200 */
453   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
454   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
455   /* 0x9300 */
456   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
457   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,   &tms340x0_device::move1_r_ni_a,   &tms340x0_device::move1_r_ni_b,
458   /* 0x9400 */
459   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
460   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
461   /* 0x9500 */
462   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
463   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,   &tms340x0_device::move0_ni_r_a,   &tms340x0_device::move0_ni_r_b,
464   /* 0x9600 */
465   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
466   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
467   /* 0x9700 */
468   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
469   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,   &tms340x0_device::move1_ni_r_a,   &tms340x0_device::move1_ni_r_b,
470   /* 0x9800 */
471   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
472   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
473   /* 0x9900 */
474   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
475   &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,  &tms340x0_device::move0_ni_ni_a,  &tms340x0_device::move0_ni_ni_b,
476   /* 0x9a00 */
477   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
478   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
479   /* 0x9b00 */
480   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
481   &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,  &tms340x0_device::move1_ni_ni_a,  &tms340x0_device::move1_ni_ni_b,
482   /* 0x9c00 */
483   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
484   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
485   /* 0x9d00 */
486   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
487   &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,  &tms340x0_device::movb_nn_a,  &tms340x0_device::movb_nn_b,
488   /* 0x9e00 */
489   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
490   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
491   /* 0x9f00 */
492   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
493   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
494   /* 0xa000 */
495   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
496   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
497   /* 0xa100 */
498   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
499   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,   &tms340x0_device::move0_r_dn_a,   &tms340x0_device::move0_r_dn_b,
500   /* 0xa200 */
501   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
502   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
503   /* 0xa300 */
504   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
505   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,   &tms340x0_device::move1_r_dn_a,   &tms340x0_device::move1_r_dn_b,
506   /* 0xa400 */
507   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
508   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
509   /* 0xa500 */
510   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
511   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,   &tms340x0_device::move0_dn_r_a,   &tms340x0_device::move0_dn_r_b,
512   /* 0xa600 */
513   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
514   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
515   /* 0xa700 */
516   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
517   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,   &tms340x0_device::move1_dn_r_a,   &tms340x0_device::move1_dn_r_b,
518   /* 0xa800 */
519   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
520   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
521   /* 0xa900 */
522   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
523   &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,  &tms340x0_device::move0_dn_dn_a,  &tms340x0_device::move0_dn_dn_b,
524   /* 0xaa00 */
525   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
526   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
527   /* 0xab00 */
528   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
529   &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,  &tms340x0_device::move1_dn_dn_a,  &tms340x0_device::move1_dn_dn_b,
530   /* 0xac00 */
531   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
532   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
533   /* 0xad00 */
534   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
535   &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,    &tms340x0_device::movb_r_no_a,    &tms340x0_device::movb_r_no_b,
536   /* 0xae00 */
537   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
538   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
539   /* 0xaf00 */
540   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
541   &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,    &tms340x0_device::movb_no_r_a,    &tms340x0_device::movb_no_r_b,
542   /* 0xb000 */
543   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
544   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
545   /* 0xb100 */
546   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
547   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,   &tms340x0_device::move0_r_no_a,   &tms340x0_device::move0_r_no_b,
548   /* 0xb200 */
549   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
550   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
551   /* 0xb300 */
552   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
553   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,   &tms340x0_device::move1_r_no_a,   &tms340x0_device::move1_r_no_b,
554   /* 0xb400 */
555   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
556   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
557   /* 0xb500 */
558   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
559   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,   &tms340x0_device::move0_no_r_a,   &tms340x0_device::move0_no_r_b,
560   /* 0xb600 */
561   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
562   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
563   /* 0xb700 */
564   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
565   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,   &tms340x0_device::move1_no_r_a,   &tms340x0_device::move1_no_r_b,
566   /* 0xb800 */
567   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
568   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
569   /* 0xb900 */
570   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
571   &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,  &tms340x0_device::move0_no_no_a,  &tms340x0_device::move0_no_no_b,
572   /* 0xba00 */
573   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
574   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
575   /* 0xbb00 */
576   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
577   &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,  &tms340x0_device::move1_no_no_a,  &tms340x0_device::move1_no_no_b,
578   /* 0xbc00 */
579   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
580   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
581   /* 0xbd00 */
582   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
583   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,   &tms340x0_device::movb_no_no_a,   &tms340x0_device::movb_no_no_b,
584   /* 0xbe00 */
585   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
586   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
587   /* 0xbf00 */
588   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
589   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
590   /* 0xc000 */
591   &tms340x0_device::j_UC_0,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,
592   &tms340x0_device::j_UC_8,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,     &tms340x0_device::j_UC_x,
593   /* 0xc100 */
594   &tms340x0_device::j_P_0,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,
595   &tms340x0_device::j_P_8,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,      &tms340x0_device::j_P_x,
596   /* 0xc200 */
597   &tms340x0_device::j_LS_0,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,
598   &tms340x0_device::j_LS_8,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,     &tms340x0_device::j_LS_x,
599   /* 0xc300 */
600   &tms340x0_device::j_HI_0,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,
601   &tms340x0_device::j_HI_8,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,     &tms340x0_device::j_HI_x,
602   /* 0xc400 */
603   &tms340x0_device::j_LT_0,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,
604   &tms340x0_device::j_LT_8,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,     &tms340x0_device::j_LT_x,
605   /* 0xc500 */
606   &tms340x0_device::j_GE_0,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,
607   &tms340x0_device::j_GE_8,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,     &tms340x0_device::j_GE_x,
608   /* 0xc600 */
609   &tms340x0_device::j_LE_0,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,
610   &tms340x0_device::j_LE_8,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,     &tms340x0_device::j_LE_x,
611   /* 0xc700 */
612   &tms340x0_device::j_GT_0,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,
613   &tms340x0_device::j_GT_8,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,     &tms340x0_device::j_GT_x,
614   /* 0xc800 */
615   &tms340x0_device::j_C_0,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,
616   &tms340x0_device::j_C_8,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,      &tms340x0_device::j_C_x,
617   /* 0xc900 */
618   &tms340x0_device::j_NC_0,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,
619   &tms340x0_device::j_NC_8,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,     &tms340x0_device::j_NC_x,
620   /* 0xca00 */
621   &tms340x0_device::j_EQ_0,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,
622   &tms340x0_device::j_EQ_8,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,     &tms340x0_device::j_EQ_x,
623   /* 0xcb00 */
624   &tms340x0_device::j_NE_0,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,
625   &tms340x0_device::j_NE_8,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,     &tms340x0_device::j_NE_x,
626   /* 0xcc00 */
627   &tms340x0_device::j_V_0,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,
628   &tms340x0_device::j_V_8,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,      &tms340x0_device::j_V_x,
629   /* 0xcd00 */
630   &tms340x0_device::j_NV_0,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,
631   &tms340x0_device::j_NV_8,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,     &tms340x0_device::j_NV_x,
632   /* 0xce00 */
633   &tms340x0_device::j_N_0,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,
634   &tms340x0_device::j_N_8,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,      &tms340x0_device::j_N_x,
635   /* 0xcf00 */
636   &tms340x0_device::j_NN_0,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,
637   &tms340x0_device::j_NN_8,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,     &tms340x0_device::j_NN_x,
638   /* 0xd000 */
639   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
640   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
641   /* 0xd100 */
642   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
643   &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,  &tms340x0_device::move0_no_ni_a,  &tms340x0_device::move0_no_ni_b,
644   /* 0xd200 */
645   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
646   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
647   /* 0xd300 */
648   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
649   &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,  &tms340x0_device::move1_no_ni_a,  &tms340x0_device::move1_no_ni_b,
650   /* 0xd400 */
651   &tms340x0_device::move0_a_ni_a,&tms340x0_device::move0_a_ni_b,&tms340x0_device::unimpl,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
652   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
653   /* 0xd500 */
654   &tms340x0_device::exgf0_a,    &tms340x0_device::exgf0_b,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
655   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
656   /* 0xd600 */
657   &tms340x0_device::move1_a_ni_a,&tms340x0_device::move1_a_ni_b,&tms340x0_device::unimpl,   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
658   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
659   /* 0xd700 */
660   &tms340x0_device::exgf1_a,    &tms340x0_device::exgf1_b,    &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
661   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
662   /* 0xd800 */
663   &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,    &tms340x0_device::cexec_s,
664   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
665   /* 0xd900 */
666   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
667   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
668   /* 0xda00 */
669   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
670   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
671   /* 0xdb00 */
672   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
673   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
674   /* 0xdc00 */
675   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
676   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
677   /* 0xdd00 */
678   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
679   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
680   /* 0xde00 */
681   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
682   &tms340x0_device::unimpl,     &tms340x0_device::fline,      &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
683   /* 0xdf00 */
684   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
685   &tms340x0_device::unimpl,     &tms340x0_device::line,       &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
686   /* 0xe000 */
687   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
688   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
689   /* 0xe100 */
690   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
691   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,   &tms340x0_device::add_xy_a,   &tms340x0_device::add_xy_b,
692   /* 0xe200 */
693   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
694   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
695   /* 0xe300 */
696   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
697   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,   &tms340x0_device::sub_xy_a,   &tms340x0_device::sub_xy_b,
698   /* 0xe400 */
699   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
700   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
701   /* 0xe500 */
702   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
703   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,   &tms340x0_device::cmp_xy_a,   &tms340x0_device::cmp_xy_b,
704   /* 0xe600 */
705   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
706   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
707   /* 0xe700 */
708   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
709   &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,      &tms340x0_device::cpw_a,      &tms340x0_device::cpw_b,
710   /* 0xe800 */
711   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
712   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
713   /* 0xe900 */
714   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
715   &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,    &tms340x0_device::cvxyl_a,    &tms340x0_device::cvxyl_b,
716   /* 0xea00 */
717   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
718   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
719   /* 0xeb00 */
720   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
721   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,   &tms340x0_device::cvsxyl_a,   &tms340x0_device::cvsxyl_b,
722   /* 0xec00 */
723   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
724   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
725   /* 0xed00 */
726   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
727   &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,     &tms340x0_device::movx_a,     &tms340x0_device::movx_b,
728   /* 0xee00 */
729   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
730   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
731   /* 0xef00 */
732   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
733   &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,     &tms340x0_device::movy_a,     &tms340x0_device::movy_b,
734   /* 0xf000 */
735   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
736   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
737   /* 0xf100 */
738   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
739   &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,    &tms340x0_device::pixt_rixy_a,    &tms340x0_device::pixt_rixy_b,
740   /* 0xf200 */
741   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
742   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
743   /* 0xf300 */
744   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
745   &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,    &tms340x0_device::pixt_ixyr_a,    &tms340x0_device::pixt_ixyr_b,
746   /* 0xf400 */
747   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
748   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
749   /* 0xf500 */
750   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
751   &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,  &tms340x0_device::pixt_ixyixy_a,  &tms340x0_device::pixt_ixyixy_b,
752   /* 0xf600 */
753   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
754   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
755   /* 0xf700 */
756   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
757   &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,     &tms340x0_device::drav_a,     &tms340x0_device::drav_b,
758   /* 0xf800 */
759   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
760   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
761   /* 0xf900 */
762   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
763   &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,  &tms340x0_device::pixt_ri_a,  &tms340x0_device::pixt_ri_b,
764   /* 0xfa00 */
765   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
766   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
767   /* 0xfb00 */
768   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
769   &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,  &tms340x0_device::pixt_ir_a,  &tms340x0_device::pixt_ir_b,
770   /* 0xfc00 */
771   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
772   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
773   /* 0xfd00 */
774   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
775   &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,  &tms340x0_device::pixt_ii_a,  &tms340x0_device::pixt_ii_b,
776   /* 0xfe00 */
777   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
778   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
779   /* 0xff00 */
780   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,
781   &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl,     &tms340x0_device::unimpl
782};
trunk/src/devices/cpu/tms34010/tms34010.cpp
r250291r250292
458458    OPCODE TABLE & IMPLEMENTATIONS
459459***************************************************************************/
460460
461#include "34010fld.cpp"
461#include "34010fld.inc"
462462
463463/* includes the static function prototypes and the master opcode table */
464#include "34010tbl.cpp"
464#include "34010tbl.inc"
465465
466466/* includes the actual opcode implementations */
467#include "34010ops.cpp"
468#include "34010gfx.cpp"
467#include "34010ops.inc"
468#include "34010gfx.inc"
469469
470470
471471
trunk/src/devices/cpu/tms9900/tms9995.h
r250291r250292
131131   // Processor states
132132   bool    m_idle_state;
133133   bool    m_nmi_state;
134   bool    m_irq_state;
134//   bool    m_irq_state;
135135   bool    m_hold_state;
136136
137137   // READY handling. The READY line is operated before the clock
r250291r250292
382382   void alu_lst_lwp();
383383   void alu_mov();
384384   void alu_multiply();
385   void alu_multiply_signed();
385//   void alu_multiply_signed();
386386   void alu_rtwp();
387387   void alu_sbo_sbz();
388388   void alu_shift();
trunk/src/devices/cpu/z80/z80dasm.cpp
r250291r250292
420420   char *dst;
421421   INT8 offset = 0;
422422   UINT8 op, op1 = 0;
423   UINT16 ea = 0;
423   UINT16 ea;
424424   int pos = 0;
425425
426426   ixy = "oops!!";
trunk/src/devices/imagedev/cassette.cpp
r250291r250292
3030
3131cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3232   : device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__),
33   device_image_interface(mconfig, *this),
34   m_state(CASSETTE_STOPPED),
33   device_image_interface(mconfig, *this),
34   m_cassette(NULL),
35   m_state(CASSETTE_STOPPED),
36   m_position(0),
37   m_position_time(0),
38   m_value(0),
39   m_channel(0),
40   m_speed(0),
41   m_direction(0),
3542   m_formats(cassette_default_formats),
3643   m_create_opts(NULL),
3744   m_default_state(CASSETTE_PLAY),
r250291r250292
423430         if (position > length)
424431         {
425432            m_state = (cassette_state)(( m_state & ~CASSETTE_MASK_UISTATE ) | CASSETTE_STOPPED);
426            position = length;
427433         }
428434      }
429435   }
trunk/src/devices/imagedev/chd_cd.cpp
r250291r250292
2828
2929cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
3030   : device_t(mconfig, CDROM, "CD-ROM Image", tag, owner, clock, "cdrom_image", __FILE__),
31      device_image_interface(mconfig, *this),
31      device_image_interface(mconfig, *this),
32       m_cdrom_handle(NULL),
33       m_extension_list(NULL),
3234      m_interface(NULL)
3335{
3436}
3537
3638cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
3739   : device_t(mconfig, type, name,  tag, owner, clock, shortname, source),
38      device_image_interface(mconfig, *this),
40      device_image_interface(mconfig, *this),
41      m_cdrom_handle(NULL),
42      m_extension_list(NULL),
3943      m_interface(NULL)
4044{
4145}
trunk/src/devices/imagedev/flopdrv.cpp
r250291r250292
709709      m_rdy(0),
710710      m_dskchg(0),
711711      m_drive_id(0),
712      m_active(0),
712      m_active(0),
713      m_config(NULL),
713714      m_flags(0),
714715      m_max_track(0),
715716      m_num_sides(0),
716      m_current_track(0),
717      m_current_track(0),
718      m_index_timer(NULL),
717719      m_index_pulse_callback(NULL),
718720      m_rpm(0.0f),
719721      m_id_index(0),
r250291r250292
741743      m_rdy(0),
742744      m_dskchg(0),
743745      m_drive_id(0),
744      m_active(0),
746      m_active(0),
747       m_config(NULL),
745748      m_flags(0),
746749      m_max_track(0),
747750      m_num_sides(0),
748      m_current_track(0),
751      m_current_track(0),
752      m_index_timer(NULL),
749753      m_index_pulse_callback(NULL),
750754      m_rpm(0.0f),
751755      m_id_index(0),
trunk/src/devices/imagedev/flopdrv.h
r250291r250292
161161   TIMER_CALLBACK_MEMBER(floppy_drive_index_callback);
162162   void floppy_drive_init();
163163   void floppy_drive_index_func();
164   TIMER_CALLBACK(floppy_drive_index_callback);
165164   int internal_floppy_device_load(int create_format, option_resolution *create_args);
166165   TIMER_CALLBACK_MEMBER( set_wpt );
167166
trunk/src/devices/imagedev/floppy.cpp
r250291r250292
77*********************************************************************/
88
99#include "emu.h"
10#include "emuopts.h"
1110#include "ui/menu.h"
1211#include "ui/filesel.h"
1312#include "zippath.h"
r250291r250292
127126
128127floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
129128   device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock, "floppy_connector", __FILE__),
130   device_slot_interface(mconfig, *this),
129   device_slot_interface(mconfig, *this),
130   formats(NULL),
131131   m_enable_sound(false)
132132{
133133}
r250291r250292
167167floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
168168   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
169169      device_image_interface(mconfig, *this),
170      device_slot_card_interface(mconfig, *this),
170      device_slot_card_interface(mconfig, *this),
171      input_format(NULL),
172      output_format(NULL),
171173      image(NULL),
172      fif_list(NULL),
173      m_make_sound(false)
174      fif_list(NULL),
175      index_timer(NULL),
176      tracks(0),
177      sides(0),
178      form_factor(0),
179      motor_always_on(false),
180      dir(0), stp(0), wtg(0), mon(0), ss(0), idx(0), wpt(0), rdy(0), dskchg(0),
181      ready(false),
182      rpm(0),
183      floppy_ratio_1(0),
184      revolution_count(0),
185      cyl(0),
186      subcyl(0),
187      image_dirty(false),
188      ready_counter(0),
189      m_make_sound(false),
190      m_sound_out(NULL)
174191{
175192   extension_list[0] = '\0';
176193   m_err = IMAGE_ERROR_INVALIDIMAGE;
r250291r250292
668685{
669686   int spos = (buf.size() >> 1)-1;
670687   int step;
671   for(step=1; step<buf.size()+1; step<<=1);
688   for(step=1; step<buf.size()+1; step<<=1) { }
672689   step >>= 1;
673690
674691   for(;;) {
r250291r250292
9831000
9841001   bool can_in_place = input_format->supports_save();
9851002   if(can_in_place) {
986      file_error filerr = FILERR_NOT_FOUND;
1003      file_error filerr;
9871004      std::string tmp_path;
9881005      core_file *tmp_file;
9891006      /* attempt to open the file for writing but *without* create */
r250291r250292
10041021   switch (state) {
10051022   case DO_CREATE: {
10061023      floppy_image_format_t *fif_list = fd->get_formats();
1007      int ext_match = 0, total_usable = 0;
1008      for(floppy_image_format_t *i = fif_list; i; i = i->next) {
1024         int ext_match;
1025         int total_usable = 0;
1026         for(floppy_image_format_t *i = fif_list; i; i = i->next) {
10091027         if(!i->supports_save())
10101028            continue;
10111029         if (i->extension_matches(current_file.c_str()))
r250291r250292
10851103//===================================================================
10861104
10871105floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1088   : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__)
1106   : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__),
1107     m_sound(NULL),
1108     m_is525(false),
1109     m_sampleindex_motor_start(0),
1110     m_sampleindex_motor_loop(0),
1111     m_sampleindex_motor_end(0),
1112     m_samplesize_motor_start(0),
1113     m_samplesize_motor_loop(0),
1114     m_samplesize_motor_end(0),
1115     m_samplepos_motor(0),
1116     m_motor_playback_state(0),
1117     m_motor_on(false),
1118     m_step_samples(0),
1119     m_sampleindex_step1(0),
1120     m_samplepos_step(0),
1121     m_step_playback_state(0)
10891122{
10901123   m_loaded = false;
10911124}
r250291r250292
11931226   // Also, there is no need for interpolation, as we only expect
11941227   // one sample rate of 44100 for all samples
11951228
1196   INT16 out = 0;
1229   INT16 out;
11971230   stream_sample_t *samplebuffer = outputs[0];
11981231
11991232   while (samples-- > 0)
trunk/src/devices/imagedev/mfmhd.cpp
r250291r250292
270270**************************************************************************/
271271
272272#include "emu.h"
273#include "formats/imageutl.h"
274273#include "harddisk.h"
275274#include "mfmhd.h"
276275
r250291r250292
310309
311310mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
312311   : harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source),
313      device_slot_card_interface(mconfig, *this)
312      device_slot_card_interface(mconfig, *this),
313      m_index_timer(NULL),
314      m_spinup_timer(NULL),
315      m_seek_timer(NULL),
316      m_cache_timer(NULL),
317      m_precomp_cyl(0),
318      m_redwc_cyl(0),
319      m_encoding(),
320      m_ready(false),
321      m_current_cylinder(0),
322      m_current_head(0),
323      m_track_delta(0),
324      m_step_phase(0),
325      m_seek_complete(false),
326      m_seek_inward(false),
327      m_autotruncation(false),
328      m_recalibrated(false),
329      m_step_line(),
330      m_format(NULL)
314331{
315332   m_spinupms = 10000;
316333   m_cachelines = 5;
r250291r250292
952969//   This is a write-back LRU cache.
953970// ===========================================================
954971
955mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine):
972mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine):
973   m_mfmhd(NULL),
956974   m_tracks(NULL),
957975   m_machine(machine)
958976{
r250291r250292
10261044{
10271045   if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots);
10281046
1029   chd_error state = CHDERR_NONE;
1047   chd_error state;
10301048
1031   mfmhd_trackimage* previous = NULL;
1049   mfmhd_trackimage* previous;
10321050   mfmhd_trackimage* current = NULL;
10331051
10341052   m_mfmhd = mfmhd;
r250291r250292
11411159
11421160mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock):
11431161   device_t(mconfig, MFM_HD_CONNECTOR, "MFM hard disk connector", tag, owner, clock, "mfm_hd_connector", __FILE__),
1144   device_slot_interface(mconfig, *this)
1162   device_slot_interface(mconfig, *this),
1163   m_encoding(),
1164   m_spinupms(0),
1165   m_cachesize(0),
1166   m_format(NULL)
11451167{
11461168}
11471169
trunk/src/devices/imagedev/mfmhd.h
r250291r250292
154154   mfmhd_trackimage_cache* m_cache;
155155   mfmhd_image_format_t*   m_format;
156156
157   void        prepare_track(int cylinder, int head);
158157   void        head_move();
159158   void        recalibrate();
160159
trunk/src/devices/imagedev/midiin.cpp
r250291r250292
2424
2525midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2626   : device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock, "midiin", __FILE__),
27      device_image_interface(mconfig, *this),
28         device_serial_interface(mconfig, *this),
29         m_input_cb(*this)
27     device_image_interface(mconfig, *this),
28     device_serial_interface(mconfig, *this),
29     m_midi(NULL),
30     m_timer(NULL),
31     m_input_cb(*this),
32     m_xmit_read(0),
33     m_xmit_write(0),
34     m_tx_busy(false)
3035{
3136}
3237
trunk/src/devices/imagedev/midiout.cpp
r250291r250292
2424
2525midiout_device::midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2626   : device_t(mconfig, MIDIOUT, "MIDI Out image device", tag, owner, clock, "midiout", __FILE__),
27   device_image_interface(mconfig, *this),
28      device_serial_interface(mconfig, *this)
27     device_image_interface(mconfig, *this),
28     device_serial_interface(mconfig, *this),
29     m_midi(NULL)
2930{
3031}
3132
trunk/src/devices/imagedev/snapquik.cpp
r250291r250292
2020
2121snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2222   : device_t(mconfig, SNAPSHOT, "Snapshot", tag, owner, clock, "snapshot_image", __FILE__),
23      device_image_interface(mconfig, *this),
24      m_interface(NULL),
25      m_delay_attoseconds(0)
23     device_image_interface(mconfig, *this),
24     m_file_extensions(NULL),
25     m_interface(NULL),
26     m_delay_seconds(0),
27     m_delay_attoseconds(0),
28     m_timer(NULL)
2629{
2730}
2831
2932snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
30      device_t(mconfig, type, name, tag, owner, clock, shortname, source),
31      device_image_interface(mconfig, *this),
32      m_interface(NULL),
33      m_delay_attoseconds(0)
33   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
34   device_image_interface(mconfig, *this),
35   m_file_extensions(NULL),
36   m_interface(NULL),
37   m_delay_seconds(0),
38   m_delay_attoseconds(0),
39   m_timer(NULL)
3440{
3541}
3642//-------------------------------------------------
trunk/src/devices/machine/6532riot.cpp
r250291r250292
238238
239239UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
240240{
241   UINT8 val = 0;
241   UINT8 val;
242242
243243   /* if A2 == 1 and A0 == 1, we are reading interrupt flags */
244244   if ((offset & 0x05) == 0x05)
r250291r250292
392392      m_out_pa_cb(*this),
393393      m_in_pb_cb(*this),
394394      m_out_pb_cb(*this),
395      m_irq_cb(*this),
395      m_irq_cb(*this),
396      m_irqstate(0),
397      m_irqenable(0),
396398      m_irq(CLEAR_LINE),
397399      m_pa7dir(0),
398      m_pa7prev(0)
400      m_pa7prev(0),
401      m_timershift(0),
402      m_timerstate(0),
403      m_timer(NULL)
399404{
400405   memset(m_port, 0x00, sizeof(m_port));
401406}
trunk/src/devices/machine/6821pia.cpp
r250291r250292
5151
5252pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5353   : device_t(mconfig, PIA6821, "6821 PIA", tag, owner, clock, "pia6821", __FILE__),
54   m_in_a_handler(*this),
55   m_in_b_handler(*this),
56   m_in_ca1_handler(*this),
57   m_in_cb1_handler(*this),
58   m_in_ca2_handler(*this),
59   m_out_a_handler(*this),
60   m_out_b_handler(*this),
61   m_ca2_handler(*this),
62   m_cb2_handler(*this),
63   m_irqa_handler(*this),
64   m_irqb_handler(*this),
65   m_in_ca1(0),
66   m_ctl_a(0),
67   m_irq_a_state(0),
68   m_in_cb1(0),
69   m_ctl_b(0),
70   m_irq_b_state(0)
54     m_in_a_handler(*this),
55     m_in_b_handler(*this),
56     m_in_ca1_handler(*this),
57     m_in_cb1_handler(*this),
58     m_in_ca2_handler(*this),
59     m_out_a_handler(*this),
60     m_out_b_handler(*this),
61     m_ca2_handler(*this),
62     m_cb2_handler(*this),
63     m_irqa_handler(*this),
64     m_irqb_handler(*this), m_in_a(0),
65     m_in_ca1(0), m_in_ca2(0), m_out_a(0), m_out_ca2(0), m_port_a_z_mask(0), m_ddr_a(0),
66     m_ctl_a(0), m_irq_a1(0), m_irq_a2(0),
67     m_irq_a_state(0), m_in_b(0),
68     m_in_cb1(0), m_in_cb2(0), m_out_b(0), m_out_cb2(0), m_last_out_cb2_z(0), m_ddr_b(0),
69     m_ctl_b(0), m_irq_b1(0), m_irq_b2(0),
70     m_irq_b_state(0), m_in_a_pushed(false), m_out_a_needs_pulled(false), m_in_ca1_pushed(false),
71     m_in_ca2_pushed(false), m_out_ca2_needs_pulled(false), m_in_b_pushed(false), m_out_b_needs_pulled(false),
72     m_in_cb1_pushed(false), m_in_cb2_pushed(false), m_out_cb2_needs_pulled(false), m_logged_port_a_not_connected(false),
73      m_logged_port_b_not_connected(false), m_logged_ca1_not_connected(false), m_logged_ca2_not_connected(false),
74     m_logged_cb1_not_connected(false), m_logged_cb2_not_connected(false)
7175{
7276}
7377
trunk/src/devices/machine/bankdev.cpp
r250291r250292
1111      m_endianness(ENDIANNESS_NATIVE),
1212      m_databus_width(0),
1313      m_addrbus_width(32),
14      m_stride(1),
14      m_stride(1),
15      m_program(NULL),
1516      m_offset(0)
1617{
1718}
trunk/src/devices/machine/keyboard.cpp
r250291r250292
4343   m_io_kbd7(*this, "TERM_LINE7"),
4444   m_io_kbd8(*this, "TERM_LINE8"),
4545   m_io_kbd9(*this, "TERM_LINE9"),
46   m_io_kbdc(*this, "TERM_LINEC"),
46   m_io_kbdc(*this, "TERM_LINEC"),
47   m_timer(NULL),
48   m_last_code(0),
49   m_scan_line(0),
4750   m_keyboard_cb(*this)
4851{
4952}
r250291r250292
6164   m_io_kbd8(*this, "TERM_LINE8"),
6265   m_io_kbd9(*this, "TERM_LINE9"),
6366   m_io_kbdc(*this, "TERM_LINEC"),
67   m_timer(NULL),
68   m_last_code(0),
69   m_scan_line(0),
6470   m_keyboard_cb(*this)
6571{
6672}
trunk/src/devices/machine/legscsi.cpp
r250291r250292
33#include "legscsi.h"
44
55legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
6   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
6   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
7   m_selected(0),
78   m_scsi_port(*this)
89{
910}
trunk/src/devices/machine/nvram.cpp
r250291r250292
1111#include "emu.h"
1212#include "machine/nvram.h"
1313
14
15// for now, make buggy GCC/Mingw STFU about I64FMT
16#if (defined(__MINGW32__) && (__GNUC__ >= 5))
17#pragma GCC diagnostic push
18#pragma GCC diagnostic ignored "-Wformat"
19#pragma GCC diagnostic ignored "-Wformat-extra-args"
20#endif
21
2214//**************************************************************************
2315//  LIVE DEVICE
2416//**************************************************************************
r250291r250292
175167   if (m_region != NULL && m_region->bytes() != m_length)
176168      throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%" SIZETFMT "X bytes", tag(), m_length);
177169}
178
179#if (defined(__MINGW32__) && (__GNUC__ >= 5))
180#pragma GCC diagnostic pop
181#endif
trunk/src/devices/machine/pci.cpp
r250291r250292
22// copyright-holders:Olivier Galibert
33#include "pci.h"
44
5// for now, make buggy GCC/Mingw STFU about I64FMT
6#if (defined(__MINGW32__) && (__GNUC__ >= 5))
7#pragma GCC diagnostic push
8#pragma GCC diagnostic ignored "-Wformat"
9#pragma GCC diagnostic ignored "-Wformat-extra-args"
10#endif
11
125const device_type PCI_ROOT   = &device_creator<pci_root_device>;
136const device_type PCI_BRIDGE = &device_creator<pci_bridge_device>;
147
r250291r250292
902895void pci_root_device::device_reset()
903896{
904897}
905
906#if (defined(__MINGW32__) && (__GNUC__ >= 5))
907#pragma GCC diagnostic pop
908#endif
trunk/src/devices/machine/pit8253.cpp
r250291r250292
2323#include "emu.h"
2424#include "machine/pit8253.h"
2525
26// for now, make buggy GCC/Mingw STFU about I64FMT
27#if (defined(__MINGW32__) && (__GNUC__ >= 5))
28#pragma GCC diagnostic push
29#pragma GCC diagnostic ignored "-Wformat"
30#pragma GCC diagnostic ignored "-Wformat-extra-args"
31#endif
32
3326/* device types */
3427enum
3528{
r250291r250292
11291122{
11301123   set_clock_signal(2, state);
11311124}
1132
1133#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1134#pragma GCC diagnostic pop
1135#endif
trunk/src/devices/machine/ram.cpp
r250291r250292
7878{
7979   const char *ramsize_string = NULL;
8080   int is_valid = FALSE;
81   UINT32 specified_ram = 0;
82   const char *gamename_option = NULL;
81   UINT32 specified_ram;
82   const char *gamename_option;
8383
8484   /* verify default ram value */
8585   if (default_size() == 0)
r250291r250292
183183   UINT32 ram;
184184   char suffix = '\0';
185185
186   s += sscanf(s, "%u%c", &ram, &suffix);
186   sscanf(s, "%u%c", &ram, &suffix);
187187
188188   switch(tolower(suffix))
189189   {
trunk/src/devices/machine/terminal.cpp
r250291r250292
143143generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
144144   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
145145      m_palette(*this, "palette"),
146      m_io_term_conf(*this, "TERM_CONF"),
146      m_io_term_conf(*this, "TERM_CONF"),
147      m_x_pos(0),
148      m_framecnt(0),
149      m_y_pos(0),
147150      m_keyboard_cb(*this)
148151{
149152}
150153
151154generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
152155   : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock, "generic_terminal", __FILE__),
153      m_palette(*this, "palette"),
154      m_io_term_conf(*this, "TERM_CONF"),
155      m_keyboard_cb(*this)
156     m_palette(*this, "palette"),
157     m_io_term_conf(*this, "TERM_CONF"),
158     m_x_pos(0),
159     m_framecnt(0),
160     m_y_pos(0),
161     m_keyboard_cb(*this)
156162{
157163}
158164
trunk/src/devices/machine/z80ctc.cpp
r250291r250292
1010
1111#include "emu.h"
1212#include "z80ctc.h"
13#include "cpu/z80/z80.h"
1413#include "cpu/z80/z80daisy.h"
1514
1615
r250291r250292
8685      m_zc0_cb(*this),
8786      m_zc1_cb(*this),
8887      m_zc2_cb(*this),
89      m_zc3_cb(*this)
88      m_zc3_cb(*this),
89      m_vector(0)
9090{
9191}
9292
r250291r250292
284284//-------------------------------------------------
285285
286286z80ctc_device::ctc_channel::ctc_channel()
287   : m_mode(0),
287   : m_device(NULL),
288      m_index(0),
289      m_mode(0),
288290      m_tconst(0),
289291      m_down(0),
290292      m_extclk(0),
trunk/src/devices/machine/z80ctc.h
r250291r250292
8888private:
8989   // internal helpers
9090   void interrupt_check();
91   void timercallback(int chanindex);
9291
9392   // a single channel within the CTC
9493   class ctc_channel
trunk/src/devices/sound/2151intf.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emu.h"
12#include "fm.h"
1312#include "2151intf.h"
1413#include "ym2151.h"
1514
r250291r250292
2423
2524ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2625   : device_t(mconfig, YM2151, "YM2151", tag, owner, clock, "ym2151", __FILE__),
27      device_sound_interface(mconfig, *this),
26      device_sound_interface(mconfig, *this),
27      m_stream(NULL),
28      m_chip(NULL),
29      m_lastreg(0),
2830      m_irqhandler(*this),
2931      m_portwritehandler(*this)
3032{
trunk/src/devices/sound/3526intf.cpp
r250291r250292
1919*
2020******************************************************************************/
2121#include "3526intf.h"
22#include "fm.h"
2322#include "fmopl.h"
2423
2524
r250291r250292
157156
158157ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
159158   : device_t(mconfig, YM3526, "YM3526", tag, owner, clock, "ym3526", __FILE__),
160      device_sound_interface(mconfig, *this),
159      device_sound_interface(mconfig, *this),
160      m_stream(NULL),
161      m_chip(NULL),
161162      m_irq_handler(*this)
162163{
163164}
trunk/src/devices/sound/3812intf.cpp
r250291r250292
2020******************************************************************************/
2121#include "emu.h"
2222#include "3812intf.h"
23#include "fm.h"
2423#include "sound/fmopl.h"
2524
2625
r250291r250292
155154
156155ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
157156   : device_t(mconfig, YM3812, "YM3812", tag, owner, clock, "ym3812", __FILE__),
158      device_sound_interface(mconfig, *this),
157      device_sound_interface(mconfig, *this),
158      m_stream(NULL),
159      m_chip(NULL),
159160      m_irq_handler(*this)
160161{
161162}
trunk/src/devices/sound/8950intf.cpp
r250291r250292
1919*
2020******************************************************************************/
2121#include "8950intf.h"
22#include "fm.h"
2322#include "fmopl.h"
2423
2524
r250291r250292
206205
207206y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
208207   : device_t(mconfig, Y8950, "Y8950", tag, owner, clock, "y8950", __FILE__),
209      device_sound_interface(mconfig, *this),
208      device_sound_interface(mconfig, *this),
209      m_stream(NULL),
210      m_chip(NULL),
210211      m_irq_handler(*this),
211212      m_keyboard_read_handler(*this),
212213      m_keyboard_write_handler(*this),
trunk/src/devices/sound/ay8910.cpp
r250291r250292
493493INLINE void build_single_table(double rl, const ay8910_device::ay_ym_param *par, int normalize, INT32 *tab, int zero_is_off)
494494{
495495   int j;
496   double rt, rw = 0;
496   double rt;
497   double rw;
497498   double temp[32], min=10.0, max=0.0;
498499
499500   for (j=0; j < par->res_count; j++)
trunk/src/devices/sound/discrete.cpp
r250291r250292
3939#include "sound/wavwrite.h"
4040#include "discrete.h"
4141
42// for now, make buggy GCC/Mingw STFU about I64FMT
43#if (defined(__MINGW32__) && (__GNUC__ >= 5))
44#pragma GCC diagnostic push
45#pragma GCC diagnostic ignored "-Wformat"
46#pragma GCC diagnostic ignored "-Wformat-extra-args"
47#endif
48
49
5042/* for_each collides with c++ standard libraries - include it here */
5143#define for_each(_T, _e, _l) for (_T _e = (_l)->begin_ptr() ;  _e <= (_l)->end_ptr(); _e++)
5244
r250291r250292
135127
136128protected:
137129   discrete_task(discrete_device &pdev)
138   : task_group(0), m_device(pdev), m_threadid(-1)
139   {
130   : task_group(0), m_device(pdev), m_threadid(-1), m_samples(0)
131{
140132      source_list.clear();
141133      step_list.clear();
142134      m_buffers.clear();
r250291r250292
332324                     buf.source = dest_node->m_input[inputnum];
333325                     buf.node_num = inputnode_num;
334326                     //buf.node = device->discrete_find_node(inputnode);
335                     i = m_buffers.count();
327                     m_buffers.count();
336328                     pbuf = m_buffers.add(buf);
337329                  }
338330                  m_device.discrete_log("dso_task_start - buffering %d(%d) in task %p group %d referenced by %d group %d", NODE_INDEX(inputnode_num), NODE_CHILD_NODE_NUM(inputnode_num), this, task_group, dest_node->index(), dest_task->task_group);
r250291r250292
362354 *
363355 *************************************/
364356
365discrete_base_node::discrete_base_node() :
357discrete_base_node::discrete_base_node() :
358   m_device(NULL),
359   m_block(NULL),
360   m_active_inputs(0),
361   m_custom(NULL),
362   m_input_is_node(0),
366363   m_step_intf(NULL),
367   m_input_intf(NULL)
364   m_input_intf(NULL),
365   m_output_intf(NULL)
368366{
369367   m_output[0] = 0.0;
370368}
r250291r250292
853851
854852discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
855853   : discrete_device(mconfig, DISCRETE, "DISCRETE", tag, owner, clock),
856      device_sound_interface(mconfig, *this)
854      device_sound_interface(mconfig, *this),
855      m_stream(NULL)
857856{
858857}
859858
r250291r250292
11041103{
11051104   const discrete_base_node *node = discrete_find_node(offset);
11061105
1107   UINT8 data = 0;
1106   UINT8 data;
11081107
11091108   /* Read the node input value if allowed */
11101109   if (node)
r250291r250292
11421141      discrete_log("discrete_sound_w write to non-existent NODE_%02d\n", offset-NODE_00);
11431142   }
11441143}
1145
1146#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1147#pragma GCC diagnostic pop
1148#endif
trunk/src/devices/sound/samples.cpp
r250291r250292
363363                     chan.source_num = -1;
364364                     if (samples > 0)
365365                        memset(buffer, 0, samples * sizeof(*buffer));
366                     samples = 0;
367366                     break;
368367                  }
369368               }
trunk/src/devices/sound/tms5110.cpp
r250291r250292
726726      m_u[2] = m_u[3] - matrix_multiply(m_current_k[2], m_x[2]);
727727      m_u[1] = m_u[2] - matrix_multiply(m_current_k[1], m_x[1]);
728728      m_u[0] = m_u[1] - matrix_multiply(m_current_k[0], m_x[0]);
729#ifdef DEBUG_LATTICE
730      INT32 err = m_x[9] + matrix_multiply(m_current_k[9], m_u[9]); //x_10, real chip doesn't use or calculate this
731#endif
729732      m_x[9] = m_x[8] + matrix_multiply(m_current_k[8], m_u[8]);
730733      m_x[8] = m_x[7] + matrix_multiply(m_current_k[7], m_u[7]);
731734      m_x[7] = m_x[6] + matrix_multiply(m_current_k[6], m_u[6]);
r250291r250292
743746      for (i = 9; i >= 0; i--)
744747      {
745748         fprintf(stderr,"Y%d:%04d ", i+1, m_u[i]);
749      }
750      fprintf(stderr,"\n");
751      fprintf(stderr,"E:%04d ", err);
752      for (i = 9; i >= 0; i--)
753      {
746754         fprintf(stderr,"b%d:%04d ", i+1, m_x[i]);
747         if ((i % 5) == 0) fprintf(stderr,"\n");
748755      }
756      fprintf(stderr,"\n");
749757#endif
750758      return m_u[0];
751759}
trunk/src/devices/sound/tms5220.cpp
r250291r250292
11291129      m_u[2] = m_u[3] - matrix_multiply(m_current_k[2], m_x[2]);
11301130      m_u[1] = m_u[2] - matrix_multiply(m_current_k[1], m_x[1]);
11311131      m_u[0] = m_u[1] - matrix_multiply(m_current_k[0], m_x[0]);
1132#ifdef DEBUG_LATTICE
1133      INT32 err = m_x[9] + matrix_multiply(m_current_k[9], m_u[9]); //x_10, real chip doesn't use or calculate this
1134#endif
11321135      m_x[9] = m_x[8] + matrix_multiply(m_current_k[8], m_u[8]);
11331136      m_x[8] = m_x[7] + matrix_multiply(m_current_k[7], m_u[7]);
11341137      m_x[7] = m_x[6] + matrix_multiply(m_current_k[6], m_u[6]);
r250291r250292
11461149      for (i = 9; i >= 0; i--)
11471150      {
11481151         fprintf(stderr,"Y%d:%04d ", i+1, m_u[i]);
1152      }
1153      fprintf(stderr,"\n");
1154      fprintf(stderr,"E:%04d ", err);
1155      for (i = 9; i >= 0; i--)
1156      {
11491157         fprintf(stderr,"b%d:%04d ", i+1, m_x[i]);
1150         if ((i % 5) == 0) fprintf(stderr,"\n");
11511158      }
1159      fprintf(stderr,"\n");
11521160#endif
11531161      return m_u[0];
11541162}
trunk/src/devices/sound/votrax.cpp
r250291r250292
9696
9797votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
9898   : device_t(mconfig, VOTRAX_SC01, "Votrax SC-01", tag, owner, clock, "votrax", __FILE__),
99      device_sound_interface(mconfig, *this),
100      m_stream(NULL),
101      m_phoneme_timer(NULL),
102      m_request_cb(*this)
99     device_sound_interface(mconfig, *this),
100     m_stream(NULL),
101     m_phoneme_timer(NULL), m_rom(NULL), m_inflection(0), m_phoneme(0),
102     m_request_cb(*this), m_request_state(0), m_internal_request(0), m_master_clock_freq(0), m_master_clock(0), m_counter_34(0),
103     m_latch_70(0), m_latch_72(0), m_beta1(0), m_p2(0), m_p1(0), m_phi2(0), m_phi1(0), m_phi2_20(0), m_phi1_20(0), m_subphoneme_period(0),
104     m_subphoneme_count(0), m_clock_88(0), m_latch_42(0), m_counter_84(0), m_latch_92(0), m_srff_132(false), m_srff_114(false), m_srff_112(false),
105     m_srff_142(false), m_latch_80(0), m_counter_220(0), m_counter_222(0), m_counter_224(0), m_counter_234(0), m_counter_236(0), m_fgate(0),
106     m_glottal_sync(0), m_0625_clock(0), m_counter_46(0), m_latch_46(0), m_latch_168(0), m_latch_170(0), m_f1(0), m_f2(0), m_fc(0), m_f3(0),
107     m_f2q(0), m_va(0), m_fa(0), m_noise_clock(0), m_shift_252(0), m_counter_250(0)
103108{
104109}
105110
trunk/src/devices/sound/ym2151.cpp
r250291r250292
601601
602602   for (i=0; i<768; i++)
603603   {
604#if 0
604605      /* 3.4375 Hz is note A; C# is 4 semitones higher */
605606      Hz = 1000;
606#if 0
607/* Hz is close, but not perfect */
607      /* Hz is close, but not perfect */
608608      //Hz = scaler * 3.4375 * pow (2, (i + 4 * 64 ) / 768.0 );
609609      /* calculate phase increment */
610610      phaseinc = (Hz*SIN_LEN) / (double)chip->sampfreq;
r250291r250292
687687
688688   /* calculate timers' deltas */
689689   /* User's Manual pages 15,16  */
690   mult = (1<<TIMER_SH);
690   #ifndef USE_MAME_TIMERS
691      mult = (1<<TIMER_SH);
692   #endif
691693   for (i=0; i<1024; i++)
692694   {
693695      /* ASG 980324: changed to compute both tim_A_tab and timer_A_time */
trunk/src/devices/video/poly.h
r250291r250292
656656      v3 = tv;
657657      if (v2->y < v1->y)
658658      {
659         const vertex_t *tv = v1;
659         const vertex_t *tv2 = v1;
660660         v1 = v2;
661         v2 = tv;
661         v2 = tv2;
662662      }
663663   }
664664
r250291r250292
10021002      edgeptr->dxdy = (edgeptr->v2->x - edgeptr->v1->x) * ooy;
10031003      for (int paramnum = 0; paramnum < paramcount; paramnum++)
10041004         edgeptr->dpdy[paramnum] = (edgeptr->v2->p[paramnum] - edgeptr->v1->p[paramnum]) * ooy;
1005      edgeptr++;
1005      ++edgeptr;
10061006   }
10071007
10081008   // walk backward to build up the backward edge list
r250291r250292
10231023      edgeptr->dxdy = (edgeptr->v2->x - edgeptr->v1->x) * ooy;
10241024      for (int paramnum = 0; paramnum < paramcount; paramnum++)
10251025         edgeptr->dpdy[paramnum] = (edgeptr->v2->p[paramnum] - edgeptr->v1->p[paramnum]) * ooy;
1026      edgeptr++;
1026      ++edgeptr;
10271027   }
10281028
10291029   // determine which list is left/right:
r250291r250292
10681068         // compute the ending X based on which part of the triangle we're in
10691069         _BaseType fully = _BaseType(curscan + extnum) + _BaseType(0.5);
10701070         while (fully > ledge->v2->y && fully < v[maxv].y)
1071            ledge++;
1071            ++ledge;
10721072         while (fully > redge->v2->y && fully < v[maxv].y)
1073            redge++;
1073            ++redge;
10741074         _BaseType startx = ledge->v1->x + (fully - ledge->v1->y) * ledge->dxdy;
10751075         _BaseType stopx = redge->v1->x + (fully - redge->v1->y) * redge->dxdy;
10761076
r250291r250292
11591159         nextout->y = v1.y + frac * (v2.y - v1.y);
11601160         for (int paramnum = 0; paramnum < paramcount; paramnum++)
11611161            nextout->p[paramnum] = v1.p[paramnum] + frac * (v2.p[paramnum] - v1.p[paramnum]);
1162         nextout++;
1162         ++nextout;
11631163      }
11641164
11651165      // if this vertex is not clipped, copy it in
trunk/src/emu/addrmap.cpp
r250291r250292
2929      m_addrmask(0),
3030      m_share(NULL),
3131      m_region(NULL),
32      m_rgnoffs(0),
32      m_rgnoffs(0),
33       m_submap_bits(0),
3334      m_memory(NULL),
3435      m_bytestart(0),
3536      m_byteend(0),
trunk/src/emu/audit.cpp
r250291r250292
1515#include "sound/samples.h"
1616#include "softlist.h"
1717
18// for now, make buggy GCC/Mingw STFU about I64FMT
19#if (defined(__MINGW32__) && (__GNUC__ >= 5))
20#pragma GCC diagnostic push
21#pragma GCC diagnostic ignored "-Wformat"
22#pragma GCC diagnostic ignored "-Wformat-extra-args"
23#endif
24
25
2618//**************************************************************************
2719//  CORE FUNCTIONS
2820//**************************************************************************
r250291r250292
278270   int found = 0;
279271
280272   // iterate over sample entries
281   samples_device_iterator iter(m_enumerator.config().root_device());
282   for (samples_device *device = iter.first(); device != NULL; device = iter.next())
273   samples_device_iterator iterator(m_enumerator.config().root_device());
274   for (samples_device *device = iterator.first(); device != NULL; device = iterator.next())
283275   {
284276      // by default we just search using the driver name
285277      std::string searchpath(m_enumerator.driver().name);
r250291r250292
615607      m_shared_device(NULL)
616608{
617609}
618
619#if (defined(__MINGW32__) && (__GNUC__ >= 5))
620#pragma GCC diagnostic pop
621#endif
trunk/src/emu/config.cpp
r250291r250292
8686   newtype->save = save;
8787
8888   /* add us to the end */
89   for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) ;
89   for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) { }
9090   *ptype = newtype;
9191}
9292
trunk/src/emu/debug/debugcmd.cpp
r250291r250292
13531353   address_space *space;
13541354   const char *action = NULL;
13551355   UINT64 address, length;
1356   int type = 0;
1356   int type;
13571357   int wpnum;
13581358
13591359   /* CPU is implicit */
r250291r250292
14841484   /* loop over all CPUs */
14851485   device_iterator iter(machine.root_device());
14861486   for (device_t *device = iter.first(); device != NULL; device = iter.next())
1487      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
1487      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
14881488         if (device->debug()->watchpoint_first(spacenum) != NULL)
14891489         {
14901490            static const char *const types[] = { "unkn ", "read ", "write", "r/w  " };
r250291r250292
18301830{
18311831   UINT64 offset, endoffset, length, width = 0, ascii = 1;
18321832   address_space *space;
1833   FILE *f = NULL;
1833   FILE *f;
18341834   UINT64 i, j;
18351835
18361836   /* validate parameters */
r250291r250292
19841984   /* initialize entire memory by default */
19851985   if (params <= 1)
19861986   {
1987      offset = 0;
1988      length = space->bytemask() + 1;
19891987      for (entry = space->map()->m_entrylist.first(); entry != NULL; entry = entry->next())
19901988      {
19911989         cheat_region[region_count].offset = space->address_to_byte(entry->m_addrstart) & space->bytemask();
r250291r250292
24562454   UINT64 offset, length, bytes = 1;
24572455   int minbytes, maxbytes, byteswidth;
24582456   address_space *space, *decrypted_space;
2459   FILE *f = NULL;
2457   FILE *f;
24602458   int j;
24612459
24622460   /* validate parameters */
trunk/src/emu/debug/debugcon.cpp
r250291r250292
1111#include "emu.h"
1212#include "debugcon.h"
1313#include "debugcpu.h"
14#include "debughlp.h"
1514#include "debugvw.h"
1615#include "textbuf.h"
1716#include "debugger.h"
r250291r250292
270269{
271270   char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH];
272271   char *params[MAX_COMMAND_PARAMS] = { 0 };
273   CMDERR result = CMDERR_NONE;
272   CMDERR result;
274273   char *command_start;
275274   char *p, c = 0;
276275
trunk/src/emu/debug/debugcpu.cpp
r250291r250292
1212#include "emuopts.h"
1313#include "osdepend.h"
1414#include "debugcpu.h"
15#include "debugcmd.h"
1615#include "debugcon.h"
1716#include "express.h"
1817#include "debugvw.h"
r250291r250292
23782377bool device_debug::watchpoint_clear(int index)
23792378{
23802379   // scan the list to see if we own this breakpoint
2381   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); spacenum++)
2380   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
23822381      for (watchpoint **wp = &m_wplist[spacenum]; *wp != NULL; wp = &(*wp)->m_next)
23832382         if ((*wp)->m_index == index)
23842383         {
r250291r250292
24022401void device_debug::watchpoint_clear_all()
24032402{
24042403   // clear the head until we run out
2405   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); spacenum++)
2404   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
24062405      while (m_wplist[spacenum] != NULL)
24072406         watchpoint_clear(m_wplist[spacenum]->index());
24082407}
r250291r250292
24162415bool device_debug::watchpoint_enable(int index, bool enable)
24172416{
24182417   // scan the list to see if we own this watchpoint
2419   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); spacenum++)
2418   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
24202419      for (watchpoint *wp = m_wplist[spacenum]; wp != NULL; wp = wp->next())
24212420         if (wp->m_index == index)
24222421         {
r250291r250292
24382437void device_debug::watchpoint_enable_all(bool enable)
24392438{
24402439   // apply the enable to all watchpoints we own
2441   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); spacenum++)
2440   for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
24422441      for (watchpoint *wp = m_wplist[spacenum]; wp != NULL; wp = wp->next())
24432442         watchpoint_enable(wp->index(), enable);
24442443}
trunk/src/emu/debug/debugvw.cpp
r250291r250292
1717#include "dvmemory.h"
1818#include "dvbpoints.h"
1919#include "dvwpoints.h"
20#include "debugcmd.h"
2120#include "debugcpu.h"
22#include "debugcon.h"
2321#include <ctype.h>
2422
2523
r250291r250292
443441debug_view *debug_view_manager::append(debug_view *view)
444442{
445443   debug_view **viewptr;
446   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) ;
444   for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) { }
447445   *viewptr = view;
448446   return view;
449447}
trunk/src/emu/debug/debugvw.h
r250291r250292
162162   const simple_list<debug_view_source> &source_list() const { return m_source_list; }
163163
164164   // setters
165   void set_size(int width, int height);
166165   void set_visible_size(debug_view_xy size);
167166   void set_visible_position(debug_view_xy pos);
168167   void set_cursor_position(debug_view_xy pos);
trunk/src/emu/debug/dvmemory.cpp
r250291r250292
133133   memory_interface_iterator iter(machine().root_device());
134134   for (device_memory_interface *memintf = iter.first(); memintf != NULL; memintf = iter.next())
135135      if (&memintf->device() != &machine().root_device())
136         for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
136         for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
137137            if (memintf->has_space(spacenum))
138138            {
139139               address_space &space = memintf->space(spacenum);
trunk/src/emu/debug/dvmemory.h
r250291r250292
1111#ifndef __DVMEMORY_H__
1212#define __DVMEMORY_H__
1313
14#include "dvstate.h"
15
16
1714//**************************************************************************
1815//  TYPE DEFINITIONS
1916//**************************************************************************
trunk/src/emu/debug/dvwpoints.cpp
r250291r250292
231231   {
232232      // Collect
233233      device_debug &debugInterface = *source->device()->debug();
234      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
234      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
235235      {
236236         for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != NULL; wp = wp->next())
237237            m_buffer.push_back(wp);
trunk/src/emu/debug/express.cpp
r250291r250292
11051105      throw expression_error(expression_error::INVALID_TOKEN, token.offset());
11061106
11071107   // convert the space to flags
1108   expression_space memspace = EXPSPACE_INVALID;
1108   expression_space memspace;
11091109   switch (space)
11101110   {
11111111      case 'p':   memspace = physical ? EXPSPACE_PROGRAM_PHYSICAL : EXPSPACE_PROGRAM_LOGICAL; break;
r250291r250292
12191219
12201220   // loop over all the original tokens
12211221   parse_token *prev = NULL;
1222   parse_token *next = NULL;
1222   parse_token *next;
12231223   for (parse_token *token = m_tokenlist.detach_all(); token != NULL; prev = token, token = next)
12241224   {
12251225      // pre-determine our next token
trunk/src/emu/debugger.cpp
r250291r250292
1313#include "debug/debugcpu.h"
1414#include "debug/debugcmd.h"
1515#include "debug/debugcon.h"
16#include "debug/express.h"
1716#include "debug/debugvw.h"
1817#include <ctype.h>
1918
trunk/src/emu/devcb.cpp
r250291r250292
108108//-------------------------------------------------
109109
110110devcb_read_base::devcb_read_base(device_t &device, UINT64 defmask)
111   : devcb_base(device, defmask)
111   : devcb_base(device, defmask),
112     m_adapter(NULL)
112113{
113114}
114115
r250291r250292
335336//-------------------------------------------------
336337
337338devcb_write_base::devcb_write_base(device_t &device, UINT64 defmask)
338   : devcb_base(device, defmask)
339   : devcb_base(device, defmask),
340     m_adapter(NULL)
339341{
340342}
341343
trunk/src/emu/devcpu.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emu.h"
12#include "debugger.h"
1312#include <ctype.h>
1413
1514
trunk/src/emu/devfind.cpp
r250291r250292
4040//  find_memregion - find memory region
4141//-------------------------------------------------
4242
43void *finder_base::find_memregion(UINT8 width, size_t &length, bool required)
43void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) const
4444{
4545   // look up the region and return NULL if not found
4646   memory_region *region = m_base.memregion(m_tag);
trunk/src/emu/devfind.h
r250291r250292
5353
5454protected:
5555   // helpers
56   void *find_memregion(UINT8 width, size_t &length, bool required);
56   void *find_memregion(UINT8 width, size_t &length, bool required) const;
5757   void *find_memshare(UINT8 width, size_t &bytes, bool required);
5858   bool report_missing(bool found, const char *objname, bool required);
5959
r250291r250292
8080
8181   // operators to make use transparent
8282   operator _ObjectClass *() const { return m_target; }
83   _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; }
8483
84   virtual _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; }
85
8586   // getter for explicit fetching
8687   _ObjectClass *target() const { return m_target; }
8788
trunk/src/emu/device.cpp
r250291r250292
1414#include "debug/debugcpu.h"
1515
1616
17
1817//**************************************************************************
19//  CONSTANTS
20//**************************************************************************
21
22#define TEMP_STRING_POOL_ENTRIES        16
23#define MAX_STRING_LENGTH               256
24
25
26
27//**************************************************************************
28//  GLOBAL VARIABLES
29//**************************************************************************
30
31static char temp_string_pool[TEMP_STRING_POOL_ENTRIES][MAX_STRING_LENGTH];
32static int temp_string_pool_index;
33
34
35
36//**************************************************************************
37//  INLINE FUNCTIONS
38//**************************************************************************
39
40//-------------------------------------------------
41//  get_temp_string_buffer - return a pointer to
42//  a temporary string buffer
43//-------------------------------------------------
44
45char *get_temp_string_buffer(void)
46{
47   char *string = &temp_string_pool[temp_string_pool_index++ % TEMP_STRING_POOL_ENTRIES][0];
48   string[0] = 0;
49   return string;
50}
51
52
53resource_pool &machine_get_pool(running_machine &machine)
54{
55   // temporary to get around include dependencies, until CPUs
56   // get a proper device class
57   return machine.respool();
58}
59
60
61
62//**************************************************************************
6318//  LIVE DEVICE MANAGEMENT
6419//**************************************************************************
6520
r250291r250292
898853      m_type(type)
899854{
900855   device_interface **tailptr;
901   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) ;
856   for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) { }
902857   *tailptr = this;
903858}
904859
trunk/src/emu/device.h
r250291r250292
198198
199199   // debugging
200200   device_debug *debug() const { return m_debug; }
201   offs_t safe_pc();
202   offs_t safe_pcbase();
201   offs_t safe_pc() const;
202   offs_t safe_pcbase() const;
203203
204204   void set_default_bios(UINT8 bios) { m_default_bios = bios; }
205205   void set_system_bios(UINT8 bios) { m_system_bios = bios; }
trunk/src/emu/diexec.h
r250291r250292
166166   void set_input_line(int linenum, int state) { m_input[linenum].set_state_synced(state); }
167167   void set_input_line_vector(int linenum, int vector) { m_input[linenum].set_vector(vector); }
168168   void set_input_line_and_vector(int linenum, int state, int vector) { m_input[linenum].set_state_synced(state, vector); }
169   int input_state(int linenum) { return m_input[linenum].m_curstate; }
169   int input_state(int linenum) const { return m_input[linenum].m_curstate; }
170170
171171   // suspend/resume
172172   void suspend(UINT32 reason, bool eatcycles);
173173   void resume(UINT32 reason);
174   bool suspended(UINT32 reason = SUSPEND_ANY_REASON) { return (m_nextsuspend & reason) != 0; }
174   bool suspended(UINT32 reason = SUSPEND_ANY_REASON) const { return (m_nextsuspend & reason) != 0; }
175175   void yield() { suspend(SUSPEND_REASON_TIMESLICE, false); }
176176   void spin() { suspend(SUSPEND_REASON_TIMESLICE, true); }
177177   void spin_until_trigger(int trigid) { suspend_until_trigger(trigid, true); }
r250291r250292
195195   device_execute_interface &execute() { return *this; }
196196
197197protected:
198   // internal helpers
199   void run_thread_wrapper();
200
201198   // clock and cycle information getters
202199   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const;
203200   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const;
trunk/src/emu/digfx.cpp
r250291r250292
2222
2323device_gfx_interface::device_gfx_interface(const machine_config &mconfig, device_t &device,
2424                              const gfx_decode_entry *gfxinfo, const char *palette_tag)
25   : device_interface(device, "gfx"),
25   : device_interface(device, "gfx"),
26   m_palette(NULL),
2627   m_gfxdecodeinfo(gfxinfo),
2728   m_palette_tag(palette_tag),
2829   m_palette_is_sibling(palette_tag == NULL),
trunk/src/emu/diimage.cpp
r250291r250292
1414#include "ui/ui.h"
1515#include "ui/menu.h"
1616#include "zippath.h"
17#include "ui/filesel.h"
18#include "ui/swlist.h"
1917#include "ui/imgcntrl.h"
2018#include "softlist.h"
2119#include "image.h"
r250291r250292
5755
5856device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device)
5957   : device_interface(device, "image"),
58      m_err(),
6059      m_file(NULL),
6160      m_mame_file(NULL),
6261      m_software_info_ptr(NULL),
63      m_software_part_ptr(NULL),
62      m_software_part_ptr(NULL),
63       m_supported(0),
6464      m_readonly(false),
65      m_created(false),
65      m_created(false),
66       m_init_phase(false),
67       m_from_swlist(false),
68       m_create_format(0),
69       m_create_args(NULL),
6670      m_is_loading(FALSE)
6771{
6872}
r250291r250292
575579
576580image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, const char *path)
577581{
578   file_error filerr = FILERR_NOT_FOUND;
579   image_error_t err = IMAGE_ERROR_FILENOTFOUND;
582   file_error filerr;
583   image_error_t err;
580584   std::string revised_path;
581585
582586   /* attempt to read the file */
r250291r250292
629633   if(m_file)
630634      core_fclose(m_file);
631635
632   file_error filerr = FILERR_NOT_FOUND;
633   image_error_t err = IMAGE_ERROR_FILENOTFOUND;
636   file_error filerr;
637   image_error_t err;
634638   std::string revised_path;
635639
636640   /* attempt to open the file for writing*/
trunk/src/emu/diimage.h
r250291r250292
253253   void setup_working_directory();
254254   bool try_change_working_directory(const char *subdir);
255255
256   int read_hash_config(const char *sysname);
257256   void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types);
258257   void image_checkhash();
259258   void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL);
trunk/src/emu/dimemory.cpp
r250291r250292
241241   bool detected_overlap = DETECT_OVERLAPPING_MEMORY ? false : true;
242242
243243   // loop over all address spaces
244   for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
244   for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
245245   {
246246      const address_space_config *spaceconfig = space_config(spacenum);
247247      if (spaceconfig != NULL)
trunk/src/emu/dinetwork.cpp
r250291r250292
1616{
1717}
1818
19int device_network_interface::send(UINT8 *buf, int len)
19int device_network_interface::send(UINT8 *buf, int len) const
2020{
2121   if(!m_dev) return 0;
2222   return m_dev->send(buf, len);
trunk/src/emu/dinetwork.h
r250291r250292
1919   bool get_promisc() { return m_promisc; }
2020   int get_interface() { return m_intf; }
2121
22   int send(UINT8 *buf, int len);
22   int send(UINT8 *buf, int len) const;
2323   virtual void recv_cb(UINT8 *buf, int len);
2424
2525protected:
trunk/src/emu/dioutput.cpp
r250291r250292
3535{
3636}
3737
38void device_output_interface::set_output_value(int value)
38void device_output_interface::set_output_value(int value) const
3939{
4040   if (m_output_name)
4141      output_set_value(m_output_name, value);
r250291r250292
4343      fatalerror("Output name not set!");
4444}
4545
46void device_output_interface::set_led_value(int value)
46void device_output_interface::set_led_value(int value) const
4747{
4848   if (m_output_name)
4949      output_set_value(m_output_name, value);
r250291r250292
5151      output_set_led_value(m_output_index, value);
5252}
5353
54void device_output_interface::set_lamp_value(int value)
54void device_output_interface::set_lamp_value(int value) const
5555{
5656   if (m_output_name)
5757      output_set_value(m_output_name, value);
r250291r250292
5959      output_set_lamp_value(m_output_index, value);
6060}
6161
62void device_output_interface::set_digit_value(int value)
62void device_output_interface::set_digit_value(int value) const
6363{
6464   if (m_output_name)
6565      output_set_value(m_output_name, value);
trunk/src/emu/dioutput.h
r250291r250292
4747   static void set_output_index(device_t &device, int index) { dynamic_cast<device_output_interface &>(device).m_output_index = index; }
4848   static void set_output_name(device_t &device, const char *name) { dynamic_cast<device_output_interface &>(device).m_output_name = name; }
4949
50   void set_output_value(int value);
51   void set_led_value(int value);
52   void set_lamp_value(int value);
53   void set_digit_value(int value);
50   void set_output_value(int value) const;
51   void set_led_value(int value) const;
52   void set_lamp_value(int value) const;
53   void set_digit_value(int value) const;
5454
5555protected:
5656   int m_output_index;
trunk/src/emu/dipty.cpp
r250291r250292
5353   return m_opened;
5454}
5555
56ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count)
56ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) const
5757{
5858   UINT32 actual_bytes;
5959
r250291r250292
6464   }
6565}
6666
67void device_pty_interface::write(UINT8 tx_char)
67void device_pty_interface::write(UINT8 tx_char) const
6868{
6969   UINT32 actual_bytes;
7070
trunk/src/emu/dipty.h
r250291r250292
2929
3030      bool is_open(void) const;
3131
32      ssize_t read(UINT8 *rx_chars , size_t count);
33      void write(UINT8 tx_char);
32      ssize_t read(UINT8 *rx_chars , size_t count) const;
33      void write(UINT8 tx_char) const;
3434
3535      bool is_slave_connected(void) const;
3636
trunk/src/emu/dirtc.h
r250291r250292
5555   void set_current_time(running_machine &machine);
5656
5757protected:
58   UINT8 convert_to_bcd(int val);
59   int bcd_to_integer(UINT8 val);
58   static UINT8 convert_to_bcd(int val);
59   static int bcd_to_integer(UINT8 val);
6060
6161   void set_clock_register(int register, int value);
6262   int get_clock_register(int register);
trunk/src/emu/diserial.cpp
r250291r250292
1919   m_rcv_register_data(0x8000),
2020   m_rcv_flags(0),
2121   m_rcv_bit_count_received(0),
22   m_rcv_bit_count(0),
22   m_rcv_bit_count(0),
23   m_rcv_byte_received(0),
2324   m_rcv_framing_error(false),
2425   m_rcv_parity_error(false),
25   m_tra_flags(TRANSMIT_REGISTER_EMPTY),
26   m_tra_register_data(0),
27   m_tra_flags(TRANSMIT_REGISTER_EMPTY),
28   m_tra_bit_count_transmitted(0),
29   m_tra_bit_count(0),
2630   m_rcv_clock(NULL),
2731   m_tra_clock(NULL),
2832   m_rcv_rate(attotime::never),
trunk/src/emu/dislot.cpp
r250291r250292
2020{
2121}
2222
23device_slot_option::device_slot_option(const char *name, const device_type &devtype):
24   m_name(name),
23device_slot_option::device_slot_option(const char *name, const device_type &devtype):
24   m_next(NULL),
25    m_name(name),
2526   m_devtype(devtype),
2627   m_selectable(true),
2728   m_default_bios(NULL),
trunk/src/emu/disound.cpp
r250291r250292
194194   {
195195      for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
196196         if (&stream->device() == &device())
197            for (int outputnum = 0; outputnum < stream->output_count(); outputnum++)
198               stream->set_output_gain(outputnum, gain);
197            for (int num = 0; num < stream->output_count(); num++)
198               stream->set_output_gain(num, gain);
199199   }
200200
201201   // look up the stream and stream output index
trunk/src/emu/distate.cpp
r250291r250292
146146UINT64 device_state_entry::value() const
147147{
148148   // pick up the value
149   UINT64 result = ~(UINT64)0;
149   UINT64 result;
150150   switch (m_datasize)
151151   {
152152      default:
r250291r250292
172172   bool leadzero = false;
173173   bool percent = false;
174174   bool explicitsign = false;
175   bool hitnonzero = false;
175   bool hitnonzero;
176176   bool reset = true;
177177   int width = 0;
178178   for (const char *fptr = m_format.c_str(); *fptr != 0; fptr++)
trunk/src/emu/distate.h
r250291r250292
195195//  or 0 if no state object exists
196196//-------------------------------------------------
197197
198inline offs_t device_t::safe_pc()
198inline offs_t device_t::safe_pc() const
199199{
200200   return (m_state != NULL) ? m_state->pc() : 0;
201201}
r250291r250292
206206//  base or 0 if no state object exists
207207//-------------------------------------------------
208208
209inline offs_t device_t::safe_pcbase()
209inline offs_t device_t::safe_pcbase() const
210210{
211211   return (m_state != NULL) ? m_state->pcbase() : 0;
212212}
trunk/src/emu/drawgfxm.h
r250291r250292
5050#ifndef __DRAWGFXM_H__
5151#define __DRAWGFXM_H__
5252
53#include "profiler.h"
54
55
5653/* special priority type meaning "none" */
5754struct NO_PRIORITY { char dummy[3]; };
5855
trunk/src/emu/drivenum.cpp
r250291r250292
395395//  we're done with it
396396//-------------------------------------------------
397397
398void driver_enumerator::release_current()
398void driver_enumerator::release_current() const
399399{
400400   // skip if no current entry
401401   if (m_current < 0 || m_current >= s_driver_count)
trunk/src/emu/drivenum.h
r250291r250292
117117
118118private:
119119   // internal helpers
120   void release_current();
120   void release_current() const;
121121
122122   // entry in the config cache
123123   struct config_entry
trunk/src/emu/drivers/testcpu.cpp
r250291r250292
3232   testcpu_state(const machine_config &mconfig, device_type type, const char *tag)
3333      : driver_device(mconfig, type, tag),
3434         m_cpu(*this, "maincpu"),
35         m_ram(*this, "ram")
35         m_ram(*this, "ram"),
36         m_space(NULL)
3637   {
3738   }
3839
trunk/src/emu/emualloc.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emucore.h"
12#include "coreutil.h"
1312
1413
1514//**************************************************************************
trunk/src/emu/emuopts.cpp
r250291r250292
290290         }
291291      }
292292   }
293   while (add_slot_options(false));
293   while (add_slot_options(false)) { }
294294   add_device_options(false);
295295}
296296
r250291r250292
359359bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value)
360360{
361361   // an initial parse to capture the initial set of values
362   bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
362   bool result;
363   
364   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
363365
364366   // keep adding slot options until we stop seeing new stuff
365367   bool isfirstpass = true;
366368   while (add_slot_options(isfirstpass))
367369   {
368      result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
370      core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
369371      isfirstpass = false;
370372   }
371373
r250291r250292
373375   add_device_options(true);
374376   if (name != NULL && exists(name))
375377      set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
376   result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
378   core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
377379
378   int num = 0;
380   int num;
379381   do {
380382      num = options_count();
381383      update_slot_options();
r250291r250292
528530
529531      // then add the options
530532      add_device_options(true);
531      int num = 0;
533      int num;
532534      do {
533535         num = options_count();
534536         update_slot_options();
trunk/src/emu/emupal.cpp
r250291r250292
2424      m_entries(0),
2525      m_indirect_entries(0),
2626      m_enable_shadows(0),
27      m_enable_hilights(0),
28      m_membits_supplied(false),
27      m_enable_hilights(0),
28      m_membits(0),
29      m_membits_supplied(false),
30      m_endianness(),
2931      m_endianness_supplied(false),
3032      m_raw_to_rgb(raw_to_rgb_converter()),
3133      m_palette(NULL),
32      m_pens(NULL),
34      m_pens(NULL),
35      m_format(),
3336      m_shadow_table(NULL),
3437      m_shadow_group(0),
35      m_hilight_group(0),
38      m_hilight_group(0),
39      m_white_pen(0),
40      m_black_pen(0),
3641      m_init(palette_init_delegate())
3742{
3843}
trunk/src/emu/hash.cpp
r250291r250292
292292      // non-hex alpha values specify a hash type
293293      if (uc >= 'G' && uc <= 'Z')
294294      {
295         if (skip_digits != 0)
296            errors = true;
297295         skip_digits = 0;
298296         if (uc == HASH_CRC)
299297         {
trunk/src/emu/hashfile.cpp
r250291r250292
539539
540540bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result)
541541{
542   hash_file *hashfile = NULL;
543   const hash_info *info = NULL;
542   hash_file *hashfile;
543   const hash_info *info;
544544
545545   /* open the hash file */
546546   hashfile = hashfile_open(image.device().mconfig().options(), sysname, FALSE, NULL);
trunk/src/emu/input.cpp
r250291r250292
834834   // if we have a generic ID, pick a new internal one
835835   input_item_id originalid = itemid;
836836   if (itemid >= ITEM_ID_OTHER_SWITCH && itemid <= ITEM_ID_OTHER_AXIS_RELATIVE)
837      for (itemid = (input_item_id)(ITEM_ID_MAXIMUM + 1); itemid <= ITEM_ID_ABSOLUTE_MAXIMUM; itemid++)
837      for (itemid = (input_item_id)(ITEM_ID_MAXIMUM + 1); itemid <= ITEM_ID_ABSOLUTE_MAXIMUM; ++itemid)
838838         if (m_item[itemid] == NULL)
839839            break;
840840   assert(itemid <= ITEM_ID_ABSOLUTE_MAXIMUM);
r250291r250292
843843   assert(m_item[itemid] == NULL);
844844
845845   // determine the class and create the appropriate item class
846   input_device_item *item = NULL;
846   input_device_item *item;
847847   switch (m_class.standard_item_class(originalid))
848848   {
849849      case ITEM_CLASS_SWITCH:
r250291r250292
859859         break;
860860
861861      default:
862         item = NULL;
862863         assert(false);
863864   }
864865
r250291r250292
919920
920921   // update the state of all the keys and see if any changed state
921922   bool anything_changed = false;
922   for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; itemid++)
923   for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; ++itemid)
923924   {
924925      input_device_item *item = m_item[itemid];
925926      if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
r250291r250292
929930
930931   // if the keyboard state is stable, flush the current state
931932   if (!anything_changed)
932      for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; itemid++)
933      for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; ++itemid)
933934      {
934935         input_device_item *item = m_item[itemid];
935936         if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
r250291r250292
11821183   reset_memory();
11831184
11841185   // iterate over device classes and devices
1185   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; devclass++)
1186   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
11861187      for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
11871188      {
11881189         // fetch the device; ignore if NULL
r250291r250292
11911192            continue;
11921193
11931194         // iterate over items within each device
1194         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++)
1195         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
11951196         {
11961197            // for any non-switch items, set memory equal to the current value
11971198            input_device_item *item = device->item(itemid);
r250291r250292
12091210input_code input_manager::poll_switches()
12101211{
12111212   // iterate over device classes and devices
1212   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; devclass++)
1213   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
12131214      for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
12141215      {
12151216         // fetch the device; ignore if NULL
r250291r250292
12181219            continue;
12191220
12201221         // iterate over items within each device
1221         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++)
1222         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
12221223         {
12231224            input_device_item *item = device->item(itemid);
12241225            if (item != NULL)
r250291r250292
12981299         continue;
12991300
13001301      // iterate over items within each device
1301      for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++)
1302      for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
13021303      {
13031304         input_device_item *item = device->item(itemid);
13041305         if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
r250291r250292
13631364input_code input_manager::poll_axes()
13641365{
13651366   // iterate over device classes and devices
1366   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; devclass++)
1367   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
13671368      for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
13681369      {
13691370         // fetch the device; ignore if NULL
r250291r250292
13721373            continue;
13731374
13741375         // iterate over items within each device
1375         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++)
1376         for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
13761377         {
13771378            input_device_item *item = device->item(itemid);
13781379            if (item != NULL && item->itemclass() != ITEM_CLASS_SWITCH)
r250291r250292
14441445input_code input_manager::code_from_itemid(input_item_id itemid) const
14451446{
14461447   // iterate over device classes and devices
1447   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; devclass++)
1448   for (input_device_class devclass = DEVICE_CLASS_FIRST_VALID; devclass <= DEVICE_CLASS_LAST_VALID; ++devclass)
14481449      for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
14491450      {
14501451         input_device *device = m_class[devclass]->device(devnum);
r250291r250292
16121613         return INPUT_CODE_INVALID;
16131614
16141615      // if not a standard code, look it up in the device specific codes
1615      for (itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++)
1616      for (itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
16161617      {
16171618         input_device_item *item = device->item(itemid);
16181619         if (item != NULL && token[curtok].compare(item->token()) == 0)
trunk/src/emu/ioport.cpp
r250291r250292
9797#include "profiler.h"
9898#include "ui/ui.h"
9999#include "uiinput.h"
100#include "debug/debugcon.h"
101100
102101#include "osdepend.h"
103102
r250291r250292
713712
714713void input_type_entry::restore_default_seq()
715714{
716   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
715   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
717716      m_seq[seqtype] = defseq(seqtype);
718717}
719718
r250291r250292
727726//-------------------------------------------------
728727
729728digital_joystick::digital_joystick(int player, int number)
730   : m_player(player),
729   :   m_next(NULL),
730      m_player(player),
731731      m_number(number),
732732      m_current(0),
733733      m_current4way(0),
r250291r250292
763763
764764   // read all the associated ports
765765   running_machine *machine = NULL;
766   for (direction_t direction = JOYDIR_UP; direction < JOYDIR_COUNT; direction++)
766   for (direction_t direction = JOYDIR_UP; direction < JOYDIR_COUNT; ++direction)
767767      for (const simple_list_wrapper<ioport_field> *i = m_field[direction].first(); i != NULL; i = i->next())
768768      {
769769         machine = &i->object()->machine();
r250291r250292
14771477      m_way(0)
14781478{
14791479   // reset sequences and chars
1480   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
1480   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
14811481      m_seq[seqtype].set_default();
14821482   m_chars[0] = m_chars[1] = m_chars[2] = m_chars[3] = unicode_char(0);
14831483
r250291r250292
16791679   memset(&settings, 0, sizeof(settings));
16801680
16811681   // copy the basics
1682   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
1682   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
16831683      settings.seq[seqtype] = seq(seqtype);
16841684
16851685   // if there's a list of settings or we're an adjuster, copy the current value
r250291r250292
17111711void ioport_field::set_user_settings(const user_settings &settings)
17121712{
17131713   // copy the basics
1714   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
1714   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
17151715   {
17161716      const input_seq &defseq = manager().type_seq(m_type, m_player, input_seq_type(seqtype));
17171717      if (defseq == settings.seq[seqtype])
r250291r250292
21592159      joydir(digital_joystick::JOYDIR_COUNT)
21602160{
21612161   // fill in the basic values
2162   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
2162   for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
21632163      seq[seqtype] = field.defseq_unresolved(seqtype);
21642164
21652165   // if this is a digital joystick field, make a note of it
r250291r250292
24542454      m_record_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS),
24552455      m_playback_file(machine.options().input_directory(), OPEN_FLAG_READ),
24562456      m_playback_accumulated_speed(0),
2457      m_playback_accumulated_frames(0)
2457      m_playback_accumulated_frames(0),
2458      m_has_configs(false),
2459      m_has_analog(false),
2460      m_has_dips(false),
2461      m_has_bioses(false)
24582462{
24592463   memset(m_type_to_entry, 0, sizeof(m_type_to_entry));
24602464}
r250291r250292
29802984
29812985      // initialize sequences to invalid defaults
29822986      input_seq newseq[SEQ_TYPE_TOTAL];
2983      for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
2987      for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
29842988         newseq[seqtype].set(INPUT_CODE_INVALID);
29852989
29862990      // loop over new sequences
r250291r250292
30083012   // what we will diff against
30093013   if (config_type == CONFIG_TYPE_CONTROLLER)
30103014      for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
3011         for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3015         for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
30123016            entry->defseq(seqtype) = entry->seq(seqtype);
30133017}
30143018
r250291r250292
30493053      // loop over the remapping table, then over default ports, replacing old with new
30503054      for (int remapnum = 0; remapnum < count; remapnum++)
30513055         for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
3052            for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3056            for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
30533057               entry->m_seq[seqtype].replace(oldtable[remapnum], newtable[remapnum]);
30543058   }
30553059}
r250291r250292
30663070   for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
30673071      if (entry->type() == type && entry->player() == player)
30683072      {
3069         for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3073         for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
30703074            if (newseq[seqtype][0] != INPUT_CODE_INVALID)
30713075               entry->m_seq[seqtype] = newseq[seqtype];
30723076         return true;
r250291r250292
30983102               field->mask() == mask && (field->defvalue() & mask) == (defvalue & mask))
30993103            {
31003104               // if a sequence was specified, copy it in
3101               for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3105               for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
31023106                  if (newseq[seqtype][0] != INPUT_CODE_INVALID)
31033107                     field->live().seq[seqtype] = newseq[seqtype];
31043108
r250291r250292
32173221      {
32183222         // see if any of the sequences have changed
32193223         input_seq_type seqtype;
3220         for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3224         for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
32213225            if (entry->seq(seqtype) != entry->defseq(seqtype))
32223226               break;
32233227
r250291r250292
32333237               xml_set_attribute(portnode, "type", input_type_to_token(tempstr, entry->type(), entry->player()));
32343238
32353239               // add only the sequences that have changed from the defaults
3236               for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3237                  if (entry->seq(seqtype) != entry->defseq(seqtype))
3238                     save_sequence(portnode, seqtype, entry->type(), entry->seq(seqtype));
3240               for (input_seq_type type = SEQ_TYPE_STANDARD; type < SEQ_TYPE_TOTAL; ++type)
3241                  if (entry->seq(type) != entry->defseq(type))
3242                     save_sequence(portnode, type, entry->type(), entry->seq(type));
32393243            }
32403244         }
32413245      }
r250291r250292
32573261         {
32583262            // determine if we changed
32593263            bool changed = false;
3260            for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3264            for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
32613265               changed |= (field->seq(seqtype) != field->defseq(seqtype));
32623266
32633267            // non-analog changes
r250291r250292
32913295                  xml_set_attribute_int(portnode, "defvalue", field->defvalue() & field->mask());
32923296
32933297                  // add sequences if changed
3294                  for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
3298                  for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
32953299                     if (field->seq(seqtype) != field->defseq(seqtype))
32963300                        save_sequence(portnode, seqtype, field->type(), field->seq(seqtype));
32973301
trunk/src/emu/ioport.h
r250291r250292
13941394   int count_players() const;
13951395   bool crosshair_position(int player, float &x, float &y);
13961396   bool has_keyboard() const;
1397   void setup_natural_keyboard(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty);
13981397   INT32 frame_interpolate(INT32 oldval, INT32 newval);
13991398   ioport_type token_to_input_type(const char *string, int &player) const;
14001399   const char *input_type_to_token(std::string &str, ioport_type type, int player);
trunk/src/emu/luaengine.cpp
r250291r250292
1313#include "luabridge/Source/LuaBridge/LuaBridge.h"
1414#include <signal.h>
1515#include "emu.h"
16#include "emuopts.h"
17#include "osdepend.h"
1816#include "drivenum.h"
1917#include "ui/ui.h"
2018#include "luaengine.h"
r250291r250292
430428   lua_State *L = luaThis->m_lua_state;
431429   luabridge::LuaRef sp_table = luabridge::LuaRef::newTable(L);
432430
433   for (address_spacenum sp = AS_0; sp < ADDRESS_SPACES; sp++) {
431   for (address_spacenum sp = AS_0; sp < ADDRESS_SPACES; ++sp) {
434432      if (dev->memory().has_space(sp)) {
435433         sp_table[dev->memory().space(sp).name()] = &(dev->memory().space(sp));
436434      }
r250291r250292
838836      osd_lock_release(lock);
839837
840838      // Wait for response
841      int done = 0;
839      int done;
842840      do {
843841         osd_sleep(osd_ticks_per_second() / 1000);
844842         osd_lock_acquire(lock);
trunk/src/emu/machine.cpp
r250291r250292
7575#include "debugger.h"
7676#include "render.h"
7777#include "cheat.h"
78#include "ui/selgame.h"
7978#include "uiinput.h"
8079#include "crsshair.h"
81#include "validity.h"
8280#include "unzip.h"
83#include "debug/debugcon.h"
8481#include "debug/debugvw.h"
8582#include "image.h"
8683#include "luaengine.h"
r250291r250292
322319
323320   // notify this device and all its subdevices that they are now configured
324321   device_iterator iter(root_device());
325   for (device_t *device = iter.first(); device != NULL; device = iter.next())
326      if (!device->configured())
327         device->config_complete();
322   for (device_t *dev = iter.first(); dev != NULL; dev = iter.next())
323      if (!dev->configured())
324         dev->config_complete();
328325   return *device;
329326}
330327
r250291r250292
578575         // find length of the device name
579576         int end1 = statename_str.find("/", pos + 3);
580577         int end2 = statename_str.find("%", pos + 3);
581         int end = -1;
578         int end;
582579
583580         if ((end1 != -1) && (end2 != -1))
584581            end = MIN(end1, end2);
trunk/src/emu/machine.h
r250291r250292
7373#define auto_alloc_array_clear(m, t, c) pool_alloc_array_clear(static_cast<running_machine &>(m).respool(), t, c)
7474#define auto_free(m, v)                 pool_free(static_cast<running_machine &>(m).respool(), v)
7575
76#define auto_bitmap_alloc(m, w, h, f)   auto_alloc(m, bitmap_t(w, h, f))
7776#define auto_bitmap_ind8_alloc(m, w, h) auto_alloc(m, bitmap_ind8(w, h))
7877#define auto_bitmap_ind16_alloc(m, w, h)    auto_alloc(m, bitmap_ind16(w, h))
7978#define auto_bitmap_ind32_alloc(m, w, h)    auto_alloc(m, bitmap_ind32(w, h))
r250291r250292
191190   bool scheduled_event_pending() const { return m_exit_pending || m_hard_reset_pending; }
192191
193192   // fetch items by name
194   inline device_t *device(const char *tag) { return root_device().subdevice(tag); }
193   inline device_t *device(const char *tag) const { return root_device().subdevice(tag); }
195194   template<class _DeviceClass> inline _DeviceClass *device(const char *tag) { return downcast<_DeviceClass *>(device(tag)); }
196195
197196   // configuration helpers
trunk/src/emu/machine/generic.cpp
r250291r250292
99*********************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
1312#include "config.h"
1413
1514
trunk/src/emu/mame.cpp
r250291r250292
7373#include "emu.h"
7474#include "emuopts.h"
7575#include "osdepend.h"
76#include "config.h"
77#include "debugger.h"
78#include "render.h"
79#include "cheat.h"
80#include "ui/ui.h"
81#include "uiinput.h"
82#include "crsshair.h"
8376#include "validity.h"
84#include "debug/debugcon.h"
8577#include "luaengine.h"
8678#include <time.h>
8779
trunk/src/emu/memory.cpp
r250291r250292
335335
336336   // construction/destruction
337337   handler_entry_read(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
338      : handler_entry(width, endianness, rambaseptr)
338      : handler_entry(width, endianness, rambaseptr),
339        m_ioport(NULL)
339340   {
340341   }
341342
r250291r250292
397398
398399   // construction/destruction
399400   handler_entry_write(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
400      : handler_entry(width, endianness, rambaseptr)
401      : handler_entry(width, endianness, rambaseptr),
402        m_ioport(NULL)
401403   {
402404   }
403405
r250291r250292
482484
483485   // forward delegate callbacks configuration
484486   template<typename _delegate> void set_delegate(_delegate delegate) const {
485      for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
487      for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); ++i)
486488         (*i)->set_delegate(delegate, mask);
487489   }
488490
489491   // forward I/O port access configuration
490492   void set_ioport(ioport_port &ioport) const {
491      for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
493      for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); ++i)
492494         (*i)->set_ioport(ioport);
493495   }
494496
r250291r250292
659661      std::list<UINT32> entries;
660662      setup_range(bytestart, byteend, bytemask, bytemirror, mask, entries);
661663      std::list<handler_entry_read *> handlers;
662      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); i++)
664      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); ++i)
663665         handlers.push_back(&handler_read(*i));
664666      return handler_entry_proxy<handler_entry_read>(handlers, mask);
665667   }
r250291r250292
732734      std::list<UINT32> entries;
733735      setup_range(bytestart, byteend, bytemask, bytemirror, mask, entries);
734736      std::list<handler_entry_write *> handlers;
735      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); i++)
737      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); ++i)
736738         handlers.push_back(&handler_write(*i));
737739      return handler_entry_proxy<handler_entry_write>(handlers, mask);
738740   }
r250291r250292
810812      std::list<UINT32> entries;
811813      setup_range(bytestart, byteend, bytemask, bytemirror, mask, entries);
812814      std::list<handler_entry_setoffset *> handlers;
813      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); i++)
815      for (std::list<UINT32>::const_iterator i = entries.begin(); i != entries.end(); ++i)
814816         handlers.push_back(&handler_setoffset(*i));
815817      return handler_entry_proxy<handler_entry_setoffset>(handlers, mask);
816818   }
r250291r250292
15221524   // loop over devices and spaces within each device
15231525   memory_interface_iterator iter(machine().root_device());
15241526   for (device_memory_interface *memory = iter.first(); memory != NULL; memory = iter.next())
1525      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; spacenum++)
1527      for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
15261528      {
15271529         // if there is a configuration for this space, we need an address space
15281530         const address_space_config *spaceconfig = memory->space_config(spacenum);
r250291r250292
19091911   {
19101912      // find the entry before the last one we processed
19111913      const address_map_entry *entry;
1912      for (entry = map->m_entrylist.first(); entry->next() != last_entry; entry = entry->next()) ;
1914      for (entry = map->m_entrylist.first(); entry->next() != last_entry; entry = entry->next()) { };
19131915      last_entry = entry;
19141916
19151917      // map both read and write halves
r250291r250292
28672869      curentry.configure(bytestart, byteend, bytemask);
28682870
28692871      // Populate it wherever needed
2870      for (std::list<subrange>::const_iterator i = range_override.begin(); i != range_override.end(); i++)
2872      for (std::list<subrange>::const_iterator i = range_override.begin(); i != range_override.end(); ++i)
28712873         populate_range(i->start, i->end, entry);
28722874
28732875      // Add it in the "to be setup" list
r250291r250292
28802882   // Ranges in range_partial must duplicated then partially changed
28812883   if (!range_partial.empty())
28822884   {
2883      for (std::map<UINT16, std::list<subrange> >::const_iterator i = range_partial.begin(); i != range_partial.end(); i++)
2885      for (std::map<UINT16, std::list<subrange> >::const_iterator i = range_partial.begin(); i != range_partial.end(); ++i)
28842886      {
28852887         // Theorically, if the handler to change matches the
28862888         // characteristics of ours, we can directly change it.  In
r250291r250292
29102912         curentry.configure(bytestart, byteend, bytemask);
29112913
29122914         // Populate it wherever needed
2913         for (std::list<subrange>::const_iterator j = i->second.begin(); j != i->second.end(); j++)
2915         for (std::list<subrange>::const_iterator j = i->second.begin(); j != i->second.end(); ++j)
29142916            populate_range(j->start, j->end, entry);
29152917
29162918         // Add it in the "to be setup" list
r250291r250292
40794081      m_byteend(0),
40804082      m_bytemask(~0),
40814083      m_rambaseptr(rambaseptr),
4082      m_subunits(0)
4084      m_subunits(0),
4085       m_invsubmask(0)
40834086{
40844087}
40854088
trunk/src/emu/network.cpp
r250291r250292
99#include <ctype.h>
1010
1111#include "emu.h"
12#include "emuopts.h"
1312#include "network.h"
1413#include "config.h"
1514#include "xmlfile.h"
trunk/src/emu/profiler.cpp
r250291r250292
175175   // compute the total time for all bits, not including profiler or idle
176176   UINT64 computed = 0;
177177   profile_type curtype;
178   for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_PROFILER; curtype++)
178   for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_PROFILER; ++curtype)
179179      computed += m_data[curtype];
180180
181181   // save that result in normalize, and continue adding the rest
182182   UINT64 normalize = computed;
183   for ( ; curtype < PROFILER_TOTAL; curtype++)
183   for ( ; curtype < PROFILER_TOTAL; ++curtype)
184184      computed += m_data[curtype];
185185
186186   // this becomes the total; if we end up with 0 for anything, we were just started, so return empty
r250291r250292
193193
194194   // loop over all types and generate the string
195195   device_iterator iter(machine.root_device());
196   for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_TOTAL; curtype++)
196   for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_TOTAL; ++curtype)
197197   {
198198      // determine the accumulated time for this type
199199      computed = m_data[curtype];
trunk/src/emu/render.cpp
r250291r250292
12041204      throw emu_fatalerror("Mandatory artwork is missing");
12051205
12061206   // scan the current view for all screens
1207   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
1207   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
12081208
12091209      // iterate over items in the layer
12101210      for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next())
r250291r250292
12871287
12881288   // iterate over layers back-to-front, but only if we're running
12891289   if (m_manager.machine().phase() >= MACHINE_PHASE_RESET)
1290      for (item_layer layernum = ITEM_LAYER_FIRST; layernum < ITEM_LAYER_MAX; layernum++)
1290      for (item_layer layernum = ITEM_LAYER_FIRST; layernum < ITEM_LAYER_MAX; ++layernum)
12911291      {
12921292         int blendmode;
12931293         item_layer layer = get_layer_and_blendmode(*m_curview, layernum, blendmode);
r250291r250292
19161916   }
19171917
19181918   // loop through each layer
1919   for (item_layer layernum = ITEM_LAYER_FIRST; layernum < ITEM_LAYER_MAX; layernum++)
1919   for (item_layer layernum = ITEM_LAYER_FIRST; layernum < ITEM_LAYER_MAX; ++layernum)
19201920   {
19211921      int blendmode;
19221922      item_layer layer = get_layer_and_blendmode(*m_curview, layernum, blendmode);
r250291r250292
25002500
25012501float render_manager::ui_aspect(render_container *rc)
25022502{
2503   int orient = 0;
2504   float aspect = 1.0f;
2503   int orient;
2504   float aspect;
25052505
25062506   if (rc == m_ui_container || rc == NULL) {
25072507      // ui container, aggregated multi-screen target
trunk/src/emu/render.h
r250291r250292
304304   friend class simple_list<render_primitive>;
305305
306306public:
307   render_primitive():
308      type(),
309      flags(0),
310      width(0),
311      container(NULL),
312      m_next(NULL)
313   {}
314
307315   // render primitive types
308316   enum primitive_type
309317   {
r250291r250292
522530      friend class simple_list<item>;
523531
524532   public:
533      item() : m_next(NULL), m_type(0), m_flags(0), m_internal(0), m_width(0), m_texture(NULL) { }
534
525535      // getters
526536      item *next() const { return m_next; }
527537      UINT8 type() const { return m_type; }
trunk/src/emu/rendfont.cpp
r250291r250292
1010
1111#include "emu.h"
1212#include "rendfont.h"
13#include "rendutil.h"
1413#include "emuopts.h"
1514#include "coreutil.h"
1615
r250291r250292
511510            else if (strncmp(ptr, "BITMAP", 6) == 0)
512511            {
513512               // stash the raw pointer and scan for the end of the character
514               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) ;
513               for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { }
515514               break;
516515            }
517516         }
trunk/src/emu/rendlay.cpp
r250291r250292
5353#include "rendlay.h"
5454#include "rendutil.h"
5555#include "xmlfile.h"
56#include "png.h"
57#include "ui/ui.h"
5856
5957
6058
r250291r250292
632630      std::string symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15");
633631
634632      // split out position names from string and figure out our number of symbols
635      int location = -1;
633      int location;
636634      m_numstops = 0;
637635      location=symbollist.find(",");
638636      while (location!=-1)
r250291r250292
22182216   // loop over all layers
22192217   bool first = true;
22202218   bool scrfirst = true;
2221   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2219   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
22222220   {
22232221      // determine if this layer should be visible
22242222      switch (layer)
r250291r250292
22932291   float yscale = (target_bounds.y1 - target_bounds.y0) / (m_bounds.y1 - m_bounds.y0);
22942292
22952293   // normalize all the item bounds
2296   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2294   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
22972295      for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
22982296      {
22992297         curitem->m_bounds.x0 = target_bounds.x0 + (curitem->m_rawbounds.x0 - xoffs) * xscale;
r250291r250292
23102308
23112309void layout_view::resolve_tags()
23122310{
2313   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; layer++)
2311   for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
23142312   {
23152313      for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
23162314      {
trunk/src/emu/romload.cpp
r250291r250292
1010#include "emu.h"
1111#include "emuopts.h"
1212#include "drivenum.h"
13#include "png.h"
1413#include "chd.h"
15#include "config.h"
1614#include "softlist.h"
1715#include "ui/ui.h"
1816
trunk/src/emu/save.cpp
r250291r250292
194194save_error save_manager::check_file(running_machine &machine, emu_file &file, const char *gamename, void (CLIB_DECL *errormsg)(const char *fmt, ...))
195195{
196196   // if we want to validate the signature, compute it
197   UINT32 sig = 0;
197   UINT32 sig;
198198   sig = machine.save().signature();
199199
200200   // seek to the beginning and read the header
trunk/src/emu/schedule.cpp
r250291r250292
1111#include "emu.h"
1212#include "debugger.h"
1313
14// for now, make buggy GCC/Mingw STFU about I64FMT
15#if (defined(__MINGW32__) && (__GNUC__ >= 5))
16#pragma GCC diagnostic push
17#pragma GCC diagnostic ignored "-Wformat"
18#pragma GCC diagnostic ignored "-Wformat-extra-args"
19#endif
20
21
2214//**************************************************************************
2315//  DEBUGGING
2416//**************************************************************************
r250291r250292
498490               exec->m_totalcycles += ran;
499491
500492               // update the local time for this CPU
501               attotime delta(0, exec->m_attoseconds_per_cycle * ran);
502               assert(delta >= attotime::zero);
503               exec->m_localtime += delta;
493               attotime deltatime(0, exec->m_attoseconds_per_cycle * ran);
494               assert(deltatime >= attotime::zero);
495               exec->m_localtime += deltatime;
504496               LOG(("         %d ran, %d total, time = %s\n", ran, (INT32)exec->m_totalcycles, exec->m_localtime.as_string(PRECISION)));
505497
506498               // if the new local CPU time is less than our target, move the target up, but not before the base
r250291r250292
990982      timer->dump();
991983   machine().logerror("=============================================\n");
992984}
993
994#if (defined(__MINGW32__) && (__GNUC__ >= 5))
995#pragma GCC diagnostic pop
996#endif
trunk/src/emu/screen.cpp
r250291r250292
5858      m_container(NULL),
5959      m_width(100),
6060      m_height(100),
61      m_visarea(0, 99, 0, 99),
61      m_visarea(0, 99, 0, 99),
62       m_texformat(),
6263      m_curbitmap(0),
6364      m_curtexture(0),
6465      m_changed(true),
r250291r250292
634635   LOG_PARTIAL_UPDATES(("updating %d-%d\n", clip.min_y, clip.max_y));
635636   g_profiler.start(PROFILER_VIDEO);
636637
637   UINT32 flags = UPDATE_HAS_NOT_CHANGED;
638   UINT32 flags;
638639   screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
639640   switch (curbitmap.format())
640641   {
r250291r250292
751752
752753      LOG_PARTIAL_UPDATES(("doing scanline partial draw: Y %d X %d-%d\n", clip.max_y, clip.min_x, clip.max_x));
753754
754      UINT32 flags = UPDATE_HAS_NOT_CHANGED;
755      UINT32 flags;
755756      screen_bitmap &curbitmap = m_bitmap[m_curbitmap];
756757      switch (curbitmap.format())
757758      {
trunk/src/emu/softlist.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emu.h"
12#include "pool.h"
1312#include "emuopts.h"
1413#include "softlist.h"
1514#include "clifront.h"
r250291r250292
279278      m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM),
280279      m_filter(NULL),
281280      m_parsed(false),
282      m_file(mconfig.options().hash_path(), OPEN_FLAG_READ)
281      m_file(mconfig.options().hash_path(), OPEN_FLAG_READ),
282      m_description(NULL)
283283{
284284}
285285
trunk/src/emu/sound.cpp
r250291r250292
791791//-------------------------------------------------
792792
793793sound_stream::stream_output::stream_output()
794   : m_dependents(0),
795      m_gain(0x100)
794   : m_stream(NULL),
795     m_dependents(0),
796     m_gain(0x100)
796797{
797798}
798799
trunk/src/emu/speaker.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
13#include "osdepend.h"
14#include "config.h"
15#include "sound/wavwrite.h"
1612
1713
1814
trunk/src/emu/sprite.h
r250291r250292
2020
2121// class representing a single dirty region
2222class sparse_dirty_rect : public rectangle
23{
23{   
2424   friend class simple_list<sparse_dirty_rect>;
2525
2626public:
27   sparse_dirty_rect(): m_next(NULL) { }
2728   // getters
2829   const sparse_dirty_rect *next() const { return m_next; }
2930
trunk/src/emu/tilemap.cpp
r250291r250292
13551355               // advance in X
13561356               cx += incxx;
13571357               x++;
1358               dest++;
1358               ++dest;
13591359               pri++;
13601360            }
13611361         }
r250291r250292
13951395            cx += incxx;
13961396            cy += incxy;
13971397            x++;
1398            dest++;
1398            ++dest;
13991399            pri++;
14001400         }
14011401
r250291r250292
14361436            cx += incxx;
14371437            cy += incxy;
14381438            x++;
1439            dest++;
1439            ++dest;
14401440            pri++;
14411441         }
14421442
r250291r250292
15891589tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
15901590   : device_t(mconfig, TILEMAP, "Tilemap", tag, owner, clock, "tilemap", __FILE__),
15911591      m_gfxdecode(*this),
1592      m_standard_mapper(TILEMAP_STANDARD_COUNT),
1592      m_standard_mapper(TILEMAP_STANDARD_COUNT),
1593       m_bytes_per_entry(0),
15931594      m_tile_width(8),
15941595      m_tile_height(8),
15951596      m_num_columns(64),
trunk/src/emu/timer.cpp
r250291r250292
217217      case TIMER_TYPE_PERIODIC:
218218      {
219219         // convert the period into attotime
220         attotime period = attotime::never;
220         attotime period;
221221         if (m_period > attotime::zero)
222222         {
223223            period = m_period;
trunk/src/emu/ui/cheatopt.cpp
r250291r250292
1111#include "emu.h"
1212#include "cheat.h"
1313
14#include "uiinput.h"
1514#include "ui/ui.h"
1615#include "ui/menu.h"
1716#include "ui/cheatopt.h"
trunk/src/emu/ui/filemngr.cpp
r250291r250292
1414#include "emu.h"
1515#include "ui/ui.h"
1616#include "ui/menu.h"
17#include "ui/swlist.h"
1817#include "ui/filemngr.h"
1918#include "ui/filesel.h"
2019#include "ui/miscmenu.h"
r250291r250292
2928//  ctor
3029//-------------------------------------------------
3130
32ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container)
31ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container), selected_device(NULL)
3332{
3433   // This warning string is used when accessing from the force_file_manager call, i.e.
3534   // when the file manager is loaded top front in the case of mandatory image devices
r250291r250292
127126      if (subiter.count() > 0)
128127      {
129128         // if so, cycle through all its image interfaces
130         image_interface_iterator subiter(*dev);
131         for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next())
129         image_interface_iterator subiterator(*dev);
130         for (device_image_interface *scan = subiterator.first(); scan != NULL; scan = subiterator.next())
132131         {
133132            // if it is a children device, and not something further down the device tree, we want it in the menu!
134133            if (strcmp(scan->device().owner()->tag(), dev->tag()) == 0)
trunk/src/emu/ui/filesel.cpp
r250291r250292
1616#include "ui/ui.h"
1717#include "ui/menu.h"
1818#include "zippath.h"
19#include "ui/menu.h"
2019#include "ui/filesel.h"
21#include "ui/swlist.h"
2220#include "imagedev/floppy.h"
2321
2422
r250291r250292
10098
10199   // take off the borders
102100   x1 += UI_BOX_LR_BORDER;
103   x2 -= UI_BOX_LR_BORDER;
104101   y1 += UI_BOX_TB_BORDER;
105   y2 -= UI_BOX_TB_BORDER;
106102
107103   // draw the text within it
108104   container->manager().machine().ui().draw_text_full(container,text, x1, y1, text_width, JUSTIFY_LEFT, WRAP_WORD,
r250291r250292
222218ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, std::string &current_directory, std::string &current_file, bool *ok)
223219   : ui_menu(machine, container),
224220      m_current_directory(current_directory),
225      m_current_file(current_file)
221      m_current_file(current_file),
222      m_current_format(NULL)
226223{
227224   m_image = image;
228225   m_ok = ok;
r250291r250292
274271   item_append("New Image Name:", new_image_name, 0, ITEMREF_NEW_IMAGE_NAME);
275272
276273   // do we support multiple formats?
277   format = m_image->formatlist();
274   if (ENABLE_FORMATS) format = m_image->formatlist();
278275   if (ENABLE_FORMATS && (format != NULL))
279276   {
280277      item_append("Image Format:", m_current_format->description(), 0, ITEMREF_FORMAT);
r250291r250292
347344ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, std::string &current_directory, std::string &current_file, bool has_empty, bool has_softlist, bool has_create, int *result)
348345   : ui_menu(machine, container),
349346      m_current_directory(current_directory),
350      m_current_file(current_file)
347      m_current_file(current_file),
348      m_entrylist(NULL)
351349{
352350   m_image = image;
353351   m_has_empty = has_empty;
r250291r250292
538536void ui_menu_file_selector::populate()
539537{
540538   zippath_directory *directory = NULL;
541   file_error err = FILERR_NONE;
539   file_error err;
542540   const osd_directory_entry *dirent;
543541   const file_selector_entry *entry;
544542   const file_selector_entry *selected_entry = NULL;
trunk/src/emu/ui/imgcntrl.cpp
r250291r250292
2828//-------------------------------------------------
2929
3030ui_menu_control_device_image::ui_menu_control_device_image(running_machine &machine, render_container *container, device_image_interface *_image)
31   : ui_menu(machine, container)
31   : ui_menu(machine, container),
32     submenu_result(0),
33     create_ok(false),
34     create_confirmed(false)
3235{
3336   image = _image;
3437
trunk/src/emu/ui/inputmap.cpp
r250291r250292
109109
110110         /* loop over all sequence types */
111111         sortorder++;
112         for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
112         for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
113113         {
114114            /* build an entry for the standard sequence */
115115            input_item_data *item = (input_item_data *)m_pool_alloc(sizeof(*item));
r250291r250292
187187               sortorder = field->type() | 0xf000;
188188
189189            /* loop over all sequence types */
190            for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++)
190            for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
191191            {
192192               /* build an entry for the standard sequence */
193193               input_item_data *item = (input_item_data *)m_pool_alloc(sizeof(*item));
r250291r250292
224224/*-------------------------------------------------
225225    menu_input - display a menu for inputs
226226-------------------------------------------------*/
227ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container)
227ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container), last_sortorder(0), record_next(false)
228228{
229229   pollingitem = 0;
230230   pollingref = 0;
r250291r250292
264264   if (pollingitem != NULL)
265265   {
266266      input_item_data *item = pollingitem;
267      input_seq newseq;
268267
269268      /* if UI_CANCEL is pressed, abort */
270269      if (ui_input_pressed(machine(), IPT_UI_CANCEL))
r250291r250292
533532    switches menus
534533-------------------------------------------------*/
535534
536ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container)
535ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container), diplist(NULL), dipcount(0)
537536{
538537   type = _type;
539538}
trunk/src/emu/ui/mainmenu.cpp
r250291r250292
99*********************************************************************/
1010
1111#include "emu.h"
12#include "audit.h"
1312#include "crsshair.h"
14#include "osdnet.h"
1513#include "emuopts.h"
1614#include "rendutil.h"
1715#include "cheat.h"
18#include "uiinput.h"
19#include "ui/ui.h"
2016#include "ui/menu.h"
2117#include "ui/filemngr.h"
22#include "ui/filesel.h"
2318#include "ui/barcode.h"
2419#include "ui/cheatopt.h"
2520#include "ui/info.h"
r250291r250292
3328#include "ui/tapectrl.h"
3429#include "ui/videoopt.h"
3530#include "imagedev/cassette.h"
36#include "imagedev/bitbngr.h"
3731#include "machine/bcreader.h"
3832
3933
trunk/src/emu/ui/menu.cpp
r250291r250292
99*********************************************************************/
1010
1111#include "emu.h"
12#include "emuopts.h"
1312#include "rendutil.h"
1413#include "cheat.h"
1514#include "uiinput.h"
1615#include "ui/ui.h"
1716#include "ui/menu.h"
1817#include "ui/mainmenu.h"
19#include "ui/cheatopt.h"
2018
2119
2220
r250291r250292
411409
412410   float effective_width, effective_left;
413411   float visible_width, visible_main_menu_height;
414   float visible_extra_menu_height = 0;
412   float visible_extra_menu_height;
415413   float visible_top, visible_left;
416414   int selected_subitem_too_big = FALSE;
417415   int visible_lines;
r250291r250292
812810void ui_menu::handle_keys(UINT32 flags)
813811{
814812   int ignorepause = ui_menu::stack_has_special_main_menu();
815   int ignoreright = FALSE;
816   int ignoreleft = FALSE;
813   int ignoreright;
814   int ignoreleft;
817815   int code;
818816
819817   // bail if no items
trunk/src/emu/ui/menu.h
r250291r250292
180180   void draw_text_box();
181181   void handle_events();
182182   void handle_keys(UINT32 flags);
183   void clear_free_list();
184183
185184   inline bool exclusive_input_pressed(int key, int repeat);
186185   static void clear_free_list(running_machine &machine);
trunk/src/emu/ui/miscmenu.cpp
r250291r250292
1515#include "ui/ui.h"
1616#include "ui/menu.h"
1717#include "ui/miscmenu.h"
18#include "ui/filemngr.h"
1918
2019
2120/***************************************************************************
trunk/src/emu/ui/selgame.cpp
r250291r250292
99***************************************************************************/
1010
1111#include "emu.h"
12#include "osdnet.h"
1312#include "emuopts.h"
1413#include "ui/ui.h"
1514#include "ui/menu.h"
16#include "rendutil.h"
17#include "cheat.h"
1815#include "uiinput.h"
1916#include "ui/selgame.h"
2017#include "ui/inputmap.h"
2118#include "ui/miscmenu.h"
2219#include "audit.h"
23#include "crsshair.h"
2420#include <ctype.h>
2521
2622
r250291r250292
409405   x1 += UI_BOX_LR_BORDER;
410406   x2 -= UI_BOX_LR_BORDER;
411407   y1 += UI_BOX_TB_BORDER;
412   y2 -= UI_BOX_TB_BORDER;
413408
414409   // draw all lines
415410   for (line = 0; line < 4; line++)
trunk/src/emu/ui/swlist.cpp
r250291r250292
270270      // handle selections
271271      else if (event->iptkey == IPT_UI_SELECT)
272272      {
273         entry_info *entry = (entry_info *) event->itemref;
274         m_result = entry->short_name;
273         entry_info *info = (entry_info *) event->itemref;
274         m_result = info->short_name;
275275         ui_menu::stack_pop(machine());
276276      }
277277      else if (event->iptkey == IPT_SPECIAL)
trunk/src/emu/ui/ui.cpp
r250291r250292
1818#include "uiinput.h"
1919#include "ui/ui.h"
2020#include "ui/menu.h"
21#include "ui/cheatopt.h"
2221#include "ui/mainmenu.h"
23#include "ui/miscmenu.h"
2422#include "ui/filemngr.h"
2523#include "ui/sliders.h"
2624#include "ui/viewgfx.h"
r250291r250292
371369
372370      // clear the input memory
373371      machine().input().reset_polling();
374      while (machine().input().poll_switches() != INPUT_CODE_INVALID) ;
372      while (machine().input().poll_switches() != INPUT_CODE_INVALID) { }
375373
376374      // loop while we have a handler
377375      while (m_handler_callback != handler_ingame && !machine().scheduled_event_pending() && !ui_menu::stack_has_special_main_menu())
r250291r250292
16881686UINT32 ui_manager::handler_load_save(running_machine &machine, render_container *container, UINT32 state)
16891687{
16901688   char filename[20];
1691   input_code code;
16921689   char file = 0;
16931690
16941691   // if we're not in the middle of anything, skip
r250291r250292
17161713   }
17171714
17181715   // check for A-Z or 0-9
1719   for (input_item_id id = ITEM_ID_A; id <= ITEM_ID_Z; id++)
1716   for (input_item_id id = ITEM_ID_A; id <= ITEM_ID_Z; ++id)
17201717      if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
17211718         file = id - ITEM_ID_A + 'a';
17221719   if (file == 0)
1723      for (input_item_id id = ITEM_ID_0; id <= ITEM_ID_9; id++)
1720      for (input_item_id id = ITEM_ID_0; id <= ITEM_ID_9; ++id)
17241721         if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
17251722            file = id - ITEM_ID_0 + '0';
17261723   if (file == 0)
1727      for (input_item_id id = ITEM_ID_0_PAD; id <= ITEM_ID_9_PAD; id++)
1724      for (input_item_id id = ITEM_ID_0_PAD; id <= ITEM_ID_9_PAD; ++id)
17281725         if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id)))
17291726            file = id - ITEM_ID_0_PAD + '0';
17301727   if (file == 0)
trunk/src/emu/ui/videoopt.cpp
r250291r250292
1111#include "emu.h"
1212#include "rendutil.h"
1313
14#include "uiinput.h"
15#include "ui/ui.h"
1614#include "ui/menu.h"
1715#include "ui/videoopt.h"
1816
trunk/src/emu/ui/viewgfx.cpp
r250291r250292
1010
1111#include "emu.h"
1212#include "ui/ui.h"
13#include "ui/menu.h"
1413#include "uiinput.h"
1514#include "render.h"
1615#include "rendfont.h"
r250291r250292
193192            i < tempcount && state.gfxset.devcount < MAX_GFX_DECODERS;
194193            i++, interface = gfx_iter.next())
195194      {
196         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++);
195         for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++) { }
197196
198197         // count = index of first NULL
199198         if (count > 0)
r250291r250292
10071006   pixelscale = state.tilemap.zoom;
10081007   if (pixelscale == 0)
10091008   {
1010      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) ;
1011      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) ;
1009      for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) { }
1010      for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) { }
10121011      pixelscale = MIN(maxxscale, maxyscale);
10131012   }
10141013
trunk/src/emu/uiinput.cpp
r250291r250292
9797   ui_input_private *uidata = machine.ui_input_data;
9898
9999   /* update the state of all the UI keys */
100   for (ioport_type code = ioport_type(IPT_UI_FIRST + 1); code < IPT_UI_LAST; code++)
100   for (ioport_type code = ioport_type(IPT_UI_FIRST + 1); code < IPT_UI_LAST; ++code)
101101   {
102102      bool pressed = machine.ioport().type_pressed(code);
103103      if (!pressed || uidata->seqpressed[code] != SEQ_PRESSED_RESET)
r250291r250292
249249bool ui_input_pressed_repeat(running_machine &machine, int code, int speed)
250250{
251251   ui_input_private *uidata = machine.ui_input_data;
252   int pressed = FALSE;
252   int pressed;
253253
254254g_profiler.start(PROFILER_INPUT);
255255
trunk/src/emu/validity.cpp
r250291r250292
719719   if (field.type() == IPT_POSITIONAL || field.type() == IPT_POSITIONAL_V)
720720   {
721721      int shift;
722      for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) ;
722      for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) { }
723723
724724      // convert the positional max value to be in the bitmask for testing
725      INT32 analog_max = field.maxval();
726      analog_max = (analog_max - 1) << shift;
725      //INT32 analog_max = field.maxval();
726      //analog_max = (analog_max - 1) << shift;
727727
728728      // positional port size must fit in bits used
729729      if ((field.mask() >> shift) + 1 < field.maxval())
trunk/src/emu/video.cpp
r250291r250292
11421142         // find length of the device name
11431143         int end1 = snapstr.find("/", pos + 3);
11441144         int end2 = snapstr.find("%", pos + 3);
1145         int end = -1;
1145         int end;
11461146
11471147         if ((end1 != -1) && (end2 != -1))
11481148            end = MIN(end1, end2);
trunk/src/emu/video/resnet.cpp
r250291r250292
346346   max = minval;
347347   for( i = 0; i < networks_no; i++ )
348348   {
349      double val = 0.0;
349      double val;
350350      double max_tmp = minval;
351351      double min_tmp = maxval;
352352
trunk/src/emu/video/rgbgen.h
r250291r250292
1919class rgbaint_t
2020{
2121public:
22   inline rgbaint_t() { }
22   inline rgbaint_t(): m_a(0), m_r(0), m_g(0), m_b(0) { }
2323   inline rgbaint_t(UINT32 rgba) { set(rgba); }
2424   inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
2525   inline rgbaint_t(rgb_t& rgba) { set(rgba); }
trunk/src/emu/video/rgbvmx.h
r250291r250292
2828   typedef __vector unsigned int   VECU32;
2929
3030public:
31   inline rgbaint_t() { }
31   inline rgbaint_t(): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { }
3232   inline rgbaint_t(UINT32 rgba) { set(rgba); }
3333   inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); }
3434   inline rgbaint_t(rgb_t& rgb) { set(rgb); }
35   inline rgbaint_t(VECS32 rgba) { m_value = rgba; }
35   inline rgbaint_t(VECS32 rgba): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { m_value = rgba; }
3636
3737   inline void set(rgbaint_t& other) { m_value = other.m_value; }
3838
trunk/src/emu/video/vector.cpp
r250291r250292
130130
131131vector_device::vector_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
132132   : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
133      device_video_interface(mconfig, *this)
133      device_video_interface(mconfig, *this),
134      m_vector_list(NULL)
134135{
135136}
136137
137138vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
138139   : device_t(mconfig, VECTOR, "VECTOR", tag, owner, clock, "vector_device", __FILE__),
139      device_video_interface(mconfig, *this)
140     device_video_interface(mconfig, *this),
141     m_vector_list(NULL)
140142{
141143}
142144
r250291r250292
299301   float xratio = xscale / yscale;
300302   float yratio = yscale / xscale;
301303   xratio = (xratio < 1.0f) ? xratio : 1.0f;
302   xratio = (yratio < 1.0f) ? yratio : 1.0f;
304   yratio = (yratio < 1.0f) ? yratio : 1.0f;
303305
304306   point *curpoint;
305307   render_bounds clip;
trunk/src/lib/netlist/nl_parser.cpp
r250291r250292
99#include "nl_factory.h"
1010#include "devices/nld_truthtable.h"
1111
12// for now, make buggy GCC/Mingw STFU about I64FMT
13#if (defined(__MINGW32__) && (__GNUC__ >= 5))
14#pragma GCC diagnostic push
15#pragma GCC diagnostic ignored "-Wformat"
16#pragma GCC diagnostic ignored "-Wformat-extra-args"
17#endif
18
1912namespace netlist
2013{
2114// ----------------------------------------------------------------------------------------
r250291r250292
463456#endif
464457}
465458}
466
467#if (defined(__MINGW32__) && (__GNUC__ >= 5))
468#pragma GCC diagnostic pop
469#endif
trunk/src/lib/netlist/plib/pconfig.h
r250291r250292
55 *
66 */
77
8// for now, make buggy GCC/Mingw STFU about I64FMT
9#if (defined(__MINGW32__) && (__GNUC__ >= 5))
10#pragma GCC diagnostic push
11#pragma GCC diagnostic ignored "-Wformat"
12#pragma GCC diagnostic ignored "-Wformat-extra-args"
13#endif
14
158#ifndef PCONFIG_H_
169#define PCONFIG_H_
1710
r250291r250292
206199#endif
207200
208201#endif /* PCONFIG_H_ */
209
210#if (defined(__MINGW32__) && (__GNUC__ >= 5))
211#pragma GCC diagnostic pop
212#endif
trunk/src/lib/netlist/plib/pparser.cpp
r250291r250292
99
1010#include "pparser.h"
1111
12// for now, make buggy GCC/Mingw STFU about I64FMT
13#if (defined(__MINGW32__) && (__GNUC__ >= 5))
14#pragma GCC diagnostic push
15#pragma GCC diagnostic ignored "-Wformat"
16#pragma GCC diagnostic ignored "-Wformat-extra-args"
17#endif
18
1912// ----------------------------------------------------------------------------------------
2013// A simple tokenizer
2114// ----------------------------------------------------------------------------------------
r250291r250292
475468   }
476469   return ostrm;
477470}
478
479
480#if (defined(__MINGW32__) && (__GNUC__ >= 5))
481#pragma GCC diagnostic pop
482#endif
trunk/src/lib/netlist/solver/nld_solver.cpp
r250291r250292
99 * the vectorizations fast-math enables pretty expensive
1010 */
1111
12// for now, make buggy GCC/Mingw STFU about I64FMT
13#if (defined(__MINGW32__) && (__GNUC__ >= 5))
14#pragma GCC diagnostic push
15#pragma GCC diagnostic ignored "-Wformat"
16#pragma GCC diagnostic ignored "-Wformat-extra-args"
17#endif
18
19
2012#if 0
2113#pragma GCC optimize "-ffast-math"
2214//#pragma GCC optimize "-ftree-parallelize-loops=4"
r250291r250292
649641}
650642
651643NETLIB_NAMESPACE_DEVICES_END()
652
653#if (defined(__MINGW32__) && (__GNUC__ >= 5))
654#pragma GCC diagnostic pop
655#endif
trunk/src/lib/netlist/tools/nl_convert.cpp
r250291r250292
1111#include "nl_convert.h"
1212
1313
14// for now, make buggy GCC/Mingw STFU about I64FMT
15#if (defined(__MINGW32__) && (__GNUC__ >= 5))
16#pragma GCC diagnostic push
17#pragma GCC diagnostic ignored "-Wformat"
18#pragma GCC diagnostic ignored "-Wformat-extra-args"
19#endif
20
2114template<typename Class>
2215static plist_t<int> bubble(const pnamedlist_t<Class *> &sl)
2316{
r250291r250292
453446   }
454447
455448}
456
457#if (defined(__MINGW32__) && (__GNUC__ >= 5))
458#pragma GCC diagnostic pop
459#endif
trunk/src/mame/arcade.lst
r250291r250292
81388138wwfwfestb       // bootleg
81398139wwfwfestj       // TA-0031 (c) 1991 (Japan)
81408140wwfwfestk       // TA-0031 (c) 1991 (Korea)
8141shadfrce        // TA-0032 (c) 1993 (US)
8141shadfrce        // TA-0032 (c) 1993 (World)
8142shadfrceu       // TA-0032 (c) 1993 (US)
81428143shadfrcej       // TA-0032 (c) 1993 (Japan)
8143shadfrcejv2     // TA-0032 (c) 1993 (Japan)
81448144
81458145// Stern "Berzerk hardware" games
81468146berzerk         // (c) 1980
r250291r250292
90069006// 68020 board
90079007samuraia        // (c) 1993 (World)
90089008sngkace         // (c) 1993 (Japan)
9009sngkacea        // (c) 1993 (Japan)
90099010gunbird         // (c) 1994
90109011gunbirdk        // (c) 1994
90119012gunbirdj        // (c) 1994
r250291r250292
1123111232potnpkre        // Bootleg
1123211233potnpkrf        // Bootleg
1123311234potnpkrg        // Bootleg
11234goodluck        // Unknown
11235superdbl        // 198? Karateco
11235potnpkrh        // Bootleg
1123611236ngold           // 198? Unknown
1123711237ngolda          // 198? Unknown
1123811238ngoldb          // 198? Unknown
11239goodluck        // Unknown
11240bsuerte         // 1990, Unknown
11241bsuertea        // 1991, Unknown
11242bsuerteb        // 1991, Unknown
11243bsuertec        // 1991, Unknown
11244bsuerted        // 1991, Unknown
11245bsuertee        // 1991, Unknown
11246bsuertef        // 1991, Unknown
11247bsuerteg        // 1991, Unknown
11248bsuerteh        // 1991, Unknown
11249bsuertei        // 1991, Unknown
11250bsuertej        // 1991, Unknown
11251bsuertek        // 1991, Unknown
11252bsuertel        // 1991, Unknown
11253bsuertem        // 1991, Unknown
11254bsuerten        // 1991, Unknown
11255bsuerteo        // 1991, Unknown
11256bsuertep        // 1991, Unknown
11257bsuerteq        // 1991, Unknown
11258bsuerter        // 1991, Unknown
11259bsuertes        // 1991, Unknown
11260bsuertet        // 1991, Unknown
11261bsuerteu        // 1991, Unknown
11262falcnwld        // 1991, TVG
11263falcnwlda       // (c) 1990, Video Klein
11264falcnwldb       // (c) 1990, Video Klein
11265falcnwldc       // (c) 1983, Falcon
1123911266witchcrd        // (c) 1991, Video Klein
1124011267witchcda        // 1991, Unknown
1124111268witchcdb        // 1991, Unknown
r250291r250292
1127911306wupndownd       // (c) 1998, Video Klein
1128011307wstrike         // (c) 1992, Video Klein
1128111308wstrikea        // (c) 1992, Video Klein
11282wtchjack        // (c) 1992-1996, Video Klein
11283wtchjacka       // (c) 1992-1996, Video Klein
11284wtchjackb       // (c) 1992-1996, Video Klein
11285wtchjackc       // (c) 1992-1996, Video Klein
11286wtchjackd       // (c) 1992-1996, Video Klein
11287wtchjacke       // (c) 1992-1996, Video Klein
11288wtchjackf       // (c) 1992-1996, Video Klein
11289wtchjackg       // (c) 1992-1996, Video Klein
11290wtchjackh       // (c) 1992-1996, Video Klein
11291wtchjacki       // (c) 1992-1996, Video Klein
11292wtchjackj       // (c) 1992-1996, Video Klein
11293falcnwld        // 1991, TVG
11294falcnwlda       // (c) 1990, Video Klein
11295falcnwldb       // (c) 1990, Video Klein
11296falcnwldc       // (c) 1983, Falcon
11297bsuerte         // 1990, Unknown
11298bsuertea        // 1991, Unknown
11299bsuerteb        // 1991, Unknown
11300bsuertec        // 1991, Unknown
11301bsuerted        // 1991, Unknown
11302bsuertee        // 1991, Unknown
11303bsuertef        // 1991, Unknown
11304bsuerteg        // 1991, Unknown
11305bsuerteh        // 1991, Unknown
11306bsuertei        // 1991, Unknown
11307bsuertej        // 1991, Unknown
11308bsuertek        // 1991, Unknown
11309bsuertel        // 1991, Unknown
11310bsuertem        // 1991, Unknown
11311bsuerten        // 1991, Unknown
11312bsuerteo        // 1991, Unknown
11313bsuertep        // 1991, Unknown
11314bsuerteq        // 1991, Unknown
11315bsuerter        // 1991, Unknown
11316bsuertes        // 1991, Unknown
11317bsuertet        // 1991, Unknown
11318bsuerteu        // 1991, Unknown
11309wtchjack        // (c) 1996, Video Klein
11310wtchjacka       // (c) 1996, Video Klein
11311wtchjackb       // (c) 1996, Video Klein
11312wtchjackc       // (c) 1996, Video Klein
11313wtchjackd       // (c) 1996, Video Klein
11314wtchjacke       // (c) 1995, Video Klein
11315wtchjackf       // (c) 1995, Video Klein
11316wtchjackg       // (c) 1995, Video Klein
11317wtchjackh       // (c) 1995, Video Klein
11318wtchjacki       // (c) 1995, Video Klein
11319wtchjackj       // (c) 1994, Video Klein
1131911320pmpoker         // (c) 1981 PlayMan
1132011321royale          // Unknown
1132111322royalea         // Unknown
r250291r250292
1133111332genie           // (c) 198? Video Fun Games Ltd.
1133211333geniea          // 198?, Unknown
1133311334silverga        // 1983, Unknown
11335superdbl        // 198? Karateco
1133411336pokerdub        // 198?, Unknown
1133511337pokerduc        // 198?, Unknown
1133611338bchancep        // 198?, Unknown
r250291r250292
1331213314deathrac      // (c) 1976 Exidy
1331313315biplane4      // (c) 1976 Fun Games
1331413316take5         // (c) 1975 Fun Games
13317//knightar    // (c) 1976 PSE
13318bazooka       // (c) 1976 PSE
13319bazookabr     // (c) 1977 Taito do Brasil
1331513320dpatrol       // (c) 1977 PSE
13316//knightar    // (c) 1976 PSE
1331713321//gametree    // (c) 1978 PSE
1331813322vollyrmt      // (c) 1973 Ramtek
1331913323hockyrmt      // (c) 1973 Ramtek
r250291r250292
1332513329monacogp      // (c) 1980 Sega
1332613330monacogpa     // (c) 1980 Sega
1332713331gunman        // (c) 1977 Taito
13328bazooka       // (c) 1977 PSE
13329bazookabr     // (c) 1977 Taito do Brasil
1333013332missilex      // (c) 1977 Taito
1333113333ttblock       // (c) 1977 Taito
1333213334zzblock       // (c) 1979 Taito
trunk/src/mame/audio/irem.cpp
r250291r250292
409409#define USE_FRONTIERS 1
410410#define USE_FIXED_STV 1
411411
412#include "nl_kidniki.cpp"
412#include "nl_kidniki.inc"
413413
414414NETLIST_START(kidniki_interface)
415415
trunk/src/mame/audio/nl_kidniki.cpp
r250291r250292
1
2#include "netlist/devices/net_lib.h"
3
4#ifndef USE_FRONTIERS
5#define USE_FRONTIERS 0
6#endif
7
8#ifndef USE_FIXED_STV
9#define USE_FIXED_STV 0
10#endif
11
12/* ----------------------------------------------------------------------------
13 *  Library section header START
14 * ---------------------------------------------------------------------------*/
15
16#ifndef __PLIB_PREPROCESSOR__
17
18#endif
19
20/* ----------------------------------------------------------------------------
21 *  Library section header END
22 * ---------------------------------------------------------------------------*/
23
24/* ----------------------------------------------------------------------------
25 *  Kidniki schematics
26 * ---------------------------------------------------------------------------*/
27
28NETLIST_START(kidniki_schematics)
29   //  EESCHEMA NETLIST VERSION 1.1 (SPICE FORMAT) CREATION DATE: SAT 06 JUN 2015 01:06:26 PM CEST
30   //  TO EXCLUDE A COMPONENT FROM THE SPICE NETLIST ADD [SPICE_NETLIST_ENABLED] USER FIELD SET TO: N
31   //  TO REORDER THE COMPONENT SPICE NODE SEQUENCE ADD [SPICE_NODE_SEQUENCE] USER FIELD AND DEFINE SEQUENCE: 2,1,0
32   // SHEET NAME:/
33   // IGNORED O_AUDIO0: O_AUDIO0  49 0
34   // .END
35
36   /*
37    * Workaround: The simplified opamp model does not correctly
38    * model the internals of the inputs.
39    */
40
41   ANALOG_INPUT(VWORKAROUND, 2.061)
42   RES(RWORKAROUND, RES_K(27))
43   NET_C(VWORKAROUND.Q, RWORKAROUND.1)
44   NET_C(XU1.6, RWORKAROUND.2)
45
46   CAP(C200, CAP_N(100))
47   CAP(C28, CAP_U(1))
48   CAP(C31, CAP_N(470))
49   CAP(C32, CAP_N(3.3))
50   CAP(C33, CAP_U(1))
51   CAP(C34, CAP_N(1))
52   CAP(C35, CAP_N(1))
53   CAP(C36, CAP_N(6.5))
54   CAP(C37, CAP_N(22))
55   CAP(C38, CAP_N(1))
56   CAP(C39, CAP_N(1))
57   CAP(C40, CAP_P(12))
58   CAP(C41, CAP_U(1))
59   CAP(C42, CAP_N(1.2))
60   CAP(C43, CAP_N(1.2))
61   CAP(C44, CAP_U(1))
62   CAP(C45, CAP_N(22))
63   CAP(C47, CAP_U(1))
64   CAP(C48, CAP_N(470))
65   CAP(C49, CAP_N(3.3))
66   CAP(C50, CAP_N(22))
67   CAP(C51, CAP_N(22))
68   CAP(C52, CAP_N(27))
69   CAP(C53, CAP_N(27))
70   CAP(C56, CAP_N(6.8))
71   CAP(C57, CAP_N(6.8))
72   CAP(C59, CAP_N(6.8))
73   CAP(C60, CAP_N(22))
74   CAP(C61, CAP_N(22))
75   CAP(C62, CAP_N(6.8))
76   CAP(C63, CAP_N(1))
77   CAP(C64, CAP_N(68))
78   CAP(C65, CAP_N(68))
79   CAP(C66, CAP_N(68))
80   CAP(C67, CAP_N(15))
81   CAP(C68, CAP_N(15))
82   CAP(C69, CAP_N(10))
83   CAP(C70, CAP_N(22))
84   CAP(C72, CAP_N(12))
85   CAP(C73, CAP_N(10))
86   CAP(C76, CAP_N(68))
87   CAP(C77, CAP_N(12))
88
89   DIODE(D3, "1S1588")
90   DIODE(D4, "1S1588")
91   DIODE(D5, "1S1588")
92
93   POT(RV1, RES_K(50))
94
95   QBJT_EB(Q10, "2SC945")
96   QBJT_EB(Q3, "2SC945")
97   QBJT_EB(Q4, "2SC945")
98   QBJT_EB(Q5, "2SC945")
99   QBJT_EB(Q6, "2SC945")
100   QBJT_EB(Q7, "2SC945")
101   QBJT_EB(Q9, "2SC945")
102
103   LM324_DIP(XU1)
104   LM358_DIP(XU2)
105
106   MC14584B_DIP(XU3)
107
108   RES(R100, RES_K(560))
109   RES(R101, RES_K(150))
110   RES(R102, RES_K(150))
111   RES(R103, RES_K(470))
112   RES(R104, RES_K(22))
113   RES(R105, RES_K(470))
114   RES(R106, RES_K(150))
115   RES(R107, RES_K(150))
116   RES(R108, RES_K(560))
117   RES(R119, RES_K(22))
118   RES(R200, RES_K(100))
119   RES(R201, RES_K(100))
120   RES(R27, RES_K(6.8))
121   RES(R28, RES_K(150))
122   RES(R29, RES_K(2.7))
123   RES(R30, RES_K(10))
124   RES(R31, RES_K(5.1))
125   //RES(R32, RES_K(1))
126   RES(R32, RES_K(4.7))
127   RES(R34, RES_K(100))
128   RES(R35, RES_K(100))
129   RES(R36, RES_K(100))
130   RES(R37, RES_K(47))
131   RES(R38, 820)
132   RES(R39, RES_K(22))
133   RES(R40, RES_K(10))
134   RES(R41, RES_K(10))
135   RES(R42, RES_K(150))
136   RES(R43, 470)
137   RES(R44, RES_K(100))
138   RES(R45, RES_K(1))
139   RES(R46, RES_K(12))
140   RES(R48, 470)
141   RES(R48_2, RES_K(100))
142   RES(R49, RES_K(10))
143   RES(R50, RES_K(2.2))
144   RES(R51, RES_K(150))
145   RES(R52, RES_K(100))
146   RES(R53, RES_K(100))
147   RES(R54, RES_K(680))
148   RES(R55, RES_K(510))
149   RES(R57, 560)
150   RES(R58, RES_K(39))
151   RES(R59, 560)
152   RES(R60, RES_K(39))
153   RES(R61, RES_K(100))
154   RES(R62, RES_K(100))
155   RES(R63, RES_K(1))
156   RES(R65, RES_K(1))
157   RES(R65_1, RES_K(27))
158   RES(R66, RES_M(1))
159   RES(R67, RES_K(100))
160   RES(R68, RES_K(100))
161   RES(R69, RES_K(1))
162   RES(R70, RES_K(10))
163   RES(R71, RES_K(100))
164   RES(R72, RES_K(100))
165   RES(R73, RES_K(10))
166   RES(R74, RES_K(10))
167   RES(R75, RES_K(10))
168   RES(R76, RES_K(10))
169   RES(R81, 220)
170   RES(R82, RES_M(2.2))
171   RES(R83, RES_K(12))
172   RES(R84, RES_K(1))
173   RES(R85, RES_M(2.2))
174   RES(R86, RES_K(10))
175   RES(R87, RES_K(68))
176   RES(R89, RES_K(22))
177   RES(R90, RES_K(390))
178   RES(R91, RES_K(100))
179   RES(R92, RES_K(22))
180   RES(R93, RES_K(1))
181   RES(R94, RES_K(22))
182   RES(R95, RES_K(330))
183   RES(R96, RES_K(150))
184   RES(R97, RES_K(150))
185   RES(R98, RES_K(650))
186
187   #if USE_FIXED_STV
188   ANALOG_INPUT(STV, 2)
189   #else
190   RES(R78, RES_K(3.3))
191   RES(R77, RES_K(2.2))
192   CAP(C58, CAP_U(47))
193   #endif
194
195   NET_C(R95.1, XU3.2, R96.2)
196   NET_C(R95.2, XU3.1, C69.1)
197   NET_C(XU3.3, R103.2, C73.1)
198   NET_C(XU3.4, R103.1, R102.2)
199   NET_C(XU3.5, R105.2, C72.1)
200   NET_C(XU3.6, R105.1, R106.2)
201   #if USE_FIXED_STV
202   //FIXME: We should have a NET_C_REMOVE
203   NET_C(XU3.7, C69.2, C73.2, C72.2, C77.2, C67.2, C68.2, R65.2, R38.2, XU1.11, R54.2, Q4.E, R63.2, C47.2, R72.2, R67.2, R71.2, R68.2, C48.2, R46.2, C28.1, C32.1, R43.2, XU2.4, C56.1, C52.1,/* R77.2, C58.1, */ R48.2, R93.2, R94.2, R119.2, R104.2, R53.2, R34.2, R81.2, R92.2, R89.2, C33.1, R37.2, R36.1, R91.1, I_V0.Q, RV1.3)
204   #else
205   NET_C(XU3.7, C69.2, C73.2, C72.2, C77.2, C67.2, C68.2, R65.2, R38.2, XU1.11, R54.2, Q4.E, R63.2, C47.2, R72.2, R67.2, R71.2, R68.2, C48.2, R46.2, C28.1, C32.1, R43.2, XU2.4, C56.1, C52.1, R77.2, C58.1, R48.2, R93.2, R94.2, R119.2, R104.2, R53.2, R34.2, R81.2, R92.2, R89.2, C33.1, R37.2, R36.1, R91.1, I_V0.Q, RV1.3)
206   #endif
207   NET_C(XU3.8, R108.1, R107.2)
208   NET_C(XU3.9, R108.2, C77.1)
209   NET_C(XU3.10, R100.1, R101.2)
210   NET_C(XU3.11, R100.2, C67.1)
211   NET_C(XU3.12, R98.1, R97.2)
212   NET_C(XU3.13, R98.2, C68.1)
213   #if USE_FIXED_STV
214   NET_C(XU3.14, XU1.4, R66.1, R70.1, Q6.C, Q5.C, XU2.8, /* R78.1, */ R86.1, R83.1, Q3.C, I_V5.Q)
215   #else
216   NET_C(XU3.14, XU1.4, R66.1, R70.1, Q6.C, Q5.C, XU2.8, R78.1, R86.1, R83.1, Q3.C, I_V5.Q)
217   #endif
218   NET_C(R96.1, R102.1, R106.1, R107.1, R101.1, R97.1, R65.1, C63.2)
219   NET_C(C63.1, R65_1.2)
220   NET_C(R65_1.1, R44.2, C38.2, C40.2, XU1.6)
221   #if USE_FIXED_STV
222   NET_C(R30.1, R41.1, R40.1, STV, R76.2, /* R78.2, R77.1, C58.2*/ STV)
223   #else
224   NET_C(R30.1, R41.1, R40.1, R76.2, R78.2, R77.1, C58.2)
225   #endif
226   NET_C(R30.2, XU1.5)
227   NET_C(R44.1, C39.1, C40.1, R48_2.2)
228   NET_C(C38.1, C39.2, R38.1)
229   NET_C(XU1.1, XU1.2, R39.1, R32.2)
230   NET_C(XU1.3, C34.1, R41.2)
231   NET_C(XU1.7, R45.2)
232   NET_C(XU1.8, XU1.9, R31.2, C36.2)
233   NET_C(XU1.10, R42.1, C32.2)
234   NET_C(XU1.12, C49.1, C31.1, R40.2, C61.1, C60.1)
235   NET_C(XU1.13, R27.1, R28.2)
236   NET_C(XU1.14, R28.1, R29.2, I_SINH0)
237   NET_C(R48_2.1, C45.2, R54.1)
238   NET_C(C45.1, R55.1, Q7.B)
239   NET_C(R55.2, R90.2, C33.2, R37.1, Q3.E)
240   NET_C(R45.1, C44.2)
241   NET_C(C44.1, R66.2, Q4.B)
242   NET_C(Q4.C, C42.1, C43.1, R46.1, C35.2, D4.K, D5.K)
243   NET_C(R70.2, R69.2, Q7.C)
244   NET_C(R63.1, Q7.E)
245   NET_C(R69.1, C49.2)
246   NET_C(C42.2, R58.1, D5.A)
247   NET_C(R58.2, R57.1, C47.1)
248   NET_C(R57.2, Q6.E)
249   NET_C(Q6.B, R61.1)
250   NET_C(C50.1, R67.1, R61.2)
251   NET_C(C50.2, R72.1, I_OH0.Q)
252   NET_C(C51.1, R68.1, R62.2)
253   NET_C(C51.2, R71.1, I_CH0.Q)
254   NET_C(R62.1, Q5.B)
255   NET_C(Q5.E, R59.2)
256   NET_C(R60.1, C43.2, D4.A)
257   NET_C(R60.2, R59.1, C48.1)
258   NET_C(C35.1, C34.2, R39.2)
259   NET_C(R32.1, C31.2)
260   NET_C(R27.2, C28.2)
261   NET_C(R29.1, R31.1, R50.2, R49.1, RV1.1)
262   NET_C(R42.2, R51.1, C36.1)
263   NET_C(R51.2, C41.1)
264   NET_C(C41.2, R43.1, I_SOUNDIC0)
265   NET_C(XU2.1, XU2.2, R73.1)
266   NET_C(XU2.3, R76.1, C200.2)
267   NET_C(XU2.5, C56.2, R75.1)
268   NET_C(XU2.6, XU2.7, R50.1, C53.2)
269   NET_C(R75.2, R74.1, C53.1)
270   NET_C(R74.2, C52.2, R73.2)
271   NET_C(R49.2, R48.1, I_SOUND0)
272   NET_C(Q9.E, R81.1)
273   NET_C(Q9.C, R84.2, R83.2, R82.1, C59.1)
274   NET_C(Q9.B, R82.2, C62.1)
275   NET_C(Q10.E, R93.1)
276   NET_C(Q10.C, R87.2, R86.2, R85.1, C76.1)
277   NET_C(Q10.B, R85.2, C64.1)
278   NET_C(R84.1, C61.2)
279   NET_C(C60.2, R87.1)
280   NET_C(C64.2, C65.1, R94.1, D3.K)
281   NET_C(C65.2, C66.1, R119.1)
282   NET_C(C66.2, C76.2, R104.1)
283   NET_C(R53.1, R52.2, C37.1)
284   NET_C(R34.1, C37.2, I_BD0.Q)
285   NET_C(R52.1, D3.A)
286   NET_C(R92.1, C62.2, C57.1)
287   NET_C(R89.1, C57.2, C59.2, R90.1)
288   NET_C(Q3.B, R35.1)
289   NET_C(R35.2, R36.2, C70.1)
290   NET_C(R91.2, C70.2, I_SD0.Q)
291   NET_C(I_MSM3K0.Q, R200.2)
292   NET_C(I_MSM2K0.Q, R201.2)
293   NET_C(R200.1, R201.1, C200.1)
294
295   /* Amplifier stage */
296
297   CAP(C26, CAP_U(1))
298   RES(R25, 560)
299   RES(R26, RES_K(47))
300   CAP(C29, CAP_U(0.01))
301
302   NET_C(RV1.2, C26.1)
303   NET_C(C26.2, R25.1)
304   NET_C(R25.2, R26.1, C29.1)
305   NET_C(R26.2, C29.2, GND)
306
307NETLIST_END()
trunk/src/mame/audio/nl_kidniki.inc
r0r250292
1
2#include "netlist/devices/net_lib.h"
3
4#ifndef USE_FRONTIERS
5#define USE_FRONTIERS 0
6#endif
7
8#ifndef USE_FIXED_STV
9#define USE_FIXED_STV 0
10#endif
11
12/* ----------------------------------------------------------------------------
13 *  Library section header START
14 * ---------------------------------------------------------------------------*/
15
16#ifndef __PLIB_PREPROCESSOR__
17
18#endif
19
20/* ----------------------------------------------------------------------------
21 *  Library section header END
22 * ---------------------------------------------------------------------------*/
23
24/* ----------------------------------------------------------------------------
25 *  Kidniki schematics
26 * ---------------------------------------------------------------------------*/
27
28NETLIST_START(kidniki_schematics)
29   //  EESCHEMA NETLIST VERSION 1.1 (SPICE FORMAT) CREATION DATE: SAT 06 JUN 2015 01:06:26 PM CEST
30   //  TO EXCLUDE A COMPONENT FROM THE SPICE NETLIST ADD [SPICE_NETLIST_ENABLED] USER FIELD SET TO: N
31   //  TO REORDER THE COMPONENT SPICE NODE SEQUENCE ADD [SPICE_NODE_SEQUENCE] USER FIELD AND DEFINE SEQUENCE: 2,1,0
32   // SHEET NAME:/
33   // IGNORED O_AUDIO0: O_AUDIO0  49 0
34   // .END
35
36   /*
37    * Workaround: The simplified opamp model does not correctly
38    * model the internals of the inputs.
39    */
40
41   ANALOG_INPUT(VWORKAROUND, 2.061)
42   RES(RWORKAROUND, RES_K(27))
43   NET_C(VWORKAROUND.Q, RWORKAROUND.1)
44   NET_C(XU1.6, RWORKAROUND.2)
45
46   CAP(C200, CAP_N(100))
47   CAP(C28, CAP_U(1))
48   CAP(C31, CAP_N(470))
49   CAP(C32, CAP_N(3.3))
50   CAP(C33, CAP_U(1))
51   CAP(C34, CAP_N(1))
52   CAP(C35, CAP_N(1))
53   CAP(C36, CAP_N(6.5))
54   CAP(C37, CAP_N(22))
55   CAP(C38, CAP_N(1))
56   CAP(C39, CAP_N(1))
57   CAP(C40, CAP_P(12))
58   CAP(C41, CAP_U(1))
59   CAP(C42, CAP_N(1.2))
60   CAP(C43, CAP_N(1.2))
61   CAP(C44, CAP_U(1))
62   CAP(C45, CAP_N(22))
63   CAP(C47, CAP_U(1))
64   CAP(C48, CAP_N(470))
65   CAP(C49, CAP_N(3.3))
66   CAP(C50, CAP_N(22))
67   CAP(C51, CAP_N(22))
68   CAP(C52, CAP_N(27))
69   CAP(C53, CAP_N(27))
70   CAP(C56, CAP_N(6.8))
71   CAP(C57, CAP_N(6.8))
72   CAP(C59, CAP_N(6.8))
73   CAP(C60, CAP_N(22))
74   CAP(C61, CAP_N(22))
75   CAP(C62, CAP_N(6.8))
76   CAP(C63, CAP_N(1))
77   CAP(C64, CAP_N(68))
78   CAP(C65, CAP_N(68))
79   CAP(C66, CAP_N(68))
80   CAP(C67, CAP_N(15))
81   CAP(C68, CAP_N(15))
82   CAP(C69, CAP_N(10))
83   CAP(C70, CAP_N(22))
84   CAP(C72, CAP_N(12))
85   CAP(C73, CAP_N(10))
86   CAP(C76, CAP_N(68))
87   CAP(C77, CAP_N(12))
88
89   DIODE(D3, "1S1588")
90   DIODE(D4, "1S1588")
91   DIODE(D5, "1S1588")
92
93   POT(RV1, RES_K(50))
94
95   QBJT_EB(Q10, "2SC945")
96   QBJT_EB(Q3, "2SC945")
97   QBJT_EB(Q4, "2SC945")
98   QBJT_EB(Q5, "2SC945")
99   QBJT_EB(Q6, "2SC945")
100   QBJT_EB(Q7, "2SC945")
101   QBJT_EB(Q9, "2SC945")
102
103   LM324_DIP(XU1)
104   LM358_DIP(XU2)
105
106   MC14584B_DIP(XU3)
107
108   RES(R100, RES_K(560))
109   RES(R101, RES_K(150))
110   RES(R102, RES_K(150))
111   RES(R103, RES_K(470))
112   RES(R104, RES_K(22))
113   RES(R105, RES_K(470))
114   RES(R106, RES_K(150))
115   RES(R107, RES_K(150))
116   RES(R108, RES_K(560))
117   RES(R119, RES_K(22))
118   RES(R200, RES_K(100))
119   RES(R201, RES_K(100))
120   RES(R27, RES_K(6.8))
121   RES(R28, RES_K(150))
122   RES(R29, RES_K(2.7))
123   RES(R30, RES_K(10))
124   RES(R31, RES_K(5.1))
125   //RES(R32, RES_K(1))
126   RES(R32, RES_K(4.7))
127   RES(R34, RES_K(100))
128   RES(R35, RES_K(100))
129   RES(R36, RES_K(100))
130   RES(R37, RES_K(47))
131   RES(R38, 820)
132   RES(R39, RES_K(22))
133   RES(R40, RES_K(10))
134   RES(R41, RES_K(10))
135   RES(R42, RES_K(150))
136   RES(R43, 470)
137   RES(R44, RES_K(100))
138   RES(R45, RES_K(1))
139   RES(R46, RES_K(12))
140   RES(R48, 470)
141   RES(R48_2, RES_K(100))
142   RES(R49, RES_K(10))
143   RES(R50, RES_K(2.2))
144   RES(R51, RES_K(150))
145   RES(R52, RES_K(100))
146   RES(R53, RES_K(100))
147   RES(R54, RES_K(680))
148   RES(R55, RES_K(510))
149   RES(R57, 560)
150   RES(R58, RES_K(39))
151   RES(R59, 560)
152   RES(R60, RES_K(39))
153   RES(R61, RES_K(100))
154   RES(R62, RES_K(100))
155   RES(R63, RES_K(1))
156   RES(R65, RES_K(1))
157   RES(R65_1, RES_K(27))
158   RES(R66, RES_M(1))
159   RES(R67, RES_K(100))
160   RES(R68, RES_K(100))
161   RES(R69, RES_K(1))
162   RES(R70, RES_K(10))
163   RES(R71, RES_K(100))
164   RES(R72, RES_K(100))
165   RES(R73, RES_K(10))
166   RES(R74, RES_K(10))
167   RES(R75, RES_K(10))
168   RES(R76, RES_K(10))
169   RES(R81, 220)
170   RES(R82, RES_M(2.2))
171   RES(R83, RES_K(12))
172   RES(R84, RES_K(1))
173   RES(R85, RES_M(2.2))
174   RES(R86, RES_K(10))
175   RES(R87, RES_K(68))
176   RES(R89, RES_K(22))
177   RES(R90, RES_K(390))
178   RES(R91, RES_K(100))
179   RES(R92, RES_K(22))
180   RES(R93, RES_K(1))
181   RES(R94, RES_K(22))
182   RES(R95, RES_K(330))
183   RES(R96, RES_K(150))
184   RES(R97, RES_K(150))
185   RES(R98, RES_K(650))
186
187   #if USE_FIXED_STV
188   ANALOG_INPUT(STV, 2)
189   #else
190   RES(R78, RES_K(3.3))
191   RES(R77, RES_K(2.2))
192   CAP(C58, CAP_U(47))
193   #endif
194
195   NET_C(R95.1, XU3.2, R96.2)
196   NET_C(R95.2, XU3.1, C69.1)
197   NET_C(XU3.3, R103.2, C73.1)
198   NET_C(XU3.4, R103.1, R102.2)
199   NET_C(XU3.5, R105.2, C72.1)
200   NET_C(XU3.6, R105.1, R106.2)
201   #if USE_FIXED_STV
202   //FIXME: We should have a NET_C_REMOVE
203   NET_C(XU3.7, C69.2, C73.2, C72.2, C77.2, C67.2, C68.2, R65.2, R38.2, XU1.11, R54.2, Q4.E, R63.2, C47.2, R72.2, R67.2, R71.2, R68.2, C48.2, R46.2, C28.1, C32.1, R43.2, XU2.4, C56.1, C52.1,/* R77.2, C58.1, */ R48.2, R93.2, R94.2, R119.2, R104.2, R53.2, R34.2, R81.2, R92.2, R89.2, C33.1, R37.2, R36.1, R91.1, I_V0.Q, RV1.3)
204   #else
205   NET_C(XU3.7, C69.2, C73.2, C72.2, C77.2, C67.2, C68.2, R65.2, R38.2, XU1.11, R54.2, Q4.E, R63.2, C47.2, R72.2, R67.2, R71.2, R68.2, C48.2, R46.2, C28.1, C32.1, R43.2, XU2.4, C56.1, C52.1, R77.2, C58.1, R48.2, R93.2, R94.2, R119.2, R104.2, R53.2, R34.2, R81.2, R92.2, R89.2, C33.1, R37.2, R36.1, R91.1, I_V0.Q, RV1.3)
206   #endif
207   NET_C(XU3.8, R108.1, R107.2)
208   NET_C(XU3.9, R108.2, C77.1)
209   NET_C(XU3.10, R100.1, R101.2)
210   NET_C(XU3.11, R100.2, C67.1)
211   NET_C(XU3.12, R98.1, R97.2)
212   NET_C(XU3.13, R98.2, C68.1)
213   #if USE_FIXED_STV
214   NET_C(XU3.14, XU1.4, R66.1, R70.1, Q6.C, Q5.C, XU2.8, /* R78.1, */ R86.1, R83.1, Q3.C, I_V5.Q)
215   #else
216   NET_C(XU3.14, XU1.4, R66.1, R70.1, Q6.C, Q5.C, XU2.8, R78.1, R86.1, R83.1, Q3.C, I_V5.Q)
217   #endif
218   NET_C(R96.1, R102.1, R106.1, R107.1, R101.1, R97.1, R65.1, C63.2)
219   NET_C(C63.1, R65_1.2)
220   NET_C(R65_1.1, R44.2, C38.2, C40.2, XU1.6)
221   #if USE_FIXED_STV
222   NET_C(R30.1, R41.1, R40.1, STV, R76.2, /* R78.2, R77.1, C58.2*/ STV)
223   #else
224   NET_C(R30.1, R41.1, R40.1, R76.2, R78.2, R77.1, C58.2)
225   #endif
226   NET_C(R30.2, XU1.5)
227   NET_C(R44.1, C39.1, C40.1, R48_2.2)
228   NET_C(C38.1, C39.2, R38.1)
229   NET_C(XU1.1, XU1.2, R39.1, R32.2)
230   NET_C(XU1.3, C34.1, R41.2)
231   NET_C(XU1.7, R45.2)
232   NET_C(XU1.8, XU1.9, R31.2, C36.2)
233   NET_C(XU1.10, R42.1, C32.2)
234   NET_C(XU1.12, C49.1, C31.1, R40.2, C61.1, C60.1)
235   NET_C(XU1.13, R27.1, R28.2)
236   NET_C(XU1.14, R28.1, R29.2, I_SINH0)
237   NET_C(R48_2.1, C45.2, R54.1)
238   NET_C(C45.1, R55.1, Q7.B)
239   NET_C(R55.2, R90.2, C33.2, R37.1, Q3.E)
240   NET_C(R45.1, C44.2)
241   NET_C(C44.1, R66.2, Q4.B)
242   NET_C(Q4.C, C42.1, C43.1, R46.1, C35.2, D4.K, D5.K)
243   NET_C(R70.2, R69.2, Q7.C)
244   NET_C(R63.1, Q7.E)
245   NET_C(R69.1, C49.2)
246   NET_C(C42.2, R58.1, D5.A)
247   NET_C(R58.2, R57.1, C47.1)
248   NET_C(R57.2, Q6.E)
249   NET_C(Q6.B, R61.1)
250   NET_C(C50.1, R67.1, R61.2)
251   NET_C(C50.2, R72.1, I_OH0.Q)
252   NET_C(C51.1, R68.1, R62.2)
253   NET_C(C51.2, R71.1, I_CH0.Q)
254   NET_C(R62.1, Q5.B)
255   NET_C(Q5.E, R59.2)
256   NET_C(R60.1, C43.2, D4.A)
257   NET_C(R60.2, R59.1, C48.1)
258   NET_C(C35.1, C34.2, R39.2)
259   NET_C(R32.1, C31.2)
260   NET_C(R27.2, C28.2)
261   NET_C(R29.1, R31.1, R50.2, R49.1, RV1.1)
262   NET_C(R42.2, R51.1, C36.1)
263   NET_C(R51.2, C41.1)
264   NET_C(C41.2, R43.1, I_SOUNDIC0)
265   NET_C(XU2.1, XU2.2, R73.1)
266   NET_C(XU2.3, R76.1, C200.2)
267   NET_C(XU2.5, C56.2, R75.1)
268   NET_C(XU2.6, XU2.7, R50.1, C53.2)
269   NET_C(R75.2, R74.1, C53.1)
270   NET_C(R74.2, C52.2, R73.2)
271   NET_C(R49.2, R48.1, I_SOUND0)
272   NET_C(Q9.E, R81.1)
273   NET_C(Q9.C, R84.2, R83.2, R82.1, C59.1)
274   NET_C(Q9.B, R82.2, C62.1)
275   NET_C(Q10.E, R93.1)
276   NET_C(Q10.C, R87.2, R86.2, R85.1, C76.1)
277   NET_C(Q10.B, R85.2, C64.1)
278   NET_C(R84.1, C61.2)
279   NET_C(C60.2, R87.1)
280   NET_C(C64.2, C65.1, R94.1, D3.K)
281   NET_C(C65.2, C66.1, R119.1)
282   NET_C(C66.2, C76.2, R104.1)
283   NET_C(R53.1, R52.2, C37.1)
284   NET_C(R34.1, C37.2, I_BD0.Q)
285   NET_C(R52.1, D3.A)
286   NET_C(R92.1, C62.2, C57.1)
287   NET_C(R89.1, C57.2, C59.2, R90.1)
288   NET_C(Q3.B, R35.1)
289   NET_C(R35.2, R36.2, C70.1)
290   NET_C(R91.2, C70.2, I_SD0.Q)
291   NET_C(I_MSM3K0.Q, R200.2)
292   NET_C(I_MSM2K0.Q, R201.2)
293   NET_C(R200.1, R201.1, C200.1)
294
295   /* Amplifier stage */
296
297   CAP(C26, CAP_U(1))
298   RES(R25, 560)
299   RES(R26, RES_K(47))
300   CAP(C29, CAP_U(0.01))
301
302   NET_C(RV1.2, C26.1)
303   NET_C(C26.2, R25.1)
304   NET_C(R25.2, R26.1, C29.1)
305   NET_C(R26.2, C29.2, GND)
306
307NETLIST_END()
trunk/src/mame/drivers/amstrad.cpp
r250291r250292
816816   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
817817   SLOT_INTERFACE("hd20", CPC_HD20)
818818   SLOT_INTERFACE("doubler", CPC_DOUBLER)
819   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)
819820SLOT_INTERFACE_END
820821
821822SLOT_INTERFACE_START(cpc_exp_cards)
r250291r250292
833834   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
834835   SLOT_INTERFACE("hd20", CPC_HD20)
835836   SLOT_INTERFACE("doubler", CPC_DOUBLER)
837   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)
836838SLOT_INTERFACE_END
837839
838840SLOT_INTERFACE_START(cpcplus_exp_cards)
r250291r250292
848850   SLOT_INTERFACE("smartwatch", CPC_SMARTWATCH)
849851   SLOT_INTERFACE("hd20", CPC_HD20)
850852   SLOT_INTERFACE("doubler", CPC_DOUBLER)
853   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)  // Plus compatible?
851854SLOT_INTERFACE_END
852855
853856SLOT_INTERFACE_START(aleste_exp_cards)
r250291r250292
865868   SLOT_INTERFACE("brunword4", CPC_BRUNWORD_MK4)
866869   SLOT_INTERFACE("hd20", CPC_HD20)
867870   SLOT_INTERFACE("doubler", CPC_DOUBLER)
871   SLOT_INTERFACE("transtape", CPC_TRANSTAPE)
868872   SLOT_INTERFACE("magicsound", AL_MAGICSOUND)
869873SLOT_INTERFACE_END
870874
trunk/src/mame/drivers/c65_old.cpp
r250291r250292
1// license:GPL-2.0+
2// copyright-holders:Peter Trauner
3/***************************************************************************
4
5    Commodore C65 home computer
6    PeT mess@utanet.at
7
8    documention
9     www.funet.fi
10
11***************************************************************************/
12
13/*
14
152008 - Driver Updates
16---------------------
17
18(most of the informations are taken from http://www.zimmers.net/cbmpics/ )
19
20
21[CBM systems which belong to this driver]
22
23* Commodore 65 (1989)
24
25Also known as C64 DX at early stages of the project. It was cancelled
26around 1990-1991. Only few units survive (they were sold after Commodore
27liquidation in 1994).
28
29CPU: CSG 4510 (3.54 MHz)
30RAM: 128 kilobytes, expandable to 8 megabytes
31ROM: 128 kilobytes
32Video: CSG 4569 "VIC-III" (6 Video modes; Resolutions from 320x200 to
33    1280x400; 80 columns text; Palette of 4096 colors)
34Sound: CSG 8580 "SID" x2 (6 voice stereo synthesizer/digital sound
35    capabilities)
36Ports: CSG 4510 (2 Joystick/Mouse ports; CBM Serial port; CBM 'USER'
37    port; CBM Monitor port; Power and reset switches; C65 bus drive
38    port; RGBI video port; 2 RCA audio ports; RAM expansion port; C65
39    expansion port)
40Keyboard: Full-sized 77 key QWERTY (12 programmable function keys;
41    4 direction cursor-pad)
42Additional Hardware: Built in 3.5" DD disk drive (1581 compatible)
43Miscellaneous: Partially implemented Commodore 64 emulation
44
45[Notes]
46
47The datasette port was removed here. C65 supports an additional "dumb"
48drive externally. It also features, in addition to the standard CBM
49bus serial (available in all modes), a Fast and a Burst serial bus
50(both available in C65 mode only)
51
52*/
53
54
55#include "emu.h"
56#include "cpu/m6502/m4510.h"
57#include "machine/mos6526.h"
58#include "machine/cbm_snqk.h"
59#include "includes/c65.h"
60#include "bus/cbmiec/cbmiec.h"
61#include "machine/ram.h"
62
63static void cbm_c65_quick_sethiaddress( address_space &space, UINT16 hiaddress )
64{
65   space.write_byte(0x82, hiaddress & 0xff);
66   space.write_byte(0x83, hiaddress >> 8);
67}
68
69QUICKLOAD_LOAD_MEMBER( c65_state, cbm_c65 )
70{
71   return general_cbm_loadsnap(image, file_type, quickload_size, m_maincpu->space(AS_PROGRAM), 0, cbm_c65_quick_sethiaddress);
72}
73
74/*************************************
75 *
76 *  Main CPU memory handlers
77 *
78 *************************************/
79
80static ADDRESS_MAP_START( c65_mem , AS_PROGRAM, 8, c65_state )
81   AM_RANGE(0x00000, 0x07fff) AM_RAMBANK("bank11")
82   AM_RANGE(0x08000, 0x09fff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank12")
83   AM_RANGE(0x0a000, 0x0bfff) AM_READ_BANK("bank2") AM_WRITE_BANK("bank13")
84   AM_RANGE(0x0c000, 0x0cfff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank14")
85   AM_RANGE(0x0d000, 0x0d7ff) AM_READ_BANK("bank4") AM_WRITE_BANK("bank5")
86   AM_RANGE(0x0d800, 0x0dbff) AM_READ_BANK("bank6") AM_WRITE_BANK("bank7")
87   AM_RANGE(0x0dc00, 0x0dfff) AM_READ_BANK("bank8") AM_WRITE_BANK("bank9")
88   AM_RANGE(0x0e000, 0x0ffff) AM_READ_BANK("bank10") AM_WRITE_BANK("bank15")
89   AM_RANGE(0x10000, 0x1f7ff) AM_RAM
90   AM_RANGE(0x1f800, 0x1ffff) AM_RAM AM_SHARE("colorram")
91
92   AM_RANGE(0x20000, 0x23fff) AM_ROM /* &c65_dos,     maps to 0x8000    */
93   AM_RANGE(0x24000, 0x28fff) AM_ROM /* reserved */
94   AM_RANGE(0x29000, 0x29fff) AM_ROM AM_SHARE("c65_chargen")
95   AM_RANGE(0x2a000, 0x2bfff) AM_ROM AM_SHARE("basic")
96   AM_RANGE(0x2c000, 0x2cfff) AM_ROM AM_SHARE("interface")
97   AM_RANGE(0x2d000, 0x2dfff) AM_ROM AM_SHARE("chargen")
98   AM_RANGE(0x2e000, 0x2ffff) AM_ROM AM_SHARE("kernal")
99
100   AM_RANGE(0x30000, 0x31fff) AM_ROM /*&c65_monitor,     monitor maps to 0x6000    */
101   AM_RANGE(0x32000, 0x37fff) AM_ROM /*&c65_basic, */
102   AM_RANGE(0x38000, 0x3bfff) AM_ROM /*&c65_graphics, */
103   AM_RANGE(0x3c000, 0x3dfff) AM_ROM /* reserved */
104   AM_RANGE(0x3e000, 0x3ffff) AM_ROM /* &c65_kernal, */
105
106   AM_RANGE(0x40000, 0x7ffff) AM_NOP
107   /* 8 megabyte full address space! */
108ADDRESS_MAP_END
109
110
111/*************************************
112 *
113 *  Input Ports
114 *
115 *************************************/
116
117static INPUT_PORTS_START( c65 )
118   PORT_START( "ROW0" )
119   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Crsr Down Up") PORT_CODE(KEYCODE_RALT)        PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR(UCHAR_MAMEKEY(UP))
120   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3)                                    PORT_CHAR(UCHAR_MAMEKEY(F5))
121   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2)                                    PORT_CHAR(UCHAR_MAMEKEY(F3))
122   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1)                                    PORT_CHAR(UCHAR_MAMEKEY(F1))
123   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4)                                    PORT_CHAR(UCHAR_MAMEKEY(F7))
124   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Crsr Right Left") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
125   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER)             PORT_CHAR(13)
126   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("INST DEL") PORT_CODE(KEYCODE_BACKSPACE)       PORT_CHAR(8) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
127
128   PORT_START( "ROW1" )
129   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift (Left)") PORT_CODE(KEYCODE_LSHIFT)      PORT_CHAR(UCHAR_SHIFT_1)
130   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E)         PORT_CHAR('E')
131   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S)         PORT_CHAR('S')
132   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z)         PORT_CHAR('Z')
133   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4)         PORT_CHAR('4') PORT_CHAR('$')
134   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A)         PORT_CHAR('A')
135   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W)         PORT_CHAR('W')
136   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3)         PORT_CHAR('3') PORT_CHAR('#')
137
138   PORT_START( "ROW2" )
139   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X)         PORT_CHAR('X')
140   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T)         PORT_CHAR('T')
141   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F)         PORT_CHAR('F')
142   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C)         PORT_CHAR('C')
143   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6)         PORT_CHAR('6') PORT_CHAR('&')
144   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D)         PORT_CHAR('D')
145   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R)         PORT_CHAR('R')
146   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5)         PORT_CHAR('5') PORT_CHAR('%')
147
148   PORT_START( "ROW3" )
149   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V)         PORT_CHAR('V')
150   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U)         PORT_CHAR('U')
151   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H)         PORT_CHAR('H')
152   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B)         PORT_CHAR('B')
153   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8)         PORT_CHAR('8') PORT_CHAR('(')
154   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G)         PORT_CHAR('G')
155   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y)         PORT_CHAR('Y')
156   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7)         PORT_CHAR('7') PORT_CHAR('\'')
157
158   PORT_START( "ROW4" )
159   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N)         PORT_CHAR('N')
160   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O)         PORT_CHAR('O')
161   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K)         PORT_CHAR('K')
162   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M)         PORT_CHAR('M')
163   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0)         PORT_CHAR('0')
164   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J)         PORT_CHAR('J')
165   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I)         PORT_CHAR('I')
166   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9)         PORT_CHAR('9') PORT_CHAR(')')
167
168   PORT_START( "ROW5" )
169   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA)     PORT_CHAR(',') PORT_CHAR('<')
170   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')
171   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON)     PORT_CHAR(':') PORT_CHAR('[')
172   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP)      PORT_CHAR('.') PORT_CHAR('>')
173   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS)    PORT_CHAR('-')
174   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L)         PORT_CHAR('L')
175   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P)         PORT_CHAR('P')
176   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS)     PORT_CHAR('+')
177
178   PORT_START( "ROW6" )
179   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH)                             PORT_CHAR('/') PORT_CHAR('?')
180   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x91  Pi") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x2191) PORT_CHAR(0x03C0)
181   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH)                         PORT_CHAR('=')
182   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift (Right)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
183   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CLR HOME") PORT_CODE(KEYCODE_INSERT)      PORT_CHAR(UCHAR_MAMEKEY(HOME))
184   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE)                             PORT_CHAR(';') PORT_CHAR(']')
185   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE)                        PORT_CHAR('*')
186   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2)                        PORT_CHAR('\xA3')
187
188   PORT_START( "ROW7" )
189   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RUN STOP") PORT_CODE(KEYCODE_HOME)
190   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q)                                 PORT_CHAR('Q')
191   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CBM") PORT_CODE(KEYCODE_LALT)
192   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE)                             PORT_CHAR(' ')
193   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2)                                 PORT_CHAR('2') PORT_CHAR('"')
194   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB)                               PORT_CHAR(UCHAR_SHIFT_2)
195   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_TILDE)   PORT_CHAR(0x2190)
196   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1)                                 PORT_CHAR('1') PORT_CHAR('!')
197   PORT_START("FUNCT")
198   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_F1)
199   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F13 F14") PORT_CODE(KEYCODE_F11)
200   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F11 F12") PORT_CODE(KEYCODE_F10)
201   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("F9 F10") PORT_CODE(KEYCODE_F9)
202   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("HELP") PORT_CODE(KEYCODE_F12)
203   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ALT") PORT_CODE(KEYCODE_F2)       /* non blocking */
204   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB)
205   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NO SCRL") PORT_CODE(KEYCODE_F4)
206
207   PORT_START( "SPECIAL" )  /* special keys */
208   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Restore") PORT_CODE(KEYCODE_PRTSCR)
209   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift Lock (switch)") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
210   PORT_CONFNAME( 0x20, 0x00, "(C65) Caps Lock (switch)") PORT_CODE(KEYCODE_F3)
211   PORT_CONFSETTING(   0x00, DEF_STR( Off ) )
212   PORT_CONFSETTING(   0x20, DEF_STR( On ) )
213   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
214
215   PORT_START("CTRLSEL")   /* Controller selection */
216   PORT_CONFNAME( 0x07, 0x00, "Gameport A" )
217   PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) )
218   PORT_CONFSETTING( 0x01, "Paddles 1 & 2" )
219   PORT_CONFSETTING( 0x02, "Mouse 1351" )
220   PORT_CONFSETTING( 0x03, "Mouse (Non Proportional) 1350" )
221   PORT_CONFSETTING( 0x04, "Lightpen" )
222//  PORT_CONFSETTING( 0x05, "Koala Pad" )
223   PORT_CONFSETTING( 0x06, "Lightgun" )
224   PORT_CONFSETTING( 0x07, "No Device Connected" )
225   PORT_CONFNAME( 0x70, 0x00, "Gameport B" )
226   PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) )
227   PORT_CONFSETTING( 0x10, "Paddles 3 & 4" )
228//  PORT_CONFSETTING( 0x20, "Mouse 1351" )
229//  PORT_CONFSETTING( 0x30, "Mouse (Non Proportional) 1350" )
230   PORT_CONFSETTING( 0x70, "No Device Connected" )
231   PORT_CONFNAME( 0x80, 0x00, "Swap Gameport A and B") PORT_CODE(KEYCODE_F1) PORT_TOGGLE
232   PORT_CONFSETTING(   0x00, DEF_STR( No ) )
233   PORT_CONFSETTING(   0x80, DEF_STR( Yes ) )
234
235   PORT_START("JOY1_1B")
236   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00)
237   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00)
238   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00)
239   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00)
240   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x00)
241   PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
242
243   PORT_START("JOY2_1B")
244   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00)
245   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00)
246   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00)
247   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00)
248   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x00)
249   PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
250
251   /* Mouse Commodore 1350 was basically working as a Joystick */
252   PORT_START("JOY1_2B")
253   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Up") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
254   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Down") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
255   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Left") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
256   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("Mouse 1350 Right") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
257   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 1") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
258   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Mouse 1350 Button 2") PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x03)
259   PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
260
261   /* Still to verify how many mice you were able to plug into a C64 */
262   /* Only one, for now */
263   PORT_START("JOY2_2B")
264   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
265/*  PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_HOME) PORT_CODE(JOYCODE_Y_UP_SWITCH)
266    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_END) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30)
267    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30)
268    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_CODE(KEYCODE_PGDN) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30)
269    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30)
270    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_PGUP) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x30)
271    PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
272*/
273   PORT_START("PADDLE1")
274   PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01)
275
276   PORT_START("PADDLE2")
277   PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_DOWN) PORT_CODE_INC(KEYCODE_UP) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01)
278
279   PORT_START("PADDLE3")
280   PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_PGUP) PORT_PLAYER(3) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10)
281
282   PORT_START("PADDLE4")
283   PORT_BIT( 0xff, 128, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(4) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10)
284
285   PORT_START("TRACKX")
286   PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02)
287
288   PORT_START("TRACKY")
289   PORT_BIT( 0x7e, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02)
290
291   PORT_START("LIGHTX")
292   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_NAME("Lightpen X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04)
293
294   PORT_START("LIGHTY")
295   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y) PORT_NAME("Lightpen Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04)
296
297   PORT_START("OTHER")
298   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Paddle 1 Button") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01)
299   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Paddle 2 Button") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x01)
300   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Paddle 3 Button") PORT_CODE(KEYCODE_INSERT) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10)
301   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Paddle 4 Button") PORT_CODE(KEYCODE_DEL) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10)
302   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightpen Signal") PORT_CODE(KEYCODE_LCONTROL) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x04)
303   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button Left") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02)
304   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Button Right") PORT_CODE(KEYCODE_LALT) PORT_CODE(JOYCODE_BUTTON2) PORT_CONDITION("CTRLSEL", 0x0f, EQUALS, 0x02)INPUT_PORTS_END
305
306
307static INPUT_PORTS_START( c65ger )
308   PORT_INCLUDE( c65 )
309
310   PORT_MODIFY( "ROW1" )
311   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Z  { Y }") PORT_CODE(KEYCODE_Z)                   PORT_CHAR('Z')
312   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3  #  { 3  Paragraph }") PORT_CODE(KEYCODE_3)     PORT_CHAR('3') PORT_CHAR('#')
313
314   PORT_MODIFY( "ROW3" )
315   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y  { Z }") PORT_CODE(KEYCODE_Y)                   PORT_CHAR('Y')
316   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7 ' { 7  / }") PORT_CODE(KEYCODE_7)               PORT_CHAR('7') PORT_CHAR('\'')
317
318   PORT_MODIFY( "ROW4" )
319   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("0  { = }") PORT_CODE(KEYCODE_0)                   PORT_CHAR('0')
320
321   PORT_MODIFY( "ROW5" )
322   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(",  <  { ; }") PORT_CODE(KEYCODE_COMMA)            PORT_CHAR(',') PORT_CHAR('<')
323   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Paragraph  \xE2\x86\x91  { \xc3\xbc }") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00A7) PORT_CHAR(0x2191)
324   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(":  [  { \xc3\xa4 }") PORT_CODE(KEYCODE_COLON)     PORT_CHAR(':') PORT_CHAR('[')
325   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(".  >  { : }") PORT_CODE(KEYCODE_STOP)             PORT_CHAR('.') PORT_CHAR('>')
326   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("-  { '  ` }") PORT_CODE(KEYCODE_EQUALS)           PORT_CHAR('-')
327   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("+  { \xc3\x9f ? }") PORT_CODE(KEYCODE_MINUS)      PORT_CHAR('+')
328
329   PORT_MODIFY( "ROW6" )
330   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("/  ?  { -  _ }") PORT_CODE(KEYCODE_SLASH)         PORT_CHAR('/') PORT_CHAR('?')
331   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Sum Pi  { ]  \\ }") PORT_CODE(KEYCODE_DEL)        PORT_CHAR(0x03A3) PORT_CHAR(0x03C0)
332   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("=  { #  ' }") PORT_CODE(KEYCODE_BACKSLASH)        PORT_CHAR('=')
333   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(";  ]  { \xc3\xb6 }") PORT_CODE(KEYCODE_QUOTE)     PORT_CHAR(';') PORT_CHAR(']')
334   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("*  `  { +  * }") PORT_CODE(KEYCODE_CLOSEBRACE)    PORT_CHAR('*') PORT_CHAR('`')
335   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\  { [ \xE2\x86\x91 }") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\xa3')
336
337   PORT_MODIFY( "ROW7" )
338   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("_  { <  > }") PORT_CODE(KEYCODE_TILDE)            PORT_CHAR('_')
339
340   PORT_MODIFY("SPECIAL") /* special keys */
341   PORT_DIPNAME( 0x20, 0x00, "(C65) DIN ASC (switch)") PORT_CODE(KEYCODE_F3)
342   PORT_DIPSETTING(    0x00, "ASC" )
343   PORT_DIPSETTING(    0x20, "DIN" )
344INPUT_PORTS_END
345
346
347
348/*************************************
349 *
350 *  Sound definitions
351 *
352 *************************************/
353
354int c65_state::c64_paddle_read( device_t *device, address_space &space, int which )
355{
356   int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
357   UINT8 cia0porta = machine().device<mos6526_device>("cia_0")->pa_r(space, 0);
358   int controller1 = ioport("CTRLSEL")->read() & 0x07;
359   int controller2 = ioport("CTRLSEL")->read() & 0x70;
360   /* Notice that only a single input is defined for Mouse & Lightpen in both ports */
361   switch (controller1)
362   {
363      case 0x01:
364         if (which)
365            pot2 = ioport("PADDLE2")->read();
366         else
367            pot1 = ioport("PADDLE1")->read();
368         break;
369
370      case 0x02:
371         if (which)
372            pot2 = ioport("TRACKY")->read();
373         else
374            pot1 = ioport("TRACKX")->read();
375         break;
376
377      case 0x03:
378         if (which && (ioport("JOY1_2B")->read() & 0x20))  /* Joy1 Button 2 */
379            pot1 = 0x00;
380         break;
381
382      case 0x04:
383         if (which)
384            pot2 = ioport("LIGHTY")->read();
385         else
386            pot1 = ioport("LIGHTX")->read();
387         break;
388
389      case 0x06:
390         if (which && (ioport("OTHER")->read() & 0x04))    /* Lightpen Signal */
391            pot2 = 0x00;
392         break;
393
394      case 0x00:
395      case 0x07:
396         break;
397
398      default:
399         logerror("Invalid Controller Setting %d\n", controller1);
400         break;
401   }
402
403   switch (controller2)
404   {
405      case 0x10:
406         if (which)
407            pot4 = ioport("PADDLE4")->read();
408         else
409            pot3 = ioport("PADDLE3")->read();
410         break;
411
412      case 0x20:
413         if (which)
414            pot4 = ioport("TRACKY")->read();
415         else
416            pot3 = ioport("TRACKX")->read();
417         break;
418
419      case 0x30:
420         if (which && (ioport("JOY2_2B")->read() & 0x20))  /* Joy2 Button 2 */
421            pot4 = 0x00;
422         break;
423
424      case 0x40:
425         if (which)
426            pot4 = ioport("LIGHTY")->read();
427         else
428            pot3 = ioport("LIGHTX")->read();
429         break;
430
431      case 0x60:
432         if (which && (ioport("OTHER")->read() & 0x04))    /* Lightpen Signal */
433            pot4 = 0x00;
434         break;
435
436      case 0x00:
437      case 0x70:
438         break;
439
440      default:
441         logerror("Invalid Controller Setting %d\n", controller1);
442         break;
443   }
444
445   if (ioport("CTRLSEL")->read() & 0x80)     /* Swap */
446   {
447      temp = pot1; pot1 = pot3; pot3 = temp;
448      temp = pot2; pot2 = pot4; pot4 = temp;
449   }
450
451   switch (cia0porta & 0xc0)
452   {
453      case 0x40:
454         return which ? pot2 : pot1;
455
456      case 0x80:
457         return which ? pot4 : pot3;
458
459      case 0xc0:
460         return which ? pot2 : pot1;
461
462      default:
463         return 0;
464   }
465}
466
467READ8_MEMBER( c65_state::sid_potx_r )
468{
469   return c64_paddle_read(m_sid_r, space, 0);
470}
471
472READ8_MEMBER( c65_state::sid_poty_r )
473{
474   return c64_paddle_read(m_sid_r, space, 1);
475}
476
477
478/*************************************
479 *
480 *  VIC III interfaces
481 *
482 *************************************/
483
484UINT32 c65_state::screen_update_c65(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
485{
486   m_vic->video_update(bitmap, cliprect);
487   return 0;
488}
489
490READ8_MEMBER(c65_state::c65_lightpen_x_cb)
491{
492   return ioport("LIGHTX")->read() & ~0x01;
493}
494
495READ8_MEMBER(c65_state::c65_lightpen_y_cb)
496{
497   return ioport("LIGHTY")->read() & ~0x01;
498}
499
500READ8_MEMBER(c65_state::c65_lightpen_button_cb)
501{
502   return ioport("OTHER")->read() & 0x04;
503}
504
505READ8_MEMBER(c65_state::c65_c64_mem_r)
506{
507   return m_memory[offset];
508}
509
510INTERRUPT_GEN_MEMBER(c65_state::vic3_raster_irq)
511{
512   m_vic->raster_interrupt_gen();
513}
514
515/*************************************
516 *
517 *  Machine driver
518 *
519 *************************************/
520
521static MACHINE_CONFIG_START( c65, c65_state )
522   /* basic machine hardware */
523   MCFG_CPU_ADD("maincpu", M4510, 3500000)  /* or VIC6567_CLOCK, */
524   MCFG_CPU_PROGRAM_MAP(c65_mem)
525   MCFG_CPU_VBLANK_INT_DRIVER("screen", c65_state,  c65_frame_interrupt)
526   MCFG_CPU_PERIODIC_INT_DRIVER(c65_state, vic3_raster_irq,  VIC6567_HRETRACERATE)
527
528   MCFG_MACHINE_START_OVERRIDE(c65_state, c65 )
529
530   /* video hardware */
531   MCFG_SCREEN_ADD("screen", RASTER)
532   MCFG_SCREEN_REFRESH_RATE(VIC6567_VRETRACERATE)
533   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
534   MCFG_SCREEN_SIZE(525 * 2, 520 * 2)
535   MCFG_SCREEN_VISIBLE_AREA(VIC6567_STARTVISIBLECOLUMNS ,(VIC6567_STARTVISIBLECOLUMNS + VIC6567_VISIBLECOLUMNS - 1) * 2, VIC6567_STARTVISIBLELINES, VIC6567_STARTVISIBLELINES + VIC6567_VISIBLELINES - 1)
536   MCFG_SCREEN_UPDATE_DRIVER(c65_state, screen_update_c65)
537   MCFG_SCREEN_PALETTE("vic3:palette")
538
539   MCFG_DEVICE_ADD("vic3", VIC3, 0)
540   MCFG_VIC3_CPU("maincpu")
541   MCFG_VIC3_TYPE(VIC4567_NTSC)
542   MCFG_VIC3_LIGHTPEN_X_CB(READ8(c65_state, c65_lightpen_x_cb))
543   MCFG_VIC3_LIGHTPEN_Y_CB(READ8(c65_state, c65_lightpen_y_cb))
544   MCFG_VIC3_LIGHTPEN_BUTTON_CB(READ8(c65_state, c65_lightpen_button_cb))
545   MCFG_VIC3_DMA_READ_CB(READ8(c65_state, c65_dma_read))
546   MCFG_VIC3_DMA_READ_COLOR_CB(READ8(c65_state, c65_dma_read_color))
547   MCFG_VIC3_INTERRUPT_CB(WRITELINE(c65_state, c65_vic_interrupt))
548   MCFG_VIC3_PORT_CHANGED_CB(WRITE8(c65_state, c65_bankswitch_interface))
549   MCFG_VIC3_C64_MEM_R_CB(READ8(c65_state, c65_c64_mem_r))
550
551   /* sound hardware */
552   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
553   MCFG_SOUND_ADD("sid_r", MOS8580, 985248)
554   MCFG_MOS6581_POTX_CALLBACK(READ8(c65_state, sid_potx_r))
555   MCFG_MOS6581_POTY_CALLBACK(READ8(c65_state, sid_poty_r))
556   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
557   MCFG_SOUND_ADD("sid_l", MOS8580, 985248)
558   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
559
560   /* quickload */
561   MCFG_QUICKLOAD_ADD("quickload", c65_state, cbm_c65, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
562
563   /* cia */
564   MCFG_DEVICE_ADD("cia_0", MOS6526, 3500000)
565   MCFG_MOS6526_TOD(60)
566   MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia0_interrupt))
567   MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia0_port_a_r))
568   MCFG_MOS6526_PB_INPUT_CALLBACK(READ8(c65_state, c65_cia0_port_b_r))
569   MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia0_port_b_w))
570
571   MCFG_DEVICE_ADD("cia_1", MOS6526, 3500000)
572   MCFG_MOS6526_TOD(60)
573   MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt))
574   MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r))
575   MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w))
576
577   /* floppy from serial bus */
578   MCFG_CBM_IEC_ADD(NULL)
579
580   /* internal ram */
581   MCFG_RAM_ADD(RAM_TAG)
582   MCFG_RAM_DEFAULT_SIZE("128K")
583   MCFG_RAM_EXTRA_OPTIONS("640K,4224K")
584MACHINE_CONFIG_END
585
586static MACHINE_CONFIG_DERIVED( c65pal, c65 )
587   MCFG_SCREEN_MODIFY("screen")
588   MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
589   MCFG_SCREEN_SIZE(625 * 2, 520 * 2)
590   MCFG_SCREEN_VISIBLE_AREA(VIC6569_STARTVISIBLECOLUMNS, (VIC6569_STARTVISIBLECOLUMNS + VIC6569_VISIBLECOLUMNS - 1) * 2, VIC6569_STARTVISIBLELINES, VIC6569_STARTVISIBLELINES + VIC6569_VISIBLELINES - 1)
591   MCFG_SCREEN_PALETTE("vic3:palette")
592
593   MCFG_DEVICE_MODIFY("vic3")
594   MCFG_VIC3_TYPE(VIC4567_PAL)
595
596   /* sound hardware */
597   MCFG_SOUND_REPLACE("sid_r", MOS8580, 1022727)
598   MCFG_MOS6581_POTX_CALLBACK(READ8(c65_state, sid_potx_r))
599   MCFG_MOS6581_POTY_CALLBACK(READ8(c65_state, sid_poty_r))
600   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
601   MCFG_SOUND_REPLACE("sid_l", MOS8580, 1022727)
602   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
603
604   /* cia */
605   MCFG_DEVICE_MODIFY("cia_0")
606   MCFG_MOS6526_TOD(50)
607
608   MCFG_DEVICE_MODIFY("cia_1")
609   MCFG_MOS6526_TOD(50)
610MACHINE_CONFIG_END
611
612
613/*************************************
614 *
615 *  ROM definition(s)
616 *
617 *************************************/
618
619
620ROM_START( c65 )
621   ROM_REGION( 0x400000, "maincpu", 0 )
622   ROM_SYSTEM_BIOS( 0, "910111", "V0.9.910111" )
623   ROMX_LOAD( "910111.bin", 0x20000, 0x20000, CRC(c5d8d32e) SHA1(71c05f098eff29d306b0170e2c1cdeadb1a5f206), ROM_BIOS(1) )
624   ROM_SYSTEM_BIOS( 1, "910523", "V0.9.910523" )
625   ROMX_LOAD( "910523.bin", 0x20000, 0x20000, CRC(e8235dd4) SHA1(e453a8e7e5b95de65a70952e9d48012191e1b3e7), ROM_BIOS(2) )
626   ROM_SYSTEM_BIOS( 2, "910626", "V0.9.910626" )
627   ROMX_LOAD( "910626.bin", 0x20000, 0x20000, CRC(12527742) SHA1(07c185b3bc58410183422f7ac13a37ddd330881b), ROM_BIOS(3) )
628   ROM_SYSTEM_BIOS( 3, "910828", "V0.9.910828" )
629   ROMX_LOAD( "910828.bin", 0x20000, 0x20000, CRC(3ee40b06) SHA1(b63d970727a2b8da72a0a8e234f3c30a20cbcb26), ROM_BIOS(4) )
630   ROM_SYSTEM_BIOS( 4, "911001", "V0.9.911001" )
631   ROMX_LOAD( "911001.bin", 0x20000, 0x20000, CRC(0888b50f) SHA1(129b9a2611edaebaa028ac3e3f444927c8b1fc5d), ROM_BIOS(5) )
632ROM_END
633
634ROM_START( c64dx )
635   ROM_REGION( 0x400000, "maincpu", 0 )
636   ROM_LOAD( "910429.bin", 0x20000, 0x20000, CRC(b025805c) SHA1(c3b05665684f74adbe33052a2d10170a1063ee7d) )
637ROM_END
638
639/***************************************************************************
640
641  Game driver(s)
642
643***************************************************************************/
644
645/*    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT    COMPANY                         FULLNAME                                              FLAGS */
646
647COMP( 1991, c65,    0,      0,      c65,    c65, c65_state,    c65,    "Commodore Business Machines",  "Commodore 65 Development System (Prototype, NTSC)", MACHINE_NOT_WORKING )
648COMP( 1991, c64dx,  c65,    0,      c65pal, c65ger, c65_state, c65pal, "Commodore Business Machines",  "Commodore 64DX Development System (Prototype, PAL, German)", MACHINE_NOT_WORKING )
trunk/src/mame/drivers/chihiro.cpp
r250291r250292
378378#include "includes/chihiro.h"
379379#include "includes/xbox.h"
380380
381// for now, make buggy GCC/Mingw STFU about I64FMT
382#if (defined(__MINGW32__) && (__GNUC__ >= 5))
383#pragma GCC diagnostic push
384#pragma GCC diagnostic ignored "-Wformat"
385#pragma GCC diagnostic ignored "-Wformat-extra-args"
386#endif
387
388381#define LOG_PCI
389382//#define LOG_BASEBOARD
390383
r250291r250292
12831276// 0023
12841277// 0024     GAME( 2009, ccfboxo,  ccfboxa,  chihirogd,    chihiro, driver_device, 0, ROT0, "Sega",                     "Chihiro Firmware Update For Compact Flash Box (GDX-0024)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
12851278/* 0024A */ GAME( 2009, ccfboxa,  chihiro,  chihirogd,    chihiro, driver_device, 0, ROT0, "Sega",                     "Chihiro Firmware Update For Compact Flash Box (Rev A) (GDX-0024A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING )
1286
1287#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1288#pragma GCC diagnostic pop
1289#endif
trunk/src/mame/drivers/exidyttl.cpp
r250291r250292
44
55Exidy discrete hardware games
66
7 Alley Rally (1975) (AR-1A)
8 Attack (1977)
9 Death Race (1976)
10 Destruction Derby (1975)
11 Hockey / Tennis (Thumper Bumper?) (1974)
12 Score (1977)
7 Alley Rally (1976/10) (AR-1A)
8 Attack (1977/02)
9 Death Race (1976/04)
10 Destruction Derby (1976/01)
11 Hockey / Tennis (Thumper Bumper?) (1974/03)
12 Score (1977/07)
1313 Spiders From Space (1976)
14 Sting (1974)
15 Super Death Chase (1977)
16 Table Foosballer / Table Football (1975)
17 Table Pinball (1974)
18 TV Pinball (1974) (PB-4)
14 Sting (1974/03)
15 Super Death Chase (1977/10)
16 Table Foosballer / Table Football (1975/11)
17 Table Pinball (1974/11)
18 TV Pinball (1974/11) (PB-4)
1919
2020***************************************************************************/
2121
r250291r250292
211211   ROM_LOAD( "6331-36.t7",     0x0000, 0x0020, CRC(15e00a2a) SHA1(cd43d227a34e5444ed9d8a4acf5497df9c789c73) )
212212ROM_END
213213
214
215
216214GAME( 1977, attckexd,  0,        attack,   0, driver_device,  0, ROT0, "Exidy", "Attack (Set 1) [TTL]", MACHINE_IS_SKELETON )
217215GAME( 1977, attckexd2, attckexd, attack,   0, driver_device,  0, ROT0, "Exidy", "Attack (Set 2) [TTL]", MACHINE_IS_SKELETON )
218216GAME( 1976, deathrac,  0,        deathrac, 0, driver_device,  0, ROT0, "Exidy", "Death Race [TTL]", MACHINE_IS_SKELETON )
trunk/src/mame/drivers/fidelz80.cpp
r250291r250292
88*  All detailed RE work done by Kevin 'kevtris' Horton
99*
1010*  TODO:
11*  * Figure out why it says the first speech line twice; it shouldn't. (It sometimes does this on the sensory chess challenger real hardware)
11*  * Figure out why it says the first speech line twice; it shouldn't?
12*    It sometimes does this on Voice Sensory Chess Challenger real hardware.
13*    It can also be heard on Advanced Talking Chess Challenger real hardware, but not the whole line:
14*    "I I am Fidelity's chess challenger", instead.
1215*  * Get rom locations from pcb (done for UVC, VCC is probably similar)
1316*  * correctly hook up 7002/VBRC and 7014/bridgec3 speech so that the z80 is halted while words are being spoken
1417*
r250291r250292
4952
5053I/O map:
5154--------
5200-FF: 8255 port chip [LN edit: 00-03, mirrored over the 00-FF range; program accesses F4-F7]
5500-03: 8255 port chip, mirrored over the 00-FF range; program accesses F4-F7
5356
5457
55588255 connections:
r250291r250292
605608void fidelz80_state::update_display()
606609{
607610   // data for the 4x 7seg leds, bits are 0bxABCDEFG
608   UINT8 out_digit = BITSWAP8( m_digit_data,7,0,1,2,3,4,5,6 ) & 0x7f;
611   UINT8 out_digit = BITSWAP8(m_digit_data,7,0,1,2,3,4,5,6) & 0x7f;
609612
610613   if (m_led_selected&0x04)
611614   {
612615      output_set_digit_value(0, out_digit);
613616
614      output_set_led_value(1, m_led_data & 0x01);
617      output_set_led_value(1, m_led_data);
615618   }
616619   if (m_led_selected&0x08)
617620   {
618621      output_set_digit_value(1, out_digit);
619622
620      output_set_led_value(0, m_led_data & 0x01);
623      output_set_led_value(0, m_led_data);
621624   }
622625   if (m_led_selected&0x10)
623626   {
r250291r250292
629632   }
630633}
631634
632READ8_MEMBER( fidelz80_state::fidelz80_portc_r )
635READ8_MEMBER(fidelz80_state::fidelz80_portc_r)
633636{
634637   UINT8 data = 0xff;
635638
r250291r250292
653656   return data;
654657}
655658
656WRITE8_MEMBER( fidelz80_state::fidelz80_portb_w )
659WRITE8_MEMBER(fidelz80_state::fidelz80_portb_w)
657660{
658661   if (!(data & 0x80))
659662   {
660      m_led_data = (data&0x01);  // common for two leds
663      m_led_data = data & 1; // common for two leds
661664
662665      m_led_selected = data;
663666
r250291r250292
667670   // ignoring the language switch enable for now, is bit 0x40
668671}
669672
670WRITE8_MEMBER( fidelz80_state::fidelz80_portc_w )
673WRITE8_MEMBER(fidelz80_state::fidelz80_portc_w)
671674{
672675   m_kp_matrix = data;
673676}
674677
675WRITE8_MEMBER( fidelz80_state::cc10_porta_w )
678WRITE8_MEMBER(fidelz80_state::cc10_porta_w)
676679{
677680   m_beep->set_state((data & 0x80) ? 0 : 1);
678681
r250291r250292
681684   update_display();
682685}
683686
684READ8_MEMBER( fidelz80_state::vcc_portb_r )
687READ8_MEMBER(fidelz80_state::vcc_portb_r)
685688{
686689   return (m_speech->bsy_r() != 0) ? 0x80 : 0x00;
687690}
688691
689WRITE8_MEMBER( fidelz80_state::vcc_porta_w )
692WRITE8_MEMBER(fidelz80_state::vcc_porta_w)
690693{
691694   m_speech->set_volume(15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
692695   m_speech->reg_w(data & 0x3f);
r250291r250292
701704    I8255 Device, for VSC
702705******************************************************************************/
703706
704WRITE8_MEMBER( fidelz80_state::vsc_porta_w )
707WRITE8_MEMBER(fidelz80_state::vsc_porta_w)
705708{
706   UINT8 out_digit = BITSWAP8( data,7,6,2,1,0,5,4,3 );
709   UINT8 out_digit = BITSWAP8(data,7,6,2,1,0,5,4,3);
707710
708711   if (m_kp_matrix & 0x01)
709712   {
r250291r250292
728731   m_speech->reg_w(data & 0x3f);
729732}
730733
731WRITE8_MEMBER( fidelz80_state::vsc_portb_w )
734WRITE8_MEMBER(fidelz80_state::vsc_portb_w)
732735{
733   for (int row=1; row<=8; row++)
736   for (int row = 1; row <= 8; row++)
734737   {
735738      if (m_kp_matrix & 0x01)
736739         output_set_indexed_value("led_a", row, BIT(data, 8-row));
r250291r250292
751754   }
752755}
753756
754WRITE8_MEMBER( fidelz80_state::vsc_portc_w )
757WRITE8_MEMBER(fidelz80_state::vsc_portc_w)
755758{
756759   m_kp_matrix = (m_kp_matrix & 0x300) | data;
757760}
r250291r250292
760763    PIO Device, for VSC
761764******************************************************************************/
762765
763READ8_MEMBER( fidelz80_state::vsc_pio_porta_r )
766READ8_MEMBER(fidelz80_state::vsc_pio_porta_r)
764767{
765768   UINT8 data = 0;
766769
r250291r250292
788791   return data & 0xff;
789792}
790793
791READ8_MEMBER( fidelz80_state::vsc_pio_portb_r )
794READ8_MEMBER(fidelz80_state::vsc_pio_portb_r)
792795{
793796   UINT8 data = 0x00;
794797
r250291r250292
798801   return data;
799802}
800803
801WRITE8_MEMBER( fidelz80_state::vsc_pio_portb_w )
804WRITE8_MEMBER(fidelz80_state::vsc_pio_portb_w)
802805{
803806   m_kp_matrix = (m_kp_matrix & 0xff) | ((data & 0x03)<<8);
804807
r250291r250292
955958   return m_i8041->upi41_master_r(space, 1);
956959}
957960
958WRITE8_MEMBER( fidelz80_state::bridgec_speech_w )
961WRITE8_MEMBER(fidelz80_state::bridgec_speech_w)
959962{
960963   // todo: HALT THE z80 here, and set up a callback to poll the s14001a DONE line to resume z80
961964   m_speech->set_volume(15); // hack, s14001a core should assume a volume of 15 unless otherwise stated...
r250291r250292
963966   m_speech->rst_w(BIT(data, 7));
964967}
965968
966void fidelz80_state::machine_reset()
969void fidelz80_state::machine_start()
967970{
971   // zerofill
968972   m_led_selected = 0;
969973   m_kp_matrix = 0;
970974   m_digit_data = 0;
971975   m_led_data = 0;
972976   memset(m_digit_line_status, 0, sizeof(m_digit_line_status));
977   
978   // register for savestates
979   save_item(NAME(m_led_selected));
980   save_item(NAME(m_kp_matrix));
981   save_item(NAME(m_digit_data));
982   save_item(NAME(m_led_data));
983   save_item(NAME(m_digit_line_status));
973984}
974985
975986TIMER_DEVICE_CALLBACK_MEMBER(fidelz80_state::nmi_timer)
r250291r250292
10091020   AM_RANGE(0x2000, 0x3fff) AM_ROM // 8k rom
10101021   AM_RANGE(0x4000, 0x5fff) AM_ROM // 8k rom
10111022   AM_RANGE(0x6000, 0x63ff) AM_RAM AM_MIRROR(0x1c00) // 1k ram (2114*2) mirrored 8 times
1012   AM_RANGE(0xE000, 0xE000) AM_WRITE(bridgec_speech_w) AM_MIRROR(0x1FFF) // write to speech chip, halts cpu
1023   AM_RANGE(0xe000, 0xe000) AM_WRITE(bridgec_speech_w) AM_MIRROR(0x1fff) // write to speech chip, halts cpu
10131024ADDRESS_MAP_END
10141025
10151026static ADDRESS_MAP_START(fidel_z80_io, AS_IO, 8, fidelz80_state)
r250291r250292
10591070}
10601071
10611072static INPUT_PORTS_START( fidelz80 )
1062   PORT_START("LEVEL")     // cc10 only
1073   PORT_START("LEVEL") // cc10 only
10631074      PORT_CONFNAME( 0x80, 0x00, "Number of levels" )
10641075      PORT_CONFSETTING( 0x00, "10" )
10651076      PORT_CONFSETTING( 0x80, "3" )
r250291r250292
12481259******************************************************************************/
12491260
12501261static MACHINE_CONFIG_START( cc10, fidelz80_state )
1262
12511263   /* basic machine hardware */
12521264   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
12531265   MCFG_CPU_PROGRAM_MAP(cc10_z80_mem)
r250291r250292
12661278   MCFG_I8255_OUT_PORTC_CB(WRITE8(fidelz80_state, fidelz80_portc_w))
12671279
12681280   /* sound hardware */
1269   MCFG_SPEAKER_STANDARD_MONO( "mono" )
1270   MCFG_SOUND_ADD( "beeper", BEEP, 0 )
1271   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
1281   MCFG_SPEAKER_STANDARD_MONO("mono")
1282   MCFG_SOUND_ADD("beeper", BEEP, 0)
1283   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
12721284MACHINE_CONFIG_END
12731285
12741286static MACHINE_CONFIG_START( vcc, fidelz80_state )
1287
12751288   /* basic machine hardware */
12761289   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
12771290   MCFG_CPU_PROGRAM_MAP(vcc_z80_mem)
r250291r250292
12971310MACHINE_CONFIG_END
12981311
12991312static MACHINE_CONFIG_START( vsc, fidelz80_state )
1313
13001314   /* basic machine hardware */
13011315   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
13021316   MCFG_CPU_PROGRAM_MAP(vsc_mem)
r250291r250292
13251339MACHINE_CONFIG_END
13261340
13271341static MACHINE_CONFIG_START( bridgec, fidelz80_state )
1342
13281343   /* basic machine hardware */
13291344   MCFG_CPU_ADD("maincpu", Z80, XTAL_5MHz/2) // 2.5MHz
13301345   MCFG_CPU_PROGRAM_MAP(bridgec_z80_mem)
r250291r250292
13411356   MCFG_I8243_ADD("i8243", NOOP, WRITE8(fidelz80_state,digit_w))
13421357
13431358   /* sound hardware */
1344   MCFG_SPEAKER_STANDARD_MONO( "mono" )
1359   MCFG_SPEAKER_STANDARD_MONO("mono")
13451360   MCFG_SOUND_ADD("speech", S14001A, 25000) // around 25khz
1346   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
1361   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
13471362MACHINE_CONFIG_END
13481363
13491364
r250291r250292
14171432 Drivers
14181433******************************************************************************/
14191434
1420/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT      COMPANY                     FULLNAME                                                    FLAGS */
1421COMP( 1978, cc10,       0,          0,      cc10,  fidelz80, driver_device, 0,      "Fidelity Electronics",   "Chess Challenger 10 (Model CC10/BCC)", MACHINE_NOT_WORKING )
1422COMP( 1979, vcc,        0,          0,      vcc,   fidelz80, driver_device, 0,      "Fidelity Electronics",   "Talking Chess Challenger (model VCC)", MACHINE_NOT_WORKING )
1423COMP( 1979, vbrc,       0,          0,      bridgec,   bridgec, driver_device,      0,      "Fidelity Electronics",   "Bridge Challenger (model VBRC/7002)",  MACHINE_NOT_WORKING )
1424COMP( 1980, uvc,        vcc,        0,      vcc,   fidelz80, driver_device, 0,      "Fidelity Electronics",   "Advanced Talking Chess Challenger (model UVC)", MACHINE_NOT_WORKING )
1425COMP( 1980, bridgec3,   vbrc,       0,      bridgec,   bridgec, driver_device,      0,      "Fidelity Electronics",   "Bridge Challenger 3 (model 7014)", MACHINE_NOT_WORKING )
1426COMP( 1980, vsc,        0,          0,      vsc,   vsc, driver_device,      0,      "Fidelity Electronics",   "Voice Sensory Chess Challenger (model VSC)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
1435/*    YEAR  NAME      PARENT  COMPAT  MACHINE  INPUT     INIT              COMPANY, FULLNAME, FLAGS */
1436COMP( 1978, cc10,     0,      0,      cc10,    fidelz80, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (Model CC10/BCC)", MACHINE_NOT_WORKING )
1437COMP( 1979, vcc,      0,      0,      vcc,     fidelz80, driver_device, 0, "Fidelity Electronics", "Talking Chess Challenger (model VCC)", MACHINE_NOT_WORKING )
1438COMP( 1979, vbrc,     0,      0,      bridgec, bridgec,  driver_device, 0, "Fidelity Electronics", "Bridge Challenger (model VBRC/7002)",  MACHINE_NOT_WORKING )
1439COMP( 1980, uvc,      vcc,    0,      vcc,     fidelz80, driver_device, 0, "Fidelity Electronics", "Advanced Talking Chess Challenger (model UVC)", MACHINE_NOT_WORKING )
1440COMP( 1980, bridgec3, vbrc,   0,      bridgec, bridgec,  driver_device, 0, "Fidelity Electronics", "Bridge Challenger 3 (model 7014)", MACHINE_NOT_WORKING )
1441COMP( 1980, vsc,      0,      0,      vsc,     vsc,      driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (model VSC)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
trunk/src/mame/drivers/goldnpkr.cpp
r250291r250292
2424  * Jack Potten's Poker (set 7, Royale GFX),          198?, Bootleg.
2525  * Jack Potten's Poker (set 8, Australian),          198?, Bootleg.
2626  * Good Luck,                                        198?, Unknown.
27  * Super Double (French),                            198?, Karateco.
2827  * Jack Potten's Poker (NGold, set 1),               198?, Unknown.
2928  * Jack Potten's Poker (NGold, set 2),               198?, Unknown.
3029  * Jack Potten's Poker (NGold, set 3),               198?, Unknown.
30  * Buena Suerte (Spanish, set 1),                    1990, Unknown.
31  * Buena Suerte (Spanish, set 2),                    1991, Unknown.
32  * Buena Suerte (Spanish, set 3),                    1991, Unknown.
33  * Buena Suerte (Spanish, set 4),                    1991, Unknown.
34  * Buena Suerte (Spanish, set 5),                    1991, Unknown.
35  * Buena Suerte (Spanish, set 6),                    1991, Unknown.
36  * Buena Suerte (Spanish, set 7),                    1991, Unknown.
37  * Buena Suerte (Spanish, set 8),                    1991, Unknown.
38  * Buena Suerte (Spanish, set 9),                    1991, Unknown.
39  * Buena Suerte (Spanish, set 10),                   1991, Unknown.
40  * Buena Suerte (Spanish, set 11),                   1991, Unknown.
41  * Buena Suerte (Spanish, set 12),                   1991, Unknown.
42  * Buena Suerte (Spanish, set 13),                   1991, Unknown.
43  * Buena Suerte (Spanish, set 14),                   1991, Unknown.
44  * Buena Suerte (Spanish, set 15),                   1991, Unknown.
45  * Buena Suerte (Spanish, set 16),                   1991, Unknown.
46  * Buena Suerte (Spanish, set 17),                   1991, Unknown.
47  * Buena Suerte (Spanish, set 18),                   1991, Unknown.
48  * Buena Suerte (Spanish, set 19),                   1991, Unknown.
49  * Buena Suerte (Spanish, set 20),                   1991, Unknown.
50  * Buena Suerte (Spanish, set 21),                   1991, Unknown.
51  * Buena Suerte (Spanish, set 22),                   1991, Unknown.
52  * Falcons Wild - World Wide Poker,                  1983, Falcon.
53  * Falcons Wild - World Wide Poker (VK set 1),       1990, Video Klein.
54  * Falcons Wild - World Wide Poker (VK set 2),       1990, Video Klein.
55  * Falcons Wild - Wild Card 1991,                    1991, TVG.
3156  * Witch Card (Video Klein CPU box, set 1),          1991, Video Klein.
3257  * Witch Card (Video Klein CPU box, set 2),          1991, Video Klein.
3358  * Witch Card (Spanish, witch game, set 1),          1991, Unknown.
r250291r250292
82107  * Witch Jack (Export, 6T/12T ver 0.87),             1992-1996, Video Klein.
83108  * Witch Jack (Export, 6T/12T ver 0.87-88),          1992-1996, Video Klein.
84109  * Witch Jack (Export, 6T/12T ver 0.87-89),          1992-1996, Video Klein.
85  * Buena Suerte (Spanish, set 1),                    1990, Unknown.
86  * Buena Suerte (Spanish, set 2),                    1991, Unknown.
87  * Buena Suerte (Spanish, set 3),                    1991, Unknown.
88  * Buena Suerte (Spanish, set 4),                    1991, Unknown.
89  * Buena Suerte (Spanish, set 5),                    1991, Unknown.
90  * Buena Suerte (Spanish, set 6),                    1991, Unknown.
91  * Buena Suerte (Spanish, set 7),                    1991, Unknown.
92  * Buena Suerte (Spanish, set 8),                    1991, Unknown.
93  * Buena Suerte (Spanish, set 9),                    1991, Unknown.
94  * Buena Suerte (Spanish, set 10),                   1991, Unknown.
95  * Buena Suerte (Spanish, set 11),                   1991, Unknown.
96  * Buena Suerte (Spanish, set 12),                   1991, Unknown.
97  * Buena Suerte (Spanish, set 13),                   1991, Unknown.
98  * Buena Suerte (Spanish, set 14),                   1991, Unknown.
99  * Buena Suerte (Spanish, set 15),                   1991, Unknown.
100  * Buena Suerte (Spanish, set 16),                   1991, Unknown.
101  * Buena Suerte (Spanish, set 17),                   1991, Unknown.
102  * Buena Suerte (Spanish, set 18),                   1991, Unknown.
103  * Buena Suerte (Spanish, set 19),                   1991, Unknown.
104  * Buena Suerte (Spanish, set 20),                   1991, Unknown.
105  * Buena Suerte (Spanish, set 21),                   1991, Unknown.
106  * Buena Suerte (Spanish, set 22),                   1991, Unknown.
107  * Falcons Wild - World Wide Poker,                  1983, Falcon.
108  * Falcons Wild - World Wide Poker (VK set 1),       1990, Video Klein.
109  * Falcons Wild - World Wide Poker (VK set 2),       1990, Video Klein.
110  * Falcons Wild - Wild Card 1991,                    1991, TVG.
111110  * PlayMan Poker (German),                           1981, PM / Beck Elektronik.
112111  * Super Loco 93 (Spanish, set 1),                   1993, Unknown.
113112  * Super Loco 93 (Spanish, set 2),                   1993, Unknown.
r250291r250292
124123  * Genie (ICP-1, set 2),                             198?, Unknown.
125124  * Silver Game,                                      1983, Unknown.
126125  * Casino Poker (Ver PM86LO-35-5, German),           1987, PM / Beck Elektronik.
126  * Super Double (French),                            198?, Karateco.
127127  * "Unknown French poker game",                      198?, Unknown.
128128  * "Unknown encrypted poker game",                   198?, Unknown.
129129  * "Unknown Sisteme France Poker",                   198?, Sisteme France.
r250291r250292
10461046  - Added games & technical notes.
10471047
10481048
1049  [2015-11-09]
1050
1051  - Renamed and rearranged the parent/clone relationship
1052     of Witch Jack sets.
1053  - Added partial decryption to the ICP1 daughterboard games.
1054     (currently only pokerduc set). Since it's just partial,
1055     commented out the code for now....
1056  - Added port impulse to the Golden Poker's second coin slot.
1057     This is needed for both royale sets.
1058  - Some fixes and clean-ups.
1059
1060
10491061  TODO:
10501062
10511063  - Missing PIA connections.
r250291r250292
17721784   PORT_START("IN0-3")
17731785   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2)
17741786   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) /* O.A.R? (D-31 in schematics) */
1775   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Coupon (Note In)")
1787   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_IMPULSE(3) PORT_NAME("Coupon (Note In)")
17761788   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin In")
17771789   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )   PORT_NAME("Weight (Coupon In)")
17781790   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
r250291r250292
44874499   ROM_LOAD( "prg.bin",    0x4000, 0x4000, CRC(d7a932a2) SHA1(c940ea90378a631c217a09c4a9e73c382acaa48d) )
44884500
44894501   ROM_REGION( 0x3000, "gfx1", 0 )
4490   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4502   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
44914503   ROM_LOAD( "3.bin",  0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) )    /* text layer */
44924504
44934505   ROM_REGION( 0x1800, "gfx2", 0 )
4494   ROM_LOAD( "0.bin",    0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
4495   ROM_LOAD( "1.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
4496   ROM_LOAD( "2.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
4506   ROM_LOAD( "0.bin",  0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
4507   ROM_LOAD( "1.bin",  0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
4508   ROM_LOAD( "2.bin",  0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
44974509
44984510   ROM_REGION( 0x0100, "proms", 0 )
4499   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4511   ROM_LOAD( "82s129.9c",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45004512ROM_END
45014513
45024514/* Unknown australian hard to dump set
r250291r250292
45204532   ROM_LOAD( "bprom.bin",    0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45214533ROM_END
45224534
4535/* Unknown australian set
4536   String "just 4 fun" replaces the "insert coins" one.
4537*/
4538ROM_START( potnpkrh )
4539   ROM_REGION( 0x10000, "maincpu", 0 )
4540   ROM_LOAD( "unk_2732.15a", 0x2000, 0x1000, CRC(441ad1b2) SHA1(248b8e03723989c7766b50858c9a5d0abbb5e055) )
4541   ROM_LOAD( "unk_2732.17a", 0x3000, 0x1000, CRC(9d72e145) SHA1(526d88c70e03bcff18072436ca3d498a0bb39913) )
4542
4543   /* Backcard logo is different, showing 'FR'. The rest matches the common char gfx */
4544   ROM_REGION( 0x1800, "gfx1", 0 )
4545   ROM_FILL(                  0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
4546   ROM_LOAD( "unk_2716.8a",   0x1000, 0x0800, CRC(a138afa6) SHA1(80c6d11086f78e36dfc01c15b23e70667fcf17fc) )    /* char ROM */
4547
4548   /* Backplane at 5a has two bits different against the common cards gfx
4549       Offsets 0x380 and 0x400, bit0 is set to 0 */
4550   ROM_REGION( 0x1800, "gfx2", 0 )
4551   ROM_LOAD( "unk_2716.4a",  0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
4552   ROM_LOAD( "unk_2716.5a",  0x0800, 0x0800, CRC(daf38d03) SHA1(6b518494688756ad7b753fdec46b6392c4a9ebbe) )    /* cards deck gfx, bitplane2 */
4553   ROM_LOAD( "unk_2716.7a",  0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
4554
4555   ROM_REGION( 0x0100, "proms", 0 )
4556   ROM_LOAD( "bprom.bin",    0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4557ROM_END
4558
4559
45234560ROM_START( goodluck )
45244561   ROM_REGION( 0x10000, "maincpu", 0 )
45254562   ROM_LOAD( "goodluck_glh6b.bin", 0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) )
r250291r250292
45344571   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
45354572
45364573   ROM_REGION( 0x0100, "proms", 0 )
4537   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4574   ROM_LOAD( "82s129.9c",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
45384575ROM_END
45394576
4540/****************************************************
45414577
4542  Super Double (Karateco)
4543
4544  French text with some intentional typos to fit size.
4545  Uses both 0x2000..0x3fff and 0x7000..0x7fff ROM range.
4546
4547  This is either the game advertised as "The Double",
4548  or a successor thereof.
4549
4550*****************************************************/
4551
4552ROM_START( superdbl )
4553   ROM_REGION( 0x10000, "maincpu", 0 )
4554   ROM_LOAD( "sd6",  0x7000, 0x1000, CRC(3cf1ccb8) SHA1(c589ddf2e97abb9d95375d0964fd0aa6f7e2e468) )
4555   ROM_LOAD( "sd7",  0x2000, 0x1000, CRC(f5136f82) SHA1(f086cd5495097ede037ea6cae584e95bfcd7b239) )
4556   ROM_LOAD( "8",    0x3000, 0x1000, CRC(157332c2) SHA1(3c66200c49641b9d876c5fa134dd2f0e80136beb) )
4557
4558   ROM_REGION( 0x1800, "gfx1", 0 )
4559   ROM_FILL(                 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
4560   ROM_LOAD( "4",    0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) )    /* text layer */
4561
4562   ROM_REGION( 0x1800, "gfx2", 0 )
4563   ROM_LOAD( "1",    0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
4564   ROM_LOAD( "2",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
4565   ROM_LOAD( "3",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
4566
4567   ROM_REGION( 0x0100, "proms", 0 )
4568   ROM_LOAD( "tbp24sa10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4569ROM_END
4570
45714578/************************************************************
45724579
45734580  Ngold (3 sets).
r250291r250292
46354642ROM_END
46364643
46374644
4638/******************************* WITCH CARD SETS *******************************/
4645/**************************************** BUENA SUERTE SETS ****************************************/
46394646
4640/*  Witch Card (Video Klein)
4641    Video Klein original with epoxy block module
4642*/
4643   ROM_START( witchcrd )
4644   ROM_REGION( 0x10000, "maincpu", 0 )
4645   ROM_LOAD( "epoxy_27128.bin",    0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) )  /* epoxy block program ROM */
4646
4647   ROM_REGION( 0x3000, "gfx1", 0 )
4648   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4649   ROM_LOAD( "wc4.7a", 0x2000, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) )    /* text layer */
4650   ROM_LOAD( "wc4.7a", 0x2800, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) )    /* text layer */
4651
4652   ROM_REGION( 0x3000, "gfx2", 0 )
4653   ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
4654   ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
4655   ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
4656
4657   ROM_REGION( 0x0200, "proms", 0 )
4658   ROM_LOAD( "82s129.7d",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
4659   ROM_LOAD( "epoxy_82s129.bin",   0x0100, 0x0100, CRC(f0c012b1) SHA1(5502977404172e8c5b9fbf305581a406668ad1d9) ) /* original epoxy block PROM */
4660ROM_END
4661
4662/*  Witch Card (Spanish, set 1)
4663    Unknown argentine manufacturer.
4664*/
4665ROM_START( witchcda )
4666   ROM_REGION( 0x10000, "maincpu", 0 )
4667   ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) )
4668
4669   ROM_REGION( 0x3000, "gfx1", 0 )
4670   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4671   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
4672
4673   ROM_REGION( 0x3000, "gfx2", 0 )
4674   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
4675   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
4676   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
4677
4678   ROM_REGION( 0x0100, "proms", 0 )
4679   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4680ROM_END
4681
4682/*  Witch Card (Spanish, set 2)
4683    Unknown argentine manufacturer.
4684*/
4685ROM_START( witchcdb )
4686   ROM_REGION( 0x10000, "maincpu", 0 )
4687   ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) )
4688
4689   ROM_REGION( 0x3000, "gfx1", 0 )
4690   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4691   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
4692
4693   ROM_REGION( 0x3000, "gfx2", 0 )
4694   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
4695   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
4696   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
4697
4698   ROM_REGION( 0x0100, "proms", 0 )
4699   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4700ROM_END
4701
4702/*  Witch Card (English, no witch game)
4703    Hack?
4704*/
4705ROM_START( witchcdc )
4706   ROM_REGION( 0x10000, "maincpu", 0 )
4707   ROM_LOAD( "wc_sbruj.256",   0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
4708
4709   ROM_REGION( 0x3000, "gfx1", 0 )
4710   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4711   ROM_LOAD( "bs_4_wc.032",    0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
4712
4713   ROM_REGION( 0x3000, "gfx2", 0 )
4714   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
4715   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
4716   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
4717
4718   ROM_REGION( 0x0100, "proms", 0 )
4719   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
4720ROM_END
4721
4722/***************************************
4723
4724  Witch Card (German, WC3050, set 1 )
4725
4726  TV GAME ELEKTRONIK 1994
4727         PROMA
4728   CASINOVERSION WC3050
4729
4730***************************************/
4731
4732   ROM_START( witchcdd )
4733   ROM_REGION( 0x10000, "maincpu", 0 )
4734   ROM_LOAD( "12a.bin",    0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
4735
4736   ROM_REGION( 0x6000, "gfx1", 0 )
4737   ROM_FILL(                   0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
4738   ROM_LOAD( "ce-3-tvg.bin",   0x4000, 0x2000, CRC(54b51497) SHA1(8c3a74377fde8c7c5a6b277a9c1e717e6bdd98f8) )    /* text layer */
4739
4740   ROM_REGION( 0x6000, "gfx2", 0 )
4741   ROM_LOAD( "ce-1-tvg.bin",   0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
4742   ROM_LOAD( "ce-2-tvg.bin",   0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
4743   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
4744
4745   ROM_REGION( 0x0100, "proms", 0 )
4746   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
4747ROM_END
4748
4749/*  Witch Card (Video Klein)
4750    Video Klein original with epoxy block module.
4751    Alt set....
4752*/
4753   ROM_START( witchcde )
4754   ROM_REGION( 0x10000, "maincpu", 0 )
4755   ROM_LOAD( "27128_epoxy.bin",    0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) )  /* epoxy block program ROM */
4756
4757   ROM_REGION( 0x4000, "temp", 0 )
4758   ROM_LOAD( "wc1.a2", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )
4759   ROM_LOAD( "wc2.a4", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )
4760   ROM_LOAD( "wc3.a5", 0x2000, 0x1000, CRC(a03f2d68) SHA1(6d81b1e92f40f7150498b65941d5a9ab64a89790) )
4761   ROM_LOAD( "wc4.a7", 0x3000, 0x1000, CRC(d3694522) SHA1(0f66ff2dd5c7ac9bf91fa9f48eb9f356572e814c) )
4762
4763   ROM_REGION( 0x1800, "gfx1", 0 )
4764   ROM_FILL(                   0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
4765   ROM_COPY( "temp",   0x3800, 0x1000, 0x0800 )    /* 0800-0fff of wc4.a7 - charset */
4766
4767   ROM_REGION( 0x1800, "gfx2", 0 ) /* 2nd half of each ROM */
4768   ROM_COPY( "temp",   0x0800, 0x0000, 0x0800 )    /* 0800-0fff of wc1.a2 - regular cards gfx, bitplane 1 */
4769   ROM_COPY( "temp",   0x1800, 0x0800, 0x0800 )    /* 0800-0fff of wc2.a4 - regular cards gfx, bitplane 2 */
4770   ROM_COPY( "temp",   0x2800, 0x1000, 0x0800 )    /* 0800-0fff of wc3.a5 - regular cards gfx, bitplane 3 */
4771
4772   ROM_REGION( 0x0200, "proms", 0 )
4773   ROM_LOAD( "24s10.bin",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
4774   ROM_LOAD( "24s10_epoxy.bin",    0x0100, 0x0100, CRC(ddfd7034) SHA1(78dee69ab4ba759485ee7f00446c2d86f08cc50f) ) /* original epoxy block PROM */
4775ROM_END
4776
4777/*  Witch Card (English, witch game, lights)
4778    PCB by PM. Hybrid hardware.
4779
4780    Copyright 1983/84/85
4781    W.BECK ELEKTRONIK
4782*/
4783ROM_START( witchcdf )
4784   ROM_REGION( 0x10000, "maincpu", 0 )
4785   ROM_LOAD( "$25.bin",    0x5000, 0x1000, CRC(afd6cb4a) SHA1(4c769e1c724bada5875e028781086c32967953a1) )
4786   ROM_LOAD( "$26.bin",    0x6000, 0x1000, CRC(ad11960c) SHA1(2b562cfe9401e21c9dcd90307165e2c2d1acfc5b) )
4787   ROM_LOAD( "$27.bin",    0x7000, 0x1000, CRC(e6f9c973) SHA1(f209d13d1565160bc2c05c6c4fce73d14a9a56ab) )
4788
4789   ROM_REGION( 0x3000, "gfx1", 0 )
4790   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4791   ROM_LOAD( "$14.bin",    0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) )    /* text layer */
4792
4793   ROM_REGION( 0x3000, "gfx2", 0 )
4794   ROM_LOAD( "11.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
4795   ROM_LOAD( "12.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
4796   ROM_LOAD( "13.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
4797
4798   ROM_REGION( 0x0100, "proms", 0 )
4799   ROM_LOAD( "wc_bprom.bin",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
4800ROM_END
4801
4802/*******************************************
4803
4804  Witch Card (Falcon)
4805  Original Falcon PCB marked
4806  "831 1.1 MADE IN JAPAN"
4807
4808  Same board as Falcons Wild, but without
4809  extra RAM / ROM / encrypted 2nd CPU.
4810
4811  AY8910 is present.
4812
4813*******************************************/
4814
4815ROM_START( witchcdg )
4816   ROM_REGION( 0x10000, "maincpu", 0 )
4817   ROM_LOAD( "6.b9",   0x5000, 0x1000, CRC(70462a63) SHA1(9dfa18bf7d4e0803f2a68e64661ece392a7983cc) )
4818   ROM_LOAD( "7.b11",  0x6000, 0x1000, CRC(227b3801) SHA1(aebabce01b1abdb42b3e49c38f4fe429e65c1a88) )
4819   ROM_LOAD( "8.b13",  0x7000, 0x1000, CRC(6bb0059e) SHA1(c5f515b692c3353323aff77f087bf0a92a8d99cf) )
4820
4821   ROM_REGION( 0x3000, "gfx2", 0 )
4822   ROM_LOAD( "3.b5",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
4823   ROM_FILL(           0x0800, 0x0800, 0 ) /* filling the bitplane */
4824   ROM_LOAD( "2.b3",   0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
4825   ROM_FILL(           0x1800, 0x0800, 0 ) /* filling the bitplane */
4826   ROM_LOAD( "1.b1",   0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) )    /* cards deck gfx, bitplane3 */
4827
4828   ROM_REGION( 0x3000, "gfx1", 0 )
4829   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4830   ROM_COPY( "gfx2",   0x2800, 0x2000, 0x0800 )    /* srctag, srcoffs, offset, length */
4831
4832   ROM_REGION( 0x0100, "proms", 0 )
4833//  ROM_LOAD( "82s129.7d",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
4834   ROM_LOAD( "tbp24s10n.d2",   0x0000, 0x0100, BAD_DUMP CRC(3db3b9e0) SHA1(c956493d5d754665d214b416e6a473d73c22716c) )
4835ROM_END
4836
4837/***************************************
4838
4839  Witch Card (German, WC3050, set 2 )
4840
4841  TV GAME ELEKTRONIK 1994
4842         PROMA
4843   CASINOVERSION WC3050
4844
4845***************************************/
4846
4847ROM_START( witchcdh )
4848   ROM_REGION( 0x10000, "maincpu", 0 )
4849   ROM_LOAD( "prog3000.a12",   0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
4850
4851   ROM_REGION( 0x6000, "gfx1", 0 )
4852   ROM_FILL(               0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
4853   ROM_LOAD( "wc3050.a5",  0x4000, 0x2000, CRC(6f35b9c4) SHA1(df86687164f18f2bfe71e73cccd28fe4117e748c) )    /* text layer, alt gfx */
4854
4855   ROM_REGION( 0x6000, "gfx2", 0 )
4856   ROM_LOAD( "wc1.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */ // sldh
4857   ROM_LOAD( "wc1.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */ // sldh
4858   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
4859
4860   ROM_REGION( 0x0100, "proms", 0 )
4861   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
4862ROM_END
4863
4864/***************************************
4865
4866  Witch Card (German, WC3050, 27-4-94)
4867
4868  TV GAME ELEKTRONIK 1994
4869         PROMA
4870   CASINOVERSION WC3050
4871
4872****************************************
4873
487401.a2                                           BADADDR           --xxxxxxxxxx
487502.a4                                           BADADDR           --xxxxxxxxxx
487603.a5                                           1ST AND 2ND HALF IDENTICAL
487727s21.d7                                        FIXED BITS (0000xxxx)
4878                        tbp24s10n.7d            FIXED BITS (0000xxxx)
4879                        ce-2-tvg.bin            BADADDR           --xxxxxxxxxx
4880                        ce-1-tvg.bin            BADADDR           --xxxxxxxxxx
488101.a2                   ce-1-tvg.bin            IDENTICAL
488202.a4                   ce-2-tvg.bin            IDENTICAL
488327s21.d7                tbp24s10n.7d            IDENTICAL
488403.a5        [2/4]      ce-3-tvg.bin [2/4]      IDENTICAL
488504.a12       [2/4]      12a.bin      [2/4]      IDENTICAL
488603.a5        [2/4]      ce-3-tvg.bin [4/4]      IDENTICAL
488703.a5        [4/4]      ce-3-tvg.bin [2/4]      IDENTICAL
488803.a5        [4/4]      ce-3-tvg.bin [4/4]      IDENTICAL
488904.a12       [1/4]      12a.bin      [1/4]      99.609375%
489004.a12       [3/4]      12a.bin      [3/4]      99.414063%
489104.a12       [4/4]      12a.bin      [4/4]      96.020508%
489203.a5        [1/4]      ce-3-tvg.bin [1/4]      88.378906%
489303.a5        [3/4]      ce-3-tvg.bin [1/4]      88.378906%
4894
4895***************************************/
4896
4897   ROM_START( witchcdi )
4898   ROM_REGION( 0x10000, "maincpu", 0 )
4899   ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) )
4900
4901   ROM_REGION( 0x6000, "gfx1", 0 )
4902   ROM_FILL(                   0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
4903   ROM_LOAD( "03.a5",  0x4000, 0x2000, CRC(f181e5aa) SHA1(44a7696bd223effbc7542142a0c3c623c628071d) )    /* text layer */
4904
4905   ROM_REGION( 0x6000, "gfx2", 0 )
4906   ROM_LOAD( "01.a2",  0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
4907   ROM_LOAD( "02.a4",  0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
4908   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
4909
4910   ROM_REGION( 0x0100, "proms", 0 )
4911   ROM_LOAD( "27s21.d7",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
4912ROM_END
4913
4914/******************************************
4915
4916  Witch Game (Video Klein)
4917
4918  Another evil hardware from Video Klein
4919  with CPU box. Marked "12T1"
4920
4921******************************************/
4922
4923ROM_START( witchgme )
4924   ROM_REGION( 0x10000, "maincpu", 0 ) /* Video Klein */
4925   ROM_LOAD( "hn58c256p.box12t1",  0x0000, 0x8000, CRC(26c334cb) SHA1(d8368835c88668f09560f6096148a6e528806f65) )
4926
4927   ROM_REGION( 0x3000, "gfx2", 0 )
4928   ROM_LOAD( "1.2a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )  /* cards deck gfx, bitplane1 */
4929   ROM_FILL(           0x0800, 0x0800, 0 ) /* filling the bitplane */
4930   ROM_LOAD( "2.4a",   0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )  /* cards deck gfx, bitplane2 */
4931   ROM_FILL(           0x1800, 0x0800, 0 ) /* filling the bitplane */
4932   ROM_LOAD( "3.5a",   0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) )  /* text layer */
4933
4934   ROM_REGION( 0x3000, "gfx1", 0 )
4935   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4936   ROM_COPY( "gfx2",   0x2800, 0x2000, 0x0800 )    /* srctag, srcoffs, offset, length */
4937
4938   ROM_REGION( 0x0100, "proms", 0 )
4939   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
4940
4941   ROM_REGION( 0x0100, "proms2", 0 )
4942   ROM_LOAD( "tbp24s10n.2c",   0x0000, 0x0100, CRC(7c2aa098) SHA1(539ff9239b1b553b3883c9f0223aafcf217f9fc7) )
4943ROM_END
4944
4945/*  Witch Game (Video Klein)
4946    Video Klein original with epoxy block module.
4947    Alt set....
4948*/
4949   ROM_START( witchcdk )
4950   ROM_REGION( 0x10000, "maincpu", 0 )
4951   ROM_LOAD( "wc_epoxy.bin",   0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) )  /* epoxy block program ROM */
4952
4953   ROM_REGION( 0x3000, "gfx1", 0 )
4954   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
4955   ROM_LOAD( "wc4.7a",  0x2000, 0x1000, BAD_DUMP CRC(3bf07c44) SHA1(f6e859b142b7d4585b89ca609d8bc85c84fe2b09) )    /* text chars, corrupt */ // sldh
4956   ROM_COPY( "gfx1",    0x2800, 0x2000, 0x0800 )   /* srctag, srcoffs, offset, length */
4957
4958   ROM_REGION( 0x3000, "gfx2", 0 )
4959   ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(f59c6fd2) SHA1(bea4b6043728311ca9fff36e2d7e24254af5b97a) )    /* cards deck gfx, bitplane1 */ // sldh
4960   ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
4961   ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
4962
4963   ROM_REGION( 0x0600, "proms", 0 )
4964   ROM_LOAD( "24s10.bin",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
4965   ROM_LOAD( "82s137_epoxy.bin",   0x0100, 0x0400, CRC(4ae3ecf5) SHA1(e1e540ae13e7ce5ac6391f325160ec997ea6cc2f) ) /* original epoxy block PROM */
4966ROM_END
4967
4968
4969/******************************* BUENA SUERTE SETS *******************************/
4970
49714647/*
49724648    checksum routine at $5827
49734649    protect $4000+ & $7ff9.
r250291r250292
53495025ROM_END
53505026
53515027
5352/******************************* FALCONS WILD SETS *******************************/
5028/**************************************** VIDEO KLEIN SETS ****************************************/
53535029
5354/*********************************************
53555030
5356    Falcons Wild - Wild Card 1991.
5357    1992-1992 TVG D-6310 GRUENBERG.
5358    (bootleg in real Bonanza hardware).
5031/*********** WITCH CARD SETS *************/
53595032
5360  dm74s287n.7d     FIXED BITS (0000xxxx)
5361  fw1.2a           BADADDR     x-xxxxxxxxxxx
5362  fw2.4a           BADADDR     x-xxxxxxxxxxx
5363  fw3.5a           1ST AND 2ND HALF IDENTICAL
5364  nosticker.12a    x0xxxxxxxxxxxxxx = 0x00
5365
5366  fw3.5a is bitrotten.
5367
5368**********************************************/
5369
5370ROM_START( falcnwld )
5371   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild */
5372   ROM_LOAD( "nosticker.12a",  0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) )
5373
5374   ROM_REGION( 0x6000, "temp", 0 )
5375   ROM_LOAD( "fw1.2a", 0x0000, 0x2000, CRC(d5a58098) SHA1(9c8860949b0adcd20222e9b3e3e8e7e864e8f39f) )  /* cards deck gfx, bitplane1 */
5376   ROM_LOAD( "fw2.4a", 0x2000, 0x2000, CRC(b28b7759) SHA1(513229cee451f59f824b7a64932679f91fbb324d) )  /* cards deck gfx, bitplane2 */
5377   ROM_LOAD( "fw3.5a", 0x4000, 0x2000, BAD_DUMP CRC(98edfc82) SHA1(e3dd597245b55c3bc6ea86acf80ee024ca28f564) )  /* text layer + cards deck gfx, bitplane3 */
5378
5379   ROM_REGION( 0x1800, "gfx1", 0 )
5380   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
5381   ROM_COPY( "temp",   0x4000, 0x1000, 0x0800 )    /* first quarter of fw3.5a */
5382
5383   ROM_REGION( 0x1800, "gfx2", 0 )
5384   ROM_COPY( "temp",   0x0000, 0x0000, 0x0800 )    /* first quarter of fw1.2a */
5385   ROM_COPY( "temp",   0x2000, 0x0800, 0x0800 )    /* first quarter of fw2.4a */
5386   ROM_COPY( "temp",   0x4800, 0x1000, 0x0800 )    /* second quarter of fw3.5a */
5387
5388   ROM_REGION( 0x0100, "proms", 0 )
5389   ROM_LOAD( "dm74s287n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5390ROM_END
5391
5392/************************************
5393
5394  Falcon's Wild - World Wide Poker.
5395  1991, Video Klein
5396
5397  CPU BOX
5398
5399************************************/
5400
5401ROM_START( falcnwlda )
5402   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Video Klein */
5403   ROM_LOAD( "nmc27c256.box",  0x0000, 0x8000, CRC(a0072c55) SHA1(27b84a896ff06a423450d8f0851f42f3e8ec5466) )
5404   ROM_RELOAD(                 0x8000, 0x8000 )
5405
5406   ROM_REGION( 0x1800, "gfx1", 0 )
5407   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling bitplanes */
5408   ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) )  /* chars gfx */
5409
5410   ROM_REGION( 0x1800, "gfx2", 0 )
5411   ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) )  /* cards deck gfx, bitplane1 */ // sldh
5412   ROM_IGNORE(                 0x0800)
5413   ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )  /* cards deck gfx, bitplane2 */ // sldh
5414   ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) )  /* cards deck gfx, bitplane3 */ // sldh
5415
5416   ROM_REGION( 0x0100, "proms", 0 )
5417   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5418ROM_END
5419
5420ROM_START( falcnwldb )
5421   ROM_REGION( 0x10000, "maincpu", 0 ) /* World Wide Poker / 1992-11-04 */
5422   ROM_LOAD( "fw12t1_19921104.bin",    0x0000, 0x8000, CRC(8b4f8cac) SHA1(e3bcbadaa157db48a41369a3fcdba536f8ca679e) )
5423   ROM_RELOAD(                         0x8000, 0x8000 )
5424
5425   ROM_REGION( 0x1800, "gfx1", 0 )
5426   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling bitplanes */
5427   ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) )  /* chars gfx */
5428
5429   ROM_REGION( 0x1800, "gfx2", 0 )
5430   ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) )  /* cards deck gfx, bitplane1 */ // sldh
5431   ROM_IGNORE(                 0x0800)
5432   ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )  /* cards deck gfx, bitplane2 */ // sldh
5433   ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) )  /* cards deck gfx, bitplane3 */ // sldh
5434
5435   ROM_REGION( 0x0100, "proms", 0 )
5436   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5437ROM_END
5438
5439/***********************************************
5440
5441  Falcon's Wild - World Wide Poker
5442  1983, Falcon.
5443
5444  Original Falcon PCB marked
5445  "831 1.1 MADE IN JAPAN"
5446
5447  Same board as Witch Card (Falcon), but with
5448  extra RAM + ROM + encrypted 2nd CPU + AY8910.
5449
5450  The encrypted 40-pin CPU is scratched,
5451  and seems based on a Z80.
5452
5453***********************************************/
5454
5455ROM_START( falcnwldc )
5456   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Falcon original */
5457//  ROM_LOAD( "nosticker.12a",  0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) )
5458   ROM_LOAD( "4.b6",           0x3000, 0x1000, CRC(88684a8f) SHA1(5ffa0808b502e93ddcb8f13929008aec2836a773) )
5459   ROM_LOAD( "5.b8",           0x4000, 0x1000, CRC(aa5de05c) SHA1(98559b35c7c31a41b1818a6e60ec82f43a5d1b4a) )
5460   ROM_LOAD( "6-syncmod.b9",   0x5000, 0x1000, CRC(21cfa807) SHA1(ff908a5a43b3736494127539d6485648d8be1a9a) )  // ok
5461   ROM_LOAD( "7.b11",          0x6000, 0x1000, CRC(d63bba8e) SHA1(09902574985a945117ec22d738c94fee72e673af) )
5462   ROM_LOAD( "8.b13",          0x7000, 0x1000, CRC(251d6abf) SHA1(2384ae674bfbe96c19a3b66c7efa1e5e8b444f48) )  // ok
5463
5464   ROM_REGION( 0x10000, "mcu", 0 )
5465   ROM_LOAD( "9.f10",  0x0000, 0x1000, CRC(22f1c52a) SHA1(6429a802e92f6b77446550a303567798a231f6d7) )  // MCU prg
5466
5467   ROM_REGION( 0x6000, "temp", 0 )
5468   ROM_LOAD( "1.b1",   0x0000, 0x1000, CRC(fd95955d) SHA1(e5c029bc5683d06c2e5250c1271613232a058fcd) )
5469   ROM_LOAD( "2.b3",   0x1000, 0x0800, CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )
5470   ROM_LOAD( "3.b4",   0x1800, 0x0800, CRC(d9246780) SHA1(4ceb24131ec6208b742ba80373201aa53c50732d) )
5471
5472   ROM_REGION( 0x1800, "gfx1", 0 )
5473   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
5474   ROM_COPY( "temp",   0x0800, 0x1000, 0x0800 )    /* second half of 1.b1 */
5475
5476   ROM_REGION( 0x1800, "gfx2", 0 )
5477   ROM_COPY( "temp",   0x1800, 0x0000, 0x0800 )    /* first half of 3.b4 */
5478   ROM_COPY( "temp",   0x1000, 0x0800, 0x0800 )    /* whole 2.b3 */
5479   ROM_COPY( "temp",   0x0000, 0x1000, 0x0800 )    /* first half of 1.b1 */
5480
5481   ROM_REGION( 0x0100, "proms", 0 )
5482   ROM_LOAD( "falcon_1.bin",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5483ROM_END
5484
5485
5486/******************************* OTHER SETS *******************************/
5487
5488ROM_START( pmpoker )
5033/*  Witch Card (Video Klein)
5034    Video Klein original with epoxy block module
5035*/
5036   ROM_START( witchcrd )
54895037   ROM_REGION( 0x10000, "maincpu", 0 )
5490   ROM_LOAD( "2-5.bin",    0x5000, 0x1000, CRC(3446a643) SHA1(e67854e3322e238c17fed4e05282922028b5b5ea) )
5491   ROM_LOAD( "2-6.bin",    0x6000, 0x1000, CRC(50d2d026) SHA1(7f58ab176de0f0f7666d87271af69a845faec090) )
5492   ROM_LOAD( "2-7.bin",    0x7000, 0x1000, CRC(a9ab972e) SHA1(477441b7ff3acae3a5d5a3e4c2a428e0b3121534) )
5038   ROM_LOAD( "epoxy_27128.bin",    0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) )  /* epoxy block program ROM */
54935039
5494   ROM_REGION( 0x1800, "gfx1", 0 )
5495   ROM_FILL(               0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5496   ROM_LOAD( "1-4.bin",    0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) )    /* text layer */
5497
5498   ROM_REGION( 0x1800, "gfx2", 0 )
5499   ROM_LOAD( "1-1.bin",    0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
5500   ROM_LOAD( "1-2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5501   ROM_LOAD( "1-3.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
5502
5503   ROM_REGION( 0x0100, "proms", 0 )
5504   ROM_LOAD( "tbp24sa10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5505ROM_END
5506
5507ROM_START( royale )
5508   ROM_REGION( 0x10000, "maincpu", 0 )
5509   ROM_LOAD( "royalex.bin",    0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) )
5510
55115040   ROM_REGION( 0x3000, "gfx1", 0 )
55125041   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5513   ROM_LOAD( "royalechr.bin",  0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
5042   ROM_LOAD( "wc4.7a", 0x2000, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) )    /* text layer */
5043   ROM_LOAD( "wc4.7a", 0x2800, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) )    /* text layer */
55145044
5515   ROM_REGION( 0x1800, "gfx2", 0 )
5516   ROM_LOAD( "royale3.bin",    0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
5517   ROM_LOAD( "royale2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5518   ROM_LOAD( "royale1.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
5045   ROM_REGION( 0x3000, "gfx2", 0 )
5046   ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
5047   ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
5048   ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
55195049
5520   ROM_REGION( 0x0100, "proms", 0 )
5521   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5050   ROM_REGION( 0x0200, "proms", 0 )
5051   ROM_LOAD( "82s129.7d",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
5052   ROM_LOAD( "epoxy_82s129.bin",   0x0100, 0x0100, CRC(f0c012b1) SHA1(5502977404172e8c5b9fbf305581a406668ad1d9) ) /* original epoxy block PROM */
55225053ROM_END
55235054
5524ROM_START( royalea )
5055/*  Witch Card (Spanish, set 1)
5056    Unknown argentine manufacturer.
5057*/
5058ROM_START( witchcda )
55255059   ROM_REGION( 0x10000, "maincpu", 0 )
5526   ROM_LOAD( "royal.256", 0x0000, 0x8000, CRC(9d7fdb79) SHA1(05cae00bca0f6ae696c69f531cb0fa2104ff696a) )
5060   ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) )
55275061
55285062   ROM_REGION( 0x3000, "gfx1", 0 )
55295063   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5530   ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
5064   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
55315065
5532   ROM_REGION( 0x1800, "gfx2", 0 )
5533   ROM_LOAD( "royale3.bin",    0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
5534   ROM_LOAD( "royale2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5535   ROM_LOAD( "royale1.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
5536
5537   ROM_REGION( 0x0100, "proms", 0 )
5538   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5539ROM_END
5540
5541ROM_START( sloco93 )
5542   ROM_REGION( 0x10000, "maincpu", 0 )
5543   ROM_LOAD( "locoloco.128",   0x4000, 0x4000, CRC(f626a770) SHA1(afbd33b3f65b8a781c716a3d6e5447aa817d856c) )
5544
5545   ROM_REGION( 0x3000, "gfx1", 0 )
5546   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5547   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
5548
55495066   ROM_REGION( 0x3000, "gfx2", 0 )
55505067   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
55515068   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
r250291r250292
55555072   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
55565073ROM_END
55575074
5558ROM_START( sloco93a )
5075/*  Witch Card (Spanish, set 2)
5076    Unknown argentine manufacturer.
5077*/
5078ROM_START( witchcdb )
55595079   ROM_REGION( 0x10000, "maincpu", 0 )
5560   ROM_LOAD( "locoloco.256",   0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) )
5080   ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) )
55615081
55625082   ROM_REGION( 0x3000, "gfx1", 0 )
55635083   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5564   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
5084   ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) )    /* text layer */
55655085
55665086   ROM_REGION( 0x3000, "gfx2", 0 )
55675087   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
r250291r250292
55725092   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
55735093ROM_END
55745094
5575/*
5576    checksum routine at $5f3e
5577    protect $4000+ & $7ff9.
5578    (see cmp at $5f6b)
5579    balanced at $7ff8.
5095/*  Witch Card (English, no witch game)
5096    Hack?
55805097*/
5581ROM_START( maverik )
5582   ROM_REGION( 0x10000, "maincpu", 0 ) /* maverik: Maverik (ind arg, fixed, changed logo) */
5583   ROM_LOAD( "maverik.bin",    0x0000, 0x8000, CRC(65a986e9) SHA1(2e825d3fb2346036357af0e12d3a75b5ef6cfd0d) )
5098ROM_START( witchcdc )
5099   ROM_REGION( 0x10000, "maincpu", 0 )
5100   ROM_LOAD( "wc_sbruj.256",   0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
55845101
55855102   ROM_REGION( 0x3000, "gfx1", 0 )
5586   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5587   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5103   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5104   ROM_LOAD( "bs_4_wc.032",    0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
55885105
55895106   ROM_REGION( 0x3000, "gfx2", 0 )
55905107   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
r250291r250292
55955112   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
55965113ROM_END
55975114
5598/*****************************
5115/***************************************
55995116
5600  Brasil XX sets...
5117  Witch Card (German, WC3050, set 1 )
56015118
5602 ****************************/
5603ROM_START( brasil86 )
5604   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil86.128: Brasil 86, BS clone. */
5605   ROM_LOAD( "brasil86.128",   0x4000, 0x4000, CRC(0e88b434) SHA1(80f921c277f4253c29ee80e9cfb046ade1f66300) )
5119  TV GAME ELEKTRONIK 1994
5120         PROMA
5121   CASINOVERSION WC3050
56065122
5607   ROM_REGION( 0x3000, "gfx1", 0 )
5608   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5609   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5123***************************************/
5124ROM_START( witchcdd )
5125   ROM_REGION( 0x10000, "maincpu", 0 )
5126   ROM_LOAD( "12a.bin",    0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
56105127
5611   ROM_REGION( 0x3000, "gfx2", 0 )
5612   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5613   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5614   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5128   ROM_REGION( 0x6000, "gfx1", 0 )
5129   ROM_FILL(                   0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
5130   ROM_LOAD( "ce-3-tvg.bin",   0x4000, 0x2000, CRC(54b51497) SHA1(8c3a74377fde8c7c5a6b277a9c1e717e6bdd98f8) )    /* text layer */
56155131
5616   ROM_REGION( 0x0100, "proms", 0 )
5617   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5618ROM_END
5132   ROM_REGION( 0x6000, "gfx2", 0 )
5133   ROM_LOAD( "ce-1-tvg.bin",   0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
5134   ROM_LOAD( "ce-2-tvg.bin",   0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
5135   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
56195136
5620ROM_START( brasil87 )
5621   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil87.128: Brasil 87, BS clone. */
5622   ROM_LOAD( "brasil87.128",   0x4000, 0x4000, CRC(6cfdaea9) SHA1(0704e61c1c573e99e130c22787b529ac5544c631) )
5623
5624   ROM_REGION( 0x3000, "gfx1", 0 )
5625   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5626   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5627
5628   ROM_REGION( 0x3000, "gfx2", 0 )
5629   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5630   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5631   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5632
56335137   ROM_REGION( 0x0100, "proms", 0 )
5634   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5138   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
56355139ROM_END
56365140
5637ROM_START( brasil89 )
5638   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89.128: Brasil 89, BS clone. */
5639   ROM_LOAD( "brasil89.128",   0x4000, 0x4000, CRC(9030e0db) SHA1(d073ed0ddd3e5df6a3387e10e05ca34bc491eb35) )
5141/*  Witch Card (Video Klein)
5142    Video Klein original with epoxy block module.
5143    Alt set....
5144*/
5145   ROM_START( witchcde )
5146   ROM_REGION( 0x10000, "maincpu", 0 )
5147   ROM_LOAD( "27128_epoxy.bin",    0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) )  /* epoxy block program ROM */
56405148
5641   ROM_REGION( 0x3000, "gfx1", 0 )
5642   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5643   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5149   ROM_REGION( 0x4000, "temp", 0 )
5150   ROM_LOAD( "wc1.a2", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )
5151   ROM_LOAD( "wc2.a4", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )
5152   ROM_LOAD( "wc3.a5", 0x2000, 0x1000, CRC(a03f2d68) SHA1(6d81b1e92f40f7150498b65941d5a9ab64a89790) )
5153   ROM_LOAD( "wc4.a7", 0x3000, 0x1000, CRC(d3694522) SHA1(0f66ff2dd5c7ac9bf91fa9f48eb9f356572e814c) )
56445154
5645   ROM_REGION( 0x3000, "gfx2", 0 )
5646   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5647   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5648   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5155   ROM_REGION( 0x1800, "gfx1", 0 )
5156   ROM_FILL(                   0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5157   ROM_COPY( "temp",   0x3800, 0x1000, 0x0800 )    /* 0800-0fff of wc4.a7 - charset */
56495158
5650   ROM_REGION( 0x0100, "proms", 0 )
5651   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5652ROM_END
5159   ROM_REGION( 0x1800, "gfx2", 0 ) /* 2nd half of each ROM */
5160   ROM_COPY( "temp",   0x0800, 0x0000, 0x0800 )    /* 0800-0fff of wc1.a2 - regular cards gfx, bitplane 1 */
5161   ROM_COPY( "temp",   0x1800, 0x0800, 0x0800 )    /* 0800-0fff of wc2.a4 - regular cards gfx, bitplane 2 */
5162   ROM_COPY( "temp",   0x2800, 0x1000, 0x0800 )    /* 0800-0fff of wc3.a5 - regular cards gfx, bitplane 3 */
56535163
5654ROM_START( brasil89a )
5655   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89a.128: Brasil 89a, BS clone. */
5656   ROM_LOAD( "brasil89a.128",  0x4000, 0x4000, CRC(41a93a99) SHA1(70eeaddbdd9d3a587d1330b81d21d881ab0a8c91) )
5657
5658   ROM_REGION( 0x3000, "gfx1", 0 )
5659   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5660   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5661
5662   ROM_REGION( 0x3000, "gfx2", 0 )
5663   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5664   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5665   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5666
5667   ROM_REGION( 0x0100, "proms", 0 )
5668   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5164   ROM_REGION( 0x0200, "proms", 0 )
5165   ROM_LOAD( "24s10.bin",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
5166   ROM_LOAD( "24s10_epoxy.bin",    0x0100, 0x0100, CRC(ddfd7034) SHA1(78dee69ab4ba759485ee7f00446c2d86f08cc50f) ) /* original epoxy block PROM */
56695167ROM_END
56705168
5671ROM_START( brasil93 )
5672   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil93.128: Brasil 93, BS clone. No lights */
5673   ROM_LOAD( "brasil93.128",   0x4000, 0x4000, CRC(cc25909f) SHA1(635184022bcb8936c396cb9fcfa6367fcae906fb) )
5169/*  Witch Card (English, witch game, lights)
5170    PCB by PM. Hybrid hardware.
56745171
5675   ROM_REGION( 0x3000, "gfx1", 0 )
5676   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5677   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5172    Copyright 1983/84/85
5173    W.BECK ELEKTRONIK
5174*/
5175ROM_START( witchcdf )
5176   ROM_REGION( 0x10000, "maincpu", 0 )
5177   ROM_LOAD( "$25.bin",    0x5000, 0x1000, CRC(afd6cb4a) SHA1(4c769e1c724bada5875e028781086c32967953a1) )
5178   ROM_LOAD( "$26.bin",    0x6000, 0x1000, CRC(ad11960c) SHA1(2b562cfe9401e21c9dcd90307165e2c2d1acfc5b) )
5179   ROM_LOAD( "$27.bin",    0x7000, 0x1000, CRC(e6f9c973) SHA1(f209d13d1565160bc2c05c6c4fce73d14a9a56ab) )
56785180
5679   ROM_REGION( 0x3000, "gfx2", 0 )
5680   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5681   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5682   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5683
5684   ROM_REGION( 0x0100, "proms", 0 )
5685   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5686ROM_END
5687
5688ROM_START( poker91 )
5689   ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_pok91.bin: Poker 91. Based on witchcrd */
5690   ROM_LOAD( "bs_pok91.bin",   0x0000, 0x8000, CRC(90c88b45) SHA1(9b5842075ece5f96a6869d7a8c874dee2b2abde2) )
5691
56925181   ROM_REGION( 0x3000, "gfx1", 0 )
5693   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5694   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
5182   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5183   ROM_LOAD( "$14.bin",    0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) )    /* text layer */
56955184
56965185   ROM_REGION( 0x3000, "gfx2", 0 )
5697   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
5698   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
5699   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
5186   ROM_LOAD( "11.bin", 0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
5187   ROM_LOAD( "12.bin", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
5188   ROM_LOAD( "13.bin", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
57005189
57015190   ROM_REGION( 0x0100, "proms", 0 )
5702   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5191   ROM_LOAD( "wc_bprom.bin",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
57035192ROM_END
57045193
5705/****************************************************
5194/*******************************************
57065195
5707  Genie (Video Fun Games Ltd.)
5708  Skill game. Only for amusement.
5196  Witch Card (Falcon)
5197  Original Falcon PCB marked
5198  "831 1.1 MADE IN JAPAN"
57095199
5710  PCB is a heavily modified Golden Poker hardware.
5711  Silkscreened "ICP-1".
5200  Same board as Falcons Wild, but without
5201  extra RAM / ROM / encrypted 2nd CPU.
57125202
5713  CPU:   1x SY6502.
5714  Video: 1x HD6845P CRTC.
5715  I/O:   2x HD6821P PIAs.
5203  AY8910 is present.
57165204
5717  Sound: Discrete.
5718
5719  RAMs:  2x M5L5101LP-1.
5720
5721  ROMs:  2x 2732 for program. (2m.16a, 3m.17a)
5722         1x 2716 for char gen. (4.8a)
5723         3x 2716 for gfx bitplanes. (1.4a, 2.6a, 3.7a)
5724
5725  1x Reset switch. (R.SW)
5726  1x 8 DIP switches bank.
5727  1x 2x10 Edge connector. (GM1)
5728  1x 2x22 Edge connector. (GM2)
5729
5730
5731*****************************************************/
5732
5733ROM_START( genie )
5205*******************************************/
5206ROM_START( witchcdg )
57345207   ROM_REGION( 0x10000, "maincpu", 0 )
5735   ROM_LOAD( "2m.16a", 0x2000, 0x1000, CRC(30df75f5) SHA1(0696fb3db0b9927e6366db7316d605914ff8d464) )
5736   ROM_LOAD( "3m.17a", 0x3000, 0x1000, CRC(9d67f5c9) SHA1(d3bc13ce07a7b1713544756d7723dd0bcd59cd1a) )
5208   ROM_LOAD( "6.b9",   0x5000, 0x1000, CRC(70462a63) SHA1(9dfa18bf7d4e0803f2a68e64661ece392a7983cc) )
5209   ROM_LOAD( "7.b11",  0x6000, 0x1000, CRC(227b3801) SHA1(aebabce01b1abdb42b3e49c38f4fe429e65c1a88) )
5210   ROM_LOAD( "8.b13",  0x7000, 0x1000, CRC(6bb0059e) SHA1(c5f515b692c3353323aff77f087bf0a92a8d99cf) )
57375211
5738   ROM_REGION( 0x1800, "gfx1", 0 )
5739   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5740   ROM_LOAD( "4.8a",   0x1000, 0x0800, CRC(1cdd1db9) SHA1(1940c6654b4a892abc3e4557666d341f407ac54f) )  /* chars gfx */
5212   ROM_REGION( 0x3000, "gfx2", 0 )
5213   ROM_LOAD( "3.b5",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
5214   ROM_FILL(           0x0800, 0x0800, 0 ) /* filling the bitplane */
5215   ROM_LOAD( "2.b3",   0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5216   ROM_FILL(           0x1800, 0x0800, 0 ) /* filling the bitplane */
5217   ROM_LOAD( "1.b1",   0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) )    /* cards deck gfx, bitplane3 */
57415218
5742   ROM_REGION( 0x1800, "gfx2", 0 )
5743   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) )  /* tiles, bitplane1 */
5744   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) )  /* tiles, bitplane2 */
5745   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(151e4af7) SHA1(a44feaa69a00a6db31c018267b8b67a248e7c66e) )  /* tiles, bitplane3 */
5746
5747   ROM_REGION( 0x0800, "nvram", 0 )    /* default NVRAM, otherwise the game isn't stable */
5748   ROM_LOAD( "genie_nvram.bin", 0x0000, 0x0800, CRC(1b062ae7) SHA1(9d01635f3968d4b91b4a5d9fadfaf6edd0dea7ba) )
5749
5750   ROM_REGION( 0x0100, "proms", 0 )    /* using original golden poker color prom */
5751   ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5752ROM_END
5753
5754// Unknown on Blue PCB ICP-1
5755// Attract works, but hang when coin.
5756// Need to improve the memory map...
5757// checking the connected CPU addressing lines.
5758// and guess how map the ROM 15a (vectors + a few routines)
5759ROM_START( geniea )
5760   ROM_REGION( 0x10000, "maincpu", 0 )
5761   ROM_LOAD( "2732.16a", 0x2000, 0x1000, CRC(c96ef87b) SHA1(a67f290d13fbe33dc7c29271be6f5ef0ec13e927) )
5762   ROM_LOAD( "2732.17a", 0x3000, 0x1000, CRC(dcbfc29b) SHA1(a512b4bd4ab682810d8c432cca03f4320df9928b) )
5763   ROM_LOAD( "2732.15a", 0x7000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) )
5764
5765//   ROM_REGION( 0x1000, "temp", 0 ) // Only has vectors and a couple of routines. Just till know how to map it...
5766//   ROM_LOAD( "2732.15a", 0x7000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) )
5767
57685219   ROM_REGION( 0x3000, "gfx1", 0 )
5769   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5770   ROM_LOAD( "2732.9a",    0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) )    /* chars + bitplane3 */
5220   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5221   ROM_COPY( "gfx2",   0x2800, 0x2000, 0x0800 )    /* srctag, srcoffs, offset, length */
57715222
5772   ROM_REGION( 0x1800, "gfx2", 0 )
5773   ROM_LOAD( "2716.4a",   0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) )  /* tiles, bitplane1 */
5774   ROM_LOAD( "2716.6a",   0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) )  /* tiles, bitplane2 */
5775   ROM_COPY( "gfx1",      0x2800, 0x1000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
5776
5777   ROM_REGION( 0x0100, "proms", 0 )    /* using original golden poker color prom */
5778   ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5223   ROM_REGION( 0x0100, "proms", 0 )
5224//  ROM_LOAD( "82s129.7d",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
5225   ROM_LOAD( "tbp24s10n.d2",   0x0000, 0x0100, BAD_DUMP CRC(3db3b9e0) SHA1(c956493d5d754665d214b416e6a473d73c22716c) )
57795226ROM_END
57805227
5228/***************************************
57815229
5782/****************************************************
5230  Witch Card (German, WC3050, set 2 )
57835231
5784  Silver Game.
5785  1983.
5232  TV GAME ELEKTRONIK 1994
5233         PROMA
5234   CASINOVERSION WC3050
57865235
5787  6502 CPU
5788  2*6821 ios
5789  mc6845 video chip
5790  10mhz (?) xtal
5791
5792  There are French strings related to the game, so maybe is
5793  a leftover, or maybe there is a unknown way to switch the
5794  language.
5795
5796
5797*****************************************************/
5798
5799ROM_START( silverga )
5236***************************************/
5237ROM_START( witchcdh )
58005238   ROM_REGION( 0x10000, "maincpu", 0 )
5801   ROM_LOAD( "14", 0x5000, 0x1000, CRC(e4691878) SHA1(376c3910030f27517d798aac759553d5634b8ffc) )
5802   ROM_LOAD( "55", 0x6000, 0x2000, CRC(aad57b3c) SHA1(9508026c1a7b227a70d89ad2f7245e75a615b932) )
5239   ROM_LOAD( "prog3000.a12",   0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
58035240
5804   ROM_REGION( 0x3000, "gfx1", 0 )
5805   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5806   ROM_LOAD( "13",     0x2000, 0x1000, CRC(98b8cb4f) SHA1(420ea544a41e24478a8eb1c7076f4569607d0379) )    /* text layer */
5241   ROM_REGION( 0x6000, "gfx1", 0 )
5242   ROM_FILL(               0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
5243   ROM_LOAD( "wc3050.a5",  0x4000, 0x2000, CRC(6f35b9c4) SHA1(df86687164f18f2bfe71e73cccd28fe4117e748c) )    /* text layer, alt gfx */
58075244
5808   ROM_REGION( 0x1800, "gfx2", 0 )
5809   ROM_LOAD( "11",     0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
5810   ROM_LOAD( "12",     0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5811   ROM_COPY( "gfx1",   0x2800, 0x1000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd half of the char rom */
5245   ROM_REGION( 0x6000, "gfx2", 0 )
5246   ROM_LOAD( "wc1.a2", 0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */ // sldh
5247   ROM_LOAD( "wc1.a4", 0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */ // sldh
5248   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
58125249
58135250   ROM_REGION( 0x0100, "proms", 0 )
5814   ROM_LOAD( "s287",       0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5251   ROM_LOAD( "tbp24s10n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
58155252ROM_END
58165253
5817/***************************************************************
5254/***************************************
58185255
5819  Casino Poker
5820  1987, PM / Beck Elektronik
5256  Witch Card (German, WC3050, 27-4-94)
58215257
5822  1x Xtal 10.000 MHz.
5823  1x UM6502A
5824  2x UM6521A
5825  1x UM6845
5258  TV GAME ELEKTRONIK 1994
5259         PROMA
5260   CASINOVERSION WC3050
58265261
5827  GFX ROMS 051, 052, 053 and 054 have duplicated halves.
5262****************************************
58285263
5829  Bipolar PROM 24sa10 is filled with 0x09, so has at least
5830  fixed bits 0 and 3 along the whole data. Needs a redump
5831  using a supported EEPROM programmer.
526401.a2                                           BADADDR           --xxxxxxxxxx
526502.a4                                           BADADDR           --xxxxxxxxxx
526603.a5                                           1ST AND 2ND HALF IDENTICAL
526727s21.d7                                        FIXED BITS (0000xxxx)
5268                        tbp24s10n.7d            FIXED BITS (0000xxxx)
5269                        ce-2-tvg.bin            BADADDR           --xxxxxxxxxx
5270                        ce-1-tvg.bin            BADADDR           --xxxxxxxxxx
527101.a2                   ce-1-tvg.bin            IDENTICAL
527202.a4                   ce-2-tvg.bin            IDENTICAL
527327s21.d7                tbp24s10n.7d            IDENTICAL
527403.a5        [2/4]      ce-3-tvg.bin [2/4]      IDENTICAL
527504.a12       [2/4]      12a.bin      [2/4]      IDENTICAL
527603.a5        [2/4]      ce-3-tvg.bin [4/4]      IDENTICAL
527703.a5        [4/4]      ce-3-tvg.bin [2/4]      IDENTICAL
527803.a5        [4/4]      ce-3-tvg.bin [4/4]      IDENTICAL
527904.a12       [1/4]      12a.bin      [1/4]      99.609375%
528004.a12       [3/4]      12a.bin      [3/4]      99.414063%
528104.a12       [4/4]      12a.bin      [4/4]      96.020508%
528203.a5        [1/4]      ce-3-tvg.bin [1/4]      88.378906%
528303.a5        [3/4]      ce-3-tvg.bin [1/4]      88.378906%
58325284
5833  Discrete sound circuitry was traced, being identical to the Golden Poker one.
5834  Only difference is the PC617 replaced by one PC817.
5835
5836  The sound is ugly and seems that was programmed that way.
5837
5838***************************************************************/
5839
5840ROM_START( caspoker )
5285***************************************/
5286ROM_START( witchcdi )
58415287   ROM_REGION( 0x10000, "maincpu", 0 )
5842   ROM_LOAD( "234.bin",    0x4000, 0x1000, CRC(174bc526) SHA1(faef01484f0e0ea769d7bd2c5ad03369a6fdf037) )
5843   ROM_LOAD( "235.bin",    0x5000, 0x1000, CRC(2e43552f) SHA1(5fbe0e62dec960850ef5f937254858fcd4da9e64) )
5844   ROM_LOAD( "236.bin",    0x6000, 0x1000, CRC(3f4cfa39) SHA1(e2750a9c5d12c668e599181ee3972c5d78bd0006) )
5845   ROM_LOAD( "237.bin",    0x7000, 0x1000, CRC(b411d0c4) SHA1(0617cd312026da78a171fc23f4788393d70371cf) )
5288   ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) )
58465289
5847   ROM_REGION( 0x1800, "gfx1", 0 )
5848   ROM_FILL(               0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5849   ROM_LOAD( "054.bin",    0x1000, 0x0800, CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) )    /* text chars */
5850   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
5290   ROM_REGION( 0x6000, "gfx1", 0 )
5291   ROM_FILL(                   0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
5292   ROM_LOAD( "03.a5",  0x4000, 0x2000, CRC(f181e5aa) SHA1(44a7696bd223effbc7542142a0c3c623c628071d) )    /* text layer */
58515293
5852   ROM_REGION( 0x1800, "gfx2", 0 )
5853   ROM_LOAD( "051.bin",    0x0000, 0x0800, CRC(82d823e5) SHA1(75bdf427a6204ef87444be0d8b06a07c5a2fc38f) )    /* cards deck gfx, bitplane1 */
5854   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
5855   ROM_LOAD( "052.bin",    0x0800, 0x0800, CRC(eda12738) SHA1(ec7806c2bf1a238f489459c3c3653f43febaa464) )    /* cards deck gfx, bitplane2 */
5856   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
5857   ROM_LOAD( "053.bin",    0x1000, 0x0800, CRC(d147ae0a) SHA1(dfdf0a42eb0a6f2afc9f301b0cf01411085247bd) )    /* cards deck gfx, bitplane3 */
5858   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
5294   ROM_REGION( 0x6000, "gfx2", 0 )
5295   ROM_LOAD( "01.a2",  0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
5296   ROM_LOAD( "02.a4",  0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
5297   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
58595298
5860   ROM_REGION( 0x0800, "nvram", 0 )    /* default NVRAM, otherwise settings parameters are incorrect */
5861   ROM_LOAD( "caspoker_nvram.bin", 0x0000, 0x0800, CRC(be6e2671) SHA1(aef1b09d09e07eb39480a7901ed8535f74e461fa) )
5862
5863   ROM_REGION( 0x0100, "proms", 0 )    /* from other games */
5864   ROM_LOAD( "24sa10.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
5299   ROM_REGION( 0x0100, "proms", 0 )
5300   ROM_LOAD( "27s21.d7",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
58655301ROM_END
58665302
5867/****************************************************
5303/******************************************
58685304
5869  Unknown poker game, set 1.
5870  198?.
5305  Witch Game (Video Klein)
58715306
5872  There are French strings related to the game into
5873  the program ROM.
5307  Another evil hardware from Video Klein
5308  with CPU box. Marked "12T1"
58745309
5875  The dump lacks of 1 program ROM located at 17a.
5876  (empty socket in the PCB picture)
5310******************************************/
5311ROM_START( witchgme )
5312   ROM_REGION( 0x10000, "maincpu", 0 ) /* Video Klein */
5313   ROM_LOAD( "hn58c256p.box12t1",  0x0000, 0x8000, CRC(26c334cb) SHA1(d8368835c88668f09560f6096148a6e528806f65) )
58775314
5878*****************************************************/
5315   ROM_REGION( 0x3000, "gfx2", 0 )
5316   ROM_LOAD( "1.2a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )  /* cards deck gfx, bitplane1 */
5317   ROM_FILL(           0x0800, 0x0800, 0 ) /* filling the bitplane */
5318   ROM_LOAD( "2.4a",   0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )  /* cards deck gfx, bitplane2 */
5319   ROM_FILL(           0x1800, 0x0800, 0 ) /* filling the bitplane */
5320   ROM_LOAD( "3.5a",   0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) )  /* text layer */
58795321
5880ROM_START( pokerdub )
5881   ROM_REGION( 0x10000, "maincpu", 0 )
5882   ROM_LOAD( "15a_f_83.15a",   0x2000, 0x1000, CRC(06571884) SHA1(6823f5d4a2fc5adf51f1588273f808a2a25a15bc) )
5883   ROM_LOAD( "unknown.17a",    0x3000, 0x1000, NO_DUMP )
5322   ROM_REGION( 0x3000, "gfx1", 0 )
5323   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5324   ROM_COPY( "gfx2",   0x2800, 0x2000, 0x0800 )    /* srctag, srcoffs, offset, length */
58845325
5885   ROM_REGION( 0x1800, "gfx1", 0 )
5886   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5887   ROM_LOAD( "4.8a",   0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) )    /* char ROM (cracked title) */
5326   ROM_REGION( 0x0100, "proms", 0 )
5327   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
58885328
5889   ROM_REGION( 0x1800, "gfx2", 0 )
5890   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
5891   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5892   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
5893
5894   ROM_REGION( 0x0100, "proms", 0 )
5895   ROM_LOAD( "s287.8c",    0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5329   ROM_REGION( 0x0100, "proms2", 0 )
5330   ROM_LOAD( "tbp24s10n.2c",   0x0000, 0x0100, CRC(7c2aa098) SHA1(539ff9239b1b553b3883c9f0223aafcf217f9fc7) )
58965331ROM_END
58975332
5898/****************************************************
5899
5900  Unknown poker game, set 2.
5901  198?.
5902
5903  This one is totally encrypted.
5904  The PCB has a daughterboard coated with some plastic
5905  or epoxy resin.
5906
5907  Char ROM is identical to the Witch Card one.
5908
5909*****************************************************/
5910
5911ROM_START( pokerduc )
5333/*  Witch Game (Video Klein)
5334    Video Klein original with epoxy block module.
5335    Alt set....
5336*/
5337   ROM_START( witchcdk )
59125338   ROM_REGION( 0x10000, "maincpu", 0 )
5913   ROM_LOAD( "b",  0x5000, 0x1000, CRC(8627fba5) SHA1(b94665f0bf425ff71f78c1258f910323c2a948f0) )
5914   ROM_LOAD( "c",  0x6000, 0x1000, CRC(b35b4108) SHA1(6504ba55511637334c65e88ee5c60b1503b854b3) )
5915   ROM_LOAD( "d",  0x7000, 0x1000, CRC(c48096ed) SHA1(279ba433369c7dc9cd902a19200e889eea45d115) )
5339   ROM_LOAD( "wc_epoxy.bin",   0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) )  /* epoxy block program ROM */
59165340
5917   ROM_REGION( 0x1800, "gfx1", 0 )
5918   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
5919   ROM_LOAD( "a.8a",   0x1000, 0x0800, CRC(c70a3e49) SHA1(eb2f15b344f4dec5f05701415848c854bb27aaa3) )    /* char ROM (cracked title) */
5341   ROM_REGION( 0x3000, "gfx1", 0 )
5342   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
5343   ROM_LOAD( "wc4.7a",  0x2000, 0x1000, BAD_DUMP CRC(3bf07c44) SHA1(f6e859b142b7d4585b89ca609d8bc85c84fe2b09) )    /* text chars, corrupt */ // sldh
5344   ROM_COPY( "gfx1",    0x2800, 0x2000, 0x0800 )   /* srctag, srcoffs, offset, length */
59205345
5921   ROM_REGION( 0x1800, "gfx2", 0 )
5922   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
5923   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
5924   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
5925   ROM_IGNORE(                 0x0800) /* identical halves */
5346   ROM_REGION( 0x3000, "gfx2", 0 )
5347   ROM_LOAD( "wc1.2a", 0x0000, 0x1000, CRC(f59c6fd2) SHA1(bea4b6043728311ca9fff36e2d7e24254af5b97a) )    /* cards deck gfx, bitplane1 */ // sldh
5348   ROM_LOAD( "wc2.4a", 0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
5349   ROM_LOAD( "wc3.5a", 0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
59265350
5927   ROM_REGION( 0x0100, "proms", 0 )
5928   ROM_LOAD( "tbp24s10.9c",    0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
5351   ROM_REGION( 0x0600, "proms", 0 )
5352   ROM_LOAD( "24s10.bin",          0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* original PCB PROM */
5353   ROM_LOAD( "82s137_epoxy.bin",   0x0100, 0x0400, CRC(4ae3ecf5) SHA1(e1e540ae13e7ce5ac6391f325160ec997ea6cc2f) ) /* original epoxy block PROM */
59295354ROM_END
59305355
59315356
r250291r250292
60325457
60335458/****************************************************
60345459
6035  Wild Witch (Video Klein)
5460  Wild Witch sets...
60365461
60375462  Another evil hardware from Video Klein
60385463  with CPU box.
r250291r250292
82537678
82547679/************************************************
82557680
8256  Witch Up & Down
7681  Witch Up & Down sets...
82577682  (1988, Video Klein)
82587683
82597684  16 gfx banks!!!.
r250291r250292
89238348
89248349/*********************************************
89258350
8926   Witch Jack
8351   Witch Jack sets...
89278352   1992-1996 Video Klein
89288353
89298354*********************************************/
r250291r250292
90218446ROM_END
90228447
90238448
9024ROM_START( wtchjacka )  /* Witch Jackpot 0.25 / 1994-11-24 */
8449ROM_START( wtchjacka )  /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */
90258450   ROM_REGION( 0x10000, "maincpu", 0 )
9026   ROM_LOAD( "wj5x5015.bin",   0x8000, 0x8000, CRC(bc0e6b78) SHA1(29482035f6122385447009abd695ed52fc669158) )
8451   ROM_LOAD( "wj5x5088.bin",   0x8000, 0x8000, CRC(08143537) SHA1(ef16531bcf955daded1be406dd3f61f37070298c) )
90278452
90288453   ROM_REGION( 0x18000, "temp", 0 )
9029   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9030   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, BAD_DUMP CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9031   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
8454   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
8455   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
8456   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
90328457
90338458   ROM_REGION( 0x1800, "gfx0", 0 )
90348459   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250291r250292
91148539ROM_END
91158540
91168541
9117ROM_START( wtchjackb )  /* Witch Jack 0.40 / 1995-02-27 */
8542ROM_START( wtchjackb )  /* Witch Jack 0.87 / 1996-07-16, GFX OK */
91188543   ROM_REGION( 0x10000, "maincpu", 0 )
9119   ROM_LOAD( "wj5x5040.bin",   0x8000, 0x8000, CRC(2f0f1d7a) SHA1(048d0641a4e03a77f4964898ad2c224cb487aa36) )
8544   ROM_LOAD( "wj5x5087.bin",   0x8000, 0x8000, CRC(b027d8a5) SHA1(f06b92cc7aacadca1b8c98bda19efa670596891c) )
91208545
91218546   ROM_REGION( 0x18000, "temp", 0 )
9122   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9123   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, BAD_DUMP CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9124   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
8547   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
8548   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
8549   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
91258550
91268551   ROM_REGION( 0x1800, "gfx0", 0 )
91278552   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250291r250292
92078632ROM_END
92088633
92098634
9210ROM_START( wtchjackc )  /* Witch Jack 0.40T / 1995-02-27, Not Working */
8635ROM_START( wtchjackc )  /* Witch Jack 0.70S / 1996-03-26 */
92118636   ROM_REGION( 0x10000, "maincpu", 0 )
9212   ROM_LOAD( "wj5x5t40.bin",   0x8000, 0x8000, CRC(a3a4f1d3) SHA1(16dcaf880134f10152703cb3ca81dfcbe48bff8b) )
8637   ROM_LOAD( "wj5x570s.bin",   0x8000, 0x8000, CRC(294e3ac6) SHA1(e58c38ae341dcb48572f8852ec858ef8433c6f95) )
92138638
92148639   ROM_REGION( 0x18000, "temp", 0 )
92158640   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
93008725ROM_END
93018726
93028727
9303ROM_START( wtchjackd )  /* Witch Jack 0.62 / 1995-08-02 */
8728ROM_START( wtchjackd )  /* Witch Jack 0.70P / 1996-03-26 */
93048729   ROM_REGION( 0x10000, "maincpu", 0 )
9305   ROM_LOAD( "wj5x563.bin",    0x8000, 0x8000, CRC(55e74382) SHA1(af0a890c55db36e8a2f847ea103858cc7b7115be) )  //
8730   ROM_LOAD( "wj5x570p.bin",   0x8000, 0x8000, CRC(d77d8119) SHA1(c8999e3c55257750f27f1683f5b416e8e4e4297d) )
93068731
93078732   ROM_REGION( 0x18000, "temp", 0 )
93088733   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
93938818ROM_END
93948819
93958820
9396ROM_START( wtchjacke )  /* Witch Jack 0.64 / 1995-09-13 */
8821ROM_START( wtchjacke )  /* Witch Jack 0.65 / 1995-10-19 */
93978822   ROM_REGION( 0x10000, "maincpu", 0 )
9398   ROM_LOAD( "wj5x564p.bin",   0x8000, 0x8000, CRC(7ee61b69) SHA1(313b750a7949f4d08cdf79c068d01ed91fc66dce) )
8823   ROM_LOAD( "wj5x565p.bin",   0x8000, 0x8000, CRC(20c23876) SHA1(ca2309766a68ba280d71b3b62e00d38d70b8536a) )
93998824
94008825   ROM_REGION( 0x18000, "temp", 0 )
94018826   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
94868911ROM_END
94878912
94888913
9489ROM_START( wtchjackf )  /* Witch Jack 0.65 / 1995-10-19 */
8914ROM_START( wtchjackf )  /* Witch Jack 0.64 / 1995-09-13 */
94908915   ROM_REGION( 0x10000, "maincpu", 0 )
9491   ROM_LOAD( "wj5x565p.bin",   0x8000, 0x8000, CRC(20c23876) SHA1(ca2309766a68ba280d71b3b62e00d38d70b8536a) )
8916   ROM_LOAD( "wj5x564p.bin",   0x8000, 0x8000, CRC(7ee61b69) SHA1(313b750a7949f4d08cdf79c068d01ed91fc66dce) )
94928917
94938918   ROM_REGION( 0x18000, "temp", 0 )
94948919   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
95799004ROM_END
95809005
95819006
9582ROM_START( wtchjackg )  /* Witch Jack 0.70S / 1996-03-26 */
9007ROM_START( wtchjackg )  /* Witch Jack 0.62 / 1995-08-02 */
95839008   ROM_REGION( 0x10000, "maincpu", 0 )
9584   ROM_LOAD( "wj5x570s.bin",   0x8000, 0x8000, CRC(294e3ac6) SHA1(e58c38ae341dcb48572f8852ec858ef8433c6f95) )
9009   ROM_LOAD( "wj5x563.bin",    0x8000, 0x8000, CRC(55e74382) SHA1(af0a890c55db36e8a2f847ea103858cc7b7115be) )  //
95859010
95869011   ROM_REGION( 0x18000, "temp", 0 )
95879012   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
96729097ROM_END
96739098
96749099
9675ROM_START( wtchjackh )  /* Witch Jack 0.70P / 1996-03-26 */
9100ROM_START( wtchjackh )  /* Witch Jack 0.40T / 1995-02-27, Not Working */
96769101   ROM_REGION( 0x10000, "maincpu", 0 )
9677   ROM_LOAD( "wj5x570p.bin",   0x8000, 0x8000, CRC(d77d8119) SHA1(c8999e3c55257750f27f1683f5b416e8e4e4297d) )
9102   ROM_LOAD( "wj5x5t40.bin",   0x8000, 0x8000, CRC(a3a4f1d3) SHA1(16dcaf880134f10152703cb3ca81dfcbe48bff8b) )
96789103
96799104   ROM_REGION( 0x18000, "temp", 0 )
96809105   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
r250291r250292
97659190ROM_END
97669191
97679192
9768ROM_START( wtchjacki )  /* Witch Jack 0.87 / 1996-07-16, GFX OK */
9193ROM_START( wtchjacki )  /* Witch Jack 0.40 / 1995-02-27 */
97699194   ROM_REGION( 0x10000, "maincpu", 0 )
9770   ROM_LOAD( "wj5x5087.bin",   0x8000, 0x8000, CRC(b027d8a5) SHA1(f06b92cc7aacadca1b8c98bda19efa670596891c) )
9195   ROM_LOAD( "wj5x5040.bin",   0x8000, 0x8000, CRC(2f0f1d7a) SHA1(048d0641a4e03a77f4964898ad2c224cb487aa36) )
97719196
97729197   ROM_REGION( 0x18000, "temp", 0 )
9773   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9774   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9775   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
9198   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9199   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, BAD_DUMP CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9200   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
97769201
97779202   ROM_REGION( 0x1800, "gfx0", 0 )
97789203   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250291r250292
98589283ROM_END
98599284
98609285
9861ROM_START( wtchjackj )  /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */
9286ROM_START( wtchjackj )  /* Witch Jackpot 0.25 / 1994-11-24 */
98629287   ROM_REGION( 0x10000, "maincpu", 0 )
9863   ROM_LOAD( "wj5x5088.bin",   0x8000, 0x8000, CRC(08143537) SHA1(ef16531bcf955daded1be406dd3f61f37070298c) )
9288   ROM_LOAD( "wj5x5015.bin",   0x8000, 0x8000, CRC(bc0e6b78) SHA1(29482035f6122385447009abd695ed52fc669158) )
98649289
98659290   ROM_REGION( 0x18000, "temp", 0 )
9866   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9867   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9868   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
9291   ROM_LOAD( "wj5x5_1zs.bin",  0x00000, 0x8000, BAD_DUMP CRC(a780ba7f) SHA1(dde75187df298392333cfe1a19beed5b9d172aad) )
9292   ROM_LOAD( "wj5x5_2zs.bin",  0x08000, 0x8000, BAD_DUMP CRC(0f4e9f82) SHA1(a22bbbf0130dd6ece61189ce81a3376213617509) )
9293   ROM_LOAD( "wj5x5_3zs.bin",  0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
98699294
98709295   ROM_REGION( 0x1800, "gfx0", 0 )
98719296   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
r250291r250292
99519376ROM_END
99529377
99539378
9379/******************************* FALCONS WILD SETS *******************************/
9380
9381
9382/*********************************************
9383
9384    Falcons Wild - Wild Card 1991.
9385    1992-1992 TVG D-6310 GRUENBERG.
9386    (bootleg in real Bonanza hardware).
9387
9388  dm74s287n.7d     FIXED BITS (0000xxxx)
9389  fw1.2a           BADADDR     x-xxxxxxxxxxx
9390  fw2.4a           BADADDR     x-xxxxxxxxxxx
9391  fw3.5a           1ST AND 2ND HALF IDENTICAL
9392  nosticker.12a    x0xxxxxxxxxxxxxx = 0x00
9393
9394  fw3.5a is bitrotten.
9395
9396**********************************************/
9397ROM_START( falcnwld )
9398   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild */
9399   ROM_LOAD( "nosticker.12a",  0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) )
9400
9401   ROM_REGION( 0x6000, "temp", 0 )
9402   ROM_LOAD( "fw1.2a", 0x0000, 0x2000, CRC(d5a58098) SHA1(9c8860949b0adcd20222e9b3e3e8e7e864e8f39f) )  /* cards deck gfx, bitplane1 */
9403   ROM_LOAD( "fw2.4a", 0x2000, 0x2000, CRC(b28b7759) SHA1(513229cee451f59f824b7a64932679f91fbb324d) )  /* cards deck gfx, bitplane2 */
9404   ROM_LOAD( "fw3.5a", 0x4000, 0x2000, BAD_DUMP CRC(98edfc82) SHA1(e3dd597245b55c3bc6ea86acf80ee024ca28f564) )  /* text layer + cards deck gfx, bitplane3 */
9405
9406   ROM_REGION( 0x1800, "gfx1", 0 )
9407   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
9408   ROM_COPY( "temp",   0x4000, 0x1000, 0x0800 )    /* first quarter of fw3.5a */
9409
9410   ROM_REGION( 0x1800, "gfx2", 0 )
9411   ROM_COPY( "temp",   0x0000, 0x0000, 0x0800 )    /* first quarter of fw1.2a */
9412   ROM_COPY( "temp",   0x2000, 0x0800, 0x0800 )    /* first quarter of fw2.4a */
9413   ROM_COPY( "temp",   0x4800, 0x1000, 0x0800 )    /* second quarter of fw3.5a */
9414
9415   ROM_REGION( 0x0100, "proms", 0 )
9416   ROM_LOAD( "dm74s287n.7d",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9417ROM_END
9418
9419/************************************
9420
9421  Falcon's Wild - World Wide Poker.
9422  1991, Video Klein
9423
9424  CPU BOX
9425
9426************************************/
9427ROM_START( falcnwlda )
9428   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Video Klein */
9429   ROM_LOAD( "nmc27c256.box",  0x0000, 0x8000, CRC(a0072c55) SHA1(27b84a896ff06a423450d8f0851f42f3e8ec5466) )
9430   ROM_RELOAD(                 0x8000, 0x8000 )
9431
9432   ROM_REGION( 0x1800, "gfx1", 0 )
9433   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling bitplanes */
9434   ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) )  /* chars gfx */
9435
9436   ROM_REGION( 0x1800, "gfx2", 0 )
9437   ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) )  /* cards deck gfx, bitplane1 */ // sldh
9438   ROM_IGNORE(                 0x0800)
9439   ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )  /* cards deck gfx, bitplane2 */ // sldh
9440   ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) )  /* cards deck gfx, bitplane3 */ // sldh
9441
9442   ROM_REGION( 0x0100, "proms", 0 )
9443   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9444ROM_END
9445
9446ROM_START( falcnwldb )
9447   ROM_REGION( 0x10000, "maincpu", 0 ) /* World Wide Poker / 1992-11-04 */
9448   ROM_LOAD( "fw12t1_19921104.bin",    0x0000, 0x8000, CRC(8b4f8cac) SHA1(e3bcbadaa157db48a41369a3fcdba536f8ca679e) )
9449   ROM_RELOAD(                         0x8000, 0x8000 )
9450
9451   ROM_REGION( 0x1800, "gfx1", 0 )
9452   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling bitplanes */
9453   ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) )  /* chars gfx */
9454
9455   ROM_REGION( 0x1800, "gfx2", 0 )
9456   ROM_LOAD( "fw1.2a", 0x0000, 0x0800, BAD_DUMP CRC(229cedde) SHA1(5b6d0b900714924c7a2390151ee65f36bdb02e8b) )  /* cards deck gfx, bitplane1 */ // sldh
9457   ROM_IGNORE(                 0x0800)
9458   ROM_LOAD( "fw2.4a", 0x0800, 0x0800, BAD_DUMP CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )  /* cards deck gfx, bitplane2 */ // sldh
9459   ROM_LOAD( "fw3.5a", 0x1000, 0x0800, BAD_DUMP CRC(87abebe5) SHA1(5950082b563718476576dbc9f45439019209493e) )  /* cards deck gfx, bitplane3 */ // sldh
9460
9461   ROM_REGION( 0x0100, "proms", 0 )
9462   ROM_LOAD( "n82s137f.box",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9463ROM_END
9464
9465/***********************************************
9466
9467  Falcon's Wild - World Wide Poker
9468  1983, Falcon.
9469
9470  Original Falcon PCB marked
9471  "831 1.1 MADE IN JAPAN"
9472
9473  Same board as Witch Card (Falcon), but with
9474  extra RAM + ROM + encrypted 2nd CPU + AY8910.
9475
9476  The encrypted 40-pin CPU is scratched,
9477  and seems based on a Z80.
9478
9479***********************************************/
9480ROM_START( falcnwldc )
9481   ROM_REGION( 0x10000, "maincpu", 0 ) /* Falcons Wild, Falcon original */
9482//  ROM_LOAD( "nosticker.12a",  0x0000, 0x10000, CRC(54ae4a8a) SHA1(0507098b53d807059b78ec098203d095d19028f8) )
9483   ROM_LOAD( "4.b6",           0x3000, 0x1000, CRC(88684a8f) SHA1(5ffa0808b502e93ddcb8f13929008aec2836a773) )
9484   ROM_LOAD( "5.b8",           0x4000, 0x1000, CRC(aa5de05c) SHA1(98559b35c7c31a41b1818a6e60ec82f43a5d1b4a) )
9485   ROM_LOAD( "6-syncmod.b9",   0x5000, 0x1000, CRC(21cfa807) SHA1(ff908a5a43b3736494127539d6485648d8be1a9a) )  // ok
9486   ROM_LOAD( "7.b11",          0x6000, 0x1000, CRC(d63bba8e) SHA1(09902574985a945117ec22d738c94fee72e673af) )
9487   ROM_LOAD( "8.b13",          0x7000, 0x1000, CRC(251d6abf) SHA1(2384ae674bfbe96c19a3b66c7efa1e5e8b444f48) )  // ok
9488
9489   ROM_REGION( 0x10000, "mcu", 0 )
9490   ROM_LOAD( "9.f10",  0x0000, 0x1000, CRC(22f1c52a) SHA1(6429a802e92f6b77446550a303567798a231f6d7) )  // MCU prg
9491
9492   ROM_REGION( 0x6000, "temp", 0 )
9493   ROM_LOAD( "1.b1",   0x0000, 0x1000, CRC(fd95955d) SHA1(e5c029bc5683d06c2e5250c1271613232a058fcd) )
9494   ROM_LOAD( "2.b3",   0x1000, 0x0800, CRC(9ad3c578) SHA1(a69385a807e3270d90040c44721bfff21e95706a) )
9495   ROM_LOAD( "3.b4",   0x1800, 0x0800, CRC(d9246780) SHA1(4ceb24131ec6208b742ba80373201aa53c50732d) )
9496
9497   ROM_REGION( 0x1800, "gfx1", 0 )
9498   ROM_FILL(           0x0000, 0x1000, 0 )         /* filling bitplanes */
9499   ROM_COPY( "temp",   0x0800, 0x1000, 0x0800 )    /* second half of 1.b1 */
9500
9501   ROM_REGION( 0x1800, "gfx2", 0 )
9502   ROM_COPY( "temp",   0x1800, 0x0000, 0x0800 )    /* first half of 3.b4 */
9503   ROM_COPY( "temp",   0x1000, 0x0800, 0x0800 )    /* whole 2.b3 */
9504   ROM_COPY( "temp",   0x0000, 0x1000, 0x0800 )    /* first half of 1.b1 */
9505
9506   ROM_REGION( 0x0100, "proms", 0 )
9507   ROM_LOAD( "falcon_1.bin",   0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9508ROM_END
9509
9510
9511/**************************************** OTHER SETS ****************************************/
9512
9513
9514ROM_START( pmpoker )
9515   ROM_REGION( 0x10000, "maincpu", 0 )
9516   ROM_LOAD( "2-5.bin",    0x5000, 0x1000, CRC(3446a643) SHA1(e67854e3322e238c17fed4e05282922028b5b5ea) )
9517   ROM_LOAD( "2-6.bin",    0x6000, 0x1000, CRC(50d2d026) SHA1(7f58ab176de0f0f7666d87271af69a845faec090) )
9518   ROM_LOAD( "2-7.bin",    0x7000, 0x1000, CRC(a9ab972e) SHA1(477441b7ff3acae3a5d5a3e4c2a428e0b3121534) )
9519
9520   ROM_REGION( 0x1800, "gfx1", 0 )
9521   ROM_FILL(               0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9522   ROM_LOAD( "1-4.bin",    0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) )    /* text layer */
9523
9524   ROM_REGION( 0x1800, "gfx2", 0 )
9525   ROM_LOAD( "1-1.bin",    0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
9526   ROM_LOAD( "1-2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9527   ROM_LOAD( "1-3.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
9528
9529   ROM_REGION( 0x0100, "proms", 0 )
9530   ROM_LOAD( "tbp24sa10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9531ROM_END
9532
9533ROM_START( royale )
9534   ROM_REGION( 0x10000, "maincpu", 0 )
9535   ROM_LOAD( "royalex.bin",    0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) )
9536
9537   ROM_REGION( 0x3000, "gfx1", 0 )
9538   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9539   ROM_LOAD( "royalechr.bin",  0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
9540
9541   ROM_REGION( 0x1800, "gfx2", 0 )
9542   ROM_LOAD( "royale3.bin",    0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
9543   ROM_LOAD( "royale2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9544   ROM_LOAD( "royale1.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
9545
9546   ROM_REGION( 0x0100, "proms", 0 )
9547   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9548ROM_END
9549
9550ROM_START( royalea )
9551   ROM_REGION( 0x10000, "maincpu", 0 )
9552   ROM_LOAD( "royal.256",  0x0000, 0x8000, CRC(9d7fdb79) SHA1(05cae00bca0f6ae696c69f531cb0fa2104ff696a) )
9553
9554   ROM_REGION( 0x3000, "gfx1", 0 )
9555   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9556   ROM_LOAD( "royalechr.bin",  0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
9557
9558   ROM_REGION( 0x1800, "gfx2", 0 )
9559   ROM_LOAD( "royale3.bin",    0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
9560   ROM_LOAD( "royale2.bin",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9561   ROM_LOAD( "royale1.bin",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
9562
9563   ROM_REGION( 0x0100, "proms", 0 )
9564   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9565ROM_END
9566
9567ROM_START( sloco93 )
9568   ROM_REGION( 0x10000, "maincpu", 0 )
9569   ROM_LOAD( "locoloco.128",   0x4000, 0x4000, CRC(f626a770) SHA1(afbd33b3f65b8a781c716a3d6e5447aa817d856c) )
9570
9571   ROM_REGION( 0x3000, "gfx1", 0 )
9572   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9573   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
9574
9575   ROM_REGION( 0x3000, "gfx2", 0 )
9576   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9577   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9578   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9579
9580   ROM_REGION( 0x0100, "proms", 0 )
9581   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9582ROM_END
9583
9584ROM_START( sloco93a )
9585   ROM_REGION( 0x10000, "maincpu", 0 )
9586   ROM_LOAD( "locoloco.256",   0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) )
9587
9588   ROM_REGION( 0x3000, "gfx1", 0 )
9589   ROM_FILL(                   0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9590   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
9591
9592   ROM_REGION( 0x3000, "gfx2", 0 )
9593   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9594   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9595   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9596
9597   ROM_REGION( 0x0100, "proms", 0 )
9598   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9599ROM_END
9600
99549601/*
9602    checksum routine at $5f3e
9603    protect $4000+ & $7ff9.
9604    (see cmp at $5f6b)
9605    balanced at $7ff8.
9606*/
9607ROM_START( maverik )
9608   ROM_REGION( 0x10000, "maincpu", 0 ) /* maverik: Maverik (ind arg, fixed, changed logo) */
9609   ROM_LOAD( "maverik.bin",    0x0000, 0x8000, CRC(65a986e9) SHA1(2e825d3fb2346036357af0e12d3a75b5ef6cfd0d) )
99559610
9611   ROM_REGION( 0x3000, "gfx1", 0 )
9612   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9613   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9614
9615   ROM_REGION( 0x3000, "gfx2", 0 )
9616   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9617   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9618   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9619
9620   ROM_REGION( 0x0100, "proms", 0 )
9621   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9622ROM_END
9623
9624/*****************************
9625
9626  Brasil XX sets...
9627
9628 ****************************/
9629ROM_START( brasil86 )
9630   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil86.128: Brasil 86, BS clone. */
9631   ROM_LOAD( "brasil86.128",   0x4000, 0x4000, CRC(0e88b434) SHA1(80f921c277f4253c29ee80e9cfb046ade1f66300) )
9632
9633   ROM_REGION( 0x3000, "gfx1", 0 )
9634   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9635   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9636
9637   ROM_REGION( 0x3000, "gfx2", 0 )
9638   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9639   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9640   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9641
9642   ROM_REGION( 0x0100, "proms", 0 )
9643   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9644ROM_END
9645
9646ROM_START( brasil87 )
9647   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil87.128: Brasil 87, BS clone. */
9648   ROM_LOAD( "brasil87.128",   0x4000, 0x4000, CRC(6cfdaea9) SHA1(0704e61c1c573e99e130c22787b529ac5544c631) )
9649
9650   ROM_REGION( 0x3000, "gfx1", 0 )
9651   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9652   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9653
9654   ROM_REGION( 0x3000, "gfx2", 0 )
9655   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9656   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9657   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9658
9659   ROM_REGION( 0x0100, "proms", 0 )
9660   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9661ROM_END
9662
9663ROM_START( brasil89 )
9664   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89.128: Brasil 89, BS clone. */
9665   ROM_LOAD( "brasil89.128",   0x4000, 0x4000, CRC(9030e0db) SHA1(d073ed0ddd3e5df6a3387e10e05ca34bc491eb35) )
9666
9667   ROM_REGION( 0x3000, "gfx1", 0 )
9668   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9669   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9670
9671   ROM_REGION( 0x3000, "gfx2", 0 )
9672   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9673   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9674   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9675
9676   ROM_REGION( 0x0100, "proms", 0 )
9677   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9678ROM_END
9679
9680ROM_START( brasil89a )
9681   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil89a.128: Brasil 89a, BS clone. */
9682   ROM_LOAD( "brasil89a.128",  0x4000, 0x4000, CRC(41a93a99) SHA1(70eeaddbdd9d3a587d1330b81d21d881ab0a8c91) )
9683
9684   ROM_REGION( 0x3000, "gfx1", 0 )
9685   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9686   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9687
9688   ROM_REGION( 0x3000, "gfx2", 0 )
9689   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9690   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9691   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9692
9693   ROM_REGION( 0x0100, "proms", 0 )
9694   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9695ROM_END
9696
9697ROM_START( brasil93 )
9698   ROM_REGION( 0x10000, "maincpu", 0 ) /* brasil93.128: Brasil 93, BS clone. No lights */
9699   ROM_LOAD( "brasil93.128",   0x4000, 0x4000, CRC(cc25909f) SHA1(635184022bcb8936c396cb9fcfa6367fcae906fb) )
9700
9701   ROM_REGION( 0x3000, "gfx1", 0 )
9702   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9703   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9704
9705   ROM_REGION( 0x3000, "gfx2", 0 )
9706   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9707   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9708   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9709
9710   ROM_REGION( 0x0100, "proms", 0 )
9711   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9712ROM_END
9713
9714ROM_START( poker91 )
9715   ROM_REGION( 0x10000, "maincpu", 0 ) /* bs_pok91.bin: Poker 91. Based on witchcrd */
9716   ROM_LOAD( "bs_pok91.bin",   0x0000, 0x8000, CRC(90c88b45) SHA1(9b5842075ece5f96a6869d7a8c874dee2b2abde2) )
9717
9718   ROM_REGION( 0x3000, "gfx1", 0 )
9719   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9720   ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) )    /* text layer */
9721
9722   ROM_REGION( 0x3000, "gfx2", 0 )
9723   ROM_LOAD( "7.bin",  0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
9724   ROM_LOAD( "6.bin",  0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
9725   ROM_LOAD( "5.bin",  0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
9726
9727   ROM_REGION( 0x0100, "proms", 0 )
9728   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9729ROM_END
9730
9731/****************************************************
9732
9733  Genie (Video Fun Games Ltd.)
9734  Skill game. Only for amusement.
9735
9736  PCB is a heavily modified Golden Poker hardware.
9737  Silkscreened "ICP-1".
9738
9739  CPU:   1x SY6502.
9740  Video: 1x HD6845P CRTC.
9741  I/O:   2x HD6821P PIAs.
9742
9743  Sound: Discrete.
9744
9745  RAMs:  2x M5L5101LP-1.
9746
9747  ROMs:  2x 2732 for program. (2m.16a, 3m.17a)
9748         1x 2716 for char gen. (4.8a)
9749         3x 2716 for gfx bitplanes. (1.4a, 2.6a, 3.7a)
9750
9751  1x Reset switch. (R.SW)
9752  1x 8 DIP switches bank.
9753  1x 2x10 Edge connector. (GM1)
9754  1x 2x22 Edge connector. (GM2)
9755
9756
9757*****************************************************/
9758ROM_START( genie )
9759   ROM_REGION( 0x10000, "maincpu", 0 )
9760   ROM_LOAD( "2m.16a", 0x2000, 0x1000, CRC(30df75f5) SHA1(0696fb3db0b9927e6366db7316d605914ff8d464) )
9761   ROM_LOAD( "3m.17a", 0x3000, 0x1000, CRC(9d67f5c9) SHA1(d3bc13ce07a7b1713544756d7723dd0bcd59cd1a) )
9762
9763   ROM_REGION( 0x1800, "gfx1", 0 )
9764   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9765   ROM_LOAD( "4.8a",   0x1000, 0x0800, CRC(1cdd1db9) SHA1(1940c6654b4a892abc3e4557666d341f407ac54f) )  /* chars gfx */
9766
9767   ROM_REGION( 0x1800, "gfx2", 0 )
9768   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) )  /* tiles, bitplane1 */
9769   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) )  /* tiles, bitplane2 */
9770   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(151e4af7) SHA1(a44feaa69a00a6db31c018267b8b67a248e7c66e) )  /* tiles, bitplane3 */
9771
9772   ROM_REGION( 0x0800, "nvram", 0 )    /* default NVRAM, otherwise the game isn't stable */
9773   ROM_LOAD( "genie_nvram.bin", 0x0000, 0x0800, CRC(1b062ae7) SHA1(9d01635f3968d4b91b4a5d9fadfaf6edd0dea7ba) )
9774
9775   ROM_REGION( 0x0100, "proms", 0 )    /* using original golden poker color prom */
9776   ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9777ROM_END
9778
9779// Unknown on Blue PCB ICP-1
9780// In fact alt set of Genie...
9781ROM_START( geniea )
9782   ROM_REGION( 0x10000, "maincpu", 0 )
9783   ROM_LOAD( "2732.16a", 0x2000, 0x1000, CRC(c96ef87b) SHA1(a67f290d13fbe33dc7c29271be6f5ef0ec13e927) )
9784   ROM_LOAD( "2732.17a", 0x3000, 0x1000, CRC(dcbfc29b) SHA1(a512b4bd4ab682810d8c432cca03f4320df9928b) )
9785   ROM_LOAD( "2732.15a", 0x7000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) )
9786
9787   ROM_REGION( 0x3000, "gfx1", 0 )
9788   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9789   ROM_LOAD( "2732.9a",    0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) )    /* chars + bitplane3 */
9790
9791   ROM_REGION( 0x1800, "gfx2", 0 )
9792   ROM_LOAD( "2716.4a",   0x0000, 0x0800, CRC(40c52b9d) SHA1(64145bd2aa19b584fa56022303dc595320952c24) )  /* tiles, bitplane1 */
9793   ROM_LOAD( "2716.6a",   0x0800, 0x0800, CRC(b0b61ffa) SHA1(d0a01027bd6acd7c72eb5bbdb37d6dd97df8aced) )  /* tiles, bitplane2 */
9794   ROM_COPY( "gfx1",      0x2800, 0x1000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
9795
9796   ROM_REGION( 0x0100, "proms", 0 )    /* using original golden poker color prom */
9797   ROM_LOAD( "n82s129.9c", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9798ROM_END
9799
9800
9801/****************************************************
9802
9803  Silver Game.
9804  1983.
9805
9806  6502 CPU
9807  2*6821 ios
9808  mc6845 video chip
9809  10mhz (?) xtal
9810
9811  There are French strings related to the game, so maybe is
9812  a leftover, or maybe there is a unknown way to switch the
9813  language.
9814
9815
9816*****************************************************/
9817ROM_START( silverga )
9818   ROM_REGION( 0x10000, "maincpu", 0 )
9819   ROM_LOAD( "14", 0x5000, 0x1000, CRC(e4691878) SHA1(376c3910030f27517d798aac759553d5634b8ffc) )
9820   ROM_LOAD( "55", 0x6000, 0x2000, CRC(aad57b3c) SHA1(9508026c1a7b227a70d89ad2f7245e75a615b932) )
9821
9822   ROM_REGION( 0x3000, "gfx1", 0 )
9823   ROM_FILL(           0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
9824   ROM_LOAD( "13",     0x2000, 0x1000, CRC(98b8cb4f) SHA1(420ea544a41e24478a8eb1c7076f4569607d0379) )    /* text layer */
9825
9826   ROM_REGION( 0x1800, "gfx2", 0 )
9827   ROM_LOAD( "11",     0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
9828   ROM_LOAD( "12",     0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9829   ROM_COPY( "gfx1",   0x2800, 0x1000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd half of the char rom */
9830
9831   ROM_REGION( 0x0100, "proms", 0 )
9832   ROM_LOAD( "s287",       0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9833ROM_END
9834
9835/***************************************************************
9836
9837  Casino Poker
9838  1987, PM / Beck Elektronik
9839
9840  1x Xtal 10.000 MHz.
9841  1x UM6502A
9842  2x UM6521A
9843  1x UM6845
9844
9845  GFX ROMS 051, 052, 053 and 054 have duplicated halves.
9846
9847  Bipolar PROM 24sa10 is filled with 0x09, so has at least
9848  fixed bits 0 and 3 along the whole data. Needs a redump
9849  using a supported EEPROM programmer.
9850
9851  Discrete sound circuitry was traced, being identical to the Golden Poker one.
9852  Only difference is the PC617 replaced by one PC817.
9853
9854  The sound is ugly and seems that was programmed that way.
9855
9856***************************************************************/
9857ROM_START( caspoker )
9858   ROM_REGION( 0x10000, "maincpu", 0 )
9859   ROM_LOAD( "234.bin",    0x4000, 0x1000, CRC(174bc526) SHA1(faef01484f0e0ea769d7bd2c5ad03369a6fdf037) )
9860   ROM_LOAD( "235.bin",    0x5000, 0x1000, CRC(2e43552f) SHA1(5fbe0e62dec960850ef5f937254858fcd4da9e64) )
9861   ROM_LOAD( "236.bin",    0x6000, 0x1000, CRC(3f4cfa39) SHA1(e2750a9c5d12c668e599181ee3972c5d78bd0006) )
9862   ROM_LOAD( "237.bin",    0x7000, 0x1000, CRC(b411d0c4) SHA1(0617cd312026da78a171fc23f4788393d70371cf) )
9863
9864   ROM_REGION( 0x1800, "gfx1", 0 )
9865   ROM_FILL(               0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9866   ROM_LOAD( "054.bin",    0x1000, 0x0800, CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) )    /* text chars */
9867   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
9868
9869   ROM_REGION( 0x1800, "gfx2", 0 )
9870   ROM_LOAD( "051.bin",    0x0000, 0x0800, CRC(82d823e5) SHA1(75bdf427a6204ef87444be0d8b06a07c5a2fc38f) )    /* cards deck gfx, bitplane1 */
9871   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
9872   ROM_LOAD( "052.bin",    0x0800, 0x0800, CRC(eda12738) SHA1(ec7806c2bf1a238f489459c3c3653f43febaa464) )    /* cards deck gfx, bitplane2 */
9873   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
9874   ROM_LOAD( "053.bin",    0x1000, 0x0800, CRC(d147ae0a) SHA1(dfdf0a42eb0a6f2afc9f301b0cf01411085247bd) )    /* cards deck gfx, bitplane3 */
9875   ROM_IGNORE(                     0x0800) /* identical halves, discarding the 2nd half */
9876
9877   ROM_REGION( 0x0800, "nvram", 0 )    /* default NVRAM, otherwise settings parameters are incorrect */
9878   ROM_LOAD( "caspoker_nvram.bin", 0x0000, 0x0800, CRC(be6e2671) SHA1(aef1b09d09e07eb39480a7901ed8535f74e461fa) )
9879
9880   ROM_REGION( 0x0100, "proms", 0 )    /* from other games */
9881   ROM_LOAD( "24sa10.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9882ROM_END
9883
9884/****************************************************
9885
9886  Super Double (Karateco)
9887
9888  French text with some intentional typos to fit size.
9889  Uses both 0x2000..0x3fff and 0x7000..0x7fff ROM range.
9890
9891  This is either the game advertised as "The Double",
9892  or a successor thereof.
9893
9894*****************************************************/
9895ROM_START( superdbl )
9896   ROM_REGION( 0x10000, "maincpu", 0 )
9897   ROM_LOAD( "sd6",  0x7000, 0x1000, CRC(3cf1ccb8) SHA1(c589ddf2e97abb9d95375d0964fd0aa6f7e2e468) )
9898   ROM_LOAD( "sd7",  0x2000, 0x1000, CRC(f5136f82) SHA1(f086cd5495097ede037ea6cae584e95bfcd7b239) )
9899   ROM_LOAD( "8",    0x3000, 0x1000, CRC(157332c2) SHA1(3c66200c49641b9d876c5fa134dd2f0e80136beb) )
9900
9901   ROM_REGION( 0x1800, "gfx1", 0 )
9902   ROM_FILL(                 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9903   ROM_LOAD( "4",    0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) )    /* text layer */
9904
9905   ROM_REGION( 0x1800, "gfx2", 0 )
9906   ROM_LOAD( "1",    0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
9907   ROM_LOAD( "2",    0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9908   ROM_LOAD( "3",    0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
9909
9910   ROM_REGION( 0x0100, "proms", 0 )
9911   ROM_LOAD( "tbp24sa10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
9912ROM_END
9913
9914/****************************************************
9915
9916  Unknown poker game, set 1.
9917  198?.
9918
9919  There are French strings related to the game into
9920  the program ROM.
9921
9922  The dump lacks of 1 program ROM located at 17a.
9923  (empty socket in the PCB picture)
9924
9925*****************************************************/
9926ROM_START( pokerdub )
9927   ROM_REGION( 0x10000, "maincpu", 0 )
9928   ROM_LOAD( "15a_f_83.15a",   0x2000, 0x1000, CRC(06571884) SHA1(6823f5d4a2fc5adf51f1588273f808a2a25a15bc) )
9929   ROM_LOAD( "unknown.17a",    0x3000, 0x1000, NO_DUMP )
9930
9931   ROM_REGION( 0x1800, "gfx1", 0 )
9932   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9933   ROM_LOAD( "4.8a",   0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) )    /* char ROM (cracked title) */
9934
9935   ROM_REGION( 0x1800, "gfx2", 0 )
9936   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
9937   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9938   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
9939
9940   ROM_REGION( 0x0100, "proms", 0 )
9941   ROM_LOAD( "s287.8c",    0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9942ROM_END
9943
9944/****************************************************
9945
9946  Unknown poker game, set 2.
9947  198?.
9948
9949  This one is totally encrypted.
9950  The PCB has a daughterboard coated with some plastic
9951  or epoxy resin.
9952
9953  Char ROM is identical to the Witch Card one.
9954
9955*****************************************************/
9956ROM_START( pokerduc )
9957   ROM_REGION( 0x10000, "maincpu", 0 )
9958   ROM_LOAD( "b",  0x5000, 0x1000, CRC(8627fba5) SHA1(b94665f0bf425ff71f78c1258f910323c2a948f0) )
9959   ROM_LOAD( "c",  0x6000, 0x1000, CRC(b35b4108) SHA1(6504ba55511637334c65e88ee5c60b1503b854b3) )
9960   ROM_LOAD( "d",  0x7000, 0x1000, CRC(c48096ed) SHA1(279ba433369c7dc9cd902a19200e889eea45d115) )
9961
9962   ROM_REGION( 0x1800, "gfx1", 0 )
9963   ROM_FILL(           0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
9964   ROM_LOAD( "a.8a",   0x1000, 0x0800, CRC(c70a3e49) SHA1(eb2f15b344f4dec5f05701415848c854bb27aaa3) )    /* char ROM (cracked title) */
9965
9966   ROM_REGION( 0x1800, "gfx2", 0 )
9967   ROM_LOAD( "1.4a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
9968   ROM_LOAD( "2.6a",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
9969   ROM_LOAD( "3.7a",   0x1000, 0x0800, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
9970   ROM_IGNORE(                 0x0800) /* identical halves */
9971
9972   ROM_REGION( 0x0100, "proms", 0 )
9973   ROM_LOAD( "tbp24s10.9c",    0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
9974ROM_END
9975
9976/*
9977
99569978  Bonne Chance!
99579979  This PCB came with PIAs 6821 for IO
99589980
r250291r250292
99669988            5f63
99679989
99689990*/
9969
99709991ROM_START( bchancep )   /* Bonne Chance! with PIAs 6821 */
99719992   ROM_REGION( 0x3000, "gfx", 0 )
99729993   ROM_LOAD( "84.bin",  0x0000, 0x1000, CRC(31f8104e) SHA1(b99f79019517ca90c48e9f303f41256d68faea91) )     /* cards deck gfx bitplane 3, identical halves */
r250291r250292
1002310044  in banks of 0x4000 each.
1002410045
1002510046*/
10026
1002710047ROM_START( pokermon )
1002810048   ROM_REGION( 0x10000, "maincpu", 0 ) /* 2 programs, selectable via DIP switch */
1002910049   ROM_LOAD( "mbv_bi.bin",      0x0000, 0x8000, CRC(da00e08a) SHA1(98e52915178e29ab3ae674e6b895da14626d3dd8) )
r250291r250292
1006810088   ROM_LOAD( "n82s129n.bin",  0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1006910089ROM_END
1007010090
10071
1007210091/*
1007310092  Super 98',
1007410093  running in the ICP-1 boardset.
r250291r250292
1007610095  Please read the 'Games Notes' section
1007710096  for game and debug notes / issues...
1007810097*/
10079
1008010098ROM_START( super98 )
1008110099   ROM_REGION( 0x10000, "maincpu", 0 )
1008210100   ROM_LOAD( "27c256.17a",   0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) )
r250291r250292
1039610414
1039710415  And repeat for every 0x100 segments...
1039810416
10399  So...
10400
10401  0000-0007 ok.
10402  0008-000f XOR 0x04
10403  0010-0017 XOR 0x02
10404  0018-001f XOR 0x06
10405
10406  0020-0027 ok.
10407  0028-002f XOR 0x04
10408  0030-0037 XOR 0x02
10409  0038-003f XOR 0x06
10410
10411  0040-0047 XOR 0x01
10412  0048-004f XOR 0x05
10413  0050-0057 XOR 0x03
10414  0058-005f XOR 0x07
10415
10416  0060-0067 XOR 0x01
10417  0068-006f XOR 0x05
10418  0070-0077 XOR 0x03
10419  0078-007f XOR 0x07
10420
10421  0080-0087 XOR 0x40
10422  0088-008f XOR 0x44
10423  0090-0097 XOR 0x42
10424  0098-009f XOR 0x46
10425
10426  00a0-00a7 XOR 0x40
10427  00a8-00af XOR 0x44
10428  00b0-00b7 XOR 0x42
10429  00b8-00bf XOR 0x46
10430
10431  00c0-00c7 XOR 0x41
10432  00c8-00cf XOR 0x45
10433  00d0-00d7 XOR 0x43
10434  00d8-00df XOR 0x47
10435
10436  00e0-00e7 XOR 0x41
10437  00e8-00ef XOR 0x45
10438  00f0-00f7 XOR 0x43
10439  00f8-00ff XOR 0x47
10440
10417  If you apply these XOR's to get 00's, the code has no sense,
10418  so something is missing. For now will comment out the partial
10419  decryption code...
10420 
1044110421***********************************************/
1044210422
1044310423DRIVER_INIT_MEMBER(goldnpkr_state, icp1db)
1044410424{
10445   /* nothing yet... */
10425/*
10426   int i;
10427   UINT8 *ROM = memregion("maincpu")->base();
10428
10429   unsigned char rawData[256] = {
10430      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB,
10431      0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9,
10432      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB,
10433      0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9,
10434      0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA,
10435      0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
10436      0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA, 0xFA,
10437      0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
10438      0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB,
10439      0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9,
10440      0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB,
10441      0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9, 0xB9,
10442      0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA,
10443      0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8,
10444      0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA,
10445      0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xBC, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8, 0xB8,
10446   };
10447
10448   for (i = 0; i < 0x10000; i++)
10449   {
10450      ROM[i] = ROM[i] ^ rawData[i & 0xff];
10451   }
10452*/
1044610453}
1044710454
1044810455/**********************************************
r250291r250292
1053410541GAMEL( 198?, potnpkre,  pottnpkr, pottnpkr, pottnpkr, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 6)",             0,                layout_goldnpkr )
1053510542GAMEL( 198?, potnpkrf,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 7, Royale GFX)", 0,                layout_goldnpkr )
1053610543GAMEL( 198?, potnpkrg,  pottnpkr, pottnpkr, potnpkra, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 8, Australian)", 0,                layout_goldnpkr )
10537GAMEL( 198?, superdbl,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "Karateco",                 "Super Double (French)",                   0,                layout_goldnpkr )
10544GAMEL( 198?, potnpkrh,  pottnpkr, pottnpkr, goldnpkr, driver_device,  0,        ROT0,   "bootleg",                  "Jack Potten's Poker (set 9, 'just 4 fun')", 0,              layout_goldnpkr )
1053810545GAMEL( 198?, ngold,     pottnpkr, pottnpkr, ngold,    driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 1)",      0,                layout_goldnpkr )
1053910546GAMEL( 198?, ngolda,    pottnpkr, pottnpkr, ngold,    driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 2)",      0,                layout_goldnpkr )
1054010547GAMEL( 198?, ngoldb,    pottnpkr, pottnpkr, ngoldb,   driver_device,  0,        ROT0,   "<unknown>",                "Jack Potten's Poker (NGold, set 3)",      0,                layout_goldnpkr )
1054110548
10542GAMEL( 1991, witchcrd,  0,        witchcrd, witchcrd, goldnpkr_state, vkdlsc,   ROT0,   "Video Klein?",             "Witch Card (Video Klein CPU box, set 1)", 0,                layout_goldnpkr )
10543GAME(  1991, witchcda,  witchcrd, witchcrd, witchcda, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (Spanish, witch game, set 1)", 0 )
10544GAME(  1991, witchcdb,  witchcrd, witchcrd, witchcda, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (Spanish, witch game, set 2)", 0 )
10545GAME(  1991, witchcdc,  witchcrd, witchcrd, witchcdc, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (English, no witch game)",     0 )
10546GAMEL( 1994, witchcdd,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, set 1 )",     0,                layout_goldnpkr )
10547GAMEL( 1991, witchcde,  witchcrd, witchcrd, witchcrd, goldnpkr_state, vkdlsc,   ROT0,   "Video Klein",              "Witch Card (Video Klein CPU box, set 2)", 0,                layout_goldnpkr )
10548GAMEL( 1985, witchcdf,  witchcrd, witchcrd, witchcdf, driver_device,  0,        ROT0,   "PM / Beck Elektronik",     "Witch Card (English, witch game, lamps)", 0,                layout_goldnpkr )
10549GAMEL( 199?, witchcdg,  witchcrd, wcfalcon, witchcrd, driver_device,  0,        ROT0,   "Falcon",                   "Witch Card (Falcon, enhanced sound)",     0,                layout_goldnpkr )
10550GAMEL( 1994, witchcdh,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, set 2 )",     0,                layout_goldnpkr )
10551GAMEL( 1994, witchcdi,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, 27-4-94)",    0,                layout_goldnpkr )
10552
10553GAMEL( 1991, witchgme,  0,        witchcrd, witchcrd, driver_device,  0,        ROT0,   "Video Klein",              "Witch Game (Video Klein, set 1)",         0,                layout_goldnpkr )
10554GAMEL( 1997, witchcdk,  witchgme, witchcrd, witchcrd, driver_device,  0,        ROT0,   "Video Klein",              "Witch Game (Video Klein, set 2)",         MACHINE_NOT_WORKING, layout_goldnpkr )
10555
10556GAMEL( 1994, witchjol,  0,        wcrdxtnd, witchjol, goldnpkr_state, vkdlsa,   ROT0,   "Video Klein",              "Jolli Witch (Export, 6T/12T ver 1.57D)",  0,                layout_goldnpkr )
10557
10558GAMEL( 2001, wldwitch,  0,        wcrdxtnd, wldwitch, goldnpkr_state, vkdlsww,  ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.84A)",       0,                layout_goldnpkr )  /* Ver 184A, 2001-09-12 */
10559GAMEL( 1992, wldwitcha, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwa, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.57-SP)",     0,                layout_goldnpkr )  /* Ver 157-SP, 1992-12-25 */
10560GAMEL( 1992, wldwitchb, wldwitch, wcrdxtnd, wldwitch, driver_device,  0,        ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.57-TE)",     MACHINE_NOT_WORKING, layout_goldnpkr )   /* Ver 157-TE, 1992-12-25 */
10561GAMEL( 1994, wldwitchc, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwc, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A)",       0,                layout_goldnpkr )  /* Ver 162A, 1994-04-26 */
10562GAMEL( 1994, wldwitchd, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwd, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62B)",       0,                layout_goldnpkr )  /* Ver 162B, 1994-04-26 */
10563GAMEL( 1994, wldwitche, wldwitch, wcrdxtnd, wldwitch, driver_device,  0,        ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A-F)",     MACHINE_NOT_WORKING, layout_goldnpkr )   /* Ver 162A-F, 1994-04-26 */
10564GAMEL( 1994, wldwitchf, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwc, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A alt)",   0,                layout_goldnpkr )  /* Ver 162A alt, 1994-11-03 */
10565GAMEL( 1994, wldwitchg, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwd, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62B alt)",   0,                layout_goldnpkr )  /* Ver 162B alt, 1994-11-03 */
10566GAMEL( 1995, wldwitchh, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A)",       0,                layout_goldnpkr )  /* Ver 165A, 1995-11-16 */
10567GAMEL( 1996, wldwitchi, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-S)",     0,                layout_goldnpkr )  /* Ver 165A-S (Fast Deal), 1996-03-26 */
10568GAMEL( 1996, wldwitchj, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-S alt)", 0,                layout_goldnpkr )  /* Ver 165A-S alt (Fast Deal), 1996-05-26 */
10569GAMEL( 1996, wldwitchk, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-N)",     0,                layout_goldnpkr )  /* Ver 165A-N, 1996-05-29 */
10570GAMEL( 1996, wldwitchl, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A beta)",  0,                layout_goldnpkr )  /* Ver 170A-beta, 1996-06-25 */
10571GAMEL( 1996, wldwitchm, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A)",       0,                layout_goldnpkr )  /* Ver 170A, 1996-09-30 */
10572GAMEL( 1997, wldwitchn, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A alt)",   0,                layout_goldnpkr )  /* Ver 170A alt, 1997-06-11 */
10573GAMEL( 1998, wldwitcho, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwo, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A-SP-BELG)", 0,              layout_goldnpkr )  /* Ver 174A-SP-BELG (no D-UP, no payout), 1998-05-11 */
10574GAMEL( 1998, wldwitchp, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwp, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A)",       0,                layout_goldnpkr )  /* Ver 174A (no D-UP, no payout), 1998-09-20 */
10575GAMEL( 1998, wldwitchq, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlsb,   ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A alt)",   0,                layout_goldnpkr )  /* Ver 174A alt, box, 1998-09-25 */
10576GAMEL( 1999, wldwitchr, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwr, ROT0,   "Video Klein",              "Wild Witch (Export, 6B/12B ver 1.75A-E English)", 0,            layout_goldnpkr )  /* Ver 175A-E (English), 1999-01-11 */
10577GAMEL( 1999, wldwitchs, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswws, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.76A)",       0,                layout_goldnpkr )  /* Ver 176A, 1999-??-?? */
10578GAMEL( 1999, wldwitcht, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwt, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.77A)",       0,                layout_goldnpkr )  /* Ver 177A, 1999-??-?? */
10579GAMEL( 2000, wldwitchu, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwu, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.79A)",       0,                layout_goldnpkr )  /* Ver 179A, 2000-05-10 */
10580GAMEL( 2001, wldwitchv, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwv, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.83A)",       0,                layout_goldnpkr )  /* Ver 183A, 2001-06-13 */
10581
10582GAMEL( 1998, wupndown,  0,        wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 1.02)",        0,           layout_upndown )    /* Ver 1.02, 1998-10-26 */
10583GAMEL( 1998, wupndowna, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 1)", 0,           layout_upndown )    /* Ver 0.99, 1998-04-09 */
10584GAMEL( 1998, wupndownb, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 2)", 0,           layout_upndown )    /* Ver 0.99, 1998-03-23 */
10585GAMEL( 1998, wupndownc, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 3)", 0,           layout_upndown )    /* Ver 0.99 alt, 1998-05-11 */
10586GAMEL( 1998, wupndownd, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99T)",       0,           layout_upndown )    /* Ver 0.99T, 1998-03-23 */
10587
10588GAMEL( 1992, wstrike,   0,        wcrdxtnd, wstrike,  goldnpkr_state, wstrike,  ROT0,   "Video Klein",              "Witch Strike (Export, 6T/12T ver 1.01A)",     0,                layout_goldnpkr )
10589GAMEL( 1992, wstrikea,  wstrike,  wcrdxtnd, wstrike,  goldnpkr_state, wstrike,  ROT0,   "Video Klein",              "Witch Strike (Export, 6T/12T ver 1.01B)",     0,                layout_goldnpkr )
10590
10591GAMEL( 1996, wtchjack,  0,        wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87-89)", 0,                       layout_goldnpkr )    /* Ver 0.87-89 / 1996-10-08 GFX OK */
10592GAMEL( 1994, wtchjacka, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jackpot (Export, 6T/12T ver 0.25)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.25 / 1994-11-24 */
10593GAMEL( 1995, wtchjackb, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.40)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.40 / 1995-02-27 */
10594GAMEL( 1995, wtchjackc, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.40T)",   MACHINE_NOT_WORKING,        layout_goldnpkr )    /* Ver 0.40T / 1995-02-27 */
10595GAMEL( 1995, wtchjackd, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.62)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.62 / 1995-08-02 */
10596GAMEL( 1995, wtchjacke, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.64)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.64 / 1995-09-13 */
10597GAMEL( 1995, wtchjackf, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.65)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.65 / 1995-10-19 */
10598GAMEL( 1996, wtchjackg, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.70S)",   MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.70S / 1996-03-26 */
10599GAMEL( 1996, wtchjackh, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.70P)",   MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.70P / 1996-03-26 */
10600GAMEL( 1996, wtchjacki, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87)",    0,                       layout_goldnpkr )    /* Ver 0.87 / 1996-07-16, GFX OK */
10601GAMEL( 1996, wtchjackj, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87-88)", 0,                       layout_goldnpkr )    /* Ver 0.87-88 / 1996-10-02, GFX OK */
10602
1060310549GAMEL( 1990, bsuerte,   0,        witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 1)",           0,                layout_goldnpkr )
1060410550GAMEL( 1991, bsuertea,  bsuerte,  witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 2)",           0,                layout_goldnpkr )
1060510551GAMEL( 1991, bsuerteb,  bsuerte,  witchcrd, bsuerte,  driver_device,  0,        ROT0,   "<unknown>",                "Buena Suerte (Spanish, set 3)",           0,                layout_goldnpkr )
r250291r250292
1062910575GAMEL( 1990, falcnwldb, falcnwld, wildcard, wildcard, driver_device,  0,        ROT0,   "Video Klein",              "Falcons Wild - World Wide Poker (Video Klein, set 2)", 0,   layout_goldnpkr )
1063010576GAME(  1983, falcnwldc, falcnwld, wildcrdb, wildcard, goldnpkr_state, flcnw,    ROT0,   "Falcon",                   "Falcons Wild - World Wide Poker (Falcon original)",    MACHINE_NOT_WORKING )
1063110577
10578GAMEL( 1991, witchcrd,  0,        witchcrd, witchcrd, goldnpkr_state, vkdlsc,   ROT0,   "Video Klein?",             "Witch Card (Video Klein CPU box, set 1)", 0,                layout_goldnpkr )
10579GAME(  1991, witchcda,  witchcrd, witchcrd, witchcda, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (Spanish, witch game, set 1)", 0 )
10580GAME(  1991, witchcdb,  witchcrd, witchcrd, witchcda, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (Spanish, witch game, set 2)", 0 )
10581GAME(  1991, witchcdc,  witchcrd, witchcrd, witchcdc, driver_device,  0,        ROT0,   "<unknown>",                "Witch Card (English, no witch game)",     0 )
10582GAMEL( 1994, witchcdd,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, set 1 )",     0,                layout_goldnpkr )
10583GAMEL( 1991, witchcde,  witchcrd, witchcrd, witchcrd, goldnpkr_state, vkdlsc,   ROT0,   "Video Klein",              "Witch Card (Video Klein CPU box, set 2)", 0,                layout_goldnpkr )
10584GAMEL( 1985, witchcdf,  witchcrd, witchcrd, witchcdf, driver_device,  0,        ROT0,   "PM / Beck Elektronik",     "Witch Card (English, witch game, lamps)", 0,                layout_goldnpkr )
10585GAMEL( 199?, witchcdg,  witchcrd, wcfalcon, witchcrd, driver_device,  0,        ROT0,   "Falcon",                   "Witch Card (Falcon, enhanced sound)",     0,                layout_goldnpkr )
10586GAMEL( 1994, witchcdh,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, set 2 )",     0,                layout_goldnpkr )
10587GAMEL( 1994, witchcdi,  witchcrd, witchcrd, witchcdd, driver_device,  0,        ROT0,   "Proma",                    "Witch Card (German, WC3050, 27-4-94)",    0,                layout_goldnpkr )
10588
10589GAMEL( 1991, witchgme,  0,        witchcrd, witchcrd, driver_device,  0,        ROT0,   "Video Klein",              "Witch Game (Video Klein, set 1)",         0,                layout_goldnpkr )
10590GAMEL( 1997, witchcdk,  witchgme, witchcrd, witchcrd, driver_device,  0,        ROT0,   "Video Klein",              "Witch Game (Video Klein, set 2)",         MACHINE_NOT_WORKING, layout_goldnpkr )
10591
10592GAMEL( 1994, witchjol,  0,        wcrdxtnd, witchjol, goldnpkr_state, vkdlsa,   ROT0,   "Video Klein",              "Jolli Witch (Export, 6T/12T ver 1.57D)",  0,                layout_goldnpkr )
10593
10594GAMEL( 2001, wldwitch,  0,        wcrdxtnd, wldwitch, goldnpkr_state, vkdlsww,  ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.84A)",       0,                   layout_goldnpkr )  /* Ver 184A, 2001-09-12 */
10595GAMEL( 1992, wldwitcha, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwa, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.57-SP)",     0,                   layout_goldnpkr )  /* Ver 157-SP, 1992-12-25 */
10596GAMEL( 1992, wldwitchb, wldwitch, wcrdxtnd, wldwitch, driver_device,  0,        ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.57-TE)",     MACHINE_NOT_WORKING, layout_goldnpkr )  /* Ver 157-TE, 1992-12-25 */
10597GAMEL( 1994, wldwitchc, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwc, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A)",       0,                   layout_goldnpkr )  /* Ver 162A, 1994-04-26 */
10598GAMEL( 1994, wldwitchd, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwd, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62B)",       0,                   layout_goldnpkr )  /* Ver 162B, 1994-04-26 */
10599GAMEL( 1994, wldwitche, wldwitch, wcrdxtnd, wldwitch, driver_device,  0,        ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A-F)",     MACHINE_NOT_WORKING, layout_goldnpkr )  /* Ver 162A-F, 1994-04-26 */
10600GAMEL( 1994, wldwitchf, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwc, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62A alt)",   0,                   layout_goldnpkr )  /* Ver 162A alt, 1994-11-03 */
10601GAMEL( 1994, wldwitchg, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwd, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.62B alt)",   0,                   layout_goldnpkr )  /* Ver 162B alt, 1994-11-03 */
10602GAMEL( 1995, wldwitchh, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A)",       0,                   layout_goldnpkr )  /* Ver 165A, 1995-11-16 */
10603GAMEL( 1996, wldwitchi, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-S)",     0,                   layout_goldnpkr )  /* Ver 165A-S (Fast Deal), 1996-03-26 */
10604GAMEL( 1996, wldwitchj, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-S alt)", 0,                   layout_goldnpkr )  /* Ver 165A-S alt (Fast Deal), 1996-05-26 */
10605GAMEL( 1996, wldwitchk, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwh, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.65A-N)",     0,                   layout_goldnpkr )  /* Ver 165A-N, 1996-05-29 */
10606GAMEL( 1996, wldwitchl, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A beta)",  0,                   layout_goldnpkr )  /* Ver 170A-beta, 1996-06-25 */
10607GAMEL( 1996, wldwitchm, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A)",       0,                   layout_goldnpkr )  /* Ver 170A, 1996-09-30 */
10608GAMEL( 1997, wldwitchn, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwl, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.70A alt)",   0,                   layout_goldnpkr )  /* Ver 170A alt, 1997-06-11 */
10609GAMEL( 1998, wldwitcho, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwo, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A-SP-BELG)", 0,                 layout_goldnpkr )  /* Ver 174A-SP-BELG (no D-UP, no payout), 1998-05-11 */
10610GAMEL( 1998, wldwitchp, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwp, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A)",       0,                   layout_goldnpkr )  /* Ver 174A (no D-UP, no payout), 1998-09-20 */
10611GAMEL( 1998, wldwitchq, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlsb,   ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.74A alt)",   0,                   layout_goldnpkr )  /* Ver 174A alt, box, 1998-09-25 */
10612GAMEL( 1999, wldwitchr, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwr, ROT0,   "Video Klein",              "Wild Witch (Export, 6B/12B ver 1.75A-E English)", 0,               layout_goldnpkr )  /* Ver 175A-E (English), 1999-01-11 */
10613GAMEL( 1999, wldwitchs, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswws, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.76A)",       0,                   layout_goldnpkr )  /* Ver 176A, 1999-??-?? */
10614GAMEL( 1999, wldwitcht, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwt, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.77A)",       0,                   layout_goldnpkr )  /* Ver 177A, 1999-??-?? */
10615GAMEL( 2000, wldwitchu, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwu, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.79A)",       0,                   layout_goldnpkr )  /* Ver 179A, 2000-05-10 */
10616GAMEL( 2001, wldwitchv, wldwitch, wcrdxtnd, wldwitch, goldnpkr_state, vkdlswwv, ROT0,   "Video Klein",              "Wild Witch (Export, 6T/12T ver 1.83A)",       0,                   layout_goldnpkr )  /* Ver 183A, 2001-06-13 */
10617
10618GAMEL( 1998, wupndown,  0,        wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 1.02)",        0,           layout_upndown )    /* Ver 1.02, 1998-10-26 */
10619GAMEL( 1998, wupndowna, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 1)", 0,           layout_upndown )    /* Ver 0.99, 1998-04-09 */
10620GAMEL( 1998, wupndownb, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 2)", 0,           layout_upndown )    /* Ver 0.99, 1998-03-23 */
10621GAMEL( 1998, wupndownc, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99, set 3)", 0,           layout_upndown )    /* Ver 0.99 alt, 1998-05-11 */
10622GAMEL( 1998, wupndownd, wupndown, wcrdxtnd, wupndown, driver_device,  0,        ROT0,   "Video Klein",              "Witch Up & Down (Export, 6T/12T ver 0.99T)",       0,           layout_upndown )    /* Ver 0.99T, 1998-03-23 */
10623
10624GAMEL( 1992, wstrike,   0,        wcrdxtnd, wstrike,  goldnpkr_state, wstrike,  ROT0,   "Video Klein",              "Witch Strike (Export, 6T/12T ver 1.01A)",     0,                layout_goldnpkr )
10625GAMEL( 1992, wstrikea,  wstrike,  wcrdxtnd, wstrike,  goldnpkr_state, wstrike,  ROT0,   "Video Klein",              "Witch Strike (Export, 6T/12T ver 1.01B)",     0,                layout_goldnpkr )
10626
10627GAMEL( 1996, wtchjack,  0,        wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87-89)", 0,                          layout_goldnpkr )    /* Ver 0.87-89 / 1996-10-08 GFX OK */
10628GAMEL( 1996, wtchjacka, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87-88)", 0,                          layout_goldnpkr )    /* Ver 0.87-88 / 1996-10-02, GFX OK */
10629GAMEL( 1996, wtchjackb, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.87)",    0,                          layout_goldnpkr )    /* Ver 0.87 / 1996-07-16, GFX OK */
10630GAMEL( 1996, wtchjackc, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.70S)",   MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.70S / 1996-03-26 */
10631GAMEL( 1996, wtchjackd, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.70P)",   MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.70P / 1996-03-26 */
10632GAMEL( 1995, wtchjacke, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.65)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.65 / 1995-10-19 */
10633GAMEL( 1995, wtchjackf, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.64)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.64 / 1995-09-13 */
10634GAMEL( 1995, wtchjackg, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.62)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.62 / 1995-08-02 */
10635GAMEL( 1995, wtchjackh, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.40T)",   MACHINE_NOT_WORKING,        layout_goldnpkr )    /* Ver 0.40T / 1995-02-27 */
10636GAMEL( 1995, wtchjacki, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jack (Export, 6T/12T ver 0.40)",    MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.40 / 1995-02-27 */
10637GAMEL( 1994, wtchjackj, wtchjack, wcrdxtnd, wtchjack, driver_device,  0,        ROT0,   "Video Klein",              "Witch Jackpot (Export, 6T/12T ver 0.25)", MACHINE_IMPERFECT_GRAPHICS, layout_goldnpkr )    /* Ver 0.25 / 1994-11-24 */
10638
1063210639/*************************************** OTHER SETS ***************************************/
1063310640
1063410641/*     YEAR  NAME       PARENT    MACHINE   INPUT     STATE           INIT      ROT      COMPANY                     FULLNAME                                  FLAGS             LAYOUT  */
r250291r250292
1064910656GAMEL( 1983, silverga,  0,        goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "<unknown>",                "Silver Game",                             0,                layout_goldnpkr )
1065010657GAME(  1987, caspoker,  0,        goldnpkr, caspoker, driver_device,  0,        ROT0,   "PM / Beck Elektronik",     "Casino Poker (Ver PM86LO-35-5, German)",  MACHINE_IMPERFECT_COLORS )
1065110658
10659GAMEL( 198?, superdbl,  pottnpkr, goldnpkr, goldnpkr, driver_device,  0,        ROT0,   "Karateco",                 "Super Double (French)",                   0,                layout_goldnpkr )
1065210660GAME(  198?, pokerdub,  0,        pottnpkr, goldnpkr, driver_device,  0,        ROT0,   "<unknown>",                "unknown French poker game",               MACHINE_NOT_WORKING )   // lacks of 2nd program ROM.
1065310661GAME(  198?, pokerduc,  0,        goldnpkr, goldnpkr, goldnpkr_state, icp1db,   ROT0,   "<unknown>",                "unknown encrypted poker game",            MACHINE_NOT_WORKING )   // encrypted.
1065410662
trunk/src/mame/drivers/goldstar.cpp
r250291r250292
62366236   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* Tied to GND and to the hidden switch that change games. (PC0+GND) -+-> PB0 */
62376237
62386238   PORT_START("DSW1")
6239   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )  PORT_DIPLOCATION("DSW1:!1")  /* OK */
6239   PORT_DIPNAME( 0x01, 0x01, "Unknown" )                   PORT_DIPLOCATION("DSW1:!1")     /* not checked */
62406240   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
62416241   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6242   PORT_DIPNAME( 0x02, 0x02, "Hopper Out Switch" ) PORT_DIPLOCATION("DSW1:!2")  /* OK */
6242   PORT_DIPNAME( 0x02, 0x02, "Hopper Out Switch" )         PORT_DIPLOCATION("DSW1:!2")     /* not checked */
62436243   PORT_DIPSETTING(    0x02, "Active Low" )
62446244   PORT_DIPSETTING(    0x00, "Active High" )
6245   PORT_DIPNAME( 0x04, 0x04, "Payout Mode" )       PORT_DIPLOCATION("DSW1:!3")  /* OK */
6245   PORT_DIPNAME( 0x04, 0x04, "Payout Mode" )               PORT_DIPLOCATION("DSW1:!3")     /* not checked */
62466246   PORT_DIPSETTING(    0x04, "Payout Switch" )
62476247   PORT_DIPSETTING(    0x00, "Automatic" )
6248   PORT_DIPNAME( 0x08, 0x00, "W-UP '7'" )          PORT_DIPLOCATION("DSW1:!4")  /* not checked */
6249   PORT_DIPSETTING(    0x08, "Loss" )
6250   PORT_DIPSETTING(    0x00, "Even" )
6251   PORT_DIPNAME( 0x10, 0x00, "W-UP Pay Rate" )     PORT_DIPLOCATION("DSW1:!5")  /* OK */
6248   PORT_DIPNAME( 0x08, 0x00, "'7' In Double Up Game" )     PORT_DIPLOCATION("DSW1:!4")     /* OK */
6249   PORT_DIPSETTING(    0x00, "Lose" )
6250   PORT_DIPSETTING(    0x08, "Even" )
6251   PORT_DIPNAME( 0x10, 0x00, "Double Up Game Pay Rate" )   PORT_DIPLOCATION("DSW1:!5")     /* OK */
62526252   PORT_DIPSETTING(    0x00, "80%" )
62536253   PORT_DIPSETTING(    0x10, "90%" )
6254   PORT_DIPNAME( 0x20, 0x00, "W-UP Game" )         PORT_DIPLOCATION("DSW1:!6")  /* OK */
6254   PORT_DIPNAME( 0x20, 0x00, "Double Up Game" )            PORT_DIPLOCATION("DSW1:!6")     /* OK */
62556255   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
62566256   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6257   PORT_DIPNAME( 0xc0, 0xc0, "Bet Max" )           PORT_DIPLOCATION("DSW1:!7,!8")    /* OK */
6257   PORT_DIPNAME( 0xc0, 0xc0, "Bet Max" )                   PORT_DIPLOCATION("DSW1:!7,!8")  /* OK */
62586258   PORT_DIPSETTING(    0x00, "16" )
62596259   PORT_DIPSETTING(    0x40, "32" )
62606260   PORT_DIPSETTING(    0x80, "64" )
62616261   PORT_DIPSETTING(    0xc0, "96" )
62626262
62636263   PORT_START("DSW2")
6264   PORT_DIPNAME( 0x07, 0x00, "Main Game Pay Rate" )    PORT_DIPLOCATION("DSW2:!1,!2,!3")  /* OK */
6264   PORT_DIPNAME( 0x07, 0x00, "Main Game Pay Rate" )    PORT_DIPLOCATION("DSW2:!1,!2,!3")  /* OK */
62656265   PORT_DIPSETTING(    0x07, "55%" )
62666266   PORT_DIPSETTING(    0x06, "60%" )
62676267   PORT_DIPSETTING(    0x05, "65%" )
r250291r250292
62706270   PORT_DIPSETTING(    0x02, "80%" )
62716271   PORT_DIPSETTING(    0x01, "85%" )
62726272   PORT_DIPSETTING(    0x00, "90%" )
6273   PORT_DIPNAME( 0x18, 0x00, "Hopper Limit" )          PORT_DIPLOCATION("DSW2:!4,!5")    /* OK */
6273   PORT_DIPNAME( 0x18, 0x00, "Hopper Limit" )          PORT_DIPLOCATION("DSW2:!4,!5")      /* not checked */
62746274   PORT_DIPSETTING(    0x18, "300" )
62756275   PORT_DIPSETTING(    0x10, "500" )
62766276   PORT_DIPSETTING(    0x08, "1000" )
62776277   PORT_DIPSETTING(    0x00, "Unlimited" )
6278   PORT_DIPNAME( 0x20, 0x00, "100 Odds Sound" )        PORT_DIPLOCATION("DSW2:!6")  /* not checked */
6278   PORT_DIPNAME( 0x20, 0x00, "100 Odds Sound" )        PORT_DIPLOCATION("DSW2:!6")         /* not checked */
62796279   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
62806280   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
6281   PORT_DIPNAME( 0x40, 0x40, "Key-In Type" )           PORT_DIPLOCATION("DSW2:!7")  /* OK */
6281   PORT_DIPNAME( 0x40, 0x40, "Key-In Type" )           PORT_DIPLOCATION("DSW2:!7")         /* OK */
62826282   PORT_DIPSETTING(    0x40, "A-Type" )
62836283   PORT_DIPSETTING(    0x00, "B-Type" )
6284   PORT_DIPNAME( 0x80, 0x00, "Center Super 7 Bet Limit" )  PORT_DIPLOCATION("DSW2:!8")  /* related with DSW 4-6 */
6284   PORT_DIPNAME( 0x80, 0x00, "Center Super 7 Bet Limit" )  PORT_DIPLOCATION("DSW2:!8")     /* related with DSW 4-6 */
62856285   PORT_DIPSETTING(    0x80, "Unlimited" )
62866286   PORT_DIPSETTING(    0x00, "Limited" )
62876287
r250291r250292
63186318   PORT_INCLUDE( cmv4_dsw4 )   /* Display Of Payout Limit not working; all others OK */
63196319
63206320   PORT_INCLUDE( cmv4_dsw5 )
6321   PORT_MODIFY("DSW5")
63216322   /* Display of Doll On Demo only affects payout table screen */
63226323   /* Coin In Limit OK */
6323   /* Condition For 3 Kind Of Bonus not checked */
6324   /* Condition For 3 Kind Of Bonus OK */
63246325   /* Display Of Doll At All Fr. Bonus not checked */
6325   /* DSW5-7 listed as unused */
6326   PORT_DIPNAME( 0x40, 0x40, "Card Shuffle Animation" )    PORT_DIPLOCATION("DSW5:7")  /* OK */
6327   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6328   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
63266329   /* Test Mode For Disp. Of Doll not working */
63276330INPUT_PORTS_END
63286331
trunk/src/mame/drivers/model3.cpp
r250291r250292
667667#include "includes/model3.h"
668668
669669
670// for now, make buggy GCC/Mingw STFU about I64FMT
671#if (defined(__MINGW32__) && (__GNUC__ >= 5))
672#pragma GCC diagnostic push
673#pragma GCC diagnostic ignored "-Wformat"
674#pragma GCC diagnostic ignored "-Wformat-extra-args"
675#endif
676
677
678670void model3_state::update_irq_state()
679671{
680672   if ((m_irq_enable & m_irq_state) || m_scsi_irq_state)
r250291r250292
60596051GAME( 1999, eca,              0, model3_21_5881, eca,      model3_state, eca,      ROT0, "Sega", "Emergency Call Ambulance (Export)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
60606052GAME( 1999, ecau,           eca, model3_21_5881, eca,      model3_state, eca,      ROT0, "Sega", "Emergency Call Ambulance (USA)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
60616053GAME( 1999, ecap,           eca, model3_21_5881, eca,      model3_state, eca,      ROT0, "Sega", "Emergency Call Ambulance (US location test?)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
6062
6063#if (defined(__MINGW32__) && (__GNUC__ >= 5))
6064#pragma GCC diagnostic pop
6065#endif
trunk/src/mame/drivers/namcos23.cpp
r250291r250292
8686        return
8787
8888
89c8000000:
90  8011e384:
91   if((a2000000.w & 0xfff0 != 0x0080) (c417_r, 808e or 008e)
92     +10.w = 2
93     +16.w = 42
94     +16.w = 23c0
95     +10.w = 3
96     801deaf0.w *0x28 -> +12.w (fixed)
97
98
99
100
101':maincpu' (801142FC): unmapped program memory write to 0C800010 = 00020000 & FFFF0000
102':maincpu' (801143A8): unmapped program memory write to 0C800010 = 00020000 & FFFF0000
103':maincpu' (801143B4): unmapped program memory write to 0C800014 = 00000042 & 0000FFFF
104':maincpu' (801143C0): unmapped program memory write to 0C800014 = 000023C0 & 0000FFFF
105':maincpu' (801143CC): unmapped program memory write to 0C800010 = 00030000 & FFFF0000
106':maincpu' (801143E0): unmapped program memory write to 0C800010 = 00000000 & 0000FFFF
107':maincpu' (801143E0): unmapped program memory write to 0C800010 = 00000000 & 0000FFFF
108':maincpu' (801143E0): unmapped program memory write to 0C800010 = 00000000 & 0000FFFF
109':maincpu' (801143E0): unmapped program memory write to 0C800010 = 00000000 & 0000FFFF
110
89111****************************************************************************
90112
91113Namco System 23 and Super System 23 Hardware Overview (last updated 7th April 2013 at 12.49am)
r250291r250292
15231545   DECLARE_WRITE16_MEMBER(iob_p6_w);
15241546   DECLARE_READ8_MEMBER(iob_gun_r);
15251547   DECLARE_READ16_MEMBER(iob_analog_r);
1548   DECLARE_WRITE16_MEMBER(c435_state_pio_w);
1549   DECLARE_WRITE16_MEMBER(c435_state_reset_w);
15261550   DECLARE_DRIVER_INIT(s23);
15271551   TILE_GET_INFO_MEMBER(TextTilemapGetInfo);
15281552   DECLARE_VIDEO_START(s23);
r250291r250292
15371561   UINT16 nthword(const UINT32 *pSource, int offs);
15381562   inline INT32 u32_to_s24(UINT32 v);
15391563   inline INT32 u32_to_s10(UINT32 v);
1564   float f24_to_f32(UINT32 v);
1565
15401566   INT32 *c435_getv(UINT16 id);
15411567   INT16 *c435_getm(UINT16 id);
15421568
1569   void c435_state_set_interrupt(const UINT16 *param);
1570   void c435_state_set_projection_matrix_line(const UINT16 *param);
1571   void c435_state_set(UINT16 type, const UINT16 *param);
1572   int c435_get_state_entry_size(UINT16 type);
1573
15431574   void c435_matrix_matrix_mul();
15441575   void c435_matrix_set();
15451576   void c435_vector_set();
15461577   void c435_matrix_vector_mul();
15471578   void c435_vector_matrix_mul();
1579   void c435_state_set();
15481580   void c435_scaling_set();
1549   void c435_state_set_interrupt();
1550   void c435_state_set();
15511581   void c435_render();
15521582   void c435_flush();
15531583
r250291r250292
16021632   return v & 0x200 ? v | 0xfffffe00 : v & 0x1ff;
16031633}
16041634
1635float namcos23_state::f24_to_f32(UINT32 v)
1636{
1637   // 8 bits exponent, 16 mantissa
1638   // mantissa is 16-bits signed, 2-complement
1639   // value is m * 2**(e-46)
1640   // 1 is e=32, m=0x4000, -1 is e=31, m=0x8000
16051641
1642   // This code turns it into a standard float
1643   if(!v)
1644      return 0;
1645
1646   UINT32 r = v & 0x8000 ? 0x80000000 : 0;
1647   UINT16 m = r ? -v : v;
1648   UINT8 e = (v >> 16) + 0x60;
1649   while(!(m & 0x8000)) {
1650      m <<= 1;
1651      e--;
1652   }
1653
1654   r = r | (e << 23) | ((m & 0x7fff) << 8);
1655   return *(float *)&r;
1656}
1657
16061658INLINE UINT8 light(UINT8 c, float l)
16071659{
16081660   if(l < 1)
r250291r250292
16321684   return m_matrices[id];
16331685}
16341686
1687void namcos23_state::c435_state_set_interrupt(const UINT16 *param)
1688{
1689   if(param[0] & 1)
1690      update_main_interrupts(m_main_irqcause | MAIN_C435_IRQ);
1691   else
1692      update_main_interrupts(m_main_irqcause & ~MAIN_C435_IRQ);
1693}
1694
1695void namcos23_state::c435_state_set_projection_matrix_line(const UINT16 *param)
1696{
1697   // timecrs2:
1698   //   sx = 640/2, sy = 480/2, t = tan(fov/2) (fov=45 degrees)
1699   //   line 1: 1 0 -(sx-a)/(sx/t) 0 -1  0 -(sx+a)/(sx/t) 0
1700   //   line 2: 0 1 -(sy-b)/(sx/t) 0  0 -1 -(sy+b)/(sx/t) 0
1701   //   line 3: 0 0 -1             c  0  0              0 sx/t
1702
1703   char buf[4096];
1704   char *p = buf;
1705   p += sprintf(p, "projection matrix line:");
1706   for(int i=0; i<8; i++)
1707      p += sprintf(p, " %f", f24_to_f32((param[2*i+1] << 16) | param[2*i+2]));
1708   p += sprintf(p, "\n");
1709   logerror(buf);
1710}
1711
1712void namcos23_state::c435_state_set(UINT16 type, const UINT16 *param)
1713{
1714   switch(type) {
1715   case 0x0001: c435_state_set_interrupt(param); break;
1716   case 0x00c8: c435_state_set_projection_matrix_line(param); break;
1717   default: {
1718      char buf[4096];
1719      char *p = buf;
1720      p += sprintf(buf, "WARNING: Unhandled state type %04x :", type);
1721      for(int i=0; i<c435_get_state_entry_size(type); i++)
1722         p += sprintf(p, " %04x", param[i]);
1723      p += sprintf(p, "\n");
1724      logerror(buf);
1725      break;
1726   }
1727   }
1728}
1729
1730WRITE16_MEMBER(namcos23_state::c435_state_reset_w)
1731{
1732   m_c435_buffer_pos = 0;
1733}
1734
1735WRITE16_MEMBER(namcos23_state::c435_state_pio_w)
1736{
1737   m_c435_buffer[m_c435_buffer_pos++] = data;
1738   int psize = c435_get_state_entry_size(m_c435_buffer[0]);
1739   if(m_c435_buffer_pos < psize+1)
1740      return;
1741   c435_state_set(m_c435_buffer[0], m_c435_buffer+1);
1742   m_c435_buffer_pos = 0;
1743}
1744
1745int namcos23_state::c435_get_state_entry_size(UINT16 type)
1746{
1747   switch(type) {
1748   case 0x0001: return 1;
1749   case 0x0009: return 19;
1750   case 0x0042: return 41;
1751   case 0x0046: return 13;
1752   case 0x00c0: return 33;
1753   case 0x00c6: return 13;
1754   case 0x00c8: return 17;
1755   default:
1756      logerror("WARNING: Unknown size for state type %04x\n", type);
1757      return -1;
1758   }
1759}
1760
16351761void namcos23_state::c435_matrix_matrix_mul() // 0.0
16361762{
16371763   if((m_c435_buffer[0] & 0xf) != 4) {
16381764      logerror("WARNING: c435_matrix_matrix_mul with size %d\n", m_c435_buffer[0] & 0xf);
16391765      return;
16401766   }
1767   if(m_c435_buffer[0] != 0x0004)
1768      logerror("WARNING: c435_matrix_matrix_mul header %04x\n", m_c435_buffer[0]);
16411769   if(m_c435_buffer[3] != 0xffff)
16421770      logerror("WARNING: c435_matrix_matrix_mul with +2=%04x\n", m_c435_buffer[3]);
16431771
r250291r250292
16631791      return;
16641792   }
16651793
1794   if(m_c435_buffer[0] != 0x0814 && m_c435_buffer[0] != 0x1014)
1795      logerror("WARNING: c435_matrix_vector_mul header %04x\n", m_c435_buffer[0]);
1796
1797
16661798   if(m_c435_buffer[3] != 0xffff) {
16671799      INT32 *t        = c435_getv(m_c435_buffer[1]);
16681800      const INT16 *m  = c435_getm(m_c435_buffer[2]);
r250291r250292
16901822      logerror("WARNING: c435_matrix_set with size %d\n", m_c435_buffer[0] & 0xf);
16911823      return;
16921824   }
1825
1826   if(m_c435_buffer[0] != 0x004a)
1827      logerror("WARNING: c435_matrix_set header %04x\n", m_c435_buffer[0]);
1828
16931829   INT16 *t = c435_getm(m_c435_buffer[1]);
16941830   for(int i=0; i<9; i++)
16951831      t[i] = m_c435_buffer[i+2];
r250291r250292
17011837      logerror("WARNING: c435_vector_set with size %d\n", m_c435_buffer[0] & 0xf);
17021838      return;
17031839   }
1840   if(m_c435_buffer[0] != 0x057)
1841      logerror("WARNING: c435_vector_set header %04x\n", m_c435_buffer[0]);
1842
17041843   INT32 *t = c435_getv(m_c435_buffer[1]);
17051844   for(int i=0; i<3; i++)
17061845      t[i] = u32_to_s24((m_c435_buffer[2*i+2] << 16) | m_c435_buffer[2*i+3]);
r250291r250292
17151854   m_scaling = m_c435_buffer[1];
17161855}
17171856
1718void namcos23_state::c435_state_set_interrupt() // 4.f.0001
1719{
1720   if(m_c435_buffer[0] != 0x4f02) {
1721      logerror("WARNING: c435_state_set_interrupt with size %d\n", m_c435_buffer[0] & 0xff);
1722      return;
1723   }
1724   if(m_c435_buffer[2] & 1)
1725      update_main_interrupts(m_main_irqcause | MAIN_C435_IRQ);
1726   else
1727      update_main_interrupts(m_main_irqcause & ~MAIN_C435_IRQ);
1728}
1729
17301857void namcos23_state::c435_state_set() // 4.f
17311858{
17321859   if((m_c435_buffer[0] & 0xff) == 0) {
1733      logerror("WARNING: c435_state_set with size %d\n", m_c435_buffer[0] & 0xff);
1860      logerror("WARNING: c435_state_set with zero size\n");
17341861      return;
17351862   }
1736   switch(m_c435_buffer[1]) {
1737   case 0x0001: c435_state_set_interrupt(); break;
1738   default:
1739      logerror("WARNING: c435_state_set(%04x, ...)\n", m_c435_buffer[1]);
1740      break;
1863   int size = c435_get_state_entry_size(m_c435_buffer[1]);
1864   if(size != (m_c435_buffer[0] & 0xff)-1)
1865   {
1866      logerror("WARNING: c435_state_set size disagreement (type=%04x, got %d, expected %d)\n", m_c435_buffer[1], (m_c435_buffer[0] & 0xff)-1, size);
1867      return;
17411868   }
1869
1870   c435_state_set(m_c435_buffer[1], m_c435_buffer+2);
17421871}
17431872
17441873void namcos23_state::c435_render() // 8
17451874{
17461875   if((m_c435_buffer[0] & 0xf) != 3) {
1747      logerror("WARNING: c435_render with size %d, header %04x", m_c435_buffer[0] & 0xf, m_c435_buffer[0]);
1876      logerror("WARNING: c435_render with size %d, header %04x\n", m_c435_buffer[0] & 0xf, m_c435_buffer[0]);
17481877      return;
17491878   }
17501879
r250291r250292
17681897   re->model.scaling = use_scaling ? m_scaling / 16384.0 : 1.0;
17691898   memcpy(re->model.m, m, sizeof(re->model.m));
17701899   memcpy(re->model.v, v, sizeof(re->model.v));
1900   //   re->model.v[2] *= 768/420.0;
1901
17711902   if(0)
1772      fprintf(stderr, "Render %04x (%f %f %f %f %f %f %f %f %f) (%f %f %f)\n",
1903      logerror("Render %04x (%f %f %f %f %f %f %f %f %f) (%f %f %f) %f\n",
17731904            re->model.model,
17741905            re->model.m[0]/16384.0, re->model.m[1]/16384.0, re->model.m[2]/16384.0,
17751906            re->model.m[3]/16384.0, re->model.m[4]/16384.0, re->model.m[5]/16384.0,
17761907            re->model.m[6]/16384.0, re->model.m[7]/16384.0, re->model.m[8]/16384.0,
1777            re->model.v[0]/16384.0, re->model.v[1]/16384.0, re->model.v[2]/16384.0);
1908            re->model.v[0]/16384.0, re->model.v[1]/16384.0, re->model.v[2]/16384.0,
1909            re->model.scaling);
17781910
17791911   render.count[render.cur]++;
17801912}
r250291r250292
18301962   }
18311963
18321964   if(!known) {
1833      logerror("c435 -");
1965      char buf[4096];
1966      char *p = buf;
1967      p += sprintf(p, "c435 -");
18341968      for(int i=0; i<m_c435_buffer_pos; i++)
1835         logerror(" %04x", m_c435_buffer[i]);
1836      logerror("\n");
1969         p += sprintf(p, " %04x", m_c435_buffer[i]);
1970      p += sprintf(p, "\n");
1971      logerror(buf);
18371972   }
18381973
18391974   m_c435_buffer_pos = 0;
r250291r250292
19302065   // 640/(3.125/3.75) = 768
19312066   // 480/(2.34375/3.75) = 768
19322067
1933   pv.x = 320 + 768 * pv.x;
1934   pv.y = 240 - 768 * pv.y;
2068#if 1
2069   pv.x = 320 + 768*pv.x;
2070   pv.y = 240 - 768*pv.y;
2071#else
2072   pv.x = 320 + 410*pv.x;
2073   pv.y = 240 - 410*pv.y;
2074#endif
2075
19352076   pv.p[0] = 1.0f / pv.p[0];
19362077}
19372078
r250291r250292
19572098void namcos23_state::render_one_model(const namcos23_render_entry *re)
19582099{
19592100   render_t &render = m_render;
2101   if(re->model.model < 0x80) {
2102      logerror("WARNING: model %02x requested\n", re->model.model);
2103      return;
2104   }
2105
2106   if(re->model.model == 3486)
2107      return;
2108
19602109   UINT32 adr = m_ptrom[re->model.model];
19612110   if(adr >= m_ptrom_limit) {
19622111      logerror("WARNING: model %04x base address %08x out-of-bounds - pointram?\n", re->model.model, adr);
r250291r250292
27612910   AM_RANGE(0x0a000000, 0x0affffff) AM_ROM AM_REGION("data", 0x1000000) AM_MIRROR(0x1000000)
27622911   AM_RANGE(0x0c000000, 0x0c00001f) AM_READWRITE16(c412_r, c412_w, 0xffffffff)
27632912   AM_RANGE(0x0c400000, 0x0c400007) AM_READWRITE16(c421_r, c421_w, 0xffffffff)
2913   AM_RANGE(0x0c800010, 0x0c800013) AM_WRITE16(c435_state_reset_w, 0xffff0000)
2914   AM_RANGE(0x0c800014, 0x0c800017) AM_WRITE16(c435_state_pio_w, 0x0000ffff)
27642915   AM_RANGE(0x0d000000, 0x0d00000f) AM_READWRITE16(ctl_r, ctl_w, 0xffffffff)
27652916   AM_RANGE(0x0e800000, 0x0e800003) AM_READWRITE16(sub_comm_r, sub_comm_w, 0xffffffff) // not sure
27662917   AM_RANGE(0x0fc00000, 0x0fffffff) AM_WRITENOP AM_ROM AM_REGION("user1", 0)
r250291r250292
29043055
29053056WRITE16_MEMBER(namcos23_state::mcu_pb_w)
29063057{
2907   m_sub_portb = (m_sub_portb & 0x80) | (data & 0x7f);
3058   m_sub_portb = (m_sub_portb & 0xc0) | (data & 0x3f);
29083059   m_rtc->ce_w((m_sub_portb & 0x20) && (m_sub_porta & 1));
29093060   m_settings->ce_w((m_sub_portb & 0x20) && !(m_sub_porta & 1));
29103061}
trunk/src/mame/drivers/naomi.cpp
r250291r250292
15801580#include "includes/naomi.h"
15811581
15821582
1583// for now, make buggy GCC/Mingw STFU about I64FMT
1584#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1585#pragma GCC diagnostic push
1586#pragma GCC diagnostic ignored "-Wformat"
1587#pragma GCC diagnostic ignored "-Wformat-extra-args"
1588#endif
1589
1590
15911583#define CPU_CLOCK (200000000)
15921584
15931585READ64_MEMBER(naomi_state::naomi_arm_r )
r250291r250292
94379429GAME( 2006, xtrmhnt2, awbios, aw2c, aw2c, naomi_state, xtrmhnt2,   ROT0,   "Sega",                     "Extreme Hunting 2", GAME_FLAGS )
94389430GAME( 2008, claychal, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0,   "Sega",                     "Sega Clay Challenge", GAME_FLAGS )
94399431GAME( 2009, basschal, awbios, aw2c, aw2c, naomi_state, atomiswave, ROT0,   "Sega",                     "Sega Bass Fishing Challenge", GAME_FLAGS )
9440
9441#if (defined(__MINGW32__) && (__GNUC__ >= 5))
9442#pragma GCC diagnostic pop
9443#endif
trunk/src/mame/drivers/pse.cpp
r250291r250292
77 Game Name                       DATA
88 -------------------------------------
99 1-2-4 Cocktail Table (197?)     UNKNOWN
10 Bazooka (1977)                  YES
11 Desert Patrol (1977)            YES
12 Espana (cabinet) (197?)         NO
13 Frenzy (1975)                   UNKNOWN
14 Game Tree (1978)                YES
15 Hodge Podge (197?)              UNKNOWN
16 Knights in Armor (1976)         YES
17 Maneater (1975)                 YES
10 Bazooka (1976/11)               YES
11 Desert Patrol (1977/11)         YES
12 Espana (cabinet) (1975/10)      NO
13 Frenzy (1975/08)                UNKNOWN
14 Game Tree (1978/02)             YES
15 Hodge Podge (1975?)             NO
16 Knights in Armor (1976/06)      YES
17 Maneater (1975/11)              YES
1818 Play Five (1975?)               UNKNOWN
19 Scandia (cabinet) (1975)        NO
19 Scandia (cabinet) (1975/08)     NO
2020 Two Game (1974)                 UNKNOWN
21 U.N. Command (1977)             UNKNOWN
21 U.N. Command (1977)             YES?
2222
2323 ***************************************************************************/
2424
r250291r250292
7979   // schematics
8080   //...
8181
82//  NETDEV_ANALOG_CALLBACK(sound_cb, sound, psettl_state, sound_cb, "")
83//  NETDEV_ANALOG_CALLBACK(video_cb, videomix, fixedfreq_device, update_vid, "fixfreq")
82        //  NETDEV_ANALOG_CALLBACK(sound_cb, sound, psettl_state, sound_cb, "")
83        //  NETDEV_ANALOG_CALLBACK(video_cb, videomix, fixedfreq_device, update_vid, "fixfreq")
8484NETLIST_END()
8585
8686
r250291r250292
120120
121121 ***************************************************************************/
122122
123ROM_START( bazooka )
124   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
123125
126   ROM_REGION( 0x0840, "roms", ROMREGION_ERASE00 )
127   ROM_LOAD( "bd2.k1",      0x0000, 0x0200, CRC(c9e9ed15) SHA1(624bbc10942a386040aef161b96d64021a842c9f) ) // 6341-1 - gfx: tank, truck, jeep motorcycle
128   ROM_LOAD( "bd2.k4",      0x0200, 0x0200, CRC(c5a74df9) SHA1(2846a039e9bf372f3aa0b88ed89f9029eb7f797c) ) // 6341-1 - gfx: ambulance, stretcher, explosion
129   ROM_LOAD( "bd1.d2",      0x0400, 0x0200, CRC(4fc10886) SHA1(b1c6f890994ba2182a4e7fc17582d6797dbd6ce9) ) // 6341-1 or 82s115
130   ROM_LOAD( "bd1.e2",      0x0600, 0x0200, CRC(00179936) SHA1(e5417b8d3814dafe1278179b307a1b563a378cbe) ) // 6341-1 or 82s115
131   ROM_LOAD( "bd2.e6",      0x0800, 0x0020, CRC(14b84564) SHA1(69cdd14e23094678c4b280f60cec963609181b00) ) // 82123
132   ROM_LOAD( "bd2.e7",      0x0820, 0x0020, CRC(1bfb073f) SHA1(f6b26dcece71b2cf2ed4a537434edbe31cb10399) ) // 82123
133ROM_END
134
135ROM_START( bazookabr )
136   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
137
138   ROM_REGION( 0x0840, "roms", ROMREGION_ERASE00 )
139   ROM_LOAD( "1",           0x0000, 0x0200, CRC(edc34cb0) SHA1(f76a81833b015784e55b33189e9058cd24922f9b) )
140   ROM_LOAD( "2",           0x0200, 0x0200, CRC(3e78e4c2) SHA1(814509eb773bfa87f1df933214f079e7dd2a8fa2) )
141   ROM_LOAD( "3",           0x0400, 0x0200, CRC(4fc10886) SHA1(b1c6f890994ba2182a4e7fc17582d6797dbd6ce9) )
142   ROM_LOAD( "4",           0x0600, 0x0200, CRC(00179936) SHA1(e5417b8d3814dafe1278179b307a1b563a378cbe) )
143   ROM_LOAD( "bd2.e6",      0x0800, 0x0020, BAD_DUMP CRC(14b84564) SHA1(69cdd14e23094678c4b280f60cec963609181b00) ) // not dumped, taken from PSE set
144   ROM_LOAD( "bd2.e7",      0x0820, 0x0020, BAD_DUMP CRC(1bfb073f) SHA1(f6b26dcece71b2cf2ed4a537434edbe31cb10399) ) // not dumped, taken from PSE set
145ROM_END
146
124147ROM_START( dpatrol )
125148   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
126149
r250291r250292
168191ROM_END
169192*/
170193
171
172GAME( 1977, dpatrol, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Desert Patrol [TTL]", MACHINE_IS_SKELETON )
173//GAME( 1976, knightar, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Knights in Armor [TTL]", MACHINE_IS_SKELETON )
174//GAME( 1978, gametree, 0, pse, 0, driver_device, 0, ROT0, "Project Support Engineering", "Game Tree [TTL]", MACHINE_IS_SKELETON )
194GAME( 1976, bazooka,    0,       pse, 0, driver_device,  0, ROT0, "Project Support Engineering", "Bazooka [TTL]", MACHINE_IS_SKELETON )
195GAME( 1977, bazookabr,  bazooka, pse, 0, driver_device,  0, ROT0, "Taito do Brasil", "Bazooka (Brazil) [TTL]", MACHINE_IS_SKELETON )
196GAME( 1977, dpatrol,    0,       pse, 0, driver_device,  0, ROT0, "Project Support Engineering", "Desert Patrol [TTL]", MACHINE_IS_SKELETON )
197//GAME( 1976, knightar, 0,       pse, 0, driver_device,  0, ROT0, "Project Support Engineering", "Knights in Armor [TTL]", MACHINE_IS_SKELETON )
198//GAME( 1978, gametree, 0,       pse, 0, driver_device,  0, ROT0, "Project Support Engineering", "Game Tree [TTL]", MACHINE_IS_SKELETON )
trunk/src/mame/drivers/psikyo.cpp
r250291r250292
12421242ROM_END
12431243
12441244ROM_START( sngkace )
1245
12461245   ROM_REGION( 0x100000, "maincpu", 0 )        /* Main CPU Code */
12471246   ROM_LOAD32_WORD_SWAP( "1-u127.bin", 0x000000, 0x040000, CRC(6c45b2f8) SHA1(08473297e174f3a6d67043f3b16f4e6b9c68b826) ) // 1&0
12481247   ROM_LOAD32_WORD_SWAP( "2-u126.bin", 0x000002, 0x040000, CRC(845a6760) SHA1(3b8fed294e28d9d8ef5cb5ec88b9ade396146a48) ) // 3&2
r250291r250292
12621261
12631262   ROM_REGION( 0x040000, "spritelut", 0 )  /* Sprites LUT */
12641263   ROM_LOAD( "u11.bin",  0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
1264ROM_END
12651265
1266
1267ROM_START( sngkacea ) // the roms have a very visible "." symbol after the number, it might indicate a newer revision.
1268   ROM_REGION( 0x100000, "maincpu", 0 )        /* Main CPU Code */
1269   ROM_LOAD32_WORD_SWAP( "1.-u127.bin", 0x000000, 0x040000, CRC(3a43708d) SHA1(f38d22304f8957c6d81c8946a8a03676965d4dd4) ) // 1&0
1270   ROM_LOAD32_WORD_SWAP( "2.-u126.bin", 0x000002, 0x040000, CRC(7aa50c46) SHA1(bad250f64c6d796a61be5e2eb71e2f5774f4278e) ) // 3&2
1271
1272   ROM_REGION( 0x020000, "audiocpu", 0 )       /* Sound CPU Code */
1273   ROM_LOAD( "3-u58.bin", 0x00000, 0x20000, CRC(310f5c76) SHA1(dbfd1c5a7a514bccd89fc4f7191744cf76bb745d) )
1274
1275   ROM_REGION( 0x200000, "gfx1", 0 )   /* Sprites */
1276   ROM_LOAD( "u14.bin",  0x000000, 0x200000, CRC(00a546cb) SHA1(30a8679b49928d5fcbe58b5eecc2ebd08173adf8) )
1277
1278   ROM_REGION( 0x200000, "gfx2", 0 )   /* Layers 0 + 1 */
1279   ROM_LOAD( "u34.bin",  0x000000, 0x100000, CRC(e6a75bd8) SHA1(1aa84ea54584b6c8b2846194b48bf6d2afa67fee) )
1280   ROM_LOAD( "u35.bin",  0x100000, 0x100000, CRC(c4ca0164) SHA1(c75422de2e0127cdc23d8c223b674a5bd85b00fb) )
1281
1282   ROM_REGION( 0x100000, "ymsnd", 0 )  /* Samples */
1283   ROM_LOAD( "u68.bin",  0x000000, 0x100000, CRC(9a7f6c34) SHA1(c549b209bce1d2c6eeb512db198ad20c3f5fb0ea) )
1284
1285   ROM_REGION( 0x040000, "spritelut", 0 )  /* Sprites LUT */
1286   ROM_LOAD( "u11.bin",  0x000000, 0x040000, CRC(11a04d91) SHA1(5d146a9a39a70f2ee212ceab9a5469598432449e) ) // x1xxxxxxxxxxxxxxxx = 0xFF
12661287ROM_END
12671288
12681289
r250291r250292
19922013
19932014***************************************************************************/
19942015
1995GAME( 1993, samuraia, 0,        sngkace,  samuraia, psikyo_state, sngkace,  ROT270, "Psikyo", "Samurai Aces (World)", MACHINE_SUPPORTS_SAVE ) // Banpresto?
1996GAME( 1993, sngkace,  samuraia, sngkace,  sngkace, psikyo_state,  sngkace,  ROT270, "Psikyo", "Sengoku Ace (Japan)", MACHINE_SUPPORTS_SAVE ) // Banpresto?
2016GAME( 1993, samuraia,  0,        sngkace,  samuraia, psikyo_state, sngkace,  ROT270, "Psikyo", "Samurai Aces (World)", MACHINE_SUPPORTS_SAVE ) // Banpresto?
2017GAME( 1993, sngkace,   samuraia, sngkace,  sngkace, psikyo_state,  sngkace,  ROT270, "Psikyo", "Sengoku Ace (Japan, set 1)", MACHINE_SUPPORTS_SAVE ) // Banpresto?
2018GAME( 1993, sngkacea,  samuraia, sngkace,  sngkace, psikyo_state,  sngkace,  ROT270, "Psikyo", "Sengoku Ace (Japan, set 2)", MACHINE_SUPPORTS_SAVE ) // Banpresto?
19972019
19982020GAME( 1994, gunbird,  0,        gunbird,  gunbird, psikyo_state,  gunbird,  ROT270, "Psikyo", "Gunbird (World)", MACHINE_SUPPORTS_SAVE )
19992021GAME( 1994, gunbirdk, gunbird,  gunbird,  gunbirdj, psikyo_state, gunbird,  ROT270, "Psikyo", "Gunbird (Korea)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/psikyosh.cpp
r250291r250292
703703   PORT_START("INPUTS")
704704   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
705705   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
706
706   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNUSED )
707   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNUSED )
707708   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
708709   PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
709710   PORT_DIPNAME( 0x00000040, 0x00000040, "Tilt (Enables Debug Mode)" )     /* Debug stuff. Resets EEPROM? */
710711   PORT_DIPSETTING(          0x00000040, DEF_STR( Off ) )
711712   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
712
713   PORT_BIT( 0x00ffff80, IP_ACTIVE_LOW, IPT_UNUSED )
713714   PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 ) /* start for joystick */
715   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNUSED )
716   PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED )
714717   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
715718   PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
716719   PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
trunk/src/mame/drivers/shadfrce.cpp
r250291r250292
571571
572572/* Rom Defs. */
573573
574// one of the high score tables in attract mode ends up corrupt on this set due to the game triggering a text dialog box, is this due to a timing error?
574575ROM_START( shadfrce )
575576   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
576   ROM_LOAD16_BYTE( "32a12-01.34", 0x00001, 0x40000, CRC(04501198) SHA1(50f981c13f9ed19d681d494376018ba86464ea13) ) /* US Version 2 */
577   ROM_LOAD16_BYTE( "32a13-01.26", 0x00000, 0x40000, CRC(b8f8a05c) SHA1(bd9d4218a7cf57b56aec1f7e710e02af8471f9d7) )
578   ROM_LOAD16_BYTE( "32a14-0.33",  0x80001, 0x40000, CRC(08279be9) SHA1(1833526b23feddb58b21874070ad2bf3b6be8dca) )
579   ROM_LOAD16_BYTE( "32a15-0.14",  0x80000, 0x40000, CRC(bfcadfea) SHA1(1caa9fc30d8622ce4c7221039c446e99cc8f5346) )
577   ROM_LOAD16_BYTE( "32a12-011.34", 0x00001, 0x40000, CRC(0c041e08) SHA1(7b9d52cb1f6bc217c6e64287bd9630aa37243513) ) /* World Version 3 */
578   ROM_LOAD16_BYTE( "32a13-010.26", 0x00000, 0x40000, CRC(00985361) SHA1(e9da1b096b25a6ee46bab6230dda66dccdd4bed8) )
579   ROM_LOAD16_BYTE( "32a14-010.33", 0x80001, 0x40000, CRC(ea03ca25) SHA1(7af1ee7c36c70f80ba1e096473b5786b205ab00b) )
580   ROM_LOAD16_BYTE( "32j15-01.14",  0x80000, 0x40000, CRC(3dc3a84a) SHA1(166ad91b93192d94e3f6d2fe6dde02f59d334f75) ) // matches Japan version 2, not US version 2
580581
581582   ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Code */
582583   ROM_LOAD( "32j10-0.42",  0x00000, 0x10000, CRC(65daf475) SHA1(7144332b2d17af8645e22e1926b33113db0d20e2) )
583584
584585   ROM_REGION( 0x020000, "chars", 0 ) /* Chars */
585   ROM_LOAD( "32a11-0.55",  0x00000, 0x20000, CRC(cfaf5e77) SHA1(eab76e085f695c74cc868aaf95f04ff2acf66ee9) )
586   ROM_LOAD( "32j11-0.55",  0x00000, 0x20000, CRC(7252d993) SHA1(43f7de381841039aa290486aafb98e2cf3b8579b) )
586587
587588   ROM_REGION( 0xa00000, "sprites", 0 ) /* Sprite Tiles */
588589   ROM_LOAD( "32j4-0.12",  0x000000, 0x200000, CRC(1ebea5b6) SHA1(35bd49dda9ad75326d45ffb10c87d83fc4f1b7a8) )
r250291r250292
600601   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
601602ROM_END
602603
603ROM_START( shadfrcej )
604ROM_START( shadfrceu )
604605   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
605   ROM_LOAD16_BYTE( "32a12-011.34", 0x00001, 0x40000, CRC(0c041e08) SHA1(7b9d52cb1f6bc217c6e64287bd9630aa37243513) ) /* Japan Version 3 */
606   ROM_LOAD16_BYTE( "32a13-010.26", 0x00000, 0x40000, CRC(00985361) SHA1(e9da1b096b25a6ee46bab6230dda66dccdd4bed8) )
607   ROM_LOAD16_BYTE( "32a14-010.33", 0x80001, 0x40000, CRC(ea03ca25) SHA1(7af1ee7c36c70f80ba1e096473b5786b205ab00b) )
608   ROM_LOAD16_BYTE( "32j15-01.14",  0x80000, 0x40000, CRC(3dc3a84a) SHA1(166ad91b93192d94e3f6d2fe6dde02f59d334f75) )
606   ROM_LOAD16_BYTE( "32a12-01.34", 0x00001, 0x40000, CRC(04501198) SHA1(50f981c13f9ed19d681d494376018ba86464ea13) ) /* US Version 2 */
607   ROM_LOAD16_BYTE( "32a13-01.26", 0x00000, 0x40000, CRC(b8f8a05c) SHA1(bd9d4218a7cf57b56aec1f7e710e02af8471f9d7) )
608   ROM_LOAD16_BYTE( "32a14-0.33",  0x80001, 0x40000, CRC(08279be9) SHA1(1833526b23feddb58b21874070ad2bf3b6be8dca) )
609   ROM_LOAD16_BYTE( "32a15-0.14",  0x80000, 0x40000, CRC(bfcadfea) SHA1(1caa9fc30d8622ce4c7221039c446e99cc8f5346) )
609610
610611   ROM_REGION( 0x10000, "audiocpu", 0 ) /* Z80 Code */
611612   ROM_LOAD( "32j10-0.42",  0x00000, 0x10000, CRC(65daf475) SHA1(7144332b2d17af8645e22e1926b33113db0d20e2) )
612613
613614   ROM_REGION( 0x020000, "chars", 0 ) /* Chars */
614   ROM_LOAD( "32j11-0.55",  0x00000, 0x20000, CRC(7252d993) SHA1(43f7de381841039aa290486aafb98e2cf3b8579b) )
615   ROM_LOAD( "32a11-0.55",  0x00000, 0x20000, CRC(cfaf5e77) SHA1(eab76e085f695c74cc868aaf95f04ff2acf66ee9) )
615616
616617   ROM_REGION( 0xa00000, "sprites", 0 ) /* Sprite Tiles */
617618   ROM_LOAD( "32j4-0.12",  0x000000, 0x200000, CRC(1ebea5b6) SHA1(35bd49dda9ad75326d45ffb10c87d83fc4f1b7a8) )
r250291r250292
629630   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
630631ROM_END
631632
632ROM_START( shadfrcejv2 )
633ROM_START( shadfrcej )
633634   ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
634635   ROM_LOAD16_BYTE( "32j12-01.34", 0x00001, 0x40000, CRC(38fdbe1d) SHA1(476d8ef2c0d2a8c568ce44631f93f8c730f91b08) ) /* Japan Version 2 */
635636   ROM_LOAD16_BYTE( "32j13-01.26", 0x00000, 0x40000, CRC(6e1df6f1) SHA1(c165553fe967b437413dd7ddc87a267548dd0ca9) )
r250291r250292
659660ROM_END
660661
661662
662GAME( 1993, shadfrce,    0,        shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (US Version 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
663GAME( 1993, shadfrcej,   shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 3)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
664GAME( 1993, shadfrcejv2, shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
663GAME( 1993, shadfrce,   0,        shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (World, Version 3)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
664GAME( 1993, shadfrceu,  shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (US, Version 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
665GAME( 1993, shadfrcej,  shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan, Version 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/ssem.cpp
r250291r250292
1111#include "cpu/ssem/ssem.h"
1212#include "imagedev/snapquik.h"
1313
14// for now, make buggy GCC/Mingw STFU about I64FMT
15#if (defined(__MINGW32__) && (__GNUC__ >= 5))
16#pragma GCC diagnostic push
17#pragma GCC diagnostic ignored "-Wformat"
18#pragma GCC diagnostic ignored "-Wformat-extra-args"
19#endif
20
2114class ssem_state : public driver_device
2215{
2316public:
r250291r250292
649642
650643/*   YEAR  NAME     PARENT    COMPAT   MACHINE  INPUT  INIT        COMPANY                       FULLNAME */
651644COMP(1948, ssem,    0,        0,       ssem,    ssem, driver_device,  0,   "Manchester University", "Small-Scale Experimental Machine (SSEM), 'Baby'", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE )
652
653#if (defined(__MINGW32__) && (__GNUC__ >= 5))
654#pragma GCC diagnostic pop
655#endif
trunk/src/mame/drivers/taitottl.cpp
r250291r250292
195195   ROM_LOAD( "gn01.b9",     0x0000, 0x0800, CRC(69474a3a) SHA1(7396f1be991a0e6207eaa79e0206a5286a8d615d) )
196196ROM_END
197197
198
199ROM_START( bazooka )
200   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
201
202   ROM_REGION( 0x0840, "roms", ROMREGION_ERASE00 )
203   ROM_LOAD( "bd2.k1",      0x0000, 0x0200, CRC(c9e9ed15) SHA1(624bbc10942a386040aef161b96d64021a842c9f) ) // 6341-1 - gfx: tank, truck, jeep motorcycle
204   ROM_LOAD( "bd2.k4",      0x0200, 0x0200, CRC(c5a74df9) SHA1(2846a039e9bf372f3aa0b88ed89f9029eb7f797c) ) // 6341-1 - gfx: ambulance, stretcher, explosion
205   ROM_LOAD( "bd1.d2",      0x0400, 0x0200, CRC(4fc10886) SHA1(b1c6f890994ba2182a4e7fc17582d6797dbd6ce9) ) // 6341-1 or 82s115
206   ROM_LOAD( "bd1.e2",      0x0600, 0x0200, CRC(00179936) SHA1(e5417b8d3814dafe1278179b307a1b563a378cbe) ) // 6341-1 or 82s115
207   ROM_LOAD( "bd2.e6",      0x0800, 0x0020, CRC(14b84564) SHA1(69cdd14e23094678c4b280f60cec963609181b00) ) // 82123
208   ROM_LOAD( "bd2.e7",      0x0820, 0x0020, CRC(1bfb073f) SHA1(f6b26dcece71b2cf2ed4a537434edbe31cb10399) ) // 82123
209ROM_END
210
211
212ROM_START( bazookabr )
213   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
214
215   ROM_REGION( 0x0840, "roms", ROMREGION_ERASE00 )
216   ROM_LOAD( "1",           0x0000, 0x0200, CRC(edc34cb0) SHA1(f76a81833b015784e55b33189e9058cd24922f9b) )
217   ROM_LOAD( "2",           0x0200, 0x0200, CRC(3e78e4c2) SHA1(814509eb773bfa87f1df933214f079e7dd2a8fa2) )
218   ROM_LOAD( "3",           0x0400, 0x0200, CRC(4fc10886) SHA1(b1c6f890994ba2182a4e7fc17582d6797dbd6ce9) )
219   ROM_LOAD( "4",           0x0600, 0x0200, CRC(00179936) SHA1(e5417b8d3814dafe1278179b307a1b563a378cbe) )
220   ROM_LOAD( "bd2.e6",      0x0800, 0x0020, BAD_DUMP CRC(14b84564) SHA1(69cdd14e23094678c4b280f60cec963609181b00) ) // not dumped, taken from PSE set
221   ROM_LOAD( "bd2.e7",      0x0820, 0x0020, BAD_DUMP CRC(1bfb073f) SHA1(f6b26dcece71b2cf2ed4a537434edbe31cb10399) ) // not dumped, taken from PSE set
222ROM_END
223
224
225198/*
226199
227200 Missile-X
r250291r250292
279252
280253
281254GAME( 1977, gunman,    0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "Gunman [TTL]", MACHINE_IS_SKELETON )
282GAME( 1977, bazooka,   0,       taitottl, 0, driver_device,  0, ROT0, "Project Support Engineering", "Bazooka [TTL]", MACHINE_IS_SKELETON ) // clone of Taito Cross Fire - or is Cross Fire a clone of PSE Bazooka?
283GAME( 1977, bazookabr, bazooka, taitottl, 0, driver_device,  0, ROT0, "Taito do Brasil", "Bazooka (Brazil) [TTL]", MACHINE_IS_SKELETON )
284255GAME( 1977, missilex,  0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "Missile-X [TTL]", MACHINE_IS_SKELETON )
285256GAME( 1977, ttblock,   0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "T.T. Block [TTL]", MACHINE_IS_SKELETON )
286257GAME( 1979, zzblock,   0,       taitottl, 0, driver_device,  0, ROT0, "Taito", "Zun Zun Block [TTL]", MACHINE_IS_SKELETON )
trunk/src/mame/includes/amstrad.h
r250291r250292
3131#include "bus/cpc/hd20.h"
3232#include "bus/cpc/magicsound.h"
3333#include "bus/cpc/doubler.h"
34#include "bus/cpc/transtape.h"
3435#include "machine/ram.h"
3536#include "imagedev/cassette.h"
3637#include "bus/centronics/ctronics.h"
trunk/src/mame/includes/chihiro.h
r250291r250292
232232      depthbuffer = NULL;
233233      displayedtarget = NULL;
234234      puller_channel = 0;
235      puller_subchannel = 0;
236235      puller_waiting = 0;
237236      debug_grab_texttype = -1;
238237      debug_grab_textfile = NULL;
239      waitvblank_used = 0;
238      waitvblank_used = 1;
240239      memset(vertex_attribute_words, 0, sizeof(vertex_attribute_words));
241240      memset(vertex_attribute_offset, 0, sizeof(vertex_attribute_offset));
242241   }
r250291r250292
254253   int geforce_commandkind(UINT32 word);
255254   UINT32 geforce_object_offset(UINT32 handle);
256255   void geforce_read_dma_object(UINT32 handle, UINT32 &offset, UINT32 &size);
256   void geforce_assign_object(address_space &space, UINT32 chanel, UINT32 subchannel, UINT32 address);
257257   int geforce_exec_method(address_space &space, UINT32 channel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen);
258258   UINT32 texture_get_texel(int number, int x, int y);
259   UINT8 *read_pixel(int x, int y, UINT32 c[4]);
259   UINT8 *read_pixel(int x, int y, INT32 c[4]);
260260   void write_pixel(int x, int y, UINT32 color, UINT32 depth);
261261   void combiner_initialize_registers(UINT32 argb8[6]);
262262   void combiner_initialize_stage(int stage_number);
r250291r250292
496496   int vertex_attribute_offset[16];
497497   emu_timer *puller_timer;
498498   int puller_channel;
499   int puller_subchannel;
500499   int puller_waiting;
501500   address_space *puller_space;
502501   UINT32 dilated0[16][2048];
r250291r250292
660659      NV2A_RT_DEPTH_FORMAT_Z16 = 0x0001,
661660      NV2A_RT_DEPTH_FORMAT_Z24S8 = 0x0002
662661   };
663
664662   enum NV2A_COLOR_FORMAT {
665      NV2A_COLOR_FORMAT_X1R5G6B5 = 0x0002,
666      NV2A_COLOR_FORMAT_R5G6B5 = 0x0003,
667      NV2A_COLOR_FORMAT_UNKNOWN4 = 0x0004,
668      NV2A_COLOR_FORMAT_X8R8G8B8 = 0x0005,
669      NV2A_COLOR_FORMAT_X1A7R8G8B8 = 0x0007,
670      NV2A_COLOR_FORMAT_A8R8G8B8 = 0x0008,
671      NV2A_COLOR_FORMAT_B8 = 0x0009,
672      NV2A_COLOR_FORMAT_G8B8 = 0x000a
663      NV2A_COLOR_FORMAT_X1R5G5B5_Z1R5G5B5 = 1,
664      NV2A_COLOR_FORMAT_X1R5G5B5_X1R5G5B5 = 2,
665      NV2A_COLOR_FORMAT_R5G6B5 = 3,
666      NV2A_COLOR_FORMAT_X8R8G8B8_Z8R8G8B8 = 4,
667      NV2A_COLOR_FORMAT_X8R8G8B8_X8R8G8B8 = 5,
668      NV2A_COLOR_FORMAT_X1A7R8G8B8_Z1A7R8G8B8 = 6,
669      NV2A_COLOR_FORMAT_X1A7R8G8B8_X1A7R8G8B8 = 7,
670      NV2A_COLOR_FORMAT_A8R8G8B8 = 8,
671      NV2A_COLOR_FORMAT_B8 = 9,
672      NV2A_COLOR_FORMAT_G8B8 = 10
673673   };
674674};
trunk/src/mame/includes/fidelz80.h
r250291r250292
22// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco
33/***************************************************************************
44
5        fidelz80.h
5    Fidelity Electronics Z80 based board driver
66
77****************************************************************************/
88
r250291r250292
1919public:
2020   fidelz80_state(const machine_config &mconfig, device_type type, const char *tag)
2121      : driver_device(mconfig, type, tag),
22         m_maincpu(*this, "maincpu"),
23         m_speech(*this, "speech"),
24         m_beep(*this, "beeper"),
25         m_i8041(*this, "mcu"),
26         m_i8243(*this, "i8243")
27      { }
22      m_maincpu(*this, "maincpu"),
23      m_speech(*this, "speech"),
24      m_beep(*this, "beeper"),
25      m_i8041(*this, "mcu"),
26      m_i8243(*this, "i8243")
27   { }
2828
2929   required_device<cpu_device> m_maincpu;
3030   optional_device<s14001a_device> m_speech;
r250291r250292
3232   optional_device<i8041_device> m_i8041;
3333   optional_device<i8243_device> m_i8243;
3434
35   UINT16 m_kp_matrix;         // keypad/leds matrix
36   UINT8 m_led_data;           // data for the two individual leds, in 0bxxxx12xx format
37   UINT8 m_led_selected;       // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc
38   UINT16 m_digit_data;        // data for seg leds
35   UINT16 m_kp_matrix;             // keypad/leds matrix
36   UINT8 m_led_data;               // data for the two individual leds, in 0bxxxx12xx format
37   UINT8 m_led_selected;           // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc
38   UINT16 m_digit_data;            // data for seg leds
3939   UINT8 m_digit_line_status[4];   // prevent overwrite of m_digit_data
4040
41   virtual void machine_reset();
42
4341   //model VCC/UVC
4442   void update_display();
45   DECLARE_READ8_MEMBER( fidelz80_portc_r );
46   DECLARE_WRITE8_MEMBER( fidelz80_portb_w );
47   DECLARE_WRITE8_MEMBER( fidelz80_portc_w );
48   DECLARE_WRITE8_MEMBER( cc10_porta_w );
49   DECLARE_READ8_MEMBER( vcc_portb_r );
50   DECLARE_WRITE8_MEMBER( vcc_porta_w );
43   DECLARE_READ8_MEMBER(fidelz80_portc_r);
44   DECLARE_WRITE8_MEMBER(fidelz80_portb_w);
45   DECLARE_WRITE8_MEMBER(fidelz80_portc_w);
46   DECLARE_WRITE8_MEMBER(cc10_porta_w);
47   DECLARE_READ8_MEMBER(vcc_portb_r);
48   DECLARE_WRITE8_MEMBER(vcc_porta_w);
5149
5250   //model 7014 and VBC
53   DECLARE_WRITE8_MEMBER(bridgec_speech_w );
51   DECLARE_WRITE8_MEMBER(bridgec_speech_w);
5452   DECLARE_WRITE8_MEMBER(kp_matrix_w);
5553   DECLARE_READ8_MEMBER(unknown_r);
5654   DECLARE_READ8_MEMBER(unknown2_r);
r250291r250292
7371   TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer);
7472
7573   DECLARE_WRITE8_MEMBER(digit_w);
74
75   virtual void machine_start();
7676};
7777
7878
trunk/src/mame/includes/shadfrce.h
r250291r250292
8383
8484   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8585   void screen_eof(screen_device &screen, bool state);
86   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offset );
86   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
8787};
trunk/src/mame/layout/cmpacman.lay
r250291r250292
4747         <color red="1.0" green="0.5" blue="0.0" />
4848      </rect>
4949      <rect state="0">
50         <color red="0.15" green="0.075" blue="0.0" />
50         <color red="0.5" green="0.25" blue="0.0" />
5151      </rect>
5252      <text string="TAKE">
5353         <color red="0.0" green="0.0" blue="0.0" />
r250291r250292
134134         <color red="0.7" green="0.35" blue="0.0" />
135135      </rect>
136136      <rect state="0">
137         <color red="0.1" green="0.05" blue="0.0" />
137         <color red="0.4" green="0.2" blue="0.0" />
138138      </rect>
139139   </element>
140140
trunk/src/mame/machine/c65_old.cpp
r250291r250292
1// license:GPL-2.0+
2// copyright-holders:Peter Trauner
3/***************************************************************************
4    commodore c65 home computer
5    peter.trauner@jk.uni-linz.ac.at
6    documention
7     www.funet.fi
8 ***************************************************************************/
9
10#include "emu.h"
11
12#include "includes/c65.h"
13#include "cpu/m6502/m4510.h"
14#include "sound/mos6581.h"
15#include "machine/mos6526.h"
16#include "bus/cbmiec/cbmiec.h"
17#include "machine/ram.h"
18#include "video/vic4567.h"
19#include "imagedev/cassette.h"
20#include "crsshair.h"
21#include "formats/cbm_tap.h"
22
23#define VERBOSE_LEVEL 0
24#define DBG_LOG( MACHINE, N, M, A ) \
25   do { \
26      if(VERBOSE_LEVEL >= N) \
27      { \
28         if( M ) \
29            logerror("%11.6f: %-24s", MACHINE.time().as_double(), (char*) M ); \
30         logerror A; \
31      } \
32   } while (0)
33
34
35
36/***********************************************
37
38    Input Reading - Common Components
39
40***********************************************/
41
42/* These are needed by c64, c65 and c128, each machine has also additional specific
43components in its INTERRUPT_GEN */
44
45/* keyboard lines */
46UINT8 c64_keyline[10];
47
48void cbm_common_init(void)
49{
50   int i;
51
52   for (i = 0; i < ARRAY_LENGTH(c64_keyline); i++)
53      c64_keyline[i] = 0xff;
54}
55
56static TIMER_CALLBACK( lightpen_tick )
57{
58   if (((machine.root_device().ioport("CTRLSEL")->read() & 0x07) == 0x04) || ((machine.root_device().ioport("CTRLSEL")->read() & 0x07) == 0x06))
59   {
60      /* enable lightpen crosshair */
61      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_ALL);
62   }
63   else
64   {
65      /* disable lightpen crosshair */
66      crosshair_set_screen(machine, 0, CROSSHAIR_SCREEN_NONE);
67   }
68}
69
70void cbm_common_interrupt( device_t *device )
71{
72   int value, i;
73   int controller1 = device->machine().root_device().ioport("CTRLSEL")->read() & 0x07;
74   int controller2 = device->machine().root_device().ioport("CTRLSEL")->read() & 0x70;
75   static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
76
77   /* Lines 0-7 : common keyboard */
78   for (i = 0; i < 8; i++)
79   {
80      value = 0xff;
81      value &= ~device->machine().root_device().ioport(c64ports[i])->read();
82
83      /* Shift Lock is mapped on Left Shift */
84      if ((i == 1) && (device->machine().root_device().ioport("SPECIAL")->read() & 0x40))
85         value &= ~0x80;
86
87      c64_keyline[i] = value;
88   }
89
90
91   value = 0xff;
92   switch(controller1)
93   {
94      case 0x00:
95         value &= ~device->machine().root_device().ioport("JOY1_1B")->read();            /* Joy1 Directions + Button 1 */
96         break;
97
98      case 0x01:
99         if (device->machine().root_device().ioport("OTHER")->read() & 0x40)         /* Paddle2 Button */
100            value &= ~0x08;
101         if (device->machine().root_device().ioport("OTHER")->read() & 0x80)         /* Paddle1 Button */
102            value &= ~0x04;
103         break;
104
105      case 0x02:
106         if (device->machine().root_device().ioport("OTHER")->read() & 0x02)         /* Mouse Button Left */
107            value &= ~0x10;
108         if (device->machine().root_device().ioport("OTHER")->read() & 0x01)         /* Mouse Button Right */
109            value &= ~0x01;
110         break;
111
112      case 0x03:
113         value &= ~(device->machine().root_device().ioport("JOY1_2B")->read() & 0x1f);   /* Joy1 Directions + Button 1 */
114         break;
115
116      case 0x04:
117/* was there any input on the lightpen? where is it mapped? */
118//          if (device->machine().root_device().ioport("OTHER")->read() & 0x04)           /* Lightpen Signal */
119//              value &= ?? ;
120         break;
121
122      case 0x07:
123         break;
124
125      default:
126         logerror("Invalid Controller 1 Setting %d\n", controller1);
127         break;
128   }
129
130   c64_keyline[8] = value;
131
132
133   value = 0xff;
134   switch(controller2)
135   {
136      case 0x00:
137         value &= ~device->machine().root_device().ioport("JOY2_1B")->read();            /* Joy2 Directions + Button 1 */
138         break;
139
140      case 0x10:
141         if (device->machine().root_device().ioport("OTHER")->read() & 0x10)         /* Paddle4 Button */
142            value &= ~0x08;
143         if (device->machine().root_device().ioport("OTHER")->read() & 0x20)         /* Paddle3 Button */
144            value &= ~0x04;
145         break;
146
147      case 0x20:
148         if (device->machine().root_device().ioport("OTHER")->read() & 0x02)         /* Mouse Button Left */
149            value &= ~0x10;
150         if (device->machine().root_device().ioport("OTHER")->read() & 0x01)         /* Mouse Button Right */
151            value &= ~0x01;
152         break;
153
154      case 0x30:
155         value &= ~(device->machine().root_device().ioport("JOY2_2B")->read() & 0x1f);   /* Joy2 Directions + Button 1 */
156         break;
157
158      case 0x40:
159/* was there any input on the lightpen? where is it mapped? */
160//          if (device->machine().root_device().ioport("OTHER")->read() & 0x04)           /* Lightpen Signal */
161//              value &= ?? ;
162         break;
163
164      case 0x70:
165         break;
166
167      default:
168         logerror("Invalid Controller 2 Setting %d\n", controller2);
169         break;
170   }
171
172   c64_keyline[9] = value;
173
174//  vic2_frame_interrupt does nothing so this is not necessary
175//  vic2_frame_interrupt (device);
176
177   /* check if lightpen has been chosen as input: if so, enable crosshair */
178   device->machine().scheduler().timer_set(attotime::zero, FUNC(lightpen_tick));
179
180   set_led_status (device->machine(), 1, device->machine().root_device().ioport("SPECIAL")->read() & 0x40 ? 1 : 0);        /* Shift Lock */
181   set_led_status (device->machine(), 0, device->machine().root_device().ioport("CTRLSEL")->read() & 0x80 ? 1 : 0);        /* Joystick Swap */
182}
183
184
185/***********************************************
186
187    CIA Common Handlers
188
189***********************************************/
190
191/* These are shared by c64, c65 and c128. c65 and c128 also have additional specific
192components (to select/read additional keyboard lines) */
193
194/*
195 *  CIA 0 - Port A
196 * bits 7-0 keyboard line select
197 * bits 7,6: paddle select( 01 port a, 10 port b)
198 * bit 4: joystick a fire button
199 * bits 3,2: Paddles port a fire button
200 * bits 3-0: joystick a direction
201 *
202 *  CIA 0 - Port B
203 * bits 7-0: keyboard raw values
204 * bit 4: joystick b fire button, lightpen select
205 * bits 3,2: paddle b fire buttons (left,right)
206 * bits 3-0: joystick b direction
207 *
208 * flag cassette read input, serial request in
209 * irq to irq connected
210 */
211
212UINT8 cbm_common_cia0_port_a_r( device_t *device, UINT8 output_b )
213{
214   UINT8 value = 0xff;
215
216   if (!(output_b & 0x80))
217   {
218      UINT8 t = 0xff;
219      if (!(c64_keyline[7] & 0x80)) t &= ~0x80;
220      if (!(c64_keyline[6] & 0x80)) t &= ~0x40;
221      if (!(c64_keyline[5] & 0x80)) t &= ~0x20;
222      if (!(c64_keyline[4] & 0x80)) t &= ~0x10;
223      if (!(c64_keyline[3] & 0x80)) t &= ~0x08;
224      if (!(c64_keyline[2] & 0x80)) t &= ~0x04;
225      if (!(c64_keyline[1] & 0x80)) t &= ~0x02;
226      if (!(c64_keyline[0] & 0x80)) t &= ~0x01;
227      value &= t;
228   }
229
230   if (!(output_b & 0x40))
231   {
232      UINT8 t = 0xff;
233      if (!(c64_keyline[7] & 0x40)) t &= ~0x80;
234      if (!(c64_keyline[6] & 0x40)) t &= ~0x40;
235      if (!(c64_keyline[5] & 0x40)) t &= ~0x20;
236      if (!(c64_keyline[4] & 0x40)) t &= ~0x10;
237      if (!(c64_keyline[3] & 0x40)) t &= ~0x08;
238      if (!(c64_keyline[2] & 0x40)) t &= ~0x04;
239      if (!(c64_keyline[1] & 0x40)) t &= ~0x02;
240      if (!(c64_keyline[0] & 0x40)) t &= ~0x01;
241      value &= t;
242   }
243
244   if (!(output_b & 0x20))
245   {
246      UINT8 t = 0xff;
247      if (!(c64_keyline[7] & 0x20)) t &= ~0x80;
248      if (!(c64_keyline[6] & 0x20)) t &= ~0x40;
249      if (!(c64_keyline[5] & 0x20)) t &= ~0x20;
250      if (!(c64_keyline[4] & 0x20)) t &= ~0x10;
251      if (!(c64_keyline[3] & 0x20)) t &= ~0x08;
252      if (!(c64_keyline[2] & 0x20)) t &= ~0x04;
253      if (!(c64_keyline[1] & 0x20)) t &= ~0x02;
254      if (!(c64_keyline[0] & 0x20)) t &= ~0x01;
255      value &= t;
256   }
257
258   if (!(output_b & 0x10))
259   {
260      UINT8 t = 0xff;
261      if (!(c64_keyline[7] & 0x10)) t &= ~0x80;
262      if (!(c64_keyline[6] & 0x10)) t &= ~0x40;
263      if (!(c64_keyline[5] & 0x10)) t &= ~0x20;
264      if (!(c64_keyline[4] & 0x10)) t &= ~0x10;
265      if (!(c64_keyline[3] & 0x10)) t &= ~0x08;
266      if (!(c64_keyline[2] & 0x10)) t &= ~0x04;
267      if (!(c64_keyline[1] & 0x10)) t &= ~0x02;
268      if (!(c64_keyline[0] & 0x10)) t &= ~0x01;
269      value &= t;
270   }
271
272   if (!(output_b & 0x08))
273   {
274      UINT8 t = 0xff;
275      if (!(c64_keyline[7] & 0x08)) t &= ~0x80;
276      if (!(c64_keyline[6] & 0x08)) t &= ~0x40;
277      if (!(c64_keyline[5] & 0x08)) t &= ~0x20;
278      if (!(c64_keyline[4] & 0x08)) t &= ~0x10;
279      if (!(c64_keyline[3] & 0x08)) t &= ~0x08;
280      if (!(c64_keyline[2] & 0x08)) t &= ~0x04;
281      if (!(c64_keyline[1] & 0x08)) t &= ~0x02;
282      if (!(c64_keyline[0] & 0x08)) t &= ~0x01;
283      value &= t;
284   }
285
286   if (!(output_b & 0x04))
287   {
288      UINT8 t = 0xff;
289      if (!(c64_keyline[7] & 0x04)) t &= ~0x80;
290      if (!(c64_keyline[6] & 0x04)) t &= ~0x40;
291      if (!(c64_keyline[5] & 0x04)) t &= ~0x20;
292      if (!(c64_keyline[4] & 0x04)) t &= ~0x10;
293      if (!(c64_keyline[3] & 0x04)) t &= ~0x08;
294      if (!(c64_keyline[2] & 0x04)) t &= ~0x04;
295      if (!(c64_keyline[1] & 0x04)) t &= ~0x02;
296      if (!(c64_keyline[0] & 0x04)) t &= ~0x01;
297      value &= t;
298   }
299
300   if (!(output_b & 0x02))
301   {
302      UINT8 t = 0xff;
303      if (!(c64_keyline[7] & 0x02)) t &= ~0x80;
304      if (!(c64_keyline[6] & 0x02)) t &= ~0x40;
305      if (!(c64_keyline[5] & 0x02)) t &= ~0x20;
306      if (!(c64_keyline[4] & 0x02)) t &= ~0x10;
307      if (!(c64_keyline[3] & 0x02)) t &= ~0x08;
308      if (!(c64_keyline[2] & 0x02)) t &= ~0x04;
309      if (!(c64_keyline[1] & 0x02)) t &= ~0x02;
310      if (!(c64_keyline[0] & 0x02)) t &= ~0x01;
311      value &= t;
312   }
313
314   if (!(output_b & 0x01))
315   {
316      UINT8 t = 0xff;
317      if (!(c64_keyline[7] & 0x01)) t &= ~0x80;
318      if (!(c64_keyline[6] & 0x01)) t &= ~0x40;
319      if (!(c64_keyline[5] & 0x01)) t &= ~0x20;
320      if (!(c64_keyline[4] & 0x01)) t &= ~0x10;
321      if (!(c64_keyline[3] & 0x01)) t &= ~0x08;
322      if (!(c64_keyline[2] & 0x01)) t &= ~0x04;
323      if (!(c64_keyline[1] & 0x01)) t &= ~0x02;
324      if (!(c64_keyline[0] & 0x01)) t &= ~0x01;
325      value &= t;
326   }
327
328   if ( device->machine().root_device().ioport("CTRLSEL")->read() & 0x80 )
329      value &= c64_keyline[8];
330   else
331      value &= c64_keyline[9];
332
333   return value;
334}
335
336UINT8 cbm_common_cia0_port_b_r( device_t *device, UINT8 output_a )
337{
338   UINT8 value = 0xff;
339
340   if (!(output_a & 0x80)) value &= c64_keyline[7];
341   if (!(output_a & 0x40)) value &= c64_keyline[6];
342   if (!(output_a & 0x20)) value &= c64_keyline[5];
343   if (!(output_a & 0x10)) value &= c64_keyline[4];
344   if (!(output_a & 0x08)) value &= c64_keyline[3];
345   if (!(output_a & 0x04)) value &= c64_keyline[2];
346   if (!(output_a & 0x02)) value &= c64_keyline[1];
347   if (!(output_a & 0x01)) value &= c64_keyline[0];
348
349   if ( device->machine().root_device().ioport("CTRLSEL")->read() & 0x80 )
350      value &= c64_keyline[9];
351   else
352      value &= c64_keyline[8];
353
354   return value;
355}
356
357
358/***********************************************
359
360    CBM Cartridges
361
362***********************************************/
363
364
365/*  All the cartridge specific code has been moved
366    to machine/ drivers. Once more informations
367    surface about the cart expansions for systems
368    in c65.c, c128.c, cbmb.c and pet.c, the shared
369    code could be refactored to have here the
370    common functions                                */
371
372
373
374/***********************************************
375
376    CBM Datasette Tapes
377
378***********************************************/
379
380#if 0
381const cassette_interface cbm_cassette_interface =
382{
383   cbm_cassette_formats,
384   NULL,
385   (cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED),
386   NULL
387};
388#endif
389
390
391/*UINT8 *c65_basic; */
392/*UINT8 *c65_kernal; */
393/*UINT8 *c65_dos; */
394/*UINT8 *c65_monitor; */
395/*UINT8 *c65_graphics; */
396
397
398void c65_state::c65_nmi(  )
399{
400   if (m_nmilevel != (ioport("SPECIAL")->read() & 0x80) || m_cia1_irq)   /* KEY_RESTORE */
401   {
402      m_maincpu->set_input_line(INPUT_LINE_NMI, (ioport("SPECIAL")->read() & 0x80) || m_cia1_irq);
403
404      m_nmilevel = (ioport("SPECIAL")->read() & 0x80) || m_cia1_irq;
405   }
406}
407
408
409/***********************************************
410
411    CIA Interfaces
412
413***********************************************/
414
415/*
416 *  CIA 0 - Port A keyboard line select
417 *  CIA 0 - Port B keyboard line read
418 *
419 *  flag cassette read input, serial request in
420 *  irq to irq connected
421 *
422 *  see machine/cbm.c
423 */
424
425READ8_MEMBER(c65_state::c65_cia0_port_a_r)
426{
427   UINT8 cia0portb = m_cia0->pb_r(space, 0);
428
429   return cbm_common_cia0_port_a_r(m_cia0, cia0portb);
430}
431
432READ8_MEMBER(c65_state::c65_cia0_port_b_r)
433{
434   UINT8 value = 0xff;
435   UINT8 cia0porta = m_cia0->pa_r(space, 0);
436
437   value &= cbm_common_cia0_port_b_r(m_cia0, cia0porta);
438
439   if (!(m_6511_port & 0x02))
440      value &= m_keyline;
441
442   return value;
443}
444
445WRITE8_MEMBER(c65_state::c65_cia0_port_b_w)
446{
447//  was there lightpen support in c65 video chip?
448//  vic3_device *vic3 = machine().device<vic3_device>("vic3");
449//  vic3->lightpen_write(data & 0x10);
450}
451
452void c65_state::c65_irq( int level )
453{
454   if (level != m_old_level)
455   {
456      DBG_LOG(machine(), 3, "mos4510", ("irq %s\n", level ? "start" : "end"));
457      m_maincpu->set_input_line(M4510_IRQ_LINE, level);
458      m_old_level = level;
459   }
460}
461
462/* is this correct for c65 as well as c64? */
463WRITE_LINE_MEMBER(c65_state::c65_cia0_interrupt)
464{
465   m_cia0_irq = state;
466   c65_irq(state || m_vicirq);
467}
468
469/* is this correct for c65 as well as c64? */
470WRITE_LINE_MEMBER(c65_state::c65_vic_interrupt)
471{
472#if 1
473   if (state != m_vicirq)
474   {
475      c65_irq (state || m_cia0_irq);
476      m_vicirq = state;
477   }
478#endif
479}
480
481/*
482 * CIA 1 - Port A
483 * bit 7 serial bus data input
484 * bit 6 serial bus clock input
485 * bit 5 serial bus data output
486 * bit 4 serial bus clock output
487 * bit 3 serial bus atn output
488 * bit 2 rs232 data output
489 * bits 1-0 vic-chip system memory bank select
490 *
491 * CIA 1 - Port B
492 * bit 7 user rs232 data set ready
493 * bit 6 user rs232 clear to send
494 * bit 5 user
495 * bit 4 user rs232 carrier detect
496 * bit 3 user rs232 ring indicator
497 * bit 2 user rs232 data terminal ready
498 * bit 1 user rs232 request to send
499 * bit 0 user rs232 received data
500 *
501 * flag restore key or rs232 received data input
502 * irq to nmi connected ?
503 */
504READ8_MEMBER(c65_state::c65_cia1_port_a_r)
505{
506   UINT8 value = 0xff;
507
508   if (!m_iec->clk_r())
509      value &= ~0x40;
510
511   if (!m_iec->data_r())
512      value &= ~0x80;
513
514   return value;
515}
516
517WRITE8_MEMBER(c65_state::c65_cia1_port_a_w)
518{
519   static const int helper[4] = {0xc000, 0x8000, 0x4000, 0x0000};
520
521   m_iec->atn_w(!BIT(data, 3));
522   m_iec->clk_w(!BIT(data, 4));
523   m_iec->data_w(!BIT(data, 5));
524
525   m_vicaddr = m_memory + helper[data & 0x03];
526}
527
528WRITE_LINE_MEMBER(c65_state::c65_cia1_interrupt)
529{
530   m_cia1_irq = state;
531   c65_nmi();
532}
533
534/***********************************************
535
536    Memory Handlers
537
538***********************************************/
539
540/* processor has only 1 mega address space !? */
541/* and system 8 megabyte */
542/* dma controller and bankswitch hardware ?*/
543READ8_MEMBER( c65_state::c65_read_mem )
544{
545   UINT8 result;
546   if (offset <= 0x0ffff)
547      result = m_memory[offset];
548   else
549      result = space.read_byte(offset);
550   return result;
551}
552
553WRITE8_MEMBER( c65_state::c65_write_mem )
554{
555   if (offset <= 0x0ffff)
556      m_memory[offset] = data;
557   else
558      space.write_byte(offset, data);
559}
560
561/* dma chip at 0xd700
562  used:
563   writing banknumber to offset 2
564   writing hibyte to offset 1
565   writing lobyte to offset 0
566    cpu holded, dma transfer(data at address) executed, cpu activated
567
568  command data:
569   0 command (0 copy, 3 fill)
570   1,2 length
571   3,4,5 source
572   6,7,8 dest
573   9 subcommand
574   10 mod
575
576   version 1:
577   seldom copy (overlapping) from 0x402002 to 0x402008
578   (making place for new line in basic area)
579   for whats this bit 0x400000, or is this really the address?
580   maybe means add counter to address for access,
581   so allowing up or down copies, and reordering copies
582
583   version 2:
584   cmd 0x30 used for this
585*/
586void c65_state::c65_dma_port_w( int offset, int value )
587{
588   PAIR pair, src, dst, len;
589   UINT8 cmd, fill;
590   int i;
591   address_space &space = m_maincpu->space(AS_PROGRAM);
592
593   switch (offset & 3)
594   {
595   case 2:
596   case 1:
597      m_dma.data[offset & 3] = value;
598      break;
599   case 0:
600      pair.b.h3 = 0;
601      pair.b.h2 = m_dma.data[2];
602      pair.b.h = m_dma.data[1];
603      pair.b.l = m_dma.data[0]=value;
604      cmd = c65_read_mem(space, pair.d++);
605      len.w.h = 0;
606      len.b.l = c65_read_mem(space, pair.d++);
607      len.b.h = c65_read_mem(space, pair.d++);
608      src.b.h3 = 0;
609      fill = src.b.l = c65_read_mem(space, pair.d++);
610      src.b.h = c65_read_mem(space, pair.d++);
611      src.b.h2 = c65_read_mem(space, pair.d++);
612      dst.b.h3 = 0;
613      dst.b.l = c65_read_mem(space, pair.d++);
614      dst.b.h = c65_read_mem(space, pair.d++);
615      dst.b.h2 = c65_read_mem(space, pair.d++);
616
617      switch (cmd)
618      {
619      case 0:
620         if (src.d == 0x3ffff) m_dump_dma = 1;
621         if (m_dump_dma)
622            DBG_LOG(space.machine(), 1,"dma copy job",
623                  ("len:%.4x src:%.6x dst:%.6x sub:%.2x modrm:%.2x\n",
624                     len.w.l, src.d, dst.d, c65_read_mem(space, pair.d),
625                     c65_read_mem(space, pair.d + 1) ) );
626         if ((m_dma.version == 1)
627               && ( (src.d&0x400000) || (dst.d & 0x400000)))
628         {
629            if (!(src.d & 0x400000))
630            {
631               dst.d &= ~0x400000;
632               for (i = 0; i < len.w.l; i++)
633                  c65_write_mem(space, dst.d--, c65_read_mem(space, src.d++));
634            }
635            else if (!(dst.d & 0x400000))
636            {
637               src.d &= ~0x400000;
638               for (i = 0; i < len.w.l; i++)
639                  c65_write_mem(space, dst.d++, c65_read_mem(space, src.d--));
640            }
641            else
642            {
643               src.d &= ~0x400000;
644               dst.d &= ~0x400000;
645               for (i = 0; i < len.w.l; i++)
646                  c65_write_mem(space, --dst.d, c65_read_mem(space, --src.d));
647            }
648         }
649         else
650         {
651            for (i = 0; i < len.w.l; i++)
652               c65_write_mem(space, dst.d++, c65_read_mem(space, src.d++));
653         }
654         break;
655      case 3:
656         DBG_LOG(space.machine(), 3,"dma fill job",
657               ("len:%.4x value:%.2x dst:%.6x sub:%.2x modrm:%.2x\n",
658                  len.w.l, fill, dst.d, c65_read_mem(space, pair.d),
659                  c65_read_mem(space, pair.d + 1)));
660            for (i = 0; i < len.w.l; i++)
661               c65_write_mem(space, dst.d++, fill);
662            break;
663      case 0x30:
664         DBG_LOG(space.machine(), 1,"dma copy down",
665               ("len:%.4x src:%.6x dst:%.6x sub:%.2x modrm:%.2x\n",
666                  len.w.l, src.d, dst.d, c65_read_mem(space, pair.d),
667                  c65_read_mem(space, pair.d + 1) ) );
668         for (i = 0; i < len.w.l; i++)
669            c65_write_mem(space, dst.d--,c65_read_mem(space, src.d--));
670         break;
671      default:
672         DBG_LOG(space.machine(), 1,"dma job",
673               ("cmd:%.2x len:%.4x src:%.6x dst:%.6x sub:%.2x modrm:%.2x\n",
674                  cmd,len.w.l, src.d, dst.d, c65_read_mem(space, pair.d),
675                  c65_read_mem(space, pair.d + 1)));
676      }
677      break;
678   default:
679      DBG_LOG(space.machine(), 1, "dma chip write", ("%.3x %.2x\n", offset, value));
680      break;
681   }
682}
683
684int c65_state::c65_dma_port_r( int offset )
685{
686   /* offset 3 bit 7 in progress ? */
687   DBG_LOG(machine(), 2, "dma chip read", ("%.3x\n", offset));
688   return 0x7f;
689}
690
691void c65_state::c65_6511_port_w( int offset, int value )
692{
693   if (offset == 7)
694   {
695      m_6511_port = value;
696   }
697   DBG_LOG(machine(), 2, "r6511 write", ("%.2x %.2x\n", offset, value));
698}
699
700int c65_state::c65_6511_port_r( int offset )
701{
702   int data = 0xff;
703
704   if (offset == 7)
705   {
706      if (ioport("SPECIAL")->read() & 0x20)
707         data &= ~1;
708   }
709   DBG_LOG(machine(), 2, "r6511 read", ("%.2x\n", offset));
710
711   return data;
712}
713
714/* one docu states custom 4191 disk controller
715 (for 2 1MB MFM disk drives, 1 internal, the other extern (optional) 1565
716 with integrated 512 byte buffer
717
718 0->0 reset ?
719
720 0->1, 0->0, wait until 2 positiv, 1->0 ???
721
722 0->0, 0 not 0 means no drive ???, other system entries
723
724
725 reg 0 write/read
726  0,1 written
727  bit 1 set
728  bit 2 set
729  bit 3 set
730  bit 4 set
731
732
733 reg 0 read
734  bit 0
735  bit 1
736  bit 2
737  0..2 ->$1d4
738
739 reg 1 write
740  $01 written
741  $18 written
742  $46 written
743  $80 written
744  $a1 written
745  $01 written, dec
746  $10 written
747
748 reg 2 read/write?(lsr)
749  bit 2
750  bit 4
751  bit 5 busy waiting until zero, then reading reg 7
752  bit 6 operation not activ flag!? or set overflow pin used
753  bit 7 busy flag?
754
755 reg 3 read/write?(rcr)
756  bit 1
757  bit 3
758  bit 7 busy flag?
759
760 reg 4
761  track??
762  0 written
763  read -> $1d2
764  cmp #$50
765  bcs
766
767
768 reg 5
769  sector ??
770  1 written
771  read -> $1d3
772  cmp #$b bcc
773
774
775 reg 6
776  head ??
777  0 written
778  read -> $1d1
779  cmp #2 bcc
780
781 reg 7 read
782  #4e written
783  12 times 0, a1 a1 a1 fe  written
784
785 reg 8 read
786  #ff written
787  16 times #ff written
788
789 reg 9
790  #60 written
791
792might use the set overflow input
793
794$21a6c 9a6c format
795$21c97 9c97 write operation
796$21ca0 9ca0 get byte?
797$21cab 9cab read reg 7
798$21caf 9caf write reg 7
799$21cb3
800*/
801
802#define FDC_LOST 4
803#define FDC_CRC 8
804#define FDC_RNF 0x10
805#define FDC_BUSY 0x80
806#define FDC_IRQ 0x200
807
808#define FDC_CMD_MOTOR_SPIN_UP 0x10
809
810#if 0
811void c65_state::c65_fdc_state(void)
812{
813   switch (m_fdc.state)
814   {
815   case FDC_CMD_MOTOR_SPIN_UP:
816      if (machine().time() - m_fdc.time)
817      {
818         m_fdc.state = 0;
819         m_fdc.status &= ~FDC_BUSY;
820      }
821      break;
822   }
823}
824#endif
825
826void c65_state::c65_fdc_w( int offset, int data )
827{
828   DBG_LOG(machine(), 1, "fdc write", ("%.5x %.2x %.2x\n", machine().device("maincpu")->safe_pc(), offset, data));
829   switch (offset & 0xf)
830   {
831   case 0:
832      m_fdc.reg[0] = data;
833      break;
834   case 1:
835      m_fdc.reg[1] = data;
836      switch (data & 0xf9)
837      {
838      case 0x20: // wait for motor spin up
839         m_fdc.status &= ~(FDC_IRQ|FDC_LOST|FDC_CRC|FDC_RNF);
840         m_fdc.status |= FDC_BUSY;
841         m_fdc.time = machine().time();
842         m_fdc.state = FDC_CMD_MOTOR_SPIN_UP;
843         break;
844      case 0: // cancel
845         m_fdc.status &= ~(FDC_BUSY);
846         m_fdc.state = 0;
847         break;
848      case 0x80: // buffered write
849      case 0x40: // buffered read
850      case 0x81: // unbuffered write
851      case 0x41: // unbuffered read
852      case 0x30:case 0x31: // step
853         break;
854      }
855      break;
856   case 2: case 3: // read only
857      break;
858   case 4:
859      m_fdc.reg[offset & 0xf] = data;
860      m_fdc.track = data;
861      break;
862   case 5:
863      m_fdc.reg[offset & 0xf] = data;
864      m_fdc.sector = data;
865      break;
866   case 6:
867      m_fdc.reg[offset & 0xf] = data;
868      m_fdc.head = data;
869      break;
870   case 7:
871      m_fdc.buffer[m_fdc.cpu_pos++] = data;
872      break;
873   default:
874      m_fdc.reg[offset & 0xf] = data;
875      break;
876   }
877}
878
879int c65_state::c65_fdc_r( int offset )
880{
881   UINT8 data = 0;
882   switch (offset & 0xf)
883   {
884   case 0:
885      data = m_fdc.reg[0];
886      break;
887   case 1:
888      data = m_fdc.reg[1];
889      break;
890   case 2:
891      data = m_fdc.status;
892      break;
893   case 3:
894      data = m_fdc.status >> 8;
895      break;
896   case 4:
897      data = m_fdc.track;
898      break;
899   case 5:
900      data = m_fdc.sector;
901      break;
902   case 6:
903      data = m_fdc.head;
904      break;
905   case 7:
906      data = m_fdc.buffer[m_fdc.cpu_pos++];
907      break;
908   default:
909      data = m_fdc.reg[offset & 0xf];
910      break;
911   }
912   DBG_LOG(machine(), 1, "fdc read", ("%.5x %.2x %.2x\n", machine().device("maincpu")->safe_pc(), offset, data));
913   return data;
914}
915
916/* version 1 ramcheck
917   write 0:0
918   read write read write 80000,90000,f0000
919   write 0:8
920   read write read write 80000,90000,f0000
921
922   version 2 ramcheck???
923   read 0:
924   write 0:0
925   read 0:
926   first read and second read bit 0x80 set --> nothing
927   write 0:0
928   read 0
929   write 0:ff
930*/
931
932READ8_MEMBER( c65_state::c65_ram_expansion_r )
933{
934   UINT8 data = 0xff;
935   if (m_ram->size() > (128 * 1024))
936      data = m_expansion_ram.reg;
937   return data;
938}
939
940WRITE8_MEMBER( c65_state::c65_ram_expansion_w )
941{
942   offs_t expansion_ram_begin;
943   offs_t expansion_ram_end;
944
945   if (m_ram->size() > (128 * 1024))
946   {
947      m_expansion_ram.reg = data;
948
949      expansion_ram_begin = 0x80000;
950      expansion_ram_end = 0x80000 + (m_ram->size() - 128*1024) - 1;
951
952      if (data == 0x00) {
953         space.install_readwrite_bank(expansion_ram_begin, expansion_ram_end,"bank16");
954         membank("bank16")->set_base(m_ram->pointer() + 128*1024);
955      } else {
956         space.nop_readwrite(expansion_ram_begin, expansion_ram_end);
957      }
958   }
959}
960
961WRITE8_MEMBER( c65_state::c65_write_io )
962{
963   mos6581_device *sid_0 = machine().device<mos6581_device>("sid_r");
964   mos6581_device *sid_1 = machine().device<mos6581_device>("sid_l");
965   vic3_device *vic3 = machine().device<vic3_device>("vic3");
966
967   switch (offset & 0xf00)
968   {
969   case 0x000:
970      if (offset < 0x80)
971         vic3->port_w(space, offset & 0x7f, data);
972      else if (offset < 0xa0)
973         c65_fdc_w(offset & 0x1f, data);
974      else
975      {
976         c65_ram_expansion_w(space, offset & 0x1f, data, mem_mask);
977         /*ram expansion crtl optional */
978      }
979      break;
980   case 0x100:
981   case 0x200:
982   case 0x300:
983      vic3->palette_w(space, offset - 0x100, data);
984      break;
985   case 0x400:
986      if (offset<0x420) /* maybe 0x20 */
987         sid_0->write(space, offset & 0x3f, data);
988      else if (offset<0x440)
989         sid_1->write(space, offset & 0x3f, data);
990      else
991         DBG_LOG(machine(), 1, "io write", ("%.3x %.2x\n", offset, data));
992      break;
993   case 0x500:
994      DBG_LOG(machine(), 1, "io write", ("%.3x %.2x\n", offset, data));
995      break;
996   case 0x600:
997      c65_6511_port_w(offset & 0xff,data);
998      break;
999   case 0x700:
1000      c65_dma_port_w(offset & 0xff, data);
1001      break;
1002   }
1003}
1004
1005WRITE8_MEMBER( c65_state::c65_write_io_dc00 )
1006{
1007   switch (offset & 0xf00)
1008   {
1009   case 0x000:
1010      m_cia0->write(space, offset, data);
1011      break;
1012   case 0x100:
1013      m_cia1->write(space, offset, data);
1014      break;
1015   case 0x200:
1016   case 0x300:
1017      DBG_LOG(machine(), 1, "io write", ("%.3x %.2x\n", offset+0xc00, data));
1018      break;
1019   }
1020}
1021
1022READ8_MEMBER( c65_state::c65_read_io )
1023{
1024   mos6581_device *sid_0 = machine().device<mos6581_device>("sid_r");
1025   mos6581_device *sid_1 = machine().device<mos6581_device>("sid_l");
1026   vic3_device *vic3 = machine().device<vic3_device>("vic3");
1027
1028   switch (offset & 0xf00)
1029   {
1030   case 0x000:
1031      if (offset < 0x80)
1032         return vic3->port_r(space, offset & 0x7f);
1033      if (offset < 0xa0)
1034         return c65_fdc_r(offset & 0x1f);
1035      else
1036      {
1037         return c65_ram_expansion_r(space, offset & 0x1f, mem_mask);
1038         /*return; ram expansion crtl optional */
1039      }
1040   case 0x100:
1041   case 0x200:
1042   case 0x300:
1043   /* read only !? */
1044      DBG_LOG(machine(), 1, "io read", ("%.3x\n", offset));
1045      break;
1046   case 0x400:
1047      if (offset < 0x420)
1048         return sid_0->read(space, offset & 0x3f);
1049      if (offset < 0x440)
1050         return sid_1->read(space, offset & 0x3f);
1051      DBG_LOG(machine(), 1, "io read", ("%.3x\n", offset));
1052      break;
1053   case 0x500:
1054      DBG_LOG(machine(), 1, "io read", ("%.3x\n", offset));
1055      break;
1056   case 0x600:
1057      return c65_6511_port_r(offset&0xff);
1058   case 0x700:
1059      return c65_dma_port_r(offset&0xff);
1060   }
1061   return 0xff;
1062}
1063
1064READ8_MEMBER( c65_state::c65_read_io_dc00 )
1065{
1066   switch (offset & 0x300)
1067   {
1068   case 0x000:
1069      return m_cia0->read(space, offset);
1070   case 0x100:
1071      return m_cia1->read(space, offset);
1072   case 0x200:
1073   case 0x300:
1074      DBG_LOG(machine(), 1, "io read", ("%.3x\n", offset+0xc00));
1075      break;
1076   }
1077   return 0xff;
1078}
1079
1080
1081/*
1082d02f:
1083 init a5 96 written (seems to be switch to c65 or vic3 mode)
1084 go64 0 written
1085*/
1086
1087/* bit 1 external sync enable (genlock)
1088   bit 2 palette enable
1089   bit 6 vic3 c65 character set */
1090WRITE8_MEMBER(c65_state::c65_bankswitch_interface)
1091{
1092   DBG_LOG(machine(), 2, "c65 bankswitch", ("%.2x\n",data));
1093
1094   if (m_io_on)
1095   {
1096      if (data & 1)
1097      {
1098         membank("bank8")->set_base(m_colorram + 0x400);
1099         membank("bank9")->set_base(m_colorram + 0x400);
1100         m_maincpu->space(AS_PROGRAM).install_read_bank(0x0dc00, 0x0dfff, "bank8");
1101         m_maincpu->space(AS_PROGRAM).install_write_bank(0x0dc00, 0x0dfff, "bank9");
1102      }
1103      else
1104      {
1105         m_maincpu->space(AS_PROGRAM).install_read_handler(0x0dc00, 0x0dfff, read8_delegate(FUNC(c65_state::c65_read_io_dc00),this));
1106         m_maincpu->space(AS_PROGRAM).install_write_handler(0x0dc00, 0x0dfff, write8_delegate(FUNC(c65_state::c65_write_io_dc00),this));
1107      }
1108   }
1109
1110   m_io_dc00_on = !(data & 1);
1111#if 0
1112   /* cartridge roms !?*/
1113   if (data & 0x08)
1114      membank("bank1")->set_base(m_roml);
1115   else
1116      membank("bank1")->set_base(m_memory + 0x8000);
1117
1118   if (data & 0x10)
1119      membank("bank2")->set_base(m_basic);
1120   else
1121      membank("bank2")->set_base(m_memory + 0xa000);
1122#endif
1123   if ((m_old_value^data) & 0x20)
1124   {
1125   /* bankswitching faulty when doing actual page */
1126      if (data & 0x20)
1127         membank("bank3")->set_base(m_basic);
1128      else
1129         membank("bank3")->set_base(m_memory + 0xc000);
1130   }
1131   m_charset_select = data & 0x40;
1132#if 0
1133   /* cartridge roms !?*/
1134   if (data & 0x80)
1135      membank("bank8")->set_base(m_kernal);
1136   else
1137      membank("bank6")->set_base(m_memory + 0xe000);
1138#endif
1139   m_old_value = data;
1140}
1141
1142void c65_state::c65_bankswitch(  )
1143{
1144   int data, loram, hiram, charen;
1145
1146   data = 0x00; // machine().device<m4510_device>("maincpu")->get_port();
1147   if (data == m_old_data)
1148      return;
1149
1150   DBG_LOG(machine(), 1, "bankswitch", ("%d\n", data & 7));
1151   loram = (data & 1) ? 1 : 0;
1152   hiram = (data & 2) ? 1 : 0;
1153   charen = (data & 4) ? 1 : 0;
1154
1155   if ((!m_game && m_exrom) || (loram && hiram && !m_exrom))
1156      membank("bank1")->set_base(m_roml);
1157   else
1158      membank("bank1")->set_base(m_memory + 0x8000);
1159
1160   if ((!m_game && m_exrom && hiram) || (!m_exrom))
1161      membank("bank2")->set_base(m_romh);
1162   else if (loram && hiram)
1163      membank("bank2")->set_base(m_basic);
1164   else
1165      membank("bank2")->set_base(m_memory + 0xa000);
1166
1167   if ((!m_game && m_exrom) || (charen && (loram || hiram)))
1168   {
1169      m_io_on = 1;
1170      membank("bank6")->set_base(m_colorram);
1171      membank("bank7")->set_base(m_colorram);
1172
1173      if (m_io_dc00_on)
1174      {
1175         m_maincpu->space(AS_PROGRAM).install_read_handler(0x0dc00, 0x0dfff, read8_delegate(FUNC(c65_state::c65_read_io_dc00),this));
1176         m_maincpu->space(AS_PROGRAM).install_write_handler(0x0dc00, 0x0dfff, write8_delegate(FUNC(c65_state::c65_write_io_dc00),this));
1177      }
1178      else
1179      {
1180         m_maincpu->space(AS_PROGRAM).install_read_bank(0x0dc00, 0x0dfff, "bank8");
1181         m_maincpu->space(AS_PROGRAM).install_write_bank(0x0dc00, 0x0dfff, "bank9");
1182         membank("bank8")->set_base(m_colorram + 0x400);
1183         membank("bank9")->set_base(m_colorram + 0x400);
1184      }
1185      m_maincpu->space(AS_PROGRAM).install_read_handler(0x0d000, 0x0d7ff, read8_delegate(FUNC(c65_state::c65_read_io),this));
1186      m_maincpu->space(AS_PROGRAM).install_write_handler(0x0d000, 0x0d7ff, write8_delegate(FUNC(c65_state::c65_write_io),this));
1187   }
1188   else
1189   {
1190      m_io_on = 0;
1191      membank("bank5")->set_base(m_memory + 0xd000);
1192      membank("bank7")->set_base(m_memory + 0xd800);
1193      membank("bank9")->set_base(m_memory + 0xdc00);
1194      if (!charen && (loram || hiram))
1195      {
1196         membank("bank4")->set_base(m_chargen);
1197         membank("bank6")->set_base(m_chargen + 0x800);
1198         membank("bank8")->set_base(m_chargen + 0xc00);
1199      }
1200      else
1201      {
1202         membank("bank4")->set_base(m_memory + 0xd000);
1203         membank("bank6")->set_base(m_memory + 0xd800);
1204         membank("bank8")->set_base(m_memory + 0xdc00);
1205      }
1206      m_maincpu->space(AS_PROGRAM).install_read_bank(0x0d000, 0x0d7ff, "bank4");
1207      m_maincpu->space(AS_PROGRAM).install_write_bank(0x0d000, 0x0d7ff, "bank5");
1208   }
1209
1210   if (!m_game && m_exrom)
1211   {
1212      membank("bank10")->set_base(m_romh);
1213   }
1214   else
1215   {
1216      if (hiram)
1217      {
1218         membank("bank10")->set_base(m_kernal);
1219      }
1220      else
1221      {
1222         membank("bank10")->set_base(m_memory + 0xe000);
1223      }
1224   }
1225   m_old_data = data;
1226}
1227
1228#ifdef UNUSED_FUNCTION
1229void c65_state::c65_colorram_write( int offset, int value )
1230{
1231   m_colorram[offset & 0x7ff] = value | 0xf0;
1232}
1233#endif
1234
1235/*
1236 * only 14 address lines
1237 * a15 and a14 portlines
1238 * 0x1000-0x1fff, 0x9000-0x9fff char rom
1239 */
1240READ8_MEMBER(c65_state::c65_dma_read)
1241{
1242   if (!m_game && m_exrom)
1243   {
1244      if (offset < 0x3000)
1245         return m_memory[offset];
1246      return m_romh[offset & 0x1fff];
1247   }
1248   if ((m_vicaddr == m_memory) || (m_vicaddr == m_memory + 0x8000))
1249   {
1250      if (offset < 0x1000)
1251         return m_vicaddr[offset & 0x3fff];
1252      if (offset < 0x2000) {
1253         if (m_charset_select)
1254            return m_chargen[offset & 0xfff];
1255         else
1256            return m_chargen[offset & 0xfff];
1257      }
1258      return m_vicaddr[offset & 0x3fff];
1259   }
1260   return m_vicaddr[offset & 0x3fff];
1261}
1262
1263READ8_MEMBER(c65_state::c65_dma_read_color)
1264{
1265   if (m_c64mode)
1266      return m_colorram[offset & 0x3ff] & 0xf;
1267   return m_colorram[offset & 0x7ff];
1268}
1269
1270void c65_state::c65_common_driver_init(  )
1271{
1272   m_memory = auto_alloc_array_clear(machine(), UINT8, 0x10000);
1273   membank("bank11")->set_base(m_memory + 0x00000);
1274   membank("bank12")->set_base(m_memory + 0x08000);
1275   membank("bank13")->set_base(m_memory + 0x0a000);
1276   membank("bank14")->set_base(m_memory + 0x0c000);
1277   membank("bank15")->set_base(m_memory + 0x0e000);
1278
1279   cbm_common_init();
1280   m_keyline = 0xff;
1281
1282   m_pal = 0;
1283   m_charset_select = 0;
1284   m_6511_port = 0xff;
1285   m_vicirq = 0;
1286   m_old_data = -1;
1287
1288   /* C65 had no datasette port */
1289   m_tape_on = 0;
1290   m_game = 1;
1291   m_exrom = 1;
1292
1293   /*memset(m_memory + 0x40000, 0, 0x800000 - 0x40000); */
1294}
1295
1296DRIVER_INIT_MEMBER(c65_state,c65)
1297{
1298   m_dma.version = 2;
1299   c65_common_driver_init();
1300}
1301
1302DRIVER_INIT_MEMBER(c65_state,c65pal)
1303{
1304   m_dma.version = 1;
1305   c65_common_driver_init();
1306   m_pal = 1;
1307}
1308
1309MACHINE_START_MEMBER(c65_state,c65)
1310{
1311   /* clear upper memory */
1312   memset(m_ram->pointer() + 128*1024, 0xff, m_ram->size() -  128*1024);
1313
1314//removed   cbm_drive_0_config (SERIAL, 10);
1315//removed   cbm_drive_1_config (SERIAL, 11);
1316   m_vicaddr = m_memory;
1317
1318   m_c64mode = 0;
1319
1320   c65_bankswitch_interface(m_maincpu->space(AS_PROGRAM),0,0xff);
1321   c65_bankswitch();
1322}
1323
1324
1325INTERRUPT_GEN_MEMBER(c65_state::c65_frame_interrupt)
1326{
1327   int value;
1328
1329   c65_nmi();
1330
1331   /* common keys input ports */
1332   cbm_common_interrupt(&device);
1333
1334   /* c65 specific: function keys input ports */
1335   value = 0xff;
1336
1337   value &= ~ioport("FUNCT")->read();
1338   m_keyline = value;
1339}
trunk/src/mame/machine/dc.cpp
r250291r250292
1414#include "machine/naomig1.h"
1515#include "video/powervr2.h"
1616
17// for now, make buggy GCC/Mingw STFU about I64FMT
18#if (defined(__MINGW32__) && (__GNUC__ >= 5))
19#pragma GCC diagnostic push
20#pragma GCC diagnostic ignored "-Wformat"
21#pragma GCC diagnostic ignored "-Wformat-extra-args"
22#endif
23
2417#define DEBUG_REGISTERS (1)
2518
2619#if DEBUG_REGISTERS
r250291r250292
729722{
730723   m_powervr2->pvr_scanline_timer(param);
731724}
732#if (defined(__MINGW32__) && (__GNUC__ >= 5))
733#pragma GCC diagnostic pop
734#endif
trunk/src/mame/machine/naomim2.cpp
r250291r250292
1111
1212NAOMI_ROM_OFFSET bit29: ROM size/mapping selection, 0 - 4MB ROM mode, 1 - 8MB ROM mode
1313
14bit28: Bank selection.
15   in the case of flash-based 171-7885A ROM boards two of them can be stacked at once
16   onto main board. each must be configured as Bank 0 or 1 via some (currently unknown) jumper.
17   this bit selects which one ROM board will be accessed.
18
1419note: if ROM is not mounted its area readed as 0xFF
1520
16218MB ROM mode:
r250291r250292
166171void naomi_m2_board::board_write(offs_t offset, UINT16 data)
167172{
168173   if(offset & 0x40000000) {
169      if((offset & 0x0f000000) == 0x02000000) {
174      if(offset & 0x00020000) {
170175         offset &= RAM_SIZE-1;
171176         ram[offset] = data;
172177         ram[offset+1] = data >> 8;
173178         return;
174179      }
175      switch(offset & 0x1fffffff) {
180      switch(offset & 0x1ffff) {
176181      case 0x1fff8: m_cryptdevice->set_addr_low(data); return;
177182      case 0x1fffa: m_cryptdevice->set_addr_high(data);  return;
178183      case 0x1fffc: m_cryptdevice->set_subkey(data); return;
trunk/src/mame/machine/xbox.cpp
r250291r250292
1616#include "includes/chihiro.h"
1717#include "includes/xbox.h"
1818
19// for now, make buggy GCC/Mingw STFU about I64FMT
20#if (defined(__MINGW32__) && (__GNUC__ >= 5))
21#pragma GCC diagnostic push
22#pragma GCC diagnostic ignored "-Wformat"
23#pragma GCC diagnostic ignored "-Wformat-extra-args"
24#endif
25
2619#define LOG_PCI
2720//#define LOG_OHCI
2821//#define USB_ENABLED
r250291r250292
11971190static void hubintiasbridg_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask)
11981191{
11991192#ifdef LOG_PCI
1200   if (reg >= 16) device->logerror("  bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask);
1193   if (reg >= 16) busdevice->logerror("  bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask);
12011194#endif
12021195}
12031196
r250291r250292
12161209static void dummy_pci_w(device_t *busdevice, device_t *device, int function, int reg, UINT32 data, UINT32 mem_mask)
12171210{
12181211#ifdef LOG_PCI
1219   if (reg >= 16) device->logerror("  bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask);
1212   if (reg >= 16) busdevice->logerror("  bus:0 function:%d register:%d data:%08X mask:%08X\n", function, reg, data, mem_mask);
12201213#endif
12211214}
12221215
r250291r250292
15361529   MCFG_SCREEN_UPDATE_DRIVER(xbox_base_state, screen_update_callback)
15371530   MCFG_SCREEN_VBLANK_DRIVER(xbox_base_state, vblank_callback)
15381531MACHINE_CONFIG_END
1539
1540#if (defined(__MINGW32__) && (__GNUC__ >= 5))
1541#pragma GCC diagnostic pop
1542#endif
trunk/src/mame/video/chihiro.cpp
r250291r250292
12401240   }
12411241}
12421242
1243inline UINT8 *nv2a_renderer::read_pixel(int x, int y, UINT32 c[4])
1243inline UINT8 *nv2a_renderer::read_pixel(int x, int y, INT32 c[4])
12441244{
12451245   UINT32 offset;
12461246   UINT32 color;
r250291r250292
12611261      c[1] = pal6bit((color & 0x07e0) >> 5);
12621262      c[0] = pal5bit(color & 0x1f);
12631263      return (UINT8 *)addr16;
1264   case NV2A_COLOR_FORMAT_UNKNOWN4:
1265   case NV2A_COLOR_FORMAT_X8R8G8B8:
1264   case NV2A_COLOR_FORMAT_X8R8G8B8_Z8R8G8B8:
1265   case NV2A_COLOR_FORMAT_X8R8G8B8_X8R8G8B8:
12661266      addr = (UINT32 *)((UINT8 *)rendertarget + offset);
12671267      color = *addr;
12681268
r250291r250292
12951295   UINT32 *daddr32;
12961296   UINT16 *daddr16;
12971297   UINT32 deptsten;
1298   UINT32 c[4], fb[4], s[4], d[4], cc[4];
1298   INT32 c[4], fb[4], s[4], d[4], cc[4];
12991299   UINT32 dep, sten, stenc, stenv;
13001300   bool stencil_passed;
13011301   bool depth_passed;
r250291r250292
18541854   if (color_mask != 0) {
18551855      UINT32 ct,ft,w;
18561856
1857      ct = (c[3] << 24) | (c[2] << 16) | (c[1] << 8) | c[0];
1858      ft = (fb[3] << 24) | (fb[2] << 16) | (fb[1] << 8) | fb[0];
1857      ct = ((UINT32)c[3] << 24) | ((UINT32)c[2] << 16) | ((UINT32)c[1] << 8) | (UINT32)c[0];
1858      ft = ((UINT32)fb[3] << 24) | ((UINT32)fb[2] << 16) | ((UINT32)fb[1] << 8) | (UINT32)fb[0];
18591859      w = (ft & ~color_mask) | (ct & color_mask);
18601860      switch (colorformat_rendertarget) {
18611861      case NV2A_COLOR_FORMAT_R5G6B5:
18621862         w = ((w >> 8) & 0xf800) + ((w >> 5) & 0x7e0) + ((w >> 3) & 0x1f);
18631863         *((UINT16 *)addr) = (UINT16)w;
18641864         break;
1865      case NV2A_COLOR_FORMAT_UNKNOWN4:
1866      case NV2A_COLOR_FORMAT_X8R8G8B8:
1865      case NV2A_COLOR_FORMAT_X8R8G8B8_Z8R8G8B8:
1866      case NV2A_COLOR_FORMAT_X8R8G8B8_X8R8G8B8:
18671867         *((UINT32 *)addr) = w;
18681868         break;
18691869      case NV2A_COLOR_FORMAT_A8R8G8B8:
r250291r250292
28622862         m = 1;
28632863      // possible buffers: color, depth, stencil
28642864      // clear framebuffer
2865      if (data & 0xf0) {
2865      if ((data & 0xf0) == 0xf0) {
28662866         if (bytespixel_rendertarget == 4) {
28672867            bitmap_rgb32 bm(rendertarget, (limits_rendertarget.right() + 1) * m, (limits_rendertarget.bottom() + 1) * m, pitch_rendertarget / 4);
28682868
r250291r250292
29132913      case NV2A_COLOR_FORMAT_R5G6B5:
29142914         bytespixel_rendertarget = 2;
29152915         break;
2916      case NV2A_COLOR_FORMAT_UNKNOWN4:
2917      case NV2A_COLOR_FORMAT_X8R8G8B8:
2916      case NV2A_COLOR_FORMAT_X8R8G8B8_Z8R8G8B8:
2917      case NV2A_COLOR_FORMAT_X8R8G8B8_X8R8G8B8:
29182918      case NV2A_COLOR_FORMAT_A8R8G8B8:
29192919         bytespixel_rendertarget = 4;
29202920         break;
r250291r250292
40184018   return 0;
40194019}
40204020
4021void nv2a_renderer::geforce_assign_object(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 address)
4022{
4023   int handle, objclass;
4024
4025   handle = space.read_dword(address);
4026   handle = geforce_object_offset(handle);
4027#ifdef LOG_NV2A
4028   machine().logerror("  assign to subchannel %d object at %d", subch, handle);
4029#endif
4030   channel[chanel][subchannel].object.objhandle = handle;
4031   handle = ramin[handle / 4];
4032   objclass = handle & 0xff;
4033#ifdef LOG_NV2A
4034   machine().logerror(" class %03X\n", objclass);
4035#endif
4036   channel[chanel][subchannel].object.objclass = objclass;
4037}
4038
40214039TIMER_CALLBACK_MEMBER(nv2a_renderer::puller_timer_work)
40224040{
4023   int chanel, subchannel;
4024   int method, count, handle, objclass;
4041   int chanel;
4042   int method, count;
40254043   UINT32 *dmaput, *dmaget;
40264044   UINT32 cmd, cmdtype;
40274045   int countlen;
r250291r250292
40304048   UINT32 subch;
40314049
40324050   chanel = puller_channel;
4033   subchannel = puller_subchannel;
4034   dmaput = &channel[chanel][subchannel].regs[0x40 / 4];
4035   dmaget = &channel[chanel][subchannel].regs[0x44 / 4];
4051   dmaput = &channel[chanel][0].regs[0x40 / 4];
4052   dmaget = &channel[chanel][0].regs[0x44 / 4];
40364053   while (*dmaget != *dmaput) {
40374054      cmd = space->read_dword(*dmaget);
40384055      *dmaget += 4;
r250291r250292
40414058      {
40424059      case 6: // jump
40434060#ifdef LOG_NV2A
4044         printf("jump dmaget %08X", *dmaget);
4061         machine().logerror("jump dmaget %08X", *dmaget);
40454062#endif
40464063         *dmaget = cmd & 0xfffffffc;
40474064#ifdef LOG_NV2A
4048         printf(" -> %08X\n\r", *dmaget);
4065         machine().logerror(" -> %08X\n\r", *dmaget);
40494066#endif
40504067         break;
40514068      case 0: // increasing method
r250291r250292
40534070         subch = (cmd >> 13) & 7;
40544071         count = (cmd >> 18) & 2047;
40554072         if ((method == 0) && (count == 1)) {
4056            handle = space->read_dword(*dmaget);
4057            handle = geforce_object_offset(handle);
4058#ifdef LOG_NV2A
4059            machine().logerror("  assign to subchannel %d object at %d", subch, handle);
4060#endif
4061            channel[chanel][subch].object.objhandle = handle;
4062            handle = ramin[handle / 4];
4063            objclass = handle & 0xff;
4064#ifdef LOG_NV2A
4065            machine().logerror(" class %03X\n", objclass);
4066#endif
4067            channel[chanel][subch].object.objclass = objclass;
4073            geforce_assign_object(*space, chanel, subch, *dmaget);
40684074            *dmaget += 4;
40694075         }
40704076         else {
r250291r250292
40934099         subch = (cmd >> 13) & 7;
40944100         count = (cmd >> 18) & 2047;
40954101         if ((method == 0) && (count == 1)) {
4096            handle = space->read_dword(*dmaget);
4097            handle = geforce_object_offset(handle);
4098#ifdef LOG_NV2A
4099            machine().logerror("  assign to subchannel %d object at %d", subch, handle);
4100#endif
4101            channel[chanel][subch].object.objhandle = handle;
4102            handle = ramin[handle / 4];
4103            objclass = handle & 0xff;
4104#ifdef LOG_NV2A
4105            machine().logerror(" class %03X\n", objclass);
4106#endif
4107            channel[chanel][subch].object.objclass = objclass;
4102            geforce_assign_object(*space, chanel, subch, *dmaget);
41084103            *dmaget += 4;
41094104         }
41104105         else {
r250291r250292
41254120         count = space->read_dword(*dmaget);
41264121         *dmaget += 4;
41274122         if ((method == 0) && (count == 1)) {
4128            handle = space->read_dword(*dmaget);
4129            handle = geforce_object_offset(handle);
4130#ifdef LOG_NV2A
4131            machine().logerror("  assign to subchannel %d object at %d", subch, handle);
4132#endif
4133            channel[chanel][subch].object.objhandle = handle;
4134            handle = ramin[handle / 4];
4135            objclass = handle & 0xff;
4136#ifdef LOG_NV2A
4137            machine().logerror(" class %03X\n", objclass);
4138#endif
4139            channel[chanel][subch].object.objclass = objclass;
4123            geforce_assign_object(*space, chanel, subch, *dmaget);
41404124            *dmaget += 4;
41414125         }
41424126         else {
r250291r250292
42944278      subchannel = (suboffset >> (13 - 2)) & 7;
42954279      suboffset = suboffset & 0x7ff;
42964280      //machine().logerror("NV_2A: write channel[%02X,%d,%04X]=%08X\n",chanel,subchannel,suboffset*4,data & mem_mask);
4281      COMBINE_DATA(&channel[chanel][subchannel].regs[suboffset]);
42974282      if (suboffset >= 0x80 / 4)
42984283         return;
4299      COMBINE_DATA(&channel[chanel][subchannel].regs[suboffset]);
43004284      if ((suboffset == 0x40 / 4) || (suboffset == 0x44 / 4)) { // DMA_PUT or DMA_GET
43014285         UINT32 *dmaput, *dmaget;
43024286
4303         dmaput = &channel[chanel][subchannel].regs[0x40 / 4];
4304         dmaget = &channel[chanel][subchannel].regs[0x44 / 4];
4287         dmaput = &channel[chanel][0].regs[0x40 / 4];
4288         dmaget = &channel[chanel][0].regs[0x44 / 4];
43054289         //printf("dmaget %08X dmaput %08X\n\r",*dmaget,*dmaput);
4306         if ((*dmaput == 0x048cf000) && (*dmaget == 0x07f4d000)) {
4290         if ((*dmaput == 0x048cf000) && (*dmaget == 0x07f4d000)) { // only for outr2
43074291            *dmaget = *dmaput;
43084292            puller_waiting = 0;
43094293            puller_timer->enable(false);
r250291r250292
43124296         if (*dmaget != *dmaput) {
43134297            if (puller_waiting == 0) {
43144298               puller_channel = chanel;
4315               puller_subchannel = subchannel;
43164299               puller_space = &space;
43174300               puller_timer->enable();
43184301               puller_timer->adjust(attotime::zero);
trunk/src/mame/video/shadfrce.cpp
r250291r250292
101101
102102
103103
104void shadfrce_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offset )
104void shadfrce_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
105105{
106106   /* | ---- ---- hhhf Fe-Y | ---- ---- yyyy yyyy | ---- ---- TTTT TTTT | ---- ---- tttt tttt |
107107      | ---- ---- -pCc cccX | ---- ---- xxxx xxxx | ---- ---- ---- ---- | ---- ---- ---- ---- | */
r250291r250292
121121   UINT16 *finish = m_spvideoram_old;
122122   UINT16 *source = finish + 0x2000/2 - 8;
123123   int hcount;
124   while (source >= finish)
124   while( source>=finish )
125125   {
126      int ypos = 0x100 - (((source[0] & 0x0003) << 8) | (source[1] & 0x00ff));
127      int xpos = (((source[4] & 0x0001) << 8) | (source[5] & 0x00ff)) + 1;
128      int tile = ((source[2] & 0x00ff) << 8) | (source[3] & 0x00ff);
129      int height = (source[0] & 0x00e0) >> 5;
126130      int enable = ((source[0] & 0x0004));
131      int flipx = ((source[0] & 0x0010) >> 4);
132      int flipy = ((source[0] & 0x0008) >> 3);
133      int pal = ((source[4] & 0x003e));
134      int pri_mask = (source[4] & 0x0040) ? 0x02 : 0x00;
127135
128      if (enable)
129      {
130         int ypos = 0x100 - (((source[0] & 0x0003) << 8) | (source[1] & 0x00ff));
131         int height = ((source[0] & 0x00e0) >> 5) ;
132         height += 1;
136      if (pal & 0x20) pal ^= 0x60;    /* skip hole */
133137
134         int bottom = ypos + y_offset;
135         int top = bottom - height * 16;
136
137         if (top > cliprect.max_y || bottom <= cliprect.min_y)
138         {
139            source -= 8;
140            continue;
138      height++;
139      if (enable) {
140         for (hcount=0;hcount<height;hcount++) {
141            gfx->prio_transpen(bitmap,cliprect,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16,screen.priority(),pri_mask,0);
142            gfx->prio_transpen(bitmap,cliprect,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16,screen.priority(),pri_mask,0);
143            gfx->prio_transpen(bitmap,cliprect,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16+0x200,screen.priority(),pri_mask,0);
144            gfx->prio_transpen(bitmap,cliprect,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16+0x200,screen.priority(),pri_mask,0);
141145         }
142
143         int xpos = (((source[4] & 0x0001) << 8) | (source[5] & 0x00ff)) + 1;
144         int tile = ((source[2] & 0x00ff) << 8) | (source[3] & 0x00ff);
145         int flipx = ((source[0] & 0x0010) >> 4);
146         int flipy = ((source[0] & 0x0008) >> 3);
147         int pal = ((source[4] & 0x003e));
148         int pri_mask = (source[4] & 0x0040) ? 0x02 : 0x00;
149
150         if (pal & 0x20) pal ^= 0x60;    /* skip hole */
151
152
153         for (hcount = 0; hcount < height; hcount++) {
154            gfx->prio_transpen(bitmap, cliprect, tile + hcount, pal, flipx, flipy, xpos, bottom-16, screen.priority(), pri_mask, 0);
155            gfx->prio_transpen(bitmap, cliprect, tile + hcount, pal, flipx, flipy, xpos - 0x200, bottom-16, screen.priority(), pri_mask, 0); // x wraparound
156            bottom -= 16;
157         }
158146      }
159
160147      source-=8;
161148   }
162149}
r250291r250292
169156   {
170157      m_bg1tilemap->draw(screen, bitmap, cliprect, 0,0);
171158      m_bg0tilemap->draw(screen, bitmap, cliprect, 0,1);
172      draw_sprites(screen,bitmap,cliprect, 0);
173      draw_sprites(screen,bitmap,cliprect, 0x200); // y-wrap
159      draw_sprites(screen,bitmap,cliprect);
174160      m_fgtilemap->draw(screen, bitmap, cliprect, 0,0);
175161   }
176162   else
trunk/src/osd/modules/debugger/debugint.cpp
r250291r250292
1717#include "debug/debugvw.h"
1818#include "debug/dvdisasm.h"
1919#include "debug/dvmemory.h"
20#include "debug/dvstate.h"
2120#include "debug/debugcon.h"
2221#include "debug/debugcpu.h"
2322
r250291r250292
151150   DISABLE_COPYING(DView_edit);
152151
153152public:
154   DView_edit()
155   { }
156   ~DView_edit()
157   { }
153   DView_edit(): active(0), container(NULL) { }
154   ~DView_edit() { }
158155   int                 active;
159156   render_container *  container;
160157   std::string         str;
r250291r250292
11311128   x1 += UI_BOX_LR_BORDER;
11321129   x2 -= UI_BOX_LR_BORDER;
11331130   y1 += UI_BOX_TB_BORDER;
1134   y2 -= UI_BOX_TB_BORDER;
11351131
11361132   /* draw the text within it */
11371133   editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
trunk/src/osd/modules/debugger/debugwin.cpp
r250291r250292
2222#include "win/uimetrics.h"
2323
2424#include "emu.h"
25#include "uiinput.h"
2625#include "debugger.h"
2726
2827#include "window.h"
29#include "winmain.h"
3028#include "../../windows/input.h"
3129
3230
trunk/src/osd/modules/debugger/win/consolewininfo.cpp
r250291r250292
99#include "consolewininfo.h"
1010
1111#include "debugviewinfo.h"
12#include "disasmviewinfo.h"
1312#include "uimetrics.h"
1413
1514#include "debug/debugcon.h"
r250291r250292
8483   set_cpu(*debug_cpu_get_visible_cpu(machine()));
8584
8685   // mark the edit box as the default focus and set it
87   set_default_focus();
86   editwin_info::set_default_focus();
8887   return;
8988
9089cleanup:
trunk/src/osd/modules/debugger/win/debugviewinfo.cpp
r250291r250292
315315      // loop twice; once to fill the background and once to draw the text
316316      for (int iter = 0; iter < 2; iter++)
317317      {
318         COLORREF fgcolor = RGB(0x00,0x00,0x00);
318         COLORREF fgcolor;
319319         COLORREF bgcolor = RGB(0xff,0xff,0xff);
320320         HBRUSH bgbrush = NULL;
321321         int last_attrib = -1;
trunk/src/osd/modules/debugger/win/debugwininfo.cpp
r250291r250292
1111#include "debugviewinfo.h"
1212
1313#include "debug/debugcpu.h"
14#include "imagedev/cassette.h"
15
16#include "strconv.h"
1714#include "window.h"
1815#include "winutf8.h"
1916
trunk/src/osd/modules/debugger/win/disasmwininfo.cpp
r250291r250292
1111#include "debugviewinfo.h"
1212#include "disasmviewinfo.h"
1313#include "uimetrics.h"
14
15#include "debugger.h"
16#include "debug/debugcon.h"
17#include "debug/debugcpu.h"
18
1914#include "winutf8.h"
2015
2116
r250291r250292
3833   update_caption();
3934
4035   // recompute the children once to get the maxwidth
41   recompute_children();
36   disasmwin_info::recompute_children();
4237
4338   // position the window and recompute children again
4439   SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW);
45   recompute_children();
40   disasmwin_info::recompute_children();
4641
4742   // mark the edit box as the default focus and set it
48   set_default_focus();
43   editwin_info::set_default_focus();
4944}
5045
5146
trunk/src/osd/modules/debugger/win/logwininfo.cpp
r250291r250292
3838   SetWindowPos(window(), HWND_TOP, 100, 100, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_SHOWWINDOW);
3939
4040   // recompute the children
41   recompute_children();
41   debugwin_info::recompute_children();
4242}
4343
4444
trunk/src/osd/modules/debugger/win/memorywininfo.cpp
r250291r250292
5959   update_caption();
6060
6161   // recompute the children once to get the maxwidth
62   recompute_children();
62   memorywin_info::recompute_children();
6363
6464   // position the window and recompute children again
6565   SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW);
66   recompute_children();
66   memorywin_info::recompute_children();
6767
6868   // mark the edit box as the default focus and set it
69   set_default_focus();
69   editwin_info::set_default_focus();
7070}
7171
7272
trunk/src/osd/modules/debugger/win/pointswininfo.cpp
r250291r250292
4646   SetWindowPos(window(), HWND_TOP, 100, 100, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_SHOWWINDOW);
4747
4848   // recompute the children
49   recompute_children();
49   debugwin_info::recompute_children();
5050}
5151
5252
trunk/src/osd/modules/debugger/win/uimetrics.cpp
r250291r250292
3131      m_debug_font = CreateFont(-MulDiv((size <= 0) ? 9 : size, GetDeviceCaps(temp_dc, LOGPIXELSY), 72), 0, 0, 0, FW_MEDIUM, FALSE, FALSE, FALSE,
3232               ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH, t_face);
3333      osd_free(t_face);
34      t_face = NULL;
3534
3635      if (m_debug_font == NULL)
3736         fatalerror("Unable to create debugger font\n");
trunk/src/osd/modules/font/font_none.cpp
r250291r250292
2121   virtual bool open(const char *font_path, const char *name, int &height);
2222   virtual void close();
2323   virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
24private:
2524};
2625
2726bool osd_font_none::open(const char *font_path, const char *_name, int &height)
trunk/src/osd/modules/font/font_windows.cpp
r250291r250292
3434//-------------------------------------------------
3535
3636class osd_font_windows : public osd_font
37{
37{   
3838public:
39   osd_font_windows(): m_font(NULL) { }
3940   virtual ~osd_font_windows() { }
4041
4142   virtual bool open(const char *font_path, const char *name, int &height);
trunk/src/osd/modules/midi/none.cpp
r250291r250292
4141   virtual bool poll();
4242   virtual int read(UINT8 *pOut);
4343   virtual void write(UINT8 data);
44
45private:
46   //int dummy;
4744};
4845
4946osd_midi_device *none_module::create_midi_device()
trunk/src/osd/modules/midi/portmidi.cpp
r250291r250292
4444#define MIDI_EOX    0xf7
4545
4646class osd_midi_device_pm : public osd_midi_device
47{
47{   
4848public:
49   osd_midi_device_pm(): pmStream(NULL), xmit_cnt(0), last_status(0), rx_sysex(false) { }
4950   virtual ~osd_midi_device_pm() { }
5051   virtual bool open_input(const char *devname);
5152   virtual bool open_output(const char *devname);
r250291r250292
208209   {
209210      return false;
210211   }
211   return false;
212212}
213213
214214void osd_midi_device_pm::close()
trunk/src/osd/modules/netdev/pcap.cpp
r250291r250292
168168      m_p = NULL;
169169      return;
170170   }
171   set_mac(get_mac());
171   netdev_pcap::set_mac(get_mac());
172172
173173#ifdef SDLMAME_MACOSX
174174   m_ctx.head = 0;
r250291r250292
206206   ret = pcap_sendpacket_dl(m_p, buf, len);
207207   printf("sent packet length %d, returned %d\n", len, ret);
208208   return ret ? len : 0;
209   return (!pcap_sendpacket_dl(m_p, buf, len))?len:0;
209   //return (!pcap_sendpacket_dl(m_p, buf, len))?len:0;
210210}
211211
212212int netdev_pcap::recv_dev(UINT8 **buf)
trunk/src/osd/modules/render/d3d/d3d9intf.cpp
r250291r250292
1818
1919// MAMEOS headers
2020#include "d3dintf.h"
21#include "winmain.h"
2221
2322
2423
r250291r250292
8382   {
8483      osd_printf_verbose("Direct3D: Unable to find Direct3DCreate9\n");
8584      FreeLibrary(dllhandle);
86      dllhandle = NULL;
8785      return NULL;
8886   }
8987
r250291r250292
9391   {
9492      osd_printf_verbose("Direct3D: Error attempting to initialize Direct3D9\n");
9593      FreeLibrary(dllhandle);
96      dllhandle = NULL;
9794      return NULL;
9895   }
9996
trunk/src/osd/modules/render/d3d/d3dhlsl.cpp
r250291r250292
2929#include "render.h"
3030#include "ui/ui.h"
3131#include "rendutil.h"
32#include "options.h"
3332#include "emuopts.h"
3433#include "aviio.h"
3534#include "png.h"
r250291r250292
3938#include "d3dintf.h"
4039#include "winmain.h"
4140#include "window.h"
42#include "config.h"
4341#include "d3dcomm.h"
4442#include "modules/render/drawd3d.h"
4543#include "strconv.h"
r250291r250292
7472//  shader manager constructor
7573//============================================================
7674
77shaders::shaders()
75shaders::shaders():
76   d3dintf(NULL), machine(NULL), d3d(NULL), num_screens(0), curr_screen(0), curr_frame(0), write_ini(false), read_ini(false), hlsl_prescale_x(0), hlsl_prescale_y(0), bloom_count(0),
77   vecbuf_type(), vecbuf_index(0), vecbuf_count(0), avi_output_file(NULL), avi_frame(0), avi_copy_surface(NULL), avi_copy_texture(NULL), avi_final_target(NULL), avi_final_texture(NULL),
78   black_surface(NULL), black_texture(NULL), render_snap(false), snap_rendered(false), snap_copy_target(NULL), snap_copy_texture(NULL), snap_target(NULL), snap_texture(NULL),
79   snap_width(0), snap_height(0), lines_pending(false), backbuffer(NULL), curr_effect(NULL), default_effect(NULL), prescale_effect(NULL), post_effect(NULL), distortion_effect(NULL),
80   focus_effect(NULL), phosphor_effect(NULL), deconverge_effect(NULL), color_effect(NULL), yiq_encode_effect(NULL), yiq_decode_effect(NULL), bloom_effect(NULL),
81   downsample_effect(NULL), vector_effect(NULL), fsfx_vertices(NULL), curr_texture(NULL), curr_render_target(NULL), curr_poly(NULL)
82
7883{
7984   master_enable = false;
8085   vector_enable = true;
r250291r250292
33363341         // find length of the device name
33373342         int end1 = snapstr.find("/", pos + 3);
33383343         int end2 = snapstr.find("%", pos + 3);
3339         int end = -1;
3344         int end;
33403345
33413346         if ((end1 != -1) && (end2 != -1))
33423347         {
trunk/src/osd/modules/render/d3d/d3dhlsl.h
r250291r250292
2020//  TYPE DEFINITIONS
2121//============================================================
2222
23struct slider_state;
24
2325namespace d3d
2426{
2527class effect;
trunk/src/osd/modules/render/drawd3d.cpp
r250291r250292
2727// MAME headers
2828#include "emu.h"
2929#include "render.h"
30#include "ui/ui.h"
30
3131#include "rendutil.h"
32#include "options.h"
3332#include "emuopts.h"
3433#include "aviio.h"
35#include "png.h"
3634
3735// MAMEOS headers
3836#include "modules/render/d3d/d3dintf.h"
3937#include "winmain.h"
4038#include "window.h"
41#include "config.h"
42#include "strconv.h"
4339#include "modules/render/d3d/d3dcomm.h"
4440#include "drawd3d.h"
4541
r250291r250292
616612}
617613
618614renderer::renderer(osd_window *window)
619   : osd_renderer(window, FLAG_NONE)
615   : osd_renderer(window, FLAG_NONE), m_adapter(0), m_width(0), m_height(0), m_refresh(0), m_create_error_count(0), m_device(NULL), m_gamma_supported(0), m_pixformat(),
616   m_vertexbuf(NULL), m_lockedbuf(NULL), m_numverts(0), m_vectorbatch(NULL), m_batchindex(0), m_numpolys(0), m_restarting(false), m_mod2x_supported(0), m_mod4x_supported(0),
617   m_screen_format(), m_last_texture(NULL), m_last_texture_flags(0), m_last_blendenable(0), m_last_blendop(0), m_last_blendsrc(0), m_last_blenddst(0), m_last_filter(0),
618   m_last_wrap(), m_last_modmode(0), m_hlsl_buf(NULL), m_shaders(NULL), m_shaders_options(NULL), m_texture_manager(NULL), m_line_count(0)
620619{
621   m_device = NULL;
622   m_restarting = false;
623   m_shaders = NULL;
624   m_shaders_options = NULL;
625   m_numverts = 0;
626   m_numpolys = 0;
627   m_vertexbuf = NULL;
628   m_lockedbuf = NULL;
629   m_vectorbatch = NULL;
630   m_last_texture = NULL;
631   m_hlsl_buf = NULL;
632   m_texture_manager = NULL;
633620}
634621
635622int renderer::initialize()
trunk/src/osd/modules/render/drawdd.cpp
r250291r250292
1717#include "emu.h"
1818#include "render.h"
1919#include "rendutil.h"
20#include "options.h"
2120#include "rendersw.inc"
2221
2322// MAMEOS headers
2423#include "winmain.h"
2524#include "window.h"
26#include "config.h"
2725
2826
2927
r250291r250292
4038{
4139public:
4240   renderer_dd(osd_window *window)
43   : osd_renderer(window, FLAG_NONE),
41   : osd_renderer(window, FLAG_NONE),
42      width(0),
43      height(0),
44      refresh(0),
4445      //adapter(0),
4546      adapter_ptr(NULL),
4647      clearouter(0),
trunk/src/osd/modules/render/drawnone.cpp
r250291r250292
3232   virtual void record() { };
3333   virtual void toggle_fsfx() { };
3434   virtual void destroy();
35
36private:
3735};
3836
3937//============================================================
trunk/src/osd/modules/render/drawogl.cpp
r250291r250292
1919// MAME headers
2020#include "osdcomm.h"
2121#include "emu.h"
22#include "options.h"
2322#include "emuopts.h"
2423
2524#ifndef OSD_WINDOWS
trunk/src/osd/modules/sound/direct_sound.cpp
r250291r250292
174174            memcpy(m_bytes2, (UINT8 const *)data + m_locked1, bytes - m_locked1);
175175         }
176176
177         result = unlock();
177         unlock();
178178         return DS_OK;
179179      }
180180      HRESULT clear()
r250291r250292
189189         assert(0U == m_locked2);
190190         memset(m_bytes1, 0, m_locked1);
191191
192         result = unlock();
192         unlock();
193193         return DS_OK;
194194      }
195195
trunk/src/osd/modules/sync/work_osd.cpp
r250291r250292
444444      osd_work_item *item;
445445
446446      // first allocate a new work item; try the free list first
447      INT32 lockslot = osd_scalable_lock_acquire(queue->lock);
447      INT32 myslot = osd_scalable_lock_acquire(queue->lock);
448448      do
449449      {
450450         item = (osd_work_item *)queue->free;
451451      } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item);
452      osd_scalable_lock_release(queue->lock, lockslot);
452      osd_scalable_lock_release(queue->lock, myslot);
453453
454454      // if nothing, allocate something new
455455      if (item == NULL)
trunk/src/osd/sdl/sdldir.cpp
r250291r250292
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/windir.c"
12#include "../windows/windir.cpp"
1313#else
1414
1515#ifndef _LARGEFILE64_SOURCE
trunk/src/osd/sdl/sdlfile.cpp
r250291r250292
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/winfile.c"
13#include "../windows/winutil.c"
12#include "../windows/winfile.cpp"
13#include "../windows/winutil.cpp"
1414#else
1515
1616#ifndef _LARGEFILE64_SOURCE
trunk/src/osd/sdl/sdlptty_unix.cpp
r250291r250292
1919# include <termios.h>
2020# include <libutil.h>
2121#elif defined(SDLMAME_NETBSD) || defined(SDLMAME_MACOSX)
22# include <termios.h>
2223# include <util.h>
2324#elif defined(SDLMAME_OPENBSD)
2425# include <termios.h>
trunk/src/osd/sdl/sdlptty_win32.cpp
r250291r250292
99//
1010//============================================================
1111
12#include "../windows/winptty.c"
12#include "../windows/winptty.cpp"
trunk/src/osd/sdl/sdlsocket.cpp
r250291r250292
99//============================================================
1010
1111#ifdef SDLMAME_WIN32
12#include "../windows/winsocket.c"
12#include "../windows/winsocket.cpp"
1313#else
1414
1515#include <stdio.h>
trunk/src/osd/strconv.cpp
r250291r250292
1313
1414// MAMEOS headers
1515#include "strconv.h"
16#include "unicode.h"
1716
1817#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS)
1918//============================================================
r250291r250292
120119}
121120
122121#else
123
122#include "unicode.h"
124123//============================================================
125124//  osd_uchar_from_osdchar
126125//============================================================
trunk/src/osd/windows/input.cpp
r250291r250292
122122{
123123public:
124124   device_info(running_machine &machine)
125      : m_machine(machine) { }
125      : head(NULL), next(NULL), name(NULL), poll(NULL), device(NULL), m_machine(machine) { }
126126
127127   running_machine &machine() const { return m_machine; }
128128
trunk/src/osd/windows/output.cpp
r250291r250292
1212
1313// MAME headers
1414#include "emu.h"
15#include "osdepend.h"
1615#include "winmain.h"
1716// MAMEOS headers
1817#include "output.h"
trunk/src/osd/windows/video.cpp
r250291r250292
1313// MAME headers
1414#include "emu.h"
1515#include "emuopts.h"
16#include "osdepend.h"
17#include "video/vector.h"
1816#include "render.h"
19#include "rendutil.h"
20#include "ui/ui.h"
2117#include "uiinput.h"
2218
2319// MAMEOS headers
r250291r250292
2622#include "window.h"
2723#include "input.h"
2824#include "strconv.h"
29#include "config.h"
3025
3126//============================================================
3227//  CONSTANTS
r250291r250292
113108win_monitor_info::win_monitor_info(const HMONITOR handle, const char *monitor_device, float aspect)
114109   : osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle)
115110{
116   refresh();
111   win_monitor_info::refresh();
117112}
118113
119114win_monitor_info::~win_monitor_info()
trunk/src/osd/windows/winclip.cpp
r250291r250292
7676
7777char *osd_get_clipboard_text(void)
7878{
79   char *result = NULL;
79   char *result;
8080
8181   // try to access unicode text
8282   result = get_clipboard_text_by_format(CF_UNICODETEXT, convert_wide);
trunk/src/osd/windows/window.cpp
r250291r250292
2323
2424// MAME headers
2525#include "emu.h"
26#include "emuopts.h"
2726#include "uiinput.h"
2827
2928// MAMEOS headers
r250291r250292
3130#include "window.h"
3231#include "video.h"
3332#include "input.h"
34#include "strconv.h"
35#include "config.h"
3633#include "winutf8.h"
3734
3835#include "winutil.h"
r250291r250292
617614      RECT bounds;
618615
619616      // hide cursor
620      while (ShowCursor(FALSE) >= -1) ;
617      while (ShowCursor(FALSE) >= -1) { };
621618      ShowCursor(TRUE);
622619
623620      // store the cursor position
r250291r250292
632629   else
633630   {
634631      // show cursor
635      while (ShowCursor(TRUE) < 1) ;
632      while (ShowCursor(TRUE) < 1) { };
636633      ShowCursor(FALSE);
637634
638635      // allow cursor to move freely
trunk/src/osd/windows/winfile.cpp
r250291r250292
2020// MAMEOS headers
2121#include "strconv.h"
2222#include "winutil.h"
23#include "winutf8.h"
2423
2524#include "winfile.h"
2625
r250291r250292
187186         break;
188187      case WINFILE_SOCKET:
189188         return win_read_socket(file, buffer, offset, length, actual);
190         break;
191189      case WINFILE_PTTY:
192190         return win_read_ptty(file, buffer, offset, length, actual);
193         break;
194191
195192   }
196193   return FILERR_NONE;
r250291r250292
226223         break;
227224      case WINFILE_SOCKET:
228225         return win_write_socket(file, buffer, offset, length, actual);
229         break;
230226      case WINFILE_PTTY:
231227         return win_write_ptty(file, buffer, offset, length, actual);
232         break;
233228
234229   }
235230   return FILERR_NONE;
r250291r250292
274269         break;
275270      case WINFILE_SOCKET:
276271         return FILERR_FAILURE;
277         break;
278272      case WINFILE_PTTY:
279273         return FILERR_FAILURE;
280         break;
281274
282275   }
283276   return FILERR_NONE;
trunk/src/osd/windows/winmain.cpp
r250291r250292
2929#include "winmain.h"
3030#include "window.h"
3131#include "video.h"
32#include "input.h"
33#include "output.h"
34#include "config.h"
35#include "osdepend.h"
36#include "strconv.h"
3732#include "winutf8.h"
3833#include "winutil.h"
3934#include "debugger.h"
r250291r250292
416411
417412
418413   // parse config and cmdline options
419   DWORD result = 0;
414   DWORD result;
420415   {
421416      windows_options options;
422417      windows_osd_interface osd(options);
r250291r250292
13531348//-------------------------------------------------
13541349
13551350sampling_profiler::sampling_profiler(UINT32 max_seconds, UINT8 stack_depth = 0)
1356   : m_thread(NULL),
1351   :   m_target_thread(NULL),
1352      m_thread(NULL),
13571353      m_thread_id(0),
13581354      m_thread_exit(false),
13591355      m_stack_depth(stack_depth),
trunk/src/osd/windows/winsocket.cpp
r250291r250292
1616// MAME headers
1717#include "osdcore.h"
1818
19// MAMEOS headers
20#include "strconv.h"
21#include "winutil.h"
22#include "winutf8.h"
23
2419#include "winfile.h"
2520
2621const char *winfile_socket_identifier  = "socket.";
trunk/src/osd/windows/winutf8.cpp
r250291r250292
235235                        int x, int y, int width, int height, HWND parent, HMENU menu,
236236                        HINSTANCE instance, void* param)
237237{
238   TCHAR* t_classname = NULL;
238   TCHAR* t_classname;
239239   TCHAR* t_windowname = NULL;
240240   HWND result = 0;
241241
trunk/src/osd/windows/winutil.cpp
r250291r250292
1212
1313// MAMEOS headers
1414#include "winutil.h"
15#include "strconv.h"
1615
1716//============================================================
1817//  win_error_to_file_error


Previous 199869 Revisions Next


© 1997-2024 The MAME Team